]> git.sur5r.net Git - openldap/blob - configure
Change -d option to not detach even with -d 0 or compiled with --disable-debug.
[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 (Replication Daemon) 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 ol_aix_threads=no
2392 case "$target" in
2393 *-*-aix*)       if test -z "$CC" ; then
2394                 case "$ol_with_threads" in
2395                 auto | yes |  posix) ol_aix_threads=yes ;;
2396                 esac
2397         fi
2398 ;;
2399 esac
2400
2401 if test $ol_aix_threads = yes ; then
2402         if test -z "${CC}" ; then
2403                 for ac_prog in cc_r xlc_r cc
2404 do
2405 # Extract the first word of "$ac_prog", so it can be a program name with args.
2406 set dummy $ac_prog; ac_word=$2
2407 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2408 echo "configure:2409: checking for $ac_word" >&5
2409 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2410   echo $ac_n "(cached) $ac_c" 1>&6
2411 else
2412   if test -n "$CC"; then
2413   ac_cv_prog_CC="$CC" # Let the user override the test.
2414 else
2415   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2416   ac_dummy="$PATH"
2417   for ac_dir in $ac_dummy; do
2418     test -z "$ac_dir" && ac_dir=.
2419     if test -f $ac_dir/$ac_word; then
2420       ac_cv_prog_CC="$ac_prog"
2421       break
2422     fi
2423   done
2424   IFS="$ac_save_ifs"
2425 fi
2426 fi
2427 CC="$ac_cv_prog_CC"
2428 if test -n "$CC"; then
2429   echo "$ac_t""$CC" 1>&6
2430 else
2431   echo "$ac_t""no" 1>&6
2432 fi
2433
2434 test -n "$CC" && break
2435 done
2436
2437
2438                 if test "$CC" = cc ; then
2439                                                 if test $ol_with_threads != auto ; then
2440                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2441                         else
2442                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2443                         fi
2444                         ol_with_threads=no
2445                 fi
2446         fi
2447
2448         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2449                 ol_with_threads=posix
2450                 ol_cv_pthread_create=yes
2451         fi
2452 fi
2453
2454 if test -z "${CC}"; then
2455         for ac_prog in cc
2456 do
2457 # Extract the first word of "$ac_prog", so it can be a program name with args.
2458 set dummy $ac_prog; ac_word=$2
2459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2460 echo "configure:2461: checking for $ac_word" >&5
2461 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2462   echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464   if test -n "$CC"; then
2465   ac_cv_prog_CC="$CC" # Let the user override the test.
2466 else
2467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2468   ac_dummy="$PATH"
2469   for ac_dir in $ac_dummy; do
2470     test -z "$ac_dir" && ac_dir=.
2471     if test -f $ac_dir/$ac_word; then
2472       ac_cv_prog_CC="$ac_prog"
2473       break
2474     fi
2475   done
2476   IFS="$ac_save_ifs"
2477 fi
2478 fi
2479 CC="$ac_cv_prog_CC"
2480 if test -n "$CC"; then
2481   echo "$ac_t""$CC" 1>&6
2482 else
2483   echo "$ac_t""no" 1>&6
2484 fi
2485
2486 test -n "$CC" && break
2487 done
2488
2489 fi
2490
2491
2492
2493 # Check whether --enable-fast-install or --disable-fast-install was given.
2494 if test "${enable_fast_install+set}" = set; then
2495   enableval="$enable_fast_install"
2496   p=${PACKAGE-default}
2497 case "$enableval" in
2498 yes) enable_fast_install=yes ;;
2499 no) enable_fast_install=no ;;
2500 *)
2501   enable_fast_install=no
2502   # Look at the argument we got.  We use all the common list separators.
2503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2504   for pkg in $enableval; do
2505     if test "X$pkg" = "X$p"; then
2506       enable_fast_install=yes
2507     fi
2508   done
2509   IFS="$ac_save_ifs"
2510   ;;
2511 esac
2512 else
2513   enable_fast_install=yes
2514 fi
2515
2516 # Extract the first word of "ranlib", so it can be a program name with args.
2517 set dummy ranlib; ac_word=$2
2518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2519 echo "configure:2520: checking for $ac_word" >&5
2520 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   if test -n "$RANLIB"; then
2524   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2525 else
2526   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2527   ac_dummy="$PATH"
2528   for ac_dir in $ac_dummy; do
2529     test -z "$ac_dir" && ac_dir=.
2530     if test -f $ac_dir/$ac_word; then
2531       ac_cv_prog_RANLIB="ranlib"
2532       break
2533     fi
2534   done
2535   IFS="$ac_save_ifs"
2536   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2537 fi
2538 fi
2539 RANLIB="$ac_cv_prog_RANLIB"
2540 if test -n "$RANLIB"; then
2541   echo "$ac_t""$RANLIB" 1>&6
2542 else
2543   echo "$ac_t""no" 1>&6
2544 fi
2545
2546 # Extract the first word of "gcc", so it can be a program name with args.
2547 set dummy gcc; ac_word=$2
2548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2549 echo "configure:2550: checking for $ac_word" >&5
2550 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2551   echo $ac_n "(cached) $ac_c" 1>&6
2552 else
2553   if test -n "$CC"; then
2554   ac_cv_prog_CC="$CC" # Let the user override the test.
2555 else
2556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2557   ac_dummy="$PATH"
2558   for ac_dir in $ac_dummy; do
2559     test -z "$ac_dir" && ac_dir=.
2560     if test -f $ac_dir/$ac_word; then
2561       ac_cv_prog_CC="gcc"
2562       break
2563     fi
2564   done
2565   IFS="$ac_save_ifs"
2566 fi
2567 fi
2568 CC="$ac_cv_prog_CC"
2569 if test -n "$CC"; then
2570   echo "$ac_t""$CC" 1>&6
2571 else
2572   echo "$ac_t""no" 1>&6
2573 fi
2574
2575 if test -z "$CC"; then
2576   # Extract the first word of "cc", so it can be a program name with args.
2577 set dummy cc; ac_word=$2
2578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2579 echo "configure:2580: checking for $ac_word" >&5
2580 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   if test -n "$CC"; then
2584   ac_cv_prog_CC="$CC" # Let the user override the test.
2585 else
2586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2587   ac_prog_rejected=no
2588   ac_dummy="$PATH"
2589   for ac_dir in $ac_dummy; do
2590     test -z "$ac_dir" && ac_dir=.
2591     if test -f $ac_dir/$ac_word; then
2592       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2593         ac_prog_rejected=yes
2594         continue
2595       fi
2596       ac_cv_prog_CC="cc"
2597       break
2598     fi
2599   done
2600   IFS="$ac_save_ifs"
2601 if test $ac_prog_rejected = yes; then
2602   # We found a bogon in the path, so make sure we never use it.
2603   set dummy $ac_cv_prog_CC
2604   shift
2605   if test $# -gt 0; then
2606     # We chose a different compiler from the bogus one.
2607     # However, it has the same basename, so the bogon will be chosen
2608     # first if we set CC to just the basename; use the full file name.
2609     shift
2610     set dummy "$ac_dir/$ac_word" "$@"
2611     shift
2612     ac_cv_prog_CC="$@"
2613   fi
2614 fi
2615 fi
2616 fi
2617 CC="$ac_cv_prog_CC"
2618 if test -n "$CC"; then
2619   echo "$ac_t""$CC" 1>&6
2620 else
2621   echo "$ac_t""no" 1>&6
2622 fi
2623
2624   if test -z "$CC"; then
2625     case "`uname -s`" in
2626     *win32* | *WIN32* | *CYGWIN*)
2627       # Extract the first word of "cl", so it can be a program name with args.
2628 set dummy cl; ac_word=$2
2629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2630 echo "configure:2631: checking for $ac_word" >&5
2631 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2632   echo $ac_n "(cached) $ac_c" 1>&6
2633 else
2634   if test -n "$CC"; then
2635   ac_cv_prog_CC="$CC" # Let the user override the test.
2636 else
2637   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2638   ac_dummy="$PATH"
2639   for ac_dir in $ac_dummy; do
2640     test -z "$ac_dir" && ac_dir=.
2641     if test -f $ac_dir/$ac_word; then
2642       ac_cv_prog_CC="cl"
2643       break
2644     fi
2645   done
2646   IFS="$ac_save_ifs"
2647 fi
2648 fi
2649 CC="$ac_cv_prog_CC"
2650 if test -n "$CC"; then
2651   echo "$ac_t""$CC" 1>&6
2652 else
2653   echo "$ac_t""no" 1>&6
2654 fi
2655  ;;
2656     esac
2657   fi
2658   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2659 fi
2660
2661 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2662 echo "configure:2663: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2663
2664 ac_ext=c
2665 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2666 ac_cpp='$CPP $CPPFLAGS'
2667 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2668 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2669 cross_compiling=$ac_cv_prog_cc_cross
2670
2671 cat > conftest.$ac_ext << EOF
2672
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675
2676 main(){return(0);}
2677 EOF
2678 if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2679   ac_cv_prog_cc_works=yes
2680   # If we can't run a trivial program, we are probably using a cross compiler.
2681   if (./conftest; exit) 2>/dev/null; then
2682     ac_cv_prog_cc_cross=no
2683   else
2684     ac_cv_prog_cc_cross=yes
2685   fi
2686 else
2687   echo "configure: failed program was:" >&5
2688   cat conftest.$ac_ext >&5
2689   ac_cv_prog_cc_works=no
2690 fi
2691 rm -fr conftest*
2692 ac_ext=c
2693 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2694 ac_cpp='$CPP $CPPFLAGS'
2695 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2696 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2697 cross_compiling=$ac_cv_prog_cc_cross
2698
2699 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2700 if test $ac_cv_prog_cc_works = no; then
2701   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2702 fi
2703 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2704 echo "configure:2705: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2705 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2706 cross_compiling=$ac_cv_prog_cc_cross
2707
2708 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2709 echo "configure:2710: checking whether we are using GNU C" >&5
2710 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   cat > conftest.c <<EOF
2714 #ifdef __GNUC__
2715   yes;
2716 #endif
2717 EOF
2718 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2719   ac_cv_prog_gcc=yes
2720 else
2721   ac_cv_prog_gcc=no
2722 fi
2723 fi
2724
2725 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2726
2727 if test $ac_cv_prog_gcc = yes; then
2728   GCC=yes
2729 else
2730   GCC=
2731 fi
2732
2733 ac_test_CFLAGS="${CFLAGS+set}"
2734 ac_save_CFLAGS="$CFLAGS"
2735 CFLAGS=
2736 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2737 echo "configure:2738: checking whether ${CC-cc} accepts -g" >&5
2738 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2739   echo $ac_n "(cached) $ac_c" 1>&6
2740 else
2741   echo 'void f(){}' > conftest.c
2742 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2743   ac_cv_prog_cc_g=yes
2744 else
2745   ac_cv_prog_cc_g=no
2746 fi
2747 rm -f conftest*
2748
2749 fi
2750
2751 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2752 if test "$ac_test_CFLAGS" = set; then
2753   CFLAGS="$ac_save_CFLAGS"
2754 elif test $ac_cv_prog_cc_g = yes; then
2755   if test "$GCC" = yes; then
2756     CFLAGS="-g -O2"
2757   else
2758     CFLAGS="-g"
2759   fi
2760 else
2761   if test "$GCC" = yes; then
2762     CFLAGS="-O2"
2763   else
2764     CFLAGS=
2765   fi
2766 fi
2767
2768 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2769 if test "${with_gnu_ld+set}" = set; then
2770   withval="$with_gnu_ld"
2771   test "$withval" = no || with_gnu_ld=yes
2772 else
2773   with_gnu_ld=no
2774 fi
2775
2776 ac_prog=ld
2777 if test "$ac_cv_prog_gcc" = yes; then
2778   # Check if gcc -print-prog-name=ld gives a path.
2779   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2780 echo "configure:2781: checking for ld used by GCC" >&5
2781   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2782   case "$ac_prog" in
2783     # Accept absolute paths.
2784     [\\/]* | [A-Za-z]:[\\/]*)
2785       re_direlt='/[^/][^/]*/\.\./'
2786       # Canonicalize the path of ld
2787       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2788       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2789         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2790       done
2791       test -z "$LD" && LD="$ac_prog"
2792       ;;
2793   "")
2794     # If it fails, then pretend we aren't using GCC.
2795     ac_prog=ld
2796     ;;
2797   *)
2798     # If it is relative, then search for the first ld in PATH.
2799     with_gnu_ld=unknown
2800     ;;
2801   esac
2802 elif test "$with_gnu_ld" = yes; then
2803   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2804 echo "configure:2805: checking for GNU ld" >&5
2805 else
2806   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2807 echo "configure:2808: checking for non-GNU ld" >&5
2808 fi
2809 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2810   echo $ac_n "(cached) $ac_c" 1>&6
2811 else
2812   if test -z "$LD"; then
2813   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2814   for ac_dir in $PATH; do
2815     test -z "$ac_dir" && ac_dir=.
2816     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2817       ac_cv_path_LD="$ac_dir/$ac_prog"
2818       # Check to see if the program is GNU ld.  I'd rather use --version,
2819       # but apparently some GNU ld's only accept -v.
2820       # Break only if it was the GNU/non-GNU ld that we prefer.
2821       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2822         test "$with_gnu_ld" != no && break
2823       else
2824         test "$with_gnu_ld" != yes && break
2825       fi
2826     fi
2827   done
2828   IFS="$ac_save_ifs"
2829 else
2830   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2831 fi
2832 fi
2833
2834 LD="$ac_cv_path_LD"
2835 if test -n "$LD"; then
2836   echo "$ac_t""$LD" 1>&6
2837 else
2838   echo "$ac_t""no" 1>&6
2839 fi
2840 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2841
2842 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2843 echo "configure:2844: checking if the linker ($LD) is GNU ld" >&5
2844 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2848 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2849   ac_cv_prog_gnu_ld=yes
2850 else
2851   ac_cv_prog_gnu_ld=no
2852 fi
2853 fi
2854
2855 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2856
2857
2858 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2859 echo "configure:2860: checking for BSD-compatible nm" >&5
2860 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   if test -n "$NM"; then
2864   # Let the user override the test.
2865   ac_cv_path_NM="$NM"
2866 else
2867   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2868   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2869     test -z "$ac_dir" && ac_dir=.
2870     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2871       # Check to see if the nm accepts a BSD-compat flag.
2872       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2873       #   nm: unknown option "B" ignored
2874       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2875         ac_cv_path_NM="$ac_dir/nm -B"
2876         break
2877       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2878         ac_cv_path_NM="$ac_dir/nm -p"
2879         break
2880       else
2881         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2882         continue # so that we can try to find one that supports BSD flags
2883       fi
2884     fi
2885   done
2886   IFS="$ac_save_ifs"
2887   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2888 fi
2889 fi
2890
2891 NM="$ac_cv_path_NM"
2892 echo "$ac_t""$NM" 1>&6
2893
2894
2895 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2896 echo "configure:2897: checking whether ln -s works" >&5
2897 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2898   echo $ac_n "(cached) $ac_c" 1>&6
2899 else
2900   rm -f conftestdata
2901 if ln -s X conftestdata 2>/dev/null
2902 then
2903   rm -f conftestdata
2904   ac_cv_prog_LN_S="ln -s"
2905 else
2906   ac_cv_prog_LN_S=ln
2907 fi
2908 fi
2909 LN_S="$ac_cv_prog_LN_S"
2910 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2911   echo "$ac_t""yes" 1>&6
2912 else
2913   echo "$ac_t""no" 1>&6
2914 fi
2915
2916
2917 # Check for any special flags to pass to ltconfig.
2918 libtool_flags="--cache-file=$cache_file"
2919 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2920 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2921 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2922 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2923 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2924 libtool_flags="$libtool_flags --enable-dlopen"
2925
2926 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2927 if test "${enable_libtool_lock+set}" = set; then
2928   enableval="$enable_libtool_lock"
2929   :
2930 fi
2931
2932 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2933 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2934
2935 # Some flags need to be propagated to the compiler or linker for good
2936 # libtool support.
2937 case "$host" in
2938 *-*-irix6*)
2939   # Find out which ABI we are using.
2940   echo '#line 2941 "configure"' > conftest.$ac_ext
2941   if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2942     case "`/usr/bin/file conftest.o`" in
2943     *32-bit*)
2944       LD="${LD-ld} -32"
2945       ;;
2946     *N32*)
2947       LD="${LD-ld} -n32"
2948       ;;
2949     *64-bit*)
2950       LD="${LD-ld} -64"
2951       ;;
2952     esac
2953   fi
2954   rm -rf conftest*
2955   ;;
2956
2957 *-*-sco3.2v5*)
2958   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2959   SAVE_CFLAGS="$CFLAGS"
2960   CFLAGS="$CFLAGS -belf"
2961   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2962 echo "configure:2963: checking whether the C compiler needs -belf" >&5
2963 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2964   echo $ac_n "(cached) $ac_c" 1>&6
2965 else
2966   cat > conftest.$ac_ext <<EOF
2967 #line 2968 "configure"
2968 #include "confdefs.h"
2969
2970 int main() {
2971
2972 ; return 0; }
2973 EOF
2974 if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2975   rm -rf conftest*
2976   lt_cv_cc_needs_belf=yes
2977 else
2978   echo "configure: failed program was:" >&5
2979   cat conftest.$ac_ext >&5
2980   rm -rf conftest*
2981   lt_cv_cc_needs_belf=no
2982 fi
2983 rm -f conftest*
2984 fi
2985
2986 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2987   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2988     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2989     CFLAGS="$SAVE_CFLAGS"
2990   fi
2991   ;;
2992
2993
2994 esac
2995
2996
2997 # Save cache, so that ltconfig can load it
2998
2999
3000 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3001 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3002 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3003 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3004 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3005 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3006 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3007 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3008
3009 # Reload cache, that may have been modified by ltconfig
3010
3011
3012 # This can be used to rebuild libtool when needed
3013 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3014
3015 # Always use our own libtool.
3016 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3017
3018 # Redirect the config.log output again, so that the ltconfig log is not
3019 # clobbered by the next message.
3020 exec 5>>./config.log
3021
3022
3023 for ac_prog in mawk gawk nawk awk
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$AWK"; then
3033   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_AWK="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 AWK="$ac_cv_prog_AWK"
3048 if test -n "$AWK"; then
3049   echo "$ac_t""$AWK" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$AWK" && break
3055 done
3056
3057 # test for ln hardlink support
3058 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3059 echo "configure:3060: checking whether ln works" >&5
3060 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   rm -f conftest.src conftest.dst
3064 echo "conftest" > conftest.src
3065 if ln conftest.src conftest.dst 2>/dev/null
3066 then
3067   ol_cv_prog_LN_H="ln"
3068 else
3069   ol_cv_prog_LN_H="cp"
3070 fi
3071 rm -f conftest.src conftest.dst
3072
3073 fi
3074 LN_H="$ol_cv_prog_LN_H"
3075 if test "$ol_cv_prog_LN_H" = "ln"; then
3076         echo "$ac_t""yes" 1>&6
3077 else
3078         echo "$ac_t""no" 1>&6
3079 fi
3080
3081 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3082 echo "configure:3083: checking whether ln -s works" >&5
3083 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3084   echo $ac_n "(cached) $ac_c" 1>&6
3085 else
3086   rm -f conftestdata
3087 if ln -s X conftestdata 2>/dev/null
3088 then
3089   rm -f conftestdata
3090   ac_cv_prog_LN_S="ln -s"
3091 else
3092   ac_cv_prog_LN_S=ln
3093 fi
3094 fi
3095 LN_S="$ac_cv_prog_LN_S"
3096 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3097   echo "$ac_t""yes" 1>&6
3098 else
3099   echo "$ac_t""no" 1>&6
3100 fi
3101
3102
3103 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3104         LN_S="$LN_H"
3105 fi
3106
3107 # Extract the first word of "sendmail", so it can be a program name with args.
3108 set dummy sendmail; ac_word=$2
3109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3110 echo "configure:3111: checking for $ac_word" >&5
3111 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   case "$SENDMAIL" in
3115   /*)
3116   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3117   ;;
3118   ?:/*)                  
3119   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3120   ;;
3121   *)
3122   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3123   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3124   for ac_dir in $ac_dummy; do 
3125     test -z "$ac_dir" && ac_dir=.
3126     if test -f $ac_dir/$ac_word; then
3127       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3128       break
3129     fi
3130   done
3131   IFS="$ac_save_ifs"
3132   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3133   ;;
3134 esac
3135 fi
3136 SENDMAIL="$ac_cv_path_SENDMAIL"
3137 if test -n "$SENDMAIL"; then
3138   echo "$ac_t""$SENDMAIL" 1>&6
3139 else
3140   echo "$ac_t""no" 1>&6
3141 fi
3142
3143 # Extract the first word of "vi", so it can be a program name with args.
3144 set dummy vi; ac_word=$2
3145 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3146 echo "configure:3147: checking for $ac_word" >&5
3147 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   case "$EDITOR" in
3151   /*)
3152   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3153   ;;
3154   ?:/*)                  
3155   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3156   ;;
3157   *)
3158   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3159   ac_dummy="$PATH:/usr/ucb"
3160   for ac_dir in $ac_dummy; do 
3161     test -z "$ac_dir" && ac_dir=.
3162     if test -f $ac_dir/$ac_word; then
3163       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3164       break
3165     fi
3166   done
3167   IFS="$ac_save_ifs"
3168   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3169   ;;
3170 esac
3171 fi
3172 EDITOR="$ac_cv_path_EDITOR"
3173 if test -n "$EDITOR"; then
3174   echo "$ac_t""$EDITOR" 1>&6
3175 else
3176   echo "$ac_t""no" 1>&6
3177 fi
3178
3179 # Extract the first word of "finger", so it can be a program name with args.
3180 set dummy finger; ac_word=$2
3181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3182 echo "configure:3183: checking for $ac_word" >&5
3183 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   case "$FINGER" in
3187   /*)
3188   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3189   ;;
3190   ?:/*)                  
3191   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3192   ;;
3193   *)
3194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3195   ac_dummy="$PATH:/usr/ucb"
3196   for ac_dir in $ac_dummy; do 
3197     test -z "$ac_dir" && ac_dir=.
3198     if test -f $ac_dir/$ac_word; then
3199       ac_cv_path_FINGER="$ac_dir/$ac_word"
3200       break
3201     fi
3202   done
3203   IFS="$ac_save_ifs"
3204   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3205   ;;
3206 esac
3207 fi
3208 FINGER="$ac_cv_path_FINGER"
3209 if test -n "$FINGER"; then
3210   echo "$ac_t""$FINGER" 1>&6
3211 else
3212   echo "$ac_t""no" 1>&6
3213 fi
3214
3215
3216 ol_link_perl=no
3217 if test $ol_enable_perl != no ; then
3218         # Extract the first word of "perl", so it can be a program name with args.
3219 set dummy perl; ac_word=$2
3220 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3221 echo "configure:3222: checking for $ac_word" >&5
3222 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3223   echo $ac_n "(cached) $ac_c" 1>&6
3224 else
3225   case "$PERLBIN" in
3226   /*)
3227   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3228   ;;
3229   ?:/*)                  
3230   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3231   ;;
3232   *)
3233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3234   ac_dummy="$PATH"
3235   for ac_dir in $ac_dummy; do 
3236     test -z "$ac_dir" && ac_dir=.
3237     if test -f $ac_dir/$ac_word; then
3238       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3239       break
3240     fi
3241   done
3242   IFS="$ac_save_ifs"
3243   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3244   ;;
3245 esac
3246 fi
3247 PERLBIN="$ac_cv_path_PERLBIN"
3248 if test -n "$PERLBIN"; then
3249   echo "$ac_t""$PERLBIN" 1>&6
3250 else
3251   echo "$ac_t""no" 1>&6
3252 fi
3253
3254
3255         if test "no$PERLBIN" = "no" ; then
3256                 if test $ol_enable_perl = yes ; then
3257                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3258                 fi
3259
3260         else
3261                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3262                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3263
3264                                 ol_link_perl=yes
3265         fi
3266 fi
3267
3268 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3269 echo "configure:3270: checking how to run the C preprocessor" >&5
3270 # On Suns, sometimes $CPP names a directory.
3271 if test -n "$CPP" && test -d "$CPP"; then
3272   CPP=
3273 fi
3274 if test -z "$CPP"; then
3275 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3276   echo $ac_n "(cached) $ac_c" 1>&6
3277 else
3278     # This must be in double quotes, not single quotes, because CPP may get
3279   # substituted into the Makefile and "${CC-cc}" will confuse make.
3280   CPP="${CC-cc} -E"
3281   # On the NeXT, cc -E runs the code through the compiler's parser,
3282   # not just through cpp.
3283   cat > conftest.$ac_ext <<EOF
3284 #line 3285 "configure"
3285 #include "confdefs.h"
3286 #include <assert.h>
3287 Syntax Error
3288 EOF
3289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3290 { (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3292 if test -z "$ac_err"; then
3293   :
3294 else
3295   echo "$ac_err" >&5
3296   echo "configure: failed program was:" >&5
3297   cat conftest.$ac_ext >&5
3298   rm -rf conftest*
3299   CPP="${CC-cc} -E -traditional-cpp"
3300   cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <assert.h>
3304 Syntax Error
3305 EOF
3306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3307 { (eval echo configure:3308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3309 if test -z "$ac_err"; then
3310   :
3311 else
3312   echo "$ac_err" >&5
3313   echo "configure: failed program was:" >&5
3314   cat conftest.$ac_ext >&5
3315   rm -rf conftest*
3316   CPP="${CC-cc} -nologo -E"
3317   cat > conftest.$ac_ext <<EOF
3318 #line 3319 "configure"
3319 #include "confdefs.h"
3320 #include <assert.h>
3321 Syntax Error
3322 EOF
3323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3324 { (eval echo configure:3325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3326 if test -z "$ac_err"; then
3327   :
3328 else
3329   echo "$ac_err" >&5
3330   echo "configure: failed program was:" >&5
3331   cat conftest.$ac_ext >&5
3332   rm -rf conftest*
3333   CPP=/lib/cpp
3334 fi
3335 rm -f conftest*
3336 fi
3337 rm -f conftest*
3338 fi
3339 rm -f conftest*
3340   ac_cv_prog_CPP="$CPP"
3341 fi
3342   CPP="$ac_cv_prog_CPP"
3343 else
3344   ac_cv_prog_CPP="$CPP"
3345 fi
3346 echo "$ac_t""$CPP" 1>&6
3347
3348
3349 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3350         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3351
3352 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3353         echo "configure: warning: programs compiled here do run here..." 1>&2
3354         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3355
3356 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3357         echo "configure: warning: programs compiled here do not run here..." 1>&2
3358         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3359 fi
3360
3361 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3362 echo "configure:3363: checking for AIX" >&5
3363 cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366 #ifdef _AIX
3367   yes
3368 #endif
3369
3370 EOF
3371 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3372   egrep "yes" >/dev/null 2>&1; then
3373   rm -rf conftest*
3374   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3375 #define _ALL_SOURCE 1
3376 EOF
3377
3378 else
3379   rm -rf conftest*
3380   echo "$ac_t""no" 1>&6
3381 fi
3382 rm -f conftest*
3383
3384
3385 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3386 echo "configure:3387: checking for POSIXized ISC" >&5
3387 if test -d /etc/conf/kconfig.d &&
3388   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3389 then
3390   echo "$ac_t""yes" 1>&6
3391   ISC=yes # If later tests want to check for ISC.
3392   cat >> confdefs.h <<\EOF
3393 #define _POSIX_SOURCE 1
3394 EOF
3395
3396   if test "$GCC" = yes; then
3397     CC="$CC -posix"
3398   else
3399     CC="$CC -Xp"
3400   fi
3401 else
3402   echo "$ac_t""no" 1>&6
3403   ISC=
3404 fi
3405
3406 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3407 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3408 echo "configure:3409: checking for minix/config.h" >&5
3409 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include <minix/config.h>
3416 EOF
3417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3418 { (eval echo configure:3419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3420 if test -z "$ac_err"; then
3421   rm -rf conftest*
3422   eval "ac_cv_header_$ac_safe=yes"
3423 else
3424   echo "$ac_err" >&5
3425   echo "configure: failed program was:" >&5
3426   cat conftest.$ac_ext >&5
3427   rm -rf conftest*
3428   eval "ac_cv_header_$ac_safe=no"
3429 fi
3430 rm -f conftest*
3431 fi
3432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3433   echo "$ac_t""yes" 1>&6
3434   MINIX=yes
3435 else
3436   echo "$ac_t""no" 1>&6
3437 MINIX=
3438 fi
3439
3440 if test "$MINIX" = yes; then
3441   cat >> confdefs.h <<\EOF
3442 #define _POSIX_SOURCE 1
3443 EOF
3444
3445   cat >> confdefs.h <<\EOF
3446 #define _POSIX_1_SOURCE 2
3447 EOF
3448
3449   cat >> confdefs.h <<\EOF
3450 #define _MINIX 1
3451 EOF
3452
3453 fi
3454
3455
3456 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3457 echo "configure:3458: checking for Cygwin environment" >&5
3458 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   cat > conftest.$ac_ext <<EOF
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3464
3465 int main() {
3466
3467 #ifndef __CYGWIN__
3468 #define __CYGWIN__ __CYGWIN32__
3469 #endif
3470 return __CYGWIN__;
3471 ; return 0; }
3472 EOF
3473 if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3474   rm -rf conftest*
3475   ac_cv_cygwin=yes
3476 else
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   rm -rf conftest*
3480   ac_cv_cygwin=no
3481 fi
3482 rm -f conftest*
3483 fi
3484
3485 echo "$ac_t""$ac_cv_cygwin" 1>&6
3486 CYGWIN=
3487 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3488 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3489 echo "configure:3490: checking for mingw32 environment" >&5
3490 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496
3497 int main() {
3498 return __MINGW32__;
3499 ; return 0; }
3500 EOF
3501 if { (eval echo configure:3502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3502   rm -rf conftest*
3503   ac_cv_mingw32=yes
3504 else
3505   echo "configure: failed program was:" >&5
3506   cat conftest.$ac_ext >&5
3507   rm -rf conftest*
3508   ac_cv_mingw32=no
3509 fi
3510 rm -f conftest*
3511 fi
3512
3513 echo "$ac_t""$ac_cv_mingw32" 1>&6
3514 MINGW32=
3515 test "$ac_cv_mingw32" = yes && MINGW32=yes
3516 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3517 echo "configure:3518: checking for EMX OS/2 environment" >&5
3518 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3519   echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521   cat > conftest.$ac_ext <<EOF
3522 #line 3523 "configure"
3523 #include "confdefs.h"
3524
3525 int main() {
3526 return __EMX__;
3527 ; return 0; }
3528 EOF
3529 if { (eval echo configure:3530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3530   rm -rf conftest*
3531   ac_cv_emxos2=yes
3532 else
3533   echo "configure: failed program was:" >&5
3534   cat conftest.$ac_ext >&5
3535   rm -rf conftest*
3536   ac_cv_emxos2=no
3537 fi
3538 rm -f conftest*
3539 fi
3540
3541 echo "$ac_t""$ac_cv_emxos2" 1>&6
3542 EMXOS2=
3543 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3544
3545
3546
3547 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3548 echo "configure:3549: checking for executable suffix" >&5
3549 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3550   echo $ac_n "(cached) $ac_c" 1>&6
3551 else
3552   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3553   ac_cv_exeext=.exe
3554 else
3555   rm -f conftest*
3556   echo 'int main () { return 0; }' > conftest.$ac_ext
3557   ac_cv_exeext=
3558   if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3559     for file in conftest.*; do
3560       case $file in
3561       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3562       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3563       esac
3564     done
3565   else
3566     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3567   fi
3568   rm -f conftest*
3569   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3570 fi
3571 fi
3572
3573 EXEEXT=""
3574 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3575 echo "$ac_t""${ac_cv_exeext}" 1>&6
3576 ac_exeext=$EXEEXT
3577
3578 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3579 echo "configure:3580: checking for object suffix" >&5
3580 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583   rm -f conftest*
3584 echo 'int i = 1;' > conftest.$ac_ext
3585 if { (eval echo configure:3586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3586   for ac_file in conftest.*; do
3587     case $ac_file in
3588     *.c) ;;
3589     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3590     esac
3591   done
3592 else
3593   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3594 fi
3595 rm -f conftest*
3596 fi
3597
3598 echo "$ac_t""$ac_cv_objext" 1>&6
3599 OBJEXT=$ac_cv_objext
3600 ac_objext=$ac_cv_objext
3601
3602
3603 cat >> confdefs.h <<EOF
3604 #define EXEEXT "${EXEEXT}"
3605 EOF
3606
3607
3608 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3609 echo "configure:3610: checking for be_app in -lbe" >&5
3610 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3611 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   ac_save_LIBS="$LIBS"
3615 LIBS="-lbe -lroot -lnet $LIBS"
3616 cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3619 /* Override any gcc2 internal prototype to avoid an error.  */
3620 /* We use char because int might match the return type of a gcc2
3621     builtin and then its argument prototype would still apply.  */
3622 char be_app();
3623
3624 int main() {
3625 be_app()
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3629   rm -rf conftest*
3630   eval "ac_cv_lib_$ac_lib_var=yes"
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   eval "ac_cv_lib_$ac_lib_var=no"
3636 fi
3637 rm -f conftest*
3638 LIBS="$ac_save_LIBS"
3639
3640 fi
3641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3642   echo "$ac_t""yes" 1>&6
3643   LIBS="$LIBS -lbe -lroot -lnet"
3644 else
3645   echo "$ac_t""no" 1>&6
3646 :
3647 fi
3648
3649
3650
3651
3652
3653 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3654 echo "configure:3655: checking for ${CC-cc} option to accept ANSI C" >&5
3655 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   am_cv_prog_cc_stdc=no
3659 ac_save_CC="$CC"
3660 # Don't try gcc -ansi; that turns off useful extensions and
3661 # breaks some systems' header files.
3662 # AIX                   -qlanglvl=ansi
3663 # Ultrix and OSF/1      -std1
3664 # HP-UX 10.20 and later -Ae
3665 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3666 # SVR4                  -Xc -D__EXTENSIONS__
3667 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3668 do
3669   CC="$ac_save_CC $ac_arg"
3670   cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 #include <stdarg.h>
3674 #include <stdio.h>
3675 #include <sys/types.h>
3676 #include <sys/stat.h>
3677 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3678 struct buf { int x; };
3679 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3680 static char *e (p, i)
3681      char **p;
3682      int i;
3683 {
3684   return p[i];
3685 }
3686 static char *f (char * (*g) (char **, int), char **p, ...)
3687 {
3688   char *s;
3689   va_list v;
3690   va_start (v,p);
3691   s = g (p, va_arg (v,int));
3692   va_end (v);
3693   return s;
3694 }
3695 int test (int i, double x);
3696 struct s1 {int (*f) (int a);};
3697 struct s2 {int (*f) (double a);};
3698 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3699 int argc;
3700 char **argv;
3701
3702 int main() {
3703
3704 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3705
3706 ; return 0; }
3707 EOF
3708 if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3709   rm -rf conftest*
3710   am_cv_prog_cc_stdc="$ac_arg"; break
3711 else
3712   echo "configure: failed program was:" >&5
3713   cat conftest.$ac_ext >&5
3714 fi
3715 rm -f conftest*
3716 done
3717 CC="$ac_save_CC"
3718
3719 fi
3720
3721 if test -z "$am_cv_prog_cc_stdc"; then
3722   echo "$ac_t""none needed" 1>&6
3723 else
3724   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3725 fi
3726 case "x$am_cv_prog_cc_stdc" in
3727   x|xno) ;;
3728   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3729 esac
3730
3731 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3732         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3733 fi
3734
3735 # test for make depend flag
3736 OL_MKDEP=
3737 OL_MKDEP_FLAGS=
3738 if test -z "${MKDEP}"; then
3739         OL_MKDEP="${CC-cc}"
3740         if test -z "${MKDEP_FLAGS}"; then
3741                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3742 echo "configure:3743: checking for ${OL_MKDEP} depend flag" >&5
3743 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3744   echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746   
3747                         ol_cv_mkdep=no
3748                         for flag in "-M" "-xM"; do
3749                                 cat > conftest.c <<EOF
3750  noCode;
3751 EOF
3752                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3753                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3754                                 then
3755                                         if test ! -f conftest."${ac_object}" ; then
3756                                                 ol_cv_mkdep=$flag
3757                                                 OL_MKDEP_FLAGS="$flag"
3758                                                 break
3759                                         fi
3760                                 fi
3761                         done
3762                         rm -f conftest*
3763                 
3764 fi
3765
3766 echo "$ac_t""$ol_cv_mkdep" 1>&6
3767         else
3768                 cc_cv_mkdep=yes
3769                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3770         fi
3771 else
3772         cc_cv_mkdep=yes
3773         OL_MKDEP="${MKDEP}"
3774         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3775 fi
3776
3777
3778
3779 if test "${ol_cv_mkdep}" = no ; then
3780         # this will soon become an error
3781         echo "configure: warning: do not know how to generate dependencies" 1>&2
3782 fi
3783
3784 ol_link_modules=no
3785 if test $ol_enable_modules != no ; then
3786         for ac_hdr in ltdl.h
3787 do
3788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3790 echo "configure:3791: checking for $ac_hdr" >&5
3791 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3792   echo $ac_n "(cached) $ac_c" 1>&6
3793 else
3794   cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #include <$ac_hdr>
3798 EOF
3799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3800 { (eval echo configure:3801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3802 if test -z "$ac_err"; then
3803   rm -rf conftest*
3804   eval "ac_cv_header_$ac_safe=yes"
3805 else
3806   echo "$ac_err" >&5
3807   echo "configure: failed program was:" >&5
3808   cat conftest.$ac_ext >&5
3809   rm -rf conftest*
3810   eval "ac_cv_header_$ac_safe=no"
3811 fi
3812 rm -f conftest*
3813 fi
3814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3815   echo "$ac_t""yes" 1>&6
3816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3817   cat >> confdefs.h <<EOF
3818 #define $ac_tr_hdr 1
3819 EOF
3820  
3821 else
3822   echo "$ac_t""no" 1>&6
3823 fi
3824 done
3825
3826
3827         if test $ac_cv_header_ltdl_h = no ; then
3828                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3829
3830         fi
3831
3832         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3833 echo "configure:3834: checking for lt_dlinit in -lltdl" >&5
3834 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3836   echo $ac_n "(cached) $ac_c" 1>&6
3837 else
3838   ac_save_LIBS="$LIBS"
3839 LIBS="-lltdl  $LIBS"
3840 cat > conftest.$ac_ext <<EOF
3841 #line 3842 "configure"
3842 #include "confdefs.h"
3843 /* Override any gcc2 internal prototype to avoid an error.  */
3844 /* We use char because int might match the return type of a gcc2
3845     builtin and then its argument prototype would still apply.  */
3846 char lt_dlinit();
3847
3848 int main() {
3849 lt_dlinit()
3850 ; return 0; }
3851 EOF
3852 if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3853   rm -rf conftest*
3854   eval "ac_cv_lib_$ac_lib_var=yes"
3855 else
3856   echo "configure: failed program was:" >&5
3857   cat conftest.$ac_ext >&5
3858   rm -rf conftest*
3859   eval "ac_cv_lib_$ac_lib_var=no"
3860 fi
3861 rm -f conftest*
3862 LIBS="$ac_save_LIBS"
3863
3864 fi
3865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3866   echo "$ac_t""yes" 1>&6
3867     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3868     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3869   cat >> confdefs.h <<EOF
3870 #define $ac_tr_lib 1
3871 EOF
3872
3873   LIBS="-lltdl $LIBS"
3874
3875 else
3876   echo "$ac_t""no" 1>&6
3877 fi
3878
3879         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3880                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3881         fi
3882         ol_link_modules=yes
3883 else
3884         ol_with_bdb2_module=static
3885         ol_with_ldap_module=static
3886         ol_with_ldbm_module=static
3887         ol_with_passwd_module=static
3888         ol_with_perl_module=static
3889         ol_with_shell_module=static
3890         ol_with_tcl_module=static
3891 fi
3892
3893 # test for EBCDIC
3894 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3895 echo "configure:3896: checking for EBCDIC" >&5
3896 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3897   echo $ac_n "(cached) $ac_c" 1>&6
3898 else
3899   
3900         cat > conftest.$ac_ext <<EOF
3901 #line 3902 "configure"
3902 #include "confdefs.h"
3903
3904 #if !('M' == 0xd4)
3905 #include <__ASCII__/generate_error.h>
3906 #endif
3907
3908 EOF
3909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3910 { (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3912 if test -z "$ac_err"; then
3913   rm -rf conftest*
3914   ol_cv_cpp_ebcdic=yes
3915 else
3916   echo "$ac_err" >&5
3917   echo "configure: failed program was:" >&5
3918   cat conftest.$ac_ext >&5
3919   rm -rf conftest*
3920   ol_cv_cpp_ebcdic=no
3921 fi
3922 rm -f conftest*
3923 fi
3924
3925 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3926 if test $ol_cv_cpp_ebcdic = yes ; then
3927         cat >> confdefs.h <<\EOF
3928 #define HAVE_EBCDIC 1
3929 EOF
3930
3931 fi
3932
3933 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3934 echo "configure:3935: checking for ANSI C header files" >&5
3935 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3936   echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938   cat > conftest.$ac_ext <<EOF
3939 #line 3940 "configure"
3940 #include "confdefs.h"
3941 #include <stdlib.h>
3942 #include <stdarg.h>
3943 #include <string.h>
3944 #include <float.h>
3945 EOF
3946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3947 { (eval echo configure:3948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3949 if test -z "$ac_err"; then
3950   rm -rf conftest*
3951   ol_cv_header_stdc=yes
3952 else
3953   echo "$ac_err" >&5
3954   echo "configure: failed program was:" >&5
3955   cat conftest.$ac_ext >&5
3956   rm -rf conftest*
3957   ol_cv_header_stdc=no
3958 fi
3959 rm -f conftest*
3960
3961 if test $ol_cv_header_stdc = yes; then
3962   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3963 cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 #include <string.h>
3967 EOF
3968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3969   egrep "memchr" >/dev/null 2>&1; then
3970   :
3971 else
3972   rm -rf conftest*
3973   ol_cv_header_stdc=no
3974 fi
3975 rm -f conftest*
3976
3977 fi
3978
3979 if test $ol_cv_header_stdc = yes; then
3980   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3981 cat > conftest.$ac_ext <<EOF
3982 #line 3983 "configure"
3983 #include "confdefs.h"
3984 #include <stdlib.h>
3985 EOF
3986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3987   egrep "free" >/dev/null 2>&1; then
3988   :
3989 else
3990   rm -rf conftest*
3991   ol_cv_header_stdc=no
3992 fi
3993 rm -f conftest*
3994
3995 fi
3996
3997 if test $ol_cv_header_stdc = yes; then
3998   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3999 if test "$cross_compiling" = yes; then
4000   :
4001 else
4002   cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <ctype.h>
4006 #ifndef HAVE_EBCDIC
4007 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4008 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4009 #else
4010 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4011                 || ('j' <= (c) && (c) <= 'r') \
4012                 || ('s' <= (c) && (c) <= 'z'))
4013 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4014 #endif
4015 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4016 int main () { int i; for (i = 0; i < 256; i++)
4017 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4018 exit (0); }
4019
4020 EOF
4021 if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4022 then
4023   :
4024 else
4025   echo "configure: failed program was:" >&5
4026   cat conftest.$ac_ext >&5
4027   rm -fr conftest*
4028   ol_cv_header_stdc=no
4029 fi
4030 rm -fr conftest*
4031 fi
4032
4033 fi
4034 fi
4035
4036 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4037 if test $ol_cv_header_stdc = yes; then
4038   cat >> confdefs.h <<\EOF
4039 #define STDC_HEADERS 1
4040 EOF
4041
4042 fi
4043 ac_cv_header_stdc=disable
4044
4045
4046 if test $ol_cv_header_stdc != yes; then
4047         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4048 fi
4049
4050 ac_header_dirent=no
4051 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4052 do
4053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4054 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4055 echo "configure:4056: checking for $ac_hdr that defines DIR" >&5
4056 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4057   echo $ac_n "(cached) $ac_c" 1>&6
4058 else
4059   cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062 #include <sys/types.h>
4063 #include <$ac_hdr>
4064 int main() {
4065 DIR *dirp = 0;
4066 ; return 0; }
4067 EOF
4068 if { (eval echo configure:4069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4069   rm -rf conftest*
4070   eval "ac_cv_header_dirent_$ac_safe=yes"
4071 else
4072   echo "configure: failed program was:" >&5
4073   cat conftest.$ac_ext >&5
4074   rm -rf conftest*
4075   eval "ac_cv_header_dirent_$ac_safe=no"
4076 fi
4077 rm -f conftest*
4078 fi
4079 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4080   echo "$ac_t""yes" 1>&6
4081     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4082   cat >> confdefs.h <<EOF
4083 #define $ac_tr_hdr 1
4084 EOF
4085  ac_header_dirent=$ac_hdr; break
4086 else
4087   echo "$ac_t""no" 1>&6
4088 fi
4089 done
4090 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4091 if test $ac_header_dirent = dirent.h; then
4092 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4093 echo "configure:4094: checking for opendir in -ldir" >&5
4094 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4095 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   ac_save_LIBS="$LIBS"
4099 LIBS="-ldir  $LIBS"
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103 /* Override any gcc2 internal prototype to avoid an error.  */
4104 /* We use char because int might match the return type of a gcc2
4105     builtin and then its argument prototype would still apply.  */
4106 char opendir();
4107
4108 int main() {
4109 opendir()
4110 ; return 0; }
4111 EOF
4112 if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4113   rm -rf conftest*
4114   eval "ac_cv_lib_$ac_lib_var=yes"
4115 else
4116   echo "configure: failed program was:" >&5
4117   cat conftest.$ac_ext >&5
4118   rm -rf conftest*
4119   eval "ac_cv_lib_$ac_lib_var=no"
4120 fi
4121 rm -f conftest*
4122 LIBS="$ac_save_LIBS"
4123
4124 fi
4125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4126   echo "$ac_t""yes" 1>&6
4127   LIBS="$LIBS -ldir"
4128 else
4129   echo "$ac_t""no" 1>&6
4130 fi
4131
4132 else
4133 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4134 echo "configure:4135: checking for opendir in -lx" >&5
4135 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   ac_save_LIBS="$LIBS"
4140 LIBS="-lx  $LIBS"
4141 cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144 /* Override any gcc2 internal prototype to avoid an error.  */
4145 /* We use char because int might match the return type of a gcc2
4146     builtin and then its argument prototype would still apply.  */
4147 char opendir();
4148
4149 int main() {
4150 opendir()
4151 ; return 0; }
4152 EOF
4153 if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4154   rm -rf conftest*
4155   eval "ac_cv_lib_$ac_lib_var=yes"
4156 else
4157   echo "configure: failed program was:" >&5
4158   cat conftest.$ac_ext >&5
4159   rm -rf conftest*
4160   eval "ac_cv_lib_$ac_lib_var=no"
4161 fi
4162 rm -f conftest*
4163 LIBS="$ac_save_LIBS"
4164
4165 fi
4166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4167   echo "$ac_t""yes" 1>&6
4168   LIBS="$LIBS -lx"
4169 else
4170   echo "$ac_t""no" 1>&6
4171 fi
4172
4173 fi
4174
4175 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4176 echo "configure:4177: checking for sys/wait.h that is POSIX.1 compatible" >&5
4177 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4178   echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180   cat > conftest.$ac_ext <<EOF
4181 #line 4182 "configure"
4182 #include "confdefs.h"
4183 #include <sys/types.h>
4184 #include <sys/wait.h>
4185 #ifndef WEXITSTATUS
4186 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4187 #endif
4188 #ifndef WIFEXITED
4189 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4190 #endif
4191 int main() {
4192 int s;
4193 wait (&s);
4194 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4195 ; return 0; }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4198   rm -rf conftest*
4199   ac_cv_header_sys_wait_h=yes
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -rf conftest*
4204   ac_cv_header_sys_wait_h=no
4205 fi
4206 rm -f conftest*
4207 fi
4208
4209 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4210 if test $ac_cv_header_sys_wait_h = yes; then
4211   cat >> confdefs.h <<\EOF
4212 #define HAVE_SYS_WAIT_H 1
4213 EOF
4214
4215 fi
4216
4217 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4218 echo "configure:4219: checking POSIX termios" >&5
4219 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4220   echo $ac_n "(cached) $ac_c" 1>&6
4221 else
4222   cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <sys/types.h>
4226 #include <unistd.h>
4227 #include <termios.h>
4228 int main() {
4229 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4230    tcgetattr(0, 0);
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234   rm -rf conftest*
4235   am_cv_sys_posix_termios=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   am_cv_sys_posix_termios=no
4241 fi
4242 rm -f conftest*
4243 fi
4244
4245 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4246
4247
4248  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4249 echo "configure:4250: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4250 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4251   echo $ac_n "(cached) $ac_c" 1>&6
4252 else
4253   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4254
4255   gwinsz_in_termios_h=no
4256   if test $am_cv_sys_posix_termios = yes; then
4257     cat > conftest.$ac_ext <<EOF
4258 #line 4259 "configure"
4259 #include "confdefs.h"
4260 #include <sys/types.h>
4261 #     include <termios.h>
4262 #     ifdef TIOCGWINSZ
4263         yes
4264 #     endif
4265     
4266 EOF
4267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4268   egrep "yes" >/dev/null 2>&1; then
4269   rm -rf conftest*
4270   gwinsz_in_termios_h=yes
4271 fi
4272 rm -f conftest*
4273
4274   fi
4275
4276   if test $gwinsz_in_termios_h = no; then
4277     cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 #include <sys/types.h>
4281 #     include <sys/ioctl.h>
4282 #     ifdef TIOCGWINSZ
4283         yes
4284 #     endif
4285     
4286 EOF
4287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4288   egrep "yes" >/dev/null 2>&1; then
4289   rm -rf conftest*
4290   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4291 fi
4292 rm -f conftest*
4293
4294   fi
4295   
4296 fi
4297
4298 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4299   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4300     cat >> confdefs.h <<\EOF
4301 #define GWINSZ_IN_SYS_IOCTL 1
4302 EOF
4303
4304   fi
4305
4306 if test $am_cv_sys_posix_termios = yes ; then
4307         cat >> confdefs.h <<\EOF
4308 #define HAVE_POSIX_TERMIOS 1
4309 EOF
4310
4311 fi
4312
4313 for ac_hdr in \
4314         arpa/inet.h             \
4315         arpa/nameser.h  \
4316         assert.h                \
4317         crypt.h                 \
4318         errno.h                 \
4319         fcntl.h                 \
4320         filio.h                 \
4321         getopt.h                \
4322         grp.h                   \
4323         libutil.h               \
4324         limits.h                \
4325         locale.h                \
4326         netinet/tcp.h   \
4327         malloc.h                \
4328         memory.h                \
4329         psap.h                  \
4330         pwd.h                   \
4331         resolv.h                \
4332         sgtty.h                 \
4333         shadow.h                \
4334         stddef.h                \
4335         string.h                \
4336         strings.h               \
4337         sysexits.h              \
4338         sys/file.h              \
4339         sys/filio.h             \
4340         sys/errno.h             \
4341         sys/ioctl.h             \
4342         sys/param.h             \
4343         sys/resource.h  \
4344         sys/select.h    \
4345         sys/socket.h    \
4346         sys/syslog.h    \
4347         sys/time.h              \
4348         sys/types.h             \
4349         syslog.h                \
4350         termios.h               \
4351         unistd.h                \
4352
4353 do
4354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4356 echo "configure:4357: checking for $ac_hdr" >&5
4357 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <$ac_hdr>
4364 EOF
4365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4366 { (eval echo configure:4367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4368 if test -z "$ac_err"; then
4369   rm -rf conftest*
4370   eval "ac_cv_header_$ac_safe=yes"
4371 else
4372   echo "$ac_err" >&5
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   eval "ac_cv_header_$ac_safe=no"
4377 fi
4378 rm -f conftest*
4379 fi
4380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4381   echo "$ac_t""yes" 1>&6
4382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4383   cat >> confdefs.h <<EOF
4384 #define $ac_tr_hdr 1
4385 EOF
4386  
4387 else
4388   echo "$ac_t""no" 1>&6
4389 fi
4390 done
4391
4392
4393
4394
4395 echo $ac_n "checking for socket""... $ac_c" 1>&6
4396 echo "configure:4397: checking for socket" >&5
4397 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4398   echo $ac_n "(cached) $ac_c" 1>&6
4399 else
4400   cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 /* System header to define __stub macros and hopefully few prototypes,
4404     which can conflict with char socket(); below.  */
4405 #include <assert.h>
4406 /* Override any gcc2 internal prototype to avoid an error.  */
4407 /* We use char because int might match the return type of a gcc2
4408     builtin and then its argument prototype would still apply.  */
4409 char socket();
4410 char (*f)();
4411
4412 int main() {
4413
4414 /* The GNU C library defines this for functions which it implements
4415     to always fail with ENOSYS.  Some functions are actually named
4416     something starting with __ and the normal name is an alias.  */
4417 #if defined (__stub_socket) || defined (__stub___socket)
4418 choke me
4419 #else
4420 f = socket;
4421 #endif
4422
4423 ; return 0; }
4424 EOF
4425 if { (eval echo configure:4426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4426   rm -rf conftest*
4427   eval "ac_cv_func_socket=yes"
4428 else
4429   echo "configure: failed program was:" >&5
4430   cat conftest.$ac_ext >&5
4431   rm -rf conftest*
4432   eval "ac_cv_func_socket=no"
4433 fi
4434 rm -f conftest*
4435 fi
4436
4437 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4438   echo "$ac_t""yes" 1>&6
4439   :
4440 else
4441   echo "$ac_t""no" 1>&6
4442         
4443         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4444 echo "configure:4445: checking for main in -lsocket" >&5
4445 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   ac_save_LIBS="$LIBS"
4450 LIBS="-lsocket  $LIBS"
4451 cat > conftest.$ac_ext <<EOF
4452 #line 4453 "configure"
4453 #include "confdefs.h"
4454
4455 int main() {
4456 main()
4457 ; return 0; }
4458 EOF
4459 if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4460   rm -rf conftest*
4461   eval "ac_cv_lib_$ac_lib_var=yes"
4462 else
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -rf conftest*
4466   eval "ac_cv_lib_$ac_lib_var=no"
4467 fi
4468 rm -f conftest*
4469 LIBS="$ac_save_LIBS"
4470
4471 fi
4472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4473   echo "$ac_t""yes" 1>&6
4474     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4475     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4476   cat >> confdefs.h <<EOF
4477 #define $ac_tr_lib 1
4478 EOF
4479
4480   LIBS="-lsocket $LIBS"
4481
4482 else
4483   echo "$ac_t""no" 1>&6
4484 fi
4485
4486         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4487 echo "configure:4488: checking for main in -lnet" >&5
4488 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4490   echo $ac_n "(cached) $ac_c" 1>&6
4491 else
4492   ac_save_LIBS="$LIBS"
4493 LIBS="-lnet  $LIBS"
4494 cat > conftest.$ac_ext <<EOF
4495 #line 4496 "configure"
4496 #include "confdefs.h"
4497
4498 int main() {
4499 main()
4500 ; return 0; }
4501 EOF
4502 if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4503   rm -rf conftest*
4504   eval "ac_cv_lib_$ac_lib_var=yes"
4505 else
4506   echo "configure: failed program was:" >&5
4507   cat conftest.$ac_ext >&5
4508   rm -rf conftest*
4509   eval "ac_cv_lib_$ac_lib_var=no"
4510 fi
4511 rm -f conftest*
4512 LIBS="$ac_save_LIBS"
4513
4514 fi
4515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4516   echo "$ac_t""yes" 1>&6
4517     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4518     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4519   cat >> confdefs.h <<EOF
4520 #define $ac_tr_lib 1
4521 EOF
4522
4523   LIBS="-lnet $LIBS"
4524
4525 else
4526   echo "$ac_t""no" 1>&6
4527 fi
4528
4529         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4530 echo "configure:4531: checking for socket in -lnet" >&5
4531 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4533   echo $ac_n "(cached) $ac_c" 1>&6
4534 else
4535   ac_save_LIBS="$LIBS"
4536 LIBS="-lnet  $LIBS"
4537 cat > conftest.$ac_ext <<EOF
4538 #line 4539 "configure"
4539 #include "confdefs.h"
4540 /* Override any gcc2 internal prototype to avoid an error.  */
4541 /* We use char because int might match the return type of a gcc2
4542     builtin and then its argument prototype would still apply.  */
4543 char socket();
4544
4545 int main() {
4546 socket()
4547 ; return 0; }
4548 EOF
4549 if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4550   rm -rf conftest*
4551   eval "ac_cv_lib_$ac_lib_var=yes"
4552 else
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -rf conftest*
4556   eval "ac_cv_lib_$ac_lib_var=no"
4557 fi
4558 rm -f conftest*
4559 LIBS="$ac_save_LIBS"
4560
4561 fi
4562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4563   echo "$ac_t""yes" 1>&6
4564     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4565     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4566   cat >> confdefs.h <<EOF
4567 #define $ac_tr_lib 1
4568 EOF
4569
4570   LIBS="-lnet $LIBS"
4571
4572 else
4573   echo "$ac_t""no" 1>&6
4574 fi
4575
4576         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4577 echo "configure:4578: checking for main in -lnsl_s" >&5
4578 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   ac_save_LIBS="$LIBS"
4583 LIBS="-lnsl_s  $LIBS"
4584 cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587
4588 int main() {
4589 main()
4590 ; return 0; }
4591 EOF
4592 if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4593   rm -rf conftest*
4594   eval "ac_cv_lib_$ac_lib_var=yes"
4595 else
4596   echo "configure: failed program was:" >&5
4597   cat conftest.$ac_ext >&5
4598   rm -rf conftest*
4599   eval "ac_cv_lib_$ac_lib_var=no"
4600 fi
4601 rm -f conftest*
4602 LIBS="$ac_save_LIBS"
4603
4604 fi
4605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4606   echo "$ac_t""yes" 1>&6
4607     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4608     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4609   cat >> confdefs.h <<EOF
4610 #define $ac_tr_lib 1
4611 EOF
4612
4613   LIBS="-lnsl_s $LIBS"
4614
4615 else
4616   echo "$ac_t""no" 1>&6
4617 fi
4618
4619         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4620 echo "configure:4621: checking for main in -lnsl" >&5
4621 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4622 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   ac_save_LIBS="$LIBS"
4626 LIBS="-lnsl  $LIBS"
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630
4631 int main() {
4632 main()
4633 ; return 0; }
4634 EOF
4635 if { (eval echo configure:4636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4636   rm -rf conftest*
4637   eval "ac_cv_lib_$ac_lib_var=yes"
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641   rm -rf conftest*
4642   eval "ac_cv_lib_$ac_lib_var=no"
4643 fi
4644 rm -f conftest*
4645 LIBS="$ac_save_LIBS"
4646
4647 fi
4648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4649   echo "$ac_t""yes" 1>&6
4650     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4651     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4652   cat >> confdefs.h <<EOF
4653 #define $ac_tr_lib 1
4654 EOF
4655
4656   LIBS="-lnsl $LIBS"
4657
4658 else
4659   echo "$ac_t""no" 1>&6
4660 fi
4661
4662         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4663 echo "configure:4664: checking for socket in -linet" >&5
4664 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   ac_save_LIBS="$LIBS"
4669 LIBS="-linet  $LIBS"
4670 cat > conftest.$ac_ext <<EOF
4671 #line 4672 "configure"
4672 #include "confdefs.h"
4673 /* Override any gcc2 internal prototype to avoid an error.  */
4674 /* We use char because int might match the return type of a gcc2
4675     builtin and then its argument prototype would still apply.  */
4676 char socket();
4677
4678 int main() {
4679 socket()
4680 ; return 0; }
4681 EOF
4682 if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4683   rm -rf conftest*
4684   eval "ac_cv_lib_$ac_lib_var=yes"
4685 else
4686   echo "configure: failed program was:" >&5
4687   cat conftest.$ac_ext >&5
4688   rm -rf conftest*
4689   eval "ac_cv_lib_$ac_lib_var=no"
4690 fi
4691 rm -f conftest*
4692 LIBS="$ac_save_LIBS"
4693
4694 fi
4695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4696   echo "$ac_t""yes" 1>&6
4697     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4698     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4699   cat >> confdefs.h <<EOF
4700 #define $ac_tr_lib 1
4701 EOF
4702
4703   LIBS="-linet $LIBS"
4704
4705 else
4706   echo "$ac_t""no" 1>&6
4707 fi
4708
4709         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4710 echo "configure:4711: checking for main in -lgen" >&5
4711 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4712 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   ac_save_LIBS="$LIBS"
4716 LIBS="-lgen  $LIBS"
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720
4721 int main() {
4722 main()
4723 ; return 0; }
4724 EOF
4725 if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4726   rm -rf conftest*
4727   eval "ac_cv_lib_$ac_lib_var=yes"
4728 else
4729   echo "configure: failed program was:" >&5
4730   cat conftest.$ac_ext >&5
4731   rm -rf conftest*
4732   eval "ac_cv_lib_$ac_lib_var=no"
4733 fi
4734 rm -f conftest*
4735 LIBS="$ac_save_LIBS"
4736
4737 fi
4738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4739   echo "$ac_t""yes" 1>&6
4740     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4741     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4742   cat >> confdefs.h <<EOF
4743 #define $ac_tr_lib 1
4744 EOF
4745
4746   LIBS="-lgen $LIBS"
4747
4748 else
4749   echo "$ac_t""no" 1>&6
4750 fi
4751
4752
4753 fi
4754
4755
4756 echo $ac_n "checking for select""... $ac_c" 1>&6
4757 echo "configure:4758: checking for select" >&5
4758 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4759   echo $ac_n "(cached) $ac_c" 1>&6
4760 else
4761   cat > conftest.$ac_ext <<EOF
4762 #line 4763 "configure"
4763 #include "confdefs.h"
4764 /* System header to define __stub macros and hopefully few prototypes,
4765     which can conflict with char select(); below.  */
4766 #include <assert.h>
4767 /* Override any gcc2 internal prototype to avoid an error.  */
4768 /* We use char because int might match the return type of a gcc2
4769     builtin and then its argument prototype would still apply.  */
4770 char select();
4771 char (*f)();
4772
4773 int main() {
4774
4775 /* The GNU C library defines this for functions which it implements
4776     to always fail with ENOSYS.  Some functions are actually named
4777     something starting with __ and the normal name is an alias.  */
4778 #if defined (__stub_select) || defined (__stub___select)
4779 choke me
4780 #else
4781 f = select;
4782 #endif
4783
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_func_select=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_func_select=no"
4794 fi
4795 rm -f conftest*
4796 fi
4797
4798 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4799   echo "$ac_t""yes" 1>&6
4800   :
4801 else
4802   echo "$ac_t""no" 1>&6
4803 { echo "configure: error: select() required." 1>&2; exit 1; }
4804 fi
4805
4806
4807 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4808 echo "configure:4809: checking types of arguments for select()" >&5
4809  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4810   echo $ac_n "(cached) $ac_c" 1>&6
4811 else
4812    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4813   echo $ac_n "(cached) $ac_c" 1>&6
4814 else
4815     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4816   echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4819      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4820       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4821        cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 #ifdef HAVE_SYS_TYPES_H
4825 #include <sys/types.h>
4826 #endif
4827 #ifdef HAVE_SYS_TIME_H
4828 #include <sys/time.h>
4829 #endif
4830 #ifdef HAVE_SYS_SELECT_H
4831 #include <sys/select.h>
4832 #endif
4833 #ifdef HAVE_SYS_SOCKET_H
4834 #include <sys/socket.h>
4835 #endif
4836 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);
4837 int main() {
4838
4839 ; return 0; }
4840 EOF
4841 if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4842   rm -rf conftest*
4843           ac_not_found=no ; break 3
4844 else
4845   echo "configure: failed program was:" >&5
4846   cat conftest.$ac_ext >&5
4847   rm -rf conftest*
4848   ac_not_found=yes
4849 fi
4850 rm -f conftest*
4851       done
4852      done
4853     done
4854    
4855 fi
4856   
4857 fi
4858  
4859 fi
4860  if test "$ac_not_found" = yes; then
4861   ac_cv_func_select_arg1=int 
4862   ac_cv_func_select_arg234='int *' 
4863   ac_cv_func_select_arg5='struct timeval *'
4864  fi
4865  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4866  cat >> confdefs.h <<EOF
4867 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4868 EOF
4869
4870  cat >> confdefs.h <<EOF
4871 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4872 EOF
4873
4874  cat >> confdefs.h <<EOF
4875 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4876 EOF
4877
4878
4879
4880
4881 for ac_hdr in regex.h 
4882 do
4883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4885 echo "configure:4886: checking for $ac_hdr" >&5
4886 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4892 #include <$ac_hdr>
4893 EOF
4894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4895 { (eval echo configure:4896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4897 if test -z "$ac_err"; then
4898   rm -rf conftest*
4899   eval "ac_cv_header_$ac_safe=yes"
4900 else
4901   echo "$ac_err" >&5
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   eval "ac_cv_header_$ac_safe=no"
4906 fi
4907 rm -f conftest*
4908 fi
4909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4910   echo "$ac_t""yes" 1>&6
4911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4912   cat >> confdefs.h <<EOF
4913 #define $ac_tr_hdr 1
4914 EOF
4915  
4916 else
4917   echo "$ac_t""no" 1>&6
4918 fi
4919 done
4920
4921 if test "$ac_cv_header_regex_h" != yes ; then
4922         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4923 fi
4924 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4925 echo "configure:4926: checking for regfree" >&5
4926 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4927   echo $ac_n "(cached) $ac_c" 1>&6
4928 else
4929   cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932 /* System header to define __stub macros and hopefully few prototypes,
4933     which can conflict with char regfree(); below.  */
4934 #include <assert.h>
4935 /* Override any gcc2 internal prototype to avoid an error.  */
4936 /* We use char because int might match the return type of a gcc2
4937     builtin and then its argument prototype would still apply.  */
4938 char regfree();
4939 char (*f)();
4940
4941 int main() {
4942
4943 /* The GNU C library defines this for functions which it implements
4944     to always fail with ENOSYS.  Some functions are actually named
4945     something starting with __ and the normal name is an alias.  */
4946 #if defined (__stub_regfree) || defined (__stub___regfree)
4947 choke me
4948 #else
4949 f = regfree;
4950 #endif
4951
4952 ; return 0; }
4953 EOF
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955   rm -rf conftest*
4956   eval "ac_cv_func_regfree=yes"
4957 else
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   eval "ac_cv_func_regfree=no"
4962 fi
4963 rm -f conftest*
4964 fi
4965
4966 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968   :
4969 else
4970   echo "$ac_t""no" 1>&6
4971 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4972 fi
4973
4974
4975
4976 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4977 echo "configure:4978: checking for compatible POSIX regex" >&5
4978 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4979   echo $ac_n "(cached) $ac_c" 1>&6
4980 else
4981   
4982         if test "$cross_compiling" = yes; then
4983   ol_cv_c_posix_regex=cross
4984 else
4985   cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4988
4989 #include <sys/types.h>
4990 #include <regex.h>
4991 static char *pattern, *string;
4992 main()
4993 {
4994         int rc;
4995         regex_t re;
4996
4997         pattern = "^A";
4998
4999         if(regcomp(&re, pattern, 0)) {
5000                 return -1;
5001         }
5002         
5003         string = "ALL MATCH";
5004         
5005         rc = regexec(&re, string, 0, (void*)0, 0);
5006
5007         regfree(&re);
5008
5009         return rc;
5010 }
5011 EOF
5012 if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5013 then
5014   ol_cv_c_posix_regex=yes
5015 else
5016   echo "configure: failed program was:" >&5
5017   cat conftest.$ac_ext >&5
5018   rm -fr conftest*
5019   ol_cv_c_posix_regex=no
5020 fi
5021 rm -fr conftest*
5022 fi
5023
5024 fi
5025
5026 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5027
5028 if test "$ol_cv_c_posix_regex" = no ; then
5029         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5030 fi
5031
5032 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5033 echo "configure:5034: checking for sigset in -lV3" >&5
5034 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5036   echo $ac_n "(cached) $ac_c" 1>&6
5037 else
5038   ac_save_LIBS="$LIBS"
5039 LIBS="-lV3  $LIBS"
5040 cat > conftest.$ac_ext <<EOF
5041 #line 5042 "configure"
5042 #include "confdefs.h"
5043 /* Override any gcc2 internal prototype to avoid an error.  */
5044 /* We use char because int might match the return type of a gcc2
5045     builtin and then its argument prototype would still apply.  */
5046 char sigset();
5047
5048 int main() {
5049 sigset()
5050 ; return 0; }
5051 EOF
5052 if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5053   rm -rf conftest*
5054   eval "ac_cv_lib_$ac_lib_var=yes"
5055 else
5056   echo "configure: failed program was:" >&5
5057   cat conftest.$ac_ext >&5
5058   rm -rf conftest*
5059   eval "ac_cv_lib_$ac_lib_var=no"
5060 fi
5061 rm -f conftest*
5062 LIBS="$ac_save_LIBS"
5063
5064 fi
5065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5066   echo "$ac_t""yes" 1>&6
5067     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5069   cat >> confdefs.h <<EOF
5070 #define $ac_tr_lib 1
5071 EOF
5072
5073   LIBS="-lV3 $LIBS"
5074
5075 else
5076   echo "$ac_t""no" 1>&6
5077 fi
5078
5079
5080 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5081 echo "configure:5082: checking for res_search" >&5
5082 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5083   echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085   cat > conftest.$ac_ext <<EOF
5086 #line 5087 "configure"
5087 #include "confdefs.h"
5088 /* System header to define __stub macros and hopefully few prototypes,
5089     which can conflict with char res_search(); below.  */
5090 #include <assert.h>
5091 /* Override any gcc2 internal prototype to avoid an error.  */
5092 /* We use char because int might match the return type of a gcc2
5093     builtin and then its argument prototype would still apply.  */
5094 char res_search();
5095 char (*f)();
5096
5097 int main() {
5098
5099 /* The GNU C library defines this for functions which it implements
5100     to always fail with ENOSYS.  Some functions are actually named
5101     something starting with __ and the normal name is an alias.  */
5102 #if defined (__stub_res_search) || defined (__stub___res_search)
5103 choke me
5104 #else
5105 f = res_search;
5106 #endif
5107
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   eval "ac_cv_func_res_search=yes"
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116   rm -rf conftest*
5117   eval "ac_cv_func_res_search=no"
5118 fi
5119 rm -f conftest*
5120 fi
5121
5122 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5123   echo "$ac_t""yes" 1>&6
5124   :
5125 else
5126   echo "$ac_t""no" 1>&6
5127 fi
5128
5129 if test $ac_cv_func_res_search = no ; then 
5130         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5131 echo "configure:5132: checking for res_search in -lbind" >&5
5132 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   ac_save_LIBS="$LIBS"
5137 LIBS="-lbind  $LIBS"
5138 cat > conftest.$ac_ext <<EOF
5139 #line 5140 "configure"
5140 #include "confdefs.h"
5141 /* Override any gcc2 internal prototype to avoid an error.  */
5142 /* We use char because int might match the return type of a gcc2
5143     builtin and then its argument prototype would still apply.  */
5144 char res_search();
5145
5146 int main() {
5147 res_search()
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=yes"
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157   eval "ac_cv_lib_$ac_lib_var=no"
5158 fi
5159 rm -f conftest*
5160 LIBS="$ac_save_LIBS"
5161
5162 fi
5163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5164   echo "$ac_t""yes" 1>&6
5165     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5166     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5167   cat >> confdefs.h <<EOF
5168 #define $ac_tr_lib 1
5169 EOF
5170
5171   LIBS="-lbind $LIBS"
5172
5173 else
5174   echo "$ac_t""no" 1>&6
5175 fi
5176
5177         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5178 fi
5179
5180 if test $ac_cv_func_res_search = no ; then 
5181         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5182 echo "configure:5183: checking for __res_search in -lbind" >&5
5183 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   ac_save_LIBS="$LIBS"
5188 LIBS="-lbind  $LIBS"
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192 /* Override any gcc2 internal prototype to avoid an error.  */
5193 /* We use char because int might match the return type of a gcc2
5194     builtin and then its argument prototype would still apply.  */
5195 char __res_search();
5196
5197 int main() {
5198 __res_search()
5199 ; return 0; }
5200 EOF
5201 if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5202   rm -rf conftest*
5203   eval "ac_cv_lib_$ac_lib_var=yes"
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208   eval "ac_cv_lib_$ac_lib_var=no"
5209 fi
5210 rm -f conftest*
5211 LIBS="$ac_save_LIBS"
5212
5213 fi
5214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5215   echo "$ac_t""yes" 1>&6
5216     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5217     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5218   cat >> confdefs.h <<EOF
5219 #define $ac_tr_lib 1
5220 EOF
5221
5222   LIBS="-lbind $LIBS"
5223
5224 else
5225   echo "$ac_t""no" 1>&6
5226 fi
5227
5228         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5229 fi
5230
5231 if test $ac_cv_func_res_search = no ; then 
5232         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5233 echo "configure:5234: checking for res_search in -lresolv" >&5
5234 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   ac_save_LIBS="$LIBS"
5239 LIBS="-lresolv  $LIBS"
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 /* Override any gcc2 internal prototype to avoid an error.  */
5244 /* We use char because int might match the return type of a gcc2
5245     builtin and then its argument prototype would still apply.  */
5246 char res_search();
5247
5248 int main() {
5249 res_search()
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5253   rm -rf conftest*
5254   eval "ac_cv_lib_$ac_lib_var=yes"
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258   rm -rf conftest*
5259   eval "ac_cv_lib_$ac_lib_var=no"
5260 fi
5261 rm -f conftest*
5262 LIBS="$ac_save_LIBS"
5263
5264 fi
5265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5266   echo "$ac_t""yes" 1>&6
5267     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5268     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5269   cat >> confdefs.h <<EOF
5270 #define $ac_tr_lib 1
5271 EOF
5272
5273   LIBS="-lresolv $LIBS"
5274
5275 else
5276   echo "$ac_t""no" 1>&6
5277 fi
5278
5279         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5280 fi
5281
5282 if test "$ac_cv_func_res_search" = yes ; then
5283         cat >> confdefs.h <<\EOF
5284 #define HAVE_RES_SEARCH 1
5285 EOF
5286
5287 elif test $ol_enable_dns = yes ; then
5288         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5289 elif test $ol_enable_dns != no ; then
5290         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5291 fi
5292
5293
5294 # ISODE tests
5295 ol_link_isode=no
5296 if test $ol_enable_ldapd != no ; then
5297         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5298
5299                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5300 echo "configure:5301: checking for main in -lxtpp" >&5
5301 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5302 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5303   echo $ac_n "(cached) $ac_c" 1>&6
5304 else
5305   ac_save_LIBS="$LIBS"
5306 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5307 cat > conftest.$ac_ext <<EOF
5308 #line 5309 "configure"
5309 #include "confdefs.h"
5310
5311 int main() {
5312 main()
5313 ; return 0; }
5314 EOF
5315 if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=yes"
5318 else
5319   echo "configure: failed program was:" >&5
5320   cat conftest.$ac_ext >&5
5321   rm -rf conftest*
5322   eval "ac_cv_lib_$ac_lib_var=no"
5323 fi
5324 rm -f conftest*
5325 LIBS="$ac_save_LIBS"
5326
5327 fi
5328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5329   echo "$ac_t""yes" 1>&6
5330   
5331                 ol_link_isode=yes
5332                 cat >> confdefs.h <<\EOF
5333 #define HAVE_XTPP 1
5334 EOF
5335
5336                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5337                 
5338 else
5339   echo "$ac_t""no" 1>&6
5340 :
5341 fi
5342
5343         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5344 echo "configure:5345: checking for main in -ldsap" >&5
5345 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5346 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5347   echo $ac_n "(cached) $ac_c" 1>&6
5348 else
5349   ac_save_LIBS="$LIBS"
5350 LIBS="-ldsap -lisode $LIBS"
5351 cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354
5355 int main() {
5356 main()
5357 ; return 0; }
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5360   rm -rf conftest*
5361   eval "ac_cv_lib_$ac_lib_var=yes"
5362 else
5363   echo "configure: failed program was:" >&5
5364   cat conftest.$ac_ext >&5
5365   rm -rf conftest*
5366   eval "ac_cv_lib_$ac_lib_var=no"
5367 fi
5368 rm -f conftest*
5369 LIBS="$ac_save_LIBS"
5370
5371 fi
5372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5373   echo "$ac_t""yes" 1>&6
5374   
5375                 ol_link_isode=yes
5376                 cat >> confdefs.h <<\EOF
5377 #define HAVE_DSAP 1
5378 EOF
5379
5380                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5381                 
5382 else
5383   echo "$ac_t""no" 1>&6
5384 :
5385 fi
5386
5387         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5388 echo "configure:5389: checking for main in -lisode" >&5
5389 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5391   echo $ac_n "(cached) $ac_c" 1>&6
5392 else
5393   ac_save_LIBS="$LIBS"
5394 LIBS="-lisode  $LIBS"
5395 cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398
5399 int main() {
5400 main()
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   eval "ac_cv_lib_$ac_lib_var=yes"
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   eval "ac_cv_lib_$ac_lib_var=no"
5411 fi
5412 rm -f conftest*
5413 LIBS="$ac_save_LIBS"
5414
5415 fi
5416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5417   echo "$ac_t""yes" 1>&6
5418   
5419                 ol_link_isode=yes
5420                 cat >> confdefs.h <<\EOF
5421 #define HAVE_ISODE 1
5422 EOF
5423
5424                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5425                 
5426 else
5427   echo "$ac_t""no" 1>&6
5428 :
5429 fi
5430
5431 fi
5432
5433 if test $ol_link_isode != no; then
5434         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5435 echo "configure:5436: checking for main in -lpp" >&5
5436 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5437 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5438   echo $ac_n "(cached) $ac_c" 1>&6
5439 else
5440   ac_save_LIBS="$LIBS"
5441 LIBS="-lpp  $LIBS"
5442 cat > conftest.$ac_ext <<EOF
5443 #line 5444 "configure"
5444 #include "confdefs.h"
5445
5446 int main() {
5447 main()
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=yes"
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=no"
5458 fi
5459 rm -f conftest*
5460 LIBS="$ac_save_LIBS"
5461
5462 fi
5463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465   
5466                 cat >> confdefs.h <<\EOF
5467 #define HAVE_PP 1
5468 EOF
5469
5470                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5471                 
5472 else
5473   echo "$ac_t""no" 1>&6
5474 :
5475 fi
5476
5477
5478         # Extract the first word of "pepsy", so it can be a program name with args.
5479 set dummy pepsy; ac_word=$2
5480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5481 echo "configure:5482: checking for $ac_word" >&5
5482 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5483   echo $ac_n "(cached) $ac_c" 1>&6
5484 else
5485   case "$PEPSY" in
5486   /*)
5487   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5488   ;;
5489   ?:/*)                  
5490   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5491   ;;
5492   *)
5493   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5494   ac_dummy="$PATH"
5495   for ac_dir in $ac_dummy; do 
5496     test -z "$ac_dir" && ac_dir=.
5497     if test -f $ac_dir/$ac_word; then
5498       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5499       break
5500     fi
5501   done
5502   IFS="$ac_save_ifs"
5503   ;;
5504 esac
5505 fi
5506 PEPSY="$ac_cv_path_PEPSY"
5507 if test -n "$PEPSY"; then
5508   echo "$ac_t""$PEPSY" 1>&6
5509 else
5510   echo "$ac_t""no" 1>&6
5511 fi
5512
5513 fi
5514
5515 if test $ol_enable_quipu != no ; then
5516         for ac_hdr in quipu/commonarg.h
5517 do
5518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5520 echo "configure:5521: checking for $ac_hdr" >&5
5521 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5522   echo $ac_n "(cached) $ac_c" 1>&6
5523 else
5524   cat > conftest.$ac_ext <<EOF
5525 #line 5526 "configure"
5526 #include "confdefs.h"
5527 #include <$ac_hdr>
5528 EOF
5529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5530 { (eval echo configure:5531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5532 if test -z "$ac_err"; then
5533   rm -rf conftest*
5534   eval "ac_cv_header_$ac_safe=yes"
5535 else
5536   echo "$ac_err" >&5
5537   echo "configure: failed program was:" >&5
5538   cat conftest.$ac_ext >&5
5539   rm -rf conftest*
5540   eval "ac_cv_header_$ac_safe=no"
5541 fi
5542 rm -f conftest*
5543 fi
5544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5545   echo "$ac_t""yes" 1>&6
5546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5547   cat >> confdefs.h <<EOF
5548 #define $ac_tr_hdr 1
5549 EOF
5550  
5551 else
5552   echo "$ac_t""no" 1>&6
5553 fi
5554 done
5555
5556
5557         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5558                 BUILD_QUIPU=yes
5559         elif test $ol_enable_quipu = auto ; then
5560                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5561         else
5562                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5563         fi
5564 fi
5565
5566 ol_link_kerberos=no
5567
5568 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5569         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5570 do
5571 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5572 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5573 echo "configure:5574: checking for $ac_hdr" >&5
5574 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5575   echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577   cat > conftest.$ac_ext <<EOF
5578 #line 5579 "configure"
5579 #include "confdefs.h"
5580 #include <$ac_hdr>
5581 EOF
5582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5583 { (eval echo configure:5584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5585 if test -z "$ac_err"; then
5586   rm -rf conftest*
5587   eval "ac_cv_header_$ac_safe=yes"
5588 else
5589   echo "$ac_err" >&5
5590   echo "configure: failed program was:" >&5
5591   cat conftest.$ac_ext >&5
5592   rm -rf conftest*
5593   eval "ac_cv_header_$ac_safe=no"
5594 fi
5595 rm -f conftest*
5596 fi
5597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5598   echo "$ac_t""yes" 1>&6
5599     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5600   cat >> confdefs.h <<EOF
5601 #define $ac_tr_hdr 1
5602 EOF
5603  
5604 else
5605   echo "$ac_t""no" 1>&6
5606 fi
5607 done
5608
5609
5610         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5611                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5612 echo "configure:5613: checking for main in -lkrb4" >&5
5613 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5614 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5615   echo $ac_n "(cached) $ac_c" 1>&6
5616 else
5617   ac_save_LIBS="$LIBS"
5618 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5619 cat > conftest.$ac_ext <<EOF
5620 #line 5621 "configure"
5621 #include "confdefs.h"
5622
5623 int main() {
5624 main()
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628   rm -rf conftest*
5629   eval "ac_cv_lib_$ac_lib_var=yes"
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   eval "ac_cv_lib_$ac_lib_var=no"
5635 fi
5636 rm -f conftest*
5637 LIBS="$ac_save_LIBS"
5638
5639 fi
5640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5641   echo "$ac_t""yes" 1>&6
5642   have_k5=yes
5643 else
5644   echo "$ac_t""no" 1>&6
5645 have_k5=no
5646 fi
5647
5648
5649                 if test $have_k5 = yes ; then
5650                         ol_with_kerberos=found
5651                         ol_link_kerberos=yes
5652
5653                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5654
5655                         LIBS="$KRB_LIBS $LIBS"
5656
5657                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5658 echo "configure:5659: checking for des_debug in Kerberos libraries" >&5
5659 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5660   echo $ac_n "(cached) $ac_c" 1>&6
5661 else
5662   
5663                                                                 save_LIBS="$LIBS"
5664                                 LIBS="$KRB_LIBS $LIBS"
5665                                 cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668
5669 #include <kerberosIV/krb.h>
5670 #include <kerberosIV/des.h>
5671 extern int des_debug;
5672
5673 int main() {
5674
5675 des_debug = 1;
5676
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   ol_cv_var_des_debug=yes
5682 else
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   ol_cv_var_des_debug=no
5687 fi
5688 rm -f conftest*
5689                                                                 LIBS="$save_LIBS"
5690                         
5691 fi
5692
5693 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5694
5695                         if test $ol_cv_var_des_debug = yes ; then
5696                                 cat >> confdefs.h <<\EOF
5697 #define HAVE_DES_DEBUG 1
5698 EOF
5699
5700                         fi
5701
5702                         LIBS="$save_LIBS"
5703                 fi
5704         fi
5705 fi
5706
5707 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5708         for ac_hdr in krb.h des.h
5709 do
5710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5712 echo "configure:5713: checking for $ac_hdr" >&5
5713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   cat > conftest.$ac_ext <<EOF
5717 #line 5718 "configure"
5718 #include "confdefs.h"
5719 #include <$ac_hdr>
5720 EOF
5721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5722 { (eval echo configure:5723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5724 if test -z "$ac_err"; then
5725   rm -rf conftest*
5726   eval "ac_cv_header_$ac_safe=yes"
5727 else
5728   echo "$ac_err" >&5
5729   echo "configure: failed program was:" >&5
5730   cat conftest.$ac_ext >&5
5731   rm -rf conftest*
5732   eval "ac_cv_header_$ac_safe=no"
5733 fi
5734 rm -f conftest*
5735 fi
5736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5737   echo "$ac_t""yes" 1>&6
5738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5739   cat >> confdefs.h <<EOF
5740 #define $ac_tr_hdr 1
5741 EOF
5742  
5743 else
5744   echo "$ac_t""no" 1>&6
5745 fi
5746 done
5747
5748
5749         if test $ac_cv_header_krb_h = yes ; then
5750                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5751 echo "configure:5752: checking for main in -lkrb" >&5
5752 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5753 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5754   echo $ac_n "(cached) $ac_c" 1>&6
5755 else
5756   ac_save_LIBS="$LIBS"
5757 LIBS="-lkrb -ldes $LIBS"
5758 cat > conftest.$ac_ext <<EOF
5759 #line 5760 "configure"
5760 #include "confdefs.h"
5761
5762 int main() {
5763 main()
5764 ; return 0; }
5765 EOF
5766 if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5767   rm -rf conftest*
5768   eval "ac_cv_lib_$ac_lib_var=yes"
5769 else
5770   echo "configure: failed program was:" >&5
5771   cat conftest.$ac_ext >&5
5772   rm -rf conftest*
5773   eval "ac_cv_lib_$ac_lib_var=no"
5774 fi
5775 rm -f conftest*
5776 LIBS="$ac_save_LIBS"
5777
5778 fi
5779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5780   echo "$ac_t""yes" 1>&6
5781   have_k4=yes
5782 else
5783   echo "$ac_t""no" 1>&6
5784 have_k4=no
5785 fi
5786
5787
5788                 if test $have_k4 = yes ; then
5789                         ol_with_kerberos=found
5790                         ol_link_kerberos=yes
5791
5792                         KRB_LIBS="-lkrb -ldes"
5793                 fi
5794         fi
5795 fi
5796
5797 if test $ol_link_kerberos = yes ; then
5798         cat >> confdefs.h <<\EOF
5799 #define HAVE_KERBEROS 1
5800 EOF
5801
5802 fi
5803
5804 ol_link_tls=no
5805 if test $ol_with_tls != no ; then
5806         
5807         for ac_hdr in openssl/ssl.h ssl.h
5808 do
5809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5811 echo "configure:5812: checking for $ac_hdr" >&5
5812 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5813   echo $ac_n "(cached) $ac_c" 1>&6
5814 else
5815   cat > conftest.$ac_ext <<EOF
5816 #line 5817 "configure"
5817 #include "confdefs.h"
5818 #include <$ac_hdr>
5819 EOF
5820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5821 { (eval echo configure:5822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5823 if test -z "$ac_err"; then
5824   rm -rf conftest*
5825   eval "ac_cv_header_$ac_safe=yes"
5826 else
5827   echo "$ac_err" >&5
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -rf conftest*
5831   eval "ac_cv_header_$ac_safe=no"
5832 fi
5833 rm -f conftest*
5834 fi
5835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5838   cat >> confdefs.h <<EOF
5839 #define $ac_tr_hdr 1
5840 EOF
5841  
5842 else
5843   echo "$ac_t""no" 1>&6
5844 fi
5845 done
5846
5847         
5848         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5849                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5850 echo "configure:5851: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5851 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5852 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5853   echo $ac_n "(cached) $ac_c" 1>&6
5854 else
5855   ac_save_LIBS="$LIBS"
5856 LIBS="-lssl -lcrypto $LIBS"
5857 cat > conftest.$ac_ext <<EOF
5858 #line 5859 "configure"
5859 #include "confdefs.h"
5860 /* Override any gcc2 internal prototype to avoid an error.  */
5861 /* We use char because int might match the return type of a gcc2
5862     builtin and then its argument prototype would still apply.  */
5863 char SSLeay_add_ssl_algorithms();
5864
5865 int main() {
5866 SSLeay_add_ssl_algorithms()
5867 ; return 0; }
5868 EOF
5869 if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5870   rm -rf conftest*
5871   eval "ac_cv_lib_$ac_lib_var=yes"
5872 else
5873   echo "configure: failed program was:" >&5
5874   cat conftest.$ac_ext >&5
5875   rm -rf conftest*
5876   eval "ac_cv_lib_$ac_lib_var=no"
5877 fi
5878 rm -f conftest*
5879 LIBS="$ac_save_LIBS"
5880
5881 fi
5882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884   have_ssleay=yes
5885                         need_rsaref=no
5886 else
5887   echo "$ac_t""no" 1>&6
5888 have_ssleay=no
5889 fi
5890
5891                         
5892                 if test $have_ssleay = no ; then
5893                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5894 echo "configure:5895: checking for SSL_library_init in -lssl" >&5
5895 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5897   echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899   ac_save_LIBS="$LIBS"
5900 LIBS="-lssl -lcrypto $LIBS"
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 /* Override any gcc2 internal prototype to avoid an error.  */
5905 /* We use char because int might match the return type of a gcc2
5906     builtin and then its argument prototype would still apply.  */
5907 char SSL_library_init();
5908
5909 int main() {
5910 SSL_library_init()
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_lib_$ac_lib_var=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_lib_$ac_lib_var=no"
5921 fi
5922 rm -f conftest*
5923 LIBS="$ac_save_LIBS"
5924
5925 fi
5926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5927   echo "$ac_t""yes" 1>&6
5928   have_ssleay=yes
5929                                 need_rsaref=no
5930 else
5931   echo "$ac_t""no" 1>&6
5932 have_ssleay=no
5933 fi
5934
5935                 fi
5936
5937                 if test $have_ssleay = no ; then
5938                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5939 echo "configure:5940: checking for ssl3_accept in -lssl" >&5
5940 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5941 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5942   echo $ac_n "(cached) $ac_c" 1>&6
5943 else
5944   ac_save_LIBS="$LIBS"
5945 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5946 cat > conftest.$ac_ext <<EOF
5947 #line 5948 "configure"
5948 #include "confdefs.h"
5949 /* Override any gcc2 internal prototype to avoid an error.  */
5950 /* We use char because int might match the return type of a gcc2
5951     builtin and then its argument prototype would still apply.  */
5952 char ssl3_accept();
5953
5954 int main() {
5955 ssl3_accept()
5956 ; return 0; }
5957 EOF
5958 if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5959   rm -rf conftest*
5960   eval "ac_cv_lib_$ac_lib_var=yes"
5961 else
5962   echo "configure: failed program was:" >&5
5963   cat conftest.$ac_ext >&5
5964   rm -rf conftest*
5965   eval "ac_cv_lib_$ac_lib_var=no"
5966 fi
5967 rm -f conftest*
5968 LIBS="$ac_save_LIBS"
5969
5970 fi
5971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5972   echo "$ac_t""yes" 1>&6
5973   have_ssleay=yes
5974                                 need_rsaref=yes
5975 else
5976   echo "$ac_t""no" 1>&6
5977 have_ssleay=no
5978 fi
5979
5980                 fi
5981
5982                 if test $have_ssleay = yes ; then
5983                         ol_with_tls=found
5984                         ol_link_tls=yes
5985
5986                         cat >> confdefs.h <<\EOF
5987 #define HAVE_SSLEAY 1
5988 EOF
5989
5990
5991                         if test $need_rsaref = yes; then
5992                                 cat >> confdefs.h <<\EOF
5993 #define HAVE_RSAREF 1
5994 EOF
5995
5996
5997                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5998                         else
5999                                 TLS_LIBS="-lssl -lcrypto"
6000                         fi
6001                 fi
6002         fi
6003 fi
6004
6005 if test $ol_link_tls = yes ; then
6006         cat >> confdefs.h <<\EOF
6007 #define HAVE_TLS 1
6008 EOF
6009
6010 fi      
6011
6012 for ac_func in \
6013         ctime_r                 \
6014         gethostbyname_r gethostbyaddr_r \
6015
6016 do
6017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6018 echo "configure:6019: checking for $ac_func" >&5
6019 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6020   echo $ac_n "(cached) $ac_c" 1>&6
6021 else
6022   cat > conftest.$ac_ext <<EOF
6023 #line 6024 "configure"
6024 #include "confdefs.h"
6025 /* System header to define __stub macros and hopefully few prototypes,
6026     which can conflict with char $ac_func(); below.  */
6027 #include <assert.h>
6028 /* Override any gcc2 internal prototype to avoid an error.  */
6029 /* We use char because int might match the return type of a gcc2
6030     builtin and then its argument prototype would still apply.  */
6031 char $ac_func();
6032 char (*f)();
6033
6034 int main() {
6035
6036 /* The GNU C library defines this for functions which it implements
6037     to always fail with ENOSYS.  Some functions are actually named
6038     something starting with __ and the normal name is an alias.  */
6039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6040 choke me
6041 #else
6042 f = $ac_func;
6043 #endif
6044
6045 ; return 0; }
6046 EOF
6047 if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6048   rm -rf conftest*
6049   eval "ac_cv_func_$ac_func=yes"
6050 else
6051   echo "configure: failed program was:" >&5
6052   cat conftest.$ac_ext >&5
6053   rm -rf conftest*
6054   eval "ac_cv_func_$ac_func=no"
6055 fi
6056 rm -f conftest*
6057 fi
6058
6059 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6060   echo "$ac_t""yes" 1>&6
6061     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6062   cat >> confdefs.h <<EOF
6063 #define $ac_tr_func 1
6064 EOF
6065  
6066 else
6067   echo "$ac_t""no" 1>&6
6068 fi
6069 done
6070
6071
6072 if test "$ac_cv_func_ctime_r" = no ; then
6073         ol_cv_func_ctime_r_nargs=0
6074 else
6075         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6076 echo "configure:6077: checking number of arguments of ctime_r" >&5
6077 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6078   echo $ac_n "(cached) $ac_c" 1>&6
6079 else
6080   cat > conftest.$ac_ext <<EOF
6081 #line 6082 "configure"
6082 #include "confdefs.h"
6083 #include <time.h>
6084 int main() {
6085 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6086 ; return 0; }
6087 EOF
6088 if { (eval echo configure:6089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6089   rm -rf conftest*
6090   ol_cv_func_ctime_r_nargs=3
6091 else
6092   echo "configure: failed program was:" >&5
6093   cat conftest.$ac_ext >&5
6094   rm -rf conftest*
6095   cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 #include <time.h>
6099 int main() {
6100 time_t ti; char *buffer; ctime_r(&ti,buffer);
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6104   rm -rf conftest*
6105   ol_cv_func_ctime_r_nargs=2
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   ol_cv_func_ctime_r_nargs=0
6111 fi
6112 rm -f conftest*
6113 fi
6114 rm -f conftest*
6115 fi
6116
6117 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6118   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6119     cat >> confdefs.h <<EOF
6120 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6121 EOF
6122
6123   fi
6124
6125 fi
6126
6127 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6128         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6129 echo "configure:6130: checking number of arguments of gethostbyname_r" >&5
6130 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6131   echo $ac_n "(cached) $ac_c" 1>&6
6132 else
6133   cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 #include <sys/types.h>
6137 #include <sys/socket.h>
6138 #include <netinet/in.h>
6139 #include <netdb.h>
6140 #define BUFSIZE (sizeof(struct hostent)+10)
6141 int main() {
6142 struct hostent hent; char buffer[BUFSIZE];
6143                 int bufsize=BUFSIZE;int h_errno;
6144                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6145                         buffer, bufsize, &h_errno);
6146 ; return 0; }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6149   rm -rf conftest*
6150   ol_cv_func_gethostbyname_r_nargs=5
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -rf conftest*
6155   cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158 #include <sys/types.h>
6159 #include <sys/socket.h>
6160 #include <netinet/in.h>
6161 #include <netdb.h>
6162 #define BUFSIZE (sizeof(struct hostent)+10)
6163 int main() {
6164 struct hostent hent;struct hostent *rhent;
6165                         char buffer[BUFSIZE];
6166                         int bufsize=BUFSIZE;int h_errno;
6167                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6168                                 &rhent, &h_errno);
6169 ; return 0; }
6170 EOF
6171 if { (eval echo configure:6172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6172   rm -rf conftest*
6173   ol_cv_func_gethostbyname_r_nargs=6
6174 else
6175   echo "configure: failed program was:" >&5
6176   cat conftest.$ac_ext >&5
6177   rm -rf conftest*
6178   ol_cv_func_gethostbyname_r_nargs=0
6179 fi
6180 rm -f conftest*
6181 fi
6182 rm -f conftest*
6183 fi
6184
6185 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6186   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6187         cat >> confdefs.h <<EOF
6188 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6189 EOF
6190
6191   fi
6192
6193 else
6194         ol_cv_func_gethostbyname_r_nargs=0
6195 fi
6196  
6197 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6198         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6199 echo "configure:6200: checking number of arguments of gethostbyaddr_r" >&5
6200 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6201   echo $ac_n "(cached) $ac_c" 1>&6
6202 else
6203   cat > conftest.$ac_ext <<EOF
6204 #line 6205 "configure"
6205 #include "confdefs.h"
6206 #include <sys/types.h>
6207 #include <sys/socket.h>
6208 #include <netinet/in.h>
6209 #include <netdb.h>
6210 #define BUFSIZE (sizeof(struct hostent)+10)
6211 int main() {
6212 struct hostent hent; char buffer[BUFSIZE]; 
6213             struct in_addr add;
6214             size_t alen=sizeof(struct in_addr);
6215             int bufsize=BUFSIZE;int h_errno;
6216                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6217                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6218 ; return 0; }
6219 EOF
6220 if { (eval echo configure:6221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6221   rm -rf conftest*
6222   ol_cv_func_gethostbyaddr_r_nargs=7
6223 else
6224   echo "configure: failed program was:" >&5
6225   cat conftest.$ac_ext >&5
6226   rm -rf conftest*
6227   cat > conftest.$ac_ext <<EOF
6228 #line 6229 "configure"
6229 #include "confdefs.h"
6230 #include <sys/types.h>
6231 #include <sys/socket.h>
6232 #include <netinet/in.h>
6233 #include <netdb.h>
6234 #define BUFSIZE (sizeof(struct hostent)+10)
6235 int main() {
6236 struct hostent hent;
6237                         struct hostent *rhent; char buffer[BUFSIZE]; 
6238                         struct in_addr add;
6239                         size_t alen=sizeof(struct in_addr);
6240                         int bufsize=BUFSIZE;int h_errno;
6241                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6242                                 alen, AF_INET, &hent, buffer, bufsize, 
6243                                 &rhent, &h_errno);
6244 ; return 0; }
6245 EOF
6246 if { (eval echo configure:6247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6247   rm -rf conftest*
6248   ol_cv_func_gethostbyaddr_r_nargs=8
6249 else
6250   echo "configure: failed program was:" >&5
6251   cat conftest.$ac_ext >&5
6252   rm -rf conftest*
6253   ol_cv_func_gethostbyaddr_r_nargs=0
6254 fi
6255 rm -f conftest*
6256 fi
6257 rm -f conftest*
6258 fi
6259
6260 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6261   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6262     cat >> confdefs.h <<EOF
6263 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6264 EOF
6265
6266   fi
6267
6268 else
6269         ol_cv_func_gethostbyaddr_r_nargs=0
6270 fi
6271
6272 if test "$ac_cv_func_ctime_r" = yes \
6273         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6274         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6275         -a "$ac_cv_func_gethostbyname_r" = yes \
6276         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6277         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6278         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6279         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6280         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6281         ; then
6282  
6283         cat >> confdefs.h <<\EOF
6284 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6285 EOF
6286
6287 fi
6288
6289 ol_link_threads=no
6290 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6291         -o $ol_with_threads = posix ; then
6292
6293         for ac_hdr in pthread.h
6294 do
6295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6297 echo "configure:6298: checking for $ac_hdr" >&5
6298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6299   echo $ac_n "(cached) $ac_c" 1>&6
6300 else
6301   cat > conftest.$ac_ext <<EOF
6302 #line 6303 "configure"
6303 #include "confdefs.h"
6304 #include <$ac_hdr>
6305 EOF
6306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6307 { (eval echo configure:6308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6309 if test -z "$ac_err"; then
6310   rm -rf conftest*
6311   eval "ac_cv_header_$ac_safe=yes"
6312 else
6313   echo "$ac_err" >&5
6314   echo "configure: failed program was:" >&5
6315   cat conftest.$ac_ext >&5
6316   rm -rf conftest*
6317   eval "ac_cv_header_$ac_safe=no"
6318 fi
6319 rm -f conftest*
6320 fi
6321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6322   echo "$ac_t""yes" 1>&6
6323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6324   cat >> confdefs.h <<EOF
6325 #define $ac_tr_hdr 1
6326 EOF
6327  
6328 else
6329   echo "$ac_t""no" 1>&6
6330 fi
6331 done
6332
6333
6334         if test $ac_cv_header_pthread_h = yes ; then
6335                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6336 echo "configure:6337: checking POSIX thread version" >&5
6337 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6338   echo $ac_n "(cached) $ac_c" 1>&6
6339 else
6340   
6341         cat > conftest.$ac_ext <<EOF
6342 #line 6343 "configure"
6343 #include "confdefs.h"
6344
6345 #               include <pthread.h>
6346                 /* this check could be improved */
6347 #               ifdef PTHREAD_ONCE_INIT
6348                         pthread_version_final
6349 #               endif
6350         
6351 EOF
6352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6353   egrep "pthread_version_final" >/dev/null 2>&1; then
6354   rm -rf conftest*
6355   ol_pthread_final=yes
6356 else
6357   rm -rf conftest*
6358   ol_pthread_final=no
6359 fi
6360 rm -f conftest*
6361
6362
6363         cat > conftest.$ac_ext <<EOF
6364 #line 6365 "configure"
6365 #include "confdefs.h"
6366
6367 #               include <pthread.h>
6368                 /* this check could be improved */
6369 #               ifdef pthread_once_init
6370                         pthread_version_draft4
6371 #               endif
6372         
6373 EOF
6374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6375   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6376   rm -rf conftest*
6377   ol_pthread_draft4=yes
6378 else
6379   rm -rf conftest*
6380   ol_pthread_draft4=no
6381 fi
6382 rm -f conftest*
6383
6384
6385         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6386                 ol_cv_pthread_version=final
6387         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6388                 ol_cv_pthread_version=draft4
6389         else
6390                 ol_cv_pthread_version=unknown
6391         fi
6392
6393 fi
6394
6395 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6396
6397
6398                 if test $ol_cv_pthread_version = final ; then
6399                         cat >> confdefs.h <<\EOF
6400 #define HAVE_PTHREADS_FINAL 1
6401 EOF
6402
6403                 elif test $ol_cv_pthread_version = draft4 ; then
6404                         cat >> confdefs.h <<\EOF
6405 #define HAVE_PTHREADS_D4 1
6406 EOF
6407
6408                 else
6409                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6410                 fi
6411
6412                 # consider threads found
6413                 ol_with_threads=found
6414
6415                 
6416         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6417 echo "configure:6418: checking for LinuxThreads pthread.h" >&5
6418 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6419   echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421   cat > conftest.$ac_ext <<EOF
6422 #line 6423 "configure"
6423 #include "confdefs.h"
6424 #include <pthread.h>
6425 EOF
6426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6427   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6428   rm -rf conftest*
6429   ol_cv_header_linux_threads=yes
6430 else
6431   rm -rf conftest*
6432   ol_cv_header_linux_threads=no
6433 fi
6434 rm -f conftest*
6435
6436                 
6437 fi
6438
6439 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6440         if test $ol_cv_header_linux_threads = yes; then
6441                 cat >> confdefs.h <<\EOF
6442 #define HAVE_LINUX_THREADS 1
6443 EOF
6444
6445         fi
6446
6447                 
6448         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6449 echo "configure:6450: checking for GNU Pth pthread.h" >&5
6450 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6451   echo $ac_n "(cached) $ac_c" 1>&6
6452 else
6453   cat > conftest.$ac_ext <<EOF
6454 #line 6455 "configure"
6455 #include "confdefs.h"
6456 #include <pthread.h>
6457 #ifdef _POSIX_THREAD_IS_GNU_PTH
6458         __gnu_pth__
6459 #endif
6460
6461 EOF
6462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6463   egrep "__gnu_pth__" >/dev/null 2>&1; then
6464   rm -rf conftest*
6465   ol_cv_header_gnu_pth_pthread_h=yes
6466 else
6467   rm -rf conftest*
6468   ol_cv_header_gnu_pth_pthread_h=no
6469 fi
6470 rm -f conftest*
6471
6472                 
6473 fi
6474
6475 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6476
6477
6478                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6479                         for ac_hdr in sched.h
6480 do
6481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6483 echo "configure:6484: checking for $ac_hdr" >&5
6484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6485   echo $ac_n "(cached) $ac_c" 1>&6
6486 else
6487   cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490 #include <$ac_hdr>
6491 EOF
6492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6493 { (eval echo configure:6494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6495 if test -z "$ac_err"; then
6496   rm -rf conftest*
6497   eval "ac_cv_header_$ac_safe=yes"
6498 else
6499   echo "$ac_err" >&5
6500   echo "configure: failed program was:" >&5
6501   cat conftest.$ac_ext >&5
6502   rm -rf conftest*
6503   eval "ac_cv_header_$ac_safe=no"
6504 fi
6505 rm -f conftest*
6506 fi
6507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6508   echo "$ac_t""yes" 1>&6
6509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6510   cat >> confdefs.h <<EOF
6511 #define $ac_tr_hdr 1
6512 EOF
6513  
6514 else
6515   echo "$ac_t""no" 1>&6
6516 fi
6517 done
6518
6519                 fi
6520
6521                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6522                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6523 echo "configure:6524: checking for pthread_create in default libraries" >&5
6524 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6525   echo $ac_n "(cached) $ac_c" 1>&6
6526 else
6527   
6528                 if test "$cross_compiling" = yes; then
6529   cat > conftest.$ac_ext <<EOF
6530 #line 6531 "configure"
6531 #include "confdefs.h"
6532 /* pthread test headers */
6533 #include <pthread.h>
6534 #ifndef NULL
6535 #define NULL (void*)0
6536 #endif
6537
6538 static void *task(p)
6539         void *p;
6540 {
6541         return (void *) (p == NULL);
6542 }
6543
6544 int main() {
6545
6546         /* pthread test function */
6547         pthread_t t;
6548         int status;
6549
6550         /* make sure pthread_create() isn't just a stub */
6551 #if HAVE_PTHREADS_D4
6552         status = pthread_create(&t, pthread_attr_default, task, NULL);
6553 #else
6554         status = pthread_create(&t, NULL, task, NULL);
6555 #endif
6556
6557         if( status ) exit( status );
6558
6559         /* make sure pthread_detach() isn't just a stub */
6560 #if HAVE_PTHREADS_D4
6561         status = pthread_detach( &t );
6562 #else
6563         status = pthread_detach( t );
6564 #endif
6565
6566 #ifdef HAVE_LINUX_THREADS
6567         pthread_kill_other_threads_np();
6568 #endif
6569
6570         exit( status );
6571
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575   rm -rf conftest*
6576   ol_cv_pthread_create=yes
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   ol_cv_pthread_create=no
6582 fi
6583 rm -f conftest*
6584 else
6585   cat > conftest.$ac_ext <<EOF
6586 #line 6587 "configure"
6587 #include "confdefs.h"
6588 /* pthread test headers */
6589 #include <pthread.h>
6590 #ifndef NULL
6591 #define NULL (void*)0
6592 #endif
6593
6594 static void *task(p)
6595         void *p;
6596 {
6597         return (void *) (p == NULL);
6598 }
6599
6600
6601 int main(argc, argv)
6602         int argc;
6603         char **argv;
6604 {
6605
6606         /* pthread test function */
6607         pthread_t t;
6608         int status;
6609
6610         /* make sure pthread_create() isn't just a stub */
6611 #if HAVE_PTHREADS_D4
6612         status = pthread_create(&t, pthread_attr_default, task, NULL);
6613 #else
6614         status = pthread_create(&t, NULL, task, NULL);
6615 #endif
6616
6617         if( status ) exit( status );
6618
6619         /* make sure pthread_detach() isn't just a stub */
6620 #if HAVE_PTHREADS_D4
6621         status = pthread_detach( &t );
6622 #else
6623         status = pthread_detach( t );
6624 #endif
6625
6626 #ifdef HAVE_LINUX_THREADS
6627         pthread_kill_other_threads_np();
6628 #endif
6629
6630         exit( status );
6631
6632 }
6633
6634 EOF
6635 if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6636 then
6637   ol_cv_pthread_create=yes
6638 else
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641   rm -fr conftest*
6642   ol_cv_pthread_create=no
6643 fi
6644 rm -fr conftest*
6645 fi
6646
6647 fi
6648
6649 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6650
6651                 if test $ol_cv_pthread_create != no ; then
6652                         ol_link_threads=posix
6653                         ol_link_pthreads=""
6654                 fi
6655                 
6656                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6657 if test "$ol_link_threads" = no ; then
6658         # try -kthread
6659         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6660 echo "configure:6661: checking for pthread link with -kthread" >&5
6661 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6662   echo $ac_n "(cached) $ac_c" 1>&6
6663 else
6664   
6665                 # save the flags
6666                 ol_LIBS="$LIBS"
6667                 LIBS="-kthread $LIBS"
6668
6669                 if test "$cross_compiling" = yes; then
6670   cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 /* pthread test headers */
6674 #include <pthread.h>
6675 #ifndef NULL
6676 #define NULL (void*)0
6677 #endif
6678
6679 static void *task(p)
6680         void *p;
6681 {
6682         return (void *) (p == NULL);
6683 }
6684
6685 int main() {
6686
6687         /* pthread test function */
6688         pthread_t t;
6689         int status;
6690
6691         /* make sure pthread_create() isn't just a stub */
6692 #if HAVE_PTHREADS_D4
6693         status = pthread_create(&t, pthread_attr_default, task, NULL);
6694 #else
6695         status = pthread_create(&t, NULL, task, NULL);
6696 #endif
6697
6698         if( status ) exit( status );
6699
6700         /* make sure pthread_detach() isn't just a stub */
6701 #if HAVE_PTHREADS_D4
6702         status = pthread_detach( &t );
6703 #else
6704         status = pthread_detach( t );
6705 #endif
6706
6707 #ifdef HAVE_LINUX_THREADS
6708         pthread_kill_other_threads_np();
6709 #endif
6710
6711         exit( status );
6712
6713 ; return 0; }
6714 EOF
6715 if { (eval echo configure:6716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6716   rm -rf conftest*
6717   ol_cv_pthread_kthread=yes
6718 else
6719   echo "configure: failed program was:" >&5
6720   cat conftest.$ac_ext >&5
6721   rm -rf conftest*
6722   ol_cv_pthread_kthread=no
6723 fi
6724 rm -f conftest*
6725 else
6726   cat > conftest.$ac_ext <<EOF
6727 #line 6728 "configure"
6728 #include "confdefs.h"
6729 /* pthread test headers */
6730 #include <pthread.h>
6731 #ifndef NULL
6732 #define NULL (void*)0
6733 #endif
6734
6735 static void *task(p)
6736         void *p;
6737 {
6738         return (void *) (p == NULL);
6739 }
6740
6741
6742 int main(argc, argv)
6743         int argc;
6744         char **argv;
6745 {
6746
6747         /* pthread test function */
6748         pthread_t t;
6749         int status;
6750
6751         /* make sure pthread_create() isn't just a stub */
6752 #if HAVE_PTHREADS_D4
6753         status = pthread_create(&t, pthread_attr_default, task, NULL);
6754 #else
6755         status = pthread_create(&t, NULL, task, NULL);
6756 #endif
6757
6758         if( status ) exit( status );
6759
6760         /* make sure pthread_detach() isn't just a stub */
6761 #if HAVE_PTHREADS_D4
6762         status = pthread_detach( &t );
6763 #else
6764         status = pthread_detach( t );
6765 #endif
6766
6767 #ifdef HAVE_LINUX_THREADS
6768         pthread_kill_other_threads_np();
6769 #endif
6770
6771         exit( status );
6772
6773 }
6774
6775 EOF
6776 if { (eval echo configure:6777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6777 then
6778   ol_cv_pthread_kthread=yes
6779 else
6780   echo "configure: failed program was:" >&5
6781   cat conftest.$ac_ext >&5
6782   rm -fr conftest*
6783   ol_cv_pthread_kthread=no
6784 fi
6785 rm -fr conftest*
6786 fi
6787
6788
6789                 # restore the LIBS
6790                 LIBS="$ol_LIBS"
6791         
6792 fi
6793
6794 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6795
6796         if test $ol_cv_pthread_kthread = yes ; then
6797                 ol_link_pthreads="-kthread"
6798                 ol_link_threads=posix
6799         fi
6800 fi
6801
6802                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6803 if test "$ol_link_threads" = no ; then
6804         # try -pthread
6805         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6806 echo "configure:6807: checking for pthread link with -pthread" >&5
6807 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6808   echo $ac_n "(cached) $ac_c" 1>&6
6809 else
6810   
6811                 # save the flags
6812                 ol_LIBS="$LIBS"
6813                 LIBS="-pthread $LIBS"
6814
6815                 if test "$cross_compiling" = yes; then
6816   cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 /* pthread test headers */
6820 #include <pthread.h>
6821 #ifndef NULL
6822 #define NULL (void*)0
6823 #endif
6824
6825 static void *task(p)
6826         void *p;
6827 {
6828         return (void *) (p == NULL);
6829 }
6830
6831 int main() {
6832
6833         /* pthread test function */
6834         pthread_t t;
6835         int status;
6836
6837         /* make sure pthread_create() isn't just a stub */
6838 #if HAVE_PTHREADS_D4
6839         status = pthread_create(&t, pthread_attr_default, task, NULL);
6840 #else
6841         status = pthread_create(&t, NULL, task, NULL);
6842 #endif
6843
6844         if( status ) exit( status );
6845
6846         /* make sure pthread_detach() isn't just a stub */
6847 #if HAVE_PTHREADS_D4
6848         status = pthread_detach( &t );
6849 #else
6850         status = pthread_detach( t );
6851 #endif
6852
6853 #ifdef HAVE_LINUX_THREADS
6854         pthread_kill_other_threads_np();
6855 #endif
6856
6857         exit( status );
6858
6859 ; return 0; }
6860 EOF
6861 if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6862   rm -rf conftest*
6863   ol_cv_pthread_pthread=yes
6864 else
6865   echo "configure: failed program was:" >&5
6866   cat conftest.$ac_ext >&5
6867   rm -rf conftest*
6868   ol_cv_pthread_pthread=no
6869 fi
6870 rm -f conftest*
6871 else
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 /* pthread test headers */
6876 #include <pthread.h>
6877 #ifndef NULL
6878 #define NULL (void*)0
6879 #endif
6880
6881 static void *task(p)
6882         void *p;
6883 {
6884         return (void *) (p == NULL);
6885 }
6886
6887
6888 int main(argc, argv)
6889         int argc;
6890         char **argv;
6891 {
6892
6893         /* pthread test function */
6894         pthread_t t;
6895         int status;
6896
6897         /* make sure pthread_create() isn't just a stub */
6898 #if HAVE_PTHREADS_D4
6899         status = pthread_create(&t, pthread_attr_default, task, NULL);
6900 #else
6901         status = pthread_create(&t, NULL, task, NULL);
6902 #endif
6903
6904         if( status ) exit( status );
6905
6906         /* make sure pthread_detach() isn't just a stub */
6907 #if HAVE_PTHREADS_D4
6908         status = pthread_detach( &t );
6909 #else
6910         status = pthread_detach( t );
6911 #endif
6912
6913 #ifdef HAVE_LINUX_THREADS
6914         pthread_kill_other_threads_np();
6915 #endif
6916
6917         exit( status );
6918
6919 }
6920
6921 EOF
6922 if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6923 then
6924   ol_cv_pthread_pthread=yes
6925 else
6926   echo "configure: failed program was:" >&5
6927   cat conftest.$ac_ext >&5
6928   rm -fr conftest*
6929   ol_cv_pthread_pthread=no
6930 fi
6931 rm -fr conftest*
6932 fi
6933
6934
6935                 # restore the LIBS
6936                 LIBS="$ol_LIBS"
6937         
6938 fi
6939
6940 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6941
6942         if test $ol_cv_pthread_pthread = yes ; then
6943                 ol_link_pthreads="-pthread"
6944                 ol_link_threads=posix
6945         fi
6946 fi
6947
6948                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6949 if test "$ol_link_threads" = no ; then
6950         # try -pthreads
6951         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6952 echo "configure:6953: checking for pthread link with -pthreads" >&5
6953 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956   
6957                 # save the flags
6958                 ol_LIBS="$LIBS"
6959                 LIBS="-pthreads $LIBS"
6960
6961                 if test "$cross_compiling" = yes; then
6962   cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965 /* pthread test headers */
6966 #include <pthread.h>
6967 #ifndef NULL
6968 #define NULL (void*)0
6969 #endif
6970
6971 static void *task(p)
6972         void *p;
6973 {
6974         return (void *) (p == NULL);
6975 }
6976
6977 int main() {
6978
6979         /* pthread test function */
6980         pthread_t t;
6981         int status;
6982
6983         /* make sure pthread_create() isn't just a stub */
6984 #if HAVE_PTHREADS_D4
6985         status = pthread_create(&t, pthread_attr_default, task, NULL);
6986 #else
6987         status = pthread_create(&t, NULL, task, NULL);
6988 #endif
6989
6990         if( status ) exit( status );
6991
6992         /* make sure pthread_detach() isn't just a stub */
6993 #if HAVE_PTHREADS_D4
6994         status = pthread_detach( &t );
6995 #else
6996         status = pthread_detach( t );
6997 #endif
6998
6999 #ifdef HAVE_LINUX_THREADS
7000         pthread_kill_other_threads_np();
7001 #endif
7002
7003         exit( status );
7004
7005 ; return 0; }
7006 EOF
7007 if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7008   rm -rf conftest*
7009   ol_cv_pthread_pthreads=yes
7010 else
7011   echo "configure: failed program was:" >&5
7012   cat conftest.$ac_ext >&5
7013   rm -rf conftest*
7014   ol_cv_pthread_pthreads=no
7015 fi
7016 rm -f conftest*
7017 else
7018   cat > conftest.$ac_ext <<EOF
7019 #line 7020 "configure"
7020 #include "confdefs.h"
7021 /* pthread test headers */
7022 #include <pthread.h>
7023 #ifndef NULL
7024 #define NULL (void*)0
7025 #endif
7026
7027 static void *task(p)
7028         void *p;
7029 {
7030         return (void *) (p == NULL);
7031 }
7032
7033
7034 int main(argc, argv)
7035         int argc;
7036         char **argv;
7037 {
7038
7039         /* pthread test function */
7040         pthread_t t;
7041         int status;
7042
7043         /* make sure pthread_create() isn't just a stub */
7044 #if HAVE_PTHREADS_D4
7045         status = pthread_create(&t, pthread_attr_default, task, NULL);
7046 #else
7047         status = pthread_create(&t, NULL, task, NULL);
7048 #endif
7049
7050         if( status ) exit( status );
7051
7052         /* make sure pthread_detach() isn't just a stub */
7053 #if HAVE_PTHREADS_D4
7054         status = pthread_detach( &t );
7055 #else
7056         status = pthread_detach( t );
7057 #endif
7058
7059 #ifdef HAVE_LINUX_THREADS
7060         pthread_kill_other_threads_np();
7061 #endif
7062
7063         exit( status );
7064
7065 }
7066
7067 EOF
7068 if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7069 then
7070   ol_cv_pthread_pthreads=yes
7071 else
7072   echo "configure: failed program was:" >&5
7073   cat conftest.$ac_ext >&5
7074   rm -fr conftest*
7075   ol_cv_pthread_pthreads=no
7076 fi
7077 rm -fr conftest*
7078 fi
7079
7080
7081                 # restore the LIBS
7082                 LIBS="$ol_LIBS"
7083         
7084 fi
7085
7086 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7087
7088         if test $ol_cv_pthread_pthreads = yes ; then
7089                 ol_link_pthreads="-pthreads"
7090                 ol_link_threads=posix
7091         fi
7092 fi
7093
7094                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7095 if test "$ol_link_threads" = no ; then
7096         # try -mthreads
7097         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7098 echo "configure:7099: checking for pthread link with -mthreads" >&5
7099 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7100   echo $ac_n "(cached) $ac_c" 1>&6
7101 else
7102   
7103                 # save the flags
7104                 ol_LIBS="$LIBS"
7105                 LIBS="-mthreads $LIBS"
7106
7107                 if test "$cross_compiling" = yes; then
7108   cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111 /* pthread test headers */
7112 #include <pthread.h>
7113 #ifndef NULL
7114 #define NULL (void*)0
7115 #endif
7116
7117 static void *task(p)
7118         void *p;
7119 {
7120         return (void *) (p == NULL);
7121 }
7122
7123 int main() {
7124
7125         /* pthread test function */
7126         pthread_t t;
7127         int status;
7128
7129         /* make sure pthread_create() isn't just a stub */
7130 #if HAVE_PTHREADS_D4
7131         status = pthread_create(&t, pthread_attr_default, task, NULL);
7132 #else
7133         status = pthread_create(&t, NULL, task, NULL);
7134 #endif
7135
7136         if( status ) exit( status );
7137
7138         /* make sure pthread_detach() isn't just a stub */
7139 #if HAVE_PTHREADS_D4
7140         status = pthread_detach( &t );
7141 #else
7142         status = pthread_detach( t );
7143 #endif
7144
7145 #ifdef HAVE_LINUX_THREADS
7146         pthread_kill_other_threads_np();
7147 #endif
7148
7149         exit( status );
7150
7151 ; return 0; }
7152 EOF
7153 if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7154   rm -rf conftest*
7155   ol_cv_pthread_mthreads=yes
7156 else
7157   echo "configure: failed program was:" >&5
7158   cat conftest.$ac_ext >&5
7159   rm -rf conftest*
7160   ol_cv_pthread_mthreads=no
7161 fi
7162 rm -f conftest*
7163 else
7164   cat > conftest.$ac_ext <<EOF
7165 #line 7166 "configure"
7166 #include "confdefs.h"
7167 /* pthread test headers */
7168 #include <pthread.h>
7169 #ifndef NULL
7170 #define NULL (void*)0
7171 #endif
7172
7173 static void *task(p)
7174         void *p;
7175 {
7176         return (void *) (p == NULL);
7177 }
7178
7179
7180 int main(argc, argv)
7181         int argc;
7182         char **argv;
7183 {
7184
7185         /* pthread test function */
7186         pthread_t t;
7187         int status;
7188
7189         /* make sure pthread_create() isn't just a stub */
7190 #if HAVE_PTHREADS_D4
7191         status = pthread_create(&t, pthread_attr_default, task, NULL);
7192 #else
7193         status = pthread_create(&t, NULL, task, NULL);
7194 #endif
7195
7196         if( status ) exit( status );
7197
7198         /* make sure pthread_detach() isn't just a stub */
7199 #if HAVE_PTHREADS_D4
7200         status = pthread_detach( &t );
7201 #else
7202         status = pthread_detach( t );
7203 #endif
7204
7205 #ifdef HAVE_LINUX_THREADS
7206         pthread_kill_other_threads_np();
7207 #endif
7208
7209         exit( status );
7210
7211 }
7212
7213 EOF
7214 if { (eval echo configure:7215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7215 then
7216   ol_cv_pthread_mthreads=yes
7217 else
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -fr conftest*
7221   ol_cv_pthread_mthreads=no
7222 fi
7223 rm -fr conftest*
7224 fi
7225
7226
7227                 # restore the LIBS
7228                 LIBS="$ol_LIBS"
7229         
7230 fi
7231
7232 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7233
7234         if test $ol_cv_pthread_mthreads = yes ; then
7235                 ol_link_pthreads="-mthreads"
7236                 ol_link_threads=posix
7237         fi
7238 fi
7239
7240                 # Pthread try link: -thread (ol_cv_pthread_thread)
7241 if test "$ol_link_threads" = no ; then
7242         # try -thread
7243         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7244 echo "configure:7245: checking for pthread link with -thread" >&5
7245 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7246   echo $ac_n "(cached) $ac_c" 1>&6
7247 else
7248   
7249                 # save the flags
7250                 ol_LIBS="$LIBS"
7251                 LIBS="-thread $LIBS"
7252
7253                 if test "$cross_compiling" = yes; then
7254   cat > conftest.$ac_ext <<EOF
7255 #line 7256 "configure"
7256 #include "confdefs.h"
7257 /* pthread test headers */
7258 #include <pthread.h>
7259 #ifndef NULL
7260 #define NULL (void*)0
7261 #endif
7262
7263 static void *task(p)
7264         void *p;
7265 {
7266         return (void *) (p == NULL);
7267 }
7268
7269 int main() {
7270
7271         /* pthread test function */
7272         pthread_t t;
7273         int status;
7274
7275         /* make sure pthread_create() isn't just a stub */
7276 #if HAVE_PTHREADS_D4
7277         status = pthread_create(&t, pthread_attr_default, task, NULL);
7278 #else
7279         status = pthread_create(&t, NULL, task, NULL);
7280 #endif
7281
7282         if( status ) exit( status );
7283
7284         /* make sure pthread_detach() isn't just a stub */
7285 #if HAVE_PTHREADS_D4
7286         status = pthread_detach( &t );
7287 #else
7288         status = pthread_detach( t );
7289 #endif
7290
7291 #ifdef HAVE_LINUX_THREADS
7292         pthread_kill_other_threads_np();
7293 #endif
7294
7295         exit( status );
7296
7297 ; return 0; }
7298 EOF
7299 if { (eval echo configure:7300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7300   rm -rf conftest*
7301   ol_cv_pthread_thread=yes
7302 else
7303   echo "configure: failed program was:" >&5
7304   cat conftest.$ac_ext >&5
7305   rm -rf conftest*
7306   ol_cv_pthread_thread=no
7307 fi
7308 rm -f conftest*
7309 else
7310   cat > conftest.$ac_ext <<EOF
7311 #line 7312 "configure"
7312 #include "confdefs.h"
7313 /* pthread test headers */
7314 #include <pthread.h>
7315 #ifndef NULL
7316 #define NULL (void*)0
7317 #endif
7318
7319 static void *task(p)
7320         void *p;
7321 {
7322         return (void *) (p == NULL);
7323 }
7324
7325
7326 int main(argc, argv)
7327         int argc;
7328         char **argv;
7329 {
7330
7331         /* pthread test function */
7332         pthread_t t;
7333         int status;
7334
7335         /* make sure pthread_create() isn't just a stub */
7336 #if HAVE_PTHREADS_D4
7337         status = pthread_create(&t, pthread_attr_default, task, NULL);
7338 #else
7339         status = pthread_create(&t, NULL, task, NULL);
7340 #endif
7341
7342         if( status ) exit( status );
7343
7344         /* make sure pthread_detach() isn't just a stub */
7345 #if HAVE_PTHREADS_D4
7346         status = pthread_detach( &t );
7347 #else
7348         status = pthread_detach( t );
7349 #endif
7350
7351 #ifdef HAVE_LINUX_THREADS
7352         pthread_kill_other_threads_np();
7353 #endif
7354
7355         exit( status );
7356
7357 }
7358
7359 EOF
7360 if { (eval echo configure:7361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7361 then
7362   ol_cv_pthread_thread=yes
7363 else
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -fr conftest*
7367   ol_cv_pthread_thread=no
7368 fi
7369 rm -fr conftest*
7370 fi
7371
7372
7373                 # restore the LIBS
7374                 LIBS="$ol_LIBS"
7375         
7376 fi
7377
7378 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7379
7380         if test $ol_cv_pthread_thread = yes ; then
7381                 ol_link_pthreads="-thread"
7382                 ol_link_threads=posix
7383         fi
7384 fi
7385
7386
7387                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7388 if test "$ol_link_threads" = no ; then
7389         # try -lpthread -lmach -lexc -lc_r
7390         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7391 echo "configure:7392: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7392 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7393   echo $ac_n "(cached) $ac_c" 1>&6
7394 else
7395   
7396                 # save the flags
7397                 ol_LIBS="$LIBS"
7398                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7399
7400                 if test "$cross_compiling" = yes; then
7401   cat > conftest.$ac_ext <<EOF
7402 #line 7403 "configure"
7403 #include "confdefs.h"
7404 /* pthread test headers */
7405 #include <pthread.h>
7406 #ifndef NULL
7407 #define NULL (void*)0
7408 #endif
7409
7410 static void *task(p)
7411         void *p;
7412 {
7413         return (void *) (p == NULL);
7414 }
7415
7416 int main() {
7417
7418         /* pthread test function */
7419         pthread_t t;
7420         int status;
7421
7422         /* make sure pthread_create() isn't just a stub */
7423 #if HAVE_PTHREADS_D4
7424         status = pthread_create(&t, pthread_attr_default, task, NULL);
7425 #else
7426         status = pthread_create(&t, NULL, task, NULL);
7427 #endif
7428
7429         if( status ) exit( status );
7430
7431         /* make sure pthread_detach() isn't just a stub */
7432 #if HAVE_PTHREADS_D4
7433         status = pthread_detach( &t );
7434 #else
7435         status = pthread_detach( t );
7436 #endif
7437
7438 #ifdef HAVE_LINUX_THREADS
7439         pthread_kill_other_threads_np();
7440 #endif
7441
7442         exit( status );
7443
7444 ; return 0; }
7445 EOF
7446 if { (eval echo configure:7447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7447   rm -rf conftest*
7448   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7449 else
7450   echo "configure: failed program was:" >&5
7451   cat conftest.$ac_ext >&5
7452   rm -rf conftest*
7453   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7454 fi
7455 rm -f conftest*
7456 else
7457   cat > conftest.$ac_ext <<EOF
7458 #line 7459 "configure"
7459 #include "confdefs.h"
7460 /* pthread test headers */
7461 #include <pthread.h>
7462 #ifndef NULL
7463 #define NULL (void*)0
7464 #endif
7465
7466 static void *task(p)
7467         void *p;
7468 {
7469         return (void *) (p == NULL);
7470 }
7471
7472
7473 int main(argc, argv)
7474         int argc;
7475         char **argv;
7476 {
7477
7478         /* pthread test function */
7479         pthread_t t;
7480         int status;
7481
7482         /* make sure pthread_create() isn't just a stub */
7483 #if HAVE_PTHREADS_D4
7484         status = pthread_create(&t, pthread_attr_default, task, NULL);
7485 #else
7486         status = pthread_create(&t, NULL, task, NULL);
7487 #endif
7488
7489         if( status ) exit( status );
7490
7491         /* make sure pthread_detach() isn't just a stub */
7492 #if HAVE_PTHREADS_D4
7493         status = pthread_detach( &t );
7494 #else
7495         status = pthread_detach( t );
7496 #endif
7497
7498 #ifdef HAVE_LINUX_THREADS
7499         pthread_kill_other_threads_np();
7500 #endif
7501
7502         exit( status );
7503
7504 }
7505
7506 EOF
7507 if { (eval echo configure:7508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7508 then
7509   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7510 else
7511   echo "configure: failed program was:" >&5
7512   cat conftest.$ac_ext >&5
7513   rm -fr conftest*
7514   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7515 fi
7516 rm -fr conftest*
7517 fi
7518
7519
7520                 # restore the LIBS
7521                 LIBS="$ol_LIBS"
7522         
7523 fi
7524
7525 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7526
7527         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7528                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7529                 ol_link_threads=posix
7530         fi
7531 fi
7532
7533                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7534 if test "$ol_link_threads" = no ; then
7535         # try -lpthread -lmach -lexc
7536         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7537 echo "configure:7538: checking for pthread link with -lpthread -lmach -lexc" >&5
7538 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7539   echo $ac_n "(cached) $ac_c" 1>&6
7540 else
7541   
7542                 # save the flags
7543                 ol_LIBS="$LIBS"
7544                 LIBS="-lpthread -lmach -lexc $LIBS"
7545
7546                 if test "$cross_compiling" = yes; then
7547   cat > conftest.$ac_ext <<EOF
7548 #line 7549 "configure"
7549 #include "confdefs.h"
7550 /* pthread test headers */
7551 #include <pthread.h>
7552 #ifndef NULL
7553 #define NULL (void*)0
7554 #endif
7555
7556 static void *task(p)
7557         void *p;
7558 {
7559         return (void *) (p == NULL);
7560 }
7561
7562 int main() {
7563
7564         /* pthread test function */
7565         pthread_t t;
7566         int status;
7567
7568         /* make sure pthread_create() isn't just a stub */
7569 #if HAVE_PTHREADS_D4
7570         status = pthread_create(&t, pthread_attr_default, task, NULL);
7571 #else
7572         status = pthread_create(&t, NULL, task, NULL);
7573 #endif
7574
7575         if( status ) exit( status );
7576
7577         /* make sure pthread_detach() isn't just a stub */
7578 #if HAVE_PTHREADS_D4
7579         status = pthread_detach( &t );
7580 #else
7581         status = pthread_detach( t );
7582 #endif
7583
7584 #ifdef HAVE_LINUX_THREADS
7585         pthread_kill_other_threads_np();
7586 #endif
7587
7588         exit( status );
7589
7590 ; return 0; }
7591 EOF
7592 if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7593   rm -rf conftest*
7594   ol_cv_pthread_lpthread_lmach_lexc=yes
7595 else
7596   echo "configure: failed program was:" >&5
7597   cat conftest.$ac_ext >&5
7598   rm -rf conftest*
7599   ol_cv_pthread_lpthread_lmach_lexc=no
7600 fi
7601 rm -f conftest*
7602 else
7603   cat > conftest.$ac_ext <<EOF
7604 #line 7605 "configure"
7605 #include "confdefs.h"
7606 /* pthread test headers */
7607 #include <pthread.h>
7608 #ifndef NULL
7609 #define NULL (void*)0
7610 #endif
7611
7612 static void *task(p)
7613         void *p;
7614 {
7615         return (void *) (p == NULL);
7616 }
7617
7618
7619 int main(argc, argv)
7620         int argc;
7621         char **argv;
7622 {
7623
7624         /* pthread test function */
7625         pthread_t t;
7626         int status;
7627
7628         /* make sure pthread_create() isn't just a stub */
7629 #if HAVE_PTHREADS_D4
7630         status = pthread_create(&t, pthread_attr_default, task, NULL);
7631 #else
7632         status = pthread_create(&t, NULL, task, NULL);
7633 #endif
7634
7635         if( status ) exit( status );
7636
7637         /* make sure pthread_detach() isn't just a stub */
7638 #if HAVE_PTHREADS_D4
7639         status = pthread_detach( &t );
7640 #else
7641         status = pthread_detach( t );
7642 #endif
7643
7644 #ifdef HAVE_LINUX_THREADS
7645         pthread_kill_other_threads_np();
7646 #endif
7647
7648         exit( status );
7649
7650 }
7651
7652 EOF
7653 if { (eval echo configure:7654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7654 then
7655   ol_cv_pthread_lpthread_lmach_lexc=yes
7656 else
7657   echo "configure: failed program was:" >&5
7658   cat conftest.$ac_ext >&5
7659   rm -fr conftest*
7660   ol_cv_pthread_lpthread_lmach_lexc=no
7661 fi
7662 rm -fr conftest*
7663 fi
7664
7665
7666                 # restore the LIBS
7667                 LIBS="$ol_LIBS"
7668         
7669 fi
7670
7671 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7672
7673         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7674                 ol_link_pthreads="-lpthread -lmach -lexc"
7675                 ol_link_threads=posix
7676         fi
7677 fi
7678
7679
7680                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7681 if test "$ol_link_threads" = no ; then
7682         # try -lpthread -Wl,-woff,85
7683         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7684 echo "configure:7685: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7685 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7686   echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688   
7689                 # save the flags
7690                 ol_LIBS="$LIBS"
7691                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7692
7693                 if test "$cross_compiling" = yes; then
7694   cat > conftest.$ac_ext <<EOF
7695 #line 7696 "configure"
7696 #include "confdefs.h"
7697 /* pthread test headers */
7698 #include <pthread.h>
7699 #ifndef NULL
7700 #define NULL (void*)0
7701 #endif
7702
7703 static void *task(p)
7704         void *p;
7705 {
7706         return (void *) (p == NULL);
7707 }
7708
7709 int main() {
7710
7711         /* pthread test function */
7712         pthread_t t;
7713         int status;
7714
7715         /* make sure pthread_create() isn't just a stub */
7716 #if HAVE_PTHREADS_D4
7717         status = pthread_create(&t, pthread_attr_default, task, NULL);
7718 #else
7719         status = pthread_create(&t, NULL, task, NULL);
7720 #endif
7721
7722         if( status ) exit( status );
7723
7724         /* make sure pthread_detach() isn't just a stub */
7725 #if HAVE_PTHREADS_D4
7726         status = pthread_detach( &t );
7727 #else
7728         status = pthread_detach( t );
7729 #endif
7730
7731 #ifdef HAVE_LINUX_THREADS
7732         pthread_kill_other_threads_np();
7733 #endif
7734
7735         exit( status );
7736
7737 ; return 0; }
7738 EOF
7739 if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7740   rm -rf conftest*
7741   ol_cv_pthread_lib_lpthread_woff=yes
7742 else
7743   echo "configure: failed program was:" >&5
7744   cat conftest.$ac_ext >&5
7745   rm -rf conftest*
7746   ol_cv_pthread_lib_lpthread_woff=no
7747 fi
7748 rm -f conftest*
7749 else
7750   cat > conftest.$ac_ext <<EOF
7751 #line 7752 "configure"
7752 #include "confdefs.h"
7753 /* pthread test headers */
7754 #include <pthread.h>
7755 #ifndef NULL
7756 #define NULL (void*)0
7757 #endif
7758
7759 static void *task(p)
7760         void *p;
7761 {
7762         return (void *) (p == NULL);
7763 }
7764
7765
7766 int main(argc, argv)
7767         int argc;
7768         char **argv;
7769 {
7770
7771         /* pthread test function */
7772         pthread_t t;
7773         int status;
7774
7775         /* make sure pthread_create() isn't just a stub */
7776 #if HAVE_PTHREADS_D4
7777         status = pthread_create(&t, pthread_attr_default, task, NULL);
7778 #else
7779         status = pthread_create(&t, NULL, task, NULL);
7780 #endif
7781
7782         if( status ) exit( status );
7783
7784         /* make sure pthread_detach() isn't just a stub */
7785 #if HAVE_PTHREADS_D4
7786         status = pthread_detach( &t );
7787 #else
7788         status = pthread_detach( t );
7789 #endif
7790
7791 #ifdef HAVE_LINUX_THREADS
7792         pthread_kill_other_threads_np();
7793 #endif
7794
7795         exit( status );
7796
7797 }
7798
7799 EOF
7800 if { (eval echo configure:7801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7801 then
7802   ol_cv_pthread_lib_lpthread_woff=yes
7803 else
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -fr conftest*
7807   ol_cv_pthread_lib_lpthread_woff=no
7808 fi
7809 rm -fr conftest*
7810 fi
7811
7812
7813                 # restore the LIBS
7814                 LIBS="$ol_LIBS"
7815         
7816 fi
7817
7818 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7819
7820         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7821                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7822                 ol_link_threads=posix
7823         fi
7824 fi
7825
7826
7827                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7828 if test "$ol_link_threads" = no ; then
7829         # try -lpthread
7830         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7831 echo "configure:7832: checking for pthread link with -lpthread" >&5
7832 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7833   echo $ac_n "(cached) $ac_c" 1>&6
7834 else
7835   
7836                 # save the flags
7837                 ol_LIBS="$LIBS"
7838                 LIBS="-lpthread $LIBS"
7839
7840                 if test "$cross_compiling" = yes; then
7841   cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844 /* pthread test headers */
7845 #include <pthread.h>
7846 #ifndef NULL
7847 #define NULL (void*)0
7848 #endif
7849
7850 static void *task(p)
7851         void *p;
7852 {
7853         return (void *) (p == NULL);
7854 }
7855
7856 int main() {
7857
7858         /* pthread test function */
7859         pthread_t t;
7860         int status;
7861
7862         /* make sure pthread_create() isn't just a stub */
7863 #if HAVE_PTHREADS_D4
7864         status = pthread_create(&t, pthread_attr_default, task, NULL);
7865 #else
7866         status = pthread_create(&t, NULL, task, NULL);
7867 #endif
7868
7869         if( status ) exit( status );
7870
7871         /* make sure pthread_detach() isn't just a stub */
7872 #if HAVE_PTHREADS_D4
7873         status = pthread_detach( &t );
7874 #else
7875         status = pthread_detach( t );
7876 #endif
7877
7878 #ifdef HAVE_LINUX_THREADS
7879         pthread_kill_other_threads_np();
7880 #endif
7881
7882         exit( status );
7883
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7887   rm -rf conftest*
7888   ol_cv_pthread_lpthread=yes
7889 else
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   ol_cv_pthread_lpthread=no
7894 fi
7895 rm -f conftest*
7896 else
7897   cat > conftest.$ac_ext <<EOF
7898 #line 7899 "configure"
7899 #include "confdefs.h"
7900 /* pthread test headers */
7901 #include <pthread.h>
7902 #ifndef NULL
7903 #define NULL (void*)0
7904 #endif
7905
7906 static void *task(p)
7907         void *p;
7908 {
7909         return (void *) (p == NULL);
7910 }
7911
7912
7913 int main(argc, argv)
7914         int argc;
7915         char **argv;
7916 {
7917
7918         /* pthread test function */
7919         pthread_t t;
7920         int status;
7921
7922         /* make sure pthread_create() isn't just a stub */
7923 #if HAVE_PTHREADS_D4
7924         status = pthread_create(&t, pthread_attr_default, task, NULL);
7925 #else
7926         status = pthread_create(&t, NULL, task, NULL);
7927 #endif
7928
7929         if( status ) exit( status );
7930
7931         /* make sure pthread_detach() isn't just a stub */
7932 #if HAVE_PTHREADS_D4
7933         status = pthread_detach( &t );
7934 #else
7935         status = pthread_detach( t );
7936 #endif
7937
7938 #ifdef HAVE_LINUX_THREADS
7939         pthread_kill_other_threads_np();
7940 #endif
7941
7942         exit( status );
7943
7944 }
7945
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7948 then
7949   ol_cv_pthread_lpthread=yes
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -fr conftest*
7954   ol_cv_pthread_lpthread=no
7955 fi
7956 rm -fr conftest*
7957 fi
7958
7959
7960                 # restore the LIBS
7961                 LIBS="$ol_LIBS"
7962         
7963 fi
7964
7965 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7966
7967         if test $ol_cv_pthread_lpthread = yes ; then
7968                 ol_link_pthreads="-lpthread"
7969                 ol_link_threads=posix
7970         fi
7971 fi
7972
7973                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7974 if test "$ol_link_threads" = no ; then
7975         # try -lc_r
7976         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7977 echo "configure:7978: checking for pthread link with -lc_r" >&5
7978 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7979   echo $ac_n "(cached) $ac_c" 1>&6
7980 else
7981   
7982                 # save the flags
7983                 ol_LIBS="$LIBS"
7984                 LIBS="-lc_r $LIBS"
7985
7986                 if test "$cross_compiling" = yes; then
7987   cat > conftest.$ac_ext <<EOF
7988 #line 7989 "configure"
7989 #include "confdefs.h"
7990 /* pthread test headers */
7991 #include <pthread.h>
7992 #ifndef NULL
7993 #define NULL (void*)0
7994 #endif
7995
7996 static void *task(p)
7997         void *p;
7998 {
7999         return (void *) (p == NULL);
8000 }
8001
8002 int main() {
8003
8004         /* pthread test function */
8005         pthread_t t;
8006         int status;
8007
8008         /* make sure pthread_create() isn't just a stub */
8009 #if HAVE_PTHREADS_D4
8010         status = pthread_create(&t, pthread_attr_default, task, NULL);
8011 #else
8012         status = pthread_create(&t, NULL, task, NULL);
8013 #endif
8014
8015         if( status ) exit( status );
8016
8017         /* make sure pthread_detach() isn't just a stub */
8018 #if HAVE_PTHREADS_D4
8019         status = pthread_detach( &t );
8020 #else
8021         status = pthread_detach( t );
8022 #endif
8023
8024 #ifdef HAVE_LINUX_THREADS
8025         pthread_kill_other_threads_np();
8026 #endif
8027
8028         exit( status );
8029
8030 ; return 0; }
8031 EOF
8032 if { (eval echo configure:8033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8033   rm -rf conftest*
8034   ol_cv_pthread_lc_r=yes
8035 else
8036   echo "configure: failed program was:" >&5
8037   cat conftest.$ac_ext >&5
8038   rm -rf conftest*
8039   ol_cv_pthread_lc_r=no
8040 fi
8041 rm -f conftest*
8042 else
8043   cat > conftest.$ac_ext <<EOF
8044 #line 8045 "configure"
8045 #include "confdefs.h"
8046 /* pthread test headers */
8047 #include <pthread.h>
8048 #ifndef NULL
8049 #define NULL (void*)0
8050 #endif
8051
8052 static void *task(p)
8053         void *p;
8054 {
8055         return (void *) (p == NULL);
8056 }
8057
8058
8059 int main(argc, argv)
8060         int argc;
8061         char **argv;
8062 {
8063
8064         /* pthread test function */
8065         pthread_t t;
8066         int status;
8067
8068         /* make sure pthread_create() isn't just a stub */
8069 #if HAVE_PTHREADS_D4
8070         status = pthread_create(&t, pthread_attr_default, task, NULL);
8071 #else
8072         status = pthread_create(&t, NULL, task, NULL);
8073 #endif
8074
8075         if( status ) exit( status );
8076
8077         /* make sure pthread_detach() isn't just a stub */
8078 #if HAVE_PTHREADS_D4
8079         status = pthread_detach( &t );
8080 #else
8081         status = pthread_detach( t );
8082 #endif
8083
8084 #ifdef HAVE_LINUX_THREADS
8085         pthread_kill_other_threads_np();
8086 #endif
8087
8088         exit( status );
8089
8090 }
8091
8092 EOF
8093 if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8094 then
8095   ol_cv_pthread_lc_r=yes
8096 else
8097   echo "configure: failed program was:" >&5
8098   cat conftest.$ac_ext >&5
8099   rm -fr conftest*
8100   ol_cv_pthread_lc_r=no
8101 fi
8102 rm -fr conftest*
8103 fi
8104
8105
8106                 # restore the LIBS
8107                 LIBS="$ol_LIBS"
8108         
8109 fi
8110
8111 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8112
8113         if test $ol_cv_pthread_lc_r = yes ; then
8114                 ol_link_pthreads="-lc_r"
8115                 ol_link_threads=posix
8116         fi
8117 fi
8118
8119
8120                 # Pthread try link: -threads (ol_cv_pthread_threads)
8121 if test "$ol_link_threads" = no ; then
8122         # try -threads
8123         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8124 echo "configure:8125: checking for pthread link with -threads" >&5
8125 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8126   echo $ac_n "(cached) $ac_c" 1>&6
8127 else
8128   
8129                 # save the flags
8130                 ol_LIBS="$LIBS"
8131                 LIBS="-threads $LIBS"
8132
8133                 if test "$cross_compiling" = yes; then
8134   cat > conftest.$ac_ext <<EOF
8135 #line 8136 "configure"
8136 #include "confdefs.h"
8137 /* pthread test headers */
8138 #include <pthread.h>
8139 #ifndef NULL
8140 #define NULL (void*)0
8141 #endif
8142
8143 static void *task(p)
8144         void *p;
8145 {
8146         return (void *) (p == NULL);
8147 }
8148
8149 int main() {
8150
8151         /* pthread test function */
8152         pthread_t t;
8153         int status;
8154
8155         /* make sure pthread_create() isn't just a stub */
8156 #if HAVE_PTHREADS_D4
8157         status = pthread_create(&t, pthread_attr_default, task, NULL);
8158 #else
8159         status = pthread_create(&t, NULL, task, NULL);
8160 #endif
8161
8162         if( status ) exit( status );
8163
8164         /* make sure pthread_detach() isn't just a stub */
8165 #if HAVE_PTHREADS_D4
8166         status = pthread_detach( &t );
8167 #else
8168         status = pthread_detach( t );
8169 #endif
8170
8171 #ifdef HAVE_LINUX_THREADS
8172         pthread_kill_other_threads_np();
8173 #endif
8174
8175         exit( status );
8176
8177 ; return 0; }
8178 EOF
8179 if { (eval echo configure:8180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8180   rm -rf conftest*
8181   ol_cv_pthread_threads=yes
8182 else
8183   echo "configure: failed program was:" >&5
8184   cat conftest.$ac_ext >&5
8185   rm -rf conftest*
8186   ol_cv_pthread_threads=no
8187 fi
8188 rm -f conftest*
8189 else
8190   cat > conftest.$ac_ext <<EOF
8191 #line 8192 "configure"
8192 #include "confdefs.h"
8193 /* pthread test headers */
8194 #include <pthread.h>
8195 #ifndef NULL
8196 #define NULL (void*)0
8197 #endif
8198
8199 static void *task(p)
8200         void *p;
8201 {
8202         return (void *) (p == NULL);
8203 }
8204
8205
8206 int main(argc, argv)
8207         int argc;
8208         char **argv;
8209 {
8210
8211         /* pthread test function */
8212         pthread_t t;
8213         int status;
8214
8215         /* make sure pthread_create() isn't just a stub */
8216 #if HAVE_PTHREADS_D4
8217         status = pthread_create(&t, pthread_attr_default, task, NULL);
8218 #else
8219         status = pthread_create(&t, NULL, task, NULL);
8220 #endif
8221
8222         if( status ) exit( status );
8223
8224         /* make sure pthread_detach() isn't just a stub */
8225 #if HAVE_PTHREADS_D4
8226         status = pthread_detach( &t );
8227 #else
8228         status = pthread_detach( t );
8229 #endif
8230
8231 #ifdef HAVE_LINUX_THREADS
8232         pthread_kill_other_threads_np();
8233 #endif
8234
8235         exit( status );
8236
8237 }
8238
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8241 then
8242   ol_cv_pthread_threads=yes
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -fr conftest*
8247   ol_cv_pthread_threads=no
8248 fi
8249 rm -fr conftest*
8250 fi
8251
8252
8253                 # restore the LIBS
8254                 LIBS="$ol_LIBS"
8255         
8256 fi
8257
8258 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8259
8260         if test $ol_cv_pthread_threads = yes ; then
8261                 ol_link_pthreads="-threads"
8262                 ol_link_threads=posix
8263         fi
8264 fi
8265
8266
8267                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8268 if test "$ol_link_threads" = no ; then
8269         # try -lpthreads -lmach -lexc -lc_r
8270         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8271 echo "configure:8272: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8272 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   
8276                 # save the flags
8277                 ol_LIBS="$LIBS"
8278                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8279
8280                 if test "$cross_compiling" = yes; then
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 /* pthread test headers */
8285 #include <pthread.h>
8286 #ifndef NULL
8287 #define NULL (void*)0
8288 #endif
8289
8290 static void *task(p)
8291         void *p;
8292 {
8293         return (void *) (p == NULL);
8294 }
8295
8296 int main() {
8297
8298         /* pthread test function */
8299         pthread_t t;
8300         int status;
8301
8302         /* make sure pthread_create() isn't just a stub */
8303 #if HAVE_PTHREADS_D4
8304         status = pthread_create(&t, pthread_attr_default, task, NULL);
8305 #else
8306         status = pthread_create(&t, NULL, task, NULL);
8307 #endif
8308
8309         if( status ) exit( status );
8310
8311         /* make sure pthread_detach() isn't just a stub */
8312 #if HAVE_PTHREADS_D4
8313         status = pthread_detach( &t );
8314 #else
8315         status = pthread_detach( t );
8316 #endif
8317
8318 #ifdef HAVE_LINUX_THREADS
8319         pthread_kill_other_threads_np();
8320 #endif
8321
8322         exit( status );
8323
8324 ; return 0; }
8325 EOF
8326 if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8327   rm -rf conftest*
8328   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8329 else
8330   echo "configure: failed program was:" >&5
8331   cat conftest.$ac_ext >&5
8332   rm -rf conftest*
8333   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8334 fi
8335 rm -f conftest*
8336 else
8337   cat > conftest.$ac_ext <<EOF
8338 #line 8339 "configure"
8339 #include "confdefs.h"
8340 /* pthread test headers */
8341 #include <pthread.h>
8342 #ifndef NULL
8343 #define NULL (void*)0
8344 #endif
8345
8346 static void *task(p)
8347         void *p;
8348 {
8349         return (void *) (p == NULL);
8350 }
8351
8352
8353 int main(argc, argv)
8354         int argc;
8355         char **argv;
8356 {
8357
8358         /* pthread test function */
8359         pthread_t t;
8360         int status;
8361
8362         /* make sure pthread_create() isn't just a stub */
8363 #if HAVE_PTHREADS_D4
8364         status = pthread_create(&t, pthread_attr_default, task, NULL);
8365 #else
8366         status = pthread_create(&t, NULL, task, NULL);
8367 #endif
8368
8369         if( status ) exit( status );
8370
8371         /* make sure pthread_detach() isn't just a stub */
8372 #if HAVE_PTHREADS_D4
8373         status = pthread_detach( &t );
8374 #else
8375         status = pthread_detach( t );
8376 #endif
8377
8378 #ifdef HAVE_LINUX_THREADS
8379         pthread_kill_other_threads_np();
8380 #endif
8381
8382         exit( status );
8383
8384 }
8385
8386 EOF
8387 if { (eval echo configure:8388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8388 then
8389   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8390 else
8391   echo "configure: failed program was:" >&5
8392   cat conftest.$ac_ext >&5
8393   rm -fr conftest*
8394   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8395 fi
8396 rm -fr conftest*
8397 fi
8398
8399
8400                 # restore the LIBS
8401                 LIBS="$ol_LIBS"
8402         
8403 fi
8404
8405 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8406
8407         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8408                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8409                 ol_link_threads=posix
8410         fi
8411 fi
8412
8413                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8414 if test "$ol_link_threads" = no ; then
8415         # try -lpthreads -lmach -lexc
8416         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8417 echo "configure:8418: checking for pthread link with -lpthreads -lmach -lexc" >&5
8418 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8419   echo $ac_n "(cached) $ac_c" 1>&6
8420 else
8421   
8422                 # save the flags
8423                 ol_LIBS="$LIBS"
8424                 LIBS="-lpthreads -lmach -lexc $LIBS"
8425
8426                 if test "$cross_compiling" = yes; then
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 /* pthread test headers */
8431 #include <pthread.h>
8432 #ifndef NULL
8433 #define NULL (void*)0
8434 #endif
8435
8436 static void *task(p)
8437         void *p;
8438 {
8439         return (void *) (p == NULL);
8440 }
8441
8442 int main() {
8443
8444         /* pthread test function */
8445         pthread_t t;
8446         int status;
8447
8448         /* make sure pthread_create() isn't just a stub */
8449 #if HAVE_PTHREADS_D4
8450         status = pthread_create(&t, pthread_attr_default, task, NULL);
8451 #else
8452         status = pthread_create(&t, NULL, task, NULL);
8453 #endif
8454
8455         if( status ) exit( status );
8456
8457         /* make sure pthread_detach() isn't just a stub */
8458 #if HAVE_PTHREADS_D4
8459         status = pthread_detach( &t );
8460 #else
8461         status = pthread_detach( t );
8462 #endif
8463
8464 #ifdef HAVE_LINUX_THREADS
8465         pthread_kill_other_threads_np();
8466 #endif
8467
8468         exit( status );
8469
8470 ; return 0; }
8471 EOF
8472 if { (eval echo configure:8473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8473   rm -rf conftest*
8474   ol_cv_pthread_lpthreads_lmach_lexc=yes
8475 else
8476   echo "configure: failed program was:" >&5
8477   cat conftest.$ac_ext >&5
8478   rm -rf conftest*
8479   ol_cv_pthread_lpthreads_lmach_lexc=no
8480 fi
8481 rm -f conftest*
8482 else
8483   cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 /* pthread test headers */
8487 #include <pthread.h>
8488 #ifndef NULL
8489 #define NULL (void*)0
8490 #endif
8491
8492 static void *task(p)
8493         void *p;
8494 {
8495         return (void *) (p == NULL);
8496 }
8497
8498
8499 int main(argc, argv)
8500         int argc;
8501         char **argv;
8502 {
8503
8504         /* pthread test function */
8505         pthread_t t;
8506         int status;
8507
8508         /* make sure pthread_create() isn't just a stub */
8509 #if HAVE_PTHREADS_D4
8510         status = pthread_create(&t, pthread_attr_default, task, NULL);
8511 #else
8512         status = pthread_create(&t, NULL, task, NULL);
8513 #endif
8514
8515         if( status ) exit( status );
8516
8517         /* make sure pthread_detach() isn't just a stub */
8518 #if HAVE_PTHREADS_D4
8519         status = pthread_detach( &t );
8520 #else
8521         status = pthread_detach( t );
8522 #endif
8523
8524 #ifdef HAVE_LINUX_THREADS
8525         pthread_kill_other_threads_np();
8526 #endif
8527
8528         exit( status );
8529
8530 }
8531
8532 EOF
8533 if { (eval echo configure:8534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8534 then
8535   ol_cv_pthread_lpthreads_lmach_lexc=yes
8536 else
8537   echo "configure: failed program was:" >&5
8538   cat conftest.$ac_ext >&5
8539   rm -fr conftest*
8540   ol_cv_pthread_lpthreads_lmach_lexc=no
8541 fi
8542 rm -fr conftest*
8543 fi
8544
8545
8546                 # restore the LIBS
8547                 LIBS="$ol_LIBS"
8548         
8549 fi
8550
8551 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8552
8553         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8554                 ol_link_pthreads="-lpthreads -lmach -lexc"
8555                 ol_link_threads=posix
8556         fi
8557 fi
8558
8559                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8560 if test "$ol_link_threads" = no ; then
8561         # try -lpthreads -lexc
8562         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8563 echo "configure:8564: checking for pthread link with -lpthreads -lexc" >&5
8564 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8565   echo $ac_n "(cached) $ac_c" 1>&6
8566 else
8567   
8568                 # save the flags
8569                 ol_LIBS="$LIBS"
8570                 LIBS="-lpthreads -lexc $LIBS"
8571
8572                 if test "$cross_compiling" = yes; then
8573   cat > conftest.$ac_ext <<EOF
8574 #line 8575 "configure"
8575 #include "confdefs.h"
8576 /* pthread test headers */
8577 #include <pthread.h>
8578 #ifndef NULL
8579 #define NULL (void*)0
8580 #endif
8581
8582 static void *task(p)
8583         void *p;
8584 {
8585         return (void *) (p == NULL);
8586 }
8587
8588 int main() {
8589
8590         /* pthread test function */
8591         pthread_t t;
8592         int status;
8593
8594         /* make sure pthread_create() isn't just a stub */
8595 #if HAVE_PTHREADS_D4
8596         status = pthread_create(&t, pthread_attr_default, task, NULL);
8597 #else
8598         status = pthread_create(&t, NULL, task, NULL);
8599 #endif
8600
8601         if( status ) exit( status );
8602
8603         /* make sure pthread_detach() isn't just a stub */
8604 #if HAVE_PTHREADS_D4
8605         status = pthread_detach( &t );
8606 #else
8607         status = pthread_detach( t );
8608 #endif
8609
8610 #ifdef HAVE_LINUX_THREADS
8611         pthread_kill_other_threads_np();
8612 #endif
8613
8614         exit( status );
8615
8616 ; return 0; }
8617 EOF
8618 if { (eval echo configure:8619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8619   rm -rf conftest*
8620   ol_cv_pthread_lpthreads_lexc=yes
8621 else
8622   echo "configure: failed program was:" >&5
8623   cat conftest.$ac_ext >&5
8624   rm -rf conftest*
8625   ol_cv_pthread_lpthreads_lexc=no
8626 fi
8627 rm -f conftest*
8628 else
8629   cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 /* pthread test headers */
8633 #include <pthread.h>
8634 #ifndef NULL
8635 #define NULL (void*)0
8636 #endif
8637
8638 static void *task(p)
8639         void *p;
8640 {
8641         return (void *) (p == NULL);
8642 }
8643
8644
8645 int main(argc, argv)
8646         int argc;
8647         char **argv;
8648 {
8649
8650         /* pthread test function */
8651         pthread_t t;
8652         int status;
8653
8654         /* make sure pthread_create() isn't just a stub */
8655 #if HAVE_PTHREADS_D4
8656         status = pthread_create(&t, pthread_attr_default, task, NULL);
8657 #else
8658         status = pthread_create(&t, NULL, task, NULL);
8659 #endif
8660
8661         if( status ) exit( status );
8662
8663         /* make sure pthread_detach() isn't just a stub */
8664 #if HAVE_PTHREADS_D4
8665         status = pthread_detach( &t );
8666 #else
8667         status = pthread_detach( t );
8668 #endif
8669
8670 #ifdef HAVE_LINUX_THREADS
8671         pthread_kill_other_threads_np();
8672 #endif
8673
8674         exit( status );
8675
8676 }
8677
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8680 then
8681   ol_cv_pthread_lpthreads_lexc=yes
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -fr conftest*
8686   ol_cv_pthread_lpthreads_lexc=no
8687 fi
8688 rm -fr conftest*
8689 fi
8690
8691
8692                 # restore the LIBS
8693                 LIBS="$ol_LIBS"
8694         
8695 fi
8696
8697 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8698
8699         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8700                 ol_link_pthreads="-lpthreads -lexc"
8701                 ol_link_threads=posix
8702         fi
8703 fi
8704
8705
8706                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8707 if test "$ol_link_threads" = no ; then
8708         # try -lpthreads
8709         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8710 echo "configure:8711: checking for pthread link with -lpthreads" >&5
8711 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8712   echo $ac_n "(cached) $ac_c" 1>&6
8713 else
8714   
8715                 # save the flags
8716                 ol_LIBS="$LIBS"
8717                 LIBS="-lpthreads $LIBS"
8718
8719                 if test "$cross_compiling" = yes; then
8720   cat > conftest.$ac_ext <<EOF
8721 #line 8722 "configure"
8722 #include "confdefs.h"
8723 /* pthread test headers */
8724 #include <pthread.h>
8725 #ifndef NULL
8726 #define NULL (void*)0
8727 #endif
8728
8729 static void *task(p)
8730         void *p;
8731 {
8732         return (void *) (p == NULL);
8733 }
8734
8735 int main() {
8736
8737         /* pthread test function */
8738         pthread_t t;
8739         int status;
8740
8741         /* make sure pthread_create() isn't just a stub */
8742 #if HAVE_PTHREADS_D4
8743         status = pthread_create(&t, pthread_attr_default, task, NULL);
8744 #else
8745         status = pthread_create(&t, NULL, task, NULL);
8746 #endif
8747
8748         if( status ) exit( status );
8749
8750         /* make sure pthread_detach() isn't just a stub */
8751 #if HAVE_PTHREADS_D4
8752         status = pthread_detach( &t );
8753 #else
8754         status = pthread_detach( t );
8755 #endif
8756
8757 #ifdef HAVE_LINUX_THREADS
8758         pthread_kill_other_threads_np();
8759 #endif
8760
8761         exit( status );
8762
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   ol_cv_pthread_lib_lpthreads=yes
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   ol_cv_pthread_lib_lpthreads=no
8773 fi
8774 rm -f conftest*
8775 else
8776   cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 /* pthread test headers */
8780 #include <pthread.h>
8781 #ifndef NULL
8782 #define NULL (void*)0
8783 #endif
8784
8785 static void *task(p)
8786         void *p;
8787 {
8788         return (void *) (p == NULL);
8789 }
8790
8791
8792 int main(argc, argv)
8793         int argc;
8794         char **argv;
8795 {
8796
8797         /* pthread test function */
8798         pthread_t t;
8799         int status;
8800
8801         /* make sure pthread_create() isn't just a stub */
8802 #if HAVE_PTHREADS_D4
8803         status = pthread_create(&t, pthread_attr_default, task, NULL);
8804 #else
8805         status = pthread_create(&t, NULL, task, NULL);
8806 #endif
8807
8808         if( status ) exit( status );
8809
8810         /* make sure pthread_detach() isn't just a stub */
8811 #if HAVE_PTHREADS_D4
8812         status = pthread_detach( &t );
8813 #else
8814         status = pthread_detach( t );
8815 #endif
8816
8817 #ifdef HAVE_LINUX_THREADS
8818         pthread_kill_other_threads_np();
8819 #endif
8820
8821         exit( status );
8822
8823 }
8824
8825 EOF
8826 if { (eval echo configure:8827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8827 then
8828   ol_cv_pthread_lib_lpthreads=yes
8829 else
8830   echo "configure: failed program was:" >&5
8831   cat conftest.$ac_ext >&5
8832   rm -fr conftest*
8833   ol_cv_pthread_lib_lpthreads=no
8834 fi
8835 rm -fr conftest*
8836 fi
8837
8838
8839                 # restore the LIBS
8840                 LIBS="$ol_LIBS"
8841         
8842 fi
8843
8844 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8845
8846         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8847                 ol_link_pthreads="-lpthreads"
8848                 ol_link_threads=posix
8849         fi
8850 fi
8851
8852
8853                 if test $ol_link_threads != no ; then
8854                         cat >> confdefs.h <<\EOF
8855 #define HAVE_PTHREADS 1
8856 EOF
8857
8858
8859                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8860
8861                                                 save_CPPFLAGS="$CPPFLAGS"
8862                         save_LIBS="$LIBS"
8863                         LIBS="$LTHREAD_LIBS $LIBS"
8864
8865                                                                                                 for ac_func in sched_yield pthread_yield
8866 do
8867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8868 echo "configure:8869: checking for $ac_func" >&5
8869 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8870   echo $ac_n "(cached) $ac_c" 1>&6
8871 else
8872   cat > conftest.$ac_ext <<EOF
8873 #line 8874 "configure"
8874 #include "confdefs.h"
8875 /* System header to define __stub macros and hopefully few prototypes,
8876     which can conflict with char $ac_func(); below.  */
8877 #include <assert.h>
8878 /* Override any gcc2 internal prototype to avoid an error.  */
8879 /* We use char because int might match the return type of a gcc2
8880     builtin and then its argument prototype would still apply.  */
8881 char $ac_func();
8882 char (*f)();
8883
8884 int main() {
8885
8886 /* The GNU C library defines this for functions which it implements
8887     to always fail with ENOSYS.  Some functions are actually named
8888     something starting with __ and the normal name is an alias.  */
8889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8890 choke me
8891 #else
8892 f = $ac_func;
8893 #endif
8894
8895 ; return 0; }
8896 EOF
8897 if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8898   rm -rf conftest*
8899   eval "ac_cv_func_$ac_func=yes"
8900 else
8901   echo "configure: failed program was:" >&5
8902   cat conftest.$ac_ext >&5
8903   rm -rf conftest*
8904   eval "ac_cv_func_$ac_func=no"
8905 fi
8906 rm -f conftest*
8907 fi
8908
8909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8910   echo "$ac_t""yes" 1>&6
8911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8912   cat >> confdefs.h <<EOF
8913 #define $ac_tr_func 1
8914 EOF
8915  
8916 else
8917   echo "$ac_t""no" 1>&6
8918 fi
8919 done
8920
8921
8922                         if test $ac_cv_func_sched_yield = no -a \
8923                                 $ac_cv_func_pthread_yield = no ; then
8924                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8925 echo "configure:8926: checking for sched_yield in -lrt" >&5
8926 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8928   echo $ac_n "(cached) $ac_c" 1>&6
8929 else
8930   ac_save_LIBS="$LIBS"
8931 LIBS="-lrt  $LIBS"
8932 cat > conftest.$ac_ext <<EOF
8933 #line 8934 "configure"
8934 #include "confdefs.h"
8935 /* Override any gcc2 internal prototype to avoid an error.  */
8936 /* We use char because int might match the return type of a gcc2
8937     builtin and then its argument prototype would still apply.  */
8938 char sched_yield();
8939
8940 int main() {
8941 sched_yield()
8942 ; return 0; }
8943 EOF
8944 if { (eval echo configure:8945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8945   rm -rf conftest*
8946   eval "ac_cv_lib_$ac_lib_var=yes"
8947 else
8948   echo "configure: failed program was:" >&5
8949   cat conftest.$ac_ext >&5
8950   rm -rf conftest*
8951   eval "ac_cv_lib_$ac_lib_var=no"
8952 fi
8953 rm -f conftest*
8954 LIBS="$ac_save_LIBS"
8955
8956 fi
8957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8958   echo "$ac_t""yes" 1>&6
8959   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8960                                         cat >> confdefs.h <<\EOF
8961 #define HAVE_SCHED_YIELD 1
8962 EOF
8963
8964                                         ac_cv_func_sched_yield=yes
8965 else
8966   echo "$ac_t""no" 1>&6
8967 ac_cv_func_sched_yield=no
8968 fi
8969
8970                         fi
8971                         if test $ac_cv_func_sched_yield = no -a \
8972                                 $ac_cv_func_pthread_yield = no ; then
8973                                                                                                 for ac_func in thr_yield
8974 do
8975 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8976 echo "configure:8977: checking for $ac_func" >&5
8977 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   cat > conftest.$ac_ext <<EOF
8981 #line 8982 "configure"
8982 #include "confdefs.h"
8983 /* System header to define __stub macros and hopefully few prototypes,
8984     which can conflict with char $ac_func(); below.  */
8985 #include <assert.h>
8986 /* Override any gcc2 internal prototype to avoid an error.  */
8987 /* We use char because int might match the return type of a gcc2
8988     builtin and then its argument prototype would still apply.  */
8989 char $ac_func();
8990 char (*f)();
8991
8992 int main() {
8993
8994 /* The GNU C library defines this for functions which it implements
8995     to always fail with ENOSYS.  Some functions are actually named
8996     something starting with __ and the normal name is an alias.  */
8997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8998 choke me
8999 #else
9000 f = $ac_func;
9001 #endif
9002
9003 ; return 0; }
9004 EOF
9005 if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9006   rm -rf conftest*
9007   eval "ac_cv_func_$ac_func=yes"
9008 else
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_func_$ac_func=no"
9013 fi
9014 rm -f conftest*
9015 fi
9016
9017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9020   cat >> confdefs.h <<EOF
9021 #define $ac_tr_func 1
9022 EOF
9023  
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027 done
9028
9029                         fi
9030                         if test $ac_cv_func_sched_yield = no -a \
9031                                 $ac_cv_func_pthread_yield = no -a \
9032                                 "$ac_cv_func_thr_yield" = no ; then
9033                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9034                         fi
9035
9036                                                 for ac_func in pthread_kill
9037 do
9038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9039 echo "configure:9040: checking for $ac_func" >&5
9040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9041   echo $ac_n "(cached) $ac_c" 1>&6
9042 else
9043   cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046 /* System header to define __stub macros and hopefully few prototypes,
9047     which can conflict with char $ac_func(); below.  */
9048 #include <assert.h>
9049 /* Override any gcc2 internal prototype to avoid an error.  */
9050 /* We use char because int might match the return type of a gcc2
9051     builtin and then its argument prototype would still apply.  */
9052 char $ac_func();
9053 char (*f)();
9054
9055 int main() {
9056
9057 /* The GNU C library defines this for functions which it implements
9058     to always fail with ENOSYS.  Some functions are actually named
9059     something starting with __ and the normal name is an alias.  */
9060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9061 choke me
9062 #else
9063 f = $ac_func;
9064 #endif
9065
9066 ; return 0; }
9067 EOF
9068 if { (eval echo configure:9069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9069   rm -rf conftest*
9070   eval "ac_cv_func_$ac_func=yes"
9071 else
9072   echo "configure: failed program was:" >&5
9073   cat conftest.$ac_ext >&5
9074   rm -rf conftest*
9075   eval "ac_cv_func_$ac_func=no"
9076 fi
9077 rm -f conftest*
9078 fi
9079
9080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9081   echo "$ac_t""yes" 1>&6
9082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9083   cat >> confdefs.h <<EOF
9084 #define $ac_tr_func 1
9085 EOF
9086  
9087 else
9088   echo "$ac_t""no" 1>&6
9089 fi
9090 done
9091
9092
9093                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9094 echo "configure:9095: checking for pthread_detach with <pthread.h>" >&5
9095 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9096   echo $ac_n "(cached) $ac_c" 1>&6
9097 else
9098   
9099                                                                 cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102
9103 #include <pthread.h>
9104 #ifndef NULL
9105 #define NULL (void*)0
9106 #endif
9107
9108 int main() {
9109 pthread_detach(NULL);
9110 ; return 0; }
9111 EOF
9112 if { (eval echo configure:9113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9113   rm -rf conftest*
9114   ol_cv_func_pthread_detach=yes
9115 else
9116   echo "configure: failed program was:" >&5
9117   cat conftest.$ac_ext >&5
9118   rm -rf conftest*
9119   ol_cv_func_pthread_detach=no
9120 fi
9121 rm -f conftest*
9122                         
9123 fi
9124
9125 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9126
9127                         if test $ol_cv_func_pthread_detach = no ; then
9128                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9129                         fi
9130
9131                         cat >> confdefs.h <<\EOF
9132 #define HAVE_PTHREAD_DETACH 1
9133 EOF
9134
9135
9136                                                 for ac_func in \
9137                                 pthread_setconcurrency \
9138                                 pthread_getconcurrency \
9139                                 thr_setconcurrency \
9140                                 thr_getconcurrency \
9141                         
9142 do
9143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9144 echo "configure:9145: checking for $ac_func" >&5
9145 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9146   echo $ac_n "(cached) $ac_c" 1>&6
9147 else
9148   cat > conftest.$ac_ext <<EOF
9149 #line 9150 "configure"
9150 #include "confdefs.h"
9151 /* System header to define __stub macros and hopefully few prototypes,
9152     which can conflict with char $ac_func(); below.  */
9153 #include <assert.h>
9154 /* Override any gcc2 internal prototype to avoid an error.  */
9155 /* We use char because int might match the return type of a gcc2
9156     builtin and then its argument prototype would still apply.  */
9157 char $ac_func();
9158 char (*f)();
9159
9160 int main() {
9161
9162 /* The GNU C library defines this for functions which it implements
9163     to always fail with ENOSYS.  Some functions are actually named
9164     something starting with __ and the normal name is an alias.  */
9165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9166 choke me
9167 #else
9168 f = $ac_func;
9169 #endif
9170
9171 ; return 0; }
9172 EOF
9173 if { (eval echo configure:9174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9174   rm -rf conftest*
9175   eval "ac_cv_func_$ac_func=yes"
9176 else
9177   echo "configure: failed program was:" >&5
9178   cat conftest.$ac_ext >&5
9179   rm -rf conftest*
9180   eval "ac_cv_func_$ac_func=no"
9181 fi
9182 rm -f conftest*
9183 fi
9184
9185 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9186   echo "$ac_t""yes" 1>&6
9187     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9188   cat >> confdefs.h <<EOF
9189 #define $ac_tr_func 1
9190 EOF
9191  
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195 done
9196
9197
9198                         
9199         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9200 echo "configure:9201: checking for pthread_kill_other_threads_np" >&5
9201 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207 /* System header to define __stub macros and hopefully few prototypes,
9208     which can conflict with char pthread_kill_other_threads_np(); below.  */
9209 #include <assert.h>
9210 /* Override any gcc2 internal prototype to avoid an error.  */
9211 /* We use char because int might match the return type of a gcc2
9212     builtin and then its argument prototype would still apply.  */
9213 char pthread_kill_other_threads_np();
9214 char (*f)();
9215
9216 int main() {
9217
9218 /* The GNU C library defines this for functions which it implements
9219     to always fail with ENOSYS.  Some functions are actually named
9220     something starting with __ and the normal name is an alias.  */
9221 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9222 choke me
9223 #else
9224 f = pthread_kill_other_threads_np;
9225 #endif
9226
9227 ; return 0; }
9228 EOF
9229 if { (eval echo configure:9230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9230   rm -rf conftest*
9231   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9232 else
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -rf conftest*
9236   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9237 fi
9238 rm -f conftest*
9239 fi
9240
9241 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9242   echo "$ac_t""yes" 1>&6
9243   :
9244 else
9245   echo "$ac_t""no" 1>&6
9246 fi
9247
9248         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9249 echo "configure:9250: checking for LinuxThreads implementation" >&5
9250 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9254 fi
9255
9256 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9257
9258                         
9259         
9260         
9261         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9262 echo "configure:9263: checking for LinuxThreads consistency" >&5
9263 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9264   echo $ac_n "(cached) $ac_c" 1>&6
9265 else
9266   
9267                 if test $ol_cv_header_linux_threads = yes -a \
9268                         $ol_cv_sys_linux_threads = yes; then
9269                         ol_cv_linux_threads=yes
9270                 elif test $ol_cv_header_linux_threads = no -a \
9271                         $ol_cv_sys_linux_threads = no; then
9272                         ol_cv_linux_threads=no
9273                 else
9274                         ol_cv_linux_threads=error
9275                 fi
9276         
9277 fi
9278
9279 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9280
9281
9282                         if test $ol_cv_linux_threads = error; then
9283                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9284                         fi
9285
9286                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9287 echo "configure:9288: checking if pthread_create() works" >&5
9288 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9289   echo $ac_n "(cached) $ac_c" 1>&6
9290 else
9291   
9292                         if test "$cross_compiling" = yes; then
9293                                 ol_cv_pthread_create_works=yes
9294 else
9295   cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298 /* pthread test headers */
9299 #include <pthread.h>
9300 #ifndef NULL
9301 #define NULL (void*)0
9302 #endif
9303
9304 static void *task(p)
9305         void *p;
9306 {
9307         return (void *) (p == NULL);
9308 }
9309
9310
9311 int main(argc, argv)
9312         int argc;
9313         char **argv;
9314 {
9315
9316         /* pthread test function */
9317         pthread_t t;
9318         int status;
9319
9320         /* make sure pthread_create() isn't just a stub */
9321 #if HAVE_PTHREADS_D4
9322         status = pthread_create(&t, pthread_attr_default, task, NULL);
9323 #else
9324         status = pthread_create(&t, NULL, task, NULL);
9325 #endif
9326
9327         if( status ) exit( status );
9328
9329         /* make sure pthread_detach() isn't just a stub */
9330 #if HAVE_PTHREADS_D4
9331         status = pthread_detach( &t );
9332 #else
9333         status = pthread_detach( t );
9334 #endif
9335
9336 #ifdef HAVE_LINUX_THREADS
9337         pthread_kill_other_threads_np();
9338 #endif
9339
9340         exit( status );
9341
9342 }
9343
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9346 then
9347   ol_cv_pthread_create_works=yes
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -fr conftest*
9352   ol_cv_pthread_create_works=no
9353 fi
9354 rm -fr conftest*
9355 fi
9356
9357 fi
9358
9359 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9360
9361                         if test $ol_cv_pthread_create_works = no ; then
9362                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9363                         fi
9364
9365                                                 if test $ol_with_yielding_select = auto ; then
9366                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9367 echo "configure:9368: checking if select yields when using pthreads" >&5
9368 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9369   echo $ac_n "(cached) $ac_c" 1>&6
9370 else
9371   
9372                                 if test "$cross_compiling" = yes; then
9373   ol_cv_pthread_select_yields=cross
9374 else
9375   cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378
9379 #include <sys/types.h>
9380 #include <sys/time.h>
9381 #include <unistd.h>
9382 #include <pthread.h>
9383 #ifndef NULL
9384 #define NULL (void*) 0
9385 #endif
9386
9387 static int fildes[2];
9388
9389 static void *task(p)
9390         void *p;
9391 {
9392         int i;
9393         struct timeval tv;
9394
9395         fd_set rfds;
9396
9397         tv.tv_sec=10;
9398         tv.tv_usec=0;
9399
9400         FD_ZERO(&rfds);
9401         FD_SET(fildes[0], &rfds);
9402
9403         /* we're not interested in any fds */
9404         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9405
9406         if(i < 0) {
9407                 perror("select");
9408                 exit(10);
9409         }
9410
9411         exit(0); /* if we exit here, the select blocked the whole process */
9412 }
9413
9414 int main(argc, argv)
9415         int argc;
9416         char **argv;
9417 {
9418         pthread_t t;
9419
9420         /* create a pipe to select */
9421         if(pipe(&fildes[0])) {
9422                 perror("select");
9423                 exit(1);
9424         }
9425
9426 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9427         (void) pthread_setconcurrency(2);
9428 #else
9429 #ifdef HAVE_THR_SETCONCURRENCY
9430         /* Set Solaris LWP concurrency to 2 */
9431         thr_setconcurrency(2);
9432 #endif
9433 #endif
9434
9435 #if HAVE_PTHREADS_D4
9436         pthread_create(&t, pthread_attr_default, task, NULL);
9437 #else
9438         pthread_create(&t, NULL, task, NULL);
9439 #endif
9440
9441 #if HAVE_SCHED_YIELD
9442         sched_yield();  /* make sure task runs first */
9443 #else
9444 #ifdef HAVE_PTHREAD_YIELD
9445         pthread_yield();        /* make sure task runs first */
9446 #endif
9447 #endif
9448
9449         exit(2);
9450 }
9451 EOF
9452 if { (eval echo configure:9453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9453 then
9454   ol_cv_pthread_select_yields=no
9455 else
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -fr conftest*
9459   ol_cv_pthread_select_yields=yes
9460 fi
9461 rm -fr conftest*
9462 fi
9463
9464 fi
9465
9466 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9467
9468                                 if test $ol_cv_pthread_select_yields = cross ; then
9469                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9470                                 fi
9471
9472                                 if test $ol_cv_pthread_select_yields = yes ; then
9473                                         ol_with_yielding_select=yes
9474                                 fi
9475                         fi
9476
9477                                                 CPPFLAGS="$save_CPPFLAGS"
9478                         LIBS="$save_LIBS"
9479                 else
9480                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9481                 fi
9482         fi
9483
9484         if test $ol_with_threads = posix ; then
9485                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9486         fi
9487 fi
9488
9489 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9490         -o $ol_with_threads = mach ; then
9491
9492                 for ac_hdr in mach/cthreads.h
9493 do
9494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9496 echo "configure:9497: checking for $ac_hdr" >&5
9497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 #include <$ac_hdr>
9504 EOF
9505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9506 { (eval echo configure:9507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9508 if test -z "$ac_err"; then
9509   rm -rf conftest*
9510   eval "ac_cv_header_$ac_safe=yes"
9511 else
9512   echo "$ac_err" >&5
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -rf conftest*
9516   eval "ac_cv_header_$ac_safe=no"
9517 fi
9518 rm -f conftest*
9519 fi
9520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9521   echo "$ac_t""yes" 1>&6
9522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9523   cat >> confdefs.h <<EOF
9524 #define $ac_tr_hdr 1
9525 EOF
9526  
9527 else
9528   echo "$ac_t""no" 1>&6
9529 fi
9530 done
9531
9532         if test $ac_cv_header_mach_cthreads_h = yes ; then
9533                 ol_with_threads=found
9534
9535                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9536 echo "configure:9537: checking for cthread_fork" >&5
9537 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9538   echo $ac_n "(cached) $ac_c" 1>&6
9539 else
9540   cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9543 /* System header to define __stub macros and hopefully few prototypes,
9544     which can conflict with char cthread_fork(); below.  */
9545 #include <assert.h>
9546 /* Override any gcc2 internal prototype to avoid an error.  */
9547 /* We use char because int might match the return type of a gcc2
9548     builtin and then its argument prototype would still apply.  */
9549 char cthread_fork();
9550 char (*f)();
9551
9552 int main() {
9553
9554 /* The GNU C library defines this for functions which it implements
9555     to always fail with ENOSYS.  Some functions are actually named
9556     something starting with __ and the normal name is an alias.  */
9557 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9558 choke me
9559 #else
9560 f = cthread_fork;
9561 #endif
9562
9563 ; return 0; }
9564 EOF
9565 if { (eval echo configure:9566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9566   rm -rf conftest*
9567   eval "ac_cv_func_cthread_fork=yes"
9568 else
9569   echo "configure: failed program was:" >&5
9570   cat conftest.$ac_ext >&5
9571   rm -rf conftest*
9572   eval "ac_cv_func_cthread_fork=no"
9573 fi
9574 rm -f conftest*
9575 fi
9576
9577 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9578   echo "$ac_t""yes" 1>&6
9579   ol_link_threads=yes
9580 else
9581   echo "$ac_t""no" 1>&6
9582 fi
9583
9584
9585                 if test $ol_link_threads = no ; then
9586                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9587 echo "configure:9588: checking for cthread_fork with -all_load" >&5
9588 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9589   echo $ac_n "(cached) $ac_c" 1>&6
9590 else
9591   
9592                                                                 save_LIBS="$LIBS"
9593                                 LIBS="-all_load $LIBS"
9594                                 cat > conftest.$ac_ext <<EOF
9595 #line 9596 "configure"
9596 #include "confdefs.h"
9597 #include <mach/cthreads.h>
9598 int main() {
9599
9600                                         cthread_fork((void *)0, (void *)0);
9601                                         
9602 ; return 0; }
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9605   rm -rf conftest*
9606   ol_cv_cthread_all_load=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   ol_cv_cthread_all_load=no
9612 fi
9613 rm -f conftest*
9614                                                                 LIBS="$save_LIBS"
9615                         
9616 fi
9617
9618 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9619
9620                         if test $ol_cv_cthread_all_load = yes ; then
9621                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9622                                 ol_link_threads=mach
9623                         fi
9624                 fi
9625
9626                 if test $ol_link_threads != no ; then
9627                         : check for cthread specific functionality here
9628                         cat >> confdefs.h <<\EOF
9629 #define HAVE_MACH_CTHREADS 1
9630 EOF
9631
9632                 else
9633                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9634                 fi
9635         fi
9636
9637         if test $ol_with_threads = mach ; then
9638                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9639         fi
9640 fi
9641
9642 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9643         -o $ol_with_threads = pth ; then
9644
9645         for ac_hdr in pth.h
9646 do
9647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9649 echo "configure:9650: checking for $ac_hdr" >&5
9650 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9651   echo $ac_n "(cached) $ac_c" 1>&6
9652 else
9653   cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656 #include <$ac_hdr>
9657 EOF
9658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9659 { (eval echo configure:9660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9661 if test -z "$ac_err"; then
9662   rm -rf conftest*
9663   eval "ac_cv_header_$ac_safe=yes"
9664 else
9665   echo "$ac_err" >&5
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668   rm -rf conftest*
9669   eval "ac_cv_header_$ac_safe=no"
9670 fi
9671 rm -f conftest*
9672 fi
9673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9674   echo "$ac_t""yes" 1>&6
9675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9676   cat >> confdefs.h <<EOF
9677 #define $ac_tr_hdr 1
9678 EOF
9679  
9680 else
9681   echo "$ac_t""no" 1>&6
9682 fi
9683 done
9684
9685
9686         if test $ac_cv_header_pth_h = yes ; then
9687                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9688 echo "configure:9689: checking for pth_version in -lpth" >&5
9689 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9691   echo $ac_n "(cached) $ac_c" 1>&6
9692 else
9693   ac_save_LIBS="$LIBS"
9694 LIBS="-lpth  $LIBS"
9695 cat > conftest.$ac_ext <<EOF
9696 #line 9697 "configure"
9697 #include "confdefs.h"
9698 /* Override any gcc2 internal prototype to avoid an error.  */
9699 /* We use char because int might match the return type of a gcc2
9700     builtin and then its argument prototype would still apply.  */
9701 char pth_version();
9702
9703 int main() {
9704 pth_version()
9705 ; return 0; }
9706 EOF
9707 if { (eval echo configure:9708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9708   rm -rf conftest*
9709   eval "ac_cv_lib_$ac_lib_var=yes"
9710 else
9711   echo "configure: failed program was:" >&5
9712   cat conftest.$ac_ext >&5
9713   rm -rf conftest*
9714   eval "ac_cv_lib_$ac_lib_var=no"
9715 fi
9716 rm -f conftest*
9717 LIBS="$ac_save_LIBS"
9718
9719 fi
9720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9721   echo "$ac_t""yes" 1>&6
9722   have_pth=yes
9723 else
9724   echo "$ac_t""no" 1>&6
9725 have_pth=no
9726 fi
9727
9728
9729                 if test $have_pth = yes ; then
9730                         cat >> confdefs.h <<\EOF
9731 #define HAVE_GNU_PTH 1
9732 EOF
9733
9734                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9735                         ol_link_threads=pth
9736
9737                         if test $ol_with_yielding_select = auto ; then
9738                                 ol_with_yielding_select=yes
9739                         fi
9740                 fi
9741         fi
9742 fi
9743
9744 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9745         -o $ol_with_threads = lwp ; then
9746
9747                 for ac_hdr in thread.h synch.h
9748 do
9749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9751 echo "configure:9752: checking for $ac_hdr" >&5
9752 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   cat > conftest.$ac_ext <<EOF
9756 #line 9757 "configure"
9757 #include "confdefs.h"
9758 #include <$ac_hdr>
9759 EOF
9760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9761 { (eval echo configure:9762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9763 if test -z "$ac_err"; then
9764   rm -rf conftest*
9765   eval "ac_cv_header_$ac_safe=yes"
9766 else
9767   echo "$ac_err" >&5
9768   echo "configure: failed program was:" >&5
9769   cat conftest.$ac_ext >&5
9770   rm -rf conftest*
9771   eval "ac_cv_header_$ac_safe=no"
9772 fi
9773 rm -f conftest*
9774 fi
9775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9776   echo "$ac_t""yes" 1>&6
9777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9778   cat >> confdefs.h <<EOF
9779 #define $ac_tr_hdr 1
9780 EOF
9781  
9782 else
9783   echo "$ac_t""no" 1>&6
9784 fi
9785 done
9786
9787         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9788                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9789 echo "configure:9790: checking for thr_create in -lthread" >&5
9790 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9792   echo $ac_n "(cached) $ac_c" 1>&6
9793 else
9794   ac_save_LIBS="$LIBS"
9795 LIBS="-lthread  $LIBS"
9796 cat > conftest.$ac_ext <<EOF
9797 #line 9798 "configure"
9798 #include "confdefs.h"
9799 /* Override any gcc2 internal prototype to avoid an error.  */
9800 /* We use char because int might match the return type of a gcc2
9801     builtin and then its argument prototype would still apply.  */
9802 char thr_create();
9803
9804 int main() {
9805 thr_create()
9806 ; return 0; }
9807 EOF
9808 if { (eval echo configure:9809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9809   rm -rf conftest*
9810   eval "ac_cv_lib_$ac_lib_var=yes"
9811 else
9812   echo "configure: failed program was:" >&5
9813   cat conftest.$ac_ext >&5
9814   rm -rf conftest*
9815   eval "ac_cv_lib_$ac_lib_var=no"
9816 fi
9817 rm -f conftest*
9818 LIBS="$ac_save_LIBS"
9819
9820 fi
9821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9822   echo "$ac_t""yes" 1>&6
9823   have_thr=yes
9824 else
9825   echo "$ac_t""no" 1>&6
9826 have_thr=no
9827 fi
9828
9829
9830                 if test $have_thr = yes ; then
9831                         cat >> confdefs.h <<\EOF
9832 #define HAVE_THR 1
9833 EOF
9834
9835                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9836                         ol_link_threads=thr
9837
9838                         if test $ol_with_yielding_select = auto ; then
9839                                 ol_with_yielding_select=yes
9840                         fi
9841
9842                                                 for ac_func in \
9843                                 thr_setconcurrency \
9844                                 thr_getconcurrency \
9845                         
9846 do
9847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9848 echo "configure:9849: checking for $ac_func" >&5
9849 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9850   echo $ac_n "(cached) $ac_c" 1>&6
9851 else
9852   cat > conftest.$ac_ext <<EOF
9853 #line 9854 "configure"
9854 #include "confdefs.h"
9855 /* System header to define __stub macros and hopefully few prototypes,
9856     which can conflict with char $ac_func(); below.  */
9857 #include <assert.h>
9858 /* Override any gcc2 internal prototype to avoid an error.  */
9859 /* We use char because int might match the return type of a gcc2
9860     builtin and then its argument prototype would still apply.  */
9861 char $ac_func();
9862 char (*f)();
9863
9864 int main() {
9865
9866 /* The GNU C library defines this for functions which it implements
9867     to always fail with ENOSYS.  Some functions are actually named
9868     something starting with __ and the normal name is an alias.  */
9869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9870 choke me
9871 #else
9872 f = $ac_func;
9873 #endif
9874
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9878   rm -rf conftest*
9879   eval "ac_cv_func_$ac_func=yes"
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883   rm -rf conftest*
9884   eval "ac_cv_func_$ac_func=no"
9885 fi
9886 rm -f conftest*
9887 fi
9888
9889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9890   echo "$ac_t""yes" 1>&6
9891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9892   cat >> confdefs.h <<EOF
9893 #define $ac_tr_func 1
9894 EOF
9895  
9896 else
9897   echo "$ac_t""no" 1>&6
9898 fi
9899 done
9900
9901                 fi
9902         fi
9903
9904                 for ac_hdr in lwp/lwp.h
9905 do
9906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9908 echo "configure:9909: checking for $ac_hdr" >&5
9909 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915 #include <$ac_hdr>
9916 EOF
9917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9918 { (eval echo configure:9919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9920 if test -z "$ac_err"; then
9921   rm -rf conftest*
9922   eval "ac_cv_header_$ac_safe=yes"
9923 else
9924   echo "$ac_err" >&5
9925   echo "configure: failed program was:" >&5
9926   cat conftest.$ac_ext >&5
9927   rm -rf conftest*
9928   eval "ac_cv_header_$ac_safe=no"
9929 fi
9930 rm -f conftest*
9931 fi
9932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9933   echo "$ac_t""yes" 1>&6
9934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9935   cat >> confdefs.h <<EOF
9936 #define $ac_tr_hdr 1
9937 EOF
9938  
9939 else
9940   echo "$ac_t""no" 1>&6
9941 fi
9942 done
9943
9944         if test $ac_cv_header_lwp_lwp_h = yes ; then
9945                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9946 echo "configure:9947: checking for lwp_create in -llwp" >&5
9947 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9948 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9949   echo $ac_n "(cached) $ac_c" 1>&6
9950 else
9951   ac_save_LIBS="$LIBS"
9952 LIBS="-llwp  $LIBS"
9953 cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956 /* Override any gcc2 internal prototype to avoid an error.  */
9957 /* We use char because int might match the return type of a gcc2
9958     builtin and then its argument prototype would still apply.  */
9959 char lwp_create();
9960
9961 int main() {
9962 lwp_create()
9963 ; return 0; }
9964 EOF
9965 if { (eval echo configure:9966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9966   rm -rf conftest*
9967   eval "ac_cv_lib_$ac_lib_var=yes"
9968 else
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971   rm -rf conftest*
9972   eval "ac_cv_lib_$ac_lib_var=no"
9973 fi
9974 rm -f conftest*
9975 LIBS="$ac_save_LIBS"
9976
9977 fi
9978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9979   echo "$ac_t""yes" 1>&6
9980   have_lwp=yes
9981 else
9982   echo "$ac_t""no" 1>&6
9983 have_lwp=no
9984 fi
9985
9986
9987                 if test $have_lwp = yes ; then
9988                         cat >> confdefs.h <<\EOF
9989 #define HAVE_LWP 1
9990 EOF
9991
9992                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9993                         ol_link_threads=lwp
9994
9995                         if test $ol_with_yielding_select = auto ; then
9996                                 ol_with_yielding_select=no
9997                         fi
9998                 fi
9999         fi
10000 fi
10001
10002 if test $ol_with_yielding_select = yes ; then
10003         cat >> confdefs.h <<\EOF
10004 #define HAVE_YIELDING_SELECT 1
10005 EOF
10006
10007 fi
10008
10009 if test $ol_with_threads = manual ; then
10010                 ol_link_threads=yes
10011
10012         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10013
10014         for ac_hdr in pthread.h sched.h
10015 do
10016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10018 echo "configure:10019: checking for $ac_hdr" >&5
10019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   cat > conftest.$ac_ext <<EOF
10023 #line 10024 "configure"
10024 #include "confdefs.h"
10025 #include <$ac_hdr>
10026 EOF
10027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10028 { (eval echo configure:10029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10030 if test -z "$ac_err"; then
10031   rm -rf conftest*
10032   eval "ac_cv_header_$ac_safe=yes"
10033 else
10034   echo "$ac_err" >&5
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_header_$ac_safe=no"
10039 fi
10040 rm -f conftest*
10041 fi
10042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10045   cat >> confdefs.h <<EOF
10046 #define $ac_tr_hdr 1
10047 EOF
10048  
10049 else
10050   echo "$ac_t""no" 1>&6
10051 fi
10052 done
10053
10054         for ac_func in sched_yield pthread_yield
10055 do
10056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10057 echo "configure:10058: checking for $ac_func" >&5
10058 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10059   echo $ac_n "(cached) $ac_c" 1>&6
10060 else
10061   cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 /* System header to define __stub macros and hopefully few prototypes,
10065     which can conflict with char $ac_func(); below.  */
10066 #include <assert.h>
10067 /* Override any gcc2 internal prototype to avoid an error.  */
10068 /* We use char because int might match the return type of a gcc2
10069     builtin and then its argument prototype would still apply.  */
10070 char $ac_func();
10071 char (*f)();
10072
10073 int main() {
10074
10075 /* The GNU C library defines this for functions which it implements
10076     to always fail with ENOSYS.  Some functions are actually named
10077     something starting with __ and the normal name is an alias.  */
10078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10079 choke me
10080 #else
10081 f = $ac_func;
10082 #endif
10083
10084 ; return 0; }
10085 EOF
10086 if { (eval echo configure:10087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10087   rm -rf conftest*
10088   eval "ac_cv_func_$ac_func=yes"
10089 else
10090   echo "configure: failed program was:" >&5
10091   cat conftest.$ac_ext >&5
10092   rm -rf conftest*
10093   eval "ac_cv_func_$ac_func=no"
10094 fi
10095 rm -f conftest*
10096 fi
10097
10098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10099   echo "$ac_t""yes" 1>&6
10100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10101   cat >> confdefs.h <<EOF
10102 #define $ac_tr_func 1
10103 EOF
10104  
10105 else
10106   echo "$ac_t""no" 1>&6
10107 fi
10108 done
10109
10110         
10111         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10112 echo "configure:10113: checking for LinuxThreads pthread.h" >&5
10113 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 #include <pthread.h>
10120 EOF
10121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10122   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10123   rm -rf conftest*
10124   ol_cv_header_linux_threads=yes
10125 else
10126   rm -rf conftest*
10127   ol_cv_header_linux_threads=no
10128 fi
10129 rm -f conftest*
10130
10131                 
10132 fi
10133
10134 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10135         if test $ol_cv_header_linux_threads = yes; then
10136                 cat >> confdefs.h <<\EOF
10137 #define HAVE_LINUX_THREADS 1
10138 EOF
10139
10140         fi
10141
10142
10143         for ac_hdr in mach/cthreads.h
10144 do
10145 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10146 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10147 echo "configure:10148: checking for $ac_hdr" >&5
10148 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 #include <$ac_hdr>
10155 EOF
10156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10157 { (eval echo configure:10158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10159 if test -z "$ac_err"; then
10160   rm -rf conftest*
10161   eval "ac_cv_header_$ac_safe=yes"
10162 else
10163   echo "$ac_err" >&5
10164   echo "configure: failed program was:" >&5
10165   cat conftest.$ac_ext >&5
10166   rm -rf conftest*
10167   eval "ac_cv_header_$ac_safe=no"
10168 fi
10169 rm -f conftest*
10170 fi
10171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10172   echo "$ac_t""yes" 1>&6
10173     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10174   cat >> confdefs.h <<EOF
10175 #define $ac_tr_hdr 1
10176 EOF
10177  
10178 else
10179   echo "$ac_t""no" 1>&6
10180 fi
10181 done
10182
10183         for ac_hdr in lwp/lwp.h
10184 do
10185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10187 echo "configure:10188: checking for $ac_hdr" >&5
10188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10189   echo $ac_n "(cached) $ac_c" 1>&6
10190 else
10191   cat > conftest.$ac_ext <<EOF
10192 #line 10193 "configure"
10193 #include "confdefs.h"
10194 #include <$ac_hdr>
10195 EOF
10196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10197 { (eval echo configure:10198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10199 if test -z "$ac_err"; then
10200   rm -rf conftest*
10201   eval "ac_cv_header_$ac_safe=yes"
10202 else
10203   echo "$ac_err" >&5
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   rm -rf conftest*
10207   eval "ac_cv_header_$ac_safe=no"
10208 fi
10209 rm -f conftest*
10210 fi
10211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10212   echo "$ac_t""yes" 1>&6
10213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10214   cat >> confdefs.h <<EOF
10215 #define $ac_tr_hdr 1
10216 EOF
10217  
10218 else
10219   echo "$ac_t""no" 1>&6
10220 fi
10221 done
10222
10223         for ac_hdr in thread.h synch.h
10224 do
10225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10227 echo "configure:10228: checking for $ac_hdr" >&5
10228 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10229   echo $ac_n "(cached) $ac_c" 1>&6
10230 else
10231   cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 #include <$ac_hdr>
10235 EOF
10236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10237 { (eval echo configure:10238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10239 if test -z "$ac_err"; then
10240   rm -rf conftest*
10241   eval "ac_cv_header_$ac_safe=yes"
10242 else
10243   echo "$ac_err" >&5
10244   echo "configure: failed program was:" >&5
10245   cat conftest.$ac_ext >&5
10246   rm -rf conftest*
10247   eval "ac_cv_header_$ac_safe=no"
10248 fi
10249 rm -f conftest*
10250 fi
10251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10252   echo "$ac_t""yes" 1>&6
10253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10254   cat >> confdefs.h <<EOF
10255 #define $ac_tr_hdr 1
10256 EOF
10257  
10258 else
10259   echo "$ac_t""no" 1>&6
10260 fi
10261 done
10262
10263 fi
10264
10265 if test $ol_link_threads != no ; then  
10266                         cat >> confdefs.h <<\EOF
10267 #define REENTRANT 1
10268 EOF
10269
10270         cat >> confdefs.h <<\EOF
10271 #define _REENTRANT 1
10272 EOF
10273
10274         cat >> confdefs.h <<\EOF
10275 #define THREAD_SAFE 1
10276 EOF
10277
10278         cat >> confdefs.h <<\EOF
10279 #define _THREAD_SAFE 1
10280 EOF
10281
10282         cat >> confdefs.h <<\EOF
10283 #define THREADSAFE 1
10284 EOF
10285
10286         cat >> confdefs.h <<\EOF
10287 #define _THREADSAFE 1
10288 EOF
10289
10290         cat >> confdefs.h <<\EOF
10291 #define _SGI_MP_SOURCE 1
10292 EOF
10293
10294
10295                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10296 echo "configure:10297: checking for thread specific errno" >&5
10297 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301                 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 #include <errno.h>
10305 int main() {
10306 errno = 0;
10307 ; return 0; }
10308 EOF
10309 if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10310   rm -rf conftest*
10311   ol_cv_errno_thread_specific=yes
10312 else
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -rf conftest*
10316   ol_cv_errno_thread_specific=no
10317 fi
10318 rm -f conftest*
10319         
10320 fi
10321
10322 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10323
10324                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10325 echo "configure:10326: checking for thread specific h_errno" >&5
10326 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   
10330                 cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 #include <netdb.h>
10334 int main() {
10335 h_errno = 0;
10336 ; return 0; }
10337 EOF
10338 if { (eval echo configure:10339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10339   rm -rf conftest*
10340   ol_cv_h_errno_thread_specific=yes
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   ol_cv_h_errno_thread_specific=no
10346 fi
10347 rm -f conftest*
10348         
10349 fi
10350
10351 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10352
10353         if test $ol_cv_errno_thread_specific != yes \
10354                 -o $ol_cv_h_errno_thread_specific != yes ; then
10355                 LIBS="$LTHREAD_LIBS $LIBS"
10356                 LTHREAD_LIBS=""
10357         fi
10358
10359 fi  
10360
10361 if test $ol_link_threads = no ; then
10362         if test $ol_with_threads = yes ; then
10363                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10364         fi
10365
10366         if test $ol_with_threads = auto ; then
10367                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10368                 ol_with_threads=no
10369         fi
10370
10371         cat >> confdefs.h <<\EOF
10372 #define NO_THREADS 1
10373 EOF
10374
10375         LTHREAD_LIBS=""
10376 fi
10377
10378 if test $ol_link_threads != no ; then
10379         cat >> confdefs.h <<\EOF
10380 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10381 EOF
10382
10383 fi
10384
10385
10386 ol_link_ldbm=no 
10387 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10388         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10389 echo "configure:10390: checking for DB2 library" >&5
10390 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393         ol_LIBS="$LIBS"
10394         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10395 echo "configure:10396: checking for db_open in -ldb" >&5
10396 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10398   echo $ac_n "(cached) $ac_c" 1>&6
10399 else
10400   ac_save_LIBS="$LIBS"
10401 LIBS="-ldb  $LIBS"
10402 cat > conftest.$ac_ext <<EOF
10403 #line 10404 "configure"
10404 #include "confdefs.h"
10405 /* Override any gcc2 internal prototype to avoid an error.  */
10406 /* We use char because int might match the return type of a gcc2
10407     builtin and then its argument prototype would still apply.  */
10408 char db_open();
10409
10410 int main() {
10411 db_open()
10412 ; return 0; }
10413 EOF
10414 if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10415   rm -rf conftest*
10416   eval "ac_cv_lib_$ac_lib_var=yes"
10417 else
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -rf conftest*
10421   eval "ac_cv_lib_$ac_lib_var=no"
10422 fi
10423 rm -f conftest*
10424 LIBS="$ac_save_LIBS"
10425
10426 fi
10427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10428   echo "$ac_t""yes" 1>&6
10429   ol_cv_lib_db2=-ldb
10430 else
10431   echo "$ac_t""no" 1>&6
10432 ol_cv_lib_db2=no
10433 fi
10434
10435         LIBS="$ol_LIBS"
10436
10437 fi
10438
10439 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10440
10441 for ac_hdr in db.h
10442 do
10443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10445 echo "configure:10446: checking for $ac_hdr" >&5
10446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10447   echo $ac_n "(cached) $ac_c" 1>&6
10448 else
10449   cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452 #include <$ac_hdr>
10453 EOF
10454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10455 { (eval echo configure:10456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10457 if test -z "$ac_err"; then
10458   rm -rf conftest*
10459   eval "ac_cv_header_$ac_safe=yes"
10460 else
10461   echo "$ac_err" >&5
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_header_$ac_safe=no"
10466 fi
10467 rm -f conftest*
10468 fi
10469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10470   echo "$ac_t""yes" 1>&6
10471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10472   cat >> confdefs.h <<EOF
10473 #define $ac_tr_hdr 1
10474 EOF
10475  
10476 else
10477   echo "$ac_t""no" 1>&6
10478 fi
10479 done
10480
10481 if test $ac_cv_header_db_h = yes ; then
10482         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10483 echo "configure:10484: checking if db.h is DB2" >&5
10484 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10485   echo $ac_n "(cached) $ac_c" 1>&6
10486 else
10487   
10488                 cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491
10492 #                       include <db.h>
10493                         /* this check could be improved */
10494 #                       ifdef DB_VERSION_MAJOR
10495 #                               if DB_VERSION_MAJOR == 2
10496                                         __db_version_2
10497 #                               endif
10498 #                       endif
10499                 
10500 EOF
10501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10502   egrep "__db_version_2" >/dev/null 2>&1; then
10503   rm -rf conftest*
10504   ol_cv_header_db2=yes
10505 else
10506   rm -rf conftest*
10507   ol_cv_header_db2=no
10508 fi
10509 rm -f conftest*
10510
10511 fi
10512
10513 echo "$ac_t""$ol_cv_header_db2" 1>&6
10514 else
10515         ol_cv_header_db2=no
10516 fi
10517
10518
10519  
10520  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10521 echo "configure:10522: checking for Berkeley DB2" >&5
10522 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10523   echo $ac_n "(cached) $ac_c" 1>&6
10524 else
10525   
10526         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10527                 ol_cv_berkeley_db2=no
10528         else
10529                 ol_cv_berkeley_db2=yes
10530         fi
10531
10532 fi
10533
10534 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10535  if test $ol_cv_berkeley_db2 = yes ; then
10536         cat >> confdefs.h <<\EOF
10537 #define HAVE_BERKELEY_DB2 1
10538 EOF
10539
10540  fi
10541
10542
10543         if test $ol_cv_berkeley_db2 = yes ; then
10544                 ol_link_ldbm=db2
10545                 ol_with_ldbm_api=db2
10546
10547                 if test $ol_with_ldbm_type = hash ; then
10548                         cat >> confdefs.h <<\EOF
10549 #define LDBM_USE_DBHASH 1
10550 EOF
10551
10552                 else
10553                         cat >> confdefs.h <<\EOF
10554 #define LDBM_USE_DBBTREE 1
10555 EOF
10556
10557                 fi
10558
10559                                                 if test $ol_cv_lib_db2 != yes ; then
10560                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10561                 fi
10562         fi
10563 fi
10564
10565 ol_link_bdb2=no
10566 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10567         ol_link_bdb2=yes
10568 fi
10569
10570 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10571         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10572 echo "configure:10573: checking for Berkeley DB library" >&5
10573 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10574   echo $ac_n "(cached) $ac_c" 1>&6
10575 else
10576   
10577         for ac_hdr in db1/db.h
10578 do
10579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10581 echo "configure:10582: checking for $ac_hdr" >&5
10582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588 #include <$ac_hdr>
10589 EOF
10590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10591 { (eval echo configure:10592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10593 if test -z "$ac_err"; then
10594   rm -rf conftest*
10595   eval "ac_cv_header_$ac_safe=yes"
10596 else
10597   echo "$ac_err" >&5
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -rf conftest*
10601   eval "ac_cv_header_$ac_safe=no"
10602 fi
10603 rm -f conftest*
10604 fi
10605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10606   echo "$ac_t""yes" 1>&6
10607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10608   cat >> confdefs.h <<EOF
10609 #define $ac_tr_hdr 1
10610 EOF
10611  
10612 else
10613   echo "$ac_t""no" 1>&6
10614 fi
10615 done
10616
10617         ol_LIBS="$LIBS"
10618         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10619 echo "configure:10620: checking for dbopen" >&5
10620 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10621   echo $ac_n "(cached) $ac_c" 1>&6
10622 else
10623   cat > conftest.$ac_ext <<EOF
10624 #line 10625 "configure"
10625 #include "confdefs.h"
10626 /* System header to define __stub macros and hopefully few prototypes,
10627     which can conflict with char dbopen(); below.  */
10628 #include <assert.h>
10629 /* Override any gcc2 internal prototype to avoid an error.  */
10630 /* We use char because int might match the return type of a gcc2
10631     builtin and then its argument prototype would still apply.  */
10632 char dbopen();
10633 char (*f)();
10634
10635 int main() {
10636
10637 /* The GNU C library defines this for functions which it implements
10638     to always fail with ENOSYS.  Some functions are actually named
10639     something starting with __ and the normal name is an alias.  */
10640 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10641 choke me
10642 #else
10643 f = dbopen;
10644 #endif
10645
10646 ; return 0; }
10647 EOF
10648 if { (eval echo configure:10649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10649   rm -rf conftest*
10650   eval "ac_cv_func_dbopen=yes"
10651 else
10652   echo "configure: failed program was:" >&5
10653   cat conftest.$ac_ext >&5
10654   rm -rf conftest*
10655   eval "ac_cv_func_dbopen=no"
10656 fi
10657 rm -f conftest*
10658 fi
10659
10660 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10661   echo "$ac_t""yes" 1>&6
10662   ol_cv_lib_db=yes
10663 else
10664   echo "$ac_t""no" 1>&6
10665
10666                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10667 echo "configure:10668: checking for dbopen in -ldb1" >&5
10668 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10670   echo $ac_n "(cached) $ac_c" 1>&6
10671 else
10672   ac_save_LIBS="$LIBS"
10673 LIBS="-ldb1  $LIBS"
10674 cat > conftest.$ac_ext <<EOF
10675 #line 10676 "configure"
10676 #include "confdefs.h"
10677 /* Override any gcc2 internal prototype to avoid an error.  */
10678 /* We use char because int might match the return type of a gcc2
10679     builtin and then its argument prototype would still apply.  */
10680 char dbopen();
10681
10682 int main() {
10683 dbopen()
10684 ; return 0; }
10685 EOF
10686 if { (eval echo configure:10687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10687   rm -rf conftest*
10688   eval "ac_cv_lib_$ac_lib_var=yes"
10689 else
10690   echo "configure: failed program was:" >&5
10691   cat conftest.$ac_ext >&5
10692   rm -rf conftest*
10693   eval "ac_cv_lib_$ac_lib_var=no"
10694 fi
10695 rm -f conftest*
10696 LIBS="$ac_save_LIBS"
10697
10698 fi
10699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10700   echo "$ac_t""yes" 1>&6
10701   ol_cv_lib_db=-ldb1
10702 else
10703   echo "$ac_t""no" 1>&6
10704
10705                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10706 echo "configure:10707: checking for dbopen in -ldb" >&5
10707 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   ac_save_LIBS="$LIBS"
10712 LIBS="-ldb  $LIBS"
10713 cat > conftest.$ac_ext <<EOF
10714 #line 10715 "configure"
10715 #include "confdefs.h"
10716 /* Override any gcc2 internal prototype to avoid an error.  */
10717 /* We use char because int might match the return type of a gcc2
10718     builtin and then its argument prototype would still apply.  */
10719 char dbopen();
10720
10721 int main() {
10722 dbopen()
10723 ; return 0; }
10724 EOF
10725 if { (eval echo configure:10726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10726   rm -rf conftest*
10727   eval "ac_cv_lib_$ac_lib_var=yes"
10728 else
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -rf conftest*
10732   eval "ac_cv_lib_$ac_lib_var=no"
10733 fi
10734 rm -f conftest*
10735 LIBS="$ac_save_LIBS"
10736
10737 fi
10738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10739   echo "$ac_t""yes" 1>&6
10740   ol_cv_lib_db=-ldb
10741 else
10742   echo "$ac_t""no" 1>&6
10743 ol_cv_lib_db=no
10744 fi
10745
10746                 
10747 fi
10748
10749         
10750 fi
10751
10752         LIBS="$ol_LIBS"
10753
10754 fi
10755
10756 echo "$ac_t""$ol_cv_lib_db" 1>&6
10757
10758
10759 for ac_hdr in db_185.h
10760 do
10761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10763 echo "configure:10764: checking for $ac_hdr" >&5
10764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770 #include <$ac_hdr>
10771 EOF
10772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10773 { (eval echo configure:10774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10775 if test -z "$ac_err"; then
10776   rm -rf conftest*
10777   eval "ac_cv_header_$ac_safe=yes"
10778 else
10779   echo "$ac_err" >&5
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_header_$ac_safe=no"
10784 fi
10785 rm -f conftest*
10786 fi
10787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10788   echo "$ac_t""yes" 1>&6
10789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10790   cat >> confdefs.h <<EOF
10791 #define $ac_tr_hdr 1
10792 EOF
10793  
10794 else
10795   echo "$ac_t""no" 1>&6
10796 fi
10797 done
10798
10799 if test "$ol_cv_header_db2" = yes ; then
10800         
10801         ol_cv_header_db=$ac_cv_header_db_185_h
10802 else
10803         ol_cv_header_db=$ac_cv_header_db_h
10804 fi
10805
10806
10807  
10808  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10809 echo "configure:10810: checking for Berkeley DB" >&5
10810 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   
10814         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10815                 ol_cv_berkeley_db=no
10816         else
10817                 ol_cv_berkeley_db=yes
10818         fi
10819
10820 fi
10821
10822 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10823  if test $ol_cv_berkeley_db = yes ; then
10824         cat >> confdefs.h <<\EOF
10825 #define HAVE_BERKELEY_DB 1
10826 EOF
10827
10828  fi
10829
10830
10831         if test $ol_cv_berkeley_db = yes ; then
10832                 ol_link_ldbm=db
10833                 ol_with_ldbm_api=db
10834
10835                 if test $ol_with_ldbm_type = hash ; then
10836                         cat >> confdefs.h <<\EOF
10837 #define LDBM_USE_DBHASH 1
10838 EOF
10839
10840                 else
10841                         cat >> confdefs.h <<\EOF
10842 #define LDBM_USE_DBBTREE 1
10843 EOF
10844
10845                 fi
10846
10847                                                 if test $ol_cv_lib_db != yes ; then
10848                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10849                 fi
10850         fi
10851 fi
10852
10853 if test $ol_with_ldbm_api = manual ; then
10854                 ol_link_ldbm=yes
10855
10856         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10857
10858         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10859 do
10860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10862 echo "configure:10863: checking for $ac_hdr" >&5
10863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869 #include <$ac_hdr>
10870 EOF
10871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10872 { (eval echo configure:10873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10874 if test -z "$ac_err"; then
10875   rm -rf conftest*
10876   eval "ac_cv_header_$ac_safe=yes"
10877 else
10878   echo "$ac_err" >&5
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   eval "ac_cv_header_$ac_safe=no"
10883 fi
10884 rm -f conftest*
10885 fi
10886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10889   cat >> confdefs.h <<EOF
10890 #define $ac_tr_hdr 1
10891 EOF
10892  
10893 else
10894   echo "$ac_t""no" 1>&6
10895 fi
10896 done
10897
10898 fi
10899
10900 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10901         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10902         ol_with_ldbm_api=none
10903 fi
10904
10905 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10906         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10907 echo "configure:10908: checking for MDBM library" >&5
10908 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10909   echo $ac_n "(cached) $ac_c" 1>&6
10910 else
10911         ol_LIBS="$LIBS"
10912         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10913 echo "configure:10914: checking for mdbm_set_chain" >&5
10914 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10915   echo $ac_n "(cached) $ac_c" 1>&6
10916 else
10917   cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920 /* System header to define __stub macros and hopefully few prototypes,
10921     which can conflict with char mdbm_set_chain(); below.  */
10922 #include <assert.h>
10923 /* Override any gcc2 internal prototype to avoid an error.  */
10924 /* We use char because int might match the return type of a gcc2
10925     builtin and then its argument prototype would still apply.  */
10926 char mdbm_set_chain();
10927 char (*f)();
10928
10929 int main() {
10930
10931 /* The GNU C library defines this for functions which it implements
10932     to always fail with ENOSYS.  Some functions are actually named
10933     something starting with __ and the normal name is an alias.  */
10934 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10935 choke me
10936 #else
10937 f = mdbm_set_chain;
10938 #endif
10939
10940 ; return 0; }
10941 EOF
10942 if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10943   rm -rf conftest*
10944   eval "ac_cv_func_mdbm_set_chain=yes"
10945 else
10946   echo "configure: failed program was:" >&5
10947   cat conftest.$ac_ext >&5
10948   rm -rf conftest*
10949   eval "ac_cv_func_mdbm_set_chain=no"
10950 fi
10951 rm -f conftest*
10952 fi
10953
10954 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10955   echo "$ac_t""yes" 1>&6
10956   ol_cv_lib_mdbm=yes
10957 else
10958   echo "$ac_t""no" 1>&6
10959
10960                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10961 echo "configure:10962: checking for mdbm_set_chain in -lmdbm" >&5
10962 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10964   echo $ac_n "(cached) $ac_c" 1>&6
10965 else
10966   ac_save_LIBS="$LIBS"
10967 LIBS="-lmdbm  $LIBS"
10968 cat > conftest.$ac_ext <<EOF
10969 #line 10970 "configure"
10970 #include "confdefs.h"
10971 /* Override any gcc2 internal prototype to avoid an error.  */
10972 /* We use char because int might match the return type of a gcc2
10973     builtin and then its argument prototype would still apply.  */
10974 char mdbm_set_chain();
10975
10976 int main() {
10977 mdbm_set_chain()
10978 ; return 0; }
10979 EOF
10980 if { (eval echo configure:10981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10981   rm -rf conftest*
10982   eval "ac_cv_lib_$ac_lib_var=yes"
10983 else
10984   echo "configure: failed program was:" >&5
10985   cat conftest.$ac_ext >&5
10986   rm -rf conftest*
10987   eval "ac_cv_lib_$ac_lib_var=no"
10988 fi
10989 rm -f conftest*
10990 LIBS="$ac_save_LIBS"
10991
10992 fi
10993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10994   echo "$ac_t""yes" 1>&6
10995   ol_cv_lib_mdbm=-lmdbm
10996 else
10997   echo "$ac_t""no" 1>&6
10998 ol_cv_lib_mdbm=no
10999 fi
11000
11001         
11002 fi
11003
11004         LIBS="$ol_LIBS"
11005
11006 fi
11007
11008 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11009
11010
11011  for ac_hdr in mdbm.h
11012 do
11013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11015 echo "configure:11016: checking for $ac_hdr" >&5
11016 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11017   echo $ac_n "(cached) $ac_c" 1>&6
11018 else
11019   cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 #include <$ac_hdr>
11023 EOF
11024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11025 { (eval echo configure:11026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11027 if test -z "$ac_err"; then
11028   rm -rf conftest*
11029   eval "ac_cv_header_$ac_safe=yes"
11030 else
11031   echo "$ac_err" >&5
11032   echo "configure: failed program was:" >&5
11033   cat conftest.$ac_ext >&5
11034   rm -rf conftest*
11035   eval "ac_cv_header_$ac_safe=no"
11036 fi
11037 rm -f conftest*
11038 fi
11039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11040   echo "$ac_t""yes" 1>&6
11041     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11042   cat >> confdefs.h <<EOF
11043 #define $ac_tr_hdr 1
11044 EOF
11045  
11046 else
11047   echo "$ac_t""no" 1>&6
11048 fi
11049 done
11050
11051  echo $ac_n "checking for db""... $ac_c" 1>&6
11052 echo "configure:11053: checking for db" >&5
11053 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11054   echo $ac_n "(cached) $ac_c" 1>&6
11055 else
11056   
11057         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11058                 ol_cv_mdbm=no
11059         else
11060                 ol_cv_mdbm=yes
11061         fi
11062
11063 fi
11064
11065 echo "$ac_t""$ol_cv_mdbm" 1>&6
11066  if test $ol_cv_mdbm = yes ; then
11067         cat >> confdefs.h <<\EOF
11068 #define HAVE_MDBM 1
11069 EOF
11070
11071  fi
11072
11073
11074         if test $ol_cv_mdbm = yes ; then
11075                 ol_link_ldbm=mdbm
11076                 ol_with_ldbm_api=mdbm
11077                 if test $ol_cv_lib_mdbm != yes ; then
11078                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11079                 fi
11080         fi
11081 fi
11082
11083 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11084         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11085 echo "configure:11086: checking for GDBM library" >&5
11086 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089         ol_LIBS="$LIBS"
11090         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11091 echo "configure:11092: checking for gdbm_open" >&5
11092 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11093   echo $ac_n "(cached) $ac_c" 1>&6
11094 else
11095   cat > conftest.$ac_ext <<EOF
11096 #line 11097 "configure"
11097 #include "confdefs.h"
11098 /* System header to define __stub macros and hopefully few prototypes,
11099     which can conflict with char gdbm_open(); below.  */
11100 #include <assert.h>
11101 /* Override any gcc2 internal prototype to avoid an error.  */
11102 /* We use char because int might match the return type of a gcc2
11103     builtin and then its argument prototype would still apply.  */
11104 char gdbm_open();
11105 char (*f)();
11106
11107 int main() {
11108
11109 /* The GNU C library defines this for functions which it implements
11110     to always fail with ENOSYS.  Some functions are actually named
11111     something starting with __ and the normal name is an alias.  */
11112 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11113 choke me
11114 #else
11115 f = gdbm_open;
11116 #endif
11117
11118 ; return 0; }
11119 EOF
11120 if { (eval echo configure:11121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11121   rm -rf conftest*
11122   eval "ac_cv_func_gdbm_open=yes"
11123 else
11124   echo "configure: failed program was:" >&5
11125   cat conftest.$ac_ext >&5
11126   rm -rf conftest*
11127   eval "ac_cv_func_gdbm_open=no"
11128 fi
11129 rm -f conftest*
11130 fi
11131
11132 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11133   echo "$ac_t""yes" 1>&6
11134   ol_cv_lib_gdbm=yes
11135 else
11136   echo "$ac_t""no" 1>&6
11137
11138                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11139 echo "configure:11140: checking for gdbm_open in -lgdbm" >&5
11140 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11141 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11142   echo $ac_n "(cached) $ac_c" 1>&6
11143 else
11144   ac_save_LIBS="$LIBS"
11145 LIBS="-lgdbm  $LIBS"
11146 cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149 /* Override any gcc2 internal prototype to avoid an error.  */
11150 /* We use char because int might match the return type of a gcc2
11151     builtin and then its argument prototype would still apply.  */
11152 char gdbm_open();
11153
11154 int main() {
11155 gdbm_open()
11156 ; return 0; }
11157 EOF
11158 if { (eval echo configure:11159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11159   rm -rf conftest*
11160   eval "ac_cv_lib_$ac_lib_var=yes"
11161 else
11162   echo "configure: failed program was:" >&5
11163   cat conftest.$ac_ext >&5
11164   rm -rf conftest*
11165   eval "ac_cv_lib_$ac_lib_var=no"
11166 fi
11167 rm -f conftest*
11168 LIBS="$ac_save_LIBS"
11169
11170 fi
11171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11172   echo "$ac_t""yes" 1>&6
11173   ol_cv_lib_gdbm=-lgdbm
11174 else
11175   echo "$ac_t""no" 1>&6
11176 ol_cv_lib_gdbm=no
11177 fi
11178
11179         
11180 fi
11181
11182         LIBS="$ol_LIBS"
11183
11184 fi
11185
11186 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11187
11188
11189  for ac_hdr in gdbm.h
11190 do
11191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11193 echo "configure:11194: checking for $ac_hdr" >&5
11194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197   cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include <$ac_hdr>
11201 EOF
11202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11203 { (eval echo configure:11204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11205 if test -z "$ac_err"; then
11206   rm -rf conftest*
11207   eval "ac_cv_header_$ac_safe=yes"
11208 else
11209   echo "$ac_err" >&5
11210   echo "configure: failed program was:" >&5
11211   cat conftest.$ac_ext >&5
11212   rm -rf conftest*
11213   eval "ac_cv_header_$ac_safe=no"
11214 fi
11215 rm -f conftest*
11216 fi
11217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11218   echo "$ac_t""yes" 1>&6
11219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11220   cat >> confdefs.h <<EOF
11221 #define $ac_tr_hdr 1
11222 EOF
11223  
11224 else
11225   echo "$ac_t""no" 1>&6
11226 fi
11227 done
11228
11229  echo $ac_n "checking for db""... $ac_c" 1>&6
11230 echo "configure:11231: checking for db" >&5
11231 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11232   echo $ac_n "(cached) $ac_c" 1>&6
11233 else
11234   
11235         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11236                 ol_cv_gdbm=no
11237         else
11238                 ol_cv_gdbm=yes
11239         fi
11240
11241 fi
11242
11243 echo "$ac_t""$ol_cv_gdbm" 1>&6
11244  if test $ol_cv_gdbm = yes ; then
11245         cat >> confdefs.h <<\EOF
11246 #define HAVE_GDBM 1
11247 EOF
11248
11249  fi
11250
11251
11252         if test $ol_cv_gdbm = yes ; then
11253                 ol_link_ldbm=gdbm
11254                 ol_with_ldbm_api=gdbm
11255
11256                 if test $ol_cv_lib_gdbm != yes ; then
11257                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11258                 fi
11259         fi
11260 fi
11261
11262 if test $ol_with_ldbm_api = auto ; then
11263         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11264 elif test $ol_with_ldbm_api = ndbm ; then
11265         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11266 echo "configure:11267: checking for NDBM library" >&5
11267 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11268   echo $ac_n "(cached) $ac_c" 1>&6
11269 else
11270         ol_LIBS="$LIBS"
11271         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11272 echo "configure:11273: checking for dbm_open" >&5
11273 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11274   echo $ac_n "(cached) $ac_c" 1>&6
11275 else
11276   cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 /* System header to define __stub macros and hopefully few prototypes,
11280     which can conflict with char dbm_open(); below.  */
11281 #include <assert.h>
11282 /* Override any gcc2 internal prototype to avoid an error.  */
11283 /* We use char because int might match the return type of a gcc2
11284     builtin and then its argument prototype would still apply.  */
11285 char dbm_open();
11286 char (*f)();
11287
11288 int main() {
11289
11290 /* The GNU C library defines this for functions which it implements
11291     to always fail with ENOSYS.  Some functions are actually named
11292     something starting with __ and the normal name is an alias.  */
11293 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11294 choke me
11295 #else
11296 f = dbm_open;
11297 #endif
11298
11299 ; return 0; }
11300 EOF
11301 if { (eval echo configure:11302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11302   rm -rf conftest*
11303   eval "ac_cv_func_dbm_open=yes"
11304 else
11305   echo "configure: failed program was:" >&5
11306   cat conftest.$ac_ext >&5
11307   rm -rf conftest*
11308   eval "ac_cv_func_dbm_open=no"
11309 fi
11310 rm -f conftest*
11311 fi
11312
11313 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11314   echo "$ac_t""yes" 1>&6
11315   ol_cv_lib_ndbm=yes
11316 else
11317   echo "$ac_t""no" 1>&6
11318
11319                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11320 echo "configure:11321: checking for dbm_open in -lndbm" >&5
11321 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11323   echo $ac_n "(cached) $ac_c" 1>&6
11324 else
11325   ac_save_LIBS="$LIBS"
11326 LIBS="-lndbm  $LIBS"
11327 cat > conftest.$ac_ext <<EOF
11328 #line 11329 "configure"
11329 #include "confdefs.h"
11330 /* Override any gcc2 internal prototype to avoid an error.  */
11331 /* We use char because int might match the return type of a gcc2
11332     builtin and then its argument prototype would still apply.  */
11333 char dbm_open();
11334
11335 int main() {
11336 dbm_open()
11337 ; return 0; }
11338 EOF
11339 if { (eval echo configure:11340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11340   rm -rf conftest*
11341   eval "ac_cv_lib_$ac_lib_var=yes"
11342 else
11343   echo "configure: failed program was:" >&5
11344   cat conftest.$ac_ext >&5
11345   rm -rf conftest*
11346   eval "ac_cv_lib_$ac_lib_var=no"
11347 fi
11348 rm -f conftest*
11349 LIBS="$ac_save_LIBS"
11350
11351 fi
11352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11353   echo "$ac_t""yes" 1>&6
11354   ol_cv_lib_ndbm=-lndbm
11355 else
11356   echo "$ac_t""no" 1>&6
11357
11358                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11359 echo "configure:11360: checking for dbm_open in -ldbm" >&5
11360 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11362   echo $ac_n "(cached) $ac_c" 1>&6
11363 else
11364   ac_save_LIBS="$LIBS"
11365 LIBS="-ldbm  $LIBS"
11366 cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 /* Override any gcc2 internal prototype to avoid an error.  */
11370 /* We use char because int might match the return type of a gcc2
11371     builtin and then its argument prototype would still apply.  */
11372 char dbm_open();
11373
11374 int main() {
11375 dbm_open()
11376 ; return 0; }
11377 EOF
11378 if { (eval echo configure:11379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11379   rm -rf conftest*
11380   eval "ac_cv_lib_$ac_lib_var=yes"
11381 else
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=no"
11386 fi
11387 rm -f conftest*
11388 LIBS="$ac_save_LIBS"
11389
11390 fi
11391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11392   echo "$ac_t""yes" 1>&6
11393   ol_cv_lib_ndbm=-ldbm
11394 else
11395   echo "$ac_t""no" 1>&6
11396 ol_cv_lib_ndbm=no
11397 fi
11398                 
11399 fi
11400
11401         
11402 fi
11403
11404         LIBS="$ol_LIBS"
11405
11406 fi
11407
11408 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11409
11410
11411  for ac_hdr in ndbm.h
11412 do
11413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11415 echo "configure:11416: checking for $ac_hdr" >&5
11416 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 #include <$ac_hdr>
11423 EOF
11424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11425 { (eval echo configure:11426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11427 if test -z "$ac_err"; then
11428   rm -rf conftest*
11429   eval "ac_cv_header_$ac_safe=yes"
11430 else
11431   echo "$ac_err" >&5
11432   echo "configure: failed program was:" >&5
11433   cat conftest.$ac_ext >&5
11434   rm -rf conftest*
11435   eval "ac_cv_header_$ac_safe=no"
11436 fi
11437 rm -f conftest*
11438 fi
11439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11440   echo "$ac_t""yes" 1>&6
11441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11442   cat >> confdefs.h <<EOF
11443 #define $ac_tr_hdr 1
11444 EOF
11445  
11446 else
11447   echo "$ac_t""no" 1>&6
11448 fi
11449 done
11450
11451  echo $ac_n "checking for db""... $ac_c" 1>&6
11452 echo "configure:11453: checking for db" >&5
11453 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11454   echo $ac_n "(cached) $ac_c" 1>&6
11455 else
11456   
11457         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11458                 ol_cv_ndbm=no
11459         else
11460                 ol_cv_ndbm=yes
11461         fi
11462
11463 fi
11464
11465 echo "$ac_t""$ol_cv_ndbm" 1>&6
11466  if test $ol_cv_ndbm = yes ; then
11467         cat >> confdefs.h <<\EOF
11468 #define HAVE_NDBM 1
11469 EOF
11470
11471  fi
11472
11473
11474         if test $ol_cv_ndbm = yes ; then
11475                 ol_link_ldbm=ndbm
11476                 ol_with_ldbm_api=ndbm
11477
11478                 if test $ol_cv_lib_ndbm != yes ; then
11479                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11480                 fi
11481         fi
11482 fi
11483
11484 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11485         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11486         if test $ol_enable_ldbm = yes ; then
11487                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11488         fi
11489
11490         echo "configure: warning: disabling LDBM" 1>&2
11491         ol_enable_ldbm=no
11492 fi
11493
11494 if test $ol_enable_wrappers != no ; then
11495         for ac_hdr in tcpd.h
11496 do
11497 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11498 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11499 echo "configure:11500: checking for $ac_hdr" >&5
11500 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11501   echo $ac_n "(cached) $ac_c" 1>&6
11502 else
11503   cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 #include <$ac_hdr>
11507 EOF
11508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11509 { (eval echo configure:11510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11511 if test -z "$ac_err"; then
11512   rm -rf conftest*
11513   eval "ac_cv_header_$ac_safe=yes"
11514 else
11515   echo "$ac_err" >&5
11516   echo "configure: failed program was:" >&5
11517   cat conftest.$ac_ext >&5
11518   rm -rf conftest*
11519   eval "ac_cv_header_$ac_safe=no"
11520 fi
11521 rm -f conftest*
11522 fi
11523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11524   echo "$ac_t""yes" 1>&6
11525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11526   cat >> confdefs.h <<EOF
11527 #define $ac_tr_hdr 1
11528 EOF
11529  
11530 else
11531   echo "$ac_t""no" 1>&6
11532 fi
11533 done
11534
11535
11536         if test $ac_cv_header_tcpd_h != yes ; then
11537                 have_wrappers=no
11538         else
11539                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11540 echo "configure:11541: checking for main in -lwrap" >&5
11541 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11543   echo $ac_n "(cached) $ac_c" 1>&6
11544 else
11545   ac_save_LIBS="$LIBS"
11546 LIBS="-lwrap  $LIBS"
11547 cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550
11551 int main() {
11552 main()
11553 ; return 0; }
11554 EOF
11555 if { (eval echo configure:11556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11556   rm -rf conftest*
11557   eval "ac_cv_lib_$ac_lib_var=yes"
11558 else
11559   echo "configure: failed program was:" >&5
11560   cat conftest.$ac_ext >&5
11561   rm -rf conftest*
11562   eval "ac_cv_lib_$ac_lib_var=no"
11563 fi
11564 rm -f conftest*
11565 LIBS="$ac_save_LIBS"
11566
11567 fi
11568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11569   echo "$ac_t""yes" 1>&6
11570   have_wrappers=yes
11571 else
11572   echo "$ac_t""no" 1>&6
11573 have_wrappers=no
11574 fi
11575
11576         fi
11577
11578         if test $have_wrappers = yes ; then
11579                 cat >> confdefs.h <<\EOF
11580 #define HAVE_TCPD 1
11581 EOF
11582
11583                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11584
11585                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11586 echo "configure:11587: checking for main in -lnsl" >&5
11587 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11589   echo $ac_n "(cached) $ac_c" 1>&6
11590 else
11591   ac_save_LIBS="$LIBS"
11592 LIBS="-lnsl  $LIBS"
11593 cat > conftest.$ac_ext <<EOF
11594 #line 11595 "configure"
11595 #include "confdefs.h"
11596
11597 int main() {
11598 main()
11599 ; return 0; }
11600 EOF
11601 if { (eval echo configure:11602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11602   rm -rf conftest*
11603   eval "ac_cv_lib_$ac_lib_var=yes"
11604 else
11605   echo "configure: failed program was:" >&5
11606   cat conftest.$ac_ext >&5
11607   rm -rf conftest*
11608   eval "ac_cv_lib_$ac_lib_var=no"
11609 fi
11610 rm -f conftest*
11611 LIBS="$ac_save_LIBS"
11612
11613 fi
11614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11615   echo "$ac_t""yes" 1>&6
11616     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11617     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11618   cat >> confdefs.h <<EOF
11619 #define $ac_tr_lib 1
11620 EOF
11621
11622   LIBS="-lnsl $LIBS"
11623
11624 else
11625   echo "$ac_t""no" 1>&6
11626 fi
11627
11628         else
11629                 echo "configure: warning: could not find -lwrap" 1>&2
11630                 if test $ol_enable_wrappers = yes ; then
11631                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11632                 fi
11633
11634                 echo "configure: warning: disabling wrappers support" 1>&2
11635                 ol_enable_wrappers=no
11636         fi
11637 fi
11638
11639 if test $ol_enable_syslog != no ; then
11640         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11641 echo "configure:11642: checking for openlog" >&5
11642 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11643   echo $ac_n "(cached) $ac_c" 1>&6
11644 else
11645   cat > conftest.$ac_ext <<EOF
11646 #line 11647 "configure"
11647 #include "confdefs.h"
11648 /* System header to define __stub macros and hopefully few prototypes,
11649     which can conflict with char openlog(); below.  */
11650 #include <assert.h>
11651 /* Override any gcc2 internal prototype to avoid an error.  */
11652 /* We use char because int might match the return type of a gcc2
11653     builtin and then its argument prototype would still apply.  */
11654 char openlog();
11655 char (*f)();
11656
11657 int main() {
11658
11659 /* The GNU C library defines this for functions which it implements
11660     to always fail with ENOSYS.  Some functions are actually named
11661     something starting with __ and the normal name is an alias.  */
11662 #if defined (__stub_openlog) || defined (__stub___openlog)
11663 choke me
11664 #else
11665 f = openlog;
11666 #endif
11667
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11671   rm -rf conftest*
11672   eval "ac_cv_func_openlog=yes"
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   eval "ac_cv_func_openlog=no"
11678 fi
11679 rm -f conftest*
11680 fi
11681
11682 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11683   echo "$ac_t""yes" 1>&6
11684   :
11685 else
11686   echo "$ac_t""no" 1>&6
11687 fi
11688
11689         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11690                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11691         fi
11692         ol_enable_syslog=$ac_cv_func_openlog
11693 fi
11694
11695 if test $ol_enable_dmalloc != no ; then
11696         for ac_hdr in dmalloc.h
11697 do
11698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11700 echo "configure:11701: checking for $ac_hdr" >&5
11701 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11702   echo $ac_n "(cached) $ac_c" 1>&6
11703 else
11704   cat > conftest.$ac_ext <<EOF
11705 #line 11706 "configure"
11706 #include "confdefs.h"
11707 #include <$ac_hdr>
11708 EOF
11709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11710 { (eval echo configure:11711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11712 if test -z "$ac_err"; then
11713   rm -rf conftest*
11714   eval "ac_cv_header_$ac_safe=yes"
11715 else
11716   echo "$ac_err" >&5
11717   echo "configure: failed program was:" >&5
11718   cat conftest.$ac_ext >&5
11719   rm -rf conftest*
11720   eval "ac_cv_header_$ac_safe=no"
11721 fi
11722 rm -f conftest*
11723 fi
11724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11725   echo "$ac_t""yes" 1>&6
11726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11727   cat >> confdefs.h <<EOF
11728 #define $ac_tr_hdr 1
11729 EOF
11730  
11731 else
11732   echo "$ac_t""no" 1>&6
11733 fi
11734 done
11735
11736         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11737 echo "configure:11738: checking for dmalloc_shutdown in -ldmalloc" >&5
11738 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11740   echo $ac_n "(cached) $ac_c" 1>&6
11741 else
11742   ac_save_LIBS="$LIBS"
11743 LIBS="-ldmalloc  $LIBS"
11744 cat > conftest.$ac_ext <<EOF
11745 #line 11746 "configure"
11746 #include "confdefs.h"
11747 /* Override any gcc2 internal prototype to avoid an error.  */
11748 /* We use char because int might match the return type of a gcc2
11749     builtin and then its argument prototype would still apply.  */
11750 char dmalloc_shutdown();
11751
11752 int main() {
11753 dmalloc_shutdown()
11754 ; return 0; }
11755 EOF
11756 if { (eval echo configure:11757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11757   rm -rf conftest*
11758   eval "ac_cv_lib_$ac_lib_var=yes"
11759 else
11760   echo "configure: failed program was:" >&5
11761   cat conftest.$ac_ext >&5
11762   rm -rf conftest*
11763   eval "ac_cv_lib_$ac_lib_var=no"
11764 fi
11765 rm -f conftest*
11766 LIBS="$ac_save_LIBS"
11767
11768 fi
11769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11770   echo "$ac_t""yes" 1>&6
11771     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11772     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11773   cat >> confdefs.h <<EOF
11774 #define $ac_tr_lib 1
11775 EOF
11776
11777   LIBS="-ldmalloc $LIBS"
11778
11779 else
11780   echo "$ac_t""no" 1>&6
11781 fi
11782
11783 fi
11784
11785 if test $ol_enable_tcl != no ; then
11786         for ac_hdr in tcl.h
11787 do
11788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11790 echo "configure:11791: checking for $ac_hdr" >&5
11791 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11792   echo $ac_n "(cached) $ac_c" 1>&6
11793 else
11794   cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797 #include <$ac_hdr>
11798 EOF
11799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11800 { (eval echo configure:11801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11802 if test -z "$ac_err"; then
11803   rm -rf conftest*
11804   eval "ac_cv_header_$ac_safe=yes"
11805 else
11806   echo "$ac_err" >&5
11807   echo "configure: failed program was:" >&5
11808   cat conftest.$ac_ext >&5
11809   rm -rf conftest*
11810   eval "ac_cv_header_$ac_safe=no"
11811 fi
11812 rm -f conftest*
11813 fi
11814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11815   echo "$ac_t""yes" 1>&6
11816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11817   cat >> confdefs.h <<EOF
11818 #define $ac_tr_hdr 1
11819 EOF
11820  
11821 else
11822   echo "$ac_t""no" 1>&6
11823 fi
11824 done
11825
11826
11827         if test $ac_cv_header_tcl_h != yes ; then
11828                 have_tcl=no
11829         else
11830                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11831 echo "configure:11832: checking for main in -ltcl" >&5
11832 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11833 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11834   echo $ac_n "(cached) $ac_c" 1>&6
11835 else
11836   ac_save_LIBS="$LIBS"
11837 LIBS="-ltcl  $LIBS"
11838 cat > conftest.$ac_ext <<EOF
11839 #line 11840 "configure"
11840 #include "confdefs.h"
11841
11842 int main() {
11843 main()
11844 ; return 0; }
11845 EOF
11846 if { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11847   rm -rf conftest*
11848   eval "ac_cv_lib_$ac_lib_var=yes"
11849 else
11850   echo "configure: failed program was:" >&5
11851   cat conftest.$ac_ext >&5
11852   rm -rf conftest*
11853   eval "ac_cv_lib_$ac_lib_var=no"
11854 fi
11855 rm -f conftest*
11856 LIBS="$ac_save_LIBS"
11857
11858 fi
11859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11860   echo "$ac_t""yes" 1>&6
11861   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11862 else
11863   echo "$ac_t""no" 1>&6
11864 have_tcl=no
11865 fi
11866
11867
11868                 if test $have_tcl != yes; then
11869                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11870 echo "configure:11871: checking for main in -ltcl7.6" >&5
11871 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11873   echo $ac_n "(cached) $ac_c" 1>&6
11874 else
11875   ac_save_LIBS="$LIBS"
11876 LIBS="-ltcl7.6  $LIBS"
11877 cat > conftest.$ac_ext <<EOF
11878 #line 11879 "configure"
11879 #include "confdefs.h"
11880
11881 int main() {
11882 main()
11883 ; return 0; }
11884 EOF
11885 if { (eval echo configure:11886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11886   rm -rf conftest*
11887   eval "ac_cv_lib_$ac_lib_var=yes"
11888 else
11889   echo "configure: failed program was:" >&5
11890   cat conftest.$ac_ext >&5
11891   rm -rf conftest*
11892   eval "ac_cv_lib_$ac_lib_var=no"
11893 fi
11894 rm -f conftest*
11895 LIBS="$ac_save_LIBS"
11896
11897 fi
11898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11899   echo "$ac_t""yes" 1>&6
11900   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11901 else
11902   echo "$ac_t""no" 1>&6
11903 have_tcl=no
11904 fi
11905
11906                 fi
11907
11908                 if test $have_tcl != yes; then
11909                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11910 echo "configure:11911: checking for main in -ltcl8.0" >&5
11911 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11913   echo $ac_n "(cached) $ac_c" 1>&6
11914 else
11915   ac_save_LIBS="$LIBS"
11916 LIBS="-ltcl8.0  $LIBS"
11917 cat > conftest.$ac_ext <<EOF
11918 #line 11919 "configure"
11919 #include "confdefs.h"
11920
11921 int main() {
11922 main()
11923 ; return 0; }
11924 EOF
11925 if { (eval echo configure:11926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11926   rm -rf conftest*
11927   eval "ac_cv_lib_$ac_lib_var=yes"
11928 else
11929   echo "configure: failed program was:" >&5
11930   cat conftest.$ac_ext >&5
11931   rm -rf conftest*
11932   eval "ac_cv_lib_$ac_lib_var=no"
11933 fi
11934 rm -f conftest*
11935 LIBS="$ac_save_LIBS"
11936
11937 fi
11938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11939   echo "$ac_t""yes" 1>&6
11940   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11941 else
11942   echo "$ac_t""no" 1>&6
11943 have_tcl=no
11944 fi
11945
11946                 fi
11947         fi
11948
11949         if test $have_tcl != yes ; then
11950                 echo "configure: warning: could not find -ltcl" 1>&2
11951                 if test $ol_enable_tcl = yes ; then
11952                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11953                 fi
11954
11955                 ol_enable_tcl=no
11956         fi
11957 fi
11958
11959 # ud needs termcap (should insert check here)
11960 ol_link_termcap=no
11961 for ac_hdr in termcap.h ncurses.h
11962 do
11963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11965 echo "configure:11966: checking for $ac_hdr" >&5
11966 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11967   echo $ac_n "(cached) $ac_c" 1>&6
11968 else
11969   cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 #include <$ac_hdr>
11973 EOF
11974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11975 { (eval echo configure:11976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11977 if test -z "$ac_err"; then
11978   rm -rf conftest*
11979   eval "ac_cv_header_$ac_safe=yes"
11980 else
11981   echo "$ac_err" >&5
11982   echo "configure: failed program was:" >&5
11983   cat conftest.$ac_ext >&5
11984   rm -rf conftest*
11985   eval "ac_cv_header_$ac_safe=no"
11986 fi
11987 rm -f conftest*
11988 fi
11989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11990   echo "$ac_t""yes" 1>&6
11991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11992   cat >> confdefs.h <<EOF
11993 #define $ac_tr_hdr 1
11994 EOF
11995  
11996 else
11997   echo "$ac_t""no" 1>&6
11998 fi
11999 done
12000
12001
12002 if test $ol_link_termcap = no ; then
12003         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12004 echo "configure:12005: checking for tputs in -ltermcap" >&5
12005 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12006 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12007   echo $ac_n "(cached) $ac_c" 1>&6
12008 else
12009   ac_save_LIBS="$LIBS"
12010 LIBS="-ltermcap  $LIBS"
12011 cat > conftest.$ac_ext <<EOF
12012 #line 12013 "configure"
12013 #include "confdefs.h"
12014 /* Override any gcc2 internal prototype to avoid an error.  */
12015 /* We use char because int might match the return type of a gcc2
12016     builtin and then its argument prototype would still apply.  */
12017 char tputs();
12018
12019 int main() {
12020 tputs()
12021 ; return 0; }
12022 EOF
12023 if { (eval echo configure:12024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12024   rm -rf conftest*
12025   eval "ac_cv_lib_$ac_lib_var=yes"
12026 else
12027   echo "configure: failed program was:" >&5
12028   cat conftest.$ac_ext >&5
12029   rm -rf conftest*
12030   eval "ac_cv_lib_$ac_lib_var=no"
12031 fi
12032 rm -f conftest*
12033 LIBS="$ac_save_LIBS"
12034
12035 fi
12036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12037   echo "$ac_t""yes" 1>&6
12038   have_termcap=yes
12039 else
12040   echo "$ac_t""no" 1>&6
12041 have_termcap=no
12042 fi
12043
12044         if test $have_termcap = yes ; then
12045                 cat >> confdefs.h <<\EOF
12046 #define HAVE_TERMCAP 1
12047 EOF
12048
12049                 ol_link_termcap=yes
12050                 TERMCAP_LIBS=-ltermcap
12051         fi
12052 fi
12053
12054 if test $ol_link_termcap = no ; then
12055         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12056 echo "configure:12057: checking for initscr in -lncurses" >&5
12057 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12059   echo $ac_n "(cached) $ac_c" 1>&6
12060 else
12061   ac_save_LIBS="$LIBS"
12062 LIBS="-lncurses  $LIBS"
12063 cat > conftest.$ac_ext <<EOF
12064 #line 12065 "configure"
12065 #include "confdefs.h"
12066 /* Override any gcc2 internal prototype to avoid an error.  */
12067 /* We use char because int might match the return type of a gcc2
12068     builtin and then its argument prototype would still apply.  */
12069 char initscr();
12070
12071 int main() {
12072 initscr()
12073 ; return 0; }
12074 EOF
12075 if { (eval echo configure:12076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12076   rm -rf conftest*
12077   eval "ac_cv_lib_$ac_lib_var=yes"
12078 else
12079   echo "configure: failed program was:" >&5
12080   cat conftest.$ac_ext >&5
12081   rm -rf conftest*
12082   eval "ac_cv_lib_$ac_lib_var=no"
12083 fi
12084 rm -f conftest*
12085 LIBS="$ac_save_LIBS"
12086
12087 fi
12088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12089   echo "$ac_t""yes" 1>&6
12090   have_ncurses=yes
12091 else
12092   echo "$ac_t""no" 1>&6
12093 have_ncurses=no
12094 fi
12095
12096         if test $have_ncurses = yes ; then
12097                 cat >> confdefs.h <<\EOF
12098 #define HAVE_NCURSES 1
12099 EOF
12100
12101                 ol_link_termcap=yes
12102                 TERMCAP_LIBS=-lncurses
12103         fi
12104 fi
12105
12106 if test $ol_link_termcap = no ; then
12107         cat >> confdefs.h <<\EOF
12108 #define NO_TERMCAP 1
12109 EOF
12110
12111         TERMCAP_LIBS=
12112 fi
12113
12114 ol_link_sasl=no
12115 if test $ol_with_cyrus_sasl != no ; then
12116         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12117 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12118 echo "configure:12119: checking for sasl.h" >&5
12119 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12120   echo $ac_n "(cached) $ac_c" 1>&6
12121 else
12122   cat > conftest.$ac_ext <<EOF
12123 #line 12124 "configure"
12124 #include "confdefs.h"
12125 #include <sasl.h>
12126 EOF
12127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12128 { (eval echo configure:12129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12130 if test -z "$ac_err"; then
12131   rm -rf conftest*
12132   eval "ac_cv_header_$ac_safe=yes"
12133 else
12134   echo "$ac_err" >&5
12135   echo "configure: failed program was:" >&5
12136   cat conftest.$ac_ext >&5
12137   rm -rf conftest*
12138   eval "ac_cv_header_$ac_safe=no"
12139 fi
12140 rm -f conftest*
12141 fi
12142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12143   echo "$ac_t""yes" 1>&6
12144   :
12145 else
12146   echo "$ac_t""no" 1>&6
12147 fi
12148
12149
12150         if test $ac_cv_header_sasl_h = yes ; then
12151                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12152 echo "configure:12153: checking for sasl_client_init in -lsasl" >&5
12153 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12155   echo $ac_n "(cached) $ac_c" 1>&6
12156 else
12157   ac_save_LIBS="$LIBS"
12158 LIBS="-lsasl  $LIBS"
12159 cat > conftest.$ac_ext <<EOF
12160 #line 12161 "configure"
12161 #include "confdefs.h"
12162 /* Override any gcc2 internal prototype to avoid an error.  */
12163 /* We use char because int might match the return type of a gcc2
12164     builtin and then its argument prototype would still apply.  */
12165 char sasl_client_init();
12166
12167 int main() {
12168 sasl_client_init()
12169 ; return 0; }
12170 EOF
12171 if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12172   rm -rf conftest*
12173   eval "ac_cv_lib_$ac_lib_var=yes"
12174 else
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -rf conftest*
12178   eval "ac_cv_lib_$ac_lib_var=no"
12179 fi
12180 rm -f conftest*
12181 LIBS="$ac_save_LIBS"
12182
12183 fi
12184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12185   echo "$ac_t""yes" 1>&6
12186   have_cyrus_sasl=yes
12187 else
12188   echo "$ac_t""no" 1>&6
12189 have_cyrus_sasl=no
12190 fi
12191
12192
12193                 if test $have_cyrus_sasl != no ; then
12194                         SASL_LIBS="-lsasl"
12195                         cat >> confdefs.h <<\EOF
12196 #define HAVE_CYRUS_SASL 1
12197 EOF
12198
12199                         ol_link_sasl=yes
12200                 fi
12201         fi
12202
12203         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12204                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12205         fi
12206 fi
12207
12208 ol_link_fetch=no
12209 if test $ol_with_fetch != no ; then
12210         ol=$LIBS
12211 LIBS="-lfetch -lcom_err $LIBS"
12212 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12213 echo "configure:12214: checking fetch(3) library" >&5
12214 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12215   echo $ac_n "(cached) $ac_c" 1>&6
12216 else
12217   
12218         cat > conftest.$ac_ext <<EOF
12219 #line 12220 "configure"
12220 #include "confdefs.h"
12221
12222 #include <sys/param.h>
12223 #include <stdio.h>
12224 #include <fetch.h>
12225 int main() {
12226 struct url *u = fetchParseURL("file:///"); 
12227 ; return 0; }
12228 EOF
12229 if { (eval echo configure:12230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12230   rm -rf conftest*
12231   ol_cv_lib_fetch=yes
12232 else
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   ol_cv_lib_fetch=no
12237 fi
12238 rm -f conftest*
12239 fi
12240
12241 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12242 LIBS=$ol_LIBS
12243 if test $ol_cv_lib_fetch != no ; then
12244         ol_link_fetch="-lfetch -lcom_err"
12245         cat >> confdefs.h <<\EOF
12246 #define HAVE_FETCH 1
12247 EOF
12248
12249 fi
12250
12251
12252         if test $ol_cv_lib_fetch != no ; then
12253                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12254                 ol_link_fetch=freebsd
12255
12256         elif test $ol_with_fetch != auto ; then
12257                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12258         fi 
12259 fi
12260
12261 ol_link_readline=no
12262 if test $ol_with_readline != no ; then
12263         for ac_hdr in readline/readline.h readline/history.h
12264 do
12265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12267 echo "configure:12268: checking for $ac_hdr" >&5
12268 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   cat > conftest.$ac_ext <<EOF
12272 #line 12273 "configure"
12273 #include "confdefs.h"
12274 #include <$ac_hdr>
12275 EOF
12276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12277 { (eval echo configure:12278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12279 if test -z "$ac_err"; then
12280   rm -rf conftest*
12281   eval "ac_cv_header_$ac_safe=yes"
12282 else
12283   echo "$ac_err" >&5
12284   echo "configure: failed program was:" >&5
12285   cat conftest.$ac_ext >&5
12286   rm -rf conftest*
12287   eval "ac_cv_header_$ac_safe=no"
12288 fi
12289 rm -f conftest*
12290 fi
12291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12292   echo "$ac_t""yes" 1>&6
12293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12294   cat >> confdefs.h <<EOF
12295 #define $ac_tr_hdr 1
12296 EOF
12297  
12298 else
12299   echo "$ac_t""no" 1>&6
12300 fi
12301 done
12302
12303
12304         if test $ac_cv_header_readline_readline_h = yes ; then
12305                 save_LIBS="$LIBS"
12306                 LIBS="$TERMCAP_LIBS $LIBS"
12307                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12308 echo "configure:12309: checking for readline in -lreadline" >&5
12309 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12311   echo $ac_n "(cached) $ac_c" 1>&6
12312 else
12313   ac_save_LIBS="$LIBS"
12314 LIBS="-lreadline  $LIBS"
12315 cat > conftest.$ac_ext <<EOF
12316 #line 12317 "configure"
12317 #include "confdefs.h"
12318 /* Override any gcc2 internal prototype to avoid an error.  */
12319 /* We use char because int might match the return type of a gcc2
12320     builtin and then its argument prototype would still apply.  */
12321 char readline();
12322
12323 int main() {
12324 readline()
12325 ; return 0; }
12326 EOF
12327 if { (eval echo configure:12328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12328   rm -rf conftest*
12329   eval "ac_cv_lib_$ac_lib_var=yes"
12330 else
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -rf conftest*
12334   eval "ac_cv_lib_$ac_lib_var=no"
12335 fi
12336 rm -f conftest*
12337 LIBS="$ac_save_LIBS"
12338
12339 fi
12340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12341   echo "$ac_t""yes" 1>&6
12342   have_readline=yes
12343 else
12344   echo "$ac_t""no" 1>&6
12345 have_readline=no
12346 fi
12347
12348                 LIBS="$save_LIBS"
12349                         
12350                 if test $have_readline = yes ; then
12351                         ol_with_readline=found
12352                         ol_link_readline=yes
12353
12354                         READLINE_LIBS="-lreadline"
12355                 fi
12356         fi
12357 fi
12358
12359 if test $ol_link_readline = yes ; then
12360         cat >> confdefs.h <<\EOF
12361 #define HAVE_READLINE 1
12362 EOF
12363
12364 fi
12365
12366
12367 # FreeBSD (and others) have crypt(3) in -lcrypt
12368 if test $ol_enable_crypt != no ; then
12369         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12370 echo "configure:12371: checking for crypt" >&5
12371 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12372   echo $ac_n "(cached) $ac_c" 1>&6
12373 else
12374   cat > conftest.$ac_ext <<EOF
12375 #line 12376 "configure"
12376 #include "confdefs.h"
12377 /* System header to define __stub macros and hopefully few prototypes,
12378     which can conflict with char crypt(); below.  */
12379 #include <assert.h>
12380 /* Override any gcc2 internal prototype to avoid an error.  */
12381 /* We use char because int might match the return type of a gcc2
12382     builtin and then its argument prototype would still apply.  */
12383 char crypt();
12384 char (*f)();
12385
12386 int main() {
12387
12388 /* The GNU C library defines this for functions which it implements
12389     to always fail with ENOSYS.  Some functions are actually named
12390     something starting with __ and the normal name is an alias.  */
12391 #if defined (__stub_crypt) || defined (__stub___crypt)
12392 choke me
12393 #else
12394 f = crypt;
12395 #endif
12396
12397 ; return 0; }
12398 EOF
12399 if { (eval echo configure:12400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12400   rm -rf conftest*
12401   eval "ac_cv_func_crypt=yes"
12402 else
12403   echo "configure: failed program was:" >&5
12404   cat conftest.$ac_ext >&5
12405   rm -rf conftest*
12406   eval "ac_cv_func_crypt=no"
12407 fi
12408 rm -f conftest*
12409 fi
12410
12411 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12412   echo "$ac_t""yes" 1>&6
12413   have_crypt=yes
12414 else
12415   echo "$ac_t""no" 1>&6
12416
12417                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12418 echo "configure:12419: checking for crypt in -lcrypt" >&5
12419 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12421   echo $ac_n "(cached) $ac_c" 1>&6
12422 else
12423   ac_save_LIBS="$LIBS"
12424 LIBS="-lcrypt  $LIBS"
12425 cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 /* Override any gcc2 internal prototype to avoid an error.  */
12429 /* We use char because int might match the return type of a gcc2
12430     builtin and then its argument prototype would still apply.  */
12431 char crypt();
12432
12433 int main() {
12434 crypt()
12435 ; return 0; }
12436 EOF
12437 if { (eval echo configure:12438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12438   rm -rf conftest*
12439   eval "ac_cv_lib_$ac_lib_var=yes"
12440 else
12441   echo "configure: failed program was:" >&5
12442   cat conftest.$ac_ext >&5
12443   rm -rf conftest*
12444   eval "ac_cv_lib_$ac_lib_var=no"
12445 fi
12446 rm -f conftest*
12447 LIBS="$ac_save_LIBS"
12448
12449 fi
12450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12451   echo "$ac_t""yes" 1>&6
12452   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12453                         have_crypt=yes
12454 else
12455   echo "$ac_t""no" 1>&6
12456 have_crypt=no
12457 fi
12458
12459 fi
12460
12461
12462         if test $have_crypt = yes ; then
12463                 cat >> confdefs.h <<\EOF
12464 #define HAVE_CRYPT 1
12465 EOF
12466
12467         else
12468                 echo "configure: warning: could not find crypt" 1>&2
12469                 if test $ol_enable_crypt = yes ; then
12470                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12471                 fi
12472
12473                 echo "configure: warning: disabling crypt support" 1>&2
12474                 ol_enable_crypt=no
12475         fi
12476 fi
12477
12478 # FreeBSD (and others) have setproctitle(3) in -lutil
12479 if test $ol_enable_proctitle != no ; then
12480         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12481 echo "configure:12482: checking for setproctitle" >&5
12482 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12483   echo $ac_n "(cached) $ac_c" 1>&6
12484 else
12485   cat > conftest.$ac_ext <<EOF
12486 #line 12487 "configure"
12487 #include "confdefs.h"
12488 /* System header to define __stub macros and hopefully few prototypes,
12489     which can conflict with char setproctitle(); below.  */
12490 #include <assert.h>
12491 /* Override any gcc2 internal prototype to avoid an error.  */
12492 /* We use char because int might match the return type of a gcc2
12493     builtin and then its argument prototype would still apply.  */
12494 char setproctitle();
12495 char (*f)();
12496
12497 int main() {
12498
12499 /* The GNU C library defines this for functions which it implements
12500     to always fail with ENOSYS.  Some functions are actually named
12501     something starting with __ and the normal name is an alias.  */
12502 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12503 choke me
12504 #else
12505 f = setproctitle;
12506 #endif
12507
12508 ; return 0; }
12509 EOF
12510 if { (eval echo configure:12511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12511   rm -rf conftest*
12512   eval "ac_cv_func_setproctitle=yes"
12513 else
12514   echo "configure: failed program was:" >&5
12515   cat conftest.$ac_ext >&5
12516   rm -rf conftest*
12517   eval "ac_cv_func_setproctitle=no"
12518 fi
12519 rm -f conftest*
12520 fi
12521
12522 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12523   echo "$ac_t""yes" 1>&6
12524   have_setproctitle=yes
12525 else
12526   echo "$ac_t""no" 1>&6
12527
12528                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12529 echo "configure:12530: checking for setproctitle in -lutil" >&5
12530 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12531 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12532   echo $ac_n "(cached) $ac_c" 1>&6
12533 else
12534   ac_save_LIBS="$LIBS"
12535 LIBS="-lutil  $LIBS"
12536 cat > conftest.$ac_ext <<EOF
12537 #line 12538 "configure"
12538 #include "confdefs.h"
12539 /* Override any gcc2 internal prototype to avoid an error.  */
12540 /* We use char because int might match the return type of a gcc2
12541     builtin and then its argument prototype would still apply.  */
12542 char setproctitle();
12543
12544 int main() {
12545 setproctitle()
12546 ; return 0; }
12547 EOF
12548 if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12549   rm -rf conftest*
12550   eval "ac_cv_lib_$ac_lib_var=yes"
12551 else
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_lib_$ac_lib_var=no"
12556 fi
12557 rm -f conftest*
12558 LIBS="$ac_save_LIBS"
12559
12560 fi
12561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12562   echo "$ac_t""yes" 1>&6
12563   have_setproctitle=yes
12564                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12565 else
12566   echo "$ac_t""no" 1>&6
12567 have_setproctitle=no
12568                         LIBOBJS="$LIBOBJS setproctitle.o"
12569 fi
12570
12571 fi
12572
12573
12574         if test $have_setproctitle = yes ; then
12575                 cat >> confdefs.h <<\EOF
12576 #define HAVE_SETPROCTITLE 1
12577 EOF
12578
12579         fi
12580 fi
12581
12582 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12583 echo "configure:12584: checking for uid_t in sys/types.h" >&5
12584 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12585   echo $ac_n "(cached) $ac_c" 1>&6
12586 else
12587   cat > conftest.$ac_ext <<EOF
12588 #line 12589 "configure"
12589 #include "confdefs.h"
12590 #include <sys/types.h>
12591 EOF
12592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12593   egrep "uid_t" >/dev/null 2>&1; then
12594   rm -rf conftest*
12595   ac_cv_type_uid_t=yes
12596 else
12597   rm -rf conftest*
12598   ac_cv_type_uid_t=no
12599 fi
12600 rm -f conftest*
12601
12602 fi
12603
12604 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12605 if test $ac_cv_type_uid_t = no; then
12606   cat >> confdefs.h <<\EOF
12607 #define uid_t int
12608 EOF
12609
12610   cat >> confdefs.h <<\EOF
12611 #define gid_t int
12612 EOF
12613
12614 fi
12615
12616 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12617 echo "configure:12618: checking type of array argument to getgroups" >&5
12618 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12619   echo $ac_n "(cached) $ac_c" 1>&6
12620 else
12621   if test "$cross_compiling" = yes; then
12622   ac_cv_type_getgroups=cross
12623 else
12624   cat > conftest.$ac_ext <<EOF
12625 #line 12626 "configure"
12626 #include "confdefs.h"
12627
12628 /* Thanks to Mike Rendell for this test.  */
12629 #include <sys/types.h>
12630 #define NGID 256
12631 #undef MAX
12632 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12633 main()
12634 {
12635   gid_t gidset[NGID];
12636   int i, n;
12637   union { gid_t gval; long lval; }  val;
12638
12639   val.lval = -1;
12640   for (i = 0; i < NGID; i++)
12641     gidset[i] = val.gval;
12642   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12643                  gidset);
12644   /* Exit non-zero if getgroups seems to require an array of ints.  This
12645      happens when gid_t is short but getgroups modifies an array of ints.  */
12646   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12647 }
12648
12649 EOF
12650 if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12651 then
12652     ac_cv_type_getgroups=gid_t
12653 else
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -fr conftest*
12657   ac_cv_type_getgroups=int
12658 fi
12659 rm -fr conftest*
12660 fi
12661
12662 if test $ac_cv_type_getgroups = cross; then
12663         cat > conftest.$ac_ext <<EOF
12664 #line 12665 "configure"
12665 #include "confdefs.h"
12666 #include <unistd.h>
12667 EOF
12668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12669   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12670   rm -rf conftest*
12671   ac_cv_type_getgroups=gid_t
12672 else
12673   rm -rf conftest*
12674   ac_cv_type_getgroups=int
12675 fi
12676 rm -f conftest*
12677
12678 fi
12679 fi
12680
12681 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12682 cat >> confdefs.h <<EOF
12683 #define GETGROUPS_T $ac_cv_type_getgroups
12684 EOF
12685
12686  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12687 echo "configure:12688: checking for ANSI C header files" >&5
12688 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12689   echo $ac_n "(cached) $ac_c" 1>&6
12690 else
12691   cat > conftest.$ac_ext <<EOF
12692 #line 12693 "configure"
12693 #include "confdefs.h"
12694 #include <stdlib.h>
12695 #include <stdarg.h>
12696 #include <string.h>
12697 #include <float.h>
12698 EOF
12699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12700 { (eval echo configure:12701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12702 if test -z "$ac_err"; then
12703   rm -rf conftest*
12704   ac_cv_header_stdc=yes
12705 else
12706   echo "$ac_err" >&5
12707   echo "configure: failed program was:" >&5
12708   cat conftest.$ac_ext >&5
12709   rm -rf conftest*
12710   ac_cv_header_stdc=no
12711 fi
12712 rm -f conftest*
12713
12714 if test $ac_cv_header_stdc = yes; then
12715   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12716 cat > conftest.$ac_ext <<EOF
12717 #line 12718 "configure"
12718 #include "confdefs.h"
12719 #include <string.h>
12720 EOF
12721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12722   egrep "memchr" >/dev/null 2>&1; then
12723   :
12724 else
12725   rm -rf conftest*
12726   ac_cv_header_stdc=no
12727 fi
12728 rm -f conftest*
12729
12730 fi
12731
12732 if test $ac_cv_header_stdc = yes; then
12733   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12734 cat > conftest.$ac_ext <<EOF
12735 #line 12736 "configure"
12736 #include "confdefs.h"
12737 #include <stdlib.h>
12738 EOF
12739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12740   egrep "free" >/dev/null 2>&1; then
12741   :
12742 else
12743   rm -rf conftest*
12744   ac_cv_header_stdc=no
12745 fi
12746 rm -f conftest*
12747
12748 fi
12749
12750 if test $ac_cv_header_stdc = yes; then
12751   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12752 if test "$cross_compiling" = yes; then
12753   :
12754 else
12755   cat > conftest.$ac_ext <<EOF
12756 #line 12757 "configure"
12757 #include "confdefs.h"
12758 #include <ctype.h>
12759 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12760 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12761 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12762 int main () { int i; for (i = 0; i < 256; i++)
12763 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12764 exit (0); }
12765
12766 EOF
12767 if { (eval echo configure:12768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12768 then
12769   :
12770 else
12771   echo "configure: failed program was:" >&5
12772   cat conftest.$ac_ext >&5
12773   rm -fr conftest*
12774   ac_cv_header_stdc=no
12775 fi
12776 rm -fr conftest*
12777 fi
12778
12779 fi
12780 fi
12781
12782 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12783 if test $ac_cv_header_stdc = yes; then
12784   cat >> confdefs.h <<\EOF
12785 #define STDC_HEADERS 1
12786 EOF
12787
12788 fi
12789
12790 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12791 echo "configure:12792: checking for mode_t" >&5
12792 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12793   echo $ac_n "(cached) $ac_c" 1>&6
12794 else
12795   cat > conftest.$ac_ext <<EOF
12796 #line 12797 "configure"
12797 #include "confdefs.h"
12798 #include <sys/types.h>
12799 #if STDC_HEADERS
12800 #include <stdlib.h>
12801 #include <stddef.h>
12802 #endif
12803 EOF
12804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12805   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12806   rm -rf conftest*
12807   eval "ac_cv_type_mode_t=yes"
12808 else
12809   rm -rf conftest*
12810   eval "ac_cv_type_mode_t=no"
12811 fi
12812 rm -f conftest*
12813
12814 fi
12815 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12816   echo "$ac_t""yes" 1>&6
12817 else
12818   echo "$ac_t""no" 1>&6
12819   cat >> confdefs.h <<EOF
12820 #define mode_t int
12821 EOF
12822
12823 fi
12824
12825 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12826 echo "configure:12827: checking for off_t" >&5
12827 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12828   echo $ac_n "(cached) $ac_c" 1>&6
12829 else
12830   cat > conftest.$ac_ext <<EOF
12831 #line 12832 "configure"
12832 #include "confdefs.h"
12833 #include <sys/types.h>
12834 #if STDC_HEADERS
12835 #include <stdlib.h>
12836 #include <stddef.h>
12837 #endif
12838 EOF
12839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12840   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12841   rm -rf conftest*
12842   eval "ac_cv_type_off_t=yes"
12843 else
12844   rm -rf conftest*
12845   eval "ac_cv_type_off_t=no"
12846 fi
12847 rm -f conftest*
12848
12849 fi
12850 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12851   echo "$ac_t""yes" 1>&6
12852 else
12853   echo "$ac_t""no" 1>&6
12854   cat >> confdefs.h <<EOF
12855 #define off_t long
12856 EOF
12857
12858 fi
12859
12860 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12861 echo "configure:12862: checking for pid_t" >&5
12862 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12863   echo $ac_n "(cached) $ac_c" 1>&6
12864 else
12865   cat > conftest.$ac_ext <<EOF
12866 #line 12867 "configure"
12867 #include "confdefs.h"
12868 #include <sys/types.h>
12869 #if STDC_HEADERS
12870 #include <stdlib.h>
12871 #include <stddef.h>
12872 #endif
12873 EOF
12874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12875   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12876   rm -rf conftest*
12877   eval "ac_cv_type_pid_t=yes"
12878 else
12879   rm -rf conftest*
12880   eval "ac_cv_type_pid_t=no"
12881 fi
12882 rm -f conftest*
12883
12884 fi
12885 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12886   echo "$ac_t""yes" 1>&6
12887 else
12888   echo "$ac_t""no" 1>&6
12889   cat >> confdefs.h <<EOF
12890 #define pid_t int
12891 EOF
12892
12893 fi
12894
12895 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12896 echo "configure:12897: checking for ptrdiff_t" >&5
12897 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12898   echo $ac_n "(cached) $ac_c" 1>&6
12899 else
12900   cat > conftest.$ac_ext <<EOF
12901 #line 12902 "configure"
12902 #include "confdefs.h"
12903 #include <stddef.h>
12904 int main() {
12905 ptrdiff_t p
12906 ; return 0; }
12907 EOF
12908 if { (eval echo configure:12909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12909   rm -rf conftest*
12910   am_cv_type_ptrdiff_t=yes
12911 else
12912   echo "configure: failed program was:" >&5
12913   cat conftest.$ac_ext >&5
12914   rm -rf conftest*
12915   am_cv_type_ptrdiff_t=no
12916 fi
12917 rm -f conftest*
12918 fi
12919
12920 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12921    if test $am_cv_type_ptrdiff_t = yes; then
12922      cat >> confdefs.h <<\EOF
12923 #define HAVE_PTRDIFF_T 1
12924 EOF
12925
12926    fi
12927
12928 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12929 echo "configure:12930: checking return type of signal handlers" >&5
12930 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12931   echo $ac_n "(cached) $ac_c" 1>&6
12932 else
12933   cat > conftest.$ac_ext <<EOF
12934 #line 12935 "configure"
12935 #include "confdefs.h"
12936 #include <sys/types.h>
12937 #include <signal.h>
12938 #ifdef signal
12939 #undef signal
12940 #endif
12941 #ifdef __cplusplus
12942 extern "C" void (*signal (int, void (*)(int)))(int);
12943 #else
12944 void (*signal ()) ();
12945 #endif
12946
12947 int main() {
12948 int i;
12949 ; return 0; }
12950 EOF
12951 if { (eval echo configure:12952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12952   rm -rf conftest*
12953   ac_cv_type_signal=void
12954 else
12955   echo "configure: failed program was:" >&5
12956   cat conftest.$ac_ext >&5
12957   rm -rf conftest*
12958   ac_cv_type_signal=int
12959 fi
12960 rm -f conftest*
12961 fi
12962
12963 echo "$ac_t""$ac_cv_type_signal" 1>&6
12964 cat >> confdefs.h <<EOF
12965 #define RETSIGTYPE $ac_cv_type_signal
12966 EOF
12967
12968
12969 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12970 echo "configure:12971: checking for sig_atomic_t" >&5
12971 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12972   echo $ac_n "(cached) $ac_c" 1>&6
12973 else
12974   cat > conftest.$ac_ext <<EOF
12975 #line 12976 "configure"
12976 #include "confdefs.h"
12977 #include <signal.h>
12978 int main() {
12979 sig_atomic_t atomic;
12980 ; return 0; }
12981 EOF
12982 if { (eval echo configure:12983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12983   rm -rf conftest*
12984   ol_cv_type_sig_atomic_t=yes
12985 else
12986   echo "configure: failed program was:" >&5
12987   cat conftest.$ac_ext >&5
12988   rm -rf conftest*
12989   ol_cv_type_sig_atomic_t=no
12990 fi
12991 rm -f conftest*
12992 fi
12993
12994 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12995   if test $ol_cv_type_sig_atomic_t = no; then
12996     cat >> confdefs.h <<\EOF
12997 #define sig_atomic_t int
12998 EOF
12999
13000   fi
13001  
13002 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13003 echo "configure:13004: checking for size_t" >&5
13004 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13005   echo $ac_n "(cached) $ac_c" 1>&6
13006 else
13007   cat > conftest.$ac_ext <<EOF
13008 #line 13009 "configure"
13009 #include "confdefs.h"
13010 #include <sys/types.h>
13011 #if STDC_HEADERS
13012 #include <stdlib.h>
13013 #include <stddef.h>
13014 #endif
13015 EOF
13016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13017   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13018   rm -rf conftest*
13019   eval "ac_cv_type_size_t=yes"
13020 else
13021   rm -rf conftest*
13022   eval "ac_cv_type_size_t=no"
13023 fi
13024 rm -f conftest*
13025
13026 fi
13027 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13028   echo "$ac_t""yes" 1>&6
13029 else
13030   echo "$ac_t""no" 1>&6
13031   cat >> confdefs.h <<EOF
13032 #define size_t unsigned
13033 EOF
13034
13035 fi
13036
13037 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13038 echo "configure:13039: checking for socklen_t" >&5
13039 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13040   echo $ac_n "(cached) $ac_c" 1>&6
13041 else
13042   cat > conftest.$ac_ext <<EOF
13043 #line 13044 "configure"
13044 #include "confdefs.h"
13045
13046 #ifdef HAVE_SYS_TYPES_H
13047 #include <sys/types.h>
13048 #endif
13049 #ifdef HAVE_SYS_SOCKET_H
13050 #include <sys/socket.h>
13051 #endif
13052
13053 int main() {
13054 socklen_t len;
13055 ; return 0; }
13056 EOF
13057 if { (eval echo configure:13058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13058   rm -rf conftest*
13059   ol_cv_type_socklen_t=yes
13060 else
13061   echo "configure: failed program was:" >&5
13062   cat conftest.$ac_ext >&5
13063   rm -rf conftest*
13064   ol_cv_type_socklen_t=no
13065 fi
13066 rm -f conftest*
13067 fi
13068
13069 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13070   if test $ol_cv_type_socklen_t = no; then
13071     cat >> confdefs.h <<\EOF
13072 #define socklen_t int
13073 EOF
13074
13075   fi
13076  
13077 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13078 echo "configure:13079: checking for member st_blksize in aggregate type struct stat" >&5
13079 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13080   echo $ac_n "(cached) $ac_c" 1>&6
13081 else
13082   cat > conftest.$ac_ext <<EOF
13083 #line 13084 "configure"
13084 #include "confdefs.h"
13085 #include <sys/types.h>
13086 #include <sys/stat.h>
13087 int main() {
13088 struct stat foo; foo.st_blksize;
13089 ; return 0; }
13090 EOF
13091 if { (eval echo configure:13092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13092   rm -rf conftest*
13093   ac_cv_c_struct_member_st_blksize=yes
13094 else
13095   echo "configure: failed program was:" >&5
13096   cat conftest.$ac_ext >&5
13097   rm -rf conftest*
13098   ac_cv_c_struct_member_st_blksize=no
13099 fi
13100 rm -f conftest*
13101 fi
13102
13103 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13104 st_blksize="$ac_cv_c_struct_member_st_blksize"
13105 if test $ac_cv_c_struct_member_st_blksize = yes; then
13106   cat >> confdefs.h <<\EOF
13107 #define HAVE_ST_BLKSIZE 1
13108 EOF
13109
13110 fi
13111
13112 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13113 echo "configure:13114: checking whether time.h and sys/time.h may both be included" >&5
13114 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13115   echo $ac_n "(cached) $ac_c" 1>&6
13116 else
13117   cat > conftest.$ac_ext <<EOF
13118 #line 13119 "configure"
13119 #include "confdefs.h"
13120 #include <sys/types.h>
13121 #include <sys/time.h>
13122 #include <time.h>
13123 int main() {
13124 struct tm *tp;
13125 ; return 0; }
13126 EOF
13127 if { (eval echo configure:13128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13128   rm -rf conftest*
13129   ac_cv_header_time=yes
13130 else
13131   echo "configure: failed program was:" >&5
13132   cat conftest.$ac_ext >&5
13133   rm -rf conftest*
13134   ac_cv_header_time=no
13135 fi
13136 rm -f conftest*
13137 fi
13138
13139 echo "$ac_t""$ac_cv_header_time" 1>&6
13140 if test $ac_cv_header_time = yes; then
13141   cat >> confdefs.h <<\EOF
13142 #define TIME_WITH_SYS_TIME 1
13143 EOF
13144
13145 fi
13146
13147 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13148 echo "configure:13149: checking whether struct tm is in sys/time.h or time.h" >&5
13149 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13150   echo $ac_n "(cached) $ac_c" 1>&6
13151 else
13152   cat > conftest.$ac_ext <<EOF
13153 #line 13154 "configure"
13154 #include "confdefs.h"
13155 #include <sys/types.h>
13156 #include <time.h>
13157 int main() {
13158 struct tm *tp; tp->tm_sec;
13159 ; return 0; }
13160 EOF
13161 if { (eval echo configure:13162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13162   rm -rf conftest*
13163   ac_cv_struct_tm=time.h
13164 else
13165   echo "configure: failed program was:" >&5
13166   cat conftest.$ac_ext >&5
13167   rm -rf conftest*
13168   ac_cv_struct_tm=sys/time.h
13169 fi
13170 rm -f conftest*
13171 fi
13172
13173 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13174 if test $ac_cv_struct_tm = sys/time.h; then
13175   cat >> confdefs.h <<\EOF
13176 #define TM_IN_SYS_TIME 1
13177 EOF
13178
13179 fi
13180
13181 # test for pw_gecos in struct passwd
13182 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13183 echo "configure:13184: checking struct passwd for pw_gecos" >&5
13184 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13185   echo $ac_n "(cached) $ac_c" 1>&6
13186 else
13187   
13188         cat > conftest.$ac_ext <<EOF
13189 #line 13190 "configure"
13190 #include "confdefs.h"
13191 #include <pwd.h>
13192 int main() {
13193
13194         struct passwd pwd;
13195         pwd.pw_gecos = pwd.pw_name;
13196
13197 ; return 0; }
13198 EOF
13199 if { (eval echo configure:13200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13200   rm -rf conftest*
13201   ol_cv_struct_passwd_pw_gecos=yes
13202 else
13203   echo "configure: failed program was:" >&5
13204   cat conftest.$ac_ext >&5
13205   rm -rf conftest*
13206   ol_cv_struct_passwd_pw_gecos=no
13207 fi
13208 rm -f conftest*
13209 fi
13210
13211 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13212 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13213         cat >> confdefs.h <<\EOF
13214 #define HAVE_PW_GECOS 1
13215 EOF
13216
13217 fi
13218
13219 # test for pw_passwd in struct passwd
13220 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13221 echo "configure:13222: checking struct passwd for pw_passwd" >&5
13222 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13223   echo $ac_n "(cached) $ac_c" 1>&6
13224 else
13225   
13226         cat > conftest.$ac_ext <<EOF
13227 #line 13228 "configure"
13228 #include "confdefs.h"
13229 #include <pwd.h>
13230 int main() {
13231
13232         struct passwd pwd;
13233         pwd.pw_passwd = pwd.pw_name;
13234
13235 ; return 0; }
13236 EOF
13237 if { (eval echo configure:13238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13238   rm -rf conftest*
13239   ol_cv_struct_passwd_pw_passwd=yes
13240 else
13241   echo "configure: failed program was:" >&5
13242   cat conftest.$ac_ext >&5
13243   rm -rf conftest*
13244   ol_cv_struct_passwd_pw_passwd=no
13245 fi
13246 rm -f conftest*
13247 fi
13248
13249 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13250 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13251         cat >> confdefs.h <<\EOF
13252 #define HAVE_PW_PASSWD 1
13253 EOF
13254
13255 fi
13256
13257
13258 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13259 echo "configure:13260: checking if toupper() requires islower()" >&5
13260 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13261   echo $ac_n "(cached) $ac_c" 1>&6
13262 else
13263   
13264         if test "$cross_compiling" = yes; then
13265   ol_cv_c_upper_lower=safe
13266 else
13267   cat > conftest.$ac_ext <<EOF
13268 #line 13269 "configure"
13269 #include "confdefs.h"
13270
13271 #include <ctype.h>
13272 main()
13273 {
13274         if ('C' == toupper('C'))
13275                 exit(0);
13276         else
13277                 exit(1);
13278 }
13279 EOF
13280 if { (eval echo configure:13281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13281 then
13282   ol_cv_c_upper_lower=no
13283 else
13284   echo "configure: failed program was:" >&5
13285   cat conftest.$ac_ext >&5
13286   rm -fr conftest*
13287   ol_cv_c_upper_lower=yes
13288 fi
13289 rm -fr conftest*
13290 fi
13291
13292 fi
13293
13294 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13295 if test $ol_cv_c_upper_lower != no ; then
13296         cat >> confdefs.h <<\EOF
13297 #define C_UPPER_LOWER 1
13298 EOF
13299
13300 fi
13301
13302 echo $ac_n "checking for working const""... $ac_c" 1>&6
13303 echo "configure:13304: checking for working const" >&5
13304 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13305   echo $ac_n "(cached) $ac_c" 1>&6
13306 else
13307   cat > conftest.$ac_ext <<EOF
13308 #line 13309 "configure"
13309 #include "confdefs.h"
13310
13311 int main() {
13312
13313 /* Ultrix mips cc rejects this.  */
13314 typedef int charset[2]; const charset x;
13315 /* SunOS 4.1.1 cc rejects this.  */
13316 char const *const *ccp;
13317 char **p;
13318 /* NEC SVR4.0.2 mips cc rejects this.  */
13319 struct point {int x, y;};
13320 static struct point const zero = {0,0};
13321 /* AIX XL C 1.02.0.0 rejects this.
13322    It does not let you subtract one const X* pointer from another in an arm
13323    of an if-expression whose if-part is not a constant expression */
13324 const char *g = "string";
13325 ccp = &g + (g ? g-g : 0);
13326 /* HPUX 7.0 cc rejects these. */
13327 ++ccp;
13328 p = (char**) ccp;
13329 ccp = (char const *const *) p;
13330 { /* SCO 3.2v4 cc rejects this.  */
13331   char *t;
13332   char const *s = 0 ? (char *) 0 : (char const *) 0;
13333
13334   *t++ = 0;
13335 }
13336 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13337   int x[] = {25, 17};
13338   const int *foo = &x[0];
13339   ++foo;
13340 }
13341 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13342   typedef const int *iptr;
13343   iptr p = 0;
13344   ++p;
13345 }
13346 { /* AIX XL C 1.02.0.0 rejects this saying
13347      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13348   struct s { int j; const int *ap[3]; };
13349   struct s *b; b->j = 5;
13350 }
13351 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13352   const int foo = 10;
13353 }
13354
13355 ; return 0; }
13356 EOF
13357 if { (eval echo configure:13358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13358   rm -rf conftest*
13359   ac_cv_c_const=yes
13360 else
13361   echo "configure: failed program was:" >&5
13362   cat conftest.$ac_ext >&5
13363   rm -rf conftest*
13364   ac_cv_c_const=no
13365 fi
13366 rm -f conftest*
13367 fi
13368
13369 echo "$ac_t""$ac_cv_c_const" 1>&6
13370 if test $ac_cv_c_const = no; then
13371   cat >> confdefs.h <<\EOF
13372 #define const 
13373 EOF
13374
13375 fi
13376
13377 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13378 echo "configure:13379: checking if compiler understands volatile" >&5
13379 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13380   echo $ac_n "(cached) $ac_c" 1>&6
13381 else
13382   cat > conftest.$ac_ext <<EOF
13383 #line 13384 "configure"
13384 #include "confdefs.h"
13385 int x, y, z;
13386 int main() {
13387 volatile int a; int * volatile b = x ? &y : &z;
13388       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13389       *b = 0;
13390 ; return 0; }
13391 EOF
13392 if { (eval echo configure:13393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13393   rm -rf conftest*
13394   ol_cv_c_volatile=yes
13395 else
13396   echo "configure: failed program was:" >&5
13397   cat conftest.$ac_ext >&5
13398   rm -rf conftest*
13399   ol_cv_c_volatile=no
13400 fi
13401 rm -f conftest*
13402 fi
13403
13404 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13405   if test $ol_cv_c_volatile = yes; then
13406     : 
13407   else
13408     cat >> confdefs.h <<\EOF
13409 #define volatile 
13410 EOF
13411
13412   fi
13413  
13414
13415 if test $cross_compiling = yes ; then
13416         cat >> confdefs.h <<\EOF
13417 #define CROSS_COMPILING 1
13418 EOF
13419
13420
13421         cat >> confdefs.h <<\EOF
13422 #define LBER_INT_T long
13423 EOF
13424
13425         cat >> confdefs.h <<\EOF
13426 #define LBER_TAG_T long
13427 EOF
13428
13429         cat >> confdefs.h <<\EOF
13430 #define LBER_SOCKET_T int
13431 EOF
13432
13433
13434 else
13435         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13436 echo "configure:13437: checking whether byte ordering is bigendian" >&5
13437 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13438   echo $ac_n "(cached) $ac_c" 1>&6
13439 else
13440   ac_cv_c_bigendian=unknown
13441 # See if sys/param.h defines the BYTE_ORDER macro.
13442 cat > conftest.$ac_ext <<EOF
13443 #line 13444 "configure"
13444 #include "confdefs.h"
13445 #include <sys/types.h>
13446 #include <sys/param.h>
13447 int main() {
13448
13449 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13450  bogus endian macros
13451 #endif
13452 ; return 0; }
13453 EOF
13454 if { (eval echo configure:13455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13455   rm -rf conftest*
13456   # It does; now see whether it defined to BIG_ENDIAN or not.
13457 cat > conftest.$ac_ext <<EOF
13458 #line 13459 "configure"
13459 #include "confdefs.h"
13460 #include <sys/types.h>
13461 #include <sys/param.h>
13462 int main() {
13463
13464 #if BYTE_ORDER != BIG_ENDIAN
13465  not big endian
13466 #endif
13467 ; return 0; }
13468 EOF
13469 if { (eval echo configure:13470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13470   rm -rf conftest*
13471   ac_cv_c_bigendian=yes
13472 else
13473   echo "configure: failed program was:" >&5
13474   cat conftest.$ac_ext >&5
13475   rm -rf conftest*
13476   ac_cv_c_bigendian=no
13477 fi
13478 rm -f conftest*
13479 else
13480   echo "configure: failed program was:" >&5
13481   cat conftest.$ac_ext >&5
13482 fi
13483 rm -f conftest*
13484 if test $ac_cv_c_bigendian = unknown; then
13485 if test "$cross_compiling" = yes; then
13486     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13487 else
13488   cat > conftest.$ac_ext <<EOF
13489 #line 13490 "configure"
13490 #include "confdefs.h"
13491 main () {
13492   /* Are we little or big endian?  From Harbison&Steele.  */
13493   union
13494   {
13495     long l;
13496     char c[sizeof (long)];
13497   } u;
13498   u.l = 1;
13499   exit (u.c[sizeof (long) - 1] == 1);
13500 }
13501 EOF
13502 if { (eval echo configure:13503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13503 then
13504   ac_cv_c_bigendian=no
13505 else
13506   echo "configure: failed program was:" >&5
13507   cat conftest.$ac_ext >&5
13508   rm -fr conftest*
13509   ac_cv_c_bigendian=yes
13510 fi
13511 rm -fr conftest*
13512 fi
13513
13514 fi
13515 fi
13516
13517 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13518 if test $ac_cv_c_bigendian = yes; then
13519   cat >> confdefs.h <<\EOF
13520 #define WORDS_BIGENDIAN 1
13521 EOF
13522
13523 fi
13524
13525         echo $ac_n "checking size of short""... $ac_c" 1>&6
13526 echo "configure:13527: checking size of short" >&5
13527 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13528   echo $ac_n "(cached) $ac_c" 1>&6
13529 else
13530   if test "$cross_compiling" = yes; then
13531     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13532 else
13533   cat > conftest.$ac_ext <<EOF
13534 #line 13535 "configure"
13535 #include "confdefs.h"
13536 #include <stdio.h>
13537 main()
13538 {
13539   FILE *f=fopen("conftestval", "w");
13540   if (!f) exit(1);
13541   fprintf(f, "%d\n", sizeof(short));
13542   exit(0);
13543 }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13546 then
13547   ac_cv_sizeof_short=`cat conftestval`
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -fr conftest*
13552   ac_cv_sizeof_short=0
13553 fi
13554 rm -fr conftest*
13555 fi
13556
13557 fi
13558 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13559 cat >> confdefs.h <<EOF
13560 #define SIZEOF_SHORT $ac_cv_sizeof_short
13561 EOF
13562
13563  
13564         echo $ac_n "checking size of int""... $ac_c" 1>&6
13565 echo "configure:13566: checking size of int" >&5
13566 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13567   echo $ac_n "(cached) $ac_c" 1>&6
13568 else
13569   if test "$cross_compiling" = yes; then
13570     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13571 else
13572   cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 #include <stdio.h>
13576 main()
13577 {
13578   FILE *f=fopen("conftestval", "w");
13579   if (!f) exit(1);
13580   fprintf(f, "%d\n", sizeof(int));
13581   exit(0);
13582 }
13583 EOF
13584 if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13585 then
13586   ac_cv_sizeof_int=`cat conftestval`
13587 else
13588   echo "configure: failed program was:" >&5
13589   cat conftest.$ac_ext >&5
13590   rm -fr conftest*
13591   ac_cv_sizeof_int=0
13592 fi
13593 rm -fr conftest*
13594 fi
13595
13596 fi
13597 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13598 cat >> confdefs.h <<EOF
13599 #define SIZEOF_INT $ac_cv_sizeof_int
13600 EOF
13601
13602  
13603         echo $ac_n "checking size of long""... $ac_c" 1>&6
13604 echo "configure:13605: checking size of long" >&5
13605 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13606   echo $ac_n "(cached) $ac_c" 1>&6
13607 else
13608   if test "$cross_compiling" = yes; then
13609     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13610 else
13611   cat > conftest.$ac_ext <<EOF
13612 #line 13613 "configure"
13613 #include "confdefs.h"
13614 #include <stdio.h>
13615 main()
13616 {
13617   FILE *f=fopen("conftestval", "w");
13618   if (!f) exit(1);
13619   fprintf(f, "%d\n", sizeof(long));
13620   exit(0);
13621 }
13622 EOF
13623 if { (eval echo configure:13624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13624 then
13625   ac_cv_sizeof_long=`cat conftestval`
13626 else
13627   echo "configure: failed program was:" >&5
13628   cat conftest.$ac_ext >&5
13629   rm -fr conftest*
13630   ac_cv_sizeof_long=0
13631 fi
13632 rm -fr conftest*
13633 fi
13634
13635 fi
13636 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13637 cat >> confdefs.h <<EOF
13638 #define SIZEOF_LONG $ac_cv_sizeof_long
13639 EOF
13640
13641
13642
13643         if test "$ac_cv_sizeof_int" -lt 4 ; then
13644                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13645
13646                 cat >> confdefs.h <<\EOF
13647 #define LBER_INT_T long
13648 EOF
13649
13650                 cat >> confdefs.h <<\EOF
13651 #define LBER_TAG_T long
13652 EOF
13653
13654                 cat >> confdefs.h <<\EOF
13655 #define LBER_SOCKET_T int
13656 EOF
13657
13658         else
13659                 cat >> confdefs.h <<\EOF
13660 #define LBER_INT_T int
13661 EOF
13662
13663                 cat >> confdefs.h <<\EOF
13664 #define LBER_TAG_T long
13665 EOF
13666
13667                 cat >> confdefs.h <<\EOF
13668 #define LBER_SOCKET_T int
13669 EOF
13670
13671         fi
13672 fi
13673
13674 cat >> confdefs.h <<\EOF
13675 #define LBER_LEN_T long
13676 EOF
13677
13678
13679 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13680 echo "configure:13681: checking for 8-bit clean memcmp" >&5
13681 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13682   echo $ac_n "(cached) $ac_c" 1>&6
13683 else
13684   if test "$cross_compiling" = yes; then
13685   ac_cv_func_memcmp_clean=no
13686 else
13687   cat > conftest.$ac_ext <<EOF
13688 #line 13689 "configure"
13689 #include "confdefs.h"
13690
13691 main()
13692 {
13693   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13694   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13695 }
13696
13697 EOF
13698 if { (eval echo configure:13699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13699 then
13700   ac_cv_func_memcmp_clean=yes
13701 else
13702   echo "configure: failed program was:" >&5
13703   cat conftest.$ac_ext >&5
13704   rm -fr conftest*
13705   ac_cv_func_memcmp_clean=no
13706 fi
13707 rm -fr conftest*
13708 fi
13709
13710 fi
13711
13712 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13713 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13714
13715 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13716 echo "configure:13717: checking for strftime" >&5
13717 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13718   echo $ac_n "(cached) $ac_c" 1>&6
13719 else
13720   cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 /* System header to define __stub macros and hopefully few prototypes,
13724     which can conflict with char strftime(); below.  */
13725 #include <assert.h>
13726 /* Override any gcc2 internal prototype to avoid an error.  */
13727 /* We use char because int might match the return type of a gcc2
13728     builtin and then its argument prototype would still apply.  */
13729 char strftime();
13730 char (*f)();
13731
13732 int main() {
13733
13734 /* The GNU C library defines this for functions which it implements
13735     to always fail with ENOSYS.  Some functions are actually named
13736     something starting with __ and the normal name is an alias.  */
13737 #if defined (__stub_strftime) || defined (__stub___strftime)
13738 choke me
13739 #else
13740 f = strftime;
13741 #endif
13742
13743 ; return 0; }
13744 EOF
13745 if { (eval echo configure:13746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13746   rm -rf conftest*
13747   eval "ac_cv_func_strftime=yes"
13748 else
13749   echo "configure: failed program was:" >&5
13750   cat conftest.$ac_ext >&5
13751   rm -rf conftest*
13752   eval "ac_cv_func_strftime=no"
13753 fi
13754 rm -f conftest*
13755 fi
13756
13757 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13758   echo "$ac_t""yes" 1>&6
13759   cat >> confdefs.h <<\EOF
13760 #define HAVE_STRFTIME 1
13761 EOF
13762
13763 else
13764   echo "$ac_t""no" 1>&6
13765 # strftime is in -lintl on SCO UNIX.
13766 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13767 echo "configure:13768: checking for strftime in -lintl" >&5
13768 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13770   echo $ac_n "(cached) $ac_c" 1>&6
13771 else
13772   ac_save_LIBS="$LIBS"
13773 LIBS="-lintl  $LIBS"
13774 cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 /* Override any gcc2 internal prototype to avoid an error.  */
13778 /* We use char because int might match the return type of a gcc2
13779     builtin and then its argument prototype would still apply.  */
13780 char strftime();
13781
13782 int main() {
13783 strftime()
13784 ; return 0; }
13785 EOF
13786 if { (eval echo configure:13787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13787   rm -rf conftest*
13788   eval "ac_cv_lib_$ac_lib_var=yes"
13789 else
13790   echo "configure: failed program was:" >&5
13791   cat conftest.$ac_ext >&5
13792   rm -rf conftest*
13793   eval "ac_cv_lib_$ac_lib_var=no"
13794 fi
13795 rm -f conftest*
13796 LIBS="$ac_save_LIBS"
13797
13798 fi
13799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13800   echo "$ac_t""yes" 1>&6
13801   cat >> confdefs.h <<\EOF
13802 #define HAVE_STRFTIME 1
13803 EOF
13804
13805 LIBS="-lintl $LIBS"
13806 else
13807   echo "$ac_t""no" 1>&6
13808 fi
13809
13810 fi
13811
13812
13813 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13814 echo "configure:13815: checking for inet_aton()" >&5
13815 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13816   echo $ac_n "(cached) $ac_c" 1>&6
13817 else
13818   cat > conftest.$ac_ext <<EOF
13819 #line 13820 "configure"
13820 #include "confdefs.h"
13821
13822 #ifdef HAVE_SYS_TYPES_H
13823 #       include <sys/types.h>
13824 #endif
13825 #ifdef HAVE_SYS_SOCKET_H
13826 #       include <sys/socket.h>
13827 #       ifdef HAVE_SYS_SELECT_H
13828 #               include <sys/select.h>
13829 #       endif
13830 #       include <netinet/in.h>
13831 #       ifdef HAVE_ARPA_INET_H
13832 #               include <arpa/inet.h>
13833 #       endif
13834 #endif
13835
13836 int main() {
13837 struct in_addr in;
13838 int rc = inet_aton( "255.255.255.255", &in );
13839 ; return 0; }
13840 EOF
13841 if { (eval echo configure:13842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13842   rm -rf conftest*
13843   ol_cv_func_inet_aton=yes
13844 else
13845   echo "configure: failed program was:" >&5
13846   cat conftest.$ac_ext >&5
13847   rm -rf conftest*
13848   ol_cv_func_inet_aton=no
13849 fi
13850 rm -f conftest*
13851 fi
13852
13853 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13854   if test $ol_cv_func_inet_aton != no; then
13855     cat >> confdefs.h <<\EOF
13856 #define HAVE_INET_ATON 1
13857 EOF
13858
13859   fi
13860  
13861
13862 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13863 echo "configure:13864: checking for vprintf" >&5
13864 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13865   echo $ac_n "(cached) $ac_c" 1>&6
13866 else
13867   cat > conftest.$ac_ext <<EOF
13868 #line 13869 "configure"
13869 #include "confdefs.h"
13870 /* System header to define __stub macros and hopefully few prototypes,
13871     which can conflict with char vprintf(); below.  */
13872 #include <assert.h>
13873 /* Override any gcc2 internal prototype to avoid an error.  */
13874 /* We use char because int might match the return type of a gcc2
13875     builtin and then its argument prototype would still apply.  */
13876 char vprintf();
13877 char (*f)();
13878
13879 int main() {
13880
13881 /* The GNU C library defines this for functions which it implements
13882     to always fail with ENOSYS.  Some functions are actually named
13883     something starting with __ and the normal name is an alias.  */
13884 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13885 choke me
13886 #else
13887 f = vprintf;
13888 #endif
13889
13890 ; return 0; }
13891 EOF
13892 if { (eval echo configure:13893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13893   rm -rf conftest*
13894   eval "ac_cv_func_vprintf=yes"
13895 else
13896   echo "configure: failed program was:" >&5
13897   cat conftest.$ac_ext >&5
13898   rm -rf conftest*
13899   eval "ac_cv_func_vprintf=no"
13900 fi
13901 rm -f conftest*
13902 fi
13903
13904 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13905   echo "$ac_t""yes" 1>&6
13906   cat >> confdefs.h <<\EOF
13907 #define HAVE_VPRINTF 1
13908 EOF
13909
13910 else
13911   echo "$ac_t""no" 1>&6
13912 fi
13913
13914 if test "$ac_cv_func_vprintf" != yes; then
13915 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13916 echo "configure:13917: checking for _doprnt" >&5
13917 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13918   echo $ac_n "(cached) $ac_c" 1>&6
13919 else
13920   cat > conftest.$ac_ext <<EOF
13921 #line 13922 "configure"
13922 #include "confdefs.h"
13923 /* System header to define __stub macros and hopefully few prototypes,
13924     which can conflict with char _doprnt(); below.  */
13925 #include <assert.h>
13926 /* Override any gcc2 internal prototype to avoid an error.  */
13927 /* We use char because int might match the return type of a gcc2
13928     builtin and then its argument prototype would still apply.  */
13929 char _doprnt();
13930 char (*f)();
13931
13932 int main() {
13933
13934 /* The GNU C library defines this for functions which it implements
13935     to always fail with ENOSYS.  Some functions are actually named
13936     something starting with __ and the normal name is an alias.  */
13937 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13938 choke me
13939 #else
13940 f = _doprnt;
13941 #endif
13942
13943 ; return 0; }
13944 EOF
13945 if { (eval echo configure:13946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13946   rm -rf conftest*
13947   eval "ac_cv_func__doprnt=yes"
13948 else
13949   echo "configure: failed program was:" >&5
13950   cat conftest.$ac_ext >&5
13951   rm -rf conftest*
13952   eval "ac_cv_func__doprnt=no"
13953 fi
13954 rm -f conftest*
13955 fi
13956
13957 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13958   echo "$ac_t""yes" 1>&6
13959   cat >> confdefs.h <<\EOF
13960 #define HAVE_DOPRNT 1
13961 EOF
13962
13963 else
13964   echo "$ac_t""no" 1>&6
13965 fi
13966
13967 fi
13968
13969
13970 if test $ac_cv_func_vprintf = yes ; then
13971                 for ac_func in vsnprintf vsprintf
13972 do
13973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13974 echo "configure:13975: checking for $ac_func" >&5
13975 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13976   echo $ac_n "(cached) $ac_c" 1>&6
13977 else
13978   cat > conftest.$ac_ext <<EOF
13979 #line 13980 "configure"
13980 #include "confdefs.h"
13981 /* System header to define __stub macros and hopefully few prototypes,
13982     which can conflict with char $ac_func(); below.  */
13983 #include <assert.h>
13984 /* Override any gcc2 internal prototype to avoid an error.  */
13985 /* We use char because int might match the return type of a gcc2
13986     builtin and then its argument prototype would still apply.  */
13987 char $ac_func();
13988 char (*f)();
13989
13990 int main() {
13991
13992 /* The GNU C library defines this for functions which it implements
13993     to always fail with ENOSYS.  Some functions are actually named
13994     something starting with __ and the normal name is an alias.  */
13995 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13996 choke me
13997 #else
13998 f = $ac_func;
13999 #endif
14000
14001 ; return 0; }
14002 EOF
14003 if { (eval echo configure:14004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14004   rm -rf conftest*
14005   eval "ac_cv_func_$ac_func=yes"
14006 else
14007   echo "configure: failed program was:" >&5
14008   cat conftest.$ac_ext >&5
14009   rm -rf conftest*
14010   eval "ac_cv_func_$ac_func=no"
14011 fi
14012 rm -f conftest*
14013 fi
14014
14015 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14016   echo "$ac_t""yes" 1>&6
14017     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14018   cat >> confdefs.h <<EOF
14019 #define $ac_tr_func 1
14020 EOF
14021  
14022 else
14023   echo "$ac_t""no" 1>&6
14024 fi
14025 done
14026
14027 fi
14028
14029 for ac_func in \
14030         bcopy                   \
14031         closesocket             \
14032         endgrent                \
14033         endpwent                \
14034         flock                   \
14035         getdtablesize   \
14036         getgrgid                \
14037         gethostname             \
14038         getpass                 \
14039         getpwuid                \
14040         getpwnam                \
14041         getspnam                \
14042         gettimeofday    \
14043         initgroups              \
14044         lockf                   \
14045         memcpy                  \
14046         memmove                 \
14047         mkstemp                 \
14048         pipe                    \
14049         read                    \
14050         recv                    \
14051         recvfrom                \
14052         setpwfile               \
14053         setgid                  \
14054         setegid                 \
14055         setsid                  \
14056         setuid                  \
14057         seteuid                 \
14058         sigaction               \
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