]> git.sur5r.net Git - openldap/blob - configure
Experimental support for GNU Pth's Posix Thread API. This might be a
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-multimaster        enable multimaster replication (no)"
65 ac_help="$ac_help
66     --enable-phonetic   enable phonetic/soundex (no)"
67 ac_help="$ac_help
68     --enable-quipu      build quipu migration tools (no)"
69 ac_help="$ac_help
70     --enable-rlookups   enable reverse lookups (auto)"
71 ac_help="$ac_help
72     --enable-aci        enable per-object ACIs (no)"
73 ac_help="$ac_help
74     --enable-discreteaci        enable discrete rights in ACIs (no)"
75 ac_help="$ac_help
76     --enable-wrappers   enable tcp wrapper support (no)"
77 ac_help="$ac_help
78     --enable-bdb2       enable bdb2 backend (no)"
79 ac_help="$ac_help
80       --with-bdb2-module        module type (static)"
81 ac_help="$ac_help
82     --enable-ldap       enable ldap backend (no)"
83 ac_help="$ac_help
84       --with-ldap-module        module type (static)"
85 ac_help="$ac_help
86     --enable-ldbm       enable ldbm backend (yes)"
87 ac_help="$ac_help
88       --with-ldbm-module        module type (static)"
89 ac_help="$ac_help
90       --with-ldbm-api   use LDBM API (auto)"
91 ac_help="$ac_help
92       --with-ldbm-type  use LDBM type (auto)"
93 ac_help="$ac_help
94     --enable-passwd     enable passwd backend (no)"
95 ac_help="$ac_help
96       --with-passwd-module      module type (static)"
97 ac_help="$ac_help
98     --enable-perl       enable perl backend (no)"
99 ac_help="$ac_help
100       --with-perl-module        module type (static)"
101 ac_help="$ac_help
102     --enable-shell      enable shell backend (no)"
103 ac_help="$ac_help
104       --with-shell-module       module type (static)"
105 ac_help="$ac_help
106     --enable-tcl        enable tcl backend (no)"
107 ac_help="$ac_help
108       --with-tcl-module module type (static)"
109 ac_help="$ac_help
110 SLURPD Options:"
111 ac_help="$ac_help
112   --enable-slurpd       enable building slurpd (auto)"
113 ac_help="$ac_help
114 Library Generation & Linking Options"
115 ac_help="$ac_help
116   --enable-static[=PKGS]  build static libraries [default=yes]"
117 ac_help="$ac_help
118   --enable-shared[=PKGS]  build shared libraries [default=yes]"
119 ac_help="$ac_help
120   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
121 ac_help="$ac_help
122   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
123 ac_help="$ac_help
124   --disable-libtool-lock  avoid locking (might break parallel builds)"
125
126 # Initialize some variables set by options.
127 # The variables have the same names as the options, with
128 # dashes changed to underlines.
129 build=NONE
130 cache_file=./config.cache
131 exec_prefix=NONE
132 host=NONE
133 no_create=
134 nonopt=NONE
135 no_recursion=
136 prefix=NONE
137 program_prefix=NONE
138 program_suffix=NONE
139 program_transform_name=s,x,x,
140 silent=
141 site=
142 srcdir=
143 target=NONE
144 verbose=
145 x_includes=NONE
146 x_libraries=NONE
147 bindir='${exec_prefix}/bin'
148 sbindir='${exec_prefix}/sbin'
149 libexecdir='${exec_prefix}/libexec'
150 datadir='${prefix}/share'
151 sysconfdir='${prefix}/etc'
152 sharedstatedir='${prefix}/com'
153 localstatedir='${prefix}/var'
154 libdir='${exec_prefix}/lib'
155 includedir='${prefix}/include'
156 oldincludedir='/usr/include'
157 infodir='${prefix}/info'
158 mandir='${prefix}/man'
159
160 # Initialize some other variables.
161 subdirs=
162 MFLAGS= MAKEFLAGS=
163 SHELL=${CONFIG_SHELL-/bin/sh}
164 # Maximum number of lines to put in a shell here document.
165 ac_max_here_lines=12
166
167 ac_prev=
168 for ac_option
169 do
170
171   # If the previous option needs an argument, assign it.
172   if test -n "$ac_prev"; then
173     eval "$ac_prev=\$ac_option"
174     ac_prev=
175     continue
176   fi
177
178   case "$ac_option" in
179   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
180   *) ac_optarg= ;;
181   esac
182
183   # Accept the important Cygnus configure options, so we can diagnose typos.
184
185   case "$ac_option" in
186
187   -bindir | --bindir | --bindi | --bind | --bin | --bi)
188     ac_prev=bindir ;;
189   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
190     bindir="$ac_optarg" ;;
191
192   -build | --build | --buil | --bui | --bu)
193     ac_prev=build ;;
194   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
195     build="$ac_optarg" ;;
196
197   -cache-file | --cache-file | --cache-fil | --cache-fi \
198   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
199     ac_prev=cache_file ;;
200   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
201   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
202     cache_file="$ac_optarg" ;;
203
204   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
205     ac_prev=datadir ;;
206   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
207   | --da=*)
208     datadir="$ac_optarg" ;;
209
210   -disable-* | --disable-*)
211     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
212     # Reject names that are not valid shell variable names.
213     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
214       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
215     fi
216     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
217     eval "enable_${ac_feature}=no" ;;
218
219   -enable-* | --enable-*)
220     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
221     # Reject names that are not valid shell variable names.
222     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
223       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
224     fi
225     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
226     case "$ac_option" in
227       *=*) ;;
228       *) ac_optarg=yes ;;
229     esac
230     eval "enable_${ac_feature}='$ac_optarg'" ;;
231
232   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
233   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
234   | --exec | --exe | --ex)
235     ac_prev=exec_prefix ;;
236   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
237   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
238   | --exec=* | --exe=* | --ex=*)
239     exec_prefix="$ac_optarg" ;;
240
241   -gas | --gas | --ga | --g)
242     # Obsolete; use --with-gas.
243     with_gas=yes ;;
244
245   -help | --help | --hel | --he)
246     # Omit some internal or obsolete options to make the list less imposing.
247     # This message is too long to be a string in the A/UX 3.1 sh.
248     cat << EOF
249 Usage: configure [options] [host]
250 Options: [defaults in brackets after descriptions]
251 Configuration:
252   --cache-file=FILE       cache test results in FILE
253   --help                  print this message
254   --no-create             do not create output files
255   --quiet, --silent       do not print \`checking...' messages
256   --version               print the version of autoconf that created configure
257 Directory and file names:
258   --prefix=PREFIX         install architecture-independent files in PREFIX
259                           [$ac_default_prefix]
260   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
261                           [same as prefix]
262   --bindir=DIR            user executables in DIR [EPREFIX/bin]
263   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
264   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
265   --datadir=DIR           read-only architecture-independent data in DIR
266                           [PREFIX/share]
267   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
268   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
269                           [PREFIX/com]
270   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
271   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
272   --includedir=DIR        C header files in DIR [PREFIX/include]
273   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
274   --infodir=DIR           info documentation in DIR [PREFIX/info]
275   --mandir=DIR            man documentation in DIR [PREFIX/man]
276   --srcdir=DIR            find the sources in DIR [configure dir or ..]
277   --program-prefix=PREFIX prepend PREFIX to installed program names
278   --program-suffix=SUFFIX append SUFFIX to installed program names
279   --program-transform-name=PROGRAM
280                           run sed PROGRAM on installed program names
281 EOF
282     cat << EOF
283 Host type:
284   --build=BUILD           configure for building on BUILD [BUILD=HOST]
285   --host=HOST             configure for HOST [guessed]
286   --target=TARGET         configure for TARGET [TARGET=HOST]
287 Features and packages:
288   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
289   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
290   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
291   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
292   --x-includes=DIR        X include files are in DIR
293   --x-libraries=DIR       X library files are in DIR
294 EOF
295     if test -n "$ac_help"; then
296       echo "--enable and --with options recognized:$ac_help"
297     fi
298     exit 0 ;;
299
300   -host | --host | --hos | --ho)
301     ac_prev=host ;;
302   -host=* | --host=* | --hos=* | --ho=*)
303     host="$ac_optarg" ;;
304
305   -includedir | --includedir | --includedi | --included | --include \
306   | --includ | --inclu | --incl | --inc)
307     ac_prev=includedir ;;
308   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
309   | --includ=* | --inclu=* | --incl=* | --inc=*)
310     includedir="$ac_optarg" ;;
311
312   -infodir | --infodir | --infodi | --infod | --info | --inf)
313     ac_prev=infodir ;;
314   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
315     infodir="$ac_optarg" ;;
316
317   -libdir | --libdir | --libdi | --libd)
318     ac_prev=libdir ;;
319   -libdir=* | --libdir=* | --libdi=* | --libd=*)
320     libdir="$ac_optarg" ;;
321
322   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
323   | --libexe | --libex | --libe)
324     ac_prev=libexecdir ;;
325   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
326   | --libexe=* | --libex=* | --libe=*)
327     libexecdir="$ac_optarg" ;;
328
329   -localstatedir | --localstatedir | --localstatedi | --localstated \
330   | --localstate | --localstat | --localsta | --localst \
331   | --locals | --local | --loca | --loc | --lo)
332     ac_prev=localstatedir ;;
333   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
334   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
335   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
336     localstatedir="$ac_optarg" ;;
337
338   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
339     ac_prev=mandir ;;
340   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
341     mandir="$ac_optarg" ;;
342
343   -nfp | --nfp | --nf)
344     # Obsolete; use --without-fp.
345     with_fp=no ;;
346
347   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
348   | --no-cr | --no-c)
349     no_create=yes ;;
350
351   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
352   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
353     no_recursion=yes ;;
354
355   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
356   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
357   | --oldin | --oldi | --old | --ol | --o)
358     ac_prev=oldincludedir ;;
359   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
360   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
361   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
362     oldincludedir="$ac_optarg" ;;
363
364   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
365     ac_prev=prefix ;;
366   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
367     prefix="$ac_optarg" ;;
368
369   -program-prefix | --program-prefix | --program-prefi | --program-pref \
370   | --program-pre | --program-pr | --program-p)
371     ac_prev=program_prefix ;;
372   -program-prefix=* | --program-prefix=* | --program-prefi=* \
373   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
374     program_prefix="$ac_optarg" ;;
375
376   -program-suffix | --program-suffix | --program-suffi | --program-suff \
377   | --program-suf | --program-su | --program-s)
378     ac_prev=program_suffix ;;
379   -program-suffix=* | --program-suffix=* | --program-suffi=* \
380   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
381     program_suffix="$ac_optarg" ;;
382
383   -program-transform-name | --program-transform-name \
384   | --program-transform-nam | --program-transform-na \
385   | --program-transform-n | --program-transform- \
386   | --program-transform | --program-transfor \
387   | --program-transfo | --program-transf \
388   | --program-trans | --program-tran \
389   | --progr-tra | --program-tr | --program-t)
390     ac_prev=program_transform_name ;;
391   -program-transform-name=* | --program-transform-name=* \
392   | --program-transform-nam=* | --program-transform-na=* \
393   | --program-transform-n=* | --program-transform-=* \
394   | --program-transform=* | --program-transfor=* \
395   | --program-transfo=* | --program-transf=* \
396   | --program-trans=* | --program-tran=* \
397   | --progr-tra=* | --program-tr=* | --program-t=*)
398     program_transform_name="$ac_optarg" ;;
399
400   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
401   | -silent | --silent | --silen | --sile | --sil)
402     silent=yes ;;
403
404   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
405     ac_prev=sbindir ;;
406   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
407   | --sbi=* | --sb=*)
408     sbindir="$ac_optarg" ;;
409
410   -sharedstatedir | --sharedstatedir | --sharedstatedi \
411   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
412   | --sharedst | --shareds | --shared | --share | --shar \
413   | --sha | --sh)
414     ac_prev=sharedstatedir ;;
415   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
416   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
417   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
418   | --sha=* | --sh=*)
419     sharedstatedir="$ac_optarg" ;;
420
421   -site | --site | --sit)
422     ac_prev=site ;;
423   -site=* | --site=* | --sit=*)
424     site="$ac_optarg" ;;
425
426   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
427     ac_prev=srcdir ;;
428   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
429     srcdir="$ac_optarg" ;;
430
431   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
432   | --syscon | --sysco | --sysc | --sys | --sy)
433     ac_prev=sysconfdir ;;
434   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
435   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
436     sysconfdir="$ac_optarg" ;;
437
438   -target | --target | --targe | --targ | --tar | --ta | --t)
439     ac_prev=target ;;
440   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
441     target="$ac_optarg" ;;
442
443   -v | -verbose | --verbose | --verbos | --verbo | --verb)
444     verbose=yes ;;
445
446   -version | --version | --versio | --versi | --vers)
447     echo "configure generated by autoconf version 2.13.1"
448     exit 0 ;;
449
450   -with-* | --with-*)
451     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
452     # Reject names that are not valid shell variable names.
453     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
454       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
455     fi
456     ac_package=`echo $ac_package| sed 's/-/_/g'`
457     case "$ac_option" in
458       *=*) ;;
459       *) ac_optarg=yes ;;
460     esac
461     eval "with_${ac_package}='$ac_optarg'" ;;
462
463   -without-* | --without-*)
464     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
465     # Reject names that are not valid shell variable names.
466     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
467       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
468     fi
469     ac_package=`echo $ac_package| sed 's/-/_/g'`
470     eval "with_${ac_package}=no" ;;
471
472   --x)
473     # Obsolete; use --with-x.
474     with_x=yes ;;
475
476   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
477   | --x-incl | --x-inc | --x-in | --x-i)
478     ac_prev=x_includes ;;
479   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
480   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
481     x_includes="$ac_optarg" ;;
482
483   -x-libraries | --x-libraries | --x-librarie | --x-librari \
484   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
485     ac_prev=x_libraries ;;
486   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
487   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
488     x_libraries="$ac_optarg" ;;
489
490   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
491     ;;
492
493   *)
494     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
495       echo "configure: warning: $ac_option: invalid host type" 1>&2
496     fi
497     if test "x$nonopt" != xNONE; then
498       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
499     fi
500     nonopt="$ac_option"
501     ;;
502
503   esac
504 done
505
506 if test -n "$ac_prev"; then
507   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
508 fi
509
510 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
511
512 # File descriptor usage:
513 # 0 standard input
514 # 1 file creation
515 # 2 errors and warnings
516 # 3 some systems may open it to /dev/tty
517 # 4 used on the Kubota Titan
518 # 6 checking for... messages and results
519 # 5 compiler messages saved in config.log
520 if test "$silent" = yes; then
521   exec 6>/dev/null
522 else
523   exec 6>&1
524 fi
525 exec 5>./config.log
526
527 echo "\
528 This file contains any messages produced by compilers while
529 running configure, to aid debugging if configure makes a mistake.
530 " 1>&5
531
532 # Strip out --no-create and --no-recursion so they do not pile up.
533 # Also quote any args containing shell metacharacters.
534 ac_configure_args=
535 for ac_arg
536 do
537   case "$ac_arg" in
538   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
539   | --no-cr | --no-c) ;;
540   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
541   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
542   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
543   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
544   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
545   esac
546 done
547
548 # NLS nuisances.
549 # Only set these to C if already set.  These must not be set unconditionally
550 # because not all systems understand e.g. LANG=C (notably SCO).
551 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
552 # Non-C LC_CTYPE values break the ctype check.
553 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
554 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
555 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
556 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
557
558 # confdefs.h avoids OS command line length limits that DEFS can exceed.
559 rm -rf conftest* confdefs.h
560 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
561 echo > confdefs.h
562
563 # A filename unique to this package, relative to the directory that
564 # configure is in, which we can look for to find out if srcdir is correct.
565 ac_unique_file=build/version
566
567 # Find the source files, if location was not specified.
568 if test -z "$srcdir"; then
569   ac_srcdir_defaulted=yes
570   # Try the directory containing this script, then its parent.
571   ac_prog=$0
572   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
573   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
574   srcdir=$ac_confdir
575   if test ! -r $srcdir/$ac_unique_file; then
576     srcdir=..
577   fi
578 else
579   ac_srcdir_defaulted=no
580 fi
581 if test ! -r $srcdir/$ac_unique_file; then
582   if test "$ac_srcdir_defaulted" = yes; then
583     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
584   else
585     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
586   fi
587 fi
588 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
589
590 # Prefer explicitly selected file to automatically selected ones.
591 if test -z "$CONFIG_SITE"; then
592   if test "x$prefix" != xNONE; then
593     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
594   else
595     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
596   fi
597 fi
598 for ac_site_file in $CONFIG_SITE; do
599   if test -r "$ac_site_file"; then
600     echo "loading site script $ac_site_file"
601     . "$ac_site_file"
602   fi
603 done
604
605
606 ac_ext=c
607 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
608 ac_cpp='$CPP $CPPFLAGS'
609 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
610 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
611 cross_compiling=$ac_cv_prog_cc_cross
612
613 ac_exeext=
614 ac_objext=o
615 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
616   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
617   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
618     ac_n= ac_c='
619 ' ac_t='        '
620   else
621     ac_n=-n ac_c= ac_t=
622   fi
623 else
624   ac_n= ac_c='\c' ac_t=
625 fi
626
627 ac_aux_dir=
628 for ac_dir in build $srcdir/build; do
629   if test -f $ac_dir/install-sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install-sh -c"
632     break
633   elif test -f $ac_dir/install.sh; then
634     ac_aux_dir=$ac_dir
635     ac_install_sh="$ac_aux_dir/install.sh -c"
636     break
637   fi
638 done
639 if test -z "$ac_aux_dir"; then
640   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
641 fi
642 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
643 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
644 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
645
646 OL_VERSION=`cat $ac_aux_dir/version`
647 if test -z "$OL_VERSION"; then
648         { echo "configure: error: could not determine version" 1>&2; exit 1; }
649 fi
650
651
652 echo $ac_n "checking host system type""... $ac_c" 1>&6
653 echo "configure:654: checking host system type" >&5
654 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
655
656 # Make sure we can run config.sub.
657   if $ac_config_sub sun4 >/dev/null 2>&1; then :
658     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
659   fi
660
661   ac_cv_host_alias=$host
662   case "$ac_cv_host_alias" in
663   NONE)
664     case $nonopt in
665     NONE)
666       if ac_cv_host_alias=`$ac_config_guess`; then :
667       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
668       fi ;;
669     *) ac_cv_host_alias=$nonopt ;;
670     esac ;;
671   esac
672
673   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
674   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
675   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
676   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
677 else
678   echo $ac_n "(cached) $ac_c" 1>&6
679 fi
680
681 echo "$ac_t""$ac_cv_host" 1>&6
682
683 host=$ac_cv_host
684 host_alias=$ac_cv_host_alias
685 host_cpu=$ac_cv_host_cpu
686 host_vendor=$ac_cv_host_vendor
687 host_os=$ac_cv_host_os
688
689
690
691
692
693 echo $ac_n "checking target system type""... $ac_c" 1>&6
694 echo "configure:695: checking target system type" >&5
695 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
696
697 # Make sure we can run config.sub.
698   if $ac_config_sub sun4 >/dev/null 2>&1; then :
699     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
700   fi
701
702   ac_cv_target_alias=$target
703   case "$ac_cv_target_alias" in
704   NONE)
705     case $nonopt in
706     NONE)
707       ac_cv_target_alias=$host_alias ;;
708
709     *) ac_cv_target_alias=$nonopt ;;
710     esac ;;
711   esac
712
713   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
714   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
715   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
716   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
717 else
718   echo $ac_n "(cached) $ac_c" 1>&6
719 fi
720
721 echo "$ac_t""$ac_cv_target" 1>&6
722
723 target=$ac_cv_target
724 target_alias=$ac_cv_target_alias
725 target_cpu=$ac_cv_target_cpu
726 target_vendor=$ac_cv_target_vendor
727 target_os=$ac_cv_target_os
728
729
730
731
732
733 echo $ac_n "checking build system type""... $ac_c" 1>&6
734 echo "configure:735: checking build system type" >&5
735 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
736
737 # Make sure we can run config.sub.
738   if $ac_config_sub sun4 >/dev/null 2>&1; then :
739     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
740   fi
741
742   ac_cv_build_alias=$build
743   case "$ac_cv_build_alias" in
744   NONE)
745     case $nonopt in
746     NONE)
747       ac_cv_build_alias=$host_alias ;;
748
749     *) ac_cv_build_alias=$nonopt ;;
750     esac ;;
751   esac
752
753   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
754   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
755   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
756   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
757 else
758   echo $ac_n "(cached) $ac_c" 1>&6
759 fi
760
761 echo "$ac_t""$ac_cv_build" 1>&6
762
763 build=$ac_cv_build
764 build_alias=$ac_cv_build_alias
765 build_cpu=$ac_cv_build_cpu
766 build_vendor=$ac_cv_build_vendor
767 build_os=$ac_cv_build_os
768
769
770
771
772
773 # Do some error checking and defaulting for the host and target type.
774 # The inputs are:
775 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
776 #
777 # The rules are:
778 # 1. You are not allowed to specify --host, --target, and nonopt at the
779 #    same time.
780 # 2. Host defaults to nonopt.
781 # 3. If nonopt is not specified, then host defaults to the current host,
782 #    as determined by config.guess.
783 # 4. Target and build default to nonopt.
784 # 5. If nonopt is not specified, then target and build default to host.
785
786 # The aliases save the names the user supplied, while $host etc.
787 # will get canonicalized.
788 case $host---$target---$nonopt in
789 NONE---*---* | *---NONE---* | *---*---NONE) ;;
790 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
791 esac
792
793 test "$host_alias" != "$target_alias" &&
794   test "$program_prefix$program_suffix$program_transform_name" = \
795     NONENONEs,x,x, &&
796   program_prefix=${target_alias}-
797
798
799 # Find a good install program.  We prefer a C program (faster),
800 # so one script is as good as another.  But avoid the broken or
801 # incompatible versions:
802 # SysV /etc/install, /usr/sbin/install
803 # SunOS /usr/etc/install
804 # IRIX /sbin/install
805 # AIX /bin/install
806 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
807 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
808 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
809 # ./install, which can be erroneously created by make from ./install.sh.
810 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
811 echo "configure:812: checking for a BSD compatible install" >&5
812 if test -z "$INSTALL"; then
813 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
814   echo $ac_n "(cached) $ac_c" 1>&6
815 else
816     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
817   for ac_dir in $PATH; do
818     # Account for people who put trailing slashes in PATH elements.
819     case "$ac_dir/" in
820     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
821     *)
822       # OSF1 and SCO ODT 3.0 have their own names for install.
823       # Don't use installbsd from OSF since it installs stuff as root
824       # by default.
825       for ac_prog in ginstall scoinst install; do
826         if test -f $ac_dir/$ac_prog; then
827           if test $ac_prog = install &&
828             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
829             # AIX install.  It has an incompatible calling convention.
830             :
831           elif test $ac_prog = install &&
832             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
833             # program-specific install script used by HP pwplus--don't use.
834             :
835           else
836             ac_cv_path_install="$ac_dir/$ac_prog -c"
837             break 2
838           fi
839         fi
840       done
841       ;;
842     esac
843   done
844   IFS="$ac_save_IFS"
845
846 fi
847   if test "${ac_cv_path_install+set}" = set; then
848     INSTALL="$ac_cv_path_install"
849   else
850     # As a last resort, use the slow shell script.  We don't cache a
851     # path for INSTALL within a source directory, because that will
852     # break other packages using the cache if that directory is
853     # removed, or if the path is relative.
854     INSTALL="$ac_install_sh"
855   fi
856 fi
857 echo "$ac_t""$INSTALL" 1>&6
858
859 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
860 # It thinks the first close brace ends the variable substitution.
861 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
862
863 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
864
865 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
866
867 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
868 echo "configure:869: checking whether build environment is sane" >&5
869 # Just in case
870 sleep 1
871 echo timestamp > conftestfile
872 # Do `set' in a subshell so we don't clobber the current shell's
873 # arguments.  Must try -L first in case configure is actually a
874 # symlink; some systems play weird games with the mod time of symlinks
875 # (eg FreeBSD returns the mod time of the symlink's containing
876 # directory).
877 if (
878    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
879    if test "$*" = "X"; then
880       # -L didn't work.
881       set X `ls -t $srcdir/configure conftestfile`
882    fi
883    if test "$*" != "X $srcdir/configure conftestfile" \
884       && test "$*" != "X conftestfile $srcdir/configure"; then
885
886       # If neither matched, then we have a broken ls.  This can happen
887       # if, for instance, CONFIG_SHELL is bash and it inherits a
888       # broken ls alias from the environment.  This has actually
889       # happened.  Such a system could not be considered "sane".
890       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
891 alias in your environment" 1>&2; exit 1; }
892    fi
893
894    test "$2" = conftestfile
895    )
896 then
897    # Ok.
898    :
899 else
900    { echo "configure: error: newly created file is older than distributed files!
901 Check your system clock" 1>&2; exit 1; }
902 fi
903 rm -f conftest*
904 echo "$ac_t""yes" 1>&6
905 if test "$program_transform_name" = s,x,x,; then
906   program_transform_name=
907 else
908   # Double any \ or $.  echo might interpret backslashes.
909   cat <<\EOF_SED > conftestsed
910 s,\\,\\\\,g; s,\$,$$,g
911 EOF_SED
912   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
913   rm -f conftestsed
914 fi
915 test "$program_prefix" != NONE &&
916   program_transform_name="s,^,${program_prefix},;$program_transform_name"
917 # Use a double $ so make ignores it.
918 test "$program_suffix" != NONE &&
919   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
920
921 # sed with no file args requires a program.
922 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
923
924 for ac_prog in mawk gawk nawk awk
925 do
926 # Extract the first word of "$ac_prog", so it can be a program name with args.
927 set dummy $ac_prog; ac_word=$2
928 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
929 echo "configure:930: checking for $ac_word" >&5
930 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
931   echo $ac_n "(cached) $ac_c" 1>&6
932 else
933   if test -n "$AWK"; then
934   ac_cv_prog_AWK="$AWK" # Let the user override the test.
935 else
936   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
937   ac_dummy="$PATH"
938   for ac_dir in $ac_dummy; do
939     test -z "$ac_dir" && ac_dir=.
940     if test -f $ac_dir/$ac_word; then
941       ac_cv_prog_AWK="$ac_prog"
942       break
943     fi
944   done
945   IFS="$ac_save_ifs"
946 fi
947 fi
948 AWK="$ac_cv_prog_AWK"
949 if test -n "$AWK"; then
950   echo "$ac_t""$AWK" 1>&6
951 else
952   echo "$ac_t""no" 1>&6
953 fi
954
955 test -n "$AWK" && break
956 done
957
958 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
959 echo "configure:960: checking whether ${MAKE-make} sets \${MAKE}" >&5
960 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
961 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
962   echo $ac_n "(cached) $ac_c" 1>&6
963 else
964   cat > conftestmake <<\EOF
965 all:
966         @echo 'ac_maketemp="${MAKE}"'
967 EOF
968 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
969 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
970 if test -n "$ac_maketemp"; then
971   eval ac_cv_prog_make_${ac_make}_set=yes
972 else
973   eval ac_cv_prog_make_${ac_make}_set=no
974 fi
975 rm -f conftestmake
976 fi
977 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
978   echo "$ac_t""yes" 1>&6
979   SET_MAKE=
980 else
981   echo "$ac_t""no" 1>&6
982   SET_MAKE="MAKE=${MAKE-make}"
983 fi
984
985
986
987 PACKAGE=OpenLDAP
988
989 VERSION=$OL_VERSION
990
991 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
992   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
993 fi
994
995
996
997 missing_dir=`cd $ac_aux_dir && pwd`
998 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
999 echo "configure:1000: checking for working aclocal" >&5
1000 # Run test in a subshell; some versions of sh will print an error if
1001 # an executable is not found, even if stderr is redirected.
1002 # Redirect stdin to placate older versions of autoconf.  Sigh.
1003 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1004    ACLOCAL=aclocal
1005    echo "$ac_t""found" 1>&6
1006 else
1007    ACLOCAL="$missing_dir/missing aclocal"
1008    echo "$ac_t""missing" 1>&6
1009 fi
1010
1011 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1012 echo "configure:1013: checking for working autoconf" >&5
1013 # Run test in a subshell; some versions of sh will print an error if
1014 # an executable is not found, even if stderr is redirected.
1015 # Redirect stdin to placate older versions of autoconf.  Sigh.
1016 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1017    AUTOCONF=autoconf
1018    echo "$ac_t""found" 1>&6
1019 else
1020    AUTOCONF="$missing_dir/missing autoconf"
1021    echo "$ac_t""missing" 1>&6
1022 fi
1023
1024 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1025 echo "configure:1026: checking for working automake" >&5
1026 # Run test in a subshell; some versions of sh will print an error if
1027 # an executable is not found, even if stderr is redirected.
1028 # Redirect stdin to placate older versions of autoconf.  Sigh.
1029 if (automake --version) < /dev/null > /dev/null 2>&1; then
1030    AUTOMAKE=automake
1031    echo "$ac_t""found" 1>&6
1032 else
1033    AUTOMAKE="$missing_dir/missing automake"
1034    echo "$ac_t""missing" 1>&6
1035 fi
1036
1037 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1038 echo "configure:1039: checking for working autoheader" >&5
1039 # Run test in a subshell; some versions of sh will print an error if
1040 # an executable is not found, even if stderr is redirected.
1041 # Redirect stdin to placate older versions of autoconf.  Sigh.
1042 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1043    AUTOHEADER=autoheader
1044    echo "$ac_t""found" 1>&6
1045 else
1046    AUTOHEADER="$missing_dir/missing autoheader"
1047    echo "$ac_t""missing" 1>&6
1048 fi
1049
1050 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1051 echo "configure:1052: checking for working makeinfo" >&5
1052 # Run test in a subshell; some versions of sh will print an error if
1053 # an executable is not found, even if stderr is redirected.
1054 # Redirect stdin to placate older versions of autoconf.  Sigh.
1055 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1056    MAKEINFO=makeinfo
1057    echo "$ac_t""found" 1>&6
1058 else
1059    MAKEINFO="$missing_dir/missing makeinfo"
1060    echo "$ac_t""missing" 1>&6
1061 fi
1062
1063 install_sh="$missing_dir/install-sh"
1064 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1065
1066 for ac_prog in gnutar gtar tar
1067 do
1068 # Extract the first word of "$ac_prog", so it can be a program name with args.
1069 set dummy $ac_prog; ac_word=$2
1070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1071 echo "configure:1072: checking for $ac_word" >&5
1072 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1073   echo $ac_n "(cached) $ac_c" 1>&6
1074 else
1075   if test -n "$AMTAR"; then
1076   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1077 else
1078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1079   ac_dummy="$PATH"
1080   for ac_dir in $ac_dummy; do
1081     test -z "$ac_dir" && ac_dir=.
1082     if test -f $ac_dir/$ac_word; then
1083       ac_cv_prog_AMTAR="$ac_prog"
1084       break
1085     fi
1086   done
1087   IFS="$ac_save_ifs"
1088 fi
1089 fi
1090 AMTAR="$ac_cv_prog_AMTAR"
1091 if test -n "$AMTAR"; then
1092   echo "$ac_t""$AMTAR" 1>&6
1093 else
1094   echo "$ac_t""no" 1>&6
1095 fi
1096
1097 test -n "$AMTAR" && break
1098 done
1099
1100
1101 AMTARFLAGS=
1102 if test -n "$AMTAR"; then
1103   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1104         AMTARFLAGS=o
1105   fi
1106 fi
1107
1108
1109
1110 cat >> confdefs.h <<EOF
1111 #define OPENLDAP_PACKAGE "$PACKAGE"
1112 EOF
1113
1114 cat >> confdefs.h <<EOF
1115 #define OPENLDAP_VERSION "$VERSION"
1116 EOF
1117
1118
1119
1120
1121 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1122 echo "configure:1123: checking configure arguments" >&5
1123
1124
1125 top_builddir=`pwd`
1126
1127 ldap_subdir="/openldap"
1128
1129 # Check whether --with-subdir or --without-subdir was given.
1130 if test "${with_subdir+set}" = set; then
1131   withval="$with_subdir"
1132   case "$withval" in
1133         no) ldap_subdir=""
1134                 ;;
1135         yes)
1136                 ;;
1137         /*|\\*)
1138                 ldap_subdir="$withval"
1139                 ;;
1140         *)
1141                 ldap_subdir="/$withval"
1142                 ;;
1143 esac
1144
1145 fi
1146
1147
1148 # OpenLDAP --enable-debug
1149         # Check whether --enable-debug or --disable-debug was given.
1150 if test "${enable_debug+set}" = set; then
1151   enableval="$enable_debug"
1152   
1153         ol_arg=invalid
1154         for ol_val in auto yes no ; do
1155                 if test "$enableval" = "$ol_val" ; then
1156                         ol_arg="$ol_val"
1157                 fi
1158         done
1159         if test "$ol_arg" = "invalid" ; then
1160                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1161         fi
1162         ol_enable_debug="$ol_arg"
1163
1164 else
1165         ol_enable_debug="yes"
1166 fi
1167 # end --enable-debug
1168 # OpenLDAP --enable-syslog
1169         # Check whether --enable-syslog or --disable-syslog was given.
1170 if test "${enable_syslog+set}" = set; then
1171   enableval="$enable_syslog"
1172   
1173         ol_arg=invalid
1174         for ol_val in auto yes no ; do
1175                 if test "$enableval" = "$ol_val" ; then
1176                         ol_arg="$ol_val"
1177                 fi
1178         done
1179         if test "$ol_arg" = "invalid" ; then
1180                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1181         fi
1182         ol_enable_syslog="$ol_arg"
1183
1184 else
1185         ol_enable_syslog="auto"
1186 fi
1187 # end --enable-syslog
1188 # OpenLDAP --enable-proctitle
1189         # Check whether --enable-proctitle or --disable-proctitle was given.
1190 if test "${enable_proctitle+set}" = set; then
1191   enableval="$enable_proctitle"
1192   
1193         ol_arg=invalid
1194         for ol_val in auto yes no ; do
1195                 if test "$enableval" = "$ol_val" ; then
1196                         ol_arg="$ol_val"
1197                 fi
1198         done
1199         if test "$ol_arg" = "invalid" ; then
1200                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1201         fi
1202         ol_enable_proctitle="$ol_arg"
1203
1204 else
1205         ol_enable_proctitle="yes"
1206 fi
1207 # end --enable-proctitle
1208 # OpenLDAP --enable-cache
1209         # Check whether --enable-cache or --disable-cache was given.
1210 if test "${enable_cache+set}" = set; then
1211   enableval="$enable_cache"
1212   
1213         ol_arg=invalid
1214         for ol_val in auto yes no ; do
1215                 if test "$enableval" = "$ol_val" ; then
1216                         ol_arg="$ol_val"
1217                 fi
1218         done
1219         if test "$ol_arg" = "invalid" ; then
1220                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1221         fi
1222         ol_enable_cache="$ol_arg"
1223
1224 else
1225         ol_enable_cache="yes"
1226 fi
1227 # end --enable-cache
1228 # OpenLDAP --enable-dns
1229         # Check whether --enable-dns or --disable-dns was given.
1230 if test "${enable_dns+set}" = set; then
1231   enableval="$enable_dns"
1232   
1233         ol_arg=invalid
1234         for ol_val in auto yes no ; do
1235                 if test "$enableval" = "$ol_val" ; then
1236                         ol_arg="$ol_val"
1237                 fi
1238         done
1239         if test "$ol_arg" = "invalid" ; then
1240                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1241         fi
1242         ol_enable_dns="$ol_arg"
1243
1244 else
1245         ol_enable_dns="no"
1246 fi
1247 # end --enable-dns
1248 # OpenLDAP --enable-referrals
1249         # Check whether --enable-referrals or --disable-referrals was given.
1250 if test "${enable_referrals+set}" = set; then
1251   enableval="$enable_referrals"
1252   
1253         ol_arg=invalid
1254         for ol_val in auto yes no ; do
1255                 if test "$enableval" = "$ol_val" ; then
1256                         ol_arg="$ol_val"
1257                 fi
1258         done
1259         if test "$ol_arg" = "invalid" ; then
1260                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1261         fi
1262         ol_enable_referrals="$ol_arg"
1263
1264 else
1265         ol_enable_referrals="yes"
1266 fi
1267 # end --enable-referrals
1268 # OpenLDAP --enable-cldap
1269         # Check whether --enable-cldap or --disable-cldap was given.
1270 if test "${enable_cldap+set}" = set; then
1271   enableval="$enable_cldap"
1272   
1273         ol_arg=invalid
1274         for ol_val in auto yes no ; do
1275                 if test "$enableval" = "$ol_val" ; then
1276                         ol_arg="$ol_val"
1277                 fi
1278         done
1279         if test "$ol_arg" = "invalid" ; then
1280                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1281         fi
1282         ol_enable_cldap="$ol_arg"
1283
1284 else
1285         ol_enable_cldap="no"
1286 fi
1287 # end --enable-cldap
1288 # OpenLDAP --enable-x_compile
1289         # Check whether --enable-x_compile or --disable-x_compile was given.
1290 if test "${enable_x_compile+set}" = set; then
1291   enableval="$enable_x_compile"
1292   
1293         ol_arg=invalid
1294         for ol_val in yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1301         fi
1302         ol_enable_x_compile="$ol_arg"
1303
1304 else
1305         ol_enable_x_compile="no"
1306 fi
1307 # end --enable-x_compile
1308
1309 # OpenLDAP --enable-dmalloc
1310         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1311 if test "${enable_dmalloc+set}" = set; then
1312   enableval="$enable_dmalloc"
1313   
1314         ol_arg=invalid
1315         for ol_val in auto yes no ; do
1316                 if test "$enableval" = "$ol_val" ; then
1317                         ol_arg="$ol_val"
1318                 fi
1319         done
1320         if test "$ol_arg" = "invalid" ; then
1321                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1322         fi
1323         ol_enable_dmalloc="$ol_arg"
1324
1325 else
1326         ol_enable_dmalloc="no"
1327 fi
1328 # end --enable-dmalloc
1329
1330 # OpenLDAP --with-cyrus_sasl
1331         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1332 if test "${with_cyrus_sasl+set}" = set; then
1333   withval="$with_cyrus_sasl"
1334   
1335         ol_arg=invalid
1336         for ol_val in auto yes no  ; do
1337                 if test "$withval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1343         fi
1344         ol_with_cyrus_sasl="$ol_arg"
1345
1346 else
1347         ol_with_cyrus_sasl="auto"
1348 fi
1349 # end --with-cyrus_sasl
1350
1351 # OpenLDAP --with-fetch
1352         # Check whether --with-fetch or --without-fetch was given.
1353 if test "${with_fetch+set}" = set; then
1354   withval="$with_fetch"
1355   
1356         ol_arg=invalid
1357         for ol_val in auto yes no  ; do
1358                 if test "$withval" = "$ol_val" ; then
1359                         ol_arg="$ol_val"
1360                 fi
1361         done
1362         if test "$ol_arg" = "invalid" ; then
1363                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1364         fi
1365         ol_with_fetch="$ol_arg"
1366
1367 else
1368         ol_with_fetch="auto"
1369 fi
1370 # end --with-fetch
1371
1372 # OpenLDAP --with-kerberos
1373         # Check whether --with-kerberos or --without-kerberos was given.
1374 if test "${with_kerberos+set}" = set; then
1375   withval="$with_kerberos"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto k5 k4 afs yes no ; do
1379                 if test "$withval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1385         fi
1386         ol_with_kerberos="$ol_arg"
1387
1388 else
1389         ol_with_kerberos="auto"
1390 fi
1391 # end --with-kerberos
1392
1393 # OpenLDAP --with-readline
1394         # Check whether --with-readline or --without-readline was given.
1395 if test "${with_readline+set}" = set; then
1396   withval="$with_readline"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no  ; do
1400                 if test "$withval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1406         fi
1407         ol_with_readline="$ol_arg"
1408
1409 else
1410         ol_with_readline="auto"
1411 fi
1412 # end --with-readline
1413
1414 # OpenLDAP --with-threads
1415         # Check whether --with-threads or --without-threads was given.
1416 if test "${with_threads+set}" = set; then
1417   withval="$with_threads"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto posix mach lwp yes no manual  ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1427         fi
1428         ol_with_threads="$ol_arg"
1429
1430 else
1431         ol_with_threads="auto"
1432 fi
1433 # end --with-threads
1434
1435 # OpenLDAP --with-tls
1436         # Check whether --with-tls or --without-tls was given.
1437 if test "${with_tls+set}" = set; then
1438   withval="$with_tls"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto ssleay openssl yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1448         fi
1449         ol_with_tls="$ol_arg"
1450
1451 else
1452         ol_with_tls="auto"
1453 fi
1454 # end --with-tls
1455
1456 # OpenLDAP --with-yielding_select
1457         # Check whether --with-yielding_select or --without-yielding_select was given.
1458 if test "${with_yielding_select+set}" = set; then
1459   withval="$with_yielding_select"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto yes no manual  ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1469         fi
1470         ol_with_yielding_select="$ol_arg"
1471
1472 else
1473         ol_with_yielding_select="auto"
1474 fi
1475 # end --with-yielding_select
1476
1477
1478
1479 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1480 if test "${with_xxldapdoptions+set}" = set; then
1481   withval="$with_xxldapdoptions"
1482   :
1483 fi
1484
1485 # OpenLDAP --enable-ldapd
1486         # Check whether --enable-ldapd or --disable-ldapd was given.
1487 if test "${enable_ldapd+set}" = set; then
1488   enableval="$enable_ldapd"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1498         fi
1499         ol_enable_ldapd="$ol_arg"
1500
1501 else
1502         ol_enable_ldapd="no"
1503 fi
1504 # end --enable-ldapd
1505
1506 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1507 if test "${with_xxslapdoptions+set}" = set; then
1508   withval="$with_xxslapdoptions"
1509   :
1510 fi
1511
1512 # OpenLDAP --enable-slapd
1513         # Check whether --enable-slapd or --disable-slapd was given.
1514 if test "${enable_slapd+set}" = set; then
1515   enableval="$enable_slapd"
1516   
1517         ol_arg=invalid
1518         for ol_val in auto yes no ; do
1519                 if test "$enableval" = "$ol_val" ; then
1520                         ol_arg="$ol_val"
1521                 fi
1522         done
1523         if test "$ol_arg" = "invalid" ; then
1524                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1525         fi
1526         ol_enable_slapd="$ol_arg"
1527
1528 else
1529         ol_enable_slapd="yes"
1530 fi
1531 # end --enable-slapd
1532 # OpenLDAP --enable-cleartext
1533         # Check whether --enable-cleartext or --disable-cleartext was given.
1534 if test "${enable_cleartext+set}" = set; then
1535   enableval="$enable_cleartext"
1536   
1537         ol_arg=invalid
1538         for ol_val in auto yes no ; do
1539                 if test "$enableval" = "$ol_val" ; then
1540                         ol_arg="$ol_val"
1541                 fi
1542         done
1543         if test "$ol_arg" = "invalid" ; then
1544                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1545         fi
1546         ol_enable_cleartext="$ol_arg"
1547
1548 else
1549         ol_enable_cleartext="yes"
1550 fi
1551 # end --enable-cleartext
1552 # OpenLDAP --enable-crypt
1553         # Check whether --enable-crypt or --disable-crypt was given.
1554 if test "${enable_crypt+set}" = set; then
1555   enableval="$enable_crypt"
1556   
1557         ol_arg=invalid
1558         for ol_val in auto yes no ; do
1559                 if test "$enableval" = "$ol_val" ; then
1560                         ol_arg="$ol_val"
1561                 fi
1562         done
1563         if test "$ol_arg" = "invalid" ; then
1564                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1565         fi
1566         ol_enable_crypt="$ol_arg"
1567
1568 else
1569         ol_enable_crypt="auto"
1570 fi
1571 # end --enable-crypt
1572 # OpenLDAP --enable-modules
1573         # Check whether --enable-modules or --disable-modules was given.
1574 if test "${enable_modules+set}" = set; then
1575   enableval="$enable_modules"
1576   
1577         ol_arg=invalid
1578         for ol_val in auto yes no ; do
1579                 if test "$enableval" = "$ol_val" ; then
1580                         ol_arg="$ol_val"
1581                 fi
1582         done
1583         if test "$ol_arg" = "invalid" ; then
1584                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1585         fi
1586         ol_enable_modules="$ol_arg"
1587
1588 else
1589         ol_enable_modules="no"
1590 fi
1591 # end --enable-modules
1592 # OpenLDAP --enable-multimaster
1593         # Check whether --enable-multimaster or --disable-multimaster was given.
1594 if test "${enable_multimaster+set}" = set; then
1595   enableval="$enable_multimaster"
1596   
1597         ol_arg=invalid
1598         for ol_val in auto yes no ; do
1599                 if test "$enableval" = "$ol_val" ; then
1600                         ol_arg="$ol_val"
1601                 fi
1602         done
1603         if test "$ol_arg" = "invalid" ; then
1604                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1605         fi
1606         ol_enable_multimaster="$ol_arg"
1607
1608 else
1609         ol_enable_multimaster="no"
1610 fi
1611 # end --enable-multimaster
1612 # OpenLDAP --enable-phonetic
1613         # Check whether --enable-phonetic or --disable-phonetic was given.
1614 if test "${enable_phonetic+set}" = set; then
1615   enableval="$enable_phonetic"
1616   
1617         ol_arg=invalid
1618         for ol_val in auto yes no ; do
1619                 if test "$enableval" = "$ol_val" ; then
1620                         ol_arg="$ol_val"
1621                 fi
1622         done
1623         if test "$ol_arg" = "invalid" ; then
1624                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1625         fi
1626         ol_enable_phonetic="$ol_arg"
1627
1628 else
1629         ol_enable_phonetic="no"
1630 fi
1631 # end --enable-phonetic
1632 # OpenLDAP --enable-quipu
1633         # Check whether --enable-quipu or --disable-quipu was given.
1634 if test "${enable_quipu+set}" = set; then
1635   enableval="$enable_quipu"
1636   
1637         ol_arg=invalid
1638         for ol_val in auto yes no ; do
1639                 if test "$enableval" = "$ol_val" ; then
1640                         ol_arg="$ol_val"
1641                 fi
1642         done
1643         if test "$ol_arg" = "invalid" ; then
1644                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1645         fi
1646         ol_enable_quipu="$ol_arg"
1647
1648 else
1649         ol_enable_quipu="no"
1650 fi
1651 # end --enable-quipu
1652 # OpenLDAP --enable-rlookups
1653         # Check whether --enable-rlookups or --disable-rlookups was given.
1654 if test "${enable_rlookups+set}" = set; then
1655   enableval="$enable_rlookups"
1656   
1657         ol_arg=invalid
1658         for ol_val in auto yes no ; do
1659                 if test "$enableval" = "$ol_val" ; then
1660                         ol_arg="$ol_val"
1661                 fi
1662         done
1663         if test "$ol_arg" = "invalid" ; then
1664                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1665         fi
1666         ol_enable_rlookups="$ol_arg"
1667
1668 else
1669         ol_enable_rlookups="auto"
1670 fi
1671 # end --enable-rlookups
1672 # OpenLDAP --enable-aci
1673         # Check whether --enable-aci or --disable-aci was given.
1674 if test "${enable_aci+set}" = set; then
1675   enableval="$enable_aci"
1676   
1677         ol_arg=invalid
1678         for ol_val in auto yes no ; do
1679                 if test "$enableval" = "$ol_val" ; then
1680                         ol_arg="$ol_val"
1681                 fi
1682         done
1683         if test "$ol_arg" = "invalid" ; then
1684                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1685         fi
1686         ol_enable_aci="$ol_arg"
1687
1688 else
1689         ol_enable_aci="no"
1690 fi
1691 # end --enable-aci
1692 # OpenLDAP --enable-discreteaci
1693         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1694 if test "${enable_discreteaci+set}" = set; then
1695   enableval="$enable_discreteaci"
1696   
1697         ol_arg=invalid
1698         for ol_val in auto yes no ; do
1699                 if test "$enableval" = "$ol_val" ; then
1700                         ol_arg="$ol_val"
1701                 fi
1702         done
1703         if test "$ol_arg" = "invalid" ; then
1704                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1705         fi
1706         ol_enable_discreteaci="$ol_arg"
1707
1708 else
1709         ol_enable_discreteaci="no"
1710 fi
1711 # end --enable-discreteaci
1712 # OpenLDAP --enable-wrappers
1713         # Check whether --enable-wrappers or --disable-wrappers was given.
1714 if test "${enable_wrappers+set}" = set; then
1715   enableval="$enable_wrappers"
1716   
1717         ol_arg=invalid
1718         for ol_val in auto yes no ; do
1719                 if test "$enableval" = "$ol_val" ; then
1720                         ol_arg="$ol_val"
1721                 fi
1722         done
1723         if test "$ol_arg" = "invalid" ; then
1724                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1725         fi
1726         ol_enable_wrappers="$ol_arg"
1727
1728 else
1729         ol_enable_wrappers="no"
1730 fi
1731 # end --enable-wrappers
1732
1733 # OpenLDAP --enable-bdb2
1734         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1735 if test "${enable_bdb2+set}" = set; then
1736   enableval="$enable_bdb2"
1737   
1738         ol_arg=invalid
1739         for ol_val in auto yes no ; do
1740                 if test "$enableval" = "$ol_val" ; then
1741                         ol_arg="$ol_val"
1742                 fi
1743         done
1744         if test "$ol_arg" = "invalid" ; then
1745                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1746         fi
1747         ol_enable_bdb2="$ol_arg"
1748
1749 else
1750         ol_enable_bdb2="no"
1751 fi
1752 # end --enable-bdb2
1753 # OpenLDAP --with-bdb2_module
1754         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1755 if test "${with_bdb2_module+set}" = set; then
1756   withval="$with_bdb2_module"
1757   
1758         ol_arg=invalid
1759         for ol_val in static dynamic ; do
1760                 if test "$withval" = "$ol_val" ; then
1761                         ol_arg="$ol_val"
1762                 fi
1763         done
1764         if test "$ol_arg" = "invalid" ; then
1765                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1766         fi
1767         ol_with_bdb2_module="$ol_arg"
1768
1769 else
1770         ol_with_bdb2_module="static"
1771 fi
1772 # end --with-bdb2_module
1773
1774 # OpenLDAP --enable-ldap
1775         # Check whether --enable-ldap or --disable-ldap was given.
1776 if test "${enable_ldap+set}" = set; then
1777   enableval="$enable_ldap"
1778   
1779         ol_arg=invalid
1780         for ol_val in auto yes no ; do
1781                 if test "$enableval" = "$ol_val" ; then
1782                         ol_arg="$ol_val"
1783                 fi
1784         done
1785         if test "$ol_arg" = "invalid" ; then
1786                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1787         fi
1788         ol_enable_ldap="$ol_arg"
1789
1790 else
1791         ol_enable_ldap="no"
1792 fi
1793 # end --enable-ldap
1794 # OpenLDAP --with-ldap_module
1795         # Check whether --with-ldap_module or --without-ldap_module was given.
1796 if test "${with_ldap_module+set}" = set; then
1797   withval="$with_ldap_module"
1798   
1799         ol_arg=invalid
1800         for ol_val in static dynamic ; do
1801                 if test "$withval" = "$ol_val" ; then
1802                         ol_arg="$ol_val"
1803                 fi
1804         done
1805         if test "$ol_arg" = "invalid" ; then
1806                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1807         fi
1808         ol_with_ldap_module="$ol_arg"
1809
1810 else
1811         ol_with_ldap_module="static"
1812 fi
1813 # end --with-ldap_module
1814
1815 # OpenLDAP --enable-ldbm
1816         # Check whether --enable-ldbm or --disable-ldbm was given.
1817 if test "${enable_ldbm+set}" = set; then
1818   enableval="$enable_ldbm"
1819   
1820         ol_arg=invalid
1821         for ol_val in auto yes no ; do
1822                 if test "$enableval" = "$ol_val" ; then
1823                         ol_arg="$ol_val"
1824                 fi
1825         done
1826         if test "$ol_arg" = "invalid" ; then
1827                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1828         fi
1829         ol_enable_ldbm="$ol_arg"
1830
1831 else
1832         ol_enable_ldbm="yes"
1833 fi
1834 # end --enable-ldbm
1835 # OpenLDAP --with-ldbm_module
1836         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1837 if test "${with_ldbm_module+set}" = set; then
1838   withval="$with_ldbm_module"
1839   
1840         ol_arg=invalid
1841         for ol_val in static dynamic ; do
1842                 if test "$withval" = "$ol_val" ; then
1843                         ol_arg="$ol_val"
1844                 fi
1845         done
1846         if test "$ol_arg" = "invalid" ; then
1847                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1848         fi
1849         ol_with_ldbm_module="$ol_arg"
1850
1851 else
1852         ol_with_ldbm_module="static"
1853 fi
1854 # end --with-ldbm_module
1855
1856 # OpenLDAP --with-ldbm_api
1857         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1858 if test "${with_ldbm_api+set}" = set; then
1859   withval="$with_ldbm_api"
1860   
1861         ol_arg=invalid
1862         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1863                 if test "$withval" = "$ol_val" ; then
1864                         ol_arg="$ol_val"
1865                 fi
1866         done
1867         if test "$ol_arg" = "invalid" ; then
1868                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1869         fi
1870         ol_with_ldbm_api="$ol_arg"
1871
1872 else
1873         ol_with_ldbm_api="auto"
1874 fi
1875 # end --with-ldbm_api
1876
1877 # OpenLDAP --with-ldbm_type
1878         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1879 if test "${with_ldbm_type+set}" = set; then
1880   withval="$with_ldbm_type"
1881   
1882         ol_arg=invalid
1883         for ol_val in auto btree hash ; do
1884                 if test "$withval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1890         fi
1891         ol_with_ldbm_type="$ol_arg"
1892
1893 else
1894         ol_with_ldbm_type="auto"
1895 fi
1896 # end --with-ldbm_type
1897
1898
1899 # OpenLDAP --enable-passwd
1900         # Check whether --enable-passwd or --disable-passwd was given.
1901 if test "${enable_passwd+set}" = set; then
1902   enableval="$enable_passwd"
1903   
1904         ol_arg=invalid
1905         for ol_val in auto yes no ; do
1906                 if test "$enableval" = "$ol_val" ; then
1907                         ol_arg="$ol_val"
1908                 fi
1909         done
1910         if test "$ol_arg" = "invalid" ; then
1911                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1912         fi
1913         ol_enable_passwd="$ol_arg"
1914
1915 else
1916         ol_enable_passwd="no"
1917 fi
1918 # end --enable-passwd
1919 # OpenLDAP --with-passwd_module
1920         # Check whether --with-passwd_module or --without-passwd_module was given.
1921 if test "${with_passwd_module+set}" = set; then
1922   withval="$with_passwd_module"
1923   
1924         ol_arg=invalid
1925         for ol_val in static dynamic ; do
1926                 if test "$withval" = "$ol_val" ; then
1927                         ol_arg="$ol_val"
1928                 fi
1929         done
1930         if test "$ol_arg" = "invalid" ; then
1931                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1932         fi
1933         ol_with_passwd_module="$ol_arg"
1934
1935 else
1936         ol_with_passwd_module="static"
1937 fi
1938 # end --with-passwd_module
1939
1940 # OpenLDAP --enable-perl
1941         # Check whether --enable-perl or --disable-perl was given.
1942 if test "${enable_perl+set}" = set; then
1943   enableval="$enable_perl"
1944   
1945         ol_arg=invalid
1946         for ol_val in auto yes no ; do
1947                 if test "$enableval" = "$ol_val" ; then
1948                         ol_arg="$ol_val"
1949                 fi
1950         done
1951         if test "$ol_arg" = "invalid" ; then
1952                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1953         fi
1954         ol_enable_perl="$ol_arg"
1955
1956 else
1957         ol_enable_perl="no"
1958 fi
1959 # end --enable-perl
1960 # OpenLDAP --with-perl_module
1961         # Check whether --with-perl_module or --without-perl_module was given.
1962 if test "${with_perl_module+set}" = set; then
1963   withval="$with_perl_module"
1964   
1965         ol_arg=invalid
1966         for ol_val in static dynamic ; do
1967                 if test "$withval" = "$ol_val" ; then
1968                         ol_arg="$ol_val"
1969                 fi
1970         done
1971         if test "$ol_arg" = "invalid" ; then
1972                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1973         fi
1974         ol_with_perl_module="$ol_arg"
1975
1976 else
1977         ol_with_perl_module="static"
1978 fi
1979 # end --with-perl_module
1980
1981 # OpenLDAP --enable-shell
1982         # Check whether --enable-shell or --disable-shell was given.
1983 if test "${enable_shell+set}" = set; then
1984   enableval="$enable_shell"
1985   
1986         ol_arg=invalid
1987         for ol_val in auto yes no ; do
1988                 if test "$enableval" = "$ol_val" ; then
1989                         ol_arg="$ol_val"
1990                 fi
1991         done
1992         if test "$ol_arg" = "invalid" ; then
1993                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1994         fi
1995         ol_enable_shell="$ol_arg"
1996
1997 else
1998         ol_enable_shell="no"
1999 fi
2000 # end --enable-shell
2001 # OpenLDAP --with-shell_module
2002         # Check whether --with-shell_module or --without-shell_module was given.
2003 if test "${with_shell_module+set}" = set; then
2004   withval="$with_shell_module"
2005   
2006         ol_arg=invalid
2007         for ol_val in static dynamic ; do
2008                 if test "$withval" = "$ol_val" ; then
2009                         ol_arg="$ol_val"
2010                 fi
2011         done
2012         if test "$ol_arg" = "invalid" ; then
2013                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2014         fi
2015         ol_with_shell_module="$ol_arg"
2016
2017 else
2018         ol_with_shell_module="static"
2019 fi
2020 # end --with-shell_module
2021
2022 # OpenLDAP --enable-tcl
2023         # Check whether --enable-tcl or --disable-tcl was given.
2024 if test "${enable_tcl+set}" = set; then
2025   enableval="$enable_tcl"
2026   
2027         ol_arg=invalid
2028         for ol_val in auto yes no ; do
2029                 if test "$enableval" = "$ol_val" ; then
2030                         ol_arg="$ol_val"
2031                 fi
2032         done
2033         if test "$ol_arg" = "invalid" ; then
2034                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2035         fi
2036         ol_enable_tcl="$ol_arg"
2037
2038 else
2039         ol_enable_tcl="no"
2040 fi
2041 # end --enable-tcl
2042 # OpenLDAP --with-tcl_module
2043         # Check whether --with-tcl_module or --without-tcl_module was given.
2044 if test "${with_tcl_module+set}" = set; then
2045   withval="$with_tcl_module"
2046   
2047         ol_arg=invalid
2048         for ol_val in static dynamic ; do
2049                 if test "$withval" = "$ol_val" ; then
2050                         ol_arg="$ol_val"
2051                 fi
2052         done
2053         if test "$ol_arg" = "invalid" ; then
2054                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2055         fi
2056         ol_with_tcl_module="$ol_arg"
2057
2058 else
2059         ol_with_tcl_module="static"
2060 fi
2061 # end --with-tcl_module
2062
2063
2064 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2065 if test "${with_xxslurpdoptions+set}" = set; then
2066   withval="$with_xxslurpdoptions"
2067   :
2068 fi
2069
2070 # OpenLDAP --enable-slurpd
2071         # Check whether --enable-slurpd or --disable-slurpd was given.
2072 if test "${enable_slurpd+set}" = set; then
2073   enableval="$enable_slurpd"
2074   
2075         ol_arg=invalid
2076         for ol_val in auto yes no ; do
2077                 if test "$enableval" = "$ol_val" ; then
2078                         ol_arg="$ol_val"
2079                 fi
2080         done
2081         if test "$ol_arg" = "invalid" ; then
2082                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2083         fi
2084         ol_enable_slurpd="$ol_arg"
2085
2086 else
2087         ol_enable_slurpd="auto"
2088 fi
2089 # end --enable-slurpd
2090
2091 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2092 if test "${with_xxliboptions+set}" = set; then
2093   withval="$with_xxliboptions"
2094   :
2095 fi
2096
2097 # Check whether --enable-static or --disable-static was given.
2098 if test "${enable_static+set}" = set; then
2099   enableval="$enable_static"
2100   p=${PACKAGE-default}
2101 case "$enableval" in
2102 yes) enable_static=yes ;;
2103 no) enable_static=no ;;
2104 *)
2105   enable_static=no
2106   # Look at the argument we got.  We use all the common list separators.
2107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2108   for pkg in $enableval; do
2109     if test "X$pkg" = "X$p"; then
2110       enable_static=yes
2111     fi
2112   done
2113   IFS="$ac_save_ifs"
2114   ;;
2115 esac
2116 else
2117   enable_static=yes
2118 fi
2119
2120 # Check whether --enable-shared or --disable-shared was given.
2121 if test "${enable_shared+set}" = set; then
2122   enableval="$enable_shared"
2123   p=${PACKAGE-default}
2124 case "$enableval" in
2125 yes) enable_shared=yes ;;
2126 no) enable_shared=no ;;
2127 *)
2128   enable_shared=no
2129   # Look at the argument we got.  We use all the common list separators.
2130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2131   for pkg in $enableval; do
2132     if test "X$pkg" = "X$p"; then
2133       enable_shared=yes
2134     fi
2135   done
2136   IFS="$ac_save_ifs"
2137   ;;
2138 esac
2139 else
2140   enable_shared=yes
2141 fi
2142
2143
2144 # validate options
2145 if test $ol_enable_dns = yes ; then
2146         if test $ol_enable_referrals = no ; then
2147                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2148         fi
2149         if test $ol_enable_referrals = auto ; then
2150                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2151                 ol_enable_referrals=yes
2152         fi
2153 fi
2154
2155 if test $ol_enable_slapd = no ; then
2156                 if test $ol_enable_bdb2 = yes ; then
2157                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2158         fi
2159         if test $ol_enable_ldap = yes ; then
2160                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2161         fi
2162         if test $ol_enable_ldbm = yes ; then
2163                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2164         fi
2165         if test $ol_enable_passwd = yes ; then
2166                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2167         fi
2168         if test $ol_enable_perl = yes ; then
2169                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2170         fi
2171         if test $ol_enable_shell = yes ; then
2172                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2173         fi
2174         if test $ol_enable_tcl = yes ; then
2175                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2176         fi
2177         if test $ol_enable_modules = yes ; then
2178                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2179         fi
2180         if test $ol_enable_multimaster = yes ; then
2181                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2182         fi
2183         if test $ol_enable_wrappers = yes ; then
2184                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2185         fi
2186         if test $ol_enable_phonetic = yes ; then
2187                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2188         fi
2189         if test $ol_enable_quipu = yes ; then
2190                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2191         fi
2192         if test $ol_enable_rlookups = yes ; then
2193                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2194         fi
2195         if test $ol_enable_aci = yes ; then
2196                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2197         fi
2198         if test $ol_enable_discreteaci = yes ; then
2199                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2200         fi
2201         if test $ol_with_ldbm_api != auto ; then
2202                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2203         fi
2204         if test $ol_with_ldbm_type != auto ; then
2205                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2206         fi
2207         if test $ol_with_bdb2_module != static ; then
2208                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2209         fi
2210         if test $ol_with_ldap_module != static ; then
2211                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2212         fi
2213         if test $ol_with_ldbm_module != static ; then
2214                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2215         fi
2216         if test $ol_with_passwd_module != static ; then
2217                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2218         fi
2219         if test $ol_with_perl_module != static ; then
2220                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2221         fi
2222         if test $ol_with_shell_module != static ; then
2223                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2224         fi
2225         if test $ol_with_tcl_module != static ; then
2226                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2227         fi
2228         if test $ol_enable_slurpd = yes ; then
2229                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2230         fi
2231
2232         # force settings to no
2233         ol_enable_bdb2=no
2234         ol_enable_ldap=no
2235         ol_enable_ldbm=no
2236         ol_enable_passwd=no
2237         ol_enable_perl=no
2238         ol_enable_shell=no
2239         ol_enable_tcl=no
2240
2241         ol_enable_modules=no
2242         ol_enable_multimaster=no
2243         ol_enable_phonetic=no
2244         ol_enable_quipu=no
2245         ol_enable_rlookups=no
2246         ol_enable_aci=no
2247         ol_enable_discreteaci=no
2248         ol_enable_wrappers=no
2249
2250         ol_with_ldbm_api=no
2251         ol_with_ldbm_type=no
2252
2253         ol_with_bdb2_module=static
2254         ol_with_ldap_module=static
2255         ol_with_ldbm_module=static
2256         ol_with_passwd_module=static
2257         ol_with_perl_module=static
2258         ol_with_shell_module=static
2259         ol_with_tcl_module=static
2260
2261         ol_enable_slurpd=no
2262
2263 elif test $ol_enable_ldbm = no ; then
2264         
2265         if test $ol_with_ldbm_api != auto ; then
2266                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2267         fi
2268
2269         if test $ol_with_ldbm_type != auto ; then
2270                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2271         fi
2272
2273         if test $ol_with_ldbm_module != static ; then
2274                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2275         fi
2276
2277         if test $ol_enable_bdb2 = yes ; then
2278                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2279         fi
2280
2281         if test $ol_enable_modules != yes -a \
2282                 $ol_enable_ldap = no -a \
2283                 $ol_enable_passwd = no -a \
2284                 $ol_enable_perl = no -a \
2285                 $ol_enable_shell = no -a \
2286                 $ol_enable_tcl = no ; then
2287                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2288         fi
2289
2290         ol_with_ldbm_api=no
2291         ol_with_ldbm_type=no
2292         ol_with_ldbm_module=static
2293
2294 elif test $ol_enable_bdb2 = yes ; then
2295         
2296         if test $ol_with_ldbm_api != auto -a \
2297                 $ol_with_ldbm_api != db2 ; then
2298                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2299         fi
2300
2301         ol_with_ldbm_api=db2
2302
2303 else
2304         
2305         if test $ol_enable_bdb2 != no ; then
2306                 if test $ol_with_ldbm_api != auto -a \
2307                         $ol_with_ldbm_api != db2 ; then
2308                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2309                         ol_enable_bdb2=no
2310                 fi
2311         fi
2312
2313         if test $ol_with_ldbm_api = gdbm -a \
2314                 $ol_with_ldbm_type = btree ; then
2315                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2316         fi
2317         if test $ol_with_ldbm_api = mdbm -a \
2318                 $ol_with_ldbm_type = btree ; then
2319                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2320         fi
2321         if test $ol_with_ldbm_api = ndbm -a \
2322                 $ol_with_ldbm_type = btree ; then
2323                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2324         fi
2325 fi
2326
2327 if test $ol_enable_slurpd = yes ; then
2328                 if test $ol_with_threads = no ; then
2329                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2330         fi
2331 fi
2332
2333 echo "$ac_t""done" 1>&6
2334
2335 ## Initialize vars
2336 LDAP_LIBS=
2337 LDIF_LIBS=
2338 LDBM_LIBS=
2339 LTHREAD_LIBS=
2340 LUTIL_LIBS=
2341
2342 LDAPD_LIBS=
2343 SLAPD_LIBS=
2344 SLURPD_LIBS=
2345
2346 BUILD_LDAPD=no
2347 BUILD_SLAPD=no
2348 BUILD_SLURPD=no
2349
2350 BUILD_BDB2=no
2351 BUILD_LDAP=no
2352 BUILD_LDBM=no
2353 BUILD_PASSWD=no
2354 BUILD_PERL=no
2355 BUILD_QUIPU=no
2356 BUILD_SHELL=no
2357 BUILD_TCL=no
2358 BUILD_THREAD=no
2359
2360 BUILD_BDB2_DYNAMIC=static
2361 BUILD_LDAP_DYNAMIC=static
2362 BUILD_LDBM_DYNAMIC=static
2363 BUILD_PASSWD_DYNAMIC=static
2364 BUILD_PERL_DYNAMIC=static
2365 BUILD_SHELL_DYNAMIC=static
2366 BUILD_TCL_DYNAMIC=static
2367
2368 SLAPD_MODULES_LDFLAGS=
2369 SLAPD_MODULES_CPPFLAGS=
2370 SLAPD_MODULES_LIST=
2371
2372 SLAPD_PERL_LDFLAGS=
2373 SLAPD_PERL_CPPFLAGS=
2374
2375 KRB_LIBS=
2376 READLINE_LIBS=
2377 SASL_LIBS=
2378 TERMCAP_LIBS=
2379 TLS_LIBS=
2380 MODULES_LIBS=
2381
2382
2383
2384 cat >> confdefs.h <<\EOF
2385 #define HAVE_MKVERSION 1
2386 EOF
2387
2388
2389
2390
2391
2392 ol_aix_threads=no
2393 case "$target" in
2394 *-*-aix*)       if test -z "$CC" ; then
2395                 case "$ol_with_threads" in
2396                 auto | yes |  posix) ol_aix_threads=yes ;;
2397                 esac
2398         fi
2399 ;;
2400 esac
2401
2402 if test $ol_aix_threads = yes ; then
2403         if test -z "${CC}" ; then
2404                 for ac_prog in cc_r xlc_r cc
2405 do
2406 # Extract the first word of "$ac_prog", so it can be a program name with args.
2407 set dummy $ac_prog; ac_word=$2
2408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2409 echo "configure:2410: checking for $ac_word" >&5
2410 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413   if test -n "$CC"; then
2414   ac_cv_prog_CC="$CC" # Let the user override the test.
2415 else
2416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2417   ac_dummy="$PATH"
2418   for ac_dir in $ac_dummy; do
2419     test -z "$ac_dir" && ac_dir=.
2420     if test -f $ac_dir/$ac_word; then
2421       ac_cv_prog_CC="$ac_prog"
2422       break
2423     fi
2424   done
2425   IFS="$ac_save_ifs"
2426 fi
2427 fi
2428 CC="$ac_cv_prog_CC"
2429 if test -n "$CC"; then
2430   echo "$ac_t""$CC" 1>&6
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434
2435 test -n "$CC" && break
2436 done
2437
2438
2439                 if test "$CC" = cc ; then
2440                                                 if test $ol_with_threads != auto ; then
2441                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2442                         else
2443                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2444                         fi
2445                         ol_with_threads=no
2446                 fi
2447         fi
2448
2449         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2450                 ol_with_threads=posix
2451                 ol_cv_pthread_create=yes
2452         fi
2453 fi
2454
2455 if test -z "${CC}"; then
2456         for ac_prog in cc
2457 do
2458 # Extract the first word of "$ac_prog", so it can be a program name with args.
2459 set dummy $ac_prog; ac_word=$2
2460 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2461 echo "configure:2462: checking for $ac_word" >&5
2462 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2463   echo $ac_n "(cached) $ac_c" 1>&6
2464 else
2465   if test -n "$CC"; then
2466   ac_cv_prog_CC="$CC" # Let the user override the test.
2467 else
2468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2469   ac_dummy="$PATH"
2470   for ac_dir in $ac_dummy; do
2471     test -z "$ac_dir" && ac_dir=.
2472     if test -f $ac_dir/$ac_word; then
2473       ac_cv_prog_CC="$ac_prog"
2474       break
2475     fi
2476   done
2477   IFS="$ac_save_ifs"
2478 fi
2479 fi
2480 CC="$ac_cv_prog_CC"
2481 if test -n "$CC"; then
2482   echo "$ac_t""$CC" 1>&6
2483 else
2484   echo "$ac_t""no" 1>&6
2485 fi
2486
2487 test -n "$CC" && break
2488 done
2489
2490 fi
2491
2492
2493
2494 # Check whether --enable-fast-install or --disable-fast-install was given.
2495 if test "${enable_fast_install+set}" = set; then
2496   enableval="$enable_fast_install"
2497   p=${PACKAGE-default}
2498 case "$enableval" in
2499 yes) enable_fast_install=yes ;;
2500 no) enable_fast_install=no ;;
2501 *)
2502   enable_fast_install=no
2503   # Look at the argument we got.  We use all the common list separators.
2504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2505   for pkg in $enableval; do
2506     if test "X$pkg" = "X$p"; then
2507       enable_fast_install=yes
2508     fi
2509   done
2510   IFS="$ac_save_ifs"
2511   ;;
2512 esac
2513 else
2514   enable_fast_install=yes
2515 fi
2516
2517 # Extract the first word of "ranlib", so it can be a program name with args.
2518 set dummy ranlib; ac_word=$2
2519 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2520 echo "configure:2521: checking for $ac_word" >&5
2521 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2522   echo $ac_n "(cached) $ac_c" 1>&6
2523 else
2524   if test -n "$RANLIB"; then
2525   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2526 else
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2528   ac_dummy="$PATH"
2529   for ac_dir in $ac_dummy; do
2530     test -z "$ac_dir" && ac_dir=.
2531     if test -f $ac_dir/$ac_word; then
2532       ac_cv_prog_RANLIB="ranlib"
2533       break
2534     fi
2535   done
2536   IFS="$ac_save_ifs"
2537   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2538 fi
2539 fi
2540 RANLIB="$ac_cv_prog_RANLIB"
2541 if test -n "$RANLIB"; then
2542   echo "$ac_t""$RANLIB" 1>&6
2543 else
2544   echo "$ac_t""no" 1>&6
2545 fi
2546
2547 # Extract the first word of "gcc", so it can be a program name with args.
2548 set dummy gcc; ac_word=$2
2549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2550 echo "configure:2551: checking for $ac_word" >&5
2551 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2552   echo $ac_n "(cached) $ac_c" 1>&6
2553 else
2554   if test -n "$CC"; then
2555   ac_cv_prog_CC="$CC" # Let the user override the test.
2556 else
2557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2558   ac_dummy="$PATH"
2559   for ac_dir in $ac_dummy; do
2560     test -z "$ac_dir" && ac_dir=.
2561     if test -f $ac_dir/$ac_word; then
2562       ac_cv_prog_CC="gcc"
2563       break
2564     fi
2565   done
2566   IFS="$ac_save_ifs"
2567 fi
2568 fi
2569 CC="$ac_cv_prog_CC"
2570 if test -n "$CC"; then
2571   echo "$ac_t""$CC" 1>&6
2572 else
2573   echo "$ac_t""no" 1>&6
2574 fi
2575
2576 if test -z "$CC"; then
2577   # Extract the first word of "cc", so it can be a program name with args.
2578 set dummy cc; ac_word=$2
2579 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2580 echo "configure:2581: checking for $ac_word" >&5
2581 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2582   echo $ac_n "(cached) $ac_c" 1>&6
2583 else
2584   if test -n "$CC"; then
2585   ac_cv_prog_CC="$CC" # Let the user override the test.
2586 else
2587   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2588   ac_prog_rejected=no
2589   ac_dummy="$PATH"
2590   for ac_dir in $ac_dummy; do
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2594         ac_prog_rejected=yes
2595         continue
2596       fi
2597       ac_cv_prog_CC="cc"
2598       break
2599     fi
2600   done
2601   IFS="$ac_save_ifs"
2602 if test $ac_prog_rejected = yes; then
2603   # We found a bogon in the path, so make sure we never use it.
2604   set dummy $ac_cv_prog_CC
2605   shift
2606   if test $# -gt 0; then
2607     # We chose a different compiler from the bogus one.
2608     # However, it has the same basename, so the bogon will be chosen
2609     # first if we set CC to just the basename; use the full file name.
2610     shift
2611     set dummy "$ac_dir/$ac_word" "$@"
2612     shift
2613     ac_cv_prog_CC="$@"
2614   fi
2615 fi
2616 fi
2617 fi
2618 CC="$ac_cv_prog_CC"
2619 if test -n "$CC"; then
2620   echo "$ac_t""$CC" 1>&6
2621 else
2622   echo "$ac_t""no" 1>&6
2623 fi
2624
2625   if test -z "$CC"; then
2626     case "`uname -s`" in
2627     *win32* | *WIN32* | *CYGWIN*)
2628       # Extract the first word of "cl", so it can be a program name with args.
2629 set dummy cl; ac_word=$2
2630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2631 echo "configure:2632: checking for $ac_word" >&5
2632 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2633   echo $ac_n "(cached) $ac_c" 1>&6
2634 else
2635   if test -n "$CC"; then
2636   ac_cv_prog_CC="$CC" # Let the user override the test.
2637 else
2638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2639   ac_dummy="$PATH"
2640   for ac_dir in $ac_dummy; do
2641     test -z "$ac_dir" && ac_dir=.
2642     if test -f $ac_dir/$ac_word; then
2643       ac_cv_prog_CC="cl"
2644       break
2645     fi
2646   done
2647   IFS="$ac_save_ifs"
2648 fi
2649 fi
2650 CC="$ac_cv_prog_CC"
2651 if test -n "$CC"; then
2652   echo "$ac_t""$CC" 1>&6
2653 else
2654   echo "$ac_t""no" 1>&6
2655 fi
2656  ;;
2657     esac
2658   fi
2659   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2660 fi
2661
2662 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2663 echo "configure:2664: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2664
2665 ac_ext=c
2666 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2667 ac_cpp='$CPP $CPPFLAGS'
2668 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2669 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2670 cross_compiling=$ac_cv_prog_cc_cross
2671
2672 cat > conftest.$ac_ext << EOF
2673
2674 #line 2675 "configure"
2675 #include "confdefs.h"
2676
2677 main(){return(0);}
2678 EOF
2679 if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2680   ac_cv_prog_cc_works=yes
2681   # If we can't run a trivial program, we are probably using a cross compiler.
2682   if (./conftest; exit) 2>/dev/null; then
2683     ac_cv_prog_cc_cross=no
2684   else
2685     ac_cv_prog_cc_cross=yes
2686   fi
2687 else
2688   echo "configure: failed program was:" >&5
2689   cat conftest.$ac_ext >&5
2690   ac_cv_prog_cc_works=no
2691 fi
2692 rm -fr conftest*
2693 ac_ext=c
2694 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2695 ac_cpp='$CPP $CPPFLAGS'
2696 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2697 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2698 cross_compiling=$ac_cv_prog_cc_cross
2699
2700 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2701 if test $ac_cv_prog_cc_works = no; then
2702   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2703 fi
2704 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2705 echo "configure:2706: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2706 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2707 cross_compiling=$ac_cv_prog_cc_cross
2708
2709 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2710 echo "configure:2711: checking whether we are using GNU C" >&5
2711 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   cat > conftest.c <<EOF
2715 #ifdef __GNUC__
2716   yes;
2717 #endif
2718 EOF
2719 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2720   ac_cv_prog_gcc=yes
2721 else
2722   ac_cv_prog_gcc=no
2723 fi
2724 fi
2725
2726 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2727
2728 if test $ac_cv_prog_gcc = yes; then
2729   GCC=yes
2730 else
2731   GCC=
2732 fi
2733
2734 ac_test_CFLAGS="${CFLAGS+set}"
2735 ac_save_CFLAGS="$CFLAGS"
2736 CFLAGS=
2737 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2738 echo "configure:2739: checking whether ${CC-cc} accepts -g" >&5
2739 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2740   echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742   echo 'void f(){}' > conftest.c
2743 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2744   ac_cv_prog_cc_g=yes
2745 else
2746   ac_cv_prog_cc_g=no
2747 fi
2748 rm -f conftest*
2749
2750 fi
2751
2752 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2753 if test "$ac_test_CFLAGS" = set; then
2754   CFLAGS="$ac_save_CFLAGS"
2755 elif test $ac_cv_prog_cc_g = yes; then
2756   if test "$GCC" = yes; then
2757     CFLAGS="-g -O2"
2758   else
2759     CFLAGS="-g"
2760   fi
2761 else
2762   if test "$GCC" = yes; then
2763     CFLAGS="-O2"
2764   else
2765     CFLAGS=
2766   fi
2767 fi
2768
2769 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2770 if test "${with_gnu_ld+set}" = set; then
2771   withval="$with_gnu_ld"
2772   test "$withval" = no || with_gnu_ld=yes
2773 else
2774   with_gnu_ld=no
2775 fi
2776
2777 ac_prog=ld
2778 if test "$ac_cv_prog_gcc" = yes; then
2779   # Check if gcc -print-prog-name=ld gives a path.
2780   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2781 echo "configure:2782: checking for ld used by GCC" >&5
2782   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2783   case "$ac_prog" in
2784     # Accept absolute paths.
2785     [\\/]* | [A-Za-z]:[\\/]*)
2786       re_direlt='/[^/][^/]*/\.\./'
2787       # Canonicalize the path of ld
2788       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2789       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2790         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2791       done
2792       test -z "$LD" && LD="$ac_prog"
2793       ;;
2794   "")
2795     # If it fails, then pretend we aren't using GCC.
2796     ac_prog=ld
2797     ;;
2798   *)
2799     # If it is relative, then search for the first ld in PATH.
2800     with_gnu_ld=unknown
2801     ;;
2802   esac
2803 elif test "$with_gnu_ld" = yes; then
2804   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2805 echo "configure:2806: checking for GNU ld" >&5
2806 else
2807   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2808 echo "configure:2809: checking for non-GNU ld" >&5
2809 fi
2810 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   if test -z "$LD"; then
2814   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2815   for ac_dir in $PATH; do
2816     test -z "$ac_dir" && ac_dir=.
2817     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2818       ac_cv_path_LD="$ac_dir/$ac_prog"
2819       # Check to see if the program is GNU ld.  I'd rather use --version,
2820       # but apparently some GNU ld's only accept -v.
2821       # Break only if it was the GNU/non-GNU ld that we prefer.
2822       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2823         test "$with_gnu_ld" != no && break
2824       else
2825         test "$with_gnu_ld" != yes && break
2826       fi
2827     fi
2828   done
2829   IFS="$ac_save_ifs"
2830 else
2831   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2832 fi
2833 fi
2834
2835 LD="$ac_cv_path_LD"
2836 if test -n "$LD"; then
2837   echo "$ac_t""$LD" 1>&6
2838 else
2839   echo "$ac_t""no" 1>&6
2840 fi
2841 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2842
2843 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2844 echo "configure:2845: checking if the linker ($LD) is GNU ld" >&5
2845 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2846   echo $ac_n "(cached) $ac_c" 1>&6
2847 else
2848   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2849 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2850   ac_cv_prog_gnu_ld=yes
2851 else
2852   ac_cv_prog_gnu_ld=no
2853 fi
2854 fi
2855
2856 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2857
2858
2859 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2860 echo "configure:2861: checking for BSD-compatible nm" >&5
2861 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2862   echo $ac_n "(cached) $ac_c" 1>&6
2863 else
2864   if test -n "$NM"; then
2865   # Let the user override the test.
2866   ac_cv_path_NM="$NM"
2867 else
2868   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2869   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2870     test -z "$ac_dir" && ac_dir=.
2871     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2872       # Check to see if the nm accepts a BSD-compat flag.
2873       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2874       #   nm: unknown option "B" ignored
2875       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2876         ac_cv_path_NM="$ac_dir/nm -B"
2877         break
2878       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2879         ac_cv_path_NM="$ac_dir/nm -p"
2880         break
2881       else
2882         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2883         continue # so that we can try to find one that supports BSD flags
2884       fi
2885     fi
2886   done
2887   IFS="$ac_save_ifs"
2888   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2889 fi
2890 fi
2891
2892 NM="$ac_cv_path_NM"
2893 echo "$ac_t""$NM" 1>&6
2894
2895
2896 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2897 echo "configure:2898: checking whether ln -s works" >&5
2898 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2899   echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901   rm -f conftestdata
2902 if ln -s X conftestdata 2>/dev/null
2903 then
2904   rm -f conftestdata
2905   ac_cv_prog_LN_S="ln -s"
2906 else
2907   ac_cv_prog_LN_S=ln
2908 fi
2909 fi
2910 LN_S="$ac_cv_prog_LN_S"
2911 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2912   echo "$ac_t""yes" 1>&6
2913 else
2914   echo "$ac_t""no" 1>&6
2915 fi
2916
2917
2918 # Check for any special flags to pass to ltconfig.
2919 libtool_flags="--cache-file=$cache_file"
2920 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2921 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2922 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2923 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2924 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2925 libtool_flags="$libtool_flags --enable-dlopen"
2926
2927 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2928 if test "${enable_libtool_lock+set}" = set; then
2929   enableval="$enable_libtool_lock"
2930   :
2931 fi
2932
2933 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2934 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2935
2936 # Some flags need to be propagated to the compiler or linker for good
2937 # libtool support.
2938 case "$host" in
2939 *-*-irix6*)
2940   # Find out which ABI we are using.
2941   echo '#line 2942 "configure"' > conftest.$ac_ext
2942   if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2943     case "`/usr/bin/file conftest.o`" in
2944     *32-bit*)
2945       LD="${LD-ld} -32"
2946       ;;
2947     *N32*)
2948       LD="${LD-ld} -n32"
2949       ;;
2950     *64-bit*)
2951       LD="${LD-ld} -64"
2952       ;;
2953     esac
2954   fi
2955   rm -rf conftest*
2956   ;;
2957
2958 *-*-sco3.2v5*)
2959   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2960   SAVE_CFLAGS="$CFLAGS"
2961   CFLAGS="$CFLAGS -belf"
2962   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2963 echo "configure:2964: checking whether the C compiler needs -belf" >&5
2964 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967   cat > conftest.$ac_ext <<EOF
2968 #line 2969 "configure"
2969 #include "confdefs.h"
2970
2971 int main() {
2972
2973 ; return 0; }
2974 EOF
2975 if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2976   rm -rf conftest*
2977   lt_cv_cc_needs_belf=yes
2978 else
2979   echo "configure: failed program was:" >&5
2980   cat conftest.$ac_ext >&5
2981   rm -rf conftest*
2982   lt_cv_cc_needs_belf=no
2983 fi
2984 rm -f conftest*
2985 fi
2986
2987 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2988   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2989     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2990     CFLAGS="$SAVE_CFLAGS"
2991   fi
2992   ;;
2993
2994
2995 esac
2996
2997
2998 # Save cache, so that ltconfig can load it
2999
3000
3001 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3002 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3003 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3004 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3005 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3006 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3007 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3008 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3009
3010 # Reload cache, that may have been modified by ltconfig
3011
3012
3013 # This can be used to rebuild libtool when needed
3014 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3015
3016 # Always use our own libtool.
3017 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3018
3019 # Redirect the config.log output again, so that the ltconfig log is not
3020 # clobbered by the next message.
3021 exec 5>>./config.log
3022
3023
3024 for ac_prog in mawk gawk nawk awk
3025 do
3026 # Extract the first word of "$ac_prog", so it can be a program name with args.
3027 set dummy $ac_prog; ac_word=$2
3028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3029 echo "configure:3030: checking for $ac_word" >&5
3030 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   if test -n "$AWK"; then
3034   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3035 else
3036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3037   ac_dummy="$PATH"
3038   for ac_dir in $ac_dummy; do
3039     test -z "$ac_dir" && ac_dir=.
3040     if test -f $ac_dir/$ac_word; then
3041       ac_cv_prog_AWK="$ac_prog"
3042       break
3043     fi
3044   done
3045   IFS="$ac_save_ifs"
3046 fi
3047 fi
3048 AWK="$ac_cv_prog_AWK"
3049 if test -n "$AWK"; then
3050   echo "$ac_t""$AWK" 1>&6
3051 else
3052   echo "$ac_t""no" 1>&6
3053 fi
3054
3055 test -n "$AWK" && break
3056 done
3057
3058 # test for ln hardlink support
3059 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3060 echo "configure:3061: checking whether ln works" >&5
3061 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3062   echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064   rm -f conftest.src conftest.dst
3065 echo "conftest" > conftest.src
3066 if ln conftest.src conftest.dst 2>/dev/null
3067 then
3068   ol_cv_prog_LN_H="ln"
3069 else
3070   ol_cv_prog_LN_H="cp"
3071 fi
3072 rm -f conftest.src conftest.dst
3073
3074 fi
3075 LN_H="$ol_cv_prog_LN_H"
3076 if test "$ol_cv_prog_LN_H" = "ln"; then
3077         echo "$ac_t""yes" 1>&6
3078 else
3079         echo "$ac_t""no" 1>&6
3080 fi
3081
3082 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3083 echo "configure:3084: checking whether ln -s works" >&5
3084 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   rm -f conftestdata
3088 if ln -s X conftestdata 2>/dev/null
3089 then
3090   rm -f conftestdata
3091   ac_cv_prog_LN_S="ln -s"
3092 else
3093   ac_cv_prog_LN_S=ln
3094 fi
3095 fi
3096 LN_S="$ac_cv_prog_LN_S"
3097 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3098   echo "$ac_t""yes" 1>&6
3099 else
3100   echo "$ac_t""no" 1>&6
3101 fi
3102
3103
3104 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3105         LN_S="$LN_H"
3106 fi
3107
3108 # Extract the first word of "sendmail", so it can be a program name with args.
3109 set dummy sendmail; ac_word=$2
3110 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3111 echo "configure:3112: checking for $ac_word" >&5
3112 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3113   echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115   case "$SENDMAIL" in
3116   /*)
3117   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3118   ;;
3119   ?:/*)                  
3120   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3121   ;;
3122   *)
3123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3124   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3125   for ac_dir in $ac_dummy; do 
3126     test -z "$ac_dir" && ac_dir=.
3127     if test -f $ac_dir/$ac_word; then
3128       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3129       break
3130     fi
3131   done
3132   IFS="$ac_save_ifs"
3133   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3134   ;;
3135 esac
3136 fi
3137 SENDMAIL="$ac_cv_path_SENDMAIL"
3138 if test -n "$SENDMAIL"; then
3139   echo "$ac_t""$SENDMAIL" 1>&6
3140 else
3141   echo "$ac_t""no" 1>&6
3142 fi
3143
3144 # Extract the first word of "vi", so it can be a program name with args.
3145 set dummy vi; ac_word=$2
3146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3147 echo "configure:3148: checking for $ac_word" >&5
3148 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   case "$EDITOR" in
3152   /*)
3153   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3154   ;;
3155   ?:/*)                  
3156   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3157   ;;
3158   *)
3159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3160   ac_dummy="$PATH:/usr/ucb"
3161   for ac_dir in $ac_dummy; do 
3162     test -z "$ac_dir" && ac_dir=.
3163     if test -f $ac_dir/$ac_word; then
3164       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3165       break
3166     fi
3167   done
3168   IFS="$ac_save_ifs"
3169   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3170   ;;
3171 esac
3172 fi
3173 EDITOR="$ac_cv_path_EDITOR"
3174 if test -n "$EDITOR"; then
3175   echo "$ac_t""$EDITOR" 1>&6
3176 else
3177   echo "$ac_t""no" 1>&6
3178 fi
3179
3180 # Extract the first word of "finger", so it can be a program name with args.
3181 set dummy finger; ac_word=$2
3182 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3183 echo "configure:3184: checking for $ac_word" >&5
3184 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   case "$FINGER" in
3188   /*)
3189   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3190   ;;
3191   ?:/*)                  
3192   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3193   ;;
3194   *)
3195   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3196   ac_dummy="$PATH:/usr/ucb"
3197   for ac_dir in $ac_dummy; do 
3198     test -z "$ac_dir" && ac_dir=.
3199     if test -f $ac_dir/$ac_word; then
3200       ac_cv_path_FINGER="$ac_dir/$ac_word"
3201       break
3202     fi
3203   done
3204   IFS="$ac_save_ifs"
3205   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3206   ;;
3207 esac
3208 fi
3209 FINGER="$ac_cv_path_FINGER"
3210 if test -n "$FINGER"; then
3211   echo "$ac_t""$FINGER" 1>&6
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215
3216
3217 ol_link_perl=no
3218 if test $ol_enable_perl != no ; then
3219         # Extract the first word of "perl", so it can be a program name with args.
3220 set dummy perl; ac_word=$2
3221 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3222 echo "configure:3223: checking for $ac_word" >&5
3223 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3224   echo $ac_n "(cached) $ac_c" 1>&6
3225 else
3226   case "$PERLBIN" in
3227   /*)
3228   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3229   ;;
3230   ?:/*)                  
3231   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3232   ;;
3233   *)
3234   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3235   ac_dummy="$PATH"
3236   for ac_dir in $ac_dummy; do 
3237     test -z "$ac_dir" && ac_dir=.
3238     if test -f $ac_dir/$ac_word; then
3239       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3240       break
3241     fi
3242   done
3243   IFS="$ac_save_ifs"
3244   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3245   ;;
3246 esac
3247 fi
3248 PERLBIN="$ac_cv_path_PERLBIN"
3249 if test -n "$PERLBIN"; then
3250   echo "$ac_t""$PERLBIN" 1>&6
3251 else
3252   echo "$ac_t""no" 1>&6
3253 fi
3254
3255
3256         if test "no$PERLBIN" = "no" ; then
3257                 if test $ol_enable_perl = yes ; then
3258                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3259                 fi
3260
3261         else
3262                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3263                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3264
3265                                 ol_link_perl=yes
3266         fi
3267 fi
3268
3269 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3270 echo "configure:3271: checking how to run the C preprocessor" >&5
3271 # On Suns, sometimes $CPP names a directory.
3272 if test -n "$CPP" && test -d "$CPP"; then
3273   CPP=
3274 fi
3275 if test -z "$CPP"; then
3276 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279     # This must be in double quotes, not single quotes, because CPP may get
3280   # substituted into the Makefile and "${CC-cc}" will confuse make.
3281   CPP="${CC-cc} -E"
3282   # On the NeXT, cc -E runs the code through the compiler's parser,
3283   # not just through cpp.
3284   cat > conftest.$ac_ext <<EOF
3285 #line 3286 "configure"
3286 #include "confdefs.h"
3287 #include <assert.h>
3288 Syntax Error
3289 EOF
3290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3291 { (eval echo configure:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3293 if test -z "$ac_err"; then
3294   :
3295 else
3296   echo "$ac_err" >&5
3297   echo "configure: failed program was:" >&5
3298   cat conftest.$ac_ext >&5
3299   rm -rf conftest*
3300   CPP="${CC-cc} -E -traditional-cpp"
3301   cat > conftest.$ac_ext <<EOF
3302 #line 3303 "configure"
3303 #include "confdefs.h"
3304 #include <assert.h>
3305 Syntax Error
3306 EOF
3307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3308 { (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3310 if test -z "$ac_err"; then
3311   :
3312 else
3313   echo "$ac_err" >&5
3314   echo "configure: failed program was:" >&5
3315   cat conftest.$ac_ext >&5
3316   rm -rf conftest*
3317   CPP="${CC-cc} -nologo -E"
3318   cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 #include <assert.h>
3322 Syntax Error
3323 EOF
3324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3325 { (eval echo configure:3326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3327 if test -z "$ac_err"; then
3328   :
3329 else
3330   echo "$ac_err" >&5
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   CPP=/lib/cpp
3335 fi
3336 rm -f conftest*
3337 fi
3338 rm -f conftest*
3339 fi
3340 rm -f conftest*
3341   ac_cv_prog_CPP="$CPP"
3342 fi
3343   CPP="$ac_cv_prog_CPP"
3344 else
3345   ac_cv_prog_CPP="$CPP"
3346 fi
3347 echo "$ac_t""$CPP" 1>&6
3348
3349
3350 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3351         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3352
3353 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3354         echo "configure: warning: programs compiled here do run here..." 1>&2
3355         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3356
3357 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3358         echo "configure: warning: programs compiled here do not run here..." 1>&2
3359         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3360 fi
3361
3362 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3363 echo "configure:3364: checking for AIX" >&5
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 #ifdef _AIX
3368   yes
3369 #endif
3370
3371 EOF
3372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3373   egrep "yes" >/dev/null 2>&1; then
3374   rm -rf conftest*
3375   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3376 #define _ALL_SOURCE 1
3377 EOF
3378
3379 else
3380   rm -rf conftest*
3381   echo "$ac_t""no" 1>&6
3382 fi
3383 rm -f conftest*
3384
3385
3386 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3387 echo "configure:3388: checking for POSIXized ISC" >&5
3388 if test -d /etc/conf/kconfig.d &&
3389   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3390 then
3391   echo "$ac_t""yes" 1>&6
3392   ISC=yes # If later tests want to check for ISC.
3393   cat >> confdefs.h <<\EOF
3394 #define _POSIX_SOURCE 1
3395 EOF
3396
3397   if test "$GCC" = yes; then
3398     CC="$CC -posix"
3399   else
3400     CC="$CC -Xp"
3401   fi
3402 else
3403   echo "$ac_t""no" 1>&6
3404   ISC=
3405 fi
3406
3407 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3408 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3409 echo "configure:3410: checking for minix/config.h" >&5
3410 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 #include <minix/config.h>
3417 EOF
3418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3419 { (eval echo configure:3420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3421 if test -z "$ac_err"; then
3422   rm -rf conftest*
3423   eval "ac_cv_header_$ac_safe=yes"
3424 else
3425   echo "$ac_err" >&5
3426   echo "configure: failed program was:" >&5
3427   cat conftest.$ac_ext >&5
3428   rm -rf conftest*
3429   eval "ac_cv_header_$ac_safe=no"
3430 fi
3431 rm -f conftest*
3432 fi
3433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3434   echo "$ac_t""yes" 1>&6
3435   MINIX=yes
3436 else
3437   echo "$ac_t""no" 1>&6
3438 MINIX=
3439 fi
3440
3441 if test "$MINIX" = yes; then
3442   cat >> confdefs.h <<\EOF
3443 #define _POSIX_SOURCE 1
3444 EOF
3445
3446   cat >> confdefs.h <<\EOF
3447 #define _POSIX_1_SOURCE 2
3448 EOF
3449
3450   cat >> confdefs.h <<\EOF
3451 #define _MINIX 1
3452 EOF
3453
3454 fi
3455
3456
3457 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3458 echo "configure:3459: checking for Cygwin environment" >&5
3459 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3460   echo $ac_n "(cached) $ac_c" 1>&6
3461 else
3462   cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465
3466 int main() {
3467
3468 #ifndef __CYGWIN__
3469 #define __CYGWIN__ __CYGWIN32__
3470 #endif
3471 return __CYGWIN__;
3472 ; return 0; }
3473 EOF
3474 if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3475   rm -rf conftest*
3476   ac_cv_cygwin=yes
3477 else
3478   echo "configure: failed program was:" >&5
3479   cat conftest.$ac_ext >&5
3480   rm -rf conftest*
3481   ac_cv_cygwin=no
3482 fi
3483 rm -f conftest*
3484 fi
3485
3486 echo "$ac_t""$ac_cv_cygwin" 1>&6
3487 CYGWIN=
3488 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3489 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3490 echo "configure:3491: checking for mingw32 environment" >&5
3491 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3492   echo $ac_n "(cached) $ac_c" 1>&6
3493 else
3494   cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497
3498 int main() {
3499 return __MINGW32__;
3500 ; return 0; }
3501 EOF
3502 if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3503   rm -rf conftest*
3504   ac_cv_mingw32=yes
3505 else
3506   echo "configure: failed program was:" >&5
3507   cat conftest.$ac_ext >&5
3508   rm -rf conftest*
3509   ac_cv_mingw32=no
3510 fi
3511 rm -f conftest*
3512 fi
3513
3514 echo "$ac_t""$ac_cv_mingw32" 1>&6
3515 MINGW32=
3516 test "$ac_cv_mingw32" = yes && MINGW32=yes
3517 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3518 echo "configure:3519: checking for EMX OS/2 environment" >&5
3519 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3520   echo $ac_n "(cached) $ac_c" 1>&6
3521 else
3522   cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525
3526 int main() {
3527 return __EMX__;
3528 ; return 0; }
3529 EOF
3530 if { (eval echo configure:3531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3531   rm -rf conftest*
3532   ac_cv_emxos2=yes
3533 else
3534   echo "configure: failed program was:" >&5
3535   cat conftest.$ac_ext >&5
3536   rm -rf conftest*
3537   ac_cv_emxos2=no
3538 fi
3539 rm -f conftest*
3540 fi
3541
3542 echo "$ac_t""$ac_cv_emxos2" 1>&6
3543 EMXOS2=
3544 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3545
3546
3547
3548 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3549 echo "configure:3550: checking for executable suffix" >&5
3550 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3551   echo $ac_n "(cached) $ac_c" 1>&6
3552 else
3553   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3554   ac_cv_exeext=.exe
3555 else
3556   rm -f conftest*
3557   echo 'int main () { return 0; }' > conftest.$ac_ext
3558   ac_cv_exeext=
3559   if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3560     for file in conftest.*; do
3561       case $file in
3562       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3563       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3564       esac
3565     done
3566   else
3567     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3568   fi
3569   rm -f conftest*
3570   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3571 fi
3572 fi
3573
3574 EXEEXT=""
3575 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3576 echo "$ac_t""${ac_cv_exeext}" 1>&6
3577 ac_exeext=$EXEEXT
3578
3579 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3580 echo "configure:3581: checking for object suffix" >&5
3581 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   rm -f conftest*
3585 echo 'int i = 1;' > conftest.$ac_ext
3586 if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3587   for ac_file in conftest.*; do
3588     case $ac_file in
3589     *.c) ;;
3590     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3591     esac
3592   done
3593 else
3594   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3595 fi
3596 rm -f conftest*
3597 fi
3598
3599 echo "$ac_t""$ac_cv_objext" 1>&6
3600 OBJEXT=$ac_cv_objext
3601 ac_objext=$ac_cv_objext
3602
3603
3604 cat >> confdefs.h <<EOF
3605 #define EXEEXT "${EXEEXT}"
3606 EOF
3607
3608
3609 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3610 echo "configure:3611: checking for be_app in -lbe" >&5
3611 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3612 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3613   echo $ac_n "(cached) $ac_c" 1>&6
3614 else
3615   ac_save_LIBS="$LIBS"
3616 LIBS="-lbe -lroot -lnet $LIBS"
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 /* Override any gcc2 internal prototype to avoid an error.  */
3621 /* We use char because int might match the return type of a gcc2
3622     builtin and then its argument prototype would still apply.  */
3623 char be_app();
3624
3625 int main() {
3626 be_app()
3627 ; return 0; }
3628 EOF
3629 if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3630   rm -rf conftest*
3631   eval "ac_cv_lib_$ac_lib_var=yes"
3632 else
3633   echo "configure: failed program was:" >&5
3634   cat conftest.$ac_ext >&5
3635   rm -rf conftest*
3636   eval "ac_cv_lib_$ac_lib_var=no"
3637 fi
3638 rm -f conftest*
3639 LIBS="$ac_save_LIBS"
3640
3641 fi
3642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3643   echo "$ac_t""yes" 1>&6
3644   LIBS="$LIBS -lbe -lroot -lnet"
3645 else
3646   echo "$ac_t""no" 1>&6
3647 :
3648 fi
3649
3650
3651
3652
3653
3654 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3655 echo "configure:3656: checking for ${CC-cc} option to accept ANSI C" >&5
3656 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   am_cv_prog_cc_stdc=no
3660 ac_save_CC="$CC"
3661 # Don't try gcc -ansi; that turns off useful extensions and
3662 # breaks some systems' header files.
3663 # AIX                   -qlanglvl=ansi
3664 # Ultrix and OSF/1      -std1
3665 # HP-UX 10.20 and later -Ae
3666 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3667 # SVR4                  -Xc -D__EXTENSIONS__
3668 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3669 do
3670   CC="$ac_save_CC $ac_arg"
3671   cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 #include <stdarg.h>
3675 #include <stdio.h>
3676 #include <sys/types.h>
3677 #include <sys/stat.h>
3678 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3679 struct buf { int x; };
3680 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3681 static char *e (p, i)
3682      char **p;
3683      int i;
3684 {
3685   return p[i];
3686 }
3687 static char *f (char * (*g) (char **, int), char **p, ...)
3688 {
3689   char *s;
3690   va_list v;
3691   va_start (v,p);
3692   s = g (p, va_arg (v,int));
3693   va_end (v);
3694   return s;
3695 }
3696 int test (int i, double x);
3697 struct s1 {int (*f) (int a);};
3698 struct s2 {int (*f) (double a);};
3699 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3700 int argc;
3701 char **argv;
3702
3703 int main() {
3704
3705 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3706
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3710   rm -rf conftest*
3711   am_cv_prog_cc_stdc="$ac_arg"; break
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715 fi
3716 rm -f conftest*
3717 done
3718 CC="$ac_save_CC"
3719
3720 fi
3721
3722 if test -z "$am_cv_prog_cc_stdc"; then
3723   echo "$ac_t""none needed" 1>&6
3724 else
3725   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3726 fi
3727 case "x$am_cv_prog_cc_stdc" in
3728   x|xno) ;;
3729   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3730 esac
3731
3732 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3733         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3734 fi
3735
3736 # test for make depend flag
3737 OL_MKDEP=
3738 OL_MKDEP_FLAGS=
3739 if test -z "${MKDEP}"; then
3740         OL_MKDEP="${CC-cc}"
3741         if test -z "${MKDEP_FLAGS}"; then
3742                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3743 echo "configure:3744: checking for ${OL_MKDEP} depend flag" >&5
3744 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3745   echo $ac_n "(cached) $ac_c" 1>&6
3746 else
3747   
3748                         ol_cv_mkdep=no
3749                         for flag in "-M" "-xM"; do
3750                                 cat > conftest.c <<EOF
3751  noCode;
3752 EOF
3753                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3754                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3755                                 then
3756                                         if test ! -f conftest."${ac_object}" ; then
3757                                                 ol_cv_mkdep=$flag
3758                                                 OL_MKDEP_FLAGS="$flag"
3759                                                 break
3760                                         fi
3761                                 fi
3762                         done
3763                         rm -f conftest*
3764                 
3765 fi
3766
3767 echo "$ac_t""$ol_cv_mkdep" 1>&6
3768         else
3769                 cc_cv_mkdep=yes
3770                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3771         fi
3772 else
3773         cc_cv_mkdep=yes
3774         OL_MKDEP="${MKDEP}"
3775         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3776 fi
3777
3778
3779
3780 if test "${ol_cv_mkdep}" = no ; then
3781         # this will soon become an error
3782         echo "configure: warning: do not know how to generate dependencies" 1>&2
3783 fi
3784
3785 ol_link_modules=no
3786 if test $ol_enable_modules != no ; then
3787         for ac_hdr in ltdl.h
3788 do
3789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3791 echo "configure:3792: checking for $ac_hdr" >&5
3792 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 #include <$ac_hdr>
3799 EOF
3800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3801 { (eval echo configure:3802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3803 if test -z "$ac_err"; then
3804   rm -rf conftest*
3805   eval "ac_cv_header_$ac_safe=yes"
3806 else
3807   echo "$ac_err" >&5
3808   echo "configure: failed program was:" >&5
3809   cat conftest.$ac_ext >&5
3810   rm -rf conftest*
3811   eval "ac_cv_header_$ac_safe=no"
3812 fi
3813 rm -f conftest*
3814 fi
3815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3816   echo "$ac_t""yes" 1>&6
3817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3818   cat >> confdefs.h <<EOF
3819 #define $ac_tr_hdr 1
3820 EOF
3821  
3822 else
3823   echo "$ac_t""no" 1>&6
3824 fi
3825 done
3826
3827
3828         if test $ac_cv_header_ltdl_h = no ; then
3829                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3830
3831         fi
3832
3833         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3834 echo "configure:3835: checking for lt_dlinit in -lltdl" >&5
3835 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3837   echo $ac_n "(cached) $ac_c" 1>&6
3838 else
3839   ac_save_LIBS="$LIBS"
3840 LIBS="-lltdl  $LIBS"
3841 cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 /* Override any gcc2 internal prototype to avoid an error.  */
3845 /* We use char because int might match the return type of a gcc2
3846     builtin and then its argument prototype would still apply.  */
3847 char lt_dlinit();
3848
3849 int main() {
3850 lt_dlinit()
3851 ; return 0; }
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3854   rm -rf conftest*
3855   eval "ac_cv_lib_$ac_lib_var=yes"
3856 else
3857   echo "configure: failed program was:" >&5
3858   cat conftest.$ac_ext >&5
3859   rm -rf conftest*
3860   eval "ac_cv_lib_$ac_lib_var=no"
3861 fi
3862 rm -f conftest*
3863 LIBS="$ac_save_LIBS"
3864
3865 fi
3866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3867   echo "$ac_t""yes" 1>&6
3868     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3869     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3870   cat >> confdefs.h <<EOF
3871 #define $ac_tr_lib 1
3872 EOF
3873
3874   LIBS="-lltdl $LIBS"
3875
3876 else
3877   echo "$ac_t""no" 1>&6
3878 fi
3879
3880         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3881                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3882         fi
3883         ol_link_modules=yes
3884 else
3885         ol_with_bdb2_module=static
3886         ol_with_ldap_module=static
3887         ol_with_ldbm_module=static
3888         ol_with_passwd_module=static
3889         ol_with_perl_module=static
3890         ol_with_shell_module=static
3891         ol_with_tcl_module=static
3892 fi
3893
3894 # test for EBCDIC
3895 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3896 echo "configure:3897: checking for EBCDIC" >&5
3897 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3898   echo $ac_n "(cached) $ac_c" 1>&6
3899 else
3900   
3901         cat > conftest.$ac_ext <<EOF
3902 #line 3903 "configure"
3903 #include "confdefs.h"
3904
3905 #if !('M' == 0xd4)
3906 #include <__ASCII__/generate_error.h>
3907 #endif
3908
3909 EOF
3910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3911 { (eval echo configure:3912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3913 if test -z "$ac_err"; then
3914   rm -rf conftest*
3915   ol_cv_cpp_ebcdic=yes
3916 else
3917   echo "$ac_err" >&5
3918   echo "configure: failed program was:" >&5
3919   cat conftest.$ac_ext >&5
3920   rm -rf conftest*
3921   ol_cv_cpp_ebcdic=no
3922 fi
3923 rm -f conftest*
3924 fi
3925
3926 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3927 if test $ol_cv_cpp_ebcdic = yes ; then
3928         cat >> confdefs.h <<\EOF
3929 #define HAVE_EBCDIC 1
3930 EOF
3931
3932 fi
3933
3934 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3935 echo "configure:3936: checking for ANSI C header files" >&5
3936 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3937   echo $ac_n "(cached) $ac_c" 1>&6
3938 else
3939   cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <stdlib.h>
3943 #include <stdarg.h>
3944 #include <string.h>
3945 #include <float.h>
3946 EOF
3947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3948 { (eval echo configure:3949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3950 if test -z "$ac_err"; then
3951   rm -rf conftest*
3952   ol_cv_header_stdc=yes
3953 else
3954   echo "$ac_err" >&5
3955   echo "configure: failed program was:" >&5
3956   cat conftest.$ac_ext >&5
3957   rm -rf conftest*
3958   ol_cv_header_stdc=no
3959 fi
3960 rm -f conftest*
3961
3962 if test $ol_cv_header_stdc = yes; then
3963   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 #include <string.h>
3968 EOF
3969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3970   egrep "memchr" >/dev/null 2>&1; then
3971   :
3972 else
3973   rm -rf conftest*
3974   ol_cv_header_stdc=no
3975 fi
3976 rm -f conftest*
3977
3978 fi
3979
3980 if test $ol_cv_header_stdc = yes; then
3981   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3982 cat > conftest.$ac_ext <<EOF
3983 #line 3984 "configure"
3984 #include "confdefs.h"
3985 #include <stdlib.h>
3986 EOF
3987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3988   egrep "free" >/dev/null 2>&1; then
3989   :
3990 else
3991   rm -rf conftest*
3992   ol_cv_header_stdc=no
3993 fi
3994 rm -f conftest*
3995
3996 fi
3997
3998 if test $ol_cv_header_stdc = yes; then
3999   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4000 if test "$cross_compiling" = yes; then
4001   :
4002 else
4003   cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <ctype.h>
4007 #ifndef HAVE_EBCDIC
4008 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4009 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4010 #else
4011 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4012                 || ('j' <= (c) && (c) <= 'r') \
4013                 || ('s' <= (c) && (c) <= 'z'))
4014 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4015 #endif
4016 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4017 int main () { int i; for (i = 0; i < 256; i++)
4018 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4019 exit (0); }
4020
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4023 then
4024   :
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -fr conftest*
4029   ol_cv_header_stdc=no
4030 fi
4031 rm -fr conftest*
4032 fi
4033
4034 fi
4035 fi
4036
4037 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4038 if test $ol_cv_header_stdc = yes; then
4039   cat >> confdefs.h <<\EOF
4040 #define STDC_HEADERS 1
4041 EOF
4042
4043 fi
4044 ac_cv_header_stdc=disable
4045
4046
4047 if test $ol_cv_header_stdc != yes; then
4048         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4049 fi
4050
4051 ac_header_dirent=no
4052 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4053 do
4054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4055 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4056 echo "configure:4057: checking for $ac_hdr that defines DIR" >&5
4057 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4058   echo $ac_n "(cached) $ac_c" 1>&6
4059 else
4060   cat > conftest.$ac_ext <<EOF
4061 #line 4062 "configure"
4062 #include "confdefs.h"
4063 #include <sys/types.h>
4064 #include <$ac_hdr>
4065 int main() {
4066 DIR *dirp = 0;
4067 ; return 0; }
4068 EOF
4069 if { (eval echo configure:4070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4070   rm -rf conftest*
4071   eval "ac_cv_header_dirent_$ac_safe=yes"
4072 else
4073   echo "configure: failed program was:" >&5
4074   cat conftest.$ac_ext >&5
4075   rm -rf conftest*
4076   eval "ac_cv_header_dirent_$ac_safe=no"
4077 fi
4078 rm -f conftest*
4079 fi
4080 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4081   echo "$ac_t""yes" 1>&6
4082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4083   cat >> confdefs.h <<EOF
4084 #define $ac_tr_hdr 1
4085 EOF
4086  ac_header_dirent=$ac_hdr; break
4087 else
4088   echo "$ac_t""no" 1>&6
4089 fi
4090 done
4091 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4092 if test $ac_header_dirent = dirent.h; then
4093 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4094 echo "configure:4095: checking for opendir in -ldir" >&5
4095 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4097   echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099   ac_save_LIBS="$LIBS"
4100 LIBS="-ldir  $LIBS"
4101 cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104 /* Override any gcc2 internal prototype to avoid an error.  */
4105 /* We use char because int might match the return type of a gcc2
4106     builtin and then its argument prototype would still apply.  */
4107 char opendir();
4108
4109 int main() {
4110 opendir()
4111 ; return 0; }
4112 EOF
4113 if { (eval echo configure:4114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4114   rm -rf conftest*
4115   eval "ac_cv_lib_$ac_lib_var=yes"
4116 else
4117   echo "configure: failed program was:" >&5
4118   cat conftest.$ac_ext >&5
4119   rm -rf conftest*
4120   eval "ac_cv_lib_$ac_lib_var=no"
4121 fi
4122 rm -f conftest*
4123 LIBS="$ac_save_LIBS"
4124
4125 fi
4126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4127   echo "$ac_t""yes" 1>&6
4128   LIBS="$LIBS -ldir"
4129 else
4130   echo "$ac_t""no" 1>&6
4131 fi
4132
4133 else
4134 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4135 echo "configure:4136: checking for opendir in -lx" >&5
4136 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4138   echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140   ac_save_LIBS="$LIBS"
4141 LIBS="-lx  $LIBS"
4142 cat > conftest.$ac_ext <<EOF
4143 #line 4144 "configure"
4144 #include "confdefs.h"
4145 /* Override any gcc2 internal prototype to avoid an error.  */
4146 /* We use char because int might match the return type of a gcc2
4147     builtin and then its argument prototype would still apply.  */
4148 char opendir();
4149
4150 int main() {
4151 opendir()
4152 ; return 0; }
4153 EOF
4154 if { (eval echo configure:4155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4155   rm -rf conftest*
4156   eval "ac_cv_lib_$ac_lib_var=yes"
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160   rm -rf conftest*
4161   eval "ac_cv_lib_$ac_lib_var=no"
4162 fi
4163 rm -f conftest*
4164 LIBS="$ac_save_LIBS"
4165
4166 fi
4167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4168   echo "$ac_t""yes" 1>&6
4169   LIBS="$LIBS -lx"
4170 else
4171   echo "$ac_t""no" 1>&6
4172 fi
4173
4174 fi
4175
4176 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4177 echo "configure:4178: checking for sys/wait.h that is POSIX.1 compatible" >&5
4178 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4179   echo $ac_n "(cached) $ac_c" 1>&6
4180 else
4181   cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 #include <sys/types.h>
4185 #include <sys/wait.h>
4186 #ifndef WEXITSTATUS
4187 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4188 #endif
4189 #ifndef WIFEXITED
4190 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4191 #endif
4192 int main() {
4193 int s;
4194 wait (&s);
4195 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4196 ; return 0; }
4197 EOF
4198 if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4199   rm -rf conftest*
4200   ac_cv_header_sys_wait_h=yes
4201 else
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204   rm -rf conftest*
4205   ac_cv_header_sys_wait_h=no
4206 fi
4207 rm -f conftest*
4208 fi
4209
4210 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4211 if test $ac_cv_header_sys_wait_h = yes; then
4212   cat >> confdefs.h <<\EOF
4213 #define HAVE_SYS_WAIT_H 1
4214 EOF
4215
4216 fi
4217
4218 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4219 echo "configure:4220: checking POSIX termios" >&5
4220 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4221   echo $ac_n "(cached) $ac_c" 1>&6
4222 else
4223   cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 #include <sys/types.h>
4227 #include <unistd.h>
4228 #include <termios.h>
4229 int main() {
4230 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4231    tcgetattr(0, 0);
4232 ; return 0; }
4233 EOF
4234 if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4235   rm -rf conftest*
4236   am_cv_sys_posix_termios=yes
4237 else
4238   echo "configure: failed program was:" >&5
4239   cat conftest.$ac_ext >&5
4240   rm -rf conftest*
4241   am_cv_sys_posix_termios=no
4242 fi
4243 rm -f conftest*
4244 fi
4245
4246 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4247
4248
4249  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4250 echo "configure:4251: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4251 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4252   echo $ac_n "(cached) $ac_c" 1>&6
4253 else
4254   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4255
4256   gwinsz_in_termios_h=no
4257   if test $am_cv_sys_posix_termios = yes; then
4258     cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 #include <sys/types.h>
4262 #     include <termios.h>
4263 #     ifdef TIOCGWINSZ
4264         yes
4265 #     endif
4266     
4267 EOF
4268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4269   egrep "yes" >/dev/null 2>&1; then
4270   rm -rf conftest*
4271   gwinsz_in_termios_h=yes
4272 fi
4273 rm -f conftest*
4274
4275   fi
4276
4277   if test $gwinsz_in_termios_h = no; then
4278     cat > conftest.$ac_ext <<EOF
4279 #line 4280 "configure"
4280 #include "confdefs.h"
4281 #include <sys/types.h>
4282 #     include <sys/ioctl.h>
4283 #     ifdef TIOCGWINSZ
4284         yes
4285 #     endif
4286     
4287 EOF
4288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4289   egrep "yes" >/dev/null 2>&1; then
4290   rm -rf conftest*
4291   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4292 fi
4293 rm -f conftest*
4294
4295   fi
4296   
4297 fi
4298
4299 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4300   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4301     cat >> confdefs.h <<\EOF
4302 #define GWINSZ_IN_SYS_IOCTL 1
4303 EOF
4304
4305   fi
4306
4307 if test $am_cv_sys_posix_termios = yes ; then
4308         cat >> confdefs.h <<\EOF
4309 #define HAVE_POSIX_TERMIOS 1
4310 EOF
4311
4312 fi
4313
4314 for ac_hdr in \
4315         arpa/inet.h             \
4316         arpa/nameser.h  \
4317         assert.h                \
4318         crypt.h                 \
4319         errno.h                 \
4320         fcntl.h                 \
4321         filio.h                 \
4322         getopt.h                \
4323         grp.h                   \
4324         libutil.h               \
4325         limits.h                \
4326         locale.h                \
4327         netinet/tcp.h   \
4328         malloc.h                \
4329         memory.h                \
4330         psap.h                  \
4331         pwd.h                   \
4332         resolv.h                \
4333         sgtty.h                 \
4334         shadow.h                \
4335         stdarg.h                \
4336         stddef.h                \
4337         string.h                \
4338         strings.h               \
4339         sysexits.h              \
4340         sys/file.h              \
4341         sys/filio.h             \
4342         sys/errno.h             \
4343         sys/ioctl.h             \
4344         sys/param.h             \
4345         sys/resource.h  \
4346         sys/select.h    \
4347         sys/socket.h    \
4348         sys/syslog.h    \
4349         sys/time.h              \
4350         sys/types.h             \
4351         syslog.h                \
4352         termios.h               \
4353         unistd.h                \
4354
4355 do
4356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4358 echo "configure:4359: checking for $ac_hdr" >&5
4359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4360   echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362   cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 #include <$ac_hdr>
4366 EOF
4367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4368 { (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4370 if test -z "$ac_err"; then
4371   rm -rf conftest*
4372   eval "ac_cv_header_$ac_safe=yes"
4373 else
4374   echo "$ac_err" >&5
4375   echo "configure: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   rm -rf conftest*
4378   eval "ac_cv_header_$ac_safe=no"
4379 fi
4380 rm -f conftest*
4381 fi
4382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4383   echo "$ac_t""yes" 1>&6
4384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4385   cat >> confdefs.h <<EOF
4386 #define $ac_tr_hdr 1
4387 EOF
4388  
4389 else
4390   echo "$ac_t""no" 1>&6
4391 fi
4392 done
4393
4394
4395
4396
4397 echo $ac_n "checking for socket""... $ac_c" 1>&6
4398 echo "configure:4399: checking for socket" >&5
4399 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4400   echo $ac_n "(cached) $ac_c" 1>&6
4401 else
4402   cat > conftest.$ac_ext <<EOF
4403 #line 4404 "configure"
4404 #include "confdefs.h"
4405 /* System header to define __stub macros and hopefully few prototypes,
4406     which can conflict with char socket(); below.  */
4407 #include <assert.h>
4408 /* Override any gcc2 internal prototype to avoid an error.  */
4409 /* We use char because int might match the return type of a gcc2
4410     builtin and then its argument prototype would still apply.  */
4411 char socket();
4412 char (*f)();
4413
4414 int main() {
4415
4416 /* The GNU C library defines this for functions which it implements
4417     to always fail with ENOSYS.  Some functions are actually named
4418     something starting with __ and the normal name is an alias.  */
4419 #if defined (__stub_socket) || defined (__stub___socket)
4420 choke me
4421 #else
4422 f = socket;
4423 #endif
4424
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4428   rm -rf conftest*
4429   eval "ac_cv_func_socket=yes"
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -rf conftest*
4434   eval "ac_cv_func_socket=no"
4435 fi
4436 rm -f conftest*
4437 fi
4438
4439 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4440   echo "$ac_t""yes" 1>&6
4441   :
4442 else
4443   echo "$ac_t""no" 1>&6
4444         
4445         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4446 echo "configure:4447: checking for main in -lsocket" >&5
4447 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4449   echo $ac_n "(cached) $ac_c" 1>&6
4450 else
4451   ac_save_LIBS="$LIBS"
4452 LIBS="-lsocket  $LIBS"
4453 cat > conftest.$ac_ext <<EOF
4454 #line 4455 "configure"
4455 #include "confdefs.h"
4456
4457 int main() {
4458 main()
4459 ; return 0; }
4460 EOF
4461 if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4462   rm -rf conftest*
4463   eval "ac_cv_lib_$ac_lib_var=yes"
4464 else
4465   echo "configure: failed program was:" >&5
4466   cat conftest.$ac_ext >&5
4467   rm -rf conftest*
4468   eval "ac_cv_lib_$ac_lib_var=no"
4469 fi
4470 rm -f conftest*
4471 LIBS="$ac_save_LIBS"
4472
4473 fi
4474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4475   echo "$ac_t""yes" 1>&6
4476     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4478   cat >> confdefs.h <<EOF
4479 #define $ac_tr_lib 1
4480 EOF
4481
4482   LIBS="-lsocket $LIBS"
4483
4484 else
4485   echo "$ac_t""no" 1>&6
4486 fi
4487
4488         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4489 echo "configure:4490: checking for main in -lnet" >&5
4490 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4492   echo $ac_n "(cached) $ac_c" 1>&6
4493 else
4494   ac_save_LIBS="$LIBS"
4495 LIBS="-lnet  $LIBS"
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499
4500 int main() {
4501 main()
4502 ; return 0; }
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4505   rm -rf conftest*
4506   eval "ac_cv_lib_$ac_lib_var=yes"
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=no"
4512 fi
4513 rm -f conftest*
4514 LIBS="$ac_save_LIBS"
4515
4516 fi
4517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4518   echo "$ac_t""yes" 1>&6
4519     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4520     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4521   cat >> confdefs.h <<EOF
4522 #define $ac_tr_lib 1
4523 EOF
4524
4525   LIBS="-lnet $LIBS"
4526
4527 else
4528   echo "$ac_t""no" 1>&6
4529 fi
4530
4531         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4532 echo "configure:4533: checking for socket in -lnet" >&5
4533 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4535   echo $ac_n "(cached) $ac_c" 1>&6
4536 else
4537   ac_save_LIBS="$LIBS"
4538 LIBS="-lnet  $LIBS"
4539 cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542 /* Override any gcc2 internal prototype to avoid an error.  */
4543 /* We use char because int might match the return type of a gcc2
4544     builtin and then its argument prototype would still apply.  */
4545 char socket();
4546
4547 int main() {
4548 socket()
4549 ; return 0; }
4550 EOF
4551 if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4552   rm -rf conftest*
4553   eval "ac_cv_lib_$ac_lib_var=yes"
4554 else
4555   echo "configure: failed program was:" >&5
4556   cat conftest.$ac_ext >&5
4557   rm -rf conftest*
4558   eval "ac_cv_lib_$ac_lib_var=no"
4559 fi
4560 rm -f conftest*
4561 LIBS="$ac_save_LIBS"
4562
4563 fi
4564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4565   echo "$ac_t""yes" 1>&6
4566     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4567     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4568   cat >> confdefs.h <<EOF
4569 #define $ac_tr_lib 1
4570 EOF
4571
4572   LIBS="-lnet $LIBS"
4573
4574 else
4575   echo "$ac_t""no" 1>&6
4576 fi
4577
4578         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4579 echo "configure:4580: checking for main in -lnsl_s" >&5
4580 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4582   echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584   ac_save_LIBS="$LIBS"
4585 LIBS="-lnsl_s  $LIBS"
4586 cat > conftest.$ac_ext <<EOF
4587 #line 4588 "configure"
4588 #include "confdefs.h"
4589
4590 int main() {
4591 main()
4592 ; return 0; }
4593 EOF
4594 if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4595   rm -rf conftest*
4596   eval "ac_cv_lib_$ac_lib_var=yes"
4597 else
4598   echo "configure: failed program was:" >&5
4599   cat conftest.$ac_ext >&5
4600   rm -rf conftest*
4601   eval "ac_cv_lib_$ac_lib_var=no"
4602 fi
4603 rm -f conftest*
4604 LIBS="$ac_save_LIBS"
4605
4606 fi
4607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4608   echo "$ac_t""yes" 1>&6
4609     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4610     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4611   cat >> confdefs.h <<EOF
4612 #define $ac_tr_lib 1
4613 EOF
4614
4615   LIBS="-lnsl_s $LIBS"
4616
4617 else
4618   echo "$ac_t""no" 1>&6
4619 fi
4620
4621         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4622 echo "configure:4623: checking for main in -lnsl" >&5
4623 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   ac_save_LIBS="$LIBS"
4628 LIBS="-lnsl  $LIBS"
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632
4633 int main() {
4634 main()
4635 ; return 0; }
4636 EOF
4637 if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4638   rm -rf conftest*
4639   eval "ac_cv_lib_$ac_lib_var=yes"
4640 else
4641   echo "configure: failed program was:" >&5
4642   cat conftest.$ac_ext >&5
4643   rm -rf conftest*
4644   eval "ac_cv_lib_$ac_lib_var=no"
4645 fi
4646 rm -f conftest*
4647 LIBS="$ac_save_LIBS"
4648
4649 fi
4650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4651   echo "$ac_t""yes" 1>&6
4652     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4653     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4654   cat >> confdefs.h <<EOF
4655 #define $ac_tr_lib 1
4656 EOF
4657
4658   LIBS="-lnsl $LIBS"
4659
4660 else
4661   echo "$ac_t""no" 1>&6
4662 fi
4663
4664         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4665 echo "configure:4666: checking for socket in -linet" >&5
4666 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4668   echo $ac_n "(cached) $ac_c" 1>&6
4669 else
4670   ac_save_LIBS="$LIBS"
4671 LIBS="-linet  $LIBS"
4672 cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 /* Override any gcc2 internal prototype to avoid an error.  */
4676 /* We use char because int might match the return type of a gcc2
4677     builtin and then its argument prototype would still apply.  */
4678 char socket();
4679
4680 int main() {
4681 socket()
4682 ; return 0; }
4683 EOF
4684 if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=yes"
4687 else
4688   echo "configure: failed program was:" >&5
4689   cat conftest.$ac_ext >&5
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=no"
4692 fi
4693 rm -f conftest*
4694 LIBS="$ac_save_LIBS"
4695
4696 fi
4697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4698   echo "$ac_t""yes" 1>&6
4699     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4701   cat >> confdefs.h <<EOF
4702 #define $ac_tr_lib 1
4703 EOF
4704
4705   LIBS="-linet $LIBS"
4706
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4712 echo "configure:4713: checking for main in -lgen" >&5
4713 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   ac_save_LIBS="$LIBS"
4718 LIBS="-lgen  $LIBS"
4719 cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722
4723 int main() {
4724 main()
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   eval "ac_cv_lib_$ac_lib_var=yes"
4730 else
4731   echo "configure: failed program was:" >&5
4732   cat conftest.$ac_ext >&5
4733   rm -rf conftest*
4734   eval "ac_cv_lib_$ac_lib_var=no"
4735 fi
4736 rm -f conftest*
4737 LIBS="$ac_save_LIBS"
4738
4739 fi
4740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4741   echo "$ac_t""yes" 1>&6
4742     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4743     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4744   cat >> confdefs.h <<EOF
4745 #define $ac_tr_lib 1
4746 EOF
4747
4748   LIBS="-lgen $LIBS"
4749
4750 else
4751   echo "$ac_t""no" 1>&6
4752 fi
4753
4754
4755 fi
4756
4757
4758 echo $ac_n "checking for select""... $ac_c" 1>&6
4759 echo "configure:4760: checking for select" >&5
4760 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 /* System header to define __stub macros and hopefully few prototypes,
4767     which can conflict with char select(); below.  */
4768 #include <assert.h>
4769 /* Override any gcc2 internal prototype to avoid an error.  */
4770 /* We use char because int might match the return type of a gcc2
4771     builtin and then its argument prototype would still apply.  */
4772 char select();
4773 char (*f)();
4774
4775 int main() {
4776
4777 /* The GNU C library defines this for functions which it implements
4778     to always fail with ENOSYS.  Some functions are actually named
4779     something starting with __ and the normal name is an alias.  */
4780 #if defined (__stub_select) || defined (__stub___select)
4781 choke me
4782 #else
4783 f = select;
4784 #endif
4785
4786 ; return 0; }
4787 EOF
4788 if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4789   rm -rf conftest*
4790   eval "ac_cv_func_select=yes"
4791 else
4792   echo "configure: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   rm -rf conftest*
4795   eval "ac_cv_func_select=no"
4796 fi
4797 rm -f conftest*
4798 fi
4799
4800 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802   :
4803 else
4804   echo "$ac_t""no" 1>&6
4805 { echo "configure: error: select() required." 1>&2; exit 1; }
4806 fi
4807
4808
4809 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4810 echo "configure:4811: checking types of arguments for select()" >&5
4811  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4812   echo $ac_n "(cached) $ac_c" 1>&6
4813 else
4814    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4815   echo $ac_n "(cached) $ac_c" 1>&6
4816 else
4817     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4818   echo $ac_n "(cached) $ac_c" 1>&6
4819 else
4820      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4821      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4822       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4823        cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 #ifdef HAVE_SYS_TYPES_H
4827 #include <sys/types.h>
4828 #endif
4829 #ifdef HAVE_SYS_TIME_H
4830 #include <sys/time.h>
4831 #endif
4832 #ifdef HAVE_SYS_SELECT_H
4833 #include <sys/select.h>
4834 #endif
4835 #ifdef HAVE_SYS_SOCKET_H
4836 #include <sys/socket.h>
4837 #endif
4838 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);
4839 int main() {
4840
4841 ; return 0; }
4842 EOF
4843 if { (eval echo configure:4844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4844   rm -rf conftest*
4845           ac_not_found=no ; break 3
4846 else
4847   echo "configure: failed program was:" >&5
4848   cat conftest.$ac_ext >&5
4849   rm -rf conftest*
4850   ac_not_found=yes
4851 fi
4852 rm -f conftest*
4853       done
4854      done
4855     done
4856    
4857 fi
4858   
4859 fi
4860  
4861 fi
4862  if test "$ac_not_found" = yes; then
4863   ac_cv_func_select_arg1=int 
4864   ac_cv_func_select_arg234='int *' 
4865   ac_cv_func_select_arg5='struct timeval *'
4866  fi
4867  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4868  cat >> confdefs.h <<EOF
4869 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4870 EOF
4871
4872  cat >> confdefs.h <<EOF
4873 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4874 EOF
4875
4876  cat >> confdefs.h <<EOF
4877 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4878 EOF
4879
4880
4881
4882
4883 for ac_hdr in regex.h 
4884 do
4885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4887 echo "configure:4888: checking for $ac_hdr" >&5
4888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4889   echo $ac_n "(cached) $ac_c" 1>&6
4890 else
4891   cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 #include <$ac_hdr>
4895 EOF
4896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4897 { (eval echo configure:4898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4899 if test -z "$ac_err"; then
4900   rm -rf conftest*
4901   eval "ac_cv_header_$ac_safe=yes"
4902 else
4903   echo "$ac_err" >&5
4904   echo "configure: failed program was:" >&5
4905   cat conftest.$ac_ext >&5
4906   rm -rf conftest*
4907   eval "ac_cv_header_$ac_safe=no"
4908 fi
4909 rm -f conftest*
4910 fi
4911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4912   echo "$ac_t""yes" 1>&6
4913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4914   cat >> confdefs.h <<EOF
4915 #define $ac_tr_hdr 1
4916 EOF
4917  
4918 else
4919   echo "$ac_t""no" 1>&6
4920 fi
4921 done
4922
4923 if test "$ac_cv_header_regex_h" != yes ; then
4924         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4925 fi
4926 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4927 echo "configure:4928: checking for regfree" >&5
4928 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934 /* System header to define __stub macros and hopefully few prototypes,
4935     which can conflict with char regfree(); below.  */
4936 #include <assert.h>
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 /* We use char because int might match the return type of a gcc2
4939     builtin and then its argument prototype would still apply.  */
4940 char regfree();
4941 char (*f)();
4942
4943 int main() {
4944
4945 /* The GNU C library defines this for functions which it implements
4946     to always fail with ENOSYS.  Some functions are actually named
4947     something starting with __ and the normal name is an alias.  */
4948 #if defined (__stub_regfree) || defined (__stub___regfree)
4949 choke me
4950 #else
4951 f = regfree;
4952 #endif
4953
4954 ; return 0; }
4955 EOF
4956 if { (eval echo configure:4957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4957   rm -rf conftest*
4958   eval "ac_cv_func_regfree=yes"
4959 else
4960   echo "configure: failed program was:" >&5
4961   cat conftest.$ac_ext >&5
4962   rm -rf conftest*
4963   eval "ac_cv_func_regfree=no"
4964 fi
4965 rm -f conftest*
4966 fi
4967
4968 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4969   echo "$ac_t""yes" 1>&6
4970   :
4971 else
4972   echo "$ac_t""no" 1>&6
4973 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4974 fi
4975
4976
4977
4978 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4979 echo "configure:4980: checking for compatible POSIX regex" >&5
4980 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4981   echo $ac_n "(cached) $ac_c" 1>&6
4982 else
4983   
4984         if test "$cross_compiling" = yes; then
4985   ol_cv_c_posix_regex=cross
4986 else
4987   cat > conftest.$ac_ext <<EOF
4988 #line 4989 "configure"
4989 #include "confdefs.h"
4990
4991 #include <sys/types.h>
4992 #include <regex.h>
4993 static char *pattern, *string;
4994 main()
4995 {
4996         int rc;
4997         regex_t re;
4998
4999         pattern = "^A";
5000
5001         if(regcomp(&re, pattern, 0)) {
5002                 return -1;
5003         }
5004         
5005         string = "ALL MATCH";
5006         
5007         rc = regexec(&re, string, 0, (void*)0, 0);
5008
5009         regfree(&re);
5010
5011         return rc;
5012 }
5013 EOF
5014 if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5015 then
5016   ol_cv_c_posix_regex=yes
5017 else
5018   echo "configure: failed program was:" >&5
5019   cat conftest.$ac_ext >&5
5020   rm -fr conftest*
5021   ol_cv_c_posix_regex=no
5022 fi
5023 rm -fr conftest*
5024 fi
5025
5026 fi
5027
5028 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5029
5030 if test "$ol_cv_c_posix_regex" = no ; then
5031         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5032 fi
5033
5034
5035 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5036 echo "configure:5037: checking for sigset in -lV3" >&5
5037 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5039   echo $ac_n "(cached) $ac_c" 1>&6
5040 else
5041   ac_save_LIBS="$LIBS"
5042 LIBS="-lV3  $LIBS"
5043 cat > conftest.$ac_ext <<EOF
5044 #line 5045 "configure"
5045 #include "confdefs.h"
5046 /* Override any gcc2 internal prototype to avoid an error.  */
5047 /* We use char because int might match the return type of a gcc2
5048     builtin and then its argument prototype would still apply.  */
5049 char sigset();
5050
5051 int main() {
5052 sigset()
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   eval "ac_cv_lib_$ac_lib_var=yes"
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=no"
5063 fi
5064 rm -f conftest*
5065 LIBS="$ac_save_LIBS"
5066
5067 fi
5068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5069   echo "$ac_t""yes" 1>&6
5070     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5071     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5072   cat >> confdefs.h <<EOF
5073 #define $ac_tr_lib 1
5074 EOF
5075
5076   LIBS="-lV3 $LIBS"
5077
5078 else
5079   echo "$ac_t""no" 1>&6
5080 fi
5081
5082
5083 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5084 echo "configure:5085: checking for res_search" >&5
5085 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5091 /* System header to define __stub macros and hopefully few prototypes,
5092     which can conflict with char res_search(); below.  */
5093 #include <assert.h>
5094 /* Override any gcc2 internal prototype to avoid an error.  */
5095 /* We use char because int might match the return type of a gcc2
5096     builtin and then its argument prototype would still apply.  */
5097 char res_search();
5098 char (*f)();
5099
5100 int main() {
5101
5102 /* The GNU C library defines this for functions which it implements
5103     to always fail with ENOSYS.  Some functions are actually named
5104     something starting with __ and the normal name is an alias.  */
5105 #if defined (__stub_res_search) || defined (__stub___res_search)
5106 choke me
5107 #else
5108 f = res_search;
5109 #endif
5110
5111 ; return 0; }
5112 EOF
5113 if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114   rm -rf conftest*
5115   eval "ac_cv_func_res_search=yes"
5116 else
5117   echo "configure: failed program was:" >&5
5118   cat conftest.$ac_ext >&5
5119   rm -rf conftest*
5120   eval "ac_cv_func_res_search=no"
5121 fi
5122 rm -f conftest*
5123 fi
5124
5125 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5126   echo "$ac_t""yes" 1>&6
5127   :
5128 else
5129   echo "$ac_t""no" 1>&6
5130 fi
5131
5132 if test $ac_cv_func_res_search = no ; then 
5133         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5134 echo "configure:5135: checking for res_search in -lbind" >&5
5135 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139   ac_save_LIBS="$LIBS"
5140 LIBS="-lbind  $LIBS"
5141 cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 /* We use char because int might match the return type of a gcc2
5146     builtin and then its argument prototype would still apply.  */
5147 char res_search();
5148
5149 int main() {
5150 res_search()
5151 ; return 0; }
5152 EOF
5153 if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5154   rm -rf conftest*
5155   eval "ac_cv_lib_$ac_lib_var=yes"
5156 else
5157   echo "configure: failed program was:" >&5
5158   cat conftest.$ac_ext >&5
5159   rm -rf conftest*
5160   eval "ac_cv_lib_$ac_lib_var=no"
5161 fi
5162 rm -f conftest*
5163 LIBS="$ac_save_LIBS"
5164
5165 fi
5166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5167   echo "$ac_t""yes" 1>&6
5168     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5169     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5170   cat >> confdefs.h <<EOF
5171 #define $ac_tr_lib 1
5172 EOF
5173
5174   LIBS="-lbind $LIBS"
5175
5176 else
5177   echo "$ac_t""no" 1>&6
5178 fi
5179
5180         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5181 fi
5182
5183 if test $ac_cv_func_res_search = no ; then 
5184         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5185 echo "configure:5186: checking for __res_search in -lbind" >&5
5186 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190   ac_save_LIBS="$LIBS"
5191 LIBS="-lbind  $LIBS"
5192 cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195 /* Override any gcc2 internal prototype to avoid an error.  */
5196 /* We use char because int might match the return type of a gcc2
5197     builtin and then its argument prototype would still apply.  */
5198 char __res_search();
5199
5200 int main() {
5201 __res_search()
5202 ; return 0; }
5203 EOF
5204 if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5205   rm -rf conftest*
5206   eval "ac_cv_lib_$ac_lib_var=yes"
5207 else
5208   echo "configure: failed program was:" >&5
5209   cat conftest.$ac_ext >&5
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=no"
5212 fi
5213 rm -f conftest*
5214 LIBS="$ac_save_LIBS"
5215
5216 fi
5217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5221   cat >> confdefs.h <<EOF
5222 #define $ac_tr_lib 1
5223 EOF
5224
5225   LIBS="-lbind $LIBS"
5226
5227 else
5228   echo "$ac_t""no" 1>&6
5229 fi
5230
5231         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5232 fi
5233
5234 if test $ac_cv_func_res_search = no ; then 
5235         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5236 echo "configure:5237: checking for res_search in -lresolv" >&5
5237 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5238 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5239   echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5241   ac_save_LIBS="$LIBS"
5242 LIBS="-lresolv  $LIBS"
5243 cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246 /* Override any gcc2 internal prototype to avoid an error.  */
5247 /* We use char because int might match the return type of a gcc2
5248     builtin and then its argument prototype would still apply.  */
5249 char res_search();
5250
5251 int main() {
5252 res_search()
5253 ; return 0; }
5254 EOF
5255 if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5256   rm -rf conftest*
5257   eval "ac_cv_lib_$ac_lib_var=yes"
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   eval "ac_cv_lib_$ac_lib_var=no"
5263 fi
5264 rm -f conftest*
5265 LIBS="$ac_save_LIBS"
5266
5267 fi
5268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5269   echo "$ac_t""yes" 1>&6
5270     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5272   cat >> confdefs.h <<EOF
5273 #define $ac_tr_lib 1
5274 EOF
5275
5276   LIBS="-lresolv $LIBS"
5277
5278 else
5279   echo "$ac_t""no" 1>&6
5280 fi
5281
5282         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5283 fi
5284
5285 if test "$ac_cv_func_res_search" = yes ; then
5286         cat >> confdefs.h <<\EOF
5287 #define HAVE_RES_SEARCH 1
5288 EOF
5289
5290 elif test $ol_enable_dns = yes ; then
5291         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5292 elif test $ol_enable_dns != no ; then
5293         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5294 fi
5295
5296
5297 # ISODE tests
5298 ol_link_isode=no
5299 if test $ol_enable_ldapd != no ; then
5300         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5301
5302                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5303 echo "configure:5304: checking for main in -lxtpp" >&5
5304 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5305 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5306   echo $ac_n "(cached) $ac_c" 1>&6
5307 else
5308   ac_save_LIBS="$LIBS"
5309 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5310 cat > conftest.$ac_ext <<EOF
5311 #line 5312 "configure"
5312 #include "confdefs.h"
5313
5314 int main() {
5315 main()
5316 ; return 0; }
5317 EOF
5318 if { (eval echo configure:5319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5319   rm -rf conftest*
5320   eval "ac_cv_lib_$ac_lib_var=yes"
5321 else
5322   echo "configure: failed program was:" >&5
5323   cat conftest.$ac_ext >&5
5324   rm -rf conftest*
5325   eval "ac_cv_lib_$ac_lib_var=no"
5326 fi
5327 rm -f conftest*
5328 LIBS="$ac_save_LIBS"
5329
5330 fi
5331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5332   echo "$ac_t""yes" 1>&6
5333   
5334                 ol_link_isode=yes
5335                 cat >> confdefs.h <<\EOF
5336 #define HAVE_XTPP 1
5337 EOF
5338
5339                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5340                 
5341 else
5342   echo "$ac_t""no" 1>&6
5343 :
5344 fi
5345
5346         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5347 echo "configure:5348: checking for main in -ldsap" >&5
5348 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5349 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5350   echo $ac_n "(cached) $ac_c" 1>&6
5351 else
5352   ac_save_LIBS="$LIBS"
5353 LIBS="-ldsap -lisode $LIBS"
5354 cat > conftest.$ac_ext <<EOF
5355 #line 5356 "configure"
5356 #include "confdefs.h"
5357
5358 int main() {
5359 main()
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5363   rm -rf conftest*
5364   eval "ac_cv_lib_$ac_lib_var=yes"
5365 else
5366   echo "configure: failed program was:" >&5
5367   cat conftest.$ac_ext >&5
5368   rm -rf conftest*
5369   eval "ac_cv_lib_$ac_lib_var=no"
5370 fi
5371 rm -f conftest*
5372 LIBS="$ac_save_LIBS"
5373
5374 fi
5375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5376   echo "$ac_t""yes" 1>&6
5377   
5378                 ol_link_isode=yes
5379                 cat >> confdefs.h <<\EOF
5380 #define HAVE_DSAP 1
5381 EOF
5382
5383                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5384                 
5385 else
5386   echo "$ac_t""no" 1>&6
5387 :
5388 fi
5389
5390         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5391 echo "configure:5392: checking for main in -lisode" >&5
5392 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5394   echo $ac_n "(cached) $ac_c" 1>&6
5395 else
5396   ac_save_LIBS="$LIBS"
5397 LIBS="-lisode  $LIBS"
5398 cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401
5402 int main() {
5403 main()
5404 ; return 0; }
5405 EOF
5406 if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=yes"
5409 else
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   eval "ac_cv_lib_$ac_lib_var=no"
5414 fi
5415 rm -f conftest*
5416 LIBS="$ac_save_LIBS"
5417
5418 fi
5419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5420   echo "$ac_t""yes" 1>&6
5421   
5422                 ol_link_isode=yes
5423                 cat >> confdefs.h <<\EOF
5424 #define HAVE_ISODE 1
5425 EOF
5426
5427                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5428                 
5429 else
5430   echo "$ac_t""no" 1>&6
5431 :
5432 fi
5433
5434 fi
5435
5436 if test $ol_link_isode != no; then
5437         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5438 echo "configure:5439: checking for main in -lpp" >&5
5439 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5440 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5441   echo $ac_n "(cached) $ac_c" 1>&6
5442 else
5443   ac_save_LIBS="$LIBS"
5444 LIBS="-lpp  $LIBS"
5445 cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448
5449 int main() {
5450 main()
5451 ; return 0; }
5452 EOF
5453 if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5454   rm -rf conftest*
5455   eval "ac_cv_lib_$ac_lib_var=yes"
5456 else
5457   echo "configure: failed program was:" >&5
5458   cat conftest.$ac_ext >&5
5459   rm -rf conftest*
5460   eval "ac_cv_lib_$ac_lib_var=no"
5461 fi
5462 rm -f conftest*
5463 LIBS="$ac_save_LIBS"
5464
5465 fi
5466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5467   echo "$ac_t""yes" 1>&6
5468   
5469                 cat >> confdefs.h <<\EOF
5470 #define HAVE_PP 1
5471 EOF
5472
5473                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5474                 
5475 else
5476   echo "$ac_t""no" 1>&6
5477 :
5478 fi
5479
5480
5481         # Extract the first word of "pepsy", so it can be a program name with args.
5482 set dummy pepsy; ac_word=$2
5483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5484 echo "configure:5485: checking for $ac_word" >&5
5485 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   case "$PEPSY" in
5489   /*)
5490   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5491   ;;
5492   ?:/*)                  
5493   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5494   ;;
5495   *)
5496   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5497   ac_dummy="$PATH"
5498   for ac_dir in $ac_dummy; do 
5499     test -z "$ac_dir" && ac_dir=.
5500     if test -f $ac_dir/$ac_word; then
5501       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5502       break
5503     fi
5504   done
5505   IFS="$ac_save_ifs"
5506   ;;
5507 esac
5508 fi
5509 PEPSY="$ac_cv_path_PEPSY"
5510 if test -n "$PEPSY"; then
5511   echo "$ac_t""$PEPSY" 1>&6
5512 else
5513   echo "$ac_t""no" 1>&6
5514 fi
5515
5516 fi
5517
5518 if test $ol_enable_quipu != no ; then
5519         for ac_hdr in quipu/commonarg.h
5520 do
5521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5523 echo "configure:5524: checking for $ac_hdr" >&5
5524 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5525   echo $ac_n "(cached) $ac_c" 1>&6
5526 else
5527   cat > conftest.$ac_ext <<EOF
5528 #line 5529 "configure"
5529 #include "confdefs.h"
5530 #include <$ac_hdr>
5531 EOF
5532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5533 { (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5535 if test -z "$ac_err"; then
5536   rm -rf conftest*
5537   eval "ac_cv_header_$ac_safe=yes"
5538 else
5539   echo "$ac_err" >&5
5540   echo "configure: failed program was:" >&5
5541   cat conftest.$ac_ext >&5
5542   rm -rf conftest*
5543   eval "ac_cv_header_$ac_safe=no"
5544 fi
5545 rm -f conftest*
5546 fi
5547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5548   echo "$ac_t""yes" 1>&6
5549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5550   cat >> confdefs.h <<EOF
5551 #define $ac_tr_hdr 1
5552 EOF
5553  
5554 else
5555   echo "$ac_t""no" 1>&6
5556 fi
5557 done
5558
5559
5560         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5561                 BUILD_QUIPU=yes
5562         elif test $ol_enable_quipu = auto ; then
5563                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5564         else
5565                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5566         fi
5567 fi
5568
5569 ol_link_kerberos=no
5570
5571 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5572         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5573 do
5574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5576 echo "configure:5577: checking for $ac_hdr" >&5
5577 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5578   echo $ac_n "(cached) $ac_c" 1>&6
5579 else
5580   cat > conftest.$ac_ext <<EOF
5581 #line 5582 "configure"
5582 #include "confdefs.h"
5583 #include <$ac_hdr>
5584 EOF
5585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5586 { (eval echo configure:5587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5588 if test -z "$ac_err"; then
5589   rm -rf conftest*
5590   eval "ac_cv_header_$ac_safe=yes"
5591 else
5592   echo "$ac_err" >&5
5593   echo "configure: failed program was:" >&5
5594   cat conftest.$ac_ext >&5
5595   rm -rf conftest*
5596   eval "ac_cv_header_$ac_safe=no"
5597 fi
5598 rm -f conftest*
5599 fi
5600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5601   echo "$ac_t""yes" 1>&6
5602     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5603   cat >> confdefs.h <<EOF
5604 #define $ac_tr_hdr 1
5605 EOF
5606  
5607 else
5608   echo "$ac_t""no" 1>&6
5609 fi
5610 done
5611
5612
5613         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5614                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5615 echo "configure:5616: checking for main in -lkrb4" >&5
5616 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5617 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5618   echo $ac_n "(cached) $ac_c" 1>&6
5619 else
5620   ac_save_LIBS="$LIBS"
5621 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5622 cat > conftest.$ac_ext <<EOF
5623 #line 5624 "configure"
5624 #include "confdefs.h"
5625
5626 int main() {
5627 main()
5628 ; return 0; }
5629 EOF
5630 if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5631   rm -rf conftest*
5632   eval "ac_cv_lib_$ac_lib_var=yes"
5633 else
5634   echo "configure: failed program was:" >&5
5635   cat conftest.$ac_ext >&5
5636   rm -rf conftest*
5637   eval "ac_cv_lib_$ac_lib_var=no"
5638 fi
5639 rm -f conftest*
5640 LIBS="$ac_save_LIBS"
5641
5642 fi
5643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5644   echo "$ac_t""yes" 1>&6
5645   have_k5=yes
5646 else
5647   echo "$ac_t""no" 1>&6
5648 have_k5=no
5649 fi
5650
5651
5652                 if test $have_k5 = yes ; then
5653                         ol_with_kerberos=found
5654                         ol_link_kerberos=yes
5655
5656                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5657
5658                         LIBS="$KRB_LIBS $LIBS"
5659
5660                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5661 echo "configure:5662: checking for des_debug in Kerberos libraries" >&5
5662 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   
5666                                                                 save_LIBS="$LIBS"
5667                                 LIBS="$KRB_LIBS $LIBS"
5668                                 cat > conftest.$ac_ext <<EOF
5669 #line 5670 "configure"
5670 #include "confdefs.h"
5671
5672 #include <kerberosIV/krb.h>
5673 #include <kerberosIV/des.h>
5674 extern int des_debug;
5675
5676 int main() {
5677
5678 des_debug = 1;
5679
5680 ; return 0; }
5681 EOF
5682 if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5683   rm -rf conftest*
5684   ol_cv_var_des_debug=yes
5685 else
5686   echo "configure: failed program was:" >&5
5687   cat conftest.$ac_ext >&5
5688   rm -rf conftest*
5689   ol_cv_var_des_debug=no
5690 fi
5691 rm -f conftest*
5692                                                                 LIBS="$save_LIBS"
5693                         
5694 fi
5695
5696 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5697
5698                         if test $ol_cv_var_des_debug = yes ; then
5699                                 cat >> confdefs.h <<\EOF
5700 #define HAVE_DES_DEBUG 1
5701 EOF
5702
5703                         fi
5704
5705                         LIBS="$save_LIBS"
5706                 fi
5707         fi
5708 fi
5709
5710 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5711         for ac_hdr in krb.h des.h
5712 do
5713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5715 echo "configure:5716: checking for $ac_hdr" >&5
5716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5717   echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719   cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5722 #include <$ac_hdr>
5723 EOF
5724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5725 { (eval echo configure:5726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5727 if test -z "$ac_err"; then
5728   rm -rf conftest*
5729   eval "ac_cv_header_$ac_safe=yes"
5730 else
5731   echo "$ac_err" >&5
5732   echo "configure: failed program was:" >&5
5733   cat conftest.$ac_ext >&5
5734   rm -rf conftest*
5735   eval "ac_cv_header_$ac_safe=no"
5736 fi
5737 rm -f conftest*
5738 fi
5739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5740   echo "$ac_t""yes" 1>&6
5741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5742   cat >> confdefs.h <<EOF
5743 #define $ac_tr_hdr 1
5744 EOF
5745  
5746 else
5747   echo "$ac_t""no" 1>&6
5748 fi
5749 done
5750
5751
5752         if test $ac_cv_header_krb_h = yes ; then
5753                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5754 echo "configure:5755: checking for main in -lkrb" >&5
5755 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5757   echo $ac_n "(cached) $ac_c" 1>&6
5758 else
5759   ac_save_LIBS="$LIBS"
5760 LIBS="-lkrb -ldes $LIBS"
5761 cat > conftest.$ac_ext <<EOF
5762 #line 5763 "configure"
5763 #include "confdefs.h"
5764
5765 int main() {
5766 main()
5767 ; return 0; }
5768 EOF
5769 if { (eval echo configure:5770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5770   rm -rf conftest*
5771   eval "ac_cv_lib_$ac_lib_var=yes"
5772 else
5773   echo "configure: failed program was:" >&5
5774   cat conftest.$ac_ext >&5
5775   rm -rf conftest*
5776   eval "ac_cv_lib_$ac_lib_var=no"
5777 fi
5778 rm -f conftest*
5779 LIBS="$ac_save_LIBS"
5780
5781 fi
5782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5783   echo "$ac_t""yes" 1>&6
5784   have_k4=yes
5785 else
5786   echo "$ac_t""no" 1>&6
5787 have_k4=no
5788 fi
5789
5790
5791                 if test $have_k4 = yes ; then
5792                         ol_with_kerberos=found
5793                         ol_link_kerberos=yes
5794
5795                         KRB_LIBS="-lkrb -ldes"
5796                 fi
5797         fi
5798 fi
5799
5800 if test $ol_link_kerberos = yes ; then
5801         cat >> confdefs.h <<\EOF
5802 #define HAVE_KERBEROS 1
5803 EOF
5804
5805 fi
5806
5807 ol_link_tls=no
5808 if test $ol_with_tls != no ; then
5809         
5810         for ac_hdr in openssl/ssl.h ssl.h
5811 do
5812 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5813 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5814 echo "configure:5815: checking for $ac_hdr" >&5
5815 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5816   echo $ac_n "(cached) $ac_c" 1>&6
5817 else
5818   cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5821 #include <$ac_hdr>
5822 EOF
5823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5824 { (eval echo configure:5825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5826 if test -z "$ac_err"; then
5827   rm -rf conftest*
5828   eval "ac_cv_header_$ac_safe=yes"
5829 else
5830   echo "$ac_err" >&5
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -rf conftest*
5834   eval "ac_cv_header_$ac_safe=no"
5835 fi
5836 rm -f conftest*
5837 fi
5838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5839   echo "$ac_t""yes" 1>&6
5840     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5841   cat >> confdefs.h <<EOF
5842 #define $ac_tr_hdr 1
5843 EOF
5844  
5845 else
5846   echo "$ac_t""no" 1>&6
5847 fi
5848 done
5849
5850         
5851         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5852                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5853 echo "configure:5854: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5854 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5856   echo $ac_n "(cached) $ac_c" 1>&6
5857 else
5858   ac_save_LIBS="$LIBS"
5859 LIBS="-lssl -lcrypto $LIBS"
5860 cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863 /* Override any gcc2 internal prototype to avoid an error.  */
5864 /* We use char because int might match the return type of a gcc2
5865     builtin and then its argument prototype would still apply.  */
5866 char SSLeay_add_ssl_algorithms();
5867
5868 int main() {
5869 SSLeay_add_ssl_algorithms()
5870 ; return 0; }
5871 EOF
5872 if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5873   rm -rf conftest*
5874   eval "ac_cv_lib_$ac_lib_var=yes"
5875 else
5876   echo "configure: failed program was:" >&5
5877   cat conftest.$ac_ext >&5
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=no"
5880 fi
5881 rm -f conftest*
5882 LIBS="$ac_save_LIBS"
5883
5884 fi
5885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5886   echo "$ac_t""yes" 1>&6
5887   have_ssleay=yes
5888                         need_rsaref=no
5889 else
5890   echo "$ac_t""no" 1>&6
5891 have_ssleay=no
5892 fi
5893
5894                         
5895                 if test $have_ssleay = no ; then
5896                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5897 echo "configure:5898: checking for SSL_library_init in -lssl" >&5
5898 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5900   echo $ac_n "(cached) $ac_c" 1>&6
5901 else
5902   ac_save_LIBS="$LIBS"
5903 LIBS="-lssl -lcrypto $LIBS"
5904 cat > conftest.$ac_ext <<EOF
5905 #line 5906 "configure"
5906 #include "confdefs.h"
5907 /* Override any gcc2 internal prototype to avoid an error.  */
5908 /* We use char because int might match the return type of a gcc2
5909     builtin and then its argument prototype would still apply.  */
5910 char SSL_library_init();
5911
5912 int main() {
5913 SSL_library_init()
5914 ; return 0; }
5915 EOF
5916 if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=yes"
5919 else
5920   echo "configure: failed program was:" >&5
5921   cat conftest.$ac_ext >&5
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=no"
5924 fi
5925 rm -f conftest*
5926 LIBS="$ac_save_LIBS"
5927
5928 fi
5929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5930   echo "$ac_t""yes" 1>&6
5931   have_ssleay=yes
5932                                 need_rsaref=no
5933 else
5934   echo "$ac_t""no" 1>&6
5935 have_ssleay=no
5936 fi
5937
5938                 fi
5939
5940                 if test $have_ssleay = no ; then
5941                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5942 echo "configure:5943: checking for ssl3_accept in -lssl" >&5
5943 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5945   echo $ac_n "(cached) $ac_c" 1>&6
5946 else
5947   ac_save_LIBS="$LIBS"
5948 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5949 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952 /* Override any gcc2 internal prototype to avoid an error.  */
5953 /* We use char because int might match the return type of a gcc2
5954     builtin and then its argument prototype would still apply.  */
5955 char ssl3_accept();
5956
5957 int main() {
5958 ssl3_accept()
5959 ; return 0; }
5960 EOF
5961 if { (eval echo configure:5962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5962   rm -rf conftest*
5963   eval "ac_cv_lib_$ac_lib_var=yes"
5964 else
5965   echo "configure: failed program was:" >&5
5966   cat conftest.$ac_ext >&5
5967   rm -rf conftest*
5968   eval "ac_cv_lib_$ac_lib_var=no"
5969 fi
5970 rm -f conftest*
5971 LIBS="$ac_save_LIBS"
5972
5973 fi
5974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5975   echo "$ac_t""yes" 1>&6
5976   have_ssleay=yes
5977                                 need_rsaref=yes
5978 else
5979   echo "$ac_t""no" 1>&6
5980 have_ssleay=no
5981 fi
5982
5983                 fi
5984
5985                 if test $have_ssleay = yes ; then
5986                         ol_with_tls=found
5987                         ol_link_tls=yes
5988
5989                         cat >> confdefs.h <<\EOF
5990 #define HAVE_SSLEAY 1
5991 EOF
5992
5993
5994                         if test $need_rsaref = yes; then
5995                                 cat >> confdefs.h <<\EOF
5996 #define HAVE_RSAREF 1
5997 EOF
5998
5999
6000                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6001                         else
6002                                 TLS_LIBS="-lssl -lcrypto"
6003                         fi
6004                 fi
6005         fi
6006 fi
6007
6008 if test $ol_link_tls = yes ; then
6009         cat >> confdefs.h <<\EOF
6010 #define HAVE_TLS 1
6011 EOF
6012
6013 fi      
6014
6015 for ac_func in \
6016         ctime_r                 \
6017         gethostbyname_r gethostbyaddr_r \
6018
6019 do
6020 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6021 echo "configure:6022: checking for $ac_func" >&5
6022 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6023   echo $ac_n "(cached) $ac_c" 1>&6
6024 else
6025   cat > conftest.$ac_ext <<EOF
6026 #line 6027 "configure"
6027 #include "confdefs.h"
6028 /* System header to define __stub macros and hopefully few prototypes,
6029     which can conflict with char $ac_func(); below.  */
6030 #include <assert.h>
6031 /* Override any gcc2 internal prototype to avoid an error.  */
6032 /* We use char because int might match the return type of a gcc2
6033     builtin and then its argument prototype would still apply.  */
6034 char $ac_func();
6035 char (*f)();
6036
6037 int main() {
6038
6039 /* The GNU C library defines this for functions which it implements
6040     to always fail with ENOSYS.  Some functions are actually named
6041     something starting with __ and the normal name is an alias.  */
6042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6043 choke me
6044 #else
6045 f = $ac_func;
6046 #endif
6047
6048 ; return 0; }
6049 EOF
6050 if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6051   rm -rf conftest*
6052   eval "ac_cv_func_$ac_func=yes"
6053 else
6054   echo "configure: failed program was:" >&5
6055   cat conftest.$ac_ext >&5
6056   rm -rf conftest*
6057   eval "ac_cv_func_$ac_func=no"
6058 fi
6059 rm -f conftest*
6060 fi
6061
6062 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6063   echo "$ac_t""yes" 1>&6
6064     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6065   cat >> confdefs.h <<EOF
6066 #define $ac_tr_func 1
6067 EOF
6068  
6069 else
6070   echo "$ac_t""no" 1>&6
6071 fi
6072 done
6073
6074
6075 if test "$ac_cv_func_ctime_r" = no ; then
6076         ol_cv_func_ctime_r_nargs=0
6077 else
6078         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6079 echo "configure:6080: checking number of arguments of ctime_r" >&5
6080 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6081   echo $ac_n "(cached) $ac_c" 1>&6
6082 else
6083   cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 #include <time.h>
6087 int main() {
6088 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6089 ; return 0; }
6090 EOF
6091 if { (eval echo configure:6092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6092   rm -rf conftest*
6093   ol_cv_func_ctime_r_nargs=3
6094 else
6095   echo "configure: failed program was:" >&5
6096   cat conftest.$ac_ext >&5
6097   rm -rf conftest*
6098   cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 #include <time.h>
6102 int main() {
6103 time_t ti; char *buffer; ctime_r(&ti,buffer);
6104 ; return 0; }
6105 EOF
6106 if { (eval echo configure:6107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6107   rm -rf conftest*
6108   ol_cv_func_ctime_r_nargs=2
6109 else
6110   echo "configure: failed program was:" >&5
6111   cat conftest.$ac_ext >&5
6112   rm -rf conftest*
6113   ol_cv_func_ctime_r_nargs=0
6114 fi
6115 rm -f conftest*
6116 fi
6117 rm -f conftest*
6118 fi
6119
6120 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6121   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6122     cat >> confdefs.h <<EOF
6123 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6124 EOF
6125
6126   fi
6127
6128 fi
6129
6130 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6131         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6132 echo "configure:6133: checking number of arguments of gethostbyname_r" >&5
6133 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6134   echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136   cat > conftest.$ac_ext <<EOF
6137 #line 6138 "configure"
6138 #include "confdefs.h"
6139 #include <sys/types.h>
6140 #include <sys/socket.h>
6141 #include <netinet/in.h>
6142 #include <netdb.h>
6143 #define BUFSIZE (sizeof(struct hostent)+10)
6144 int main() {
6145 struct hostent hent; char buffer[BUFSIZE];
6146                 int bufsize=BUFSIZE;int h_errno;
6147                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6148                         buffer, bufsize, &h_errno);
6149 ; return 0; }
6150 EOF
6151 if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6152   rm -rf conftest*
6153   ol_cv_func_gethostbyname_r_nargs=5
6154 else
6155   echo "configure: failed program was:" >&5
6156   cat conftest.$ac_ext >&5
6157   rm -rf conftest*
6158   cat > conftest.$ac_ext <<EOF
6159 #line 6160 "configure"
6160 #include "confdefs.h"
6161 #include <sys/types.h>
6162 #include <sys/socket.h>
6163 #include <netinet/in.h>
6164 #include <netdb.h>
6165 #define BUFSIZE (sizeof(struct hostent)+10)
6166 int main() {
6167 struct hostent hent;struct hostent *rhent;
6168                         char buffer[BUFSIZE];
6169                         int bufsize=BUFSIZE;int h_errno;
6170                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6171                                 &rhent, &h_errno);
6172 ; return 0; }
6173 EOF
6174 if { (eval echo configure:6175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6175   rm -rf conftest*
6176   ol_cv_func_gethostbyname_r_nargs=6
6177 else
6178   echo "configure: failed program was:" >&5
6179   cat conftest.$ac_ext >&5
6180   rm -rf conftest*
6181   ol_cv_func_gethostbyname_r_nargs=0
6182 fi
6183 rm -f conftest*
6184 fi
6185 rm -f conftest*
6186 fi
6187
6188 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6189   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6190         cat >> confdefs.h <<EOF
6191 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6192 EOF
6193
6194   fi
6195
6196 else
6197         ol_cv_func_gethostbyname_r_nargs=0
6198 fi
6199  
6200 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6201         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6202 echo "configure:6203: checking number of arguments of gethostbyaddr_r" >&5
6203 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6204   echo $ac_n "(cached) $ac_c" 1>&6
6205 else
6206   cat > conftest.$ac_ext <<EOF
6207 #line 6208 "configure"
6208 #include "confdefs.h"
6209 #include <sys/types.h>
6210 #include <sys/socket.h>
6211 #include <netinet/in.h>
6212 #include <netdb.h>
6213 #define BUFSIZE (sizeof(struct hostent)+10)
6214 int main() {
6215 struct hostent hent; char buffer[BUFSIZE]; 
6216             struct in_addr add;
6217             size_t alen=sizeof(struct in_addr);
6218             int bufsize=BUFSIZE;int h_errno;
6219                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6220                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6221 ; return 0; }
6222 EOF
6223 if { (eval echo configure:6224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6224   rm -rf conftest*
6225   ol_cv_func_gethostbyaddr_r_nargs=7
6226 else
6227   echo "configure: failed program was:" >&5
6228   cat conftest.$ac_ext >&5
6229   rm -rf conftest*
6230   cat > conftest.$ac_ext <<EOF
6231 #line 6232 "configure"
6232 #include "confdefs.h"
6233 #include <sys/types.h>
6234 #include <sys/socket.h>
6235 #include <netinet/in.h>
6236 #include <netdb.h>
6237 #define BUFSIZE (sizeof(struct hostent)+10)
6238 int main() {
6239 struct hostent hent;
6240                         struct hostent *rhent; char buffer[BUFSIZE]; 
6241                         struct in_addr add;
6242                         size_t alen=sizeof(struct in_addr);
6243                         int bufsize=BUFSIZE;int h_errno;
6244                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6245                                 alen, AF_INET, &hent, buffer, bufsize, 
6246                                 &rhent, &h_errno);
6247 ; return 0; }
6248 EOF
6249 if { (eval echo configure:6250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6250   rm -rf conftest*
6251   ol_cv_func_gethostbyaddr_r_nargs=8
6252 else
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   ol_cv_func_gethostbyaddr_r_nargs=0
6257 fi
6258 rm -f conftest*
6259 fi
6260 rm -f conftest*
6261 fi
6262
6263 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6264   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6265     cat >> confdefs.h <<EOF
6266 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6267 EOF
6268
6269   fi
6270
6271 else
6272         ol_cv_func_gethostbyaddr_r_nargs=0
6273 fi
6274
6275 if test "$ac_cv_func_ctime_r" = yes \
6276         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6277         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6278         -a "$ac_cv_func_gethostbyname_r" = yes \
6279         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6280         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6281         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6282         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6283         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6284         ; then
6285  
6286         cat >> confdefs.h <<\EOF
6287 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6288 EOF
6289
6290 fi
6291
6292 ol_link_threads=no
6293 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6294         -o $ol_with_threads = posix ; then
6295
6296         for ac_hdr in pthread.h
6297 do
6298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6300 echo "configure:6301: checking for $ac_hdr" >&5
6301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6302   echo $ac_n "(cached) $ac_c" 1>&6
6303 else
6304   cat > conftest.$ac_ext <<EOF
6305 #line 6306 "configure"
6306 #include "confdefs.h"
6307 #include <$ac_hdr>
6308 EOF
6309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6310 { (eval echo configure:6311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6312 if test -z "$ac_err"; then
6313   rm -rf conftest*
6314   eval "ac_cv_header_$ac_safe=yes"
6315 else
6316   echo "$ac_err" >&5
6317   echo "configure: failed program was:" >&5
6318   cat conftest.$ac_ext >&5
6319   rm -rf conftest*
6320   eval "ac_cv_header_$ac_safe=no"
6321 fi
6322 rm -f conftest*
6323 fi
6324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6325   echo "$ac_t""yes" 1>&6
6326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6327   cat >> confdefs.h <<EOF
6328 #define $ac_tr_hdr 1
6329 EOF
6330  
6331 else
6332   echo "$ac_t""no" 1>&6
6333 fi
6334 done
6335
6336
6337         if test $ac_cv_header_pthread_h = yes ; then
6338                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6339 echo "configure:6340: checking POSIX thread version" >&5
6340 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6341   echo $ac_n "(cached) $ac_c" 1>&6
6342 else
6343   
6344         cat > conftest.$ac_ext <<EOF
6345 #line 6346 "configure"
6346 #include "confdefs.h"
6347
6348 #               include <pthread.h>
6349                 /* this check could be improved */
6350 #               ifdef PTHREAD_ONCE_INIT
6351                         pthread_version_final
6352 #               endif
6353         
6354 EOF
6355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6356   egrep "pthread_version_final" >/dev/null 2>&1; then
6357   rm -rf conftest*
6358   ol_pthread_final=yes
6359 else
6360   rm -rf conftest*
6361   ol_pthread_final=no
6362 fi
6363 rm -f conftest*
6364
6365
6366         cat > conftest.$ac_ext <<EOF
6367 #line 6368 "configure"
6368 #include "confdefs.h"
6369
6370 #               include <pthread.h>
6371                 /* this check could be improved */
6372 #               ifdef pthread_once_init
6373                         pthread_version_draft4
6374 #               endif
6375         
6376 EOF
6377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6378   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6379   rm -rf conftest*
6380   ol_pthread_draft4=yes
6381 else
6382   rm -rf conftest*
6383   ol_pthread_draft4=no
6384 fi
6385 rm -f conftest*
6386
6387
6388         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6389                 ol_cv_pthread_version=final
6390         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6391                 ol_cv_pthread_version=draft4
6392         else
6393                 ol_cv_pthread_version=unknown
6394         fi
6395
6396 fi
6397
6398 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6399
6400
6401                 if test $ol_cv_pthread_version = final ; then
6402                         cat >> confdefs.h <<\EOF
6403 #define HAVE_PTHREADS_FINAL 1
6404 EOF
6405
6406                 elif test $ol_cv_pthread_version = draft4 ; then
6407                         cat >> confdefs.h <<\EOF
6408 #define HAVE_PTHREADS_D4 1
6409 EOF
6410
6411                 else
6412                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6413                 fi
6414
6415                 # consider threads found
6416                 ol_with_threads=found
6417
6418                 
6419         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6420 echo "configure:6421: checking for LinuxThreads pthread.h" >&5
6421 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6422   echo $ac_n "(cached) $ac_c" 1>&6
6423 else
6424   cat > conftest.$ac_ext <<EOF
6425 #line 6426 "configure"
6426 #include "confdefs.h"
6427 #include <pthread.h>
6428 EOF
6429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6430   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6431   rm -rf conftest*
6432   ol_cv_header_linux_threads=yes
6433 else
6434   rm -rf conftest*
6435   ol_cv_header_linux_threads=no
6436 fi
6437 rm -f conftest*
6438
6439                 
6440 fi
6441
6442 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6443         if test $ol_cv_header_linux_threads = yes; then
6444                 cat >> confdefs.h <<\EOF
6445 #define HAVE_LINUX_THREADS 1
6446 EOF
6447
6448         fi
6449
6450                 
6451         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6452 echo "configure:6453: checking for GNU Pth pthread.h" >&5
6453 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6454   echo $ac_n "(cached) $ac_c" 1>&6
6455 else
6456   cat > conftest.$ac_ext <<EOF
6457 #line 6458 "configure"
6458 #include "confdefs.h"
6459 #include <pthread.h>
6460 #ifdef _POSIX_THREAD_IS_GNU_PTH
6461         __gnu_pth__
6462 #endif
6463
6464 EOF
6465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6466   egrep "__gnu_pth__" >/dev/null 2>&1; then
6467   rm -rf conftest*
6468   ol_cv_header_gnu_pth_pthread_h=yes
6469 else
6470   rm -rf conftest*
6471   ol_cv_header_gnu_pth_pthread_h=no
6472 fi
6473 rm -f conftest*
6474
6475                 
6476 fi
6477
6478 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6479
6480
6481                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6482                         for ac_hdr in sched.h
6483 do
6484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6486 echo "configure:6487: checking for $ac_hdr" >&5
6487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6488   echo $ac_n "(cached) $ac_c" 1>&6
6489 else
6490   cat > conftest.$ac_ext <<EOF
6491 #line 6492 "configure"
6492 #include "confdefs.h"
6493 #include <$ac_hdr>
6494 EOF
6495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6496 { (eval echo configure:6497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6498 if test -z "$ac_err"; then
6499   rm -rf conftest*
6500   eval "ac_cv_header_$ac_safe=yes"
6501 else
6502   echo "$ac_err" >&5
6503   echo "configure: failed program was:" >&5
6504   cat conftest.$ac_ext >&5
6505   rm -rf conftest*
6506   eval "ac_cv_header_$ac_safe=no"
6507 fi
6508 rm -f conftest*
6509 fi
6510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6511   echo "$ac_t""yes" 1>&6
6512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6513   cat >> confdefs.h <<EOF
6514 #define $ac_tr_hdr 1
6515 EOF
6516  
6517 else
6518   echo "$ac_t""no" 1>&6
6519 fi
6520 done
6521
6522                 fi
6523
6524                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6525                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6526 echo "configure:6527: checking for pthread_create in default libraries" >&5
6527 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6528   echo $ac_n "(cached) $ac_c" 1>&6
6529 else
6530   
6531                 if test "$cross_compiling" = yes; then
6532   cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 /* pthread test headers */
6536 #include <pthread.h>
6537 #ifndef NULL
6538 #define NULL (void*)0
6539 #endif
6540
6541 static void *task(p)
6542         void *p;
6543 {
6544         return (void *) (p == NULL);
6545 }
6546
6547 int main() {
6548
6549         /* pthread test function */
6550         pthread_t t;
6551         int status;
6552
6553         /* make sure pthread_create() isn't just a stub */
6554 #if HAVE_PTHREADS_D4
6555         status = pthread_create(&t, pthread_attr_default, task, NULL);
6556 #else
6557         status = pthread_create(&t, NULL, task, NULL);
6558 #endif
6559
6560         if( status ) exit( status );
6561
6562         /* make sure pthread_detach() isn't just a stub */
6563 #if HAVE_PTHREADS_D4
6564         status = pthread_detach( &t );
6565 #else
6566         status = pthread_detach( t );
6567 #endif
6568
6569 #ifdef HAVE_LINUX_THREADS
6570         pthread_kill_other_threads_np();
6571 #endif
6572
6573         exit( status );
6574
6575 ; return 0; }
6576 EOF
6577 if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6578   rm -rf conftest*
6579   ol_cv_pthread_create=yes
6580 else
6581   echo "configure: failed program was:" >&5
6582   cat conftest.$ac_ext >&5
6583   rm -rf conftest*
6584   ol_cv_pthread_create=no
6585 fi
6586 rm -f conftest*
6587 else
6588   cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 /* pthread test headers */
6592 #include <pthread.h>
6593 #ifndef NULL
6594 #define NULL (void*)0
6595 #endif
6596
6597 static void *task(p)
6598         void *p;
6599 {
6600         return (void *) (p == NULL);
6601 }
6602
6603
6604 int main(argc, argv)
6605         int argc;
6606         char **argv;
6607 {
6608
6609         /* pthread test function */
6610         pthread_t t;
6611         int status;
6612
6613         /* make sure pthread_create() isn't just a stub */
6614 #if HAVE_PTHREADS_D4
6615         status = pthread_create(&t, pthread_attr_default, task, NULL);
6616 #else
6617         status = pthread_create(&t, NULL, task, NULL);
6618 #endif
6619
6620         if( status ) exit( status );
6621
6622         /* make sure pthread_detach() isn't just a stub */
6623 #if HAVE_PTHREADS_D4
6624         status = pthread_detach( &t );
6625 #else
6626         status = pthread_detach( t );
6627 #endif
6628
6629 #ifdef HAVE_LINUX_THREADS
6630         pthread_kill_other_threads_np();
6631 #endif
6632
6633         exit( status );
6634
6635 }
6636
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6639 then
6640   ol_cv_pthread_create=yes
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -fr conftest*
6645   ol_cv_pthread_create=no
6646 fi
6647 rm -fr conftest*
6648 fi
6649
6650 fi
6651
6652 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6653
6654                 if test $ol_cv_pthread_create != no ; then
6655                         ol_link_threads=posix
6656                         ol_link_pthreads=""
6657                 fi
6658                 
6659                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6660 if test "$ol_link_threads" = no ; then
6661         # try -kthread
6662         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6663 echo "configure:6664: checking for pthread link with -kthread" >&5
6664 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   
6668                 # save the flags
6669                 ol_LIBS="$LIBS"
6670                 LIBS="-kthread $LIBS"
6671
6672                 if test "$cross_compiling" = yes; then
6673   cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 /* pthread test headers */
6677 #include <pthread.h>
6678 #ifndef NULL
6679 #define NULL (void*)0
6680 #endif
6681
6682 static void *task(p)
6683         void *p;
6684 {
6685         return (void *) (p == NULL);
6686 }
6687
6688 int main() {
6689
6690         /* pthread test function */
6691         pthread_t t;
6692         int status;
6693
6694         /* make sure pthread_create() isn't just a stub */
6695 #if HAVE_PTHREADS_D4
6696         status = pthread_create(&t, pthread_attr_default, task, NULL);
6697 #else
6698         status = pthread_create(&t, NULL, task, NULL);
6699 #endif
6700
6701         if( status ) exit( status );
6702
6703         /* make sure pthread_detach() isn't just a stub */
6704 #if HAVE_PTHREADS_D4
6705         status = pthread_detach( &t );
6706 #else
6707         status = pthread_detach( t );
6708 #endif
6709
6710 #ifdef HAVE_LINUX_THREADS
6711         pthread_kill_other_threads_np();
6712 #endif
6713
6714         exit( status );
6715
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   ol_cv_pthread_kthread=yes
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   ol_cv_pthread_kthread=no
6726 fi
6727 rm -f conftest*
6728 else
6729   cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732 /* pthread test headers */
6733 #include <pthread.h>
6734 #ifndef NULL
6735 #define NULL (void*)0
6736 #endif
6737
6738 static void *task(p)
6739         void *p;
6740 {
6741         return (void *) (p == NULL);
6742 }
6743
6744
6745 int main(argc, argv)
6746         int argc;
6747         char **argv;
6748 {
6749
6750         /* pthread test function */
6751         pthread_t t;
6752         int status;
6753
6754         /* make sure pthread_create() isn't just a stub */
6755 #if HAVE_PTHREADS_D4
6756         status = pthread_create(&t, pthread_attr_default, task, NULL);
6757 #else
6758         status = pthread_create(&t, NULL, task, NULL);
6759 #endif
6760
6761         if( status ) exit( status );
6762
6763         /* make sure pthread_detach() isn't just a stub */
6764 #if HAVE_PTHREADS_D4
6765         status = pthread_detach( &t );
6766 #else
6767         status = pthread_detach( t );
6768 #endif
6769
6770 #ifdef HAVE_LINUX_THREADS
6771         pthread_kill_other_threads_np();
6772 #endif
6773
6774         exit( status );
6775
6776 }
6777
6778 EOF
6779 if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6780 then
6781   ol_cv_pthread_kthread=yes
6782 else
6783   echo "configure: failed program was:" >&5
6784   cat conftest.$ac_ext >&5
6785   rm -fr conftest*
6786   ol_cv_pthread_kthread=no
6787 fi
6788 rm -fr conftest*
6789 fi
6790
6791
6792                 # restore the LIBS
6793                 LIBS="$ol_LIBS"
6794         
6795 fi
6796
6797 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6798
6799         if test $ol_cv_pthread_kthread = yes ; then
6800                 ol_link_pthreads="-kthread"
6801                 ol_link_threads=posix
6802         fi
6803 fi
6804
6805                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6806 if test "$ol_link_threads" = no ; then
6807         # try -pthread
6808         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6809 echo "configure:6810: checking for pthread link with -pthread" >&5
6810 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6811   echo $ac_n "(cached) $ac_c" 1>&6
6812 else
6813   
6814                 # save the flags
6815                 ol_LIBS="$LIBS"
6816                 LIBS="-pthread $LIBS"
6817
6818                 if test "$cross_compiling" = yes; then
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 /* pthread test headers */
6823 #include <pthread.h>
6824 #ifndef NULL
6825 #define NULL (void*)0
6826 #endif
6827
6828 static void *task(p)
6829         void *p;
6830 {
6831         return (void *) (p == NULL);
6832 }
6833
6834 int main() {
6835
6836         /* pthread test function */
6837         pthread_t t;
6838         int status;
6839
6840         /* make sure pthread_create() isn't just a stub */
6841 #if HAVE_PTHREADS_D4
6842         status = pthread_create(&t, pthread_attr_default, task, NULL);
6843 #else
6844         status = pthread_create(&t, NULL, task, NULL);
6845 #endif
6846
6847         if( status ) exit( status );
6848
6849         /* make sure pthread_detach() isn't just a stub */
6850 #if HAVE_PTHREADS_D4
6851         status = pthread_detach( &t );
6852 #else
6853         status = pthread_detach( t );
6854 #endif
6855
6856 #ifdef HAVE_LINUX_THREADS
6857         pthread_kill_other_threads_np();
6858 #endif
6859
6860         exit( status );
6861
6862 ; return 0; }
6863 EOF
6864 if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6865   rm -rf conftest*
6866   ol_cv_pthread_pthread=yes
6867 else
6868   echo "configure: failed program was:" >&5
6869   cat conftest.$ac_ext >&5
6870   rm -rf conftest*
6871   ol_cv_pthread_pthread=no
6872 fi
6873 rm -f conftest*
6874 else
6875   cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 /* pthread test headers */
6879 #include <pthread.h>
6880 #ifndef NULL
6881 #define NULL (void*)0
6882 #endif
6883
6884 static void *task(p)
6885         void *p;
6886 {
6887         return (void *) (p == NULL);
6888 }
6889
6890
6891 int main(argc, argv)
6892         int argc;
6893         char **argv;
6894 {
6895
6896         /* pthread test function */
6897         pthread_t t;
6898         int status;
6899
6900         /* make sure pthread_create() isn't just a stub */
6901 #if HAVE_PTHREADS_D4
6902         status = pthread_create(&t, pthread_attr_default, task, NULL);
6903 #else
6904         status = pthread_create(&t, NULL, task, NULL);
6905 #endif
6906
6907         if( status ) exit( status );
6908
6909         /* make sure pthread_detach() isn't just a stub */
6910 #if HAVE_PTHREADS_D4
6911         status = pthread_detach( &t );
6912 #else
6913         status = pthread_detach( t );
6914 #endif
6915
6916 #ifdef HAVE_LINUX_THREADS
6917         pthread_kill_other_threads_np();
6918 #endif
6919
6920         exit( status );
6921
6922 }
6923
6924 EOF
6925 if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6926 then
6927   ol_cv_pthread_pthread=yes
6928 else
6929   echo "configure: failed program was:" >&5
6930   cat conftest.$ac_ext >&5
6931   rm -fr conftest*
6932   ol_cv_pthread_pthread=no
6933 fi
6934 rm -fr conftest*
6935 fi
6936
6937
6938                 # restore the LIBS
6939                 LIBS="$ol_LIBS"
6940         
6941 fi
6942
6943 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6944
6945         if test $ol_cv_pthread_pthread = yes ; then
6946                 ol_link_pthreads="-pthread"
6947                 ol_link_threads=posix
6948         fi
6949 fi
6950
6951                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6952 if test "$ol_link_threads" = no ; then
6953         # try -pthreads
6954         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6955 echo "configure:6956: checking for pthread link with -pthreads" >&5
6956 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6957   echo $ac_n "(cached) $ac_c" 1>&6
6958 else
6959   
6960                 # save the flags
6961                 ol_LIBS="$LIBS"
6962                 LIBS="-pthreads $LIBS"
6963
6964                 if test "$cross_compiling" = yes; then
6965   cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968 /* pthread test headers */
6969 #include <pthread.h>
6970 #ifndef NULL
6971 #define NULL (void*)0
6972 #endif
6973
6974 static void *task(p)
6975         void *p;
6976 {
6977         return (void *) (p == NULL);
6978 }
6979
6980 int main() {
6981
6982         /* pthread test function */
6983         pthread_t t;
6984         int status;
6985
6986         /* make sure pthread_create() isn't just a stub */
6987 #if HAVE_PTHREADS_D4
6988         status = pthread_create(&t, pthread_attr_default, task, NULL);
6989 #else
6990         status = pthread_create(&t, NULL, task, NULL);
6991 #endif
6992
6993         if( status ) exit( status );
6994
6995         /* make sure pthread_detach() isn't just a stub */
6996 #if HAVE_PTHREADS_D4
6997         status = pthread_detach( &t );
6998 #else
6999         status = pthread_detach( t );
7000 #endif
7001
7002 #ifdef HAVE_LINUX_THREADS
7003         pthread_kill_other_threads_np();
7004 #endif
7005
7006         exit( status );
7007
7008 ; return 0; }
7009 EOF
7010 if { (eval echo configure:7011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7011   rm -rf conftest*
7012   ol_cv_pthread_pthreads=yes
7013 else
7014   echo "configure: failed program was:" >&5
7015   cat conftest.$ac_ext >&5
7016   rm -rf conftest*
7017   ol_cv_pthread_pthreads=no
7018 fi
7019 rm -f conftest*
7020 else
7021   cat > conftest.$ac_ext <<EOF
7022 #line 7023 "configure"
7023 #include "confdefs.h"
7024 /* pthread test headers */
7025 #include <pthread.h>
7026 #ifndef NULL
7027 #define NULL (void*)0
7028 #endif
7029
7030 static void *task(p)
7031         void *p;
7032 {
7033         return (void *) (p == NULL);
7034 }
7035
7036
7037 int main(argc, argv)
7038         int argc;
7039         char **argv;
7040 {
7041
7042         /* pthread test function */
7043         pthread_t t;
7044         int status;
7045
7046         /* make sure pthread_create() isn't just a stub */
7047 #if HAVE_PTHREADS_D4
7048         status = pthread_create(&t, pthread_attr_default, task, NULL);
7049 #else
7050         status = pthread_create(&t, NULL, task, NULL);
7051 #endif
7052
7053         if( status ) exit( status );
7054
7055         /* make sure pthread_detach() isn't just a stub */
7056 #if HAVE_PTHREADS_D4
7057         status = pthread_detach( &t );
7058 #else
7059         status = pthread_detach( t );
7060 #endif
7061
7062 #ifdef HAVE_LINUX_THREADS
7063         pthread_kill_other_threads_np();
7064 #endif
7065
7066         exit( status );
7067
7068 }
7069
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7072 then
7073   ol_cv_pthread_pthreads=yes
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -fr conftest*
7078   ol_cv_pthread_pthreads=no
7079 fi
7080 rm -fr conftest*
7081 fi
7082
7083
7084                 # restore the LIBS
7085                 LIBS="$ol_LIBS"
7086         
7087 fi
7088
7089 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7090
7091         if test $ol_cv_pthread_pthreads = yes ; then
7092                 ol_link_pthreads="-pthreads"
7093                 ol_link_threads=posix
7094         fi
7095 fi
7096
7097                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7098 if test "$ol_link_threads" = no ; then
7099         # try -mthreads
7100         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7101 echo "configure:7102: checking for pthread link with -mthreads" >&5
7102 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7103   echo $ac_n "(cached) $ac_c" 1>&6
7104 else
7105   
7106                 # save the flags
7107                 ol_LIBS="$LIBS"
7108                 LIBS="-mthreads $LIBS"
7109
7110                 if test "$cross_compiling" = yes; then
7111   cat > conftest.$ac_ext <<EOF
7112 #line 7113 "configure"
7113 #include "confdefs.h"
7114 /* pthread test headers */
7115 #include <pthread.h>
7116 #ifndef NULL
7117 #define NULL (void*)0
7118 #endif
7119
7120 static void *task(p)
7121         void *p;
7122 {
7123         return (void *) (p == NULL);
7124 }
7125
7126 int main() {
7127
7128         /* pthread test function */
7129         pthread_t t;
7130         int status;
7131
7132         /* make sure pthread_create() isn't just a stub */
7133 #if HAVE_PTHREADS_D4
7134         status = pthread_create(&t, pthread_attr_default, task, NULL);
7135 #else
7136         status = pthread_create(&t, NULL, task, NULL);
7137 #endif
7138
7139         if( status ) exit( status );
7140
7141         /* make sure pthread_detach() isn't just a stub */
7142 #if HAVE_PTHREADS_D4
7143         status = pthread_detach( &t );
7144 #else
7145         status = pthread_detach( t );
7146 #endif
7147
7148 #ifdef HAVE_LINUX_THREADS
7149         pthread_kill_other_threads_np();
7150 #endif
7151
7152         exit( status );
7153
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   ol_cv_pthread_mthreads=yes
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   ol_cv_pthread_mthreads=no
7164 fi
7165 rm -f conftest*
7166 else
7167   cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170 /* pthread test headers */
7171 #include <pthread.h>
7172 #ifndef NULL
7173 #define NULL (void*)0
7174 #endif
7175
7176 static void *task(p)
7177         void *p;
7178 {
7179         return (void *) (p == NULL);
7180 }
7181
7182
7183 int main(argc, argv)
7184         int argc;
7185         char **argv;
7186 {
7187
7188         /* pthread test function */
7189         pthread_t t;
7190         int status;
7191
7192         /* make sure pthread_create() isn't just a stub */
7193 #if HAVE_PTHREADS_D4
7194         status = pthread_create(&t, pthread_attr_default, task, NULL);
7195 #else
7196         status = pthread_create(&t, NULL, task, NULL);
7197 #endif
7198
7199         if( status ) exit( status );
7200
7201         /* make sure pthread_detach() isn't just a stub */
7202 #if HAVE_PTHREADS_D4
7203         status = pthread_detach( &t );
7204 #else
7205         status = pthread_detach( t );
7206 #endif
7207
7208 #ifdef HAVE_LINUX_THREADS
7209         pthread_kill_other_threads_np();
7210 #endif
7211
7212         exit( status );
7213
7214 }
7215
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7218 then
7219   ol_cv_pthread_mthreads=yes
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -fr conftest*
7224   ol_cv_pthread_mthreads=no
7225 fi
7226 rm -fr conftest*
7227 fi
7228
7229
7230                 # restore the LIBS
7231                 LIBS="$ol_LIBS"
7232         
7233 fi
7234
7235 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7236
7237         if test $ol_cv_pthread_mthreads = yes ; then
7238                 ol_link_pthreads="-mthreads"
7239                 ol_link_threads=posix
7240         fi
7241 fi
7242
7243                 # Pthread try link: -thread (ol_cv_pthread_thread)
7244 if test "$ol_link_threads" = no ; then
7245         # try -thread
7246         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7247 echo "configure:7248: checking for pthread link with -thread" >&5
7248 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7249   echo $ac_n "(cached) $ac_c" 1>&6
7250 else
7251   
7252                 # save the flags
7253                 ol_LIBS="$LIBS"
7254                 LIBS="-thread $LIBS"
7255
7256                 if test "$cross_compiling" = yes; then
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 /* pthread test headers */
7261 #include <pthread.h>
7262 #ifndef NULL
7263 #define NULL (void*)0
7264 #endif
7265
7266 static void *task(p)
7267         void *p;
7268 {
7269         return (void *) (p == NULL);
7270 }
7271
7272 int main() {
7273
7274         /* pthread test function */
7275         pthread_t t;
7276         int status;
7277
7278         /* make sure pthread_create() isn't just a stub */
7279 #if HAVE_PTHREADS_D4
7280         status = pthread_create(&t, pthread_attr_default, task, NULL);
7281 #else
7282         status = pthread_create(&t, NULL, task, NULL);
7283 #endif
7284
7285         if( status ) exit( status );
7286
7287         /* make sure pthread_detach() isn't just a stub */
7288 #if HAVE_PTHREADS_D4
7289         status = pthread_detach( &t );
7290 #else
7291         status = pthread_detach( t );
7292 #endif
7293
7294 #ifdef HAVE_LINUX_THREADS
7295         pthread_kill_other_threads_np();
7296 #endif
7297
7298         exit( status );
7299
7300 ; return 0; }
7301 EOF
7302 if { (eval echo configure:7303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7303   rm -rf conftest*
7304   ol_cv_pthread_thread=yes
7305 else
7306   echo "configure: failed program was:" >&5
7307   cat conftest.$ac_ext >&5
7308   rm -rf conftest*
7309   ol_cv_pthread_thread=no
7310 fi
7311 rm -f conftest*
7312 else
7313   cat > conftest.$ac_ext <<EOF
7314 #line 7315 "configure"
7315 #include "confdefs.h"
7316 /* pthread test headers */
7317 #include <pthread.h>
7318 #ifndef NULL
7319 #define NULL (void*)0
7320 #endif
7321
7322 static void *task(p)
7323         void *p;
7324 {
7325         return (void *) (p == NULL);
7326 }
7327
7328
7329 int main(argc, argv)
7330         int argc;
7331         char **argv;
7332 {
7333
7334         /* pthread test function */
7335         pthread_t t;
7336         int status;
7337
7338         /* make sure pthread_create() isn't just a stub */
7339 #if HAVE_PTHREADS_D4
7340         status = pthread_create(&t, pthread_attr_default, task, NULL);
7341 #else
7342         status = pthread_create(&t, NULL, task, NULL);
7343 #endif
7344
7345         if( status ) exit( status );
7346
7347         /* make sure pthread_detach() isn't just a stub */
7348 #if HAVE_PTHREADS_D4
7349         status = pthread_detach( &t );
7350 #else
7351         status = pthread_detach( t );
7352 #endif
7353
7354 #ifdef HAVE_LINUX_THREADS
7355         pthread_kill_other_threads_np();
7356 #endif
7357
7358         exit( status );
7359
7360 }
7361
7362 EOF
7363 if { (eval echo configure:7364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7364 then
7365   ol_cv_pthread_thread=yes
7366 else
7367   echo "configure: failed program was:" >&5
7368   cat conftest.$ac_ext >&5
7369   rm -fr conftest*
7370   ol_cv_pthread_thread=no
7371 fi
7372 rm -fr conftest*
7373 fi
7374
7375
7376                 # restore the LIBS
7377                 LIBS="$ol_LIBS"
7378         
7379 fi
7380
7381 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7382
7383         if test $ol_cv_pthread_thread = yes ; then
7384                 ol_link_pthreads="-thread"
7385                 ol_link_threads=posix
7386         fi
7387 fi
7388
7389
7390                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7391 if test "$ol_link_threads" = no ; then
7392         # try -lpthread -lmach -lexc -lc_r
7393         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7394 echo "configure:7395: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7395 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7396   echo $ac_n "(cached) $ac_c" 1>&6
7397 else
7398   
7399                 # save the flags
7400                 ol_LIBS="$LIBS"
7401                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7402
7403                 if test "$cross_compiling" = yes; then
7404   cat > conftest.$ac_ext <<EOF
7405 #line 7406 "configure"
7406 #include "confdefs.h"
7407 /* pthread test headers */
7408 #include <pthread.h>
7409 #ifndef NULL
7410 #define NULL (void*)0
7411 #endif
7412
7413 static void *task(p)
7414         void *p;
7415 {
7416         return (void *) (p == NULL);
7417 }
7418
7419 int main() {
7420
7421         /* pthread test function */
7422         pthread_t t;
7423         int status;
7424
7425         /* make sure pthread_create() isn't just a stub */
7426 #if HAVE_PTHREADS_D4
7427         status = pthread_create(&t, pthread_attr_default, task, NULL);
7428 #else
7429         status = pthread_create(&t, NULL, task, NULL);
7430 #endif
7431
7432         if( status ) exit( status );
7433
7434         /* make sure pthread_detach() isn't just a stub */
7435 #if HAVE_PTHREADS_D4
7436         status = pthread_detach( &t );
7437 #else
7438         status = pthread_detach( t );
7439 #endif
7440
7441 #ifdef HAVE_LINUX_THREADS
7442         pthread_kill_other_threads_np();
7443 #endif
7444
7445         exit( status );
7446
7447 ; return 0; }
7448 EOF
7449 if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7450   rm -rf conftest*
7451   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7452 else
7453   echo "configure: failed program was:" >&5
7454   cat conftest.$ac_ext >&5
7455   rm -rf conftest*
7456   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7457 fi
7458 rm -f conftest*
7459 else
7460   cat > conftest.$ac_ext <<EOF
7461 #line 7462 "configure"
7462 #include "confdefs.h"
7463 /* pthread test headers */
7464 #include <pthread.h>
7465 #ifndef NULL
7466 #define NULL (void*)0
7467 #endif
7468
7469 static void *task(p)
7470         void *p;
7471 {
7472         return (void *) (p == NULL);
7473 }
7474
7475
7476 int main(argc, argv)
7477         int argc;
7478         char **argv;
7479 {
7480
7481         /* pthread test function */
7482         pthread_t t;
7483         int status;
7484
7485         /* make sure pthread_create() isn't just a stub */
7486 #if HAVE_PTHREADS_D4
7487         status = pthread_create(&t, pthread_attr_default, task, NULL);
7488 #else
7489         status = pthread_create(&t, NULL, task, NULL);
7490 #endif
7491
7492         if( status ) exit( status );
7493
7494         /* make sure pthread_detach() isn't just a stub */
7495 #if HAVE_PTHREADS_D4
7496         status = pthread_detach( &t );
7497 #else
7498         status = pthread_detach( t );
7499 #endif
7500
7501 #ifdef HAVE_LINUX_THREADS
7502         pthread_kill_other_threads_np();
7503 #endif
7504
7505         exit( status );
7506
7507 }
7508
7509 EOF
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7511 then
7512   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7513 else
7514   echo "configure: failed program was:" >&5
7515   cat conftest.$ac_ext >&5
7516   rm -fr conftest*
7517   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7518 fi
7519 rm -fr conftest*
7520 fi
7521
7522
7523                 # restore the LIBS
7524                 LIBS="$ol_LIBS"
7525         
7526 fi
7527
7528 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7529
7530         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7531                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7532                 ol_link_threads=posix
7533         fi
7534 fi
7535
7536                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7537 if test "$ol_link_threads" = no ; then
7538         # try -lpthread -lmach -lexc
7539         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7540 echo "configure:7541: checking for pthread link with -lpthread -lmach -lexc" >&5
7541 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7542   echo $ac_n "(cached) $ac_c" 1>&6
7543 else
7544   
7545                 # save the flags
7546                 ol_LIBS="$LIBS"
7547                 LIBS="-lpthread -lmach -lexc $LIBS"
7548
7549                 if test "$cross_compiling" = yes; then
7550   cat > conftest.$ac_ext <<EOF
7551 #line 7552 "configure"
7552 #include "confdefs.h"
7553 /* pthread test headers */
7554 #include <pthread.h>
7555 #ifndef NULL
7556 #define NULL (void*)0
7557 #endif
7558
7559 static void *task(p)
7560         void *p;
7561 {
7562         return (void *) (p == NULL);
7563 }
7564
7565 int main() {
7566
7567         /* pthread test function */
7568         pthread_t t;
7569         int status;
7570
7571         /* make sure pthread_create() isn't just a stub */
7572 #if HAVE_PTHREADS_D4
7573         status = pthread_create(&t, pthread_attr_default, task, NULL);
7574 #else
7575         status = pthread_create(&t, NULL, task, NULL);
7576 #endif
7577
7578         if( status ) exit( status );
7579
7580         /* make sure pthread_detach() isn't just a stub */
7581 #if HAVE_PTHREADS_D4
7582         status = pthread_detach( &t );
7583 #else
7584         status = pthread_detach( t );
7585 #endif
7586
7587 #ifdef HAVE_LINUX_THREADS
7588         pthread_kill_other_threads_np();
7589 #endif
7590
7591         exit( status );
7592
7593 ; return 0; }
7594 EOF
7595 if { (eval echo configure:7596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7596   rm -rf conftest*
7597   ol_cv_pthread_lpthread_lmach_lexc=yes
7598 else
7599   echo "configure: failed program was:" >&5
7600   cat conftest.$ac_ext >&5
7601   rm -rf conftest*
7602   ol_cv_pthread_lpthread_lmach_lexc=no
7603 fi
7604 rm -f conftest*
7605 else
7606   cat > conftest.$ac_ext <<EOF
7607 #line 7608 "configure"
7608 #include "confdefs.h"
7609 /* pthread test headers */
7610 #include <pthread.h>
7611 #ifndef NULL
7612 #define NULL (void*)0
7613 #endif
7614
7615 static void *task(p)
7616         void *p;
7617 {
7618         return (void *) (p == NULL);
7619 }
7620
7621
7622 int main(argc, argv)
7623         int argc;
7624         char **argv;
7625 {
7626
7627         /* pthread test function */
7628         pthread_t t;
7629         int status;
7630
7631         /* make sure pthread_create() isn't just a stub */
7632 #if HAVE_PTHREADS_D4
7633         status = pthread_create(&t, pthread_attr_default, task, NULL);
7634 #else
7635         status = pthread_create(&t, NULL, task, NULL);
7636 #endif
7637
7638         if( status ) exit( status );
7639
7640         /* make sure pthread_detach() isn't just a stub */
7641 #if HAVE_PTHREADS_D4
7642         status = pthread_detach( &t );
7643 #else
7644         status = pthread_detach( t );
7645 #endif
7646
7647 #ifdef HAVE_LINUX_THREADS
7648         pthread_kill_other_threads_np();
7649 #endif
7650
7651         exit( status );
7652
7653 }
7654
7655 EOF
7656 if { (eval echo configure:7657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7657 then
7658   ol_cv_pthread_lpthread_lmach_lexc=yes
7659 else
7660   echo "configure: failed program was:" >&5
7661   cat conftest.$ac_ext >&5
7662   rm -fr conftest*
7663   ol_cv_pthread_lpthread_lmach_lexc=no
7664 fi
7665 rm -fr conftest*
7666 fi
7667
7668
7669                 # restore the LIBS
7670                 LIBS="$ol_LIBS"
7671         
7672 fi
7673
7674 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7675
7676         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7677                 ol_link_pthreads="-lpthread -lmach -lexc"
7678                 ol_link_threads=posix
7679         fi
7680 fi
7681
7682
7683                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7684 if test "$ol_link_threads" = no ; then
7685         # try -lpthread -Wl,-woff,85
7686         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7687 echo "configure:7688: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7688 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7689   echo $ac_n "(cached) $ac_c" 1>&6
7690 else
7691   
7692                 # save the flags
7693                 ol_LIBS="$LIBS"
7694                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7695
7696                 if test "$cross_compiling" = yes; then
7697   cat > conftest.$ac_ext <<EOF
7698 #line 7699 "configure"
7699 #include "confdefs.h"
7700 /* pthread test headers */
7701 #include <pthread.h>
7702 #ifndef NULL
7703 #define NULL (void*)0
7704 #endif
7705
7706 static void *task(p)
7707         void *p;
7708 {
7709         return (void *) (p == NULL);
7710 }
7711
7712 int main() {
7713
7714         /* pthread test function */
7715         pthread_t t;
7716         int status;
7717
7718         /* make sure pthread_create() isn't just a stub */
7719 #if HAVE_PTHREADS_D4
7720         status = pthread_create(&t, pthread_attr_default, task, NULL);
7721 #else
7722         status = pthread_create(&t, NULL, task, NULL);
7723 #endif
7724
7725         if( status ) exit( status );
7726
7727         /* make sure pthread_detach() isn't just a stub */
7728 #if HAVE_PTHREADS_D4
7729         status = pthread_detach( &t );
7730 #else
7731         status = pthread_detach( t );
7732 #endif
7733
7734 #ifdef HAVE_LINUX_THREADS
7735         pthread_kill_other_threads_np();
7736 #endif
7737
7738         exit( status );
7739
7740 ; return 0; }
7741 EOF
7742 if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7743   rm -rf conftest*
7744   ol_cv_pthread_lib_lpthread_woff=yes
7745 else
7746   echo "configure: failed program was:" >&5
7747   cat conftest.$ac_ext >&5
7748   rm -rf conftest*
7749   ol_cv_pthread_lib_lpthread_woff=no
7750 fi
7751 rm -f conftest*
7752 else
7753   cat > conftest.$ac_ext <<EOF
7754 #line 7755 "configure"
7755 #include "confdefs.h"
7756 /* pthread test headers */
7757 #include <pthread.h>
7758 #ifndef NULL
7759 #define NULL (void*)0
7760 #endif
7761
7762 static void *task(p)
7763         void *p;
7764 {
7765         return (void *) (p == NULL);
7766 }
7767
7768
7769 int main(argc, argv)
7770         int argc;
7771         char **argv;
7772 {
7773
7774         /* pthread test function */
7775         pthread_t t;
7776         int status;
7777
7778         /* make sure pthread_create() isn't just a stub */
7779 #if HAVE_PTHREADS_D4
7780         status = pthread_create(&t, pthread_attr_default, task, NULL);
7781 #else
7782         status = pthread_create(&t, NULL, task, NULL);
7783 #endif
7784
7785         if( status ) exit( status );
7786
7787         /* make sure pthread_detach() isn't just a stub */
7788 #if HAVE_PTHREADS_D4
7789         status = pthread_detach( &t );
7790 #else
7791         status = pthread_detach( t );
7792 #endif
7793
7794 #ifdef HAVE_LINUX_THREADS
7795         pthread_kill_other_threads_np();
7796 #endif
7797
7798         exit( status );
7799
7800 }
7801
7802 EOF
7803 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7804 then
7805   ol_cv_pthread_lib_lpthread_woff=yes
7806 else
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -fr conftest*
7810   ol_cv_pthread_lib_lpthread_woff=no
7811 fi
7812 rm -fr conftest*
7813 fi
7814
7815
7816                 # restore the LIBS
7817                 LIBS="$ol_LIBS"
7818         
7819 fi
7820
7821 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7822
7823         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7824                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7825                 ol_link_threads=posix
7826         fi
7827 fi
7828
7829
7830                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7831 if test "$ol_link_threads" = no ; then
7832         # try -lpthread
7833         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7834 echo "configure:7835: checking for pthread link with -lpthread" >&5
7835 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7836   echo $ac_n "(cached) $ac_c" 1>&6
7837 else
7838   
7839                 # save the flags
7840                 ol_LIBS="$LIBS"
7841                 LIBS="-lpthread $LIBS"
7842
7843                 if test "$cross_compiling" = yes; then
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 /* pthread test headers */
7848 #include <pthread.h>
7849 #ifndef NULL
7850 #define NULL (void*)0
7851 #endif
7852
7853 static void *task(p)
7854         void *p;
7855 {
7856         return (void *) (p == NULL);
7857 }
7858
7859 int main() {
7860
7861         /* pthread test function */
7862         pthread_t t;
7863         int status;
7864
7865         /* make sure pthread_create() isn't just a stub */
7866 #if HAVE_PTHREADS_D4
7867         status = pthread_create(&t, pthread_attr_default, task, NULL);
7868 #else
7869         status = pthread_create(&t, NULL, task, NULL);
7870 #endif
7871
7872         if( status ) exit( status );
7873
7874         /* make sure pthread_detach() isn't just a stub */
7875 #if HAVE_PTHREADS_D4
7876         status = pthread_detach( &t );
7877 #else
7878         status = pthread_detach( t );
7879 #endif
7880
7881 #ifdef HAVE_LINUX_THREADS
7882         pthread_kill_other_threads_np();
7883 #endif
7884
7885         exit( status );
7886
7887 ; return 0; }
7888 EOF
7889 if { (eval echo configure:7890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7890   rm -rf conftest*
7891   ol_cv_pthread_lpthread=yes
7892 else
7893   echo "configure: failed program was:" >&5
7894   cat conftest.$ac_ext >&5
7895   rm -rf conftest*
7896   ol_cv_pthread_lpthread=no
7897 fi
7898 rm -f conftest*
7899 else
7900   cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 /* pthread test headers */
7904 #include <pthread.h>
7905 #ifndef NULL
7906 #define NULL (void*)0
7907 #endif
7908
7909 static void *task(p)
7910         void *p;
7911 {
7912         return (void *) (p == NULL);
7913 }
7914
7915
7916 int main(argc, argv)
7917         int argc;
7918         char **argv;
7919 {
7920
7921         /* pthread test function */
7922         pthread_t t;
7923         int status;
7924
7925         /* make sure pthread_create() isn't just a stub */
7926 #if HAVE_PTHREADS_D4
7927         status = pthread_create(&t, pthread_attr_default, task, NULL);
7928 #else
7929         status = pthread_create(&t, NULL, task, NULL);
7930 #endif
7931
7932         if( status ) exit( status );
7933
7934         /* make sure pthread_detach() isn't just a stub */
7935 #if HAVE_PTHREADS_D4
7936         status = pthread_detach( &t );
7937 #else
7938         status = pthread_detach( t );
7939 #endif
7940
7941 #ifdef HAVE_LINUX_THREADS
7942         pthread_kill_other_threads_np();
7943 #endif
7944
7945         exit( status );
7946
7947 }
7948
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7951 then
7952   ol_cv_pthread_lpthread=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -fr conftest*
7957   ol_cv_pthread_lpthread=no
7958 fi
7959 rm -fr conftest*
7960 fi
7961
7962
7963                 # restore the LIBS
7964                 LIBS="$ol_LIBS"
7965         
7966 fi
7967
7968 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7969
7970         if test $ol_cv_pthread_lpthread = yes ; then
7971                 ol_link_pthreads="-lpthread"
7972                 ol_link_threads=posix
7973         fi
7974 fi
7975
7976                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7977 if test "$ol_link_threads" = no ; then
7978         # try -lc_r
7979         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7980 echo "configure:7981: checking for pthread link with -lc_r" >&5
7981 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7982   echo $ac_n "(cached) $ac_c" 1>&6
7983 else
7984   
7985                 # save the flags
7986                 ol_LIBS="$LIBS"
7987                 LIBS="-lc_r $LIBS"
7988
7989                 if test "$cross_compiling" = yes; then
7990   cat > conftest.$ac_ext <<EOF
7991 #line 7992 "configure"
7992 #include "confdefs.h"
7993 /* pthread test headers */
7994 #include <pthread.h>
7995 #ifndef NULL
7996 #define NULL (void*)0
7997 #endif
7998
7999 static void *task(p)
8000         void *p;
8001 {
8002         return (void *) (p == NULL);
8003 }
8004
8005 int main() {
8006
8007         /* pthread test function */
8008         pthread_t t;
8009         int status;
8010
8011         /* make sure pthread_create() isn't just a stub */
8012 #if HAVE_PTHREADS_D4
8013         status = pthread_create(&t, pthread_attr_default, task, NULL);
8014 #else
8015         status = pthread_create(&t, NULL, task, NULL);
8016 #endif
8017
8018         if( status ) exit( status );
8019
8020         /* make sure pthread_detach() isn't just a stub */
8021 #if HAVE_PTHREADS_D4
8022         status = pthread_detach( &t );
8023 #else
8024         status = pthread_detach( t );
8025 #endif
8026
8027 #ifdef HAVE_LINUX_THREADS
8028         pthread_kill_other_threads_np();
8029 #endif
8030
8031         exit( status );
8032
8033 ; return 0; }
8034 EOF
8035 if { (eval echo configure:8036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8036   rm -rf conftest*
8037   ol_cv_pthread_lc_r=yes
8038 else
8039   echo "configure: failed program was:" >&5
8040   cat conftest.$ac_ext >&5
8041   rm -rf conftest*
8042   ol_cv_pthread_lc_r=no
8043 fi
8044 rm -f conftest*
8045 else
8046   cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 /* pthread test headers */
8050 #include <pthread.h>
8051 #ifndef NULL
8052 #define NULL (void*)0
8053 #endif
8054
8055 static void *task(p)
8056         void *p;
8057 {
8058         return (void *) (p == NULL);
8059 }
8060
8061
8062 int main(argc, argv)
8063         int argc;
8064         char **argv;
8065 {
8066
8067         /* pthread test function */
8068         pthread_t t;
8069         int status;
8070
8071         /* make sure pthread_create() isn't just a stub */
8072 #if HAVE_PTHREADS_D4
8073         status = pthread_create(&t, pthread_attr_default, task, NULL);
8074 #else
8075         status = pthread_create(&t, NULL, task, NULL);
8076 #endif
8077
8078         if( status ) exit( status );
8079
8080         /* make sure pthread_detach() isn't just a stub */
8081 #if HAVE_PTHREADS_D4
8082         status = pthread_detach( &t );
8083 #else
8084         status = pthread_detach( t );
8085 #endif
8086
8087 #ifdef HAVE_LINUX_THREADS
8088         pthread_kill_other_threads_np();
8089 #endif
8090
8091         exit( status );
8092
8093 }
8094
8095 EOF
8096 if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8097 then
8098   ol_cv_pthread_lc_r=yes
8099 else
8100   echo "configure: failed program was:" >&5
8101   cat conftest.$ac_ext >&5
8102   rm -fr conftest*
8103   ol_cv_pthread_lc_r=no
8104 fi
8105 rm -fr conftest*
8106 fi
8107
8108
8109                 # restore the LIBS
8110                 LIBS="$ol_LIBS"
8111         
8112 fi
8113
8114 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8115
8116         if test $ol_cv_pthread_lc_r = yes ; then
8117                 ol_link_pthreads="-lc_r"
8118                 ol_link_threads=posix
8119         fi
8120 fi
8121
8122
8123                 # Pthread try link: -threads (ol_cv_pthread_threads)
8124 if test "$ol_link_threads" = no ; then
8125         # try -threads
8126         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8127 echo "configure:8128: checking for pthread link with -threads" >&5
8128 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8129   echo $ac_n "(cached) $ac_c" 1>&6
8130 else
8131   
8132                 # save the flags
8133                 ol_LIBS="$LIBS"
8134                 LIBS="-threads $LIBS"
8135
8136                 if test "$cross_compiling" = yes; then
8137   cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140 /* pthread test headers */
8141 #include <pthread.h>
8142 #ifndef NULL
8143 #define NULL (void*)0
8144 #endif
8145
8146 static void *task(p)
8147         void *p;
8148 {
8149         return (void *) (p == NULL);
8150 }
8151
8152 int main() {
8153
8154         /* pthread test function */
8155         pthread_t t;
8156         int status;
8157
8158         /* make sure pthread_create() isn't just a stub */
8159 #if HAVE_PTHREADS_D4
8160         status = pthread_create(&t, pthread_attr_default, task, NULL);
8161 #else
8162         status = pthread_create(&t, NULL, task, NULL);
8163 #endif
8164
8165         if( status ) exit( status );
8166
8167         /* make sure pthread_detach() isn't just a stub */
8168 #if HAVE_PTHREADS_D4
8169         status = pthread_detach( &t );
8170 #else
8171         status = pthread_detach( t );
8172 #endif
8173
8174 #ifdef HAVE_LINUX_THREADS
8175         pthread_kill_other_threads_np();
8176 #endif
8177
8178         exit( status );
8179
8180 ; return 0; }
8181 EOF
8182 if { (eval echo configure:8183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8183   rm -rf conftest*
8184   ol_cv_pthread_threads=yes
8185 else
8186   echo "configure: failed program was:" >&5
8187   cat conftest.$ac_ext >&5
8188   rm -rf conftest*
8189   ol_cv_pthread_threads=no
8190 fi
8191 rm -f conftest*
8192 else
8193   cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 /* pthread test headers */
8197 #include <pthread.h>
8198 #ifndef NULL
8199 #define NULL (void*)0
8200 #endif
8201
8202 static void *task(p)
8203         void *p;
8204 {
8205         return (void *) (p == NULL);
8206 }
8207
8208
8209 int main(argc, argv)
8210         int argc;
8211         char **argv;
8212 {
8213
8214         /* pthread test function */
8215         pthread_t t;
8216         int status;
8217
8218         /* make sure pthread_create() isn't just a stub */
8219 #if HAVE_PTHREADS_D4
8220         status = pthread_create(&t, pthread_attr_default, task, NULL);
8221 #else
8222         status = pthread_create(&t, NULL, task, NULL);
8223 #endif
8224
8225         if( status ) exit( status );
8226
8227         /* make sure pthread_detach() isn't just a stub */
8228 #if HAVE_PTHREADS_D4
8229         status = pthread_detach( &t );
8230 #else
8231         status = pthread_detach( t );
8232 #endif
8233
8234 #ifdef HAVE_LINUX_THREADS
8235         pthread_kill_other_threads_np();
8236 #endif
8237
8238         exit( status );
8239
8240 }
8241
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8244 then
8245   ol_cv_pthread_threads=yes
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -fr conftest*
8250   ol_cv_pthread_threads=no
8251 fi
8252 rm -fr conftest*
8253 fi
8254
8255
8256                 # restore the LIBS
8257                 LIBS="$ol_LIBS"
8258         
8259 fi
8260
8261 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8262
8263         if test $ol_cv_pthread_threads = yes ; then
8264                 ol_link_pthreads="-threads"
8265                 ol_link_threads=posix
8266         fi
8267 fi
8268
8269
8270                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8271 if test "$ol_link_threads" = no ; then
8272         # try -lpthreads -lmach -lexc -lc_r
8273         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8274 echo "configure:8275: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8275 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8276   echo $ac_n "(cached) $ac_c" 1>&6
8277 else
8278   
8279                 # save the flags
8280                 ol_LIBS="$LIBS"
8281                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8282
8283                 if test "$cross_compiling" = yes; then
8284   cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 /* pthread test headers */
8288 #include <pthread.h>
8289 #ifndef NULL
8290 #define NULL (void*)0
8291 #endif
8292
8293 static void *task(p)
8294         void *p;
8295 {
8296         return (void *) (p == NULL);
8297 }
8298
8299 int main() {
8300
8301         /* pthread test function */
8302         pthread_t t;
8303         int status;
8304
8305         /* make sure pthread_create() isn't just a stub */
8306 #if HAVE_PTHREADS_D4
8307         status = pthread_create(&t, pthread_attr_default, task, NULL);
8308 #else
8309         status = pthread_create(&t, NULL, task, NULL);
8310 #endif
8311
8312         if( status ) exit( status );
8313
8314         /* make sure pthread_detach() isn't just a stub */
8315 #if HAVE_PTHREADS_D4
8316         status = pthread_detach( &t );
8317 #else
8318         status = pthread_detach( t );
8319 #endif
8320
8321 #ifdef HAVE_LINUX_THREADS
8322         pthread_kill_other_threads_np();
8323 #endif
8324
8325         exit( status );
8326
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8337 fi
8338 rm -f conftest*
8339 else
8340   cat > conftest.$ac_ext <<EOF
8341 #line 8342 "configure"
8342 #include "confdefs.h"
8343 /* pthread test headers */
8344 #include <pthread.h>
8345 #ifndef NULL
8346 #define NULL (void*)0
8347 #endif
8348
8349 static void *task(p)
8350         void *p;
8351 {
8352         return (void *) (p == NULL);
8353 }
8354
8355
8356 int main(argc, argv)
8357         int argc;
8358         char **argv;
8359 {
8360
8361         /* pthread test function */
8362         pthread_t t;
8363         int status;
8364
8365         /* make sure pthread_create() isn't just a stub */
8366 #if HAVE_PTHREADS_D4
8367         status = pthread_create(&t, pthread_attr_default, task, NULL);
8368 #else
8369         status = pthread_create(&t, NULL, task, NULL);
8370 #endif
8371
8372         if( status ) exit( status );
8373
8374         /* make sure pthread_detach() isn't just a stub */
8375 #if HAVE_PTHREADS_D4
8376         status = pthread_detach( &t );
8377 #else
8378         status = pthread_detach( t );
8379 #endif
8380
8381 #ifdef HAVE_LINUX_THREADS
8382         pthread_kill_other_threads_np();
8383 #endif
8384
8385         exit( status );
8386
8387 }
8388
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8391 then
8392   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -fr conftest*
8397   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8398 fi
8399 rm -fr conftest*
8400 fi
8401
8402
8403                 # restore the LIBS
8404                 LIBS="$ol_LIBS"
8405         
8406 fi
8407
8408 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8409
8410         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8411                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8412                 ol_link_threads=posix
8413         fi
8414 fi
8415
8416                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8417 if test "$ol_link_threads" = no ; then
8418         # try -lpthreads -lmach -lexc
8419         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8420 echo "configure:8421: checking for pthread link with -lpthreads -lmach -lexc" >&5
8421 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8422   echo $ac_n "(cached) $ac_c" 1>&6
8423 else
8424   
8425                 # save the flags
8426                 ol_LIBS="$LIBS"
8427                 LIBS="-lpthreads -lmach -lexc $LIBS"
8428
8429                 if test "$cross_compiling" = yes; then
8430   cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433 /* pthread test headers */
8434 #include <pthread.h>
8435 #ifndef NULL
8436 #define NULL (void*)0
8437 #endif
8438
8439 static void *task(p)
8440         void *p;
8441 {
8442         return (void *) (p == NULL);
8443 }
8444
8445 int main() {
8446
8447         /* pthread test function */
8448         pthread_t t;
8449         int status;
8450
8451         /* make sure pthread_create() isn't just a stub */
8452 #if HAVE_PTHREADS_D4
8453         status = pthread_create(&t, pthread_attr_default, task, NULL);
8454 #else
8455         status = pthread_create(&t, NULL, task, NULL);
8456 #endif
8457
8458         if( status ) exit( status );
8459
8460         /* make sure pthread_detach() isn't just a stub */
8461 #if HAVE_PTHREADS_D4
8462         status = pthread_detach( &t );
8463 #else
8464         status = pthread_detach( t );
8465 #endif
8466
8467 #ifdef HAVE_LINUX_THREADS
8468         pthread_kill_other_threads_np();
8469 #endif
8470
8471         exit( status );
8472
8473 ; return 0; }
8474 EOF
8475 if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8476   rm -rf conftest*
8477   ol_cv_pthread_lpthreads_lmach_lexc=yes
8478 else
8479   echo "configure: failed program was:" >&5
8480   cat conftest.$ac_ext >&5
8481   rm -rf conftest*
8482   ol_cv_pthread_lpthreads_lmach_lexc=no
8483 fi
8484 rm -f conftest*
8485 else
8486   cat > conftest.$ac_ext <<EOF
8487 #line 8488 "configure"
8488 #include "confdefs.h"
8489 /* pthread test headers */
8490 #include <pthread.h>
8491 #ifndef NULL
8492 #define NULL (void*)0
8493 #endif
8494
8495 static void *task(p)
8496         void *p;
8497 {
8498         return (void *) (p == NULL);
8499 }
8500
8501
8502 int main(argc, argv)
8503         int argc;
8504         char **argv;
8505 {
8506
8507         /* pthread test function */
8508         pthread_t t;
8509         int status;
8510
8511         /* make sure pthread_create() isn't just a stub */
8512 #if HAVE_PTHREADS_D4
8513         status = pthread_create(&t, pthread_attr_default, task, NULL);
8514 #else
8515         status = pthread_create(&t, NULL, task, NULL);
8516 #endif
8517
8518         if( status ) exit( status );
8519
8520         /* make sure pthread_detach() isn't just a stub */
8521 #if HAVE_PTHREADS_D4
8522         status = pthread_detach( &t );
8523 #else
8524         status = pthread_detach( t );
8525 #endif
8526
8527 #ifdef HAVE_LINUX_THREADS
8528         pthread_kill_other_threads_np();
8529 #endif
8530
8531         exit( status );
8532
8533 }
8534
8535 EOF
8536 if { (eval echo configure:8537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8537 then
8538   ol_cv_pthread_lpthreads_lmach_lexc=yes
8539 else
8540   echo "configure: failed program was:" >&5
8541   cat conftest.$ac_ext >&5
8542   rm -fr conftest*
8543   ol_cv_pthread_lpthreads_lmach_lexc=no
8544 fi
8545 rm -fr conftest*
8546 fi
8547
8548
8549                 # restore the LIBS
8550                 LIBS="$ol_LIBS"
8551         
8552 fi
8553
8554 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8555
8556         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8557                 ol_link_pthreads="-lpthreads -lmach -lexc"
8558                 ol_link_threads=posix
8559         fi
8560 fi
8561
8562                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8563 if test "$ol_link_threads" = no ; then
8564         # try -lpthreads -lexc
8565         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8566 echo "configure:8567: checking for pthread link with -lpthreads -lexc" >&5
8567 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8568   echo $ac_n "(cached) $ac_c" 1>&6
8569 else
8570   
8571                 # save the flags
8572                 ol_LIBS="$LIBS"
8573                 LIBS="-lpthreads -lexc $LIBS"
8574
8575                 if test "$cross_compiling" = yes; then
8576   cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 /* pthread test headers */
8580 #include <pthread.h>
8581 #ifndef NULL
8582 #define NULL (void*)0
8583 #endif
8584
8585 static void *task(p)
8586         void *p;
8587 {
8588         return (void *) (p == NULL);
8589 }
8590
8591 int main() {
8592
8593         /* pthread test function */
8594         pthread_t t;
8595         int status;
8596
8597         /* make sure pthread_create() isn't just a stub */
8598 #if HAVE_PTHREADS_D4
8599         status = pthread_create(&t, pthread_attr_default, task, NULL);
8600 #else
8601         status = pthread_create(&t, NULL, task, NULL);
8602 #endif
8603
8604         if( status ) exit( status );
8605
8606         /* make sure pthread_detach() isn't just a stub */
8607 #if HAVE_PTHREADS_D4
8608         status = pthread_detach( &t );
8609 #else
8610         status = pthread_detach( t );
8611 #endif
8612
8613 #ifdef HAVE_LINUX_THREADS
8614         pthread_kill_other_threads_np();
8615 #endif
8616
8617         exit( status );
8618
8619 ; return 0; }
8620 EOF
8621 if { (eval echo configure:8622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8622   rm -rf conftest*
8623   ol_cv_pthread_lpthreads_lexc=yes
8624 else
8625   echo "configure: failed program was:" >&5
8626   cat conftest.$ac_ext >&5
8627   rm -rf conftest*
8628   ol_cv_pthread_lpthreads_lexc=no
8629 fi
8630 rm -f conftest*
8631 else
8632   cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 /* pthread test headers */
8636 #include <pthread.h>
8637 #ifndef NULL
8638 #define NULL (void*)0
8639 #endif
8640
8641 static void *task(p)
8642         void *p;
8643 {
8644         return (void *) (p == NULL);
8645 }
8646
8647
8648 int main(argc, argv)
8649         int argc;
8650         char **argv;
8651 {
8652
8653         /* pthread test function */
8654         pthread_t t;
8655         int status;
8656
8657         /* make sure pthread_create() isn't just a stub */
8658 #if HAVE_PTHREADS_D4
8659         status = pthread_create(&t, pthread_attr_default, task, NULL);
8660 #else
8661         status = pthread_create(&t, NULL, task, NULL);
8662 #endif
8663
8664         if( status ) exit( status );
8665
8666         /* make sure pthread_detach() isn't just a stub */
8667 #if HAVE_PTHREADS_D4
8668         status = pthread_detach( &t );
8669 #else
8670         status = pthread_detach( t );
8671 #endif
8672
8673 #ifdef HAVE_LINUX_THREADS
8674         pthread_kill_other_threads_np();
8675 #endif
8676
8677         exit( status );
8678
8679 }
8680
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8683 then
8684   ol_cv_pthread_lpthreads_lexc=yes
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -fr conftest*
8689   ol_cv_pthread_lpthreads_lexc=no
8690 fi
8691 rm -fr conftest*
8692 fi
8693
8694
8695                 # restore the LIBS
8696                 LIBS="$ol_LIBS"
8697         
8698 fi
8699
8700 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8701
8702         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8703                 ol_link_pthreads="-lpthreads -lexc"
8704                 ol_link_threads=posix
8705         fi
8706 fi
8707
8708
8709                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8710 if test "$ol_link_threads" = no ; then
8711         # try -lpthreads
8712         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8713 echo "configure:8714: checking for pthread link with -lpthreads" >&5
8714 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8715   echo $ac_n "(cached) $ac_c" 1>&6
8716 else
8717   
8718                 # save the flags
8719                 ol_LIBS="$LIBS"
8720                 LIBS="-lpthreads $LIBS"
8721
8722                 if test "$cross_compiling" = yes; then
8723   cat > conftest.$ac_ext <<EOF
8724 #line 8725 "configure"
8725 #include "confdefs.h"
8726 /* pthread test headers */
8727 #include <pthread.h>
8728 #ifndef NULL
8729 #define NULL (void*)0
8730 #endif
8731
8732 static void *task(p)
8733         void *p;
8734 {
8735         return (void *) (p == NULL);
8736 }
8737
8738 int main() {
8739
8740         /* pthread test function */
8741         pthread_t t;
8742         int status;
8743
8744         /* make sure pthread_create() isn't just a stub */
8745 #if HAVE_PTHREADS_D4
8746         status = pthread_create(&t, pthread_attr_default, task, NULL);
8747 #else
8748         status = pthread_create(&t, NULL, task, NULL);
8749 #endif
8750
8751         if( status ) exit( status );
8752
8753         /* make sure pthread_detach() isn't just a stub */
8754 #if HAVE_PTHREADS_D4
8755         status = pthread_detach( &t );
8756 #else
8757         status = pthread_detach( t );
8758 #endif
8759
8760 #ifdef HAVE_LINUX_THREADS
8761         pthread_kill_other_threads_np();
8762 #endif
8763
8764         exit( status );
8765
8766 ; return 0; }
8767 EOF
8768 if { (eval echo configure:8769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8769   rm -rf conftest*
8770   ol_cv_pthread_lib_lpthreads=yes
8771 else
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -rf conftest*
8775   ol_cv_pthread_lib_lpthreads=no
8776 fi
8777 rm -f conftest*
8778 else
8779   cat > conftest.$ac_ext <<EOF
8780 #line 8781 "configure"
8781 #include "confdefs.h"
8782 /* pthread test headers */
8783 #include <pthread.h>
8784 #ifndef NULL
8785 #define NULL (void*)0
8786 #endif
8787
8788 static void *task(p)
8789         void *p;
8790 {
8791         return (void *) (p == NULL);
8792 }
8793
8794
8795 int main(argc, argv)
8796         int argc;
8797         char **argv;
8798 {
8799
8800         /* pthread test function */
8801         pthread_t t;
8802         int status;
8803
8804         /* make sure pthread_create() isn't just a stub */
8805 #if HAVE_PTHREADS_D4
8806         status = pthread_create(&t, pthread_attr_default, task, NULL);
8807 #else
8808         status = pthread_create(&t, NULL, task, NULL);
8809 #endif
8810
8811         if( status ) exit( status );
8812
8813         /* make sure pthread_detach() isn't just a stub */
8814 #if HAVE_PTHREADS_D4
8815         status = pthread_detach( &t );
8816 #else
8817         status = pthread_detach( t );
8818 #endif
8819
8820 #ifdef HAVE_LINUX_THREADS
8821         pthread_kill_other_threads_np();
8822 #endif
8823
8824         exit( status );
8825
8826 }
8827
8828 EOF
8829 if { (eval echo configure:8830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8830 then
8831   ol_cv_pthread_lib_lpthreads=yes
8832 else
8833   echo "configure: failed program was:" >&5
8834   cat conftest.$ac_ext >&5
8835   rm -fr conftest*
8836   ol_cv_pthread_lib_lpthreads=no
8837 fi
8838 rm -fr conftest*
8839 fi
8840
8841
8842                 # restore the LIBS
8843                 LIBS="$ol_LIBS"
8844         
8845 fi
8846
8847 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8848
8849         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8850                 ol_link_pthreads="-lpthreads"
8851                 ol_link_threads=posix
8852         fi
8853 fi
8854
8855
8856                 if test $ol_link_threads != no ; then
8857                         cat >> confdefs.h <<\EOF
8858 #define HAVE_PTHREADS 1
8859 EOF
8860
8861
8862                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8863
8864                                                 save_CPPFLAGS="$CPPFLAGS"
8865                         save_LIBS="$LIBS"
8866                         LIBS="$LTHREAD_LIBS $LIBS"
8867
8868                                                                                                 for ac_func in sched_yield pthread_yield
8869 do
8870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8871 echo "configure:8872: checking for $ac_func" >&5
8872 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8873   echo $ac_n "(cached) $ac_c" 1>&6
8874 else
8875   cat > conftest.$ac_ext <<EOF
8876 #line 8877 "configure"
8877 #include "confdefs.h"
8878 /* System header to define __stub macros and hopefully few prototypes,
8879     which can conflict with char $ac_func(); below.  */
8880 #include <assert.h>
8881 /* Override any gcc2 internal prototype to avoid an error.  */
8882 /* We use char because int might match the return type of a gcc2
8883     builtin and then its argument prototype would still apply.  */
8884 char $ac_func();
8885 char (*f)();
8886
8887 int main() {
8888
8889 /* The GNU C library defines this for functions which it implements
8890     to always fail with ENOSYS.  Some functions are actually named
8891     something starting with __ and the normal name is an alias.  */
8892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8893 choke me
8894 #else
8895 f = $ac_func;
8896 #endif
8897
8898 ; return 0; }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8901   rm -rf conftest*
8902   eval "ac_cv_func_$ac_func=yes"
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -rf conftest*
8907   eval "ac_cv_func_$ac_func=no"
8908 fi
8909 rm -f conftest*
8910 fi
8911
8912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8913   echo "$ac_t""yes" 1>&6
8914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8915   cat >> confdefs.h <<EOF
8916 #define $ac_tr_func 1
8917 EOF
8918  
8919 else
8920   echo "$ac_t""no" 1>&6
8921 fi
8922 done
8923
8924
8925                         if test $ac_cv_func_sched_yield = no -a \
8926                                 $ac_cv_func_pthread_yield = no ; then
8927                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8928 echo "configure:8929: checking for sched_yield in -lrt" >&5
8929 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8931   echo $ac_n "(cached) $ac_c" 1>&6
8932 else
8933   ac_save_LIBS="$LIBS"
8934 LIBS="-lrt  $LIBS"
8935 cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 /* Override any gcc2 internal prototype to avoid an error.  */
8939 /* We use char because int might match the return type of a gcc2
8940     builtin and then its argument prototype would still apply.  */
8941 char sched_yield();
8942
8943 int main() {
8944 sched_yield()
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   eval "ac_cv_lib_$ac_lib_var=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_lib_$ac_lib_var=no"
8955 fi
8956 rm -f conftest*
8957 LIBS="$ac_save_LIBS"
8958
8959 fi
8960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8961   echo "$ac_t""yes" 1>&6
8962   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8963                                         cat >> confdefs.h <<\EOF
8964 #define HAVE_SCHED_YIELD 1
8965 EOF
8966
8967                                         ac_cv_func_sched_yield=yes
8968 else
8969   echo "$ac_t""no" 1>&6
8970 ac_cv_func_sched_yield=no
8971 fi
8972
8973                         fi
8974                         if test $ac_cv_func_sched_yield = no -a \
8975                                 $ac_cv_func_pthread_yield = no ; then
8976                                                                                                 for ac_func in thr_yield
8977 do
8978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8979 echo "configure:8980: checking for $ac_func" >&5
8980 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8981   echo $ac_n "(cached) $ac_c" 1>&6
8982 else
8983   cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986 /* System header to define __stub macros and hopefully few prototypes,
8987     which can conflict with char $ac_func(); below.  */
8988 #include <assert.h>
8989 /* Override any gcc2 internal prototype to avoid an error.  */
8990 /* We use char because int might match the return type of a gcc2
8991     builtin and then its argument prototype would still apply.  */
8992 char $ac_func();
8993 char (*f)();
8994
8995 int main() {
8996
8997 /* The GNU C library defines this for functions which it implements
8998     to always fail with ENOSYS.  Some functions are actually named
8999     something starting with __ and the normal name is an alias.  */
9000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9001 choke me
9002 #else
9003 f = $ac_func;
9004 #endif
9005
9006 ; return 0; }
9007 EOF
9008 if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9009   rm -rf conftest*
9010   eval "ac_cv_func_$ac_func=yes"
9011 else
9012   echo "configure: failed program was:" >&5
9013   cat conftest.$ac_ext >&5
9014   rm -rf conftest*
9015   eval "ac_cv_func_$ac_func=no"
9016 fi
9017 rm -f conftest*
9018 fi
9019
9020 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9021   echo "$ac_t""yes" 1>&6
9022     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9023   cat >> confdefs.h <<EOF
9024 #define $ac_tr_func 1
9025 EOF
9026  
9027 else
9028   echo "$ac_t""no" 1>&6
9029 fi
9030 done
9031
9032                         fi
9033                         if test $ac_cv_func_sched_yield = no -a \
9034                                 $ac_cv_func_pthread_yield = no -a \
9035                                 "$ac_cv_func_thr_yield" = no ; then
9036                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9037                         fi
9038
9039                                                 for ac_func in pthread_kill
9040 do
9041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9042 echo "configure:9043: checking for $ac_func" >&5
9043 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9044   echo $ac_n "(cached) $ac_c" 1>&6
9045 else
9046   cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 /* System header to define __stub macros and hopefully few prototypes,
9050     which can conflict with char $ac_func(); below.  */
9051 #include <assert.h>
9052 /* Override any gcc2 internal prototype to avoid an error.  */
9053 /* We use char because int might match the return type of a gcc2
9054     builtin and then its argument prototype would still apply.  */
9055 char $ac_func();
9056 char (*f)();
9057
9058 int main() {
9059
9060 /* The GNU C library defines this for functions which it implements
9061     to always fail with ENOSYS.  Some functions are actually named
9062     something starting with __ and the normal name is an alias.  */
9063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9064 choke me
9065 #else
9066 f = $ac_func;
9067 #endif
9068
9069 ; return 0; }
9070 EOF
9071 if { (eval echo configure:9072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9072   rm -rf conftest*
9073   eval "ac_cv_func_$ac_func=yes"
9074 else
9075   echo "configure: failed program was:" >&5
9076   cat conftest.$ac_ext >&5
9077   rm -rf conftest*
9078   eval "ac_cv_func_$ac_func=no"
9079 fi
9080 rm -f conftest*
9081 fi
9082
9083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9084   echo "$ac_t""yes" 1>&6
9085     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9086   cat >> confdefs.h <<EOF
9087 #define $ac_tr_func 1
9088 EOF
9089  
9090 else
9091   echo "$ac_t""no" 1>&6
9092 fi
9093 done
9094
9095
9096                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9097 echo "configure:9098: checking for pthread_detach with <pthread.h>" >&5
9098 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9099   echo $ac_n "(cached) $ac_c" 1>&6
9100 else
9101   
9102                                                                 cat > conftest.$ac_ext <<EOF
9103 #line 9104 "configure"
9104 #include "confdefs.h"
9105
9106 #include <pthread.h>
9107 #ifndef NULL
9108 #define NULL (void*)0
9109 #endif
9110
9111 int main() {
9112 pthread_detach(NULL);
9113 ; return 0; }
9114 EOF
9115 if { (eval echo configure:9116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9116   rm -rf conftest*
9117   ol_cv_func_pthread_detach=yes
9118 else
9119   echo "configure: failed program was:" >&5
9120   cat conftest.$ac_ext >&5
9121   rm -rf conftest*
9122   ol_cv_func_pthread_detach=no
9123 fi
9124 rm -f conftest*
9125                         
9126 fi
9127
9128 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9129
9130                         if test $ol_cv_func_pthread_detach = no ; then
9131                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9132                         fi
9133
9134                         cat >> confdefs.h <<\EOF
9135 #define HAVE_PTHREAD_DETACH 1
9136 EOF
9137
9138
9139                                                 for ac_func in \
9140                                 pthread_setconcurrency \
9141                                 pthread_getconcurrency \
9142                                 thr_setconcurrency \
9143                                 thr_getconcurrency \
9144                         
9145 do
9146 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9147 echo "configure:9148: checking for $ac_func" >&5
9148 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9149   echo $ac_n "(cached) $ac_c" 1>&6
9150 else
9151   cat > conftest.$ac_ext <<EOF
9152 #line 9153 "configure"
9153 #include "confdefs.h"
9154 /* System header to define __stub macros and hopefully few prototypes,
9155     which can conflict with char $ac_func(); below.  */
9156 #include <assert.h>
9157 /* Override any gcc2 internal prototype to avoid an error.  */
9158 /* We use char because int might match the return type of a gcc2
9159     builtin and then its argument prototype would still apply.  */
9160 char $ac_func();
9161 char (*f)();
9162
9163 int main() {
9164
9165 /* The GNU C library defines this for functions which it implements
9166     to always fail with ENOSYS.  Some functions are actually named
9167     something starting with __ and the normal name is an alias.  */
9168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9169 choke me
9170 #else
9171 f = $ac_func;
9172 #endif
9173
9174 ; return 0; }
9175 EOF
9176 if { (eval echo configure:9177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9177   rm -rf conftest*
9178   eval "ac_cv_func_$ac_func=yes"
9179 else
9180   echo "configure: failed program was:" >&5
9181   cat conftest.$ac_ext >&5
9182   rm -rf conftest*
9183   eval "ac_cv_func_$ac_func=no"
9184 fi
9185 rm -f conftest*
9186 fi
9187
9188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9189   echo "$ac_t""yes" 1>&6
9190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9191   cat >> confdefs.h <<EOF
9192 #define $ac_tr_func 1
9193 EOF
9194  
9195 else
9196   echo "$ac_t""no" 1>&6
9197 fi
9198 done
9199
9200
9201                         
9202         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9203 echo "configure:9204: checking for pthread_kill_other_threads_np" >&5
9204 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9205   echo $ac_n "(cached) $ac_c" 1>&6
9206 else
9207   cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 /* System header to define __stub macros and hopefully few prototypes,
9211     which can conflict with char pthread_kill_other_threads_np(); below.  */
9212 #include <assert.h>
9213 /* Override any gcc2 internal prototype to avoid an error.  */
9214 /* We use char because int might match the return type of a gcc2
9215     builtin and then its argument prototype would still apply.  */
9216 char pthread_kill_other_threads_np();
9217 char (*f)();
9218
9219 int main() {
9220
9221 /* The GNU C library defines this for functions which it implements
9222     to always fail with ENOSYS.  Some functions are actually named
9223     something starting with __ and the normal name is an alias.  */
9224 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9225 choke me
9226 #else
9227 f = pthread_kill_other_threads_np;
9228 #endif
9229
9230 ; return 0; }
9231 EOF
9232 if { (eval echo configure:9233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9233   rm -rf conftest*
9234   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9235 else
9236   echo "configure: failed program was:" >&5
9237   cat conftest.$ac_ext >&5
9238   rm -rf conftest*
9239   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9240 fi
9241 rm -f conftest*
9242 fi
9243
9244 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9245   echo "$ac_t""yes" 1>&6
9246   :
9247 else
9248   echo "$ac_t""no" 1>&6
9249 fi
9250
9251         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9252 echo "configure:9253: checking for LinuxThreads implementation" >&5
9253 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9254   echo $ac_n "(cached) $ac_c" 1>&6
9255 else
9256   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9257 fi
9258
9259 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9260
9261                         
9262         
9263         
9264         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9265 echo "configure:9266: checking for LinuxThreads consistency" >&5
9266 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9267   echo $ac_n "(cached) $ac_c" 1>&6
9268 else
9269   
9270                 if test $ol_cv_header_linux_threads = yes -a \
9271                         $ol_cv_sys_linux_threads = yes; then
9272                         ol_cv_linux_threads=yes
9273                 elif test $ol_cv_header_linux_threads = no -a \
9274                         $ol_cv_sys_linux_threads = no; then
9275                         ol_cv_linux_threads=no
9276                 else
9277                         ol_cv_linux_threads=error
9278                 fi
9279         
9280 fi
9281
9282 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9283
9284
9285                         if test $ol_cv_linux_threads = error; then
9286                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9287                         fi
9288
9289                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9290 echo "configure:9291: checking if pthread_create() works" >&5
9291 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9292   echo $ac_n "(cached) $ac_c" 1>&6
9293 else
9294   
9295                         if test "$cross_compiling" = yes; then
9296                                 ol_cv_pthread_create_works=yes
9297 else
9298   cat > conftest.$ac_ext <<EOF
9299 #line 9300 "configure"
9300 #include "confdefs.h"
9301 /* pthread test headers */
9302 #include <pthread.h>
9303 #ifndef NULL
9304 #define NULL (void*)0
9305 #endif
9306
9307 static void *task(p)
9308         void *p;
9309 {
9310         return (void *) (p == NULL);
9311 }
9312
9313
9314 int main(argc, argv)
9315         int argc;
9316         char **argv;
9317 {
9318
9319         /* pthread test function */
9320         pthread_t t;
9321         int status;
9322
9323         /* make sure pthread_create() isn't just a stub */
9324 #if HAVE_PTHREADS_D4
9325         status = pthread_create(&t, pthread_attr_default, task, NULL);
9326 #else
9327         status = pthread_create(&t, NULL, task, NULL);
9328 #endif
9329
9330         if( status ) exit( status );
9331
9332         /* make sure pthread_detach() isn't just a stub */
9333 #if HAVE_PTHREADS_D4
9334         status = pthread_detach( &t );
9335 #else
9336         status = pthread_detach( t );
9337 #endif
9338
9339 #ifdef HAVE_LINUX_THREADS
9340         pthread_kill_other_threads_np();
9341 #endif
9342
9343         exit( status );
9344
9345 }
9346
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9349 then
9350   ol_cv_pthread_create_works=yes
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -fr conftest*
9355   ol_cv_pthread_create_works=no
9356 fi
9357 rm -fr conftest*
9358 fi
9359
9360 fi
9361
9362 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9363
9364                         if test $ol_cv_pthread_create_works = no ; then
9365                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9366                         fi
9367
9368                                                 if test $ol_with_yielding_select = auto ; then
9369                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9370 echo "configure:9371: checking if select yields when using pthreads" >&5
9371 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9372   echo $ac_n "(cached) $ac_c" 1>&6
9373 else
9374   
9375                                 if test "$cross_compiling" = yes; then
9376   ol_cv_pthread_select_yields=cross
9377 else
9378   cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381
9382 #include <sys/types.h>
9383 #include <sys/time.h>
9384 #include <unistd.h>
9385 #include <pthread.h>
9386 #ifndef NULL
9387 #define NULL (void*) 0
9388 #endif
9389
9390 static int fildes[2];
9391
9392 static void *task(p)
9393         void *p;
9394 {
9395         int i;
9396         struct timeval tv;
9397
9398         fd_set rfds;
9399
9400         tv.tv_sec=10;
9401         tv.tv_usec=0;
9402
9403         FD_ZERO(&rfds);
9404         FD_SET(fildes[0], &rfds);
9405
9406         /* we're not interested in any fds */
9407         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9408
9409         if(i < 0) {
9410                 perror("select");
9411                 exit(10);
9412         }
9413
9414         exit(0); /* if we exit here, the select blocked the whole process */
9415 }
9416
9417 int main(argc, argv)
9418         int argc;
9419         char **argv;
9420 {
9421         pthread_t t;
9422
9423         /* create a pipe to select */
9424         if(pipe(&fildes[0])) {
9425                 perror("select");
9426                 exit(1);
9427         }
9428
9429 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9430         (void) pthread_setconcurrency(2);
9431 #else
9432 #ifdef HAVE_THR_SETCONCURRENCY
9433         /* Set Solaris LWP concurrency to 2 */
9434         thr_setconcurrency(2);
9435 #endif
9436 #endif
9437
9438 #if HAVE_PTHREADS_D4
9439         pthread_create(&t, pthread_attr_default, task, NULL);
9440 #else
9441         pthread_create(&t, NULL, task, NULL);
9442 #endif
9443
9444 #if HAVE_SCHED_YIELD
9445         sched_yield();  /* make sure task runs first */
9446 #else
9447 #ifdef HAVE_PTHREAD_YIELD
9448         pthread_yield();        /* make sure task runs first */
9449 #endif
9450 #endif
9451
9452         exit(2);
9453 }
9454 EOF
9455 if { (eval echo configure:9456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9456 then
9457   ol_cv_pthread_select_yields=no
9458 else
9459   echo "configure: failed program was:" >&5
9460   cat conftest.$ac_ext >&5
9461   rm -fr conftest*
9462   ol_cv_pthread_select_yields=yes
9463 fi
9464 rm -fr conftest*
9465 fi
9466
9467 fi
9468
9469 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9470
9471                                 if test $ol_cv_pthread_select_yields = cross ; then
9472                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9473                                 fi
9474
9475                                 if test $ol_cv_pthread_select_yields = yes ; then
9476                                         ol_with_yielding_select=yes
9477                                 fi
9478                         fi
9479
9480                                                 CPPFLAGS="$save_CPPFLAGS"
9481                         LIBS="$save_LIBS"
9482                 else
9483                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9484                 fi
9485         fi
9486
9487         if test $ol_with_threads = posix ; then
9488                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9489         fi
9490 fi
9491
9492 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9493         -o $ol_with_threads = mach ; then
9494
9495                 for ac_hdr in mach/cthreads.h
9496 do
9497 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9498 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9499 echo "configure:9500: checking for $ac_hdr" >&5
9500 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   cat > conftest.$ac_ext <<EOF
9504 #line 9505 "configure"
9505 #include "confdefs.h"
9506 #include <$ac_hdr>
9507 EOF
9508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9509 { (eval echo configure:9510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9511 if test -z "$ac_err"; then
9512   rm -rf conftest*
9513   eval "ac_cv_header_$ac_safe=yes"
9514 else
9515   echo "$ac_err" >&5
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -rf conftest*
9519   eval "ac_cv_header_$ac_safe=no"
9520 fi
9521 rm -f conftest*
9522 fi
9523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9524   echo "$ac_t""yes" 1>&6
9525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9526   cat >> confdefs.h <<EOF
9527 #define $ac_tr_hdr 1
9528 EOF
9529  
9530 else
9531   echo "$ac_t""no" 1>&6
9532 fi
9533 done
9534
9535         if test $ac_cv_header_mach_cthreads_h = yes ; then
9536                 ol_with_threads=found
9537
9538                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9539 echo "configure:9540: checking for cthread_fork" >&5
9540 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543   cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 /* System header to define __stub macros and hopefully few prototypes,
9547     which can conflict with char cthread_fork(); below.  */
9548 #include <assert.h>
9549 /* Override any gcc2 internal prototype to avoid an error.  */
9550 /* We use char because int might match the return type of a gcc2
9551     builtin and then its argument prototype would still apply.  */
9552 char cthread_fork();
9553 char (*f)();
9554
9555 int main() {
9556
9557 /* The GNU C library defines this for functions which it implements
9558     to always fail with ENOSYS.  Some functions are actually named
9559     something starting with __ and the normal name is an alias.  */
9560 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9561 choke me
9562 #else
9563 f = cthread_fork;
9564 #endif
9565
9566 ; return 0; }
9567 EOF
9568 if { (eval echo configure:9569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9569   rm -rf conftest*
9570   eval "ac_cv_func_cthread_fork=yes"
9571 else
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574   rm -rf conftest*
9575   eval "ac_cv_func_cthread_fork=no"
9576 fi
9577 rm -f conftest*
9578 fi
9579
9580 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9581   echo "$ac_t""yes" 1>&6
9582   ol_link_threads=yes
9583 else
9584   echo "$ac_t""no" 1>&6
9585 fi
9586
9587
9588                 if test $ol_link_threads = no ; then
9589                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9590 echo "configure:9591: checking for cthread_fork with -all_load" >&5
9591 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9592   echo $ac_n "(cached) $ac_c" 1>&6
9593 else
9594   
9595                                                                 save_LIBS="$LIBS"
9596                                 LIBS="-all_load $LIBS"
9597                                 cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600 #include <mach/cthreads.h>
9601 int main() {
9602
9603                                         cthread_fork((void *)0, (void *)0);
9604                                         
9605 ; return 0; }
9606 EOF
9607 if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9608   rm -rf conftest*
9609   ol_cv_cthread_all_load=yes
9610 else
9611   echo "configure: failed program was:" >&5
9612   cat conftest.$ac_ext >&5
9613   rm -rf conftest*
9614   ol_cv_cthread_all_load=no
9615 fi
9616 rm -f conftest*
9617                                                                 LIBS="$save_LIBS"
9618                         
9619 fi
9620
9621 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9622
9623                         if test $ol_cv_cthread_all_load = yes ; then
9624                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9625                                 ol_link_threads=mach
9626                         fi
9627                 fi
9628
9629                 if test $ol_link_threads != no ; then
9630                         : check for cthread specific functionality here
9631                         cat >> confdefs.h <<\EOF
9632 #define HAVE_MACH_CTHREADS 1
9633 EOF
9634
9635                 else
9636                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9637                 fi
9638         fi
9639
9640         if test $ol_with_threads = mach ; then
9641                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9642         fi
9643 fi
9644
9645 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9646         -o $ol_with_threads = lwp ; then
9647
9648                 for ac_hdr in thread.h synch.h
9649 do
9650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9652 echo "configure:9653: checking for $ac_hdr" >&5
9653 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659 #include <$ac_hdr>
9660 EOF
9661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9662 { (eval echo configure:9663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9664 if test -z "$ac_err"; then
9665   rm -rf conftest*
9666   eval "ac_cv_header_$ac_safe=yes"
9667 else
9668   echo "$ac_err" >&5
9669   echo "configure: failed program was:" >&5
9670   cat conftest.$ac_ext >&5
9671   rm -rf conftest*
9672   eval "ac_cv_header_$ac_safe=no"
9673 fi
9674 rm -f conftest*
9675 fi
9676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9677   echo "$ac_t""yes" 1>&6
9678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9679   cat >> confdefs.h <<EOF
9680 #define $ac_tr_hdr 1
9681 EOF
9682  
9683 else
9684   echo "$ac_t""no" 1>&6
9685 fi
9686 done
9687
9688         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9689                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9690 echo "configure:9691: checking for thr_create in -lthread" >&5
9691 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9693   echo $ac_n "(cached) $ac_c" 1>&6
9694 else
9695   ac_save_LIBS="$LIBS"
9696 LIBS="-lthread  $LIBS"
9697 cat > conftest.$ac_ext <<EOF
9698 #line 9699 "configure"
9699 #include "confdefs.h"
9700 /* Override any gcc2 internal prototype to avoid an error.  */
9701 /* We use char because int might match the return type of a gcc2
9702     builtin and then its argument prototype would still apply.  */
9703 char thr_create();
9704
9705 int main() {
9706 thr_create()
9707 ; return 0; }
9708 EOF
9709 if { (eval echo configure:9710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9710   rm -rf conftest*
9711   eval "ac_cv_lib_$ac_lib_var=yes"
9712 else
9713   echo "configure: failed program was:" >&5
9714   cat conftest.$ac_ext >&5
9715   rm -rf conftest*
9716   eval "ac_cv_lib_$ac_lib_var=no"
9717 fi
9718 rm -f conftest*
9719 LIBS="$ac_save_LIBS"
9720
9721 fi
9722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9723   echo "$ac_t""yes" 1>&6
9724   have_thr=yes
9725 else
9726   echo "$ac_t""no" 1>&6
9727 have_thr=no
9728 fi
9729
9730
9731                 if test $have_thr = yes ; then
9732                         cat >> confdefs.h <<\EOF
9733 #define HAVE_THR 1
9734 EOF
9735
9736                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9737                         ol_link_threads=thr
9738
9739                         if test $ol_with_yielding_select = auto ; then
9740                                 ol_with_yielding_select=yes
9741                         fi
9742
9743                                                 for ac_func in \
9744                                 thr_setconcurrency \
9745                                 thr_getconcurrency \
9746                         
9747 do
9748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9749 echo "configure:9750: checking for $ac_func" >&5
9750 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9751   echo $ac_n "(cached) $ac_c" 1>&6
9752 else
9753   cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 /* System header to define __stub macros and hopefully few prototypes,
9757     which can conflict with char $ac_func(); below.  */
9758 #include <assert.h>
9759 /* Override any gcc2 internal prototype to avoid an error.  */
9760 /* We use char because int might match the return type of a gcc2
9761     builtin and then its argument prototype would still apply.  */
9762 char $ac_func();
9763 char (*f)();
9764
9765 int main() {
9766
9767 /* The GNU C library defines this for functions which it implements
9768     to always fail with ENOSYS.  Some functions are actually named
9769     something starting with __ and the normal name is an alias.  */
9770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9771 choke me
9772 #else
9773 f = $ac_func;
9774 #endif
9775
9776 ; return 0; }
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9779   rm -rf conftest*
9780   eval "ac_cv_func_$ac_func=yes"
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -rf conftest*
9785   eval "ac_cv_func_$ac_func=no"
9786 fi
9787 rm -f conftest*
9788 fi
9789
9790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9791   echo "$ac_t""yes" 1>&6
9792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9793   cat >> confdefs.h <<EOF
9794 #define $ac_tr_func 1
9795 EOF
9796  
9797 else
9798   echo "$ac_t""no" 1>&6
9799 fi
9800 done
9801
9802                 fi
9803         fi
9804
9805                 for ac_hdr in lwp/lwp.h
9806 do
9807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9809 echo "configure:9810: checking for $ac_hdr" >&5
9810 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 #include <$ac_hdr>
9817 EOF
9818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9819 { (eval echo configure:9820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9821 if test -z "$ac_err"; then
9822   rm -rf conftest*
9823   eval "ac_cv_header_$ac_safe=yes"
9824 else
9825   echo "$ac_err" >&5
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -rf conftest*
9829   eval "ac_cv_header_$ac_safe=no"
9830 fi
9831 rm -f conftest*
9832 fi
9833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9834   echo "$ac_t""yes" 1>&6
9835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9836   cat >> confdefs.h <<EOF
9837 #define $ac_tr_hdr 1
9838 EOF
9839  
9840 else
9841   echo "$ac_t""no" 1>&6
9842 fi
9843 done
9844
9845         if test $ac_cv_header_lwp_lwp_h = yes ; then
9846                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9847 echo "configure:9848: checking for lwp_create in -llwp" >&5
9848 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9850   echo $ac_n "(cached) $ac_c" 1>&6
9851 else
9852   ac_save_LIBS="$LIBS"
9853 LIBS="-llwp  $LIBS"
9854 cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857 /* Override any gcc2 internal prototype to avoid an error.  */
9858 /* We use char because int might match the return type of a gcc2
9859     builtin and then its argument prototype would still apply.  */
9860 char lwp_create();
9861
9862 int main() {
9863 lwp_create()
9864 ; return 0; }
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9867   rm -rf conftest*
9868   eval "ac_cv_lib_$ac_lib_var=yes"
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   eval "ac_cv_lib_$ac_lib_var=no"
9874 fi
9875 rm -f conftest*
9876 LIBS="$ac_save_LIBS"
9877
9878 fi
9879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9880   echo "$ac_t""yes" 1>&6
9881   have_lwp=yes
9882 else
9883   echo "$ac_t""no" 1>&6
9884 have_lwp=no
9885 fi
9886
9887
9888                 if test $have_lwp = yes ; then
9889                         cat >> confdefs.h <<\EOF
9890 #define HAVE_LWP 1
9891 EOF
9892
9893                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9894                         ol_link_threads=lwp
9895
9896                         if test $ol_with_yielding_select = auto ; then
9897                                 ol_with_yielding_select=no
9898                         fi
9899                 fi
9900         fi
9901 fi
9902
9903 if test $ol_with_yielding_select = yes ; then
9904         cat >> confdefs.h <<\EOF
9905 #define HAVE_YIELDING_SELECT 1
9906 EOF
9907
9908 fi
9909
9910 if test $ol_with_threads = manual ; then
9911                 ol_link_threads=yes
9912
9913         echo "configure: warning: thread defines and link options must be set manually" 1>&2
9914
9915         for ac_hdr in pthread.h sched.h
9916 do
9917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9919 echo "configure:9920: checking for $ac_hdr" >&5
9920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9921   echo $ac_n "(cached) $ac_c" 1>&6
9922 else
9923   cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 #include <$ac_hdr>
9927 EOF
9928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9929 { (eval echo configure:9930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9931 if test -z "$ac_err"; then
9932   rm -rf conftest*
9933   eval "ac_cv_header_$ac_safe=yes"
9934 else
9935   echo "$ac_err" >&5
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_header_$ac_safe=no"
9940 fi
9941 rm -f conftest*
9942 fi
9943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9944   echo "$ac_t""yes" 1>&6
9945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9946   cat >> confdefs.h <<EOF
9947 #define $ac_tr_hdr 1
9948 EOF
9949  
9950 else
9951   echo "$ac_t""no" 1>&6
9952 fi
9953 done
9954
9955         for ac_func in sched_yield pthread_yield
9956 do
9957 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9958 echo "configure:9959: checking for $ac_func" >&5
9959 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9960   echo $ac_n "(cached) $ac_c" 1>&6
9961 else
9962   cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 /* System header to define __stub macros and hopefully few prototypes,
9966     which can conflict with char $ac_func(); below.  */
9967 #include <assert.h>
9968 /* Override any gcc2 internal prototype to avoid an error.  */
9969 /* We use char because int might match the return type of a gcc2
9970     builtin and then its argument prototype would still apply.  */
9971 char $ac_func();
9972 char (*f)();
9973
9974 int main() {
9975
9976 /* The GNU C library defines this for functions which it implements
9977     to always fail with ENOSYS.  Some functions are actually named
9978     something starting with __ and the normal name is an alias.  */
9979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9980 choke me
9981 #else
9982 f = $ac_func;
9983 #endif
9984
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   eval "ac_cv_func_$ac_func=yes"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   eval "ac_cv_func_$ac_func=no"
9995 fi
9996 rm -f conftest*
9997 fi
9998
9999 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10000   echo "$ac_t""yes" 1>&6
10001     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10002   cat >> confdefs.h <<EOF
10003 #define $ac_tr_func 1
10004 EOF
10005  
10006 else
10007   echo "$ac_t""no" 1>&6
10008 fi
10009 done
10010
10011         
10012         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10013 echo "configure:10014: checking for LinuxThreads pthread.h" >&5
10014 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10015   echo $ac_n "(cached) $ac_c" 1>&6
10016 else
10017   cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020 #include <pthread.h>
10021 EOF
10022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10023   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10024   rm -rf conftest*
10025   ol_cv_header_linux_threads=yes
10026 else
10027   rm -rf conftest*
10028   ol_cv_header_linux_threads=no
10029 fi
10030 rm -f conftest*
10031
10032                 
10033 fi
10034
10035 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10036         if test $ol_cv_header_linux_threads = yes; then
10037                 cat >> confdefs.h <<\EOF
10038 #define HAVE_LINUX_THREADS 1
10039 EOF
10040
10041         fi
10042
10043
10044         for ac_hdr in mach/cthreads.h
10045 do
10046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10048 echo "configure:10049: checking for $ac_hdr" >&5
10049 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10050   echo $ac_n "(cached) $ac_c" 1>&6
10051 else
10052   cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 #include <$ac_hdr>
10056 EOF
10057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10058 { (eval echo configure:10059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10060 if test -z "$ac_err"; then
10061   rm -rf conftest*
10062   eval "ac_cv_header_$ac_safe=yes"
10063 else
10064   echo "$ac_err" >&5
10065   echo "configure: failed program was:" >&5
10066   cat conftest.$ac_ext >&5
10067   rm -rf conftest*
10068   eval "ac_cv_header_$ac_safe=no"
10069 fi
10070 rm -f conftest*
10071 fi
10072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10073   echo "$ac_t""yes" 1>&6
10074     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10075   cat >> confdefs.h <<EOF
10076 #define $ac_tr_hdr 1
10077 EOF
10078  
10079 else
10080   echo "$ac_t""no" 1>&6
10081 fi
10082 done
10083
10084         for ac_hdr in lwp/lwp.h
10085 do
10086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10088 echo "configure:10089: checking for $ac_hdr" >&5
10089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10090   echo $ac_n "(cached) $ac_c" 1>&6
10091 else
10092   cat > conftest.$ac_ext <<EOF
10093 #line 10094 "configure"
10094 #include "confdefs.h"
10095 #include <$ac_hdr>
10096 EOF
10097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10098 { (eval echo configure:10099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10100 if test -z "$ac_err"; then
10101   rm -rf conftest*
10102   eval "ac_cv_header_$ac_safe=yes"
10103 else
10104   echo "$ac_err" >&5
10105   echo "configure: failed program was:" >&5
10106   cat conftest.$ac_ext >&5
10107   rm -rf conftest*
10108   eval "ac_cv_header_$ac_safe=no"
10109 fi
10110 rm -f conftest*
10111 fi
10112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10113   echo "$ac_t""yes" 1>&6
10114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10115   cat >> confdefs.h <<EOF
10116 #define $ac_tr_hdr 1
10117 EOF
10118  
10119 else
10120   echo "$ac_t""no" 1>&6
10121 fi
10122 done
10123
10124         for ac_hdr in thread.h synch.h
10125 do
10126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10128 echo "configure:10129: checking for $ac_hdr" >&5
10129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10130   echo $ac_n "(cached) $ac_c" 1>&6
10131 else
10132   cat > conftest.$ac_ext <<EOF
10133 #line 10134 "configure"
10134 #include "confdefs.h"
10135 #include <$ac_hdr>
10136 EOF
10137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10138 { (eval echo configure:10139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10140 if test -z "$ac_err"; then
10141   rm -rf conftest*
10142   eval "ac_cv_header_$ac_safe=yes"
10143 else
10144   echo "$ac_err" >&5
10145   echo "configure: failed program was:" >&5
10146   cat conftest.$ac_ext >&5
10147   rm -rf conftest*
10148   eval "ac_cv_header_$ac_safe=no"
10149 fi
10150 rm -f conftest*
10151 fi
10152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10153   echo "$ac_t""yes" 1>&6
10154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10155   cat >> confdefs.h <<EOF
10156 #define $ac_tr_hdr 1
10157 EOF
10158  
10159 else
10160   echo "$ac_t""no" 1>&6
10161 fi
10162 done
10163
10164 fi
10165
10166 if test $ol_link_threads != no ; then  
10167                         cat >> confdefs.h <<\EOF
10168 #define REENTRANT 1
10169 EOF
10170
10171         cat >> confdefs.h <<\EOF
10172 #define _REENTRANT 1
10173 EOF
10174
10175         cat >> confdefs.h <<\EOF
10176 #define THREAD_SAFE 1
10177 EOF
10178
10179         cat >> confdefs.h <<\EOF
10180 #define _THREAD_SAFE 1
10181 EOF
10182
10183         cat >> confdefs.h <<\EOF
10184 #define THREADSAFE 1
10185 EOF
10186
10187         cat >> confdefs.h <<\EOF
10188 #define _THREADSAFE 1
10189 EOF
10190
10191         cat >> confdefs.h <<\EOF
10192 #define _SGI_MP_SOURCE 1
10193 EOF
10194
10195
10196                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10197 echo "configure:10198: checking for thread specific errno" >&5
10198 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10199   echo $ac_n "(cached) $ac_c" 1>&6
10200 else
10201   
10202                 cat > conftest.$ac_ext <<EOF
10203 #line 10204 "configure"
10204 #include "confdefs.h"
10205 #include <errno.h>
10206 int main() {
10207 errno = 0;
10208 ; return 0; }
10209 EOF
10210 if { (eval echo configure:10211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10211   rm -rf conftest*
10212   ol_cv_errno_thread_specific=yes
10213 else
10214   echo "configure: failed program was:" >&5
10215   cat conftest.$ac_ext >&5
10216   rm -rf conftest*
10217   ol_cv_errno_thread_specific=no
10218 fi
10219 rm -f conftest*
10220         
10221 fi
10222
10223 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10224
10225                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10226 echo "configure:10227: checking for thread specific h_errno" >&5
10227 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10228   echo $ac_n "(cached) $ac_c" 1>&6
10229 else
10230   
10231                 cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 #include <netdb.h>
10235 int main() {
10236 h_errno = 0;
10237 ; return 0; }
10238 EOF
10239 if { (eval echo configure:10240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10240   rm -rf conftest*
10241   ol_cv_h_errno_thread_specific=yes
10242 else
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -rf conftest*
10246   ol_cv_h_errno_thread_specific=no
10247 fi
10248 rm -f conftest*
10249         
10250 fi
10251
10252 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10253
10254         if test $ol_cv_errno_thread_specific != yes \
10255                 -o $ol_cv_h_errno_thread_specific != yes ; then
10256                 LIBS="$LTHREAD_LIBS $LIBS"
10257                 LTHREAD_LIBS=""
10258         fi
10259
10260 fi  
10261
10262 if test $ol_link_threads = no ; then
10263         if test $ol_with_threads = yes ; then
10264                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10265         fi
10266
10267         if test $ol_with_threads = auto ; then
10268                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10269                 ol_with_threads=no
10270         fi
10271
10272         cat >> confdefs.h <<\EOF
10273 #define NO_THREADS 1
10274 EOF
10275
10276         LTHREAD_LIBS=""
10277 fi
10278
10279 if test $ol_link_threads != no ; then
10280         cat >> confdefs.h <<\EOF
10281 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10282 EOF
10283
10284 fi
10285
10286
10287 ol_link_ldbm=no 
10288 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10289         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10290 echo "configure:10291: checking for DB2 library" >&5
10291 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10292   echo $ac_n "(cached) $ac_c" 1>&6
10293 else
10294         ol_LIBS="$LIBS"
10295         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10296 echo "configure:10297: checking for db_open in -ldb" >&5
10297 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   ac_save_LIBS="$LIBS"
10302 LIBS="-ldb  $LIBS"
10303 cat > conftest.$ac_ext <<EOF
10304 #line 10305 "configure"
10305 #include "confdefs.h"
10306 /* Override any gcc2 internal prototype to avoid an error.  */
10307 /* We use char because int might match the return type of a gcc2
10308     builtin and then its argument prototype would still apply.  */
10309 char db_open();
10310
10311 int main() {
10312 db_open()
10313 ; return 0; }
10314 EOF
10315 if { (eval echo configure:10316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10316   rm -rf conftest*
10317   eval "ac_cv_lib_$ac_lib_var=yes"
10318 else
10319   echo "configure: failed program was:" >&5
10320   cat conftest.$ac_ext >&5
10321   rm -rf conftest*
10322   eval "ac_cv_lib_$ac_lib_var=no"
10323 fi
10324 rm -f conftest*
10325 LIBS="$ac_save_LIBS"
10326
10327 fi
10328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10329   echo "$ac_t""yes" 1>&6
10330   ol_cv_lib_db2=-ldb
10331 else
10332   echo "$ac_t""no" 1>&6
10333 ol_cv_lib_db2=no
10334 fi
10335
10336         LIBS="$ol_LIBS"
10337
10338 fi
10339
10340 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10341
10342 for ac_hdr in db.h
10343 do
10344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10346 echo "configure:10347: checking for $ac_hdr" >&5
10347 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10348   echo $ac_n "(cached) $ac_c" 1>&6
10349 else
10350   cat > conftest.$ac_ext <<EOF
10351 #line 10352 "configure"
10352 #include "confdefs.h"
10353 #include <$ac_hdr>
10354 EOF
10355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10356 { (eval echo configure:10357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10358 if test -z "$ac_err"; then
10359   rm -rf conftest*
10360   eval "ac_cv_header_$ac_safe=yes"
10361 else
10362   echo "$ac_err" >&5
10363   echo "configure: failed program was:" >&5
10364   cat conftest.$ac_ext >&5
10365   rm -rf conftest*
10366   eval "ac_cv_header_$ac_safe=no"
10367 fi
10368 rm -f conftest*
10369 fi
10370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10371   echo "$ac_t""yes" 1>&6
10372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10373   cat >> confdefs.h <<EOF
10374 #define $ac_tr_hdr 1
10375 EOF
10376  
10377 else
10378   echo "$ac_t""no" 1>&6
10379 fi
10380 done
10381
10382 if test $ac_cv_header_db_h = yes ; then
10383         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10384 echo "configure:10385: checking if db.h is DB2" >&5
10385 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   
10389                 cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392
10393 #                       include <db.h>
10394                         /* this check could be improved */
10395 #                       ifdef DB_VERSION_MAJOR
10396 #                               if DB_VERSION_MAJOR == 2
10397                                         __db_version_2
10398 #                               endif
10399 #                       endif
10400                 
10401 EOF
10402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10403   egrep "__db_version_2" >/dev/null 2>&1; then
10404   rm -rf conftest*
10405   ol_cv_header_db2=yes
10406 else
10407   rm -rf conftest*
10408   ol_cv_header_db2=no
10409 fi
10410 rm -f conftest*
10411
10412 fi
10413
10414 echo "$ac_t""$ol_cv_header_db2" 1>&6
10415 else
10416         ol_cv_header_db2=no
10417 fi
10418
10419
10420  
10421  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10422 echo "configure:10423: checking for Berkeley DB2" >&5
10423 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   
10427         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10428                 ol_cv_berkeley_db2=no
10429         else
10430                 ol_cv_berkeley_db2=yes
10431         fi
10432
10433 fi
10434
10435 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10436  if test $ol_cv_berkeley_db2 = yes ; then
10437         cat >> confdefs.h <<\EOF
10438 #define HAVE_BERKELEY_DB2 1
10439 EOF
10440
10441  fi
10442
10443
10444         if test $ol_cv_berkeley_db2 = yes ; then
10445                 ol_link_ldbm=db2
10446                 ol_with_ldbm_api=db2
10447
10448                 if test $ol_with_ldbm_type = hash ; then
10449                         cat >> confdefs.h <<\EOF
10450 #define LDBM_USE_DBHASH 1
10451 EOF
10452
10453                 else
10454                         cat >> confdefs.h <<\EOF
10455 #define LDBM_USE_DBBTREE 1
10456 EOF
10457
10458                 fi
10459
10460                                                 if test $ol_cv_lib_db2 != yes ; then
10461                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10462                 fi
10463         fi
10464 fi
10465
10466 ol_link_bdb2=no
10467 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10468         ol_link_bdb2=yes
10469 fi
10470
10471 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10472         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10473 echo "configure:10474: checking for Berkeley DB library" >&5
10474 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10475   echo $ac_n "(cached) $ac_c" 1>&6
10476 else
10477   
10478         for ac_hdr in db1/db.h
10479 do
10480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10482 echo "configure:10483: checking for $ac_hdr" >&5
10483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489 #include <$ac_hdr>
10490 EOF
10491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10492 { (eval echo configure:10493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10494 if test -z "$ac_err"; then
10495   rm -rf conftest*
10496   eval "ac_cv_header_$ac_safe=yes"
10497 else
10498   echo "$ac_err" >&5
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_header_$ac_safe=no"
10503 fi
10504 rm -f conftest*
10505 fi
10506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10507   echo "$ac_t""yes" 1>&6
10508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10509   cat >> confdefs.h <<EOF
10510 #define $ac_tr_hdr 1
10511 EOF
10512  
10513 else
10514   echo "$ac_t""no" 1>&6
10515 fi
10516 done
10517
10518         ol_LIBS="$LIBS"
10519         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10520 echo "configure:10521: checking for dbopen" >&5
10521 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   cat > conftest.$ac_ext <<EOF
10525 #line 10526 "configure"
10526 #include "confdefs.h"
10527 /* System header to define __stub macros and hopefully few prototypes,
10528     which can conflict with char dbopen(); below.  */
10529 #include <assert.h>
10530 /* Override any gcc2 internal prototype to avoid an error.  */
10531 /* We use char because int might match the return type of a gcc2
10532     builtin and then its argument prototype would still apply.  */
10533 char dbopen();
10534 char (*f)();
10535
10536 int main() {
10537
10538 /* The GNU C library defines this for functions which it implements
10539     to always fail with ENOSYS.  Some functions are actually named
10540     something starting with __ and the normal name is an alias.  */
10541 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10542 choke me
10543 #else
10544 f = dbopen;
10545 #endif
10546
10547 ; return 0; }
10548 EOF
10549 if { (eval echo configure:10550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10550   rm -rf conftest*
10551   eval "ac_cv_func_dbopen=yes"
10552 else
10553   echo "configure: failed program was:" >&5
10554   cat conftest.$ac_ext >&5
10555   rm -rf conftest*
10556   eval "ac_cv_func_dbopen=no"
10557 fi
10558 rm -f conftest*
10559 fi
10560
10561 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10562   echo "$ac_t""yes" 1>&6
10563   ol_cv_lib_db=yes
10564 else
10565   echo "$ac_t""no" 1>&6
10566
10567                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10568 echo "configure:10569: checking for dbopen in -ldb1" >&5
10569 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10570 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10571   echo $ac_n "(cached) $ac_c" 1>&6
10572 else
10573   ac_save_LIBS="$LIBS"
10574 LIBS="-ldb1  $LIBS"
10575 cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 /* Override any gcc2 internal prototype to avoid an error.  */
10579 /* We use char because int might match the return type of a gcc2
10580     builtin and then its argument prototype would still apply.  */
10581 char dbopen();
10582
10583 int main() {
10584 dbopen()
10585 ; return 0; }
10586 EOF
10587 if { (eval echo configure:10588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10588   rm -rf conftest*
10589   eval "ac_cv_lib_$ac_lib_var=yes"
10590 else
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -rf conftest*
10594   eval "ac_cv_lib_$ac_lib_var=no"
10595 fi
10596 rm -f conftest*
10597 LIBS="$ac_save_LIBS"
10598
10599 fi
10600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10601   echo "$ac_t""yes" 1>&6
10602   ol_cv_lib_db=-ldb1
10603 else
10604   echo "$ac_t""no" 1>&6
10605
10606                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10607 echo "configure:10608: checking for dbopen in -ldb" >&5
10608 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10610   echo $ac_n "(cached) $ac_c" 1>&6
10611 else
10612   ac_save_LIBS="$LIBS"
10613 LIBS="-ldb  $LIBS"
10614 cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617 /* Override any gcc2 internal prototype to avoid an error.  */
10618 /* We use char because int might match the return type of a gcc2
10619     builtin and then its argument prototype would still apply.  */
10620 char dbopen();
10621
10622 int main() {
10623 dbopen()
10624 ; return 0; }
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10627   rm -rf conftest*
10628   eval "ac_cv_lib_$ac_lib_var=yes"
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_lib_$ac_lib_var=no"
10634 fi
10635 rm -f conftest*
10636 LIBS="$ac_save_LIBS"
10637
10638 fi
10639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641   ol_cv_lib_db=-ldb
10642 else
10643   echo "$ac_t""no" 1>&6
10644 ol_cv_lib_db=no
10645 fi
10646
10647                 
10648 fi
10649
10650         
10651 fi
10652
10653         LIBS="$ol_LIBS"
10654
10655 fi
10656
10657 echo "$ac_t""$ol_cv_lib_db" 1>&6
10658
10659
10660 for ac_hdr in db_185.h
10661 do
10662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10664 echo "configure:10665: checking for $ac_hdr" >&5
10665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10666   echo $ac_n "(cached) $ac_c" 1>&6
10667 else
10668   cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671 #include <$ac_hdr>
10672 EOF
10673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10674 { (eval echo configure:10675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10676 if test -z "$ac_err"; then
10677   rm -rf conftest*
10678   eval "ac_cv_header_$ac_safe=yes"
10679 else
10680   echo "$ac_err" >&5
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_header_$ac_safe=no"
10685 fi
10686 rm -f conftest*
10687 fi
10688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10691   cat >> confdefs.h <<EOF
10692 #define $ac_tr_hdr 1
10693 EOF
10694  
10695 else
10696   echo "$ac_t""no" 1>&6
10697 fi
10698 done
10699
10700 if test "$ol_cv_header_db2" = yes ; then
10701         
10702         ol_cv_header_db=$ac_cv_header_db_185_h
10703 else
10704         ol_cv_header_db=$ac_cv_header_db_h
10705 fi
10706
10707
10708  
10709  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10710 echo "configure:10711: checking for Berkeley DB" >&5
10711 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10712   echo $ac_n "(cached) $ac_c" 1>&6
10713 else
10714   
10715         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10716                 ol_cv_berkeley_db=no
10717         else
10718                 ol_cv_berkeley_db=yes
10719         fi
10720
10721 fi
10722
10723 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10724  if test $ol_cv_berkeley_db = yes ; then
10725         cat >> confdefs.h <<\EOF
10726 #define HAVE_BERKELEY_DB 1
10727 EOF
10728
10729  fi
10730
10731
10732         if test $ol_cv_berkeley_db = yes ; then
10733                 ol_link_ldbm=db
10734                 ol_with_ldbm_api=db
10735
10736                 if test $ol_with_ldbm_type = hash ; then
10737                         cat >> confdefs.h <<\EOF
10738 #define LDBM_USE_DBHASH 1
10739 EOF
10740
10741                 else
10742                         cat >> confdefs.h <<\EOF
10743 #define LDBM_USE_DBBTREE 1
10744 EOF
10745
10746                 fi
10747
10748                                                 if test $ol_cv_lib_db != yes ; then
10749                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10750                 fi
10751         fi
10752 fi
10753
10754 if test $ol_with_ldbm_api = manual ; then
10755                 ol_link_ldbm=yes
10756
10757         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10758
10759         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10760 do
10761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10763 echo "configure:10764: checking for $ac_hdr" >&5
10764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770 #include <$ac_hdr>
10771 EOF
10772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10773 { (eval echo configure:10774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10775 if test -z "$ac_err"; then
10776   rm -rf conftest*
10777   eval "ac_cv_header_$ac_safe=yes"
10778 else
10779   echo "$ac_err" >&5
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_header_$ac_safe=no"
10784 fi
10785 rm -f conftest*
10786 fi
10787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10788   echo "$ac_t""yes" 1>&6
10789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10790   cat >> confdefs.h <<EOF
10791 #define $ac_tr_hdr 1
10792 EOF
10793  
10794 else
10795   echo "$ac_t""no" 1>&6
10796 fi
10797 done
10798
10799 fi
10800
10801 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10802         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10803         ol_with_ldbm_api=none
10804 fi
10805
10806 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10807         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10808 echo "configure:10809: checking for MDBM library" >&5
10809 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10810   echo $ac_n "(cached) $ac_c" 1>&6
10811 else
10812         ol_LIBS="$LIBS"
10813         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10814 echo "configure:10815: checking for mdbm_set_chain" >&5
10815 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10816   echo $ac_n "(cached) $ac_c" 1>&6
10817 else
10818   cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 /* System header to define __stub macros and hopefully few prototypes,
10822     which can conflict with char mdbm_set_chain(); below.  */
10823 #include <assert.h>
10824 /* Override any gcc2 internal prototype to avoid an error.  */
10825 /* We use char because int might match the return type of a gcc2
10826     builtin and then its argument prototype would still apply.  */
10827 char mdbm_set_chain();
10828 char (*f)();
10829
10830 int main() {
10831
10832 /* The GNU C library defines this for functions which it implements
10833     to always fail with ENOSYS.  Some functions are actually named
10834     something starting with __ and the normal name is an alias.  */
10835 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10836 choke me
10837 #else
10838 f = mdbm_set_chain;
10839 #endif
10840
10841 ; return 0; }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10844   rm -rf conftest*
10845   eval "ac_cv_func_mdbm_set_chain=yes"
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   eval "ac_cv_func_mdbm_set_chain=no"
10851 fi
10852 rm -f conftest*
10853 fi
10854
10855 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10856   echo "$ac_t""yes" 1>&6
10857   ol_cv_lib_mdbm=yes
10858 else
10859   echo "$ac_t""no" 1>&6
10860
10861                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10862 echo "configure:10863: checking for mdbm_set_chain in -lmdbm" >&5
10863 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10865   echo $ac_n "(cached) $ac_c" 1>&6
10866 else
10867   ac_save_LIBS="$LIBS"
10868 LIBS="-lmdbm  $LIBS"
10869 cat > conftest.$ac_ext <<EOF
10870 #line 10871 "configure"
10871 #include "confdefs.h"
10872 /* Override any gcc2 internal prototype to avoid an error.  */
10873 /* We use char because int might match the return type of a gcc2
10874     builtin and then its argument prototype would still apply.  */
10875 char mdbm_set_chain();
10876
10877 int main() {
10878 mdbm_set_chain()
10879 ; return 0; }
10880 EOF
10881 if { (eval echo configure:10882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10882   rm -rf conftest*
10883   eval "ac_cv_lib_$ac_lib_var=yes"
10884 else
10885   echo "configure: failed program was:" >&5
10886   cat conftest.$ac_ext >&5
10887   rm -rf conftest*
10888   eval "ac_cv_lib_$ac_lib_var=no"
10889 fi
10890 rm -f conftest*
10891 LIBS="$ac_save_LIBS"
10892
10893 fi
10894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10895   echo "$ac_t""yes" 1>&6
10896   ol_cv_lib_mdbm=-lmdbm
10897 else
10898   echo "$ac_t""no" 1>&6
10899 ol_cv_lib_mdbm=no
10900 fi
10901
10902         
10903 fi
10904
10905         LIBS="$ol_LIBS"
10906
10907 fi
10908
10909 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
10910
10911
10912  for ac_hdr in mdbm.h
10913 do
10914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10916 echo "configure:10917: checking for $ac_hdr" >&5
10917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923 #include <$ac_hdr>
10924 EOF
10925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10926 { (eval echo configure:10927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10928 if test -z "$ac_err"; then
10929   rm -rf conftest*
10930   eval "ac_cv_header_$ac_safe=yes"
10931 else
10932   echo "$ac_err" >&5
10933   echo "configure: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   rm -rf conftest*
10936   eval "ac_cv_header_$ac_safe=no"
10937 fi
10938 rm -f conftest*
10939 fi
10940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10941   echo "$ac_t""yes" 1>&6
10942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10943   cat >> confdefs.h <<EOF
10944 #define $ac_tr_hdr 1
10945 EOF
10946  
10947 else
10948   echo "$ac_t""no" 1>&6
10949 fi
10950 done
10951
10952  echo $ac_n "checking for db""... $ac_c" 1>&6
10953 echo "configure:10954: checking for db" >&5
10954 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
10955   echo $ac_n "(cached) $ac_c" 1>&6
10956 else
10957   
10958         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
10959                 ol_cv_mdbm=no
10960         else
10961                 ol_cv_mdbm=yes
10962         fi
10963
10964 fi
10965
10966 echo "$ac_t""$ol_cv_mdbm" 1>&6
10967  if test $ol_cv_mdbm = yes ; then
10968         cat >> confdefs.h <<\EOF
10969 #define HAVE_MDBM 1
10970 EOF
10971
10972  fi
10973
10974
10975         if test $ol_cv_mdbm = yes ; then
10976                 ol_link_ldbm=mdbm
10977                 ol_with_ldbm_api=mdbm
10978                 if test $ol_cv_lib_mdbm != yes ; then
10979                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
10980                 fi
10981         fi
10982 fi
10983
10984 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
10985         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
10986 echo "configure:10987: checking for GDBM library" >&5
10987 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990         ol_LIBS="$LIBS"
10991         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
10992 echo "configure:10993: checking for gdbm_open" >&5
10993 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
10994   echo $ac_n "(cached) $ac_c" 1>&6
10995 else
10996   cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 /* System header to define __stub macros and hopefully few prototypes,
11000     which can conflict with char gdbm_open(); below.  */
11001 #include <assert.h>
11002 /* Override any gcc2 internal prototype to avoid an error.  */
11003 /* We use char because int might match the return type of a gcc2
11004     builtin and then its argument prototype would still apply.  */
11005 char gdbm_open();
11006 char (*f)();
11007
11008 int main() {
11009
11010 /* The GNU C library defines this for functions which it implements
11011     to always fail with ENOSYS.  Some functions are actually named
11012     something starting with __ and the normal name is an alias.  */
11013 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11014 choke me
11015 #else
11016 f = gdbm_open;
11017 #endif
11018
11019 ; return 0; }
11020 EOF
11021 if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11022   rm -rf conftest*
11023   eval "ac_cv_func_gdbm_open=yes"
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   eval "ac_cv_func_gdbm_open=no"
11029 fi
11030 rm -f conftest*
11031 fi
11032
11033 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11034   echo "$ac_t""yes" 1>&6
11035   ol_cv_lib_gdbm=yes
11036 else
11037   echo "$ac_t""no" 1>&6
11038
11039                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11040 echo "configure:11041: checking for gdbm_open in -lgdbm" >&5
11041 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11043   echo $ac_n "(cached) $ac_c" 1>&6
11044 else
11045   ac_save_LIBS="$LIBS"
11046 LIBS="-lgdbm  $LIBS"
11047 cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050 /* Override any gcc2 internal prototype to avoid an error.  */
11051 /* We use char because int might match the return type of a gcc2
11052     builtin and then its argument prototype would still apply.  */
11053 char gdbm_open();
11054
11055 int main() {
11056 gdbm_open()
11057 ; return 0; }
11058 EOF
11059 if { (eval echo configure:11060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11060   rm -rf conftest*
11061   eval "ac_cv_lib_$ac_lib_var=yes"
11062 else
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_lib_$ac_lib_var=no"
11067 fi
11068 rm -f conftest*
11069 LIBS="$ac_save_LIBS"
11070
11071 fi
11072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074   ol_cv_lib_gdbm=-lgdbm
11075 else
11076   echo "$ac_t""no" 1>&6
11077 ol_cv_lib_gdbm=no
11078 fi
11079
11080         
11081 fi
11082
11083         LIBS="$ol_LIBS"
11084
11085 fi
11086
11087 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11088
11089
11090  for ac_hdr in gdbm.h
11091 do
11092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11094 echo "configure:11095: checking for $ac_hdr" >&5
11095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11096   echo $ac_n "(cached) $ac_c" 1>&6
11097 else
11098   cat > conftest.$ac_ext <<EOF
11099 #line 11100 "configure"
11100 #include "confdefs.h"
11101 #include <$ac_hdr>
11102 EOF
11103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11104 { (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11106 if test -z "$ac_err"; then
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=yes"
11109 else
11110   echo "$ac_err" >&5
11111   echo "configure: failed program was:" >&5
11112   cat conftest.$ac_ext >&5
11113   rm -rf conftest*
11114   eval "ac_cv_header_$ac_safe=no"
11115 fi
11116 rm -f conftest*
11117 fi
11118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11119   echo "$ac_t""yes" 1>&6
11120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11121   cat >> confdefs.h <<EOF
11122 #define $ac_tr_hdr 1
11123 EOF
11124  
11125 else
11126   echo "$ac_t""no" 1>&6
11127 fi
11128 done
11129
11130  echo $ac_n "checking for db""... $ac_c" 1>&6
11131 echo "configure:11132: checking for db" >&5
11132 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11133   echo $ac_n "(cached) $ac_c" 1>&6
11134 else
11135   
11136         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11137                 ol_cv_gdbm=no
11138         else
11139                 ol_cv_gdbm=yes
11140         fi
11141
11142 fi
11143
11144 echo "$ac_t""$ol_cv_gdbm" 1>&6
11145  if test $ol_cv_gdbm = yes ; then
11146         cat >> confdefs.h <<\EOF
11147 #define HAVE_GDBM 1
11148 EOF
11149
11150  fi
11151
11152
11153         if test $ol_cv_gdbm = yes ; then
11154                 ol_link_ldbm=gdbm
11155                 ol_with_ldbm_api=gdbm
11156
11157                 if test $ol_cv_lib_gdbm != yes ; then
11158                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11159                 fi
11160         fi
11161 fi
11162
11163 if test $ol_with_ldbm_api = auto ; then
11164         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11165 elif test $ol_with_ldbm_api = ndbm ; then
11166         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11167 echo "configure:11168: checking for NDBM library" >&5
11168 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11169   echo $ac_n "(cached) $ac_c" 1>&6
11170 else
11171         ol_LIBS="$LIBS"
11172         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11173 echo "configure:11174: checking for dbm_open" >&5
11174 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11175   echo $ac_n "(cached) $ac_c" 1>&6
11176 else
11177   cat > conftest.$ac_ext <<EOF
11178 #line 11179 "configure"
11179 #include "confdefs.h"
11180 /* System header to define __stub macros and hopefully few prototypes,
11181     which can conflict with char dbm_open(); below.  */
11182 #include <assert.h>
11183 /* Override any gcc2 internal prototype to avoid an error.  */
11184 /* We use char because int might match the return type of a gcc2
11185     builtin and then its argument prototype would still apply.  */
11186 char dbm_open();
11187 char (*f)();
11188
11189 int main() {
11190
11191 /* The GNU C library defines this for functions which it implements
11192     to always fail with ENOSYS.  Some functions are actually named
11193     something starting with __ and the normal name is an alias.  */
11194 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11195 choke me
11196 #else
11197 f = dbm_open;
11198 #endif
11199
11200 ; return 0; }
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11203   rm -rf conftest*
11204   eval "ac_cv_func_dbm_open=yes"
11205 else
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -rf conftest*
11209   eval "ac_cv_func_dbm_open=no"
11210 fi
11211 rm -f conftest*
11212 fi
11213
11214 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11215   echo "$ac_t""yes" 1>&6
11216   ol_cv_lib_ndbm=yes
11217 else
11218   echo "$ac_t""no" 1>&6
11219
11220                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11221 echo "configure:11222: checking for dbm_open in -lndbm" >&5
11222 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11224   echo $ac_n "(cached) $ac_c" 1>&6
11225 else
11226   ac_save_LIBS="$LIBS"
11227 LIBS="-lndbm  $LIBS"
11228 cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 /* Override any gcc2 internal prototype to avoid an error.  */
11232 /* We use char because int might match the return type of a gcc2
11233     builtin and then its argument prototype would still apply.  */
11234 char dbm_open();
11235
11236 int main() {
11237 dbm_open()
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11241   rm -rf conftest*
11242   eval "ac_cv_lib_$ac_lib_var=yes"
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_lib_$ac_lib_var=no"
11248 fi
11249 rm -f conftest*
11250 LIBS="$ac_save_LIBS"
11251
11252 fi
11253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11254   echo "$ac_t""yes" 1>&6
11255   ol_cv_lib_ndbm=-lndbm
11256 else
11257   echo "$ac_t""no" 1>&6
11258
11259                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11260 echo "configure:11261: checking for dbm_open in -ldbm" >&5
11261 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11263   echo $ac_n "(cached) $ac_c" 1>&6
11264 else
11265   ac_save_LIBS="$LIBS"
11266 LIBS="-ldbm  $LIBS"
11267 cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 /* Override any gcc2 internal prototype to avoid an error.  */
11271 /* We use char because int might match the return type of a gcc2
11272     builtin and then its argument prototype would still apply.  */
11273 char dbm_open();
11274
11275 int main() {
11276 dbm_open()
11277 ; return 0; }
11278 EOF
11279 if { (eval echo configure:11280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11280   rm -rf conftest*
11281   eval "ac_cv_lib_$ac_lib_var=yes"
11282 else
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -rf conftest*
11286   eval "ac_cv_lib_$ac_lib_var=no"
11287 fi
11288 rm -f conftest*
11289 LIBS="$ac_save_LIBS"
11290
11291 fi
11292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294   ol_cv_lib_ndbm=-ldbm
11295 else
11296   echo "$ac_t""no" 1>&6
11297 ol_cv_lib_ndbm=no
11298 fi
11299                 
11300 fi
11301
11302         
11303 fi
11304
11305         LIBS="$ol_LIBS"
11306
11307 fi
11308
11309 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11310
11311
11312  for ac_hdr in ndbm.h
11313 do
11314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11316 echo "configure:11317: checking for $ac_hdr" >&5
11317 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 #include <$ac_hdr>
11324 EOF
11325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11326 { (eval echo configure:11327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11328 if test -z "$ac_err"; then
11329   rm -rf conftest*
11330   eval "ac_cv_header_$ac_safe=yes"
11331 else
11332   echo "$ac_err" >&5
11333   echo "configure: failed program was:" >&5
11334   cat conftest.$ac_ext >&5
11335   rm -rf conftest*
11336   eval "ac_cv_header_$ac_safe=no"
11337 fi
11338 rm -f conftest*
11339 fi
11340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11341   echo "$ac_t""yes" 1>&6
11342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11343   cat >> confdefs.h <<EOF
11344 #define $ac_tr_hdr 1
11345 EOF
11346  
11347 else
11348   echo "$ac_t""no" 1>&6
11349 fi
11350 done
11351
11352  echo $ac_n "checking for db""... $ac_c" 1>&6
11353 echo "configure:11354: checking for db" >&5
11354 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11355   echo $ac_n "(cached) $ac_c" 1>&6
11356 else
11357   
11358         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11359                 ol_cv_ndbm=no
11360         else
11361                 ol_cv_ndbm=yes
11362         fi
11363
11364 fi
11365
11366 echo "$ac_t""$ol_cv_ndbm" 1>&6
11367  if test $ol_cv_ndbm = yes ; then
11368         cat >> confdefs.h <<\EOF
11369 #define HAVE_NDBM 1
11370 EOF
11371
11372  fi
11373
11374
11375         if test $ol_cv_ndbm = yes ; then
11376                 ol_link_ldbm=ndbm
11377                 ol_with_ldbm_api=ndbm
11378
11379                 if test $ol_cv_lib_ndbm != yes ; then
11380                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11381                 fi
11382         fi
11383 fi
11384
11385 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11386         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11387         if test $ol_enable_ldbm = yes ; then
11388                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11389         fi
11390
11391         echo "configure: warning: disabling LDBM" 1>&2
11392         ol_enable_ldbm=no
11393 fi
11394
11395 if test $ol_enable_wrappers != no ; then
11396         for ac_hdr in tcpd.h
11397 do
11398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11400 echo "configure:11401: checking for $ac_hdr" >&5
11401 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11402   echo $ac_n "(cached) $ac_c" 1>&6
11403 else
11404   cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407 #include <$ac_hdr>
11408 EOF
11409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11410 { (eval echo configure:11411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11412 if test -z "$ac_err"; then
11413   rm -rf conftest*
11414   eval "ac_cv_header_$ac_safe=yes"
11415 else
11416   echo "$ac_err" >&5
11417   echo "configure: failed program was:" >&5
11418   cat conftest.$ac_ext >&5
11419   rm -rf conftest*
11420   eval "ac_cv_header_$ac_safe=no"
11421 fi
11422 rm -f conftest*
11423 fi
11424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11425   echo "$ac_t""yes" 1>&6
11426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11427   cat >> confdefs.h <<EOF
11428 #define $ac_tr_hdr 1
11429 EOF
11430  
11431 else
11432   echo "$ac_t""no" 1>&6
11433 fi
11434 done
11435
11436
11437         if test $ac_cv_header_tcpd_h != yes ; then
11438                 have_wrappers=no
11439         else
11440                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11441 echo "configure:11442: checking for main in -lwrap" >&5
11442 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11443 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11444   echo $ac_n "(cached) $ac_c" 1>&6
11445 else
11446   ac_save_LIBS="$LIBS"
11447 LIBS="-lwrap  $LIBS"
11448 cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451
11452 int main() {
11453 main()
11454 ; return 0; }
11455 EOF
11456 if { (eval echo configure:11457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11457   rm -rf conftest*
11458   eval "ac_cv_lib_$ac_lib_var=yes"
11459 else
11460   echo "configure: failed program was:" >&5
11461   cat conftest.$ac_ext >&5
11462   rm -rf conftest*
11463   eval "ac_cv_lib_$ac_lib_var=no"
11464 fi
11465 rm -f conftest*
11466 LIBS="$ac_save_LIBS"
11467
11468 fi
11469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11470   echo "$ac_t""yes" 1>&6
11471   have_wrappers=yes
11472 else
11473   echo "$ac_t""no" 1>&6
11474 have_wrappers=no
11475 fi
11476
11477         fi
11478
11479         if test $have_wrappers = yes ; then
11480                 cat >> confdefs.h <<\EOF
11481 #define HAVE_TCPD 1
11482 EOF
11483
11484                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11485
11486                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11487 echo "configure:11488: checking for main in -lnsl" >&5
11488 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11490   echo $ac_n "(cached) $ac_c" 1>&6
11491 else
11492   ac_save_LIBS="$LIBS"
11493 LIBS="-lnsl  $LIBS"
11494 cat > conftest.$ac_ext <<EOF
11495 #line 11496 "configure"
11496 #include "confdefs.h"
11497
11498 int main() {
11499 main()
11500 ; return 0; }
11501 EOF
11502 if { (eval echo configure:11503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11503   rm -rf conftest*
11504   eval "ac_cv_lib_$ac_lib_var=yes"
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   eval "ac_cv_lib_$ac_lib_var=no"
11510 fi
11511 rm -f conftest*
11512 LIBS="$ac_save_LIBS"
11513
11514 fi
11515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11516   echo "$ac_t""yes" 1>&6
11517     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11518     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11519   cat >> confdefs.h <<EOF
11520 #define $ac_tr_lib 1
11521 EOF
11522
11523   LIBS="-lnsl $LIBS"
11524
11525 else
11526   echo "$ac_t""no" 1>&6
11527 fi
11528
11529         else
11530                 echo "configure: warning: could not find -lwrap" 1>&2
11531                 if test $ol_enable_wrappers = yes ; then
11532                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11533                 fi
11534
11535                 echo "configure: warning: disabling wrappers support" 1>&2
11536                 ol_enable_wrappers=no
11537         fi
11538 fi
11539
11540 if test $ol_enable_syslog != no ; then
11541         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11542 echo "configure:11543: checking for openlog" >&5
11543 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   cat > conftest.$ac_ext <<EOF
11547 #line 11548 "configure"
11548 #include "confdefs.h"
11549 /* System header to define __stub macros and hopefully few prototypes,
11550     which can conflict with char openlog(); below.  */
11551 #include <assert.h>
11552 /* Override any gcc2 internal prototype to avoid an error.  */
11553 /* We use char because int might match the return type of a gcc2
11554     builtin and then its argument prototype would still apply.  */
11555 char openlog();
11556 char (*f)();
11557
11558 int main() {
11559
11560 /* The GNU C library defines this for functions which it implements
11561     to always fail with ENOSYS.  Some functions are actually named
11562     something starting with __ and the normal name is an alias.  */
11563 #if defined (__stub_openlog) || defined (__stub___openlog)
11564 choke me
11565 #else
11566 f = openlog;
11567 #endif
11568
11569 ; return 0; }
11570 EOF
11571 if { (eval echo configure:11572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11572   rm -rf conftest*
11573   eval "ac_cv_func_openlog=yes"
11574 else
11575   echo "configure: failed program was:" >&5
11576   cat conftest.$ac_ext >&5
11577   rm -rf conftest*
11578   eval "ac_cv_func_openlog=no"
11579 fi
11580 rm -f conftest*
11581 fi
11582
11583 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585   :
11586 else
11587   echo "$ac_t""no" 1>&6
11588 fi
11589
11590         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11591                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11592         fi
11593         ol_enable_syslog=$ac_cv_func_openlog
11594 fi
11595
11596 if test $ol_enable_dmalloc != no ; then
11597         for ac_hdr in dmalloc.h
11598 do
11599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11601 echo "configure:11602: checking for $ac_hdr" >&5
11602 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 #include <$ac_hdr>
11609 EOF
11610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11611 { (eval echo configure:11612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11613 if test -z "$ac_err"; then
11614   rm -rf conftest*
11615   eval "ac_cv_header_$ac_safe=yes"
11616 else
11617   echo "$ac_err" >&5
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620   rm -rf conftest*
11621   eval "ac_cv_header_$ac_safe=no"
11622 fi
11623 rm -f conftest*
11624 fi
11625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11626   echo "$ac_t""yes" 1>&6
11627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11628   cat >> confdefs.h <<EOF
11629 #define $ac_tr_hdr 1
11630 EOF
11631  
11632 else
11633   echo "$ac_t""no" 1>&6
11634 fi
11635 done
11636
11637         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11638 echo "configure:11639: checking for dmalloc_shutdown in -ldmalloc" >&5
11639 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11641   echo $ac_n "(cached) $ac_c" 1>&6
11642 else
11643   ac_save_LIBS="$LIBS"
11644 LIBS="-ldmalloc  $LIBS"
11645 cat > conftest.$ac_ext <<EOF
11646 #line 11647 "configure"
11647 #include "confdefs.h"
11648 /* Override any gcc2 internal prototype to avoid an error.  */
11649 /* We use char because int might match the return type of a gcc2
11650     builtin and then its argument prototype would still apply.  */
11651 char dmalloc_shutdown();
11652
11653 int main() {
11654 dmalloc_shutdown()
11655 ; return 0; }
11656 EOF
11657 if { (eval echo configure:11658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11658   rm -rf conftest*
11659   eval "ac_cv_lib_$ac_lib_var=yes"
11660 else
11661   echo "configure: failed program was:" >&5
11662   cat conftest.$ac_ext >&5
11663   rm -rf conftest*
11664   eval "ac_cv_lib_$ac_lib_var=no"
11665 fi
11666 rm -f conftest*
11667 LIBS="$ac_save_LIBS"
11668
11669 fi
11670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11671   echo "$ac_t""yes" 1>&6
11672     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11673     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11674   cat >> confdefs.h <<EOF
11675 #define $ac_tr_lib 1
11676 EOF
11677
11678   LIBS="-ldmalloc $LIBS"
11679
11680 else
11681   echo "$ac_t""no" 1>&6
11682 fi
11683
11684 fi
11685
11686 if test $ol_enable_tcl != no ; then
11687         for ac_hdr in tcl.h
11688 do
11689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11691 echo "configure:11692: checking for $ac_hdr" >&5
11692 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698 #include <$ac_hdr>
11699 EOF
11700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11701 { (eval echo configure:11702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11703 if test -z "$ac_err"; then
11704   rm -rf conftest*
11705   eval "ac_cv_header_$ac_safe=yes"
11706 else
11707   echo "$ac_err" >&5
11708   echo "configure: failed program was:" >&5
11709   cat conftest.$ac_ext >&5
11710   rm -rf conftest*
11711   eval "ac_cv_header_$ac_safe=no"
11712 fi
11713 rm -f conftest*
11714 fi
11715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11716   echo "$ac_t""yes" 1>&6
11717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11718   cat >> confdefs.h <<EOF
11719 #define $ac_tr_hdr 1
11720 EOF
11721  
11722 else
11723   echo "$ac_t""no" 1>&6
11724 fi
11725 done
11726
11727
11728         if test $ac_cv_header_tcl_h != yes ; then
11729                 have_tcl=no
11730         else
11731                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11732 echo "configure:11733: checking for main in -ltcl" >&5
11733 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11734 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11735   echo $ac_n "(cached) $ac_c" 1>&6
11736 else
11737   ac_save_LIBS="$LIBS"
11738 LIBS="-ltcl  $LIBS"
11739 cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742
11743 int main() {
11744 main()
11745 ; return 0; }
11746 EOF
11747 if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11748   rm -rf conftest*
11749   eval "ac_cv_lib_$ac_lib_var=yes"
11750 else
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   eval "ac_cv_lib_$ac_lib_var=no"
11755 fi
11756 rm -f conftest*
11757 LIBS="$ac_save_LIBS"
11758
11759 fi
11760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11761   echo "$ac_t""yes" 1>&6
11762   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11763 else
11764   echo "$ac_t""no" 1>&6
11765 have_tcl=no
11766 fi
11767
11768
11769                 if test $have_tcl != yes; then
11770                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11771 echo "configure:11772: checking for main in -ltcl7.6" >&5
11772 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   ac_save_LIBS="$LIBS"
11777 LIBS="-ltcl7.6  $LIBS"
11778 cat > conftest.$ac_ext <<EOF
11779 #line 11780 "configure"
11780 #include "confdefs.h"
11781
11782 int main() {
11783 main()
11784 ; return 0; }
11785 EOF
11786 if { (eval echo configure:11787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11787   rm -rf conftest*
11788   eval "ac_cv_lib_$ac_lib_var=yes"
11789 else
11790   echo "configure: failed program was:" >&5
11791   cat conftest.$ac_ext >&5
11792   rm -rf conftest*
11793   eval "ac_cv_lib_$ac_lib_var=no"
11794 fi
11795 rm -f conftest*
11796 LIBS="$ac_save_LIBS"
11797
11798 fi
11799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11800   echo "$ac_t""yes" 1>&6
11801   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11802 else
11803   echo "$ac_t""no" 1>&6
11804 have_tcl=no
11805 fi
11806
11807                 fi
11808
11809                 if test $have_tcl != yes; then
11810                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11811 echo "configure:11812: checking for main in -ltcl8.0" >&5
11812 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11813 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11814   echo $ac_n "(cached) $ac_c" 1>&6
11815 else
11816   ac_save_LIBS="$LIBS"
11817 LIBS="-ltcl8.0  $LIBS"
11818 cat > conftest.$ac_ext <<EOF
11819 #line 11820 "configure"
11820 #include "confdefs.h"
11821
11822 int main() {
11823 main()
11824 ; return 0; }
11825 EOF
11826 if { (eval echo configure:11827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11827   rm -rf conftest*
11828   eval "ac_cv_lib_$ac_lib_var=yes"
11829 else
11830   echo "configure: failed program was:" >&5
11831   cat conftest.$ac_ext >&5
11832   rm -rf conftest*
11833   eval "ac_cv_lib_$ac_lib_var=no"
11834 fi
11835 rm -f conftest*
11836 LIBS="$ac_save_LIBS"
11837
11838 fi
11839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11840   echo "$ac_t""yes" 1>&6
11841   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11842 else
11843   echo "$ac_t""no" 1>&6
11844 have_tcl=no
11845 fi
11846
11847                 fi
11848         fi
11849
11850         if test $have_tcl != yes ; then
11851                 echo "configure: warning: could not find -ltcl" 1>&2
11852                 if test $ol_enable_tcl = yes ; then
11853                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11854                 fi
11855
11856                 ol_enable_tcl=no
11857         fi
11858 fi
11859
11860 # ud needs termcap (should insert check here)
11861 ol_link_termcap=no
11862 for ac_hdr in termcap.h ncurses.h
11863 do
11864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11866 echo "configure:11867: checking for $ac_hdr" >&5
11867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11868   echo $ac_n "(cached) $ac_c" 1>&6
11869 else
11870   cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 #include <$ac_hdr>
11874 EOF
11875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11876 { (eval echo configure:11877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11878 if test -z "$ac_err"; then
11879   rm -rf conftest*
11880   eval "ac_cv_header_$ac_safe=yes"
11881 else
11882   echo "$ac_err" >&5
11883   echo "configure: failed program was:" >&5
11884   cat conftest.$ac_ext >&5
11885   rm -rf conftest*
11886   eval "ac_cv_header_$ac_safe=no"
11887 fi
11888 rm -f conftest*
11889 fi
11890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11891   echo "$ac_t""yes" 1>&6
11892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11893   cat >> confdefs.h <<EOF
11894 #define $ac_tr_hdr 1
11895 EOF
11896  
11897 else
11898   echo "$ac_t""no" 1>&6
11899 fi
11900 done
11901
11902
11903 if test $ol_link_termcap = no ; then
11904         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
11905 echo "configure:11906: checking for tputs in -ltermcap" >&5
11906 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
11907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11908   echo $ac_n "(cached) $ac_c" 1>&6
11909 else
11910   ac_save_LIBS="$LIBS"
11911 LIBS="-ltermcap  $LIBS"
11912 cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 /* Override any gcc2 internal prototype to avoid an error.  */
11916 /* We use char because int might match the return type of a gcc2
11917     builtin and then its argument prototype would still apply.  */
11918 char tputs();
11919
11920 int main() {
11921 tputs()
11922 ; return 0; }
11923 EOF
11924 if { (eval echo configure:11925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11925   rm -rf conftest*
11926   eval "ac_cv_lib_$ac_lib_var=yes"
11927 else
11928   echo "configure: failed program was:" >&5
11929   cat conftest.$ac_ext >&5
11930   rm -rf conftest*
11931   eval "ac_cv_lib_$ac_lib_var=no"
11932 fi
11933 rm -f conftest*
11934 LIBS="$ac_save_LIBS"
11935
11936 fi
11937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11938   echo "$ac_t""yes" 1>&6
11939   have_termcap=yes
11940 else
11941   echo "$ac_t""no" 1>&6
11942 have_termcap=no
11943 fi
11944
11945         if test $have_termcap = yes ; then
11946                 cat >> confdefs.h <<\EOF
11947 #define HAVE_TERMCAP 1
11948 EOF
11949
11950                 ol_link_termcap=yes
11951                 TERMCAP_LIBS=-ltermcap
11952         fi
11953 fi
11954
11955 if test $ol_link_termcap = no ; then
11956         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
11957 echo "configure:11958: checking for initscr in -lncurses" >&5
11958 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
11959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11960   echo $ac_n "(cached) $ac_c" 1>&6
11961 else
11962   ac_save_LIBS="$LIBS"
11963 LIBS="-lncurses  $LIBS"
11964 cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 /* Override any gcc2 internal prototype to avoid an error.  */
11968 /* We use char because int might match the return type of a gcc2
11969     builtin and then its argument prototype would still apply.  */
11970 char initscr();
11971
11972 int main() {
11973 initscr()
11974 ; return 0; }
11975 EOF
11976 if { (eval echo configure:11977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11977   rm -rf conftest*
11978   eval "ac_cv_lib_$ac_lib_var=yes"
11979 else
11980   echo "configure: failed program was:" >&5
11981   cat conftest.$ac_ext >&5
11982   rm -rf conftest*
11983   eval "ac_cv_lib_$ac_lib_var=no"
11984 fi
11985 rm -f conftest*
11986 LIBS="$ac_save_LIBS"
11987
11988 fi
11989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11990   echo "$ac_t""yes" 1>&6
11991   have_ncurses=yes
11992 else
11993   echo "$ac_t""no" 1>&6
11994 have_ncurses=no
11995 fi
11996
11997         if test $have_ncurses = yes ; then
11998                 cat >> confdefs.h <<\EOF
11999 #define HAVE_NCURSES 1
12000 EOF
12001
12002                 ol_link_termcap=yes
12003                 TERMCAP_LIBS=-lncurses
12004         fi
12005 fi
12006
12007 if test $ol_link_termcap = no ; then
12008         cat >> confdefs.h <<\EOF
12009 #define NO_TERMCAP 1
12010 EOF
12011
12012         TERMCAP_LIBS=
12013 fi
12014
12015 ol_link_sasl=no
12016 if test $ol_with_cyrus_sasl != no ; then
12017         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12018 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12019 echo "configure:12020: checking for sasl.h" >&5
12020 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12021   echo $ac_n "(cached) $ac_c" 1>&6
12022 else
12023   cat > conftest.$ac_ext <<EOF
12024 #line 12025 "configure"
12025 #include "confdefs.h"
12026 #include <sasl.h>
12027 EOF
12028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12029 { (eval echo configure:12030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12031 if test -z "$ac_err"; then
12032   rm -rf conftest*
12033   eval "ac_cv_header_$ac_safe=yes"
12034 else
12035   echo "$ac_err" >&5
12036   echo "configure: failed program was:" >&5
12037   cat conftest.$ac_ext >&5
12038   rm -rf conftest*
12039   eval "ac_cv_header_$ac_safe=no"
12040 fi
12041 rm -f conftest*
12042 fi
12043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12044   echo "$ac_t""yes" 1>&6
12045   :
12046 else
12047   echo "$ac_t""no" 1>&6
12048 fi
12049
12050
12051         if test $ac_cv_header_sasl_h = yes ; then
12052                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12053 echo "configure:12054: checking for sasl_client_init in -lsasl" >&5
12054 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12055 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12056   echo $ac_n "(cached) $ac_c" 1>&6
12057 else
12058   ac_save_LIBS="$LIBS"
12059 LIBS="-lsasl  $LIBS"
12060 cat > conftest.$ac_ext <<EOF
12061 #line 12062 "configure"
12062 #include "confdefs.h"
12063 /* Override any gcc2 internal prototype to avoid an error.  */
12064 /* We use char because int might match the return type of a gcc2
12065     builtin and then its argument prototype would still apply.  */
12066 char sasl_client_init();
12067
12068 int main() {
12069 sasl_client_init()
12070 ; return 0; }
12071 EOF
12072 if { (eval echo configure:12073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12073   rm -rf conftest*
12074   eval "ac_cv_lib_$ac_lib_var=yes"
12075 else
12076   echo "configure: failed program was:" >&5
12077   cat conftest.$ac_ext >&5
12078   rm -rf conftest*
12079   eval "ac_cv_lib_$ac_lib_var=no"
12080 fi
12081 rm -f conftest*
12082 LIBS="$ac_save_LIBS"
12083
12084 fi
12085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12086   echo "$ac_t""yes" 1>&6
12087   have_cyrus_sasl=yes
12088 else
12089   echo "$ac_t""no" 1>&6
12090 have_cyrus_sasl=no
12091 fi
12092
12093
12094                 if test $have_cyrus_sasl != no ; then
12095                         SASL_LIBS="-lsasl"
12096                         cat >> confdefs.h <<\EOF
12097 #define HAVE_CYRUS_SASL 1
12098 EOF
12099
12100                         ol_link_sasl=yes
12101                 fi
12102         fi
12103
12104         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12105                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12106         fi
12107 fi
12108
12109 ol_link_fetch=no
12110 if test $ol_with_fetch != no ; then
12111         ol=$LIBS
12112 LIBS="-lfetch -lcom_err $LIBS"
12113 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12114 echo "configure:12115: checking fetch(3) library" >&5
12115 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12116   echo $ac_n "(cached) $ac_c" 1>&6
12117 else
12118   
12119         cat > conftest.$ac_ext <<EOF
12120 #line 12121 "configure"
12121 #include "confdefs.h"
12122
12123 #include <sys/param.h>
12124 #include <stdio.h>
12125 #include <fetch.h>
12126 int main() {
12127 struct url *u = fetchParseURL("file:///"); 
12128 ; return 0; }
12129 EOF
12130 if { (eval echo configure:12131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12131   rm -rf conftest*
12132   ol_cv_lib_fetch=yes
12133 else
12134   echo "configure: failed program was:" >&5
12135   cat conftest.$ac_ext >&5
12136   rm -rf conftest*
12137   ol_cv_lib_fetch=no
12138 fi
12139 rm -f conftest*
12140 fi
12141
12142 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12143 LIBS=$ol_LIBS
12144 if test $ol_cv_lib_fetch != no ; then
12145         ol_link_fetch="-lfetch -lcom_err"
12146         cat >> confdefs.h <<\EOF
12147 #define HAVE_FETCH 1
12148 EOF
12149
12150 fi
12151
12152
12153         if test $ol_cv_lib_fetch != no ; then
12154                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12155                 ol_link_fetch=freebsd
12156
12157         elif test $ol_with_fetch != auto ; then
12158                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12159         fi 
12160 fi
12161
12162 ol_link_readline=no
12163 if test $ol_with_readline != no ; then
12164         for ac_hdr in readline/readline.h readline/history.h
12165 do
12166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12168 echo "configure:12169: checking for $ac_hdr" >&5
12169 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12170   echo $ac_n "(cached) $ac_c" 1>&6
12171 else
12172   cat > conftest.$ac_ext <<EOF
12173 #line 12174 "configure"
12174 #include "confdefs.h"
12175 #include <$ac_hdr>
12176 EOF
12177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12178 { (eval echo configure:12179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12180 if test -z "$ac_err"; then
12181   rm -rf conftest*
12182   eval "ac_cv_header_$ac_safe=yes"
12183 else
12184   echo "$ac_err" >&5
12185   echo "configure: failed program was:" >&5
12186   cat conftest.$ac_ext >&5
12187   rm -rf conftest*
12188   eval "ac_cv_header_$ac_safe=no"
12189 fi
12190 rm -f conftest*
12191 fi
12192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12193   echo "$ac_t""yes" 1>&6
12194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12195   cat >> confdefs.h <<EOF
12196 #define $ac_tr_hdr 1
12197 EOF
12198  
12199 else
12200   echo "$ac_t""no" 1>&6
12201 fi
12202 done
12203
12204
12205         if test $ac_cv_header_readline_readline_h = yes ; then
12206                 save_LIBS="$LIBS"
12207                 LIBS="$TERMCAP_LIBS $LIBS"
12208                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12209 echo "configure:12210: checking for readline in -lreadline" >&5
12210 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12212   echo $ac_n "(cached) $ac_c" 1>&6
12213 else
12214   ac_save_LIBS="$LIBS"
12215 LIBS="-lreadline  $LIBS"
12216 cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219 /* Override any gcc2 internal prototype to avoid an error.  */
12220 /* We use char because int might match the return type of a gcc2
12221     builtin and then its argument prototype would still apply.  */
12222 char readline();
12223
12224 int main() {
12225 readline()
12226 ; return 0; }
12227 EOF
12228 if { (eval echo configure:12229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12229   rm -rf conftest*
12230   eval "ac_cv_lib_$ac_lib_var=yes"
12231 else
12232   echo "configure: failed program was:" >&5
12233   cat conftest.$ac_ext >&5
12234   rm -rf conftest*
12235   eval "ac_cv_lib_$ac_lib_var=no"
12236 fi
12237 rm -f conftest*
12238 LIBS="$ac_save_LIBS"
12239
12240 fi
12241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12242   echo "$ac_t""yes" 1>&6
12243   have_readline=yes
12244 else
12245   echo "$ac_t""no" 1>&6
12246 have_readline=no
12247 fi
12248
12249                 LIBS="$save_LIBS"
12250                         
12251                 if test $have_readline = yes ; then
12252                         ol_with_readline=found
12253                         ol_link_readline=yes
12254
12255                         READLINE_LIBS="-lreadline"
12256                 fi
12257         fi
12258 fi
12259
12260 if test $ol_link_readline = yes ; then
12261         cat >> confdefs.h <<\EOF
12262 #define HAVE_READLINE 1
12263 EOF
12264
12265 fi
12266
12267
12268 # FreeBSD (and others) have crypt(3) in -lcrypt
12269 if test $ol_enable_crypt != no ; then
12270         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12271 echo "configure:12272: checking for crypt" >&5
12272 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12273   echo $ac_n "(cached) $ac_c" 1>&6
12274 else
12275   cat > conftest.$ac_ext <<EOF
12276 #line 12277 "configure"
12277 #include "confdefs.h"
12278 /* System header to define __stub macros and hopefully few prototypes,
12279     which can conflict with char crypt(); below.  */
12280 #include <assert.h>
12281 /* Override any gcc2 internal prototype to avoid an error.  */
12282 /* We use char because int might match the return type of a gcc2
12283     builtin and then its argument prototype would still apply.  */
12284 char crypt();
12285 char (*f)();
12286
12287 int main() {
12288
12289 /* The GNU C library defines this for functions which it implements
12290     to always fail with ENOSYS.  Some functions are actually named
12291     something starting with __ and the normal name is an alias.  */
12292 #if defined (__stub_crypt) || defined (__stub___crypt)
12293 choke me
12294 #else
12295 f = crypt;
12296 #endif
12297
12298 ; return 0; }
12299 EOF
12300 if { (eval echo configure:12301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12301   rm -rf conftest*
12302   eval "ac_cv_func_crypt=yes"
12303 else
12304   echo "configure: failed program was:" >&5
12305   cat conftest.$ac_ext >&5
12306   rm -rf conftest*
12307   eval "ac_cv_func_crypt=no"
12308 fi
12309 rm -f conftest*
12310 fi
12311
12312 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12313   echo "$ac_t""yes" 1>&6
12314   have_crypt=yes
12315 else
12316   echo "$ac_t""no" 1>&6
12317
12318                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12319 echo "configure:12320: checking for crypt in -lcrypt" >&5
12320 ac_lib_var=`echo crypt'_'crypt | 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="-lcrypt  $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 crypt();
12333
12334 int main() {
12335 crypt()
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   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12354                         have_crypt=yes
12355 else
12356   echo "$ac_t""no" 1>&6
12357 have_crypt=no
12358 fi
12359
12360 fi
12361
12362
12363         if test $have_crypt = yes ; then
12364                 cat >> confdefs.h <<\EOF
12365 #define HAVE_CRYPT 1
12366 EOF
12367
12368         else
12369                 echo "configure: warning: could not find crypt" 1>&2
12370                 if test $ol_enable_crypt = yes ; then
12371                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12372                 fi
12373
12374                 echo "configure: warning: disabling crypt support" 1>&2
12375                 ol_enable_crypt=no
12376         fi
12377 fi
12378
12379 # FreeBSD (and others) have setproctitle(3) in -lutil
12380 if test $ol_enable_proctitle != no ; then
12381         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12382 echo "configure:12383: checking for setproctitle" >&5
12383 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12384   echo $ac_n "(cached) $ac_c" 1>&6
12385 else
12386   cat > conftest.$ac_ext <<EOF
12387 #line 12388 "configure"
12388 #include "confdefs.h"
12389 /* System header to define __stub macros and hopefully few prototypes,
12390     which can conflict with char setproctitle(); below.  */
12391 #include <assert.h>
12392 /* Override any gcc2 internal prototype to avoid an error.  */
12393 /* We use char because int might match the return type of a gcc2
12394     builtin and then its argument prototype would still apply.  */
12395 char setproctitle();
12396 char (*f)();
12397
12398 int main() {
12399
12400 /* The GNU C library defines this for functions which it implements
12401     to always fail with ENOSYS.  Some functions are actually named
12402     something starting with __ and the normal name is an alias.  */
12403 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12404 choke me
12405 #else
12406 f = setproctitle;
12407 #endif
12408
12409 ; return 0; }
12410 EOF
12411 if { (eval echo configure:12412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12412   rm -rf conftest*
12413   eval "ac_cv_func_setproctitle=yes"
12414 else
12415   echo "configure: failed program was:" >&5
12416   cat conftest.$ac_ext >&5
12417   rm -rf conftest*
12418   eval "ac_cv_func_setproctitle=no"
12419 fi
12420 rm -f conftest*
12421 fi
12422
12423 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12424   echo "$ac_t""yes" 1>&6
12425   have_setproctitle=yes
12426 else
12427   echo "$ac_t""no" 1>&6
12428
12429                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12430 echo "configure:12431: checking for setproctitle in -lutil" >&5
12431 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12432 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12433   echo $ac_n "(cached) $ac_c" 1>&6
12434 else
12435   ac_save_LIBS="$LIBS"
12436 LIBS="-lutil  $LIBS"
12437 cat > conftest.$ac_ext <<EOF
12438 #line 12439 "configure"
12439 #include "confdefs.h"
12440 /* Override any gcc2 internal prototype to avoid an error.  */
12441 /* We use char because int might match the return type of a gcc2
12442     builtin and then its argument prototype would still apply.  */
12443 char setproctitle();
12444
12445 int main() {
12446 setproctitle()
12447 ; return 0; }
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12450   rm -rf conftest*
12451   eval "ac_cv_lib_$ac_lib_var=yes"
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -rf conftest*
12456   eval "ac_cv_lib_$ac_lib_var=no"
12457 fi
12458 rm -f conftest*
12459 LIBS="$ac_save_LIBS"
12460
12461 fi
12462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12463   echo "$ac_t""yes" 1>&6
12464   have_setproctitle=yes
12465                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12466 else
12467   echo "$ac_t""no" 1>&6
12468 have_setproctitle=no
12469                         LIBOBJS="$LIBOBJS setproctitle.o"
12470 fi
12471
12472 fi
12473
12474
12475         if test $have_setproctitle = yes ; then
12476                 cat >> confdefs.h <<\EOF
12477 #define HAVE_SETPROCTITLE 1
12478 EOF
12479
12480         fi
12481 fi
12482
12483 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12484 echo "configure:12485: checking for uid_t in sys/types.h" >&5
12485 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12486   echo $ac_n "(cached) $ac_c" 1>&6
12487 else
12488   cat > conftest.$ac_ext <<EOF
12489 #line 12490 "configure"
12490 #include "confdefs.h"
12491 #include <sys/types.h>
12492 EOF
12493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12494   egrep "uid_t" >/dev/null 2>&1; then
12495   rm -rf conftest*
12496   ac_cv_type_uid_t=yes
12497 else
12498   rm -rf conftest*
12499   ac_cv_type_uid_t=no
12500 fi
12501 rm -f conftest*
12502
12503 fi
12504
12505 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12506 if test $ac_cv_type_uid_t = no; then
12507   cat >> confdefs.h <<\EOF
12508 #define uid_t int
12509 EOF
12510
12511   cat >> confdefs.h <<\EOF
12512 #define gid_t int
12513 EOF
12514
12515 fi
12516
12517 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12518 echo "configure:12519: checking type of array argument to getgroups" >&5
12519 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12520   echo $ac_n "(cached) $ac_c" 1>&6
12521 else
12522   if test "$cross_compiling" = yes; then
12523   ac_cv_type_getgroups=cross
12524 else
12525   cat > conftest.$ac_ext <<EOF
12526 #line 12527 "configure"
12527 #include "confdefs.h"
12528
12529 /* Thanks to Mike Rendell for this test.  */
12530 #include <sys/types.h>
12531 #define NGID 256
12532 #undef MAX
12533 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12534 main()
12535 {
12536   gid_t gidset[NGID];
12537   int i, n;
12538   union { gid_t gval; long lval; }  val;
12539
12540   val.lval = -1;
12541   for (i = 0; i < NGID; i++)
12542     gidset[i] = val.gval;
12543   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12544                  gidset);
12545   /* Exit non-zero if getgroups seems to require an array of ints.  This
12546      happens when gid_t is short but getgroups modifies an array of ints.  */
12547   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12548 }
12549
12550 EOF
12551 if { (eval echo configure:12552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12552 then
12553     ac_cv_type_getgroups=gid_t
12554 else
12555   echo "configure: failed program was:" >&5
12556   cat conftest.$ac_ext >&5
12557   rm -fr conftest*
12558   ac_cv_type_getgroups=int
12559 fi
12560 rm -fr conftest*
12561 fi
12562
12563 if test $ac_cv_type_getgroups = cross; then
12564         cat > conftest.$ac_ext <<EOF
12565 #line 12566 "configure"
12566 #include "confdefs.h"
12567 #include <unistd.h>
12568 EOF
12569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12570   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12571   rm -rf conftest*
12572   ac_cv_type_getgroups=gid_t
12573 else
12574   rm -rf conftest*
12575   ac_cv_type_getgroups=int
12576 fi
12577 rm -f conftest*
12578
12579 fi
12580 fi
12581
12582 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12583 cat >> confdefs.h <<EOF
12584 #define GETGROUPS_T $ac_cv_type_getgroups
12585 EOF
12586
12587  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12588 echo "configure:12589: checking for ANSI C header files" >&5
12589 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   cat > conftest.$ac_ext <<EOF
12593 #line 12594 "configure"
12594 #include "confdefs.h"
12595 #include <stdlib.h>
12596 #include <stdarg.h>
12597 #include <string.h>
12598 #include <float.h>
12599 EOF
12600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12601 { (eval echo configure:12602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12603 if test -z "$ac_err"; then
12604   rm -rf conftest*
12605   ac_cv_header_stdc=yes
12606 else
12607   echo "$ac_err" >&5
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   ac_cv_header_stdc=no
12612 fi
12613 rm -f conftest*
12614
12615 if test $ac_cv_header_stdc = yes; then
12616   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12617 cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 #include <string.h>
12621 EOF
12622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12623   egrep "memchr" >/dev/null 2>&1; then
12624   :
12625 else
12626   rm -rf conftest*
12627   ac_cv_header_stdc=no
12628 fi
12629 rm -f conftest*
12630
12631 fi
12632
12633 if test $ac_cv_header_stdc = yes; then
12634   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12635 cat > conftest.$ac_ext <<EOF
12636 #line 12637 "configure"
12637 #include "confdefs.h"
12638 #include <stdlib.h>
12639 EOF
12640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12641   egrep "free" >/dev/null 2>&1; then
12642   :
12643 else
12644   rm -rf conftest*
12645   ac_cv_header_stdc=no
12646 fi
12647 rm -f conftest*
12648
12649 fi
12650
12651 if test $ac_cv_header_stdc = yes; then
12652   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12653 if test "$cross_compiling" = yes; then
12654   :
12655 else
12656   cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 #include <ctype.h>
12660 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12661 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12662 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12663 int main () { int i; for (i = 0; i < 256; i++)
12664 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12665 exit (0); }
12666
12667 EOF
12668 if { (eval echo configure:12669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12669 then
12670   :
12671 else
12672   echo "configure: failed program was:" >&5
12673   cat conftest.$ac_ext >&5
12674   rm -fr conftest*
12675   ac_cv_header_stdc=no
12676 fi
12677 rm -fr conftest*
12678 fi
12679
12680 fi
12681 fi
12682
12683 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12684 if test $ac_cv_header_stdc = yes; then
12685   cat >> confdefs.h <<\EOF
12686 #define STDC_HEADERS 1
12687 EOF
12688
12689 fi
12690
12691 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12692 echo "configure:12693: checking for mode_t" >&5
12693 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12694   echo $ac_n "(cached) $ac_c" 1>&6
12695 else
12696   cat > conftest.$ac_ext <<EOF
12697 #line 12698 "configure"
12698 #include "confdefs.h"
12699 #include <sys/types.h>
12700 #if STDC_HEADERS
12701 #include <stdlib.h>
12702 #include <stddef.h>
12703 #endif
12704 EOF
12705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12706   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12707   rm -rf conftest*
12708   eval "ac_cv_type_mode_t=yes"
12709 else
12710   rm -rf conftest*
12711   eval "ac_cv_type_mode_t=no"
12712 fi
12713 rm -f conftest*
12714
12715 fi
12716 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12717   echo "$ac_t""yes" 1>&6
12718 else
12719   echo "$ac_t""no" 1>&6
12720   cat >> confdefs.h <<EOF
12721 #define mode_t int
12722 EOF
12723
12724 fi
12725
12726 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12727 echo "configure:12728: checking for off_t" >&5
12728 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12729   echo $ac_n "(cached) $ac_c" 1>&6
12730 else
12731   cat > conftest.$ac_ext <<EOF
12732 #line 12733 "configure"
12733 #include "confdefs.h"
12734 #include <sys/types.h>
12735 #if STDC_HEADERS
12736 #include <stdlib.h>
12737 #include <stddef.h>
12738 #endif
12739 EOF
12740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12741   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12742   rm -rf conftest*
12743   eval "ac_cv_type_off_t=yes"
12744 else
12745   rm -rf conftest*
12746   eval "ac_cv_type_off_t=no"
12747 fi
12748 rm -f conftest*
12749
12750 fi
12751 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12752   echo "$ac_t""yes" 1>&6
12753 else
12754   echo "$ac_t""no" 1>&6
12755   cat >> confdefs.h <<EOF
12756 #define off_t long
12757 EOF
12758
12759 fi
12760
12761 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12762 echo "configure:12763: checking for pid_t" >&5
12763 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12764   echo $ac_n "(cached) $ac_c" 1>&6
12765 else
12766   cat > conftest.$ac_ext <<EOF
12767 #line 12768 "configure"
12768 #include "confdefs.h"
12769 #include <sys/types.h>
12770 #if STDC_HEADERS
12771 #include <stdlib.h>
12772 #include <stddef.h>
12773 #endif
12774 EOF
12775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12776   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12777   rm -rf conftest*
12778   eval "ac_cv_type_pid_t=yes"
12779 else
12780   rm -rf conftest*
12781   eval "ac_cv_type_pid_t=no"
12782 fi
12783 rm -f conftest*
12784
12785 fi
12786 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12787   echo "$ac_t""yes" 1>&6
12788 else
12789   echo "$ac_t""no" 1>&6
12790   cat >> confdefs.h <<EOF
12791 #define pid_t int
12792 EOF
12793
12794 fi
12795
12796 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12797 echo "configure:12798: checking for ptrdiff_t" >&5
12798 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12799   echo $ac_n "(cached) $ac_c" 1>&6
12800 else
12801   cat > conftest.$ac_ext <<EOF
12802 #line 12803 "configure"
12803 #include "confdefs.h"
12804 #include <stddef.h>
12805 int main() {
12806 ptrdiff_t p
12807 ; return 0; }
12808 EOF
12809 if { (eval echo configure:12810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12810   rm -rf conftest*
12811   am_cv_type_ptrdiff_t=yes
12812 else
12813   echo "configure: failed program was:" >&5
12814   cat conftest.$ac_ext >&5
12815   rm -rf conftest*
12816   am_cv_type_ptrdiff_t=no
12817 fi
12818 rm -f conftest*
12819 fi
12820
12821 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12822    if test $am_cv_type_ptrdiff_t = yes; then
12823      cat >> confdefs.h <<\EOF
12824 #define HAVE_PTRDIFF_T 1
12825 EOF
12826
12827    fi
12828
12829 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12830 echo "configure:12831: checking return type of signal handlers" >&5
12831 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12832   echo $ac_n "(cached) $ac_c" 1>&6
12833 else
12834   cat > conftest.$ac_ext <<EOF
12835 #line 12836 "configure"
12836 #include "confdefs.h"
12837 #include <sys/types.h>
12838 #include <signal.h>
12839 #ifdef signal
12840 #undef signal
12841 #endif
12842 #ifdef __cplusplus
12843 extern "C" void (*signal (int, void (*)(int)))(int);
12844 #else
12845 void (*signal ()) ();
12846 #endif
12847
12848 int main() {
12849 int i;
12850 ; return 0; }
12851 EOF
12852 if { (eval echo configure:12853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12853   rm -rf conftest*
12854   ac_cv_type_signal=void
12855 else
12856   echo "configure: failed program was:" >&5
12857   cat conftest.$ac_ext >&5
12858   rm -rf conftest*
12859   ac_cv_type_signal=int
12860 fi
12861 rm -f conftest*
12862 fi
12863
12864 echo "$ac_t""$ac_cv_type_signal" 1>&6
12865 cat >> confdefs.h <<EOF
12866 #define RETSIGTYPE $ac_cv_type_signal
12867 EOF
12868
12869
12870 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12871 echo "configure:12872: checking for sig_atomic_t" >&5
12872 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12873   echo $ac_n "(cached) $ac_c" 1>&6
12874 else
12875   cat > conftest.$ac_ext <<EOF
12876 #line 12877 "configure"
12877 #include "confdefs.h"
12878 #include <signal.h>
12879 int main() {
12880 sig_atomic_t atomic;
12881 ; return 0; }
12882 EOF
12883 if { (eval echo configure:12884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12884   rm -rf conftest*
12885   ol_cv_type_sig_atomic_t=yes
12886 else
12887   echo "configure: failed program was:" >&5
12888   cat conftest.$ac_ext >&5
12889   rm -rf conftest*
12890   ol_cv_type_sig_atomic_t=no
12891 fi
12892 rm -f conftest*
12893 fi
12894
12895 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12896   if test $ol_cv_type_sig_atomic_t = no; then
12897     cat >> confdefs.h <<\EOF
12898 #define sig_atomic_t int
12899 EOF
12900
12901   fi
12902  
12903 echo $ac_n "checking for size_t""... $ac_c" 1>&6
12904 echo "configure:12905: checking for size_t" >&5
12905 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
12906   echo $ac_n "(cached) $ac_c" 1>&6
12907 else
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 #include <sys/types.h>
12912 #if STDC_HEADERS
12913 #include <stdlib.h>
12914 #include <stddef.h>
12915 #endif
12916 EOF
12917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12918   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12919   rm -rf conftest*
12920   eval "ac_cv_type_size_t=yes"
12921 else
12922   rm -rf conftest*
12923   eval "ac_cv_type_size_t=no"
12924 fi
12925 rm -f conftest*
12926
12927 fi
12928 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
12929   echo "$ac_t""yes" 1>&6
12930 else
12931   echo "$ac_t""no" 1>&6
12932   cat >> confdefs.h <<EOF
12933 #define size_t unsigned
12934 EOF
12935
12936 fi
12937
12938 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
12939 echo "configure:12940: checking for socklen_t" >&5
12940 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
12941   echo $ac_n "(cached) $ac_c" 1>&6
12942 else
12943   cat > conftest.$ac_ext <<EOF
12944 #line 12945 "configure"
12945 #include "confdefs.h"
12946
12947 #ifdef HAVE_SYS_TYPES_H
12948 #include <sys/types.h>
12949 #endif
12950 #ifdef HAVE_SYS_SOCKET_H
12951 #include <sys/socket.h>
12952 #endif
12953
12954 int main() {
12955 socklen_t len;
12956 ; return 0; }
12957 EOF
12958 if { (eval echo configure:12959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12959   rm -rf conftest*
12960   ol_cv_type_socklen_t=yes
12961 else
12962   echo "configure: failed program was:" >&5
12963   cat conftest.$ac_ext >&5
12964   rm -rf conftest*
12965   ol_cv_type_socklen_t=no
12966 fi
12967 rm -f conftest*
12968 fi
12969
12970 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
12971   if test $ol_cv_type_socklen_t = no; then
12972     cat >> confdefs.h <<\EOF
12973 #define socklen_t int
12974 EOF
12975
12976   fi
12977  
12978 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
12979 echo "configure:12980: checking for member st_blksize in aggregate type struct stat" >&5
12980 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
12981   echo $ac_n "(cached) $ac_c" 1>&6
12982 else
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 #include <sys/types.h>
12987 #include <sys/stat.h>
12988 int main() {
12989 struct stat foo; foo.st_blksize;
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12993   rm -rf conftest*
12994   ac_cv_c_struct_member_st_blksize=yes
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   ac_cv_c_struct_member_st_blksize=no
13000 fi
13001 rm -f conftest*
13002 fi
13003
13004 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13005 st_blksize="$ac_cv_c_struct_member_st_blksize"
13006 if test $ac_cv_c_struct_member_st_blksize = yes; then
13007   cat >> confdefs.h <<\EOF
13008 #define HAVE_ST_BLKSIZE 1
13009 EOF
13010
13011 fi
13012
13013 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13014 echo "configure:13015: checking whether time.h and sys/time.h may both be included" >&5
13015 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13016   echo $ac_n "(cached) $ac_c" 1>&6
13017 else
13018   cat > conftest.$ac_ext <<EOF
13019 #line 13020 "configure"
13020 #include "confdefs.h"
13021 #include <sys/types.h>
13022 #include <sys/time.h>
13023 #include <time.h>
13024 int main() {
13025 struct tm *tp;
13026 ; return 0; }
13027 EOF
13028 if { (eval echo configure:13029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13029   rm -rf conftest*
13030   ac_cv_header_time=yes
13031 else
13032   echo "configure: failed program was:" >&5
13033   cat conftest.$ac_ext >&5
13034   rm -rf conftest*
13035   ac_cv_header_time=no
13036 fi
13037 rm -f conftest*
13038 fi
13039
13040 echo "$ac_t""$ac_cv_header_time" 1>&6
13041 if test $ac_cv_header_time = yes; then
13042   cat >> confdefs.h <<\EOF
13043 #define TIME_WITH_SYS_TIME 1
13044 EOF
13045
13046 fi
13047
13048 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13049 echo "configure:13050: checking whether struct tm is in sys/time.h or time.h" >&5
13050 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13051   echo $ac_n "(cached) $ac_c" 1>&6
13052 else
13053   cat > conftest.$ac_ext <<EOF
13054 #line 13055 "configure"
13055 #include "confdefs.h"
13056 #include <sys/types.h>
13057 #include <time.h>
13058 int main() {
13059 struct tm *tp; tp->tm_sec;
13060 ; return 0; }
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13063   rm -rf conftest*
13064   ac_cv_struct_tm=time.h
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   ac_cv_struct_tm=sys/time.h
13070 fi
13071 rm -f conftest*
13072 fi
13073
13074 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13075 if test $ac_cv_struct_tm = sys/time.h; then
13076   cat >> confdefs.h <<\EOF
13077 #define TM_IN_SYS_TIME 1
13078 EOF
13079
13080 fi
13081
13082 # test for pw_gecos in struct passwd
13083 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13084 echo "configure:13085: checking struct passwd for pw_gecos" >&5
13085 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13086   echo $ac_n "(cached) $ac_c" 1>&6
13087 else
13088   
13089         cat > conftest.$ac_ext <<EOF
13090 #line 13091 "configure"
13091 #include "confdefs.h"
13092 #include <pwd.h>
13093 int main() {
13094
13095         struct passwd pwd;
13096         pwd.pw_gecos = pwd.pw_name;
13097
13098 ; return 0; }
13099 EOF
13100 if { (eval echo configure:13101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13101   rm -rf conftest*
13102   ol_cv_struct_passwd_pw_gecos=yes
13103 else
13104   echo "configure: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   rm -rf conftest*
13107   ol_cv_struct_passwd_pw_gecos=no
13108 fi
13109 rm -f conftest*
13110 fi
13111
13112 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13113 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13114         cat >> confdefs.h <<\EOF
13115 #define HAVE_PW_GECOS 1
13116 EOF
13117
13118 fi
13119
13120 # test for pw_passwd in struct passwd
13121 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13122 echo "configure:13123: checking struct passwd for pw_passwd" >&5
13123 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13124   echo $ac_n "(cached) $ac_c" 1>&6
13125 else
13126   
13127         cat > conftest.$ac_ext <<EOF
13128 #line 13129 "configure"
13129 #include "confdefs.h"
13130 #include <pwd.h>
13131 int main() {
13132
13133         struct passwd pwd;
13134         pwd.pw_passwd = pwd.pw_name;
13135
13136 ; return 0; }
13137 EOF
13138 if { (eval echo configure:13139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13139   rm -rf conftest*
13140   ol_cv_struct_passwd_pw_passwd=yes
13141 else
13142   echo "configure: failed program was:" >&5
13143   cat conftest.$ac_ext >&5
13144   rm -rf conftest*
13145   ol_cv_struct_passwd_pw_passwd=no
13146 fi
13147 rm -f conftest*
13148 fi
13149
13150 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13151 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13152         cat >> confdefs.h <<\EOF
13153 #define HAVE_PW_PASSWD 1
13154 EOF
13155
13156 fi
13157
13158
13159 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13160 echo "configure:13161: checking if toupper() requires islower()" >&5
13161 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13162   echo $ac_n "(cached) $ac_c" 1>&6
13163 else
13164   
13165         if test "$cross_compiling" = yes; then
13166   ol_cv_c_upper_lower=safe
13167 else
13168   cat > conftest.$ac_ext <<EOF
13169 #line 13170 "configure"
13170 #include "confdefs.h"
13171
13172 #include <ctype.h>
13173 main()
13174 {
13175         if ('C' == toupper('C'))
13176                 exit(0);
13177         else
13178                 exit(1);
13179 }
13180 EOF
13181 if { (eval echo configure:13182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13182 then
13183   ol_cv_c_upper_lower=no
13184 else
13185   echo "configure: failed program was:" >&5
13186   cat conftest.$ac_ext >&5
13187   rm -fr conftest*
13188   ol_cv_c_upper_lower=yes
13189 fi
13190 rm -fr conftest*
13191 fi
13192
13193 fi
13194
13195 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13196 if test $ol_cv_c_upper_lower != no ; then
13197         cat >> confdefs.h <<\EOF
13198 #define C_UPPER_LOWER 1
13199 EOF
13200
13201 fi
13202
13203 echo $ac_n "checking for working const""... $ac_c" 1>&6
13204 echo "configure:13205: checking for working const" >&5
13205 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13206   echo $ac_n "(cached) $ac_c" 1>&6
13207 else
13208   cat > conftest.$ac_ext <<EOF
13209 #line 13210 "configure"
13210 #include "confdefs.h"
13211
13212 int main() {
13213
13214 /* Ultrix mips cc rejects this.  */
13215 typedef int charset[2]; const charset x;
13216 /* SunOS 4.1.1 cc rejects this.  */
13217 char const *const *ccp;
13218 char **p;
13219 /* NEC SVR4.0.2 mips cc rejects this.  */
13220 struct point {int x, y;};
13221 static struct point const zero = {0,0};
13222 /* AIX XL C 1.02.0.0 rejects this.
13223    It does not let you subtract one const X* pointer from another in an arm
13224    of an if-expression whose if-part is not a constant expression */
13225 const char *g = "string";
13226 ccp = &g + (g ? g-g : 0);
13227 /* HPUX 7.0 cc rejects these. */
13228 ++ccp;
13229 p = (char**) ccp;
13230 ccp = (char const *const *) p;
13231 { /* SCO 3.2v4 cc rejects this.  */
13232   char *t;
13233   char const *s = 0 ? (char *) 0 : (char const *) 0;
13234
13235   *t++ = 0;
13236 }
13237 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13238   int x[] = {25, 17};
13239   const int *foo = &x[0];
13240   ++foo;
13241 }
13242 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13243   typedef const int *iptr;
13244   iptr p = 0;
13245   ++p;
13246 }
13247 { /* AIX XL C 1.02.0.0 rejects this saying
13248      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13249   struct s { int j; const int *ap[3]; };
13250   struct s *b; b->j = 5;
13251 }
13252 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13253   const int foo = 10;
13254 }
13255
13256 ; return 0; }
13257 EOF
13258 if { (eval echo configure:13259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13259   rm -rf conftest*
13260   ac_cv_c_const=yes
13261 else
13262   echo "configure: failed program was:" >&5
13263   cat conftest.$ac_ext >&5
13264   rm -rf conftest*
13265   ac_cv_c_const=no
13266 fi
13267 rm -f conftest*
13268 fi
13269
13270 echo "$ac_t""$ac_cv_c_const" 1>&6
13271 if test $ac_cv_c_const = no; then
13272   cat >> confdefs.h <<\EOF
13273 #define const 
13274 EOF
13275
13276 fi
13277
13278 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13279 echo "configure:13280: checking if compiler understands volatile" >&5
13280 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13281   echo $ac_n "(cached) $ac_c" 1>&6
13282 else
13283   cat > conftest.$ac_ext <<EOF
13284 #line 13285 "configure"
13285 #include "confdefs.h"
13286 int x, y, z;
13287 int main() {
13288 volatile int a; int * volatile b = x ? &y : &z;
13289       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13290       *b = 0;
13291 ; return 0; }
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13294   rm -rf conftest*
13295   ol_cv_c_volatile=yes
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -rf conftest*
13300   ol_cv_c_volatile=no
13301 fi
13302 rm -f conftest*
13303 fi
13304
13305 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13306   if test $ol_cv_c_volatile = yes; then
13307     : 
13308   else
13309     cat >> confdefs.h <<\EOF
13310 #define volatile 
13311 EOF
13312
13313   fi
13314  
13315
13316 if test $cross_compiling = yes ; then
13317         cat >> confdefs.h <<\EOF
13318 #define CROSS_COMPILING 1
13319 EOF
13320
13321
13322         cat >> confdefs.h <<\EOF
13323 #define LBER_INT_T long
13324 EOF
13325
13326         cat >> confdefs.h <<\EOF
13327 #define LBER_TAG_T long
13328 EOF
13329
13330         cat >> confdefs.h <<\EOF
13331 #define LBER_SOCKET_T int
13332 EOF
13333
13334
13335 else
13336         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13337 echo "configure:13338: checking whether byte ordering is bigendian" >&5
13338 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13339   echo $ac_n "(cached) $ac_c" 1>&6
13340 else
13341   ac_cv_c_bigendian=unknown
13342 # See if sys/param.h defines the BYTE_ORDER macro.
13343 cat > conftest.$ac_ext <<EOF
13344 #line 13345 "configure"
13345 #include "confdefs.h"
13346 #include <sys/types.h>
13347 #include <sys/param.h>
13348 int main() {
13349
13350 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13351  bogus endian macros
13352 #endif
13353 ; return 0; }
13354 EOF
13355 if { (eval echo configure:13356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13356   rm -rf conftest*
13357   # It does; now see whether it defined to BIG_ENDIAN or not.
13358 cat > conftest.$ac_ext <<EOF
13359 #line 13360 "configure"
13360 #include "confdefs.h"
13361 #include <sys/types.h>
13362 #include <sys/param.h>
13363 int main() {
13364
13365 #if BYTE_ORDER != BIG_ENDIAN
13366  not big endian
13367 #endif
13368 ; return 0; }
13369 EOF
13370 if { (eval echo configure:13371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13371   rm -rf conftest*
13372   ac_cv_c_bigendian=yes
13373 else
13374   echo "configure: failed program was:" >&5
13375   cat conftest.$ac_ext >&5
13376   rm -rf conftest*
13377   ac_cv_c_bigendian=no
13378 fi
13379 rm -f conftest*
13380 else
13381   echo "configure: failed program was:" >&5
13382   cat conftest.$ac_ext >&5
13383 fi
13384 rm -f conftest*
13385 if test $ac_cv_c_bigendian = unknown; then
13386 if test "$cross_compiling" = yes; then
13387     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13388 else
13389   cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392 main () {
13393   /* Are we little or big endian?  From Harbison&Steele.  */
13394   union
13395   {
13396     long l;
13397     char c[sizeof (long)];
13398   } u;
13399   u.l = 1;
13400   exit (u.c[sizeof (long) - 1] == 1);
13401 }
13402 EOF
13403 if { (eval echo configure:13404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13404 then
13405   ac_cv_c_bigendian=no
13406 else
13407   echo "configure: failed program was:" >&5
13408   cat conftest.$ac_ext >&5
13409   rm -fr conftest*
13410   ac_cv_c_bigendian=yes
13411 fi
13412 rm -fr conftest*
13413 fi
13414
13415 fi
13416 fi
13417
13418 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13419 if test $ac_cv_c_bigendian = yes; then
13420   cat >> confdefs.h <<\EOF
13421 #define WORDS_BIGENDIAN 1
13422 EOF
13423
13424 fi
13425
13426         echo $ac_n "checking size of short""... $ac_c" 1>&6
13427 echo "configure:13428: checking size of short" >&5
13428 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13429   echo $ac_n "(cached) $ac_c" 1>&6
13430 else
13431   if test "$cross_compiling" = yes; then
13432     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13433 else
13434   cat > conftest.$ac_ext <<EOF
13435 #line 13436 "configure"
13436 #include "confdefs.h"
13437 #include <stdio.h>
13438 main()
13439 {
13440   FILE *f=fopen("conftestval", "w");
13441   if (!f) exit(1);
13442   fprintf(f, "%d\n", sizeof(short));
13443   exit(0);
13444 }
13445 EOF
13446 if { (eval echo configure:13447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13447 then
13448   ac_cv_sizeof_short=`cat conftestval`
13449 else
13450   echo "configure: failed program was:" >&5
13451   cat conftest.$ac_ext >&5
13452   rm -fr conftest*
13453   ac_cv_sizeof_short=0
13454 fi
13455 rm -fr conftest*
13456 fi
13457
13458 fi
13459 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13460 cat >> confdefs.h <<EOF
13461 #define SIZEOF_SHORT $ac_cv_sizeof_short
13462 EOF
13463
13464  
13465         echo $ac_n "checking size of int""... $ac_c" 1>&6
13466 echo "configure:13467: checking size of int" >&5
13467 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13468   echo $ac_n "(cached) $ac_c" 1>&6
13469 else
13470   if test "$cross_compiling" = yes; then
13471     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13472 else
13473   cat > conftest.$ac_ext <<EOF
13474 #line 13475 "configure"
13475 #include "confdefs.h"
13476 #include <stdio.h>
13477 main()
13478 {
13479   FILE *f=fopen("conftestval", "w");
13480   if (!f) exit(1);
13481   fprintf(f, "%d\n", sizeof(int));
13482   exit(0);
13483 }
13484 EOF
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13486 then
13487   ac_cv_sizeof_int=`cat conftestval`
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491   rm -fr conftest*
13492   ac_cv_sizeof_int=0
13493 fi
13494 rm -fr conftest*
13495 fi
13496
13497 fi
13498 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13499 cat >> confdefs.h <<EOF
13500 #define SIZEOF_INT $ac_cv_sizeof_int
13501 EOF
13502
13503  
13504         echo $ac_n "checking size of long""... $ac_c" 1>&6
13505 echo "configure:13506: checking size of long" >&5
13506 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13507   echo $ac_n "(cached) $ac_c" 1>&6
13508 else
13509   if test "$cross_compiling" = yes; then
13510     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13511 else
13512   cat > conftest.$ac_ext <<EOF
13513 #line 13514 "configure"
13514 #include "confdefs.h"
13515 #include <stdio.h>
13516 main()
13517 {
13518   FILE *f=fopen("conftestval", "w");
13519   if (!f) exit(1);
13520   fprintf(f, "%d\n", sizeof(long));
13521   exit(0);
13522 }
13523 EOF
13524 if { (eval echo configure:13525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13525 then
13526   ac_cv_sizeof_long=`cat conftestval`
13527 else
13528   echo "configure: failed program was:" >&5
13529   cat conftest.$ac_ext >&5
13530   rm -fr conftest*
13531   ac_cv_sizeof_long=0
13532 fi
13533 rm -fr conftest*
13534 fi
13535
13536 fi
13537 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13538 cat >> confdefs.h <<EOF
13539 #define SIZEOF_LONG $ac_cv_sizeof_long
13540 EOF
13541
13542
13543
13544         if test "$ac_cv_sizeof_int" -lt 4 ; then
13545                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13546
13547                 cat >> confdefs.h <<\EOF
13548 #define LBER_INT_T long
13549 EOF
13550
13551                 cat >> confdefs.h <<\EOF
13552 #define LBER_TAG_T long
13553 EOF
13554
13555                 cat >> confdefs.h <<\EOF
13556 #define LBER_SOCKET_T int
13557 EOF
13558
13559         else
13560                 cat >> confdefs.h <<\EOF
13561 #define LBER_INT_T int
13562 EOF
13563
13564                 cat >> confdefs.h <<\EOF
13565 #define LBER_TAG_T long
13566 EOF
13567
13568                 cat >> confdefs.h <<\EOF
13569 #define LBER_SOCKET_T int
13570 EOF
13571
13572         fi
13573 fi
13574
13575 cat >> confdefs.h <<\EOF
13576 #define LBER_LEN_T long
13577 EOF
13578
13579
13580 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13581 echo "configure:13582: checking for 8-bit clean memcmp" >&5
13582 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13583   echo $ac_n "(cached) $ac_c" 1>&6
13584 else
13585   if test "$cross_compiling" = yes; then
13586   ac_cv_func_memcmp_clean=no
13587 else
13588   cat > conftest.$ac_ext <<EOF
13589 #line 13590 "configure"
13590 #include "confdefs.h"
13591
13592 main()
13593 {
13594   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13595   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13596 }
13597
13598 EOF
13599 if { (eval echo configure:13600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13600 then
13601   ac_cv_func_memcmp_clean=yes
13602 else
13603   echo "configure: failed program was:" >&5
13604   cat conftest.$ac_ext >&5
13605   rm -fr conftest*
13606   ac_cv_func_memcmp_clean=no
13607 fi
13608 rm -fr conftest*
13609 fi
13610
13611 fi
13612
13613 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13614 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13615
13616 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13617 echo "configure:13618: checking for strftime" >&5
13618 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13619   echo $ac_n "(cached) $ac_c" 1>&6
13620 else
13621   cat > conftest.$ac_ext <<EOF
13622 #line 13623 "configure"
13623 #include "confdefs.h"
13624 /* System header to define __stub macros and hopefully few prototypes,
13625     which can conflict with char strftime(); below.  */
13626 #include <assert.h>
13627 /* Override any gcc2 internal prototype to avoid an error.  */
13628 /* We use char because int might match the return type of a gcc2
13629     builtin and then its argument prototype would still apply.  */
13630 char strftime();
13631 char (*f)();
13632
13633 int main() {
13634
13635 /* The GNU C library defines this for functions which it implements
13636     to always fail with ENOSYS.  Some functions are actually named
13637     something starting with __ and the normal name is an alias.  */
13638 #if defined (__stub_strftime) || defined (__stub___strftime)
13639 choke me
13640 #else
13641 f = strftime;
13642 #endif
13643
13644 ; return 0; }
13645 EOF
13646 if { (eval echo configure:13647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13647   rm -rf conftest*
13648   eval "ac_cv_func_strftime=yes"
13649 else
13650   echo "configure: failed program was:" >&5
13651   cat conftest.$ac_ext >&5
13652   rm -rf conftest*
13653   eval "ac_cv_func_strftime=no"
13654 fi
13655 rm -f conftest*
13656 fi
13657
13658 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13659   echo "$ac_t""yes" 1>&6
13660   cat >> confdefs.h <<\EOF
13661 #define HAVE_STRFTIME 1
13662 EOF
13663
13664 else
13665   echo "$ac_t""no" 1>&6
13666 # strftime is in -lintl on SCO UNIX.
13667 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13668 echo "configure:13669: checking for strftime in -lintl" >&5
13669 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13670 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13671   echo $ac_n "(cached) $ac_c" 1>&6
13672 else
13673   ac_save_LIBS="$LIBS"
13674 LIBS="-lintl  $LIBS"
13675 cat > conftest.$ac_ext <<EOF
13676 #line 13677 "configure"
13677 #include "confdefs.h"
13678 /* Override any gcc2 internal prototype to avoid an error.  */
13679 /* We use char because int might match the return type of a gcc2
13680     builtin and then its argument prototype would still apply.  */
13681 char strftime();
13682
13683 int main() {
13684 strftime()
13685 ; return 0; }
13686 EOF
13687 if { (eval echo configure:13688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13688   rm -rf conftest*
13689   eval "ac_cv_lib_$ac_lib_var=yes"
13690 else
13691   echo "configure: failed program was:" >&5
13692   cat conftest.$ac_ext >&5
13693   rm -rf conftest*
13694   eval "ac_cv_lib_$ac_lib_var=no"
13695 fi
13696 rm -f conftest*
13697 LIBS="$ac_save_LIBS"
13698
13699 fi
13700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13701   echo "$ac_t""yes" 1>&6
13702   cat >> confdefs.h <<\EOF
13703 #define HAVE_STRFTIME 1
13704 EOF
13705
13706 LIBS="-lintl $LIBS"
13707 else
13708   echo "$ac_t""no" 1>&6
13709 fi
13710
13711 fi
13712
13713
13714 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13715 echo "configure:13716: checking for inet_aton()" >&5
13716 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13717   echo $ac_n "(cached) $ac_c" 1>&6
13718 else
13719   cat > conftest.$ac_ext <<EOF
13720 #line 13721 "configure"
13721 #include "confdefs.h"
13722
13723 #ifdef HAVE_SYS_TYPES_H
13724 #       include <sys/types.h>
13725 #endif
13726 #ifdef HAVE_SYS_SOCKET_H
13727 #       include <sys/socket.h>
13728 #       ifdef HAVE_SYS_SELECT_H
13729 #               include <sys/select.h>
13730 #       endif
13731 #       include <netinet/in.h>
13732 #       ifdef HAVE_ARPA_INET_H
13733 #               include <arpa/inet.h>
13734 #       endif
13735 #endif
13736
13737 int main() {
13738 struct in_addr in;
13739 int rc = inet_aton( "255.255.255.255", &in );
13740 ; return 0; }
13741 EOF
13742 if { (eval echo configure:13743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13743   rm -rf conftest*
13744   ol_cv_func_inet_aton=yes
13745 else
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   ol_cv_func_inet_aton=no
13750 fi
13751 rm -f conftest*
13752 fi
13753
13754 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13755   if test $ol_cv_func_inet_aton != no; then
13756     cat >> confdefs.h <<\EOF
13757 #define HAVE_INET_ATON 1
13758 EOF
13759
13760   fi
13761  
13762
13763 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13764 echo "configure:13765: checking for vprintf" >&5
13765 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13766   echo $ac_n "(cached) $ac_c" 1>&6
13767 else
13768   cat > conftest.$ac_ext <<EOF
13769 #line 13770 "configure"
13770 #include "confdefs.h"
13771 /* System header to define __stub macros and hopefully few prototypes,
13772     which can conflict with char vprintf(); below.  */
13773 #include <assert.h>
13774 /* Override any gcc2 internal prototype to avoid an error.  */
13775 /* We use char because int might match the return type of a gcc2
13776     builtin and then its argument prototype would still apply.  */
13777 char vprintf();
13778 char (*f)();
13779
13780 int main() {
13781
13782 /* The GNU C library defines this for functions which it implements
13783     to always fail with ENOSYS.  Some functions are actually named
13784     something starting with __ and the normal name is an alias.  */
13785 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13786 choke me
13787 #else
13788 f = vprintf;
13789 #endif
13790
13791 ; return 0; }
13792 EOF
13793 if { (eval echo configure:13794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13794   rm -rf conftest*
13795   eval "ac_cv_func_vprintf=yes"
13796 else
13797   echo "configure: failed program was:" >&5
13798   cat conftest.$ac_ext >&5
13799   rm -rf conftest*
13800   eval "ac_cv_func_vprintf=no"
13801 fi
13802 rm -f conftest*
13803 fi
13804
13805 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13806   echo "$ac_t""yes" 1>&6
13807   cat >> confdefs.h <<\EOF
13808 #define HAVE_VPRINTF 1
13809 EOF
13810
13811 else
13812   echo "$ac_t""no" 1>&6
13813 fi
13814
13815 if test "$ac_cv_func_vprintf" != yes; then
13816 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13817 echo "configure:13818: checking for _doprnt" >&5
13818 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13819   echo $ac_n "(cached) $ac_c" 1>&6
13820 else
13821   cat > conftest.$ac_ext <<EOF
13822 #line 13823 "configure"
13823 #include "confdefs.h"
13824 /* System header to define __stub macros and hopefully few prototypes,
13825     which can conflict with char _doprnt(); below.  */
13826 #include <assert.h>
13827 /* Override any gcc2 internal prototype to avoid an error.  */
13828 /* We use char because int might match the return type of a gcc2
13829     builtin and then its argument prototype would still apply.  */
13830 char _doprnt();
13831 char (*f)();
13832
13833 int main() {
13834
13835 /* The GNU C library defines this for functions which it implements
13836     to always fail with ENOSYS.  Some functions are actually named
13837     something starting with __ and the normal name is an alias.  */
13838 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13839 choke me
13840 #else
13841 f = _doprnt;
13842 #endif
13843
13844 ; return 0; }
13845 EOF
13846 if { (eval echo configure:13847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13847   rm -rf conftest*
13848   eval "ac_cv_func__doprnt=yes"
13849 else
13850   echo "configure: failed program was:" >&5
13851   cat conftest.$ac_ext >&5
13852   rm -rf conftest*
13853   eval "ac_cv_func__doprnt=no"
13854 fi
13855 rm -f conftest*
13856 fi
13857
13858 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13859   echo "$ac_t""yes" 1>&6
13860   cat >> confdefs.h <<\EOF
13861 #define HAVE_DOPRNT 1
13862 EOF
13863
13864 else
13865   echo "$ac_t""no" 1>&6
13866 fi
13867
13868 fi
13869
13870
13871 if test $ac_cv_func_vprintf = yes ; then
13872                 for ac_func in vsnprintf vsprintf
13873 do
13874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13875 echo "configure:13876: checking for $ac_func" >&5
13876 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13877   echo $ac_n "(cached) $ac_c" 1>&6
13878 else
13879   cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 /* System header to define __stub macros and hopefully few prototypes,
13883     which can conflict with char $ac_func(); below.  */
13884 #include <assert.h>
13885 /* Override any gcc2 internal prototype to avoid an error.  */
13886 /* We use char because int might match the return type of a gcc2
13887     builtin and then its argument prototype would still apply.  */
13888 char $ac_func();
13889 char (*f)();
13890
13891 int main() {
13892
13893 /* The GNU C library defines this for functions which it implements
13894     to always fail with ENOSYS.  Some functions are actually named
13895     something starting with __ and the normal name is an alias.  */
13896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13897 choke me
13898 #else
13899 f = $ac_func;
13900 #endif
13901
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13905   rm -rf conftest*
13906   eval "ac_cv_func_$ac_func=yes"
13907 else
13908   echo "configure: failed program was:" >&5
13909   cat conftest.$ac_ext >&5
13910   rm -rf conftest*
13911   eval "ac_cv_func_$ac_func=no"
13912 fi
13913 rm -f conftest*
13914 fi
13915
13916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13917   echo "$ac_t""yes" 1>&6
13918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13919   cat >> confdefs.h <<EOF
13920 #define $ac_tr_func 1
13921 EOF
13922  
13923 else
13924   echo "$ac_t""no" 1>&6
13925 fi
13926 done
13927
13928 fi
13929
13930 for ac_func in \
13931         bcopy                   \
13932         closesocket             \
13933         endgrent                \
13934         endpwent                \
13935         flock                   \
13936         getdtablesize   \
13937         getgrgid                \
13938         gethostname             \
13939         getpass                 \
13940         getpwuid                \
13941         getpwnam                \
13942         getspnam                \
13943         gettimeofday    \
13944         initgroups              \
13945         lockf                   \
13946         memcpy                  \
13947         memmove                 \
13948         mkstemp                 \
13949         read                    \
13950         recv                    \
13951         recvfrom                \
13952         setpwfile               \
13953         setgid                  \
13954         setegid                 \
13955         setsid                  \
13956         setuid                  \
13957         seteuid                 \
13958         signal                  \
13959         sigset                  \
13960         snprintf                \
13961         strdup                  \
13962         strerror                \
13963         strpbrk                 \
13964         strrchr                 \
13965         strsep                  \
13966         strstr                  \
13967         strtol                  \
13968         strtoul                 \
13969         strspn                  \
13970         sysconf                 \
13971         waitpid                 \
13972         wait4                   \
13973         write                   \
13974         send                    \
13975         sendto                  \
13976
13977 do
13978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13979 echo "configure:13980: checking for $ac_func" >&5
13980 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13981   echo $ac_n "(cached) $ac_c" 1>&6
13982 else
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 /* System header to define __stub macros and hopefully few prototypes,
13987     which can conflict with char $ac_func(); below.  */
13988 #include <assert.h>
13989 /* Override any gcc2 internal prototype to avoid an error.  */
13990 /* We use char because int might match the return type of a gcc2
13991     builtin and then its argument prototype would still apply.  */
13992 char $ac_func();
13993 char (*f)();
13994
13995 int main() {
13996
13997 /* The GNU C library defines this for functions which it implements
13998     to always fail with ENOSYS.  Some functions are actually named
13999     something starting with __ and the normal name is an alias.  */
14000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14001 choke me
14002 #else
14003 f = $ac_func;
14004 #endif
14005
14006 ; return 0; }
14007 EOF
14008 if { (eval echo configure:14009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14009   rm -rf conftest*
14010   eval "ac_cv_func_$ac_func=yes"
14011 else
14012   echo "configure: failed program was:" >&5
14013   cat conftest.$ac_ext >&5
14014   rm -rf conftest*
14015   eval "ac_cv_func_$ac_func=no"
14016 fi
14017 rm -f conftest*
14018 fi
14019
14020 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14021   echo "$ac_t""yes" 1>&6
14022     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14023   cat >> confdefs.h <<EOF
14024 #define $ac_tr_func 1
14025 EOF
14026  
14027 else
14028   echo "$ac_t""no" 1>&6
14029 fi
14030 done
14031
14032
14033 for ac_func in getopt tempnam
14034 do
14035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14036 echo "configure:14037: checking for $ac_func" >&5
14037 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14038   echo $ac_n "(cached) $ac_c" 1>&6
14039 else
14040   cat > conftest.$ac_ext <<EOF
14041 #line 14042 "configure"
14042 #include "confdefs.h"
14043 /* System header to define __stub macros and hopefully few prototypes,
14044     which can conflict with char $ac_func(); below.  */
14045 #include <assert.h>
14046 /* Override any gcc2 internal prototype to avoid an error.  */
14047 /* We use char because int might match the return type of a gcc2
14048     builtin and then its argument prototype would still apply.  */
14049 char $ac_func();
14050 char (*f)();
14051
14052 int main() {
14053
14054 /* The GNU C library defines this for functions which it implements
14055     to always fail with ENOSYS.  Some functions are actually named
14056     something starting with __ and the normal name is an alias.  */
14057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14058 choke me
14059 #else
14060 f = $ac_func;
14061 #endif
14062
14063 ; return 0; }
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14066   rm -rf conftest*
14067   eval "ac_cv_func_$ac_func=yes"
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071   rm -rf conftest*
14072   eval "ac_cv_func_$ac_func=no"
14073 fi
14074 rm -f conftest*
14075 fi
14076
14077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14078   echo "$ac_t""yes" 1>&6
14079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14080   cat >> confdefs.h <<EOF
14081 #define $ac_tr_func 1
14082 EOF
14083  
14084 else
14085   echo "$ac_t""no" 1>&6
14086 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14087 fi
14088 done
14089
14090
14091
14092 # Check Configuration
14093 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14094 echo "configure:14095: checking declaration of sys_errlist" >&5
14095 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   
14099         cat > conftest.$ac_ext <<EOF
14100 #line 14101 "configure"
14101 #include "confdefs.h"
14102
14103 #include <stdio.h>
14104 #include <sys/types.h>
14105 #include <errno.h> 
14106 int main() {
14107 char *c = (char *) *sys_errlist
14108 ; return 0; }
14109 EOF
14110 if { (eval echo configure:14111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14111   rm -rf conftest*
14112   ol_cv_dcl_sys_errlist=yes
14113         ol_cv_have_sys_errlist=yes
14114 else
14115   echo "configure: failed program was:" >&5
14116   cat conftest.$ac_ext >&5
14117   rm -rf conftest*
14118   ol_cv_dcl_sys_errlist=no
14119 fi
14120 rm -f conftest*
14121 fi
14122
14123 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14124 #
14125 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14126 if test $ol_cv_dcl_sys_errlist = no ; then
14127         cat >> confdefs.h <<\EOF
14128 #define DECL_SYS_ERRLIST 1
14129 EOF
14130
14131
14132         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14133 echo "configure:14134: checking existence of sys_errlist" >&5
14134 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14135   echo $ac_n "(cached) $ac_c" 1>&6
14136 else
14137   
14138                 cat > conftest.$ac_ext <<EOF
14139 #line 14140 "configure"
14140 #include "confdefs.h"
14141 #include <errno.h>
14142 int main() {
14143 char *c = (char *) *sys_errlist
14144 ; return 0; }
14145 EOF
14146 if { (eval echo configure:14147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14147   rm -rf conftest*
14148   ol_cv_have_sys_errlist=yes
14149 else
14150   echo "configure: failed program was:" >&5
14151   cat conftest.$ac_ext >&5
14152   rm -rf conftest*
14153   ol_cv_have_sys_errlist=no
14154 fi
14155 rm -f conftest*
14156 fi
14157
14158 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14159 fi
14160 if test $ol_cv_have_sys_errlist = yes ; then
14161         cat >> confdefs.h <<\EOF
14162 #define HAVE_SYS_ERRLIST 1
14163 EOF
14164
14165 fi
14166
14167
14168
14169 if test "$ol_enable_debug" != no ; then
14170         cat >> confdefs.h <<\EOF
14171 #define LDAP_DEBUG 1
14172 EOF
14173
14174 fi
14175 if test "$ol_enable_syslog" = yes ; then
14176         cat >> confdefs.h <<\EOF
14177 #define LDAP_SYSLOG 1
14178 EOF
14179
14180 fi
14181 if test "$ol_enable_libui" = yes ; then
14182         cat >> confdefs.h <<\EOF
14183 #define LDAP_LIBUI 1
14184 EOF
14185
14186 fi
14187 if test "$ol_enable_cache" = no ; then
14188         cat >> confdefs.h <<\EOF
14189 #define LDAP_NOCACHE 1
14190 EOF
14191
14192 fi
14193 if test "$ol_enable_dns" != no ; then
14194         cat >> confdefs.h <<\EOF
14195 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14196 EOF
14197
14198 fi
14199 if test "$ol_enable_proctitle" != no ; then
14200         cat >> confdefs.h <<\EOF
14201 #define LDAP_PROCTITLE 1
14202 EOF
14203
14204 fi
14205 if test "$ol_enable_referrals" != no ; then
14206         cat >> confdefs.h <<\EOF
14207 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14208 EOF
14209
14210 fi
14211 if test "$ol_enable_cldap" != no ; then
14212         cat >> confdefs.h <<\EOF
14213 #define LDAP_CONNECTIONLESS 1
14214 EOF
14215
14216 fi
14217
14218 if test "$ol_enable_crypt" != no ; then
14219         cat >> confdefs.h <<\EOF
14220 #define SLAPD_CRYPT 1
14221 EOF
14222
14223 fi
14224 if test "$ol_enable_cleartext" != no ; then
14225         cat >> confdefs.h <<\EOF
14226 #define SLAPD_CLEARTEXT 1
14227 EOF
14228
14229 fi
14230 if test "$ol_enable_multimaster" != no ; then
14231         cat >> confdefs.h <<\EOF
14232 #define SLAPD_MULTIMASTER 1
14233 EOF
14234
14235 fi
14236 if test "$ol_enable_phonetic" != no ; then
14237         cat >> confdefs.h <<\EOF
14238 #define SLAPD_PHONETIC 1
14239 EOF
14240
14241 fi
14242 if test "$ol_enable_rlookups" != no ; then
14243         cat >> confdefs.h <<\EOF
14244 #define SLAPD_RLOOKUPS 1
14245 EOF
14246
14247 fi
14248 if test "$ol_enable_aci" != no ; then
14249         cat >> confdefs.h <<\EOF
14250 #define SLAPD_ACI_ENABLED 1
14251 EOF
14252
14253 fi
14254 if test "$ol_enable_discreteaci" != no ; then
14255         cat >> confdefs.h <<\EOF
14256 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14257 EOF
14258
14259 fi
14260
14261 if test "$ol_link_modules" != no ; then
14262         cat >> confdefs.h <<\EOF
14263 #define SLAPD_MODULES 1
14264 EOF
14265
14266         BUILD_SLAPD=yes
14267         MODULES_LIBS=-lltdl
14268         SLAPD_MODULES_LDFLAGS="-dlopen self"
14269 fi
14270
14271 if test "$ol_link_bdb2" != no ; then
14272         cat >> confdefs.h <<\EOF
14273 #define SLAPD_BDB2 1
14274 EOF
14275
14276         BUILD_SLAPD=yes
14277         BUILD_BDB2=yes
14278         if test "$ol_with_bdb2_module" != static ; then
14279                 cat >> confdefs.h <<\EOF
14280 #define SLAPD_BDB2_DYNAMIC 1
14281 EOF
14282
14283                 BUILD_BDB2=mod
14284                 BUILD_BDB2_DYNAMIC=shared
14285                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14286         fi
14287 fi
14288
14289 if test "$ol_enable_ldap" != no ; then
14290         cat >> confdefs.h <<\EOF
14291 #define SLAPD_LDAP 1
14292 EOF
14293
14294         BUILD_SLAPD=yes
14295         BUILD_LDAP=yes
14296         if test "$ol_with_ldap_module" != static ; then
14297                 cat >> confdefs.h <<\EOF
14298 #define SLAPD_LDAP_DYNAMIC 1
14299 EOF
14300
14301                 BUILD_LDAP=mod
14302                 BUILD_LDAP_DYNAMIC=shared
14303                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14304         fi
14305 fi
14306
14307 if test "$ol_link_ldbm" != no ; then
14308         cat >> confdefs.h <<\EOF
14309 #define SLAPD_LDBM 1
14310 EOF
14311
14312         BUILD_SLAPD=yes
14313         BUILD_LDBM=yes
14314         if test "$ol_with_ldbm_module" != static ; then
14315                 cat >> confdefs.h <<\EOF
14316 #define SLAPD_LDBM_DYNAMIC 1
14317 EOF
14318
14319                 BUILD_LDBM=mod
14320                 BUILD_LDBM_DYNAMIC=shared
14321                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14322         fi
14323 fi
14324
14325 if test "$ol_enable_passwd" != no ; then
14326         cat >> confdefs.h <<\EOF
14327 #define SLAPD_PASSWD 1
14328 EOF
14329
14330         BUILD_SLAPD=yes
14331         BUILD_PASSWD=yes
14332         if test "$ol_with_passwd_module" != static ; then
14333                 cat >> confdefs.h <<\EOF
14334 #define SLAPD_PASSWD_DYNAMIC 1
14335 EOF
14336
14337                 BUILD_PASSWD=mod
14338                 BUILD_PASSWD_DYNAMIC=shared
14339                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14340         fi
14341 fi
14342
14343 if test "$ol_link_perl" != no ; then
14344         cat >> confdefs.h <<\EOF
14345 #define SLAPD_PERL 1
14346 EOF
14347
14348         BUILD_SLAPD=yes
14349         BUILD_PERL=yes
14350         if test "$ol_with_perl_module" != static ; then
14351                 cat >> confdefs.h <<\EOF
14352 #define SLAPD_PERL_DYNAMIC 1
14353 EOF
14354
14355                 BUILD_PERL=mod
14356                 BUILD_PERL_DYNAMIC=shared
14357                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14358         fi
14359 fi
14360
14361 if test "$ol_enable_shell" != no ; then
14362         cat >> confdefs.h <<\EOF
14363 #define SLAPD_SHELL 1
14364 EOF
14365
14366         BUILD_SLAPD=yes
14367         BUILD_SHELL=yes
14368         if test "$ol_with_shell_module" != static ; then
14369                 cat >> confdefs.h <<\EOF
14370 #define SLAPD_SHELL_DYNAMIC 1
14371 EOF
14372
14373                 BUILD_SHELL=mod
14374                 BUILD_SHELL_DYNAMIC=shared
14375                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14376         fi
14377 fi
14378
14379 if test "$ol_enable_tcl" != no ; then
14380         cat >> confdefs.h <<\EOF
14381 #define SLAPD_TCL 1
14382 EOF
14383
14384         BUILD_SLAPD=yes
14385         BUILD_TCL=yes
14386         if test "$ol_with_tcl_module" != static; then
14387                 cat >> confdefs.h <<\EOF
14388 #define SLAPD_TCL_DYNAMIC 1
14389 EOF
14390
14391                 BUILD_TCL=mod
14392                 BUILD_TCL_DYNAMIC=shared
14393                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14394         fi
14395 fi
14396
14397 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14398         $BUILD_SLAPD = yes ; then
14399         BUILD_SLURPD=yes
14400 fi
14401
14402 if test "$ol_link_isode" != no ; then
14403         BUILD_LDAPD=yes
14404 fi
14405
14406
14407
14408
14409   
14410   
14411   
14412   
14413   
14414   
14415   
14416   
14417   
14418   
14419   
14420   
14421   
14422   
14423   
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450 trap '' 1 2 15
14451
14452 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14453
14454 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14455 # Let make expand exec_prefix.
14456 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14457
14458 # Any assignment to VPATH causes Sun make to only execute
14459 # the first set of double-colon rules, so remove it if not needed.
14460 # If there is a colon in the path, we need to keep it.
14461 if test "x$srcdir" = x.; then
14462   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14463 fi
14464
14465 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14466
14467 DEFS=-DHAVE_CONFIG_H
14468
14469 # Without the "./", some shells look in PATH for config.status.
14470 : ${CONFIG_STATUS=./config.status}
14471
14472 echo creating $CONFIG_STATUS
14473 rm -f $CONFIG_STATUS
14474 cat > $CONFIG_STATUS <<EOF
14475 #! /bin/sh
14476 # Generated automatically by configure.
14477 # Run this file to recreate the current configuration.
14478 # This directory was configured as follows,
14479 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14480 #
14481 # $0 $ac_configure_args
14482 #
14483 # Compiler output produced by configure, useful for debugging
14484 # configure, is in ./config.log if it exists.
14485
14486 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14487 for ac_option
14488 do
14489   case "\$ac_option" in
14490   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14491     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14492     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14493   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14494     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14495     exit 0 ;;
14496   -help | --help | --hel | --he | --h)
14497     echo "\$ac_cs_usage"; exit 0 ;;
14498   *) echo "\$ac_cs_usage"; exit 1 ;;
14499   esac
14500 done
14501
14502 ac_given_srcdir=$srcdir
14503 ac_given_INSTALL="$INSTALL"
14504
14505 trap 'rm -fr `echo "\
14506 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14507 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14508 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14509 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14510 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14511 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14512 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14513 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14514 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14515 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14516 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14517 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14518 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14519 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14520 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14521 include/Makefile:build/top.mk:include/Makefile.in \
14522 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14523 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14524 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14525 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14526 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14527 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14528 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14529 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14530 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14531 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14532 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14533 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14534 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14535 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14536 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14537 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14538 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14539 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14540 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14541 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14542 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14543 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14544 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14545 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14546 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14547 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14548  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14549 EOF
14550 cat >> $CONFIG_STATUS <<EOF
14551
14552 # Protect against being on the right side of a sed subst in config.status.
14553 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14554  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14555 $ac_vpsub
14556 $extrasub
14557 s%@SHELL@%$SHELL%g
14558 s%@CFLAGS@%$CFLAGS%g
14559 s%@CPPFLAGS@%$CPPFLAGS%g
14560 s%@CXXFLAGS@%$CXXFLAGS%g
14561 s%@FFLAGS@%$FFLAGS%g
14562 s%@DEFS@%$DEFS%g
14563 s%@LDFLAGS@%$LDFLAGS%g
14564 s%@LIBS@%$LIBS%g
14565 s%@exec_prefix@%$exec_prefix%g
14566 s%@prefix@%$prefix%g
14567 s%@program_transform_name@%$program_transform_name%g
14568 s%@bindir@%$bindir%g
14569 s%@sbindir@%$sbindir%g
14570 s%@libexecdir@%$libexecdir%g
14571 s%@datadir@%$datadir%g
14572 s%@sysconfdir@%$sysconfdir%g
14573 s%@sharedstatedir@%$sharedstatedir%g
14574 s%@localstatedir@%$localstatedir%g
14575 s%@libdir@%$libdir%g
14576 s%@includedir@%$includedir%g
14577 s%@oldincludedir@%$oldincludedir%g
14578 s%@infodir@%$infodir%g
14579 s%@mandir@%$mandir%g
14580 s%@host@%$host%g
14581 s%@host_alias@%$host_alias%g
14582 s%@host_cpu@%$host_cpu%g
14583 s%@host_vendor@%$host_vendor%g
14584 s%@host_os@%$host_os%g
14585 s%@target@%$target%g
14586 s%@target_alias@%$target_alias%g
14587 s%@target_cpu@%$target_cpu%g
14588 s%@target_vendor@%$target_vendor%g
14589 s%@target_os@%$target_os%g
14590 s%@build@%$build%g
14591 s%@build_alias@%$build_alias%g
14592 s%@build_cpu@%$build_cpu%g
14593 s%@build_vendor@%$build_vendor%g
14594 s%@build_os@%$build_os%g
14595 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14596 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14597 s%@INSTALL_DATA@%$INSTALL_DATA%g
14598 s%@PACKAGE@%$PACKAGE%g
14599 s%@VERSION@%$VERSION%g
14600 s%@ACLOCAL@%$ACLOCAL%g
14601 s%@AUTOCONF@%$AUTOCONF%g
14602 s%@AUTOMAKE@%$AUTOMAKE%g
14603 s%@AUTOHEADER@%$AUTOHEADER%g
14604 s%@MAKEINFO@%$MAKEINFO%g
14605 s%@install_sh@%$install_sh%g
14606 s%@AMTAR@%$AMTAR%g
14607 s%@AWK@%$AWK%g
14608 s%@AMTARFLAGS@%$AMTARFLAGS%g
14609 s%@SET_MAKE@%$SET_MAKE%g
14610 s%@top_builddir@%$top_builddir%g
14611 s%@ldap_subdir@%$ldap_subdir%g
14612 s%@CC@%$CC%g
14613 s%@RANLIB@%$RANLIB%g
14614 s%@LD@%$LD%g
14615 s%@NM@%$NM%g
14616 s%@LN_S@%$LN_S%g
14617 s%@LIBTOOL@%$LIBTOOL%g
14618 s%@LN_H@%$LN_H%g
14619 s%@SENDMAIL@%$SENDMAIL%g
14620 s%@EDITOR@%$EDITOR%g
14621 s%@FINGER@%$FINGER%g
14622 s%@PERLBIN@%$PERLBIN%g
14623 s%@CPP@%$CPP%g
14624 s%@EXEEXT@%$EXEEXT%g
14625 s%@OBJEXT@%$OBJEXT%g
14626 s%@OL_MKDEP@%$OL_MKDEP%g
14627 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14628 s%@PEPSY@%$PEPSY%g
14629 s%@LIBOBJS@%$LIBOBJS%g
14630 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14631 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14632 s%@BUILD_BDB2@%$BUILD_BDB2%g
14633 s%@BUILD_LDAP@%$BUILD_LDAP%g
14634 s%@BUILD_LDBM@%$BUILD_LDBM%g
14635 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14636 s%@BUILD_PERL@%$BUILD_PERL%g
14637 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14638 s%@BUILD_SHELL@%$BUILD_SHELL%g
14639 s%@BUILD_TCL@%$BUILD_TCL%g
14640 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14641 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14642 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14643 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14644 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14645 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14646 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14647 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14648 s%@LDAP_LIBS@%$LDAP_LIBS%g
14649 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14650 s%@LDIF_LIBS@%$LDIF_LIBS%g
14651 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14652 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14653 s%@LDBM_LIBS@%$LDBM_LIBS%g
14654 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14655 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14656 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14657 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14658 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14659 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14660 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14661 s%@KRB_LIBS@%$KRB_LIBS%g
14662 s%@READLINE_LIBS@%$READLINE_LIBS%g
14663 s%@SASL_LIBS@%$SASL_LIBS%g
14664 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14665 s%@TLS_LIBS@%$TLS_LIBS%g
14666 s%@MODULES_LIBS@%$MODULES_LIBS%g
14667
14668 CEOF
14669 EOF
14670
14671 cat >> $CONFIG_STATUS <<\EOF
14672
14673 # Split the substitutions into bite-sized pieces for seds with
14674 # small command number limits, like on Digital OSF/1 and HP-UX.
14675 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14676 ac_file=1 # Number of current file.
14677 ac_beg=1 # First line for current file.
14678 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14679 ac_more_lines=:
14680 ac_sed_cmds=""
14681 while $ac_more_lines; do
14682   if test $ac_beg -gt 1; then
14683     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14684   else
14685     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14686   fi
14687   if test ! -s conftest.s$ac_file; then
14688     ac_more_lines=false
14689     rm -f conftest.s$ac_file
14690   else
14691     if test -z "$ac_sed_cmds"; then
14692       ac_sed_cmds="sed -f conftest.s$ac_file"
14693     else
14694       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14695     fi
14696     ac_file=`expr $ac_file + 1`
14697     ac_beg=$ac_end
14698     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14699   fi
14700 done
14701 if test -z "$ac_sed_cmds"; then
14702   ac_sed_cmds=cat
14703 fi
14704 EOF
14705
14706 cat >> $CONFIG_STATUS <<EOF
14707
14708 CONFIG_FILES=\${CONFIG_FILES-"\
14709 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14710 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14711 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14712 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14713 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14714 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14715 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14716 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14717 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14718 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14719 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14720 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14721 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14722 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14723 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14724 include/Makefile:build/top.mk:include/Makefile.in \
14725 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14726 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14727 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14728 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14729 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14730 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14731 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14732 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14733 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14734 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14735 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14736 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14737 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14738 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14739 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14740 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14741 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14742 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14743 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14744 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14745 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14746 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14747 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14748 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14749 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14750 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14751 "}
14752 EOF
14753 cat >> $CONFIG_STATUS <<\EOF
14754 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14755   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14756   case "$ac_file" in
14757   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14758        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14759   *) ac_file_in="${ac_file}.in" ;;
14760   esac
14761
14762   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14763
14764   # Remove last slash and all that follows it.  Not all systems have dirname.
14765   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14766   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14767     # The file is in a subdirectory.
14768     test ! -d "$ac_dir" && mkdir "$ac_dir"
14769     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14770     # A "../" for each directory in $ac_dir_suffix.
14771     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14772   else
14773     ac_dir_suffix= ac_dots=
14774   fi
14775
14776   case "$ac_given_srcdir" in
14777   .)  srcdir=.
14778       if test -z "$ac_dots"; then top_srcdir=.
14779       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14780   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14781   *) # Relative path.
14782     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14783     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14784   esac
14785
14786   case "$ac_given_INSTALL" in
14787   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14788   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14789   esac
14790
14791   echo creating "$ac_file"
14792   rm -f "$ac_file"
14793   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14794   case "$ac_file" in
14795   *Makefile*) ac_comsub="1i\\
14796 # $configure_input" ;;
14797   *) ac_comsub= ;;
14798   esac
14799
14800   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14801   sed -e "$ac_comsub
14802 s%@configure_input@%$configure_input%g
14803 s%@srcdir@%$srcdir%g
14804 s%@top_srcdir@%$top_srcdir%g
14805 s%@INSTALL@%$INSTALL%g
14806 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14807 fi; done
14808 rm -f conftest.s*
14809
14810 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14811 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14812 #
14813 # ac_d sets the value in "#define NAME VALUE" lines.
14814 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14815 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14816 ac_dC='\3'
14817 ac_dD='%g'
14818 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14819 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14820 ac_uB='\([      ]\)%\1#\2define\3'
14821 ac_uC=' '
14822 ac_uD='\4%g'
14823 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14824 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14825 ac_eB='$%\1#\2define\3'
14826 ac_eC=' '
14827 ac_eD='%g'
14828
14829 if test "${CONFIG_HEADERS+set}" != set; then
14830 EOF
14831 cat >> $CONFIG_STATUS <<EOF
14832   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14833 EOF
14834 cat >> $CONFIG_STATUS <<\EOF
14835 fi
14836 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14837   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14838   case "$ac_file" in
14839   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14840        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14841   *) ac_file_in="${ac_file}.in" ;;
14842   esac
14843
14844   echo creating $ac_file
14845
14846   rm -f conftest.frag conftest.in conftest.out
14847   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14848   cat $ac_file_inputs > conftest.in
14849
14850 EOF
14851
14852 # Transform confdefs.h into a sed script conftest.vals that substitutes
14853 # the proper values into config.h.in to produce config.h.  And first:
14854 # Protect against being on the right side of a sed subst in config.status.
14855 # Protect against being in an unquoted here document in config.status.
14856 rm -f conftest.vals
14857 cat > conftest.hdr <<\EOF
14858 s/[\\&%]/\\&/g
14859 s%[\\$`]%\\&%g
14860 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14861 s%ac_d%ac_u%gp
14862 s%ac_u%ac_e%gp
14863 EOF
14864 sed -n -f conftest.hdr confdefs.h > conftest.vals
14865 rm -f conftest.hdr
14866
14867 # This sed command replaces #undef with comments.  This is necessary, for
14868 # example, in the case of _POSIX_SOURCE, which is predefined and required
14869 # on some systems where configure will not decide to define it.
14870 cat >> conftest.vals <<\EOF
14871 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14872 EOF
14873
14874 # Break up conftest.vals because some shells have a limit on
14875 # the size of here documents, and old seds have small limits too.
14876
14877 rm -f conftest.tail
14878 while :
14879 do
14880   ac_lines=`grep -c . conftest.vals`
14881   # grep -c gives empty output for an empty file on some AIX systems.
14882   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14883   # Write a limited-size here document to conftest.frag.
14884   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14885   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14886   echo 'CEOF
14887   sed -f conftest.frag conftest.in > conftest.out
14888   rm -f conftest.in
14889   mv conftest.out conftest.in
14890 ' >> $CONFIG_STATUS
14891   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14892   rm -f conftest.vals
14893   mv conftest.tail conftest.vals
14894 done
14895 rm -f conftest.vals
14896
14897 cat >> $CONFIG_STATUS <<\EOF
14898   rm -f conftest.frag conftest.h
14899   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14900   cat conftest.in >> conftest.h
14901   rm -f conftest.in
14902   if cmp -s $ac_file conftest.h 2>/dev/null; then
14903     echo "$ac_file is unchanged"
14904     rm -f conftest.h
14905   else
14906     # Remove last slash and all that follows it.  Not all systems have dirname.
14907       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14908       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14909       # The file is in a subdirectory.
14910       test ! -d "$ac_dir" && mkdir "$ac_dir"
14911     fi
14912     rm -f $ac_file
14913     mv conftest.h $ac_file
14914   fi
14915 fi; done
14916
14917 EOF
14918 cat >> $CONFIG_STATUS <<EOF
14919
14920 EOF
14921 cat >> $CONFIG_STATUS <<\EOF
14922
14923 date > stamp-h
14924 echo Please \"make depend\" to build dependencies
14925
14926 exit 0
14927 EOF
14928 chmod +x $CONFIG_STATUS
14929 rm -fr confdefs* $ac_clean_files
14930 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
14931