]> git.sur5r.net Git - openldap/blob - configure
Support for native GNU Pth Threads (--with-threads=pth)
[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 pth 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 = pth ; then
9647
9648         for ac_hdr in pth.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
9689         if test $ac_cv_header_pth_h = yes ; then
9690                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9691 echo "configure:9692: checking for pth_version in -lpth" >&5
9692 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9694   echo $ac_n "(cached) $ac_c" 1>&6
9695 else
9696   ac_save_LIBS="$LIBS"
9697 LIBS="-lpth  $LIBS"
9698 cat > conftest.$ac_ext <<EOF
9699 #line 9700 "configure"
9700 #include "confdefs.h"
9701 /* Override any gcc2 internal prototype to avoid an error.  */
9702 /* We use char because int might match the return type of a gcc2
9703     builtin and then its argument prototype would still apply.  */
9704 char pth_version();
9705
9706 int main() {
9707 pth_version()
9708 ; return 0; }
9709 EOF
9710 if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9711   rm -rf conftest*
9712   eval "ac_cv_lib_$ac_lib_var=yes"
9713 else
9714   echo "configure: failed program was:" >&5
9715   cat conftest.$ac_ext >&5
9716   rm -rf conftest*
9717   eval "ac_cv_lib_$ac_lib_var=no"
9718 fi
9719 rm -f conftest*
9720 LIBS="$ac_save_LIBS"
9721
9722 fi
9723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9724   echo "$ac_t""yes" 1>&6
9725   have_pth=yes
9726 else
9727   echo "$ac_t""no" 1>&6
9728 have_pth=no
9729 fi
9730
9731
9732                 if test $have_pth = yes ; then
9733                         cat >> confdefs.h <<\EOF
9734 #define HAVE_GNU_PTH 1
9735 EOF
9736
9737                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9738                         ol_link_threads=pth
9739
9740                         if test $ol_with_yielding_select = auto ; then
9741                                 ol_with_yielding_select=yes
9742                         fi
9743                 fi
9744         fi
9745 fi
9746
9747 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9748         -o $ol_with_threads = lwp ; then
9749
9750                 for ac_hdr in thread.h synch.h
9751 do
9752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9754 echo "configure:9755: checking for $ac_hdr" >&5
9755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 #include <$ac_hdr>
9762 EOF
9763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9764 { (eval echo configure:9765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9766 if test -z "$ac_err"; then
9767   rm -rf conftest*
9768   eval "ac_cv_header_$ac_safe=yes"
9769 else
9770   echo "$ac_err" >&5
9771   echo "configure: failed program was:" >&5
9772   cat conftest.$ac_ext >&5
9773   rm -rf conftest*
9774   eval "ac_cv_header_$ac_safe=no"
9775 fi
9776 rm -f conftest*
9777 fi
9778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9779   echo "$ac_t""yes" 1>&6
9780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9781   cat >> confdefs.h <<EOF
9782 #define $ac_tr_hdr 1
9783 EOF
9784  
9785 else
9786   echo "$ac_t""no" 1>&6
9787 fi
9788 done
9789
9790         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9791                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9792 echo "configure:9793: checking for thr_create in -lthread" >&5
9793 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9795   echo $ac_n "(cached) $ac_c" 1>&6
9796 else
9797   ac_save_LIBS="$LIBS"
9798 LIBS="-lthread  $LIBS"
9799 cat > conftest.$ac_ext <<EOF
9800 #line 9801 "configure"
9801 #include "confdefs.h"
9802 /* Override any gcc2 internal prototype to avoid an error.  */
9803 /* We use char because int might match the return type of a gcc2
9804     builtin and then its argument prototype would still apply.  */
9805 char thr_create();
9806
9807 int main() {
9808 thr_create()
9809 ; return 0; }
9810 EOF
9811 if { (eval echo configure:9812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9812   rm -rf conftest*
9813   eval "ac_cv_lib_$ac_lib_var=yes"
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817   rm -rf conftest*
9818   eval "ac_cv_lib_$ac_lib_var=no"
9819 fi
9820 rm -f conftest*
9821 LIBS="$ac_save_LIBS"
9822
9823 fi
9824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9825   echo "$ac_t""yes" 1>&6
9826   have_thr=yes
9827 else
9828   echo "$ac_t""no" 1>&6
9829 have_thr=no
9830 fi
9831
9832
9833                 if test $have_thr = yes ; then
9834                         cat >> confdefs.h <<\EOF
9835 #define HAVE_THR 1
9836 EOF
9837
9838                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9839                         ol_link_threads=thr
9840
9841                         if test $ol_with_yielding_select = auto ; then
9842                                 ol_with_yielding_select=yes
9843                         fi
9844
9845                                                 for ac_func in \
9846                                 thr_setconcurrency \
9847                                 thr_getconcurrency \
9848                         
9849 do
9850 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9851 echo "configure:9852: checking for $ac_func" >&5
9852 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9853   echo $ac_n "(cached) $ac_c" 1>&6
9854 else
9855   cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 /* System header to define __stub macros and hopefully few prototypes,
9859     which can conflict with char $ac_func(); below.  */
9860 #include <assert.h>
9861 /* Override any gcc2 internal prototype to avoid an error.  */
9862 /* We use char because int might match the return type of a gcc2
9863     builtin and then its argument prototype would still apply.  */
9864 char $ac_func();
9865 char (*f)();
9866
9867 int main() {
9868
9869 /* The GNU C library defines this for functions which it implements
9870     to always fail with ENOSYS.  Some functions are actually named
9871     something starting with __ and the normal name is an alias.  */
9872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9873 choke me
9874 #else
9875 f = $ac_func;
9876 #endif
9877
9878 ; return 0; }
9879 EOF
9880 if { (eval echo configure:9881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9881   rm -rf conftest*
9882   eval "ac_cv_func_$ac_func=yes"
9883 else
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -rf conftest*
9887   eval "ac_cv_func_$ac_func=no"
9888 fi
9889 rm -f conftest*
9890 fi
9891
9892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9893   echo "$ac_t""yes" 1>&6
9894     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9895   cat >> confdefs.h <<EOF
9896 #define $ac_tr_func 1
9897 EOF
9898  
9899 else
9900   echo "$ac_t""no" 1>&6
9901 fi
9902 done
9903
9904                 fi
9905         fi
9906
9907                 for ac_hdr in lwp/lwp.h
9908 do
9909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9911 echo "configure:9912: checking for $ac_hdr" >&5
9912 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9913   echo $ac_n "(cached) $ac_c" 1>&6
9914 else
9915   cat > conftest.$ac_ext <<EOF
9916 #line 9917 "configure"
9917 #include "confdefs.h"
9918 #include <$ac_hdr>
9919 EOF
9920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9921 { (eval echo configure:9922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9923 if test -z "$ac_err"; then
9924   rm -rf conftest*
9925   eval "ac_cv_header_$ac_safe=yes"
9926 else
9927   echo "$ac_err" >&5
9928   echo "configure: failed program was:" >&5
9929   cat conftest.$ac_ext >&5
9930   rm -rf conftest*
9931   eval "ac_cv_header_$ac_safe=no"
9932 fi
9933 rm -f conftest*
9934 fi
9935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9936   echo "$ac_t""yes" 1>&6
9937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9938   cat >> confdefs.h <<EOF
9939 #define $ac_tr_hdr 1
9940 EOF
9941  
9942 else
9943   echo "$ac_t""no" 1>&6
9944 fi
9945 done
9946
9947         if test $ac_cv_header_lwp_lwp_h = yes ; then
9948                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9949 echo "configure:9950: checking for lwp_create in -llwp" >&5
9950 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9952   echo $ac_n "(cached) $ac_c" 1>&6
9953 else
9954   ac_save_LIBS="$LIBS"
9955 LIBS="-llwp  $LIBS"
9956 cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 /* Override any gcc2 internal prototype to avoid an error.  */
9960 /* We use char because int might match the return type of a gcc2
9961     builtin and then its argument prototype would still apply.  */
9962 char lwp_create();
9963
9964 int main() {
9965 lwp_create()
9966 ; return 0; }
9967 EOF
9968 if { (eval echo configure:9969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9969   rm -rf conftest*
9970   eval "ac_cv_lib_$ac_lib_var=yes"
9971 else
9972   echo "configure: failed program was:" >&5
9973   cat conftest.$ac_ext >&5
9974   rm -rf conftest*
9975   eval "ac_cv_lib_$ac_lib_var=no"
9976 fi
9977 rm -f conftest*
9978 LIBS="$ac_save_LIBS"
9979
9980 fi
9981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9982   echo "$ac_t""yes" 1>&6
9983   have_lwp=yes
9984 else
9985   echo "$ac_t""no" 1>&6
9986 have_lwp=no
9987 fi
9988
9989
9990                 if test $have_lwp = yes ; then
9991                         cat >> confdefs.h <<\EOF
9992 #define HAVE_LWP 1
9993 EOF
9994
9995                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9996                         ol_link_threads=lwp
9997
9998                         if test $ol_with_yielding_select = auto ; then
9999                                 ol_with_yielding_select=no
10000                         fi
10001                 fi
10002         fi
10003 fi
10004
10005 if test $ol_with_yielding_select = yes ; then
10006         cat >> confdefs.h <<\EOF
10007 #define HAVE_YIELDING_SELECT 1
10008 EOF
10009
10010 fi
10011
10012 if test $ol_with_threads = manual ; then
10013                 ol_link_threads=yes
10014
10015         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10016
10017         for ac_hdr in pthread.h sched.h
10018 do
10019 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10020 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10021 echo "configure:10022: checking for $ac_hdr" >&5
10022 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   cat > conftest.$ac_ext <<EOF
10026 #line 10027 "configure"
10027 #include "confdefs.h"
10028 #include <$ac_hdr>
10029 EOF
10030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10031 { (eval echo configure:10032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10033 if test -z "$ac_err"; then
10034   rm -rf conftest*
10035   eval "ac_cv_header_$ac_safe=yes"
10036 else
10037   echo "$ac_err" >&5
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   eval "ac_cv_header_$ac_safe=no"
10042 fi
10043 rm -f conftest*
10044 fi
10045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10046   echo "$ac_t""yes" 1>&6
10047     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10048   cat >> confdefs.h <<EOF
10049 #define $ac_tr_hdr 1
10050 EOF
10051  
10052 else
10053   echo "$ac_t""no" 1>&6
10054 fi
10055 done
10056
10057         for ac_func in sched_yield pthread_yield
10058 do
10059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10060 echo "configure:10061: checking for $ac_func" >&5
10061 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10062   echo $ac_n "(cached) $ac_c" 1>&6
10063 else
10064   cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 /* System header to define __stub macros and hopefully few prototypes,
10068     which can conflict with char $ac_func(); below.  */
10069 #include <assert.h>
10070 /* Override any gcc2 internal prototype to avoid an error.  */
10071 /* We use char because int might match the return type of a gcc2
10072     builtin and then its argument prototype would still apply.  */
10073 char $ac_func();
10074 char (*f)();
10075
10076 int main() {
10077
10078 /* The GNU C library defines this for functions which it implements
10079     to always fail with ENOSYS.  Some functions are actually named
10080     something starting with __ and the normal name is an alias.  */
10081 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10082 choke me
10083 #else
10084 f = $ac_func;
10085 #endif
10086
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10090   rm -rf conftest*
10091   eval "ac_cv_func_$ac_func=yes"
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   eval "ac_cv_func_$ac_func=no"
10097 fi
10098 rm -f conftest*
10099 fi
10100
10101 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10102   echo "$ac_t""yes" 1>&6
10103     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10104   cat >> confdefs.h <<EOF
10105 #define $ac_tr_func 1
10106 EOF
10107  
10108 else
10109   echo "$ac_t""no" 1>&6
10110 fi
10111 done
10112
10113         
10114         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10115 echo "configure:10116: checking for LinuxThreads pthread.h" >&5
10116 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10117   echo $ac_n "(cached) $ac_c" 1>&6
10118 else
10119   cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122 #include <pthread.h>
10123 EOF
10124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10125   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10126   rm -rf conftest*
10127   ol_cv_header_linux_threads=yes
10128 else
10129   rm -rf conftest*
10130   ol_cv_header_linux_threads=no
10131 fi
10132 rm -f conftest*
10133
10134                 
10135 fi
10136
10137 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10138         if test $ol_cv_header_linux_threads = yes; then
10139                 cat >> confdefs.h <<\EOF
10140 #define HAVE_LINUX_THREADS 1
10141 EOF
10142
10143         fi
10144
10145
10146         for ac_hdr in mach/cthreads.h
10147 do
10148 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10149 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10150 echo "configure:10151: checking for $ac_hdr" >&5
10151 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10152   echo $ac_n "(cached) $ac_c" 1>&6
10153 else
10154   cat > conftest.$ac_ext <<EOF
10155 #line 10156 "configure"
10156 #include "confdefs.h"
10157 #include <$ac_hdr>
10158 EOF
10159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10160 { (eval echo configure:10161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10162 if test -z "$ac_err"; then
10163   rm -rf conftest*
10164   eval "ac_cv_header_$ac_safe=yes"
10165 else
10166   echo "$ac_err" >&5
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -rf conftest*
10170   eval "ac_cv_header_$ac_safe=no"
10171 fi
10172 rm -f conftest*
10173 fi
10174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10175   echo "$ac_t""yes" 1>&6
10176     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10177   cat >> confdefs.h <<EOF
10178 #define $ac_tr_hdr 1
10179 EOF
10180  
10181 else
10182   echo "$ac_t""no" 1>&6
10183 fi
10184 done
10185
10186         for ac_hdr in lwp/lwp.h
10187 do
10188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10190 echo "configure:10191: checking for $ac_hdr" >&5
10191 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10192   echo $ac_n "(cached) $ac_c" 1>&6
10193 else
10194   cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 #include <$ac_hdr>
10198 EOF
10199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10200 { (eval echo configure:10201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10202 if test -z "$ac_err"; then
10203   rm -rf conftest*
10204   eval "ac_cv_header_$ac_safe=yes"
10205 else
10206   echo "$ac_err" >&5
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -rf conftest*
10210   eval "ac_cv_header_$ac_safe=no"
10211 fi
10212 rm -f conftest*
10213 fi
10214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10215   echo "$ac_t""yes" 1>&6
10216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10217   cat >> confdefs.h <<EOF
10218 #define $ac_tr_hdr 1
10219 EOF
10220  
10221 else
10222   echo "$ac_t""no" 1>&6
10223 fi
10224 done
10225
10226         for ac_hdr in thread.h synch.h
10227 do
10228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10230 echo "configure:10231: checking for $ac_hdr" >&5
10231 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10232   echo $ac_n "(cached) $ac_c" 1>&6
10233 else
10234   cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237 #include <$ac_hdr>
10238 EOF
10239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10240 { (eval echo configure:10241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10242 if test -z "$ac_err"; then
10243   rm -rf conftest*
10244   eval "ac_cv_header_$ac_safe=yes"
10245 else
10246   echo "$ac_err" >&5
10247   echo "configure: failed program was:" >&5
10248   cat conftest.$ac_ext >&5
10249   rm -rf conftest*
10250   eval "ac_cv_header_$ac_safe=no"
10251 fi
10252 rm -f conftest*
10253 fi
10254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10255   echo "$ac_t""yes" 1>&6
10256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10257   cat >> confdefs.h <<EOF
10258 #define $ac_tr_hdr 1
10259 EOF
10260  
10261 else
10262   echo "$ac_t""no" 1>&6
10263 fi
10264 done
10265
10266 fi
10267
10268 if test $ol_link_threads != no ; then  
10269                         cat >> confdefs.h <<\EOF
10270 #define REENTRANT 1
10271 EOF
10272
10273         cat >> confdefs.h <<\EOF
10274 #define _REENTRANT 1
10275 EOF
10276
10277         cat >> confdefs.h <<\EOF
10278 #define THREAD_SAFE 1
10279 EOF
10280
10281         cat >> confdefs.h <<\EOF
10282 #define _THREAD_SAFE 1
10283 EOF
10284
10285         cat >> confdefs.h <<\EOF
10286 #define THREADSAFE 1
10287 EOF
10288
10289         cat >> confdefs.h <<\EOF
10290 #define _THREADSAFE 1
10291 EOF
10292
10293         cat >> confdefs.h <<\EOF
10294 #define _SGI_MP_SOURCE 1
10295 EOF
10296
10297
10298                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10299 echo "configure:10300: checking for thread specific errno" >&5
10300 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10301   echo $ac_n "(cached) $ac_c" 1>&6
10302 else
10303   
10304                 cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307 #include <errno.h>
10308 int main() {
10309 errno = 0;
10310 ; return 0; }
10311 EOF
10312 if { (eval echo configure:10313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10313   rm -rf conftest*
10314   ol_cv_errno_thread_specific=yes
10315 else
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -rf conftest*
10319   ol_cv_errno_thread_specific=no
10320 fi
10321 rm -f conftest*
10322         
10323 fi
10324
10325 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10326
10327                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10328 echo "configure:10329: checking for thread specific h_errno" >&5
10329 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10330   echo $ac_n "(cached) $ac_c" 1>&6
10331 else
10332   
10333                 cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 #include <netdb.h>
10337 int main() {
10338 h_errno = 0;
10339 ; return 0; }
10340 EOF
10341 if { (eval echo configure:10342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10342   rm -rf conftest*
10343   ol_cv_h_errno_thread_specific=yes
10344 else
10345   echo "configure: failed program was:" >&5
10346   cat conftest.$ac_ext >&5
10347   rm -rf conftest*
10348   ol_cv_h_errno_thread_specific=no
10349 fi
10350 rm -f conftest*
10351         
10352 fi
10353
10354 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10355
10356         if test $ol_cv_errno_thread_specific != yes \
10357                 -o $ol_cv_h_errno_thread_specific != yes ; then
10358                 LIBS="$LTHREAD_LIBS $LIBS"
10359                 LTHREAD_LIBS=""
10360         fi
10361
10362 fi  
10363
10364 if test $ol_link_threads = no ; then
10365         if test $ol_with_threads = yes ; then
10366                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10367         fi
10368
10369         if test $ol_with_threads = auto ; then
10370                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10371                 ol_with_threads=no
10372         fi
10373
10374         cat >> confdefs.h <<\EOF
10375 #define NO_THREADS 1
10376 EOF
10377
10378         LTHREAD_LIBS=""
10379 fi
10380
10381 if test $ol_link_threads != no ; then
10382         cat >> confdefs.h <<\EOF
10383 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10384 EOF
10385
10386 fi
10387
10388
10389 ol_link_ldbm=no 
10390 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10391         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10392 echo "configure:10393: checking for DB2 library" >&5
10393 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10394   echo $ac_n "(cached) $ac_c" 1>&6
10395 else
10396         ol_LIBS="$LIBS"
10397         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10398 echo "configure:10399: checking for db_open in -ldb" >&5
10399 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   ac_save_LIBS="$LIBS"
10404 LIBS="-ldb  $LIBS"
10405 cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 /* Override any gcc2 internal prototype to avoid an error.  */
10409 /* We use char because int might match the return type of a gcc2
10410     builtin and then its argument prototype would still apply.  */
10411 char db_open();
10412
10413 int main() {
10414 db_open()
10415 ; return 0; }
10416 EOF
10417 if { (eval echo configure:10418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10418   rm -rf conftest*
10419   eval "ac_cv_lib_$ac_lib_var=yes"
10420 else
10421   echo "configure: failed program was:" >&5
10422   cat conftest.$ac_ext >&5
10423   rm -rf conftest*
10424   eval "ac_cv_lib_$ac_lib_var=no"
10425 fi
10426 rm -f conftest*
10427 LIBS="$ac_save_LIBS"
10428
10429 fi
10430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10431   echo "$ac_t""yes" 1>&6
10432   ol_cv_lib_db2=-ldb
10433 else
10434   echo "$ac_t""no" 1>&6
10435 ol_cv_lib_db2=no
10436 fi
10437
10438         LIBS="$ol_LIBS"
10439
10440 fi
10441
10442 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10443
10444 for ac_hdr in db.h
10445 do
10446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10448 echo "configure:10449: checking for $ac_hdr" >&5
10449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 #include <$ac_hdr>
10456 EOF
10457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10458 { (eval echo configure:10459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10460 if test -z "$ac_err"; then
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=yes"
10463 else
10464   echo "$ac_err" >&5
10465   echo "configure: failed program was:" >&5
10466   cat conftest.$ac_ext >&5
10467   rm -rf conftest*
10468   eval "ac_cv_header_$ac_safe=no"
10469 fi
10470 rm -f conftest*
10471 fi
10472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10473   echo "$ac_t""yes" 1>&6
10474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10475   cat >> confdefs.h <<EOF
10476 #define $ac_tr_hdr 1
10477 EOF
10478  
10479 else
10480   echo "$ac_t""no" 1>&6
10481 fi
10482 done
10483
10484 if test $ac_cv_header_db_h = yes ; then
10485         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10486 echo "configure:10487: checking if db.h is DB2" >&5
10487 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10488   echo $ac_n "(cached) $ac_c" 1>&6
10489 else
10490   
10491                 cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494
10495 #                       include <db.h>
10496                         /* this check could be improved */
10497 #                       ifdef DB_VERSION_MAJOR
10498 #                               if DB_VERSION_MAJOR == 2
10499                                         __db_version_2
10500 #                               endif
10501 #                       endif
10502                 
10503 EOF
10504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10505   egrep "__db_version_2" >/dev/null 2>&1; then
10506   rm -rf conftest*
10507   ol_cv_header_db2=yes
10508 else
10509   rm -rf conftest*
10510   ol_cv_header_db2=no
10511 fi
10512 rm -f conftest*
10513
10514 fi
10515
10516 echo "$ac_t""$ol_cv_header_db2" 1>&6
10517 else
10518         ol_cv_header_db2=no
10519 fi
10520
10521
10522  
10523  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10524 echo "configure:10525: checking for Berkeley DB2" >&5
10525 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10526   echo $ac_n "(cached) $ac_c" 1>&6
10527 else
10528   
10529         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10530                 ol_cv_berkeley_db2=no
10531         else
10532                 ol_cv_berkeley_db2=yes
10533         fi
10534
10535 fi
10536
10537 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10538  if test $ol_cv_berkeley_db2 = yes ; then
10539         cat >> confdefs.h <<\EOF
10540 #define HAVE_BERKELEY_DB2 1
10541 EOF
10542
10543  fi
10544
10545
10546         if test $ol_cv_berkeley_db2 = yes ; then
10547                 ol_link_ldbm=db2
10548                 ol_with_ldbm_api=db2
10549
10550                 if test $ol_with_ldbm_type = hash ; then
10551                         cat >> confdefs.h <<\EOF
10552 #define LDBM_USE_DBHASH 1
10553 EOF
10554
10555                 else
10556                         cat >> confdefs.h <<\EOF
10557 #define LDBM_USE_DBBTREE 1
10558 EOF
10559
10560                 fi
10561
10562                                                 if test $ol_cv_lib_db2 != yes ; then
10563                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10564                 fi
10565         fi
10566 fi
10567
10568 ol_link_bdb2=no
10569 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10570         ol_link_bdb2=yes
10571 fi
10572
10573 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10574         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10575 echo "configure:10576: checking for Berkeley DB library" >&5
10576 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10577   echo $ac_n "(cached) $ac_c" 1>&6
10578 else
10579   
10580         for ac_hdr in db1/db.h
10581 do
10582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10584 echo "configure:10585: checking for $ac_hdr" >&5
10585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10586   echo $ac_n "(cached) $ac_c" 1>&6
10587 else
10588   cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591 #include <$ac_hdr>
10592 EOF
10593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10594 { (eval echo configure:10595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10596 if test -z "$ac_err"; then
10597   rm -rf conftest*
10598   eval "ac_cv_header_$ac_safe=yes"
10599 else
10600   echo "$ac_err" >&5
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -rf conftest*
10604   eval "ac_cv_header_$ac_safe=no"
10605 fi
10606 rm -f conftest*
10607 fi
10608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10609   echo "$ac_t""yes" 1>&6
10610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10611   cat >> confdefs.h <<EOF
10612 #define $ac_tr_hdr 1
10613 EOF
10614  
10615 else
10616   echo "$ac_t""no" 1>&6
10617 fi
10618 done
10619
10620         ol_LIBS="$LIBS"
10621         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10622 echo "configure:10623: checking for dbopen" >&5
10623 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   cat > conftest.$ac_ext <<EOF
10627 #line 10628 "configure"
10628 #include "confdefs.h"
10629 /* System header to define __stub macros and hopefully few prototypes,
10630     which can conflict with char dbopen(); below.  */
10631 #include <assert.h>
10632 /* Override any gcc2 internal prototype to avoid an error.  */
10633 /* We use char because int might match the return type of a gcc2
10634     builtin and then its argument prototype would still apply.  */
10635 char dbopen();
10636 char (*f)();
10637
10638 int main() {
10639
10640 /* The GNU C library defines this for functions which it implements
10641     to always fail with ENOSYS.  Some functions are actually named
10642     something starting with __ and the normal name is an alias.  */
10643 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10644 choke me
10645 #else
10646 f = dbopen;
10647 #endif
10648
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10652   rm -rf conftest*
10653   eval "ac_cv_func_dbopen=yes"
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   eval "ac_cv_func_dbopen=no"
10659 fi
10660 rm -f conftest*
10661 fi
10662
10663 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10664   echo "$ac_t""yes" 1>&6
10665   ol_cv_lib_db=yes
10666 else
10667   echo "$ac_t""no" 1>&6
10668
10669                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10670 echo "configure:10671: checking for dbopen in -ldb1" >&5
10671 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10672 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10673   echo $ac_n "(cached) $ac_c" 1>&6
10674 else
10675   ac_save_LIBS="$LIBS"
10676 LIBS="-ldb1  $LIBS"
10677 cat > conftest.$ac_ext <<EOF
10678 #line 10679 "configure"
10679 #include "confdefs.h"
10680 /* Override any gcc2 internal prototype to avoid an error.  */
10681 /* We use char because int might match the return type of a gcc2
10682     builtin and then its argument prototype would still apply.  */
10683 char dbopen();
10684
10685 int main() {
10686 dbopen()
10687 ; return 0; }
10688 EOF
10689 if { (eval echo configure:10690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10690   rm -rf conftest*
10691   eval "ac_cv_lib_$ac_lib_var=yes"
10692 else
10693   echo "configure: failed program was:" >&5
10694   cat conftest.$ac_ext >&5
10695   rm -rf conftest*
10696   eval "ac_cv_lib_$ac_lib_var=no"
10697 fi
10698 rm -f conftest*
10699 LIBS="$ac_save_LIBS"
10700
10701 fi
10702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10703   echo "$ac_t""yes" 1>&6
10704   ol_cv_lib_db=-ldb1
10705 else
10706   echo "$ac_t""no" 1>&6
10707
10708                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10709 echo "configure:10710: checking for dbopen in -ldb" >&5
10710 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10711 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10712   echo $ac_n "(cached) $ac_c" 1>&6
10713 else
10714   ac_save_LIBS="$LIBS"
10715 LIBS="-ldb  $LIBS"
10716 cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 /* Override any gcc2 internal prototype to avoid an error.  */
10720 /* We use char because int might match the return type of a gcc2
10721     builtin and then its argument prototype would still apply.  */
10722 char dbopen();
10723
10724 int main() {
10725 dbopen()
10726 ; return 0; }
10727 EOF
10728 if { (eval echo configure:10729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10729   rm -rf conftest*
10730   eval "ac_cv_lib_$ac_lib_var=yes"
10731 else
10732   echo "configure: failed program was:" >&5
10733   cat conftest.$ac_ext >&5
10734   rm -rf conftest*
10735   eval "ac_cv_lib_$ac_lib_var=no"
10736 fi
10737 rm -f conftest*
10738 LIBS="$ac_save_LIBS"
10739
10740 fi
10741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10742   echo "$ac_t""yes" 1>&6
10743   ol_cv_lib_db=-ldb
10744 else
10745   echo "$ac_t""no" 1>&6
10746 ol_cv_lib_db=no
10747 fi
10748
10749                 
10750 fi
10751
10752         
10753 fi
10754
10755         LIBS="$ol_LIBS"
10756
10757 fi
10758
10759 echo "$ac_t""$ol_cv_lib_db" 1>&6
10760
10761
10762 for ac_hdr in db_185.h
10763 do
10764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10766 echo "configure:10767: checking for $ac_hdr" >&5
10767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10768   echo $ac_n "(cached) $ac_c" 1>&6
10769 else
10770   cat > conftest.$ac_ext <<EOF
10771 #line 10772 "configure"
10772 #include "confdefs.h"
10773 #include <$ac_hdr>
10774 EOF
10775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10776 { (eval echo configure:10777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10778 if test -z "$ac_err"; then
10779   rm -rf conftest*
10780   eval "ac_cv_header_$ac_safe=yes"
10781 else
10782   echo "$ac_err" >&5
10783   echo "configure: failed program was:" >&5
10784   cat conftest.$ac_ext >&5
10785   rm -rf conftest*
10786   eval "ac_cv_header_$ac_safe=no"
10787 fi
10788 rm -f conftest*
10789 fi
10790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10791   echo "$ac_t""yes" 1>&6
10792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10793   cat >> confdefs.h <<EOF
10794 #define $ac_tr_hdr 1
10795 EOF
10796  
10797 else
10798   echo "$ac_t""no" 1>&6
10799 fi
10800 done
10801
10802 if test "$ol_cv_header_db2" = yes ; then
10803         
10804         ol_cv_header_db=$ac_cv_header_db_185_h
10805 else
10806         ol_cv_header_db=$ac_cv_header_db_h
10807 fi
10808
10809
10810  
10811  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10812 echo "configure:10813: checking for Berkeley DB" >&5
10813 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10818                 ol_cv_berkeley_db=no
10819         else
10820                 ol_cv_berkeley_db=yes
10821         fi
10822
10823 fi
10824
10825 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10826  if test $ol_cv_berkeley_db = yes ; then
10827         cat >> confdefs.h <<\EOF
10828 #define HAVE_BERKELEY_DB 1
10829 EOF
10830
10831  fi
10832
10833
10834         if test $ol_cv_berkeley_db = yes ; then
10835                 ol_link_ldbm=db
10836                 ol_with_ldbm_api=db
10837
10838                 if test $ol_with_ldbm_type = hash ; then
10839                         cat >> confdefs.h <<\EOF
10840 #define LDBM_USE_DBHASH 1
10841 EOF
10842
10843                 else
10844                         cat >> confdefs.h <<\EOF
10845 #define LDBM_USE_DBBTREE 1
10846 EOF
10847
10848                 fi
10849
10850                                                 if test $ol_cv_lib_db != yes ; then
10851                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10852                 fi
10853         fi
10854 fi
10855
10856 if test $ol_with_ldbm_api = manual ; then
10857                 ol_link_ldbm=yes
10858
10859         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10860
10861         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10862 do
10863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10865 echo "configure:10866: checking for $ac_hdr" >&5
10866 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10867   echo $ac_n "(cached) $ac_c" 1>&6
10868 else
10869   cat > conftest.$ac_ext <<EOF
10870 #line 10871 "configure"
10871 #include "confdefs.h"
10872 #include <$ac_hdr>
10873 EOF
10874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10875 { (eval echo configure:10876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10877 if test -z "$ac_err"; then
10878   rm -rf conftest*
10879   eval "ac_cv_header_$ac_safe=yes"
10880 else
10881   echo "$ac_err" >&5
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -rf conftest*
10885   eval "ac_cv_header_$ac_safe=no"
10886 fi
10887 rm -f conftest*
10888 fi
10889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10890   echo "$ac_t""yes" 1>&6
10891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10892   cat >> confdefs.h <<EOF
10893 #define $ac_tr_hdr 1
10894 EOF
10895  
10896 else
10897   echo "$ac_t""no" 1>&6
10898 fi
10899 done
10900
10901 fi
10902
10903 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10904         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10905         ol_with_ldbm_api=none
10906 fi
10907
10908 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10909         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10910 echo "configure:10911: checking for MDBM library" >&5
10911 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10912   echo $ac_n "(cached) $ac_c" 1>&6
10913 else
10914         ol_LIBS="$LIBS"
10915         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10916 echo "configure:10917: checking for mdbm_set_chain" >&5
10917 if eval "test \"\${ac_cv_func_mdbm_set_chain+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 /* System header to define __stub macros and hopefully few prototypes,
10924     which can conflict with char mdbm_set_chain(); below.  */
10925 #include <assert.h>
10926 /* Override any gcc2 internal prototype to avoid an error.  */
10927 /* We use char because int might match the return type of a gcc2
10928     builtin and then its argument prototype would still apply.  */
10929 char mdbm_set_chain();
10930 char (*f)();
10931
10932 int main() {
10933
10934 /* The GNU C library defines this for functions which it implements
10935     to always fail with ENOSYS.  Some functions are actually named
10936     something starting with __ and the normal name is an alias.  */
10937 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10938 choke me
10939 #else
10940 f = mdbm_set_chain;
10941 #endif
10942
10943 ; return 0; }
10944 EOF
10945 if { (eval echo configure:10946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10946   rm -rf conftest*
10947   eval "ac_cv_func_mdbm_set_chain=yes"
10948 else
10949   echo "configure: failed program was:" >&5
10950   cat conftest.$ac_ext >&5
10951   rm -rf conftest*
10952   eval "ac_cv_func_mdbm_set_chain=no"
10953 fi
10954 rm -f conftest*
10955 fi
10956
10957 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10958   echo "$ac_t""yes" 1>&6
10959   ol_cv_lib_mdbm=yes
10960 else
10961   echo "$ac_t""no" 1>&6
10962
10963                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10964 echo "configure:10965: checking for mdbm_set_chain in -lmdbm" >&5
10965 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10967   echo $ac_n "(cached) $ac_c" 1>&6
10968 else
10969   ac_save_LIBS="$LIBS"
10970 LIBS="-lmdbm  $LIBS"
10971 cat > conftest.$ac_ext <<EOF
10972 #line 10973 "configure"
10973 #include "confdefs.h"
10974 /* Override any gcc2 internal prototype to avoid an error.  */
10975 /* We use char because int might match the return type of a gcc2
10976     builtin and then its argument prototype would still apply.  */
10977 char mdbm_set_chain();
10978
10979 int main() {
10980 mdbm_set_chain()
10981 ; return 0; }
10982 EOF
10983 if { (eval echo configure:10984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10984   rm -rf conftest*
10985   eval "ac_cv_lib_$ac_lib_var=yes"
10986 else
10987   echo "configure: failed program was:" >&5
10988   cat conftest.$ac_ext >&5
10989   rm -rf conftest*
10990   eval "ac_cv_lib_$ac_lib_var=no"
10991 fi
10992 rm -f conftest*
10993 LIBS="$ac_save_LIBS"
10994
10995 fi
10996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10997   echo "$ac_t""yes" 1>&6
10998   ol_cv_lib_mdbm=-lmdbm
10999 else
11000   echo "$ac_t""no" 1>&6
11001 ol_cv_lib_mdbm=no
11002 fi
11003
11004         
11005 fi
11006
11007         LIBS="$ol_LIBS"
11008
11009 fi
11010
11011 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11012
11013
11014  for ac_hdr in mdbm.h
11015 do
11016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11018 echo "configure:11019: checking for $ac_hdr" >&5
11019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11020   echo $ac_n "(cached) $ac_c" 1>&6
11021 else
11022   cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 #include <$ac_hdr>
11026 EOF
11027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11028 { (eval echo configure:11029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11030 if test -z "$ac_err"; then
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=yes"
11033 else
11034   echo "$ac_err" >&5
11035   echo "configure: failed program was:" >&5
11036   cat conftest.$ac_ext >&5
11037   rm -rf conftest*
11038   eval "ac_cv_header_$ac_safe=no"
11039 fi
11040 rm -f conftest*
11041 fi
11042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11043   echo "$ac_t""yes" 1>&6
11044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11045   cat >> confdefs.h <<EOF
11046 #define $ac_tr_hdr 1
11047 EOF
11048  
11049 else
11050   echo "$ac_t""no" 1>&6
11051 fi
11052 done
11053
11054  echo $ac_n "checking for db""... $ac_c" 1>&6
11055 echo "configure:11056: checking for db" >&5
11056 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11057   echo $ac_n "(cached) $ac_c" 1>&6
11058 else
11059   
11060         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11061                 ol_cv_mdbm=no
11062         else
11063                 ol_cv_mdbm=yes
11064         fi
11065
11066 fi
11067
11068 echo "$ac_t""$ol_cv_mdbm" 1>&6
11069  if test $ol_cv_mdbm = yes ; then
11070         cat >> confdefs.h <<\EOF
11071 #define HAVE_MDBM 1
11072 EOF
11073
11074  fi
11075
11076
11077         if test $ol_cv_mdbm = yes ; then
11078                 ol_link_ldbm=mdbm
11079                 ol_with_ldbm_api=mdbm
11080                 if test $ol_cv_lib_mdbm != yes ; then
11081                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11082                 fi
11083         fi
11084 fi
11085
11086 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11087         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11088 echo "configure:11089: checking for GDBM library" >&5
11089 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11090   echo $ac_n "(cached) $ac_c" 1>&6
11091 else
11092         ol_LIBS="$LIBS"
11093         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11094 echo "configure:11095: checking for gdbm_open" >&5
11095 if eval "test \"\${ac_cv_func_gdbm_open+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 /* System header to define __stub macros and hopefully few prototypes,
11102     which can conflict with char gdbm_open(); below.  */
11103 #include <assert.h>
11104 /* Override any gcc2 internal prototype to avoid an error.  */
11105 /* We use char because int might match the return type of a gcc2
11106     builtin and then its argument prototype would still apply.  */
11107 char gdbm_open();
11108 char (*f)();
11109
11110 int main() {
11111
11112 /* The GNU C library defines this for functions which it implements
11113     to always fail with ENOSYS.  Some functions are actually named
11114     something starting with __ and the normal name is an alias.  */
11115 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11116 choke me
11117 #else
11118 f = gdbm_open;
11119 #endif
11120
11121 ; return 0; }
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11124   rm -rf conftest*
11125   eval "ac_cv_func_gdbm_open=yes"
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_func_gdbm_open=no"
11131 fi
11132 rm -f conftest*
11133 fi
11134
11135 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11136   echo "$ac_t""yes" 1>&6
11137   ol_cv_lib_gdbm=yes
11138 else
11139   echo "$ac_t""no" 1>&6
11140
11141                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11142 echo "configure:11143: checking for gdbm_open in -lgdbm" >&5
11143 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11145   echo $ac_n "(cached) $ac_c" 1>&6
11146 else
11147   ac_save_LIBS="$LIBS"
11148 LIBS="-lgdbm  $LIBS"
11149 cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 /* Override any gcc2 internal prototype to avoid an error.  */
11153 /* We use char because int might match the return type of a gcc2
11154     builtin and then its argument prototype would still apply.  */
11155 char gdbm_open();
11156
11157 int main() {
11158 gdbm_open()
11159 ; return 0; }
11160 EOF
11161 if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11162   rm -rf conftest*
11163   eval "ac_cv_lib_$ac_lib_var=yes"
11164 else
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   eval "ac_cv_lib_$ac_lib_var=no"
11169 fi
11170 rm -f conftest*
11171 LIBS="$ac_save_LIBS"
11172
11173 fi
11174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11175   echo "$ac_t""yes" 1>&6
11176   ol_cv_lib_gdbm=-lgdbm
11177 else
11178   echo "$ac_t""no" 1>&6
11179 ol_cv_lib_gdbm=no
11180 fi
11181
11182         
11183 fi
11184
11185         LIBS="$ol_LIBS"
11186
11187 fi
11188
11189 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11190
11191
11192  for ac_hdr in gdbm.h
11193 do
11194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11196 echo "configure:11197: checking for $ac_hdr" >&5
11197 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11198   echo $ac_n "(cached) $ac_c" 1>&6
11199 else
11200   cat > conftest.$ac_ext <<EOF
11201 #line 11202 "configure"
11202 #include "confdefs.h"
11203 #include <$ac_hdr>
11204 EOF
11205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11206 { (eval echo configure:11207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11208 if test -z "$ac_err"; then
11209   rm -rf conftest*
11210   eval "ac_cv_header_$ac_safe=yes"
11211 else
11212   echo "$ac_err" >&5
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -rf conftest*
11216   eval "ac_cv_header_$ac_safe=no"
11217 fi
11218 rm -f conftest*
11219 fi
11220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11221   echo "$ac_t""yes" 1>&6
11222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11223   cat >> confdefs.h <<EOF
11224 #define $ac_tr_hdr 1
11225 EOF
11226  
11227 else
11228   echo "$ac_t""no" 1>&6
11229 fi
11230 done
11231
11232  echo $ac_n "checking for db""... $ac_c" 1>&6
11233 echo "configure:11234: checking for db" >&5
11234 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   
11238         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11239                 ol_cv_gdbm=no
11240         else
11241                 ol_cv_gdbm=yes
11242         fi
11243
11244 fi
11245
11246 echo "$ac_t""$ol_cv_gdbm" 1>&6
11247  if test $ol_cv_gdbm = yes ; then
11248         cat >> confdefs.h <<\EOF
11249 #define HAVE_GDBM 1
11250 EOF
11251
11252  fi
11253
11254
11255         if test $ol_cv_gdbm = yes ; then
11256                 ol_link_ldbm=gdbm
11257                 ol_with_ldbm_api=gdbm
11258
11259                 if test $ol_cv_lib_gdbm != yes ; then
11260                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11261                 fi
11262         fi
11263 fi
11264
11265 if test $ol_with_ldbm_api = auto ; then
11266         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11267 elif test $ol_with_ldbm_api = ndbm ; then
11268         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11269 echo "configure:11270: checking for NDBM library" >&5
11270 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11271   echo $ac_n "(cached) $ac_c" 1>&6
11272 else
11273         ol_LIBS="$LIBS"
11274         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11275 echo "configure:11276: checking for dbm_open" >&5
11276 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11277   echo $ac_n "(cached) $ac_c" 1>&6
11278 else
11279   cat > conftest.$ac_ext <<EOF
11280 #line 11281 "configure"
11281 #include "confdefs.h"
11282 /* System header to define __stub macros and hopefully few prototypes,
11283     which can conflict with char dbm_open(); below.  */
11284 #include <assert.h>
11285 /* Override any gcc2 internal prototype to avoid an error.  */
11286 /* We use char because int might match the return type of a gcc2
11287     builtin and then its argument prototype would still apply.  */
11288 char dbm_open();
11289 char (*f)();
11290
11291 int main() {
11292
11293 /* The GNU C library defines this for functions which it implements
11294     to always fail with ENOSYS.  Some functions are actually named
11295     something starting with __ and the normal name is an alias.  */
11296 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11297 choke me
11298 #else
11299 f = dbm_open;
11300 #endif
11301
11302 ; return 0; }
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11305   rm -rf conftest*
11306   eval "ac_cv_func_dbm_open=yes"
11307 else
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   eval "ac_cv_func_dbm_open=no"
11312 fi
11313 rm -f conftest*
11314 fi
11315
11316 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11317   echo "$ac_t""yes" 1>&6
11318   ol_cv_lib_ndbm=yes
11319 else
11320   echo "$ac_t""no" 1>&6
11321
11322                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11323 echo "configure:11324: checking for dbm_open in -lndbm" >&5
11324 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11326   echo $ac_n "(cached) $ac_c" 1>&6
11327 else
11328   ac_save_LIBS="$LIBS"
11329 LIBS="-lndbm  $LIBS"
11330 cat > conftest.$ac_ext <<EOF
11331 #line 11332 "configure"
11332 #include "confdefs.h"
11333 /* Override any gcc2 internal prototype to avoid an error.  */
11334 /* We use char because int might match the return type of a gcc2
11335     builtin and then its argument prototype would still apply.  */
11336 char dbm_open();
11337
11338 int main() {
11339 dbm_open()
11340 ; return 0; }
11341 EOF
11342 if { (eval echo configure:11343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11343   rm -rf conftest*
11344   eval "ac_cv_lib_$ac_lib_var=yes"
11345 else
11346   echo "configure: failed program was:" >&5
11347   cat conftest.$ac_ext >&5
11348   rm -rf conftest*
11349   eval "ac_cv_lib_$ac_lib_var=no"
11350 fi
11351 rm -f conftest*
11352 LIBS="$ac_save_LIBS"
11353
11354 fi
11355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11356   echo "$ac_t""yes" 1>&6
11357   ol_cv_lib_ndbm=-lndbm
11358 else
11359   echo "$ac_t""no" 1>&6
11360
11361                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11362 echo "configure:11363: checking for dbm_open in -ldbm" >&5
11363 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11365   echo $ac_n "(cached) $ac_c" 1>&6
11366 else
11367   ac_save_LIBS="$LIBS"
11368 LIBS="-ldbm  $LIBS"
11369 cat > conftest.$ac_ext <<EOF
11370 #line 11371 "configure"
11371 #include "confdefs.h"
11372 /* Override any gcc2 internal prototype to avoid an error.  */
11373 /* We use char because int might match the return type of a gcc2
11374     builtin and then its argument prototype would still apply.  */
11375 char dbm_open();
11376
11377 int main() {
11378 dbm_open()
11379 ; return 0; }
11380 EOF
11381 if { (eval echo configure:11382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11382   rm -rf conftest*
11383   eval "ac_cv_lib_$ac_lib_var=yes"
11384 else
11385   echo "configure: failed program was:" >&5
11386   cat conftest.$ac_ext >&5
11387   rm -rf conftest*
11388   eval "ac_cv_lib_$ac_lib_var=no"
11389 fi
11390 rm -f conftest*
11391 LIBS="$ac_save_LIBS"
11392
11393 fi
11394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11395   echo "$ac_t""yes" 1>&6
11396   ol_cv_lib_ndbm=-ldbm
11397 else
11398   echo "$ac_t""no" 1>&6
11399 ol_cv_lib_ndbm=no
11400 fi
11401                 
11402 fi
11403
11404         
11405 fi
11406
11407         LIBS="$ol_LIBS"
11408
11409 fi
11410
11411 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11412
11413
11414  for ac_hdr in ndbm.h
11415 do
11416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11418 echo "configure:11419: checking for $ac_hdr" >&5
11419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11420   echo $ac_n "(cached) $ac_c" 1>&6
11421 else
11422   cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 #include <$ac_hdr>
11426 EOF
11427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11428 { (eval echo configure:11429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11430 if test -z "$ac_err"; then
11431   rm -rf conftest*
11432   eval "ac_cv_header_$ac_safe=yes"
11433 else
11434   echo "$ac_err" >&5
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=no"
11439 fi
11440 rm -f conftest*
11441 fi
11442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11443   echo "$ac_t""yes" 1>&6
11444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11445   cat >> confdefs.h <<EOF
11446 #define $ac_tr_hdr 1
11447 EOF
11448  
11449 else
11450   echo "$ac_t""no" 1>&6
11451 fi
11452 done
11453
11454  echo $ac_n "checking for db""... $ac_c" 1>&6
11455 echo "configure:11456: checking for db" >&5
11456 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11457   echo $ac_n "(cached) $ac_c" 1>&6
11458 else
11459   
11460         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11461                 ol_cv_ndbm=no
11462         else
11463                 ol_cv_ndbm=yes
11464         fi
11465
11466 fi
11467
11468 echo "$ac_t""$ol_cv_ndbm" 1>&6
11469  if test $ol_cv_ndbm = yes ; then
11470         cat >> confdefs.h <<\EOF
11471 #define HAVE_NDBM 1
11472 EOF
11473
11474  fi
11475
11476
11477         if test $ol_cv_ndbm = yes ; then
11478                 ol_link_ldbm=ndbm
11479                 ol_with_ldbm_api=ndbm
11480
11481                 if test $ol_cv_lib_ndbm != yes ; then
11482                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11483                 fi
11484         fi
11485 fi
11486
11487 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11488         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11489         if test $ol_enable_ldbm = yes ; then
11490                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11491         fi
11492
11493         echo "configure: warning: disabling LDBM" 1>&2
11494         ol_enable_ldbm=no
11495 fi
11496
11497 if test $ol_enable_wrappers != no ; then
11498         for ac_hdr in tcpd.h
11499 do
11500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11502 echo "configure:11503: checking for $ac_hdr" >&5
11503 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11504   echo $ac_n "(cached) $ac_c" 1>&6
11505 else
11506   cat > conftest.$ac_ext <<EOF
11507 #line 11508 "configure"
11508 #include "confdefs.h"
11509 #include <$ac_hdr>
11510 EOF
11511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11512 { (eval echo configure:11513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11514 if test -z "$ac_err"; then
11515   rm -rf conftest*
11516   eval "ac_cv_header_$ac_safe=yes"
11517 else
11518   echo "$ac_err" >&5
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -rf conftest*
11522   eval "ac_cv_header_$ac_safe=no"
11523 fi
11524 rm -f conftest*
11525 fi
11526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11527   echo "$ac_t""yes" 1>&6
11528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11529   cat >> confdefs.h <<EOF
11530 #define $ac_tr_hdr 1
11531 EOF
11532  
11533 else
11534   echo "$ac_t""no" 1>&6
11535 fi
11536 done
11537
11538
11539         if test $ac_cv_header_tcpd_h != yes ; then
11540                 have_wrappers=no
11541         else
11542                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11543 echo "configure:11544: checking for main in -lwrap" >&5
11544 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11546   echo $ac_n "(cached) $ac_c" 1>&6
11547 else
11548   ac_save_LIBS="$LIBS"
11549 LIBS="-lwrap  $LIBS"
11550 cat > conftest.$ac_ext <<EOF
11551 #line 11552 "configure"
11552 #include "confdefs.h"
11553
11554 int main() {
11555 main()
11556 ; return 0; }
11557 EOF
11558 if { (eval echo configure:11559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11559   rm -rf conftest*
11560   eval "ac_cv_lib_$ac_lib_var=yes"
11561 else
11562   echo "configure: failed program was:" >&5
11563   cat conftest.$ac_ext >&5
11564   rm -rf conftest*
11565   eval "ac_cv_lib_$ac_lib_var=no"
11566 fi
11567 rm -f conftest*
11568 LIBS="$ac_save_LIBS"
11569
11570 fi
11571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11572   echo "$ac_t""yes" 1>&6
11573   have_wrappers=yes
11574 else
11575   echo "$ac_t""no" 1>&6
11576 have_wrappers=no
11577 fi
11578
11579         fi
11580
11581         if test $have_wrappers = yes ; then
11582                 cat >> confdefs.h <<\EOF
11583 #define HAVE_TCPD 1
11584 EOF
11585
11586                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11587
11588                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11589 echo "configure:11590: checking for main in -lnsl" >&5
11590 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   ac_save_LIBS="$LIBS"
11595 LIBS="-lnsl  $LIBS"
11596 cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599
11600 int main() {
11601 main()
11602 ; return 0; }
11603 EOF
11604 if { (eval echo configure:11605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11605   rm -rf conftest*
11606   eval "ac_cv_lib_$ac_lib_var=yes"
11607 else
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -rf conftest*
11611   eval "ac_cv_lib_$ac_lib_var=no"
11612 fi
11613 rm -f conftest*
11614 LIBS="$ac_save_LIBS"
11615
11616 fi
11617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11618   echo "$ac_t""yes" 1>&6
11619     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11620     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11621   cat >> confdefs.h <<EOF
11622 #define $ac_tr_lib 1
11623 EOF
11624
11625   LIBS="-lnsl $LIBS"
11626
11627 else
11628   echo "$ac_t""no" 1>&6
11629 fi
11630
11631         else
11632                 echo "configure: warning: could not find -lwrap" 1>&2
11633                 if test $ol_enable_wrappers = yes ; then
11634                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11635                 fi
11636
11637                 echo "configure: warning: disabling wrappers support" 1>&2
11638                 ol_enable_wrappers=no
11639         fi
11640 fi
11641
11642 if test $ol_enable_syslog != no ; then
11643         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11644 echo "configure:11645: checking for openlog" >&5
11645 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11646   echo $ac_n "(cached) $ac_c" 1>&6
11647 else
11648   cat > conftest.$ac_ext <<EOF
11649 #line 11650 "configure"
11650 #include "confdefs.h"
11651 /* System header to define __stub macros and hopefully few prototypes,
11652     which can conflict with char openlog(); below.  */
11653 #include <assert.h>
11654 /* Override any gcc2 internal prototype to avoid an error.  */
11655 /* We use char because int might match the return type of a gcc2
11656     builtin and then its argument prototype would still apply.  */
11657 char openlog();
11658 char (*f)();
11659
11660 int main() {
11661
11662 /* The GNU C library defines this for functions which it implements
11663     to always fail with ENOSYS.  Some functions are actually named
11664     something starting with __ and the normal name is an alias.  */
11665 #if defined (__stub_openlog) || defined (__stub___openlog)
11666 choke me
11667 #else
11668 f = openlog;
11669 #endif
11670
11671 ; return 0; }
11672 EOF
11673 if { (eval echo configure:11674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11674   rm -rf conftest*
11675   eval "ac_cv_func_openlog=yes"
11676 else
11677   echo "configure: failed program was:" >&5
11678   cat conftest.$ac_ext >&5
11679   rm -rf conftest*
11680   eval "ac_cv_func_openlog=no"
11681 fi
11682 rm -f conftest*
11683 fi
11684
11685 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11686   echo "$ac_t""yes" 1>&6
11687   :
11688 else
11689   echo "$ac_t""no" 1>&6
11690 fi
11691
11692         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11693                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11694         fi
11695         ol_enable_syslog=$ac_cv_func_openlog
11696 fi
11697
11698 if test $ol_enable_dmalloc != no ; then
11699         for ac_hdr in dmalloc.h
11700 do
11701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11703 echo "configure:11704: checking for $ac_hdr" >&5
11704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11705   echo $ac_n "(cached) $ac_c" 1>&6
11706 else
11707   cat > conftest.$ac_ext <<EOF
11708 #line 11709 "configure"
11709 #include "confdefs.h"
11710 #include <$ac_hdr>
11711 EOF
11712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11713 { (eval echo configure:11714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11715 if test -z "$ac_err"; then
11716   rm -rf conftest*
11717   eval "ac_cv_header_$ac_safe=yes"
11718 else
11719   echo "$ac_err" >&5
11720   echo "configure: failed program was:" >&5
11721   cat conftest.$ac_ext >&5
11722   rm -rf conftest*
11723   eval "ac_cv_header_$ac_safe=no"
11724 fi
11725 rm -f conftest*
11726 fi
11727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11728   echo "$ac_t""yes" 1>&6
11729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11730   cat >> confdefs.h <<EOF
11731 #define $ac_tr_hdr 1
11732 EOF
11733  
11734 else
11735   echo "$ac_t""no" 1>&6
11736 fi
11737 done
11738
11739         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11740 echo "configure:11741: checking for dmalloc_shutdown in -ldmalloc" >&5
11741 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11742 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11743   echo $ac_n "(cached) $ac_c" 1>&6
11744 else
11745   ac_save_LIBS="$LIBS"
11746 LIBS="-ldmalloc  $LIBS"
11747 cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750 /* Override any gcc2 internal prototype to avoid an error.  */
11751 /* We use char because int might match the return type of a gcc2
11752     builtin and then its argument prototype would still apply.  */
11753 char dmalloc_shutdown();
11754
11755 int main() {
11756 dmalloc_shutdown()
11757 ; return 0; }
11758 EOF
11759 if { (eval echo configure:11760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11760   rm -rf conftest*
11761   eval "ac_cv_lib_$ac_lib_var=yes"
11762 else
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -rf conftest*
11766   eval "ac_cv_lib_$ac_lib_var=no"
11767 fi
11768 rm -f conftest*
11769 LIBS="$ac_save_LIBS"
11770
11771 fi
11772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11773   echo "$ac_t""yes" 1>&6
11774     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11775     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11776   cat >> confdefs.h <<EOF
11777 #define $ac_tr_lib 1
11778 EOF
11779
11780   LIBS="-ldmalloc $LIBS"
11781
11782 else
11783   echo "$ac_t""no" 1>&6
11784 fi
11785
11786 fi
11787
11788 if test $ol_enable_tcl != no ; then
11789         for ac_hdr in tcl.h
11790 do
11791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11793 echo "configure:11794: checking for $ac_hdr" >&5
11794 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11795   echo $ac_n "(cached) $ac_c" 1>&6
11796 else
11797   cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800 #include <$ac_hdr>
11801 EOF
11802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11803 { (eval echo configure:11804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11805 if test -z "$ac_err"; then
11806   rm -rf conftest*
11807   eval "ac_cv_header_$ac_safe=yes"
11808 else
11809   echo "$ac_err" >&5
11810   echo "configure: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   rm -rf conftest*
11813   eval "ac_cv_header_$ac_safe=no"
11814 fi
11815 rm -f conftest*
11816 fi
11817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11818   echo "$ac_t""yes" 1>&6
11819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11820   cat >> confdefs.h <<EOF
11821 #define $ac_tr_hdr 1
11822 EOF
11823  
11824 else
11825   echo "$ac_t""no" 1>&6
11826 fi
11827 done
11828
11829
11830         if test $ac_cv_header_tcl_h != yes ; then
11831                 have_tcl=no
11832         else
11833                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11834 echo "configure:11835: checking for main in -ltcl" >&5
11835 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11837   echo $ac_n "(cached) $ac_c" 1>&6
11838 else
11839   ac_save_LIBS="$LIBS"
11840 LIBS="-ltcl  $LIBS"
11841 cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844
11845 int main() {
11846 main()
11847 ; return 0; }
11848 EOF
11849 if { (eval echo configure:11850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11850   rm -rf conftest*
11851   eval "ac_cv_lib_$ac_lib_var=yes"
11852 else
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   eval "ac_cv_lib_$ac_lib_var=no"
11857 fi
11858 rm -f conftest*
11859 LIBS="$ac_save_LIBS"
11860
11861 fi
11862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11863   echo "$ac_t""yes" 1>&6
11864   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11865 else
11866   echo "$ac_t""no" 1>&6
11867 have_tcl=no
11868 fi
11869
11870
11871                 if test $have_tcl != yes; then
11872                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11873 echo "configure:11874: checking for main in -ltcl7.6" >&5
11874 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11876   echo $ac_n "(cached) $ac_c" 1>&6
11877 else
11878   ac_save_LIBS="$LIBS"
11879 LIBS="-ltcl7.6  $LIBS"
11880 cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883
11884 int main() {
11885 main()
11886 ; return 0; }
11887 EOF
11888 if { (eval echo configure:11889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11889   rm -rf conftest*
11890   eval "ac_cv_lib_$ac_lib_var=yes"
11891 else
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -rf conftest*
11895   eval "ac_cv_lib_$ac_lib_var=no"
11896 fi
11897 rm -f conftest*
11898 LIBS="$ac_save_LIBS"
11899
11900 fi
11901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11902   echo "$ac_t""yes" 1>&6
11903   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11904 else
11905   echo "$ac_t""no" 1>&6
11906 have_tcl=no
11907 fi
11908
11909                 fi
11910
11911                 if test $have_tcl != yes; then
11912                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11913 echo "configure:11914: checking for main in -ltcl8.0" >&5
11914 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11916   echo $ac_n "(cached) $ac_c" 1>&6
11917 else
11918   ac_save_LIBS="$LIBS"
11919 LIBS="-ltcl8.0  $LIBS"
11920 cat > conftest.$ac_ext <<EOF
11921 #line 11922 "configure"
11922 #include "confdefs.h"
11923
11924 int main() {
11925 main()
11926 ; return 0; }
11927 EOF
11928 if { (eval echo configure:11929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11929   rm -rf conftest*
11930   eval "ac_cv_lib_$ac_lib_var=yes"
11931 else
11932   echo "configure: failed program was:" >&5
11933   cat conftest.$ac_ext >&5
11934   rm -rf conftest*
11935   eval "ac_cv_lib_$ac_lib_var=no"
11936 fi
11937 rm -f conftest*
11938 LIBS="$ac_save_LIBS"
11939
11940 fi
11941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11942   echo "$ac_t""yes" 1>&6
11943   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11944 else
11945   echo "$ac_t""no" 1>&6
11946 have_tcl=no
11947 fi
11948
11949                 fi
11950         fi
11951
11952         if test $have_tcl != yes ; then
11953                 echo "configure: warning: could not find -ltcl" 1>&2
11954                 if test $ol_enable_tcl = yes ; then
11955                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11956                 fi
11957
11958                 ol_enable_tcl=no
11959         fi
11960 fi
11961
11962 # ud needs termcap (should insert check here)
11963 ol_link_termcap=no
11964 for ac_hdr in termcap.h ncurses.h
11965 do
11966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11968 echo "configure:11969: checking for $ac_hdr" >&5
11969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11970   echo $ac_n "(cached) $ac_c" 1>&6
11971 else
11972   cat > conftest.$ac_ext <<EOF
11973 #line 11974 "configure"
11974 #include "confdefs.h"
11975 #include <$ac_hdr>
11976 EOF
11977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11978 { (eval echo configure:11979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11980 if test -z "$ac_err"; then
11981   rm -rf conftest*
11982   eval "ac_cv_header_$ac_safe=yes"
11983 else
11984   echo "$ac_err" >&5
11985   echo "configure: failed program was:" >&5
11986   cat conftest.$ac_ext >&5
11987   rm -rf conftest*
11988   eval "ac_cv_header_$ac_safe=no"
11989 fi
11990 rm -f conftest*
11991 fi
11992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11993   echo "$ac_t""yes" 1>&6
11994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11995   cat >> confdefs.h <<EOF
11996 #define $ac_tr_hdr 1
11997 EOF
11998  
11999 else
12000   echo "$ac_t""no" 1>&6
12001 fi
12002 done
12003
12004
12005 if test $ol_link_termcap = no ; then
12006         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12007 echo "configure:12008: checking for tputs in -ltermcap" >&5
12008 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12009 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12010   echo $ac_n "(cached) $ac_c" 1>&6
12011 else
12012   ac_save_LIBS="$LIBS"
12013 LIBS="-ltermcap  $LIBS"
12014 cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017 /* Override any gcc2 internal prototype to avoid an error.  */
12018 /* We use char because int might match the return type of a gcc2
12019     builtin and then its argument prototype would still apply.  */
12020 char tputs();
12021
12022 int main() {
12023 tputs()
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   eval "ac_cv_lib_$ac_lib_var=yes"
12029 else
12030   echo "configure: failed program was:" >&5
12031   cat conftest.$ac_ext >&5
12032   rm -rf conftest*
12033   eval "ac_cv_lib_$ac_lib_var=no"
12034 fi
12035 rm -f conftest*
12036 LIBS="$ac_save_LIBS"
12037
12038 fi
12039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12040   echo "$ac_t""yes" 1>&6
12041   have_termcap=yes
12042 else
12043   echo "$ac_t""no" 1>&6
12044 have_termcap=no
12045 fi
12046
12047         if test $have_termcap = yes ; then
12048                 cat >> confdefs.h <<\EOF
12049 #define HAVE_TERMCAP 1
12050 EOF
12051
12052                 ol_link_termcap=yes
12053                 TERMCAP_LIBS=-ltermcap
12054         fi
12055 fi
12056
12057 if test $ol_link_termcap = no ; then
12058         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12059 echo "configure:12060: checking for initscr in -lncurses" >&5
12060 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12062   echo $ac_n "(cached) $ac_c" 1>&6
12063 else
12064   ac_save_LIBS="$LIBS"
12065 LIBS="-lncurses  $LIBS"
12066 cat > conftest.$ac_ext <<EOF
12067 #line 12068 "configure"
12068 #include "confdefs.h"
12069 /* Override any gcc2 internal prototype to avoid an error.  */
12070 /* We use char because int might match the return type of a gcc2
12071     builtin and then its argument prototype would still apply.  */
12072 char initscr();
12073
12074 int main() {
12075 initscr()
12076 ; return 0; }
12077 EOF
12078 if { (eval echo configure:12079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12079   rm -rf conftest*
12080   eval "ac_cv_lib_$ac_lib_var=yes"
12081 else
12082   echo "configure: failed program was:" >&5
12083   cat conftest.$ac_ext >&5
12084   rm -rf conftest*
12085   eval "ac_cv_lib_$ac_lib_var=no"
12086 fi
12087 rm -f conftest*
12088 LIBS="$ac_save_LIBS"
12089
12090 fi
12091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12092   echo "$ac_t""yes" 1>&6
12093   have_ncurses=yes
12094 else
12095   echo "$ac_t""no" 1>&6
12096 have_ncurses=no
12097 fi
12098
12099         if test $have_ncurses = yes ; then
12100                 cat >> confdefs.h <<\EOF
12101 #define HAVE_NCURSES 1
12102 EOF
12103
12104                 ol_link_termcap=yes
12105                 TERMCAP_LIBS=-lncurses
12106         fi
12107 fi
12108
12109 if test $ol_link_termcap = no ; then
12110         cat >> confdefs.h <<\EOF
12111 #define NO_TERMCAP 1
12112 EOF
12113
12114         TERMCAP_LIBS=
12115 fi
12116
12117 ol_link_sasl=no
12118 if test $ol_with_cyrus_sasl != no ; then
12119         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12120 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12121 echo "configure:12122: checking for sasl.h" >&5
12122 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12123   echo $ac_n "(cached) $ac_c" 1>&6
12124 else
12125   cat > conftest.$ac_ext <<EOF
12126 #line 12127 "configure"
12127 #include "confdefs.h"
12128 #include <sasl.h>
12129 EOF
12130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12131 { (eval echo configure:12132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12133 if test -z "$ac_err"; then
12134   rm -rf conftest*
12135   eval "ac_cv_header_$ac_safe=yes"
12136 else
12137   echo "$ac_err" >&5
12138   echo "configure: failed program was:" >&5
12139   cat conftest.$ac_ext >&5
12140   rm -rf conftest*
12141   eval "ac_cv_header_$ac_safe=no"
12142 fi
12143 rm -f conftest*
12144 fi
12145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12146   echo "$ac_t""yes" 1>&6
12147   :
12148 else
12149   echo "$ac_t""no" 1>&6
12150 fi
12151
12152
12153         if test $ac_cv_header_sasl_h = yes ; then
12154                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12155 echo "configure:12156: checking for sasl_client_init in -lsasl" >&5
12156 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12158   echo $ac_n "(cached) $ac_c" 1>&6
12159 else
12160   ac_save_LIBS="$LIBS"
12161 LIBS="-lsasl  $LIBS"
12162 cat > conftest.$ac_ext <<EOF
12163 #line 12164 "configure"
12164 #include "confdefs.h"
12165 /* Override any gcc2 internal prototype to avoid an error.  */
12166 /* We use char because int might match the return type of a gcc2
12167     builtin and then its argument prototype would still apply.  */
12168 char sasl_client_init();
12169
12170 int main() {
12171 sasl_client_init()
12172 ; return 0; }
12173 EOF
12174 if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12175   rm -rf conftest*
12176   eval "ac_cv_lib_$ac_lib_var=yes"
12177 else
12178   echo "configure: failed program was:" >&5
12179   cat conftest.$ac_ext >&5
12180   rm -rf conftest*
12181   eval "ac_cv_lib_$ac_lib_var=no"
12182 fi
12183 rm -f conftest*
12184 LIBS="$ac_save_LIBS"
12185
12186 fi
12187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12188   echo "$ac_t""yes" 1>&6
12189   have_cyrus_sasl=yes
12190 else
12191   echo "$ac_t""no" 1>&6
12192 have_cyrus_sasl=no
12193 fi
12194
12195
12196                 if test $have_cyrus_sasl != no ; then
12197                         SASL_LIBS="-lsasl"
12198                         cat >> confdefs.h <<\EOF
12199 #define HAVE_CYRUS_SASL 1
12200 EOF
12201
12202                         ol_link_sasl=yes
12203                 fi
12204         fi
12205
12206         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12207                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12208         fi
12209 fi
12210
12211 ol_link_fetch=no
12212 if test $ol_with_fetch != no ; then
12213         ol=$LIBS
12214 LIBS="-lfetch -lcom_err $LIBS"
12215 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12216 echo "configure:12217: checking fetch(3) library" >&5
12217 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12218   echo $ac_n "(cached) $ac_c" 1>&6
12219 else
12220   
12221         cat > conftest.$ac_ext <<EOF
12222 #line 12223 "configure"
12223 #include "confdefs.h"
12224
12225 #include <sys/param.h>
12226 #include <stdio.h>
12227 #include <fetch.h>
12228 int main() {
12229 struct url *u = fetchParseURL("file:///"); 
12230 ; return 0; }
12231 EOF
12232 if { (eval echo configure:12233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12233   rm -rf conftest*
12234   ol_cv_lib_fetch=yes
12235 else
12236   echo "configure: failed program was:" >&5
12237   cat conftest.$ac_ext >&5
12238   rm -rf conftest*
12239   ol_cv_lib_fetch=no
12240 fi
12241 rm -f conftest*
12242 fi
12243
12244 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12245 LIBS=$ol_LIBS
12246 if test $ol_cv_lib_fetch != no ; then
12247         ol_link_fetch="-lfetch -lcom_err"
12248         cat >> confdefs.h <<\EOF
12249 #define HAVE_FETCH 1
12250 EOF
12251
12252 fi
12253
12254
12255         if test $ol_cv_lib_fetch != no ; then
12256                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12257                 ol_link_fetch=freebsd
12258
12259         elif test $ol_with_fetch != auto ; then
12260                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12261         fi 
12262 fi
12263
12264 ol_link_readline=no
12265 if test $ol_with_readline != no ; then
12266         for ac_hdr in readline/readline.h readline/history.h
12267 do
12268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12270 echo "configure:12271: checking for $ac_hdr" >&5
12271 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12272   echo $ac_n "(cached) $ac_c" 1>&6
12273 else
12274   cat > conftest.$ac_ext <<EOF
12275 #line 12276 "configure"
12276 #include "confdefs.h"
12277 #include <$ac_hdr>
12278 EOF
12279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12280 { (eval echo configure:12281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12282 if test -z "$ac_err"; then
12283   rm -rf conftest*
12284   eval "ac_cv_header_$ac_safe=yes"
12285 else
12286   echo "$ac_err" >&5
12287   echo "configure: failed program was:" >&5
12288   cat conftest.$ac_ext >&5
12289   rm -rf conftest*
12290   eval "ac_cv_header_$ac_safe=no"
12291 fi
12292 rm -f conftest*
12293 fi
12294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12295   echo "$ac_t""yes" 1>&6
12296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12297   cat >> confdefs.h <<EOF
12298 #define $ac_tr_hdr 1
12299 EOF
12300  
12301 else
12302   echo "$ac_t""no" 1>&6
12303 fi
12304 done
12305
12306
12307         if test $ac_cv_header_readline_readline_h = yes ; then
12308                 save_LIBS="$LIBS"
12309                 LIBS="$TERMCAP_LIBS $LIBS"
12310                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12311 echo "configure:12312: checking for readline in -lreadline" >&5
12312 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12313 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12314   echo $ac_n "(cached) $ac_c" 1>&6
12315 else
12316   ac_save_LIBS="$LIBS"
12317 LIBS="-lreadline  $LIBS"
12318 cat > conftest.$ac_ext <<EOF
12319 #line 12320 "configure"
12320 #include "confdefs.h"
12321 /* Override any gcc2 internal prototype to avoid an error.  */
12322 /* We use char because int might match the return type of a gcc2
12323     builtin and then its argument prototype would still apply.  */
12324 char readline();
12325
12326 int main() {
12327 readline()
12328 ; return 0; }
12329 EOF
12330 if { (eval echo configure:12331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12331   rm -rf conftest*
12332   eval "ac_cv_lib_$ac_lib_var=yes"
12333 else
12334   echo "configure: failed program was:" >&5
12335   cat conftest.$ac_ext >&5
12336   rm -rf conftest*
12337   eval "ac_cv_lib_$ac_lib_var=no"
12338 fi
12339 rm -f conftest*
12340 LIBS="$ac_save_LIBS"
12341
12342 fi
12343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12344   echo "$ac_t""yes" 1>&6
12345   have_readline=yes
12346 else
12347   echo "$ac_t""no" 1>&6
12348 have_readline=no
12349 fi
12350
12351                 LIBS="$save_LIBS"
12352                         
12353                 if test $have_readline = yes ; then
12354                         ol_with_readline=found
12355                         ol_link_readline=yes
12356
12357                         READLINE_LIBS="-lreadline"
12358                 fi
12359         fi
12360 fi
12361
12362 if test $ol_link_readline = yes ; then
12363         cat >> confdefs.h <<\EOF
12364 #define HAVE_READLINE 1
12365 EOF
12366
12367 fi
12368
12369
12370 # FreeBSD (and others) have crypt(3) in -lcrypt
12371 if test $ol_enable_crypt != no ; then
12372         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12373 echo "configure:12374: checking for crypt" >&5
12374 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12375   echo $ac_n "(cached) $ac_c" 1>&6
12376 else
12377   cat > conftest.$ac_ext <<EOF
12378 #line 12379 "configure"
12379 #include "confdefs.h"
12380 /* System header to define __stub macros and hopefully few prototypes,
12381     which can conflict with char crypt(); below.  */
12382 #include <assert.h>
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 /* We use char because int might match the return type of a gcc2
12385     builtin and then its argument prototype would still apply.  */
12386 char crypt();
12387 char (*f)();
12388
12389 int main() {
12390
12391 /* The GNU C library defines this for functions which it implements
12392     to always fail with ENOSYS.  Some functions are actually named
12393     something starting with __ and the normal name is an alias.  */
12394 #if defined (__stub_crypt) || defined (__stub___crypt)
12395 choke me
12396 #else
12397 f = crypt;
12398 #endif
12399
12400 ; return 0; }
12401 EOF
12402 if { (eval echo configure:12403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12403   rm -rf conftest*
12404   eval "ac_cv_func_crypt=yes"
12405 else
12406   echo "configure: failed program was:" >&5
12407   cat conftest.$ac_ext >&5
12408   rm -rf conftest*
12409   eval "ac_cv_func_crypt=no"
12410 fi
12411 rm -f conftest*
12412 fi
12413
12414 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12415   echo "$ac_t""yes" 1>&6
12416   have_crypt=yes
12417 else
12418   echo "$ac_t""no" 1>&6
12419
12420                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12421 echo "configure:12422: checking for crypt in -lcrypt" >&5
12422 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12424   echo $ac_n "(cached) $ac_c" 1>&6
12425 else
12426   ac_save_LIBS="$LIBS"
12427 LIBS="-lcrypt  $LIBS"
12428 cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 /* Override any gcc2 internal prototype to avoid an error.  */
12432 /* We use char because int might match the return type of a gcc2
12433     builtin and then its argument prototype would still apply.  */
12434 char crypt();
12435
12436 int main() {
12437 crypt()
12438 ; return 0; }
12439 EOF
12440 if { (eval echo configure:12441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12441   rm -rf conftest*
12442   eval "ac_cv_lib_$ac_lib_var=yes"
12443 else
12444   echo "configure: failed program was:" >&5
12445   cat conftest.$ac_ext >&5
12446   rm -rf conftest*
12447   eval "ac_cv_lib_$ac_lib_var=no"
12448 fi
12449 rm -f conftest*
12450 LIBS="$ac_save_LIBS"
12451
12452 fi
12453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12454   echo "$ac_t""yes" 1>&6
12455   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12456                         have_crypt=yes
12457 else
12458   echo "$ac_t""no" 1>&6
12459 have_crypt=no
12460 fi
12461
12462 fi
12463
12464
12465         if test $have_crypt = yes ; then
12466                 cat >> confdefs.h <<\EOF
12467 #define HAVE_CRYPT 1
12468 EOF
12469
12470         else
12471                 echo "configure: warning: could not find crypt" 1>&2
12472                 if test $ol_enable_crypt = yes ; then
12473                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12474                 fi
12475
12476                 echo "configure: warning: disabling crypt support" 1>&2
12477                 ol_enable_crypt=no
12478         fi
12479 fi
12480
12481 # FreeBSD (and others) have setproctitle(3) in -lutil
12482 if test $ol_enable_proctitle != no ; then
12483         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12484 echo "configure:12485: checking for setproctitle" >&5
12485 if eval "test \"\${ac_cv_func_setproctitle+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 /* System header to define __stub macros and hopefully few prototypes,
12492     which can conflict with char setproctitle(); below.  */
12493 #include <assert.h>
12494 /* Override any gcc2 internal prototype to avoid an error.  */
12495 /* We use char because int might match the return type of a gcc2
12496     builtin and then its argument prototype would still apply.  */
12497 char setproctitle();
12498 char (*f)();
12499
12500 int main() {
12501
12502 /* The GNU C library defines this for functions which it implements
12503     to always fail with ENOSYS.  Some functions are actually named
12504     something starting with __ and the normal name is an alias.  */
12505 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12506 choke me
12507 #else
12508 f = setproctitle;
12509 #endif
12510
12511 ; return 0; }
12512 EOF
12513 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12514   rm -rf conftest*
12515   eval "ac_cv_func_setproctitle=yes"
12516 else
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -rf conftest*
12520   eval "ac_cv_func_setproctitle=no"
12521 fi
12522 rm -f conftest*
12523 fi
12524
12525 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12526   echo "$ac_t""yes" 1>&6
12527   have_setproctitle=yes
12528 else
12529   echo "$ac_t""no" 1>&6
12530
12531                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12532 echo "configure:12533: checking for setproctitle in -lutil" >&5
12533 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12535   echo $ac_n "(cached) $ac_c" 1>&6
12536 else
12537   ac_save_LIBS="$LIBS"
12538 LIBS="-lutil  $LIBS"
12539 cat > conftest.$ac_ext <<EOF
12540 #line 12541 "configure"
12541 #include "confdefs.h"
12542 /* Override any gcc2 internal prototype to avoid an error.  */
12543 /* We use char because int might match the return type of a gcc2
12544     builtin and then its argument prototype would still apply.  */
12545 char setproctitle();
12546
12547 int main() {
12548 setproctitle()
12549 ; return 0; }
12550 EOF
12551 if { (eval echo configure:12552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12552   rm -rf conftest*
12553   eval "ac_cv_lib_$ac_lib_var=yes"
12554 else
12555   echo "configure: failed program was:" >&5
12556   cat conftest.$ac_ext >&5
12557   rm -rf conftest*
12558   eval "ac_cv_lib_$ac_lib_var=no"
12559 fi
12560 rm -f conftest*
12561 LIBS="$ac_save_LIBS"
12562
12563 fi
12564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12565   echo "$ac_t""yes" 1>&6
12566   have_setproctitle=yes
12567                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12568 else
12569   echo "$ac_t""no" 1>&6
12570 have_setproctitle=no
12571                         LIBOBJS="$LIBOBJS setproctitle.o"
12572 fi
12573
12574 fi
12575
12576
12577         if test $have_setproctitle = yes ; then
12578                 cat >> confdefs.h <<\EOF
12579 #define HAVE_SETPROCTITLE 1
12580 EOF
12581
12582         fi
12583 fi
12584
12585 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12586 echo "configure:12587: checking for uid_t in sys/types.h" >&5
12587 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12588   echo $ac_n "(cached) $ac_c" 1>&6
12589 else
12590   cat > conftest.$ac_ext <<EOF
12591 #line 12592 "configure"
12592 #include "confdefs.h"
12593 #include <sys/types.h>
12594 EOF
12595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12596   egrep "uid_t" >/dev/null 2>&1; then
12597   rm -rf conftest*
12598   ac_cv_type_uid_t=yes
12599 else
12600   rm -rf conftest*
12601   ac_cv_type_uid_t=no
12602 fi
12603 rm -f conftest*
12604
12605 fi
12606
12607 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12608 if test $ac_cv_type_uid_t = no; then
12609   cat >> confdefs.h <<\EOF
12610 #define uid_t int
12611 EOF
12612
12613   cat >> confdefs.h <<\EOF
12614 #define gid_t int
12615 EOF
12616
12617 fi
12618
12619 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12620 echo "configure:12621: checking type of array argument to getgroups" >&5
12621 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12622   echo $ac_n "(cached) $ac_c" 1>&6
12623 else
12624   if test "$cross_compiling" = yes; then
12625   ac_cv_type_getgroups=cross
12626 else
12627   cat > conftest.$ac_ext <<EOF
12628 #line 12629 "configure"
12629 #include "confdefs.h"
12630
12631 /* Thanks to Mike Rendell for this test.  */
12632 #include <sys/types.h>
12633 #define NGID 256
12634 #undef MAX
12635 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12636 main()
12637 {
12638   gid_t gidset[NGID];
12639   int i, n;
12640   union { gid_t gval; long lval; }  val;
12641
12642   val.lval = -1;
12643   for (i = 0; i < NGID; i++)
12644     gidset[i] = val.gval;
12645   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12646                  gidset);
12647   /* Exit non-zero if getgroups seems to require an array of ints.  This
12648      happens when gid_t is short but getgroups modifies an array of ints.  */
12649   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12650 }
12651
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12654 then
12655     ac_cv_type_getgroups=gid_t
12656 else
12657   echo "configure: failed program was:" >&5
12658   cat conftest.$ac_ext >&5
12659   rm -fr conftest*
12660   ac_cv_type_getgroups=int
12661 fi
12662 rm -fr conftest*
12663 fi
12664
12665 if test $ac_cv_type_getgroups = cross; then
12666         cat > conftest.$ac_ext <<EOF
12667 #line 12668 "configure"
12668 #include "confdefs.h"
12669 #include <unistd.h>
12670 EOF
12671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12672   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12673   rm -rf conftest*
12674   ac_cv_type_getgroups=gid_t
12675 else
12676   rm -rf conftest*
12677   ac_cv_type_getgroups=int
12678 fi
12679 rm -f conftest*
12680
12681 fi
12682 fi
12683
12684 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12685 cat >> confdefs.h <<EOF
12686 #define GETGROUPS_T $ac_cv_type_getgroups
12687 EOF
12688
12689  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12690 echo "configure:12691: checking for ANSI C header files" >&5
12691 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12692   echo $ac_n "(cached) $ac_c" 1>&6
12693 else
12694   cat > conftest.$ac_ext <<EOF
12695 #line 12696 "configure"
12696 #include "confdefs.h"
12697 #include <stdlib.h>
12698 #include <stdarg.h>
12699 #include <string.h>
12700 #include <float.h>
12701 EOF
12702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12703 { (eval echo configure:12704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12705 if test -z "$ac_err"; then
12706   rm -rf conftest*
12707   ac_cv_header_stdc=yes
12708 else
12709   echo "$ac_err" >&5
12710   echo "configure: failed program was:" >&5
12711   cat conftest.$ac_ext >&5
12712   rm -rf conftest*
12713   ac_cv_header_stdc=no
12714 fi
12715 rm -f conftest*
12716
12717 if test $ac_cv_header_stdc = yes; then
12718   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12719 cat > conftest.$ac_ext <<EOF
12720 #line 12721 "configure"
12721 #include "confdefs.h"
12722 #include <string.h>
12723 EOF
12724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12725   egrep "memchr" >/dev/null 2>&1; then
12726   :
12727 else
12728   rm -rf conftest*
12729   ac_cv_header_stdc=no
12730 fi
12731 rm -f conftest*
12732
12733 fi
12734
12735 if test $ac_cv_header_stdc = yes; then
12736   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12737 cat > conftest.$ac_ext <<EOF
12738 #line 12739 "configure"
12739 #include "confdefs.h"
12740 #include <stdlib.h>
12741 EOF
12742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12743   egrep "free" >/dev/null 2>&1; then
12744   :
12745 else
12746   rm -rf conftest*
12747   ac_cv_header_stdc=no
12748 fi
12749 rm -f conftest*
12750
12751 fi
12752
12753 if test $ac_cv_header_stdc = yes; then
12754   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12755 if test "$cross_compiling" = yes; then
12756   :
12757 else
12758   cat > conftest.$ac_ext <<EOF
12759 #line 12760 "configure"
12760 #include "confdefs.h"
12761 #include <ctype.h>
12762 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12763 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12764 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12765 int main () { int i; for (i = 0; i < 256; i++)
12766 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12767 exit (0); }
12768
12769 EOF
12770 if { (eval echo configure:12771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12771 then
12772   :
12773 else
12774   echo "configure: failed program was:" >&5
12775   cat conftest.$ac_ext >&5
12776   rm -fr conftest*
12777   ac_cv_header_stdc=no
12778 fi
12779 rm -fr conftest*
12780 fi
12781
12782 fi
12783 fi
12784
12785 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12786 if test $ac_cv_header_stdc = yes; then
12787   cat >> confdefs.h <<\EOF
12788 #define STDC_HEADERS 1
12789 EOF
12790
12791 fi
12792
12793 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12794 echo "configure:12795: checking for mode_t" >&5
12795 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12796   echo $ac_n "(cached) $ac_c" 1>&6
12797 else
12798   cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801 #include <sys/types.h>
12802 #if STDC_HEADERS
12803 #include <stdlib.h>
12804 #include <stddef.h>
12805 #endif
12806 EOF
12807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12808   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12809   rm -rf conftest*
12810   eval "ac_cv_type_mode_t=yes"
12811 else
12812   rm -rf conftest*
12813   eval "ac_cv_type_mode_t=no"
12814 fi
12815 rm -f conftest*
12816
12817 fi
12818 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12819   echo "$ac_t""yes" 1>&6
12820 else
12821   echo "$ac_t""no" 1>&6
12822   cat >> confdefs.h <<EOF
12823 #define mode_t int
12824 EOF
12825
12826 fi
12827
12828 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12829 echo "configure:12830: checking for off_t" >&5
12830 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12831   echo $ac_n "(cached) $ac_c" 1>&6
12832 else
12833   cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 #include <sys/types.h>
12837 #if STDC_HEADERS
12838 #include <stdlib.h>
12839 #include <stddef.h>
12840 #endif
12841 EOF
12842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12843   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12844   rm -rf conftest*
12845   eval "ac_cv_type_off_t=yes"
12846 else
12847   rm -rf conftest*
12848   eval "ac_cv_type_off_t=no"
12849 fi
12850 rm -f conftest*
12851
12852 fi
12853 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12854   echo "$ac_t""yes" 1>&6
12855 else
12856   echo "$ac_t""no" 1>&6
12857   cat >> confdefs.h <<EOF
12858 #define off_t long
12859 EOF
12860
12861 fi
12862
12863 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12864 echo "configure:12865: checking for pid_t" >&5
12865 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12866   echo $ac_n "(cached) $ac_c" 1>&6
12867 else
12868   cat > conftest.$ac_ext <<EOF
12869 #line 12870 "configure"
12870 #include "confdefs.h"
12871 #include <sys/types.h>
12872 #if STDC_HEADERS
12873 #include <stdlib.h>
12874 #include <stddef.h>
12875 #endif
12876 EOF
12877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12878   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12879   rm -rf conftest*
12880   eval "ac_cv_type_pid_t=yes"
12881 else
12882   rm -rf conftest*
12883   eval "ac_cv_type_pid_t=no"
12884 fi
12885 rm -f conftest*
12886
12887 fi
12888 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12889   echo "$ac_t""yes" 1>&6
12890 else
12891   echo "$ac_t""no" 1>&6
12892   cat >> confdefs.h <<EOF
12893 #define pid_t int
12894 EOF
12895
12896 fi
12897
12898 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12899 echo "configure:12900: checking for ptrdiff_t" >&5
12900 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12901   echo $ac_n "(cached) $ac_c" 1>&6
12902 else
12903   cat > conftest.$ac_ext <<EOF
12904 #line 12905 "configure"
12905 #include "confdefs.h"
12906 #include <stddef.h>
12907 int main() {
12908 ptrdiff_t p
12909 ; return 0; }
12910 EOF
12911 if { (eval echo configure:12912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12912   rm -rf conftest*
12913   am_cv_type_ptrdiff_t=yes
12914 else
12915   echo "configure: failed program was:" >&5
12916   cat conftest.$ac_ext >&5
12917   rm -rf conftest*
12918   am_cv_type_ptrdiff_t=no
12919 fi
12920 rm -f conftest*
12921 fi
12922
12923 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12924    if test $am_cv_type_ptrdiff_t = yes; then
12925      cat >> confdefs.h <<\EOF
12926 #define HAVE_PTRDIFF_T 1
12927 EOF
12928
12929    fi
12930
12931 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12932 echo "configure:12933: checking return type of signal handlers" >&5
12933 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12934   echo $ac_n "(cached) $ac_c" 1>&6
12935 else
12936   cat > conftest.$ac_ext <<EOF
12937 #line 12938 "configure"
12938 #include "confdefs.h"
12939 #include <sys/types.h>
12940 #include <signal.h>
12941 #ifdef signal
12942 #undef signal
12943 #endif
12944 #ifdef __cplusplus
12945 extern "C" void (*signal (int, void (*)(int)))(int);
12946 #else
12947 void (*signal ()) ();
12948 #endif
12949
12950 int main() {
12951 int i;
12952 ; return 0; }
12953 EOF
12954 if { (eval echo configure:12955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12955   rm -rf conftest*
12956   ac_cv_type_signal=void
12957 else
12958   echo "configure: failed program was:" >&5
12959   cat conftest.$ac_ext >&5
12960   rm -rf conftest*
12961   ac_cv_type_signal=int
12962 fi
12963 rm -f conftest*
12964 fi
12965
12966 echo "$ac_t""$ac_cv_type_signal" 1>&6
12967 cat >> confdefs.h <<EOF
12968 #define RETSIGTYPE $ac_cv_type_signal
12969 EOF
12970
12971
12972 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12973 echo "configure:12974: checking for sig_atomic_t" >&5
12974 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12975   echo $ac_n "(cached) $ac_c" 1>&6
12976 else
12977   cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 #include <signal.h>
12981 int main() {
12982 sig_atomic_t atomic;
12983 ; return 0; }
12984 EOF
12985 if { (eval echo configure:12986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12986   rm -rf conftest*
12987   ol_cv_type_sig_atomic_t=yes
12988 else
12989   echo "configure: failed program was:" >&5
12990   cat conftest.$ac_ext >&5
12991   rm -rf conftest*
12992   ol_cv_type_sig_atomic_t=no
12993 fi
12994 rm -f conftest*
12995 fi
12996
12997 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12998   if test $ol_cv_type_sig_atomic_t = no; then
12999     cat >> confdefs.h <<\EOF
13000 #define sig_atomic_t int
13001 EOF
13002
13003   fi
13004  
13005 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13006 echo "configure:13007: checking for size_t" >&5
13007 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13008   echo $ac_n "(cached) $ac_c" 1>&6
13009 else
13010   cat > conftest.$ac_ext <<EOF
13011 #line 13012 "configure"
13012 #include "confdefs.h"
13013 #include <sys/types.h>
13014 #if STDC_HEADERS
13015 #include <stdlib.h>
13016 #include <stddef.h>
13017 #endif
13018 EOF
13019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13020   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13021   rm -rf conftest*
13022   eval "ac_cv_type_size_t=yes"
13023 else
13024   rm -rf conftest*
13025   eval "ac_cv_type_size_t=no"
13026 fi
13027 rm -f conftest*
13028
13029 fi
13030 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13031   echo "$ac_t""yes" 1>&6
13032 else
13033   echo "$ac_t""no" 1>&6
13034   cat >> confdefs.h <<EOF
13035 #define size_t unsigned
13036 EOF
13037
13038 fi
13039
13040 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13041 echo "configure:13042: checking for socklen_t" >&5
13042 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13043   echo $ac_n "(cached) $ac_c" 1>&6
13044 else
13045   cat > conftest.$ac_ext <<EOF
13046 #line 13047 "configure"
13047 #include "confdefs.h"
13048
13049 #ifdef HAVE_SYS_TYPES_H
13050 #include <sys/types.h>
13051 #endif
13052 #ifdef HAVE_SYS_SOCKET_H
13053 #include <sys/socket.h>
13054 #endif
13055
13056 int main() {
13057 socklen_t len;
13058 ; return 0; }
13059 EOF
13060 if { (eval echo configure:13061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13061   rm -rf conftest*
13062   ol_cv_type_socklen_t=yes
13063 else
13064   echo "configure: failed program was:" >&5
13065   cat conftest.$ac_ext >&5
13066   rm -rf conftest*
13067   ol_cv_type_socklen_t=no
13068 fi
13069 rm -f conftest*
13070 fi
13071
13072 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13073   if test $ol_cv_type_socklen_t = no; then
13074     cat >> confdefs.h <<\EOF
13075 #define socklen_t int
13076 EOF
13077
13078   fi
13079  
13080 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13081 echo "configure:13082: checking for member st_blksize in aggregate type struct stat" >&5
13082 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13083   echo $ac_n "(cached) $ac_c" 1>&6
13084 else
13085   cat > conftest.$ac_ext <<EOF
13086 #line 13087 "configure"
13087 #include "confdefs.h"
13088 #include <sys/types.h>
13089 #include <sys/stat.h>
13090 int main() {
13091 struct stat foo; foo.st_blksize;
13092 ; return 0; }
13093 EOF
13094 if { (eval echo configure:13095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13095   rm -rf conftest*
13096   ac_cv_c_struct_member_st_blksize=yes
13097 else
13098   echo "configure: failed program was:" >&5
13099   cat conftest.$ac_ext >&5
13100   rm -rf conftest*
13101   ac_cv_c_struct_member_st_blksize=no
13102 fi
13103 rm -f conftest*
13104 fi
13105
13106 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13107 st_blksize="$ac_cv_c_struct_member_st_blksize"
13108 if test $ac_cv_c_struct_member_st_blksize = yes; then
13109   cat >> confdefs.h <<\EOF
13110 #define HAVE_ST_BLKSIZE 1
13111 EOF
13112
13113 fi
13114
13115 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13116 echo "configure:13117: checking whether time.h and sys/time.h may both be included" >&5
13117 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13118   echo $ac_n "(cached) $ac_c" 1>&6
13119 else
13120   cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 #include <sys/types.h>
13124 #include <sys/time.h>
13125 #include <time.h>
13126 int main() {
13127 struct tm *tp;
13128 ; return 0; }
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13131   rm -rf conftest*
13132   ac_cv_header_time=yes
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   ac_cv_header_time=no
13138 fi
13139 rm -f conftest*
13140 fi
13141
13142 echo "$ac_t""$ac_cv_header_time" 1>&6
13143 if test $ac_cv_header_time = yes; then
13144   cat >> confdefs.h <<\EOF
13145 #define TIME_WITH_SYS_TIME 1
13146 EOF
13147
13148 fi
13149
13150 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13151 echo "configure:13152: checking whether struct tm is in sys/time.h or time.h" >&5
13152 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13153   echo $ac_n "(cached) $ac_c" 1>&6
13154 else
13155   cat > conftest.$ac_ext <<EOF
13156 #line 13157 "configure"
13157 #include "confdefs.h"
13158 #include <sys/types.h>
13159 #include <time.h>
13160 int main() {
13161 struct tm *tp; tp->tm_sec;
13162 ; return 0; }
13163 EOF
13164 if { (eval echo configure:13165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13165   rm -rf conftest*
13166   ac_cv_struct_tm=time.h
13167 else
13168   echo "configure: failed program was:" >&5
13169   cat conftest.$ac_ext >&5
13170   rm -rf conftest*
13171   ac_cv_struct_tm=sys/time.h
13172 fi
13173 rm -f conftest*
13174 fi
13175
13176 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13177 if test $ac_cv_struct_tm = sys/time.h; then
13178   cat >> confdefs.h <<\EOF
13179 #define TM_IN_SYS_TIME 1
13180 EOF
13181
13182 fi
13183
13184 # test for pw_gecos in struct passwd
13185 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13186 echo "configure:13187: checking struct passwd for pw_gecos" >&5
13187 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13188   echo $ac_n "(cached) $ac_c" 1>&6
13189 else
13190   
13191         cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194 #include <pwd.h>
13195 int main() {
13196
13197         struct passwd pwd;
13198         pwd.pw_gecos = pwd.pw_name;
13199
13200 ; return 0; }
13201 EOF
13202 if { (eval echo configure:13203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13203   rm -rf conftest*
13204   ol_cv_struct_passwd_pw_gecos=yes
13205 else
13206   echo "configure: failed program was:" >&5
13207   cat conftest.$ac_ext >&5
13208   rm -rf conftest*
13209   ol_cv_struct_passwd_pw_gecos=no
13210 fi
13211 rm -f conftest*
13212 fi
13213
13214 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13215 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13216         cat >> confdefs.h <<\EOF
13217 #define HAVE_PW_GECOS 1
13218 EOF
13219
13220 fi
13221
13222 # test for pw_passwd in struct passwd
13223 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13224 echo "configure:13225: checking struct passwd for pw_passwd" >&5
13225 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13226   echo $ac_n "(cached) $ac_c" 1>&6
13227 else
13228   
13229         cat > conftest.$ac_ext <<EOF
13230 #line 13231 "configure"
13231 #include "confdefs.h"
13232 #include <pwd.h>
13233 int main() {
13234
13235         struct passwd pwd;
13236         pwd.pw_passwd = pwd.pw_name;
13237
13238 ; return 0; }
13239 EOF
13240 if { (eval echo configure:13241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13241   rm -rf conftest*
13242   ol_cv_struct_passwd_pw_passwd=yes
13243 else
13244   echo "configure: failed program was:" >&5
13245   cat conftest.$ac_ext >&5
13246   rm -rf conftest*
13247   ol_cv_struct_passwd_pw_passwd=no
13248 fi
13249 rm -f conftest*
13250 fi
13251
13252 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13253 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13254         cat >> confdefs.h <<\EOF
13255 #define HAVE_PW_PASSWD 1
13256 EOF
13257
13258 fi
13259
13260
13261 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13262 echo "configure:13263: checking if toupper() requires islower()" >&5
13263 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13264   echo $ac_n "(cached) $ac_c" 1>&6
13265 else
13266   
13267         if test "$cross_compiling" = yes; then
13268   ol_cv_c_upper_lower=safe
13269 else
13270   cat > conftest.$ac_ext <<EOF
13271 #line 13272 "configure"
13272 #include "confdefs.h"
13273
13274 #include <ctype.h>
13275 main()
13276 {
13277         if ('C' == toupper('C'))
13278                 exit(0);
13279         else
13280                 exit(1);
13281 }
13282 EOF
13283 if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13284 then
13285   ol_cv_c_upper_lower=no
13286 else
13287   echo "configure: failed program was:" >&5
13288   cat conftest.$ac_ext >&5
13289   rm -fr conftest*
13290   ol_cv_c_upper_lower=yes
13291 fi
13292 rm -fr conftest*
13293 fi
13294
13295 fi
13296
13297 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13298 if test $ol_cv_c_upper_lower != no ; then
13299         cat >> confdefs.h <<\EOF
13300 #define C_UPPER_LOWER 1
13301 EOF
13302
13303 fi
13304
13305 echo $ac_n "checking for working const""... $ac_c" 1>&6
13306 echo "configure:13307: checking for working const" >&5
13307 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13308   echo $ac_n "(cached) $ac_c" 1>&6
13309 else
13310   cat > conftest.$ac_ext <<EOF
13311 #line 13312 "configure"
13312 #include "confdefs.h"
13313
13314 int main() {
13315
13316 /* Ultrix mips cc rejects this.  */
13317 typedef int charset[2]; const charset x;
13318 /* SunOS 4.1.1 cc rejects this.  */
13319 char const *const *ccp;
13320 char **p;
13321 /* NEC SVR4.0.2 mips cc rejects this.  */
13322 struct point {int x, y;};
13323 static struct point const zero = {0,0};
13324 /* AIX XL C 1.02.0.0 rejects this.
13325    It does not let you subtract one const X* pointer from another in an arm
13326    of an if-expression whose if-part is not a constant expression */
13327 const char *g = "string";
13328 ccp = &g + (g ? g-g : 0);
13329 /* HPUX 7.0 cc rejects these. */
13330 ++ccp;
13331 p = (char**) ccp;
13332 ccp = (char const *const *) p;
13333 { /* SCO 3.2v4 cc rejects this.  */
13334   char *t;
13335   char const *s = 0 ? (char *) 0 : (char const *) 0;
13336
13337   *t++ = 0;
13338 }
13339 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13340   int x[] = {25, 17};
13341   const int *foo = &x[0];
13342   ++foo;
13343 }
13344 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13345   typedef const int *iptr;
13346   iptr p = 0;
13347   ++p;
13348 }
13349 { /* AIX XL C 1.02.0.0 rejects this saying
13350      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13351   struct s { int j; const int *ap[3]; };
13352   struct s *b; b->j = 5;
13353 }
13354 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13355   const int foo = 10;
13356 }
13357
13358 ; return 0; }
13359 EOF
13360 if { (eval echo configure:13361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13361   rm -rf conftest*
13362   ac_cv_c_const=yes
13363 else
13364   echo "configure: failed program was:" >&5
13365   cat conftest.$ac_ext >&5
13366   rm -rf conftest*
13367   ac_cv_c_const=no
13368 fi
13369 rm -f conftest*
13370 fi
13371
13372 echo "$ac_t""$ac_cv_c_const" 1>&6
13373 if test $ac_cv_c_const = no; then
13374   cat >> confdefs.h <<\EOF
13375 #define const 
13376 EOF
13377
13378 fi
13379
13380 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13381 echo "configure:13382: checking if compiler understands volatile" >&5
13382 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13383   echo $ac_n "(cached) $ac_c" 1>&6
13384 else
13385   cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388 int x, y, z;
13389 int main() {
13390 volatile int a; int * volatile b = x ? &y : &z;
13391       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13392       *b = 0;
13393 ; return 0; }
13394 EOF
13395 if { (eval echo configure:13396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13396   rm -rf conftest*
13397   ol_cv_c_volatile=yes
13398 else
13399   echo "configure: failed program was:" >&5
13400   cat conftest.$ac_ext >&5
13401   rm -rf conftest*
13402   ol_cv_c_volatile=no
13403 fi
13404 rm -f conftest*
13405 fi
13406
13407 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13408   if test $ol_cv_c_volatile = yes; then
13409     : 
13410   else
13411     cat >> confdefs.h <<\EOF
13412 #define volatile 
13413 EOF
13414
13415   fi
13416  
13417
13418 if test $cross_compiling = yes ; then
13419         cat >> confdefs.h <<\EOF
13420 #define CROSS_COMPILING 1
13421 EOF
13422
13423
13424         cat >> confdefs.h <<\EOF
13425 #define LBER_INT_T long
13426 EOF
13427
13428         cat >> confdefs.h <<\EOF
13429 #define LBER_TAG_T long
13430 EOF
13431
13432         cat >> confdefs.h <<\EOF
13433 #define LBER_SOCKET_T int
13434 EOF
13435
13436
13437 else
13438         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13439 echo "configure:13440: checking whether byte ordering is bigendian" >&5
13440 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13441   echo $ac_n "(cached) $ac_c" 1>&6
13442 else
13443   ac_cv_c_bigendian=unknown
13444 # See if sys/param.h defines the BYTE_ORDER macro.
13445 cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 #include <sys/types.h>
13449 #include <sys/param.h>
13450 int main() {
13451
13452 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13453  bogus endian macros
13454 #endif
13455 ; return 0; }
13456 EOF
13457 if { (eval echo configure:13458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13458   rm -rf conftest*
13459   # It does; now see whether it defined to BIG_ENDIAN or not.
13460 cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 #include <sys/types.h>
13464 #include <sys/param.h>
13465 int main() {
13466
13467 #if BYTE_ORDER != BIG_ENDIAN
13468  not big endian
13469 #endif
13470 ; return 0; }
13471 EOF
13472 if { (eval echo configure:13473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13473   rm -rf conftest*
13474   ac_cv_c_bigendian=yes
13475 else
13476   echo "configure: failed program was:" >&5
13477   cat conftest.$ac_ext >&5
13478   rm -rf conftest*
13479   ac_cv_c_bigendian=no
13480 fi
13481 rm -f conftest*
13482 else
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485 fi
13486 rm -f conftest*
13487 if test $ac_cv_c_bigendian = unknown; then
13488 if test "$cross_compiling" = yes; then
13489     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13490 else
13491   cat > conftest.$ac_ext <<EOF
13492 #line 13493 "configure"
13493 #include "confdefs.h"
13494 main () {
13495   /* Are we little or big endian?  From Harbison&Steele.  */
13496   union
13497   {
13498     long l;
13499     char c[sizeof (long)];
13500   } u;
13501   u.l = 1;
13502   exit (u.c[sizeof (long) - 1] == 1);
13503 }
13504 EOF
13505 if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13506 then
13507   ac_cv_c_bigendian=no
13508 else
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -fr conftest*
13512   ac_cv_c_bigendian=yes
13513 fi
13514 rm -fr conftest*
13515 fi
13516
13517 fi
13518 fi
13519
13520 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13521 if test $ac_cv_c_bigendian = yes; then
13522   cat >> confdefs.h <<\EOF
13523 #define WORDS_BIGENDIAN 1
13524 EOF
13525
13526 fi
13527
13528         echo $ac_n "checking size of short""... $ac_c" 1>&6
13529 echo "configure:13530: checking size of short" >&5
13530 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13531   echo $ac_n "(cached) $ac_c" 1>&6
13532 else
13533   if test "$cross_compiling" = yes; then
13534     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13535 else
13536   cat > conftest.$ac_ext <<EOF
13537 #line 13538 "configure"
13538 #include "confdefs.h"
13539 #include <stdio.h>
13540 main()
13541 {
13542   FILE *f=fopen("conftestval", "w");
13543   if (!f) exit(1);
13544   fprintf(f, "%d\n", sizeof(short));
13545   exit(0);
13546 }
13547 EOF
13548 if { (eval echo configure:13549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13549 then
13550   ac_cv_sizeof_short=`cat conftestval`
13551 else
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -fr conftest*
13555   ac_cv_sizeof_short=0
13556 fi
13557 rm -fr conftest*
13558 fi
13559
13560 fi
13561 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13562 cat >> confdefs.h <<EOF
13563 #define SIZEOF_SHORT $ac_cv_sizeof_short
13564 EOF
13565
13566  
13567         echo $ac_n "checking size of int""... $ac_c" 1>&6
13568 echo "configure:13569: checking size of int" >&5
13569 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13570   echo $ac_n "(cached) $ac_c" 1>&6
13571 else
13572   if test "$cross_compiling" = yes; then
13573     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13574 else
13575   cat > conftest.$ac_ext <<EOF
13576 #line 13577 "configure"
13577 #include "confdefs.h"
13578 #include <stdio.h>
13579 main()
13580 {
13581   FILE *f=fopen("conftestval", "w");
13582   if (!f) exit(1);
13583   fprintf(f, "%d\n", sizeof(int));
13584   exit(0);
13585 }
13586 EOF
13587 if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13588 then
13589   ac_cv_sizeof_int=`cat conftestval`
13590 else
13591   echo "configure: failed program was:" >&5
13592   cat conftest.$ac_ext >&5
13593   rm -fr conftest*
13594   ac_cv_sizeof_int=0
13595 fi
13596 rm -fr conftest*
13597 fi
13598
13599 fi
13600 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13601 cat >> confdefs.h <<EOF
13602 #define SIZEOF_INT $ac_cv_sizeof_int
13603 EOF
13604
13605  
13606         echo $ac_n "checking size of long""... $ac_c" 1>&6
13607 echo "configure:13608: checking size of long" >&5
13608 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13609   echo $ac_n "(cached) $ac_c" 1>&6
13610 else
13611   if test "$cross_compiling" = yes; then
13612     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13613 else
13614   cat > conftest.$ac_ext <<EOF
13615 #line 13616 "configure"
13616 #include "confdefs.h"
13617 #include <stdio.h>
13618 main()
13619 {
13620   FILE *f=fopen("conftestval", "w");
13621   if (!f) exit(1);
13622   fprintf(f, "%d\n", sizeof(long));
13623   exit(0);
13624 }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13627 then
13628   ac_cv_sizeof_long=`cat conftestval`
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -fr conftest*
13633   ac_cv_sizeof_long=0
13634 fi
13635 rm -fr conftest*
13636 fi
13637
13638 fi
13639 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13640 cat >> confdefs.h <<EOF
13641 #define SIZEOF_LONG $ac_cv_sizeof_long
13642 EOF
13643
13644
13645
13646         if test "$ac_cv_sizeof_int" -lt 4 ; then
13647                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13648
13649                 cat >> confdefs.h <<\EOF
13650 #define LBER_INT_T long
13651 EOF
13652
13653                 cat >> confdefs.h <<\EOF
13654 #define LBER_TAG_T long
13655 EOF
13656
13657                 cat >> confdefs.h <<\EOF
13658 #define LBER_SOCKET_T int
13659 EOF
13660
13661         else
13662                 cat >> confdefs.h <<\EOF
13663 #define LBER_INT_T int
13664 EOF
13665
13666                 cat >> confdefs.h <<\EOF
13667 #define LBER_TAG_T long
13668 EOF
13669
13670                 cat >> confdefs.h <<\EOF
13671 #define LBER_SOCKET_T int
13672 EOF
13673
13674         fi
13675 fi
13676
13677 cat >> confdefs.h <<\EOF
13678 #define LBER_LEN_T long
13679 EOF
13680
13681
13682 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13683 echo "configure:13684: checking for 8-bit clean memcmp" >&5
13684 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13685   echo $ac_n "(cached) $ac_c" 1>&6
13686 else
13687   if test "$cross_compiling" = yes; then
13688   ac_cv_func_memcmp_clean=no
13689 else
13690   cat > conftest.$ac_ext <<EOF
13691 #line 13692 "configure"
13692 #include "confdefs.h"
13693
13694 main()
13695 {
13696   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13697   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13698 }
13699
13700 EOF
13701 if { (eval echo configure:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13702 then
13703   ac_cv_func_memcmp_clean=yes
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -fr conftest*
13708   ac_cv_func_memcmp_clean=no
13709 fi
13710 rm -fr conftest*
13711 fi
13712
13713 fi
13714
13715 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13716 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13717
13718 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13719 echo "configure:13720: checking for strftime" >&5
13720 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13721   echo $ac_n "(cached) $ac_c" 1>&6
13722 else
13723   cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726 /* System header to define __stub macros and hopefully few prototypes,
13727     which can conflict with char strftime(); below.  */
13728 #include <assert.h>
13729 /* Override any gcc2 internal prototype to avoid an error.  */
13730 /* We use char because int might match the return type of a gcc2
13731     builtin and then its argument prototype would still apply.  */
13732 char strftime();
13733 char (*f)();
13734
13735 int main() {
13736
13737 /* The GNU C library defines this for functions which it implements
13738     to always fail with ENOSYS.  Some functions are actually named
13739     something starting with __ and the normal name is an alias.  */
13740 #if defined (__stub_strftime) || defined (__stub___strftime)
13741 choke me
13742 #else
13743 f = strftime;
13744 #endif
13745
13746 ; return 0; }
13747 EOF
13748 if { (eval echo configure:13749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13749   rm -rf conftest*
13750   eval "ac_cv_func_strftime=yes"
13751 else
13752   echo "configure: failed program was:" >&5
13753   cat conftest.$ac_ext >&5
13754   rm -rf conftest*
13755   eval "ac_cv_func_strftime=no"
13756 fi
13757 rm -f conftest*
13758 fi
13759
13760 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13761   echo "$ac_t""yes" 1>&6
13762   cat >> confdefs.h <<\EOF
13763 #define HAVE_STRFTIME 1
13764 EOF
13765
13766 else
13767   echo "$ac_t""no" 1>&6
13768 # strftime is in -lintl on SCO UNIX.
13769 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13770 echo "configure:13771: checking for strftime in -lintl" >&5
13771 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13772 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13773   echo $ac_n "(cached) $ac_c" 1>&6
13774 else
13775   ac_save_LIBS="$LIBS"
13776 LIBS="-lintl  $LIBS"
13777 cat > conftest.$ac_ext <<EOF
13778 #line 13779 "configure"
13779 #include "confdefs.h"
13780 /* Override any gcc2 internal prototype to avoid an error.  */
13781 /* We use char because int might match the return type of a gcc2
13782     builtin and then its argument prototype would still apply.  */
13783 char strftime();
13784
13785 int main() {
13786 strftime()
13787 ; return 0; }
13788 EOF
13789 if { (eval echo configure:13790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13790   rm -rf conftest*
13791   eval "ac_cv_lib_$ac_lib_var=yes"
13792 else
13793   echo "configure: failed program was:" >&5
13794   cat conftest.$ac_ext >&5
13795   rm -rf conftest*
13796   eval "ac_cv_lib_$ac_lib_var=no"
13797 fi
13798 rm -f conftest*
13799 LIBS="$ac_save_LIBS"
13800
13801 fi
13802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13803   echo "$ac_t""yes" 1>&6
13804   cat >> confdefs.h <<\EOF
13805 #define HAVE_STRFTIME 1
13806 EOF
13807
13808 LIBS="-lintl $LIBS"
13809 else
13810   echo "$ac_t""no" 1>&6
13811 fi
13812
13813 fi
13814
13815
13816 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13817 echo "configure:13818: checking for inet_aton()" >&5
13818 if eval "test \"\${ol_cv_func_inet_aton+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
13825 #ifdef HAVE_SYS_TYPES_H
13826 #       include <sys/types.h>
13827 #endif
13828 #ifdef HAVE_SYS_SOCKET_H
13829 #       include <sys/socket.h>
13830 #       ifdef HAVE_SYS_SELECT_H
13831 #               include <sys/select.h>
13832 #       endif
13833 #       include <netinet/in.h>
13834 #       ifdef HAVE_ARPA_INET_H
13835 #               include <arpa/inet.h>
13836 #       endif
13837 #endif
13838
13839 int main() {
13840 struct in_addr in;
13841 int rc = inet_aton( "255.255.255.255", &in );
13842 ; return 0; }
13843 EOF
13844 if { (eval echo configure:13845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13845   rm -rf conftest*
13846   ol_cv_func_inet_aton=yes
13847 else
13848   echo "configure: failed program was:" >&5
13849   cat conftest.$ac_ext >&5
13850   rm -rf conftest*
13851   ol_cv_func_inet_aton=no
13852 fi
13853 rm -f conftest*
13854 fi
13855
13856 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13857   if test $ol_cv_func_inet_aton != no; then
13858     cat >> confdefs.h <<\EOF
13859 #define HAVE_INET_ATON 1
13860 EOF
13861
13862   fi
13863  
13864
13865 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13866 echo "configure:13867: checking for vprintf" >&5
13867 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13868   echo $ac_n "(cached) $ac_c" 1>&6
13869 else
13870   cat > conftest.$ac_ext <<EOF
13871 #line 13872 "configure"
13872 #include "confdefs.h"
13873 /* System header to define __stub macros and hopefully few prototypes,
13874     which can conflict with char vprintf(); below.  */
13875 #include <assert.h>
13876 /* Override any gcc2 internal prototype to avoid an error.  */
13877 /* We use char because int might match the return type of a gcc2
13878     builtin and then its argument prototype would still apply.  */
13879 char vprintf();
13880 char (*f)();
13881
13882 int main() {
13883
13884 /* The GNU C library defines this for functions which it implements
13885     to always fail with ENOSYS.  Some functions are actually named
13886     something starting with __ and the normal name is an alias.  */
13887 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13888 choke me
13889 #else
13890 f = vprintf;
13891 #endif
13892
13893 ; return 0; }
13894 EOF
13895 if { (eval echo configure:13896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13896   rm -rf conftest*
13897   eval "ac_cv_func_vprintf=yes"
13898 else
13899   echo "configure: failed program was:" >&5
13900   cat conftest.$ac_ext >&5
13901   rm -rf conftest*
13902   eval "ac_cv_func_vprintf=no"
13903 fi
13904 rm -f conftest*
13905 fi
13906
13907 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13908   echo "$ac_t""yes" 1>&6
13909   cat >> confdefs.h <<\EOF
13910 #define HAVE_VPRINTF 1
13911 EOF
13912
13913 else
13914   echo "$ac_t""no" 1>&6
13915 fi
13916
13917 if test "$ac_cv_func_vprintf" != yes; then
13918 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13919 echo "configure:13920: checking for _doprnt" >&5
13920 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13921   echo $ac_n "(cached) $ac_c" 1>&6
13922 else
13923   cat > conftest.$ac_ext <<EOF
13924 #line 13925 "configure"
13925 #include "confdefs.h"
13926 /* System header to define __stub macros and hopefully few prototypes,
13927     which can conflict with char _doprnt(); below.  */
13928 #include <assert.h>
13929 /* Override any gcc2 internal prototype to avoid an error.  */
13930 /* We use char because int might match the return type of a gcc2
13931     builtin and then its argument prototype would still apply.  */
13932 char _doprnt();
13933 char (*f)();
13934
13935 int main() {
13936
13937 /* The GNU C library defines this for functions which it implements
13938     to always fail with ENOSYS.  Some functions are actually named
13939     something starting with __ and the normal name is an alias.  */
13940 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13941 choke me
13942 #else
13943 f = _doprnt;
13944 #endif
13945
13946 ; return 0; }
13947 EOF
13948 if { (eval echo configure:13949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13949   rm -rf conftest*
13950   eval "ac_cv_func__doprnt=yes"
13951 else
13952   echo "configure: failed program was:" >&5
13953   cat conftest.$ac_ext >&5
13954   rm -rf conftest*
13955   eval "ac_cv_func__doprnt=no"
13956 fi
13957 rm -f conftest*
13958 fi
13959
13960 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13961   echo "$ac_t""yes" 1>&6
13962   cat >> confdefs.h <<\EOF
13963 #define HAVE_DOPRNT 1
13964 EOF
13965
13966 else
13967   echo "$ac_t""no" 1>&6
13968 fi
13969
13970 fi
13971
13972
13973 if test $ac_cv_func_vprintf = yes ; then
13974                 for ac_func in vsnprintf vsprintf
13975 do
13976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13977 echo "configure:13978: checking for $ac_func" >&5
13978 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13979   echo $ac_n "(cached) $ac_c" 1>&6
13980 else
13981   cat > conftest.$ac_ext <<EOF
13982 #line 13983 "configure"
13983 #include "confdefs.h"
13984 /* System header to define __stub macros and hopefully few prototypes,
13985     which can conflict with char $ac_func(); below.  */
13986 #include <assert.h>
13987 /* Override any gcc2 internal prototype to avoid an error.  */
13988 /* We use char because int might match the return type of a gcc2
13989     builtin and then its argument prototype would still apply.  */
13990 char $ac_func();
13991 char (*f)();
13992
13993 int main() {
13994
13995 /* The GNU C library defines this for functions which it implements
13996     to always fail with ENOSYS.  Some functions are actually named
13997     something starting with __ and the normal name is an alias.  */
13998 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13999 choke me
14000 #else
14001 f = $ac_func;
14002 #endif
14003
14004 ; return 0; }
14005 EOF
14006 if { (eval echo configure:14007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14007   rm -rf conftest*
14008   eval "ac_cv_func_$ac_func=yes"
14009 else
14010   echo "configure: failed program was:" >&5
14011   cat conftest.$ac_ext >&5
14012   rm -rf conftest*
14013   eval "ac_cv_func_$ac_func=no"
14014 fi
14015 rm -f conftest*
14016 fi
14017
14018 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14019   echo "$ac_t""yes" 1>&6
14020     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14021   cat >> confdefs.h <<EOF
14022 #define $ac_tr_func 1
14023 EOF
14024  
14025 else
14026   echo "$ac_t""no" 1>&6
14027 fi
14028 done
14029
14030 fi
14031
14032 for ac_func in \
14033         bcopy                   \
14034         closesocket             \
14035         endgrent                \
14036         endpwent                \
14037         flock                   \
14038         getdtablesize   \
14039         getgrgid                \
14040         gethostname             \
14041         getpass                 \
14042         getpwuid                \
14043         getpwnam                \
14044         getspnam                \
14045         gettimeofday    \
14046         initgroups              \
14047         lockf                   \
14048         memcpy                  \
14049         memmove                 \
14050         mkstemp                 \
14051         read                    \
14052         recv                    \
14053         recvfrom                \
14054         setpwfile               \
14055         setgid                  \
14056         setegid                 \
14057         setsid                  \
14058         setuid                  \
14059         seteuid                 \
14060         signal                  \
14061         sigset                  \
14062         snprintf                \
14063         strdup                  \
14064         strerror                \
14065         strpbrk                 \
14066         strrchr                 \
14067         strsep                  \
14068         strstr                  \
14069         strtol                  \
14070         strtoul                 \
14071         strspn                  \
14072         sysconf                 \
14073         waitpid                 \
14074         wait4                   \
14075         write                   \
14076         send                    \
14077         sendto                  \
14078
14079 do
14080 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14081 echo "configure:14082: checking for $ac_func" >&5
14082 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14083   echo $ac_n "(cached) $ac_c" 1>&6
14084 else
14085   cat > conftest.$ac_ext <<EOF
14086 #line 14087 "configure"
14087 #include "confdefs.h"
14088 /* System header to define __stub macros and hopefully few prototypes,
14089     which can conflict with char $ac_func(); below.  */
14090 #include <assert.h>
14091 /* Override any gcc2 internal prototype to avoid an error.  */
14092 /* We use char because int might match the return type of a gcc2
14093     builtin and then its argument prototype would still apply.  */
14094 char $ac_func();
14095 char (*f)();
14096
14097 int main() {
14098
14099 /* The GNU C library defines this for functions which it implements
14100     to always fail with ENOSYS.  Some functions are actually named
14101     something starting with __ and the normal name is an alias.  */
14102 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14103 choke me
14104 #else
14105 f = $ac_func;
14106 #endif
14107
14108 ; return 0; }
14109 EOF
14110 if { (eval echo configure:14111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14111   rm -rf conftest*
14112   eval "ac_cv_func_$ac_func=yes"
14113 else
14114   echo "configure: failed program was:" >&5
14115   cat conftest.$ac_ext >&5
14116   rm -rf conftest*
14117   eval "ac_cv_func_$ac_func=no"
14118 fi
14119 rm -f conftest*
14120 fi
14121
14122 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14123   echo "$ac_t""yes" 1>&6
14124     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14125   cat >> confdefs.h <<EOF
14126 #define $ac_tr_func 1
14127 EOF
14128  
14129 else
14130   echo "$ac_t""no" 1>&6
14131 fi
14132 done
14133
14134
14135 for ac_func in getopt tempnam
14136 do
14137 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14138 echo "configure:14139: checking for $ac_func" >&5
14139 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14140   echo $ac_n "(cached) $ac_c" 1>&6
14141 else
14142   cat > conftest.$ac_ext <<EOF
14143 #line 14144 "configure"
14144 #include "confdefs.h"
14145 /* System header to define __stub macros and hopefully few prototypes,
14146     which can conflict with char $ac_func(); below.  */
14147 #include <assert.h>
14148 /* Override any gcc2 internal prototype to avoid an error.  */
14149 /* We use char because int might match the return type of a gcc2
14150     builtin and then its argument prototype would still apply.  */
14151 char $ac_func();
14152 char (*f)();
14153
14154 int main() {
14155
14156 /* The GNU C library defines this for functions which it implements
14157     to always fail with ENOSYS.  Some functions are actually named
14158     something starting with __ and the normal name is an alias.  */
14159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14160 choke me
14161 #else
14162 f = $ac_func;
14163 #endif
14164
14165 ; return 0; }
14166 EOF
14167 if { (eval echo configure:14168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14168   rm -rf conftest*
14169   eval "ac_cv_func_$ac_func=yes"
14170 else
14171   echo "configure: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173   rm -rf conftest*
14174   eval "ac_cv_func_$ac_func=no"
14175 fi
14176 rm -f conftest*
14177 fi
14178
14179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14180   echo "$ac_t""yes" 1>&6
14181     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14182   cat >> confdefs.h <<EOF
14183 #define $ac_tr_func 1
14184 EOF
14185  
14186 else
14187   echo "$ac_t""no" 1>&6
14188 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14189 fi
14190 done
14191
14192
14193
14194 # Check Configuration
14195 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14196 echo "configure:14197: checking declaration of sys_errlist" >&5
14197 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14198   echo $ac_n "(cached) $ac_c" 1>&6
14199 else
14200   
14201         cat > conftest.$ac_ext <<EOF
14202 #line 14203 "configure"
14203 #include "confdefs.h"
14204
14205 #include <stdio.h>
14206 #include <sys/types.h>
14207 #include <errno.h> 
14208 int main() {
14209 char *c = (char *) *sys_errlist
14210 ; return 0; }
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14213   rm -rf conftest*
14214   ol_cv_dcl_sys_errlist=yes
14215         ol_cv_have_sys_errlist=yes
14216 else
14217   echo "configure: failed program was:" >&5
14218   cat conftest.$ac_ext >&5
14219   rm -rf conftest*
14220   ol_cv_dcl_sys_errlist=no
14221 fi
14222 rm -f conftest*
14223 fi
14224
14225 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14226 #
14227 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14228 if test $ol_cv_dcl_sys_errlist = no ; then
14229         cat >> confdefs.h <<\EOF
14230 #define DECL_SYS_ERRLIST 1
14231 EOF
14232
14233
14234         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14235 echo "configure:14236: checking existence of sys_errlist" >&5
14236 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14237   echo $ac_n "(cached) $ac_c" 1>&6
14238 else
14239   
14240                 cat > conftest.$ac_ext <<EOF
14241 #line 14242 "configure"
14242 #include "confdefs.h"
14243 #include <errno.h>
14244 int main() {
14245 char *c = (char *) *sys_errlist
14246 ; return 0; }
14247 EOF
14248 if { (eval echo configure:14249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14249   rm -rf conftest*
14250   ol_cv_have_sys_errlist=yes
14251 else
14252   echo "configure: failed program was:" >&5
14253   cat conftest.$ac_ext >&5
14254   rm -rf conftest*
14255   ol_cv_have_sys_errlist=no
14256 fi
14257 rm -f conftest*
14258 fi
14259
14260 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14261 fi
14262 if test $ol_cv_have_sys_errlist = yes ; then
14263         cat >> confdefs.h <<\EOF
14264 #define HAVE_SYS_ERRLIST 1
14265 EOF
14266
14267 fi
14268
14269
14270
14271 if test "$ol_enable_debug" != no ; then
14272         cat >> confdefs.h <<\EOF
14273 #define LDAP_DEBUG 1
14274 EOF
14275
14276 fi
14277 if test "$ol_enable_syslog" = yes ; then
14278         cat >> confdefs.h <<\EOF
14279 #define LDAP_SYSLOG 1
14280 EOF
14281
14282 fi
14283 if test "$ol_enable_libui" = yes ; then
14284         cat >> confdefs.h <<\EOF
14285 #define LDAP_LIBUI 1
14286 EOF
14287
14288 fi
14289 if test "$ol_enable_cache" = no ; then
14290         cat >> confdefs.h <<\EOF
14291 #define LDAP_NOCACHE 1
14292 EOF
14293
14294 fi
14295 if test "$ol_enable_dns" != no ; then
14296         cat >> confdefs.h <<\EOF
14297 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14298 EOF
14299
14300 fi
14301 if test "$ol_enable_proctitle" != no ; then
14302         cat >> confdefs.h <<\EOF
14303 #define LDAP_PROCTITLE 1
14304 EOF
14305
14306 fi
14307 if test "$ol_enable_referrals" != no ; then
14308         cat >> confdefs.h <<\EOF
14309 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14310 EOF
14311
14312 fi
14313 if test "$ol_enable_cldap" != no ; then
14314         cat >> confdefs.h <<\EOF
14315 #define LDAP_CONNECTIONLESS 1
14316 EOF
14317
14318 fi
14319
14320 if test "$ol_enable_crypt" != no ; then
14321         cat >> confdefs.h <<\EOF
14322 #define SLAPD_CRYPT 1
14323 EOF
14324
14325 fi
14326 if test "$ol_enable_cleartext" != no ; then
14327         cat >> confdefs.h <<\EOF
14328 #define SLAPD_CLEARTEXT 1
14329 EOF
14330
14331 fi
14332 if test "$ol_enable_multimaster" != no ; then
14333         cat >> confdefs.h <<\EOF
14334 #define SLAPD_MULTIMASTER 1
14335 EOF
14336
14337 fi
14338 if test "$ol_enable_phonetic" != no ; then
14339         cat >> confdefs.h <<\EOF
14340 #define SLAPD_PHONETIC 1
14341 EOF
14342
14343 fi
14344 if test "$ol_enable_rlookups" != no ; then
14345         cat >> confdefs.h <<\EOF
14346 #define SLAPD_RLOOKUPS 1
14347 EOF
14348
14349 fi
14350 if test "$ol_enable_aci" != no ; then
14351         cat >> confdefs.h <<\EOF
14352 #define SLAPD_ACI_ENABLED 1
14353 EOF
14354
14355 fi
14356 if test "$ol_enable_discreteaci" != no ; then
14357         cat >> confdefs.h <<\EOF
14358 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14359 EOF
14360
14361 fi
14362
14363 if test "$ol_link_modules" != no ; then
14364         cat >> confdefs.h <<\EOF
14365 #define SLAPD_MODULES 1
14366 EOF
14367
14368         BUILD_SLAPD=yes
14369         MODULES_LIBS=-lltdl
14370         SLAPD_MODULES_LDFLAGS="-dlopen self"
14371 fi
14372
14373 if test "$ol_link_bdb2" != no ; then
14374         cat >> confdefs.h <<\EOF
14375 #define SLAPD_BDB2 1
14376 EOF
14377
14378         BUILD_SLAPD=yes
14379         BUILD_BDB2=yes
14380         if test "$ol_with_bdb2_module" != static ; then
14381                 cat >> confdefs.h <<\EOF
14382 #define SLAPD_BDB2_DYNAMIC 1
14383 EOF
14384
14385                 BUILD_BDB2=mod
14386                 BUILD_BDB2_DYNAMIC=shared
14387                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14388         fi
14389 fi
14390
14391 if test "$ol_enable_ldap" != no ; then
14392         cat >> confdefs.h <<\EOF
14393 #define SLAPD_LDAP 1
14394 EOF
14395
14396         BUILD_SLAPD=yes
14397         BUILD_LDAP=yes
14398         if test "$ol_with_ldap_module" != static ; then
14399                 cat >> confdefs.h <<\EOF
14400 #define SLAPD_LDAP_DYNAMIC 1
14401 EOF
14402
14403                 BUILD_LDAP=mod
14404                 BUILD_LDAP_DYNAMIC=shared
14405                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14406         fi
14407 fi
14408
14409 if test "$ol_link_ldbm" != no ; then
14410         cat >> confdefs.h <<\EOF
14411 #define SLAPD_LDBM 1
14412 EOF
14413
14414         BUILD_SLAPD=yes
14415         BUILD_LDBM=yes
14416         if test "$ol_with_ldbm_module" != static ; then
14417                 cat >> confdefs.h <<\EOF
14418 #define SLAPD_LDBM_DYNAMIC 1
14419 EOF
14420
14421                 BUILD_LDBM=mod
14422                 BUILD_LDBM_DYNAMIC=shared
14423                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14424         fi
14425 fi
14426
14427 if test "$ol_enable_passwd" != no ; then
14428         cat >> confdefs.h <<\EOF
14429 #define SLAPD_PASSWD 1
14430 EOF
14431
14432         BUILD_SLAPD=yes
14433         BUILD_PASSWD=yes
14434         if test "$ol_with_passwd_module" != static ; then
14435                 cat >> confdefs.h <<\EOF
14436 #define SLAPD_PASSWD_DYNAMIC 1
14437 EOF
14438
14439                 BUILD_PASSWD=mod
14440                 BUILD_PASSWD_DYNAMIC=shared
14441                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14442         fi
14443 fi
14444
14445 if test "$ol_link_perl" != no ; then
14446         cat >> confdefs.h <<\EOF
14447 #define SLAPD_PERL 1
14448 EOF
14449
14450         BUILD_SLAPD=yes
14451         BUILD_PERL=yes
14452         if test "$ol_with_perl_module" != static ; then
14453                 cat >> confdefs.h <<\EOF
14454 #define SLAPD_PERL_DYNAMIC 1
14455 EOF
14456
14457                 BUILD_PERL=mod
14458                 BUILD_PERL_DYNAMIC=shared
14459                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14460         fi
14461 fi
14462
14463 if test "$ol_enable_shell" != no ; then
14464         cat >> confdefs.h <<\EOF
14465 #define SLAPD_SHELL 1
14466 EOF
14467
14468         BUILD_SLAPD=yes
14469         BUILD_SHELL=yes
14470         if test "$ol_with_shell_module" != static ; then
14471                 cat >> confdefs.h <<\EOF
14472 #define SLAPD_SHELL_DYNAMIC 1
14473 EOF
14474
14475                 BUILD_SHELL=mod
14476                 BUILD_SHELL_DYNAMIC=shared
14477                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14478         fi
14479 fi
14480
14481 if test "$ol_enable_tcl" != no ; then
14482         cat >> confdefs.h <<\EOF
14483 #define SLAPD_TCL 1
14484 EOF
14485
14486         BUILD_SLAPD=yes
14487         BUILD_TCL=yes
14488         if test "$ol_with_tcl_module" != static; then
14489                 cat >> confdefs.h <<\EOF
14490 #define SLAPD_TCL_DYNAMIC 1
14491 EOF
14492
14493                 BUILD_TCL=mod
14494                 BUILD_TCL_DYNAMIC=shared
14495                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14496         fi
14497 fi
14498
14499 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14500         $BUILD_SLAPD = yes ; then
14501         BUILD_SLURPD=yes
14502 fi
14503
14504 if test "$ol_link_isode" != no ; then
14505         BUILD_LDAPD=yes
14506 fi
14507
14508
14509
14510
14511   
14512   
14513   
14514   
14515   
14516   
14517   
14518   
14519   
14520   
14521   
14522   
14523   
14524   
14525   
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552 trap '' 1 2 15
14553
14554 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14555
14556 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14557 # Let make expand exec_prefix.
14558 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14559
14560 # Any assignment to VPATH causes Sun make to only execute
14561 # the first set of double-colon rules, so remove it if not needed.
14562 # If there is a colon in the path, we need to keep it.
14563 if test "x$srcdir" = x.; then
14564   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14565 fi
14566
14567 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14568
14569 DEFS=-DHAVE_CONFIG_H
14570
14571 # Without the "./", some shells look in PATH for config.status.
14572 : ${CONFIG_STATUS=./config.status}
14573
14574 echo creating $CONFIG_STATUS
14575 rm -f $CONFIG_STATUS
14576 cat > $CONFIG_STATUS <<EOF
14577 #! /bin/sh
14578 # Generated automatically by configure.
14579 # Run this file to recreate the current configuration.
14580 # This directory was configured as follows,
14581 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14582 #
14583 # $0 $ac_configure_args
14584 #
14585 # Compiler output produced by configure, useful for debugging
14586 # configure, is in ./config.log if it exists.
14587
14588 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14589 for ac_option
14590 do
14591   case "\$ac_option" in
14592   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14593     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14594     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14595   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14596     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14597     exit 0 ;;
14598   -help | --help | --hel | --he | --h)
14599     echo "\$ac_cs_usage"; exit 0 ;;
14600   *) echo "\$ac_cs_usage"; exit 1 ;;
14601   esac
14602 done
14603
14604 ac_given_srcdir=$srcdir
14605 ac_given_INSTALL="$INSTALL"
14606
14607 trap 'rm -fr `echo "\
14608 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14609 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14610 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14611 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14612 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14613 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14614 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14615 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14616 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14617 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14618 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14619 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14620 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14621 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14622 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14623 include/Makefile:build/top.mk:include/Makefile.in \
14624 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14625 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14626 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14627 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14628 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14629 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14630 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14631 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14632 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14633 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14634 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14635 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14636 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14637 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14638 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14639 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14640 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14641 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14642 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14643 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14644 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14645 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14646 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14647 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14648 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14649 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14650  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14651 EOF
14652 cat >> $CONFIG_STATUS <<EOF
14653
14654 # Protect against being on the right side of a sed subst in config.status.
14655 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14656  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14657 $ac_vpsub
14658 $extrasub
14659 s%@SHELL@%$SHELL%g
14660 s%@CFLAGS@%$CFLAGS%g
14661 s%@CPPFLAGS@%$CPPFLAGS%g
14662 s%@CXXFLAGS@%$CXXFLAGS%g
14663 s%@FFLAGS@%$FFLAGS%g
14664 s%@DEFS@%$DEFS%g
14665 s%@LDFLAGS@%$LDFLAGS%g
14666 s%@LIBS@%$LIBS%g
14667 s%@exec_prefix@%$exec_prefix%g
14668 s%@prefix@%$prefix%g
14669 s%@program_transform_name@%$program_transform_name%g
14670 s%@bindir@%$bindir%g
14671 s%@sbindir@%$sbindir%g
14672 s%@libexecdir@%$libexecdir%g
14673 s%@datadir@%$datadir%g
14674 s%@sysconfdir@%$sysconfdir%g
14675 s%@sharedstatedir@%$sharedstatedir%g
14676 s%@localstatedir@%$localstatedir%g
14677 s%@libdir@%$libdir%g
14678 s%@includedir@%$includedir%g
14679 s%@oldincludedir@%$oldincludedir%g
14680 s%@infodir@%$infodir%g
14681 s%@mandir@%$mandir%g
14682 s%@host@%$host%g
14683 s%@host_alias@%$host_alias%g
14684 s%@host_cpu@%$host_cpu%g
14685 s%@host_vendor@%$host_vendor%g
14686 s%@host_os@%$host_os%g
14687 s%@target@%$target%g
14688 s%@target_alias@%$target_alias%g
14689 s%@target_cpu@%$target_cpu%g
14690 s%@target_vendor@%$target_vendor%g
14691 s%@target_os@%$target_os%g
14692 s%@build@%$build%g
14693 s%@build_alias@%$build_alias%g
14694 s%@build_cpu@%$build_cpu%g
14695 s%@build_vendor@%$build_vendor%g
14696 s%@build_os@%$build_os%g
14697 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14698 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14699 s%@INSTALL_DATA@%$INSTALL_DATA%g
14700 s%@PACKAGE@%$PACKAGE%g
14701 s%@VERSION@%$VERSION%g
14702 s%@ACLOCAL@%$ACLOCAL%g
14703 s%@AUTOCONF@%$AUTOCONF%g
14704 s%@AUTOMAKE@%$AUTOMAKE%g
14705 s%@AUTOHEADER@%$AUTOHEADER%g
14706 s%@MAKEINFO@%$MAKEINFO%g
14707 s%@install_sh@%$install_sh%g
14708 s%@AMTAR@%$AMTAR%g
14709 s%@AWK@%$AWK%g
14710 s%@AMTARFLAGS@%$AMTARFLAGS%g
14711 s%@SET_MAKE@%$SET_MAKE%g
14712 s%@top_builddir@%$top_builddir%g
14713 s%@ldap_subdir@%$ldap_subdir%g
14714 s%@CC@%$CC%g
14715 s%@RANLIB@%$RANLIB%g
14716 s%@LD@%$LD%g
14717 s%@NM@%$NM%g
14718 s%@LN_S@%$LN_S%g
14719 s%@LIBTOOL@%$LIBTOOL%g
14720 s%@LN_H@%$LN_H%g
14721 s%@SENDMAIL@%$SENDMAIL%g
14722 s%@EDITOR@%$EDITOR%g
14723 s%@FINGER@%$FINGER%g
14724 s%@PERLBIN@%$PERLBIN%g
14725 s%@CPP@%$CPP%g
14726 s%@EXEEXT@%$EXEEXT%g
14727 s%@OBJEXT@%$OBJEXT%g
14728 s%@OL_MKDEP@%$OL_MKDEP%g
14729 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14730 s%@PEPSY@%$PEPSY%g
14731 s%@LIBOBJS@%$LIBOBJS%g
14732 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14733 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14734 s%@BUILD_BDB2@%$BUILD_BDB2%g
14735 s%@BUILD_LDAP@%$BUILD_LDAP%g
14736 s%@BUILD_LDBM@%$BUILD_LDBM%g
14737 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14738 s%@BUILD_PERL@%$BUILD_PERL%g
14739 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14740 s%@BUILD_SHELL@%$BUILD_SHELL%g
14741 s%@BUILD_TCL@%$BUILD_TCL%g
14742 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14743 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14744 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14745 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14746 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14747 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14748 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14749 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14750 s%@LDAP_LIBS@%$LDAP_LIBS%g
14751 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14752 s%@LDIF_LIBS@%$LDIF_LIBS%g
14753 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14754 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14755 s%@LDBM_LIBS@%$LDBM_LIBS%g
14756 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14757 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14758 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14759 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14760 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14761 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14762 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14763 s%@KRB_LIBS@%$KRB_LIBS%g
14764 s%@READLINE_LIBS@%$READLINE_LIBS%g
14765 s%@SASL_LIBS@%$SASL_LIBS%g
14766 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14767 s%@TLS_LIBS@%$TLS_LIBS%g
14768 s%@MODULES_LIBS@%$MODULES_LIBS%g
14769
14770 CEOF
14771 EOF
14772
14773 cat >> $CONFIG_STATUS <<\EOF
14774
14775 # Split the substitutions into bite-sized pieces for seds with
14776 # small command number limits, like on Digital OSF/1 and HP-UX.
14777 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14778 ac_file=1 # Number of current file.
14779 ac_beg=1 # First line for current file.
14780 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14781 ac_more_lines=:
14782 ac_sed_cmds=""
14783 while $ac_more_lines; do
14784   if test $ac_beg -gt 1; then
14785     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14786   else
14787     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14788   fi
14789   if test ! -s conftest.s$ac_file; then
14790     ac_more_lines=false
14791     rm -f conftest.s$ac_file
14792   else
14793     if test -z "$ac_sed_cmds"; then
14794       ac_sed_cmds="sed -f conftest.s$ac_file"
14795     else
14796       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14797     fi
14798     ac_file=`expr $ac_file + 1`
14799     ac_beg=$ac_end
14800     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14801   fi
14802 done
14803 if test -z "$ac_sed_cmds"; then
14804   ac_sed_cmds=cat
14805 fi
14806 EOF
14807
14808 cat >> $CONFIG_STATUS <<EOF
14809
14810 CONFIG_FILES=\${CONFIG_FILES-"\
14811 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14812 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14813 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14814 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14815 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14816 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14817 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14818 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14819 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14820 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14821 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14822 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14823 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14824 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14825 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14826 include/Makefile:build/top.mk:include/Makefile.in \
14827 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14828 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14829 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14830 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14831 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14832 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14833 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14834 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14835 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14836 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14837 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14838 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14839 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14840 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14841 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14842 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14843 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14844 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14845 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14846 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14847 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14848 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14849 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14850 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14851 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14852 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14853 "}
14854 EOF
14855 cat >> $CONFIG_STATUS <<\EOF
14856 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14857   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14858   case "$ac_file" in
14859   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14860        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14861   *) ac_file_in="${ac_file}.in" ;;
14862   esac
14863
14864   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14865
14866   # Remove last slash and all that follows it.  Not all systems have dirname.
14867   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14868   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14869     # The file is in a subdirectory.
14870     test ! -d "$ac_dir" && mkdir "$ac_dir"
14871     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14872     # A "../" for each directory in $ac_dir_suffix.
14873     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14874   else
14875     ac_dir_suffix= ac_dots=
14876   fi
14877
14878   case "$ac_given_srcdir" in
14879   .)  srcdir=.
14880       if test -z "$ac_dots"; then top_srcdir=.
14881       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14882   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14883   *) # Relative path.
14884     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14885     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14886   esac
14887
14888   case "$ac_given_INSTALL" in
14889   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14890   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14891   esac
14892
14893   echo creating "$ac_file"
14894   rm -f "$ac_file"
14895   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14896   case "$ac_file" in
14897   *Makefile*) ac_comsub="1i\\
14898 # $configure_input" ;;
14899   *) ac_comsub= ;;
14900   esac
14901
14902   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14903   sed -e "$ac_comsub
14904 s%@configure_input@%$configure_input%g
14905 s%@srcdir@%$srcdir%g
14906 s%@top_srcdir@%$top_srcdir%g
14907 s%@INSTALL@%$INSTALL%g
14908 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14909 fi; done
14910 rm -f conftest.s*
14911
14912 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14913 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14914 #
14915 # ac_d sets the value in "#define NAME VALUE" lines.
14916 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14917 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14918 ac_dC='\3'
14919 ac_dD='%g'
14920 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14921 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14922 ac_uB='\([      ]\)%\1#\2define\3'
14923 ac_uC=' '
14924 ac_uD='\4%g'
14925 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14926 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14927 ac_eB='$%\1#\2define\3'
14928 ac_eC=' '
14929 ac_eD='%g'
14930
14931 if test "${CONFIG_HEADERS+set}" != set; then
14932 EOF
14933 cat >> $CONFIG_STATUS <<EOF
14934   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14935 EOF
14936 cat >> $CONFIG_STATUS <<\EOF
14937 fi
14938 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14939   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14940   case "$ac_file" in
14941   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14942        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14943   *) ac_file_in="${ac_file}.in" ;;
14944   esac
14945
14946   echo creating $ac_file
14947
14948   rm -f conftest.frag conftest.in conftest.out
14949   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14950   cat $ac_file_inputs > conftest.in
14951
14952 EOF
14953
14954 # Transform confdefs.h into a sed script conftest.vals that substitutes
14955 # the proper values into config.h.in to produce config.h.  And first:
14956 # Protect against being on the right side of a sed subst in config.status.
14957 # Protect against being in an unquoted here document in config.status.
14958 rm -f conftest.vals
14959 cat > conftest.hdr <<\EOF
14960 s/[\\&%]/\\&/g
14961 s%[\\$`]%\\&%g
14962 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14963 s%ac_d%ac_u%gp
14964 s%ac_u%ac_e%gp
14965 EOF
14966 sed -n -f conftest.hdr confdefs.h > conftest.vals
14967 rm -f conftest.hdr
14968
14969 # This sed command replaces #undef with comments.  This is necessary, for
14970 # example, in the case of _POSIX_SOURCE, which is predefined and required
14971 # on some systems where configure will not decide to define it.
14972 cat >> conftest.vals <<\EOF
14973 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14974 EOF
14975
14976 # Break up conftest.vals because some shells have a limit on
14977 # the size of here documents, and old seds have small limits too.
14978
14979 rm -f conftest.tail
14980 while :
14981 do
14982   ac_lines=`grep -c . conftest.vals`
14983   # grep -c gives empty output for an empty file on some AIX systems.
14984   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14985   # Write a limited-size here document to conftest.frag.
14986   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14987   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14988   echo 'CEOF
14989   sed -f conftest.frag conftest.in > conftest.out
14990   rm -f conftest.in
14991   mv conftest.out conftest.in
14992 ' >> $CONFIG_STATUS
14993   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14994   rm -f conftest.vals
14995   mv conftest.tail conftest.vals
14996 done
14997 rm -f conftest.vals
14998
14999 cat >> $CONFIG_STATUS <<\EOF
15000   rm -f conftest.frag conftest.h
15001   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15002   cat conftest.in >> conftest.h
15003   rm -f conftest.in
15004   if cmp -s $ac_file conftest.h 2>/dev/null; then
15005     echo "$ac_file is unchanged"
15006     rm -f conftest.h
15007   else
15008     # Remove last slash and all that follows it.  Not all systems have dirname.
15009       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15010       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15011       # The file is in a subdirectory.
15012       test ! -d "$ac_dir" && mkdir "$ac_dir"
15013     fi
15014     rm -f $ac_file
15015     mv conftest.h $ac_file
15016   fi
15017 fi; done
15018
15019 EOF
15020 cat >> $CONFIG_STATUS <<EOF
15021
15022 EOF
15023 cat >> $CONFIG_STATUS <<\EOF
15024
15025 date > stamp-h
15026 echo Please \"make depend\" to build dependencies
15027
15028 exit 0
15029 EOF
15030 chmod +x $CONFIG_STATUS
15031 rm -fr confdefs* $ac_clean_files
15032 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15033