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