]> git.sur5r.net Git - openldap/blob - configure
b43adba44412a5e12fb1f9db3b8639c9915eba07
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.268 1999/10/28 05:48:59 kdz Exp  
4
5 # Copyright 1998,1999 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-1999 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-x-compile    enable cross compiling (no)"
45 ac_help="$ac_help
46   --enable-dmalloc      enable debug malloc support (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with Kerberos support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 LDAPD (X.500-to-LDAP Gateway) Options:"
63 ac_help="$ac_help
64   --enable-ldapd        enable building ldapd (no)"
65 ac_help="$ac_help
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd        enable building slapd (yes)"
69 ac_help="$ac_help
70     --enable-cleartext  enable cleartext passwords (yes)"
71 ac_help="$ac_help
72     --enable-crypt      enable crypt(3) passwords (auto)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-discreteaci        enable discrete rights in ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
91 ac_help="$ac_help
92     --enable-bdb2       enable bdb2 backend (no)"
93 ac_help="$ac_help
94       --with-bdb2-module        module type (static)"
95 ac_help="$ac_help
96     --enable-ldap       enable ldap backend (no)"
97 ac_help="$ac_help
98       --with-ldap-module        module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm       enable ldbm backend (yes)"
101 ac_help="$ac_help
102       --with-ldbm-api   use LDBM API (auto)"
103 ac_help="$ac_help
104       --with-ldbm-module        module type (static)"
105 ac_help="$ac_help
106       --with-ldbm-type  use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd     enable passwd backend (no)"
109 ac_help="$ac_help
110       --with-passwd-module      module type (static)"
111 ac_help="$ac_help
112     --enable-perl       enable perl backend (no)"
113 ac_help="$ac_help
114       --with-perl-module        module type (static)"
115 ac_help="$ac_help
116     --enable-shell      enable shell backend (no)"
117 ac_help="$ac_help
118       --with-shell-module       module type (static)"
119 ac_help="$ac_help
120     --enable-tcl        enable tcl backend (no)"
121 ac_help="$ac_help
122       --with-tcl-module module type (static)"
123 ac_help="$ac_help
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd       enable building slurpd (auto)"
127 ac_help="$ac_help
128 Library Generation & Linking Options"
129 ac_help="$ac_help
130   --enable-static[=PKGS]  build static libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-shared[=PKGS]  build shared libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
135 ac_help="$ac_help
136   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
137 ac_help="$ac_help
138   --disable-libtool-lock  avoid locking (might break parallel builds)"
139
140 # Initialize some variables set by options.
141 # The variables have the same names as the options, with
142 # dashes changed to underlines.
143 build=NONE
144 cache_file=./config.cache
145 exec_prefix=NONE
146 host=NONE
147 no_create=
148 nonopt=NONE
149 no_recursion=
150 prefix=NONE
151 program_prefix=NONE
152 program_suffix=NONE
153 program_transform_name=s,x,x,
154 silent=
155 site=
156 srcdir=
157 target=NONE
158 verbose=
159 x_includes=NONE
160 x_libraries=NONE
161 bindir='${exec_prefix}/bin'
162 sbindir='${exec_prefix}/sbin'
163 libexecdir='${exec_prefix}/libexec'
164 datadir='${prefix}/share'
165 sysconfdir='${prefix}/etc'
166 sharedstatedir='${prefix}/com'
167 localstatedir='${prefix}/var'
168 libdir='${exec_prefix}/lib'
169 includedir='${prefix}/include'
170 oldincludedir='/usr/include'
171 infodir='${prefix}/info'
172 mandir='${prefix}/man'
173
174 # Initialize some other variables.
175 subdirs=
176 MFLAGS= MAKEFLAGS=
177 SHELL=${CONFIG_SHELL-/bin/sh}
178 # Maximum number of lines to put in a shell here document.
179 ac_max_here_lines=12
180
181 ac_prev=
182 for ac_option
183 do
184
185   # If the previous option needs an argument, assign it.
186   if test -n "$ac_prev"; then
187     eval "$ac_prev=\$ac_option"
188     ac_prev=
189     continue
190   fi
191
192   case "$ac_option" in
193   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
194   *) ac_optarg= ;;
195   esac
196
197   # Accept the important Cygnus configure options, so we can diagnose typos.
198
199   case "$ac_option" in
200
201   -bindir | --bindir | --bindi | --bind | --bin | --bi)
202     ac_prev=bindir ;;
203   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
204     bindir="$ac_optarg" ;;
205
206   -build | --build | --buil | --bui | --bu)
207     ac_prev=build ;;
208   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
209     build="$ac_optarg" ;;
210
211   -cache-file | --cache-file | --cache-fil | --cache-fi \
212   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
213     ac_prev=cache_file ;;
214   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
215   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
216     cache_file="$ac_optarg" ;;
217
218   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
219     ac_prev=datadir ;;
220   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
221   | --da=*)
222     datadir="$ac_optarg" ;;
223
224   -disable-* | --disable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     eval "enable_${ac_feature}=no" ;;
232
233   -enable-* | --enable-*)
234     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
235     # Reject names that are not valid shell variable names.
236     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
237       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
238     fi
239     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
240     case "$ac_option" in
241       *=*) ;;
242       *) ac_optarg=yes ;;
243     esac
244     eval "enable_${ac_feature}='$ac_optarg'" ;;
245
246   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
247   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
248   | --exec | --exe | --ex)
249     ac_prev=exec_prefix ;;
250   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
251   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
252   | --exec=* | --exe=* | --ex=*)
253     exec_prefix="$ac_optarg" ;;
254
255   -gas | --gas | --ga | --g)
256     # Obsolete; use --with-gas.
257     with_gas=yes ;;
258
259   -help | --help | --hel | --he)
260     # Omit some internal or obsolete options to make the list less imposing.
261     # This message is too long to be a string in the A/UX 3.1 sh.
262     cat << EOF
263 Usage: configure [options] [host]
264 Options: [defaults in brackets after descriptions]
265 Configuration:
266   --cache-file=FILE       cache test results in FILE
267   --help                  print this message
268   --no-create             do not create output files
269   --quiet, --silent       do not print \`checking...' messages
270   --version               print the version of autoconf that created configure
271 Directory and file names:
272   --prefix=PREFIX         install architecture-independent files in PREFIX
273                           [$ac_default_prefix]
274   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
275                           [same as prefix]
276   --bindir=DIR            user executables in DIR [EPREFIX/bin]
277   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
278   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
279   --datadir=DIR           read-only architecture-independent data in DIR
280                           [PREFIX/share]
281   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
282   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
283                           [PREFIX/com]
284   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
285   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
286   --includedir=DIR        C header files in DIR [PREFIX/include]
287   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
288   --infodir=DIR           info documentation in DIR [PREFIX/info]
289   --mandir=DIR            man documentation in DIR [PREFIX/man]
290   --srcdir=DIR            find the sources in DIR [configure dir or ..]
291   --program-prefix=PREFIX prepend PREFIX to installed program names
292   --program-suffix=SUFFIX append SUFFIX to installed program names
293   --program-transform-name=PROGRAM
294                           run sed PROGRAM on installed program names
295 EOF
296     cat << EOF
297 Host type:
298   --build=BUILD           configure for building on BUILD [BUILD=HOST]
299   --host=HOST             configure for HOST [guessed]
300   --target=TARGET         configure for TARGET [TARGET=HOST]
301 Features and packages:
302   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
303   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
304   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
305   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
306   --x-includes=DIR        X include files are in DIR
307   --x-libraries=DIR       X library files are in DIR
308 EOF
309     if test -n "$ac_help"; then
310       echo "--enable and --with options recognized:$ac_help"
311     fi
312     exit 0 ;;
313
314   -host | --host | --hos | --ho)
315     ac_prev=host ;;
316   -host=* | --host=* | --hos=* | --ho=*)
317     host="$ac_optarg" ;;
318
319   -includedir | --includedir | --includedi | --included | --include \
320   | --includ | --inclu | --incl | --inc)
321     ac_prev=includedir ;;
322   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
323   | --includ=* | --inclu=* | --incl=* | --inc=*)
324     includedir="$ac_optarg" ;;
325
326   -infodir | --infodir | --infodi | --infod | --info | --inf)
327     ac_prev=infodir ;;
328   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
329     infodir="$ac_optarg" ;;
330
331   -libdir | --libdir | --libdi | --libd)
332     ac_prev=libdir ;;
333   -libdir=* | --libdir=* | --libdi=* | --libd=*)
334     libdir="$ac_optarg" ;;
335
336   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
337   | --libexe | --libex | --libe)
338     ac_prev=libexecdir ;;
339   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
340   | --libexe=* | --libex=* | --libe=*)
341     libexecdir="$ac_optarg" ;;
342
343   -localstatedir | --localstatedir | --localstatedi | --localstated \
344   | --localstate | --localstat | --localsta | --localst \
345   | --locals | --local | --loca | --loc | --lo)
346     ac_prev=localstatedir ;;
347   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
348   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
349   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
350     localstatedir="$ac_optarg" ;;
351
352   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
353     ac_prev=mandir ;;
354   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
355     mandir="$ac_optarg" ;;
356
357   -nfp | --nfp | --nf)
358     # Obsolete; use --without-fp.
359     with_fp=no ;;
360
361   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
362   | --no-cr | --no-c)
363     no_create=yes ;;
364
365   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
366   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
367     no_recursion=yes ;;
368
369   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
370   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
371   | --oldin | --oldi | --old | --ol | --o)
372     ac_prev=oldincludedir ;;
373   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
374   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
375   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
376     oldincludedir="$ac_optarg" ;;
377
378   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
379     ac_prev=prefix ;;
380   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
381     prefix="$ac_optarg" ;;
382
383   -program-prefix | --program-prefix | --program-prefi | --program-pref \
384   | --program-pre | --program-pr | --program-p)
385     ac_prev=program_prefix ;;
386   -program-prefix=* | --program-prefix=* | --program-prefi=* \
387   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
388     program_prefix="$ac_optarg" ;;
389
390   -program-suffix | --program-suffix | --program-suffi | --program-suff \
391   | --program-suf | --program-su | --program-s)
392     ac_prev=program_suffix ;;
393   -program-suffix=* | --program-suffix=* | --program-suffi=* \
394   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
395     program_suffix="$ac_optarg" ;;
396
397   -program-transform-name | --program-transform-name \
398   | --program-transform-nam | --program-transform-na \
399   | --program-transform-n | --program-transform- \
400   | --program-transform | --program-transfor \
401   | --program-transfo | --program-transf \
402   | --program-trans | --program-tran \
403   | --progr-tra | --program-tr | --program-t)
404     ac_prev=program_transform_name ;;
405   -program-transform-name=* | --program-transform-name=* \
406   | --program-transform-nam=* | --program-transform-na=* \
407   | --program-transform-n=* | --program-transform-=* \
408   | --program-transform=* | --program-transfor=* \
409   | --program-transfo=* | --program-transf=* \
410   | --program-trans=* | --program-tran=* \
411   | --progr-tra=* | --program-tr=* | --program-t=*)
412     program_transform_name="$ac_optarg" ;;
413
414   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
415   | -silent | --silent | --silen | --sile | --sil)
416     silent=yes ;;
417
418   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
419     ac_prev=sbindir ;;
420   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
421   | --sbi=* | --sb=*)
422     sbindir="$ac_optarg" ;;
423
424   -sharedstatedir | --sharedstatedir | --sharedstatedi \
425   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
426   | --sharedst | --shareds | --shared | --share | --shar \
427   | --sha | --sh)
428     ac_prev=sharedstatedir ;;
429   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
430   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
431   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
432   | --sha=* | --sh=*)
433     sharedstatedir="$ac_optarg" ;;
434
435   -site | --site | --sit)
436     ac_prev=site ;;
437   -site=* | --site=* | --sit=*)
438     site="$ac_optarg" ;;
439
440   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
441     ac_prev=srcdir ;;
442   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
443     srcdir="$ac_optarg" ;;
444
445   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
446   | --syscon | --sysco | --sysc | --sys | --sy)
447     ac_prev=sysconfdir ;;
448   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
449   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
450     sysconfdir="$ac_optarg" ;;
451
452   -target | --target | --targe | --targ | --tar | --ta | --t)
453     ac_prev=target ;;
454   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
455     target="$ac_optarg" ;;
456
457   -v | -verbose | --verbose | --verbos | --verbo | --verb)
458     verbose=yes ;;
459
460   -version | --version | --versio | --versi | --vers)
461     echo "configure generated by autoconf version 2.13.1"
462     exit 0 ;;
463
464   -with-* | --with-*)
465     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
466     # Reject names that are not valid shell variable names.
467     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
468       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469     fi
470     ac_package=`echo $ac_package| sed 's/-/_/g'`
471     case "$ac_option" in
472       *=*) ;;
473       *) ac_optarg=yes ;;
474     esac
475     eval "with_${ac_package}='$ac_optarg'" ;;
476
477   -without-* | --without-*)
478     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
479     # Reject names that are not valid shell variable names.
480     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
481       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
482     fi
483     ac_package=`echo $ac_package| sed 's/-/_/g'`
484     eval "with_${ac_package}=no" ;;
485
486   --x)
487     # Obsolete; use --with-x.
488     with_x=yes ;;
489
490   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
491   | --x-incl | --x-inc | --x-in | --x-i)
492     ac_prev=x_includes ;;
493   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
494   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
495     x_includes="$ac_optarg" ;;
496
497   -x-libraries | --x-libraries | --x-librarie | --x-librari \
498   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
499     ac_prev=x_libraries ;;
500   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
501   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
502     x_libraries="$ac_optarg" ;;
503
504   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
505     ;;
506
507   *)
508     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
509       echo "configure: warning: $ac_option: invalid host type" 1>&2
510     fi
511     if test "x$nonopt" != xNONE; then
512       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
513     fi
514     nonopt="$ac_option"
515     ;;
516
517   esac
518 done
519
520 if test -n "$ac_prev"; then
521   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
522 fi
523
524 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
525
526 # File descriptor usage:
527 # 0 standard input
528 # 1 file creation
529 # 2 errors and warnings
530 # 3 some systems may open it to /dev/tty
531 # 4 used on the Kubota Titan
532 # 6 checking for... messages and results
533 # 5 compiler messages saved in config.log
534 if test "$silent" = yes; then
535   exec 6>/dev/null
536 else
537   exec 6>&1
538 fi
539 exec 5>./config.log
540
541 echo "\
542 This file contains any messages produced by compilers while
543 running configure, to aid debugging if configure makes a mistake.
544 " 1>&5
545
546 # Strip out --no-create and --no-recursion so they do not pile up.
547 # Also quote any args containing shell metacharacters.
548 ac_configure_args=
549 for ac_arg
550 do
551   case "$ac_arg" in
552   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
553   | --no-cr | --no-c) ;;
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
556   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
557   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
558   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
559   esac
560 done
561
562 # NLS nuisances.
563 # Only set these to C if already set.  These must not be set unconditionally
564 # because not all systems understand e.g. LANG=C (notably SCO).
565 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
566 # Non-C LC_CTYPE values break the ctype check.
567 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
568 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
569 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
570 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
571
572 # confdefs.h avoids OS command line length limits that DEFS can exceed.
573 rm -rf conftest* confdefs.h
574 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
575 echo > confdefs.h
576
577 # A filename unique to this package, relative to the directory that
578 # configure is in, which we can look for to find out if srcdir is correct.
579 ac_unique_file=build/version
580
581 # Find the source files, if location was not specified.
582 if test -z "$srcdir"; then
583   ac_srcdir_defaulted=yes
584   # Try the directory containing this script, then its parent.
585   ac_prog=$0
586   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
587   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
588   srcdir=$ac_confdir
589   if test ! -r $srcdir/$ac_unique_file; then
590     srcdir=..
591   fi
592 else
593   ac_srcdir_defaulted=no
594 fi
595 if test ! -r $srcdir/$ac_unique_file; then
596   if test "$ac_srcdir_defaulted" = yes; then
597     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
598   else
599     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
600   fi
601 fi
602 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
603
604 # Prefer explicitly selected file to automatically selected ones.
605 if test -z "$CONFIG_SITE"; then
606   if test "x$prefix" != xNONE; then
607     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
608   else
609     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
610   fi
611 fi
612 for ac_site_file in $CONFIG_SITE; do
613   if test -r "$ac_site_file"; then
614     echo "loading site script $ac_site_file"
615     . "$ac_site_file"
616   fi
617 done
618
619
620 ac_ext=c
621 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
622 ac_cpp='$CPP $CPPFLAGS'
623 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
624 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
625 cross_compiling=$ac_cv_prog_cc_cross
626
627 ac_exeext=
628 ac_objext=o
629 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
630   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
631   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
632     ac_n= ac_c='
633 ' ac_t='        '
634   else
635     ac_n=-n ac_c= ac_t=
636   fi
637 else
638   ac_n= ac_c='\c' ac_t=
639 fi
640
641 ac_aux_dir=
642 for ac_dir in build $srcdir/build; do
643   if test -f $ac_dir/install-sh; then
644     ac_aux_dir=$ac_dir
645     ac_install_sh="$ac_aux_dir/install-sh -c"
646     break
647   elif test -f $ac_dir/install.sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install.sh -c"
650     break
651   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 nt 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         winsock.h               \
4607
4608 do
4609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4611 echo "configure:4612: checking for $ac_hdr" >&5
4612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 #include <$ac_hdr>
4619 EOF
4620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4621 { (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4623 if test -z "$ac_err"; then
4624   rm -rf conftest*
4625   eval "ac_cv_header_$ac_safe=yes"
4626 else
4627   echo "$ac_err" >&5
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -rf conftest*
4631   eval "ac_cv_header_$ac_safe=no"
4632 fi
4633 rm -f conftest*
4634 fi
4635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4636   echo "$ac_t""yes" 1>&6
4637     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4638   cat >> confdefs.h <<EOF
4639 #define $ac_tr_hdr 1
4640 EOF
4641  
4642 else
4643   echo "$ac_t""no" 1>&6
4644 fi
4645 done
4646
4647
4648
4649
4650 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4651 echo "configure:4652: checking for sigset in -lV3" >&5
4652 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   ac_save_LIBS="$LIBS"
4657 LIBS="-lV3  $LIBS"
4658 cat > conftest.$ac_ext <<EOF
4659 #line 4660 "configure"
4660 #include "confdefs.h"
4661 /* Override any gcc2 internal prototype to avoid an error.  */
4662 /* We use char because int might match the return type of a gcc2
4663     builtin and then its argument prototype would still apply.  */
4664 char sigset();
4665
4666 int main() {
4667 sigset()
4668 ; return 0; }
4669 EOF
4670 if { (eval echo configure:4671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4671   rm -rf conftest*
4672   eval "ac_cv_lib_$ac_lib_var=yes"
4673 else
4674   echo "configure: failed program was:" >&5
4675   cat conftest.$ac_ext >&5
4676   rm -rf conftest*
4677   eval "ac_cv_lib_$ac_lib_var=no"
4678 fi
4679 rm -f conftest*
4680 LIBS="$ac_save_LIBS"
4681
4682 fi
4683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4684   echo "$ac_t""yes" 1>&6
4685     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4686     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4687   cat >> confdefs.h <<EOF
4688 #define $ac_tr_lib 1
4689 EOF
4690
4691   LIBS="-lV3 $LIBS"
4692
4693 else
4694   echo "$ac_t""no" 1>&6
4695 fi
4696
4697
4698 if test "${ac_cv_header_winsock_h}" = yes; then
4699     echo $ac_n "checking for winsock support""... $ac_c" 1>&6
4700 echo "configure:4701: checking for winsock support" >&5
4701     cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704
4705 #include <winsock.h>
4706     
4707 int main() {
4708
4709 socket(0,0,0);
4710 select(0,NULL,NULL,NULL,NULL);
4711 closesocket(0);
4712 gethostname(NULL,0);
4713     
4714 ; return 0; }
4715 EOF
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717   rm -rf conftest*
4718   
4719         echo "$ac_t""yes" 1>&6
4720         cat >> confdefs.h <<\EOF
4721 #define HAVE_WINSOCK 1
4722 EOF
4723
4724         ac_cv_func_socket=yes
4725         ac_cv_func_select=yes
4726         ac_cv_func_closesocket=yes
4727         ac_cv_func_gethostname=yes
4728     
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   
4734         echo "$ac_t""no" 1>&6
4735     
4736 fi
4737 rm -f conftest*
4738 fi
4739
4740
4741 echo $ac_n "checking for socket""... $ac_c" 1>&6
4742 echo "configure:4743: checking for socket" >&5
4743 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749 /* System header to define __stub macros and hopefully few prototypes,
4750     which can conflict with char socket(); below.  */
4751 #include <assert.h>
4752 /* Override any gcc2 internal prototype to avoid an error.  */
4753 /* We use char because int might match the return type of a gcc2
4754     builtin and then its argument prototype would still apply.  */
4755 char socket();
4756 char (*f)();
4757
4758 int main() {
4759
4760 /* The GNU C library defines this for functions which it implements
4761     to always fail with ENOSYS.  Some functions are actually named
4762     something starting with __ and the normal name is an alias.  */
4763 #if defined (__stub_socket) || defined (__stub___socket)
4764 choke me
4765 #else
4766 f = socket;
4767 #endif
4768
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   eval "ac_cv_func_socket=yes"
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_func_socket=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785   :
4786 else
4787   echo "$ac_t""no" 1>&6
4788         
4789         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4790 echo "configure:4791: checking for main in -lsocket" >&5
4791 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   ac_save_LIBS="$LIBS"
4796 LIBS="-lsocket  $LIBS"
4797 cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800
4801 int main() {
4802 main()
4803 ; return 0; }
4804 EOF
4805 if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4806   rm -rf conftest*
4807   eval "ac_cv_lib_$ac_lib_var=yes"
4808 else
4809   echo "configure: failed program was:" >&5
4810   cat conftest.$ac_ext >&5
4811   rm -rf conftest*
4812   eval "ac_cv_lib_$ac_lib_var=no"
4813 fi
4814 rm -f conftest*
4815 LIBS="$ac_save_LIBS"
4816
4817 fi
4818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4819   echo "$ac_t""yes" 1>&6
4820     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4822   cat >> confdefs.h <<EOF
4823 #define $ac_tr_lib 1
4824 EOF
4825
4826   LIBS="-lsocket $LIBS"
4827
4828 else
4829   echo "$ac_t""no" 1>&6
4830 fi
4831
4832         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4833 echo "configure:4834: checking for main in -lnet" >&5
4834 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   ac_save_LIBS="$LIBS"
4839 LIBS="-lnet  $LIBS"
4840 cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843
4844 int main() {
4845 main()
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   eval "ac_cv_lib_$ac_lib_var=yes"
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   eval "ac_cv_lib_$ac_lib_var=no"
4856 fi
4857 rm -f conftest*
4858 LIBS="$ac_save_LIBS"
4859
4860 fi
4861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4862   echo "$ac_t""yes" 1>&6
4863     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4865   cat >> confdefs.h <<EOF
4866 #define $ac_tr_lib 1
4867 EOF
4868
4869   LIBS="-lnet $LIBS"
4870
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874
4875         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4876 echo "configure:4877: checking for socket in -lnet" >&5
4877 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   ac_save_LIBS="$LIBS"
4882 LIBS="-lnet  $LIBS"
4883 cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886 /* Override any gcc2 internal prototype to avoid an error.  */
4887 /* We use char because int might match the return type of a gcc2
4888     builtin and then its argument prototype would still apply.  */
4889 char socket();
4890
4891 int main() {
4892 socket()
4893 ; return 0; }
4894 EOF
4895 if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4896   rm -rf conftest*
4897   eval "ac_cv_lib_$ac_lib_var=yes"
4898 else
4899   echo "configure: failed program was:" >&5
4900   cat conftest.$ac_ext >&5
4901   rm -rf conftest*
4902   eval "ac_cv_lib_$ac_lib_var=no"
4903 fi
4904 rm -f conftest*
4905 LIBS="$ac_save_LIBS"
4906
4907 fi
4908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4909   echo "$ac_t""yes" 1>&6
4910     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4911     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4912   cat >> confdefs.h <<EOF
4913 #define $ac_tr_lib 1
4914 EOF
4915
4916   LIBS="-lnet $LIBS"
4917
4918 else
4919   echo "$ac_t""no" 1>&6
4920 fi
4921
4922         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4923 echo "configure:4924: checking for main in -lnsl_s" >&5
4924 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4925 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   ac_save_LIBS="$LIBS"
4929 LIBS="-lnsl_s  $LIBS"
4930 cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933
4934 int main() {
4935 main()
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4939   rm -rf conftest*
4940   eval "ac_cv_lib_$ac_lib_var=yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   eval "ac_cv_lib_$ac_lib_var=no"
4946 fi
4947 rm -f conftest*
4948 LIBS="$ac_save_LIBS"
4949
4950 fi
4951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4952   echo "$ac_t""yes" 1>&6
4953     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4954     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4955   cat >> confdefs.h <<EOF
4956 #define $ac_tr_lib 1
4957 EOF
4958
4959   LIBS="-lnsl_s $LIBS"
4960
4961 else
4962   echo "$ac_t""no" 1>&6
4963 fi
4964
4965         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4966 echo "configure:4967: checking for main in -lnsl" >&5
4967 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4969   echo $ac_n "(cached) $ac_c" 1>&6
4970 else
4971   ac_save_LIBS="$LIBS"
4972 LIBS="-lnsl  $LIBS"
4973 cat > conftest.$ac_ext <<EOF
4974 #line 4975 "configure"
4975 #include "confdefs.h"
4976
4977 int main() {
4978 main()
4979 ; return 0; }
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4982   rm -rf conftest*
4983   eval "ac_cv_lib_$ac_lib_var=yes"
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -rf conftest*
4988   eval "ac_cv_lib_$ac_lib_var=no"
4989 fi
4990 rm -f conftest*
4991 LIBS="$ac_save_LIBS"
4992
4993 fi
4994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4995   echo "$ac_t""yes" 1>&6
4996     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4997     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4998   cat >> confdefs.h <<EOF
4999 #define $ac_tr_lib 1
5000 EOF
5001
5002   LIBS="-lnsl $LIBS"
5003
5004 else
5005   echo "$ac_t""no" 1>&6
5006 fi
5007
5008         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5009 echo "configure:5010: checking for socket in -linet" >&5
5010 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   ac_save_LIBS="$LIBS"
5015 LIBS="-linet  $LIBS"
5016 cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019 /* Override any gcc2 internal prototype to avoid an error.  */
5020 /* We use char because int might match the return type of a gcc2
5021     builtin and then its argument prototype would still apply.  */
5022 char socket();
5023
5024 int main() {
5025 socket()
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_lib_$ac_lib_var=no"
5036 fi
5037 rm -f conftest*
5038 LIBS="$ac_save_LIBS"
5039
5040 fi
5041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5045   cat >> confdefs.h <<EOF
5046 #define $ac_tr_lib 1
5047 EOF
5048
5049   LIBS="-linet $LIBS"
5050
5051 else
5052   echo "$ac_t""no" 1>&6
5053 fi
5054
5055         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5056 echo "configure:5057: checking for main in -lgen" >&5
5057 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5059   echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061   ac_save_LIBS="$LIBS"
5062 LIBS="-lgen  $LIBS"
5063 cat > conftest.$ac_ext <<EOF
5064 #line 5065 "configure"
5065 #include "confdefs.h"
5066
5067 int main() {
5068 main()
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=yes"
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   eval "ac_cv_lib_$ac_lib_var=no"
5079 fi
5080 rm -f conftest*
5081 LIBS="$ac_save_LIBS"
5082
5083 fi
5084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5085   echo "$ac_t""yes" 1>&6
5086     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5088   cat >> confdefs.h <<EOF
5089 #define $ac_tr_lib 1
5090 EOF
5091
5092   LIBS="-lgen $LIBS"
5093
5094 else
5095   echo "$ac_t""no" 1>&6
5096 fi
5097
5098
5099 fi
5100
5101
5102 echo $ac_n "checking for select""... $ac_c" 1>&6
5103 echo "configure:5104: checking for select" >&5
5104 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5105   echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107   cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 /* System header to define __stub macros and hopefully few prototypes,
5111     which can conflict with char select(); below.  */
5112 #include <assert.h>
5113 /* Override any gcc2 internal prototype to avoid an error.  */
5114 /* We use char because int might match the return type of a gcc2
5115     builtin and then its argument prototype would still apply.  */
5116 char select();
5117 char (*f)();
5118
5119 int main() {
5120
5121 /* The GNU C library defines this for functions which it implements
5122     to always fail with ENOSYS.  Some functions are actually named
5123     something starting with __ and the normal name is an alias.  */
5124 #if defined (__stub_select) || defined (__stub___select)
5125 choke me
5126 #else
5127 f = select;
5128 #endif
5129
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_func_select=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_func_select=no"
5140 fi
5141 rm -f conftest*
5142 fi
5143
5144 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5145   echo "$ac_t""yes" 1>&6
5146   :
5147 else
5148   echo "$ac_t""no" 1>&6
5149 { echo "configure: error: select() required." 1>&2; exit 1; }
5150 fi
5151
5152
5153 if test "${ac_cv_header_winsock_h}" != yes; then
5154                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5155 echo "configure:5156: checking types of arguments for select()" >&5
5156  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5160   echo $ac_n "(cached) $ac_c" 1>&6
5161 else
5162     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5166      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5167       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5168        cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 #ifdef HAVE_SYS_TYPES_H
5172 #include <sys/types.h>
5173 #endif
5174 #ifdef HAVE_SYS_TIME_H
5175 #include <sys/time.h>
5176 #endif
5177 #ifdef HAVE_SYS_SELECT_H
5178 #include <sys/select.h>
5179 #endif
5180 #ifdef HAVE_SYS_SOCKET_H
5181 #include <sys/socket.h>
5182 #endif
5183 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);
5184 int main() {
5185
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5189   rm -rf conftest*
5190           ac_not_found=no ; break 3
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   ac_not_found=yes
5196 fi
5197 rm -f conftest*
5198       done
5199      done
5200     done
5201    
5202 fi
5203   
5204 fi
5205  
5206 fi
5207  if test "$ac_not_found" = yes; then
5208   ac_cv_func_select_arg1=int 
5209   ac_cv_func_select_arg234='int *' 
5210   ac_cv_func_select_arg5='struct timeval *'
5211  fi
5212  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5213  cat >> confdefs.h <<EOF
5214 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5215 EOF
5216
5217  cat >> confdefs.h <<EOF
5218 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5219 EOF
5220
5221  cat >> confdefs.h <<EOF
5222 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5223 EOF
5224
5225
5226 fi
5227
5228
5229 for ac_hdr in regex.h 
5230 do
5231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5233 echo "configure:5234: checking for $ac_hdr" >&5
5234 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 #include <$ac_hdr>
5241 EOF
5242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5243 { (eval echo configure:5244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5245 if test -z "$ac_err"; then
5246   rm -rf conftest*
5247   eval "ac_cv_header_$ac_safe=yes"
5248 else
5249   echo "$ac_err" >&5
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   eval "ac_cv_header_$ac_safe=no"
5254 fi
5255 rm -f conftest*
5256 fi
5257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5260   cat >> confdefs.h <<EOF
5261 #define $ac_tr_hdr 1
5262 EOF
5263  
5264 else
5265   echo "$ac_t""no" 1>&6
5266 fi
5267 done
5268
5269 if test "$ac_cv_header_regex_h" != yes ; then
5270         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5271 fi
5272 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5273 echo "configure:5274: checking for regfree" >&5
5274 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char regfree(); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 /* We use char because int might match the return type of a gcc2
5285     builtin and then its argument prototype would still apply.  */
5286 char regfree();
5287 char (*f)();
5288
5289 int main() {
5290
5291 /* The GNU C library defines this for functions which it implements
5292     to always fail with ENOSYS.  Some functions are actually named
5293     something starting with __ and the normal name is an alias.  */
5294 #if defined (__stub_regfree) || defined (__stub___regfree)
5295 choke me
5296 #else
5297 f = regfree;
5298 #endif
5299
5300 ; return 0; }
5301 EOF
5302 if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5303   rm -rf conftest*
5304   eval "ac_cv_func_regfree=yes"
5305 else
5306   echo "configure: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   rm -rf conftest*
5309   eval "ac_cv_func_regfree=no"
5310 fi
5311 rm -f conftest*
5312 fi
5313
5314 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5315   echo "$ac_t""yes" 1>&6
5316   :
5317 else
5318   echo "$ac_t""no" 1>&6
5319 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5320 fi
5321
5322
5323
5324 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5325 echo "configure:5326: checking for compatible POSIX regex" >&5
5326 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5327   echo $ac_n "(cached) $ac_c" 1>&6
5328 else
5329   
5330         if test "$cross_compiling" = yes; then
5331   ol_cv_c_posix_regex=cross
5332 else
5333   cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336
5337 #include <sys/types.h>
5338 #include <regex.h>
5339 static char *pattern, *string;
5340 main()
5341 {
5342         int rc;
5343         regex_t re;
5344
5345         pattern = "^A";
5346
5347         if(regcomp(&re, pattern, 0)) {
5348                 return -1;
5349         }
5350         
5351         string = "ALL MATCH";
5352         
5353         rc = regexec(&re, string, 0, (void*)0, 0);
5354
5355         regfree(&re);
5356
5357         return rc;
5358 }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5361 then
5362   ol_cv_c_posix_regex=yes
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -fr conftest*
5367   ol_cv_c_posix_regex=no
5368 fi
5369 rm -fr conftest*
5370 fi
5371
5372 fi
5373
5374 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5375
5376 if test "$ol_cv_c_posix_regex" = no ; then
5377         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5378 fi
5379
5380 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5381 echo "configure:5382: checking for res_search" >&5
5382 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char res_search(); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 /* We use char because int might match the return type of a gcc2
5393     builtin and then its argument prototype would still apply.  */
5394 char res_search();
5395 char (*f)();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_res_search) || defined (__stub___res_search)
5403 choke me
5404 #else
5405 f = res_search;
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_res_search=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_res_search=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   :
5425 else
5426   echo "$ac_t""no" 1>&6
5427 fi
5428
5429 if test $ac_cv_func_res_search = no ; then 
5430         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5431 echo "configure:5432: checking for res_search in -lbind" >&5
5432 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   ac_save_LIBS="$LIBS"
5437 LIBS="-lbind  $LIBS"
5438 cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 /* Override any gcc2 internal prototype to avoid an error.  */
5442 /* We use char because int might match the return type of a gcc2
5443     builtin and then its argument prototype would still apply.  */
5444 char res_search();
5445
5446 int main() {
5447 res_search()
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=yes"
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=no"
5458 fi
5459 rm -f conftest*
5460 LIBS="$ac_save_LIBS"
5461
5462 fi
5463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5467   cat >> confdefs.h <<EOF
5468 #define $ac_tr_lib 1
5469 EOF
5470
5471   LIBS="-lbind $LIBS"
5472
5473 else
5474   echo "$ac_t""no" 1>&6
5475 fi
5476
5477         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5478 fi
5479
5480 if test $ac_cv_func_res_search = no ; then 
5481         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5482 echo "configure:5483: checking for __res_search in -lbind" >&5
5483 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5484 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5485   echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487   ac_save_LIBS="$LIBS"
5488 LIBS="-lbind  $LIBS"
5489 cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 /* Override any gcc2 internal prototype to avoid an error.  */
5493 /* We use char because int might match the return type of a gcc2
5494     builtin and then its argument prototype would still apply.  */
5495 char __res_search();
5496
5497 int main() {
5498 __res_search()
5499 ; return 0; }
5500 EOF
5501 if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5502   rm -rf conftest*
5503   eval "ac_cv_lib_$ac_lib_var=yes"
5504 else
5505   echo "configure: failed program was:" >&5
5506   cat conftest.$ac_ext >&5
5507   rm -rf conftest*
5508   eval "ac_cv_lib_$ac_lib_var=no"
5509 fi
5510 rm -f conftest*
5511 LIBS="$ac_save_LIBS"
5512
5513 fi
5514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5515   echo "$ac_t""yes" 1>&6
5516     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5517     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5518   cat >> confdefs.h <<EOF
5519 #define $ac_tr_lib 1
5520 EOF
5521
5522   LIBS="-lbind $LIBS"
5523
5524 else
5525   echo "$ac_t""no" 1>&6
5526 fi
5527
5528         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5529 fi
5530
5531 if test $ac_cv_func_res_search = no ; then 
5532         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5533 echo "configure:5534: checking for res_search in -lresolv" >&5
5534 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5535 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   ac_save_LIBS="$LIBS"
5539 LIBS="-lresolv  $LIBS"
5540 cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 /* Override any gcc2 internal prototype to avoid an error.  */
5544 /* We use char because int might match the return type of a gcc2
5545     builtin and then its argument prototype would still apply.  */
5546 char res_search();
5547
5548 int main() {
5549 res_search()
5550 ; return 0; }
5551 EOF
5552 if { (eval echo configure:5553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5553   rm -rf conftest*
5554   eval "ac_cv_lib_$ac_lib_var=yes"
5555 else
5556   echo "configure: failed program was:" >&5
5557   cat conftest.$ac_ext >&5
5558   rm -rf conftest*
5559   eval "ac_cv_lib_$ac_lib_var=no"
5560 fi
5561 rm -f conftest*
5562 LIBS="$ac_save_LIBS"
5563
5564 fi
5565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5566   echo "$ac_t""yes" 1>&6
5567     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5568     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5569   cat >> confdefs.h <<EOF
5570 #define $ac_tr_lib 1
5571 EOF
5572
5573   LIBS="-lresolv $LIBS"
5574
5575 else
5576   echo "$ac_t""no" 1>&6
5577 fi
5578
5579         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5580 fi
5581
5582 if test "$ac_cv_func_res_search" = yes ; then
5583         cat >> confdefs.h <<\EOF
5584 #define HAVE_RES_SEARCH 1
5585 EOF
5586
5587 elif test $ol_enable_dns = yes ; then
5588         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5589 elif test $ol_enable_dns != no ; then
5590         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5591 fi
5592
5593
5594 ol_link_isode=no
5595 if test $ol_enable_ldapd != no ; then
5596         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5597
5598                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5599 echo "configure:5600: checking for main in -lxtpp" >&5
5600 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604   ac_save_LIBS="$LIBS"
5605 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609
5610 int main() {
5611 main()
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615   rm -rf conftest*
5616   eval "ac_cv_lib_$ac_lib_var=yes"
5617 else
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=no"
5622 fi
5623 rm -f conftest*
5624 LIBS="$ac_save_LIBS"
5625
5626 fi
5627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5628   echo "$ac_t""yes" 1>&6
5629   
5630                 ol_link_isode=yes
5631                 cat >> confdefs.h <<\EOF
5632 #define HAVE_XTPP 1
5633 EOF
5634
5635                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5636                 
5637 else
5638   echo "$ac_t""no" 1>&6
5639 :
5640 fi
5641
5642         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5643 echo "configure:5644: checking for main in -ldsap" >&5
5644 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   ac_save_LIBS="$LIBS"
5649 LIBS="-ldsap -lisode $LIBS"
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653
5654 int main() {
5655 main()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 LIBS="$ac_save_LIBS"
5669
5670 fi
5671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5672   echo "$ac_t""yes" 1>&6
5673   
5674                 ol_link_isode=yes
5675                 cat >> confdefs.h <<\EOF
5676 #define HAVE_DSAP 1
5677 EOF
5678
5679                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5680                 
5681 else
5682   echo "$ac_t""no" 1>&6
5683 :
5684 fi
5685
5686         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5687 echo "configure:5688: checking for main in -lisode" >&5
5688 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5690   echo $ac_n "(cached) $ac_c" 1>&6
5691 else
5692   ac_save_LIBS="$LIBS"
5693 LIBS="-lisode  $LIBS"
5694 cat > conftest.$ac_ext <<EOF
5695 #line 5696 "configure"
5696 #include "confdefs.h"
5697
5698 int main() {
5699 main()
5700 ; return 0; }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=yes"
5705 else
5706   echo "configure: failed program was:" >&5
5707   cat conftest.$ac_ext >&5
5708   rm -rf conftest*
5709   eval "ac_cv_lib_$ac_lib_var=no"
5710 fi
5711 rm -f conftest*
5712 LIBS="$ac_save_LIBS"
5713
5714 fi
5715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5716   echo "$ac_t""yes" 1>&6
5717   
5718                 ol_link_isode=yes
5719                 cat >> confdefs.h <<\EOF
5720 #define HAVE_ISODE 1
5721 EOF
5722
5723                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5724                 
5725 else
5726   echo "$ac_t""no" 1>&6
5727 :
5728 fi
5729
5730 fi
5731
5732 if test $ol_link_isode != no; then
5733         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5734 echo "configure:5735: checking for main in -lpp" >&5
5735 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   ac_save_LIBS="$LIBS"
5740 LIBS="-lpp  $LIBS"
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5743 "configure"
5743 #include "confdefs.h"
5744
5745 int main() {
5746 main()
5747 ; return 0; }
5748 EOF
5749 if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5750   rm -rf conftest*
5751   eval "ac_cv_lib_$ac_lib_var=yes"
5752 else
5753   echo "configure: failed program was:" >&5
5754   cat conftest.$ac_ext >&5
5755   rm -rf conftest*
5756   eval "ac_cv_lib_$ac_lib_var=no"
5757 fi
5758 rm -f conftest*
5759 LIBS="$ac_save_LIBS"
5760
5761 fi
5762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5763   echo "$ac_t""yes" 1>&6
5764   
5765                 cat >> confdefs.h <<\EOF
5766 #define HAVE_PP 1
5767 EOF
5768
5769                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5770                 
5771 else
5772   echo "$ac_t""no" 1>&6
5773 :
5774 fi
5775
5776
5777         # Extract the first word of "pepsy", so it can be a program name with args.
5778 set dummy pepsy; ac_word=$2
5779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5780 echo "configure:5781: checking for $ac_word" >&5
5781 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5782   echo $ac_n "(cached) $ac_c" 1>&6
5783 else
5784   case "$PEPSY" in
5785   /*)
5786   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5787   ;;
5788   ?:/*)                  
5789   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5790   ;;
5791   *)
5792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5793   ac_dummy="$PATH"
5794   for ac_dir in $ac_dummy; do 
5795     test -z "$ac_dir" && ac_dir=.
5796     if test -f $ac_dir/$ac_word; then
5797       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5798       break
5799     fi
5800   done
5801   IFS="$ac_save_ifs"
5802   ;;
5803 esac
5804 fi
5805 PEPSY="$ac_cv_path_PEPSY"
5806 if test -n "$PEPSY"; then
5807   echo "$ac_t""$PEPSY" 1>&6
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811
5812 fi
5813
5814 if test $ol_enable_quipu != no ; then
5815         for ac_hdr in quipu/commonarg.h
5816 do
5817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_hdr" >&5
5820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 #include <$ac_hdr>
5827 EOF
5828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5829 { (eval echo configure:5830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5831 if test -z "$ac_err"; then
5832   rm -rf conftest*
5833   eval "ac_cv_header_$ac_safe=yes"
5834 else
5835   echo "$ac_err" >&5
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_header_$ac_safe=no"
5840 fi
5841 rm -f conftest*
5842 fi
5843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5844   echo "$ac_t""yes" 1>&6
5845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5846   cat >> confdefs.h <<EOF
5847 #define $ac_tr_hdr 1
5848 EOF
5849  
5850 else
5851   echo "$ac_t""no" 1>&6
5852 fi
5853 done
5854
5855
5856         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5857                 BUILD_QUIPU=yes
5858         elif test $ol_enable_quipu = auto ; then
5859                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5860         else
5861                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5862         fi
5863 fi
5864
5865 ol_link_kerberos=no
5866
5867 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5868         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5869 do
5870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5872 echo "configure:5873: checking for $ac_hdr" >&5
5873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 #include <$ac_hdr>
5880 EOF
5881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5882 { (eval echo configure:5883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5884 if test -z "$ac_err"; then
5885   rm -rf conftest*
5886   eval "ac_cv_header_$ac_safe=yes"
5887 else
5888   echo "$ac_err" >&5
5889   echo "configure: failed program was:" >&5
5890   cat conftest.$ac_ext >&5
5891   rm -rf conftest*
5892   eval "ac_cv_header_$ac_safe=no"
5893 fi
5894 rm -f conftest*
5895 fi
5896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5897   echo "$ac_t""yes" 1>&6
5898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5899   cat >> confdefs.h <<EOF
5900 #define $ac_tr_hdr 1
5901 EOF
5902  
5903 else
5904   echo "$ac_t""no" 1>&6
5905 fi
5906 done
5907
5908
5909         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5910                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5911 echo "configure:5912: checking for main in -lkrb4" >&5
5912 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   ac_save_LIBS="$LIBS"
5917 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921
5922 int main() {
5923 main()
5924 ; return 0; }
5925 EOF
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927   rm -rf conftest*
5928   eval "ac_cv_lib_$ac_lib_var=yes"
5929 else
5930   echo "configure: failed program was:" >&5
5931   cat conftest.$ac_ext >&5
5932   rm -rf conftest*
5933   eval "ac_cv_lib_$ac_lib_var=no"
5934 fi
5935 rm -f conftest*
5936 LIBS="$ac_save_LIBS"
5937
5938 fi
5939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5940   echo "$ac_t""yes" 1>&6
5941   have_k5=yes
5942 else
5943   echo "$ac_t""no" 1>&6
5944 have_k5=no
5945 fi
5946
5947
5948                 if test $have_k5 = yes ; then
5949                         ol_with_kerberos=found
5950                         ol_link_kerberos=yes
5951
5952                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5953
5954                         LIBS="$KRB_LIBS $LIBS"
5955
5956                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5957 echo "configure:5958: checking for des_debug in Kerberos libraries" >&5
5958 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5959   echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961   
5962                                                                 save_LIBS="$LIBS"
5963                                 LIBS="$KRB_LIBS $LIBS"
5964                                 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967
5968 #include <kerberosIV/krb.h>
5969 #include <kerberosIV/des.h>
5970 extern int des_debug;
5971
5972 int main() {
5973
5974 des_debug = 1;
5975
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979   rm -rf conftest*
5980   ol_cv_var_des_debug=yes
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   ol_cv_var_des_debug=no
5986 fi
5987 rm -f conftest*
5988                                                                 LIBS="$save_LIBS"
5989                         
5990 fi
5991
5992 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5993
5994                         if test $ol_cv_var_des_debug = yes ; then
5995                                 cat >> confdefs.h <<\EOF
5996 #define HAVE_DES_DEBUG 1
5997 EOF
5998
5999                         fi
6000
6001                         LIBS="$save_LIBS"
6002                 fi
6003         fi
6004 fi
6005
6006 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6007         -o $ol_with_kerberos = kth ; then
6008
6009         for ac_hdr in krb.h des.h krb-archaeology.h 
6010 do
6011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6013 echo "configure:6014: checking for $ac_hdr" >&5
6014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6015   echo $ac_n "(cached) $ac_c" 1>&6
6016 else
6017   cat > conftest.$ac_ext <<EOF
6018 #line 6019 "configure"
6019 #include "confdefs.h"
6020 #include <$ac_hdr>
6021 EOF
6022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6023 { (eval echo configure:6024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6025 if test -z "$ac_err"; then
6026   rm -rf conftest*
6027   eval "ac_cv_header_$ac_safe=yes"
6028 else
6029   echo "$ac_err" >&5
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=no"
6034 fi
6035 rm -f conftest*
6036 fi
6037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6040   cat >> confdefs.h <<EOF
6041 #define $ac_tr_hdr 1
6042 EOF
6043  
6044 else
6045   echo "$ac_t""no" 1>&6
6046 fi
6047 done
6048
6049
6050         if test $ac_cv_header_krb_h = yes ; then
6051                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6052 echo "configure:6053: checking for main in -lkrb" >&5
6053 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   ac_save_LIBS="$LIBS"
6058 LIBS="-lkrb -ldes $LIBS"
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062
6063 int main() {
6064 main()
6065 ; return 0; }
6066 EOF
6067 if { (eval echo configure:6068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6068   rm -rf conftest*
6069   eval "ac_cv_lib_$ac_lib_var=yes"
6070 else
6071   echo "configure: failed program was:" >&5
6072   cat conftest.$ac_ext >&5
6073   rm -rf conftest*
6074   eval "ac_cv_lib_$ac_lib_var=no"
6075 fi
6076 rm -f conftest*
6077 LIBS="$ac_save_LIBS"
6078
6079 fi
6080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082   have_k4=yes
6083 else
6084   echo "$ac_t""no" 1>&6
6085 have_k4=no
6086 fi
6087
6088
6089                 if test $have_k4 = yes ; then
6090                         ol_with_kerberos=found
6091                         ol_link_kerberos=yes
6092
6093                         KRB_LIBS="-lkrb -ldes"
6094
6095                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6096                                 cat >> confdefs.h <<\EOF
6097 #define HAVE_KTH_KERBEROS 1
6098 EOF
6099
6100                         fi
6101                 fi
6102         fi
6103 fi
6104
6105 if test $ol_link_kerberos = yes ; then
6106         cat >> confdefs.h <<\EOF
6107 #define HAVE_KERBEROS 1
6108 EOF
6109
6110
6111 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6112         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6113 fi
6114
6115 ol_link_tls=no
6116 if test $ol_with_tls != no ; then
6117         
6118         for ac_hdr in openssl/ssl.h ssl.h
6119 do
6120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6122 echo "configure:6123: checking for $ac_hdr" >&5
6123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6124   echo $ac_n "(cached) $ac_c" 1>&6
6125 else
6126   cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 #include <$ac_hdr>
6130 EOF
6131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6132 { (eval echo configure:6133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6134 if test -z "$ac_err"; then
6135   rm -rf conftest*
6136   eval "ac_cv_header_$ac_safe=yes"
6137 else
6138   echo "$ac_err" >&5
6139   echo "configure: failed program was:" >&5
6140   cat conftest.$ac_ext >&5
6141   rm -rf conftest*
6142   eval "ac_cv_header_$ac_safe=no"
6143 fi
6144 rm -f conftest*
6145 fi
6146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6147   echo "$ac_t""yes" 1>&6
6148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6149   cat >> confdefs.h <<EOF
6150 #define $ac_tr_hdr 1
6151 EOF
6152  
6153 else
6154   echo "$ac_t""no" 1>&6
6155 fi
6156 done
6157
6158         
6159         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6160                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6161 echo "configure:6162: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6162 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6164   echo $ac_n "(cached) $ac_c" 1>&6
6165 else
6166   ac_save_LIBS="$LIBS"
6167 LIBS="-lssl -lcrypto $LIBS"
6168 cat > conftest.$ac_ext <<EOF
6169 #line 6170 "configure"
6170 #include "confdefs.h"
6171 /* Override any gcc2 internal prototype to avoid an error.  */
6172 /* We use char because int might match the return type of a gcc2
6173     builtin and then its argument prototype would still apply.  */
6174 char SSLeay_add_ssl_algorithms();
6175
6176 int main() {
6177 SSLeay_add_ssl_algorithms()
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_lib_$ac_lib_var=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_lib_$ac_lib_var=no"
6188 fi
6189 rm -f conftest*
6190 LIBS="$ac_save_LIBS"
6191
6192 fi
6193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195   have_ssleay=yes
6196                         need_rsaref=no
6197 else
6198   echo "$ac_t""no" 1>&6
6199 have_ssleay=no
6200 fi
6201
6202                         
6203                 if test $have_ssleay = no ; then
6204                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6205 echo "configure:6206: checking for SSL_library_init in -lssl" >&5
6206 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210   ac_save_LIBS="$LIBS"
6211 LIBS="-lssl -lcrypto $LIBS"
6212 cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 /* We use char because int might match the return type of a gcc2
6217     builtin and then its argument prototype would still apply.  */
6218 char SSL_library_init();
6219
6220 int main() {
6221 SSL_library_init()
6222 ; return 0; }
6223 EOF
6224 if { (eval echo configure:6225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6225   rm -rf conftest*
6226   eval "ac_cv_lib_$ac_lib_var=yes"
6227 else
6228   echo "configure: failed program was:" >&5
6229   cat conftest.$ac_ext >&5
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=no"
6232 fi
6233 rm -f conftest*
6234 LIBS="$ac_save_LIBS"
6235
6236 fi
6237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6238   echo "$ac_t""yes" 1>&6
6239   have_ssleay=yes
6240                                 need_rsaref=no
6241 else
6242   echo "$ac_t""no" 1>&6
6243 have_ssleay=no
6244 fi
6245
6246                 fi
6247
6248                 if test $have_ssleay = no ; then
6249                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6250 echo "configure:6251: checking for ssl3_accept in -lssl" >&5
6251 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6253   echo $ac_n "(cached) $ac_c" 1>&6
6254 else
6255   ac_save_LIBS="$LIBS"
6256 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6257 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 /* Override any gcc2 internal prototype to avoid an error.  */
6261 /* We use char because int might match the return type of a gcc2
6262     builtin and then its argument prototype would still apply.  */
6263 char ssl3_accept();
6264
6265 int main() {
6266 ssl3_accept()
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_lib_$ac_lib_var=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=no"
6277 fi
6278 rm -f conftest*
6279 LIBS="$ac_save_LIBS"
6280
6281 fi
6282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6283   echo "$ac_t""yes" 1>&6
6284   have_ssleay=yes
6285                                 need_rsaref=yes
6286 else
6287   echo "$ac_t""no" 1>&6
6288 have_ssleay=no
6289 fi
6290
6291                 fi
6292
6293                 if test $have_ssleay = yes ; then
6294                         ol_with_tls=found
6295                         ol_link_tls=yes
6296
6297                         cat >> confdefs.h <<\EOF
6298 #define HAVE_SSLEAY 1
6299 EOF
6300
6301
6302                         if test $need_rsaref = yes; then
6303                                 cat >> confdefs.h <<\EOF
6304 #define HAVE_RSAREF 1
6305 EOF
6306
6307
6308                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6309                         else
6310                                 TLS_LIBS="-lssl -lcrypto"
6311                         fi
6312                 fi
6313         fi
6314 fi
6315
6316 if test $ol_link_tls = yes ; then
6317         cat >> confdefs.h <<\EOF
6318 #define HAVE_TLS 1
6319 EOF
6320
6321 fi      
6322
6323 for ac_func in \
6324         ctime_r                 \
6325         gethostbyname_r gethostbyaddr_r \
6326
6327 do
6328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6329 echo "configure:6330: checking for $ac_func" >&5
6330 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6331   echo $ac_n "(cached) $ac_c" 1>&6
6332 else
6333   cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6336 /* System header to define __stub macros and hopefully few prototypes,
6337     which can conflict with char $ac_func(); below.  */
6338 #include <assert.h>
6339 /* Override any gcc2 internal prototype to avoid an error.  */
6340 /* We use char because int might match the return type of a gcc2
6341     builtin and then its argument prototype would still apply.  */
6342 char $ac_func();
6343 char (*f)();
6344
6345 int main() {
6346
6347 /* The GNU C library defines this for functions which it implements
6348     to always fail with ENOSYS.  Some functions are actually named
6349     something starting with __ and the normal name is an alias.  */
6350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6351 choke me
6352 #else
6353 f = $ac_func;
6354 #endif
6355
6356 ; return 0; }
6357 EOF
6358 if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6359   rm -rf conftest*
6360   eval "ac_cv_func_$ac_func=yes"
6361 else
6362   echo "configure: failed program was:" >&5
6363   cat conftest.$ac_ext >&5
6364   rm -rf conftest*
6365   eval "ac_cv_func_$ac_func=no"
6366 fi
6367 rm -f conftest*
6368 fi
6369
6370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6371   echo "$ac_t""yes" 1>&6
6372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6373   cat >> confdefs.h <<EOF
6374 #define $ac_tr_func 1
6375 EOF
6376  
6377 else
6378   echo "$ac_t""no" 1>&6
6379 fi
6380 done
6381
6382
6383 if test "$ac_cv_func_ctime_r" = no ; then
6384         ol_cv_func_ctime_r_nargs=0
6385 else
6386         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6387 echo "configure:6388: checking number of arguments of ctime_r" >&5
6388 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6389   echo $ac_n "(cached) $ac_c" 1>&6
6390 else
6391   cat > conftest.$ac_ext <<EOF
6392 #line 6393 "configure"
6393 #include "confdefs.h"
6394 #include <time.h>
6395 int main() {
6396 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6397 ; return 0; }
6398 EOF
6399 if { (eval echo configure:6400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6400   rm -rf conftest*
6401   ol_cv_func_ctime_r_nargs=3
6402 else
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 #include <time.h>
6410 int main() {
6411 time_t ti; char *buffer; ctime_r(&ti,buffer);
6412 ; return 0; }
6413 EOF
6414 if { (eval echo configure:6415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6415   rm -rf conftest*
6416   ol_cv_func_ctime_r_nargs=2
6417 else
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   ol_cv_func_ctime_r_nargs=0
6422 fi
6423 rm -f conftest*
6424 fi
6425 rm -f conftest*
6426 fi
6427
6428 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6429   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6430     cat >> confdefs.h <<EOF
6431 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6432 EOF
6433
6434   fi
6435
6436 fi
6437
6438 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6439         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6440 echo "configure:6441: checking number of arguments of gethostbyname_r" >&5
6441 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 #include <sys/types.h>
6448 #include <sys/socket.h>
6449 #include <netinet/in.h>
6450 #include <netdb.h>
6451 #define BUFSIZE (sizeof(struct hostent)+10)
6452 int main() {
6453 struct hostent hent; char buffer[BUFSIZE];
6454                 int bufsize=BUFSIZE;int h_errno;
6455                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6456                         buffer, bufsize, &h_errno);
6457 ; return 0; }
6458 EOF
6459 if { (eval echo configure:6460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6460   rm -rf conftest*
6461   ol_cv_func_gethostbyname_r_nargs=5
6462 else
6463   echo "configure: failed program was:" >&5
6464   cat conftest.$ac_ext >&5
6465   rm -rf conftest*
6466   cat > conftest.$ac_ext <<EOF
6467 #line 6468 "configure"
6468 #include "confdefs.h"
6469 #include <sys/types.h>
6470 #include <sys/socket.h>
6471 #include <netinet/in.h>
6472 #include <netdb.h>
6473 #define BUFSIZE (sizeof(struct hostent)+10)
6474 int main() {
6475 struct hostent hent;struct hostent *rhent;
6476                         char buffer[BUFSIZE];
6477                         int bufsize=BUFSIZE;int h_errno;
6478                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6479                                 &rhent, &h_errno);
6480 ; return 0; }
6481 EOF
6482 if { (eval echo configure:6483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6483   rm -rf conftest*
6484   ol_cv_func_gethostbyname_r_nargs=6
6485 else
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488   rm -rf conftest*
6489   ol_cv_func_gethostbyname_r_nargs=0
6490 fi
6491 rm -f conftest*
6492 fi
6493 rm -f conftest*
6494 fi
6495
6496 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6497   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6498         cat >> confdefs.h <<EOF
6499 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6500 EOF
6501
6502   fi
6503
6504 else
6505         ol_cv_func_gethostbyname_r_nargs=0
6506 fi
6507  
6508 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6509         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6510 echo "configure:6511: checking number of arguments of gethostbyaddr_r" >&5
6511 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6512   echo $ac_n "(cached) $ac_c" 1>&6
6513 else
6514   cat > conftest.$ac_ext <<EOF
6515 #line 6516 "configure"
6516 #include "confdefs.h"
6517 #include <sys/types.h>
6518 #include <sys/socket.h>
6519 #include <netinet/in.h>
6520 #include <netdb.h>
6521 #define BUFSIZE (sizeof(struct hostent)+10)
6522 int main() {
6523 struct hostent hent; char buffer[BUFSIZE]; 
6524             struct in_addr add;
6525             size_t alen=sizeof(struct in_addr);
6526             int bufsize=BUFSIZE;int h_errno;
6527                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6528                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6529 ; return 0; }
6530 EOF
6531 if { (eval echo configure:6532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6532   rm -rf conftest*
6533   ol_cv_func_gethostbyaddr_r_nargs=7
6534 else
6535   echo "configure: failed program was:" >&5
6536   cat conftest.$ac_ext >&5
6537   rm -rf conftest*
6538   cat > conftest.$ac_ext <<EOF
6539 #line 6540 "configure"
6540 #include "confdefs.h"
6541 #include <sys/types.h>
6542 #include <sys/socket.h>
6543 #include <netinet/in.h>
6544 #include <netdb.h>
6545 #define BUFSIZE (sizeof(struct hostent)+10)
6546 int main() {
6547 struct hostent hent;
6548                         struct hostent *rhent; char buffer[BUFSIZE]; 
6549                         struct in_addr add;
6550                         size_t alen=sizeof(struct in_addr);
6551                         int bufsize=BUFSIZE;int h_errno;
6552                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6553                                 alen, AF_INET, &hent, buffer, bufsize, 
6554                                 &rhent, &h_errno);
6555 ; return 0; }
6556 EOF
6557 if { (eval echo configure:6558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6558   rm -rf conftest*
6559   ol_cv_func_gethostbyaddr_r_nargs=8
6560 else
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   ol_cv_func_gethostbyaddr_r_nargs=0
6565 fi
6566 rm -f conftest*
6567 fi
6568 rm -f conftest*
6569 fi
6570
6571 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6572   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6573     cat >> confdefs.h <<EOF
6574 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6575 EOF
6576
6577   fi
6578
6579 else
6580         ol_cv_func_gethostbyaddr_r_nargs=0
6581 fi
6582
6583 if test "$ac_cv_func_ctime_r" = yes \
6584         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6585         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6586         -a "$ac_cv_func_gethostbyname_r" = yes \
6587         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6588         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6589         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6590         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6591         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6592         ; then
6593  
6594         cat >> confdefs.h <<\EOF
6595 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6596 EOF
6597
6598 fi
6599
6600 ol_link_threads=no
6601
6602 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6603         -o $ol_with_threads = nt ; then
6604
6605                 if test "$ac_cv_mingw32" = yes ; then
6606         ol_link_threads=nt
6607         ol_with_threads=found
6608         ol_with_yielding_select=yes
6609         echo $ac_n "checking for NT threads""... $ac_c" 1>&6
6610 echo "configure:6611: checking for NT threads" >&5
6611         echo "$ac_t""yes" 1>&6
6612         cat >> confdefs.h <<\EOF
6613 #define HAVE_NT_THREADS 1
6614 EOF
6615
6616         fi
6617 fi
6618
6619 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6620         -o $ol_with_threads = posix ; then
6621
6622         for ac_hdr in pthread.h
6623 do
6624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6626 echo "configure:6627: checking for $ac_hdr" >&5
6627 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6628   echo $ac_n "(cached) $ac_c" 1>&6
6629 else
6630   cat > conftest.$ac_ext <<EOF
6631 #line 6632 "configure"
6632 #include "confdefs.h"
6633 #include <$ac_hdr>
6634 EOF
6635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6636 { (eval echo configure:6637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6638 if test -z "$ac_err"; then
6639   rm -rf conftest*
6640   eval "ac_cv_header_$ac_safe=yes"
6641 else
6642   echo "$ac_err" >&5
6643   echo "configure: failed program was:" >&5
6644   cat conftest.$ac_ext >&5
6645   rm -rf conftest*
6646   eval "ac_cv_header_$ac_safe=no"
6647 fi
6648 rm -f conftest*
6649 fi
6650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6651   echo "$ac_t""yes" 1>&6
6652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6653   cat >> confdefs.h <<EOF
6654 #define $ac_tr_hdr 1
6655 EOF
6656  
6657 else
6658   echo "$ac_t""no" 1>&6
6659 fi
6660 done
6661
6662
6663         if test $ac_cv_header_pthread_h = yes ; then
6664                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6665 echo "configure:6666: checking POSIX thread version" >&5
6666 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6667   echo $ac_n "(cached) $ac_c" 1>&6
6668 else
6669   
6670         cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673
6674 #               include <pthread.h>
6675                 /* this check could be improved */
6676 #               ifdef PTHREAD_ONCE_INIT
6677                         pthread_version_final;
6678 #               endif
6679         
6680 EOF
6681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6682   egrep "pthread_version_final" >/dev/null 2>&1; then
6683   rm -rf conftest*
6684   ol_pthread_final=yes
6685 else
6686   rm -rf conftest*
6687   ol_pthread_final=no
6688 fi
6689 rm -f conftest*
6690
6691
6692         cat > conftest.$ac_ext <<EOF
6693 #line 6694 "configure"
6694 #include "confdefs.h"
6695
6696 #               include <pthread.h>
6697                 /* this check could be improved */
6698 #               ifdef pthread_once_init
6699                         pthread_version_draft4;
6700 #               endif
6701         
6702 EOF
6703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6704   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6705   rm -rf conftest*
6706   ol_pthread_draft4=yes
6707 else
6708   rm -rf conftest*
6709   ol_pthread_draft4=no
6710 fi
6711 rm -f conftest*
6712
6713
6714         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6715                 ol_cv_pthread_version=final
6716         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6717                 ol_cv_pthread_version=draft4
6718         else
6719                 ol_cv_pthread_version=unknown
6720         fi
6721
6722 fi
6723
6724 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6725
6726
6727                 if test $ol_cv_pthread_version = final ; then
6728                         cat >> confdefs.h <<\EOF
6729 #define HAVE_PTHREADS_FINAL 1
6730 EOF
6731
6732                 elif test $ol_cv_pthread_version = draft4 ; then
6733                         cat >> confdefs.h <<\EOF
6734 #define HAVE_PTHREADS_D4 1
6735 EOF
6736
6737                 else
6738                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6739                 fi
6740
6741                 # consider threads found
6742                 ol_with_threads=found
6743
6744                 
6745         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6746 echo "configure:6747: checking for LinuxThreads pthread.h" >&5
6747 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6748   echo $ac_n "(cached) $ac_c" 1>&6
6749 else
6750   cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 #include <pthread.h>
6754 EOF
6755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6756   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6757   rm -rf conftest*
6758   ol_cv_header_linux_threads=yes
6759 else
6760   rm -rf conftest*
6761   ol_cv_header_linux_threads=no
6762 fi
6763 rm -f conftest*
6764
6765                 
6766 fi
6767
6768 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6769         if test $ol_cv_header_linux_threads = yes; then
6770                 cat >> confdefs.h <<\EOF
6771 #define HAVE_LINUX_THREADS 1
6772 EOF
6773
6774         fi
6775
6776                 
6777         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6778 echo "configure:6779: checking for GNU Pth pthread.h" >&5
6779 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6780   echo $ac_n "(cached) $ac_c" 1>&6
6781 else
6782   cat > conftest.$ac_ext <<EOF
6783 #line 6784 "configure"
6784 #include "confdefs.h"
6785 #include <pthread.h>
6786 #ifdef _POSIX_THREAD_IS_GNU_PTH
6787         __gnu_pth__;
6788 #endif
6789
6790 EOF
6791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6792   egrep "__gnu_pth__" >/dev/null 2>&1; then
6793   rm -rf conftest*
6794   ol_cv_header_gnu_pth_pthread_h=yes
6795 else
6796   rm -rf conftest*
6797   ol_cv_header_gnu_pth_pthread_h=no
6798 fi
6799 rm -f conftest*
6800
6801                 
6802 fi
6803
6804 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6805
6806
6807                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6808                         for ac_hdr in sched.h
6809 do
6810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6812 echo "configure:6813: checking for $ac_hdr" >&5
6813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6814   echo $ac_n "(cached) $ac_c" 1>&6
6815 else
6816   cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 #include <$ac_hdr>
6820 EOF
6821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6822 { (eval echo configure:6823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6824 if test -z "$ac_err"; then
6825   rm -rf conftest*
6826   eval "ac_cv_header_$ac_safe=yes"
6827 else
6828   echo "$ac_err" >&5
6829   echo "configure: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831   rm -rf conftest*
6832   eval "ac_cv_header_$ac_safe=no"
6833 fi
6834 rm -f conftest*
6835 fi
6836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6837   echo "$ac_t""yes" 1>&6
6838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6839   cat >> confdefs.h <<EOF
6840 #define $ac_tr_hdr 1
6841 EOF
6842  
6843 else
6844   echo "$ac_t""no" 1>&6
6845 fi
6846 done
6847
6848                 fi
6849
6850                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6851                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6852 echo "configure:6853: checking for pthread_create in default libraries" >&5
6853 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   
6857                 if test "$cross_compiling" = yes; then
6858   cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* pthread test headers */
6862 #include <pthread.h>
6863 #ifndef NULL
6864 #define NULL (void*)0
6865 #endif
6866
6867 static void *task(p)
6868         void *p;
6869 {
6870         return (void *) (p == NULL);
6871 }
6872
6873 int main() {
6874
6875         /* pthread test function */
6876         pthread_t t;
6877         int status;
6878
6879         /* make sure pthread_create() isn't just a stub */
6880 #if HAVE_PTHREADS_D4
6881         status = pthread_create(&t, pthread_attr_default, task, NULL);
6882 #else
6883         status = pthread_create(&t, NULL, task, NULL);
6884 #endif
6885
6886         if( status ) exit( status );
6887
6888         /* make sure pthread_detach() isn't just a stub */
6889 #if HAVE_PTHREADS_D4
6890         status = pthread_detach( &t );
6891 #else
6892         status = pthread_detach( t );
6893 #endif
6894
6895 #ifdef HAVE_LINUX_THREADS
6896         pthread_kill_other_threads_np();
6897 #endif
6898
6899         exit( status );
6900
6901 ; return 0; }
6902 EOF
6903 if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6904   rm -rf conftest*
6905   ol_cv_pthread_create=yes
6906 else
6907   echo "configure: failed program was:" >&5
6908   cat conftest.$ac_ext >&5
6909   rm -rf conftest*
6910   ol_cv_pthread_create=no
6911 fi
6912 rm -f conftest*
6913 else
6914   cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 /* pthread test headers */
6918 #include <pthread.h>
6919 #ifndef NULL
6920 #define NULL (void*)0
6921 #endif
6922
6923 static void *task(p)
6924         void *p;
6925 {
6926         return (void *) (p == NULL);
6927 }
6928
6929
6930 int main(argc, argv)
6931         int argc;
6932         char **argv;
6933 {
6934
6935         /* pthread test function */
6936         pthread_t t;
6937         int status;
6938
6939         /* make sure pthread_create() isn't just a stub */
6940 #if HAVE_PTHREADS_D4
6941         status = pthread_create(&t, pthread_attr_default, task, NULL);
6942 #else
6943         status = pthread_create(&t, NULL, task, NULL);
6944 #endif
6945
6946         if( status ) exit( status );
6947
6948         /* make sure pthread_detach() isn't just a stub */
6949 #if HAVE_PTHREADS_D4
6950         status = pthread_detach( &t );
6951 #else
6952         status = pthread_detach( t );
6953 #endif
6954
6955 #ifdef HAVE_LINUX_THREADS
6956         pthread_kill_other_threads_np();
6957 #endif
6958
6959         exit( status );
6960
6961 }
6962
6963 EOF
6964 if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6965 then
6966   ol_cv_pthread_create=yes
6967 else
6968   echo "configure: failed program was:" >&5
6969   cat conftest.$ac_ext >&5
6970   rm -fr conftest*
6971   ol_cv_pthread_create=no
6972 fi
6973 rm -fr conftest*
6974 fi
6975
6976 fi
6977
6978 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6979
6980                 if test $ol_cv_pthread_create != no ; then
6981                         ol_link_threads=posix
6982                         ol_link_pthreads=""
6983                 fi
6984                 
6985                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6986 if test "$ol_link_threads" = no ; then
6987         # try -kthread
6988         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6989 echo "configure:6990: checking for pthread link with -kthread" >&5
6990 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6991   echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993   
6994                 # save the flags
6995                 ol_LIBS="$LIBS"
6996                 LIBS="-kthread $LIBS"
6997
6998                 if test "$cross_compiling" = yes; then
6999   cat > conftest.$ac_ext <<EOF
7000 #line 7001 "configure"
7001 #include "confdefs.h"
7002 /* pthread test headers */
7003 #include <pthread.h>
7004 #ifndef NULL
7005 #define NULL (void*)0
7006 #endif
7007
7008 static void *task(p)
7009         void *p;
7010 {
7011         return (void *) (p == NULL);
7012 }
7013
7014 int main() {
7015
7016         /* pthread test function */
7017         pthread_t t;
7018         int status;
7019
7020         /* make sure pthread_create() isn't just a stub */
7021 #if HAVE_PTHREADS_D4
7022         status = pthread_create(&t, pthread_attr_default, task, NULL);
7023 #else
7024         status = pthread_create(&t, NULL, task, NULL);
7025 #endif
7026
7027         if( status ) exit( status );
7028
7029         /* make sure pthread_detach() isn't just a stub */
7030 #if HAVE_PTHREADS_D4
7031         status = pthread_detach( &t );
7032 #else
7033         status = pthread_detach( t );
7034 #endif
7035
7036 #ifdef HAVE_LINUX_THREADS
7037         pthread_kill_other_threads_np();
7038 #endif
7039
7040         exit( status );
7041
7042 ; return 0; }
7043 EOF
7044 if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7045   rm -rf conftest*
7046   ol_cv_pthread_kthread=yes
7047 else
7048   echo "configure: failed program was:" >&5
7049   cat conftest.$ac_ext >&5
7050   rm -rf conftest*
7051   ol_cv_pthread_kthread=no
7052 fi
7053 rm -f conftest*
7054 else
7055   cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7058 /* pthread test headers */
7059 #include <pthread.h>
7060 #ifndef NULL
7061 #define NULL (void*)0
7062 #endif
7063
7064 static void *task(p)
7065         void *p;
7066 {
7067         return (void *) (p == NULL);
7068 }
7069
7070
7071 int main(argc, argv)
7072         int argc;
7073         char **argv;
7074 {
7075
7076         /* pthread test function */
7077         pthread_t t;
7078         int status;
7079
7080         /* make sure pthread_create() isn't just a stub */
7081 #if HAVE_PTHREADS_D4
7082         status = pthread_create(&t, pthread_attr_default, task, NULL);
7083 #else
7084         status = pthread_create(&t, NULL, task, NULL);
7085 #endif
7086
7087         if( status ) exit( status );
7088
7089         /* make sure pthread_detach() isn't just a stub */
7090 #if HAVE_PTHREADS_D4
7091         status = pthread_detach( &t );
7092 #else
7093         status = pthread_detach( t );
7094 #endif
7095
7096 #ifdef HAVE_LINUX_THREADS
7097         pthread_kill_other_threads_np();
7098 #endif
7099
7100         exit( status );
7101
7102 }
7103
7104 EOF
7105 if { (eval echo configure:7106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7106 then
7107   ol_cv_pthread_kthread=yes
7108 else
7109   echo "configure: failed program was:" >&5
7110   cat conftest.$ac_ext >&5
7111   rm -fr conftest*
7112   ol_cv_pthread_kthread=no
7113 fi
7114 rm -fr conftest*
7115 fi
7116
7117
7118                 # restore the LIBS
7119                 LIBS="$ol_LIBS"
7120         
7121 fi
7122
7123 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7124
7125         if test $ol_cv_pthread_kthread = yes ; then
7126                 ol_link_pthreads="-kthread"
7127                 ol_link_threads=posix
7128         fi
7129 fi
7130
7131                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7132 if test "$ol_link_threads" = no ; then
7133         # try -pthread
7134         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7135 echo "configure:7136: checking for pthread link with -pthread" >&5
7136 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7137   echo $ac_n "(cached) $ac_c" 1>&6
7138 else
7139   
7140                 # save the flags
7141                 ol_LIBS="$LIBS"
7142                 LIBS="-pthread $LIBS"
7143
7144                 if test "$cross_compiling" = yes; then
7145   cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7148 /* pthread test headers */
7149 #include <pthread.h>
7150 #ifndef NULL
7151 #define NULL (void*)0
7152 #endif
7153
7154 static void *task(p)
7155         void *p;
7156 {
7157         return (void *) (p == NULL);
7158 }
7159
7160 int main() {
7161
7162         /* pthread test function */
7163         pthread_t t;
7164         int status;
7165
7166         /* make sure pthread_create() isn't just a stub */
7167 #if HAVE_PTHREADS_D4
7168         status = pthread_create(&t, pthread_attr_default, task, NULL);
7169 #else
7170         status = pthread_create(&t, NULL, task, NULL);
7171 #endif
7172
7173         if( status ) exit( status );
7174
7175         /* make sure pthread_detach() isn't just a stub */
7176 #if HAVE_PTHREADS_D4
7177         status = pthread_detach( &t );
7178 #else
7179         status = pthread_detach( t );
7180 #endif
7181
7182 #ifdef HAVE_LINUX_THREADS
7183         pthread_kill_other_threads_np();
7184 #endif
7185
7186         exit( status );
7187
7188 ; return 0; }
7189 EOF
7190 if { (eval echo configure:7191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7191   rm -rf conftest*
7192   ol_cv_pthread_pthread=yes
7193 else
7194   echo "configure: failed program was:" >&5
7195   cat conftest.$ac_ext >&5
7196   rm -rf conftest*
7197   ol_cv_pthread_pthread=no
7198 fi
7199 rm -f conftest*
7200 else
7201   cat > conftest.$ac_ext <<EOF
7202 #line 7203 "configure"
7203 #include "confdefs.h"
7204 /* pthread test headers */
7205 #include <pthread.h>
7206 #ifndef NULL
7207 #define NULL (void*)0
7208 #endif
7209
7210 static void *task(p)
7211         void *p;
7212 {
7213         return (void *) (p == NULL);
7214 }
7215
7216
7217 int main(argc, argv)
7218         int argc;
7219         char **argv;
7220 {
7221
7222         /* pthread test function */
7223         pthread_t t;
7224         int status;
7225
7226         /* make sure pthread_create() isn't just a stub */
7227 #if HAVE_PTHREADS_D4
7228         status = pthread_create(&t, pthread_attr_default, task, NULL);
7229 #else
7230         status = pthread_create(&t, NULL, task, NULL);
7231 #endif
7232
7233         if( status ) exit( status );
7234
7235         /* make sure pthread_detach() isn't just a stub */
7236 #if HAVE_PTHREADS_D4
7237         status = pthread_detach( &t );
7238 #else
7239         status = pthread_detach( t );
7240 #endif
7241
7242 #ifdef HAVE_LINUX_THREADS
7243         pthread_kill_other_threads_np();
7244 #endif
7245
7246         exit( status );
7247
7248 }
7249
7250 EOF
7251 if { (eval echo configure:7252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7252 then
7253   ol_cv_pthread_pthread=yes
7254 else
7255   echo "configure: failed program was:" >&5
7256   cat conftest.$ac_ext >&5
7257   rm -fr conftest*
7258   ol_cv_pthread_pthread=no
7259 fi
7260 rm -fr conftest*
7261 fi
7262
7263
7264                 # restore the LIBS
7265                 LIBS="$ol_LIBS"
7266         
7267 fi
7268
7269 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7270
7271         if test $ol_cv_pthread_pthread = yes ; then
7272                 ol_link_pthreads="-pthread"
7273                 ol_link_threads=posix
7274         fi
7275 fi
7276
7277                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7278 if test "$ol_link_threads" = no ; then
7279         # try -pthreads
7280         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7281 echo "configure:7282: checking for pthread link with -pthreads" >&5
7282 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7283   echo $ac_n "(cached) $ac_c" 1>&6
7284 else
7285   
7286                 # save the flags
7287                 ol_LIBS="$LIBS"
7288                 LIBS="-pthreads $LIBS"
7289
7290                 if test "$cross_compiling" = yes; then
7291   cat > conftest.$ac_ext <<EOF
7292 #line 7293 "configure"
7293 #include "confdefs.h"
7294 /* pthread test headers */
7295 #include <pthread.h>
7296 #ifndef NULL
7297 #define NULL (void*)0
7298 #endif
7299
7300 static void *task(p)
7301         void *p;
7302 {
7303         return (void *) (p == NULL);
7304 }
7305
7306 int main() {
7307
7308         /* pthread test function */
7309         pthread_t t;
7310         int status;
7311
7312         /* make sure pthread_create() isn't just a stub */
7313 #if HAVE_PTHREADS_D4
7314         status = pthread_create(&t, pthread_attr_default, task, NULL);
7315 #else
7316         status = pthread_create(&t, NULL, task, NULL);
7317 #endif
7318
7319         if( status ) exit( status );
7320
7321         /* make sure pthread_detach() isn't just a stub */
7322 #if HAVE_PTHREADS_D4
7323         status = pthread_detach( &t );
7324 #else
7325         status = pthread_detach( t );
7326 #endif
7327
7328 #ifdef HAVE_LINUX_THREADS
7329         pthread_kill_other_threads_np();
7330 #endif
7331
7332         exit( status );
7333
7334 ; return 0; }
7335 EOF
7336 if { (eval echo configure:7337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7337   rm -rf conftest*
7338   ol_cv_pthread_pthreads=yes
7339 else
7340   echo "configure: failed program was:" >&5
7341   cat conftest.$ac_ext >&5
7342   rm -rf conftest*
7343   ol_cv_pthread_pthreads=no
7344 fi
7345 rm -f conftest*
7346 else
7347   cat > conftest.$ac_ext <<EOF
7348 #line 7349 "configure"
7349 #include "confdefs.h"
7350 /* pthread test headers */
7351 #include <pthread.h>
7352 #ifndef NULL
7353 #define NULL (void*)0
7354 #endif
7355
7356 static void *task(p)
7357         void *p;
7358 {
7359         return (void *) (p == NULL);
7360 }
7361
7362
7363 int main(argc, argv)
7364         int argc;
7365         char **argv;
7366 {
7367
7368         /* pthread test function */
7369         pthread_t t;
7370         int status;
7371
7372         /* make sure pthread_create() isn't just a stub */
7373 #if HAVE_PTHREADS_D4
7374         status = pthread_create(&t, pthread_attr_default, task, NULL);
7375 #else
7376         status = pthread_create(&t, NULL, task, NULL);
7377 #endif
7378
7379         if( status ) exit( status );
7380
7381         /* make sure pthread_detach() isn't just a stub */
7382 #if HAVE_PTHREADS_D4
7383         status = pthread_detach( &t );
7384 #else
7385         status = pthread_detach( t );
7386 #endif
7387
7388 #ifdef HAVE_LINUX_THREADS
7389         pthread_kill_other_threads_np();
7390 #endif
7391
7392         exit( status );
7393
7394 }
7395
7396 EOF
7397 if { (eval echo configure:7398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7398 then
7399   ol_cv_pthread_pthreads=yes
7400 else
7401   echo "configure: failed program was:" >&5
7402   cat conftest.$ac_ext >&5
7403   rm -fr conftest*
7404   ol_cv_pthread_pthreads=no
7405 fi
7406 rm -fr conftest*
7407 fi
7408
7409
7410                 # restore the LIBS
7411                 LIBS="$ol_LIBS"
7412         
7413 fi
7414
7415 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7416
7417         if test $ol_cv_pthread_pthreads = yes ; then
7418                 ol_link_pthreads="-pthreads"
7419                 ol_link_threads=posix
7420         fi
7421 fi
7422
7423                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7424 if test "$ol_link_threads" = no ; then
7425         # try -mthreads
7426         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7427 echo "configure:7428: checking for pthread link with -mthreads" >&5
7428 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7429   echo $ac_n "(cached) $ac_c" 1>&6
7430 else
7431   
7432                 # save the flags
7433                 ol_LIBS="$LIBS"
7434                 LIBS="-mthreads $LIBS"
7435
7436                 if test "$cross_compiling" = yes; then
7437   cat > conftest.$ac_ext <<EOF
7438 #line 7439 "configure"
7439 #include "confdefs.h"
7440 /* pthread test headers */
7441 #include <pthread.h>
7442 #ifndef NULL
7443 #define NULL (void*)0
7444 #endif
7445
7446 static void *task(p)
7447         void *p;
7448 {
7449         return (void *) (p == NULL);
7450 }
7451
7452 int main() {
7453
7454         /* pthread test function */
7455         pthread_t t;
7456         int status;
7457
7458         /* make sure pthread_create() isn't just a stub */
7459 #if HAVE_PTHREADS_D4
7460         status = pthread_create(&t, pthread_attr_default, task, NULL);
7461 #else
7462         status = pthread_create(&t, NULL, task, NULL);
7463 #endif
7464
7465         if( status ) exit( status );
7466
7467         /* make sure pthread_detach() isn't just a stub */
7468 #if HAVE_PTHREADS_D4
7469         status = pthread_detach( &t );
7470 #else
7471         status = pthread_detach( t );
7472 #endif
7473
7474 #ifdef HAVE_LINUX_THREADS
7475         pthread_kill_other_threads_np();
7476 #endif
7477
7478         exit( status );
7479
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7483   rm -rf conftest*
7484   ol_cv_pthread_mthreads=yes
7485 else
7486   echo "configure: failed program was:" >&5
7487   cat conftest.$ac_ext >&5
7488   rm -rf conftest*
7489   ol_cv_pthread_mthreads=no
7490 fi
7491 rm -f conftest*
7492 else
7493   cat > conftest.$ac_ext <<EOF
7494 #line 7495 "configure"
7495 #include "confdefs.h"
7496 /* pthread test headers */
7497 #include <pthread.h>
7498 #ifndef NULL
7499 #define NULL (void*)0
7500 #endif
7501
7502 static void *task(p)
7503         void *p;
7504 {
7505         return (void *) (p == NULL);
7506 }
7507
7508
7509 int main(argc, argv)
7510         int argc;
7511         char **argv;
7512 {
7513
7514         /* pthread test function */
7515         pthread_t t;
7516         int status;
7517
7518         /* make sure pthread_create() isn't just a stub */
7519 #if HAVE_PTHREADS_D4
7520         status = pthread_create(&t, pthread_attr_default, task, NULL);
7521 #else
7522         status = pthread_create(&t, NULL, task, NULL);
7523 #endif
7524
7525         if( status ) exit( status );
7526
7527         /* make sure pthread_detach() isn't just a stub */
7528 #if HAVE_PTHREADS_D4
7529         status = pthread_detach( &t );
7530 #else
7531         status = pthread_detach( t );
7532 #endif
7533
7534 #ifdef HAVE_LINUX_THREADS
7535         pthread_kill_other_threads_np();
7536 #endif
7537
7538         exit( status );
7539
7540 }
7541
7542 EOF
7543 if { (eval echo configure:7544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7544 then
7545   ol_cv_pthread_mthreads=yes
7546 else
7547   echo "configure: failed program was:" >&5
7548   cat conftest.$ac_ext >&5
7549   rm -fr conftest*
7550   ol_cv_pthread_mthreads=no
7551 fi
7552 rm -fr conftest*
7553 fi
7554
7555
7556                 # restore the LIBS
7557                 LIBS="$ol_LIBS"
7558         
7559 fi
7560
7561 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7562
7563         if test $ol_cv_pthread_mthreads = yes ; then
7564                 ol_link_pthreads="-mthreads"
7565                 ol_link_threads=posix
7566         fi
7567 fi
7568
7569                 # Pthread try link: -thread (ol_cv_pthread_thread)
7570 if test "$ol_link_threads" = no ; then
7571         # try -thread
7572         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7573 echo "configure:7574: checking for pthread link with -thread" >&5
7574 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7575   echo $ac_n "(cached) $ac_c" 1>&6
7576 else
7577   
7578                 # save the flags
7579                 ol_LIBS="$LIBS"
7580                 LIBS="-thread $LIBS"
7581
7582                 if test "$cross_compiling" = yes; then
7583   cat > conftest.$ac_ext <<EOF
7584 #line 7585 "configure"
7585 #include "confdefs.h"
7586 /* pthread test headers */
7587 #include <pthread.h>
7588 #ifndef NULL
7589 #define NULL (void*)0
7590 #endif
7591
7592 static void *task(p)
7593         void *p;
7594 {
7595         return (void *) (p == NULL);
7596 }
7597
7598 int main() {
7599
7600         /* pthread test function */
7601         pthread_t t;
7602         int status;
7603
7604         /* make sure pthread_create() isn't just a stub */
7605 #if HAVE_PTHREADS_D4
7606         status = pthread_create(&t, pthread_attr_default, task, NULL);
7607 #else
7608         status = pthread_create(&t, NULL, task, NULL);
7609 #endif
7610
7611         if( status ) exit( status );
7612
7613         /* make sure pthread_detach() isn't just a stub */
7614 #if HAVE_PTHREADS_D4
7615         status = pthread_detach( &t );
7616 #else
7617         status = pthread_detach( t );
7618 #endif
7619
7620 #ifdef HAVE_LINUX_THREADS
7621         pthread_kill_other_threads_np();
7622 #endif
7623
7624         exit( status );
7625
7626 ; return 0; }
7627 EOF
7628 if { (eval echo configure:7629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7629   rm -rf conftest*
7630   ol_cv_pthread_thread=yes
7631 else
7632   echo "configure: failed program was:" >&5
7633   cat conftest.$ac_ext >&5
7634   rm -rf conftest*
7635   ol_cv_pthread_thread=no
7636 fi
7637 rm -f conftest*
7638 else
7639   cat > conftest.$ac_ext <<EOF
7640 #line 7641 "configure"
7641 #include "confdefs.h"
7642 /* pthread test headers */
7643 #include <pthread.h>
7644 #ifndef NULL
7645 #define NULL (void*)0
7646 #endif
7647
7648 static void *task(p)
7649         void *p;
7650 {
7651         return (void *) (p == NULL);
7652 }
7653
7654
7655 int main(argc, argv)
7656         int argc;
7657         char **argv;
7658 {
7659
7660         /* pthread test function */
7661         pthread_t t;
7662         int status;
7663
7664         /* make sure pthread_create() isn't just a stub */
7665 #if HAVE_PTHREADS_D4
7666         status = pthread_create(&t, pthread_attr_default, task, NULL);
7667 #else
7668         status = pthread_create(&t, NULL, task, NULL);
7669 #endif
7670
7671         if( status ) exit( status );
7672
7673         /* make sure pthread_detach() isn't just a stub */
7674 #if HAVE_PTHREADS_D4
7675         status = pthread_detach( &t );
7676 #else
7677         status = pthread_detach( t );
7678 #endif
7679
7680 #ifdef HAVE_LINUX_THREADS
7681         pthread_kill_other_threads_np();
7682 #endif
7683
7684         exit( status );
7685
7686 }
7687
7688 EOF
7689 if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7690 then
7691   ol_cv_pthread_thread=yes
7692 else
7693   echo "configure: failed program was:" >&5
7694   cat conftest.$ac_ext >&5
7695   rm -fr conftest*
7696   ol_cv_pthread_thread=no
7697 fi
7698 rm -fr conftest*
7699 fi
7700
7701
7702                 # restore the LIBS
7703                 LIBS="$ol_LIBS"
7704         
7705 fi
7706
7707 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7708
7709         if test $ol_cv_pthread_thread = yes ; then
7710                 ol_link_pthreads="-thread"
7711                 ol_link_threads=posix
7712         fi
7713 fi
7714
7715
7716                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7717 if test "$ol_link_threads" = no ; then
7718         # try -lpthread -lmach -lexc -lc_r
7719         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7720 echo "configure:7721: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7721 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7722   echo $ac_n "(cached) $ac_c" 1>&6
7723 else
7724   
7725                 # save the flags
7726                 ol_LIBS="$LIBS"
7727                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7728
7729                 if test "$cross_compiling" = yes; then
7730   cat > conftest.$ac_ext <<EOF
7731 #line 7732 "configure"
7732 #include "confdefs.h"
7733 /* pthread test headers */
7734 #include <pthread.h>
7735 #ifndef NULL
7736 #define NULL (void*)0
7737 #endif
7738
7739 static void *task(p)
7740         void *p;
7741 {
7742         return (void *) (p == NULL);
7743 }
7744
7745 int main() {
7746
7747         /* pthread test function */
7748         pthread_t t;
7749         int status;
7750
7751         /* make sure pthread_create() isn't just a stub */
7752 #if HAVE_PTHREADS_D4
7753         status = pthread_create(&t, pthread_attr_default, task, NULL);
7754 #else
7755         status = pthread_create(&t, NULL, task, NULL);
7756 #endif
7757
7758         if( status ) exit( status );
7759
7760         /* make sure pthread_detach() isn't just a stub */
7761 #if HAVE_PTHREADS_D4
7762         status = pthread_detach( &t );
7763 #else
7764         status = pthread_detach( t );
7765 #endif
7766
7767 #ifdef HAVE_LINUX_THREADS
7768         pthread_kill_other_threads_np();
7769 #endif
7770
7771         exit( status );
7772
7773 ; return 0; }
7774 EOF
7775 if { (eval echo configure:7776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7776   rm -rf conftest*
7777   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7778 else
7779   echo "configure: failed program was:" >&5
7780   cat conftest.$ac_ext >&5
7781   rm -rf conftest*
7782   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7783 fi
7784 rm -f conftest*
7785 else
7786   cat > conftest.$ac_ext <<EOF
7787 #line 7788 "configure"
7788 #include "confdefs.h"
7789 /* pthread test headers */
7790 #include <pthread.h>
7791 #ifndef NULL
7792 #define NULL (void*)0
7793 #endif
7794
7795 static void *task(p)
7796         void *p;
7797 {
7798         return (void *) (p == NULL);
7799 }
7800
7801
7802 int main(argc, argv)
7803         int argc;
7804         char **argv;
7805 {
7806
7807         /* pthread test function */
7808         pthread_t t;
7809         int status;
7810
7811         /* make sure pthread_create() isn't just a stub */
7812 #if HAVE_PTHREADS_D4
7813         status = pthread_create(&t, pthread_attr_default, task, NULL);
7814 #else
7815         status = pthread_create(&t, NULL, task, NULL);
7816 #endif
7817
7818         if( status ) exit( status );
7819
7820         /* make sure pthread_detach() isn't just a stub */
7821 #if HAVE_PTHREADS_D4
7822         status = pthread_detach( &t );
7823 #else
7824         status = pthread_detach( t );
7825 #endif
7826
7827 #ifdef HAVE_LINUX_THREADS
7828         pthread_kill_other_threads_np();
7829 #endif
7830
7831         exit( status );
7832
7833 }
7834
7835 EOF
7836 if { (eval echo configure:7837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7837 then
7838   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7839 else
7840   echo "configure: failed program was:" >&5
7841   cat conftest.$ac_ext >&5
7842   rm -fr conftest*
7843   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7844 fi
7845 rm -fr conftest*
7846 fi
7847
7848
7849                 # restore the LIBS
7850                 LIBS="$ol_LIBS"
7851         
7852 fi
7853
7854 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7855
7856         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7857                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7858                 ol_link_threads=posix
7859         fi
7860 fi
7861
7862                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7863 if test "$ol_link_threads" = no ; then
7864         # try -lpthread -lmach -lexc
7865         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7866 echo "configure:7867: checking for pthread link with -lpthread -lmach -lexc" >&5
7867 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7868   echo $ac_n "(cached) $ac_c" 1>&6
7869 else
7870   
7871                 # save the flags
7872                 ol_LIBS="$LIBS"
7873                 LIBS="-lpthread -lmach -lexc $LIBS"
7874
7875                 if test "$cross_compiling" = yes; then
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 /* pthread test headers */
7880 #include <pthread.h>
7881 #ifndef NULL
7882 #define NULL (void*)0
7883 #endif
7884
7885 static void *task(p)
7886         void *p;
7887 {
7888         return (void *) (p == NULL);
7889 }
7890
7891 int main() {
7892
7893         /* pthread test function */
7894         pthread_t t;
7895         int status;
7896
7897         /* make sure pthread_create() isn't just a stub */
7898 #if HAVE_PTHREADS_D4
7899         status = pthread_create(&t, pthread_attr_default, task, NULL);
7900 #else
7901         status = pthread_create(&t, NULL, task, NULL);
7902 #endif
7903
7904         if( status ) exit( status );
7905
7906         /* make sure pthread_detach() isn't just a stub */
7907 #if HAVE_PTHREADS_D4
7908         status = pthread_detach( &t );
7909 #else
7910         status = pthread_detach( t );
7911 #endif
7912
7913 #ifdef HAVE_LINUX_THREADS
7914         pthread_kill_other_threads_np();
7915 #endif
7916
7917         exit( status );
7918
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7922   rm -rf conftest*
7923   ol_cv_pthread_lpthread_lmach_lexc=yes
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   ol_cv_pthread_lpthread_lmach_lexc=no
7929 fi
7930 rm -f conftest*
7931 else
7932   cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 /* pthread test headers */
7936 #include <pthread.h>
7937 #ifndef NULL
7938 #define NULL (void*)0
7939 #endif
7940
7941 static void *task(p)
7942         void *p;
7943 {
7944         return (void *) (p == NULL);
7945 }
7946
7947
7948 int main(argc, argv)
7949         int argc;
7950         char **argv;
7951 {
7952
7953         /* pthread test function */
7954         pthread_t t;
7955         int status;
7956
7957         /* make sure pthread_create() isn't just a stub */
7958 #if HAVE_PTHREADS_D4
7959         status = pthread_create(&t, pthread_attr_default, task, NULL);
7960 #else
7961         status = pthread_create(&t, NULL, task, NULL);
7962 #endif
7963
7964         if( status ) exit( status );
7965
7966         /* make sure pthread_detach() isn't just a stub */
7967 #if HAVE_PTHREADS_D4
7968         status = pthread_detach( &t );
7969 #else
7970         status = pthread_detach( t );
7971 #endif
7972
7973 #ifdef HAVE_LINUX_THREADS
7974         pthread_kill_other_threads_np();
7975 #endif
7976
7977         exit( status );
7978
7979 }
7980
7981 EOF
7982 if { (eval echo configure:7983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7983 then
7984   ol_cv_pthread_lpthread_lmach_lexc=yes
7985 else
7986   echo "configure: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   rm -fr conftest*
7989   ol_cv_pthread_lpthread_lmach_lexc=no
7990 fi
7991 rm -fr conftest*
7992 fi
7993
7994
7995                 # restore the LIBS
7996                 LIBS="$ol_LIBS"
7997         
7998 fi
7999
8000 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8001
8002         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8003                 ol_link_pthreads="-lpthread -lmach -lexc"
8004                 ol_link_threads=posix
8005         fi
8006 fi
8007
8008
8009                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8010 if test "$ol_link_threads" = no ; then
8011         # try -lpthread -Wl,-woff,85
8012         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8013 echo "configure:8014: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8014 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8015   echo $ac_n "(cached) $ac_c" 1>&6
8016 else
8017   
8018                 # save the flags
8019                 ol_LIBS="$LIBS"
8020                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8021
8022                 if test "$cross_compiling" = yes; then
8023   cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 /* pthread test headers */
8027 #include <pthread.h>
8028 #ifndef NULL
8029 #define NULL (void*)0
8030 #endif
8031
8032 static void *task(p)
8033         void *p;
8034 {
8035         return (void *) (p == NULL);
8036 }
8037
8038 int main() {
8039
8040         /* pthread test function */
8041         pthread_t t;
8042         int status;
8043
8044         /* make sure pthread_create() isn't just a stub */
8045 #if HAVE_PTHREADS_D4
8046         status = pthread_create(&t, pthread_attr_default, task, NULL);
8047 #else
8048         status = pthread_create(&t, NULL, task, NULL);
8049 #endif
8050
8051         if( status ) exit( status );
8052
8053         /* make sure pthread_detach() isn't just a stub */
8054 #if HAVE_PTHREADS_D4
8055         status = pthread_detach( &t );
8056 #else
8057         status = pthread_detach( t );
8058 #endif
8059
8060 #ifdef HAVE_LINUX_THREADS
8061         pthread_kill_other_threads_np();
8062 #endif
8063
8064         exit( status );
8065
8066 ; return 0; }
8067 EOF
8068 if { (eval echo configure:8069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8069   rm -rf conftest*
8070   ol_cv_pthread_lib_lpthread_woff=yes
8071 else
8072   echo "configure: failed program was:" >&5
8073   cat conftest.$ac_ext >&5
8074   rm -rf conftest*
8075   ol_cv_pthread_lib_lpthread_woff=no
8076 fi
8077 rm -f conftest*
8078 else
8079   cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 /* pthread test headers */
8083 #include <pthread.h>
8084 #ifndef NULL
8085 #define NULL (void*)0
8086 #endif
8087
8088 static void *task(p)
8089         void *p;
8090 {
8091         return (void *) (p == NULL);
8092 }
8093
8094
8095 int main(argc, argv)
8096         int argc;
8097         char **argv;
8098 {
8099
8100         /* pthread test function */
8101         pthread_t t;
8102         int status;
8103
8104         /* make sure pthread_create() isn't just a stub */
8105 #if HAVE_PTHREADS_D4
8106         status = pthread_create(&t, pthread_attr_default, task, NULL);
8107 #else
8108         status = pthread_create(&t, NULL, task, NULL);
8109 #endif
8110
8111         if( status ) exit( status );
8112
8113         /* make sure pthread_detach() isn't just a stub */
8114 #if HAVE_PTHREADS_D4
8115         status = pthread_detach( &t );
8116 #else
8117         status = pthread_detach( t );
8118 #endif
8119
8120 #ifdef HAVE_LINUX_THREADS
8121         pthread_kill_other_threads_np();
8122 #endif
8123
8124         exit( status );
8125
8126 }
8127
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8130 then
8131   ol_cv_pthread_lib_lpthread_woff=yes
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -fr conftest*
8136   ol_cv_pthread_lib_lpthread_woff=no
8137 fi
8138 rm -fr conftest*
8139 fi
8140
8141
8142                 # restore the LIBS
8143                 LIBS="$ol_LIBS"
8144         
8145 fi
8146
8147 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8148
8149         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8150                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8151                 ol_link_threads=posix
8152         fi
8153 fi
8154
8155
8156                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8157 if test "$ol_link_threads" = no ; then
8158         # try -lpthread
8159         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8160 echo "configure:8161: checking for pthread link with -lpthread" >&5
8161 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8162   echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164   
8165                 # save the flags
8166                 ol_LIBS="$LIBS"
8167                 LIBS="-lpthread $LIBS"
8168
8169                 if test "$cross_compiling" = yes; then
8170   cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* pthread test headers */
8174 #include <pthread.h>
8175 #ifndef NULL
8176 #define NULL (void*)0
8177 #endif
8178
8179 static void *task(p)
8180         void *p;
8181 {
8182         return (void *) (p == NULL);
8183 }
8184
8185 int main() {
8186
8187         /* pthread test function */
8188         pthread_t t;
8189         int status;
8190
8191         /* make sure pthread_create() isn't just a stub */
8192 #if HAVE_PTHREADS_D4
8193         status = pthread_create(&t, pthread_attr_default, task, NULL);
8194 #else
8195         status = pthread_create(&t, NULL, task, NULL);
8196 #endif
8197
8198         if( status ) exit( status );
8199
8200         /* make sure pthread_detach() isn't just a stub */
8201 #if HAVE_PTHREADS_D4
8202         status = pthread_detach( &t );
8203 #else
8204         status = pthread_detach( t );
8205 #endif
8206
8207 #ifdef HAVE_LINUX_THREADS
8208         pthread_kill_other_threads_np();
8209 #endif
8210
8211         exit( status );
8212
8213 ; return 0; }
8214 EOF
8215 if { (eval echo configure:8216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8216   rm -rf conftest*
8217   ol_cv_pthread_lpthread=yes
8218 else
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   ol_cv_pthread_lpthread=no
8223 fi
8224 rm -f conftest*
8225 else
8226   cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* pthread test headers */
8230 #include <pthread.h>
8231 #ifndef NULL
8232 #define NULL (void*)0
8233 #endif
8234
8235 static void *task(p)
8236         void *p;
8237 {
8238         return (void *) (p == NULL);
8239 }
8240
8241
8242 int main(argc, argv)
8243         int argc;
8244         char **argv;
8245 {
8246
8247         /* pthread test function */
8248         pthread_t t;
8249         int status;
8250
8251         /* make sure pthread_create() isn't just a stub */
8252 #if HAVE_PTHREADS_D4
8253         status = pthread_create(&t, pthread_attr_default, task, NULL);
8254 #else
8255         status = pthread_create(&t, NULL, task, NULL);
8256 #endif
8257
8258         if( status ) exit( status );
8259
8260         /* make sure pthread_detach() isn't just a stub */
8261 #if HAVE_PTHREADS_D4
8262         status = pthread_detach( &t );
8263 #else
8264         status = pthread_detach( t );
8265 #endif
8266
8267 #ifdef HAVE_LINUX_THREADS
8268         pthread_kill_other_threads_np();
8269 #endif
8270
8271         exit( status );
8272
8273 }
8274
8275 EOF
8276 if { (eval echo configure:8277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8277 then
8278   ol_cv_pthread_lpthread=yes
8279 else
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282   rm -fr conftest*
8283   ol_cv_pthread_lpthread=no
8284 fi
8285 rm -fr conftest*
8286 fi
8287
8288
8289                 # restore the LIBS
8290                 LIBS="$ol_LIBS"
8291         
8292 fi
8293
8294 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8295
8296         if test $ol_cv_pthread_lpthread = yes ; then
8297                 ol_link_pthreads="-lpthread"
8298                 ol_link_threads=posix
8299         fi
8300 fi
8301
8302                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8303 if test "$ol_link_threads" = no ; then
8304         # try -lc_r
8305         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8306 echo "configure:8307: checking for pthread link with -lc_r" >&5
8307 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8308   echo $ac_n "(cached) $ac_c" 1>&6
8309 else
8310   
8311                 # save the flags
8312                 ol_LIBS="$LIBS"
8313                 LIBS="-lc_r $LIBS"
8314
8315                 if test "$cross_compiling" = yes; then
8316   cat > conftest.$ac_ext <<EOF
8317 #line 8318 "configure"
8318 #include "confdefs.h"
8319 /* pthread test headers */
8320 #include <pthread.h>
8321 #ifndef NULL
8322 #define NULL (void*)0
8323 #endif
8324
8325 static void *task(p)
8326         void *p;
8327 {
8328         return (void *) (p == NULL);
8329 }
8330
8331 int main() {
8332
8333         /* pthread test function */
8334         pthread_t t;
8335         int status;
8336
8337         /* make sure pthread_create() isn't just a stub */
8338 #if HAVE_PTHREADS_D4
8339         status = pthread_create(&t, pthread_attr_default, task, NULL);
8340 #else
8341         status = pthread_create(&t, NULL, task, NULL);
8342 #endif
8343
8344         if( status ) exit( status );
8345
8346         /* make sure pthread_detach() isn't just a stub */
8347 #if HAVE_PTHREADS_D4
8348         status = pthread_detach( &t );
8349 #else
8350         status = pthread_detach( t );
8351 #endif
8352
8353 #ifdef HAVE_LINUX_THREADS
8354         pthread_kill_other_threads_np();
8355 #endif
8356
8357         exit( status );
8358
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8362   rm -rf conftest*
8363   ol_cv_pthread_lc_r=yes
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   ol_cv_pthread_lc_r=no
8369 fi
8370 rm -f conftest*
8371 else
8372   cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 /* pthread test headers */
8376 #include <pthread.h>
8377 #ifndef NULL
8378 #define NULL (void*)0
8379 #endif
8380
8381 static void *task(p)
8382         void *p;
8383 {
8384         return (void *) (p == NULL);
8385 }
8386
8387
8388 int main(argc, argv)
8389         int argc;
8390         char **argv;
8391 {
8392
8393         /* pthread test function */
8394         pthread_t t;
8395         int status;
8396
8397         /* make sure pthread_create() isn't just a stub */
8398 #if HAVE_PTHREADS_D4
8399         status = pthread_create(&t, pthread_attr_default, task, NULL);
8400 #else
8401         status = pthread_create(&t, NULL, task, NULL);
8402 #endif
8403
8404         if( status ) exit( status );
8405
8406         /* make sure pthread_detach() isn't just a stub */
8407 #if HAVE_PTHREADS_D4
8408         status = pthread_detach( &t );
8409 #else
8410         status = pthread_detach( t );
8411 #endif
8412
8413 #ifdef HAVE_LINUX_THREADS
8414         pthread_kill_other_threads_np();
8415 #endif
8416
8417         exit( status );
8418
8419 }
8420
8421 EOF
8422 if { (eval echo configure:8423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8423 then
8424   ol_cv_pthread_lc_r=yes
8425 else
8426   echo "configure: failed program was:" >&5
8427   cat conftest.$ac_ext >&5
8428   rm -fr conftest*
8429   ol_cv_pthread_lc_r=no
8430 fi
8431 rm -fr conftest*
8432 fi
8433
8434
8435                 # restore the LIBS
8436                 LIBS="$ol_LIBS"
8437         
8438 fi
8439
8440 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8441
8442         if test $ol_cv_pthread_lc_r = yes ; then
8443                 ol_link_pthreads="-lc_r"
8444                 ol_link_threads=posix
8445         fi
8446 fi
8447
8448
8449                 # Pthread try link: -threads (ol_cv_pthread_threads)
8450 if test "$ol_link_threads" = no ; then
8451         # try -threads
8452         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8453 echo "configure:8454: checking for pthread link with -threads" >&5
8454 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8455   echo $ac_n "(cached) $ac_c" 1>&6
8456 else
8457   
8458                 # save the flags
8459                 ol_LIBS="$LIBS"
8460                 LIBS="-threads $LIBS"
8461
8462                 if test "$cross_compiling" = yes; then
8463   cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466 /* pthread test headers */
8467 #include <pthread.h>
8468 #ifndef NULL
8469 #define NULL (void*)0
8470 #endif
8471
8472 static void *task(p)
8473         void *p;
8474 {
8475         return (void *) (p == NULL);
8476 }
8477
8478 int main() {
8479
8480         /* pthread test function */
8481         pthread_t t;
8482         int status;
8483
8484         /* make sure pthread_create() isn't just a stub */
8485 #if HAVE_PTHREADS_D4
8486         status = pthread_create(&t, pthread_attr_default, task, NULL);
8487 #else
8488         status = pthread_create(&t, NULL, task, NULL);
8489 #endif
8490
8491         if( status ) exit( status );
8492
8493         /* make sure pthread_detach() isn't just a stub */
8494 #if HAVE_PTHREADS_D4
8495         status = pthread_detach( &t );
8496 #else
8497         status = pthread_detach( t );
8498 #endif
8499
8500 #ifdef HAVE_LINUX_THREADS
8501         pthread_kill_other_threads_np();
8502 #endif
8503
8504         exit( status );
8505
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   ol_cv_pthread_threads=yes
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   ol_cv_pthread_threads=no
8516 fi
8517 rm -f conftest*
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* pthread test headers */
8523 #include <pthread.h>
8524 #ifndef NULL
8525 #define NULL (void*)0
8526 #endif
8527
8528 static void *task(p)
8529         void *p;
8530 {
8531         return (void *) (p == NULL);
8532 }
8533
8534
8535 int main(argc, argv)
8536         int argc;
8537         char **argv;
8538 {
8539
8540         /* pthread test function */
8541         pthread_t t;
8542         int status;
8543
8544         /* make sure pthread_create() isn't just a stub */
8545 #if HAVE_PTHREADS_D4
8546         status = pthread_create(&t, pthread_attr_default, task, NULL);
8547 #else
8548         status = pthread_create(&t, NULL, task, NULL);
8549 #endif
8550
8551         if( status ) exit( status );
8552
8553         /* make sure pthread_detach() isn't just a stub */
8554 #if HAVE_PTHREADS_D4
8555         status = pthread_detach( &t );
8556 #else
8557         status = pthread_detach( t );
8558 #endif
8559
8560 #ifdef HAVE_LINUX_THREADS
8561         pthread_kill_other_threads_np();
8562 #endif
8563
8564         exit( status );
8565
8566 }
8567
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8570 then
8571   ol_cv_pthread_threads=yes
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -fr conftest*
8576   ol_cv_pthread_threads=no
8577 fi
8578 rm -fr conftest*
8579 fi
8580
8581
8582                 # restore the LIBS
8583                 LIBS="$ol_LIBS"
8584         
8585 fi
8586
8587 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8588
8589         if test $ol_cv_pthread_threads = yes ; then
8590                 ol_link_pthreads="-threads"
8591                 ol_link_threads=posix
8592         fi
8593 fi
8594
8595
8596                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8597 if test "$ol_link_threads" = no ; then
8598         # try -lpthreads -lmach -lexc -lc_r
8599         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8600 echo "configure:8601: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8601 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8602   echo $ac_n "(cached) $ac_c" 1>&6
8603 else
8604   
8605                 # save the flags
8606                 ol_LIBS="$LIBS"
8607                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8608
8609                 if test "$cross_compiling" = yes; then
8610   cat > conftest.$ac_ext <<EOF
8611 #line 8612 "configure"
8612 #include "confdefs.h"
8613 /* pthread test headers */
8614 #include <pthread.h>
8615 #ifndef NULL
8616 #define NULL (void*)0
8617 #endif
8618
8619 static void *task(p)
8620         void *p;
8621 {
8622         return (void *) (p == NULL);
8623 }
8624
8625 int main() {
8626
8627         /* pthread test function */
8628         pthread_t t;
8629         int status;
8630
8631         /* make sure pthread_create() isn't just a stub */
8632 #if HAVE_PTHREADS_D4
8633         status = pthread_create(&t, pthread_attr_default, task, NULL);
8634 #else
8635         status = pthread_create(&t, NULL, task, NULL);
8636 #endif
8637
8638         if( status ) exit( status );
8639
8640         /* make sure pthread_detach() isn't just a stub */
8641 #if HAVE_PTHREADS_D4
8642         status = pthread_detach( &t );
8643 #else
8644         status = pthread_detach( t );
8645 #endif
8646
8647 #ifdef HAVE_LINUX_THREADS
8648         pthread_kill_other_threads_np();
8649 #endif
8650
8651         exit( status );
8652
8653 ; return 0; }
8654 EOF
8655 if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8656   rm -rf conftest*
8657   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8658 else
8659   echo "configure: failed program was:" >&5
8660   cat conftest.$ac_ext >&5
8661   rm -rf conftest*
8662   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8663 fi
8664 rm -f conftest*
8665 else
8666   cat > conftest.$ac_ext <<EOF
8667 #line 8668 "configure"
8668 #include "confdefs.h"
8669 /* pthread test headers */
8670 #include <pthread.h>
8671 #ifndef NULL
8672 #define NULL (void*)0
8673 #endif
8674
8675 static void *task(p)
8676         void *p;
8677 {
8678         return (void *) (p == NULL);
8679 }
8680
8681
8682 int main(argc, argv)
8683         int argc;
8684         char **argv;
8685 {
8686
8687         /* pthread test function */
8688         pthread_t t;
8689         int status;
8690
8691         /* make sure pthread_create() isn't just a stub */
8692 #if HAVE_PTHREADS_D4
8693         status = pthread_create(&t, pthread_attr_default, task, NULL);
8694 #else
8695         status = pthread_create(&t, NULL, task, NULL);
8696 #endif
8697
8698         if( status ) exit( status );
8699
8700         /* make sure pthread_detach() isn't just a stub */
8701 #if HAVE_PTHREADS_D4
8702         status = pthread_detach( &t );
8703 #else
8704         status = pthread_detach( t );
8705 #endif
8706
8707 #ifdef HAVE_LINUX_THREADS
8708         pthread_kill_other_threads_np();
8709 #endif
8710
8711         exit( status );
8712
8713 }
8714
8715 EOF
8716 if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8717 then
8718   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8719 else
8720   echo "configure: failed program was:" >&5
8721   cat conftest.$ac_ext >&5
8722   rm -fr conftest*
8723   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8724 fi
8725 rm -fr conftest*
8726 fi
8727
8728
8729                 # restore the LIBS
8730                 LIBS="$ol_LIBS"
8731         
8732 fi
8733
8734 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8735
8736         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8737                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8738                 ol_link_threads=posix
8739         fi
8740 fi
8741
8742                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8743 if test "$ol_link_threads" = no ; then
8744         # try -lpthreads -lmach -lexc
8745         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8746 echo "configure:8747: checking for pthread link with -lpthreads -lmach -lexc" >&5
8747 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8748   echo $ac_n "(cached) $ac_c" 1>&6
8749 else
8750   
8751                 # save the flags
8752                 ol_LIBS="$LIBS"
8753                 LIBS="-lpthreads -lmach -lexc $LIBS"
8754
8755                 if test "$cross_compiling" = yes; then
8756   cat > conftest.$ac_ext <<EOF
8757 #line 8758 "configure"
8758 #include "confdefs.h"
8759 /* pthread test headers */
8760 #include <pthread.h>
8761 #ifndef NULL
8762 #define NULL (void*)0
8763 #endif
8764
8765 static void *task(p)
8766         void *p;
8767 {
8768         return (void *) (p == NULL);
8769 }
8770
8771 int main() {
8772
8773         /* pthread test function */
8774         pthread_t t;
8775         int status;
8776
8777         /* make sure pthread_create() isn't just a stub */
8778 #if HAVE_PTHREADS_D4
8779         status = pthread_create(&t, pthread_attr_default, task, NULL);
8780 #else
8781         status = pthread_create(&t, NULL, task, NULL);
8782 #endif
8783
8784         if( status ) exit( status );
8785
8786         /* make sure pthread_detach() isn't just a stub */
8787 #if HAVE_PTHREADS_D4
8788         status = pthread_detach( &t );
8789 #else
8790         status = pthread_detach( t );
8791 #endif
8792
8793 #ifdef HAVE_LINUX_THREADS
8794         pthread_kill_other_threads_np();
8795 #endif
8796
8797         exit( status );
8798
8799 ; return 0; }
8800 EOF
8801 if { (eval echo configure:8802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8802   rm -rf conftest*
8803   ol_cv_pthread_lpthreads_lmach_lexc=yes
8804 else
8805   echo "configure: failed program was:" >&5
8806   cat conftest.$ac_ext >&5
8807   rm -rf conftest*
8808   ol_cv_pthread_lpthreads_lmach_lexc=no
8809 fi
8810 rm -f conftest*
8811 else
8812   cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 /* pthread test headers */
8816 #include <pthread.h>
8817 #ifndef NULL
8818 #define NULL (void*)0
8819 #endif
8820
8821 static void *task(p)
8822         void *p;
8823 {
8824         return (void *) (p == NULL);
8825 }
8826
8827
8828 int main(argc, argv)
8829         int argc;
8830         char **argv;
8831 {
8832
8833         /* pthread test function */
8834         pthread_t t;
8835         int status;
8836
8837         /* make sure pthread_create() isn't just a stub */
8838 #if HAVE_PTHREADS_D4
8839         status = pthread_create(&t, pthread_attr_default, task, NULL);
8840 #else
8841         status = pthread_create(&t, NULL, task, NULL);
8842 #endif
8843
8844         if( status ) exit( status );
8845
8846         /* make sure pthread_detach() isn't just a stub */
8847 #if HAVE_PTHREADS_D4
8848         status = pthread_detach( &t );
8849 #else
8850         status = pthread_detach( t );
8851 #endif
8852
8853 #ifdef HAVE_LINUX_THREADS
8854         pthread_kill_other_threads_np();
8855 #endif
8856
8857         exit( status );
8858
8859 }
8860
8861 EOF
8862 if { (eval echo configure:8863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8863 then
8864   ol_cv_pthread_lpthreads_lmach_lexc=yes
8865 else
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -fr conftest*
8869   ol_cv_pthread_lpthreads_lmach_lexc=no
8870 fi
8871 rm -fr conftest*
8872 fi
8873
8874
8875                 # restore the LIBS
8876                 LIBS="$ol_LIBS"
8877         
8878 fi
8879
8880 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8881
8882         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8883                 ol_link_pthreads="-lpthreads -lmach -lexc"
8884                 ol_link_threads=posix
8885         fi
8886 fi
8887
8888                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8889 if test "$ol_link_threads" = no ; then
8890         # try -lpthreads -lexc
8891         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8892 echo "configure:8893: checking for pthread link with -lpthreads -lexc" >&5
8893 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   
8897                 # save the flags
8898                 ol_LIBS="$LIBS"
8899                 LIBS="-lpthreads -lexc $LIBS"
8900
8901                 if test "$cross_compiling" = yes; then
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 /* pthread test headers */
8906 #include <pthread.h>
8907 #ifndef NULL
8908 #define NULL (void*)0
8909 #endif
8910
8911 static void *task(p)
8912         void *p;
8913 {
8914         return (void *) (p == NULL);
8915 }
8916
8917 int main() {
8918
8919         /* pthread test function */
8920         pthread_t t;
8921         int status;
8922
8923         /* make sure pthread_create() isn't just a stub */
8924 #if HAVE_PTHREADS_D4
8925         status = pthread_create(&t, pthread_attr_default, task, NULL);
8926 #else
8927         status = pthread_create(&t, NULL, task, NULL);
8928 #endif
8929
8930         if( status ) exit( status );
8931
8932         /* make sure pthread_detach() isn't just a stub */
8933 #if HAVE_PTHREADS_D4
8934         status = pthread_detach( &t );
8935 #else
8936         status = pthread_detach( t );
8937 #endif
8938
8939 #ifdef HAVE_LINUX_THREADS
8940         pthread_kill_other_threads_np();
8941 #endif
8942
8943         exit( status );
8944
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   ol_cv_pthread_lpthreads_lexc=yes
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   ol_cv_pthread_lpthreads_lexc=no
8955 fi
8956 rm -f conftest*
8957 else
8958   cat > conftest.$ac_ext <<EOF
8959 #line 8960 "configure"
8960 #include "confdefs.h"
8961 /* pthread test headers */
8962 #include <pthread.h>
8963 #ifndef NULL
8964 #define NULL (void*)0
8965 #endif
8966
8967 static void *task(p)
8968         void *p;
8969 {
8970         return (void *) (p == NULL);
8971 }
8972
8973
8974 int main(argc, argv)
8975         int argc;
8976         char **argv;
8977 {
8978
8979         /* pthread test function */
8980         pthread_t t;
8981         int status;
8982
8983         /* make sure pthread_create() isn't just a stub */
8984 #if HAVE_PTHREADS_D4
8985         status = pthread_create(&t, pthread_attr_default, task, NULL);
8986 #else
8987         status = pthread_create(&t, NULL, task, NULL);
8988 #endif
8989
8990         if( status ) exit( status );
8991
8992         /* make sure pthread_detach() isn't just a stub */
8993 #if HAVE_PTHREADS_D4
8994         status = pthread_detach( &t );
8995 #else
8996         status = pthread_detach( t );
8997 #endif
8998
8999 #ifdef HAVE_LINUX_THREADS
9000         pthread_kill_other_threads_np();
9001 #endif
9002
9003         exit( status );
9004
9005 }
9006
9007 EOF
9008 if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9009 then
9010   ol_cv_pthread_lpthreads_lexc=yes
9011 else
9012   echo "configure: failed program was:" >&5
9013   cat conftest.$ac_ext >&5
9014   rm -fr conftest*
9015   ol_cv_pthread_lpthreads_lexc=no
9016 fi
9017 rm -fr conftest*
9018 fi
9019
9020
9021                 # restore the LIBS
9022                 LIBS="$ol_LIBS"
9023         
9024 fi
9025
9026 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9027
9028         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9029                 ol_link_pthreads="-lpthreads -lexc"
9030                 ol_link_threads=posix
9031         fi
9032 fi
9033
9034
9035                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9036 if test "$ol_link_threads" = no ; then
9037         # try -lpthreads
9038         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9039 echo "configure:9040: checking for pthread link with -lpthreads" >&5
9040 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9041   echo $ac_n "(cached) $ac_c" 1>&6
9042 else
9043   
9044                 # save the flags
9045                 ol_LIBS="$LIBS"
9046                 LIBS="-lpthreads $LIBS"
9047
9048                 if test "$cross_compiling" = yes; then
9049   cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052 /* pthread test headers */
9053 #include <pthread.h>
9054 #ifndef NULL
9055 #define NULL (void*)0
9056 #endif
9057
9058 static void *task(p)
9059         void *p;
9060 {
9061         return (void *) (p == NULL);
9062 }
9063
9064 int main() {
9065
9066         /* pthread test function */
9067         pthread_t t;
9068         int status;
9069
9070         /* make sure pthread_create() isn't just a stub */
9071 #if HAVE_PTHREADS_D4
9072         status = pthread_create(&t, pthread_attr_default, task, NULL);
9073 #else
9074         status = pthread_create(&t, NULL, task, NULL);
9075 #endif
9076
9077         if( status ) exit( status );
9078
9079         /* make sure pthread_detach() isn't just a stub */
9080 #if HAVE_PTHREADS_D4
9081         status = pthread_detach( &t );
9082 #else
9083         status = pthread_detach( t );
9084 #endif
9085
9086 #ifdef HAVE_LINUX_THREADS
9087         pthread_kill_other_threads_np();
9088 #endif
9089
9090         exit( status );
9091
9092 ; return 0; }
9093 EOF
9094 if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9095   rm -rf conftest*
9096   ol_cv_pthread_lib_lpthreads=yes
9097 else
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -rf conftest*
9101   ol_cv_pthread_lib_lpthreads=no
9102 fi
9103 rm -f conftest*
9104 else
9105   cat > conftest.$ac_ext <<EOF
9106 #line 9107 "configure"
9107 #include "confdefs.h"
9108 /* pthread test headers */
9109 #include <pthread.h>
9110 #ifndef NULL
9111 #define NULL (void*)0
9112 #endif
9113
9114 static void *task(p)
9115         void *p;
9116 {
9117         return (void *) (p == NULL);
9118 }
9119
9120
9121 int main(argc, argv)
9122         int argc;
9123         char **argv;
9124 {
9125
9126         /* pthread test function */
9127         pthread_t t;
9128         int status;
9129
9130         /* make sure pthread_create() isn't just a stub */
9131 #if HAVE_PTHREADS_D4
9132         status = pthread_create(&t, pthread_attr_default, task, NULL);
9133 #else
9134         status = pthread_create(&t, NULL, task, NULL);
9135 #endif
9136
9137         if( status ) exit( status );
9138
9139         /* make sure pthread_detach() isn't just a stub */
9140 #if HAVE_PTHREADS_D4
9141         status = pthread_detach( &t );
9142 #else
9143         status = pthread_detach( t );
9144 #endif
9145
9146 #ifdef HAVE_LINUX_THREADS
9147         pthread_kill_other_threads_np();
9148 #endif
9149
9150         exit( status );
9151
9152 }
9153
9154 EOF
9155 if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9156 then
9157   ol_cv_pthread_lib_lpthreads=yes
9158 else
9159   echo "configure: failed program was:" >&5
9160   cat conftest.$ac_ext >&5
9161   rm -fr conftest*
9162   ol_cv_pthread_lib_lpthreads=no
9163 fi
9164 rm -fr conftest*
9165 fi
9166
9167
9168                 # restore the LIBS
9169                 LIBS="$ol_LIBS"
9170         
9171 fi
9172
9173 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9174
9175         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9176                 ol_link_pthreads="-lpthreads"
9177                 ol_link_threads=posix
9178         fi
9179 fi
9180
9181
9182                 if test $ol_link_threads != no ; then
9183                         cat >> confdefs.h <<\EOF
9184 #define HAVE_PTHREADS 1
9185 EOF
9186
9187
9188                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9189
9190                                                 save_CPPFLAGS="$CPPFLAGS"
9191                         save_LIBS="$LIBS"
9192                         LIBS="$LTHREAD_LIBS $LIBS"
9193
9194                                                                                                 for ac_func in sched_yield pthread_yield
9195 do
9196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9197 echo "configure:9198: checking for $ac_func" >&5
9198 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9199   echo $ac_n "(cached) $ac_c" 1>&6
9200 else
9201   cat > conftest.$ac_ext <<EOF
9202 #line 9203 "configure"
9203 #include "confdefs.h"
9204 /* System header to define __stub macros and hopefully few prototypes,
9205     which can conflict with char $ac_func(); below.  */
9206 #include <assert.h>
9207 /* Override any gcc2 internal prototype to avoid an error.  */
9208 /* We use char because int might match the return type of a gcc2
9209     builtin and then its argument prototype would still apply.  */
9210 char $ac_func();
9211 char (*f)();
9212
9213 int main() {
9214
9215 /* The GNU C library defines this for functions which it implements
9216     to always fail with ENOSYS.  Some functions are actually named
9217     something starting with __ and the normal name is an alias.  */
9218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9219 choke me
9220 #else
9221 f = $ac_func;
9222 #endif
9223
9224 ; return 0; }
9225 EOF
9226 if { (eval echo configure:9227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9227   rm -rf conftest*
9228   eval "ac_cv_func_$ac_func=yes"
9229 else
9230   echo "configure: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   rm -rf conftest*
9233   eval "ac_cv_func_$ac_func=no"
9234 fi
9235 rm -f conftest*
9236 fi
9237
9238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9239   echo "$ac_t""yes" 1>&6
9240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9241   cat >> confdefs.h <<EOF
9242 #define $ac_tr_func 1
9243 EOF
9244  
9245 else
9246   echo "$ac_t""no" 1>&6
9247 fi
9248 done
9249
9250
9251                         if test $ac_cv_func_sched_yield = no -a \
9252                                 $ac_cv_func_pthread_yield = no ; then
9253                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9254 echo "configure:9255: checking for sched_yield in -lrt" >&5
9255 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9257   echo $ac_n "(cached) $ac_c" 1>&6
9258 else
9259   ac_save_LIBS="$LIBS"
9260 LIBS="-lrt  $LIBS"
9261 cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264 /* Override any gcc2 internal prototype to avoid an error.  */
9265 /* We use char because int might match the return type of a gcc2
9266     builtin and then its argument prototype would still apply.  */
9267 char sched_yield();
9268
9269 int main() {
9270 sched_yield()
9271 ; return 0; }
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9274   rm -rf conftest*
9275   eval "ac_cv_lib_$ac_lib_var=yes"
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -rf conftest*
9280   eval "ac_cv_lib_$ac_lib_var=no"
9281 fi
9282 rm -f conftest*
9283 LIBS="$ac_save_LIBS"
9284
9285 fi
9286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9287   echo "$ac_t""yes" 1>&6
9288   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9289                                         cat >> confdefs.h <<\EOF
9290 #define HAVE_SCHED_YIELD 1
9291 EOF
9292
9293                                         ac_cv_func_sched_yield=yes
9294 else
9295   echo "$ac_t""no" 1>&6
9296 ac_cv_func_sched_yield=no
9297 fi
9298
9299                         fi
9300                         if test $ac_cv_func_sched_yield = no -a \
9301                                 $ac_cv_func_pthread_yield = no ; then
9302                                                                                                 for ac_func in thr_yield
9303 do
9304 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9305 echo "configure:9306: checking for $ac_func" >&5
9306 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9307   echo $ac_n "(cached) $ac_c" 1>&6
9308 else
9309   cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 /* System header to define __stub macros and hopefully few prototypes,
9313     which can conflict with char $ac_func(); below.  */
9314 #include <assert.h>
9315 /* Override any gcc2 internal prototype to avoid an error.  */
9316 /* We use char because int might match the return type of a gcc2
9317     builtin and then its argument prototype would still apply.  */
9318 char $ac_func();
9319 char (*f)();
9320
9321 int main() {
9322
9323 /* The GNU C library defines this for functions which it implements
9324     to always fail with ENOSYS.  Some functions are actually named
9325     something starting with __ and the normal name is an alias.  */
9326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9327 choke me
9328 #else
9329 f = $ac_func;
9330 #endif
9331
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_func_$ac_func=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_func_$ac_func=no"
9342 fi
9343 rm -f conftest*
9344 fi
9345
9346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9349   cat >> confdefs.h <<EOF
9350 #define $ac_tr_func 1
9351 EOF
9352  
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356 done
9357
9358                         fi
9359                         if test $ac_cv_func_sched_yield = no -a \
9360                                 $ac_cv_func_pthread_yield = no -a \
9361                                 "$ac_cv_func_thr_yield" = no ; then
9362                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9363                         fi
9364
9365                                                 for ac_func in pthread_kill
9366 do
9367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9368 echo "configure:9369: checking for $ac_func" >&5
9369 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 /* System header to define __stub macros and hopefully few prototypes,
9376     which can conflict with char $ac_func(); below.  */
9377 #include <assert.h>
9378 /* Override any gcc2 internal prototype to avoid an error.  */
9379 /* We use char because int might match the return type of a gcc2
9380     builtin and then its argument prototype would still apply.  */
9381 char $ac_func();
9382 char (*f)();
9383
9384 int main() {
9385
9386 /* The GNU C library defines this for functions which it implements
9387     to always fail with ENOSYS.  Some functions are actually named
9388     something starting with __ and the normal name is an alias.  */
9389 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9390 choke me
9391 #else
9392 f = $ac_func;
9393 #endif
9394
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9398   rm -rf conftest*
9399   eval "ac_cv_func_$ac_func=yes"
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   eval "ac_cv_func_$ac_func=no"
9405 fi
9406 rm -f conftest*
9407 fi
9408
9409 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9410   echo "$ac_t""yes" 1>&6
9411     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9412   cat >> confdefs.h <<EOF
9413 #define $ac_tr_func 1
9414 EOF
9415  
9416 else
9417   echo "$ac_t""no" 1>&6
9418 fi
9419 done
9420
9421
9422                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9423 echo "configure:9424: checking for pthread_detach with <pthread.h>" >&5
9424 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9425   echo $ac_n "(cached) $ac_c" 1>&6
9426 else
9427   
9428                                                                 cat > conftest.$ac_ext <<EOF
9429 #line 9430 "configure"
9430 #include "confdefs.h"
9431
9432 #include <pthread.h>
9433 #ifndef NULL
9434 #define NULL (void*)0
9435 #endif
9436
9437 int main() {
9438 pthread_detach(NULL);
9439 ; return 0; }
9440 EOF
9441 if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9442   rm -rf conftest*
9443   ol_cv_func_pthread_detach=yes
9444 else
9445   echo "configure: failed program was:" >&5
9446   cat conftest.$ac_ext >&5
9447   rm -rf conftest*
9448   ol_cv_func_pthread_detach=no
9449 fi
9450 rm -f conftest*
9451                         
9452 fi
9453
9454 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9455
9456                         if test $ol_cv_func_pthread_detach = no ; then
9457                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9458                         fi
9459
9460                         cat >> confdefs.h <<\EOF
9461 #define HAVE_PTHREAD_DETACH 1
9462 EOF
9463
9464
9465                                                 for ac_func in \
9466                                 pthread_setconcurrency \
9467                                 pthread_getconcurrency \
9468                                 thr_setconcurrency \
9469                                 thr_getconcurrency \
9470                         
9471 do
9472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9473 echo "configure:9474: checking for $ac_func" >&5
9474 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9475   echo $ac_n "(cached) $ac_c" 1>&6
9476 else
9477   cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480 /* System header to define __stub macros and hopefully few prototypes,
9481     which can conflict with char $ac_func(); below.  */
9482 #include <assert.h>
9483 /* Override any gcc2 internal prototype to avoid an error.  */
9484 /* We use char because int might match the return type of a gcc2
9485     builtin and then its argument prototype would still apply.  */
9486 char $ac_func();
9487 char (*f)();
9488
9489 int main() {
9490
9491 /* The GNU C library defines this for functions which it implements
9492     to always fail with ENOSYS.  Some functions are actually named
9493     something starting with __ and the normal name is an alias.  */
9494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9495 choke me
9496 #else
9497 f = $ac_func;
9498 #endif
9499
9500 ; return 0; }
9501 EOF
9502 if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9503   rm -rf conftest*
9504   eval "ac_cv_func_$ac_func=yes"
9505 else
9506   echo "configure: failed program was:" >&5
9507   cat conftest.$ac_ext >&5
9508   rm -rf conftest*
9509   eval "ac_cv_func_$ac_func=no"
9510 fi
9511 rm -f conftest*
9512 fi
9513
9514 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9515   echo "$ac_t""yes" 1>&6
9516     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9517   cat >> confdefs.h <<EOF
9518 #define $ac_tr_func 1
9519 EOF
9520  
9521 else
9522   echo "$ac_t""no" 1>&6
9523 fi
9524 done
9525
9526
9527                         
9528         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9529 echo "configure:9530: checking for pthread_kill_other_threads_np" >&5
9530 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9531   echo $ac_n "(cached) $ac_c" 1>&6
9532 else
9533   cat > conftest.$ac_ext <<EOF
9534 #line 9535 "configure"
9535 #include "confdefs.h"
9536 /* System header to define __stub macros and hopefully few prototypes,
9537     which can conflict with char pthread_kill_other_threads_np(); below.  */
9538 #include <assert.h>
9539 /* Override any gcc2 internal prototype to avoid an error.  */
9540 /* We use char because int might match the return type of a gcc2
9541     builtin and then its argument prototype would still apply.  */
9542 char pthread_kill_other_threads_np();
9543 char (*f)();
9544
9545 int main() {
9546
9547 /* The GNU C library defines this for functions which it implements
9548     to always fail with ENOSYS.  Some functions are actually named
9549     something starting with __ and the normal name is an alias.  */
9550 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9551 choke me
9552 #else
9553 f = pthread_kill_other_threads_np;
9554 #endif
9555
9556 ; return 0; }
9557 EOF
9558 if { (eval echo configure:9559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9559   rm -rf conftest*
9560   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -rf conftest*
9565   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9566 fi
9567 rm -f conftest*
9568 fi
9569
9570 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9571   echo "$ac_t""yes" 1>&6
9572   :
9573 else
9574   echo "$ac_t""no" 1>&6
9575 fi
9576
9577         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9578 echo "configure:9579: checking for LinuxThreads implementation" >&5
9579 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9580   echo $ac_n "(cached) $ac_c" 1>&6
9581 else
9582   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9583 fi
9584
9585 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9586
9587                         
9588         
9589         
9590         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9591 echo "configure:9592: checking for LinuxThreads consistency" >&5
9592 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9593   echo $ac_n "(cached) $ac_c" 1>&6
9594 else
9595   
9596                 if test $ol_cv_header_linux_threads = yes -a \
9597                         $ol_cv_sys_linux_threads = yes; then
9598                         ol_cv_linux_threads=yes
9599                 elif test $ol_cv_header_linux_threads = no -a \
9600                         $ol_cv_sys_linux_threads = no; then
9601                         ol_cv_linux_threads=no
9602                 else
9603                         ol_cv_linux_threads=error
9604                 fi
9605         
9606 fi
9607
9608 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9609
9610
9611                         if test $ol_cv_linux_threads = error; then
9612                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9613                         fi
9614
9615                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9616 echo "configure:9617: checking if pthread_create() works" >&5
9617 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9618   echo $ac_n "(cached) $ac_c" 1>&6
9619 else
9620   
9621                         if test "$cross_compiling" = yes; then
9622                                 ol_cv_pthread_create_works=yes
9623 else
9624   cat > conftest.$ac_ext <<EOF
9625 #line 9626 "configure"
9626 #include "confdefs.h"
9627 /* pthread test headers */
9628 #include <pthread.h>
9629 #ifndef NULL
9630 #define NULL (void*)0
9631 #endif
9632
9633 static void *task(p)
9634         void *p;
9635 {
9636         return (void *) (p == NULL);
9637 }
9638
9639
9640 int main(argc, argv)
9641         int argc;
9642         char **argv;
9643 {
9644
9645         /* pthread test function */
9646         pthread_t t;
9647         int status;
9648
9649         /* make sure pthread_create() isn't just a stub */
9650 #if HAVE_PTHREADS_D4
9651         status = pthread_create(&t, pthread_attr_default, task, NULL);
9652 #else
9653         status = pthread_create(&t, NULL, task, NULL);
9654 #endif
9655
9656         if( status ) exit( status );
9657
9658         /* make sure pthread_detach() isn't just a stub */
9659 #if HAVE_PTHREADS_D4
9660         status = pthread_detach( &t );
9661 #else
9662         status = pthread_detach( t );
9663 #endif
9664
9665 #ifdef HAVE_LINUX_THREADS
9666         pthread_kill_other_threads_np();
9667 #endif
9668
9669         exit( status );
9670
9671 }
9672
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9675 then
9676   ol_cv_pthread_create_works=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -fr conftest*
9681   ol_cv_pthread_create_works=no
9682 fi
9683 rm -fr conftest*
9684 fi
9685
9686 fi
9687
9688 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9689
9690                         if test $ol_cv_pthread_create_works = no ; then
9691                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9692                         fi
9693
9694                                                 if test $ol_with_yielding_select = auto ; then
9695                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9696 echo "configure:9697: checking if select yields when using pthreads" >&5
9697 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9698   echo $ac_n "(cached) $ac_c" 1>&6
9699 else
9700   
9701                                 if test "$cross_compiling" = yes; then
9702   ol_cv_pthread_select_yields=cross
9703 else
9704   cat > conftest.$ac_ext <<EOF
9705 #line 9706 "configure"
9706 #include "confdefs.h"
9707
9708 #include <sys/types.h>
9709 #include <sys/time.h>
9710 #include <unistd.h>
9711 #include <pthread.h>
9712 #ifndef NULL
9713 #define NULL (void*) 0
9714 #endif
9715
9716 static int fildes[2];
9717
9718 static void *task(p)
9719         void *p;
9720 {
9721         int i;
9722         struct timeval tv;
9723
9724         fd_set rfds;
9725
9726         tv.tv_sec=10;
9727         tv.tv_usec=0;
9728
9729         FD_ZERO(&rfds);
9730         FD_SET(fildes[0], &rfds);
9731
9732         /* we're not interested in any fds */
9733         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9734
9735         if(i < 0) {
9736                 perror("select");
9737                 exit(10);
9738         }
9739
9740         exit(0); /* if we exit here, the select blocked the whole process */
9741 }
9742
9743 int main(argc, argv)
9744         int argc;
9745         char **argv;
9746 {
9747         pthread_t t;
9748
9749         /* create a pipe to select */
9750         if(pipe(&fildes[0])) {
9751                 perror("select");
9752                 exit(1);
9753         }
9754
9755 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9756         (void) pthread_setconcurrency(2);
9757 #else
9758 #ifdef HAVE_THR_SETCONCURRENCY
9759         /* Set Solaris LWP concurrency to 2 */
9760         thr_setconcurrency(2);
9761 #endif
9762 #endif
9763
9764 #if HAVE_PTHREADS_D4
9765         pthread_create(&t, pthread_attr_default, task, NULL);
9766 #else
9767         pthread_create(&t, NULL, task, NULL);
9768 #endif
9769
9770 #if HAVE_SCHED_YIELD
9771         sched_yield();  /* make sure task runs first */
9772 #else
9773 #ifdef HAVE_PTHREAD_YIELD
9774         pthread_yield();        /* make sure task runs first */
9775 #endif
9776 #endif
9777
9778         exit(2);
9779 }
9780 EOF
9781 if { (eval echo configure:9782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9782 then
9783   ol_cv_pthread_select_yields=no
9784 else
9785   echo "configure: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787   rm -fr conftest*
9788   ol_cv_pthread_select_yields=yes
9789 fi
9790 rm -fr conftest*
9791 fi
9792
9793 fi
9794
9795 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9796
9797                                 if test $ol_cv_pthread_select_yields = cross ; then
9798                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9799                                 fi
9800
9801                                 if test $ol_cv_pthread_select_yields = yes ; then
9802                                         ol_with_yielding_select=yes
9803                                 fi
9804                         fi
9805
9806                                                 CPPFLAGS="$save_CPPFLAGS"
9807                         LIBS="$save_LIBS"
9808                 else
9809                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9810                 fi
9811         fi
9812
9813         if test $ol_with_threads = posix ; then
9814                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9815         fi
9816 fi
9817
9818 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9819         -o $ol_with_threads = mach ; then
9820
9821                 for ac_hdr in mach/cthreads.h
9822 do
9823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9825 echo "configure:9826: checking for $ac_hdr" >&5
9826 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9827   echo $ac_n "(cached) $ac_c" 1>&6
9828 else
9829   cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 #include <$ac_hdr>
9833 EOF
9834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9835 { (eval echo configure:9836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9837 if test -z "$ac_err"; then
9838   rm -rf conftest*
9839   eval "ac_cv_header_$ac_safe=yes"
9840 else
9841   echo "$ac_err" >&5
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   eval "ac_cv_header_$ac_safe=no"
9846 fi
9847 rm -f conftest*
9848 fi
9849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9850   echo "$ac_t""yes" 1>&6
9851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9852   cat >> confdefs.h <<EOF
9853 #define $ac_tr_hdr 1
9854 EOF
9855  
9856 else
9857   echo "$ac_t""no" 1>&6
9858 fi
9859 done
9860
9861         if test $ac_cv_header_mach_cthreads_h = yes ; then
9862                 ol_with_threads=found
9863
9864                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9865 echo "configure:9866: checking for cthread_fork" >&5
9866 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9867   echo $ac_n "(cached) $ac_c" 1>&6
9868 else
9869   cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 /* System header to define __stub macros and hopefully few prototypes,
9873     which can conflict with char cthread_fork(); below.  */
9874 #include <assert.h>
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 /* We use char because int might match the return type of a gcc2
9877     builtin and then its argument prototype would still apply.  */
9878 char cthread_fork();
9879 char (*f)();
9880
9881 int main() {
9882
9883 /* The GNU C library defines this for functions which it implements
9884     to always fail with ENOSYS.  Some functions are actually named
9885     something starting with __ and the normal name is an alias.  */
9886 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9887 choke me
9888 #else
9889 f = cthread_fork;
9890 #endif
9891
9892 ; return 0; }
9893 EOF
9894 if { (eval echo configure:9895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9895   rm -rf conftest*
9896   eval "ac_cv_func_cthread_fork=yes"
9897 else
9898   echo "configure: failed program was:" >&5
9899   cat conftest.$ac_ext >&5
9900   rm -rf conftest*
9901   eval "ac_cv_func_cthread_fork=no"
9902 fi
9903 rm -f conftest*
9904 fi
9905
9906 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9907   echo "$ac_t""yes" 1>&6
9908   ol_link_threads=yes
9909 else
9910   echo "$ac_t""no" 1>&6
9911 fi
9912
9913
9914                 if test $ol_link_threads = no ; then
9915                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9916 echo "configure:9917: checking for cthread_fork with -all_load" >&5
9917 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9918   echo $ac_n "(cached) $ac_c" 1>&6
9919 else
9920   
9921                                                                 save_LIBS="$LIBS"
9922                                 LIBS="-all_load $LIBS"
9923                                 cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 #include <mach/cthreads.h>
9927 int main() {
9928
9929                                         cthread_fork((void *)0, (void *)0);
9930                                         
9931 ; return 0; }
9932 EOF
9933 if { (eval echo configure:9934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9934   rm -rf conftest*
9935   ol_cv_cthread_all_load=yes
9936 else
9937   echo "configure: failed program was:" >&5
9938   cat conftest.$ac_ext >&5
9939   rm -rf conftest*
9940   ol_cv_cthread_all_load=no
9941 fi
9942 rm -f conftest*
9943                                                                 LIBS="$save_LIBS"
9944                         
9945 fi
9946
9947 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9948
9949                         if test $ol_cv_cthread_all_load = yes ; then
9950                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9951                                 ol_link_threads=mach
9952                         fi
9953                 fi
9954
9955                 if test $ol_link_threads != no ; then
9956                         : check for cthread specific functionality here
9957                         cat >> confdefs.h <<\EOF
9958 #define HAVE_MACH_CTHREADS 1
9959 EOF
9960
9961                 else
9962                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9963                 fi
9964         fi
9965
9966         if test $ol_with_threads = mach ; then
9967                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9968         fi
9969 fi
9970
9971 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9972         -o $ol_with_threads = pth ; then
9973
9974         for ac_hdr in pth.h
9975 do
9976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9978 echo "configure:9979: checking for $ac_hdr" >&5
9979 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9980   echo $ac_n "(cached) $ac_c" 1>&6
9981 else
9982   cat > conftest.$ac_ext <<EOF
9983 #line 9984 "configure"
9984 #include "confdefs.h"
9985 #include <$ac_hdr>
9986 EOF
9987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9988 { (eval echo configure:9989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9990 if test -z "$ac_err"; then
9991   rm -rf conftest*
9992   eval "ac_cv_header_$ac_safe=yes"
9993 else
9994   echo "$ac_err" >&5
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997   rm -rf conftest*
9998   eval "ac_cv_header_$ac_safe=no"
9999 fi
10000 rm -f conftest*
10001 fi
10002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10003   echo "$ac_t""yes" 1>&6
10004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10005   cat >> confdefs.h <<EOF
10006 #define $ac_tr_hdr 1
10007 EOF
10008  
10009 else
10010   echo "$ac_t""no" 1>&6
10011 fi
10012 done
10013
10014
10015         if test $ac_cv_header_pth_h = yes ; then
10016                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10017 echo "configure:10018: checking for pth_version in -lpth" >&5
10018 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   ac_save_LIBS="$LIBS"
10023 LIBS="-lpth  $LIBS"
10024 cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 /* We use char because int might match the return type of a gcc2
10029     builtin and then its argument prototype would still apply.  */
10030 char pth_version();
10031
10032 int main() {
10033 pth_version()
10034 ; return 0; }
10035 EOF
10036 if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10037   rm -rf conftest*
10038   eval "ac_cv_lib_$ac_lib_var=yes"
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=no"
10044 fi
10045 rm -f conftest*
10046 LIBS="$ac_save_LIBS"
10047
10048 fi
10049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10050   echo "$ac_t""yes" 1>&6
10051   have_pth=yes
10052 else
10053   echo "$ac_t""no" 1>&6
10054 have_pth=no
10055 fi
10056
10057
10058                 if test $have_pth = yes ; then
10059                         cat >> confdefs.h <<\EOF
10060 #define HAVE_GNU_PTH 1
10061 EOF
10062
10063                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10064                         ol_link_threads=pth
10065
10066                         if test $ol_with_yielding_select = auto ; then
10067                                 ol_with_yielding_select=yes
10068                         fi
10069                 fi
10070         fi
10071 fi
10072
10073 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10074         -o $ol_with_threads = lwp ; then
10075
10076                 for ac_hdr in thread.h synch.h
10077 do
10078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10080 echo "configure:10081: checking for $ac_hdr" >&5
10081 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10082   echo $ac_n "(cached) $ac_c" 1>&6
10083 else
10084   cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <$ac_hdr>
10088 EOF
10089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10090 { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10092 if test -z "$ac_err"; then
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=yes"
10095 else
10096   echo "$ac_err" >&5
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=no"
10101 fi
10102 rm -f conftest*
10103 fi
10104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10105   echo "$ac_t""yes" 1>&6
10106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10107   cat >> confdefs.h <<EOF
10108 #define $ac_tr_hdr 1
10109 EOF
10110  
10111 else
10112   echo "$ac_t""no" 1>&6
10113 fi
10114 done
10115
10116         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10117                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10118 echo "configure:10119: checking for thr_create in -lthread" >&5
10119 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10120 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   ac_save_LIBS="$LIBS"
10124 LIBS="-lthread  $LIBS"
10125 cat > conftest.$ac_ext <<EOF
10126 #line 10127 "configure"
10127 #include "confdefs.h"
10128 /* Override any gcc2 internal prototype to avoid an error.  */
10129 /* We use char because int might match the return type of a gcc2
10130     builtin and then its argument prototype would still apply.  */
10131 char thr_create();
10132
10133 int main() {
10134 thr_create()
10135 ; return 0; }
10136 EOF
10137 if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10138   rm -rf conftest*
10139   eval "ac_cv_lib_$ac_lib_var=yes"
10140 else
10141   echo "configure: failed program was:" >&5
10142   cat conftest.$ac_ext >&5
10143   rm -rf conftest*
10144   eval "ac_cv_lib_$ac_lib_var=no"
10145 fi
10146 rm -f conftest*
10147 LIBS="$ac_save_LIBS"
10148
10149 fi
10150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10151   echo "$ac_t""yes" 1>&6
10152   have_thr=yes
10153 else
10154   echo "$ac_t""no" 1>&6
10155 have_thr=no
10156 fi
10157
10158
10159                 if test $have_thr = yes ; then
10160                         cat >> confdefs.h <<\EOF
10161 #define HAVE_THR 1
10162 EOF
10163
10164                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10165                         ol_link_threads=thr
10166
10167                         if test $ol_with_yielding_select = auto ; then
10168                                 ol_with_yielding_select=yes
10169                         fi
10170
10171                                                 for ac_func in \
10172                                 thr_setconcurrency \
10173                                 thr_getconcurrency \
10174                         
10175 do
10176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10177 echo "configure:10178: checking for $ac_func" >&5
10178 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10179   echo $ac_n "(cached) $ac_c" 1>&6
10180 else
10181   cat > conftest.$ac_ext <<EOF
10182 #line 10183 "configure"
10183 #include "confdefs.h"
10184 /* System header to define __stub macros and hopefully few prototypes,
10185     which can conflict with char $ac_func(); below.  */
10186 #include <assert.h>
10187 /* Override any gcc2 internal prototype to avoid an error.  */
10188 /* We use char because int might match the return type of a gcc2
10189     builtin and then its argument prototype would still apply.  */
10190 char $ac_func();
10191 char (*f)();
10192
10193 int main() {
10194
10195 /* The GNU C library defines this for functions which it implements
10196     to always fail with ENOSYS.  Some functions are actually named
10197     something starting with __ and the normal name is an alias.  */
10198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10199 choke me
10200 #else
10201 f = $ac_func;
10202 #endif
10203
10204 ; return 0; }
10205 EOF
10206 if { (eval echo configure:10207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10207   rm -rf conftest*
10208   eval "ac_cv_func_$ac_func=yes"
10209 else
10210   echo "configure: failed program was:" >&5
10211   cat conftest.$ac_ext >&5
10212   rm -rf conftest*
10213   eval "ac_cv_func_$ac_func=no"
10214 fi
10215 rm -f conftest*
10216 fi
10217
10218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10219   echo "$ac_t""yes" 1>&6
10220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10221   cat >> confdefs.h <<EOF
10222 #define $ac_tr_func 1
10223 EOF
10224  
10225 else
10226   echo "$ac_t""no" 1>&6
10227 fi
10228 done
10229
10230                 fi
10231         fi
10232
10233                 for ac_hdr in lwp/lwp.h
10234 do
10235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10237 echo "configure:10238: checking for $ac_hdr" >&5
10238 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10239   echo $ac_n "(cached) $ac_c" 1>&6
10240 else
10241   cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 #include <$ac_hdr>
10245 EOF
10246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10247 { (eval echo configure:10248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10249 if test -z "$ac_err"; then
10250   rm -rf conftest*
10251   eval "ac_cv_header_$ac_safe=yes"
10252 else
10253   echo "$ac_err" >&5
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_header_$ac_safe=no"
10258 fi
10259 rm -f conftest*
10260 fi
10261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10264   cat >> confdefs.h <<EOF
10265 #define $ac_tr_hdr 1
10266 EOF
10267  
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271 done
10272
10273         if test $ac_cv_header_lwp_lwp_h = yes ; then
10274                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10275 echo "configure:10276: checking for lwp_create in -llwp" >&5
10276 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10278   echo $ac_n "(cached) $ac_c" 1>&6
10279 else
10280   ac_save_LIBS="$LIBS"
10281 LIBS="-llwp  $LIBS"
10282 cat > conftest.$ac_ext <<EOF
10283 #line 10284 "configure"
10284 #include "confdefs.h"
10285 /* Override any gcc2 internal prototype to avoid an error.  */
10286 /* We use char because int might match the return type of a gcc2
10287     builtin and then its argument prototype would still apply.  */
10288 char lwp_create();
10289
10290 int main() {
10291 lwp_create()
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295   rm -rf conftest*
10296   eval "ac_cv_lib_$ac_lib_var=yes"
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   eval "ac_cv_lib_$ac_lib_var=no"
10302 fi
10303 rm -f conftest*
10304 LIBS="$ac_save_LIBS"
10305
10306 fi
10307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10308   echo "$ac_t""yes" 1>&6
10309   have_lwp=yes
10310 else
10311   echo "$ac_t""no" 1>&6
10312 have_lwp=no
10313 fi
10314
10315
10316                 if test $have_lwp = yes ; then
10317                         cat >> confdefs.h <<\EOF
10318 #define HAVE_LWP 1
10319 EOF
10320
10321                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10322                         ol_link_threads=lwp
10323
10324                         if test $ol_with_yielding_select = auto ; then
10325                                 ol_with_yielding_select=no
10326                         fi
10327                 fi
10328         fi
10329 fi
10330
10331 if test $ol_with_yielding_select = yes ; then
10332         cat >> confdefs.h <<\EOF
10333 #define HAVE_YIELDING_SELECT 1
10334 EOF
10335
10336 fi
10337
10338 if test $ol_with_threads = manual ; then
10339                 ol_link_threads=yes
10340
10341         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10342
10343         for ac_hdr in pthread.h sched.h
10344 do
10345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10347 echo "configure:10348: checking for $ac_hdr" >&5
10348 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10349   echo $ac_n "(cached) $ac_c" 1>&6
10350 else
10351   cat > conftest.$ac_ext <<EOF
10352 #line 10353 "configure"
10353 #include "confdefs.h"
10354 #include <$ac_hdr>
10355 EOF
10356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10357 { (eval echo configure:10358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10359 if test -z "$ac_err"; then
10360   rm -rf conftest*
10361   eval "ac_cv_header_$ac_safe=yes"
10362 else
10363   echo "$ac_err" >&5
10364   echo "configure: failed program was:" >&5
10365   cat conftest.$ac_ext >&5
10366   rm -rf conftest*
10367   eval "ac_cv_header_$ac_safe=no"
10368 fi
10369 rm -f conftest*
10370 fi
10371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10372   echo "$ac_t""yes" 1>&6
10373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10374   cat >> confdefs.h <<EOF
10375 #define $ac_tr_hdr 1
10376 EOF
10377  
10378 else
10379   echo "$ac_t""no" 1>&6
10380 fi
10381 done
10382
10383         for ac_func in sched_yield pthread_yield
10384 do
10385 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10386 echo "configure:10387: checking for $ac_func" >&5
10387 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10388   echo $ac_n "(cached) $ac_c" 1>&6
10389 else
10390   cat > conftest.$ac_ext <<EOF
10391 #line 10392 "configure"
10392 #include "confdefs.h"
10393 /* System header to define __stub macros and hopefully few prototypes,
10394     which can conflict with char $ac_func(); below.  */
10395 #include <assert.h>
10396 /* Override any gcc2 internal prototype to avoid an error.  */
10397 /* We use char because int might match the return type of a gcc2
10398     builtin and then its argument prototype would still apply.  */
10399 char $ac_func();
10400 char (*f)();
10401
10402 int main() {
10403
10404 /* The GNU C library defines this for functions which it implements
10405     to always fail with ENOSYS.  Some functions are actually named
10406     something starting with __ and the normal name is an alias.  */
10407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10408 choke me
10409 #else
10410 f = $ac_func;
10411 #endif
10412
10413 ; return 0; }
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416   rm -rf conftest*
10417   eval "ac_cv_func_$ac_func=yes"
10418 else
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   eval "ac_cv_func_$ac_func=no"
10423 fi
10424 rm -f conftest*
10425 fi
10426
10427 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10428   echo "$ac_t""yes" 1>&6
10429     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10430   cat >> confdefs.h <<EOF
10431 #define $ac_tr_func 1
10432 EOF
10433  
10434 else
10435   echo "$ac_t""no" 1>&6
10436 fi
10437 done
10438
10439         
10440         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10441 echo "configure:10442: checking for LinuxThreads pthread.h" >&5
10442 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10443   echo $ac_n "(cached) $ac_c" 1>&6
10444 else
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448 #include <pthread.h>
10449 EOF
10450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10451   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10452   rm -rf conftest*
10453   ol_cv_header_linux_threads=yes
10454 else
10455   rm -rf conftest*
10456   ol_cv_header_linux_threads=no
10457 fi
10458 rm -f conftest*
10459
10460                 
10461 fi
10462
10463 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10464         if test $ol_cv_header_linux_threads = yes; then
10465                 cat >> confdefs.h <<\EOF
10466 #define HAVE_LINUX_THREADS 1
10467 EOF
10468
10469         fi
10470
10471
10472         for ac_hdr in mach/cthreads.h
10473 do
10474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10476 echo "configure:10477: checking for $ac_hdr" >&5
10477 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10478   echo $ac_n "(cached) $ac_c" 1>&6
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 #include <$ac_hdr>
10484 EOF
10485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10486 { (eval echo configure:10487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10488 if test -z "$ac_err"; then
10489   rm -rf conftest*
10490   eval "ac_cv_header_$ac_safe=yes"
10491 else
10492   echo "$ac_err" >&5
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   eval "ac_cv_header_$ac_safe=no"
10497 fi
10498 rm -f conftest*
10499 fi
10500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10501   echo "$ac_t""yes" 1>&6
10502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10503   cat >> confdefs.h <<EOF
10504 #define $ac_tr_hdr 1
10505 EOF
10506  
10507 else
10508   echo "$ac_t""no" 1>&6
10509 fi
10510 done
10511
10512         for ac_hdr in lwp/lwp.h
10513 do
10514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10516 echo "configure:10517: checking for $ac_hdr" >&5
10517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10518   echo $ac_n "(cached) $ac_c" 1>&6
10519 else
10520   cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523 #include <$ac_hdr>
10524 EOF
10525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10526 { (eval echo configure:10527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10528 if test -z "$ac_err"; then
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=yes"
10531 else
10532   echo "$ac_err" >&5
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -rf conftest*
10536   eval "ac_cv_header_$ac_safe=no"
10537 fi
10538 rm -f conftest*
10539 fi
10540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10541   echo "$ac_t""yes" 1>&6
10542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10543   cat >> confdefs.h <<EOF
10544 #define $ac_tr_hdr 1
10545 EOF
10546  
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550 done
10551
10552         for ac_hdr in thread.h synch.h
10553 do
10554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10556 echo "configure:10557: checking for $ac_hdr" >&5
10557 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10558   echo $ac_n "(cached) $ac_c" 1>&6
10559 else
10560   cat > conftest.$ac_ext <<EOF
10561 #line 10562 "configure"
10562 #include "confdefs.h"
10563 #include <$ac_hdr>
10564 EOF
10565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10566 { (eval echo configure:10567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10568 if test -z "$ac_err"; then
10569   rm -rf conftest*
10570   eval "ac_cv_header_$ac_safe=yes"
10571 else
10572   echo "$ac_err" >&5
10573   echo "configure: failed program was:" >&5
10574   cat conftest.$ac_ext >&5
10575   rm -rf conftest*
10576   eval "ac_cv_header_$ac_safe=no"
10577 fi
10578 rm -f conftest*
10579 fi
10580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10581   echo "$ac_t""yes" 1>&6
10582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10583   cat >> confdefs.h <<EOF
10584 #define $ac_tr_hdr 1
10585 EOF
10586  
10587 else
10588   echo "$ac_t""no" 1>&6
10589 fi
10590 done
10591
10592 fi
10593
10594 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10595                         cat >> confdefs.h <<\EOF
10596 #define REENTRANT 1
10597 EOF
10598
10599         cat >> confdefs.h <<\EOF
10600 #define _REENTRANT 1
10601 EOF
10602
10603         cat >> confdefs.h <<\EOF
10604 #define THREAD_SAFE 1
10605 EOF
10606
10607         cat >> confdefs.h <<\EOF
10608 #define _THREAD_SAFE 1
10609 EOF
10610
10611         cat >> confdefs.h <<\EOF
10612 #define THREADSAFE 1
10613 EOF
10614
10615         cat >> confdefs.h <<\EOF
10616 #define _THREADSAFE 1
10617 EOF
10618
10619         cat >> confdefs.h <<\EOF
10620 #define _SGI_MP_SOURCE 1
10621 EOF
10622
10623
10624                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10625 echo "configure:10626: checking for thread specific errno" >&5
10626 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   
10630                 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633 #include <errno.h>
10634 int main() {
10635 errno = 0;
10636 ; return 0; }
10637 EOF
10638 if { (eval echo configure:10639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10639   rm -rf conftest*
10640   ol_cv_errno_thread_specific=yes
10641 else
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -rf conftest*
10645   ol_cv_errno_thread_specific=no
10646 fi
10647 rm -f conftest*
10648         
10649 fi
10650
10651 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10652
10653                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10654 echo "configure:10655: checking for thread specific h_errno" >&5
10655 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10656   echo $ac_n "(cached) $ac_c" 1>&6
10657 else
10658   
10659                 cat > conftest.$ac_ext <<EOF
10660 #line 10661 "configure"
10661 #include "confdefs.h"
10662 #include <netdb.h>
10663 int main() {
10664 h_errno = 0;
10665 ; return 0; }
10666 EOF
10667 if { (eval echo configure:10668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10668   rm -rf conftest*
10669   ol_cv_h_errno_thread_specific=yes
10670 else
10671   echo "configure: failed program was:" >&5
10672   cat conftest.$ac_ext >&5
10673   rm -rf conftest*
10674   ol_cv_h_errno_thread_specific=no
10675 fi
10676 rm -f conftest*
10677         
10678 fi
10679
10680 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10681
10682         if test $ol_cv_errno_thread_specific != yes \
10683                 -o $ol_cv_h_errno_thread_specific != yes ; then
10684                 LIBS="$LTHREAD_LIBS $LIBS"
10685                 LTHREAD_LIBS=""
10686         fi
10687
10688 fi  
10689
10690 if test $ol_link_threads = no ; then
10691         if test $ol_with_threads = yes ; then
10692                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10693         fi
10694
10695         if test $ol_with_threads = auto ; then
10696                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10697                 ol_with_threads=no
10698         fi
10699
10700         cat >> confdefs.h <<\EOF
10701 #define NO_THREADS 1
10702 EOF
10703
10704         LTHREAD_LIBS=""
10705 fi
10706
10707 if test $ol_link_threads != no ; then
10708         cat >> confdefs.h <<\EOF
10709 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10710 EOF
10711
10712 fi
10713
10714
10715 ol_link_ldbm=no 
10716 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10717         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10718 echo "configure:10719: checking for DB2 library" >&5
10719 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722         ol_LIBS="$LIBS"
10723         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10724 echo "configure:10725: checking for db_appexit in -ldb" >&5
10725 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10727   echo $ac_n "(cached) $ac_c" 1>&6
10728 else
10729   ac_save_LIBS="$LIBS"
10730 LIBS="-ldb  $LIBS"
10731 cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 /* Override any gcc2 internal prototype to avoid an error.  */
10735 /* We use char because int might match the return type of a gcc2
10736     builtin and then its argument prototype would still apply.  */
10737 char db_appexit();
10738
10739 int main() {
10740 db_appexit()
10741 ; return 0; }
10742 EOF
10743 if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10744   rm -rf conftest*
10745   eval "ac_cv_lib_$ac_lib_var=yes"
10746 else
10747   echo "configure: failed program was:" >&5
10748   cat conftest.$ac_ext >&5
10749   rm -rf conftest*
10750   eval "ac_cv_lib_$ac_lib_var=no"
10751 fi
10752 rm -f conftest*
10753 LIBS="$ac_save_LIBS"
10754
10755 fi
10756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10757   echo "$ac_t""yes" 1>&6
10758   ol_cv_lib_db2=-ldb
10759 else
10760   echo "$ac_t""no" 1>&6
10761 ol_cv_lib_db2=no
10762 fi
10763
10764         LIBS="$ol_LIBS"
10765
10766 fi
10767
10768 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10769
10770 for ac_hdr in db.h
10771 do
10772 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10773 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10774 echo "configure:10775: checking for $ac_hdr" >&5
10775 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10776   echo $ac_n "(cached) $ac_c" 1>&6
10777 else
10778   cat > conftest.$ac_ext <<EOF
10779 #line 10780 "configure"
10780 #include "confdefs.h"
10781 #include <$ac_hdr>
10782 EOF
10783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10784 { (eval echo configure:10785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10786 if test -z "$ac_err"; then
10787   rm -rf conftest*
10788   eval "ac_cv_header_$ac_safe=yes"
10789 else
10790   echo "$ac_err" >&5
10791   echo "configure: failed program was:" >&5
10792   cat conftest.$ac_ext >&5
10793   rm -rf conftest*
10794   eval "ac_cv_header_$ac_safe=no"
10795 fi
10796 rm -f conftest*
10797 fi
10798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10799   echo "$ac_t""yes" 1>&6
10800     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10801   cat >> confdefs.h <<EOF
10802 #define $ac_tr_hdr 1
10803 EOF
10804  
10805 else
10806   echo "$ac_t""no" 1>&6
10807 fi
10808 done
10809
10810 if test $ac_cv_header_db_h = yes ; then
10811         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10812 echo "configure:10813: checking if db.h is DB2" >&5
10813 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817                 cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820
10821 #                       include <db.h>
10822                         /* this check could be improved */
10823 #                       ifdef DB_VERSION_MAJOR
10824 #                               if DB_VERSION_MAJOR == 2
10825                                         __db_version_2;
10826 #                               endif
10827 #                       endif
10828                 
10829 EOF
10830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10831   egrep "__db_version_2" >/dev/null 2>&1; then
10832   rm -rf conftest*
10833   ol_cv_header_db2=yes
10834 else
10835   rm -rf conftest*
10836   ol_cv_header_db2=no
10837 fi
10838 rm -f conftest*
10839
10840 fi
10841
10842 echo "$ac_t""$ol_cv_header_db2" 1>&6
10843 else
10844         ol_cv_header_db2=no
10845 fi
10846
10847
10848  
10849  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10850 echo "configure:10851: checking for Berkeley DB2" >&5
10851 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10852   echo $ac_n "(cached) $ac_c" 1>&6
10853 else
10854   
10855         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10856                 ol_cv_berkeley_db2=no
10857         else
10858                 ol_cv_berkeley_db2=yes
10859         fi
10860
10861 fi
10862
10863 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10864  if test $ol_cv_berkeley_db2 = yes ; then
10865         cat >> confdefs.h <<\EOF
10866 #define HAVE_BERKELEY_DB2 1
10867 EOF
10868
10869  fi
10870
10871
10872         if test $ol_cv_berkeley_db2 = yes ; then
10873                 ol_link_ldbm=db2
10874                 ol_with_ldbm_api=db2
10875
10876                 if test $ol_with_ldbm_type = hash ; then
10877                         cat >> confdefs.h <<\EOF
10878 #define LDBM_USE_DBHASH 1
10879 EOF
10880
10881                 else
10882                         cat >> confdefs.h <<\EOF
10883 #define LDBM_USE_DBBTREE 1
10884 EOF
10885
10886                 fi
10887
10888                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10889 echo "configure:10890: checking for DB_THREAD support" >&5
10890 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10891   echo $ac_n "(cached) $ac_c" 1>&6
10892 else
10893   
10894         ol_LIBS="$LIBS"
10895         if test $ol_cv_lib_db2 != yes ; then
10896                 LIBS="$ol_cv_lib_db2"
10897         fi
10898
10899         if test "$cross_compiling" = yes; then
10900   ol_cv_berkeley_db2_db_thread=cross
10901 else
10902   cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905
10906 #include <db.h>
10907 #ifndef NULL
10908 #define NULL ((void *)0)
10909 #endif
10910 main()
10911 {
10912         int rc;
10913         DB_ENV env;
10914         u_int32_t flags = DB_CREATE | DB_THREAD;
10915
10916         memset( &env, '\0', sizeof(env) );
10917
10918         rc = db_appinit( NULL, NULL, &env, flags );
10919
10920         if( rc == 0 ) {
10921                 db_appexit( &env );
10922         }
10923
10924         return rc;
10925 }
10926 EOF
10927 if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10928 then
10929   ol_cv_berkeley_db2_db_thread=yes
10930 else
10931   echo "configure: failed program was:" >&5
10932   cat conftest.$ac_ext >&5
10933   rm -fr conftest*
10934   ol_cv_berkeley_db2_db_thread=no
10935 fi
10936 rm -fr conftest*
10937 fi
10938
10939
10940         LIBS="$ol_LIBS"
10941
10942         if test $ol_cv_berkeley_db2_db_thread != no ; then
10943                 cat >> confdefs.h <<\EOF
10944 #define HAVE_BERKELEY_DB2_DB_THREAD 1
10945 EOF
10946
10947         fi
10948
10949 fi
10950
10951 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
10952
10953                                                 if test $ol_cv_lib_db2 != yes ; then
10954                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10955                 fi
10956         fi
10957 fi
10958
10959 ol_link_bdb2=no
10960 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10961         if test $ol_cv_berkeley_db2_db_thread != no ; then
10962                 ol_link_bdb2=yes
10963         else
10964                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
10965         fi
10966 fi
10967
10968 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10969         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10970 echo "configure:10971: checking for Berkeley DB library" >&5
10971 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10972   echo $ac_n "(cached) $ac_c" 1>&6
10973 else
10974   
10975         for ac_hdr in db1/db.h
10976 do
10977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10979 echo "configure:10980: checking for $ac_hdr" >&5
10980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include <$ac_hdr>
10987 EOF
10988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10989 { (eval echo configure:10990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10991 if test -z "$ac_err"; then
10992   rm -rf conftest*
10993   eval "ac_cv_header_$ac_safe=yes"
10994 else
10995   echo "$ac_err" >&5
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -rf conftest*
10999   eval "ac_cv_header_$ac_safe=no"
11000 fi
11001 rm -f conftest*
11002 fi
11003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11004   echo "$ac_t""yes" 1>&6
11005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11006   cat >> confdefs.h <<EOF
11007 #define $ac_tr_hdr 1
11008 EOF
11009  
11010 else
11011   echo "$ac_t""no" 1>&6
11012 fi
11013 done
11014
11015         ol_LIBS="$LIBS"
11016         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11017 echo "configure:11018: checking for dbopen" >&5
11018 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11019   echo $ac_n "(cached) $ac_c" 1>&6
11020 else
11021   cat > conftest.$ac_ext <<EOF
11022 #line 11023 "configure"
11023 #include "confdefs.h"
11024 /* System header to define __stub macros and hopefully few prototypes,
11025     which can conflict with char dbopen(); below.  */
11026 #include <assert.h>
11027 /* Override any gcc2 internal prototype to avoid an error.  */
11028 /* We use char because int might match the return type of a gcc2
11029     builtin and then its argument prototype would still apply.  */
11030 char dbopen();
11031 char (*f)();
11032
11033 int main() {
11034
11035 /* The GNU C library defines this for functions which it implements
11036     to always fail with ENOSYS.  Some functions are actually named
11037     something starting with __ and the normal name is an alias.  */
11038 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11039 choke me
11040 #else
11041 f = dbopen;
11042 #endif
11043
11044 ; return 0; }
11045 EOF
11046 if { (eval echo configure:11047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11047   rm -rf conftest*
11048   eval "ac_cv_func_dbopen=yes"
11049 else
11050   echo "configure: failed program was:" >&5
11051   cat conftest.$ac_ext >&5
11052   rm -rf conftest*
11053   eval "ac_cv_func_dbopen=no"
11054 fi
11055 rm -f conftest*
11056 fi
11057
11058 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11059   echo "$ac_t""yes" 1>&6
11060   ol_cv_lib_db=yes
11061 else
11062   echo "$ac_t""no" 1>&6
11063
11064                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11065 echo "configure:11066: checking for dbopen in -ldb1" >&5
11066 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   ac_save_LIBS="$LIBS"
11071 LIBS="-ldb1  $LIBS"
11072 cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 /* Override any gcc2 internal prototype to avoid an error.  */
11076 /* We use char because int might match the return type of a gcc2
11077     builtin and then its argument prototype would still apply.  */
11078 char dbopen();
11079
11080 int main() {
11081 dbopen()
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=yes"
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=no"
11092 fi
11093 rm -f conftest*
11094 LIBS="$ac_save_LIBS"
11095
11096 fi
11097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11098   echo "$ac_t""yes" 1>&6
11099   ol_cv_lib_db=-ldb1
11100 else
11101   echo "$ac_t""no" 1>&6
11102
11103                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11104 echo "configure:11105: checking for dbopen in -ldb" >&5
11105 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   ac_save_LIBS="$LIBS"
11110 LIBS="-ldb  $LIBS"
11111 cat > conftest.$ac_ext <<EOF
11112 #line 11113 "configure"
11113 #include "confdefs.h"
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char dbopen();
11118
11119 int main() {
11120 dbopen()
11121 ; return 0; }
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11124   rm -rf conftest*
11125   eval "ac_cv_lib_$ac_lib_var=yes"
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=no"
11131 fi
11132 rm -f conftest*
11133 LIBS="$ac_save_LIBS"
11134
11135 fi
11136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11137   echo "$ac_t""yes" 1>&6
11138   ol_cv_lib_db=-ldb
11139 else
11140   echo "$ac_t""no" 1>&6
11141 ol_cv_lib_db=no
11142 fi
11143
11144                 
11145 fi
11146
11147         
11148 fi
11149
11150         LIBS="$ol_LIBS"
11151
11152 fi
11153
11154 echo "$ac_t""$ol_cv_lib_db" 1>&6
11155
11156
11157 for ac_hdr in db_185.h
11158 do
11159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11161 echo "configure:11162: checking for $ac_hdr" >&5
11162 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11163   echo $ac_n "(cached) $ac_c" 1>&6
11164 else
11165   cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 #include <$ac_hdr>
11169 EOF
11170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11171 { (eval echo configure:11172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11173 if test -z "$ac_err"; then
11174   rm -rf conftest*
11175   eval "ac_cv_header_$ac_safe=yes"
11176 else
11177   echo "$ac_err" >&5
11178   echo "configure: failed program was:" >&5
11179   cat conftest.$ac_ext >&5
11180   rm -rf conftest*
11181   eval "ac_cv_header_$ac_safe=no"
11182 fi
11183 rm -f conftest*
11184 fi
11185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11186   echo "$ac_t""yes" 1>&6
11187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11188   cat >> confdefs.h <<EOF
11189 #define $ac_tr_hdr 1
11190 EOF
11191  
11192 else
11193   echo "$ac_t""no" 1>&6
11194 fi
11195 done
11196
11197 if test "$ol_cv_header_db2" = yes ; then
11198         
11199         ol_cv_header_db=$ac_cv_header_db_185_h
11200 else
11201         ol_cv_header_db=$ac_cv_header_db_h
11202 fi
11203
11204
11205  
11206  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11207 echo "configure:11208: checking for Berkeley DB" >&5
11208 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   
11212         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11213                 ol_cv_berkeley_db=no
11214         else
11215                 ol_cv_berkeley_db=yes
11216         fi
11217
11218 fi
11219
11220 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11221  if test $ol_cv_berkeley_db = yes ; then
11222         cat >> confdefs.h <<\EOF
11223 #define HAVE_BERKELEY_DB 1
11224 EOF
11225
11226  fi
11227
11228
11229         if test $ol_cv_berkeley_db = yes ; then
11230                 ol_link_ldbm=db
11231                 ol_with_ldbm_api=db
11232
11233                 if test $ol_with_ldbm_type = hash ; then
11234                         cat >> confdefs.h <<\EOF
11235 #define LDBM_USE_DBHASH 1
11236 EOF
11237
11238                 else
11239                         cat >> confdefs.h <<\EOF
11240 #define LDBM_USE_DBBTREE 1
11241 EOF
11242
11243                 fi
11244
11245                                                 if test $ol_cv_lib_db != yes ; then
11246                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11247                 fi
11248         fi
11249 fi
11250
11251 if test $ol_with_ldbm_api = manual ; then
11252                 ol_link_ldbm=yes
11253
11254         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11255
11256         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11257 do
11258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11260 echo "configure:11261: checking for $ac_hdr" >&5
11261 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11262   echo $ac_n "(cached) $ac_c" 1>&6
11263 else
11264   cat > conftest.$ac_ext <<EOF
11265 #line 11266 "configure"
11266 #include "confdefs.h"
11267 #include <$ac_hdr>
11268 EOF
11269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11270 { (eval echo configure:11271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11272 if test -z "$ac_err"; then
11273   rm -rf conftest*
11274   eval "ac_cv_header_$ac_safe=yes"
11275 else
11276   echo "$ac_err" >&5
11277   echo "configure: failed program was:" >&5
11278   cat conftest.$ac_ext >&5
11279   rm -rf conftest*
11280   eval "ac_cv_header_$ac_safe=no"
11281 fi
11282 rm -f conftest*
11283 fi
11284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11285   echo "$ac_t""yes" 1>&6
11286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11287   cat >> confdefs.h <<EOF
11288 #define $ac_tr_hdr 1
11289 EOF
11290  
11291 else
11292   echo "$ac_t""no" 1>&6
11293 fi
11294 done
11295
11296 fi
11297
11298 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11299         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11300         ol_with_ldbm_api=none
11301 fi
11302
11303 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11304         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11305 echo "configure:11306: checking for MDBM library" >&5
11306 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11307   echo $ac_n "(cached) $ac_c" 1>&6
11308 else
11309         ol_LIBS="$LIBS"
11310         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11311 echo "configure:11312: checking for mdbm_set_chain" >&5
11312 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11313   echo $ac_n "(cached) $ac_c" 1>&6
11314 else
11315   cat > conftest.$ac_ext <<EOF
11316 #line 11317 "configure"
11317 #include "confdefs.h"
11318 /* System header to define __stub macros and hopefully few prototypes,
11319     which can conflict with char mdbm_set_chain(); below.  */
11320 #include <assert.h>
11321 /* Override any gcc2 internal prototype to avoid an error.  */
11322 /* We use char because int might match the return type of a gcc2
11323     builtin and then its argument prototype would still apply.  */
11324 char mdbm_set_chain();
11325 char (*f)();
11326
11327 int main() {
11328
11329 /* The GNU C library defines this for functions which it implements
11330     to always fail with ENOSYS.  Some functions are actually named
11331     something starting with __ and the normal name is an alias.  */
11332 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11333 choke me
11334 #else
11335 f = mdbm_set_chain;
11336 #endif
11337
11338 ; return 0; }
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11341   rm -rf conftest*
11342   eval "ac_cv_func_mdbm_set_chain=yes"
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -rf conftest*
11347   eval "ac_cv_func_mdbm_set_chain=no"
11348 fi
11349 rm -f conftest*
11350 fi
11351
11352 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11353   echo "$ac_t""yes" 1>&6
11354   ol_cv_lib_mdbm=yes
11355 else
11356   echo "$ac_t""no" 1>&6
11357
11358                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11359 echo "configure:11360: checking for mdbm_set_chain in -lmdbm" >&5
11360 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11362   echo $ac_n "(cached) $ac_c" 1>&6
11363 else
11364   ac_save_LIBS="$LIBS"
11365 LIBS="-lmdbm  $LIBS"
11366 cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 /* Override any gcc2 internal prototype to avoid an error.  */
11370 /* We use char because int might match the return type of a gcc2
11371     builtin and then its argument prototype would still apply.  */
11372 char mdbm_set_chain();
11373
11374 int main() {
11375 mdbm_set_chain()
11376 ; return 0; }
11377 EOF
11378 if { (eval echo configure:11379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11379   rm -rf conftest*
11380   eval "ac_cv_lib_$ac_lib_var=yes"
11381 else
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=no"
11386 fi
11387 rm -f conftest*
11388 LIBS="$ac_save_LIBS"
11389
11390 fi
11391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11392   echo "$ac_t""yes" 1>&6
11393   ol_cv_lib_mdbm=-lmdbm
11394 else
11395   echo "$ac_t""no" 1>&6
11396 ol_cv_lib_mdbm=no
11397 fi
11398
11399         
11400 fi
11401
11402         LIBS="$ol_LIBS"
11403
11404 fi
11405
11406 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11407
11408
11409  for ac_hdr in mdbm.h
11410 do
11411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11413 echo "configure:11414: checking for $ac_hdr" >&5
11414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11415   echo $ac_n "(cached) $ac_c" 1>&6
11416 else
11417   cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420 #include <$ac_hdr>
11421 EOF
11422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11423 { (eval echo configure:11424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11425 if test -z "$ac_err"; then
11426   rm -rf conftest*
11427   eval "ac_cv_header_$ac_safe=yes"
11428 else
11429   echo "$ac_err" >&5
11430   echo "configure: failed program was:" >&5
11431   cat conftest.$ac_ext >&5
11432   rm -rf conftest*
11433   eval "ac_cv_header_$ac_safe=no"
11434 fi
11435 rm -f conftest*
11436 fi
11437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11438   echo "$ac_t""yes" 1>&6
11439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11440   cat >> confdefs.h <<EOF
11441 #define $ac_tr_hdr 1
11442 EOF
11443  
11444 else
11445   echo "$ac_t""no" 1>&6
11446 fi
11447 done
11448
11449  echo $ac_n "checking for db""... $ac_c" 1>&6
11450 echo "configure:11451: checking for db" >&5
11451 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11452   echo $ac_n "(cached) $ac_c" 1>&6
11453 else
11454   
11455         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11456                 ol_cv_mdbm=no
11457         else
11458                 ol_cv_mdbm=yes
11459         fi
11460
11461 fi
11462
11463 echo "$ac_t""$ol_cv_mdbm" 1>&6
11464  if test $ol_cv_mdbm = yes ; then
11465         cat >> confdefs.h <<\EOF
11466 #define HAVE_MDBM 1
11467 EOF
11468
11469  fi
11470
11471
11472         if test $ol_cv_mdbm = yes ; then
11473                 ol_link_ldbm=mdbm
11474                 ol_with_ldbm_api=mdbm
11475                 if test $ol_cv_lib_mdbm != yes ; then
11476                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11477                 fi
11478         fi
11479 fi
11480
11481 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11482         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11483 echo "configure:11484: checking for GDBM library" >&5
11484 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11485   echo $ac_n "(cached) $ac_c" 1>&6
11486 else
11487         ol_LIBS="$LIBS"
11488         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11489 echo "configure:11490: checking for gdbm_open" >&5
11490 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11491   echo $ac_n "(cached) $ac_c" 1>&6
11492 else
11493   cat > conftest.$ac_ext <<EOF
11494 #line 11495 "configure"
11495 #include "confdefs.h"
11496 /* System header to define __stub macros and hopefully few prototypes,
11497     which can conflict with char gdbm_open(); below.  */
11498 #include <assert.h>
11499 /* Override any gcc2 internal prototype to avoid an error.  */
11500 /* We use char because int might match the return type of a gcc2
11501     builtin and then its argument prototype would still apply.  */
11502 char gdbm_open();
11503 char (*f)();
11504
11505 int main() {
11506
11507 /* The GNU C library defines this for functions which it implements
11508     to always fail with ENOSYS.  Some functions are actually named
11509     something starting with __ and the normal name is an alias.  */
11510 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11511 choke me
11512 #else
11513 f = gdbm_open;
11514 #endif
11515
11516 ; return 0; }
11517 EOF
11518 if { (eval echo configure:11519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11519   rm -rf conftest*
11520   eval "ac_cv_func_gdbm_open=yes"
11521 else
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -rf conftest*
11525   eval "ac_cv_func_gdbm_open=no"
11526 fi
11527 rm -f conftest*
11528 fi
11529
11530 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11531   echo "$ac_t""yes" 1>&6
11532   ol_cv_lib_gdbm=yes
11533 else
11534   echo "$ac_t""no" 1>&6
11535
11536                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11537 echo "configure:11538: checking for gdbm_open in -lgdbm" >&5
11538 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   ac_save_LIBS="$LIBS"
11543 LIBS="-lgdbm  $LIBS"
11544 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 /* Override any gcc2 internal prototype to avoid an error.  */
11548 /* We use char because int might match the return type of a gcc2
11549     builtin and then its argument prototype would still apply.  */
11550 char gdbm_open();
11551
11552 int main() {
11553 gdbm_open()
11554 ; return 0; }
11555 EOF
11556 if { (eval echo configure:11557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11557   rm -rf conftest*
11558   eval "ac_cv_lib_$ac_lib_var=yes"
11559 else
11560   echo "configure: failed program was:" >&5
11561   cat conftest.$ac_ext >&5
11562   rm -rf conftest*
11563   eval "ac_cv_lib_$ac_lib_var=no"
11564 fi
11565 rm -f conftest*
11566 LIBS="$ac_save_LIBS"
11567
11568 fi
11569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11570   echo "$ac_t""yes" 1>&6
11571   ol_cv_lib_gdbm=-lgdbm
11572 else
11573   echo "$ac_t""no" 1>&6
11574 ol_cv_lib_gdbm=no
11575 fi
11576
11577         
11578 fi
11579
11580         LIBS="$ol_LIBS"
11581
11582 fi
11583
11584 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11585
11586
11587  for ac_hdr in gdbm.h
11588 do
11589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11591 echo "configure:11592: checking for $ac_hdr" >&5
11592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   cat > conftest.$ac_ext <<EOF
11596 #line 11597 "configure"
11597 #include "confdefs.h"
11598 #include <$ac_hdr>
11599 EOF
11600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11601 { (eval echo configure:11602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11603 if test -z "$ac_err"; then
11604   rm -rf conftest*
11605   eval "ac_cv_header_$ac_safe=yes"
11606 else
11607   echo "$ac_err" >&5
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -rf conftest*
11611   eval "ac_cv_header_$ac_safe=no"
11612 fi
11613 rm -f conftest*
11614 fi
11615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11616   echo "$ac_t""yes" 1>&6
11617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11618   cat >> confdefs.h <<EOF
11619 #define $ac_tr_hdr 1
11620 EOF
11621  
11622 else
11623   echo "$ac_t""no" 1>&6
11624 fi
11625 done
11626
11627  echo $ac_n "checking for db""... $ac_c" 1>&6
11628 echo "configure:11629: checking for db" >&5
11629 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   
11633         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11634                 ol_cv_gdbm=no
11635         else
11636                 ol_cv_gdbm=yes
11637         fi
11638
11639 fi
11640
11641 echo "$ac_t""$ol_cv_gdbm" 1>&6
11642  if test $ol_cv_gdbm = yes ; then
11643         cat >> confdefs.h <<\EOF
11644 #define HAVE_GDBM 1
11645 EOF
11646
11647  fi
11648
11649
11650         if test $ol_cv_gdbm = yes ; then
11651                 ol_link_ldbm=gdbm
11652                 ol_with_ldbm_api=gdbm
11653
11654                 if test $ol_cv_lib_gdbm != yes ; then
11655                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11656                 fi
11657         fi
11658 fi
11659
11660 if test $ol_with_ldbm_api = auto ; then
11661         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11662 elif test $ol_with_ldbm_api = ndbm ; then
11663         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11664 echo "configure:11665: checking for NDBM library" >&5
11665 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11666   echo $ac_n "(cached) $ac_c" 1>&6
11667 else
11668         ol_LIBS="$LIBS"
11669         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11670 echo "configure:11671: checking for dbm_open" >&5
11671 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11672   echo $ac_n "(cached) $ac_c" 1>&6
11673 else
11674   cat > conftest.$ac_ext <<EOF
11675 #line 11676 "configure"
11676 #include "confdefs.h"
11677 /* System header to define __stub macros and hopefully few prototypes,
11678     which can conflict with char dbm_open(); below.  */
11679 #include <assert.h>
11680 /* Override any gcc2 internal prototype to avoid an error.  */
11681 /* We use char because int might match the return type of a gcc2
11682     builtin and then its argument prototype would still apply.  */
11683 char dbm_open();
11684 char (*f)();
11685
11686 int main() {
11687
11688 /* The GNU C library defines this for functions which it implements
11689     to always fail with ENOSYS.  Some functions are actually named
11690     something starting with __ and the normal name is an alias.  */
11691 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11692 choke me
11693 #else
11694 f = dbm_open;
11695 #endif
11696
11697 ; return 0; }
11698 EOF
11699 if { (eval echo configure:11700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11700   rm -rf conftest*
11701   eval "ac_cv_func_dbm_open=yes"
11702 else
11703   echo "configure: failed program was:" >&5
11704   cat conftest.$ac_ext >&5
11705   rm -rf conftest*
11706   eval "ac_cv_func_dbm_open=no"
11707 fi
11708 rm -f conftest*
11709 fi
11710
11711 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11712   echo "$ac_t""yes" 1>&6
11713   ol_cv_lib_ndbm=yes
11714 else
11715   echo "$ac_t""no" 1>&6
11716
11717                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11718 echo "configure:11719: checking for dbm_open in -lndbm" >&5
11719 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11720 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11721   echo $ac_n "(cached) $ac_c" 1>&6
11722 else
11723   ac_save_LIBS="$LIBS"
11724 LIBS="-lndbm  $LIBS"
11725 cat > conftest.$ac_ext <<EOF
11726 #line 11727 "configure"
11727 #include "confdefs.h"
11728 /* Override any gcc2 internal prototype to avoid an error.  */
11729 /* We use char because int might match the return type of a gcc2
11730     builtin and then its argument prototype would still apply.  */
11731 char dbm_open();
11732
11733 int main() {
11734 dbm_open()
11735 ; return 0; }
11736 EOF
11737 if { (eval echo configure:11738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11738   rm -rf conftest*
11739   eval "ac_cv_lib_$ac_lib_var=yes"
11740 else
11741   echo "configure: failed program was:" >&5
11742   cat conftest.$ac_ext >&5
11743   rm -rf conftest*
11744   eval "ac_cv_lib_$ac_lib_var=no"
11745 fi
11746 rm -f conftest*
11747 LIBS="$ac_save_LIBS"
11748
11749 fi
11750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11751   echo "$ac_t""yes" 1>&6
11752   ol_cv_lib_ndbm=-lndbm
11753 else
11754   echo "$ac_t""no" 1>&6
11755
11756                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11757 echo "configure:11758: checking for dbm_open in -ldbm" >&5
11758 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11759 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11760   echo $ac_n "(cached) $ac_c" 1>&6
11761 else
11762   ac_save_LIBS="$LIBS"
11763 LIBS="-ldbm  $LIBS"
11764 cat > conftest.$ac_ext <<EOF
11765 #line 11766 "configure"
11766 #include "confdefs.h"
11767 /* Override any gcc2 internal prototype to avoid an error.  */
11768 /* We use char because int might match the return type of a gcc2
11769     builtin and then its argument prototype would still apply.  */
11770 char dbm_open();
11771
11772 int main() {
11773 dbm_open()
11774 ; return 0; }
11775 EOF
11776 if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11777   rm -rf conftest*
11778   eval "ac_cv_lib_$ac_lib_var=yes"
11779 else
11780   echo "configure: failed program was:" >&5
11781   cat conftest.$ac_ext >&5
11782   rm -rf conftest*
11783   eval "ac_cv_lib_$ac_lib_var=no"
11784 fi
11785 rm -f conftest*
11786 LIBS="$ac_save_LIBS"
11787
11788 fi
11789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11790   echo "$ac_t""yes" 1>&6
11791   ol_cv_lib_ndbm=-ldbm
11792 else
11793   echo "$ac_t""no" 1>&6
11794 ol_cv_lib_ndbm=no
11795 fi
11796                 
11797 fi
11798
11799         
11800 fi
11801
11802         LIBS="$ol_LIBS"
11803
11804 fi
11805
11806 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11807
11808
11809  for ac_hdr in ndbm.h
11810 do
11811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11813 echo "configure:11814: checking for $ac_hdr" >&5
11814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11815   echo $ac_n "(cached) $ac_c" 1>&6
11816 else
11817   cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 #include <$ac_hdr>
11821 EOF
11822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11823 { (eval echo configure:11824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11825 if test -z "$ac_err"; then
11826   rm -rf conftest*
11827   eval "ac_cv_header_$ac_safe=yes"
11828 else
11829   echo "$ac_err" >&5
11830   echo "configure: failed program was:" >&5
11831   cat conftest.$ac_ext >&5
11832   rm -rf conftest*
11833   eval "ac_cv_header_$ac_safe=no"
11834 fi
11835 rm -f conftest*
11836 fi
11837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11838   echo "$ac_t""yes" 1>&6
11839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11840   cat >> confdefs.h <<EOF
11841 #define $ac_tr_hdr 1
11842 EOF
11843  
11844 else
11845   echo "$ac_t""no" 1>&6
11846 fi
11847 done
11848
11849  echo $ac_n "checking for db""... $ac_c" 1>&6
11850 echo "configure:11851: checking for db" >&5
11851 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11852   echo $ac_n "(cached) $ac_c" 1>&6
11853 else
11854   
11855         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11856                 ol_cv_ndbm=no
11857         else
11858                 ol_cv_ndbm=yes
11859         fi
11860
11861 fi
11862
11863 echo "$ac_t""$ol_cv_ndbm" 1>&6
11864  if test $ol_cv_ndbm = yes ; then
11865         cat >> confdefs.h <<\EOF
11866 #define HAVE_NDBM 1
11867 EOF
11868
11869  fi
11870
11871
11872         if test $ol_cv_ndbm = yes ; then
11873                 ol_link_ldbm=ndbm
11874                 ol_with_ldbm_api=ndbm
11875
11876                 if test $ol_cv_lib_ndbm != yes ; then
11877                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11878                 fi
11879         fi
11880 fi
11881
11882 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11883         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11884         if test $ol_enable_ldbm = yes ; then
11885                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11886         fi
11887
11888         echo "configure: warning: disabling LDBM" 1>&2
11889         ol_enable_ldbm=no
11890 fi
11891
11892 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
11893         LINK_BINS_DYNAMIC="yes"
11894 else
11895         LINK_BINS_DYNAMIC="no"
11896 fi
11897
11898 if test $ol_enable_wrappers != no ; then
11899         for ac_hdr in tcpd.h
11900 do
11901 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11902 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11903 echo "configure:11904: checking for $ac_hdr" >&5
11904 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11905   echo $ac_n "(cached) $ac_c" 1>&6
11906 else
11907   cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910 #include <$ac_hdr>
11911 EOF
11912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11913 { (eval echo configure:11914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11915 if test -z "$ac_err"; then
11916   rm -rf conftest*
11917   eval "ac_cv_header_$ac_safe=yes"
11918 else
11919   echo "$ac_err" >&5
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   eval "ac_cv_header_$ac_safe=no"
11924 fi
11925 rm -f conftest*
11926 fi
11927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11928   echo "$ac_t""yes" 1>&6
11929     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11930   cat >> confdefs.h <<EOF
11931 #define $ac_tr_hdr 1
11932 EOF
11933  
11934 else
11935   echo "$ac_t""no" 1>&6
11936 fi
11937 done
11938
11939
11940         if test $ac_cv_header_tcpd_h != yes ; then
11941                 have_wrappers=no
11942         else
11943                 cat > conftest.$ac_ext <<EOF
11944 #line 11945 "configure"
11945 #include "confdefs.h"
11946
11947 int allow_severity = 0;
11948 int deny_severity  = 0;
11949                 
11950 int main() {
11951 hosts_access()
11952 ; return 0; }
11953 EOF
11954 if { (eval echo configure:11955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11955   rm -rf conftest*
11956   have_wrappers=yes
11957 else
11958   echo "configure: failed program was:" >&5
11959   cat conftest.$ac_ext >&5
11960   rm -rf conftest*
11961   have_wrappers=no
11962 fi
11963 rm -f conftest*
11964         fi
11965
11966         if test $have_wrappers = yes ; then
11967                 cat >> confdefs.h <<\EOF
11968 #define HAVE_TCPD 1
11969 EOF
11970
11971                 WRAP_LIBS="-lwrap"
11972
11973                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11974 echo "configure:11975: checking for main in -lnsl" >&5
11975 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11976 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11977   echo $ac_n "(cached) $ac_c" 1>&6
11978 else
11979   ac_save_LIBS="$LIBS"
11980 LIBS="-lnsl  $LIBS"
11981 cat > conftest.$ac_ext <<EOF
11982 #line 11983 "configure"
11983 #include "confdefs.h"
11984
11985 int main() {
11986 main()
11987 ; return 0; }
11988 EOF
11989 if { (eval echo configure:11990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11990   rm -rf conftest*
11991   eval "ac_cv_lib_$ac_lib_var=yes"
11992 else
11993   echo "configure: failed program was:" >&5
11994   cat conftest.$ac_ext >&5
11995   rm -rf conftest*
11996   eval "ac_cv_lib_$ac_lib_var=no"
11997 fi
11998 rm -f conftest*
11999 LIBS="$ac_save_LIBS"
12000
12001 fi
12002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12003   echo "$ac_t""yes" 1>&6
12004     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12005     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12006   cat >> confdefs.h <<EOF
12007 #define $ac_tr_lib 1
12008 EOF
12009
12010   LIBS="-lnsl $LIBS"
12011
12012 else
12013   echo "$ac_t""no" 1>&6
12014 fi
12015
12016         else
12017                 echo "configure: warning: could not find -lwrap" 1>&2
12018                 if test $ol_enable_wrappers = yes ; then
12019                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12020                 fi
12021
12022                 echo "configure: warning: disabling wrappers support" 1>&2
12023                 ol_enable_wrappers=no
12024                 WRAP_LIBS=""
12025         fi
12026 fi
12027
12028 if test $ol_enable_syslog != no ; then
12029         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12030 echo "configure:12031: checking for openlog" >&5
12031 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12032   echo $ac_n "(cached) $ac_c" 1>&6
12033 else
12034   cat > conftest.$ac_ext <<EOF
12035 #line 12036 "configure"
12036 #include "confdefs.h"
12037 /* System header to define __stub macros and hopefully few prototypes,
12038     which can conflict with char openlog(); below.  */
12039 #include <assert.h>
12040 /* Override any gcc2 internal prototype to avoid an error.  */
12041 /* We use char because int might match the return type of a gcc2
12042     builtin and then its argument prototype would still apply.  */
12043 char openlog();
12044 char (*f)();
12045
12046 int main() {
12047
12048 /* The GNU C library defines this for functions which it implements
12049     to always fail with ENOSYS.  Some functions are actually named
12050     something starting with __ and the normal name is an alias.  */
12051 #if defined (__stub_openlog) || defined (__stub___openlog)
12052 choke me
12053 #else
12054 f = openlog;
12055 #endif
12056
12057 ; return 0; }
12058 EOF
12059 if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12060   rm -rf conftest*
12061   eval "ac_cv_func_openlog=yes"
12062 else
12063   echo "configure: failed program was:" >&5
12064   cat conftest.$ac_ext >&5
12065   rm -rf conftest*
12066   eval "ac_cv_func_openlog=no"
12067 fi
12068 rm -f conftest*
12069 fi
12070
12071 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12072   echo "$ac_t""yes" 1>&6
12073   :
12074 else
12075   echo "$ac_t""no" 1>&6
12076 fi
12077
12078         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12079                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12080         fi
12081         ol_enable_syslog=$ac_cv_func_openlog
12082 fi
12083
12084 if test $ol_enable_dmalloc != no ; then
12085         for ac_hdr in dmalloc.h
12086 do
12087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12089 echo "configure:12090: checking for $ac_hdr" >&5
12090 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12091   echo $ac_n "(cached) $ac_c" 1>&6
12092 else
12093   cat > conftest.$ac_ext <<EOF
12094 #line 12095 "configure"
12095 #include "confdefs.h"
12096 #include <$ac_hdr>
12097 EOF
12098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12099 { (eval echo configure:12100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12101 if test -z "$ac_err"; then
12102   rm -rf conftest*
12103   eval "ac_cv_header_$ac_safe=yes"
12104 else
12105   echo "$ac_err" >&5
12106   echo "configure: failed program was:" >&5
12107   cat conftest.$ac_ext >&5
12108   rm -rf conftest*
12109   eval "ac_cv_header_$ac_safe=no"
12110 fi
12111 rm -f conftest*
12112 fi
12113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12114   echo "$ac_t""yes" 1>&6
12115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12116   cat >> confdefs.h <<EOF
12117 #define $ac_tr_hdr 1
12118 EOF
12119  
12120 else
12121   echo "$ac_t""no" 1>&6
12122 fi
12123 done
12124
12125         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12126 echo "configure:12127: checking for dmalloc_shutdown in -ldmalloc" >&5
12127 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12129   echo $ac_n "(cached) $ac_c" 1>&6
12130 else
12131   ac_save_LIBS="$LIBS"
12132 LIBS="-ldmalloc  $LIBS"
12133 cat > conftest.$ac_ext <<EOF
12134 #line 12135 "configure"
12135 #include "confdefs.h"
12136 /* Override any gcc2 internal prototype to avoid an error.  */
12137 /* We use char because int might match the return type of a gcc2
12138     builtin and then its argument prototype would still apply.  */
12139 char dmalloc_shutdown();
12140
12141 int main() {
12142 dmalloc_shutdown()
12143 ; return 0; }
12144 EOF
12145 if { (eval echo configure:12146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12146   rm -rf conftest*
12147   eval "ac_cv_lib_$ac_lib_var=yes"
12148 else
12149   echo "configure: failed program was:" >&5
12150   cat conftest.$ac_ext >&5
12151   rm -rf conftest*
12152   eval "ac_cv_lib_$ac_lib_var=no"
12153 fi
12154 rm -f conftest*
12155 LIBS="$ac_save_LIBS"
12156
12157 fi
12158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12159   echo "$ac_t""yes" 1>&6
12160     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12162   cat >> confdefs.h <<EOF
12163 #define $ac_tr_lib 1
12164 EOF
12165
12166   LIBS="-ldmalloc $LIBS"
12167
12168 else
12169   echo "$ac_t""no" 1>&6
12170 fi
12171
12172 fi
12173
12174 if test $ol_enable_tcl != no ; then
12175         for ac_hdr in tcl.h
12176 do
12177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12179 echo "configure:12180: checking for $ac_hdr" >&5
12180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12181   echo $ac_n "(cached) $ac_c" 1>&6
12182 else
12183   cat > conftest.$ac_ext <<EOF
12184 #line 12185 "configure"
12185 #include "confdefs.h"
12186 #include <$ac_hdr>
12187 EOF
12188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12189 { (eval echo configure:12190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12191 if test -z "$ac_err"; then
12192   rm -rf conftest*
12193   eval "ac_cv_header_$ac_safe=yes"
12194 else
12195   echo "$ac_err" >&5
12196   echo "configure: failed program was:" >&5
12197   cat conftest.$ac_ext >&5
12198   rm -rf conftest*
12199   eval "ac_cv_header_$ac_safe=no"
12200 fi
12201 rm -f conftest*
12202 fi
12203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12204   echo "$ac_t""yes" 1>&6
12205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12206   cat >> confdefs.h <<EOF
12207 #define $ac_tr_hdr 1
12208 EOF
12209  
12210 else
12211   echo "$ac_t""no" 1>&6
12212 fi
12213 done
12214
12215
12216         if test $ac_cv_header_tcl_h != yes ; then
12217                 have_tcl=no
12218         else
12219                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12220                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12221 echo "configure:12222: checking for main in -l$lib" >&5
12222 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12224   echo $ac_n "(cached) $ac_c" 1>&6
12225 else
12226   ac_save_LIBS="$LIBS"
12227 LIBS="-l$lib  $LIBS"
12228 cat > conftest.$ac_ext <<EOF
12229 #line 12230 "configure"
12230 #include "confdefs.h"
12231
12232 int main() {
12233 main()
12234 ; return 0; }
12235 EOF
12236 if { (eval echo configure:12237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12237   rm -rf conftest*
12238   eval "ac_cv_lib_$ac_lib_var=yes"
12239 else
12240   echo "configure: failed program was:" >&5
12241   cat conftest.$ac_ext >&5
12242   rm -rf conftest*
12243   eval "ac_cv_lib_$ac_lib_var=no"
12244 fi
12245 rm -f conftest*
12246 LIBS="$ac_save_LIBS"
12247
12248 fi
12249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12250   echo "$ac_t""yes" 1>&6
12251   have_tcl=yes
12252                            if test x"$ol_with_tcl_module" == "xstatic" ; then
12253                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12254                            else
12255                                MOD_TCL_LIB="-l${lib}"
12256                            fi;break
12257 else
12258   echo "$ac_t""no" 1>&6
12259 have_tcl=no
12260 fi
12261
12262                 done
12263         fi
12264
12265         if test $have_tcl != yes ; then
12266                 echo "configure: warning: could not find -ltcl" 1>&2
12267                 if test $ol_enable_tcl = yes ; then
12268                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12269                 fi
12270
12271                 ol_enable_tcl=no
12272         fi
12273 fi
12274
12275 ol_link_termcap=no
12276 for ac_hdr in termcap.h ncurses.h
12277 do
12278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12280 echo "configure:12281: checking for $ac_hdr" >&5
12281 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12282   echo $ac_n "(cached) $ac_c" 1>&6
12283 else
12284   cat > conftest.$ac_ext <<EOF
12285 #line 12286 "configure"
12286 #include "confdefs.h"
12287 #include <$ac_hdr>
12288 EOF
12289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12290 { (eval echo configure:12291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12292 if test -z "$ac_err"; then
12293   rm -rf conftest*
12294   eval "ac_cv_header_$ac_safe=yes"
12295 else
12296   echo "$ac_err" >&5
12297   echo "configure: failed program was:" >&5
12298   cat conftest.$ac_ext >&5
12299   rm -rf conftest*
12300   eval "ac_cv_header_$ac_safe=no"
12301 fi
12302 rm -f conftest*
12303 fi
12304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12305   echo "$ac_t""yes" 1>&6
12306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12307   cat >> confdefs.h <<EOF
12308 #define $ac_tr_hdr 1
12309 EOF
12310  
12311 else
12312   echo "$ac_t""no" 1>&6
12313 fi
12314 done
12315
12316
12317 if test $ol_link_termcap = no ; then
12318         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12319 echo "configure:12320: checking for tputs in -ltermcap" >&5
12320 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12322   echo $ac_n "(cached) $ac_c" 1>&6
12323 else
12324   ac_save_LIBS="$LIBS"
12325 LIBS="-ltermcap  $LIBS"
12326 cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329 /* Override any gcc2 internal prototype to avoid an error.  */
12330 /* We use char because int might match the return type of a gcc2
12331     builtin and then its argument prototype would still apply.  */
12332 char tputs();
12333
12334 int main() {
12335 tputs()
12336 ; return 0; }
12337 EOF
12338 if { (eval echo configure:12339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12339   rm -rf conftest*
12340   eval "ac_cv_lib_$ac_lib_var=yes"
12341 else
12342   echo "configure: failed program was:" >&5
12343   cat conftest.$ac_ext >&5
12344   rm -rf conftest*
12345   eval "ac_cv_lib_$ac_lib_var=no"
12346 fi
12347 rm -f conftest*
12348 LIBS="$ac_save_LIBS"
12349
12350 fi
12351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12352   echo "$ac_t""yes" 1>&6
12353   have_termcap=yes
12354 else
12355   echo "$ac_t""no" 1>&6
12356 have_termcap=no
12357 fi
12358
12359         if test $have_termcap = yes ; then
12360                 cat >> confdefs.h <<\EOF
12361 #define HAVE_TERMCAP 1
12362 EOF
12363
12364                 ol_link_termcap=yes
12365                 TERMCAP_LIBS=-ltermcap
12366         fi
12367 fi
12368
12369 if test $ol_link_termcap = no ; then
12370         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12371 echo "configure:12372: checking for initscr in -lncurses" >&5
12372 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12374   echo $ac_n "(cached) $ac_c" 1>&6
12375 else
12376   ac_save_LIBS="$LIBS"
12377 LIBS="-lncurses  $LIBS"
12378 cat > conftest.$ac_ext <<EOF
12379 #line 12380 "configure"
12380 #include "confdefs.h"
12381 /* Override any gcc2 internal prototype to avoid an error.  */
12382 /* We use char because int might match the return type of a gcc2
12383     builtin and then its argument prototype would still apply.  */
12384 char initscr();
12385
12386 int main() {
12387 initscr()
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   eval "ac_cv_lib_$ac_lib_var=yes"
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   eval "ac_cv_lib_$ac_lib_var=no"
12398 fi
12399 rm -f conftest*
12400 LIBS="$ac_save_LIBS"
12401
12402 fi
12403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12404   echo "$ac_t""yes" 1>&6
12405   have_ncurses=yes
12406 else
12407   echo "$ac_t""no" 1>&6
12408 have_ncurses=no
12409 fi
12410
12411         if test $have_ncurses = yes ; then
12412                 cat >> confdefs.h <<\EOF
12413 #define HAVE_NCURSES 1
12414 EOF
12415
12416                 ol_link_termcap=yes
12417                 TERMCAP_LIBS=-lncurses
12418         fi
12419 fi
12420
12421 if test $ol_link_termcap = no ; then
12422         cat >> confdefs.h <<\EOF
12423 #define NO_TERMCAP 1
12424 EOF
12425
12426         TERMCAP_LIBS=
12427 fi
12428
12429 ol_link_sasl=no
12430 if test $ol_with_cyrus_sasl != no ; then
12431         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12432 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12433 echo "configure:12434: checking for sasl.h" >&5
12434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12435   echo $ac_n "(cached) $ac_c" 1>&6
12436 else
12437   cat > conftest.$ac_ext <<EOF
12438 #line 12439 "configure"
12439 #include "confdefs.h"
12440 #include <sasl.h>
12441 EOF
12442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12443 { (eval echo configure:12444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12445 if test -z "$ac_err"; then
12446   rm -rf conftest*
12447   eval "ac_cv_header_$ac_safe=yes"
12448 else
12449   echo "$ac_err" >&5
12450   echo "configure: failed program was:" >&5
12451   cat conftest.$ac_ext >&5
12452   rm -rf conftest*
12453   eval "ac_cv_header_$ac_safe=no"
12454 fi
12455 rm -f conftest*
12456 fi
12457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12458   echo "$ac_t""yes" 1>&6
12459   :
12460 else
12461   echo "$ac_t""no" 1>&6
12462 fi
12463
12464
12465         if test $ac_cv_header_sasl_h = yes ; then
12466                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12467 echo "configure:12468: checking for sasl_client_init in -lsasl" >&5
12468 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12469 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12470   echo $ac_n "(cached) $ac_c" 1>&6
12471 else
12472   ac_save_LIBS="$LIBS"
12473 LIBS="-lsasl  $LIBS"
12474 cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 /* Override any gcc2 internal prototype to avoid an error.  */
12478 /* We use char because int might match the return type of a gcc2
12479     builtin and then its argument prototype would still apply.  */
12480 char sasl_client_init();
12481
12482 int main() {
12483 sasl_client_init()
12484 ; return 0; }
12485 EOF
12486 if { (eval echo configure:12487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12487   rm -rf conftest*
12488   eval "ac_cv_lib_$ac_lib_var=yes"
12489 else
12490   echo "configure: failed program was:" >&5
12491   cat conftest.$ac_ext >&5
12492   rm -rf conftest*
12493   eval "ac_cv_lib_$ac_lib_var=no"
12494 fi
12495 rm -f conftest*
12496 LIBS="$ac_save_LIBS"
12497
12498 fi
12499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12500   echo "$ac_t""yes" 1>&6
12501   have_cyrus_sasl=yes
12502 else
12503   echo "$ac_t""no" 1>&6
12504 have_cyrus_sasl=no
12505 fi
12506
12507
12508                 if test $have_cyrus_sasl != no ; then
12509                         SASL_LIBS="-lsasl"
12510                         cat >> confdefs.h <<\EOF
12511 #define HAVE_CYRUS_SASL 1
12512 EOF
12513
12514                         ol_link_sasl=yes
12515                 fi
12516         fi
12517
12518         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12519                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12520         fi
12521 fi
12522
12523 if test $cross_compiling != yes ; then
12524         dev=no
12525         if test -r /dev/urandom ; then
12526                 dev="/dev/urandom";
12527         elif test -r /idev/urandom ; then
12528                 dev="/idev/urandom";
12529         elif test -r /dev/srandom ; then
12530                 dev="/dev/srandom";
12531         elif test -r /dev/random ; then
12532                 dev="/dev/random";
12533         elif test -r /idev/random ; then
12534                 dev="/idev/random";
12535         fi
12536
12537         if test $dev != no ; then
12538                 cat >> confdefs.h <<EOF
12539 #define URANDOM_DEVICE "$dev"
12540 EOF
12541
12542         fi
12543 fi
12544
12545 ol_link_fetch=no
12546 if test $ol_with_fetch != no ; then
12547         ol=$LIBS
12548 LIBS="-lfetch -lcom_err $LIBS"
12549 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12550 echo "configure:12551: checking fetch(3) library" >&5
12551 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   
12555         cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558
12559 #include <sys/param.h>
12560 #include <stdio.h>
12561 #include <fetch.h>
12562 int main() {
12563 struct url *u = fetchParseURL("file:///"); 
12564 ; return 0; }
12565 EOF
12566 if { (eval echo configure:12567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12567   rm -rf conftest*
12568   ol_cv_lib_fetch=yes
12569 else
12570   echo "configure: failed program was:" >&5
12571   cat conftest.$ac_ext >&5
12572   rm -rf conftest*
12573   ol_cv_lib_fetch=no
12574 fi
12575 rm -f conftest*
12576 fi
12577
12578 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12579 LIBS=$ol_LIBS
12580 if test $ol_cv_lib_fetch != no ; then
12581         ol_link_fetch="-lfetch -lcom_err"
12582         cat >> confdefs.h <<\EOF
12583 #define HAVE_FETCH 1
12584 EOF
12585
12586 fi
12587
12588
12589         if test $ol_cv_lib_fetch != no ; then
12590                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12591                 ol_link_fetch=freebsd
12592
12593         elif test $ol_with_fetch != auto ; then
12594                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12595         fi 
12596 fi
12597
12598 ol_link_readline=no
12599 if test $ol_with_readline != no ; then
12600         for ac_hdr in readline/readline.h readline/history.h
12601 do
12602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12604 echo "configure:12605: checking for $ac_hdr" >&5
12605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12606   echo $ac_n "(cached) $ac_c" 1>&6
12607 else
12608   cat > conftest.$ac_ext <<EOF
12609 #line 12610 "configure"
12610 #include "confdefs.h"
12611 #include <$ac_hdr>
12612 EOF
12613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12614 { (eval echo configure:12615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12616 if test -z "$ac_err"; then
12617   rm -rf conftest*
12618   eval "ac_cv_header_$ac_safe=yes"
12619 else
12620   echo "$ac_err" >&5
12621   echo "configure: failed program was:" >&5
12622   cat conftest.$ac_ext >&5
12623   rm -rf conftest*
12624   eval "ac_cv_header_$ac_safe=no"
12625 fi
12626 rm -f conftest*
12627 fi
12628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12629   echo "$ac_t""yes" 1>&6
12630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12631   cat >> confdefs.h <<EOF
12632 #define $ac_tr_hdr 1
12633 EOF
12634  
12635 else
12636   echo "$ac_t""no" 1>&6
12637 fi
12638 done
12639
12640
12641         if test $ac_cv_header_readline_readline_h = yes ; then
12642                 save_LIBS="$LIBS"
12643                 LIBS="$TERMCAP_LIBS $LIBS"
12644                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12645 echo "configure:12646: checking for readline in -lreadline" >&5
12646 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   ac_save_LIBS="$LIBS"
12651 LIBS="-lreadline  $LIBS"
12652 cat > conftest.$ac_ext <<EOF
12653 #line 12654 "configure"
12654 #include "confdefs.h"
12655 /* Override any gcc2 internal prototype to avoid an error.  */
12656 /* We use char because int might match the return type of a gcc2
12657     builtin and then its argument prototype would still apply.  */
12658 char readline();
12659
12660 int main() {
12661 readline()
12662 ; return 0; }
12663 EOF
12664 if { (eval echo configure:12665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12665   rm -rf conftest*
12666   eval "ac_cv_lib_$ac_lib_var=yes"
12667 else
12668   echo "configure: failed program was:" >&5
12669   cat conftest.$ac_ext >&5
12670   rm -rf conftest*
12671   eval "ac_cv_lib_$ac_lib_var=no"
12672 fi
12673 rm -f conftest*
12674 LIBS="$ac_save_LIBS"
12675
12676 fi
12677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12678   echo "$ac_t""yes" 1>&6
12679   have_readline=yes
12680 else
12681   echo "$ac_t""no" 1>&6
12682 have_readline=no
12683 fi
12684
12685                 LIBS="$save_LIBS"
12686                         
12687                 if test $have_readline = yes ; then
12688                         ol_with_readline=found
12689                         ol_link_readline=yes
12690
12691                         READLINE_LIBS="-lreadline"
12692                 fi
12693         fi
12694 fi
12695
12696 if test $ol_link_readline = yes ; then
12697         cat >> confdefs.h <<\EOF
12698 #define HAVE_READLINE 1
12699 EOF
12700
12701 fi
12702
12703
12704 if test $ol_enable_crypt != no ; then
12705         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12706 echo "configure:12707: checking for crypt" >&5
12707 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12708   echo $ac_n "(cached) $ac_c" 1>&6
12709 else
12710   cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713 /* System header to define __stub macros and hopefully few prototypes,
12714     which can conflict with char crypt(); below.  */
12715 #include <assert.h>
12716 /* Override any gcc2 internal prototype to avoid an error.  */
12717 /* We use char because int might match the return type of a gcc2
12718     builtin and then its argument prototype would still apply.  */
12719 char crypt();
12720 char (*f)();
12721
12722 int main() {
12723
12724 /* The GNU C library defines this for functions which it implements
12725     to always fail with ENOSYS.  Some functions are actually named
12726     something starting with __ and the normal name is an alias.  */
12727 #if defined (__stub_crypt) || defined (__stub___crypt)
12728 choke me
12729 #else
12730 f = crypt;
12731 #endif
12732
12733 ; return 0; }
12734 EOF
12735 if { (eval echo configure:12736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12736   rm -rf conftest*
12737   eval "ac_cv_func_crypt=yes"
12738 else
12739   echo "configure: failed program was:" >&5
12740   cat conftest.$ac_ext >&5
12741   rm -rf conftest*
12742   eval "ac_cv_func_crypt=no"
12743 fi
12744 rm -f conftest*
12745 fi
12746
12747 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12748   echo "$ac_t""yes" 1>&6
12749   have_crypt=yes
12750 else
12751   echo "$ac_t""no" 1>&6
12752
12753                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12754 echo "configure:12755: checking for crypt in -lcrypt" >&5
12755 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12757   echo $ac_n "(cached) $ac_c" 1>&6
12758 else
12759   ac_save_LIBS="$LIBS"
12760 LIBS="-lcrypt  $LIBS"
12761 cat > conftest.$ac_ext <<EOF
12762 #line 12763 "configure"
12763 #include "confdefs.h"
12764 /* Override any gcc2 internal prototype to avoid an error.  */
12765 /* We use char because int might match the return type of a gcc2
12766     builtin and then its argument prototype would still apply.  */
12767 char crypt();
12768
12769 int main() {
12770 crypt()
12771 ; return 0; }
12772 EOF
12773 if { (eval echo configure:12774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12774   rm -rf conftest*
12775   eval "ac_cv_lib_$ac_lib_var=yes"
12776 else
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -rf conftest*
12780   eval "ac_cv_lib_$ac_lib_var=no"
12781 fi
12782 rm -f conftest*
12783 LIBS="$ac_save_LIBS"
12784
12785 fi
12786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12787   echo "$ac_t""yes" 1>&6
12788   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12789                         have_crypt=yes
12790 else
12791   echo "$ac_t""no" 1>&6
12792 have_crypt=no
12793 fi
12794
12795 fi
12796
12797
12798         if test $have_crypt = yes ; then
12799                 cat >> confdefs.h <<\EOF
12800 #define HAVE_CRYPT 1
12801 EOF
12802
12803         else
12804                 echo "configure: warning: could not find crypt" 1>&2
12805                 if test $ol_enable_crypt = yes ; then
12806                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12807                 fi
12808
12809                 echo "configure: warning: disabling crypt support" 1>&2
12810                 ol_enable_crypt=no
12811         fi
12812 fi
12813
12814 if test $ol_enable_proctitle != no ; then
12815         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12816 echo "configure:12817: checking for setproctitle" >&5
12817 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12818   echo $ac_n "(cached) $ac_c" 1>&6
12819 else
12820   cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 /* System header to define __stub macros and hopefully few prototypes,
12824     which can conflict with char setproctitle(); below.  */
12825 #include <assert.h>
12826 /* Override any gcc2 internal prototype to avoid an error.  */
12827 /* We use char because int might match the return type of a gcc2
12828     builtin and then its argument prototype would still apply.  */
12829 char setproctitle();
12830 char (*f)();
12831
12832 int main() {
12833
12834 /* The GNU C library defines this for functions which it implements
12835     to always fail with ENOSYS.  Some functions are actually named
12836     something starting with __ and the normal name is an alias.  */
12837 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12838 choke me
12839 #else
12840 f = setproctitle;
12841 #endif
12842
12843 ; return 0; }
12844 EOF
12845 if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12846   rm -rf conftest*
12847   eval "ac_cv_func_setproctitle=yes"
12848 else
12849   echo "configure: failed program was:" >&5
12850   cat conftest.$ac_ext >&5
12851   rm -rf conftest*
12852   eval "ac_cv_func_setproctitle=no"
12853 fi
12854 rm -f conftest*
12855 fi
12856
12857 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12858   echo "$ac_t""yes" 1>&6
12859   have_setproctitle=yes
12860 else
12861   echo "$ac_t""no" 1>&6
12862
12863                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12864 echo "configure:12865: checking for setproctitle in -lutil" >&5
12865 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12867   echo $ac_n "(cached) $ac_c" 1>&6
12868 else
12869   ac_save_LIBS="$LIBS"
12870 LIBS="-lutil  $LIBS"
12871 cat > conftest.$ac_ext <<EOF
12872 #line 12873 "configure"
12873 #include "confdefs.h"
12874 /* Override any gcc2 internal prototype to avoid an error.  */
12875 /* We use char because int might match the return type of a gcc2
12876     builtin and then its argument prototype would still apply.  */
12877 char setproctitle();
12878
12879 int main() {
12880 setproctitle()
12881 ; return 0; }
12882 EOF
12883 if { (eval echo configure:12884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12884   rm -rf conftest*
12885   eval "ac_cv_lib_$ac_lib_var=yes"
12886 else
12887   echo "configure: failed program was:" >&5
12888   cat conftest.$ac_ext >&5
12889   rm -rf conftest*
12890   eval "ac_cv_lib_$ac_lib_var=no"
12891 fi
12892 rm -f conftest*
12893 LIBS="$ac_save_LIBS"
12894
12895 fi
12896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12897   echo "$ac_t""yes" 1>&6
12898   have_setproctitle=yes
12899                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12900 else
12901   echo "$ac_t""no" 1>&6
12902 have_setproctitle=no
12903                         LIBOBJS="$LIBOBJS setproctitle.o"
12904                         LIBSRCS="$LIBSRCS setproctitle.c"
12905 fi
12906
12907 fi
12908
12909
12910         if test $have_setproctitle = yes ; then
12911                 cat >> confdefs.h <<\EOF
12912 #define HAVE_SETPROCTITLE 1
12913 EOF
12914
12915         fi
12916 fi
12917
12918 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12919 echo "configure:12920: checking for ANSI C header files" >&5
12920 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12921   echo $ac_n "(cached) $ac_c" 1>&6
12922 else
12923   cat > conftest.$ac_ext <<EOF
12924 #line 12925 "configure"
12925 #include "confdefs.h"
12926 #include <stdlib.h>
12927 #include <stdarg.h>
12928 #include <string.h>
12929 #include <float.h>
12930 EOF
12931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12932 { (eval echo configure:12933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12934 if test -z "$ac_err"; then
12935   rm -rf conftest*
12936   ac_cv_header_stdc=yes
12937 else
12938   echo "$ac_err" >&5
12939   echo "configure: failed program was:" >&5
12940   cat conftest.$ac_ext >&5
12941   rm -rf conftest*
12942   ac_cv_header_stdc=no
12943 fi
12944 rm -f conftest*
12945
12946 if test $ac_cv_header_stdc = yes; then
12947   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12948 cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 #include <string.h>
12952 EOF
12953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12954   egrep "memchr" >/dev/null 2>&1; then
12955   :
12956 else
12957   rm -rf conftest*
12958   ac_cv_header_stdc=no
12959 fi
12960 rm -f conftest*
12961
12962 fi
12963
12964 if test $ac_cv_header_stdc = yes; then
12965   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12966 cat > conftest.$ac_ext <<EOF
12967 #line 12968 "configure"
12968 #include "confdefs.h"
12969 #include <stdlib.h>
12970 EOF
12971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12972   egrep "free" >/dev/null 2>&1; then
12973   :
12974 else
12975   rm -rf conftest*
12976   ac_cv_header_stdc=no
12977 fi
12978 rm -f conftest*
12979
12980 fi
12981
12982 if test $ac_cv_header_stdc = yes; then
12983   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12984 if test "$cross_compiling" = yes; then
12985   :
12986 else
12987   cat > conftest.$ac_ext <<EOF
12988 #line 12989 "configure"
12989 #include "confdefs.h"
12990 #include <ctype.h>
12991 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12992 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12993 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12994 int main () { int i; for (i = 0; i < 256; i++)
12995 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12996 exit (0); }
12997
12998 EOF
12999 if { (eval echo configure:13000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13000 then
13001   :
13002 else
13003   echo "configure: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005   rm -fr conftest*
13006   ac_cv_header_stdc=no
13007 fi
13008 rm -fr conftest*
13009 fi
13010
13011 fi
13012 fi
13013
13014 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13015 if test $ac_cv_header_stdc = yes; then
13016   cat >> confdefs.h <<\EOF
13017 #define STDC_HEADERS 1
13018 EOF
13019
13020 fi
13021
13022 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13023 echo "configure:13024: checking for mode_t" >&5
13024 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13025   echo $ac_n "(cached) $ac_c" 1>&6
13026 else
13027   cat > conftest.$ac_ext <<EOF
13028 #line 13029 "configure"
13029 #include "confdefs.h"
13030 #include <sys/types.h>
13031 #if STDC_HEADERS
13032 #include <stdlib.h>
13033 #include <stddef.h>
13034 #endif
13035 EOF
13036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13037   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13038   rm -rf conftest*
13039   eval "ac_cv_type_mode_t=yes"
13040 else
13041   rm -rf conftest*
13042   eval "ac_cv_type_mode_t=no"
13043 fi
13044 rm -f conftest*
13045
13046 fi
13047 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13048   echo "$ac_t""yes" 1>&6
13049 else
13050   echo "$ac_t""no" 1>&6
13051   cat >> confdefs.h <<EOF
13052 #define mode_t int
13053 EOF
13054
13055 fi
13056
13057 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13058 echo "configure:13059: checking for off_t" >&5
13059 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13060   echo $ac_n "(cached) $ac_c" 1>&6
13061 else
13062   cat > conftest.$ac_ext <<EOF
13063 #line 13064 "configure"
13064 #include "confdefs.h"
13065 #include <sys/types.h>
13066 #if STDC_HEADERS
13067 #include <stdlib.h>
13068 #include <stddef.h>
13069 #endif
13070 EOF
13071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13072   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13073   rm -rf conftest*
13074   eval "ac_cv_type_off_t=yes"
13075 else
13076   rm -rf conftest*
13077   eval "ac_cv_type_off_t=no"
13078 fi
13079 rm -f conftest*
13080
13081 fi
13082 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13083   echo "$ac_t""yes" 1>&6
13084 else
13085   echo "$ac_t""no" 1>&6
13086   cat >> confdefs.h <<EOF
13087 #define off_t long
13088 EOF
13089
13090 fi
13091
13092 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13093 echo "configure:13094: checking for pid_t" >&5
13094 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13095   echo $ac_n "(cached) $ac_c" 1>&6
13096 else
13097   cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 #include <sys/types.h>
13101 #if STDC_HEADERS
13102 #include <stdlib.h>
13103 #include <stddef.h>
13104 #endif
13105 EOF
13106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13107   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13108   rm -rf conftest*
13109   eval "ac_cv_type_pid_t=yes"
13110 else
13111   rm -rf conftest*
13112   eval "ac_cv_type_pid_t=no"
13113 fi
13114 rm -f conftest*
13115
13116 fi
13117 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13118   echo "$ac_t""yes" 1>&6
13119 else
13120   echo "$ac_t""no" 1>&6
13121   cat >> confdefs.h <<EOF
13122 #define pid_t int
13123 EOF
13124
13125 fi
13126
13127 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13128 echo "configure:13129: checking for ptrdiff_t" >&5
13129 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13130   echo $ac_n "(cached) $ac_c" 1>&6
13131 else
13132   cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135 #include <stddef.h>
13136 int main() {
13137 ptrdiff_t p
13138 ; return 0; }
13139 EOF
13140 if { (eval echo configure:13141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13141   rm -rf conftest*
13142   am_cv_type_ptrdiff_t=yes
13143 else
13144   echo "configure: failed program was:" >&5
13145   cat conftest.$ac_ext >&5
13146   rm -rf conftest*
13147   am_cv_type_ptrdiff_t=no
13148 fi
13149 rm -f conftest*
13150 fi
13151
13152 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13153    if test $am_cv_type_ptrdiff_t = yes; then
13154      cat >> confdefs.h <<\EOF
13155 #define HAVE_PTRDIFF_T 1
13156 EOF
13157
13158    fi
13159
13160 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13161 echo "configure:13162: checking return type of signal handlers" >&5
13162 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13163   echo $ac_n "(cached) $ac_c" 1>&6
13164 else
13165   cat > conftest.$ac_ext <<EOF
13166 #line 13167 "configure"
13167 #include "confdefs.h"
13168 #include <sys/types.h>
13169 #include <signal.h>
13170 #ifdef signal
13171 #undef signal
13172 #endif
13173 #ifdef __cplusplus
13174 extern "C" void (*signal (int, void (*)(int)))(int);
13175 #else
13176 void (*signal ()) ();
13177 #endif
13178
13179 int main() {
13180 int i;
13181 ; return 0; }
13182 EOF
13183 if { (eval echo configure:13184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13184   rm -rf conftest*
13185   ac_cv_type_signal=void
13186 else
13187   echo "configure: failed program was:" >&5
13188   cat conftest.$ac_ext >&5
13189   rm -rf conftest*
13190   ac_cv_type_signal=int
13191 fi
13192 rm -f conftest*
13193 fi
13194
13195 echo "$ac_t""$ac_cv_type_signal" 1>&6
13196 cat >> confdefs.h <<EOF
13197 #define RETSIGTYPE $ac_cv_type_signal
13198 EOF
13199
13200
13201 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13202 echo "configure:13203: checking for size_t" >&5
13203 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13204   echo $ac_n "(cached) $ac_c" 1>&6
13205 else
13206   cat > conftest.$ac_ext <<EOF
13207 #line 13208 "configure"
13208 #include "confdefs.h"
13209 #include <sys/types.h>
13210 #if STDC_HEADERS
13211 #include <stdlib.h>
13212 #include <stddef.h>
13213 #endif
13214 EOF
13215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13216   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13217   rm -rf conftest*
13218   eval "ac_cv_type_size_t=yes"
13219 else
13220   rm -rf conftest*
13221   eval "ac_cv_type_size_t=no"
13222 fi
13223 rm -f conftest*
13224
13225 fi
13226 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13227   echo "$ac_t""yes" 1>&6
13228 else
13229   echo "$ac_t""no" 1>&6
13230   cat >> confdefs.h <<EOF
13231 #define size_t unsigned
13232 EOF
13233
13234 fi
13235
13236 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13237 echo "configure:13238: checking for socklen_t" >&5
13238 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13239   echo $ac_n "(cached) $ac_c" 1>&6
13240 else
13241   cat > conftest.$ac_ext <<EOF
13242 #line 13243 "configure"
13243 #include "confdefs.h"
13244
13245 #ifdef HAVE_SYS_TYPES_H
13246 #include <sys/types.h>
13247 #endif
13248 #ifdef HAVE_SYS_SOCKET_H
13249 #include <sys/socket.h>
13250 #endif
13251
13252 int main() {
13253 socklen_t len;
13254 ; return 0; }
13255 EOF
13256 if { (eval echo configure:13257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13257   rm -rf conftest*
13258   ol_cv_type_socklen_t=yes
13259 else
13260   echo "configure: failed program was:" >&5
13261   cat conftest.$ac_ext >&5
13262   rm -rf conftest*
13263   ol_cv_type_socklen_t=no
13264 fi
13265 rm -f conftest*
13266 fi
13267
13268 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13269   if test $ol_cv_type_socklen_t = no; then
13270     cat >> confdefs.h <<\EOF
13271 #define socklen_t int
13272 EOF
13273
13274   fi
13275  
13276 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13277 echo "configure:13278: checking for member st_blksize in aggregate type struct stat" >&5
13278 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13279   echo $ac_n "(cached) $ac_c" 1>&6
13280 else
13281   cat > conftest.$ac_ext <<EOF
13282 #line 13283 "configure"
13283 #include "confdefs.h"
13284 #include <sys/types.h>
13285 #include <sys/stat.h>
13286 int main() {
13287 struct stat foo; foo.st_blksize;
13288 ; return 0; }
13289 EOF
13290 if { (eval echo configure:13291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13291   rm -rf conftest*
13292   ac_cv_c_struct_member_st_blksize=yes
13293 else
13294   echo "configure: failed program was:" >&5
13295   cat conftest.$ac_ext >&5
13296   rm -rf conftest*
13297   ac_cv_c_struct_member_st_blksize=no
13298 fi
13299 rm -f conftest*
13300 fi
13301
13302 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13303 st_blksize="$ac_cv_c_struct_member_st_blksize"
13304 if test $ac_cv_c_struct_member_st_blksize = yes; then
13305   cat >> confdefs.h <<\EOF
13306 #define HAVE_ST_BLKSIZE 1
13307 EOF
13308
13309 fi
13310
13311 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13312 echo "configure:13313: checking whether time.h and sys/time.h may both be included" >&5
13313 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13314   echo $ac_n "(cached) $ac_c" 1>&6
13315 else
13316   cat > conftest.$ac_ext <<EOF
13317 #line 13318 "configure"
13318 #include "confdefs.h"
13319 #include <sys/types.h>
13320 #include <sys/time.h>
13321 #include <time.h>
13322 int main() {
13323 struct tm *tp;
13324 ; return 0; }
13325 EOF
13326 if { (eval echo configure:13327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13327   rm -rf conftest*
13328   ac_cv_header_time=yes
13329 else
13330   echo "configure: failed program was:" >&5
13331   cat conftest.$ac_ext >&5
13332   rm -rf conftest*
13333   ac_cv_header_time=no
13334 fi
13335 rm -f conftest*
13336 fi
13337
13338 echo "$ac_t""$ac_cv_header_time" 1>&6
13339 if test $ac_cv_header_time = yes; then
13340   cat >> confdefs.h <<\EOF
13341 #define TIME_WITH_SYS_TIME 1
13342 EOF
13343
13344 fi
13345
13346 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13347 echo "configure:13348: checking whether struct tm is in sys/time.h or time.h" >&5
13348 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13349   echo $ac_n "(cached) $ac_c" 1>&6
13350 else
13351   cat > conftest.$ac_ext <<EOF
13352 #line 13353 "configure"
13353 #include "confdefs.h"
13354 #include <sys/types.h>
13355 #include <time.h>
13356 int main() {
13357 struct tm *tp; tp->tm_sec;
13358 ; return 0; }
13359 EOF
13360 if { (eval echo configure:13361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13361   rm -rf conftest*
13362   ac_cv_struct_tm=time.h
13363 else
13364   echo "configure: failed program was:" >&5
13365   cat conftest.$ac_ext >&5
13366   rm -rf conftest*
13367   ac_cv_struct_tm=sys/time.h
13368 fi
13369 rm -f conftest*
13370 fi
13371
13372 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13373 if test $ac_cv_struct_tm = sys/time.h; then
13374   cat >> confdefs.h <<\EOF
13375 #define TM_IN_SYS_TIME 1
13376 EOF
13377
13378 fi
13379
13380 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13381 echo "configure:13382: checking for uid_t in sys/types.h" >&5
13382 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13383   echo $ac_n "(cached) $ac_c" 1>&6
13384 else
13385   cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388 #include <sys/types.h>
13389 EOF
13390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13391   egrep "uid_t" >/dev/null 2>&1; then
13392   rm -rf conftest*
13393   ac_cv_type_uid_t=yes
13394 else
13395   rm -rf conftest*
13396   ac_cv_type_uid_t=no
13397 fi
13398 rm -f conftest*
13399
13400 fi
13401
13402 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13403 if test $ac_cv_type_uid_t = no; then
13404   cat >> confdefs.h <<\EOF
13405 #define uid_t int
13406 EOF
13407
13408   cat >> confdefs.h <<\EOF
13409 #define gid_t int
13410 EOF
13411
13412 fi
13413
13414 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13415 echo "configure:13416: checking for sig_atomic_t" >&5
13416 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13417   echo $ac_n "(cached) $ac_c" 1>&6
13418 else
13419   cat > conftest.$ac_ext <<EOF
13420 #line 13421 "configure"
13421 #include "confdefs.h"
13422 #include <signal.h>
13423 int main() {
13424 sig_atomic_t atomic;
13425 ; return 0; }
13426 EOF
13427 if { (eval echo configure:13428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13428   rm -rf conftest*
13429   ol_cv_type_sig_atomic_t=yes
13430 else
13431   echo "configure: failed program was:" >&5
13432   cat conftest.$ac_ext >&5
13433   rm -rf conftest*
13434   ol_cv_type_sig_atomic_t=no
13435 fi
13436 rm -f conftest*
13437 fi
13438
13439 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13440   if test $ol_cv_type_sig_atomic_t = no; then
13441     cat >> confdefs.h <<\EOF
13442 #define sig_atomic_t int
13443 EOF
13444
13445   fi
13446  
13447
13448 if test "$ac_cv_mingw32" != yes ; then
13449     echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
13450 echo "configure:13451: checking type of array argument to getgroups" >&5
13451 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
13452   echo $ac_n "(cached) $ac_c" 1>&6
13453 else
13454   if test "$cross_compiling" = yes; then
13455   ac_cv_type_getgroups=cross
13456 else
13457   cat > conftest.$ac_ext <<EOF
13458 #line 13459 "configure"
13459 #include "confdefs.h"
13460
13461 /* Thanks to Mike Rendell for this test.  */
13462 #include <sys/types.h>
13463 #define NGID 256
13464 #undef MAX
13465 #define MAX(x, y) ((x) > (y) ? (x) : (y))
13466 main()
13467 {
13468   gid_t gidset[NGID];
13469   int i, n;
13470   union { gid_t gval; long lval; }  val;
13471
13472   val.lval = -1;
13473   for (i = 0; i < NGID; i++)
13474     gidset[i] = val.gval;
13475   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
13476                  gidset);
13477   /* Exit non-zero if getgroups seems to require an array of ints.  This
13478      happens when gid_t is short but getgroups modifies an array of ints.  */
13479   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
13480 }
13481
13482 EOF
13483 if { (eval echo configure:13484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13484 then
13485     ac_cv_type_getgroups=gid_t
13486 else
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -fr conftest*
13490   ac_cv_type_getgroups=int
13491 fi
13492 rm -fr conftest*
13493 fi
13494
13495 if test $ac_cv_type_getgroups = cross; then
13496         cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 #include <unistd.h>
13500 EOF
13501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13502   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
13503   rm -rf conftest*
13504   ac_cv_type_getgroups=gid_t
13505 else
13506   rm -rf conftest*
13507   ac_cv_type_getgroups=int
13508 fi
13509 rm -f conftest*
13510
13511 fi
13512 fi
13513
13514 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
13515 cat >> confdefs.h <<EOF
13516 #define GETGROUPS_T $ac_cv_type_getgroups
13517 EOF
13518
13519
13520     # test for pw_gecos in struct passwd
13521 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13522 echo "configure:13523: checking struct passwd for pw_gecos" >&5
13523 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13524   echo $ac_n "(cached) $ac_c" 1>&6
13525 else
13526   
13527         cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530 #include <pwd.h>
13531 int main() {
13532
13533         struct passwd pwd;
13534         pwd.pw_gecos = pwd.pw_name;
13535
13536 ; return 0; }
13537 EOF
13538 if { (eval echo configure:13539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13539   rm -rf conftest*
13540   ol_cv_struct_passwd_pw_gecos=yes
13541 else
13542   echo "configure: failed program was:" >&5
13543   cat conftest.$ac_ext >&5
13544   rm -rf conftest*
13545   ol_cv_struct_passwd_pw_gecos=no
13546 fi
13547 rm -f conftest*
13548 fi
13549
13550 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13551 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13552         cat >> confdefs.h <<\EOF
13553 #define HAVE_PW_GECOS 1
13554 EOF
13555
13556 fi
13557
13558     # test for pw_passwd in struct passwd
13559 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13560 echo "configure:13561: checking struct passwd for pw_passwd" >&5
13561 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13562   echo $ac_n "(cached) $ac_c" 1>&6
13563 else
13564   
13565         cat > conftest.$ac_ext <<EOF
13566 #line 13567 "configure"
13567 #include "confdefs.h"
13568 #include <pwd.h>
13569 int main() {
13570
13571         struct passwd pwd;
13572         pwd.pw_passwd = pwd.pw_name;
13573
13574 ; return 0; }
13575 EOF
13576 if { (eval echo configure:13577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13577   rm -rf conftest*
13578   ol_cv_struct_passwd_pw_passwd=yes
13579 else
13580   echo "configure: failed program was:" >&5
13581   cat conftest.$ac_ext >&5
13582   rm -rf conftest*
13583   ol_cv_struct_passwd_pw_passwd=no
13584 fi
13585 rm -f conftest*
13586 fi
13587
13588 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13589 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13590         cat >> confdefs.h <<\EOF
13591 #define HAVE_PW_PASSWD 1
13592 EOF
13593
13594 fi
13595
13596 fi
13597
13598 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13599 echo "configure:13600: checking if toupper() requires islower()" >&5
13600 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13601   echo $ac_n "(cached) $ac_c" 1>&6
13602 else
13603   
13604         if test "$cross_compiling" = yes; then
13605   ol_cv_c_upper_lower=safe
13606 else
13607   cat > conftest.$ac_ext <<EOF
13608 #line 13609 "configure"
13609 #include "confdefs.h"
13610
13611 #include <ctype.h>
13612 main()
13613 {
13614         if ('C' == toupper('C'))
13615                 exit(0);
13616         else
13617                 exit(1);
13618 }
13619 EOF
13620 if { (eval echo configure:13621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13621 then
13622   ol_cv_c_upper_lower=no
13623 else
13624   echo "configure: failed program was:" >&5
13625   cat conftest.$ac_ext >&5
13626   rm -fr conftest*
13627   ol_cv_c_upper_lower=yes
13628 fi
13629 rm -fr conftest*
13630 fi
13631
13632 fi
13633
13634 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13635 if test $ol_cv_c_upper_lower != no ; then
13636         cat >> confdefs.h <<\EOF
13637 #define C_UPPER_LOWER 1
13638 EOF
13639
13640 fi
13641
13642 echo $ac_n "checking for working const""... $ac_c" 1>&6
13643 echo "configure:13644: checking for working const" >&5
13644 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13645   echo $ac_n "(cached) $ac_c" 1>&6
13646 else
13647   cat > conftest.$ac_ext <<EOF
13648 #line 13649 "configure"
13649 #include "confdefs.h"
13650
13651 int main() {
13652
13653 /* Ultrix mips cc rejects this.  */
13654 typedef int charset[2]; const charset x;
13655 /* SunOS 4.1.1 cc rejects this.  */
13656 char const *const *ccp;
13657 char **p;
13658 /* NEC SVR4.0.2 mips cc rejects this.  */
13659 struct point {int x, y;};
13660 static struct point const zero = {0,0};
13661 /* AIX XL C 1.02.0.0 rejects this.
13662    It does not let you subtract one const X* pointer from another in an arm
13663    of an if-expression whose if-part is not a constant expression */
13664 const char *g = "string";
13665 ccp = &g + (g ? g-g : 0);
13666 /* HPUX 7.0 cc rejects these. */
13667 ++ccp;
13668 p = (char**) ccp;
13669 ccp = (char const *const *) p;
13670 { /* SCO 3.2v4 cc rejects this.  */
13671   char *t;
13672   char const *s = 0 ? (char *) 0 : (char const *) 0;
13673
13674   *t++ = 0;
13675 }
13676 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13677   int x[] = {25, 17};
13678   const int *foo = &x[0];
13679   ++foo;
13680 }
13681 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13682   typedef const int *iptr;
13683   iptr p = 0;
13684   ++p;
13685 }
13686 { /* AIX XL C 1.02.0.0 rejects this saying
13687      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13688   struct s { int j; const int *ap[3]; };
13689   struct s *b; b->j = 5;
13690 }
13691 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13692   const int foo = 10;
13693 }
13694
13695 ; return 0; }
13696 EOF
13697 if { (eval echo configure:13698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13698   rm -rf conftest*
13699   ac_cv_c_const=yes
13700 else
13701   echo "configure: failed program was:" >&5
13702   cat conftest.$ac_ext >&5
13703   rm -rf conftest*
13704   ac_cv_c_const=no
13705 fi
13706 rm -f conftest*
13707 fi
13708
13709 echo "$ac_t""$ac_cv_c_const" 1>&6
13710 if test $ac_cv_c_const = no; then
13711   cat >> confdefs.h <<\EOF
13712 #define const 
13713 EOF
13714
13715 fi
13716
13717 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13718 echo "configure:13719: checking if compiler understands volatile" >&5
13719 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13720   echo $ac_n "(cached) $ac_c" 1>&6
13721 else
13722   cat > conftest.$ac_ext <<EOF
13723 #line 13724 "configure"
13724 #include "confdefs.h"
13725 int x, y, z;
13726 int main() {
13727 volatile int a; int * volatile b = x ? &y : &z;
13728       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13729       *b = 0;
13730 ; return 0; }
13731 EOF
13732 if { (eval echo configure:13733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13733   rm -rf conftest*
13734   ol_cv_c_volatile=yes
13735 else
13736   echo "configure: failed program was:" >&5
13737   cat conftest.$ac_ext >&5
13738   rm -rf conftest*
13739   ol_cv_c_volatile=no
13740 fi
13741 rm -f conftest*
13742 fi
13743
13744 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13745   if test $ol_cv_c_volatile = yes; then
13746     : 
13747   else
13748     cat >> confdefs.h <<\EOF
13749 #define volatile 
13750 EOF
13751
13752   fi
13753  
13754
13755 if test $cross_compiling = yes ; then
13756         cat >> confdefs.h <<\EOF
13757 #define CROSS_COMPILING 1
13758 EOF
13759
13760
13761         cat >> confdefs.h <<\EOF
13762 #define LBER_INT_T long
13763 EOF
13764
13765         cat >> confdefs.h <<\EOF
13766 #define LBER_TAG_T long
13767 EOF
13768
13769         cat >> confdefs.h <<\EOF
13770 #define LBER_SOCKET_T int
13771 EOF
13772
13773
13774 else
13775         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13776 echo "configure:13777: checking whether byte ordering is bigendian" >&5
13777 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13778   echo $ac_n "(cached) $ac_c" 1>&6
13779 else
13780   ac_cv_c_bigendian=unknown
13781 # See if sys/param.h defines the BYTE_ORDER macro.
13782 cat > conftest.$ac_ext <<EOF
13783 #line 13784 "configure"
13784 #include "confdefs.h"
13785 #include <sys/types.h>
13786 #include <sys/param.h>
13787 int main() {
13788
13789 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13790  bogus endian macros
13791 #endif
13792 ; return 0; }
13793 EOF
13794 if { (eval echo configure:13795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13795   rm -rf conftest*
13796   # It does; now see whether it defined to BIG_ENDIAN or not.
13797 cat > conftest.$ac_ext <<EOF
13798 #line 13799 "configure"
13799 #include "confdefs.h"
13800 #include <sys/types.h>
13801 #include <sys/param.h>
13802 int main() {
13803
13804 #if BYTE_ORDER != BIG_ENDIAN
13805  not big endian
13806 #endif
13807 ; return 0; }
13808 EOF
13809 if { (eval echo configure:13810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13810   rm -rf conftest*
13811   ac_cv_c_bigendian=yes
13812 else
13813   echo "configure: failed program was:" >&5
13814   cat conftest.$ac_ext >&5
13815   rm -rf conftest*
13816   ac_cv_c_bigendian=no
13817 fi
13818 rm -f conftest*
13819 else
13820   echo "configure: failed program was:" >&5
13821   cat conftest.$ac_ext >&5
13822 fi
13823 rm -f conftest*
13824 if test $ac_cv_c_bigendian = unknown; then
13825 if test "$cross_compiling" = yes; then
13826     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13827 else
13828   cat > conftest.$ac_ext <<EOF
13829 #line 13830 "configure"
13830 #include "confdefs.h"
13831 main () {
13832   /* Are we little or big endian?  From Harbison&Steele.  */
13833   union
13834   {
13835     long l;
13836     char c[sizeof (long)];
13837   } u;
13838   u.l = 1;
13839   exit (u.c[sizeof (long) - 1] == 1);
13840 }
13841 EOF
13842 if { (eval echo configure:13843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13843 then
13844   ac_cv_c_bigendian=no
13845 else
13846   echo "configure: failed program was:" >&5
13847   cat conftest.$ac_ext >&5
13848   rm -fr conftest*
13849   ac_cv_c_bigendian=yes
13850 fi
13851 rm -fr conftest*
13852 fi
13853
13854 fi
13855 fi
13856
13857 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13858 if test $ac_cv_c_bigendian = yes; then
13859   cat >> confdefs.h <<\EOF
13860 #define WORDS_BIGENDIAN 1
13861 EOF
13862
13863 fi
13864
13865         echo $ac_n "checking size of short""... $ac_c" 1>&6
13866 echo "configure:13867: checking size of short" >&5
13867 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13868   echo $ac_n "(cached) $ac_c" 1>&6
13869 else
13870   if test "$cross_compiling" = yes; then
13871     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13872 else
13873   cat > conftest.$ac_ext <<EOF
13874 #line 13875 "configure"
13875 #include "confdefs.h"
13876 #include <stdio.h>
13877 main()
13878 {
13879   FILE *f=fopen("conftestval", "w");
13880   if (!f) exit(1);
13881   fprintf(f, "%d\n", sizeof(short));
13882   exit(0);
13883 }
13884 EOF
13885 if { (eval echo configure:13886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13886 then
13887   ac_cv_sizeof_short=`cat conftestval`
13888 else
13889   echo "configure: failed program was:" >&5
13890   cat conftest.$ac_ext >&5
13891   rm -fr conftest*
13892   ac_cv_sizeof_short=0
13893 fi
13894 rm -fr conftest*
13895 fi
13896
13897 fi
13898 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13899 cat >> confdefs.h <<EOF
13900 #define SIZEOF_SHORT $ac_cv_sizeof_short
13901 EOF
13902
13903  
13904         echo $ac_n "checking size of int""... $ac_c" 1>&6
13905 echo "configure:13906: checking size of int" >&5
13906 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13907   echo $ac_n "(cached) $ac_c" 1>&6
13908 else
13909   if test "$cross_compiling" = yes; then
13910     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13911 else
13912   cat > conftest.$ac_ext <<EOF
13913 #line 13914 "configure"
13914 #include "confdefs.h"
13915 #include <stdio.h>
13916 main()
13917 {
13918   FILE *f=fopen("conftestval", "w");
13919   if (!f) exit(1);
13920   fprintf(f, "%d\n", sizeof(int));
13921   exit(0);
13922 }
13923 EOF
13924 if { (eval echo configure:13925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13925 then
13926   ac_cv_sizeof_int=`cat conftestval`
13927 else
13928   echo "configure: failed program was:" >&5
13929   cat conftest.$ac_ext >&5
13930   rm -fr conftest*
13931   ac_cv_sizeof_int=0
13932 fi
13933 rm -fr conftest*
13934 fi
13935
13936 fi
13937 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13938 cat >> confdefs.h <<EOF
13939 #define SIZEOF_INT $ac_cv_sizeof_int
13940 EOF
13941
13942  
13943         echo $ac_n "checking size of long""... $ac_c" 1>&6
13944 echo "configure:13945: checking size of long" >&5
13945 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13946   echo $ac_n "(cached) $ac_c" 1>&6
13947 else
13948   if test "$cross_compiling" = yes; then
13949     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13950 else
13951   cat > conftest.$ac_ext <<EOF
13952 #line 13953 "configure"
13953 #include "confdefs.h"
13954 #include <stdio.h>
13955 main()
13956 {
13957   FILE *f=fopen("conftestval", "w");
13958   if (!f) exit(1);
13959   fprintf(f, "%d\n", sizeof(long));
13960   exit(0);
13961 }
13962 EOF
13963 if { (eval echo configure:13964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13964 then
13965   ac_cv_sizeof_long=`cat conftestval`
13966 else
13967   echo "configure: failed program was:" >&5
13968   cat conftest.$ac_ext >&5
13969   rm -fr conftest*
13970   ac_cv_sizeof_long=0
13971 fi
13972 rm -fr conftest*
13973 fi
13974
13975 fi
13976 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13977 cat >> confdefs.h <<EOF
13978 #define SIZEOF_LONG $ac_cv_sizeof_long
13979 EOF
13980
13981
13982
13983         if test "$ac_cv_sizeof_int" -lt 4 ; then
13984                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13985
13986                 cat >> confdefs.h <<\EOF
13987 #define LBER_INT_T long
13988 EOF
13989
13990                 cat >> confdefs.h <<\EOF
13991 #define LBER_TAG_T long
13992 EOF
13993
13994                 cat >> confdefs.h <<\EOF
13995 #define LBER_SOCKET_T int
13996 EOF
13997
13998         else
13999                 cat >> confdefs.h <<\EOF
14000 #define LBER_INT_T int
14001 EOF
14002
14003                 cat >> confdefs.h <<\EOF
14004 #define LBER_TAG_T long
14005 EOF
14006
14007                 cat >> confdefs.h <<\EOF
14008 #define LBER_SOCKET_T int
14009 EOF
14010
14011         fi
14012 fi
14013
14014 cat >> confdefs.h <<\EOF
14015 #define LBER_LEN_T long
14016 EOF
14017
14018
14019 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14020 echo "configure:14021: checking for 8-bit clean memcmp" >&5
14021 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14022   echo $ac_n "(cached) $ac_c" 1>&6
14023 else
14024   if test "$cross_compiling" = yes; then
14025   ac_cv_func_memcmp_clean=no
14026 else
14027   cat > conftest.$ac_ext <<EOF
14028 #line 14029 "configure"
14029 #include "confdefs.h"
14030
14031 main()
14032 {
14033   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14034   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14035 }
14036
14037 EOF
14038 if { (eval echo configure:14039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14039 then
14040   ac_cv_func_memcmp_clean=yes
14041 else
14042   echo "configure: failed program was:" >&5
14043   cat conftest.$ac_ext >&5
14044   rm -fr conftest*
14045   ac_cv_func_memcmp_clean=no
14046 fi
14047 rm -fr conftest*
14048 fi
14049
14050 fi
14051
14052 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14053 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14054
14055 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14056 echo "configure:14057: checking for strftime" >&5
14057 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 /* System header to define __stub macros and hopefully few prototypes,
14064     which can conflict with char strftime(); below.  */
14065 #include <assert.h>
14066 /* Override any gcc2 internal prototype to avoid an error.  */
14067 /* We use char because int might match the return type of a gcc2
14068     builtin and then its argument prototype would still apply.  */
14069 char strftime();
14070 char (*f)();
14071
14072 int main() {
14073
14074 /* The GNU C library defines this for functions which it implements
14075     to always fail with ENOSYS.  Some functions are actually named
14076     something starting with __ and the normal name is an alias.  */
14077 #if defined (__stub_strftime) || defined (__stub___strftime)
14078 choke me
14079 #else
14080 f = strftime;
14081 #endif
14082
14083 ; return 0; }
14084 EOF
14085 if { (eval echo configure:14086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14086   rm -rf conftest*
14087   eval "ac_cv_func_strftime=yes"
14088 else
14089   echo "configure: failed program was:" >&5
14090   cat conftest.$ac_ext >&5
14091   rm -rf conftest*
14092   eval "ac_cv_func_strftime=no"
14093 fi
14094 rm -f conftest*
14095 fi
14096
14097 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14098   echo "$ac_t""yes" 1>&6
14099   cat >> confdefs.h <<\EOF
14100 #define HAVE_STRFTIME 1
14101 EOF
14102
14103 else
14104   echo "$ac_t""no" 1>&6
14105 # strftime is in -lintl on SCO UNIX.
14106 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14107 echo "configure:14108: checking for strftime in -lintl" >&5
14108 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14110   echo $ac_n "(cached) $ac_c" 1>&6
14111 else
14112   ac_save_LIBS="$LIBS"
14113 LIBS="-lintl  $LIBS"
14114 cat > conftest.$ac_ext <<EOF
14115 #line 14116 "configure"
14116 #include "confdefs.h"
14117 /* Override any gcc2 internal prototype to avoid an error.  */
14118 /* We use char because int might match the return type of a gcc2
14119     builtin and then its argument prototype would still apply.  */
14120 char strftime();
14121
14122 int main() {
14123 strftime()
14124 ; return 0; }
14125 EOF
14126 if { (eval echo configure:14127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14127   rm -rf conftest*
14128   eval "ac_cv_lib_$ac_lib_var=yes"
14129 else
14130   echo "configure: failed program was:" >&5
14131   cat conftest.$ac_ext >&5
14132   rm -rf conftest*
14133   eval "ac_cv_lib_$ac_lib_var=no"
14134 fi
14135 rm -f conftest*
14136 LIBS="$ac_save_LIBS"
14137
14138 fi
14139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14140   echo "$ac_t""yes" 1>&6
14141   cat >> confdefs.h <<\EOF
14142 #define HAVE_STRFTIME 1
14143 EOF
14144
14145 LIBS="-lintl $LIBS"
14146 else
14147   echo "$ac_t""no" 1>&6
14148 fi
14149
14150 fi
14151
14152
14153 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14154 echo "configure:14155: checking for inet_aton()" >&5
14155 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14156   echo $ac_n "(cached) $ac_c" 1>&6
14157 else
14158   cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161
14162 #ifdef HAVE_SYS_TYPES_H
14163 #       include <sys/types.h>
14164 #endif
14165 #ifdef HAVE_SYS_SOCKET_H
14166 #       include <sys/socket.h>
14167 #       ifdef HAVE_SYS_SELECT_H
14168 #               include <sys/select.h>
14169 #       endif
14170 #       include <netinet/in.h>
14171 #       ifdef HAVE_ARPA_INET_H
14172 #               include <arpa/inet.h>
14173 #       endif
14174 #endif
14175
14176 int main() {
14177 struct in_addr in;
14178 int rc = inet_aton( "255.255.255.255", &in );
14179 ; return 0; }
14180 EOF
14181 if { (eval echo configure:14182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14182   rm -rf conftest*
14183   ol_cv_func_inet_aton=yes
14184 else
14185   echo "configure: failed program was:" >&5
14186   cat conftest.$ac_ext >&5
14187   rm -rf conftest*
14188   ol_cv_func_inet_aton=no
14189 fi
14190 rm -f conftest*
14191 fi
14192
14193 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14194   if test $ol_cv_func_inet_aton != no; then
14195     cat >> confdefs.h <<\EOF
14196 #define HAVE_INET_ATON 1
14197 EOF
14198
14199   fi
14200  
14201
14202 if test "$ac_cv_mingw32" = yes ; then
14203     echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14204 echo "configure:14205: checking for _snprintf" >&5
14205 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14206   echo $ac_n "(cached) $ac_c" 1>&6
14207 else
14208   cat > conftest.$ac_ext <<EOF
14209 #line 14210 "configure"
14210 #include "confdefs.h"
14211 /* System header to define __stub macros and hopefully few prototypes,
14212     which can conflict with char _snprintf(); below.  */
14213 #include <assert.h>
14214 /* Override any gcc2 internal prototype to avoid an error.  */
14215 /* We use char because int might match the return type of a gcc2
14216     builtin and then its argument prototype would still apply.  */
14217 char _snprintf();
14218 char (*f)();
14219
14220 int main() {
14221
14222 /* The GNU C library defines this for functions which it implements
14223     to always fail with ENOSYS.  Some functions are actually named
14224     something starting with __ and the normal name is an alias.  */
14225 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14226 choke me
14227 #else
14228 f = _snprintf;
14229 #endif
14230
14231 ; return 0; }
14232 EOF
14233 if { (eval echo configure:14234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14234   rm -rf conftest*
14235   eval "ac_cv_func__snprintf=yes"
14236 else
14237   echo "configure: failed program was:" >&5
14238   cat conftest.$ac_ext >&5
14239   rm -rf conftest*
14240   eval "ac_cv_func__snprintf=no"
14241 fi
14242 rm -f conftest*
14243 fi
14244
14245 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14246   echo "$ac_t""yes" 1>&6
14247   
14248         ac_cv_func_snprintf=yes
14249         cat >> confdefs.h <<\EOF
14250 #define snprintf _snprintf
14251 EOF
14252
14253     
14254 else
14255   echo "$ac_t""no" 1>&6
14256 fi
14257
14258
14259     echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14260 echo "configure:14261: checking for _vsnprintf" >&5
14261 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14262   echo $ac_n "(cached) $ac_c" 1>&6
14263 else
14264   cat > conftest.$ac_ext <<EOF
14265 #line 14266 "configure"
14266 #include "confdefs.h"
14267 /* System header to define __stub macros and hopefully few prototypes,
14268     which can conflict with char _vsnprintf(); below.  */
14269 #include <assert.h>
14270 /* Override any gcc2 internal prototype to avoid an error.  */
14271 /* We use char because int might match the return type of a gcc2
14272     builtin and then its argument prototype would still apply.  */
14273 char _vsnprintf();
14274 char (*f)();
14275
14276 int main() {
14277
14278 /* The GNU C library defines this for functions which it implements
14279     to always fail with ENOSYS.  Some functions are actually named
14280     something starting with __ and the normal name is an alias.  */
14281 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14282 choke me
14283 #else
14284 f = _vsnprintf;
14285 #endif
14286
14287 ; return 0; }
14288 EOF
14289 if { (eval echo configure:14290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14290   rm -rf conftest*
14291   eval "ac_cv_func__vsnprintf=yes"
14292 else
14293   echo "configure: failed program was:" >&5
14294   cat conftest.$ac_ext >&5
14295   rm -rf conftest*
14296   eval "ac_cv_func__vsnprintf=no"
14297 fi
14298 rm -f conftest*
14299 fi
14300
14301 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14302   echo "$ac_t""yes" 1>&6
14303   
14304         ac_cv_func_vsnprintf=yes
14305         cat >> confdefs.h <<\EOF
14306 #define vsnprintf _vsnprintf
14307 EOF
14308
14309     
14310 else
14311   echo "$ac_t""no" 1>&6
14312 fi
14313
14314
14315     echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14316 echo "configure:14317: checking for _spawnlp" >&5
14317 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14318   echo $ac_n "(cached) $ac_c" 1>&6
14319 else
14320   cat > conftest.$ac_ext <<EOF
14321 #line 14322 "configure"
14322 #include "confdefs.h"
14323 /* System header to define __stub macros and hopefully few prototypes,
14324     which can conflict with char _spawnlp(); below.  */
14325 #include <assert.h>
14326 /* Override any gcc2 internal prototype to avoid an error.  */
14327 /* We use char because int might match the return type of a gcc2
14328     builtin and then its argument prototype would still apply.  */
14329 char _spawnlp();
14330 char (*f)();
14331
14332 int main() {
14333
14334 /* The GNU C library defines this for functions which it implements
14335     to always fail with ENOSYS.  Some functions are actually named
14336     something starting with __ and the normal name is an alias.  */
14337 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14338 choke me
14339 #else
14340 f = _spawnlp;
14341 #endif
14342
14343 ; return 0; }
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14346   rm -rf conftest*
14347   eval "ac_cv_func__spawnlp=yes"
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -rf conftest*
14352   eval "ac_cv_func__spawnlp=no"
14353 fi
14354 rm -f conftest*
14355 fi
14356
14357 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14358   echo "$ac_t""yes" 1>&6
14359   cat >> confdefs.h <<\EOF
14360 #define HAVE_SPAWNLP 1
14361 EOF
14362
14363 else
14364   echo "$ac_t""no" 1>&6
14365 fi
14366
14367 fi
14368
14369 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14370 echo "configure:14371: checking for vprintf" >&5
14371 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14372   echo $ac_n "(cached) $ac_c" 1>&6
14373 else
14374   cat > conftest.$ac_ext <<EOF
14375 #line 14376 "configure"
14376 #include "confdefs.h"
14377 /* System header to define __stub macros and hopefully few prototypes,
14378     which can conflict with char vprintf(); below.  */
14379 #include <assert.h>
14380 /* Override any gcc2 internal prototype to avoid an error.  */
14381 /* We use char because int might match the return type of a gcc2
14382     builtin and then its argument prototype would still apply.  */
14383 char vprintf();
14384 char (*f)();
14385
14386 int main() {
14387
14388 /* The GNU C library defines this for functions which it implements
14389     to always fail with ENOSYS.  Some functions are actually named
14390     something starting with __ and the normal name is an alias.  */
14391 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14392 choke me
14393 #else
14394 f = vprintf;
14395 #endif
14396
14397 ; return 0; }
14398 EOF
14399 if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14400   rm -rf conftest*
14401   eval "ac_cv_func_vprintf=yes"
14402 else
14403   echo "configure: failed program was:" >&5
14404   cat conftest.$ac_ext >&5
14405   rm -rf conftest*
14406   eval "ac_cv_func_vprintf=no"
14407 fi
14408 rm -f conftest*
14409 fi
14410
14411 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14412   echo "$ac_t""yes" 1>&6
14413   cat >> confdefs.h <<\EOF
14414 #define HAVE_VPRINTF 1
14415 EOF
14416
14417 else
14418   echo "$ac_t""no" 1>&6
14419 fi
14420
14421 if test "$ac_cv_func_vprintf" != yes; then
14422 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14423 echo "configure:14424: checking for _doprnt" >&5
14424 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14425   echo $ac_n "(cached) $ac_c" 1>&6
14426 else
14427   cat > conftest.$ac_ext <<EOF
14428 #line 14429 "configure"
14429 #include "confdefs.h"
14430 /* System header to define __stub macros and hopefully few prototypes,
14431     which can conflict with char _doprnt(); below.  */
14432 #include <assert.h>
14433 /* Override any gcc2 internal prototype to avoid an error.  */
14434 /* We use char because int might match the return type of a gcc2
14435     builtin and then its argument prototype would still apply.  */
14436 char _doprnt();
14437 char (*f)();
14438
14439 int main() {
14440
14441 /* The GNU C library defines this for functions which it implements
14442     to always fail with ENOSYS.  Some functions are actually named
14443     something starting with __ and the normal name is an alias.  */
14444 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14445 choke me
14446 #else
14447 f = _doprnt;
14448 #endif
14449
14450 ; return 0; }
14451 EOF
14452 if { (eval echo configure:14453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14453   rm -rf conftest*
14454   eval "ac_cv_func__doprnt=yes"
14455 else
14456   echo "configure: failed program was:" >&5
14457   cat conftest.$ac_ext >&5
14458   rm -rf conftest*
14459   eval "ac_cv_func__doprnt=no"
14460 fi
14461 rm -f conftest*
14462 fi
14463
14464 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14465   echo "$ac_t""yes" 1>&6
14466   cat >> confdefs.h <<\EOF
14467 #define HAVE_DOPRNT 1
14468 EOF
14469
14470 else
14471   echo "$ac_t""no" 1>&6
14472 fi
14473
14474 fi
14475
14476
14477 if test $ac_cv_func_vprintf = yes ; then
14478                 for ac_func in vsnprintf vsprintf
14479 do
14480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14481 echo "configure:14482: checking for $ac_func" >&5
14482 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14483   echo $ac_n "(cached) $ac_c" 1>&6
14484 else
14485   cat > conftest.$ac_ext <<EOF
14486 #line 14487 "configure"
14487 #include "confdefs.h"
14488 /* System header to define __stub macros and hopefully few prototypes,
14489     which can conflict with char $ac_func(); below.  */
14490 #include <assert.h>
14491 /* Override any gcc2 internal prototype to avoid an error.  */
14492 /* We use char because int might match the return type of a gcc2
14493     builtin and then its argument prototype would still apply.  */
14494 char $ac_func();
14495 char (*f)();
14496
14497 int main() {
14498
14499 /* The GNU C library defines this for functions which it implements
14500     to always fail with ENOSYS.  Some functions are actually named
14501     something starting with __ and the normal name is an alias.  */
14502 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14503 choke me
14504 #else
14505 f = $ac_func;
14506 #endif
14507
14508 ; return 0; }
14509 EOF
14510 if { (eval echo configure:14511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14511   rm -rf conftest*
14512   eval "ac_cv_func_$ac_func=yes"
14513 else
14514   echo "configure: failed program was:" >&5
14515   cat conftest.$ac_ext >&5
14516   rm -rf conftest*
14517   eval "ac_cv_func_$ac_func=no"
14518 fi
14519 rm -f conftest*
14520 fi
14521
14522 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14523   echo "$ac_t""yes" 1>&6
14524     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14525   cat >> confdefs.h <<EOF
14526 #define $ac_tr_func 1
14527 EOF
14528  
14529 else
14530   echo "$ac_t""no" 1>&6
14531 fi
14532 done
14533
14534 fi
14535
14536 for ac_func in \
14537         bcopy                   \
14538         closesocket             \
14539         endgrent                \
14540         endpwent                \
14541         flock                   \
14542         getdtablesize   \
14543         getgrgid                \
14544         gethostname             \
14545         getpass                 \
14546         getpwuid                \
14547         getpwnam                \
14548         getspnam                \
14549         gettimeofday    \
14550         initgroups              \
14551         lockf                   \
14552         memcpy                  \
14553         memmove                 \
14554         mkstemp                 \
14555         pipe                    \
14556         read                    \
14557         recv                    \
14558         recvfrom                \
14559         setpwfile               \
14560         setgid                  \
14561         setegid                 \
14562         setsid                  \
14563         setuid                  \
14564         seteuid                 \
14565         sigaction               \
14566         signal                  \
14567         sigset                  \
14568         snprintf                \
14569         strdup                  \
14570         strerror                \
14571         strpbrk                 \
14572         strrchr                 \
14573         strsep                  \
14574         strstr                  \
14575         strtol                  \
14576         strtoul                 \
14577         strspn                  \
14578         sysconf                 \
14579         waitpid                 \
14580         wait4                   \
14581         write                   \
14582         send                    \
14583         sendto                  \
14584
14585 do
14586 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14587 echo "configure:14588: checking for $ac_func" >&5
14588 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14589   echo $ac_n "(cached) $ac_c" 1>&6
14590 else
14591   cat > conftest.$ac_ext <<EOF
14592 #line 14593 "configure"
14593 #include "confdefs.h"
14594 /* System header to define __stub macros and hopefully few prototypes,
14595     which can conflict with char $ac_func(); below.  */
14596 #include <assert.h>
14597 /* Override any gcc2 internal prototype to avoid an error.  */
14598 /* We use char because int might match the return type of a gcc2
14599     builtin and then its argument prototype would still apply.  */
14600 char $ac_func();
14601 char (*f)();
14602
14603 int main() {
14604
14605 /* The GNU C library defines this for functions which it implements
14606     to always fail with ENOSYS.  Some functions are actually named
14607     something starting with __ and the normal name is an alias.  */
14608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14609 choke me
14610 #else
14611 f = $ac_func;
14612 #endif
14613
14614 ; return 0; }
14615 EOF
14616 if { (eval echo configure:14617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14617   rm -rf conftest*
14618   eval "ac_cv_func_$ac_func=yes"
14619 else
14620   echo "configure: failed program was:" >&5
14621   cat conftest.$ac_ext >&5
14622   rm -rf conftest*
14623   eval "ac_cv_func_$ac_func=no"
14624 fi
14625 rm -f conftest*
14626 fi
14627
14628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14629   echo "$ac_t""yes" 1>&6
14630     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14631   cat >> confdefs.h <<EOF
14632 #define $ac_tr_func 1
14633 EOF
14634  
14635 else
14636   echo "$ac_t""no" 1>&6
14637 fi
14638 done
14639
14640
14641 for ac_func in getopt tempnam
14642 do
14643 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14644 echo "configure:14645: checking for $ac_func" >&5
14645 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14646   echo $ac_n "(cached) $ac_c" 1>&6
14647 else
14648   cat > conftest.$ac_ext <<EOF
14649 #line 14650 "configure"
14650 #include "confdefs.h"
14651 /* System header to define __stub macros and hopefully few prototypes,
14652     which can conflict with char $ac_func(); below.  */
14653 #include <assert.h>
14654 /* Override any gcc2 internal prototype to avoid an error.  */
14655 /* We use char because int might match the return type of a gcc2
14656     builtin and then its argument prototype would still apply.  */
14657 char $ac_func();
14658 char (*f)();
14659
14660 int main() {
14661
14662 /* The GNU C library defines this for functions which it implements
14663     to always fail with ENOSYS.  Some functions are actually named
14664     something starting with __ and the normal name is an alias.  */
14665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14666 choke me
14667 #else
14668 f = $ac_func;
14669 #endif
14670
14671 ; return 0; }
14672 EOF
14673 if { (eval echo configure:14674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14674   rm -rf conftest*
14675   eval "ac_cv_func_$ac_func=yes"
14676 else
14677   echo "configure: failed program was:" >&5
14678   cat conftest.$ac_ext >&5
14679   rm -rf conftest*
14680   eval "ac_cv_func_$ac_func=no"
14681 fi
14682 rm -f conftest*
14683 fi
14684
14685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14686   echo "$ac_t""yes" 1>&6
14687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14688   cat >> confdefs.h <<EOF
14689 #define $ac_tr_func 1
14690 EOF
14691  
14692 else
14693   echo "$ac_t""no" 1>&6
14694 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14695 fi
14696 done
14697
14698
14699
14700 if test "$ac_cv_func_getopt" != yes; then
14701     LIBSRCS="$LIBSRCS getopt.c"
14702 fi
14703
14704 if test "$ac_cv_func_tempnam" != yes; then
14705     LIBSRCS="$LIBSRCS tempnam.c"
14706 fi
14707
14708 # Check Configuration
14709 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14710 echo "configure:14711: checking declaration of sys_errlist" >&5
14711 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14712   echo $ac_n "(cached) $ac_c" 1>&6
14713 else
14714   
14715         cat > conftest.$ac_ext <<EOF
14716 #line 14717 "configure"
14717 #include "confdefs.h"
14718
14719 #include <stdio.h>
14720 #include <sys/types.h>
14721 #include <errno.h>
14722 #ifdef WINNT
14723 #include <stdlib.h>
14724 #endif 
14725 int main() {
14726 char *c = (char *) *sys_errlist
14727 ; return 0; }
14728 EOF
14729 if { (eval echo configure:14730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14730   rm -rf conftest*
14731   ol_cv_dcl_sys_errlist=yes
14732         ol_cv_have_sys_errlist=yes
14733 else
14734   echo "configure: failed program was:" >&5
14735   cat conftest.$ac_ext >&5
14736   rm -rf conftest*
14737   ol_cv_dcl_sys_errlist=no
14738 fi
14739 rm -f conftest*
14740 fi
14741
14742 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14743 #
14744 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14745 if test $ol_cv_dcl_sys_errlist = no ; then
14746         cat >> confdefs.h <<\EOF
14747 #define DECL_SYS_ERRLIST 1
14748 EOF
14749
14750
14751         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14752 echo "configure:14753: checking existence of sys_errlist" >&5
14753 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14754   echo $ac_n "(cached) $ac_c" 1>&6
14755 else
14756   
14757                 cat > conftest.$ac_ext <<EOF
14758 #line 14759 "configure"
14759 #include "confdefs.h"
14760 #include <errno.h>
14761 int main() {
14762 char *c = (char *) *sys_errlist
14763 ; return 0; }
14764 EOF
14765 if { (eval echo configure:14766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14766   rm -rf conftest*
14767   ol_cv_have_sys_errlist=yes
14768 else
14769   echo "configure: failed program was:" >&5
14770   cat conftest.$ac_ext >&5
14771   rm -rf conftest*
14772   ol_cv_have_sys_errlist=no
14773 fi
14774 rm -f conftest*
14775 fi
14776
14777 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14778 fi
14779 if test $ol_cv_have_sys_errlist = yes ; then
14780         cat >> confdefs.h <<\EOF
14781 #define HAVE_SYS_ERRLIST 1
14782 EOF
14783
14784 fi
14785
14786
14787
14788 if test "$ol_enable_debug" != no ; then
14789         cat >> confdefs.h <<\EOF
14790 #define LDAP_DEBUG 1
14791 EOF
14792
14793 fi
14794 if test "$ol_enable_syslog" = yes ; then
14795         cat >> confdefs.h <<\EOF
14796 #define LDAP_SYSLOG 1
14797 EOF
14798
14799 fi
14800 if test "$ol_enable_libui" = yes ; then
14801         cat >> confdefs.h <<\EOF
14802 #define LDAP_LIBUI 1
14803 EOF
14804
14805 fi
14806 if test "$ol_enable_cache" = no ; then
14807         cat >> confdefs.h <<\EOF
14808 #define LDAP_NOCACHE 1
14809 EOF
14810
14811 fi
14812 if test "$ol_enable_dns" != no ; then
14813         cat >> confdefs.h <<\EOF
14814 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14815 EOF
14816
14817 fi
14818 if test "$ol_enable_proctitle" != no ; then
14819         cat >> confdefs.h <<\EOF
14820 #define LDAP_PROCTITLE 1
14821 EOF
14822
14823 fi
14824 if test "$ol_enable_referrals" != no ; then
14825         cat >> confdefs.h <<\EOF
14826 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14827 EOF
14828
14829 fi
14830 if test "$ol_enable_cldap" != no ; then
14831         cat >> confdefs.h <<\EOF
14832 #define LDAP_CONNECTIONLESS 1
14833 EOF
14834
14835 fi
14836
14837 if test "$ol_enable_crypt" != no ; then
14838         cat >> confdefs.h <<\EOF
14839 #define SLAPD_CRYPT 1
14840 EOF
14841
14842 fi
14843 if test "$ol_enable_cleartext" != no ; then
14844         cat >> confdefs.h <<\EOF
14845 #define SLAPD_CLEARTEXT 1
14846 EOF
14847
14848 fi
14849 if test "$ol_enable_multimaster" != no ; then
14850         cat >> confdefs.h <<\EOF
14851 #define SLAPD_MULTIMASTER 1
14852 EOF
14853
14854 fi
14855 if test "$ol_enable_phonetic" != no ; then
14856         cat >> confdefs.h <<\EOF
14857 #define SLAPD_PHONETIC 1
14858 EOF
14859
14860 fi
14861 if test "$ol_enable_rlookups" != no ; then
14862         cat >> confdefs.h <<\EOF
14863 #define SLAPD_RLOOKUPS 1
14864 EOF
14865
14866 fi
14867 if test "$ol_enable_aci" != no ; then
14868         cat >> confdefs.h <<\EOF
14869 #define SLAPD_ACI_ENABLED 1
14870 EOF
14871
14872 fi
14873 if test "$ol_enable_discreteaci" != no ; then
14874         cat >> confdefs.h <<\EOF
14875 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14876 EOF
14877
14878 fi
14879
14880 if test "$ol_link_modules" != no ; then
14881         cat >> confdefs.h <<\EOF
14882 #define SLAPD_MODULES 1
14883 EOF
14884
14885         BUILD_SLAPD=yes
14886         SLAPD_MODULES_LDFLAGS="-dlopen self"
14887 fi
14888
14889 if test "$ol_link_bdb2" != no ; then
14890         cat >> confdefs.h <<\EOF
14891 #define SLAPD_BDB2 1
14892 EOF
14893
14894         BUILD_SLAPD=yes
14895         BUILD_BDB2=yes
14896         if test "$ol_with_bdb2_module" != static ; then
14897                 cat >> confdefs.h <<\EOF
14898 #define SLAPD_BDB2_DYNAMIC 1
14899 EOF
14900
14901                 BUILD_BDB2=mod
14902                 BUILD_BDB2_DYNAMIC=shared
14903                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14904         fi
14905 fi
14906
14907 if test "$ol_enable_ldap" != no ; then
14908         cat >> confdefs.h <<\EOF
14909 #define SLAPD_LDAP 1
14910 EOF
14911
14912         BUILD_SLAPD=yes
14913         BUILD_LDAP=yes
14914         if test "$ol_with_ldap_module" != static ; then
14915                 cat >> confdefs.h <<\EOF
14916 #define SLAPD_LDAP_DYNAMIC 1
14917 EOF
14918
14919                 BUILD_LDAP=mod
14920                 BUILD_LDAP_DYNAMIC=shared
14921                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14922         fi
14923 fi
14924
14925 if test "$ol_link_ldbm" != no ; then
14926         cat >> confdefs.h <<\EOF
14927 #define SLAPD_LDBM 1
14928 EOF
14929
14930         BUILD_SLAPD=yes
14931         BUILD_LDBM=yes
14932         if test "$ol_with_ldbm_module" != static ; then
14933                 cat >> confdefs.h <<\EOF
14934 #define SLAPD_LDBM_DYNAMIC 1
14935 EOF
14936
14937                 BUILD_LDBM=mod
14938                 BUILD_LDBM_DYNAMIC=shared
14939                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14940         fi
14941 fi
14942
14943 if test "$ol_enable_passwd" != no ; then
14944         cat >> confdefs.h <<\EOF
14945 #define SLAPD_PASSWD 1
14946 EOF
14947
14948         BUILD_SLAPD=yes
14949         BUILD_PASSWD=yes
14950         if test "$ol_with_passwd_module" != static ; then
14951                 cat >> confdefs.h <<\EOF
14952 #define SLAPD_PASSWD_DYNAMIC 1
14953 EOF
14954
14955                 BUILD_PASSWD=mod
14956                 BUILD_PASSWD_DYNAMIC=shared
14957                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14958         fi
14959 fi
14960
14961 if test "$ol_link_perl" != no ; then
14962         cat >> confdefs.h <<\EOF
14963 #define SLAPD_PERL 1
14964 EOF
14965
14966         BUILD_SLAPD=yes
14967         BUILD_PERL=yes
14968         if test "$ol_with_perl_module" != static ; then
14969                 cat >> confdefs.h <<\EOF
14970 #define SLAPD_PERL_DYNAMIC 1
14971 EOF
14972
14973                 BUILD_PERL=mod
14974                 BUILD_PERL_DYNAMIC=shared
14975                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14976         fi
14977 fi
14978
14979 if test "$ol_enable_shell" != no ; then
14980         cat >> confdefs.h <<\EOF
14981 #define SLAPD_SHELL 1
14982 EOF
14983
14984         BUILD_SLAPD=yes
14985         BUILD_SHELL=yes
14986         if test "$ol_with_shell_module" != static ; then
14987                 cat >> confdefs.h <<\EOF
14988 #define SLAPD_SHELL_DYNAMIC 1
14989 EOF
14990
14991                 BUILD_SHELL=mod
14992                 BUILD_SHELL_DYNAMIC=shared
14993                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14994         fi
14995 fi
14996
14997 if test "$ol_enable_tcl" != no ; then
14998         cat >> confdefs.h <<\EOF
14999 #define SLAPD_TCL 1
15000 EOF
15001
15002         BUILD_SLAPD=yes
15003         BUILD_TCL=yes
15004         if test "$ol_with_tcl_module" != static; then
15005                 cat >> confdefs.h <<\EOF
15006 #define SLAPD_TCL_DYNAMIC 1
15007 EOF
15008
15009                 BUILD_TCL=mod
15010                 BUILD_TCL_DYNAMIC=shared
15011                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15012         fi
15013 fi
15014
15015 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15016         $BUILD_SLAPD = yes ; then
15017         BUILD_SLURPD=yes
15018 fi
15019
15020 if test "$ol_link_isode" != no ; then
15021         BUILD_LDAPD=yes
15022 fi
15023
15024
15025 if test "$LINK_BINS_DYNAMIC" = yes; then
15026     LIB_LINKAGE=DYN
15027     LT_LIB_LINKAGE=shared
15028 else
15029     LIB_LINKAGE=STAT
15030     LT_LIB_LINKAGE=static
15031 fi
15032
15033 if test "$ac_cv_mingw32" = yes ; then
15034     PLAT=NT
15035     DYN_EXT=dll
15036 else
15037     PLAT=UNIX
15038     DYN_EXT=so
15039 fi
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050   
15051   
15052   
15053   
15054   
15055   
15056   
15057   
15058   
15059   
15060   
15061   
15062   
15063   
15064   
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095 trap '' 1 2 15
15096
15097 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15098
15099 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15100 # Let make expand exec_prefix.
15101 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15102
15103 # Any assignment to VPATH causes Sun make to only execute
15104 # the first set of double-colon rules, so remove it if not needed.
15105 # If there is a colon in the path, we need to keep it.
15106 if test "x$srcdir" = x.; then
15107   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15108 fi
15109
15110 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15111
15112 DEFS=-DHAVE_CONFIG_H
15113
15114 # Without the "./", some shells look in PATH for config.status.
15115 : ${CONFIG_STATUS=./config.status}
15116
15117 echo creating $CONFIG_STATUS
15118 rm -f $CONFIG_STATUS
15119 cat > $CONFIG_STATUS <<EOF
15120 #! /bin/sh
15121 # Generated automatically by configure.
15122 # Run this file to recreate the current configuration.
15123 # This directory was configured as follows,
15124 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15125 #
15126 # $0 $ac_configure_args
15127 #
15128 # Compiler output produced by configure, useful for debugging
15129 # configure, is in ./config.log if it exists.
15130
15131 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15132 for ac_option
15133 do
15134   case "\$ac_option" in
15135   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15136     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15137     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15138   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15139     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15140     exit 0 ;;
15141   -help | --help | --hel | --he | --h)
15142     echo "\$ac_cs_usage"; exit 0 ;;
15143   *) echo "\$ac_cs_usage"; exit 1 ;;
15144   esac
15145 done
15146
15147 ac_given_srcdir=$srcdir
15148 ac_given_INSTALL="$INSTALL"
15149
15150 trap 'rm -fr `echo "\
15151 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15152 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15153 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15154 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15155 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15156 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15157 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15158 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15159 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15160 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15161 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15162 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15163 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15164 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15165 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15166 include/Makefile:build/top.mk:include/Makefile.in \
15167 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15168 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15169 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15170 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15171 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15172 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15173 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15174 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15175 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15176 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15177 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15178 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15179 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15180 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15181 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15182 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15183 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15184 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15185 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15186 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15187 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15188 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15189 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15190 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15191 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15192 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15193  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15194 EOF
15195 cat >> $CONFIG_STATUS <<EOF
15196
15197 # Protect against being on the right side of a sed subst in config.status.
15198 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15199  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15200 $ac_vpsub
15201 $extrasub
15202 s%@SHELL@%$SHELL%g
15203 s%@CFLAGS@%$CFLAGS%g
15204 s%@CPPFLAGS@%$CPPFLAGS%g
15205 s%@CXXFLAGS@%$CXXFLAGS%g
15206 s%@FFLAGS@%$FFLAGS%g
15207 s%@DEFS@%$DEFS%g
15208 s%@LDFLAGS@%$LDFLAGS%g
15209 s%@LIBS@%$LIBS%g
15210 s%@exec_prefix@%$exec_prefix%g
15211 s%@prefix@%$prefix%g
15212 s%@program_transform_name@%$program_transform_name%g
15213 s%@bindir@%$bindir%g
15214 s%@sbindir@%$sbindir%g
15215 s%@libexecdir@%$libexecdir%g
15216 s%@datadir@%$datadir%g
15217 s%@sysconfdir@%$sysconfdir%g
15218 s%@sharedstatedir@%$sharedstatedir%g
15219 s%@localstatedir@%$localstatedir%g
15220 s%@libdir@%$libdir%g
15221 s%@includedir@%$includedir%g
15222 s%@oldincludedir@%$oldincludedir%g
15223 s%@infodir@%$infodir%g
15224 s%@mandir@%$mandir%g
15225 s%@host@%$host%g
15226 s%@host_alias@%$host_alias%g
15227 s%@host_cpu@%$host_cpu%g
15228 s%@host_vendor@%$host_vendor%g
15229 s%@host_os@%$host_os%g
15230 s%@target@%$target%g
15231 s%@target_alias@%$target_alias%g
15232 s%@target_cpu@%$target_cpu%g
15233 s%@target_vendor@%$target_vendor%g
15234 s%@target_os@%$target_os%g
15235 s%@build@%$build%g
15236 s%@build_alias@%$build_alias%g
15237 s%@build_cpu@%$build_cpu%g
15238 s%@build_vendor@%$build_vendor%g
15239 s%@build_os@%$build_os%g
15240 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15241 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15242 s%@INSTALL_DATA@%$INSTALL_DATA%g
15243 s%@PACKAGE@%$PACKAGE%g
15244 s%@VERSION@%$VERSION%g
15245 s%@ACLOCAL@%$ACLOCAL%g
15246 s%@AUTOCONF@%$AUTOCONF%g
15247 s%@AUTOMAKE@%$AUTOMAKE%g
15248 s%@AUTOHEADER@%$AUTOHEADER%g
15249 s%@MAKEINFO@%$MAKEINFO%g
15250 s%@install_sh@%$install_sh%g
15251 s%@AMTAR@%$AMTAR%g
15252 s%@AWK@%$AWK%g
15253 s%@AMTARFLAGS@%$AMTARFLAGS%g
15254 s%@SET_MAKE@%$SET_MAKE%g
15255 s%@top_builddir@%$top_builddir%g
15256 s%@ldap_subdir@%$ldap_subdir%g
15257 s%@CC@%$CC%g
15258 s%@RANLIB@%$RANLIB%g
15259 s%@LD@%$LD%g
15260 s%@NM@%$NM%g
15261 s%@LN_S@%$LN_S%g
15262 s%@DLLTOOL@%$DLLTOOL%g
15263 s%@AS@%$AS%g
15264 s%@OBJDUMP@%$OBJDUMP%g
15265 s%@LIBTOOL@%$LIBTOOL%g
15266 s%@LN_H@%$LN_H%g
15267 s%@SENDMAIL@%$SENDMAIL%g
15268 s%@EDITOR@%$EDITOR%g
15269 s%@FINGER@%$FINGER%g
15270 s%@PERLBIN@%$PERLBIN%g
15271 s%@CPP@%$CPP%g
15272 s%@EXEEXT@%$EXEEXT%g
15273 s%@OBJEXT@%$OBJEXT%g
15274 s%@OL_MKDEP@%$OL_MKDEP%g
15275 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15276 s%@PEPSY@%$PEPSY%g
15277 s%@LIBOBJS@%$LIBOBJS%g
15278 s%@LIBSRCS@%$LIBSRCS%g
15279 s%@PLAT@%$PLAT%g
15280 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15281 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15282 s%@DYN_EXT@%$DYN_EXT%g
15283 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15284 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15285 s%@BUILD_BDB2@%$BUILD_BDB2%g
15286 s%@BUILD_LDAP@%$BUILD_LDAP%g
15287 s%@BUILD_LDBM@%$BUILD_LDBM%g
15288 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15289 s%@BUILD_PERL@%$BUILD_PERL%g
15290 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15291 s%@BUILD_SHELL@%$BUILD_SHELL%g
15292 s%@BUILD_TCL@%$BUILD_TCL%g
15293 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15294 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15295 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15296 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15297 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15298 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15299 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15300 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15301 s%@LDAP_LIBS@%$LDAP_LIBS%g
15302 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15303 s%@LDIF_LIBS@%$LDIF_LIBS%g
15304 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15305 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15306 s%@LDBM_LIBS@%$LDBM_LIBS%g
15307 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15308 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15309 s%@WRAP_LIBS@%$WRAP_LIBS%g
15310 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15311 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15312 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15313 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15314 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15315 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15316 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15317 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15318 s%@KRB_LIBS@%$KRB_LIBS%g
15319 s%@READLINE_LIBS@%$READLINE_LIBS%g
15320 s%@SASL_LIBS@%$SASL_LIBS%g
15321 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15322 s%@TLS_LIBS@%$TLS_LIBS%g
15323 s%@MODULES_LIBS@%$MODULES_LIBS%g
15324
15325 CEOF
15326 EOF
15327
15328 cat >> $CONFIG_STATUS <<\EOF
15329
15330 # Split the substitutions into bite-sized pieces for seds with
15331 # small command number limits, like on Digital OSF/1 and HP-UX.
15332 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15333 ac_file=1 # Number of current file.
15334 ac_beg=1 # First line for current file.
15335 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15336 ac_more_lines=:
15337 ac_sed_cmds=""
15338 while $ac_more_lines; do
15339   if test $ac_beg -gt 1; then
15340     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15341   else
15342     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15343   fi
15344   if test ! -s conftest.s$ac_file; then
15345     ac_more_lines=false
15346     rm -f conftest.s$ac_file
15347   else
15348     if test -z "$ac_sed_cmds"; then
15349       ac_sed_cmds="sed -f conftest.s$ac_file"
15350     else
15351       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15352     fi
15353     ac_file=`expr $ac_file + 1`
15354     ac_beg=$ac_end
15355     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15356   fi
15357 done
15358 if test -z "$ac_sed_cmds"; then
15359   ac_sed_cmds=cat
15360 fi
15361 EOF
15362
15363 cat >> $CONFIG_STATUS <<EOF
15364
15365 CONFIG_FILES=\${CONFIG_FILES-"\
15366 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15367 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15368 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15369 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15370 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15371 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15372 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15373 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15374 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15375 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15376 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15377 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15378 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15379 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15380 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15381 include/Makefile:build/top.mk:include/Makefile.in \
15382 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15383 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15384 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15385 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15386 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15387 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15388 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15389 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15390 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15391 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15392 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15393 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15394 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15395 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15396 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15397 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15398 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15399 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15400 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15401 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15402 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15403 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15404 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15405 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15406 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15407 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15408 "}
15409 EOF
15410 cat >> $CONFIG_STATUS <<\EOF
15411 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15412   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15413   case "$ac_file" in
15414   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15415        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15416   *) ac_file_in="${ac_file}.in" ;;
15417   esac
15418
15419   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15420
15421   # Remove last slash and all that follows it.  Not all systems have dirname.
15422   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15423   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15424     # The file is in a subdirectory.
15425     test ! -d "$ac_dir" && mkdir "$ac_dir"
15426     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15427     # A "../" for each directory in $ac_dir_suffix.
15428     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15429   else
15430     ac_dir_suffix= ac_dots=
15431   fi
15432
15433   case "$ac_given_srcdir" in
15434   .)  srcdir=.
15435       if test -z "$ac_dots"; then top_srcdir=.
15436       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15437   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15438   *) # Relative path.
15439     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15440     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15441   esac
15442
15443   case "$ac_given_INSTALL" in
15444   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15445   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15446   esac
15447
15448   echo creating "$ac_file"
15449   rm -f "$ac_file"
15450   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15451   case "$ac_file" in
15452   *Makefile*) ac_comsub="1i\\
15453 # $configure_input" ;;
15454   *) ac_comsub= ;;
15455   esac
15456
15457   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15458   sed -e "$ac_comsub
15459 s%@configure_input@%$configure_input%g
15460 s%@srcdir@%$srcdir%g
15461 s%@top_srcdir@%$top_srcdir%g
15462 s%@INSTALL@%$INSTALL%g
15463 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15464 fi; done
15465 rm -f conftest.s*
15466
15467 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15468 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15469 #
15470 # ac_d sets the value in "#define NAME VALUE" lines.
15471 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15472 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15473 ac_dC='\3'
15474 ac_dD='%g'
15475 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15476 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15477 ac_uB='\([      ]\)%\1#\2define\3'
15478 ac_uC=' '
15479 ac_uD='\4%g'
15480 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15481 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15482 ac_eB='$%\1#\2define\3'
15483 ac_eC=' '
15484 ac_eD='%g'
15485
15486 if test "${CONFIG_HEADERS+set}" != set; then
15487 EOF
15488 cat >> $CONFIG_STATUS <<EOF
15489   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15490 EOF
15491 cat >> $CONFIG_STATUS <<\EOF
15492 fi
15493 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15494   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15495   case "$ac_file" in
15496   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15497        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15498   *) ac_file_in="${ac_file}.in" ;;
15499   esac
15500
15501   echo creating $ac_file
15502
15503   rm -f conftest.frag conftest.in conftest.out
15504   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15505   cat $ac_file_inputs > conftest.in
15506
15507 EOF
15508
15509 # Transform confdefs.h into a sed script conftest.vals that substitutes
15510 # the proper values into config.h.in to produce config.h.  And first:
15511 # Protect against being on the right side of a sed subst in config.status.
15512 # Protect against being in an unquoted here document in config.status.
15513 rm -f conftest.vals
15514 cat > conftest.hdr <<\EOF
15515 s/[\\&%]/\\&/g
15516 s%[\\$`]%\\&%g
15517 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15518 s%ac_d%ac_u%gp
15519 s%ac_u%ac_e%gp
15520 EOF
15521 sed -n -f conftest.hdr confdefs.h > conftest.vals
15522 rm -f conftest.hdr
15523
15524 # This sed command replaces #undef with comments.  This is necessary, for
15525 # example, in the case of _POSIX_SOURCE, which is predefined and required
15526 # on some systems where configure will not decide to define it.
15527 cat >> conftest.vals <<\EOF
15528 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15529 EOF
15530
15531 # Break up conftest.vals because some shells have a limit on
15532 # the size of here documents, and old seds have small limits too.
15533
15534 rm -f conftest.tail
15535 while :
15536 do
15537   ac_lines=`grep -c . conftest.vals`
15538   # grep -c gives empty output for an empty file on some AIX systems.
15539   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15540   # Write a limited-size here document to conftest.frag.
15541   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15542   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15543   echo 'CEOF
15544   sed -f conftest.frag conftest.in > conftest.out
15545   rm -f conftest.in
15546   mv conftest.out conftest.in
15547 ' >> $CONFIG_STATUS
15548   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15549   rm -f conftest.vals
15550   mv conftest.tail conftest.vals
15551 done
15552 rm -f conftest.vals
15553
15554 cat >> $CONFIG_STATUS <<\EOF
15555   rm -f conftest.frag conftest.h
15556   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15557   cat conftest.in >> conftest.h
15558   rm -f conftest.in
15559   if cmp -s $ac_file conftest.h 2>/dev/null; then
15560     echo "$ac_file is unchanged"
15561     rm -f conftest.h
15562   else
15563     # Remove last slash and all that follows it.  Not all systems have dirname.
15564       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15565       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15566       # The file is in a subdirectory.
15567       test ! -d "$ac_dir" && mkdir "$ac_dir"
15568     fi
15569     rm -f $ac_file
15570     mv conftest.h $ac_file
15571   fi
15572 fi; done
15573
15574 EOF
15575 cat >> $CONFIG_STATUS <<EOF
15576
15577 EOF
15578 cat >> $CONFIG_STATUS <<\EOF
15579
15580 date > stamp-h
15581 echo Please \"make depend\" to build dependencies
15582
15583 exit 0
15584 EOF
15585 chmod +x $CONFIG_STATUS
15586 rm -fr confdefs* $ac_clean_files
15587 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15588