]> git.sur5r.net Git - openldap/blob - configure
Merge in all devel changes since 2.0-alpha2.
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-modules    enable dynamic module support (no)"
59 ac_help="$ac_help
60     --enable-multimaster        enable multimaster replication (no)"
61 ac_help="$ac_help
62     --enable-phonetic   enable phonetic/soundex (no)"
63 ac_help="$ac_help
64     --enable-quipu      build quipu migration tools (no)"
65 ac_help="$ac_help
66     --enable-rlookups   enable reverse lookups (auto)"
67 ac_help="$ac_help
68     --enable-wrappers   enable tcp wrapper support (no)"
69 ac_help="$ac_help
70     --enable-bdb2       enable bdb2 backend (no)"
71 ac_help="$ac_help
72       --with-bdb2-module        module type (static)"
73 ac_help="$ac_help
74     --enable-ldap       enable ldap backend (no)"
75 ac_help="$ac_help
76       --with-ldap-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldbm       enable ldbm backend (yes)"
79 ac_help="$ac_help
80       --with-ldbm-module        module type (static)"
81 ac_help="$ac_help
82       --with-ldbm-api   use LDBM API (auto)"
83 ac_help="$ac_help
84       --with-ldbm-type  use LDBM type (auto)"
85 ac_help="$ac_help
86     --enable-passwd     enable passwd backend (no)"
87 ac_help="$ac_help
88       --with-passwd-module      module type (static)"
89 ac_help="$ac_help
90     --enable-perl       enable perl backend (no)"
91 ac_help="$ac_help
92       --with-perl-module        module type (static)"
93 ac_help="$ac_help
94     --enable-shell      enable shell backend (no)"
95 ac_help="$ac_help
96       --with-shell-module       module type (static)"
97 ac_help="$ac_help
98     --enable-tcl        enable tcl backend (no)"
99 ac_help="$ac_help
100       --with-tcl-module module type (static)"
101 ac_help="$ac_help
102 SLURPD Options:"
103 ac_help="$ac_help
104   --enable-slurpd       enable building slurpd (auto)"
105 ac_help="$ac_help
106 Library Generation & Linking Options"
107 ac_help="$ac_help
108   --enable-static[=PKGS]  build static libraries [default=yes]"
109 ac_help="$ac_help
110   --enable-shared[=PKGS]  build shared libraries [default=yes]"
111 ac_help="$ac_help
112   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
113 ac_help="$ac_help
114   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
115 ac_help="$ac_help
116   --disable-libtool-lock  avoid locking (might break parallel builds)"
117
118 # Initialize some variables set by options.
119 # The variables have the same names as the options, with
120 # dashes changed to underlines.
121 build=NONE
122 cache_file=./config.cache
123 exec_prefix=NONE
124 host=NONE
125 no_create=
126 nonopt=NONE
127 no_recursion=
128 prefix=NONE
129 program_prefix=NONE
130 program_suffix=NONE
131 program_transform_name=s,x,x,
132 silent=
133 site=
134 srcdir=
135 target=NONE
136 verbose=
137 x_includes=NONE
138 x_libraries=NONE
139 bindir='${exec_prefix}/bin'
140 sbindir='${exec_prefix}/sbin'
141 libexecdir='${exec_prefix}/libexec'
142 datadir='${prefix}/share'
143 sysconfdir='${prefix}/etc'
144 sharedstatedir='${prefix}/com'
145 localstatedir='${prefix}/var'
146 libdir='${exec_prefix}/lib'
147 includedir='${prefix}/include'
148 oldincludedir='/usr/include'
149 infodir='${prefix}/info'
150 mandir='${prefix}/man'
151
152 # Initialize some other variables.
153 subdirs=
154 MFLAGS= MAKEFLAGS=
155 SHELL=${CONFIG_SHELL-/bin/sh}
156 # Maximum number of lines to put in a shell here document.
157 ac_max_here_lines=12
158
159 ac_prev=
160 for ac_option
161 do
162
163   # If the previous option needs an argument, assign it.
164   if test -n "$ac_prev"; then
165     eval "$ac_prev=\$ac_option"
166     ac_prev=
167     continue
168   fi
169
170   case "$ac_option" in
171   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
172   *) ac_optarg= ;;
173   esac
174
175   # Accept the important Cygnus configure options, so we can diagnose typos.
176
177   case "$ac_option" in
178
179   -bindir | --bindir | --bindi | --bind | --bin | --bi)
180     ac_prev=bindir ;;
181   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
182     bindir="$ac_optarg" ;;
183
184   -build | --build | --buil | --bui | --bu)
185     ac_prev=build ;;
186   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
187     build="$ac_optarg" ;;
188
189   -cache-file | --cache-file | --cache-fil | --cache-fi \
190   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
191     ac_prev=cache_file ;;
192   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
193   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
194     cache_file="$ac_optarg" ;;
195
196   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
197     ac_prev=datadir ;;
198   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
199   | --da=*)
200     datadir="$ac_optarg" ;;
201
202   -disable-* | --disable-*)
203     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
204     # Reject names that are not valid shell variable names.
205     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
206       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
207     fi
208     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209     eval "enable_${ac_feature}=no" ;;
210
211   -enable-* | --enable-*)
212     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
213     # Reject names that are not valid shell variable names.
214     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
215       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
216     fi
217     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218     case "$ac_option" in
219       *=*) ;;
220       *) ac_optarg=yes ;;
221     esac
222     eval "enable_${ac_feature}='$ac_optarg'" ;;
223
224   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
225   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
226   | --exec | --exe | --ex)
227     ac_prev=exec_prefix ;;
228   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
229   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
230   | --exec=* | --exe=* | --ex=*)
231     exec_prefix="$ac_optarg" ;;
232
233   -gas | --gas | --ga | --g)
234     # Obsolete; use --with-gas.
235     with_gas=yes ;;
236
237   -help | --help | --hel | --he)
238     # Omit some internal or obsolete options to make the list less imposing.
239     # This message is too long to be a string in the A/UX 3.1 sh.
240     cat << EOF
241 Usage: configure [options] [host]
242 Options: [defaults in brackets after descriptions]
243 Configuration:
244   --cache-file=FILE       cache test results in FILE
245   --help                  print this message
246   --no-create             do not create output files
247   --quiet, --silent       do not print \`checking...' messages
248   --version               print the version of autoconf that created configure
249 Directory and file names:
250   --prefix=PREFIX         install architecture-independent files in PREFIX
251                           [$ac_default_prefix]
252   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
253                           [same as prefix]
254   --bindir=DIR            user executables in DIR [EPREFIX/bin]
255   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
256   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
257   --datadir=DIR           read-only architecture-independent data in DIR
258                           [PREFIX/share]
259   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
260   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
261                           [PREFIX/com]
262   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
263   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
264   --includedir=DIR        C header files in DIR [PREFIX/include]
265   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
266   --infodir=DIR           info documentation in DIR [PREFIX/info]
267   --mandir=DIR            man documentation in DIR [PREFIX/man]
268   --srcdir=DIR            find the sources in DIR [configure dir or ..]
269   --program-prefix=PREFIX prepend PREFIX to installed program names
270   --program-suffix=SUFFIX append SUFFIX to installed program names
271   --program-transform-name=PROGRAM
272                           run sed PROGRAM on installed program names
273 EOF
274     cat << EOF
275 Host type:
276   --build=BUILD           configure for building on BUILD [BUILD=HOST]
277   --host=HOST             configure for HOST [guessed]
278   --target=TARGET         configure for TARGET [TARGET=HOST]
279 Features and packages:
280   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
281   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
282   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
283   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
284   --x-includes=DIR        X include files are in DIR
285   --x-libraries=DIR       X library files are in DIR
286 EOF
287     if test -n "$ac_help"; then
288       echo "--enable and --with options recognized:$ac_help"
289     fi
290     exit 0 ;;
291
292   -host | --host | --hos | --ho)
293     ac_prev=host ;;
294   -host=* | --host=* | --hos=* | --ho=*)
295     host="$ac_optarg" ;;
296
297   -includedir | --includedir | --includedi | --included | --include \
298   | --includ | --inclu | --incl | --inc)
299     ac_prev=includedir ;;
300   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
301   | --includ=* | --inclu=* | --incl=* | --inc=*)
302     includedir="$ac_optarg" ;;
303
304   -infodir | --infodir | --infodi | --infod | --info | --inf)
305     ac_prev=infodir ;;
306   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
307     infodir="$ac_optarg" ;;
308
309   -libdir | --libdir | --libdi | --libd)
310     ac_prev=libdir ;;
311   -libdir=* | --libdir=* | --libdi=* | --libd=*)
312     libdir="$ac_optarg" ;;
313
314   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
315   | --libexe | --libex | --libe)
316     ac_prev=libexecdir ;;
317   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
318   | --libexe=* | --libex=* | --libe=*)
319     libexecdir="$ac_optarg" ;;
320
321   -localstatedir | --localstatedir | --localstatedi | --localstated \
322   | --localstate | --localstat | --localsta | --localst \
323   | --locals | --local | --loca | --loc | --lo)
324     ac_prev=localstatedir ;;
325   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
326   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
327   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
328     localstatedir="$ac_optarg" ;;
329
330   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
331     ac_prev=mandir ;;
332   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
333     mandir="$ac_optarg" ;;
334
335   -nfp | --nfp | --nf)
336     # Obsolete; use --without-fp.
337     with_fp=no ;;
338
339   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
340   | --no-cr | --no-c)
341     no_create=yes ;;
342
343   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
344   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
345     no_recursion=yes ;;
346
347   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
348   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
349   | --oldin | --oldi | --old | --ol | --o)
350     ac_prev=oldincludedir ;;
351   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
352   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
353   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
354     oldincludedir="$ac_optarg" ;;
355
356   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
357     ac_prev=prefix ;;
358   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
359     prefix="$ac_optarg" ;;
360
361   -program-prefix | --program-prefix | --program-prefi | --program-pref \
362   | --program-pre | --program-pr | --program-p)
363     ac_prev=program_prefix ;;
364   -program-prefix=* | --program-prefix=* | --program-prefi=* \
365   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
366     program_prefix="$ac_optarg" ;;
367
368   -program-suffix | --program-suffix | --program-suffi | --program-suff \
369   | --program-suf | --program-su | --program-s)
370     ac_prev=program_suffix ;;
371   -program-suffix=* | --program-suffix=* | --program-suffi=* \
372   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
373     program_suffix="$ac_optarg" ;;
374
375   -program-transform-name | --program-transform-name \
376   | --program-transform-nam | --program-transform-na \
377   | --program-transform-n | --program-transform- \
378   | --program-transform | --program-transfor \
379   | --program-transfo | --program-transf \
380   | --program-trans | --program-tran \
381   | --progr-tra | --program-tr | --program-t)
382     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
391
392   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
393   | -silent | --silent | --silen | --sile | --sil)
394     silent=yes ;;
395
396   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
397     ac_prev=sbindir ;;
398   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
399   | --sbi=* | --sb=*)
400     sbindir="$ac_optarg" ;;
401
402   -sharedstatedir | --sharedstatedir | --sharedstatedi \
403   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
404   | --sharedst | --shareds | --shared | --share | --shar \
405   | --sha | --sh)
406     ac_prev=sharedstatedir ;;
407   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
408   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
409   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
410   | --sha=* | --sh=*)
411     sharedstatedir="$ac_optarg" ;;
412
413   -site | --site | --sit)
414     ac_prev=site ;;
415   -site=* | --site=* | --sit=*)
416     site="$ac_optarg" ;;
417
418   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
419     ac_prev=srcdir ;;
420   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
421     srcdir="$ac_optarg" ;;
422
423   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
424   | --syscon | --sysco | --sysc | --sys | --sy)
425     ac_prev=sysconfdir ;;
426   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
427   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
428     sysconfdir="$ac_optarg" ;;
429
430   -target | --target | --targe | --targ | --tar | --ta | --t)
431     ac_prev=target ;;
432   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
433     target="$ac_optarg" ;;
434
435   -v | -verbose | --verbose | --verbos | --verbo | --verb)
436     verbose=yes ;;
437
438   -version | --version | --versio | --versi | --vers)
439     echo "configure generated by autoconf version 2.13.1"
440     exit 0 ;;
441
442   -with-* | --with-*)
443     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
444     # Reject names that are not valid shell variable names.
445     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
446       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
447     fi
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case "$ac_option" in
450       *=*) ;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_${ac_package}='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
457     # Reject names that are not valid shell variable names.
458     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
459       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
460     fi
461     ac_package=`echo $ac_package| sed 's/-/_/g'`
462     eval "with_${ac_package}=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes="$ac_optarg" ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries="$ac_optarg" ;;
481
482   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
483     ;;
484
485   *)
486     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
487       echo "configure: warning: $ac_option: invalid host type" 1>&2
488     fi
489     if test "x$nonopt" != xNONE; then
490       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
491     fi
492     nonopt="$ac_option"
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
500 fi
501
502 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
503
504 # File descriptor usage:
505 # 0 standard input
506 # 1 file creation
507 # 2 errors and warnings
508 # 3 some systems may open it to /dev/tty
509 # 4 used on the Kubota Titan
510 # 6 checking for... messages and results
511 # 5 compiler messages saved in config.log
512 if test "$silent" = yes; then
513   exec 6>/dev/null
514 else
515   exec 6>&1
516 fi
517 exec 5>./config.log
518
519 echo "\
520 This file contains any messages produced by compilers while
521 running configure, to aid debugging if configure makes a mistake.
522 " 1>&5
523
524 # Strip out --no-create and --no-recursion so they do not pile up.
525 # Also quote any args containing shell metacharacters.
526 ac_configure_args=
527 for ac_arg
528 do
529   case "$ac_arg" in
530   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
531   | --no-cr | --no-c) ;;
532   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
533   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
534   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
535   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
536   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
537   esac
538 done
539
540 # NLS nuisances.
541 # Only set these to C if already set.  These must not be set unconditionally
542 # because not all systems understand e.g. LANG=C (notably SCO).
543 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
544 # Non-C LC_CTYPE values break the ctype check.
545 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
546 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
547 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
548 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
549
550 # confdefs.h avoids OS command line length limits that DEFS can exceed.
551 rm -rf conftest* confdefs.h
552 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
553 echo > confdefs.h
554
555 # A filename unique to this package, relative to the directory that
556 # configure is in, which we can look for to find out if srcdir is correct.
557 ac_unique_file=build/version
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
576   else
577     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
578   fi
579 fi
580 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
581
582 # Prefer explicitly selected file to automatically selected ones.
583 if test -z "$CONFIG_SITE"; then
584   if test "x$prefix" != xNONE; then
585     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
586   else
587     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
588   fi
589 fi
590 for ac_site_file in $CONFIG_SITE; do
591   if test -r "$ac_site_file"; then
592     echo "loading site script $ac_site_file"
593     . "$ac_site_file"
594   fi
595 done
596
597
598 ac_ext=c
599 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
600 ac_cpp='$CPP $CPPFLAGS'
601 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
602 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
603 cross_compiling=$ac_cv_prog_cc_cross
604
605 ac_exeext=
606 ac_objext=o
607 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
608   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
609   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
610     ac_n= ac_c='
611 ' ac_t='        '
612   else
613     ac_n=-n ac_c= ac_t=
614   fi
615 else
616   ac_n= ac_c='\c' ac_t=
617 fi
618
619 ac_aux_dir=
620 for ac_dir in build $srcdir/build; do
621   if test -f $ac_dir/install-sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install-sh -c"
624     break
625   elif test -f $ac_dir/install.sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install.sh -c"
628     break
629   fi
630 done
631 if test -z "$ac_aux_dir"; then
632   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
633 fi
634 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
635 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
636 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
637
638 OL_VERSION=`cat $ac_aux_dir/version`
639 if test -z "$OL_VERSION"; then
640         { echo "configure: error: could not determine version" 1>&2; exit 1; }
641 fi
642
643
644 echo $ac_n "checking host system type""... $ac_c" 1>&6
645 echo "configure:646: checking host system type" >&5
646 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
647
648 # Make sure we can run config.sub.
649   if $ac_config_sub sun4 >/dev/null 2>&1; then :
650     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
651   fi
652
653   ac_cv_host_alias=$host
654   case "$ac_cv_host_alias" in
655   NONE)
656     case $nonopt in
657     NONE)
658       if ac_cv_host_alias=`$ac_config_guess`; then :
659       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
660       fi ;;
661     *) ac_cv_host_alias=$nonopt ;;
662     esac ;;
663   esac
664
665   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
666   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
667   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
668   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
669 else
670   echo $ac_n "(cached) $ac_c" 1>&6
671 fi
672
673 echo "$ac_t""$ac_cv_host" 1>&6
674
675 host=$ac_cv_host
676 host_alias=$ac_cv_host_alias
677 host_cpu=$ac_cv_host_cpu
678 host_vendor=$ac_cv_host_vendor
679 host_os=$ac_cv_host_os
680
681
682
683
684
685 echo $ac_n "checking target system type""... $ac_c" 1>&6
686 echo "configure:687: checking target system type" >&5
687 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
688
689 # Make sure we can run config.sub.
690   if $ac_config_sub sun4 >/dev/null 2>&1; then :
691     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
692   fi
693
694   ac_cv_target_alias=$target
695   case "$ac_cv_target_alias" in
696   NONE)
697     case $nonopt in
698     NONE)
699       ac_cv_target_alias=$host_alias ;;
700
701     *) ac_cv_target_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
706   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_target" 1>&6
714
715 target=$ac_cv_target
716 target_alias=$ac_cv_target_alias
717 target_cpu=$ac_cv_target_cpu
718 target_vendor=$ac_cv_target_vendor
719 target_os=$ac_cv_target_os
720
721
722
723
724
725 echo $ac_n "checking build system type""... $ac_c" 1>&6
726 echo "configure:727: checking build system type" >&5
727 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_build_alias=$build
735   case "$ac_cv_build_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_build_alias=$host_alias ;;
740
741     *) ac_cv_build_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
746   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_build" 1>&6
754
755 build=$ac_cv_build
756 build_alias=$ac_cv_build_alias
757 build_cpu=$ac_cv_build_cpu
758 build_vendor=$ac_cv_build_vendor
759 build_os=$ac_cv_build_os
760
761
762
763
764
765 # Do some error checking and defaulting for the host and target type.
766 # The inputs are:
767 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
768 #
769 # The rules are:
770 # 1. You are not allowed to specify --host, --target, and nonopt at the
771 #    same time.
772 # 2. Host defaults to nonopt.
773 # 3. If nonopt is not specified, then host defaults to the current host,
774 #    as determined by config.guess.
775 # 4. Target and build default to nonopt.
776 # 5. If nonopt is not specified, then target and build default to host.
777
778 # The aliases save the names the user supplied, while $host etc.
779 # will get canonicalized.
780 case $host---$target---$nonopt in
781 NONE---*---* | *---NONE---* | *---*---NONE) ;;
782 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
783 esac
784
785 test "$host_alias" != "$target_alias" &&
786   test "$program_prefix$program_suffix$program_transform_name" = \
787     NONENONEs,x,x, &&
788   program_prefix=${target_alias}-
789
790
791 # Find a good install program.  We prefer a C program (faster),
792 # so one script is as good as another.  But avoid the broken or
793 # incompatible versions:
794 # SysV /etc/install, /usr/sbin/install
795 # SunOS /usr/etc/install
796 # IRIX /sbin/install
797 # AIX /bin/install
798 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
799 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
800 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
801 # ./install, which can be erroneously created by make from ./install.sh.
802 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
803 echo "configure:804: checking for a BSD compatible install" >&5
804 if test -z "$INSTALL"; then
805 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
806   echo $ac_n "(cached) $ac_c" 1>&6
807 else
808     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
809   for ac_dir in $PATH; do
810     # Account for people who put trailing slashes in PATH elements.
811     case "$ac_dir/" in
812     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
813     *)
814       # OSF1 and SCO ODT 3.0 have their own names for install.
815       # Don't use installbsd from OSF since it installs stuff as root
816       # by default.
817       for ac_prog in ginstall scoinst install; do
818         if test -f $ac_dir/$ac_prog; then
819           if test $ac_prog = install &&
820             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
821             # AIX install.  It has an incompatible calling convention.
822             :
823           elif test $ac_prog = install &&
824             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
825             # program-specific install script used by HP pwplus--don't use.
826             :
827           else
828             ac_cv_path_install="$ac_dir/$ac_prog -c"
829             break 2
830           fi
831         fi
832       done
833       ;;
834     esac
835   done
836   IFS="$ac_save_IFS"
837
838 fi
839   if test "${ac_cv_path_install+set}" = set; then
840     INSTALL="$ac_cv_path_install"
841   else
842     # As a last resort, use the slow shell script.  We don't cache a
843     # path for INSTALL within a source directory, because that will
844     # break other packages using the cache if that directory is
845     # removed, or if the path is relative.
846     INSTALL="$ac_install_sh"
847   fi
848 fi
849 echo "$ac_t""$INSTALL" 1>&6
850
851 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
852 # It thinks the first close brace ends the variable substitution.
853 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
854
855 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
856
857 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
858
859 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
860 echo "configure:861: checking whether build environment is sane" >&5
861 # Just in case
862 sleep 1
863 echo timestamp > conftestfile
864 # Do `set' in a subshell so we don't clobber the current shell's
865 # arguments.  Must try -L first in case configure is actually a
866 # symlink; some systems play weird games with the mod time of symlinks
867 # (eg FreeBSD returns the mod time of the symlink's containing
868 # directory).
869 if (
870    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
871    if test "$*" = "X"; then
872       # -L didn't work.
873       set X `ls -t $srcdir/configure conftestfile`
874    fi
875    if test "$*" != "X $srcdir/configure conftestfile" \
876       && test "$*" != "X conftestfile $srcdir/configure"; then
877
878       # If neither matched, then we have a broken ls.  This can happen
879       # if, for instance, CONFIG_SHELL is bash and it inherits a
880       # broken ls alias from the environment.  This has actually
881       # happened.  Such a system could not be considered "sane".
882       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
883 alias in your environment" 1>&2; exit 1; }
884    fi
885
886    test "$2" = conftestfile
887    )
888 then
889    # Ok.
890    :
891 else
892    { echo "configure: error: newly created file is older than distributed files!
893 Check your system clock" 1>&2; exit 1; }
894 fi
895 rm -f conftest*
896 echo "$ac_t""yes" 1>&6
897 if test "$program_transform_name" = s,x,x,; then
898   program_transform_name=
899 else
900   # Double any \ or $.  echo might interpret backslashes.
901   cat <<\EOF_SED > conftestsed
902 s,\\,\\\\,g; s,\$,$$,g
903 EOF_SED
904   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
905   rm -f conftestsed
906 fi
907 test "$program_prefix" != NONE &&
908   program_transform_name="s,^,${program_prefix},;$program_transform_name"
909 # Use a double $ so make ignores it.
910 test "$program_suffix" != NONE &&
911   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
912
913 # sed with no file args requires a program.
914 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
915
916 for ac_prog in mawk gawk nawk awk
917 do
918 # Extract the first word of "$ac_prog", so it can be a program name with args.
919 set dummy $ac_prog; ac_word=$2
920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921 echo "configure:922: checking for $ac_word" >&5
922 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
923   echo $ac_n "(cached) $ac_c" 1>&6
924 else
925   if test -n "$AWK"; then
926   ac_cv_prog_AWK="$AWK" # Let the user override the test.
927 else
928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
929   ac_dummy="$PATH"
930   for ac_dir in $ac_dummy; do
931     test -z "$ac_dir" && ac_dir=.
932     if test -f $ac_dir/$ac_word; then
933       ac_cv_prog_AWK="$ac_prog"
934       break
935     fi
936   done
937   IFS="$ac_save_ifs"
938 fi
939 fi
940 AWK="$ac_cv_prog_AWK"
941 if test -n "$AWK"; then
942   echo "$ac_t""$AWK" 1>&6
943 else
944   echo "$ac_t""no" 1>&6
945 fi
946
947 test -n "$AWK" && break
948 done
949
950 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
951 echo "configure:952: checking whether ${MAKE-make} sets \${MAKE}" >&5
952 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
953 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
954   echo $ac_n "(cached) $ac_c" 1>&6
955 else
956   cat > conftestmake <<\EOF
957 all:
958         @echo 'ac_maketemp="${MAKE}"'
959 EOF
960 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
961 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
962 if test -n "$ac_maketemp"; then
963   eval ac_cv_prog_make_${ac_make}_set=yes
964 else
965   eval ac_cv_prog_make_${ac_make}_set=no
966 fi
967 rm -f conftestmake
968 fi
969 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
970   echo "$ac_t""yes" 1>&6
971   SET_MAKE=
972 else
973   echo "$ac_t""no" 1>&6
974   SET_MAKE="MAKE=${MAKE-make}"
975 fi
976
977
978
979 PACKAGE=OpenLDAP
980
981 VERSION=$OL_VERSION
982
983 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
984   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
985 fi
986
987
988
989 missing_dir=`cd $ac_aux_dir && pwd`
990 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
991 echo "configure:992: checking for working aclocal" >&5
992 # Run test in a subshell; some versions of sh will print an error if
993 # an executable is not found, even if stderr is redirected.
994 # Redirect stdin to placate older versions of autoconf.  Sigh.
995 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
996    ACLOCAL=aclocal
997    echo "$ac_t""found" 1>&6
998 else
999    ACLOCAL="$missing_dir/missing aclocal"
1000    echo "$ac_t""missing" 1>&6
1001 fi
1002
1003 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1004 echo "configure:1005: checking for working autoconf" >&5
1005 # Run test in a subshell; some versions of sh will print an error if
1006 # an executable is not found, even if stderr is redirected.
1007 # Redirect stdin to placate older versions of autoconf.  Sigh.
1008 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1009    AUTOCONF=autoconf
1010    echo "$ac_t""found" 1>&6
1011 else
1012    AUTOCONF="$missing_dir/missing autoconf"
1013    echo "$ac_t""missing" 1>&6
1014 fi
1015
1016 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1017 echo "configure:1018: checking for working automake" >&5
1018 # Run test in a subshell; some versions of sh will print an error if
1019 # an executable is not found, even if stderr is redirected.
1020 # Redirect stdin to placate older versions of autoconf.  Sigh.
1021 if (automake --version) < /dev/null > /dev/null 2>&1; then
1022    AUTOMAKE=automake
1023    echo "$ac_t""found" 1>&6
1024 else
1025    AUTOMAKE="$missing_dir/missing automake"
1026    echo "$ac_t""missing" 1>&6
1027 fi
1028
1029 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1030 echo "configure:1031: checking for working autoheader" >&5
1031 # Run test in a subshell; some versions of sh will print an error if
1032 # an executable is not found, even if stderr is redirected.
1033 # Redirect stdin to placate older versions of autoconf.  Sigh.
1034 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1035    AUTOHEADER=autoheader
1036    echo "$ac_t""found" 1>&6
1037 else
1038    AUTOHEADER="$missing_dir/missing autoheader"
1039    echo "$ac_t""missing" 1>&6
1040 fi
1041
1042 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1043 echo "configure:1044: checking for working makeinfo" >&5
1044 # Run test in a subshell; some versions of sh will print an error if
1045 # an executable is not found, even if stderr is redirected.
1046 # Redirect stdin to placate older versions of autoconf.  Sigh.
1047 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1048    MAKEINFO=makeinfo
1049    echo "$ac_t""found" 1>&6
1050 else
1051    MAKEINFO="$missing_dir/missing makeinfo"
1052    echo "$ac_t""missing" 1>&6
1053 fi
1054
1055 install_sh="$missing_dir/install-sh"
1056 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1057
1058 for ac_prog in gnutar gtar tar
1059 do
1060 # Extract the first word of "$ac_prog", so it can be a program name with args.
1061 set dummy $ac_prog; ac_word=$2
1062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1063 echo "configure:1064: checking for $ac_word" >&5
1064 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1065   echo $ac_n "(cached) $ac_c" 1>&6
1066 else
1067   if test -n "$AMTAR"; then
1068   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1069 else
1070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1071   ac_dummy="$PATH"
1072   for ac_dir in $ac_dummy; do
1073     test -z "$ac_dir" && ac_dir=.
1074     if test -f $ac_dir/$ac_word; then
1075       ac_cv_prog_AMTAR="$ac_prog"
1076       break
1077     fi
1078   done
1079   IFS="$ac_save_ifs"
1080 fi
1081 fi
1082 AMTAR="$ac_cv_prog_AMTAR"
1083 if test -n "$AMTAR"; then
1084   echo "$ac_t""$AMTAR" 1>&6
1085 else
1086   echo "$ac_t""no" 1>&6
1087 fi
1088
1089 test -n "$AMTAR" && break
1090 done
1091
1092
1093 AMTARFLAGS=
1094 if test -n "$AMTAR"; then
1095   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1096         AMTARFLAGS=o
1097   fi
1098 fi
1099
1100
1101
1102 cat >> confdefs.h <<EOF
1103 #define OPENLDAP_PACKAGE "$PACKAGE"
1104 EOF
1105
1106 cat >> confdefs.h <<EOF
1107 #define OPENLDAP_VERSION "$VERSION"
1108 EOF
1109
1110
1111
1112
1113 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1114 echo "configure:1115: checking configure arguments" >&5
1115
1116
1117 top_builddir=`pwd`
1118
1119 ldap_subdir="/openldap"
1120
1121 # Check whether --with-subdir or --without-subdir was given.
1122 if test "${with_subdir+set}" = set; then
1123   withval="$with_subdir"
1124   case "$withval" in
1125         no) ldap_subdir=""
1126                 ;;
1127         yes)
1128                 ;;
1129         /*|\\*)
1130                 ldap_subdir="$withval"
1131                 ;;
1132         *)
1133                 ldap_subdir="/$withval"
1134                 ;;
1135 esac
1136
1137 fi
1138
1139
1140 # OpenLDAP --enable-debug
1141         # Check whether --enable-debug or --disable-debug was given.
1142 if test "${enable_debug+set}" = set; then
1143   enableval="$enable_debug"
1144   
1145         ol_arg=invalid
1146         for ol_val in auto yes no ; do
1147                 if test "$enableval" = "$ol_val" ; then
1148                         ol_arg="$ol_val"
1149                 fi
1150         done
1151         if test "$ol_arg" = "invalid" ; then
1152                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1153         fi
1154         ol_enable_debug="$ol_arg"
1155
1156 else
1157         ol_enable_debug="yes"
1158 fi
1159 # end --enable-debug
1160 # OpenLDAP --enable-syslog
1161         # Check whether --enable-syslog or --disable-syslog was given.
1162 if test "${enable_syslog+set}" = set; then
1163   enableval="$enable_syslog"
1164   
1165         ol_arg=invalid
1166         for ol_val in auto yes no ; do
1167                 if test "$enableval" = "$ol_val" ; then
1168                         ol_arg="$ol_val"
1169                 fi
1170         done
1171         if test "$ol_arg" = "invalid" ; then
1172                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1173         fi
1174         ol_enable_syslog="$ol_arg"
1175
1176 else
1177         ol_enable_syslog="auto"
1178 fi
1179 # end --enable-syslog
1180 # OpenLDAP --enable-proctitle
1181         # Check whether --enable-proctitle or --disable-proctitle was given.
1182 if test "${enable_proctitle+set}" = set; then
1183   enableval="$enable_proctitle"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1193         fi
1194         ol_enable_proctitle="$ol_arg"
1195
1196 else
1197         ol_enable_proctitle="yes"
1198 fi
1199 # end --enable-proctitle
1200 # OpenLDAP --enable-cache
1201         # Check whether --enable-cache or --disable-cache was given.
1202 if test "${enable_cache+set}" = set; then
1203   enableval="$enable_cache"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1213         fi
1214         ol_enable_cache="$ol_arg"
1215
1216 else
1217         ol_enable_cache="yes"
1218 fi
1219 # end --enable-cache
1220 # OpenLDAP --enable-dns
1221         # Check whether --enable-dns or --disable-dns was given.
1222 if test "${enable_dns+set}" = set; then
1223   enableval="$enable_dns"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1233         fi
1234         ol_enable_dns="$ol_arg"
1235
1236 else
1237         ol_enable_dns="no"
1238 fi
1239 # end --enable-dns
1240 # OpenLDAP --enable-referrals
1241         # Check whether --enable-referrals or --disable-referrals was given.
1242 if test "${enable_referrals+set}" = set; then
1243   enableval="$enable_referrals"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1253         fi
1254         ol_enable_referrals="$ol_arg"
1255
1256 else
1257         ol_enable_referrals="yes"
1258 fi
1259 # end --enable-referrals
1260 # OpenLDAP --enable-cldap
1261         # Check whether --enable-cldap or --disable-cldap was given.
1262 if test "${enable_cldap+set}" = set; then
1263   enableval="$enable_cldap"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1273         fi
1274         ol_enable_cldap="$ol_arg"
1275
1276 else
1277         ol_enable_cldap="no"
1278 fi
1279 # end --enable-cldap
1280 # OpenLDAP --enable-x_compile
1281         # Check whether --enable-x_compile or --disable-x_compile was given.
1282 if test "${enable_x_compile+set}" = set; then
1283   enableval="$enable_x_compile"
1284   
1285         ol_arg=invalid
1286         for ol_val in yes no ; do
1287                 if test "$enableval" = "$ol_val" ; then
1288                         ol_arg="$ol_val"
1289                 fi
1290         done
1291         if test "$ol_arg" = "invalid" ; then
1292                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1293         fi
1294         ol_enable_x_compile="$ol_arg"
1295
1296 else
1297         ol_enable_x_compile="no"
1298 fi
1299 # end --enable-x_compile
1300
1301 # OpenLDAP --enable-dmalloc
1302         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1303 if test "${enable_dmalloc+set}" = set; then
1304   enableval="$enable_dmalloc"
1305   
1306         ol_arg=invalid
1307         for ol_val in auto yes no ; do
1308                 if test "$enableval" = "$ol_val" ; then
1309                         ol_arg="$ol_val"
1310                 fi
1311         done
1312         if test "$ol_arg" = "invalid" ; then
1313                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1314         fi
1315         ol_enable_dmalloc="$ol_arg"
1316
1317 else
1318         ol_enable_dmalloc="no"
1319 fi
1320 # end --enable-dmalloc
1321
1322 # OpenLDAP --with-cyrus_sasl
1323         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1324 if test "${with_cyrus_sasl+set}" = set; then
1325   withval="$with_cyrus_sasl"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto yes no  ; do
1329                 if test "$withval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1335         fi
1336         ol_with_cyrus_sasl="$ol_arg"
1337
1338 else
1339         ol_with_cyrus_sasl="auto"
1340 fi
1341 # end --with-cyrus_sasl
1342
1343 # OpenLDAP --with-fetch
1344         # Check whether --with-fetch or --without-fetch was given.
1345 if test "${with_fetch+set}" = set; then
1346   withval="$with_fetch"
1347   
1348         ol_arg=invalid
1349         for ol_val in auto yes no  ; do
1350                 if test "$withval" = "$ol_val" ; then
1351                         ol_arg="$ol_val"
1352                 fi
1353         done
1354         if test "$ol_arg" = "invalid" ; then
1355                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1356         fi
1357         ol_with_fetch="$ol_arg"
1358
1359 else
1360         ol_with_fetch="auto"
1361 fi
1362 # end --with-fetch
1363
1364 # OpenLDAP --with-kerberos
1365         # Check whether --with-kerberos or --without-kerberos was given.
1366 if test "${with_kerberos+set}" = set; then
1367   withval="$with_kerberos"
1368   
1369         ol_arg=invalid
1370         for ol_val in auto k5 k4 afs yes no ; do
1371                 if test "$withval" = "$ol_val" ; then
1372                         ol_arg="$ol_val"
1373                 fi
1374         done
1375         if test "$ol_arg" = "invalid" ; then
1376                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1377         fi
1378         ol_with_kerberos="$ol_arg"
1379
1380 else
1381         ol_with_kerberos="auto"
1382 fi
1383 # end --with-kerberos
1384
1385 # OpenLDAP --with-readline
1386         # Check whether --with-readline or --without-readline was given.
1387 if test "${with_readline+set}" = set; then
1388   withval="$with_readline"
1389   
1390         ol_arg=invalid
1391         for ol_val in auto yes no  ; do
1392                 if test "$withval" = "$ol_val" ; then
1393                         ol_arg="$ol_val"
1394                 fi
1395         done
1396         if test "$ol_arg" = "invalid" ; then
1397                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1398         fi
1399         ol_with_readline="$ol_arg"
1400
1401 else
1402         ol_with_readline="auto"
1403 fi
1404 # end --with-readline
1405
1406 # OpenLDAP --with-threads
1407         # Check whether --with-threads or --without-threads was given.
1408 if test "${with_threads+set}" = set; then
1409   withval="$with_threads"
1410   
1411         ol_arg=invalid
1412         for ol_val in auto posix mach lwp yes no manual  ; do
1413                 if test "$withval" = "$ol_val" ; then
1414                         ol_arg="$ol_val"
1415                 fi
1416         done
1417         if test "$ol_arg" = "invalid" ; then
1418                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1419         fi
1420         ol_with_threads="$ol_arg"
1421
1422 else
1423         ol_with_threads="auto"
1424 fi
1425 # end --with-threads
1426
1427 # OpenLDAP --with-tls
1428         # Check whether --with-tls or --without-tls was given.
1429 if test "${with_tls+set}" = set; then
1430   withval="$with_tls"
1431   
1432         ol_arg=invalid
1433         for ol_val in auto ssleay openssl yes no  ; do
1434                 if test "$withval" = "$ol_val" ; then
1435                         ol_arg="$ol_val"
1436                 fi
1437         done
1438         if test "$ol_arg" = "invalid" ; then
1439                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1440         fi
1441         ol_with_tls="$ol_arg"
1442
1443 else
1444         ol_with_tls="auto"
1445 fi
1446 # end --with-tls
1447
1448 # OpenLDAP --with-yielding_select
1449         # Check whether --with-yielding_select or --without-yielding_select was given.
1450 if test "${with_yielding_select+set}" = set; then
1451   withval="$with_yielding_select"
1452   
1453         ol_arg=invalid
1454         for ol_val in auto yes no manual  ; do
1455                 if test "$withval" = "$ol_val" ; then
1456                         ol_arg="$ol_val"
1457                 fi
1458         done
1459         if test "$ol_arg" = "invalid" ; then
1460                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1461         fi
1462         ol_with_yielding_select="$ol_arg"
1463
1464 else
1465         ol_with_yielding_select="auto"
1466 fi
1467 # end --with-yielding_select
1468
1469
1470
1471 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1472 if test "${with_xxslapdoptions+set}" = set; then
1473   withval="$with_xxslapdoptions"
1474   :
1475 fi
1476
1477 # OpenLDAP --enable-slapd
1478         # Check whether --enable-slapd or --disable-slapd was given.
1479 if test "${enable_slapd+set}" = set; then
1480   enableval="$enable_slapd"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto yes no ; do
1484                 if test "$enableval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1490         fi
1491         ol_enable_slapd="$ol_arg"
1492
1493 else
1494         ol_enable_slapd="yes"
1495 fi
1496 # end --enable-slapd
1497 # OpenLDAP --enable-cleartext
1498         # Check whether --enable-cleartext or --disable-cleartext was given.
1499 if test "${enable_cleartext+set}" = set; then
1500   enableval="$enable_cleartext"
1501   
1502         ol_arg=invalid
1503         for ol_val in auto yes no ; do
1504                 if test "$enableval" = "$ol_val" ; then
1505                         ol_arg="$ol_val"
1506                 fi
1507         done
1508         if test "$ol_arg" = "invalid" ; then
1509                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1510         fi
1511         ol_enable_cleartext="$ol_arg"
1512
1513 else
1514         ol_enable_cleartext="yes"
1515 fi
1516 # end --enable-cleartext
1517 # OpenLDAP --enable-crypt
1518         # Check whether --enable-crypt or --disable-crypt was given.
1519 if test "${enable_crypt+set}" = set; then
1520   enableval="$enable_crypt"
1521   
1522         ol_arg=invalid
1523         for ol_val in auto yes no ; do
1524                 if test "$enableval" = "$ol_val" ; then
1525                         ol_arg="$ol_val"
1526                 fi
1527         done
1528         if test "$ol_arg" = "invalid" ; then
1529                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1530         fi
1531         ol_enable_crypt="$ol_arg"
1532
1533 else
1534         ol_enable_crypt="auto"
1535 fi
1536 # end --enable-crypt
1537 # OpenLDAP --enable-modules
1538         # Check whether --enable-modules or --disable-modules was given.
1539 if test "${enable_modules+set}" = set; then
1540   enableval="$enable_modules"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no ; do
1544                 if test "$enableval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1550         fi
1551         ol_enable_modules="$ol_arg"
1552
1553 else
1554         ol_enable_modules="no"
1555 fi
1556 # end --enable-modules
1557 # OpenLDAP --enable-multimaster
1558         # Check whether --enable-multimaster or --disable-multimaster was given.
1559 if test "${enable_multimaster+set}" = set; then
1560   enableval="$enable_multimaster"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no ; do
1564                 if test "$enableval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1570         fi
1571         ol_enable_multimaster="$ol_arg"
1572
1573 else
1574         ol_enable_multimaster="no"
1575 fi
1576 # end --enable-multimaster
1577 # OpenLDAP --enable-phonetic
1578         # Check whether --enable-phonetic or --disable-phonetic was given.
1579 if test "${enable_phonetic+set}" = set; then
1580   enableval="$enable_phonetic"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1590         fi
1591         ol_enable_phonetic="$ol_arg"
1592
1593 else
1594         ol_enable_phonetic="no"
1595 fi
1596 # end --enable-phonetic
1597 # OpenLDAP --enable-quipu
1598         # Check whether --enable-quipu or --disable-quipu was given.
1599 if test "${enable_quipu+set}" = set; then
1600   enableval="$enable_quipu"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no ; do
1604                 if test "$enableval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1610         fi
1611         ol_enable_quipu="$ol_arg"
1612
1613 else
1614         ol_enable_quipu="no"
1615 fi
1616 # end --enable-quipu
1617 # OpenLDAP --enable-rlookups
1618         # Check whether --enable-rlookups or --disable-rlookups was given.
1619 if test "${enable_rlookups+set}" = set; then
1620   enableval="$enable_rlookups"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no ; do
1624                 if test "$enableval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1630         fi
1631         ol_enable_rlookups="$ol_arg"
1632
1633 else
1634         ol_enable_rlookups="auto"
1635 fi
1636 # end --enable-rlookups
1637 # OpenLDAP --enable-wrappers
1638         # Check whether --enable-wrappers or --disable-wrappers was given.
1639 if test "${enable_wrappers+set}" = set; then
1640   enableval="$enable_wrappers"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no ; do
1644                 if test "$enableval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1650         fi
1651         ol_enable_wrappers="$ol_arg"
1652
1653 else
1654         ol_enable_wrappers="no"
1655 fi
1656 # end --enable-wrappers
1657
1658 # OpenLDAP --enable-bdb2
1659         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1660 if test "${enable_bdb2+set}" = set; then
1661   enableval="$enable_bdb2"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1671         fi
1672         ol_enable_bdb2="$ol_arg"
1673
1674 else
1675         ol_enable_bdb2="no"
1676 fi
1677 # end --enable-bdb2
1678 # OpenLDAP --with-bdb2_module
1679         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1680 if test "${with_bdb2_module+set}" = set; then
1681   withval="$with_bdb2_module"
1682   
1683         ol_arg=invalid
1684         for ol_val in static dynamic ; do
1685                 if test "$withval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1691         fi
1692         ol_with_bdb2_module="$ol_arg"
1693
1694 else
1695         ol_with_bdb2_module="static"
1696 fi
1697 # end --with-bdb2_module
1698
1699 # OpenLDAP --enable-ldap
1700         # Check whether --enable-ldap or --disable-ldap was given.
1701 if test "${enable_ldap+set}" = set; then
1702   enableval="$enable_ldap"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1712         fi
1713         ol_enable_ldap="$ol_arg"
1714
1715 else
1716         ol_enable_ldap="no"
1717 fi
1718 # end --enable-ldap
1719 # OpenLDAP --with-ldap_module
1720         # Check whether --with-ldap_module or --without-ldap_module was given.
1721 if test "${with_ldap_module+set}" = set; then
1722   withval="$with_ldap_module"
1723   
1724         ol_arg=invalid
1725         for ol_val in static dynamic ; do
1726                 if test "$withval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1732         fi
1733         ol_with_ldap_module="$ol_arg"
1734
1735 else
1736         ol_with_ldap_module="static"
1737 fi
1738 # end --with-ldap_module
1739
1740 # OpenLDAP --enable-ldbm
1741         # Check whether --enable-ldbm or --disable-ldbm was given.
1742 if test "${enable_ldbm+set}" = set; then
1743   enableval="$enable_ldbm"
1744   
1745         ol_arg=invalid
1746         for ol_val in auto yes no ; do
1747                 if test "$enableval" = "$ol_val" ; then
1748                         ol_arg="$ol_val"
1749                 fi
1750         done
1751         if test "$ol_arg" = "invalid" ; then
1752                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1753         fi
1754         ol_enable_ldbm="$ol_arg"
1755
1756 else
1757         ol_enable_ldbm="yes"
1758 fi
1759 # end --enable-ldbm
1760 # OpenLDAP --with-ldbm_module
1761         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1762 if test "${with_ldbm_module+set}" = set; then
1763   withval="$with_ldbm_module"
1764   
1765         ol_arg=invalid
1766         for ol_val in static dynamic ; do
1767                 if test "$withval" = "$ol_val" ; then
1768                         ol_arg="$ol_val"
1769                 fi
1770         done
1771         if test "$ol_arg" = "invalid" ; then
1772                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1773         fi
1774         ol_with_ldbm_module="$ol_arg"
1775
1776 else
1777         ol_with_ldbm_module="static"
1778 fi
1779 # end --with-ldbm_module
1780
1781 # OpenLDAP --with-ldbm_api
1782         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1783 if test "${with_ldbm_api+set}" = set; then
1784   withval="$with_ldbm_api"
1785   
1786         ol_arg=invalid
1787         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1788                 if test "$withval" = "$ol_val" ; then
1789                         ol_arg="$ol_val"
1790                 fi
1791         done
1792         if test "$ol_arg" = "invalid" ; then
1793                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1794         fi
1795         ol_with_ldbm_api="$ol_arg"
1796
1797 else
1798         ol_with_ldbm_api="auto"
1799 fi
1800 # end --with-ldbm_api
1801
1802 # OpenLDAP --with-ldbm_type
1803         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1804 if test "${with_ldbm_type+set}" = set; then
1805   withval="$with_ldbm_type"
1806   
1807         ol_arg=invalid
1808         for ol_val in auto btree hash ; do
1809                 if test "$withval" = "$ol_val" ; then
1810                         ol_arg="$ol_val"
1811                 fi
1812         done
1813         if test "$ol_arg" = "invalid" ; then
1814                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1815         fi
1816         ol_with_ldbm_type="$ol_arg"
1817
1818 else
1819         ol_with_ldbm_type="auto"
1820 fi
1821 # end --with-ldbm_type
1822
1823
1824 # OpenLDAP --enable-passwd
1825         # Check whether --enable-passwd or --disable-passwd was given.
1826 if test "${enable_passwd+set}" = set; then
1827   enableval="$enable_passwd"
1828   
1829         ol_arg=invalid
1830         for ol_val in auto yes no ; do
1831                 if test "$enableval" = "$ol_val" ; then
1832                         ol_arg="$ol_val"
1833                 fi
1834         done
1835         if test "$ol_arg" = "invalid" ; then
1836                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1837         fi
1838         ol_enable_passwd="$ol_arg"
1839
1840 else
1841         ol_enable_passwd="no"
1842 fi
1843 # end --enable-passwd
1844 # OpenLDAP --with-passwd_module
1845         # Check whether --with-passwd_module or --without-passwd_module was given.
1846 if test "${with_passwd_module+set}" = set; then
1847   withval="$with_passwd_module"
1848   
1849         ol_arg=invalid
1850         for ol_val in static dynamic ; do
1851                 if test "$withval" = "$ol_val" ; then
1852                         ol_arg="$ol_val"
1853                 fi
1854         done
1855         if test "$ol_arg" = "invalid" ; then
1856                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1857         fi
1858         ol_with_passwd_module="$ol_arg"
1859
1860 else
1861         ol_with_passwd_module="static"
1862 fi
1863 # end --with-passwd_module
1864
1865 # OpenLDAP --enable-perl
1866         # Check whether --enable-perl or --disable-perl was given.
1867 if test "${enable_perl+set}" = set; then
1868   enableval="$enable_perl"
1869   
1870         ol_arg=invalid
1871         for ol_val in auto yes no ; do
1872                 if test "$enableval" = "$ol_val" ; then
1873                         ol_arg="$ol_val"
1874                 fi
1875         done
1876         if test "$ol_arg" = "invalid" ; then
1877                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1878         fi
1879         ol_enable_perl="$ol_arg"
1880
1881 else
1882         ol_enable_perl="no"
1883 fi
1884 # end --enable-perl
1885 # OpenLDAP --with-perl_module
1886         # Check whether --with-perl_module or --without-perl_module was given.
1887 if test "${with_perl_module+set}" = set; then
1888   withval="$with_perl_module"
1889   
1890         ol_arg=invalid
1891         for ol_val in static dynamic ; do
1892                 if test "$withval" = "$ol_val" ; then
1893                         ol_arg="$ol_val"
1894                 fi
1895         done
1896         if test "$ol_arg" = "invalid" ; then
1897                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1898         fi
1899         ol_with_perl_module="$ol_arg"
1900
1901 else
1902         ol_with_perl_module="static"
1903 fi
1904 # end --with-perl_module
1905
1906 # OpenLDAP --enable-shell
1907         # Check whether --enable-shell or --disable-shell was given.
1908 if test "${enable_shell+set}" = set; then
1909   enableval="$enable_shell"
1910   
1911         ol_arg=invalid
1912         for ol_val in auto yes no ; do
1913                 if test "$enableval" = "$ol_val" ; then
1914                         ol_arg="$ol_val"
1915                 fi
1916         done
1917         if test "$ol_arg" = "invalid" ; then
1918                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1919         fi
1920         ol_enable_shell="$ol_arg"
1921
1922 else
1923         ol_enable_shell="no"
1924 fi
1925 # end --enable-shell
1926 # OpenLDAP --with-shell_module
1927         # Check whether --with-shell_module or --without-shell_module was given.
1928 if test "${with_shell_module+set}" = set; then
1929   withval="$with_shell_module"
1930   
1931         ol_arg=invalid
1932         for ol_val in static dynamic ; do
1933                 if test "$withval" = "$ol_val" ; then
1934                         ol_arg="$ol_val"
1935                 fi
1936         done
1937         if test "$ol_arg" = "invalid" ; then
1938                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1939         fi
1940         ol_with_shell_module="$ol_arg"
1941
1942 else
1943         ol_with_shell_module="static"
1944 fi
1945 # end --with-shell_module
1946
1947 # OpenLDAP --enable-tcl
1948         # Check whether --enable-tcl or --disable-tcl was given.
1949 if test "${enable_tcl+set}" = set; then
1950   enableval="$enable_tcl"
1951   
1952         ol_arg=invalid
1953         for ol_val in auto yes no ; do
1954                 if test "$enableval" = "$ol_val" ; then
1955                         ol_arg="$ol_val"
1956                 fi
1957         done
1958         if test "$ol_arg" = "invalid" ; then
1959                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1960         fi
1961         ol_enable_tcl="$ol_arg"
1962
1963 else
1964         ol_enable_tcl="no"
1965 fi
1966 # end --enable-tcl
1967 # OpenLDAP --with-tcl_module
1968         # Check whether --with-tcl_module or --without-tcl_module was given.
1969 if test "${with_tcl_module+set}" = set; then
1970   withval="$with_tcl_module"
1971   
1972         ol_arg=invalid
1973         for ol_val in static dynamic ; do
1974                 if test "$withval" = "$ol_val" ; then
1975                         ol_arg="$ol_val"
1976                 fi
1977         done
1978         if test "$ol_arg" = "invalid" ; then
1979                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1980         fi
1981         ol_with_tcl_module="$ol_arg"
1982
1983 else
1984         ol_with_tcl_module="static"
1985 fi
1986 # end --with-tcl_module
1987
1988
1989 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1990 if test "${with_xxslurpdoptions+set}" = set; then
1991   withval="$with_xxslurpdoptions"
1992   :
1993 fi
1994
1995 # OpenLDAP --enable-slurpd
1996         # Check whether --enable-slurpd or --disable-slurpd was given.
1997 if test "${enable_slurpd+set}" = set; then
1998   enableval="$enable_slurpd"
1999   
2000         ol_arg=invalid
2001         for ol_val in auto yes no ; do
2002                 if test "$enableval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2008         fi
2009         ol_enable_slurpd="$ol_arg"
2010
2011 else
2012         ol_enable_slurpd="auto"
2013 fi
2014 # end --enable-slurpd
2015
2016 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2017 if test "${with_xxliboptions+set}" = set; then
2018   withval="$with_xxliboptions"
2019   :
2020 fi
2021
2022 # Check whether --enable-static or --disable-static was given.
2023 if test "${enable_static+set}" = set; then
2024   enableval="$enable_static"
2025   p=${PACKAGE-default}
2026 case "$enableval" in
2027 yes) enable_static=yes ;;
2028 no) enable_static=no ;;
2029 *)
2030   enable_static=no
2031   # Look at the argument we got.  We use all the common list separators.
2032   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2033   for pkg in $enableval; do
2034     if test "X$pkg" = "X$p"; then
2035       enable_static=yes
2036     fi
2037   done
2038   IFS="$ac_save_ifs"
2039   ;;
2040 esac
2041 else
2042   enable_static=yes
2043 fi
2044
2045 # Check whether --enable-shared or --disable-shared was given.
2046 if test "${enable_shared+set}" = set; then
2047   enableval="$enable_shared"
2048   p=${PACKAGE-default}
2049 case "$enableval" in
2050 yes) enable_shared=yes ;;
2051 no) enable_shared=no ;;
2052 *)
2053   enable_shared=no
2054   # Look at the argument we got.  We use all the common list separators.
2055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2056   for pkg in $enableval; do
2057     if test "X$pkg" = "X$p"; then
2058       enable_shared=yes
2059     fi
2060   done
2061   IFS="$ac_save_ifs"
2062   ;;
2063 esac
2064 else
2065   enable_shared=yes
2066 fi
2067
2068
2069 # validate options
2070 if test $ol_enable_dns = yes ; then
2071         if test $ol_enable_referrals = no ; then
2072                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2073         fi
2074         if test $ol_enable_referrals = auto ; then
2075                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2076                 ol_enable_referrals=yes
2077         fi
2078 fi
2079
2080 if test $ol_enable_slapd = no ; then
2081                 if test $ol_enable_bdb2 = yes ; then
2082                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2083         fi
2084         if test $ol_enable_ldap = yes ; then
2085                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2086         fi
2087         if test $ol_enable_ldbm = yes ; then
2088                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2089         fi
2090         if test $ol_enable_passwd = yes ; then
2091                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2092         fi
2093         if test $ol_enable_perl = yes ; then
2094                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2095         fi
2096         if test $ol_enable_shell = yes ; then
2097                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2098         fi
2099         if test $ol_enable_tcl = yes ; then
2100                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2101         fi
2102         if test $ol_enable_modules = yes ; then
2103                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2104         fi
2105         if test $ol_enable_multimaster = yes ; then
2106                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2107         fi
2108         if test $ol_enable_wrappers = yes ; then
2109                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2110         fi
2111         if test $ol_enable_phonetic = yes ; then
2112                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2113         fi
2114         if test $ol_enable_quipu = yes ; then
2115                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2116         fi
2117         if test $ol_enable_rlookups = yes ; then
2118                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2119         fi
2120         if test $ol_with_ldbm_api != auto ; then
2121                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2122         fi
2123         if test $ol_with_ldbm_type != auto ; then
2124                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2125         fi
2126         if test $ol_with_bdb2_module != static ; then
2127                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2128         fi
2129         if test $ol_with_ldap_module != static ; then
2130                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2131         fi
2132         if test $ol_with_ldbm_module != static ; then
2133                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2134         fi
2135         if test $ol_with_passwd_module != static ; then
2136                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2137         fi
2138         if test $ol_with_perl_module != static ; then
2139                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2140         fi
2141         if test $ol_with_shell_module != static ; then
2142                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2143         fi
2144         if test $ol_with_tcl_module != static ; then
2145                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2146         fi
2147         if test $ol_enable_slurpd = yes ; then
2148                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2149         fi
2150
2151         # force settings to no
2152         ol_enable_bdb2=no
2153         ol_enable_ldap=no
2154         ol_enable_ldbm=no
2155         ol_enable_passwd=no
2156         ol_enable_perl=no
2157         ol_enable_shell=no
2158         ol_enable_tcl=no
2159
2160         ol_enable_modules=no
2161         ol_enable_multimaster=no
2162         ol_enable_phonetic=no
2163         ol_enable_quipu=no
2164         ol_enable_rlookups=no
2165         ol_enable_wrappers=no
2166
2167         ol_with_ldbm_api=no
2168         ol_with_ldbm_type=no
2169
2170         ol_with_bdb2_module=static
2171         ol_with_ldap_module=static
2172         ol_with_ldbm_module=static
2173         ol_with_passwd_module=static
2174         ol_with_perl_module=static
2175         ol_with_shell_module=static
2176         ol_with_tcl_module=static
2177
2178         ol_enable_slurpd=no
2179
2180 elif test $ol_enable_ldbm = no ; then
2181         
2182         if test $ol_with_ldbm_api != auto ; then
2183                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2184         fi
2185
2186         if test $ol_with_ldbm_type != auto ; then
2187                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2188         fi
2189
2190         if test $ol_with_ldbm_module != static ; then
2191                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2192         fi
2193
2194         if test $ol_enable_bdb2 = yes ; then
2195                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2196         fi
2197
2198         if test $ol_enable_modules != yes -a \
2199                 $ol_enable_ldap = no -a \
2200                 $ol_enable_passwd = no -a \
2201                 $ol_enable_perl = no -a \
2202                 $ol_enable_shell = no -a \
2203                 $ol_enable_tcl = no ; then
2204                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2205         fi
2206
2207         ol_with_ldbm_api=no
2208         ol_with_ldbm_type=no
2209         ol_with_ldbm_module=static
2210
2211 elif test $ol_enable_bdb2 = yes ; then
2212         
2213         if test $ol_with_ldbm_api != auto -a \
2214                 $ol_with_ldbm_api != db2 ; then
2215                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2216         fi
2217
2218         ol_with_ldbm_api=db2
2219
2220 else
2221         
2222         if test $ol_enable_bdb2 != no ; then
2223                 if test $ol_with_ldbm_api != auto -a \
2224                         $ol_with_ldbm_api != db2 ; then
2225                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2226                         ol_enable_bdb2=no
2227                 fi
2228         fi
2229
2230         if test $ol_with_ldbm_api = gdbm -a \
2231                 $ol_with_ldbm_type = btree ; then
2232                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2233         fi
2234         if test $ol_with_ldbm_api = mdbm -a \
2235                 $ol_with_ldbm_type = btree ; then
2236                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2237         fi
2238         if test $ol_with_ldbm_api = ndbm -a \
2239                 $ol_with_ldbm_type = btree ; then
2240                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2241         fi
2242 fi
2243
2244 if test $ol_enable_slurpd = yes ; then
2245                 if test $ol_with_threads = no ; then
2246                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2247         fi
2248 fi
2249
2250 echo "$ac_t""done" 1>&6
2251
2252 ## Initialize vars
2253 LDAP_LIBS=
2254 LDIF_LIBS=
2255 LDBM_LIBS=
2256 LTHREAD_LIBS=
2257 LUTIL_LIBS=
2258
2259 SLAPD_LIBS=
2260 SLURPD_LIBS=
2261
2262 BUILD_SLAPD=no
2263 BUILD_SLURPD=no
2264
2265 BUILD_BDB2=no
2266 BUILD_LDAP=no
2267 BUILD_LDBM=no
2268 BUILD_PASSWD=no
2269 BUILD_PERL=no
2270 BUILD_QUIPU=no
2271 BUILD_SHELL=no
2272 BUILD_TCL=no
2273 BUILD_THREAD=no
2274
2275 BUILD_BDB2_DYNAMIC=static
2276 BUILD_LDAP_DYNAMIC=static
2277 BUILD_LDBM_DYNAMIC=static
2278 BUILD_PASSWD_DYNAMIC=static
2279 BUILD_PERL_DYNAMIC=static
2280 BUILD_SHELL_DYNAMIC=static
2281 BUILD_TCL_DYNAMIC=static
2282
2283 SLAPD_MODULES_LDFLAGS=
2284 SLAPD_MODULES_CPPFLAGS=
2285 SLAPD_MODULES_LIST=
2286
2287 SLAPD_PERL_LDFLAGS=
2288 SLAPD_PERL_CPPFLAGS=
2289
2290 KRB_LIBS=
2291 READLINE_LIBS=
2292 SASL_LIBS=
2293 TERMCAP_LIBS=
2294 TLS_LIBS=
2295 MODULES_LIBS=
2296
2297
2298
2299 cat >> confdefs.h <<\EOF
2300 #define HAVE_MKVERSION 1
2301 EOF
2302
2303
2304
2305
2306
2307 ol_aix_threads=no
2308 case "$target" in
2309 *-*-aix*)       if test -z "$CC" ; then
2310                 case "$ol_with_threads" in
2311                 auto | yes |  posix) ol_aix_threads=yes ;;
2312                 esac
2313         fi
2314 ;;
2315 esac
2316
2317 if test $ol_aix_threads = yes ; then
2318         if test -z "${CC}" ; then
2319                 for ac_prog in cc_r xlc_r cc
2320 do
2321 # Extract the first word of "$ac_prog", so it can be a program name with args.
2322 set dummy $ac_prog; ac_word=$2
2323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2324 echo "configure:2325: checking for $ac_word" >&5
2325 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2326   echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328   if test -n "$CC"; then
2329   ac_cv_prog_CC="$CC" # Let the user override the test.
2330 else
2331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2332   ac_dummy="$PATH"
2333   for ac_dir in $ac_dummy; do
2334     test -z "$ac_dir" && ac_dir=.
2335     if test -f $ac_dir/$ac_word; then
2336       ac_cv_prog_CC="$ac_prog"
2337       break
2338     fi
2339   done
2340   IFS="$ac_save_ifs"
2341 fi
2342 fi
2343 CC="$ac_cv_prog_CC"
2344 if test -n "$CC"; then
2345   echo "$ac_t""$CC" 1>&6
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349
2350 test -n "$CC" && break
2351 done
2352
2353
2354                 if test "$CC" = cc ; then
2355                                                 if test $ol_with_threads != auto ; then
2356                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2357                         else
2358                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2359                         fi
2360                         ol_with_threads=no
2361                 fi
2362         fi
2363
2364         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2365                 ol_with_threads=posix
2366                 ol_cv_pthread_create=yes
2367         fi
2368 fi
2369
2370 if test -z "${CC}"; then
2371         for ac_prog in cc
2372 do
2373 # Extract the first word of "$ac_prog", so it can be a program name with args.
2374 set dummy $ac_prog; ac_word=$2
2375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2376 echo "configure:2377: checking for $ac_word" >&5
2377 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2378   echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380   if test -n "$CC"; then
2381   ac_cv_prog_CC="$CC" # Let the user override the test.
2382 else
2383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2384   ac_dummy="$PATH"
2385   for ac_dir in $ac_dummy; do
2386     test -z "$ac_dir" && ac_dir=.
2387     if test -f $ac_dir/$ac_word; then
2388       ac_cv_prog_CC="$ac_prog"
2389       break
2390     fi
2391   done
2392   IFS="$ac_save_ifs"
2393 fi
2394 fi
2395 CC="$ac_cv_prog_CC"
2396 if test -n "$CC"; then
2397   echo "$ac_t""$CC" 1>&6
2398 else
2399   echo "$ac_t""no" 1>&6
2400 fi
2401
2402 test -n "$CC" && break
2403 done
2404
2405 fi
2406
2407
2408
2409 # Check whether --enable-fast-install or --disable-fast-install was given.
2410 if test "${enable_fast_install+set}" = set; then
2411   enableval="$enable_fast_install"
2412   p=${PACKAGE-default}
2413 case "$enableval" in
2414 yes) enable_fast_install=yes ;;
2415 no) enable_fast_install=no ;;
2416 *)
2417   enable_fast_install=no
2418   # Look at the argument we got.  We use all the common list separators.
2419   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2420   for pkg in $enableval; do
2421     if test "X$pkg" = "X$p"; then
2422       enable_fast_install=yes
2423     fi
2424   done
2425   IFS="$ac_save_ifs"
2426   ;;
2427 esac
2428 else
2429   enable_fast_install=yes
2430 fi
2431
2432 # Extract the first word of "ranlib", so it can be a program name with args.
2433 set dummy ranlib; ac_word=$2
2434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_word" >&5
2436 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   if test -n "$RANLIB"; then
2440   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2441 else
2442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2443   ac_dummy="$PATH"
2444   for ac_dir in $ac_dummy; do
2445     test -z "$ac_dir" && ac_dir=.
2446     if test -f $ac_dir/$ac_word; then
2447       ac_cv_prog_RANLIB="ranlib"
2448       break
2449     fi
2450   done
2451   IFS="$ac_save_ifs"
2452   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2453 fi
2454 fi
2455 RANLIB="$ac_cv_prog_RANLIB"
2456 if test -n "$RANLIB"; then
2457   echo "$ac_t""$RANLIB" 1>&6
2458 else
2459   echo "$ac_t""no" 1>&6
2460 fi
2461
2462 # Extract the first word of "gcc", so it can be a program name with args.
2463 set dummy gcc; ac_word=$2
2464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2465 echo "configure:2466: checking for $ac_word" >&5
2466 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2467   echo $ac_n "(cached) $ac_c" 1>&6
2468 else
2469   if test -n "$CC"; then
2470   ac_cv_prog_CC="$CC" # Let the user override the test.
2471 else
2472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2473   ac_dummy="$PATH"
2474   for ac_dir in $ac_dummy; do
2475     test -z "$ac_dir" && ac_dir=.
2476     if test -f $ac_dir/$ac_word; then
2477       ac_cv_prog_CC="gcc"
2478       break
2479     fi
2480   done
2481   IFS="$ac_save_ifs"
2482 fi
2483 fi
2484 CC="$ac_cv_prog_CC"
2485 if test -n "$CC"; then
2486   echo "$ac_t""$CC" 1>&6
2487 else
2488   echo "$ac_t""no" 1>&6
2489 fi
2490
2491 if test -z "$CC"; then
2492   # Extract the first word of "cc", so it can be a program name with args.
2493 set dummy cc; ac_word=$2
2494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2495 echo "configure:2496: checking for $ac_word" >&5
2496 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2497   echo $ac_n "(cached) $ac_c" 1>&6
2498 else
2499   if test -n "$CC"; then
2500   ac_cv_prog_CC="$CC" # Let the user override the test.
2501 else
2502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2503   ac_prog_rejected=no
2504   ac_dummy="$PATH"
2505   for ac_dir in $ac_dummy; do
2506     test -z "$ac_dir" && ac_dir=.
2507     if test -f $ac_dir/$ac_word; then
2508       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2509         ac_prog_rejected=yes
2510         continue
2511       fi
2512       ac_cv_prog_CC="cc"
2513       break
2514     fi
2515   done
2516   IFS="$ac_save_ifs"
2517 if test $ac_prog_rejected = yes; then
2518   # We found a bogon in the path, so make sure we never use it.
2519   set dummy $ac_cv_prog_CC
2520   shift
2521   if test $# -gt 0; then
2522     # We chose a different compiler from the bogus one.
2523     # However, it has the same basename, so the bogon will be chosen
2524     # first if we set CC to just the basename; use the full file name.
2525     shift
2526     set dummy "$ac_dir/$ac_word" "$@"
2527     shift
2528     ac_cv_prog_CC="$@"
2529   fi
2530 fi
2531 fi
2532 fi
2533 CC="$ac_cv_prog_CC"
2534 if test -n "$CC"; then
2535   echo "$ac_t""$CC" 1>&6
2536 else
2537   echo "$ac_t""no" 1>&6
2538 fi
2539
2540   if test -z "$CC"; then
2541     case "`uname -s`" in
2542     *win32* | *WIN32* | *CYGWIN*)
2543       # Extract the first word of "cl", so it can be a program name with args.
2544 set dummy cl; ac_word=$2
2545 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2546 echo "configure:2547: checking for $ac_word" >&5
2547 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   if test -n "$CC"; then
2551   ac_cv_prog_CC="$CC" # Let the user override the test.
2552 else
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2554   ac_dummy="$PATH"
2555   for ac_dir in $ac_dummy; do
2556     test -z "$ac_dir" && ac_dir=.
2557     if test -f $ac_dir/$ac_word; then
2558       ac_cv_prog_CC="cl"
2559       break
2560     fi
2561   done
2562   IFS="$ac_save_ifs"
2563 fi
2564 fi
2565 CC="$ac_cv_prog_CC"
2566 if test -n "$CC"; then
2567   echo "$ac_t""$CC" 1>&6
2568 else
2569   echo "$ac_t""no" 1>&6
2570 fi
2571  ;;
2572     esac
2573   fi
2574   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2575 fi
2576
2577 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2578 echo "configure:2579: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2579
2580 ac_ext=c
2581 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2582 ac_cpp='$CPP $CPPFLAGS'
2583 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2584 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2585 cross_compiling=$ac_cv_prog_cc_cross
2586
2587 cat > conftest.$ac_ext << EOF
2588
2589 #line 2590 "configure"
2590 #include "confdefs.h"
2591
2592 main(){return(0);}
2593 EOF
2594 if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2595   ac_cv_prog_cc_works=yes
2596   # If we can't run a trivial program, we are probably using a cross compiler.
2597   if (./conftest; exit) 2>/dev/null; then
2598     ac_cv_prog_cc_cross=no
2599   else
2600     ac_cv_prog_cc_cross=yes
2601   fi
2602 else
2603   echo "configure: failed program was:" >&5
2604   cat conftest.$ac_ext >&5
2605   ac_cv_prog_cc_works=no
2606 fi
2607 rm -fr conftest*
2608 ac_ext=c
2609 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2610 ac_cpp='$CPP $CPPFLAGS'
2611 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2612 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2613 cross_compiling=$ac_cv_prog_cc_cross
2614
2615 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2616 if test $ac_cv_prog_cc_works = no; then
2617   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2618 fi
2619 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2620 echo "configure:2621: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2621 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2622 cross_compiling=$ac_cv_prog_cc_cross
2623
2624 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2625 echo "configure:2626: checking whether we are using GNU C" >&5
2626 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2627   echo $ac_n "(cached) $ac_c" 1>&6
2628 else
2629   cat > conftest.c <<EOF
2630 #ifdef __GNUC__
2631   yes;
2632 #endif
2633 EOF
2634 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2635   ac_cv_prog_gcc=yes
2636 else
2637   ac_cv_prog_gcc=no
2638 fi
2639 fi
2640
2641 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2642
2643 if test $ac_cv_prog_gcc = yes; then
2644   GCC=yes
2645 else
2646   GCC=
2647 fi
2648
2649 ac_test_CFLAGS="${CFLAGS+set}"
2650 ac_save_CFLAGS="$CFLAGS"
2651 CFLAGS=
2652 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2653 echo "configure:2654: checking whether ${CC-cc} accepts -g" >&5
2654 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2655   echo $ac_n "(cached) $ac_c" 1>&6
2656 else
2657   echo 'void f(){}' > conftest.c
2658 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2659   ac_cv_prog_cc_g=yes
2660 else
2661   ac_cv_prog_cc_g=no
2662 fi
2663 rm -f conftest*
2664
2665 fi
2666
2667 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2668 if test "$ac_test_CFLAGS" = set; then
2669   CFLAGS="$ac_save_CFLAGS"
2670 elif test $ac_cv_prog_cc_g = yes; then
2671   if test "$GCC" = yes; then
2672     CFLAGS="-g -O2"
2673   else
2674     CFLAGS="-g"
2675   fi
2676 else
2677   if test "$GCC" = yes; then
2678     CFLAGS="-O2"
2679   else
2680     CFLAGS=
2681   fi
2682 fi
2683
2684 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2685 if test "${with_gnu_ld+set}" = set; then
2686   withval="$with_gnu_ld"
2687   test "$withval" = no || with_gnu_ld=yes
2688 else
2689   with_gnu_ld=no
2690 fi
2691
2692 ac_prog=ld
2693 if test "$ac_cv_prog_gcc" = yes; then
2694   # Check if gcc -print-prog-name=ld gives a path.
2695   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2696 echo "configure:2697: checking for ld used by GCC" >&5
2697   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2698   case "$ac_prog" in
2699     # Accept absolute paths.
2700     [\\/]* | [A-Za-z]:[\\/]*)
2701       re_direlt='/[^/][^/]*/\.\./'
2702       # Canonicalize the path of ld
2703       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2704       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2705         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2706       done
2707       test -z "$LD" && LD="$ac_prog"
2708       ;;
2709   "")
2710     # If it fails, then pretend we aren't using GCC.
2711     ac_prog=ld
2712     ;;
2713   *)
2714     # If it is relative, then search for the first ld in PATH.
2715     with_gnu_ld=unknown
2716     ;;
2717   esac
2718 elif test "$with_gnu_ld" = yes; then
2719   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2720 echo "configure:2721: checking for GNU ld" >&5
2721 else
2722   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2723 echo "configure:2724: checking for non-GNU ld" >&5
2724 fi
2725 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   if test -z "$LD"; then
2729   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2730   for ac_dir in $PATH; do
2731     test -z "$ac_dir" && ac_dir=.
2732     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2733       ac_cv_path_LD="$ac_dir/$ac_prog"
2734       # Check to see if the program is GNU ld.  I'd rather use --version,
2735       # but apparently some GNU ld's only accept -v.
2736       # Break only if it was the GNU/non-GNU ld that we prefer.
2737       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2738         test "$with_gnu_ld" != no && break
2739       else
2740         test "$with_gnu_ld" != yes && break
2741       fi
2742     fi
2743   done
2744   IFS="$ac_save_ifs"
2745 else
2746   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2747 fi
2748 fi
2749
2750 LD="$ac_cv_path_LD"
2751 if test -n "$LD"; then
2752   echo "$ac_t""$LD" 1>&6
2753 else
2754   echo "$ac_t""no" 1>&6
2755 fi
2756 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2757
2758 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2759 echo "configure:2760: checking if the linker ($LD) is GNU ld" >&5
2760 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2764 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2765   ac_cv_prog_gnu_ld=yes
2766 else
2767   ac_cv_prog_gnu_ld=no
2768 fi
2769 fi
2770
2771 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2772
2773
2774 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2775 echo "configure:2776: checking for BSD-compatible nm" >&5
2776 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   if test -n "$NM"; then
2780   # Let the user override the test.
2781   ac_cv_path_NM="$NM"
2782 else
2783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2784   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2785     test -z "$ac_dir" && ac_dir=.
2786     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2787       # Check to see if the nm accepts a BSD-compat flag.
2788       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2789       #   nm: unknown option "B" ignored
2790       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2791         ac_cv_path_NM="$ac_dir/nm -B"
2792         break
2793       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2794         ac_cv_path_NM="$ac_dir/nm -p"
2795         break
2796       else
2797         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2798         continue # so that we can try to find one that supports BSD flags
2799       fi
2800     fi
2801   done
2802   IFS="$ac_save_ifs"
2803   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2804 fi
2805 fi
2806
2807 NM="$ac_cv_path_NM"
2808 echo "$ac_t""$NM" 1>&6
2809
2810
2811 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2812 echo "configure:2813: checking whether ln -s works" >&5
2813 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2814   echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816   rm -f conftestdata
2817 if ln -s X conftestdata 2>/dev/null
2818 then
2819   rm -f conftestdata
2820   ac_cv_prog_LN_S="ln -s"
2821 else
2822   ac_cv_prog_LN_S=ln
2823 fi
2824 fi
2825 LN_S="$ac_cv_prog_LN_S"
2826 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2827   echo "$ac_t""yes" 1>&6
2828 else
2829   echo "$ac_t""no" 1>&6
2830 fi
2831
2832
2833 # Check for any special flags to pass to ltconfig.
2834 libtool_flags="--cache-file=$cache_file"
2835 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2836 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2837 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2838 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2839 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2840 libtool_flags="$libtool_flags --enable-dlopen"
2841
2842 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2843 if test "${enable_libtool_lock+set}" = set; then
2844   enableval="$enable_libtool_lock"
2845   :
2846 fi
2847
2848 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2849 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2850
2851 # Some flags need to be propagated to the compiler or linker for good
2852 # libtool support.
2853 case "$host" in
2854 *-*-irix6*)
2855   # Find out which ABI we are using.
2856   echo '#line 2857 "configure"' > conftest.$ac_ext
2857   if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2858     case "`/usr/bin/file conftest.o`" in
2859     *32-bit*)
2860       LD="${LD-ld} -32"
2861       ;;
2862     *N32*)
2863       LD="${LD-ld} -n32"
2864       ;;
2865     *64-bit*)
2866       LD="${LD-ld} -64"
2867       ;;
2868     esac
2869   fi
2870   rm -rf conftest*
2871   ;;
2872
2873 *-*-sco3.2v5*)
2874   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2875   SAVE_CFLAGS="$CFLAGS"
2876   CFLAGS="$CFLAGS -belf"
2877   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2878 echo "configure:2879: checking whether the C compiler needs -belf" >&5
2879 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2880   echo $ac_n "(cached) $ac_c" 1>&6
2881 else
2882   cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885
2886 int main() {
2887
2888 ; return 0; }
2889 EOF
2890 if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2891   rm -rf conftest*
2892   lt_cv_cc_needs_belf=yes
2893 else
2894   echo "configure: failed program was:" >&5
2895   cat conftest.$ac_ext >&5
2896   rm -rf conftest*
2897   lt_cv_cc_needs_belf=no
2898 fi
2899 rm -f conftest*
2900 fi
2901
2902 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2903   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2904     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2905     CFLAGS="$SAVE_CFLAGS"
2906   fi
2907   ;;
2908
2909
2910 esac
2911
2912
2913 # Save cache, so that ltconfig can load it
2914
2915
2916 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2917 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2918 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2919 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2920 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2921 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2922 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2923 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2924
2925 # Reload cache, that may have been modified by ltconfig
2926
2927
2928 # This can be used to rebuild libtool when needed
2929 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2930
2931 # Always use our own libtool.
2932 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2933
2934 # Redirect the config.log output again, so that the ltconfig log is not
2935 # clobbered by the next message.
2936 exec 5>>./config.log
2937
2938
2939 for ac_prog in mawk gawk nawk awk
2940 do
2941 # Extract the first word of "$ac_prog", so it can be a program name with args.
2942 set dummy $ac_prog; ac_word=$2
2943 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2944 echo "configure:2945: checking for $ac_word" >&5
2945 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2946   echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948   if test -n "$AWK"; then
2949   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2950 else
2951   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2952   ac_dummy="$PATH"
2953   for ac_dir in $ac_dummy; do
2954     test -z "$ac_dir" && ac_dir=.
2955     if test -f $ac_dir/$ac_word; then
2956       ac_cv_prog_AWK="$ac_prog"
2957       break
2958     fi
2959   done
2960   IFS="$ac_save_ifs"
2961 fi
2962 fi
2963 AWK="$ac_cv_prog_AWK"
2964 if test -n "$AWK"; then
2965   echo "$ac_t""$AWK" 1>&6
2966 else
2967   echo "$ac_t""no" 1>&6
2968 fi
2969
2970 test -n "$AWK" && break
2971 done
2972
2973 # test for ln hardlink support
2974 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2975 echo "configure:2976: checking whether ln works" >&5
2976 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   rm -f conftest.src conftest.dst
2980 echo "conftest" > conftest.src
2981 if ln conftest.src conftest.dst 2>/dev/null
2982 then
2983   ol_cv_prog_LN_H="ln"
2984 else
2985   ol_cv_prog_LN_H="cp"
2986 fi
2987 rm -f conftest.src conftest.dst
2988
2989 fi
2990 LN_H="$ol_cv_prog_LN_H"
2991 if test "$ol_cv_prog_LN_H" = "ln"; then
2992         echo "$ac_t""yes" 1>&6
2993 else
2994         echo "$ac_t""no" 1>&6
2995 fi
2996
2997 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2998 echo "configure:2999: checking whether ln -s works" >&5
2999 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3000   echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002   rm -f conftestdata
3003 if ln -s X conftestdata 2>/dev/null
3004 then
3005   rm -f conftestdata
3006   ac_cv_prog_LN_S="ln -s"
3007 else
3008   ac_cv_prog_LN_S=ln
3009 fi
3010 fi
3011 LN_S="$ac_cv_prog_LN_S"
3012 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3013   echo "$ac_t""yes" 1>&6
3014 else
3015   echo "$ac_t""no" 1>&6
3016 fi
3017
3018
3019 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3020         LN_S="$LN_H"
3021 fi
3022
3023 # Extract the first word of "sendmail", so it can be a program name with args.
3024 set dummy sendmail; ac_word=$2
3025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3026 echo "configure:3027: checking for $ac_word" >&5
3027 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   case "$SENDMAIL" in
3031   /*)
3032   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3033   ;;
3034   ?:/*)                  
3035   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3036   ;;
3037   *)
3038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3039   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3040   for ac_dir in $ac_dummy; do 
3041     test -z "$ac_dir" && ac_dir=.
3042     if test -f $ac_dir/$ac_word; then
3043       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3044       break
3045     fi
3046   done
3047   IFS="$ac_save_ifs"
3048   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3049   ;;
3050 esac
3051 fi
3052 SENDMAIL="$ac_cv_path_SENDMAIL"
3053 if test -n "$SENDMAIL"; then
3054   echo "$ac_t""$SENDMAIL" 1>&6
3055 else
3056   echo "$ac_t""no" 1>&6
3057 fi
3058
3059 # Extract the first word of "vi", so it can be a program name with args.
3060 set dummy vi; ac_word=$2
3061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3062 echo "configure:3063: checking for $ac_word" >&5
3063 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3064   echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066   case "$EDITOR" in
3067   /*)
3068   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3069   ;;
3070   ?:/*)                  
3071   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3072   ;;
3073   *)
3074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3075   ac_dummy="$PATH:/usr/ucb"
3076   for ac_dir in $ac_dummy; do 
3077     test -z "$ac_dir" && ac_dir=.
3078     if test -f $ac_dir/$ac_word; then
3079       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3080       break
3081     fi
3082   done
3083   IFS="$ac_save_ifs"
3084   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3085   ;;
3086 esac
3087 fi
3088 EDITOR="$ac_cv_path_EDITOR"
3089 if test -n "$EDITOR"; then
3090   echo "$ac_t""$EDITOR" 1>&6
3091 else
3092   echo "$ac_t""no" 1>&6
3093 fi
3094
3095 # Extract the first word of "finger", so it can be a program name with args.
3096 set dummy finger; ac_word=$2
3097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3098 echo "configure:3099: checking for $ac_word" >&5
3099 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3100   echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102   case "$FINGER" in
3103   /*)
3104   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3105   ;;
3106   ?:/*)                  
3107   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3108   ;;
3109   *)
3110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3111   ac_dummy="$PATH:/usr/ucb"
3112   for ac_dir in $ac_dummy; do 
3113     test -z "$ac_dir" && ac_dir=.
3114     if test -f $ac_dir/$ac_word; then
3115       ac_cv_path_FINGER="$ac_dir/$ac_word"
3116       break
3117     fi
3118   done
3119   IFS="$ac_save_ifs"
3120   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3121   ;;
3122 esac
3123 fi
3124 FINGER="$ac_cv_path_FINGER"
3125 if test -n "$FINGER"; then
3126   echo "$ac_t""$FINGER" 1>&6
3127 else
3128   echo "$ac_t""no" 1>&6
3129 fi
3130
3131
3132 ol_link_perl=no
3133 if test $ol_enable_perl != no ; then
3134         # Extract the first word of "perl", so it can be a program name with args.
3135 set dummy perl; ac_word=$2
3136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3137 echo "configure:3138: checking for $ac_word" >&5
3138 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3139   echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141   case "$PERLBIN" in
3142   /*)
3143   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3144   ;;
3145   ?:/*)                  
3146   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3147   ;;
3148   *)
3149   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3150   ac_dummy="$PATH"
3151   for ac_dir in $ac_dummy; do 
3152     test -z "$ac_dir" && ac_dir=.
3153     if test -f $ac_dir/$ac_word; then
3154       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3155       break
3156     fi
3157   done
3158   IFS="$ac_save_ifs"
3159   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3160   ;;
3161 esac
3162 fi
3163 PERLBIN="$ac_cv_path_PERLBIN"
3164 if test -n "$PERLBIN"; then
3165   echo "$ac_t""$PERLBIN" 1>&6
3166 else
3167   echo "$ac_t""no" 1>&6
3168 fi
3169
3170
3171         if test "no$PERLBIN" = "no" ; then
3172                 if test $ol_enable_perl = yes ; then
3173                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3174                 fi
3175
3176         else
3177                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3178                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3179
3180                                 ol_link_perl=yes
3181         fi
3182 fi
3183
3184 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3185 echo "configure:3186: checking how to run the C preprocessor" >&5
3186 # On Suns, sometimes $CPP names a directory.
3187 if test -n "$CPP" && test -d "$CPP"; then
3188   CPP=
3189 fi
3190 if test -z "$CPP"; then
3191 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194     # This must be in double quotes, not single quotes, because CPP may get
3195   # substituted into the Makefile and "${CC-cc}" will confuse make.
3196   CPP="${CC-cc} -E"
3197   # On the NeXT, cc -E runs the code through the compiler's parser,
3198   # not just through cpp.
3199   cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 #include <assert.h>
3203 Syntax Error
3204 EOF
3205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3206 { (eval echo configure:3207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3208 if test -z "$ac_err"; then
3209   :
3210 else
3211   echo "$ac_err" >&5
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   CPP="${CC-cc} -E -traditional-cpp"
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219 #include <assert.h>
3220 Syntax Error
3221 EOF
3222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3223 { (eval echo configure:3224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3225 if test -z "$ac_err"; then
3226   :
3227 else
3228   echo "$ac_err" >&5
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   CPP="${CC-cc} -nologo -E"
3233   cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 #include <assert.h>
3237 Syntax Error
3238 EOF
3239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3240 { (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3242 if test -z "$ac_err"; then
3243   :
3244 else
3245   echo "$ac_err" >&5
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249   CPP=/lib/cpp
3250 fi
3251 rm -f conftest*
3252 fi
3253 rm -f conftest*
3254 fi
3255 rm -f conftest*
3256   ac_cv_prog_CPP="$CPP"
3257 fi
3258   CPP="$ac_cv_prog_CPP"
3259 else
3260   ac_cv_prog_CPP="$CPP"
3261 fi
3262 echo "$ac_t""$CPP" 1>&6
3263
3264
3265 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3266         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3267
3268 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3269         echo "configure: warning: programs compiled here do run here..." 1>&2
3270         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3271
3272 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3273         echo "configure: warning: programs compiled here do not run here..." 1>&2
3274         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3275 fi
3276
3277 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3278 echo "configure:3279: checking for AIX" >&5
3279 cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #ifdef _AIX
3283   yes
3284 #endif
3285
3286 EOF
3287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3288   egrep "yes" >/dev/null 2>&1; then
3289   rm -rf conftest*
3290   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3291 #define _ALL_SOURCE 1
3292 EOF
3293
3294 else
3295   rm -rf conftest*
3296   echo "$ac_t""no" 1>&6
3297 fi
3298 rm -f conftest*
3299
3300
3301 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3302 echo "configure:3303: checking for POSIXized ISC" >&5
3303 if test -d /etc/conf/kconfig.d &&
3304   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3305 then
3306   echo "$ac_t""yes" 1>&6
3307   ISC=yes # If later tests want to check for ISC.
3308   cat >> confdefs.h <<\EOF
3309 #define _POSIX_SOURCE 1
3310 EOF
3311
3312   if test "$GCC" = yes; then
3313     CC="$CC -posix"
3314   else
3315     CC="$CC -Xp"
3316   fi
3317 else
3318   echo "$ac_t""no" 1>&6
3319   ISC=
3320 fi
3321
3322 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3323 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3324 echo "configure:3325: checking for minix/config.h" >&5
3325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   cat > conftest.$ac_ext <<EOF
3329 #line 3330 "configure"
3330 #include "confdefs.h"
3331 #include <minix/config.h>
3332 EOF
3333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3334 { (eval echo configure:3335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3336 if test -z "$ac_err"; then
3337   rm -rf conftest*
3338   eval "ac_cv_header_$ac_safe=yes"
3339 else
3340   echo "$ac_err" >&5
3341   echo "configure: failed program was:" >&5
3342   cat conftest.$ac_ext >&5
3343   rm -rf conftest*
3344   eval "ac_cv_header_$ac_safe=no"
3345 fi
3346 rm -f conftest*
3347 fi
3348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3349   echo "$ac_t""yes" 1>&6
3350   MINIX=yes
3351 else
3352   echo "$ac_t""no" 1>&6
3353 MINIX=
3354 fi
3355
3356 if test "$MINIX" = yes; then
3357   cat >> confdefs.h <<\EOF
3358 #define _POSIX_SOURCE 1
3359 EOF
3360
3361   cat >> confdefs.h <<\EOF
3362 #define _POSIX_1_SOURCE 2
3363 EOF
3364
3365   cat >> confdefs.h <<\EOF
3366 #define _MINIX 1
3367 EOF
3368
3369 fi
3370
3371
3372 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3373 echo "configure:3374: checking for Cygwin environment" >&5
3374 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   cat > conftest.$ac_ext <<EOF
3378 #line 3379 "configure"
3379 #include "confdefs.h"
3380
3381 int main() {
3382
3383 #ifndef __CYGWIN__
3384 #define __CYGWIN__ __CYGWIN32__
3385 #endif
3386 return __CYGWIN__;
3387 ; return 0; }
3388 EOF
3389 if { (eval echo configure:3390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3390   rm -rf conftest*
3391   ac_cv_cygwin=yes
3392 else
3393   echo "configure: failed program was:" >&5
3394   cat conftest.$ac_ext >&5
3395   rm -rf conftest*
3396   ac_cv_cygwin=no
3397 fi
3398 rm -f conftest*
3399 fi
3400
3401 echo "$ac_t""$ac_cv_cygwin" 1>&6
3402 CYGWIN=
3403 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3404 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3405 echo "configure:3406: checking for mingw32 environment" >&5
3406 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   cat > conftest.$ac_ext <<EOF
3410 #line 3411 "configure"
3411 #include "confdefs.h"
3412
3413 int main() {
3414 return __MINGW32__;
3415 ; return 0; }
3416 EOF
3417 if { (eval echo configure:3418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3418   rm -rf conftest*
3419   ac_cv_mingw32=yes
3420 else
3421   echo "configure: failed program was:" >&5
3422   cat conftest.$ac_ext >&5
3423   rm -rf conftest*
3424   ac_cv_mingw32=no
3425 fi
3426 rm -f conftest*
3427 fi
3428
3429 echo "$ac_t""$ac_cv_mingw32" 1>&6
3430 MINGW32=
3431 test "$ac_cv_mingw32" = yes && MINGW32=yes
3432 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3433 echo "configure:3434: checking for EMX OS/2 environment" >&5
3434 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440
3441 int main() {
3442 return __EMX__;
3443 ; return 0; }
3444 EOF
3445 if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3446   rm -rf conftest*
3447   ac_cv_emxos2=yes
3448 else
3449   echo "configure: failed program was:" >&5
3450   cat conftest.$ac_ext >&5
3451   rm -rf conftest*
3452   ac_cv_emxos2=no
3453 fi
3454 rm -f conftest*
3455 fi
3456
3457 echo "$ac_t""$ac_cv_emxos2" 1>&6
3458 EMXOS2=
3459 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3460
3461
3462
3463 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3464 echo "configure:3465: checking for executable suffix" >&5
3465 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3469   ac_cv_exeext=.exe
3470 else
3471   rm -f conftest*
3472   echo 'int main () { return 0; }' > conftest.$ac_ext
3473   ac_cv_exeext=
3474   if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3475     for file in conftest.*; do
3476       case $file in
3477       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3478       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3479       esac
3480     done
3481   else
3482     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3483   fi
3484   rm -f conftest*
3485   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3486 fi
3487 fi
3488
3489 EXEEXT=""
3490 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3491 echo "$ac_t""${ac_cv_exeext}" 1>&6
3492 ac_exeext=$EXEEXT
3493
3494 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3495 echo "configure:3496: checking for object suffix" >&5
3496 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   rm -f conftest*
3500 echo 'int i = 1;' > conftest.$ac_ext
3501 if { (eval echo configure:3502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3502   for ac_file in conftest.*; do
3503     case $ac_file in
3504     *.c) ;;
3505     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3506     esac
3507   done
3508 else
3509   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3510 fi
3511 rm -f conftest*
3512 fi
3513
3514 echo "$ac_t""$ac_cv_objext" 1>&6
3515 OBJEXT=$ac_cv_objext
3516 ac_objext=$ac_cv_objext
3517
3518
3519 cat >> confdefs.h <<EOF
3520 #define EXEEXT "${EXEEXT}"
3521 EOF
3522
3523
3524 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3525 echo "configure:3526: checking for be_app in -lbe" >&5
3526 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   ac_save_LIBS="$LIBS"
3531 LIBS="-lbe -lroot -lnet $LIBS"
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 /* Override any gcc2 internal prototype to avoid an error.  */
3536 /* We use char because int might match the return type of a gcc2
3537     builtin and then its argument prototype would still apply.  */
3538 char be_app();
3539
3540 int main() {
3541 be_app()
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3545   rm -rf conftest*
3546   eval "ac_cv_lib_$ac_lib_var=yes"
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   eval "ac_cv_lib_$ac_lib_var=no"
3552 fi
3553 rm -f conftest*
3554 LIBS="$ac_save_LIBS"
3555
3556 fi
3557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3558   echo "$ac_t""yes" 1>&6
3559   LIBS="$LIBS -lbe -lroot -lnet"
3560 else
3561   echo "$ac_t""no" 1>&6
3562 :
3563 fi
3564
3565
3566
3567
3568
3569 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3570 echo "configure:3571: checking for ${CC-cc} option to accept ANSI C" >&5
3571 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3572   echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574   am_cv_prog_cc_stdc=no
3575 ac_save_CC="$CC"
3576 # Don't try gcc -ansi; that turns off useful extensions and
3577 # breaks some systems' header files.
3578 # AIX                   -qlanglvl=ansi
3579 # Ultrix and OSF/1      -std1
3580 # HP-UX 10.20 and later -Ae
3581 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3582 # SVR4                  -Xc -D__EXTENSIONS__
3583 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3584 do
3585   CC="$ac_save_CC $ac_arg"
3586   cat > conftest.$ac_ext <<EOF
3587 #line 3588 "configure"
3588 #include "confdefs.h"
3589 #include <stdarg.h>
3590 #include <stdio.h>
3591 #include <sys/types.h>
3592 #include <sys/stat.h>
3593 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3594 struct buf { int x; };
3595 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3596 static char *e (p, i)
3597      char **p;
3598      int i;
3599 {
3600   return p[i];
3601 }
3602 static char *f (char * (*g) (char **, int), char **p, ...)
3603 {
3604   char *s;
3605   va_list v;
3606   va_start (v,p);
3607   s = g (p, va_arg (v,int));
3608   va_end (v);
3609   return s;
3610 }
3611 int test (int i, double x);
3612 struct s1 {int (*f) (int a);};
3613 struct s2 {int (*f) (double a);};
3614 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3615 int argc;
3616 char **argv;
3617
3618 int main() {
3619
3620 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3621
3622 ; return 0; }
3623 EOF
3624 if { (eval echo configure:3625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3625   rm -rf conftest*
3626   am_cv_prog_cc_stdc="$ac_arg"; break
3627 else
3628   echo "configure: failed program was:" >&5
3629   cat conftest.$ac_ext >&5
3630 fi
3631 rm -f conftest*
3632 done
3633 CC="$ac_save_CC"
3634
3635 fi
3636
3637 if test -z "$am_cv_prog_cc_stdc"; then
3638   echo "$ac_t""none needed" 1>&6
3639 else
3640   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3641 fi
3642 case "x$am_cv_prog_cc_stdc" in
3643   x|xno) ;;
3644   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3645 esac
3646
3647 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3648         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3649 fi
3650
3651 # test for make depend flag
3652 OL_MKDEP=
3653 OL_MKDEP_FLAGS=
3654 if test -z "${MKDEP}"; then
3655         OL_MKDEP="${CC-cc}"
3656         if test -z "${MKDEP_FLAGS}"; then
3657                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3658 echo "configure:3659: checking for ${OL_MKDEP} depend flag" >&5
3659 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3660   echo $ac_n "(cached) $ac_c" 1>&6
3661 else
3662   
3663                         ol_cv_mkdep=no
3664                         for flag in "-M" "-xM"; do
3665                                 cat > conftest.c <<EOF
3666  noCode;
3667 EOF
3668                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3669                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3670                                 then
3671                                         if test ! -f conftest."${ac_object}" ; then
3672                                                 ol_cv_mkdep=$flag
3673                                                 OL_MKDEP_FLAGS="$flag"
3674                                                 break
3675                                         fi
3676                                 fi
3677                         done
3678                         rm -f conftest*
3679                 
3680 fi
3681
3682 echo "$ac_t""$ol_cv_mkdep" 1>&6
3683         else
3684                 cc_cv_mkdep=yes
3685                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3686         fi
3687 else
3688         cc_cv_mkdep=yes
3689         OL_MKDEP="${MKDEP}"
3690         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3691 fi
3692
3693
3694
3695 if test "${ol_cv_mkdep}" = no ; then
3696         # this will soon become an error
3697         echo "configure: warning: do not know how to generate dependencies" 1>&2
3698 fi
3699
3700 ol_link_modules=no
3701 if test $ol_enable_modules != no ; then
3702         for ac_hdr in ltdl.h
3703 do
3704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3706 echo "configure:3707: checking for $ac_hdr" >&5
3707 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3713 #include <$ac_hdr>
3714 EOF
3715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3716 { (eval echo configure:3717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3718 if test -z "$ac_err"; then
3719   rm -rf conftest*
3720   eval "ac_cv_header_$ac_safe=yes"
3721 else
3722   echo "$ac_err" >&5
3723   echo "configure: failed program was:" >&5
3724   cat conftest.$ac_ext >&5
3725   rm -rf conftest*
3726   eval "ac_cv_header_$ac_safe=no"
3727 fi
3728 rm -f conftest*
3729 fi
3730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3731   echo "$ac_t""yes" 1>&6
3732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3733   cat >> confdefs.h <<EOF
3734 #define $ac_tr_hdr 1
3735 EOF
3736  
3737 else
3738   echo "$ac_t""no" 1>&6
3739 fi
3740 done
3741
3742
3743         if test $ac_cv_header_ltdl_h = no ; then
3744                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3745
3746         fi
3747
3748         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3749 echo "configure:3750: checking for lt_dlinit in -lltdl" >&5
3750 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3751 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3752   echo $ac_n "(cached) $ac_c" 1>&6
3753 else
3754   ac_save_LIBS="$LIBS"
3755 LIBS="-lltdl  $LIBS"
3756 cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 /* Override any gcc2 internal prototype to avoid an error.  */
3760 /* We use char because int might match the return type of a gcc2
3761     builtin and then its argument prototype would still apply.  */
3762 char lt_dlinit();
3763
3764 int main() {
3765 lt_dlinit()
3766 ; return 0; }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3769   rm -rf conftest*
3770   eval "ac_cv_lib_$ac_lib_var=yes"
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   eval "ac_cv_lib_$ac_lib_var=no"
3776 fi
3777 rm -f conftest*
3778 LIBS="$ac_save_LIBS"
3779
3780 fi
3781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3782   echo "$ac_t""yes" 1>&6
3783     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3784     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3785   cat >> confdefs.h <<EOF
3786 #define $ac_tr_lib 1
3787 EOF
3788
3789   LIBS="-lltdl $LIBS"
3790
3791 else
3792   echo "$ac_t""no" 1>&6
3793 fi
3794
3795         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3796                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3797         fi
3798         ol_link_modules=yes
3799 else
3800         ol_with_bdb2_module=static
3801         ol_with_ldap_module=static
3802         ol_with_ldbm_module=static
3803         ol_with_passwd_module=static
3804         ol_with_perl_module=static
3805         ol_with_shell_module=static
3806         ol_with_tcl_module=static
3807 fi
3808
3809 # test for EBCDIC
3810 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3811 echo "configure:3812: checking for EBCDIC" >&5
3812 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3813   echo $ac_n "(cached) $ac_c" 1>&6
3814 else
3815   
3816         cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819
3820 #if !('M' == 0xd4)
3821 #include <__ASCII__/generate_error.h>
3822 #endif
3823
3824 EOF
3825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3826 { (eval echo configure:3827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3828 if test -z "$ac_err"; then
3829   rm -rf conftest*
3830   ol_cv_cpp_ebcdic=yes
3831 else
3832   echo "$ac_err" >&5
3833   echo "configure: failed program was:" >&5
3834   cat conftest.$ac_ext >&5
3835   rm -rf conftest*
3836   ol_cv_cpp_ebcdic=no
3837 fi
3838 rm -f conftest*
3839 fi
3840
3841 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3842 if test $ol_cv_cpp_ebcdic = yes ; then
3843         cat >> confdefs.h <<\EOF
3844 #define HAVE_EBCDIC 1
3845 EOF
3846
3847 fi
3848
3849 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3850 echo "configure:3851: checking for ANSI C header files" >&5
3851 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3852   echo $ac_n "(cached) $ac_c" 1>&6
3853 else
3854   cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 #include <stdlib.h>
3858 #include <stdarg.h>
3859 #include <string.h>
3860 #include <float.h>
3861 EOF
3862 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3863 { (eval echo configure:3864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3864 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3865 if test -z "$ac_err"; then
3866   rm -rf conftest*
3867   ol_cv_header_stdc=yes
3868 else
3869   echo "$ac_err" >&5
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -rf conftest*
3873   ol_cv_header_stdc=no
3874 fi
3875 rm -f conftest*
3876
3877 if test $ol_cv_header_stdc = yes; then
3878   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3881 "configure"
3881 #include "confdefs.h"
3882 #include <string.h>
3883 EOF
3884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3885   egrep "memchr" >/dev/null 2>&1; then
3886   :
3887 else
3888   rm -rf conftest*
3889   ol_cv_header_stdc=no
3890 fi
3891 rm -f conftest*
3892
3893 fi
3894
3895 if test $ol_cv_header_stdc = yes; then
3896   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 #include <stdlib.h>
3901 EOF
3902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3903   egrep "free" >/dev/null 2>&1; then
3904   :
3905 else
3906   rm -rf conftest*
3907   ol_cv_header_stdc=no
3908 fi
3909 rm -f conftest*
3910
3911 fi
3912
3913 if test $ol_cv_header_stdc = yes; then
3914   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3915 if test "$cross_compiling" = yes; then
3916   :
3917 else
3918   cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 #include <ctype.h>
3922 #ifndef HAVE_EBCDIC
3923 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3924 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3925 #else
3926 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3927                 || ('j' <= (c) && (c) <= 'r') \
3928                 || ('s' <= (c) && (c) <= 'z'))
3929 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3930 #endif
3931 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3932 int main () { int i; for (i = 0; i < 256; i++)
3933 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3934 exit (0); }
3935
3936 EOF
3937 if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3938 then
3939   :
3940 else
3941   echo "configure: failed program was:" >&5
3942   cat conftest.$ac_ext >&5
3943   rm -fr conftest*
3944   ol_cv_header_stdc=no
3945 fi
3946 rm -fr conftest*
3947 fi
3948
3949 fi
3950 fi
3951
3952 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3953 if test $ol_cv_header_stdc = yes; then
3954   cat >> confdefs.h <<\EOF
3955 #define STDC_HEADERS 1
3956 EOF
3957
3958 fi
3959 ac_cv_header_stdc=disable
3960
3961
3962 if test $ol_cv_header_stdc != yes; then
3963         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3964 fi
3965
3966 ac_header_dirent=no
3967 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3968 do
3969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3970 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3971 echo "configure:3972: checking for $ac_hdr that defines DIR" >&5
3972 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
3973   echo $ac_n "(cached) $ac_c" 1>&6
3974 else
3975   cat > conftest.$ac_ext <<EOF
3976 #line 3977 "configure"
3977 #include "confdefs.h"
3978 #include <sys/types.h>
3979 #include <$ac_hdr>
3980 int main() {
3981 DIR *dirp = 0;
3982 ; return 0; }
3983 EOF
3984 if { (eval echo configure:3985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3985   rm -rf conftest*
3986   eval "ac_cv_header_dirent_$ac_safe=yes"
3987 else
3988   echo "configure: failed program was:" >&5
3989   cat conftest.$ac_ext >&5
3990   rm -rf conftest*
3991   eval "ac_cv_header_dirent_$ac_safe=no"
3992 fi
3993 rm -f conftest*
3994 fi
3995 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3996   echo "$ac_t""yes" 1>&6
3997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3998   cat >> confdefs.h <<EOF
3999 #define $ac_tr_hdr 1
4000 EOF
4001  ac_header_dirent=$ac_hdr; break
4002 else
4003   echo "$ac_t""no" 1>&6
4004 fi
4005 done
4006 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4007 if test $ac_header_dirent = dirent.h; then
4008 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4009 echo "configure:4010: checking for opendir in -ldir" >&5
4010 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4012   echo $ac_n "(cached) $ac_c" 1>&6
4013 else
4014   ac_save_LIBS="$LIBS"
4015 LIBS="-ldir  $LIBS"
4016 cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 /* Override any gcc2 internal prototype to avoid an error.  */
4020 /* We use char because int might match the return type of a gcc2
4021     builtin and then its argument prototype would still apply.  */
4022 char opendir();
4023
4024 int main() {
4025 opendir()
4026 ; return 0; }
4027 EOF
4028 if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4029   rm -rf conftest*
4030   eval "ac_cv_lib_$ac_lib_var=yes"
4031 else
4032   echo "configure: failed program was:" >&5
4033   cat conftest.$ac_ext >&5
4034   rm -rf conftest*
4035   eval "ac_cv_lib_$ac_lib_var=no"
4036 fi
4037 rm -f conftest*
4038 LIBS="$ac_save_LIBS"
4039
4040 fi
4041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4042   echo "$ac_t""yes" 1>&6
4043   LIBS="$LIBS -ldir"
4044 else
4045   echo "$ac_t""no" 1>&6
4046 fi
4047
4048 else
4049 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4050 echo "configure:4051: checking for opendir in -lx" >&5
4051 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4053   echo $ac_n "(cached) $ac_c" 1>&6
4054 else
4055   ac_save_LIBS="$LIBS"
4056 LIBS="-lx  $LIBS"
4057 cat > conftest.$ac_ext <<EOF
4058 #line 4059 "configure"
4059 #include "confdefs.h"
4060 /* Override any gcc2 internal prototype to avoid an error.  */
4061 /* We use char because int might match the return type of a gcc2
4062     builtin and then its argument prototype would still apply.  */
4063 char opendir();
4064
4065 int main() {
4066 opendir()
4067 ; return 0; }
4068 EOF
4069 if { (eval echo configure:4070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4070   rm -rf conftest*
4071   eval "ac_cv_lib_$ac_lib_var=yes"
4072 else
4073   echo "configure: failed program was:" >&5
4074   cat conftest.$ac_ext >&5
4075   rm -rf conftest*
4076   eval "ac_cv_lib_$ac_lib_var=no"
4077 fi
4078 rm -f conftest*
4079 LIBS="$ac_save_LIBS"
4080
4081 fi
4082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4083   echo "$ac_t""yes" 1>&6
4084   LIBS="$LIBS -lx"
4085 else
4086   echo "$ac_t""no" 1>&6
4087 fi
4088
4089 fi
4090
4091 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4092 echo "configure:4093: checking for sys/wait.h that is POSIX.1 compatible" >&5
4093 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4094   echo $ac_n "(cached) $ac_c" 1>&6
4095 else
4096   cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099 #include <sys/types.h>
4100 #include <sys/wait.h>
4101 #ifndef WEXITSTATUS
4102 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4103 #endif
4104 #ifndef WIFEXITED
4105 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4106 #endif
4107 int main() {
4108 int s;
4109 wait (&s);
4110 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4111 ; return 0; }
4112 EOF
4113 if { (eval echo configure:4114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4114   rm -rf conftest*
4115   ac_cv_header_sys_wait_h=yes
4116 else
4117   echo "configure: failed program was:" >&5
4118   cat conftest.$ac_ext >&5
4119   rm -rf conftest*
4120   ac_cv_header_sys_wait_h=no
4121 fi
4122 rm -f conftest*
4123 fi
4124
4125 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4126 if test $ac_cv_header_sys_wait_h = yes; then
4127   cat >> confdefs.h <<\EOF
4128 #define HAVE_SYS_WAIT_H 1
4129 EOF
4130
4131 fi
4132
4133 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4134 echo "configure:4135: checking POSIX termios" >&5
4135 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 #include <sys/types.h>
4142 #include <unistd.h>
4143 #include <termios.h>
4144 int main() {
4145 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4146    tcgetattr(0, 0);
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4150   rm -rf conftest*
4151   am_cv_sys_posix_termios=yes
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   am_cv_sys_posix_termios=no
4157 fi
4158 rm -f conftest*
4159 fi
4160
4161 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4162
4163
4164  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4165 echo "configure:4166: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4166 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4167   echo $ac_n "(cached) $ac_c" 1>&6
4168 else
4169   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4170
4171   gwinsz_in_termios_h=no
4172   if test $am_cv_sys_posix_termios = yes; then
4173     cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 #include <sys/types.h>
4177 #     include <termios.h>
4178 #     ifdef TIOCGWINSZ
4179         yes
4180 #     endif
4181     
4182 EOF
4183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4184   egrep "yes" >/dev/null 2>&1; then
4185   rm -rf conftest*
4186   gwinsz_in_termios_h=yes
4187 fi
4188 rm -f conftest*
4189
4190   fi
4191
4192   if test $gwinsz_in_termios_h = no; then
4193     cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196 #include <sys/types.h>
4197 #     include <sys/ioctl.h>
4198 #     ifdef TIOCGWINSZ
4199         yes
4200 #     endif
4201     
4202 EOF
4203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4204   egrep "yes" >/dev/null 2>&1; then
4205   rm -rf conftest*
4206   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4207 fi
4208 rm -f conftest*
4209
4210   fi
4211   
4212 fi
4213
4214 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4215   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4216     cat >> confdefs.h <<\EOF
4217 #define GWINSZ_IN_SYS_IOCTL 1
4218 EOF
4219
4220   fi
4221
4222 if test $am_cv_sys_posix_termios = yes ; then
4223         cat >> confdefs.h <<\EOF
4224 #define HAVE_POSIX_TERMIOS 1
4225 EOF
4226
4227 fi
4228
4229 for ac_hdr in \
4230         arpa/inet.h             \
4231         arpa/nameser.h  \
4232         assert.h                \
4233         crypt.h                 \
4234         errno.h                 \
4235         fcntl.h                 \
4236         filio.h                 \
4237         getopt.h                \
4238         grp.h                   \
4239         libutil.h               \
4240         limits.h                \
4241         locale.h                \
4242         netinet/tcp.h   \
4243         malloc.h                \
4244         memory.h                \
4245         psap.h                  \
4246         pwd.h                   \
4247         resolv.h                \
4248         sgtty.h                 \
4249         shadow.h                \
4250         stdarg.h                \
4251         stddef.h                \
4252         string.h                \
4253         strings.h               \
4254         sysexits.h              \
4255         sys/file.h              \
4256         sys/filio.h             \
4257         sys/errno.h             \
4258         sys/ioctl.h             \
4259         sys/param.h             \
4260         sys/resource.h  \
4261         sys/select.h    \
4262         sys/socket.h    \
4263         sys/syslog.h    \
4264         sys/time.h              \
4265         sys/types.h             \
4266         syslog.h                \
4267         termios.h               \
4268         unistd.h                \
4269
4270 do
4271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4273 echo "configure:4274: checking for $ac_hdr" >&5
4274 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4275   echo $ac_n "(cached) $ac_c" 1>&6
4276 else
4277   cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 #include <$ac_hdr>
4281 EOF
4282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4283 { (eval echo configure:4284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4285 if test -z "$ac_err"; then
4286   rm -rf conftest*
4287   eval "ac_cv_header_$ac_safe=yes"
4288 else
4289   echo "$ac_err" >&5
4290   echo "configure: failed program was:" >&5
4291   cat conftest.$ac_ext >&5
4292   rm -rf conftest*
4293   eval "ac_cv_header_$ac_safe=no"
4294 fi
4295 rm -f conftest*
4296 fi
4297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4298   echo "$ac_t""yes" 1>&6
4299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4300   cat >> confdefs.h <<EOF
4301 #define $ac_tr_hdr 1
4302 EOF
4303  
4304 else
4305   echo "$ac_t""no" 1>&6
4306 fi
4307 done
4308
4309
4310
4311
4312 echo $ac_n "checking for socket""... $ac_c" 1>&6
4313 echo "configure:4314: checking for socket" >&5
4314 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4315   echo $ac_n "(cached) $ac_c" 1>&6
4316 else
4317   cat > conftest.$ac_ext <<EOF
4318 #line 4319 "configure"
4319 #include "confdefs.h"
4320 /* System header to define __stub macros and hopefully few prototypes,
4321     which can conflict with char socket(); below.  */
4322 #include <assert.h>
4323 /* Override any gcc2 internal prototype to avoid an error.  */
4324 /* We use char because int might match the return type of a gcc2
4325     builtin and then its argument prototype would still apply.  */
4326 char socket();
4327 char (*f)();
4328
4329 int main() {
4330
4331 /* The GNU C library defines this for functions which it implements
4332     to always fail with ENOSYS.  Some functions are actually named
4333     something starting with __ and the normal name is an alias.  */
4334 #if defined (__stub_socket) || defined (__stub___socket)
4335 choke me
4336 #else
4337 f = socket;
4338 #endif
4339
4340 ; return 0; }
4341 EOF
4342 if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4343   rm -rf conftest*
4344   eval "ac_cv_func_socket=yes"
4345 else
4346   echo "configure: failed program was:" >&5
4347   cat conftest.$ac_ext >&5
4348   rm -rf conftest*
4349   eval "ac_cv_func_socket=no"
4350 fi
4351 rm -f conftest*
4352 fi
4353
4354 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4355   echo "$ac_t""yes" 1>&6
4356   :
4357 else
4358   echo "$ac_t""no" 1>&6
4359         
4360         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4361 echo "configure:4362: checking for main in -lsocket" >&5
4362 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   ac_save_LIBS="$LIBS"
4367 LIBS="-lsocket  $LIBS"
4368 cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371
4372 int main() {
4373 main()
4374 ; return 0; }
4375 EOF
4376 if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4377   rm -rf conftest*
4378   eval "ac_cv_lib_$ac_lib_var=yes"
4379 else
4380   echo "configure: failed program was:" >&5
4381   cat conftest.$ac_ext >&5
4382   rm -rf conftest*
4383   eval "ac_cv_lib_$ac_lib_var=no"
4384 fi
4385 rm -f conftest*
4386 LIBS="$ac_save_LIBS"
4387
4388 fi
4389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4390   echo "$ac_t""yes" 1>&6
4391     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4393   cat >> confdefs.h <<EOF
4394 #define $ac_tr_lib 1
4395 EOF
4396
4397   LIBS="-lsocket $LIBS"
4398
4399 else
4400   echo "$ac_t""no" 1>&6
4401 fi
4402
4403         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4404 echo "configure:4405: checking for main in -lnet" >&5
4405 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   ac_save_LIBS="$LIBS"
4410 LIBS="-lnet  $LIBS"
4411 cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414
4415 int main() {
4416 main()
4417 ; return 0; }
4418 EOF
4419 if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4420   rm -rf conftest*
4421   eval "ac_cv_lib_$ac_lib_var=yes"
4422 else
4423   echo "configure: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   rm -rf conftest*
4426   eval "ac_cv_lib_$ac_lib_var=no"
4427 fi
4428 rm -f conftest*
4429 LIBS="$ac_save_LIBS"
4430
4431 fi
4432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4433   echo "$ac_t""yes" 1>&6
4434     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4435     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4436   cat >> confdefs.h <<EOF
4437 #define $ac_tr_lib 1
4438 EOF
4439
4440   LIBS="-lnet $LIBS"
4441
4442 else
4443   echo "$ac_t""no" 1>&6
4444 fi
4445
4446         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4447 echo "configure:4448: checking for socket in -lnet" >&5
4448 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4450   echo $ac_n "(cached) $ac_c" 1>&6
4451 else
4452   ac_save_LIBS="$LIBS"
4453 LIBS="-lnet  $LIBS"
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 /* Override any gcc2 internal prototype to avoid an error.  */
4458 /* We use char because int might match the return type of a gcc2
4459     builtin and then its argument prototype would still apply.  */
4460 char socket();
4461
4462 int main() {
4463 socket()
4464 ; return 0; }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4467   rm -rf conftest*
4468   eval "ac_cv_lib_$ac_lib_var=yes"
4469 else
4470   echo "configure: failed program was:" >&5
4471   cat conftest.$ac_ext >&5
4472   rm -rf conftest*
4473   eval "ac_cv_lib_$ac_lib_var=no"
4474 fi
4475 rm -f conftest*
4476 LIBS="$ac_save_LIBS"
4477
4478 fi
4479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4480   echo "$ac_t""yes" 1>&6
4481     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4482     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4483   cat >> confdefs.h <<EOF
4484 #define $ac_tr_lib 1
4485 EOF
4486
4487   LIBS="-lnet $LIBS"
4488
4489 else
4490   echo "$ac_t""no" 1>&6
4491 fi
4492
4493         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4494 echo "configure:4495: checking for main in -lnsl_s" >&5
4495 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4496 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4497   echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499   ac_save_LIBS="$LIBS"
4500 LIBS="-lnsl_s  $LIBS"
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504
4505 int main() {
4506 main()
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=yes"
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=no"
4517 fi
4518 rm -f conftest*
4519 LIBS="$ac_save_LIBS"
4520
4521 fi
4522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4523   echo "$ac_t""yes" 1>&6
4524     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4525     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4526   cat >> confdefs.h <<EOF
4527 #define $ac_tr_lib 1
4528 EOF
4529
4530   LIBS="-lnsl_s $LIBS"
4531
4532 else
4533   echo "$ac_t""no" 1>&6
4534 fi
4535
4536         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4537 echo "configure:4538: checking for main in -lnsl" >&5
4538 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   ac_save_LIBS="$LIBS"
4543 LIBS="-lnsl  $LIBS"
4544 cat > conftest.$ac_ext <<EOF
4545 #line 4546 "configure"
4546 #include "confdefs.h"
4547
4548 int main() {
4549 main()
4550 ; return 0; }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=yes"
4555 else
4556   echo "configure: failed program was:" >&5
4557   cat conftest.$ac_ext >&5
4558   rm -rf conftest*
4559   eval "ac_cv_lib_$ac_lib_var=no"
4560 fi
4561 rm -f conftest*
4562 LIBS="$ac_save_LIBS"
4563
4564 fi
4565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4566   echo "$ac_t""yes" 1>&6
4567     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4568     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4569   cat >> confdefs.h <<EOF
4570 #define $ac_tr_lib 1
4571 EOF
4572
4573   LIBS="-lnsl $LIBS"
4574
4575 else
4576   echo "$ac_t""no" 1>&6
4577 fi
4578
4579         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4580 echo "configure:4581: checking for socket in -linet" >&5
4581 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4582 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4583   echo $ac_n "(cached) $ac_c" 1>&6
4584 else
4585   ac_save_LIBS="$LIBS"
4586 LIBS="-linet  $LIBS"
4587 cat > conftest.$ac_ext <<EOF
4588 #line 4589 "configure"
4589 #include "confdefs.h"
4590 /* Override any gcc2 internal prototype to avoid an error.  */
4591 /* We use char because int might match the return type of a gcc2
4592     builtin and then its argument prototype would still apply.  */
4593 char socket();
4594
4595 int main() {
4596 socket()
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4600   rm -rf conftest*
4601   eval "ac_cv_lib_$ac_lib_var=yes"
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   eval "ac_cv_lib_$ac_lib_var=no"
4607 fi
4608 rm -f conftest*
4609 LIBS="$ac_save_LIBS"
4610
4611 fi
4612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4613   echo "$ac_t""yes" 1>&6
4614     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4615     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4616   cat >> confdefs.h <<EOF
4617 #define $ac_tr_lib 1
4618 EOF
4619
4620   LIBS="-linet $LIBS"
4621
4622 else
4623   echo "$ac_t""no" 1>&6
4624 fi
4625
4626         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4627 echo "configure:4628: checking for main in -lgen" >&5
4628 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   ac_save_LIBS="$LIBS"
4633 LIBS="-lgen  $LIBS"
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637
4638 int main() {
4639 main()
4640 ; return 0; }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4643   rm -rf conftest*
4644   eval "ac_cv_lib_$ac_lib_var=yes"
4645 else
4646   echo "configure: failed program was:" >&5
4647   cat conftest.$ac_ext >&5
4648   rm -rf conftest*
4649   eval "ac_cv_lib_$ac_lib_var=no"
4650 fi
4651 rm -f conftest*
4652 LIBS="$ac_save_LIBS"
4653
4654 fi
4655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4656   echo "$ac_t""yes" 1>&6
4657     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4658     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4659   cat >> confdefs.h <<EOF
4660 #define $ac_tr_lib 1
4661 EOF
4662
4663   LIBS="-lgen $LIBS"
4664
4665 else
4666   echo "$ac_t""no" 1>&6
4667 fi
4668
4669
4670 fi
4671
4672
4673 echo $ac_n "checking for select""... $ac_c" 1>&6
4674 echo "configure:4675: checking for select" >&5
4675 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681 /* System header to define __stub macros and hopefully few prototypes,
4682     which can conflict with char select(); below.  */
4683 #include <assert.h>
4684 /* Override any gcc2 internal prototype to avoid an error.  */
4685 /* We use char because int might match the return type of a gcc2
4686     builtin and then its argument prototype would still apply.  */
4687 char select();
4688 char (*f)();
4689
4690 int main() {
4691
4692 /* The GNU C library defines this for functions which it implements
4693     to always fail with ENOSYS.  Some functions are actually named
4694     something starting with __ and the normal name is an alias.  */
4695 #if defined (__stub_select) || defined (__stub___select)
4696 choke me
4697 #else
4698 f = select;
4699 #endif
4700
4701 ; return 0; }
4702 EOF
4703 if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4704   rm -rf conftest*
4705   eval "ac_cv_func_select=yes"
4706 else
4707   echo "configure: failed program was:" >&5
4708   cat conftest.$ac_ext >&5
4709   rm -rf conftest*
4710   eval "ac_cv_func_select=no"
4711 fi
4712 rm -f conftest*
4713 fi
4714
4715 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4716   echo "$ac_t""yes" 1>&6
4717   :
4718 else
4719   echo "$ac_t""no" 1>&6
4720 { echo "configure: error: select() required." 1>&2; exit 1; }
4721 fi
4722
4723
4724 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4725 echo "configure:4726: checking types of arguments for select()" >&5
4726  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4727   echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4733   echo $ac_n "(cached) $ac_c" 1>&6
4734 else
4735      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4736      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4737       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4738        cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 #ifdef HAVE_SYS_TYPES_H
4742 #include <sys/types.h>
4743 #endif
4744 #ifdef HAVE_SYS_TIME_H
4745 #include <sys/time.h>
4746 #endif
4747 #ifdef HAVE_SYS_SELECT_H
4748 #include <sys/select.h>
4749 #endif
4750 #ifdef HAVE_SYS_SOCKET_H
4751 #include <sys/socket.h>
4752 #endif
4753 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);
4754 int main() {
4755
4756 ; return 0; }
4757 EOF
4758 if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4759   rm -rf conftest*
4760           ac_not_found=no ; break 3
4761 else
4762   echo "configure: failed program was:" >&5
4763   cat conftest.$ac_ext >&5
4764   rm -rf conftest*
4765   ac_not_found=yes
4766 fi
4767 rm -f conftest*
4768       done
4769      done
4770     done
4771    
4772 fi
4773   
4774 fi
4775  
4776 fi
4777  if test "$ac_not_found" = yes; then
4778   ac_cv_func_select_arg1=int 
4779   ac_cv_func_select_arg234='int *' 
4780   ac_cv_func_select_arg5='struct timeval *'
4781  fi
4782  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4783  cat >> confdefs.h <<EOF
4784 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4785 EOF
4786
4787  cat >> confdefs.h <<EOF
4788 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4789 EOF
4790
4791  cat >> confdefs.h <<EOF
4792 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4793 EOF
4794
4795
4796
4797
4798 for ac_hdr in regex.h 
4799 do
4800 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4801 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4802 echo "configure:4803: checking for $ac_hdr" >&5
4803 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809 #include <$ac_hdr>
4810 EOF
4811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4812 { (eval echo configure:4813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4814 if test -z "$ac_err"; then
4815   rm -rf conftest*
4816   eval "ac_cv_header_$ac_safe=yes"
4817 else
4818   echo "$ac_err" >&5
4819   echo "configure: failed program was:" >&5
4820   cat conftest.$ac_ext >&5
4821   rm -rf conftest*
4822   eval "ac_cv_header_$ac_safe=no"
4823 fi
4824 rm -f conftest*
4825 fi
4826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6
4828     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4829   cat >> confdefs.h <<EOF
4830 #define $ac_tr_hdr 1
4831 EOF
4832  
4833 else
4834   echo "$ac_t""no" 1>&6
4835 fi
4836 done
4837
4838 if test "$ac_cv_header_regex_h" != yes ; then
4839         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4840 fi
4841 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4842 echo "configure:4843: checking for regfree" >&5
4843 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4844   echo $ac_n "(cached) $ac_c" 1>&6
4845 else
4846   cat > conftest.$ac_ext <<EOF
4847 #line 4848 "configure"
4848 #include "confdefs.h"
4849 /* System header to define __stub macros and hopefully few prototypes,
4850     which can conflict with char regfree(); below.  */
4851 #include <assert.h>
4852 /* Override any gcc2 internal prototype to avoid an error.  */
4853 /* We use char because int might match the return type of a gcc2
4854     builtin and then its argument prototype would still apply.  */
4855 char regfree();
4856 char (*f)();
4857
4858 int main() {
4859
4860 /* The GNU C library defines this for functions which it implements
4861     to always fail with ENOSYS.  Some functions are actually named
4862     something starting with __ and the normal name is an alias.  */
4863 #if defined (__stub_regfree) || defined (__stub___regfree)
4864 choke me
4865 #else
4866 f = regfree;
4867 #endif
4868
4869 ; return 0; }
4870 EOF
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4872   rm -rf conftest*
4873   eval "ac_cv_func_regfree=yes"
4874 else
4875   echo "configure: failed program was:" >&5
4876   cat conftest.$ac_ext >&5
4877   rm -rf conftest*
4878   eval "ac_cv_func_regfree=no"
4879 fi
4880 rm -f conftest*
4881 fi
4882
4883 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4884   echo "$ac_t""yes" 1>&6
4885   :
4886 else
4887   echo "$ac_t""no" 1>&6
4888 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4889 fi
4890
4891
4892
4893 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4894 echo "configure:4895: checking for compatible POSIX regex" >&5
4895 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   
4899         if test "$cross_compiling" = yes; then
4900   ol_cv_c_posix_regex=cross
4901 else
4902   cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905
4906 #include <sys/types.h>
4907 #include <regex.h>
4908 static char *pattern, *string;
4909 main()
4910 {
4911         int rc;
4912         regex_t re;
4913
4914         pattern = "^A";
4915
4916         if(regcomp(&re, pattern, 0)) {
4917                 return -1;
4918         }
4919         
4920         string = "ALL MATCH";
4921         
4922         rc = regexec(&re, string, 0, (void*)0, 0);
4923
4924         regfree(&re);
4925
4926         return rc;
4927 }
4928 EOF
4929 if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4930 then
4931   ol_cv_c_posix_regex=yes
4932 else
4933   echo "configure: failed program was:" >&5
4934   cat conftest.$ac_ext >&5
4935   rm -fr conftest*
4936   ol_cv_c_posix_regex=no
4937 fi
4938 rm -fr conftest*
4939 fi
4940
4941 fi
4942
4943 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4944
4945 if test "$ol_cv_c_posix_regex" = no ; then
4946         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4947 fi
4948
4949
4950 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4951 echo "configure:4952: checking for sigset in -lV3" >&5
4952 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4953 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   ac_save_LIBS="$LIBS"
4957 LIBS="-lV3  $LIBS"
4958 cat > conftest.$ac_ext <<EOF
4959 #line 4960 "configure"
4960 #include "confdefs.h"
4961 /* Override any gcc2 internal prototype to avoid an error.  */
4962 /* We use char because int might match the return type of a gcc2
4963     builtin and then its argument prototype would still apply.  */
4964 char sigset();
4965
4966 int main() {
4967 sigset()
4968 ; return 0; }
4969 EOF
4970 if { (eval echo configure:4971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4971   rm -rf conftest*
4972   eval "ac_cv_lib_$ac_lib_var=yes"
4973 else
4974   echo "configure: failed program was:" >&5
4975   cat conftest.$ac_ext >&5
4976   rm -rf conftest*
4977   eval "ac_cv_lib_$ac_lib_var=no"
4978 fi
4979 rm -f conftest*
4980 LIBS="$ac_save_LIBS"
4981
4982 fi
4983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4984   echo "$ac_t""yes" 1>&6
4985     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4986     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4987   cat >> confdefs.h <<EOF
4988 #define $ac_tr_lib 1
4989 EOF
4990
4991   LIBS="-lV3 $LIBS"
4992
4993 else
4994   echo "$ac_t""no" 1>&6
4995 fi
4996
4997
4998 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4999 echo "configure:5000: checking for res_search" >&5
5000 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003   cat > conftest.$ac_ext <<EOF
5004 #line 5005 "configure"
5005 #include "confdefs.h"
5006 /* System header to define __stub macros and hopefully few prototypes,
5007     which can conflict with char res_search(); below.  */
5008 #include <assert.h>
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 /* We use char because int might match the return type of a gcc2
5011     builtin and then its argument prototype would still apply.  */
5012 char res_search();
5013 char (*f)();
5014
5015 int main() {
5016
5017 /* The GNU C library defines this for functions which it implements
5018     to always fail with ENOSYS.  Some functions are actually named
5019     something starting with __ and the normal name is an alias.  */
5020 #if defined (__stub_res_search) || defined (__stub___res_search)
5021 choke me
5022 #else
5023 f = res_search;
5024 #endif
5025
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5029   rm -rf conftest*
5030   eval "ac_cv_func_res_search=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_func_res_search=no"
5036 fi
5037 rm -f conftest*
5038 fi
5039
5040 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5041   echo "$ac_t""yes" 1>&6
5042   :
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047 if test $ac_cv_func_res_search = no ; then 
5048         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5049 echo "configure:5050: checking for res_search in -lbind" >&5
5050 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5052   echo $ac_n "(cached) $ac_c" 1>&6
5053 else
5054   ac_save_LIBS="$LIBS"
5055 LIBS="-lbind  $LIBS"
5056 cat > conftest.$ac_ext <<EOF
5057 #line 5058 "configure"
5058 #include "confdefs.h"
5059 /* Override any gcc2 internal prototype to avoid an error.  */
5060 /* We use char because int might match the return type of a gcc2
5061     builtin and then its argument prototype would still apply.  */
5062 char res_search();
5063
5064 int main() {
5065 res_search()
5066 ; return 0; }
5067 EOF
5068 if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=yes"
5071 else
5072   echo "configure: failed program was:" >&5
5073   cat conftest.$ac_ext >&5
5074   rm -rf conftest*
5075   eval "ac_cv_lib_$ac_lib_var=no"
5076 fi
5077 rm -f conftest*
5078 LIBS="$ac_save_LIBS"
5079
5080 fi
5081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5082   echo "$ac_t""yes" 1>&6
5083     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5084     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5085   cat >> confdefs.h <<EOF
5086 #define $ac_tr_lib 1
5087 EOF
5088
5089   LIBS="-lbind $LIBS"
5090
5091 else
5092   echo "$ac_t""no" 1>&6
5093 fi
5094
5095         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5096 fi
5097
5098 if test $ac_cv_func_res_search = no ; then 
5099         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5100 echo "configure:5101: checking for __res_search in -lbind" >&5
5101 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5102 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5103   echo $ac_n "(cached) $ac_c" 1>&6
5104 else
5105   ac_save_LIBS="$LIBS"
5106 LIBS="-lbind  $LIBS"
5107 cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 /* Override any gcc2 internal prototype to avoid an error.  */
5111 /* We use char because int might match the return type of a gcc2
5112     builtin and then its argument prototype would still apply.  */
5113 char __res_search();
5114
5115 int main() {
5116 __res_search()
5117 ; return 0; }
5118 EOF
5119 if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=yes"
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   eval "ac_cv_lib_$ac_lib_var=no"
5127 fi
5128 rm -f conftest*
5129 LIBS="$ac_save_LIBS"
5130
5131 fi
5132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5133   echo "$ac_t""yes" 1>&6
5134     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5135     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5136   cat >> confdefs.h <<EOF
5137 #define $ac_tr_lib 1
5138 EOF
5139
5140   LIBS="-lbind $LIBS"
5141
5142 else
5143   echo "$ac_t""no" 1>&6
5144 fi
5145
5146         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5147 fi
5148
5149 if test $ac_cv_func_res_search = no ; then 
5150         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5151 echo "configure:5152: checking for res_search in -lresolv" >&5
5152 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5154   echo $ac_n "(cached) $ac_c" 1>&6
5155 else
5156   ac_save_LIBS="$LIBS"
5157 LIBS="-lresolv  $LIBS"
5158 cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* Override any gcc2 internal prototype to avoid an error.  */
5162 /* We use char because int might match the return type of a gcc2
5163     builtin and then its argument prototype would still apply.  */
5164 char res_search();
5165
5166 int main() {
5167 res_search()
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=yes"
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=no"
5178 fi
5179 rm -f conftest*
5180 LIBS="$ac_save_LIBS"
5181
5182 fi
5183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5184   echo "$ac_t""yes" 1>&6
5185     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5187   cat >> confdefs.h <<EOF
5188 #define $ac_tr_lib 1
5189 EOF
5190
5191   LIBS="-lresolv $LIBS"
5192
5193 else
5194   echo "$ac_t""no" 1>&6
5195 fi
5196
5197         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5198 fi
5199
5200 if test "$ac_cv_func_res_search" = yes ; then
5201         cat >> confdefs.h <<\EOF
5202 #define HAVE_RES_SEARCH 1
5203 EOF
5204
5205 elif test $ol_enable_dns = yes ; then
5206         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5207 elif test $ol_enable_dns != no ; then
5208         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5209 fi
5210
5211
5212 # QUIPU
5213 if test $ol_enable_quipu != no ; then
5214         for ac_hdr in quipu/commonarg.h
5215 do
5216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5218 echo "configure:5219: checking for $ac_hdr" >&5
5219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5220   echo $ac_n "(cached) $ac_c" 1>&6
5221 else
5222   cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225 #include <$ac_hdr>
5226 EOF
5227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5228 { (eval echo configure:5229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5230 if test -z "$ac_err"; then
5231   rm -rf conftest*
5232   eval "ac_cv_header_$ac_safe=yes"
5233 else
5234   echo "$ac_err" >&5
5235   echo "configure: failed program was:" >&5
5236   cat conftest.$ac_ext >&5
5237   rm -rf conftest*
5238   eval "ac_cv_header_$ac_safe=no"
5239 fi
5240 rm -f conftest*
5241 fi
5242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5243   echo "$ac_t""yes" 1>&6
5244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5245   cat >> confdefs.h <<EOF
5246 #define $ac_tr_hdr 1
5247 EOF
5248  
5249 else
5250   echo "$ac_t""no" 1>&6
5251 fi
5252 done
5253
5254
5255         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5256                 BUILD_QUIPU=yes
5257         elif test $ol_enable_quipu = auto ; then
5258                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5259         else
5260                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5261         fi
5262 fi
5263
5264 ol_link_kerberos=no
5265
5266 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5267         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5268 do
5269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5271 echo "configure:5272: checking for $ac_hdr" >&5
5272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5273   echo $ac_n "(cached) $ac_c" 1>&6
5274 else
5275   cat > conftest.$ac_ext <<EOF
5276 #line 5277 "configure"
5277 #include "confdefs.h"
5278 #include <$ac_hdr>
5279 EOF
5280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5281 { (eval echo configure:5282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5283 if test -z "$ac_err"; then
5284   rm -rf conftest*
5285   eval "ac_cv_header_$ac_safe=yes"
5286 else
5287   echo "$ac_err" >&5
5288   echo "configure: failed program was:" >&5
5289   cat conftest.$ac_ext >&5
5290   rm -rf conftest*
5291   eval "ac_cv_header_$ac_safe=no"
5292 fi
5293 rm -f conftest*
5294 fi
5295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5298   cat >> confdefs.h <<EOF
5299 #define $ac_tr_hdr 1
5300 EOF
5301  
5302 else
5303   echo "$ac_t""no" 1>&6
5304 fi
5305 done
5306
5307
5308         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5309                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5310 echo "configure:5311: checking for main in -lkrb4" >&5
5311 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5313   echo $ac_n "(cached) $ac_c" 1>&6
5314 else
5315   ac_save_LIBS="$LIBS"
5316 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5317 cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320
5321 int main() {
5322 main()
5323 ; return 0; }
5324 EOF
5325 if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5326   rm -rf conftest*
5327   eval "ac_cv_lib_$ac_lib_var=yes"
5328 else
5329   echo "configure: failed program was:" >&5
5330   cat conftest.$ac_ext >&5
5331   rm -rf conftest*
5332   eval "ac_cv_lib_$ac_lib_var=no"
5333 fi
5334 rm -f conftest*
5335 LIBS="$ac_save_LIBS"
5336
5337 fi
5338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5339   echo "$ac_t""yes" 1>&6
5340   have_k5=yes
5341 else
5342   echo "$ac_t""no" 1>&6
5343 have_k5=no
5344 fi
5345
5346
5347                 if test $have_k5 = yes ; then
5348                         ol_with_kerberos=found
5349                         ol_link_kerberos=yes
5350
5351                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5352
5353                         LIBS="$KRB_LIBS $LIBS"
5354
5355                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5356 echo "configure:5357: checking for des_debug in Kerberos libraries" >&5
5357 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5358   echo $ac_n "(cached) $ac_c" 1>&6
5359 else
5360   
5361                                                                 save_LIBS="$LIBS"
5362                                 LIBS="$KRB_LIBS $LIBS"
5363                                 cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366
5367 #include <kerberosIV/krb.h>
5368 #include <kerberosIV/des.h>
5369 extern int des_debug;
5370
5371 int main() {
5372
5373 des_debug = 1;
5374
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378   rm -rf conftest*
5379   ol_cv_var_des_debug=yes
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   ol_cv_var_des_debug=no
5385 fi
5386 rm -f conftest*
5387                                                                 LIBS="$save_LIBS"
5388                         
5389 fi
5390
5391 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5392
5393                         if test $ol_cv_var_des_debug = yes ; then
5394                                 cat >> confdefs.h <<\EOF
5395 #define HAVE_DES_DEBUG 1
5396 EOF
5397
5398                         fi
5399
5400                         LIBS="$save_LIBS"
5401                 fi
5402         fi
5403 fi
5404
5405 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5406         for ac_hdr in krb.h des.h
5407 do
5408 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5409 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5410 echo "configure:5411: checking for $ac_hdr" >&5
5411 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5412   echo $ac_n "(cached) $ac_c" 1>&6
5413 else
5414   cat > conftest.$ac_ext <<EOF
5415 #line 5416 "configure"
5416 #include "confdefs.h"
5417 #include <$ac_hdr>
5418 EOF
5419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5420 { (eval echo configure:5421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5422 if test -z "$ac_err"; then
5423   rm -rf conftest*
5424   eval "ac_cv_header_$ac_safe=yes"
5425 else
5426   echo "$ac_err" >&5
5427   echo "configure: failed program was:" >&5
5428   cat conftest.$ac_ext >&5
5429   rm -rf conftest*
5430   eval "ac_cv_header_$ac_safe=no"
5431 fi
5432 rm -f conftest*
5433 fi
5434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5435   echo "$ac_t""yes" 1>&6
5436     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5437   cat >> confdefs.h <<EOF
5438 #define $ac_tr_hdr 1
5439 EOF
5440  
5441 else
5442   echo "$ac_t""no" 1>&6
5443 fi
5444 done
5445
5446
5447         if test $ac_cv_header_krb_h = yes ; then
5448                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5449 echo "configure:5450: checking for main in -lkrb" >&5
5450 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5451 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5452   echo $ac_n "(cached) $ac_c" 1>&6
5453 else
5454   ac_save_LIBS="$LIBS"
5455 LIBS="-lkrb -ldes $LIBS"
5456 cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459
5460 int main() {
5461 main()
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5465   rm -rf conftest*
5466   eval "ac_cv_lib_$ac_lib_var=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=no"
5472 fi
5473 rm -f conftest*
5474 LIBS="$ac_save_LIBS"
5475
5476 fi
5477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479   have_k4=yes
5480 else
5481   echo "$ac_t""no" 1>&6
5482 have_k4=no
5483 fi
5484
5485
5486                 if test $have_k4 = yes ; then
5487                         ol_with_kerberos=found
5488                         ol_link_kerberos=yes
5489
5490                         KRB_LIBS="-lkrb -ldes"
5491                 fi
5492         fi
5493 fi
5494
5495 if test $ol_link_kerberos = yes ; then
5496         cat >> confdefs.h <<\EOF
5497 #define HAVE_KERBEROS 1
5498 EOF
5499
5500 fi
5501
5502 ol_link_tls=no
5503 if test $ol_with_tls != no ; then
5504         
5505         for ac_hdr in openssl/ssl.h ssl.h
5506 do
5507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5509 echo "configure:5510: checking for $ac_hdr" >&5
5510 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5511   echo $ac_n "(cached) $ac_c" 1>&6
5512 else
5513   cat > conftest.$ac_ext <<EOF
5514 #line 5515 "configure"
5515 #include "confdefs.h"
5516 #include <$ac_hdr>
5517 EOF
5518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5519 { (eval echo configure:5520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5521 if test -z "$ac_err"; then
5522   rm -rf conftest*
5523   eval "ac_cv_header_$ac_safe=yes"
5524 else
5525   echo "$ac_err" >&5
5526   echo "configure: failed program was:" >&5
5527   cat conftest.$ac_ext >&5
5528   rm -rf conftest*
5529   eval "ac_cv_header_$ac_safe=no"
5530 fi
5531 rm -f conftest*
5532 fi
5533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5534   echo "$ac_t""yes" 1>&6
5535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5536   cat >> confdefs.h <<EOF
5537 #define $ac_tr_hdr 1
5538 EOF
5539  
5540 else
5541   echo "$ac_t""no" 1>&6
5542 fi
5543 done
5544
5545         
5546         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5547                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5548 echo "configure:5549: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5549 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5551   echo $ac_n "(cached) $ac_c" 1>&6
5552 else
5553   ac_save_LIBS="$LIBS"
5554 LIBS="-lssl -lcrypto $LIBS"
5555 cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char SSLeay_add_ssl_algorithms();
5562
5563 int main() {
5564 SSLeay_add_ssl_algorithms()
5565 ; return 0; }
5566 EOF
5567 if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5568   rm -rf conftest*
5569   eval "ac_cv_lib_$ac_lib_var=yes"
5570 else
5571   echo "configure: failed program was:" >&5
5572   cat conftest.$ac_ext >&5
5573   rm -rf conftest*
5574   eval "ac_cv_lib_$ac_lib_var=no"
5575 fi
5576 rm -f conftest*
5577 LIBS="$ac_save_LIBS"
5578
5579 fi
5580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5581   echo "$ac_t""yes" 1>&6
5582   have_ssleay=yes
5583                         need_rsaref=no
5584 else
5585   echo "$ac_t""no" 1>&6
5586 have_ssleay=no
5587 fi
5588
5589                         
5590                 if test $have_ssleay = no ; then
5591                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5592 echo "configure:5593: checking for SSL_library_init in -lssl" >&5
5593 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5595   echo $ac_n "(cached) $ac_c" 1>&6
5596 else
5597   ac_save_LIBS="$LIBS"
5598 LIBS="-lssl -lcrypto $LIBS"
5599 cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602 /* Override any gcc2 internal prototype to avoid an error.  */
5603 /* We use char because int might match the return type of a gcc2
5604     builtin and then its argument prototype would still apply.  */
5605 char SSL_library_init();
5606
5607 int main() {
5608 SSL_library_init()
5609 ; return 0; }
5610 EOF
5611 if { (eval echo configure:5612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5612   rm -rf conftest*
5613   eval "ac_cv_lib_$ac_lib_var=yes"
5614 else
5615   echo "configure: failed program was:" >&5
5616   cat conftest.$ac_ext >&5
5617   rm -rf conftest*
5618   eval "ac_cv_lib_$ac_lib_var=no"
5619 fi
5620 rm -f conftest*
5621 LIBS="$ac_save_LIBS"
5622
5623 fi
5624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5625   echo "$ac_t""yes" 1>&6
5626   have_ssleay=yes
5627                                 need_rsaref=no
5628 else
5629   echo "$ac_t""no" 1>&6
5630 have_ssleay=no
5631 fi
5632
5633                 fi
5634
5635                 if test $have_ssleay = no ; then
5636                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5637 echo "configure:5638: checking for ssl3_accept in -lssl" >&5
5638 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5640   echo $ac_n "(cached) $ac_c" 1>&6
5641 else
5642   ac_save_LIBS="$LIBS"
5643 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5644 cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 /* We use char because int might match the return type of a gcc2
5649     builtin and then its argument prototype would still apply.  */
5650 char ssl3_accept();
5651
5652 int main() {
5653 ssl3_accept()
5654 ; return 0; }
5655 EOF
5656 if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5657   rm -rf conftest*
5658   eval "ac_cv_lib_$ac_lib_var=yes"
5659 else
5660   echo "configure: failed program was:" >&5
5661   cat conftest.$ac_ext >&5
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=no"
5664 fi
5665 rm -f conftest*
5666 LIBS="$ac_save_LIBS"
5667
5668 fi
5669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5670   echo "$ac_t""yes" 1>&6
5671   have_ssleay=yes
5672                                 need_rsaref=yes
5673 else
5674   echo "$ac_t""no" 1>&6
5675 have_ssleay=no
5676 fi
5677
5678                 fi
5679
5680                 if test $have_ssleay = yes ; then
5681                         ol_with_tls=found
5682                         ol_link_tls=yes
5683
5684                         cat >> confdefs.h <<\EOF
5685 #define HAVE_SSLEAY 1
5686 EOF
5687
5688
5689                         if test $need_rsaref = yes; then
5690                                 cat >> confdefs.h <<\EOF
5691 #define HAVE_RSAREF 1
5692 EOF
5693
5694
5695                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5696                         else
5697                                 TLS_LIBS="-lssl -lcrypto"
5698                         fi
5699                 fi
5700         fi
5701 fi
5702
5703 if test $ol_link_tls = yes ; then
5704         cat >> confdefs.h <<\EOF
5705 #define HAVE_TLS 1
5706 EOF
5707
5708 fi      
5709
5710 for ac_func in \
5711         ctime_r                 \
5712         gethostbyname_r gethostbyaddr_r \
5713
5714 do
5715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5716 echo "configure:5717: checking for $ac_func" >&5
5717 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5718   echo $ac_n "(cached) $ac_c" 1>&6
5719 else
5720   cat > conftest.$ac_ext <<EOF
5721 #line 5722 "configure"
5722 #include "confdefs.h"
5723 /* System header to define __stub macros and hopefully few prototypes,
5724     which can conflict with char $ac_func(); below.  */
5725 #include <assert.h>
5726 /* Override any gcc2 internal prototype to avoid an error.  */
5727 /* We use char because int might match the return type of a gcc2
5728     builtin and then its argument prototype would still apply.  */
5729 char $ac_func();
5730 char (*f)();
5731
5732 int main() {
5733
5734 /* The GNU C library defines this for functions which it implements
5735     to always fail with ENOSYS.  Some functions are actually named
5736     something starting with __ and the normal name is an alias.  */
5737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5738 choke me
5739 #else
5740 f = $ac_func;
5741 #endif
5742
5743 ; return 0; }
5744 EOF
5745 if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746   rm -rf conftest*
5747   eval "ac_cv_func_$ac_func=yes"
5748 else
5749   echo "configure: failed program was:" >&5
5750   cat conftest.$ac_ext >&5
5751   rm -rf conftest*
5752   eval "ac_cv_func_$ac_func=no"
5753 fi
5754 rm -f conftest*
5755 fi
5756
5757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5758   echo "$ac_t""yes" 1>&6
5759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5760   cat >> confdefs.h <<EOF
5761 #define $ac_tr_func 1
5762 EOF
5763  
5764 else
5765   echo "$ac_t""no" 1>&6
5766 fi
5767 done
5768
5769
5770 if test "$ac_cv_func_ctime_r" = no ; then
5771         ol_cv_func_ctime_r_nargs=0
5772 else
5773         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5774 echo "configure:5775: checking number of arguments of ctime_r" >&5
5775 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5776   echo $ac_n "(cached) $ac_c" 1>&6
5777 else
5778   cat > conftest.$ac_ext <<EOF
5779 #line 5780 "configure"
5780 #include "confdefs.h"
5781 #include <time.h>
5782 int main() {
5783 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5784 ; return 0; }
5785 EOF
5786 if { (eval echo configure:5787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5787   rm -rf conftest*
5788   ol_cv_func_ctime_r_nargs=3
5789 else
5790   echo "configure: failed program was:" >&5
5791   cat conftest.$ac_ext >&5
5792   rm -rf conftest*
5793   cat > conftest.$ac_ext <<EOF
5794 #line 5795 "configure"
5795 #include "confdefs.h"
5796 #include <time.h>
5797 int main() {
5798 time_t ti; char *buffer; ctime_r(&ti,buffer);
5799 ; return 0; }
5800 EOF
5801 if { (eval echo configure:5802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5802   rm -rf conftest*
5803   ol_cv_func_ctime_r_nargs=2
5804 else
5805   echo "configure: failed program was:" >&5
5806   cat conftest.$ac_ext >&5
5807   rm -rf conftest*
5808   ol_cv_func_ctime_r_nargs=0
5809 fi
5810 rm -f conftest*
5811 fi
5812 rm -f conftest*
5813 fi
5814
5815 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5816   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5817     cat >> confdefs.h <<EOF
5818 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5819 EOF
5820
5821   fi
5822
5823 fi
5824
5825 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5826         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5827 echo "configure:5828: checking number of arguments of gethostbyname_r" >&5
5828 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5829   echo $ac_n "(cached) $ac_c" 1>&6
5830 else
5831   cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 #include <sys/types.h>
5835 #include <sys/socket.h>
5836 #include <netinet/in.h>
5837 #include <netdb.h>
5838 #define BUFSIZE (sizeof(struct hostent)+10)
5839 int main() {
5840 struct hostent hent; char buffer[BUFSIZE];
5841                 int bufsize=BUFSIZE;int h_errno;
5842                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5843                         buffer, bufsize, &h_errno);
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5847   rm -rf conftest*
5848   ol_cv_func_gethostbyname_r_nargs=5
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -rf conftest*
5853   cat > conftest.$ac_ext <<EOF
5854 #line 5855 "configure"
5855 #include "confdefs.h"
5856 #include <sys/types.h>
5857 #include <sys/socket.h>
5858 #include <netinet/in.h>
5859 #include <netdb.h>
5860 #define BUFSIZE (sizeof(struct hostent)+10)
5861 int main() {
5862 struct hostent hent;struct hostent *rhent;
5863                         char buffer[BUFSIZE];
5864                         int bufsize=BUFSIZE;int h_errno;
5865                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5866                                 &rhent, &h_errno);
5867 ; return 0; }
5868 EOF
5869 if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5870   rm -rf conftest*
5871   ol_cv_func_gethostbyname_r_nargs=6
5872 else
5873   echo "configure: failed program was:" >&5
5874   cat conftest.$ac_ext >&5
5875   rm -rf conftest*
5876   ol_cv_func_gethostbyname_r_nargs=0
5877 fi
5878 rm -f conftest*
5879 fi
5880 rm -f conftest*
5881 fi
5882
5883 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5884   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5885         cat >> confdefs.h <<EOF
5886 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5887 EOF
5888
5889   fi
5890
5891 else
5892         ol_cv_func_gethostbyname_r_nargs=0
5893 fi
5894  
5895 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5896         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5897 echo "configure:5898: checking number of arguments of gethostbyaddr_r" >&5
5898 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5899   echo $ac_n "(cached) $ac_c" 1>&6
5900 else
5901   cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 #include <sys/types.h>
5905 #include <sys/socket.h>
5906 #include <netinet/in.h>
5907 #include <netdb.h>
5908 #define BUFSIZE (sizeof(struct hostent)+10)
5909 int main() {
5910 struct hostent hent; char buffer[BUFSIZE]; 
5911             struct in_addr add;
5912             size_t alen=sizeof(struct in_addr);
5913             int bufsize=BUFSIZE;int h_errno;
5914                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5915                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5916 ; return 0; }
5917 EOF
5918 if { (eval echo configure:5919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5919   rm -rf conftest*
5920   ol_cv_func_gethostbyaddr_r_nargs=7
5921 else
5922   echo "configure: failed program was:" >&5
5923   cat conftest.$ac_ext >&5
5924   rm -rf conftest*
5925   cat > conftest.$ac_ext <<EOF
5926 #line 5927 "configure"
5927 #include "confdefs.h"
5928 #include <sys/types.h>
5929 #include <sys/socket.h>
5930 #include <netinet/in.h>
5931 #include <netdb.h>
5932 #define BUFSIZE (sizeof(struct hostent)+10)
5933 int main() {
5934 struct hostent hent;
5935                         struct hostent *rhent; char buffer[BUFSIZE]; 
5936                         struct in_addr add;
5937                         size_t alen=sizeof(struct in_addr);
5938                         int bufsize=BUFSIZE;int h_errno;
5939                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5940                                 alen, AF_INET, &hent, buffer, bufsize, 
5941                                 &rhent, &h_errno);
5942 ; return 0; }
5943 EOF
5944 if { (eval echo configure:5945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5945   rm -rf conftest*
5946   ol_cv_func_gethostbyaddr_r_nargs=8
5947 else
5948   echo "configure: failed program was:" >&5
5949   cat conftest.$ac_ext >&5
5950   rm -rf conftest*
5951   ol_cv_func_gethostbyaddr_r_nargs=0
5952 fi
5953 rm -f conftest*
5954 fi
5955 rm -f conftest*
5956 fi
5957
5958 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5959   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5960     cat >> confdefs.h <<EOF
5961 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5962 EOF
5963
5964   fi
5965
5966 else
5967         ol_cv_func_gethostbyaddr_r_nargs=0
5968 fi
5969
5970 if test "$ac_cv_func_ctime_r" = yes \
5971         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5972         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5973         -a "$ac_cv_func_gethostbyname_r" = yes \
5974         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5975         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5976         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5977         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5978         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5979         ; then
5980  
5981         cat >> confdefs.h <<\EOF
5982 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5983 EOF
5984
5985 fi
5986
5987 ol_link_threads=no
5988 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5989         -o $ol_with_threads = posix ; then
5990
5991         for ac_hdr in pthread.h sched.h
5992 do
5993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5995 echo "configure:5996: checking for $ac_hdr" >&5
5996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5997   echo $ac_n "(cached) $ac_c" 1>&6
5998 else
5999   cat > conftest.$ac_ext <<EOF
6000 #line 6001 "configure"
6001 #include "confdefs.h"
6002 #include <$ac_hdr>
6003 EOF
6004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6005 { (eval echo configure:6006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6007 if test -z "$ac_err"; then
6008   rm -rf conftest*
6009   eval "ac_cv_header_$ac_safe=yes"
6010 else
6011   echo "$ac_err" >&5
6012   echo "configure: failed program was:" >&5
6013   cat conftest.$ac_ext >&5
6014   rm -rf conftest*
6015   eval "ac_cv_header_$ac_safe=no"
6016 fi
6017 rm -f conftest*
6018 fi
6019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6020   echo "$ac_t""yes" 1>&6
6021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6022   cat >> confdefs.h <<EOF
6023 #define $ac_tr_hdr 1
6024 EOF
6025  
6026 else
6027   echo "$ac_t""no" 1>&6
6028 fi
6029 done
6030
6031
6032         if test $ac_cv_header_pthread_h = yes ; then
6033                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6034 echo "configure:6035: checking POSIX thread version" >&5
6035 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6036   echo $ac_n "(cached) $ac_c" 1>&6
6037 else
6038   
6039         cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6042
6043 #               include <pthread.h>
6044                 /* this check could be improved */
6045 #               ifdef PTHREAD_ONCE_INIT
6046                         pthread_version_final
6047 #               endif
6048         
6049 EOF
6050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6051   egrep "pthread_version_final" >/dev/null 2>&1; then
6052   rm -rf conftest*
6053   ol_pthread_final=yes
6054 else
6055   rm -rf conftest*
6056   ol_pthread_final=no
6057 fi
6058 rm -f conftest*
6059
6060
6061         cat > conftest.$ac_ext <<EOF
6062 #line 6063 "configure"
6063 #include "confdefs.h"
6064
6065 #               include <pthread.h>
6066                 /* this check could be improved */
6067 #               ifdef pthread_once_init
6068                         pthread_version_draft4
6069 #               endif
6070         
6071 EOF
6072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6073   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6074   rm -rf conftest*
6075   ol_pthread_draft4=yes
6076 else
6077   rm -rf conftest*
6078   ol_pthread_draft4=no
6079 fi
6080 rm -f conftest*
6081
6082
6083         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6084                 ol_cv_pthread_version=final
6085         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6086                 ol_cv_pthread_version=draft4
6087         else
6088                 ol_cv_pthread_version=unknown
6089         fi
6090
6091 fi
6092
6093 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6094
6095
6096                 if test $ol_cv_pthread_version = final ; then
6097                         cat >> confdefs.h <<\EOF
6098 #define HAVE_PTHREADS_FINAL 1
6099 EOF
6100
6101                 elif test $ol_cv_pthread_version = draft4 ; then
6102                         cat >> confdefs.h <<\EOF
6103 #define HAVE_PTHREADS_D4 1
6104 EOF
6105
6106                 else
6107                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6108                 fi
6109
6110                 # consider threads found
6111                 ol_with_threads=found
6112
6113                 
6114         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6115 echo "configure:6116: checking for LinuxThreads pthread.h" >&5
6116 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6117   echo $ac_n "(cached) $ac_c" 1>&6
6118 else
6119   cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6122 #include <pthread.h>
6123 EOF
6124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6125   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6126   rm -rf conftest*
6127   ol_cv_header_linux_threads=yes
6128 else
6129   rm -rf conftest*
6130   ol_cv_header_linux_threads=no
6131 fi
6132 rm -f conftest*
6133
6134                 
6135 fi
6136
6137 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6138         if test $ol_cv_header_linux_threads = yes; then
6139                 cat >> confdefs.h <<\EOF
6140 #define HAVE_LINUX_THREADS 1
6141 EOF
6142
6143         fi
6144
6145
6146                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6147                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6148 echo "configure:6149: checking for pthread_create in default libraries" >&5
6149 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6150   echo $ac_n "(cached) $ac_c" 1>&6
6151 else
6152   
6153                 if test "$cross_compiling" = yes; then
6154   cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 /* pthread test headers */
6158 #include <pthread.h>
6159 #ifndef NULL
6160 #define NULL (void*)0
6161 #endif
6162
6163 static void *task(p)
6164         void *p;
6165 {
6166         return (void *) (p == NULL);
6167 }
6168
6169 int main() {
6170
6171         /* pthread test function */
6172         pthread_t t;
6173         int status;
6174
6175         /* make sure pthread_create() isn't just a stub */
6176 #if HAVE_PTHREADS_D4
6177         status = pthread_create(&t, pthread_attr_default, task, NULL);
6178 #else
6179         status = pthread_create(&t, NULL, task, NULL);
6180 #endif
6181
6182         if( status ) exit( status );
6183
6184         /* make sure pthread_detach() isn't just a stub */
6185 #if HAVE_PTHREADS_D4
6186         status = pthread_detach( &t );
6187 #else
6188         status = pthread_detach( t );
6189 #endif
6190
6191 #ifdef HAVE_LINUX_THREADS
6192         pthread_kill_other_threads_np();
6193 #endif
6194
6195         exit( status );
6196
6197 ; return 0; }
6198 EOF
6199 if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6200   rm -rf conftest*
6201   ol_cv_pthread_create=yes
6202 else
6203   echo "configure: failed program was:" >&5
6204   cat conftest.$ac_ext >&5
6205   rm -rf conftest*
6206   ol_cv_pthread_create=no
6207 fi
6208 rm -f conftest*
6209 else
6210   cat > conftest.$ac_ext <<EOF
6211 #line 6212 "configure"
6212 #include "confdefs.h"
6213 /* pthread test headers */
6214 #include <pthread.h>
6215 #ifndef NULL
6216 #define NULL (void*)0
6217 #endif
6218
6219 static void *task(p)
6220         void *p;
6221 {
6222         return (void *) (p == NULL);
6223 }
6224
6225
6226 int main(argc, argv)
6227         int argc;
6228         char **argv;
6229 {
6230
6231         /* pthread test function */
6232         pthread_t t;
6233         int status;
6234
6235         /* make sure pthread_create() isn't just a stub */
6236 #if HAVE_PTHREADS_D4
6237         status = pthread_create(&t, pthread_attr_default, task, NULL);
6238 #else
6239         status = pthread_create(&t, NULL, task, NULL);
6240 #endif
6241
6242         if( status ) exit( status );
6243
6244         /* make sure pthread_detach() isn't just a stub */
6245 #if HAVE_PTHREADS_D4
6246         status = pthread_detach( &t );
6247 #else
6248         status = pthread_detach( t );
6249 #endif
6250
6251 #ifdef HAVE_LINUX_THREADS
6252         pthread_kill_other_threads_np();
6253 #endif
6254
6255         exit( status );
6256
6257 }
6258
6259 EOF
6260 if { (eval echo configure:6261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6261 then
6262   ol_cv_pthread_create=yes
6263 else
6264   echo "configure: failed program was:" >&5
6265   cat conftest.$ac_ext >&5
6266   rm -fr conftest*
6267   ol_cv_pthread_create=no
6268 fi
6269 rm -fr conftest*
6270 fi
6271
6272 fi
6273
6274 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6275
6276                 if test $ol_cv_pthread_create != no ; then
6277                         ol_link_threads=posix
6278                         ol_link_pthreads=""
6279                 fi
6280                 
6281                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6282 if test "$ol_link_threads" = no ; then
6283         # try -kthread
6284         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6285 echo "configure:6286: checking for pthread link with -kthread" >&5
6286 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6287   echo $ac_n "(cached) $ac_c" 1>&6
6288 else
6289   
6290                 # save the flags
6291                 ol_LIBS="$LIBS"
6292                 LIBS="-kthread $LIBS"
6293
6294                 if test "$cross_compiling" = yes; then
6295   cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298 /* pthread test headers */
6299 #include <pthread.h>
6300 #ifndef NULL
6301 #define NULL (void*)0
6302 #endif
6303
6304 static void *task(p)
6305         void *p;
6306 {
6307         return (void *) (p == NULL);
6308 }
6309
6310 int main() {
6311
6312         /* pthread test function */
6313         pthread_t t;
6314         int status;
6315
6316         /* make sure pthread_create() isn't just a stub */
6317 #if HAVE_PTHREADS_D4
6318         status = pthread_create(&t, pthread_attr_default, task, NULL);
6319 #else
6320         status = pthread_create(&t, NULL, task, NULL);
6321 #endif
6322
6323         if( status ) exit( status );
6324
6325         /* make sure pthread_detach() isn't just a stub */
6326 #if HAVE_PTHREADS_D4
6327         status = pthread_detach( &t );
6328 #else
6329         status = pthread_detach( t );
6330 #endif
6331
6332 #ifdef HAVE_LINUX_THREADS
6333         pthread_kill_other_threads_np();
6334 #endif
6335
6336         exit( status );
6337
6338 ; return 0; }
6339 EOF
6340 if { (eval echo configure:6341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6341   rm -rf conftest*
6342   ol_cv_pthread_kthread=yes
6343 else
6344   echo "configure: failed program was:" >&5
6345   cat conftest.$ac_ext >&5
6346   rm -rf conftest*
6347   ol_cv_pthread_kthread=no
6348 fi
6349 rm -f conftest*
6350 else
6351   cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354 /* pthread test headers */
6355 #include <pthread.h>
6356 #ifndef NULL
6357 #define NULL (void*)0
6358 #endif
6359
6360 static void *task(p)
6361         void *p;
6362 {
6363         return (void *) (p == NULL);
6364 }
6365
6366
6367 int main(argc, argv)
6368         int argc;
6369         char **argv;
6370 {
6371
6372         /* pthread test function */
6373         pthread_t t;
6374         int status;
6375
6376         /* make sure pthread_create() isn't just a stub */
6377 #if HAVE_PTHREADS_D4
6378         status = pthread_create(&t, pthread_attr_default, task, NULL);
6379 #else
6380         status = pthread_create(&t, NULL, task, NULL);
6381 #endif
6382
6383         if( status ) exit( status );
6384
6385         /* make sure pthread_detach() isn't just a stub */
6386 #if HAVE_PTHREADS_D4
6387         status = pthread_detach( &t );
6388 #else
6389         status = pthread_detach( t );
6390 #endif
6391
6392 #ifdef HAVE_LINUX_THREADS
6393         pthread_kill_other_threads_np();
6394 #endif
6395
6396         exit( status );
6397
6398 }
6399
6400 EOF
6401 if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6402 then
6403   ol_cv_pthread_kthread=yes
6404 else
6405   echo "configure: failed program was:" >&5
6406   cat conftest.$ac_ext >&5
6407   rm -fr conftest*
6408   ol_cv_pthread_kthread=no
6409 fi
6410 rm -fr conftest*
6411 fi
6412
6413
6414                 # restore the LIBS
6415                 LIBS="$ol_LIBS"
6416         
6417 fi
6418
6419 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6420
6421         if test $ol_cv_pthread_kthread = yes ; then
6422                 ol_link_pthreads="-kthread"
6423                 ol_link_threads=posix
6424         fi
6425 fi
6426
6427                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6428 if test "$ol_link_threads" = no ; then
6429         # try -pthread
6430         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6431 echo "configure:6432: checking for pthread link with -pthread" >&5
6432 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6433   echo $ac_n "(cached) $ac_c" 1>&6
6434 else
6435   
6436                 # save the flags
6437                 ol_LIBS="$LIBS"
6438                 LIBS="-pthread $LIBS"
6439
6440                 if test "$cross_compiling" = yes; then
6441   cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 /* pthread test headers */
6445 #include <pthread.h>
6446 #ifndef NULL
6447 #define NULL (void*)0
6448 #endif
6449
6450 static void *task(p)
6451         void *p;
6452 {
6453         return (void *) (p == NULL);
6454 }
6455
6456 int main() {
6457
6458         /* pthread test function */
6459         pthread_t t;
6460         int status;
6461
6462         /* make sure pthread_create() isn't just a stub */
6463 #if HAVE_PTHREADS_D4
6464         status = pthread_create(&t, pthread_attr_default, task, NULL);
6465 #else
6466         status = pthread_create(&t, NULL, task, NULL);
6467 #endif
6468
6469         if( status ) exit( status );
6470
6471         /* make sure pthread_detach() isn't just a stub */
6472 #if HAVE_PTHREADS_D4
6473         status = pthread_detach( &t );
6474 #else
6475         status = pthread_detach( t );
6476 #endif
6477
6478 #ifdef HAVE_LINUX_THREADS
6479         pthread_kill_other_threads_np();
6480 #endif
6481
6482         exit( status );
6483
6484 ; return 0; }
6485 EOF
6486 if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6487   rm -rf conftest*
6488   ol_cv_pthread_pthread=yes
6489 else
6490   echo "configure: failed program was:" >&5
6491   cat conftest.$ac_ext >&5
6492   rm -rf conftest*
6493   ol_cv_pthread_pthread=no
6494 fi
6495 rm -f conftest*
6496 else
6497   cat > conftest.$ac_ext <<EOF
6498 #line 6499 "configure"
6499 #include "confdefs.h"
6500 /* pthread test headers */
6501 #include <pthread.h>
6502 #ifndef NULL
6503 #define NULL (void*)0
6504 #endif
6505
6506 static void *task(p)
6507         void *p;
6508 {
6509         return (void *) (p == NULL);
6510 }
6511
6512
6513 int main(argc, argv)
6514         int argc;
6515         char **argv;
6516 {
6517
6518         /* pthread test function */
6519         pthread_t t;
6520         int status;
6521
6522         /* make sure pthread_create() isn't just a stub */
6523 #if HAVE_PTHREADS_D4
6524         status = pthread_create(&t, pthread_attr_default, task, NULL);
6525 #else
6526         status = pthread_create(&t, NULL, task, NULL);
6527 #endif
6528
6529         if( status ) exit( status );
6530
6531         /* make sure pthread_detach() isn't just a stub */
6532 #if HAVE_PTHREADS_D4
6533         status = pthread_detach( &t );
6534 #else
6535         status = pthread_detach( t );
6536 #endif
6537
6538 #ifdef HAVE_LINUX_THREADS
6539         pthread_kill_other_threads_np();
6540 #endif
6541
6542         exit( status );
6543
6544 }
6545
6546 EOF
6547 if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6548 then
6549   ol_cv_pthread_pthread=yes
6550 else
6551   echo "configure: failed program was:" >&5
6552   cat conftest.$ac_ext >&5
6553   rm -fr conftest*
6554   ol_cv_pthread_pthread=no
6555 fi
6556 rm -fr conftest*
6557 fi
6558
6559
6560                 # restore the LIBS
6561                 LIBS="$ol_LIBS"
6562         
6563 fi
6564
6565 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6566
6567         if test $ol_cv_pthread_pthread = yes ; then
6568                 ol_link_pthreads="-pthread"
6569                 ol_link_threads=posix
6570         fi
6571 fi
6572
6573                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6574 if test "$ol_link_threads" = no ; then
6575         # try -pthreads
6576         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6577 echo "configure:6578: checking for pthread link with -pthreads" >&5
6578 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6579   echo $ac_n "(cached) $ac_c" 1>&6
6580 else
6581   
6582                 # save the flags
6583                 ol_LIBS="$LIBS"
6584                 LIBS="-pthreads $LIBS"
6585
6586                 if test "$cross_compiling" = yes; then
6587   cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590 /* pthread test headers */
6591 #include <pthread.h>
6592 #ifndef NULL
6593 #define NULL (void*)0
6594 #endif
6595
6596 static void *task(p)
6597         void *p;
6598 {
6599         return (void *) (p == NULL);
6600 }
6601
6602 int main() {
6603
6604         /* pthread test function */
6605         pthread_t t;
6606         int status;
6607
6608         /* make sure pthread_create() isn't just a stub */
6609 #if HAVE_PTHREADS_D4
6610         status = pthread_create(&t, pthread_attr_default, task, NULL);
6611 #else
6612         status = pthread_create(&t, NULL, task, NULL);
6613 #endif
6614
6615         if( status ) exit( status );
6616
6617         /* make sure pthread_detach() isn't just a stub */
6618 #if HAVE_PTHREADS_D4
6619         status = pthread_detach( &t );
6620 #else
6621         status = pthread_detach( t );
6622 #endif
6623
6624 #ifdef HAVE_LINUX_THREADS
6625         pthread_kill_other_threads_np();
6626 #endif
6627
6628         exit( status );
6629
6630 ; return 0; }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6633   rm -rf conftest*
6634   ol_cv_pthread_pthreads=yes
6635 else
6636   echo "configure: failed program was:" >&5
6637   cat conftest.$ac_ext >&5
6638   rm -rf conftest*
6639   ol_cv_pthread_pthreads=no
6640 fi
6641 rm -f conftest*
6642 else
6643   cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 /* pthread test headers */
6647 #include <pthread.h>
6648 #ifndef NULL
6649 #define NULL (void*)0
6650 #endif
6651
6652 static void *task(p)
6653         void *p;
6654 {
6655         return (void *) (p == NULL);
6656 }
6657
6658
6659 int main(argc, argv)
6660         int argc;
6661         char **argv;
6662 {
6663
6664         /* pthread test function */
6665         pthread_t t;
6666         int status;
6667
6668         /* make sure pthread_create() isn't just a stub */
6669 #if HAVE_PTHREADS_D4
6670         status = pthread_create(&t, pthread_attr_default, task, NULL);
6671 #else
6672         status = pthread_create(&t, NULL, task, NULL);
6673 #endif
6674
6675         if( status ) exit( status );
6676
6677         /* make sure pthread_detach() isn't just a stub */
6678 #if HAVE_PTHREADS_D4
6679         status = pthread_detach( &t );
6680 #else
6681         status = pthread_detach( t );
6682 #endif
6683
6684 #ifdef HAVE_LINUX_THREADS
6685         pthread_kill_other_threads_np();
6686 #endif
6687
6688         exit( status );
6689
6690 }
6691
6692 EOF
6693 if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6694 then
6695   ol_cv_pthread_pthreads=yes
6696 else
6697   echo "configure: failed program was:" >&5
6698   cat conftest.$ac_ext >&5
6699   rm -fr conftest*
6700   ol_cv_pthread_pthreads=no
6701 fi
6702 rm -fr conftest*
6703 fi
6704
6705
6706                 # restore the LIBS
6707                 LIBS="$ol_LIBS"
6708         
6709 fi
6710
6711 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6712
6713         if test $ol_cv_pthread_pthreads = yes ; then
6714                 ol_link_pthreads="-pthreads"
6715                 ol_link_threads=posix
6716         fi
6717 fi
6718
6719                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6720 if test "$ol_link_threads" = no ; then
6721         # try -mthreads
6722         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6723 echo "configure:6724: checking for pthread link with -mthreads" >&5
6724 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6725   echo $ac_n "(cached) $ac_c" 1>&6
6726 else
6727   
6728                 # save the flags
6729                 ol_LIBS="$LIBS"
6730                 LIBS="-mthreads $LIBS"
6731
6732                 if test "$cross_compiling" = yes; then
6733   cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736 /* pthread test headers */
6737 #include <pthread.h>
6738 #ifndef NULL
6739 #define NULL (void*)0
6740 #endif
6741
6742 static void *task(p)
6743         void *p;
6744 {
6745         return (void *) (p == NULL);
6746 }
6747
6748 int main() {
6749
6750         /* pthread test function */
6751         pthread_t t;
6752         int status;
6753
6754         /* make sure pthread_create() isn't just a stub */
6755 #if HAVE_PTHREADS_D4
6756         status = pthread_create(&t, pthread_attr_default, task, NULL);
6757 #else
6758         status = pthread_create(&t, NULL, task, NULL);
6759 #endif
6760
6761         if( status ) exit( status );
6762
6763         /* make sure pthread_detach() isn't just a stub */
6764 #if HAVE_PTHREADS_D4
6765         status = pthread_detach( &t );
6766 #else
6767         status = pthread_detach( t );
6768 #endif
6769
6770 #ifdef HAVE_LINUX_THREADS
6771         pthread_kill_other_threads_np();
6772 #endif
6773
6774         exit( status );
6775
6776 ; return 0; }
6777 EOF
6778 if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6779   rm -rf conftest*
6780   ol_cv_pthread_mthreads=yes
6781 else
6782   echo "configure: failed program was:" >&5
6783   cat conftest.$ac_ext >&5
6784   rm -rf conftest*
6785   ol_cv_pthread_mthreads=no
6786 fi
6787 rm -f conftest*
6788 else
6789   cat > conftest.$ac_ext <<EOF
6790 #line 6791 "configure"
6791 #include "confdefs.h"
6792 /* pthread test headers */
6793 #include <pthread.h>
6794 #ifndef NULL
6795 #define NULL (void*)0
6796 #endif
6797
6798 static void *task(p)
6799         void *p;
6800 {
6801         return (void *) (p == NULL);
6802 }
6803
6804
6805 int main(argc, argv)
6806         int argc;
6807         char **argv;
6808 {
6809
6810         /* pthread test function */
6811         pthread_t t;
6812         int status;
6813
6814         /* make sure pthread_create() isn't just a stub */
6815 #if HAVE_PTHREADS_D4
6816         status = pthread_create(&t, pthread_attr_default, task, NULL);
6817 #else
6818         status = pthread_create(&t, NULL, task, NULL);
6819 #endif
6820
6821         if( status ) exit( status );
6822
6823         /* make sure pthread_detach() isn't just a stub */
6824 #if HAVE_PTHREADS_D4
6825         status = pthread_detach( &t );
6826 #else
6827         status = pthread_detach( t );
6828 #endif
6829
6830 #ifdef HAVE_LINUX_THREADS
6831         pthread_kill_other_threads_np();
6832 #endif
6833
6834         exit( status );
6835
6836 }
6837
6838 EOF
6839 if { (eval echo configure:6840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6840 then
6841   ol_cv_pthread_mthreads=yes
6842 else
6843   echo "configure: failed program was:" >&5
6844   cat conftest.$ac_ext >&5
6845   rm -fr conftest*
6846   ol_cv_pthread_mthreads=no
6847 fi
6848 rm -fr conftest*
6849 fi
6850
6851
6852                 # restore the LIBS
6853                 LIBS="$ol_LIBS"
6854         
6855 fi
6856
6857 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6858
6859         if test $ol_cv_pthread_mthreads = yes ; then
6860                 ol_link_pthreads="-mthreads"
6861                 ol_link_threads=posix
6862         fi
6863 fi
6864
6865                 # Pthread try link: -thread (ol_cv_pthread_thread)
6866 if test "$ol_link_threads" = no ; then
6867         # try -thread
6868         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6869 echo "configure:6870: checking for pthread link with -thread" >&5
6870 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6871   echo $ac_n "(cached) $ac_c" 1>&6
6872 else
6873   
6874                 # save the flags
6875                 ol_LIBS="$LIBS"
6876                 LIBS="-thread $LIBS"
6877
6878                 if test "$cross_compiling" = yes; then
6879   cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 /* pthread test headers */
6883 #include <pthread.h>
6884 #ifndef NULL
6885 #define NULL (void*)0
6886 #endif
6887
6888 static void *task(p)
6889         void *p;
6890 {
6891         return (void *) (p == NULL);
6892 }
6893
6894 int main() {
6895
6896         /* pthread test function */
6897         pthread_t t;
6898         int status;
6899
6900         /* make sure pthread_create() isn't just a stub */
6901 #if HAVE_PTHREADS_D4
6902         status = pthread_create(&t, pthread_attr_default, task, NULL);
6903 #else
6904         status = pthread_create(&t, NULL, task, NULL);
6905 #endif
6906
6907         if( status ) exit( status );
6908
6909         /* make sure pthread_detach() isn't just a stub */
6910 #if HAVE_PTHREADS_D4
6911         status = pthread_detach( &t );
6912 #else
6913         status = pthread_detach( t );
6914 #endif
6915
6916 #ifdef HAVE_LINUX_THREADS
6917         pthread_kill_other_threads_np();
6918 #endif
6919
6920         exit( status );
6921
6922 ; return 0; }
6923 EOF
6924 if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6925   rm -rf conftest*
6926   ol_cv_pthread_thread=yes
6927 else
6928   echo "configure: failed program was:" >&5
6929   cat conftest.$ac_ext >&5
6930   rm -rf conftest*
6931   ol_cv_pthread_thread=no
6932 fi
6933 rm -f conftest*
6934 else
6935   cat > conftest.$ac_ext <<EOF
6936 #line 6937 "configure"
6937 #include "confdefs.h"
6938 /* pthread test headers */
6939 #include <pthread.h>
6940 #ifndef NULL
6941 #define NULL (void*)0
6942 #endif
6943
6944 static void *task(p)
6945         void *p;
6946 {
6947         return (void *) (p == NULL);
6948 }
6949
6950
6951 int main(argc, argv)
6952         int argc;
6953         char **argv;
6954 {
6955
6956         /* pthread test function */
6957         pthread_t t;
6958         int status;
6959
6960         /* make sure pthread_create() isn't just a stub */
6961 #if HAVE_PTHREADS_D4
6962         status = pthread_create(&t, pthread_attr_default, task, NULL);
6963 #else
6964         status = pthread_create(&t, NULL, task, NULL);
6965 #endif
6966
6967         if( status ) exit( status );
6968
6969         /* make sure pthread_detach() isn't just a stub */
6970 #if HAVE_PTHREADS_D4
6971         status = pthread_detach( &t );
6972 #else
6973         status = pthread_detach( t );
6974 #endif
6975
6976 #ifdef HAVE_LINUX_THREADS
6977         pthread_kill_other_threads_np();
6978 #endif
6979
6980         exit( status );
6981
6982 }
6983
6984 EOF
6985 if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6986 then
6987   ol_cv_pthread_thread=yes
6988 else
6989   echo "configure: failed program was:" >&5
6990   cat conftest.$ac_ext >&5
6991   rm -fr conftest*
6992   ol_cv_pthread_thread=no
6993 fi
6994 rm -fr conftest*
6995 fi
6996
6997
6998                 # restore the LIBS
6999                 LIBS="$ol_LIBS"
7000         
7001 fi
7002
7003 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7004
7005         if test $ol_cv_pthread_thread = yes ; then
7006                 ol_link_pthreads="-thread"
7007                 ol_link_threads=posix
7008         fi
7009 fi
7010
7011
7012                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7013 if test "$ol_link_threads" = no ; then
7014         # try -lpthread -lmach -lexc -lc_r
7015         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7016 echo "configure:7017: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7017 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7018   echo $ac_n "(cached) $ac_c" 1>&6
7019 else
7020   
7021                 # save the flags
7022                 ol_LIBS="$LIBS"
7023                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7024
7025                 if test "$cross_compiling" = yes; then
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 /* pthread test headers */
7030 #include <pthread.h>
7031 #ifndef NULL
7032 #define NULL (void*)0
7033 #endif
7034
7035 static void *task(p)
7036         void *p;
7037 {
7038         return (void *) (p == NULL);
7039 }
7040
7041 int main() {
7042
7043         /* pthread test function */
7044         pthread_t t;
7045         int status;
7046
7047         /* make sure pthread_create() isn't just a stub */
7048 #if HAVE_PTHREADS_D4
7049         status = pthread_create(&t, pthread_attr_default, task, NULL);
7050 #else
7051         status = pthread_create(&t, NULL, task, NULL);
7052 #endif
7053
7054         if( status ) exit( status );
7055
7056         /* make sure pthread_detach() isn't just a stub */
7057 #if HAVE_PTHREADS_D4
7058         status = pthread_detach( &t );
7059 #else
7060         status = pthread_detach( t );
7061 #endif
7062
7063 #ifdef HAVE_LINUX_THREADS
7064         pthread_kill_other_threads_np();
7065 #endif
7066
7067         exit( status );
7068
7069 ; return 0; }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7072   rm -rf conftest*
7073   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -rf conftest*
7078   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7079 fi
7080 rm -f conftest*
7081 else
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 /* pthread test headers */
7086 #include <pthread.h>
7087 #ifndef NULL
7088 #define NULL (void*)0
7089 #endif
7090
7091 static void *task(p)
7092         void *p;
7093 {
7094         return (void *) (p == NULL);
7095 }
7096
7097
7098 int main(argc, argv)
7099         int argc;
7100         char **argv;
7101 {
7102
7103         /* pthread test function */
7104         pthread_t t;
7105         int status;
7106
7107         /* make sure pthread_create() isn't just a stub */
7108 #if HAVE_PTHREADS_D4
7109         status = pthread_create(&t, pthread_attr_default, task, NULL);
7110 #else
7111         status = pthread_create(&t, NULL, task, NULL);
7112 #endif
7113
7114         if( status ) exit( status );
7115
7116         /* make sure pthread_detach() isn't just a stub */
7117 #if HAVE_PTHREADS_D4
7118         status = pthread_detach( &t );
7119 #else
7120         status = pthread_detach( t );
7121 #endif
7122
7123 #ifdef HAVE_LINUX_THREADS
7124         pthread_kill_other_threads_np();
7125 #endif
7126
7127         exit( status );
7128
7129 }
7130
7131 EOF
7132 if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7133 then
7134   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7135 else
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138   rm -fr conftest*
7139   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7140 fi
7141 rm -fr conftest*
7142 fi
7143
7144
7145                 # restore the LIBS
7146                 LIBS="$ol_LIBS"
7147         
7148 fi
7149
7150 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7151
7152         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7153                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7154                 ol_link_threads=posix
7155         fi
7156 fi
7157
7158                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7159 if test "$ol_link_threads" = no ; then
7160         # try -lpthread -lmach -lexc
7161         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7162 echo "configure:7163: checking for pthread link with -lpthread -lmach -lexc" >&5
7163 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7164   echo $ac_n "(cached) $ac_c" 1>&6
7165 else
7166   
7167                 # save the flags
7168                 ol_LIBS="$LIBS"
7169                 LIBS="-lpthread -lmach -lexc $LIBS"
7170
7171                 if test "$cross_compiling" = yes; then
7172   cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7175 /* pthread test headers */
7176 #include <pthread.h>
7177 #ifndef NULL
7178 #define NULL (void*)0
7179 #endif
7180
7181 static void *task(p)
7182         void *p;
7183 {
7184         return (void *) (p == NULL);
7185 }
7186
7187 int main() {
7188
7189         /* pthread test function */
7190         pthread_t t;
7191         int status;
7192
7193         /* make sure pthread_create() isn't just a stub */
7194 #if HAVE_PTHREADS_D4
7195         status = pthread_create(&t, pthread_attr_default, task, NULL);
7196 #else
7197         status = pthread_create(&t, NULL, task, NULL);
7198 #endif
7199
7200         if( status ) exit( status );
7201
7202         /* make sure pthread_detach() isn't just a stub */
7203 #if HAVE_PTHREADS_D4
7204         status = pthread_detach( &t );
7205 #else
7206         status = pthread_detach( t );
7207 #endif
7208
7209 #ifdef HAVE_LINUX_THREADS
7210         pthread_kill_other_threads_np();
7211 #endif
7212
7213         exit( status );
7214
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7218   rm -rf conftest*
7219   ol_cv_pthread_lpthread_lmach_lexc=yes
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   ol_cv_pthread_lpthread_lmach_lexc=no
7225 fi
7226 rm -f conftest*
7227 else
7228   cat > conftest.$ac_ext <<EOF
7229 #line 7230 "configure"
7230 #include "confdefs.h"
7231 /* pthread test headers */
7232 #include <pthread.h>
7233 #ifndef NULL
7234 #define NULL (void*)0
7235 #endif
7236
7237 static void *task(p)
7238         void *p;
7239 {
7240         return (void *) (p == NULL);
7241 }
7242
7243
7244 int main(argc, argv)
7245         int argc;
7246         char **argv;
7247 {
7248
7249         /* pthread test function */
7250         pthread_t t;
7251         int status;
7252
7253         /* make sure pthread_create() isn't just a stub */
7254 #if HAVE_PTHREADS_D4
7255         status = pthread_create(&t, pthread_attr_default, task, NULL);
7256 #else
7257         status = pthread_create(&t, NULL, task, NULL);
7258 #endif
7259
7260         if( status ) exit( status );
7261
7262         /* make sure pthread_detach() isn't just a stub */
7263 #if HAVE_PTHREADS_D4
7264         status = pthread_detach( &t );
7265 #else
7266         status = pthread_detach( t );
7267 #endif
7268
7269 #ifdef HAVE_LINUX_THREADS
7270         pthread_kill_other_threads_np();
7271 #endif
7272
7273         exit( status );
7274
7275 }
7276
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7279 then
7280   ol_cv_pthread_lpthread_lmach_lexc=yes
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -fr conftest*
7285   ol_cv_pthread_lpthread_lmach_lexc=no
7286 fi
7287 rm -fr conftest*
7288 fi
7289
7290
7291                 # restore the LIBS
7292                 LIBS="$ol_LIBS"
7293         
7294 fi
7295
7296 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7297
7298         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7299                 ol_link_pthreads="-lpthread -lmach -lexc"
7300                 ol_link_threads=posix
7301         fi
7302 fi
7303
7304
7305                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7306 if test "$ol_link_threads" = no ; then
7307         # try -lpthread -Wl,-woff,85
7308         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7309 echo "configure:7310: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7310 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7311   echo $ac_n "(cached) $ac_c" 1>&6
7312 else
7313   
7314                 # save the flags
7315                 ol_LIBS="$LIBS"
7316                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7317
7318                 if test "$cross_compiling" = yes; then
7319   cat > conftest.$ac_ext <<EOF
7320 #line 7321 "configure"
7321 #include "confdefs.h"
7322 /* pthread test headers */
7323 #include <pthread.h>
7324 #ifndef NULL
7325 #define NULL (void*)0
7326 #endif
7327
7328 static void *task(p)
7329         void *p;
7330 {
7331         return (void *) (p == NULL);
7332 }
7333
7334 int main() {
7335
7336         /* pthread test function */
7337         pthread_t t;
7338         int status;
7339
7340         /* make sure pthread_create() isn't just a stub */
7341 #if HAVE_PTHREADS_D4
7342         status = pthread_create(&t, pthread_attr_default, task, NULL);
7343 #else
7344         status = pthread_create(&t, NULL, task, NULL);
7345 #endif
7346
7347         if( status ) exit( status );
7348
7349         /* make sure pthread_detach() isn't just a stub */
7350 #if HAVE_PTHREADS_D4
7351         status = pthread_detach( &t );
7352 #else
7353         status = pthread_detach( t );
7354 #endif
7355
7356 #ifdef HAVE_LINUX_THREADS
7357         pthread_kill_other_threads_np();
7358 #endif
7359
7360         exit( status );
7361
7362 ; return 0; }
7363 EOF
7364 if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7365   rm -rf conftest*
7366   ol_cv_pthread_lib_lpthread_woff=yes
7367 else
7368   echo "configure: failed program was:" >&5
7369   cat conftest.$ac_ext >&5
7370   rm -rf conftest*
7371   ol_cv_pthread_lib_lpthread_woff=no
7372 fi
7373 rm -f conftest*
7374 else
7375   cat > conftest.$ac_ext <<EOF
7376 #line 7377 "configure"
7377 #include "confdefs.h"
7378 /* pthread test headers */
7379 #include <pthread.h>
7380 #ifndef NULL
7381 #define NULL (void*)0
7382 #endif
7383
7384 static void *task(p)
7385         void *p;
7386 {
7387         return (void *) (p == NULL);
7388 }
7389
7390
7391 int main(argc, argv)
7392         int argc;
7393         char **argv;
7394 {
7395
7396         /* pthread test function */
7397         pthread_t t;
7398         int status;
7399
7400         /* make sure pthread_create() isn't just a stub */
7401 #if HAVE_PTHREADS_D4
7402         status = pthread_create(&t, pthread_attr_default, task, NULL);
7403 #else
7404         status = pthread_create(&t, NULL, task, NULL);
7405 #endif
7406
7407         if( status ) exit( status );
7408
7409         /* make sure pthread_detach() isn't just a stub */
7410 #if HAVE_PTHREADS_D4
7411         status = pthread_detach( &t );
7412 #else
7413         status = pthread_detach( t );
7414 #endif
7415
7416 #ifdef HAVE_LINUX_THREADS
7417         pthread_kill_other_threads_np();
7418 #endif
7419
7420         exit( status );
7421
7422 }
7423
7424 EOF
7425 if { (eval echo configure:7426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7426 then
7427   ol_cv_pthread_lib_lpthread_woff=yes
7428 else
7429   echo "configure: failed program was:" >&5
7430   cat conftest.$ac_ext >&5
7431   rm -fr conftest*
7432   ol_cv_pthread_lib_lpthread_woff=no
7433 fi
7434 rm -fr conftest*
7435 fi
7436
7437
7438                 # restore the LIBS
7439                 LIBS="$ol_LIBS"
7440         
7441 fi
7442
7443 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7444
7445         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7446                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7447                 ol_link_threads=posix
7448         fi
7449 fi
7450
7451
7452                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7453 if test "$ol_link_threads" = no ; then
7454         # try -lpthread
7455         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7456 echo "configure:7457: checking for pthread link with -lpthread" >&5
7457 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7458   echo $ac_n "(cached) $ac_c" 1>&6
7459 else
7460   
7461                 # save the flags
7462                 ol_LIBS="$LIBS"
7463                 LIBS="-lpthread $LIBS"
7464
7465                 if test "$cross_compiling" = yes; then
7466   cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 /* pthread test headers */
7470 #include <pthread.h>
7471 #ifndef NULL
7472 #define NULL (void*)0
7473 #endif
7474
7475 static void *task(p)
7476         void *p;
7477 {
7478         return (void *) (p == NULL);
7479 }
7480
7481 int main() {
7482
7483         /* pthread test function */
7484         pthread_t t;
7485         int status;
7486
7487         /* make sure pthread_create() isn't just a stub */
7488 #if HAVE_PTHREADS_D4
7489         status = pthread_create(&t, pthread_attr_default, task, NULL);
7490 #else
7491         status = pthread_create(&t, NULL, task, NULL);
7492 #endif
7493
7494         if( status ) exit( status );
7495
7496         /* make sure pthread_detach() isn't just a stub */
7497 #if HAVE_PTHREADS_D4
7498         status = pthread_detach( &t );
7499 #else
7500         status = pthread_detach( t );
7501 #endif
7502
7503 #ifdef HAVE_LINUX_THREADS
7504         pthread_kill_other_threads_np();
7505 #endif
7506
7507         exit( status );
7508
7509 ; return 0; }
7510 EOF
7511 if { (eval echo configure:7512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7512   rm -rf conftest*
7513   ol_cv_pthread_lpthread=yes
7514 else
7515   echo "configure: failed program was:" >&5
7516   cat conftest.$ac_ext >&5
7517   rm -rf conftest*
7518   ol_cv_pthread_lpthread=no
7519 fi
7520 rm -f conftest*
7521 else
7522   cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525 /* pthread test headers */
7526 #include <pthread.h>
7527 #ifndef NULL
7528 #define NULL (void*)0
7529 #endif
7530
7531 static void *task(p)
7532         void *p;
7533 {
7534         return (void *) (p == NULL);
7535 }
7536
7537
7538 int main(argc, argv)
7539         int argc;
7540         char **argv;
7541 {
7542
7543         /* pthread test function */
7544         pthread_t t;
7545         int status;
7546
7547         /* make sure pthread_create() isn't just a stub */
7548 #if HAVE_PTHREADS_D4
7549         status = pthread_create(&t, pthread_attr_default, task, NULL);
7550 #else
7551         status = pthread_create(&t, NULL, task, NULL);
7552 #endif
7553
7554         if( status ) exit( status );
7555
7556         /* make sure pthread_detach() isn't just a stub */
7557 #if HAVE_PTHREADS_D4
7558         status = pthread_detach( &t );
7559 #else
7560         status = pthread_detach( t );
7561 #endif
7562
7563 #ifdef HAVE_LINUX_THREADS
7564         pthread_kill_other_threads_np();
7565 #endif
7566
7567         exit( status );
7568
7569 }
7570
7571 EOF
7572 if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7573 then
7574   ol_cv_pthread_lpthread=yes
7575 else
7576   echo "configure: failed program was:" >&5
7577   cat conftest.$ac_ext >&5
7578   rm -fr conftest*
7579   ol_cv_pthread_lpthread=no
7580 fi
7581 rm -fr conftest*
7582 fi
7583
7584
7585                 # restore the LIBS
7586                 LIBS="$ol_LIBS"
7587         
7588 fi
7589
7590 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7591
7592         if test $ol_cv_pthread_lpthread = yes ; then
7593                 ol_link_pthreads="-lpthread"
7594                 ol_link_threads=posix
7595         fi
7596 fi
7597
7598                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7599 if test "$ol_link_threads" = no ; then
7600         # try -lc_r
7601         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7602 echo "configure:7603: checking for pthread link with -lc_r" >&5
7603 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7604   echo $ac_n "(cached) $ac_c" 1>&6
7605 else
7606   
7607                 # save the flags
7608                 ol_LIBS="$LIBS"
7609                 LIBS="-lc_r $LIBS"
7610
7611                 if test "$cross_compiling" = yes; then
7612   cat > conftest.$ac_ext <<EOF
7613 #line 7614 "configure"
7614 #include "confdefs.h"
7615 /* pthread test headers */
7616 #include <pthread.h>
7617 #ifndef NULL
7618 #define NULL (void*)0
7619 #endif
7620
7621 static void *task(p)
7622         void *p;
7623 {
7624         return (void *) (p == NULL);
7625 }
7626
7627 int main() {
7628
7629         /* pthread test function */
7630         pthread_t t;
7631         int status;
7632
7633         /* make sure pthread_create() isn't just a stub */
7634 #if HAVE_PTHREADS_D4
7635         status = pthread_create(&t, pthread_attr_default, task, NULL);
7636 #else
7637         status = pthread_create(&t, NULL, task, NULL);
7638 #endif
7639
7640         if( status ) exit( status );
7641
7642         /* make sure pthread_detach() isn't just a stub */
7643 #if HAVE_PTHREADS_D4
7644         status = pthread_detach( &t );
7645 #else
7646         status = pthread_detach( t );
7647 #endif
7648
7649 #ifdef HAVE_LINUX_THREADS
7650         pthread_kill_other_threads_np();
7651 #endif
7652
7653         exit( status );
7654
7655 ; return 0; }
7656 EOF
7657 if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7658   rm -rf conftest*
7659   ol_cv_pthread_lc_r=yes
7660 else
7661   echo "configure: failed program was:" >&5
7662   cat conftest.$ac_ext >&5
7663   rm -rf conftest*
7664   ol_cv_pthread_lc_r=no
7665 fi
7666 rm -f conftest*
7667 else
7668   cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 /* pthread test headers */
7672 #include <pthread.h>
7673 #ifndef NULL
7674 #define NULL (void*)0
7675 #endif
7676
7677 static void *task(p)
7678         void *p;
7679 {
7680         return (void *) (p == NULL);
7681 }
7682
7683
7684 int main(argc, argv)
7685         int argc;
7686         char **argv;
7687 {
7688
7689         /* pthread test function */
7690         pthread_t t;
7691         int status;
7692
7693         /* make sure pthread_create() isn't just a stub */
7694 #if HAVE_PTHREADS_D4
7695         status = pthread_create(&t, pthread_attr_default, task, NULL);
7696 #else
7697         status = pthread_create(&t, NULL, task, NULL);
7698 #endif
7699
7700         if( status ) exit( status );
7701
7702         /* make sure pthread_detach() isn't just a stub */
7703 #if HAVE_PTHREADS_D4
7704         status = pthread_detach( &t );
7705 #else
7706         status = pthread_detach( t );
7707 #endif
7708
7709 #ifdef HAVE_LINUX_THREADS
7710         pthread_kill_other_threads_np();
7711 #endif
7712
7713         exit( status );
7714
7715 }
7716
7717 EOF
7718 if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7719 then
7720   ol_cv_pthread_lc_r=yes
7721 else
7722   echo "configure: failed program was:" >&5
7723   cat conftest.$ac_ext >&5
7724   rm -fr conftest*
7725   ol_cv_pthread_lc_r=no
7726 fi
7727 rm -fr conftest*
7728 fi
7729
7730
7731                 # restore the LIBS
7732                 LIBS="$ol_LIBS"
7733         
7734 fi
7735
7736 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
7737
7738         if test $ol_cv_pthread_lc_r = yes ; then
7739                 ol_link_pthreads="-lc_r"
7740                 ol_link_threads=posix
7741         fi
7742 fi
7743
7744
7745                 # Pthread try link: -threads (ol_cv_pthread_threads)
7746 if test "$ol_link_threads" = no ; then
7747         # try -threads
7748         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
7749 echo "configure:7750: checking for pthread link with -threads" >&5
7750 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
7751   echo $ac_n "(cached) $ac_c" 1>&6
7752 else
7753   
7754                 # save the flags
7755                 ol_LIBS="$LIBS"
7756                 LIBS="-threads $LIBS"
7757
7758                 if test "$cross_compiling" = yes; then
7759   cat > conftest.$ac_ext <<EOF
7760 #line 7761 "configure"
7761 #include "confdefs.h"
7762 /* pthread test headers */
7763 #include <pthread.h>
7764 #ifndef NULL
7765 #define NULL (void*)0
7766 #endif
7767
7768 static void *task(p)
7769         void *p;
7770 {
7771         return (void *) (p == NULL);
7772 }
7773
7774 int main() {
7775
7776         /* pthread test function */
7777         pthread_t t;
7778         int status;
7779
7780         /* make sure pthread_create() isn't just a stub */
7781 #if HAVE_PTHREADS_D4
7782         status = pthread_create(&t, pthread_attr_default, task, NULL);
7783 #else
7784         status = pthread_create(&t, NULL, task, NULL);
7785 #endif
7786
7787         if( status ) exit( status );
7788
7789         /* make sure pthread_detach() isn't just a stub */
7790 #if HAVE_PTHREADS_D4
7791         status = pthread_detach( &t );
7792 #else
7793         status = pthread_detach( t );
7794 #endif
7795
7796 #ifdef HAVE_LINUX_THREADS
7797         pthread_kill_other_threads_np();
7798 #endif
7799
7800         exit( status );
7801
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7805   rm -rf conftest*
7806   ol_cv_pthread_threads=yes
7807 else
7808   echo "configure: failed program was:" >&5
7809   cat conftest.$ac_ext >&5
7810   rm -rf conftest*
7811   ol_cv_pthread_threads=no
7812 fi
7813 rm -f conftest*
7814 else
7815   cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 /* pthread test headers */
7819 #include <pthread.h>
7820 #ifndef NULL
7821 #define NULL (void*)0
7822 #endif
7823
7824 static void *task(p)
7825         void *p;
7826 {
7827         return (void *) (p == NULL);
7828 }
7829
7830
7831 int main(argc, argv)
7832         int argc;
7833         char **argv;
7834 {
7835
7836         /* pthread test function */
7837         pthread_t t;
7838         int status;
7839
7840         /* make sure pthread_create() isn't just a stub */
7841 #if HAVE_PTHREADS_D4
7842         status = pthread_create(&t, pthread_attr_default, task, NULL);
7843 #else
7844         status = pthread_create(&t, NULL, task, NULL);
7845 #endif
7846
7847         if( status ) exit( status );
7848
7849         /* make sure pthread_detach() isn't just a stub */
7850 #if HAVE_PTHREADS_D4
7851         status = pthread_detach( &t );
7852 #else
7853         status = pthread_detach( t );
7854 #endif
7855
7856 #ifdef HAVE_LINUX_THREADS
7857         pthread_kill_other_threads_np();
7858 #endif
7859
7860         exit( status );
7861
7862 }
7863
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7866 then
7867   ol_cv_pthread_threads=yes
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -fr conftest*
7872   ol_cv_pthread_threads=no
7873 fi
7874 rm -fr conftest*
7875 fi
7876
7877
7878                 # restore the LIBS
7879                 LIBS="$ol_LIBS"
7880         
7881 fi
7882
7883 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7884
7885         if test $ol_cv_pthread_threads = yes ; then
7886                 ol_link_pthreads="-threads"
7887                 ol_link_threads=posix
7888         fi
7889 fi
7890
7891
7892                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7893 if test "$ol_link_threads" = no ; then
7894         # try -lpthreads -lmach -lexc -lc_r
7895         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7896 echo "configure:7897: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7897 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
7898   echo $ac_n "(cached) $ac_c" 1>&6
7899 else
7900   
7901                 # save the flags
7902                 ol_LIBS="$LIBS"
7903                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7904
7905                 if test "$cross_compiling" = yes; then
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 /* pthread test headers */
7910 #include <pthread.h>
7911 #ifndef NULL
7912 #define NULL (void*)0
7913 #endif
7914
7915 static void *task(p)
7916         void *p;
7917 {
7918         return (void *) (p == NULL);
7919 }
7920
7921 int main() {
7922
7923         /* pthread test function */
7924         pthread_t t;
7925         int status;
7926
7927         /* make sure pthread_create() isn't just a stub */
7928 #if HAVE_PTHREADS_D4
7929         status = pthread_create(&t, pthread_attr_default, task, NULL);
7930 #else
7931         status = pthread_create(&t, NULL, task, NULL);
7932 #endif
7933
7934         if( status ) exit( status );
7935
7936         /* make sure pthread_detach() isn't just a stub */
7937 #if HAVE_PTHREADS_D4
7938         status = pthread_detach( &t );
7939 #else
7940         status = pthread_detach( t );
7941 #endif
7942
7943 #ifdef HAVE_LINUX_THREADS
7944         pthread_kill_other_threads_np();
7945 #endif
7946
7947         exit( status );
7948
7949 ; return 0; }
7950 EOF
7951 if { (eval echo configure:7952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7952   rm -rf conftest*
7953   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7954 else
7955   echo "configure: failed program was:" >&5
7956   cat conftest.$ac_ext >&5
7957   rm -rf conftest*
7958   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7959 fi
7960 rm -f conftest*
7961 else
7962   cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965 /* pthread test headers */
7966 #include <pthread.h>
7967 #ifndef NULL
7968 #define NULL (void*)0
7969 #endif
7970
7971 static void *task(p)
7972         void *p;
7973 {
7974         return (void *) (p == NULL);
7975 }
7976
7977
7978 int main(argc, argv)
7979         int argc;
7980         char **argv;
7981 {
7982
7983         /* pthread test function */
7984         pthread_t t;
7985         int status;
7986
7987         /* make sure pthread_create() isn't just a stub */
7988 #if HAVE_PTHREADS_D4
7989         status = pthread_create(&t, pthread_attr_default, task, NULL);
7990 #else
7991         status = pthread_create(&t, NULL, task, NULL);
7992 #endif
7993
7994         if( status ) exit( status );
7995
7996         /* make sure pthread_detach() isn't just a stub */
7997 #if HAVE_PTHREADS_D4
7998         status = pthread_detach( &t );
7999 #else
8000         status = pthread_detach( t );
8001 #endif
8002
8003 #ifdef HAVE_LINUX_THREADS
8004         pthread_kill_other_threads_np();
8005 #endif
8006
8007         exit( status );
8008
8009 }
8010
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8013 then
8014   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -fr conftest*
8019   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8020 fi
8021 rm -fr conftest*
8022 fi
8023
8024
8025                 # restore the LIBS
8026                 LIBS="$ol_LIBS"
8027         
8028 fi
8029
8030 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8031
8032         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8033                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8034                 ol_link_threads=posix
8035         fi
8036 fi
8037
8038                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8039 if test "$ol_link_threads" = no ; then
8040         # try -lpthreads -lmach -lexc
8041         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8042 echo "configure:8043: checking for pthread link with -lpthreads -lmach -lexc" >&5
8043 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   
8047                 # save the flags
8048                 ol_LIBS="$LIBS"
8049                 LIBS="-lpthreads -lmach -lexc $LIBS"
8050
8051                 if test "$cross_compiling" = yes; then
8052   cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 /* pthread test headers */
8056 #include <pthread.h>
8057 #ifndef NULL
8058 #define NULL (void*)0
8059 #endif
8060
8061 static void *task(p)
8062         void *p;
8063 {
8064         return (void *) (p == NULL);
8065 }
8066
8067 int main() {
8068
8069         /* pthread test function */
8070         pthread_t t;
8071         int status;
8072
8073         /* make sure pthread_create() isn't just a stub */
8074 #if HAVE_PTHREADS_D4
8075         status = pthread_create(&t, pthread_attr_default, task, NULL);
8076 #else
8077         status = pthread_create(&t, NULL, task, NULL);
8078 #endif
8079
8080         if( status ) exit( status );
8081
8082         /* make sure pthread_detach() isn't just a stub */
8083 #if HAVE_PTHREADS_D4
8084         status = pthread_detach( &t );
8085 #else
8086         status = pthread_detach( t );
8087 #endif
8088
8089 #ifdef HAVE_LINUX_THREADS
8090         pthread_kill_other_threads_np();
8091 #endif
8092
8093         exit( status );
8094
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8098   rm -rf conftest*
8099   ol_cv_pthread_lpthreads_lmach_lexc=yes
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103   rm -rf conftest*
8104   ol_cv_pthread_lpthreads_lmach_lexc=no
8105 fi
8106 rm -f conftest*
8107 else
8108   cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111 /* pthread test headers */
8112 #include <pthread.h>
8113 #ifndef NULL
8114 #define NULL (void*)0
8115 #endif
8116
8117 static void *task(p)
8118         void *p;
8119 {
8120         return (void *) (p == NULL);
8121 }
8122
8123
8124 int main(argc, argv)
8125         int argc;
8126         char **argv;
8127 {
8128
8129         /* pthread test function */
8130         pthread_t t;
8131         int status;
8132
8133         /* make sure pthread_create() isn't just a stub */
8134 #if HAVE_PTHREADS_D4
8135         status = pthread_create(&t, pthread_attr_default, task, NULL);
8136 #else
8137         status = pthread_create(&t, NULL, task, NULL);
8138 #endif
8139
8140         if( status ) exit( status );
8141
8142         /* make sure pthread_detach() isn't just a stub */
8143 #if HAVE_PTHREADS_D4
8144         status = pthread_detach( &t );
8145 #else
8146         status = pthread_detach( t );
8147 #endif
8148
8149 #ifdef HAVE_LINUX_THREADS
8150         pthread_kill_other_threads_np();
8151 #endif
8152
8153         exit( status );
8154
8155 }
8156
8157 EOF
8158 if { (eval echo configure:8159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8159 then
8160   ol_cv_pthread_lpthreads_lmach_lexc=yes
8161 else
8162   echo "configure: failed program was:" >&5
8163   cat conftest.$ac_ext >&5
8164   rm -fr conftest*
8165   ol_cv_pthread_lpthreads_lmach_lexc=no
8166 fi
8167 rm -fr conftest*
8168 fi
8169
8170
8171                 # restore the LIBS
8172                 LIBS="$ol_LIBS"
8173         
8174 fi
8175
8176 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8177
8178         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8179                 ol_link_pthreads="-lpthreads -lmach -lexc"
8180                 ol_link_threads=posix
8181         fi
8182 fi
8183
8184                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8185 if test "$ol_link_threads" = no ; then
8186         # try -lpthreads -lexc
8187         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8188 echo "configure:8189: checking for pthread link with -lpthreads -lexc" >&5
8189 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8190   echo $ac_n "(cached) $ac_c" 1>&6
8191 else
8192   
8193                 # save the flags
8194                 ol_LIBS="$LIBS"
8195                 LIBS="-lpthreads -lexc $LIBS"
8196
8197                 if test "$cross_compiling" = yes; then
8198   cat > conftest.$ac_ext <<EOF
8199 #line 8200 "configure"
8200 #include "confdefs.h"
8201 /* pthread test headers */
8202 #include <pthread.h>
8203 #ifndef NULL
8204 #define NULL (void*)0
8205 #endif
8206
8207 static void *task(p)
8208         void *p;
8209 {
8210         return (void *) (p == NULL);
8211 }
8212
8213 int main() {
8214
8215         /* pthread test function */
8216         pthread_t t;
8217         int status;
8218
8219         /* make sure pthread_create() isn't just a stub */
8220 #if HAVE_PTHREADS_D4
8221         status = pthread_create(&t, pthread_attr_default, task, NULL);
8222 #else
8223         status = pthread_create(&t, NULL, task, NULL);
8224 #endif
8225
8226         if( status ) exit( status );
8227
8228         /* make sure pthread_detach() isn't just a stub */
8229 #if HAVE_PTHREADS_D4
8230         status = pthread_detach( &t );
8231 #else
8232         status = pthread_detach( t );
8233 #endif
8234
8235 #ifdef HAVE_LINUX_THREADS
8236         pthread_kill_other_threads_np();
8237 #endif
8238
8239         exit( status );
8240
8241 ; return 0; }
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8244   rm -rf conftest*
8245   ol_cv_pthread_lpthreads_lexc=yes
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -rf conftest*
8250   ol_cv_pthread_lpthreads_lexc=no
8251 fi
8252 rm -f conftest*
8253 else
8254   cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* pthread test headers */
8258 #include <pthread.h>
8259 #ifndef NULL
8260 #define NULL (void*)0
8261 #endif
8262
8263 static void *task(p)
8264         void *p;
8265 {
8266         return (void *) (p == NULL);
8267 }
8268
8269
8270 int main(argc, argv)
8271         int argc;
8272         char **argv;
8273 {
8274
8275         /* pthread test function */
8276         pthread_t t;
8277         int status;
8278
8279         /* make sure pthread_create() isn't just a stub */
8280 #if HAVE_PTHREADS_D4
8281         status = pthread_create(&t, pthread_attr_default, task, NULL);
8282 #else
8283         status = pthread_create(&t, NULL, task, NULL);
8284 #endif
8285
8286         if( status ) exit( status );
8287
8288         /* make sure pthread_detach() isn't just a stub */
8289 #if HAVE_PTHREADS_D4
8290         status = pthread_detach( &t );
8291 #else
8292         status = pthread_detach( t );
8293 #endif
8294
8295 #ifdef HAVE_LINUX_THREADS
8296         pthread_kill_other_threads_np();
8297 #endif
8298
8299         exit( status );
8300
8301 }
8302
8303 EOF
8304 if { (eval echo configure:8305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8305 then
8306   ol_cv_pthread_lpthreads_lexc=yes
8307 else
8308   echo "configure: failed program was:" >&5
8309   cat conftest.$ac_ext >&5
8310   rm -fr conftest*
8311   ol_cv_pthread_lpthreads_lexc=no
8312 fi
8313 rm -fr conftest*
8314 fi
8315
8316
8317                 # restore the LIBS
8318                 LIBS="$ol_LIBS"
8319         
8320 fi
8321
8322 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8323
8324         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8325                 ol_link_pthreads="-lpthreads -lexc"
8326                 ol_link_threads=posix
8327         fi
8328 fi
8329
8330
8331                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8332 if test "$ol_link_threads" = no ; then
8333         # try -lpthreads
8334         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8335 echo "configure:8336: checking for pthread link with -lpthreads" >&5
8336 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8337   echo $ac_n "(cached) $ac_c" 1>&6
8338 else
8339   
8340                 # save the flags
8341                 ol_LIBS="$LIBS"
8342                 LIBS="-lpthreads $LIBS"
8343
8344                 if test "$cross_compiling" = yes; then
8345   cat > conftest.$ac_ext <<EOF
8346 #line 8347 "configure"
8347 #include "confdefs.h"
8348 /* pthread test headers */
8349 #include <pthread.h>
8350 #ifndef NULL
8351 #define NULL (void*)0
8352 #endif
8353
8354 static void *task(p)
8355         void *p;
8356 {
8357         return (void *) (p == NULL);
8358 }
8359
8360 int main() {
8361
8362         /* pthread test function */
8363         pthread_t t;
8364         int status;
8365
8366         /* make sure pthread_create() isn't just a stub */
8367 #if HAVE_PTHREADS_D4
8368         status = pthread_create(&t, pthread_attr_default, task, NULL);
8369 #else
8370         status = pthread_create(&t, NULL, task, NULL);
8371 #endif
8372
8373         if( status ) exit( status );
8374
8375         /* make sure pthread_detach() isn't just a stub */
8376 #if HAVE_PTHREADS_D4
8377         status = pthread_detach( &t );
8378 #else
8379         status = pthread_detach( t );
8380 #endif
8381
8382 #ifdef HAVE_LINUX_THREADS
8383         pthread_kill_other_threads_np();
8384 #endif
8385
8386         exit( status );
8387
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8391   rm -rf conftest*
8392   ol_cv_pthread_lib_lpthreads=yes
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   ol_cv_pthread_lib_lpthreads=no
8398 fi
8399 rm -f conftest*
8400 else
8401   cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404 /* pthread test headers */
8405 #include <pthread.h>
8406 #ifndef NULL
8407 #define NULL (void*)0
8408 #endif
8409
8410 static void *task(p)
8411         void *p;
8412 {
8413         return (void *) (p == NULL);
8414 }
8415
8416
8417 int main(argc, argv)
8418         int argc;
8419         char **argv;
8420 {
8421
8422         /* pthread test function */
8423         pthread_t t;
8424         int status;
8425
8426         /* make sure pthread_create() isn't just a stub */
8427 #if HAVE_PTHREADS_D4
8428         status = pthread_create(&t, pthread_attr_default, task, NULL);
8429 #else
8430         status = pthread_create(&t, NULL, task, NULL);
8431 #endif
8432
8433         if( status ) exit( status );
8434
8435         /* make sure pthread_detach() isn't just a stub */
8436 #if HAVE_PTHREADS_D4
8437         status = pthread_detach( &t );
8438 #else
8439         status = pthread_detach( t );
8440 #endif
8441
8442 #ifdef HAVE_LINUX_THREADS
8443         pthread_kill_other_threads_np();
8444 #endif
8445
8446         exit( status );
8447
8448 }
8449
8450 EOF
8451 if { (eval echo configure:8452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8452 then
8453   ol_cv_pthread_lib_lpthreads=yes
8454 else
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -fr conftest*
8458   ol_cv_pthread_lib_lpthreads=no
8459 fi
8460 rm -fr conftest*
8461 fi
8462
8463
8464                 # restore the LIBS
8465                 LIBS="$ol_LIBS"
8466         
8467 fi
8468
8469 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8470
8471         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8472                 ol_link_pthreads="-lpthreads"
8473                 ol_link_threads=posix
8474         fi
8475 fi
8476
8477
8478                 if test $ol_link_threads != no ; then
8479                         cat >> confdefs.h <<\EOF
8480 #define HAVE_PTHREADS 1
8481 EOF
8482
8483
8484                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8485
8486                                                 save_CPPFLAGS="$CPPFLAGS"
8487                         save_LIBS="$LIBS"
8488                         LIBS="$LTHREAD_LIBS $LIBS"
8489
8490                                                                                                 for ac_func in sched_yield pthread_yield
8491 do
8492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8493 echo "configure:8494: checking for $ac_func" >&5
8494 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8495   echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497   cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* System header to define __stub macros and hopefully few prototypes,
8501     which can conflict with char $ac_func(); below.  */
8502 #include <assert.h>
8503 /* Override any gcc2 internal prototype to avoid an error.  */
8504 /* We use char because int might match the return type of a gcc2
8505     builtin and then its argument prototype would still apply.  */
8506 char $ac_func();
8507 char (*f)();
8508
8509 int main() {
8510
8511 /* The GNU C library defines this for functions which it implements
8512     to always fail with ENOSYS.  Some functions are actually named
8513     something starting with __ and the normal name is an alias.  */
8514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8515 choke me
8516 #else
8517 f = $ac_func;
8518 #endif
8519
8520 ; return 0; }
8521 EOF
8522 if { (eval echo configure:8523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8523   rm -rf conftest*
8524   eval "ac_cv_func_$ac_func=yes"
8525 else
8526   echo "configure: failed program was:" >&5
8527   cat conftest.$ac_ext >&5
8528   rm -rf conftest*
8529   eval "ac_cv_func_$ac_func=no"
8530 fi
8531 rm -f conftest*
8532 fi
8533
8534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8535   echo "$ac_t""yes" 1>&6
8536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8537   cat >> confdefs.h <<EOF
8538 #define $ac_tr_func 1
8539 EOF
8540  
8541 else
8542   echo "$ac_t""no" 1>&6
8543 fi
8544 done
8545
8546
8547                         if test $ac_cv_func_sched_yield = no -a \
8548                                 $ac_cv_func_pthread_yield = no ; then
8549                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8550 echo "configure:8551: checking for sched_yield in -lrt" >&5
8551 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8552 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8553   echo $ac_n "(cached) $ac_c" 1>&6
8554 else
8555   ac_save_LIBS="$LIBS"
8556 LIBS="-lrt  $LIBS"
8557 cat > conftest.$ac_ext <<EOF
8558 #line 8559 "configure"
8559 #include "confdefs.h"
8560 /* Override any gcc2 internal prototype to avoid an error.  */
8561 /* We use char because int might match the return type of a gcc2
8562     builtin and then its argument prototype would still apply.  */
8563 char sched_yield();
8564
8565 int main() {
8566 sched_yield()
8567 ; return 0; }
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8570   rm -rf conftest*
8571   eval "ac_cv_lib_$ac_lib_var=yes"
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -rf conftest*
8576   eval "ac_cv_lib_$ac_lib_var=no"
8577 fi
8578 rm -f conftest*
8579 LIBS="$ac_save_LIBS"
8580
8581 fi
8582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8583   echo "$ac_t""yes" 1>&6
8584   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8585                                         cat >> confdefs.h <<\EOF
8586 #define HAVE_SCHED_YIELD 1
8587 EOF
8588
8589                                         ac_cv_func_sched_yield=yes
8590 else
8591   echo "$ac_t""no" 1>&6
8592 ac_cv_func_sched_yield=no
8593 fi
8594
8595                         fi
8596                         if test $ac_cv_func_sched_yield = no -a \
8597                                 $ac_cv_func_pthread_yield = no ; then
8598                                                                                                 for ac_func in thr_yield
8599 do
8600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8601 echo "configure:8602: checking for $ac_func" >&5
8602 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8603   echo $ac_n "(cached) $ac_c" 1>&6
8604 else
8605   cat > conftest.$ac_ext <<EOF
8606 #line 8607 "configure"
8607 #include "confdefs.h"
8608 /* System header to define __stub macros and hopefully few prototypes,
8609     which can conflict with char $ac_func(); below.  */
8610 #include <assert.h>
8611 /* Override any gcc2 internal prototype to avoid an error.  */
8612 /* We use char because int might match the return type of a gcc2
8613     builtin and then its argument prototype would still apply.  */
8614 char $ac_func();
8615 char (*f)();
8616
8617 int main() {
8618
8619 /* The GNU C library defines this for functions which it implements
8620     to always fail with ENOSYS.  Some functions are actually named
8621     something starting with __ and the normal name is an alias.  */
8622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8623 choke me
8624 #else
8625 f = $ac_func;
8626 #endif
8627
8628 ; return 0; }
8629 EOF
8630 if { (eval echo configure:8631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8631   rm -rf conftest*
8632   eval "ac_cv_func_$ac_func=yes"
8633 else
8634   echo "configure: failed program was:" >&5
8635   cat conftest.$ac_ext >&5
8636   rm -rf conftest*
8637   eval "ac_cv_func_$ac_func=no"
8638 fi
8639 rm -f conftest*
8640 fi
8641
8642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8643   echo "$ac_t""yes" 1>&6
8644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8645   cat >> confdefs.h <<EOF
8646 #define $ac_tr_func 1
8647 EOF
8648  
8649 else
8650   echo "$ac_t""no" 1>&6
8651 fi
8652 done
8653
8654                         fi
8655                         if test $ac_cv_func_sched_yield = no -a \
8656                                 $ac_cv_func_pthread_yield = no -a \
8657                                 "$ac_cv_func_thr_yield" = no ; then
8658                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
8659                         fi
8660
8661                                                 for ac_func in pthread_kill
8662 do
8663 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8664 echo "configure:8665: checking for $ac_func" >&5
8665 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8666   echo $ac_n "(cached) $ac_c" 1>&6
8667 else
8668   cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 /* System header to define __stub macros and hopefully few prototypes,
8672     which can conflict with char $ac_func(); below.  */
8673 #include <assert.h>
8674 /* Override any gcc2 internal prototype to avoid an error.  */
8675 /* We use char because int might match the return type of a gcc2
8676     builtin and then its argument prototype would still apply.  */
8677 char $ac_func();
8678 char (*f)();
8679
8680 int main() {
8681
8682 /* The GNU C library defines this for functions which it implements
8683     to always fail with ENOSYS.  Some functions are actually named
8684     something starting with __ and the normal name is an alias.  */
8685 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8686 choke me
8687 #else
8688 f = $ac_func;
8689 #endif
8690
8691 ; return 0; }
8692 EOF
8693 if { (eval echo configure:8694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8694   rm -rf conftest*
8695   eval "ac_cv_func_$ac_func=yes"
8696 else
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -rf conftest*
8700   eval "ac_cv_func_$ac_func=no"
8701 fi
8702 rm -f conftest*
8703 fi
8704
8705 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8706   echo "$ac_t""yes" 1>&6
8707     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8708   cat >> confdefs.h <<EOF
8709 #define $ac_tr_func 1
8710 EOF
8711  
8712 else
8713   echo "$ac_t""no" 1>&6
8714 fi
8715 done
8716
8717
8718                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
8719 echo "configure:8720: checking for pthread_detach with <pthread.h>" >&5
8720 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
8721   echo $ac_n "(cached) $ac_c" 1>&6
8722 else
8723   
8724                                                                 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727
8728 #include <pthread.h>
8729 #ifndef NULL
8730 #define NULL (void*)0
8731 #endif
8732
8733 int main() {
8734 pthread_detach(NULL);
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8738   rm -rf conftest*
8739   ol_cv_func_pthread_detach=yes
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   ol_cv_func_pthread_detach=no
8745 fi
8746 rm -f conftest*
8747                         
8748 fi
8749
8750 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
8751
8752                         if test $ol_cv_func_pthread_detach = no ; then
8753                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
8754                         fi
8755
8756                         cat >> confdefs.h <<\EOF
8757 #define HAVE_PTHREAD_DETACH 1
8758 EOF
8759
8760
8761                                                 for ac_func in \
8762                                 pthread_setconcurrency \
8763                                 pthread_getconcurrency \
8764                                 thr_setconcurrency \
8765                                 thr_getconcurrency \
8766                         
8767 do
8768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8769 echo "configure:8770: checking for $ac_func" >&5
8770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8771   echo $ac_n "(cached) $ac_c" 1>&6
8772 else
8773   cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 /* System header to define __stub macros and hopefully few prototypes,
8777     which can conflict with char $ac_func(); below.  */
8778 #include <assert.h>
8779 /* Override any gcc2 internal prototype to avoid an error.  */
8780 /* We use char because int might match the return type of a gcc2
8781     builtin and then its argument prototype would still apply.  */
8782 char $ac_func();
8783 char (*f)();
8784
8785 int main() {
8786
8787 /* The GNU C library defines this for functions which it implements
8788     to always fail with ENOSYS.  Some functions are actually named
8789     something starting with __ and the normal name is an alias.  */
8790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8791 choke me
8792 #else
8793 f = $ac_func;
8794 #endif
8795
8796 ; return 0; }
8797 EOF
8798 if { (eval echo configure:8799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8799   rm -rf conftest*
8800   eval "ac_cv_func_$ac_func=yes"
8801 else
8802   echo "configure: failed program was:" >&5
8803   cat conftest.$ac_ext >&5
8804   rm -rf conftest*
8805   eval "ac_cv_func_$ac_func=no"
8806 fi
8807 rm -f conftest*
8808 fi
8809
8810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8811   echo "$ac_t""yes" 1>&6
8812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8813   cat >> confdefs.h <<EOF
8814 #define $ac_tr_func 1
8815 EOF
8816  
8817 else
8818   echo "$ac_t""no" 1>&6
8819 fi
8820 done
8821
8822
8823                         
8824         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
8825 echo "configure:8826: checking for pthread_kill_other_threads_np" >&5
8826 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   cat > conftest.$ac_ext <<EOF
8830 #line 8831 "configure"
8831 #include "confdefs.h"
8832 /* System header to define __stub macros and hopefully few prototypes,
8833     which can conflict with char pthread_kill_other_threads_np(); below.  */
8834 #include <assert.h>
8835 /* Override any gcc2 internal prototype to avoid an error.  */
8836 /* We use char because int might match the return type of a gcc2
8837     builtin and then its argument prototype would still apply.  */
8838 char pthread_kill_other_threads_np();
8839 char (*f)();
8840
8841 int main() {
8842
8843 /* The GNU C library defines this for functions which it implements
8844     to always fail with ENOSYS.  Some functions are actually named
8845     something starting with __ and the normal name is an alias.  */
8846 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
8847 choke me
8848 #else
8849 f = pthread_kill_other_threads_np;
8850 #endif
8851
8852 ; return 0; }
8853 EOF
8854 if { (eval echo configure:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8855   rm -rf conftest*
8856   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
8857 else
8858   echo "configure: failed program was:" >&5
8859   cat conftest.$ac_ext >&5
8860   rm -rf conftest*
8861   eval "ac_cv_func_pthread_kill_other_threads_np=no"
8862 fi
8863 rm -f conftest*
8864 fi
8865
8866 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
8867   echo "$ac_t""yes" 1>&6
8868   :
8869 else
8870   echo "$ac_t""no" 1>&6
8871 fi
8872
8873         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
8874 echo "configure:8875: checking for LinuxThreads implementation" >&5
8875 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
8876   echo $ac_n "(cached) $ac_c" 1>&6
8877 else
8878   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
8879 fi
8880
8881 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
8882
8883                         
8884         
8885         
8886         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
8887 echo "configure:8888: checking for LinuxThreads consistency" >&5
8888 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
8889   echo $ac_n "(cached) $ac_c" 1>&6
8890 else
8891   
8892                 if test $ol_cv_header_linux_threads = yes -a \
8893                         $ol_cv_sys_linux_threads = yes; then
8894                         ol_cv_linux_threads=yes
8895                 elif test $ol_cv_header_linux_threads = no -a \
8896                         $ol_cv_sys_linux_threads = no; then
8897                         ol_cv_linux_threads=no
8898                 else
8899                         ol_cv_linux_threads=error
8900                 fi
8901         
8902 fi
8903
8904 echo "$ac_t""$ol_cv_linux_threads" 1>&6
8905
8906
8907                         if test $ol_cv_linux_threads = error; then
8908                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
8909                         fi
8910
8911                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
8912 echo "configure:8913: checking if pthread_create() works" >&5
8913 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
8914   echo $ac_n "(cached) $ac_c" 1>&6
8915 else
8916   
8917                         if test "$cross_compiling" = yes; then
8918                                 ol_cv_pthread_create_works=yes
8919 else
8920   cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923 /* pthread test headers */
8924 #include <pthread.h>
8925 #ifndef NULL
8926 #define NULL (void*)0
8927 #endif
8928
8929 static void *task(p)
8930         void *p;
8931 {
8932         return (void *) (p == NULL);
8933 }
8934
8935
8936 int main(argc, argv)
8937         int argc;
8938         char **argv;
8939 {
8940
8941         /* pthread test function */
8942         pthread_t t;
8943         int status;
8944
8945         /* make sure pthread_create() isn't just a stub */
8946 #if HAVE_PTHREADS_D4
8947         status = pthread_create(&t, pthread_attr_default, task, NULL);
8948 #else
8949         status = pthread_create(&t, NULL, task, NULL);
8950 #endif
8951
8952         if( status ) exit( status );
8953
8954         /* make sure pthread_detach() isn't just a stub */
8955 #if HAVE_PTHREADS_D4
8956         status = pthread_detach( &t );
8957 #else
8958         status = pthread_detach( t );
8959 #endif
8960
8961 #ifdef HAVE_LINUX_THREADS
8962         pthread_kill_other_threads_np();
8963 #endif
8964
8965         exit( status );
8966
8967 }
8968
8969 EOF
8970 if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8971 then
8972   ol_cv_pthread_create_works=yes
8973 else
8974   echo "configure: failed program was:" >&5
8975   cat conftest.$ac_ext >&5
8976   rm -fr conftest*
8977   ol_cv_pthread_create_works=no
8978 fi
8979 rm -fr conftest*
8980 fi
8981
8982 fi
8983
8984 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
8985
8986                         if test $ol_cv_pthread_create_works = no ; then
8987                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
8988                         fi
8989
8990                                                 if test $ol_with_yielding_select = auto ; then
8991                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
8992 echo "configure:8993: checking if select yields when using pthreads" >&5
8993 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
8994   echo $ac_n "(cached) $ac_c" 1>&6
8995 else
8996   
8997                                 if test "$cross_compiling" = yes; then
8998   ol_cv_pthread_select_yields=cross
8999 else
9000   cat > conftest.$ac_ext <<EOF
9001 #line 9002 "configure"
9002 #include "confdefs.h"
9003
9004 #include <sys/types.h>
9005 #include <sys/time.h>
9006 #include <unistd.h>
9007 #include <pthread.h>
9008 #ifndef NULL
9009 #define NULL (void*) 0
9010 #endif
9011
9012 static int fildes[2];
9013
9014 static void *task(p)
9015         void *p;
9016 {
9017         int i;
9018         struct timeval tv;
9019
9020         fd_set rfds;
9021
9022         tv.tv_sec=10;
9023         tv.tv_usec=0;
9024
9025         FD_ZERO(&rfds);
9026         FD_SET(fildes[0], &rfds);
9027
9028         /* we're not interested in any fds */
9029         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9030
9031         if(i < 0) {
9032                 perror("select");
9033                 exit(10);
9034         }
9035
9036         exit(0); /* if we exit here, the select blocked the whole process */
9037 }
9038
9039 int main(argc, argv)
9040         int argc;
9041         char **argv;
9042 {
9043         pthread_t t;
9044
9045         /* create a pipe to select */
9046         if(pipe(&fildes[0])) {
9047                 perror("select");
9048                 exit(1);
9049         }
9050
9051 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9052         (void) pthread_setconcurrency(2);
9053 #else
9054 #ifdef HAVE_THR_SETCONCURRENCY
9055         /* Set Solaris LWP concurrency to 2 */
9056         thr_setconcurrency(2);
9057 #endif
9058 #endif
9059
9060 #if HAVE_PTHREADS_D4
9061         pthread_create(&t, pthread_attr_default, task, NULL);
9062 #else
9063         pthread_create(&t, NULL, task, NULL);
9064 #endif
9065
9066 #if HAVE_SCHED_YIELD
9067         sched_yield();  /* make sure task runs first */
9068 #else
9069 #ifdef HAVE_PTHREAD_YIELD
9070         pthread_yield();        /* make sure task runs first */
9071 #endif
9072 #endif
9073
9074         exit(2);
9075 }
9076 EOF
9077 if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9078 then
9079   ol_cv_pthread_select_yields=no
9080 else
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -fr conftest*
9084   ol_cv_pthread_select_yields=yes
9085 fi
9086 rm -fr conftest*
9087 fi
9088
9089 fi
9090
9091 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9092
9093                                 if test $ol_cv_pthread_select_yields = cross ; then
9094                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9095                                 fi
9096
9097                                 if test $ol_cv_pthread_select_yields = yes ; then
9098                                         ol_with_yielding_select=yes
9099                                 fi
9100                         fi
9101
9102                                                 CPPFLAGS="$save_CPPFLAGS"
9103                         LIBS="$save_LIBS"
9104                 else
9105                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9106                 fi
9107         fi
9108
9109         if test $ol_with_threads = posix ; then
9110                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9111         fi
9112 fi
9113
9114 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9115         -o $ol_with_threads = mach ; then
9116
9117                 for ac_hdr in mach/cthreads.h
9118 do
9119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9121 echo "configure:9122: checking for $ac_hdr" >&5
9122 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128 #include <$ac_hdr>
9129 EOF
9130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9131 { (eval echo configure:9132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9133 if test -z "$ac_err"; then
9134   rm -rf conftest*
9135   eval "ac_cv_header_$ac_safe=yes"
9136 else
9137   echo "$ac_err" >&5
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   eval "ac_cv_header_$ac_safe=no"
9142 fi
9143 rm -f conftest*
9144 fi
9145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9146   echo "$ac_t""yes" 1>&6
9147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9148   cat >> confdefs.h <<EOF
9149 #define $ac_tr_hdr 1
9150 EOF
9151  
9152 else
9153   echo "$ac_t""no" 1>&6
9154 fi
9155 done
9156
9157         if test $ac_cv_header_mach_cthreads_h = yes ; then
9158                 ol_with_threads=found
9159
9160                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9161 echo "configure:9162: checking for cthread_fork" >&5
9162 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9163   echo $ac_n "(cached) $ac_c" 1>&6
9164 else
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 /* System header to define __stub macros and hopefully few prototypes,
9169     which can conflict with char cthread_fork(); below.  */
9170 #include <assert.h>
9171 /* Override any gcc2 internal prototype to avoid an error.  */
9172 /* We use char because int might match the return type of a gcc2
9173     builtin and then its argument prototype would still apply.  */
9174 char cthread_fork();
9175 char (*f)();
9176
9177 int main() {
9178
9179 /* The GNU C library defines this for functions which it implements
9180     to always fail with ENOSYS.  Some functions are actually named
9181     something starting with __ and the normal name is an alias.  */
9182 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9183 choke me
9184 #else
9185 f = cthread_fork;
9186 #endif
9187
9188 ; return 0; }
9189 EOF
9190 if { (eval echo configure:9191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9191   rm -rf conftest*
9192   eval "ac_cv_func_cthread_fork=yes"
9193 else
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   eval "ac_cv_func_cthread_fork=no"
9198 fi
9199 rm -f conftest*
9200 fi
9201
9202 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9203   echo "$ac_t""yes" 1>&6
9204   ol_link_threads=yes
9205 else
9206   echo "$ac_t""no" 1>&6
9207 fi
9208
9209
9210                 if test $ol_link_threads = no ; then
9211                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9212 echo "configure:9213: checking for cthread_fork with -all_load" >&5
9213 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   
9217                                                                 save_LIBS="$LIBS"
9218                                 LIBS="-all_load $LIBS"
9219                                 cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222 #include <mach/cthreads.h>
9223 int main() {
9224
9225                                         cthread_fork((void *)0, (void *)0);
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   ol_cv_cthread_all_load=yes
9232 else
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -rf conftest*
9236   ol_cv_cthread_all_load=no
9237 fi
9238 rm -f conftest*
9239                                                                 LIBS="$save_LIBS"
9240                         
9241 fi
9242
9243 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9244
9245                         if test $ol_cv_cthread_all_load = yes ; then
9246                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9247                                 ol_link_threads=mach
9248                         fi
9249                 fi
9250
9251                 if test $ol_link_threads != no ; then
9252                         : check for cthread specific functionality here
9253                         cat >> confdefs.h <<\EOF
9254 #define HAVE_MACH_CTHREADS 1
9255 EOF
9256
9257                 else
9258                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9259                 fi
9260         fi
9261
9262         if test $ol_with_threads = mach ; then
9263                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9264         fi
9265 fi
9266
9267 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9268         -o $ol_with_threads = lwp ; then
9269
9270                 for ac_hdr in thread.h synch.h
9271 do
9272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9274 echo "configure:9275: checking for $ac_hdr" >&5
9275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9276   echo $ac_n "(cached) $ac_c" 1>&6
9277 else
9278   cat > conftest.$ac_ext <<EOF
9279 #line 9280 "configure"
9280 #include "confdefs.h"
9281 #include <$ac_hdr>
9282 EOF
9283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9284 { (eval echo configure:9285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9286 if test -z "$ac_err"; then
9287   rm -rf conftest*
9288   eval "ac_cv_header_$ac_safe=yes"
9289 else
9290   echo "$ac_err" >&5
9291   echo "configure: failed program was:" >&5
9292   cat conftest.$ac_ext >&5
9293   rm -rf conftest*
9294   eval "ac_cv_header_$ac_safe=no"
9295 fi
9296 rm -f conftest*
9297 fi
9298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9301   cat >> confdefs.h <<EOF
9302 #define $ac_tr_hdr 1
9303 EOF
9304  
9305 else
9306   echo "$ac_t""no" 1>&6
9307 fi
9308 done
9309
9310         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9311                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9312 echo "configure:9313: checking for thr_create in -lthread" >&5
9313 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   ac_save_LIBS="$LIBS"
9318 LIBS="-lthread  $LIBS"
9319 cat > conftest.$ac_ext <<EOF
9320 #line 9321 "configure"
9321 #include "confdefs.h"
9322 /* Override any gcc2 internal prototype to avoid an error.  */
9323 /* We use char because int might match the return type of a gcc2
9324     builtin and then its argument prototype would still apply.  */
9325 char thr_create();
9326
9327 int main() {
9328 thr_create()
9329 ; return 0; }
9330 EOF
9331 if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9332   rm -rf conftest*
9333   eval "ac_cv_lib_$ac_lib_var=yes"
9334 else
9335   echo "configure: failed program was:" >&5
9336   cat conftest.$ac_ext >&5
9337   rm -rf conftest*
9338   eval "ac_cv_lib_$ac_lib_var=no"
9339 fi
9340 rm -f conftest*
9341 LIBS="$ac_save_LIBS"
9342
9343 fi
9344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9345   echo "$ac_t""yes" 1>&6
9346   have_thr=yes
9347 else
9348   echo "$ac_t""no" 1>&6
9349 have_thr=no
9350 fi
9351
9352
9353                 if test $have_thr = yes ; then
9354                         cat >> confdefs.h <<\EOF
9355 #define HAVE_THR 1
9356 EOF
9357
9358                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9359                         ol_link_threads=thr
9360
9361                         if test $ol_with_yielding_select = auto ; then
9362                                 ol_with_yielding_select=yes
9363                         fi
9364
9365                                                 for ac_func in \
9366                                 thr_setconcurrency \
9367                                 thr_getconcurrency \
9368                         
9369 do
9370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9371 echo "configure:9372: checking for $ac_func" >&5
9372 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375   cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378 /* System header to define __stub macros and hopefully few prototypes,
9379     which can conflict with char $ac_func(); below.  */
9380 #include <assert.h>
9381 /* Override any gcc2 internal prototype to avoid an error.  */
9382 /* We use char because int might match the return type of a gcc2
9383     builtin and then its argument prototype would still apply.  */
9384 char $ac_func();
9385 char (*f)();
9386
9387 int main() {
9388
9389 /* The GNU C library defines this for functions which it implements
9390     to always fail with ENOSYS.  Some functions are actually named
9391     something starting with __ and the normal name is an alias.  */
9392 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9393 choke me
9394 #else
9395 f = $ac_func;
9396 #endif
9397
9398 ; return 0; }
9399 EOF
9400 if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9401   rm -rf conftest*
9402   eval "ac_cv_func_$ac_func=yes"
9403 else
9404   echo "configure: failed program was:" >&5
9405   cat conftest.$ac_ext >&5
9406   rm -rf conftest*
9407   eval "ac_cv_func_$ac_func=no"
9408 fi
9409 rm -f conftest*
9410 fi
9411
9412 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9413   echo "$ac_t""yes" 1>&6
9414     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9415   cat >> confdefs.h <<EOF
9416 #define $ac_tr_func 1
9417 EOF
9418  
9419 else
9420   echo "$ac_t""no" 1>&6
9421 fi
9422 done
9423
9424                 fi
9425         fi
9426
9427                 for ac_hdr in lwp/lwp.h
9428 do
9429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9431 echo "configure:9432: checking for $ac_hdr" >&5
9432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9433   echo $ac_n "(cached) $ac_c" 1>&6
9434 else
9435   cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438 #include <$ac_hdr>
9439 EOF
9440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9441 { (eval echo configure:9442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9443 if test -z "$ac_err"; then
9444   rm -rf conftest*
9445   eval "ac_cv_header_$ac_safe=yes"
9446 else
9447   echo "$ac_err" >&5
9448   echo "configure: failed program was:" >&5
9449   cat conftest.$ac_ext >&5
9450   rm -rf conftest*
9451   eval "ac_cv_header_$ac_safe=no"
9452 fi
9453 rm -f conftest*
9454 fi
9455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9456   echo "$ac_t""yes" 1>&6
9457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9458   cat >> confdefs.h <<EOF
9459 #define $ac_tr_hdr 1
9460 EOF
9461  
9462 else
9463   echo "$ac_t""no" 1>&6
9464 fi
9465 done
9466
9467         if test $ac_cv_header_lwp_lwp_h = yes ; then
9468                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9469 echo "configure:9470: checking for lwp_create in -llwp" >&5
9470 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9471 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9472   echo $ac_n "(cached) $ac_c" 1>&6
9473 else
9474   ac_save_LIBS="$LIBS"
9475 LIBS="-llwp  $LIBS"
9476 cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479 /* Override any gcc2 internal prototype to avoid an error.  */
9480 /* We use char because int might match the return type of a gcc2
9481     builtin and then its argument prototype would still apply.  */
9482 char lwp_create();
9483
9484 int main() {
9485 lwp_create()
9486 ; return 0; }
9487 EOF
9488 if { (eval echo configure:9489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9489   rm -rf conftest*
9490   eval "ac_cv_lib_$ac_lib_var=yes"
9491 else
9492   echo "configure: failed program was:" >&5
9493   cat conftest.$ac_ext >&5
9494   rm -rf conftest*
9495   eval "ac_cv_lib_$ac_lib_var=no"
9496 fi
9497 rm -f conftest*
9498 LIBS="$ac_save_LIBS"
9499
9500 fi
9501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9502   echo "$ac_t""yes" 1>&6
9503   have_lwp=yes
9504 else
9505   echo "$ac_t""no" 1>&6
9506 have_lwp=no
9507 fi
9508
9509
9510                 if test $have_lwp = yes ; then
9511                         cat >> confdefs.h <<\EOF
9512 #define HAVE_LWP 1
9513 EOF
9514
9515                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9516                         ol_link_threads=lwp
9517
9518                         if test $ol_with_yielding_select = auto ; then
9519                                 ol_with_yielding_select=no
9520                         fi
9521                 fi
9522         fi
9523 fi
9524
9525 if test $ol_with_yielding_select = yes ; then
9526         cat >> confdefs.h <<\EOF
9527 #define HAVE_YIELDING_SELECT 1
9528 EOF
9529
9530 fi
9531
9532 if test $ol_with_threads = manual ; then
9533                 ol_link_threads=yes
9534
9535         echo "configure: warning: thread defines and link options must be set manually" 1>&2
9536
9537         for ac_hdr in pthread.h sched.h
9538 do
9539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9541 echo "configure:9542: checking for $ac_hdr" >&5
9542 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9543   echo $ac_n "(cached) $ac_c" 1>&6
9544 else
9545   cat > conftest.$ac_ext <<EOF
9546 #line 9547 "configure"
9547 #include "confdefs.h"
9548 #include <$ac_hdr>
9549 EOF
9550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9551 { (eval echo configure:9552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9553 if test -z "$ac_err"; then
9554   rm -rf conftest*
9555   eval "ac_cv_header_$ac_safe=yes"
9556 else
9557   echo "$ac_err" >&5
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   eval "ac_cv_header_$ac_safe=no"
9562 fi
9563 rm -f conftest*
9564 fi
9565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9566   echo "$ac_t""yes" 1>&6
9567     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9568   cat >> confdefs.h <<EOF
9569 #define $ac_tr_hdr 1
9570 EOF
9571  
9572 else
9573   echo "$ac_t""no" 1>&6
9574 fi
9575 done
9576
9577         for ac_func in sched_yield pthread_yield
9578 do
9579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9580 echo "configure:9581: checking for $ac_func" >&5
9581 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 /* System header to define __stub macros and hopefully few prototypes,
9588     which can conflict with char $ac_func(); below.  */
9589 #include <assert.h>
9590 /* Override any gcc2 internal prototype to avoid an error.  */
9591 /* We use char because int might match the return type of a gcc2
9592     builtin and then its argument prototype would still apply.  */
9593 char $ac_func();
9594 char (*f)();
9595
9596 int main() {
9597
9598 /* The GNU C library defines this for functions which it implements
9599     to always fail with ENOSYS.  Some functions are actually named
9600     something starting with __ and the normal name is an alias.  */
9601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9602 choke me
9603 #else
9604 f = $ac_func;
9605 #endif
9606
9607 ; return 0; }
9608 EOF
9609 if { (eval echo configure:9610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9610   rm -rf conftest*
9611   eval "ac_cv_func_$ac_func=yes"
9612 else
9613   echo "configure: failed program was:" >&5
9614   cat conftest.$ac_ext >&5
9615   rm -rf conftest*
9616   eval "ac_cv_func_$ac_func=no"
9617 fi
9618 rm -f conftest*
9619 fi
9620
9621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9622   echo "$ac_t""yes" 1>&6
9623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9624   cat >> confdefs.h <<EOF
9625 #define $ac_tr_func 1
9626 EOF
9627  
9628 else
9629   echo "$ac_t""no" 1>&6
9630 fi
9631 done
9632
9633         
9634         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
9635 echo "configure:9636: checking for LinuxThreads pthread.h" >&5
9636 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
9637   echo $ac_n "(cached) $ac_c" 1>&6
9638 else
9639   cat > conftest.$ac_ext <<EOF
9640 #line 9641 "configure"
9641 #include "confdefs.h"
9642 #include <pthread.h>
9643 EOF
9644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9645   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
9646   rm -rf conftest*
9647   ol_cv_header_linux_threads=yes
9648 else
9649   rm -rf conftest*
9650   ol_cv_header_linux_threads=no
9651 fi
9652 rm -f conftest*
9653
9654                 
9655 fi
9656
9657 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
9658         if test $ol_cv_header_linux_threads = yes; then
9659                 cat >> confdefs.h <<\EOF
9660 #define HAVE_LINUX_THREADS 1
9661 EOF
9662
9663         fi
9664
9665
9666         for ac_hdr in mach/cthreads.h
9667 do
9668 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9669 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9670 echo "configure:9671: checking for $ac_hdr" >&5
9671 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 #include <$ac_hdr>
9678 EOF
9679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9680 { (eval echo configure:9681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9682 if test -z "$ac_err"; then
9683   rm -rf conftest*
9684   eval "ac_cv_header_$ac_safe=yes"
9685 else
9686   echo "$ac_err" >&5
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -rf conftest*
9690   eval "ac_cv_header_$ac_safe=no"
9691 fi
9692 rm -f conftest*
9693 fi
9694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9695   echo "$ac_t""yes" 1>&6
9696     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9697   cat >> confdefs.h <<EOF
9698 #define $ac_tr_hdr 1
9699 EOF
9700  
9701 else
9702   echo "$ac_t""no" 1>&6
9703 fi
9704 done
9705
9706         for ac_hdr in lwp/lwp.h
9707 do
9708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9710 echo "configure:9711: checking for $ac_hdr" >&5
9711 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9712   echo $ac_n "(cached) $ac_c" 1>&6
9713 else
9714   cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717 #include <$ac_hdr>
9718 EOF
9719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9720 { (eval echo configure:9721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9722 if test -z "$ac_err"; then
9723   rm -rf conftest*
9724   eval "ac_cv_header_$ac_safe=yes"
9725 else
9726   echo "$ac_err" >&5
9727   echo "configure: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   rm -rf conftest*
9730   eval "ac_cv_header_$ac_safe=no"
9731 fi
9732 rm -f conftest*
9733 fi
9734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9735   echo "$ac_t""yes" 1>&6
9736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9737   cat >> confdefs.h <<EOF
9738 #define $ac_tr_hdr 1
9739 EOF
9740  
9741 else
9742   echo "$ac_t""no" 1>&6
9743 fi
9744 done
9745
9746         for ac_hdr in thread.h synch.h
9747 do
9748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9750 echo "configure:9751: checking for $ac_hdr" >&5
9751 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9752   echo $ac_n "(cached) $ac_c" 1>&6
9753 else
9754   cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 #include <$ac_hdr>
9758 EOF
9759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9760 { (eval echo configure:9761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9762 if test -z "$ac_err"; then
9763   rm -rf conftest*
9764   eval "ac_cv_header_$ac_safe=yes"
9765 else
9766   echo "$ac_err" >&5
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769   rm -rf conftest*
9770   eval "ac_cv_header_$ac_safe=no"
9771 fi
9772 rm -f conftest*
9773 fi
9774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9775   echo "$ac_t""yes" 1>&6
9776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9777   cat >> confdefs.h <<EOF
9778 #define $ac_tr_hdr 1
9779 EOF
9780  
9781 else
9782   echo "$ac_t""no" 1>&6
9783 fi
9784 done
9785
9786 fi
9787
9788 if test $ol_link_threads != no ; then  
9789                         cat >> confdefs.h <<\EOF
9790 #define REENTRANT 1
9791 EOF
9792
9793         cat >> confdefs.h <<\EOF
9794 #define _REENTRANT 1
9795 EOF
9796
9797         cat >> confdefs.h <<\EOF
9798 #define THREAD_SAFE 1
9799 EOF
9800
9801         cat >> confdefs.h <<\EOF
9802 #define _THREAD_SAFE 1
9803 EOF
9804
9805         cat >> confdefs.h <<\EOF
9806 #define THREADSAFE 1
9807 EOF
9808
9809         cat >> confdefs.h <<\EOF
9810 #define _THREADSAFE 1
9811 EOF
9812
9813         cat >> confdefs.h <<\EOF
9814 #define _SGI_MP_SOURCE 1
9815 EOF
9816
9817
9818                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
9819 echo "configure:9820: checking for thread specific errno" >&5
9820 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
9821   echo $ac_n "(cached) $ac_c" 1>&6
9822 else
9823   
9824                 cat > conftest.$ac_ext <<EOF
9825 #line 9826 "configure"
9826 #include "confdefs.h"
9827 #include <errno.h>
9828 int main() {
9829 errno = 0;
9830 ; return 0; }
9831 EOF
9832 if { (eval echo configure:9833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9833   rm -rf conftest*
9834   ol_cv_errno_thread_specific=yes
9835 else
9836   echo "configure: failed program was:" >&5
9837   cat conftest.$ac_ext >&5
9838   rm -rf conftest*
9839   ol_cv_errno_thread_specific=no
9840 fi
9841 rm -f conftest*
9842         
9843 fi
9844
9845 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
9846
9847                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
9848 echo "configure:9849: checking for thread specific h_errno" >&5
9849 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
9850   echo $ac_n "(cached) $ac_c" 1>&6
9851 else
9852   
9853                 cat > conftest.$ac_ext <<EOF
9854 #line 9855 "configure"
9855 #include "confdefs.h"
9856 #include <netdb.h>
9857 int main() {
9858 h_errno = 0;
9859 ; return 0; }
9860 EOF
9861 if { (eval echo configure:9862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9862   rm -rf conftest*
9863   ol_cv_h_errno_thread_specific=yes
9864 else
9865   echo "configure: failed program was:" >&5
9866   cat conftest.$ac_ext >&5
9867   rm -rf conftest*
9868   ol_cv_h_errno_thread_specific=no
9869 fi
9870 rm -f conftest*
9871         
9872 fi
9873
9874 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
9875
9876         if test $ol_cv_errno_thread_specific != yes \
9877                 -o $ol_cv_h_errno_thread_specific != yes ; then
9878                 LIBS="$LTHREAD_LIBS $LIBS"
9879                 LTHREAD_LIBS=""
9880         fi
9881
9882 fi  
9883
9884 if test $ol_link_threads = no ; then
9885         if test $ol_with_threads = yes ; then
9886                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
9887         fi
9888
9889         if test $ol_with_threads = auto ; then
9890                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
9891                 ol_with_threads=no
9892         fi
9893
9894         cat >> confdefs.h <<\EOF
9895 #define NO_THREADS 1
9896 EOF
9897
9898         LTHREAD_LIBS=""
9899 fi
9900
9901 if test $ol_link_threads != no ; then
9902         cat >> confdefs.h <<\EOF
9903 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
9904 EOF
9905
9906 fi
9907
9908
9909 ol_link_ldbm=no 
9910 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
9911         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
9912 echo "configure:9913: checking for DB2 library" >&5
9913 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
9914   echo $ac_n "(cached) $ac_c" 1>&6
9915 else
9916         ol_LIBS="$LIBS"
9917         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
9918 echo "configure:9919: checking for db_open in -ldb" >&5
9919 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
9920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9921   echo $ac_n "(cached) $ac_c" 1>&6
9922 else
9923   ac_save_LIBS="$LIBS"
9924 LIBS="-ldb  $LIBS"
9925 cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 /* Override any gcc2 internal prototype to avoid an error.  */
9929 /* We use char because int might match the return type of a gcc2
9930     builtin and then its argument prototype would still apply.  */
9931 char db_open();
9932
9933 int main() {
9934 db_open()
9935 ; return 0; }
9936 EOF
9937 if { (eval echo configure:9938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9938   rm -rf conftest*
9939   eval "ac_cv_lib_$ac_lib_var=yes"
9940 else
9941   echo "configure: failed program was:" >&5
9942   cat conftest.$ac_ext >&5
9943   rm -rf conftest*
9944   eval "ac_cv_lib_$ac_lib_var=no"
9945 fi
9946 rm -f conftest*
9947 LIBS="$ac_save_LIBS"
9948
9949 fi
9950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9951   echo "$ac_t""yes" 1>&6
9952   ol_cv_lib_db2=-ldb
9953 else
9954   echo "$ac_t""no" 1>&6
9955 ol_cv_lib_db2=no
9956 fi
9957
9958         LIBS="$ol_LIBS"
9959
9960 fi
9961
9962 echo "$ac_t""$ol_cv_lib_db2" 1>&6
9963
9964 for ac_hdr in db.h
9965 do
9966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9968 echo "configure:9969: checking for $ac_hdr" >&5
9969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9970   echo $ac_n "(cached) $ac_c" 1>&6
9971 else
9972   cat > conftest.$ac_ext <<EOF
9973 #line 9974 "configure"
9974 #include "confdefs.h"
9975 #include <$ac_hdr>
9976 EOF
9977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9978 { (eval echo configure:9979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9980 if test -z "$ac_err"; then
9981   rm -rf conftest*
9982   eval "ac_cv_header_$ac_safe=yes"
9983 else
9984   echo "$ac_err" >&5
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -rf conftest*
9988   eval "ac_cv_header_$ac_safe=no"
9989 fi
9990 rm -f conftest*
9991 fi
9992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9993   echo "$ac_t""yes" 1>&6
9994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9995   cat >> confdefs.h <<EOF
9996 #define $ac_tr_hdr 1
9997 EOF
9998  
9999 else
10000   echo "$ac_t""no" 1>&6
10001 fi
10002 done
10003
10004 if test $ac_cv_header_db_h = yes ; then
10005         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10006 echo "configure:10007: checking if db.h is DB2" >&5
10007 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10008   echo $ac_n "(cached) $ac_c" 1>&6
10009 else
10010   
10011                 cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10014
10015 #                       include <db.h>
10016                         /* this check could be improved */
10017 #                       ifdef DB_VERSION_MAJOR
10018 #                               if DB_VERSION_MAJOR == 2
10019                                         __db_version_2
10020 #                               endif
10021 #                       endif
10022                 
10023 EOF
10024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10025   egrep "__db_version_2" >/dev/null 2>&1; then
10026   rm -rf conftest*
10027   ol_cv_header_db2=yes
10028 else
10029   rm -rf conftest*
10030   ol_cv_header_db2=no
10031 fi
10032 rm -f conftest*
10033
10034 fi
10035
10036 echo "$ac_t""$ol_cv_header_db2" 1>&6
10037 else
10038         ol_cv_header_db2=no
10039 fi
10040
10041
10042  
10043  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10044 echo "configure:10045: checking for Berkeley DB2" >&5
10045 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10046   echo $ac_n "(cached) $ac_c" 1>&6
10047 else
10048   
10049         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10050                 ol_cv_berkeley_db2=no
10051         else
10052                 ol_cv_berkeley_db2=yes
10053         fi
10054
10055 fi
10056
10057 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10058  if test $ol_cv_berkeley_db2 = yes ; then
10059         cat >> confdefs.h <<\EOF
10060 #define HAVE_BERKELEY_DB2 1
10061 EOF
10062
10063  fi
10064
10065
10066         if test $ol_cv_berkeley_db2 = yes ; then
10067                 ol_link_ldbm=db2
10068                 ol_with_ldbm_api=db2
10069
10070                 if test $ol_with_ldbm_type = hash ; then
10071                         cat >> confdefs.h <<\EOF
10072 #define LDBM_USE_DBHASH 1
10073 EOF
10074
10075                 else
10076                         cat >> confdefs.h <<\EOF
10077 #define LDBM_USE_DBBTREE 1
10078 EOF
10079
10080                 fi
10081
10082                                                 if test $ol_cv_lib_db2 != yes ; then
10083                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10084                 fi
10085         fi
10086 fi
10087
10088 ol_link_bdb2=no
10089 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10090         ol_link_bdb2=yes
10091 fi
10092
10093 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10094         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10095 echo "configure:10096: checking for Berkeley DB library" >&5
10096 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10097   echo $ac_n "(cached) $ac_c" 1>&6
10098 else
10099   
10100         for ac_hdr in db1/db.h
10101 do
10102 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10103 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10104 echo "configure:10105: checking for $ac_hdr" >&5
10105 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 #include <$ac_hdr>
10112 EOF
10113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10114 { (eval echo configure:10115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10116 if test -z "$ac_err"; then
10117   rm -rf conftest*
10118   eval "ac_cv_header_$ac_safe=yes"
10119 else
10120   echo "$ac_err" >&5
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -rf conftest*
10124   eval "ac_cv_header_$ac_safe=no"
10125 fi
10126 rm -f conftest*
10127 fi
10128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10129   echo "$ac_t""yes" 1>&6
10130     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10131   cat >> confdefs.h <<EOF
10132 #define $ac_tr_hdr 1
10133 EOF
10134  
10135 else
10136   echo "$ac_t""no" 1>&6
10137 fi
10138 done
10139
10140         ol_LIBS="$LIBS"
10141         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10142 echo "configure:10143: checking for dbopen" >&5
10143 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   cat > conftest.$ac_ext <<EOF
10147 #line 10148 "configure"
10148 #include "confdefs.h"
10149 /* System header to define __stub macros and hopefully few prototypes,
10150     which can conflict with char dbopen(); below.  */
10151 #include <assert.h>
10152 /* Override any gcc2 internal prototype to avoid an error.  */
10153 /* We use char because int might match the return type of a gcc2
10154     builtin and then its argument prototype would still apply.  */
10155 char dbopen();
10156 char (*f)();
10157
10158 int main() {
10159
10160 /* The GNU C library defines this for functions which it implements
10161     to always fail with ENOSYS.  Some functions are actually named
10162     something starting with __ and the normal name is an alias.  */
10163 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10164 choke me
10165 #else
10166 f = dbopen;
10167 #endif
10168
10169 ; return 0; }
10170 EOF
10171 if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10172   rm -rf conftest*
10173   eval "ac_cv_func_dbopen=yes"
10174 else
10175   echo "configure: failed program was:" >&5
10176   cat conftest.$ac_ext >&5
10177   rm -rf conftest*
10178   eval "ac_cv_func_dbopen=no"
10179 fi
10180 rm -f conftest*
10181 fi
10182
10183 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10184   echo "$ac_t""yes" 1>&6
10185   ol_cv_lib_db=yes
10186 else
10187   echo "$ac_t""no" 1>&6
10188
10189                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10190 echo "configure:10191: checking for dbopen in -ldb1" >&5
10191 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10193   echo $ac_n "(cached) $ac_c" 1>&6
10194 else
10195   ac_save_LIBS="$LIBS"
10196 LIBS="-ldb1  $LIBS"
10197 cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 /* We use char because int might match the return type of a gcc2
10202     builtin and then its argument prototype would still apply.  */
10203 char dbopen();
10204
10205 int main() {
10206 dbopen()
10207 ; return 0; }
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10210   rm -rf conftest*
10211   eval "ac_cv_lib_$ac_lib_var=yes"
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_lib_$ac_lib_var=no"
10217 fi
10218 rm -f conftest*
10219 LIBS="$ac_save_LIBS"
10220
10221 fi
10222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10223   echo "$ac_t""yes" 1>&6
10224   ol_cv_lib_db=-ldb1
10225 else
10226   echo "$ac_t""no" 1>&6
10227
10228                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10229 echo "configure:10230: checking for dbopen in -ldb" >&5
10230 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10232   echo $ac_n "(cached) $ac_c" 1>&6
10233 else
10234   ac_save_LIBS="$LIBS"
10235 LIBS="-ldb  $LIBS"
10236 cat > conftest.$ac_ext <<EOF
10237 #line 10238 "configure"
10238 #include "confdefs.h"
10239 /* Override any gcc2 internal prototype to avoid an error.  */
10240 /* We use char because int might match the return type of a gcc2
10241     builtin and then its argument prototype would still apply.  */
10242 char dbopen();
10243
10244 int main() {
10245 dbopen()
10246 ; return 0; }
10247 EOF
10248 if { (eval echo configure:10249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10249   rm -rf conftest*
10250   eval "ac_cv_lib_$ac_lib_var=yes"
10251 else
10252   echo "configure: failed program was:" >&5
10253   cat conftest.$ac_ext >&5
10254   rm -rf conftest*
10255   eval "ac_cv_lib_$ac_lib_var=no"
10256 fi
10257 rm -f conftest*
10258 LIBS="$ac_save_LIBS"
10259
10260 fi
10261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263   ol_cv_lib_db=-ldb
10264 else
10265   echo "$ac_t""no" 1>&6
10266 ol_cv_lib_db=no
10267 fi
10268
10269                 
10270 fi
10271
10272         
10273 fi
10274
10275         LIBS="$ol_LIBS"
10276
10277 fi
10278
10279 echo "$ac_t""$ol_cv_lib_db" 1>&6
10280
10281
10282 for ac_hdr in db_185.h
10283 do
10284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10286 echo "configure:10287: checking for $ac_hdr" >&5
10287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10288   echo $ac_n "(cached) $ac_c" 1>&6
10289 else
10290   cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 #include <$ac_hdr>
10294 EOF
10295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10296 { (eval echo configure:10297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10298 if test -z "$ac_err"; then
10299   rm -rf conftest*
10300   eval "ac_cv_header_$ac_safe=yes"
10301 else
10302   echo "$ac_err" >&5
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_header_$ac_safe=no"
10307 fi
10308 rm -f conftest*
10309 fi
10310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10311   echo "$ac_t""yes" 1>&6
10312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10313   cat >> confdefs.h <<EOF
10314 #define $ac_tr_hdr 1
10315 EOF
10316  
10317 else
10318   echo "$ac_t""no" 1>&6
10319 fi
10320 done
10321
10322 if test "$ol_cv_header_db2" = yes ; then
10323         
10324         ol_cv_header_db=$ac_cv_header_db_185_h
10325 else
10326         ol_cv_header_db=$ac_cv_header_db_h
10327 fi
10328
10329
10330  
10331  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10332 echo "configure:10333: checking for Berkeley DB" >&5
10333 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10334   echo $ac_n "(cached) $ac_c" 1>&6
10335 else
10336   
10337         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10338                 ol_cv_berkeley_db=no
10339         else
10340                 ol_cv_berkeley_db=yes
10341         fi
10342
10343 fi
10344
10345 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10346  if test $ol_cv_berkeley_db = yes ; then
10347         cat >> confdefs.h <<\EOF
10348 #define HAVE_BERKELEY_DB 1
10349 EOF
10350
10351  fi
10352
10353
10354         if test $ol_cv_berkeley_db = yes ; then
10355                 ol_link_ldbm=db
10356                 ol_with_ldbm_api=db
10357
10358                 if test $ol_with_ldbm_type = hash ; then
10359                         cat >> confdefs.h <<\EOF
10360 #define LDBM_USE_DBHASH 1
10361 EOF
10362
10363                 else
10364                         cat >> confdefs.h <<\EOF
10365 #define LDBM_USE_DBBTREE 1
10366 EOF
10367
10368                 fi
10369
10370                                                 if test $ol_cv_lib_db != yes ; then
10371                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10372                 fi
10373         fi
10374 fi
10375
10376 if test $ol_with_ldbm_api = manual ; then
10377                 ol_link_ldbm=yes
10378
10379         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10380
10381         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10382 do
10383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10385 echo "configure:10386: checking for $ac_hdr" >&5
10386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 #include <$ac_hdr>
10393 EOF
10394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10395 { (eval echo configure:10396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10397 if test -z "$ac_err"; then
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=yes"
10400 else
10401   echo "$ac_err" >&5
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_header_$ac_safe=no"
10406 fi
10407 rm -f conftest*
10408 fi
10409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10410   echo "$ac_t""yes" 1>&6
10411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10412   cat >> confdefs.h <<EOF
10413 #define $ac_tr_hdr 1
10414 EOF
10415  
10416 else
10417   echo "$ac_t""no" 1>&6
10418 fi
10419 done
10420
10421 fi
10422
10423 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10424         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10425         ol_with_ldbm_api=none
10426 fi
10427
10428 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10429         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10430 echo "configure:10431: checking for MDBM library" >&5
10431 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10432   echo $ac_n "(cached) $ac_c" 1>&6
10433 else
10434         ol_LIBS="$LIBS"
10435         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10436 echo "configure:10437: checking for mdbm_set_chain" >&5
10437 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10438   echo $ac_n "(cached) $ac_c" 1>&6
10439 else
10440   cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443 /* System header to define __stub macros and hopefully few prototypes,
10444     which can conflict with char mdbm_set_chain(); below.  */
10445 #include <assert.h>
10446 /* Override any gcc2 internal prototype to avoid an error.  */
10447 /* We use char because int might match the return type of a gcc2
10448     builtin and then its argument prototype would still apply.  */
10449 char mdbm_set_chain();
10450 char (*f)();
10451
10452 int main() {
10453
10454 /* The GNU C library defines this for functions which it implements
10455     to always fail with ENOSYS.  Some functions are actually named
10456     something starting with __ and the normal name is an alias.  */
10457 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10458 choke me
10459 #else
10460 f = mdbm_set_chain;
10461 #endif
10462
10463 ; return 0; }
10464 EOF
10465 if { (eval echo configure:10466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10466   rm -rf conftest*
10467   eval "ac_cv_func_mdbm_set_chain=yes"
10468 else
10469   echo "configure: failed program was:" >&5
10470   cat conftest.$ac_ext >&5
10471   rm -rf conftest*
10472   eval "ac_cv_func_mdbm_set_chain=no"
10473 fi
10474 rm -f conftest*
10475 fi
10476
10477 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10478   echo "$ac_t""yes" 1>&6
10479   ol_cv_lib_mdbm=yes
10480 else
10481   echo "$ac_t""no" 1>&6
10482
10483                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10484 echo "configure:10485: checking for mdbm_set_chain in -lmdbm" >&5
10485 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10487   echo $ac_n "(cached) $ac_c" 1>&6
10488 else
10489   ac_save_LIBS="$LIBS"
10490 LIBS="-lmdbm  $LIBS"
10491 cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494 /* Override any gcc2 internal prototype to avoid an error.  */
10495 /* We use char because int might match the return type of a gcc2
10496     builtin and then its argument prototype would still apply.  */
10497 char mdbm_set_chain();
10498
10499 int main() {
10500 mdbm_set_chain()
10501 ; return 0; }
10502 EOF
10503 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10504   rm -rf conftest*
10505   eval "ac_cv_lib_$ac_lib_var=yes"
10506 else
10507   echo "configure: failed program was:" >&5
10508   cat conftest.$ac_ext >&5
10509   rm -rf conftest*
10510   eval "ac_cv_lib_$ac_lib_var=no"
10511 fi
10512 rm -f conftest*
10513 LIBS="$ac_save_LIBS"
10514
10515 fi
10516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10517   echo "$ac_t""yes" 1>&6
10518   ol_cv_lib_mdbm=-lmdbm
10519 else
10520   echo "$ac_t""no" 1>&6
10521 ol_cv_lib_mdbm=no
10522 fi
10523
10524         
10525 fi
10526
10527         LIBS="$ol_LIBS"
10528
10529 fi
10530
10531 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
10532
10533
10534  for ac_hdr in mdbm.h
10535 do
10536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10538 echo "configure:10539: checking for $ac_hdr" >&5
10539 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   cat > conftest.$ac_ext <<EOF
10543 #line 10544 "configure"
10544 #include "confdefs.h"
10545 #include <$ac_hdr>
10546 EOF
10547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10548 { (eval echo configure:10549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10550 if test -z "$ac_err"; then
10551   rm -rf conftest*
10552   eval "ac_cv_header_$ac_safe=yes"
10553 else
10554   echo "$ac_err" >&5
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -rf conftest*
10558   eval "ac_cv_header_$ac_safe=no"
10559 fi
10560 rm -f conftest*
10561 fi
10562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10563   echo "$ac_t""yes" 1>&6
10564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10565   cat >> confdefs.h <<EOF
10566 #define $ac_tr_hdr 1
10567 EOF
10568  
10569 else
10570   echo "$ac_t""no" 1>&6
10571 fi
10572 done
10573
10574  echo $ac_n "checking for db""... $ac_c" 1>&6
10575 echo "configure:10576: checking for db" >&5
10576 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
10577   echo $ac_n "(cached) $ac_c" 1>&6
10578 else
10579   
10580         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
10581                 ol_cv_mdbm=no
10582         else
10583                 ol_cv_mdbm=yes
10584         fi
10585
10586 fi
10587
10588 echo "$ac_t""$ol_cv_mdbm" 1>&6
10589  if test $ol_cv_mdbm = yes ; then
10590         cat >> confdefs.h <<\EOF
10591 #define HAVE_MDBM 1
10592 EOF
10593
10594  fi
10595
10596
10597         if test $ol_cv_mdbm = yes ; then
10598                 ol_link_ldbm=mdbm
10599                 ol_with_ldbm_api=mdbm
10600                 if test $ol_cv_lib_mdbm != yes ; then
10601                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
10602                 fi
10603         fi
10604 fi
10605
10606 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
10607         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
10608 echo "configure:10609: checking for GDBM library" >&5
10609 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
10610   echo $ac_n "(cached) $ac_c" 1>&6
10611 else
10612         ol_LIBS="$LIBS"
10613         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
10614 echo "configure:10615: checking for gdbm_open" >&5
10615 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
10616   echo $ac_n "(cached) $ac_c" 1>&6
10617 else
10618   cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621 /* System header to define __stub macros and hopefully few prototypes,
10622     which can conflict with char gdbm_open(); below.  */
10623 #include <assert.h>
10624 /* Override any gcc2 internal prototype to avoid an error.  */
10625 /* We use char because int might match the return type of a gcc2
10626     builtin and then its argument prototype would still apply.  */
10627 char gdbm_open();
10628 char (*f)();
10629
10630 int main() {
10631
10632 /* The GNU C library defines this for functions which it implements
10633     to always fail with ENOSYS.  Some functions are actually named
10634     something starting with __ and the normal name is an alias.  */
10635 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
10636 choke me
10637 #else
10638 f = gdbm_open;
10639 #endif
10640
10641 ; return 0; }
10642 EOF
10643 if { (eval echo configure:10644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10644   rm -rf conftest*
10645   eval "ac_cv_func_gdbm_open=yes"
10646 else
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -rf conftest*
10650   eval "ac_cv_func_gdbm_open=no"
10651 fi
10652 rm -f conftest*
10653 fi
10654
10655 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
10656   echo "$ac_t""yes" 1>&6
10657   ol_cv_lib_gdbm=yes
10658 else
10659   echo "$ac_t""no" 1>&6
10660
10661                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
10662 echo "configure:10663: checking for gdbm_open in -lgdbm" >&5
10663 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
10664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   ac_save_LIBS="$LIBS"
10668 LIBS="-lgdbm  $LIBS"
10669 cat > conftest.$ac_ext <<EOF
10670 #line 10671 "configure"
10671 #include "confdefs.h"
10672 /* Override any gcc2 internal prototype to avoid an error.  */
10673 /* We use char because int might match the return type of a gcc2
10674     builtin and then its argument prototype would still apply.  */
10675 char gdbm_open();
10676
10677 int main() {
10678 gdbm_open()
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_lib_$ac_lib_var=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_lib_$ac_lib_var=no"
10689 fi
10690 rm -f conftest*
10691 LIBS="$ac_save_LIBS"
10692
10693 fi
10694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10695   echo "$ac_t""yes" 1>&6
10696   ol_cv_lib_gdbm=-lgdbm
10697 else
10698   echo "$ac_t""no" 1>&6
10699 ol_cv_lib_gdbm=no
10700 fi
10701
10702         
10703 fi
10704
10705         LIBS="$ol_LIBS"
10706
10707 fi
10708
10709 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
10710
10711
10712  for ac_hdr in gdbm.h
10713 do
10714 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10715 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10716 echo "configure:10717: checking for $ac_hdr" >&5
10717 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   cat > conftest.$ac_ext <<EOF
10721 #line 10722 "configure"
10722 #include "confdefs.h"
10723 #include <$ac_hdr>
10724 EOF
10725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10726 { (eval echo configure:10727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10728 if test -z "$ac_err"; then
10729   rm -rf conftest*
10730   eval "ac_cv_header_$ac_safe=yes"
10731 else
10732   echo "$ac_err" >&5
10733   echo "configure: failed program was:" >&5
10734   cat conftest.$ac_ext >&5
10735   rm -rf conftest*
10736   eval "ac_cv_header_$ac_safe=no"
10737 fi
10738 rm -f conftest*
10739 fi
10740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10741   echo "$ac_t""yes" 1>&6
10742     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10743   cat >> confdefs.h <<EOF
10744 #define $ac_tr_hdr 1
10745 EOF
10746  
10747 else
10748   echo "$ac_t""no" 1>&6
10749 fi
10750 done
10751
10752  echo $ac_n "checking for db""... $ac_c" 1>&6
10753 echo "configure:10754: checking for db" >&5
10754 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   
10758         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
10759                 ol_cv_gdbm=no
10760         else
10761                 ol_cv_gdbm=yes
10762         fi
10763
10764 fi
10765
10766 echo "$ac_t""$ol_cv_gdbm" 1>&6
10767  if test $ol_cv_gdbm = yes ; then
10768         cat >> confdefs.h <<\EOF
10769 #define HAVE_GDBM 1
10770 EOF
10771
10772  fi
10773
10774
10775         if test $ol_cv_gdbm = yes ; then
10776                 ol_link_ldbm=gdbm
10777                 ol_with_ldbm_api=gdbm
10778
10779                 if test $ol_cv_lib_gdbm != yes ; then
10780                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
10781                 fi
10782         fi
10783 fi
10784
10785 if test $ol_with_ldbm_api = auto ; then
10786         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
10787 elif test $ol_with_ldbm_api = ndbm ; then
10788         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
10789 echo "configure:10790: checking for NDBM library" >&5
10790 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
10791   echo $ac_n "(cached) $ac_c" 1>&6
10792 else
10793         ol_LIBS="$LIBS"
10794         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
10795 echo "configure:10796: checking for dbm_open" >&5
10796 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
10797   echo $ac_n "(cached) $ac_c" 1>&6
10798 else
10799   cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802 /* System header to define __stub macros and hopefully few prototypes,
10803     which can conflict with char dbm_open(); below.  */
10804 #include <assert.h>
10805 /* Override any gcc2 internal prototype to avoid an error.  */
10806 /* We use char because int might match the return type of a gcc2
10807     builtin and then its argument prototype would still apply.  */
10808 char dbm_open();
10809 char (*f)();
10810
10811 int main() {
10812
10813 /* The GNU C library defines this for functions which it implements
10814     to always fail with ENOSYS.  Some functions are actually named
10815     something starting with __ and the normal name is an alias.  */
10816 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
10817 choke me
10818 #else
10819 f = dbm_open;
10820 #endif
10821
10822 ; return 0; }
10823 EOF
10824 if { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10825   rm -rf conftest*
10826   eval "ac_cv_func_dbm_open=yes"
10827 else
10828   echo "configure: failed program was:" >&5
10829   cat conftest.$ac_ext >&5
10830   rm -rf conftest*
10831   eval "ac_cv_func_dbm_open=no"
10832 fi
10833 rm -f conftest*
10834 fi
10835
10836 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
10837   echo "$ac_t""yes" 1>&6
10838   ol_cv_lib_ndbm=yes
10839 else
10840   echo "$ac_t""no" 1>&6
10841
10842                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
10843 echo "configure:10844: checking for dbm_open in -lndbm" >&5
10844 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
10845 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10846   echo $ac_n "(cached) $ac_c" 1>&6
10847 else
10848   ac_save_LIBS="$LIBS"
10849 LIBS="-lndbm  $LIBS"
10850 cat > conftest.$ac_ext <<EOF
10851 #line 10852 "configure"
10852 #include "confdefs.h"
10853 /* Override any gcc2 internal prototype to avoid an error.  */
10854 /* We use char because int might match the return type of a gcc2
10855     builtin and then its argument prototype would still apply.  */
10856 char dbm_open();
10857
10858 int main() {
10859 dbm_open()
10860 ; return 0; }
10861 EOF
10862 if { (eval echo configure:10863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10863   rm -rf conftest*
10864   eval "ac_cv_lib_$ac_lib_var=yes"
10865 else
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   eval "ac_cv_lib_$ac_lib_var=no"
10870 fi
10871 rm -f conftest*
10872 LIBS="$ac_save_LIBS"
10873
10874 fi
10875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10876   echo "$ac_t""yes" 1>&6
10877   ol_cv_lib_ndbm=-lndbm
10878 else
10879   echo "$ac_t""no" 1>&6
10880
10881                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
10882 echo "configure:10883: checking for dbm_open in -ldbm" >&5
10883 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
10884 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10885   echo $ac_n "(cached) $ac_c" 1>&6
10886 else
10887   ac_save_LIBS="$LIBS"
10888 LIBS="-ldbm  $LIBS"
10889 cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892 /* Override any gcc2 internal prototype to avoid an error.  */
10893 /* We use char because int might match the return type of a gcc2
10894     builtin and then its argument prototype would still apply.  */
10895 char dbm_open();
10896
10897 int main() {
10898 dbm_open()
10899 ; return 0; }
10900 EOF
10901 if { (eval echo configure:10902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10902   rm -rf conftest*
10903   eval "ac_cv_lib_$ac_lib_var=yes"
10904 else
10905   echo "configure: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907   rm -rf conftest*
10908   eval "ac_cv_lib_$ac_lib_var=no"
10909 fi
10910 rm -f conftest*
10911 LIBS="$ac_save_LIBS"
10912
10913 fi
10914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10915   echo "$ac_t""yes" 1>&6
10916   ol_cv_lib_ndbm=-ldbm
10917 else
10918   echo "$ac_t""no" 1>&6
10919 ol_cv_lib_ndbm=no
10920 fi
10921                 
10922 fi
10923
10924         
10925 fi
10926
10927         LIBS="$ol_LIBS"
10928
10929 fi
10930
10931 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
10932
10933
10934  for ac_hdr in ndbm.h
10935 do
10936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10938 echo "configure:10939: checking for $ac_hdr" >&5
10939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945 #include <$ac_hdr>
10946 EOF
10947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10948 { (eval echo configure:10949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10950 if test -z "$ac_err"; then
10951   rm -rf conftest*
10952   eval "ac_cv_header_$ac_safe=yes"
10953 else
10954   echo "$ac_err" >&5
10955   echo "configure: failed program was:" >&5
10956   cat conftest.$ac_ext >&5
10957   rm -rf conftest*
10958   eval "ac_cv_header_$ac_safe=no"
10959 fi
10960 rm -f conftest*
10961 fi
10962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10963   echo "$ac_t""yes" 1>&6
10964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10965   cat >> confdefs.h <<EOF
10966 #define $ac_tr_hdr 1
10967 EOF
10968  
10969 else
10970   echo "$ac_t""no" 1>&6
10971 fi
10972 done
10973
10974  echo $ac_n "checking for db""... $ac_c" 1>&6
10975 echo "configure:10976: checking for db" >&5
10976 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
10977   echo $ac_n "(cached) $ac_c" 1>&6
10978 else
10979   
10980         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
10981                 ol_cv_ndbm=no
10982         else
10983                 ol_cv_ndbm=yes
10984         fi
10985
10986 fi
10987
10988 echo "$ac_t""$ol_cv_ndbm" 1>&6
10989  if test $ol_cv_ndbm = yes ; then
10990         cat >> confdefs.h <<\EOF
10991 #define HAVE_NDBM 1
10992 EOF
10993
10994  fi
10995
10996
10997         if test $ol_cv_ndbm = yes ; then
10998                 ol_link_ldbm=ndbm
10999                 ol_with_ldbm_api=ndbm
11000
11001                 if test $ol_cv_lib_ndbm != yes ; then
11002                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11003                 fi
11004         fi
11005 fi
11006
11007 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11008         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11009         if test $ol_enable_ldbm = yes ; then
11010                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11011         fi
11012
11013         echo "configure: warning: disabling LDBM" 1>&2
11014         ol_enable_ldbm=no
11015 fi
11016
11017 if test $ol_enable_wrappers != no ; then
11018         for ac_hdr in tcpd.h
11019 do
11020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11022 echo "configure:11023: checking for $ac_hdr" >&5
11023 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   cat > conftest.$ac_ext <<EOF
11027 #line 11028 "configure"
11028 #include "confdefs.h"
11029 #include <$ac_hdr>
11030 EOF
11031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11032 { (eval echo configure:11033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11034 if test -z "$ac_err"; then
11035   rm -rf conftest*
11036   eval "ac_cv_header_$ac_safe=yes"
11037 else
11038   echo "$ac_err" >&5
11039   echo "configure: failed program was:" >&5
11040   cat conftest.$ac_ext >&5
11041   rm -rf conftest*
11042   eval "ac_cv_header_$ac_safe=no"
11043 fi
11044 rm -f conftest*
11045 fi
11046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11047   echo "$ac_t""yes" 1>&6
11048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11049   cat >> confdefs.h <<EOF
11050 #define $ac_tr_hdr 1
11051 EOF
11052  
11053 else
11054   echo "$ac_t""no" 1>&6
11055 fi
11056 done
11057
11058
11059         if test $ac_cv_header_tcpd_h != yes ; then
11060                 have_wrappers=no
11061         else
11062                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11063 echo "configure:11064: checking for main in -lwrap" >&5
11064 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11066   echo $ac_n "(cached) $ac_c" 1>&6
11067 else
11068   ac_save_LIBS="$LIBS"
11069 LIBS="-lwrap  $LIBS"
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073
11074 int main() {
11075 main()
11076 ; return 0; }
11077 EOF
11078 if { (eval echo configure:11079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11079   rm -rf conftest*
11080   eval "ac_cv_lib_$ac_lib_var=yes"
11081 else
11082   echo "configure: failed program was:" >&5
11083   cat conftest.$ac_ext >&5
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=no"
11086 fi
11087 rm -f conftest*
11088 LIBS="$ac_save_LIBS"
11089
11090 fi
11091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093   have_wrappers=yes
11094 else
11095   echo "$ac_t""no" 1>&6
11096 have_wrappers=no
11097 fi
11098
11099         fi
11100
11101         if test $have_wrappers = yes ; then
11102                 cat >> confdefs.h <<\EOF
11103 #define HAVE_TCPD 1
11104 EOF
11105
11106                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11107
11108                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11109 echo "configure:11110: checking for main in -lnsl" >&5
11110 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   ac_save_LIBS="$LIBS"
11115 LIBS="-lnsl  $LIBS"
11116 cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119
11120 int main() {
11121 main()
11122 ; return 0; }
11123 EOF
11124 if { (eval echo configure:11125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11125   rm -rf conftest*
11126   eval "ac_cv_lib_$ac_lib_var=yes"
11127 else
11128   echo "configure: failed program was:" >&5
11129   cat conftest.$ac_ext >&5
11130   rm -rf conftest*
11131   eval "ac_cv_lib_$ac_lib_var=no"
11132 fi
11133 rm -f conftest*
11134 LIBS="$ac_save_LIBS"
11135
11136 fi
11137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11138   echo "$ac_t""yes" 1>&6
11139     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11141   cat >> confdefs.h <<EOF
11142 #define $ac_tr_lib 1
11143 EOF
11144
11145   LIBS="-lnsl $LIBS"
11146
11147 else
11148   echo "$ac_t""no" 1>&6
11149 fi
11150
11151         else
11152                 echo "configure: warning: could not find -lwrap" 1>&2
11153                 if test $ol_enable_wrappers = yes ; then
11154                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11155                 fi
11156
11157                 echo "configure: warning: disabling wrappers support" 1>&2
11158                 ol_enable_wrappers=no
11159         fi
11160 fi
11161
11162 if test $ol_enable_syslog != no ; then
11163         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11164 echo "configure:11165: checking for openlog" >&5
11165 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11166   echo $ac_n "(cached) $ac_c" 1>&6
11167 else
11168   cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 /* System header to define __stub macros and hopefully few prototypes,
11172     which can conflict with char openlog(); below.  */
11173 #include <assert.h>
11174 /* Override any gcc2 internal prototype to avoid an error.  */
11175 /* We use char because int might match the return type of a gcc2
11176     builtin and then its argument prototype would still apply.  */
11177 char openlog();
11178 char (*f)();
11179
11180 int main() {
11181
11182 /* The GNU C library defines this for functions which it implements
11183     to always fail with ENOSYS.  Some functions are actually named
11184     something starting with __ and the normal name is an alias.  */
11185 #if defined (__stub_openlog) || defined (__stub___openlog)
11186 choke me
11187 #else
11188 f = openlog;
11189 #endif
11190
11191 ; return 0; }
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11194   rm -rf conftest*
11195   eval "ac_cv_func_openlog=yes"
11196 else
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -rf conftest*
11200   eval "ac_cv_func_openlog=no"
11201 fi
11202 rm -f conftest*
11203 fi
11204
11205 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11206   echo "$ac_t""yes" 1>&6
11207   :
11208 else
11209   echo "$ac_t""no" 1>&6
11210 fi
11211
11212         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11213                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11214         fi
11215         ol_enable_syslog=$ac_cv_func_openlog
11216 fi
11217
11218 if test $ol_enable_dmalloc != no ; then
11219         for ac_hdr in dmalloc.h
11220 do
11221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11223 echo "configure:11224: checking for $ac_hdr" >&5
11224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11225   echo $ac_n "(cached) $ac_c" 1>&6
11226 else
11227   cat > conftest.$ac_ext <<EOF
11228 #line 11229 "configure"
11229 #include "confdefs.h"
11230 #include <$ac_hdr>
11231 EOF
11232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11233 { (eval echo configure:11234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11235 if test -z "$ac_err"; then
11236   rm -rf conftest*
11237   eval "ac_cv_header_$ac_safe=yes"
11238 else
11239   echo "$ac_err" >&5
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   eval "ac_cv_header_$ac_safe=no"
11244 fi
11245 rm -f conftest*
11246 fi
11247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11250   cat >> confdefs.h <<EOF
11251 #define $ac_tr_hdr 1
11252 EOF
11253  
11254 else
11255   echo "$ac_t""no" 1>&6
11256 fi
11257 done
11258
11259         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11260 echo "configure:11261: checking for dmalloc_shutdown in -ldmalloc" >&5
11261 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11263   echo $ac_n "(cached) $ac_c" 1>&6
11264 else
11265   ac_save_LIBS="$LIBS"
11266 LIBS="-ldmalloc  $LIBS"
11267 cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 /* Override any gcc2 internal prototype to avoid an error.  */
11271 /* We use char because int might match the return type of a gcc2
11272     builtin and then its argument prototype would still apply.  */
11273 char dmalloc_shutdown();
11274
11275 int main() {
11276 dmalloc_shutdown()
11277 ; return 0; }
11278 EOF
11279 if { (eval echo configure:11280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11280   rm -rf conftest*
11281   eval "ac_cv_lib_$ac_lib_var=yes"
11282 else
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -rf conftest*
11286   eval "ac_cv_lib_$ac_lib_var=no"
11287 fi
11288 rm -f conftest*
11289 LIBS="$ac_save_LIBS"
11290
11291 fi
11292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11296   cat >> confdefs.h <<EOF
11297 #define $ac_tr_lib 1
11298 EOF
11299
11300   LIBS="-ldmalloc $LIBS"
11301
11302 else
11303   echo "$ac_t""no" 1>&6
11304 fi
11305
11306 fi
11307
11308 if test $ol_enable_tcl != no ; then
11309         for ac_hdr in tcl.h
11310 do
11311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11313 echo "configure:11314: checking for $ac_hdr" >&5
11314 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11315   echo $ac_n "(cached) $ac_c" 1>&6
11316 else
11317   cat > conftest.$ac_ext <<EOF
11318 #line 11319 "configure"
11319 #include "confdefs.h"
11320 #include <$ac_hdr>
11321 EOF
11322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11323 { (eval echo configure:11324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11325 if test -z "$ac_err"; then
11326   rm -rf conftest*
11327   eval "ac_cv_header_$ac_safe=yes"
11328 else
11329   echo "$ac_err" >&5
11330   echo "configure: failed program was:" >&5
11331   cat conftest.$ac_ext >&5
11332   rm -rf conftest*
11333   eval "ac_cv_header_$ac_safe=no"
11334 fi
11335 rm -f conftest*
11336 fi
11337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11338   echo "$ac_t""yes" 1>&6
11339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11340   cat >> confdefs.h <<EOF
11341 #define $ac_tr_hdr 1
11342 EOF
11343  
11344 else
11345   echo "$ac_t""no" 1>&6
11346 fi
11347 done
11348
11349
11350         if test $ac_cv_header_tcl_h != yes ; then
11351                 have_tcl=no
11352         else
11353                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11354 echo "configure:11355: checking for main in -ltcl" >&5
11355 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11357   echo $ac_n "(cached) $ac_c" 1>&6
11358 else
11359   ac_save_LIBS="$LIBS"
11360 LIBS="-ltcl  $LIBS"
11361 cat > conftest.$ac_ext <<EOF
11362 #line 11363 "configure"
11363 #include "confdefs.h"
11364
11365 int main() {
11366 main()
11367 ; return 0; }
11368 EOF
11369 if { (eval echo configure:11370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11370   rm -rf conftest*
11371   eval "ac_cv_lib_$ac_lib_var=yes"
11372 else
11373   echo "configure: failed program was:" >&5
11374   cat conftest.$ac_ext >&5
11375   rm -rf conftest*
11376   eval "ac_cv_lib_$ac_lib_var=no"
11377 fi
11378 rm -f conftest*
11379 LIBS="$ac_save_LIBS"
11380
11381 fi
11382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11383   echo "$ac_t""yes" 1>&6
11384   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11385 else
11386   echo "$ac_t""no" 1>&6
11387 have_tcl=no
11388 fi
11389
11390
11391                 if test $have_tcl != yes; then
11392                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11393 echo "configure:11394: checking for main in -ltcl7.6" >&5
11394 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11395 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   ac_save_LIBS="$LIBS"
11399 LIBS="-ltcl7.6  $LIBS"
11400 cat > conftest.$ac_ext <<EOF
11401 #line 11402 "configure"
11402 #include "confdefs.h"
11403
11404 int main() {
11405 main()
11406 ; return 0; }
11407 EOF
11408 if { (eval echo configure:11409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11409   rm -rf conftest*
11410   eval "ac_cv_lib_$ac_lib_var=yes"
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   eval "ac_cv_lib_$ac_lib_var=no"
11416 fi
11417 rm -f conftest*
11418 LIBS="$ac_save_LIBS"
11419
11420 fi
11421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11422   echo "$ac_t""yes" 1>&6
11423   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11424 else
11425   echo "$ac_t""no" 1>&6
11426 have_tcl=no
11427 fi
11428
11429                 fi
11430
11431                 if test $have_tcl != yes; then
11432                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11433 echo "configure:11434: checking for main in -ltcl8.0" >&5
11434 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11435 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11436   echo $ac_n "(cached) $ac_c" 1>&6
11437 else
11438   ac_save_LIBS="$LIBS"
11439 LIBS="-ltcl8.0  $LIBS"
11440 cat > conftest.$ac_ext <<EOF
11441 #line 11442 "configure"
11442 #include "confdefs.h"
11443
11444 int main() {
11445 main()
11446 ; return 0; }
11447 EOF
11448 if { (eval echo configure:11449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11449   rm -rf conftest*
11450   eval "ac_cv_lib_$ac_lib_var=yes"
11451 else
11452   echo "configure: failed program was:" >&5
11453   cat conftest.$ac_ext >&5
11454   rm -rf conftest*
11455   eval "ac_cv_lib_$ac_lib_var=no"
11456 fi
11457 rm -f conftest*
11458 LIBS="$ac_save_LIBS"
11459
11460 fi
11461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11462   echo "$ac_t""yes" 1>&6
11463   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11464 else
11465   echo "$ac_t""no" 1>&6
11466 have_tcl=no
11467 fi
11468
11469                 fi
11470         fi
11471
11472         if test $have_tcl != yes ; then
11473                 echo "configure: warning: could not find -ltcl" 1>&2
11474                 if test $ol_enable_tcl = yes ; then
11475                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11476                 fi
11477
11478                 ol_enable_tcl=no
11479         fi
11480 fi
11481
11482 # ud needs termcap (should insert check here)
11483 ol_link_termcap=no
11484 for ac_hdr in termcap.h ncurses.h
11485 do
11486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11488 echo "configure:11489: checking for $ac_hdr" >&5
11489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11490   echo $ac_n "(cached) $ac_c" 1>&6
11491 else
11492   cat > conftest.$ac_ext <<EOF
11493 #line 11494 "configure"
11494 #include "confdefs.h"
11495 #include <$ac_hdr>
11496 EOF
11497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11498 { (eval echo configure:11499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11500 if test -z "$ac_err"; then
11501   rm -rf conftest*
11502   eval "ac_cv_header_$ac_safe=yes"
11503 else
11504   echo "$ac_err" >&5
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   eval "ac_cv_header_$ac_safe=no"
11509 fi
11510 rm -f conftest*
11511 fi
11512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11513   echo "$ac_t""yes" 1>&6
11514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11515   cat >> confdefs.h <<EOF
11516 #define $ac_tr_hdr 1
11517 EOF
11518  
11519 else
11520   echo "$ac_t""no" 1>&6
11521 fi
11522 done
11523
11524
11525 if test $ol_link_termcap = no ; then
11526         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
11527 echo "configure:11528: checking for tputs in -ltermcap" >&5
11528 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
11529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11530   echo $ac_n "(cached) $ac_c" 1>&6
11531 else
11532   ac_save_LIBS="$LIBS"
11533 LIBS="-ltermcap  $LIBS"
11534 cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537 /* Override any gcc2 internal prototype to avoid an error.  */
11538 /* We use char because int might match the return type of a gcc2
11539     builtin and then its argument prototype would still apply.  */
11540 char tputs();
11541
11542 int main() {
11543 tputs()
11544 ; return 0; }
11545 EOF
11546 if { (eval echo configure:11547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11547   rm -rf conftest*
11548   eval "ac_cv_lib_$ac_lib_var=yes"
11549 else
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   eval "ac_cv_lib_$ac_lib_var=no"
11554 fi
11555 rm -f conftest*
11556 LIBS="$ac_save_LIBS"
11557
11558 fi
11559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11560   echo "$ac_t""yes" 1>&6
11561   have_termcap=yes
11562 else
11563   echo "$ac_t""no" 1>&6
11564 have_termcap=no
11565 fi
11566
11567         if test $have_termcap = yes ; then
11568                 cat >> confdefs.h <<\EOF
11569 #define HAVE_TERMCAP 1
11570 EOF
11571
11572                 ol_link_termcap=yes
11573                 TERMCAP_LIBS=-ltermcap
11574         fi
11575 fi
11576
11577 if test $ol_link_termcap = no ; then
11578         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
11579 echo "configure:11580: checking for initscr in -lncurses" >&5
11580 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
11581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   ac_save_LIBS="$LIBS"
11585 LIBS="-lncurses  $LIBS"
11586 cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589 /* Override any gcc2 internal prototype to avoid an error.  */
11590 /* We use char because int might match the return type of a gcc2
11591     builtin and then its argument prototype would still apply.  */
11592 char initscr();
11593
11594 int main() {
11595 initscr()
11596 ; return 0; }
11597 EOF
11598 if { (eval echo configure:11599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11599   rm -rf conftest*
11600   eval "ac_cv_lib_$ac_lib_var=yes"
11601 else
11602   echo "configure: failed program was:" >&5
11603   cat conftest.$ac_ext >&5
11604   rm -rf conftest*
11605   eval "ac_cv_lib_$ac_lib_var=no"
11606 fi
11607 rm -f conftest*
11608 LIBS="$ac_save_LIBS"
11609
11610 fi
11611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11612   echo "$ac_t""yes" 1>&6
11613   have_ncurses=yes
11614 else
11615   echo "$ac_t""no" 1>&6
11616 have_ncurses=no
11617 fi
11618
11619         if test $have_ncurses = yes ; then
11620                 cat >> confdefs.h <<\EOF
11621 #define HAVE_NCURSES 1
11622 EOF
11623
11624                 ol_link_termcap=yes
11625                 TERMCAP_LIBS=-lncurses
11626         fi
11627 fi
11628
11629 if test $ol_link_termcap = no ; then
11630         cat >> confdefs.h <<\EOF
11631 #define NO_TERMCAP 1
11632 EOF
11633
11634         TERMCAP_LIBS=
11635 fi
11636
11637 ol_link_sasl=no
11638 if test $ol_with_cyrus_sasl != no ; then
11639         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
11640 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
11641 echo "configure:11642: checking for sasl.h" >&5
11642 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <sasl.h>
11649 EOF
11650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11651 { (eval echo configure:11652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11653 if test -z "$ac_err"; then
11654   rm -rf conftest*
11655   eval "ac_cv_header_$ac_safe=yes"
11656 else
11657   echo "$ac_err" >&5
11658   echo "configure: failed program was:" >&5
11659   cat conftest.$ac_ext >&5
11660   rm -rf conftest*
11661   eval "ac_cv_header_$ac_safe=no"
11662 fi
11663 rm -f conftest*
11664 fi
11665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11666   echo "$ac_t""yes" 1>&6
11667   :
11668 else
11669   echo "$ac_t""no" 1>&6
11670 fi
11671
11672
11673         if test $ac_cv_header_sasl_h = yes ; then
11674                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
11675 echo "configure:11676: checking for sasl_client_init in -lsasl" >&5
11676 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
11677 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11678   echo $ac_n "(cached) $ac_c" 1>&6
11679 else
11680   ac_save_LIBS="$LIBS"
11681 LIBS="-lsasl  $LIBS"
11682 cat > conftest.$ac_ext <<EOF
11683 #line 11684 "configure"
11684 #include "confdefs.h"
11685 /* Override any gcc2 internal prototype to avoid an error.  */
11686 /* We use char because int might match the return type of a gcc2
11687     builtin and then its argument prototype would still apply.  */
11688 char sasl_client_init();
11689
11690 int main() {
11691 sasl_client_init()
11692 ; return 0; }
11693 EOF
11694 if { (eval echo configure:11695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11695   rm -rf conftest*
11696   eval "ac_cv_lib_$ac_lib_var=yes"
11697 else
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700   rm -rf conftest*
11701   eval "ac_cv_lib_$ac_lib_var=no"
11702 fi
11703 rm -f conftest*
11704 LIBS="$ac_save_LIBS"
11705
11706 fi
11707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11708   echo "$ac_t""yes" 1>&6
11709   have_cyrus_sasl=yes
11710 else
11711   echo "$ac_t""no" 1>&6
11712 have_cyrus_sasl=no
11713 fi
11714
11715
11716                 if test $have_cyrus_sasl != no ; then
11717                         SASL_LIBS="-lsasl"
11718                         cat >> confdefs.h <<\EOF
11719 #define HAVE_CYRUS_SASL 1
11720 EOF
11721
11722                         ol_link_sasl=yes
11723                 fi
11724         fi
11725
11726         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
11727                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
11728         fi
11729 fi
11730
11731 ol_link_fetch=no
11732 if test $ol_with_fetch != no ; then
11733         ol=$LIBS
11734 LIBS="-lfetch -lcom_err $LIBS"
11735 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
11736 echo "configure:11737: checking fetch(3) library" >&5
11737 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
11738   echo $ac_n "(cached) $ac_c" 1>&6
11739 else
11740   
11741         cat > conftest.$ac_ext <<EOF
11742 #line 11743 "configure"
11743 #include "confdefs.h"
11744
11745 #include <sys/param.h>
11746 #include <stdio.h>
11747 #include <fetch.h>
11748 int main() {
11749 struct url *u = fetchParseURL("file:///"); 
11750 ; return 0; }
11751 EOF
11752 if { (eval echo configure:11753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11753   rm -rf conftest*
11754   ol_cv_lib_fetch=yes
11755 else
11756   echo "configure: failed program was:" >&5
11757   cat conftest.$ac_ext >&5
11758   rm -rf conftest*
11759   ol_cv_lib_fetch=no
11760 fi
11761 rm -f conftest*
11762 fi
11763
11764 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
11765 LIBS=$ol_LIBS
11766 if test $ol_cv_lib_fetch != no ; then
11767         ol_link_fetch="-lfetch -lcom_err"
11768         cat >> confdefs.h <<\EOF
11769 #define HAVE_FETCH 1
11770 EOF
11771
11772 fi
11773
11774
11775         if test $ol_cv_lib_fetch != no ; then
11776                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
11777                 ol_link_fetch=freebsd
11778
11779         elif test $ol_with_fetch != auto ; then
11780                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
11781         fi 
11782 fi
11783
11784 ol_link_readline=no
11785 if test $ol_with_readline != no ; then
11786         for ac_hdr in readline/readline.h readline/history.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_readline_readline_h = yes ; then
11828                 save_LIBS="$LIBS"
11829                 LIBS="$TERMCAP_LIBS $LIBS"
11830                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
11831 echo "configure:11832: checking for readline in -lreadline" >&5
11832 ac_lib_var=`echo readline'_'readline | 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="-lreadline  $LIBS"
11838 cat > conftest.$ac_ext <<EOF
11839 #line 11840 "configure"
11840 #include "confdefs.h"
11841 /* Override any gcc2 internal prototype to avoid an error.  */
11842 /* We use char because int might match the return type of a gcc2
11843     builtin and then its argument prototype would still apply.  */
11844 char readline();
11845
11846 int main() {
11847 readline()
11848 ; return 0; }
11849 EOF
11850 if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11851   rm -rf conftest*
11852   eval "ac_cv_lib_$ac_lib_var=yes"
11853 else
11854   echo "configure: failed program was:" >&5
11855   cat conftest.$ac_ext >&5
11856   rm -rf conftest*
11857   eval "ac_cv_lib_$ac_lib_var=no"
11858 fi
11859 rm -f conftest*
11860 LIBS="$ac_save_LIBS"
11861
11862 fi
11863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11864   echo "$ac_t""yes" 1>&6
11865   have_readline=yes
11866 else
11867   echo "$ac_t""no" 1>&6
11868 have_readline=no
11869 fi
11870
11871                 LIBS="$save_LIBS"
11872                         
11873                 if test $have_readline = yes ; then
11874                         ol_with_readline=found
11875                         ol_link_readline=yes
11876
11877                         READLINE_LIBS="-lreadline"
11878                 fi
11879         fi
11880 fi
11881
11882 if test $ol_link_readline = yes ; then
11883         cat >> confdefs.h <<\EOF
11884 #define HAVE_READLINE 1
11885 EOF
11886
11887 fi
11888
11889
11890 # FreeBSD (and others) have crypt(3) in -lcrypt
11891 if test $ol_enable_crypt != no ; then
11892         echo $ac_n "checking for crypt""... $ac_c" 1>&6
11893 echo "configure:11894: checking for crypt" >&5
11894 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
11895   echo $ac_n "(cached) $ac_c" 1>&6
11896 else
11897   cat > conftest.$ac_ext <<EOF
11898 #line 11899 "configure"
11899 #include "confdefs.h"
11900 /* System header to define __stub macros and hopefully few prototypes,
11901     which can conflict with char crypt(); below.  */
11902 #include <assert.h>
11903 /* Override any gcc2 internal prototype to avoid an error.  */
11904 /* We use char because int might match the return type of a gcc2
11905     builtin and then its argument prototype would still apply.  */
11906 char crypt();
11907 char (*f)();
11908
11909 int main() {
11910
11911 /* The GNU C library defines this for functions which it implements
11912     to always fail with ENOSYS.  Some functions are actually named
11913     something starting with __ and the normal name is an alias.  */
11914 #if defined (__stub_crypt) || defined (__stub___crypt)
11915 choke me
11916 #else
11917 f = crypt;
11918 #endif
11919
11920 ; return 0; }
11921 EOF
11922 if { (eval echo configure:11923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11923   rm -rf conftest*
11924   eval "ac_cv_func_crypt=yes"
11925 else
11926   echo "configure: failed program was:" >&5
11927   cat conftest.$ac_ext >&5
11928   rm -rf conftest*
11929   eval "ac_cv_func_crypt=no"
11930 fi
11931 rm -f conftest*
11932 fi
11933
11934 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
11935   echo "$ac_t""yes" 1>&6
11936   have_crypt=yes
11937 else
11938   echo "$ac_t""no" 1>&6
11939
11940                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11941 echo "configure:11942: checking for crypt in -lcrypt" >&5
11942 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
11943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11944   echo $ac_n "(cached) $ac_c" 1>&6
11945 else
11946   ac_save_LIBS="$LIBS"
11947 LIBS="-lcrypt  $LIBS"
11948 cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 /* Override any gcc2 internal prototype to avoid an error.  */
11952 /* We use char because int might match the return type of a gcc2
11953     builtin and then its argument prototype would still apply.  */
11954 char crypt();
11955
11956 int main() {
11957 crypt()
11958 ; return 0; }
11959 EOF
11960 if { (eval echo configure:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11961   rm -rf conftest*
11962   eval "ac_cv_lib_$ac_lib_var=yes"
11963 else
11964   echo "configure: failed program was:" >&5
11965   cat conftest.$ac_ext >&5
11966   rm -rf conftest*
11967   eval "ac_cv_lib_$ac_lib_var=no"
11968 fi
11969 rm -f conftest*
11970 LIBS="$ac_save_LIBS"
11971
11972 fi
11973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11974   echo "$ac_t""yes" 1>&6
11975   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
11976                         have_crypt=yes
11977 else
11978   echo "$ac_t""no" 1>&6
11979 have_crypt=no
11980 fi
11981
11982 fi
11983
11984
11985         if test $have_crypt = yes ; then
11986                 cat >> confdefs.h <<\EOF
11987 #define HAVE_CRYPT 1
11988 EOF
11989
11990         else
11991                 echo "configure: warning: could not find crypt" 1>&2
11992                 if test $ol_enable_crypt = yes ; then
11993                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
11994                 fi
11995
11996                 echo "configure: warning: disabling crypt support" 1>&2
11997                 ol_enable_crypt=no
11998         fi
11999 fi
12000
12001 # FreeBSD (and others) have setproctitle(3) in -lutil
12002 if test $ol_enable_proctitle != no ; then
12003         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12004 echo "configure:12005: checking for setproctitle" >&5
12005 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12006   echo $ac_n "(cached) $ac_c" 1>&6
12007 else
12008   cat > conftest.$ac_ext <<EOF
12009 #line 12010 "configure"
12010 #include "confdefs.h"
12011 /* System header to define __stub macros and hopefully few prototypes,
12012     which can conflict with char setproctitle(); below.  */
12013 #include <assert.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 setproctitle();
12018 char (*f)();
12019
12020 int main() {
12021
12022 /* The GNU C library defines this for functions which it implements
12023     to always fail with ENOSYS.  Some functions are actually named
12024     something starting with __ and the normal name is an alias.  */
12025 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12026 choke me
12027 #else
12028 f = setproctitle;
12029 #endif
12030
12031 ; return 0; }
12032 EOF
12033 if { (eval echo configure:12034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12034   rm -rf conftest*
12035   eval "ac_cv_func_setproctitle=yes"
12036 else
12037   echo "configure: failed program was:" >&5
12038   cat conftest.$ac_ext >&5
12039   rm -rf conftest*
12040   eval "ac_cv_func_setproctitle=no"
12041 fi
12042 rm -f conftest*
12043 fi
12044
12045 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12046   echo "$ac_t""yes" 1>&6
12047   have_setproctitle=yes
12048 else
12049   echo "$ac_t""no" 1>&6
12050
12051                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12052 echo "configure:12053: checking for setproctitle in -lutil" >&5
12053 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12055   echo $ac_n "(cached) $ac_c" 1>&6
12056 else
12057   ac_save_LIBS="$LIBS"
12058 LIBS="-lutil  $LIBS"
12059 cat > conftest.$ac_ext <<EOF
12060 #line 12061 "configure"
12061 #include "confdefs.h"
12062 /* Override any gcc2 internal prototype to avoid an error.  */
12063 /* We use char because int might match the return type of a gcc2
12064     builtin and then its argument prototype would still apply.  */
12065 char setproctitle();
12066
12067 int main() {
12068 setproctitle()
12069 ; return 0; }
12070 EOF
12071 if { (eval echo configure:12072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12072   rm -rf conftest*
12073   eval "ac_cv_lib_$ac_lib_var=yes"
12074 else
12075   echo "configure: failed program was:" >&5
12076   cat conftest.$ac_ext >&5
12077   rm -rf conftest*
12078   eval "ac_cv_lib_$ac_lib_var=no"
12079 fi
12080 rm -f conftest*
12081 LIBS="$ac_save_LIBS"
12082
12083 fi
12084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12085   echo "$ac_t""yes" 1>&6
12086   have_setproctitle=yes
12087                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12088 else
12089   echo "$ac_t""no" 1>&6
12090 have_setproctitle=no
12091                         LIBOBJS="$LIBOBJS setproctitle.o"
12092 fi
12093
12094 fi
12095
12096
12097         if test $have_setproctitle = yes ; then
12098                 cat >> confdefs.h <<\EOF
12099 #define HAVE_SETPROCTITLE 1
12100 EOF
12101
12102         fi
12103 fi
12104
12105 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12106 echo "configure:12107: checking for uid_t in sys/types.h" >&5
12107 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12108   echo $ac_n "(cached) $ac_c" 1>&6
12109 else
12110   cat > conftest.$ac_ext <<EOF
12111 #line 12112 "configure"
12112 #include "confdefs.h"
12113 #include <sys/types.h>
12114 EOF
12115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12116   egrep "uid_t" >/dev/null 2>&1; then
12117   rm -rf conftest*
12118   ac_cv_type_uid_t=yes
12119 else
12120   rm -rf conftest*
12121   ac_cv_type_uid_t=no
12122 fi
12123 rm -f conftest*
12124
12125 fi
12126
12127 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12128 if test $ac_cv_type_uid_t = no; then
12129   cat >> confdefs.h <<\EOF
12130 #define uid_t int
12131 EOF
12132
12133   cat >> confdefs.h <<\EOF
12134 #define gid_t int
12135 EOF
12136
12137 fi
12138
12139 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12140 echo "configure:12141: checking type of array argument to getgroups" >&5
12141 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12142   echo $ac_n "(cached) $ac_c" 1>&6
12143 else
12144   if test "$cross_compiling" = yes; then
12145   ac_cv_type_getgroups=cross
12146 else
12147   cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150
12151 /* Thanks to Mike Rendell for this test.  */
12152 #include <sys/types.h>
12153 #define NGID 256
12154 #undef MAX
12155 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12156 main()
12157 {
12158   gid_t gidset[NGID];
12159   int i, n;
12160   union { gid_t gval; long lval; }  val;
12161
12162   val.lval = -1;
12163   for (i = 0; i < NGID; i++)
12164     gidset[i] = val.gval;
12165   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12166                  gidset);
12167   /* Exit non-zero if getgroups seems to require an array of ints.  This
12168      happens when gid_t is short but getgroups modifies an array of ints.  */
12169   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12170 }
12171
12172 EOF
12173 if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12174 then
12175     ac_cv_type_getgroups=gid_t
12176 else
12177   echo "configure: failed program was:" >&5
12178   cat conftest.$ac_ext >&5
12179   rm -fr conftest*
12180   ac_cv_type_getgroups=int
12181 fi
12182 rm -fr conftest*
12183 fi
12184
12185 if test $ac_cv_type_getgroups = cross; then
12186         cat > conftest.$ac_ext <<EOF
12187 #line 12188 "configure"
12188 #include "confdefs.h"
12189 #include <unistd.h>
12190 EOF
12191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12192   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12193   rm -rf conftest*
12194   ac_cv_type_getgroups=gid_t
12195 else
12196   rm -rf conftest*
12197   ac_cv_type_getgroups=int
12198 fi
12199 rm -f conftest*
12200
12201 fi
12202 fi
12203
12204 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12205 cat >> confdefs.h <<EOF
12206 #define GETGROUPS_T $ac_cv_type_getgroups
12207 EOF
12208
12209  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12210 echo "configure:12211: checking for ANSI C header files" >&5
12211 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12212   echo $ac_n "(cached) $ac_c" 1>&6
12213 else
12214   cat > conftest.$ac_ext <<EOF
12215 #line 12216 "configure"
12216 #include "confdefs.h"
12217 #include <stdlib.h>
12218 #include <stdarg.h>
12219 #include <string.h>
12220 #include <float.h>
12221 EOF
12222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12223 { (eval echo configure:12224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12225 if test -z "$ac_err"; then
12226   rm -rf conftest*
12227   ac_cv_header_stdc=yes
12228 else
12229   echo "$ac_err" >&5
12230   echo "configure: failed program was:" >&5
12231   cat conftest.$ac_ext >&5
12232   rm -rf conftest*
12233   ac_cv_header_stdc=no
12234 fi
12235 rm -f conftest*
12236
12237 if test $ac_cv_header_stdc = yes; then
12238   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12239 cat > conftest.$ac_ext <<EOF
12240 #line 12241 "configure"
12241 #include "confdefs.h"
12242 #include <string.h>
12243 EOF
12244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12245   egrep "memchr" >/dev/null 2>&1; then
12246   :
12247 else
12248   rm -rf conftest*
12249   ac_cv_header_stdc=no
12250 fi
12251 rm -f conftest*
12252
12253 fi
12254
12255 if test $ac_cv_header_stdc = yes; then
12256   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12257 cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 #include <stdlib.h>
12261 EOF
12262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12263   egrep "free" >/dev/null 2>&1; then
12264   :
12265 else
12266   rm -rf conftest*
12267   ac_cv_header_stdc=no
12268 fi
12269 rm -f conftest*
12270
12271 fi
12272
12273 if test $ac_cv_header_stdc = yes; then
12274   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12275 if test "$cross_compiling" = yes; then
12276   :
12277 else
12278   cat > conftest.$ac_ext <<EOF
12279 #line 12280 "configure"
12280 #include "confdefs.h"
12281 #include <ctype.h>
12282 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12283 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12284 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12285 int main () { int i; for (i = 0; i < 256; i++)
12286 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12287 exit (0); }
12288
12289 EOF
12290 if { (eval echo configure:12291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12291 then
12292   :
12293 else
12294   echo "configure: failed program was:" >&5
12295   cat conftest.$ac_ext >&5
12296   rm -fr conftest*
12297   ac_cv_header_stdc=no
12298 fi
12299 rm -fr conftest*
12300 fi
12301
12302 fi
12303 fi
12304
12305 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12306 if test $ac_cv_header_stdc = yes; then
12307   cat >> confdefs.h <<\EOF
12308 #define STDC_HEADERS 1
12309 EOF
12310
12311 fi
12312
12313 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12314 echo "configure:12315: checking for mode_t" >&5
12315 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12316   echo $ac_n "(cached) $ac_c" 1>&6
12317 else
12318   cat > conftest.$ac_ext <<EOF
12319 #line 12320 "configure"
12320 #include "confdefs.h"
12321 #include <sys/types.h>
12322 #if STDC_HEADERS
12323 #include <stdlib.h>
12324 #include <stddef.h>
12325 #endif
12326 EOF
12327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12328   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12329   rm -rf conftest*
12330   eval "ac_cv_type_mode_t=yes"
12331 else
12332   rm -rf conftest*
12333   eval "ac_cv_type_mode_t=no"
12334 fi
12335 rm -f conftest*
12336
12337 fi
12338 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12339   echo "$ac_t""yes" 1>&6
12340 else
12341   echo "$ac_t""no" 1>&6
12342   cat >> confdefs.h <<EOF
12343 #define mode_t int
12344 EOF
12345
12346 fi
12347
12348 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12349 echo "configure:12350: checking for off_t" >&5
12350 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12351   echo $ac_n "(cached) $ac_c" 1>&6
12352 else
12353   cat > conftest.$ac_ext <<EOF
12354 #line 12355 "configure"
12355 #include "confdefs.h"
12356 #include <sys/types.h>
12357 #if STDC_HEADERS
12358 #include <stdlib.h>
12359 #include <stddef.h>
12360 #endif
12361 EOF
12362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12363   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12364   rm -rf conftest*
12365   eval "ac_cv_type_off_t=yes"
12366 else
12367   rm -rf conftest*
12368   eval "ac_cv_type_off_t=no"
12369 fi
12370 rm -f conftest*
12371
12372 fi
12373 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12374   echo "$ac_t""yes" 1>&6
12375 else
12376   echo "$ac_t""no" 1>&6
12377   cat >> confdefs.h <<EOF
12378 #define off_t long
12379 EOF
12380
12381 fi
12382
12383 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12384 echo "configure:12385: checking for pid_t" >&5
12385 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12386   echo $ac_n "(cached) $ac_c" 1>&6
12387 else
12388   cat > conftest.$ac_ext <<EOF
12389 #line 12390 "configure"
12390 #include "confdefs.h"
12391 #include <sys/types.h>
12392 #if STDC_HEADERS
12393 #include <stdlib.h>
12394 #include <stddef.h>
12395 #endif
12396 EOF
12397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12398   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12399   rm -rf conftest*
12400   eval "ac_cv_type_pid_t=yes"
12401 else
12402   rm -rf conftest*
12403   eval "ac_cv_type_pid_t=no"
12404 fi
12405 rm -f conftest*
12406
12407 fi
12408 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12409   echo "$ac_t""yes" 1>&6
12410 else
12411   echo "$ac_t""no" 1>&6
12412   cat >> confdefs.h <<EOF
12413 #define pid_t int
12414 EOF
12415
12416 fi
12417
12418 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12419 echo "configure:12420: checking for ptrdiff_t" >&5
12420 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12421   echo $ac_n "(cached) $ac_c" 1>&6
12422 else
12423   cat > conftest.$ac_ext <<EOF
12424 #line 12425 "configure"
12425 #include "confdefs.h"
12426 #include <stddef.h>
12427 int main() {
12428 ptrdiff_t p
12429 ; return 0; }
12430 EOF
12431 if { (eval echo configure:12432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12432   rm -rf conftest*
12433   am_cv_type_ptrdiff_t=yes
12434 else
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -rf conftest*
12438   am_cv_type_ptrdiff_t=no
12439 fi
12440 rm -f conftest*
12441 fi
12442
12443 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12444    if test $am_cv_type_ptrdiff_t = yes; then
12445      cat >> confdefs.h <<\EOF
12446 #define HAVE_PTRDIFF_T 1
12447 EOF
12448
12449    fi
12450
12451 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12452 echo "configure:12453: checking return type of signal handlers" >&5
12453 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12454   echo $ac_n "(cached) $ac_c" 1>&6
12455 else
12456   cat > conftest.$ac_ext <<EOF
12457 #line 12458 "configure"
12458 #include "confdefs.h"
12459 #include <sys/types.h>
12460 #include <signal.h>
12461 #ifdef signal
12462 #undef signal
12463 #endif
12464 #ifdef __cplusplus
12465 extern "C" void (*signal (int, void (*)(int)))(int);
12466 #else
12467 void (*signal ()) ();
12468 #endif
12469
12470 int main() {
12471 int i;
12472 ; return 0; }
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12475   rm -rf conftest*
12476   ac_cv_type_signal=void
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   ac_cv_type_signal=int
12482 fi
12483 rm -f conftest*
12484 fi
12485
12486 echo "$ac_t""$ac_cv_type_signal" 1>&6
12487 cat >> confdefs.h <<EOF
12488 #define RETSIGTYPE $ac_cv_type_signal
12489 EOF
12490
12491
12492 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12493 echo "configure:12494: checking for sig_atomic_t" >&5
12494 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12495   echo $ac_n "(cached) $ac_c" 1>&6
12496 else
12497   cat > conftest.$ac_ext <<EOF
12498 #line 12499 "configure"
12499 #include "confdefs.h"
12500 #include <signal.h>
12501 int main() {
12502 sig_atomic_t atomic;
12503 ; return 0; }
12504 EOF
12505 if { (eval echo configure:12506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12506   rm -rf conftest*
12507   ol_cv_type_sig_atomic_t=yes
12508 else
12509   echo "configure: failed program was:" >&5
12510   cat conftest.$ac_ext >&5
12511   rm -rf conftest*
12512   ol_cv_type_sig_atomic_t=no
12513 fi
12514 rm -f conftest*
12515 fi
12516
12517 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12518   if test $ol_cv_type_sig_atomic_t = no; then
12519     cat >> confdefs.h <<\EOF
12520 #define sig_atomic_t int
12521 EOF
12522
12523   fi
12524  
12525 echo $ac_n "checking for size_t""... $ac_c" 1>&6
12526 echo "configure:12527: checking for size_t" >&5
12527 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
12528   echo $ac_n "(cached) $ac_c" 1>&6
12529 else
12530   cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 #include <sys/types.h>
12534 #if STDC_HEADERS
12535 #include <stdlib.h>
12536 #include <stddef.h>
12537 #endif
12538 EOF
12539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12540   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12541   rm -rf conftest*
12542   eval "ac_cv_type_size_t=yes"
12543 else
12544   rm -rf conftest*
12545   eval "ac_cv_type_size_t=no"
12546 fi
12547 rm -f conftest*
12548
12549 fi
12550 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
12551   echo "$ac_t""yes" 1>&6
12552 else
12553   echo "$ac_t""no" 1>&6
12554   cat >> confdefs.h <<EOF
12555 #define size_t unsigned
12556 EOF
12557
12558 fi
12559
12560 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
12561 echo "configure:12562: checking for socklen_t" >&5
12562 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
12563   echo $ac_n "(cached) $ac_c" 1>&6
12564 else
12565   cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568
12569 #ifdef HAVE_SYS_TYPES_H
12570 #include <sys/types.h>
12571 #endif
12572 #ifdef HAVE_SYS_SOCKET_H
12573 #include <sys/socket.h>
12574 #endif
12575
12576 int main() {
12577 socklen_t len;
12578 ; return 0; }
12579 EOF
12580 if { (eval echo configure:12581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12581   rm -rf conftest*
12582   ol_cv_type_socklen_t=yes
12583 else
12584   echo "configure: failed program was:" >&5
12585   cat conftest.$ac_ext >&5
12586   rm -rf conftest*
12587   ol_cv_type_socklen_t=no
12588 fi
12589 rm -f conftest*
12590 fi
12591
12592 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
12593   if test $ol_cv_type_socklen_t = no; then
12594     cat >> confdefs.h <<\EOF
12595 #define socklen_t int
12596 EOF
12597
12598   fi
12599  
12600 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
12601 echo "configure:12602: checking for member st_blksize in aggregate type struct stat" >&5
12602 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
12603   echo $ac_n "(cached) $ac_c" 1>&6
12604 else
12605   cat > conftest.$ac_ext <<EOF
12606 #line 12607 "configure"
12607 #include "confdefs.h"
12608 #include <sys/types.h>
12609 #include <sys/stat.h>
12610 int main() {
12611 struct stat foo; foo.st_blksize;
12612 ; return 0; }
12613 EOF
12614 if { (eval echo configure:12615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12615   rm -rf conftest*
12616   ac_cv_c_struct_member_st_blksize=yes
12617 else
12618   echo "configure: failed program was:" >&5
12619   cat conftest.$ac_ext >&5
12620   rm -rf conftest*
12621   ac_cv_c_struct_member_st_blksize=no
12622 fi
12623 rm -f conftest*
12624 fi
12625
12626 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
12627 st_blksize="$ac_cv_c_struct_member_st_blksize"
12628 if test $ac_cv_c_struct_member_st_blksize = yes; then
12629   cat >> confdefs.h <<\EOF
12630 #define HAVE_ST_BLKSIZE 1
12631 EOF
12632
12633 fi
12634
12635 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
12636 echo "configure:12637: checking whether time.h and sys/time.h may both be included" >&5
12637 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
12638   echo $ac_n "(cached) $ac_c" 1>&6
12639 else
12640   cat > conftest.$ac_ext <<EOF
12641 #line 12642 "configure"
12642 #include "confdefs.h"
12643 #include <sys/types.h>
12644 #include <sys/time.h>
12645 #include <time.h>
12646 int main() {
12647 struct tm *tp;
12648 ; return 0; }
12649 EOF
12650 if { (eval echo configure:12651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12651   rm -rf conftest*
12652   ac_cv_header_time=yes
12653 else
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -rf conftest*
12657   ac_cv_header_time=no
12658 fi
12659 rm -f conftest*
12660 fi
12661
12662 echo "$ac_t""$ac_cv_header_time" 1>&6
12663 if test $ac_cv_header_time = yes; then
12664   cat >> confdefs.h <<\EOF
12665 #define TIME_WITH_SYS_TIME 1
12666 EOF
12667
12668 fi
12669
12670 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
12671 echo "configure:12672: checking whether struct tm is in sys/time.h or time.h" >&5
12672 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
12673   echo $ac_n "(cached) $ac_c" 1>&6
12674 else
12675   cat > conftest.$ac_ext <<EOF
12676 #line 12677 "configure"
12677 #include "confdefs.h"
12678 #include <sys/types.h>
12679 #include <time.h>
12680 int main() {
12681 struct tm *tp; tp->tm_sec;
12682 ; return 0; }
12683 EOF
12684 if { (eval echo configure:12685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12685   rm -rf conftest*
12686   ac_cv_struct_tm=time.h
12687 else
12688   echo "configure: failed program was:" >&5
12689   cat conftest.$ac_ext >&5
12690   rm -rf conftest*
12691   ac_cv_struct_tm=sys/time.h
12692 fi
12693 rm -f conftest*
12694 fi
12695
12696 echo "$ac_t""$ac_cv_struct_tm" 1>&6
12697 if test $ac_cv_struct_tm = sys/time.h; then
12698   cat >> confdefs.h <<\EOF
12699 #define TM_IN_SYS_TIME 1
12700 EOF
12701
12702 fi
12703
12704 # test for pw_gecos in struct passwd
12705 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
12706 echo "configure:12707: checking struct passwd for pw_gecos" >&5
12707 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
12708   echo $ac_n "(cached) $ac_c" 1>&6
12709 else
12710   
12711         cat > conftest.$ac_ext <<EOF
12712 #line 12713 "configure"
12713 #include "confdefs.h"
12714 #include <pwd.h>
12715 int main() {
12716
12717         struct passwd pwd;
12718         pwd.pw_gecos = pwd.pw_name;
12719
12720 ; return 0; }
12721 EOF
12722 if { (eval echo configure:12723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12723   rm -rf conftest*
12724   ol_cv_struct_passwd_pw_gecos=yes
12725 else
12726   echo "configure: failed program was:" >&5
12727   cat conftest.$ac_ext >&5
12728   rm -rf conftest*
12729   ol_cv_struct_passwd_pw_gecos=no
12730 fi
12731 rm -f conftest*
12732 fi
12733
12734 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
12735 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
12736         cat >> confdefs.h <<\EOF
12737 #define HAVE_PW_GECOS 1
12738 EOF
12739
12740 fi
12741
12742 # test for pw_passwd in struct passwd
12743 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
12744 echo "configure:12745: checking struct passwd for pw_passwd" >&5
12745 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
12746   echo $ac_n "(cached) $ac_c" 1>&6
12747 else
12748   
12749         cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 #include <pwd.h>
12753 int main() {
12754
12755         struct passwd pwd;
12756         pwd.pw_passwd = pwd.pw_name;
12757
12758 ; return 0; }
12759 EOF
12760 if { (eval echo configure:12761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12761   rm -rf conftest*
12762   ol_cv_struct_passwd_pw_passwd=yes
12763 else
12764   echo "configure: failed program was:" >&5
12765   cat conftest.$ac_ext >&5
12766   rm -rf conftest*
12767   ol_cv_struct_passwd_pw_passwd=no
12768 fi
12769 rm -f conftest*
12770 fi
12771
12772 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
12773 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
12774         cat >> confdefs.h <<\EOF
12775 #define HAVE_PW_PASSWD 1
12776 EOF
12777
12778 fi
12779
12780
12781 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
12782 echo "configure:12783: checking if toupper() requires islower()" >&5
12783 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
12784   echo $ac_n "(cached) $ac_c" 1>&6
12785 else
12786   
12787         if test "$cross_compiling" = yes; then
12788   ol_cv_c_upper_lower=safe
12789 else
12790   cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793
12794 #include <ctype.h>
12795 main()
12796 {
12797         if ('C' == toupper('C'))
12798                 exit(0);
12799         else
12800                 exit(1);
12801 }
12802 EOF
12803 if { (eval echo configure:12804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12804 then
12805   ol_cv_c_upper_lower=no
12806 else
12807   echo "configure: failed program was:" >&5
12808   cat conftest.$ac_ext >&5
12809   rm -fr conftest*
12810   ol_cv_c_upper_lower=yes
12811 fi
12812 rm -fr conftest*
12813 fi
12814
12815 fi
12816
12817 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
12818 if test $ol_cv_c_upper_lower != no ; then
12819         cat >> confdefs.h <<\EOF
12820 #define C_UPPER_LOWER 1
12821 EOF
12822
12823 fi
12824
12825 echo $ac_n "checking for working const""... $ac_c" 1>&6
12826 echo "configure:12827: checking for working const" >&5
12827 if eval "test \"\${ac_cv_c_const+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
12834 int main() {
12835
12836 /* Ultrix mips cc rejects this.  */
12837 typedef int charset[2]; const charset x;
12838 /* SunOS 4.1.1 cc rejects this.  */
12839 char const *const *ccp;
12840 char **p;
12841 /* NEC SVR4.0.2 mips cc rejects this.  */
12842 struct point {int x, y;};
12843 static struct point const zero = {0,0};
12844 /* AIX XL C 1.02.0.0 rejects this.
12845    It does not let you subtract one const X* pointer from another in an arm
12846    of an if-expression whose if-part is not a constant expression */
12847 const char *g = "string";
12848 ccp = &g + (g ? g-g : 0);
12849 /* HPUX 7.0 cc rejects these. */
12850 ++ccp;
12851 p = (char**) ccp;
12852 ccp = (char const *const *) p;
12853 { /* SCO 3.2v4 cc rejects this.  */
12854   char *t;
12855   char const *s = 0 ? (char *) 0 : (char const *) 0;
12856
12857   *t++ = 0;
12858 }
12859 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12860   int x[] = {25, 17};
12861   const int *foo = &x[0];
12862   ++foo;
12863 }
12864 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12865   typedef const int *iptr;
12866   iptr p = 0;
12867   ++p;
12868 }
12869 { /* AIX XL C 1.02.0.0 rejects this saying
12870      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12871   struct s { int j; const int *ap[3]; };
12872   struct s *b; b->j = 5;
12873 }
12874 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12875   const int foo = 10;
12876 }
12877
12878 ; return 0; }
12879 EOF
12880 if { (eval echo configure:12881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12881   rm -rf conftest*
12882   ac_cv_c_const=yes
12883 else
12884   echo "configure: failed program was:" >&5
12885   cat conftest.$ac_ext >&5
12886   rm -rf conftest*
12887   ac_cv_c_const=no
12888 fi
12889 rm -f conftest*
12890 fi
12891
12892 echo "$ac_t""$ac_cv_c_const" 1>&6
12893 if test $ac_cv_c_const = no; then
12894   cat >> confdefs.h <<\EOF
12895 #define const 
12896 EOF
12897
12898 fi
12899
12900 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
12901 echo "configure:12902: checking if compiler understands volatile" >&5
12902 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
12903   echo $ac_n "(cached) $ac_c" 1>&6
12904 else
12905   cat > conftest.$ac_ext <<EOF
12906 #line 12907 "configure"
12907 #include "confdefs.h"
12908 int x, y, z;
12909 int main() {
12910 volatile int a; int * volatile b = x ? &y : &z;
12911       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
12912       *b = 0;
12913 ; return 0; }
12914 EOF
12915 if { (eval echo configure:12916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12916   rm -rf conftest*
12917   ol_cv_c_volatile=yes
12918 else
12919   echo "configure: failed program was:" >&5
12920   cat conftest.$ac_ext >&5
12921   rm -rf conftest*
12922   ol_cv_c_volatile=no
12923 fi
12924 rm -f conftest*
12925 fi
12926
12927 echo "$ac_t""$ol_cv_c_volatile" 1>&6
12928   if test $ol_cv_c_volatile = yes; then
12929     : 
12930   else
12931     cat >> confdefs.h <<\EOF
12932 #define volatile 
12933 EOF
12934
12935   fi
12936  
12937
12938 if test $cross_compiling = yes ; then
12939         cat >> confdefs.h <<\EOF
12940 #define CROSS_COMPILING 1
12941 EOF
12942
12943
12944         cat >> confdefs.h <<\EOF
12945 #define LBER_INT_T long
12946 EOF
12947
12948         cat >> confdefs.h <<\EOF
12949 #define LBER_TAG_T long
12950 EOF
12951
12952         cat >> confdefs.h <<\EOF
12953 #define LBER_SOCKET_T int
12954 EOF
12955
12956
12957 else
12958         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
12959 echo "configure:12960: checking whether byte ordering is bigendian" >&5
12960 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
12961   echo $ac_n "(cached) $ac_c" 1>&6
12962 else
12963   ac_cv_c_bigendian=unknown
12964 # See if sys/param.h defines the BYTE_ORDER macro.
12965 cat > conftest.$ac_ext <<EOF
12966 #line 12967 "configure"
12967 #include "confdefs.h"
12968 #include <sys/types.h>
12969 #include <sys/param.h>
12970 int main() {
12971
12972 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
12973  bogus endian macros
12974 #endif
12975 ; return 0; }
12976 EOF
12977 if { (eval echo configure:12978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12978   rm -rf conftest*
12979   # It does; now see whether it defined to BIG_ENDIAN or not.
12980 cat > conftest.$ac_ext <<EOF
12981 #line 12982 "configure"
12982 #include "confdefs.h"
12983 #include <sys/types.h>
12984 #include <sys/param.h>
12985 int main() {
12986
12987 #if BYTE_ORDER != BIG_ENDIAN
12988  not big endian
12989 #endif
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12993   rm -rf conftest*
12994   ac_cv_c_bigendian=yes
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   ac_cv_c_bigendian=no
13000 fi
13001 rm -f conftest*
13002 else
13003   echo "configure: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005 fi
13006 rm -f conftest*
13007 if test $ac_cv_c_bigendian = unknown; then
13008 if test "$cross_compiling" = yes; then
13009     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13010 else
13011   cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 main () {
13015   /* Are we little or big endian?  From Harbison&Steele.  */
13016   union
13017   {
13018     long l;
13019     char c[sizeof (long)];
13020   } u;
13021   u.l = 1;
13022   exit (u.c[sizeof (long) - 1] == 1);
13023 }
13024 EOF
13025 if { (eval echo configure:13026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13026 then
13027   ac_cv_c_bigendian=no
13028 else
13029   echo "configure: failed program was:" >&5
13030   cat conftest.$ac_ext >&5
13031   rm -fr conftest*
13032   ac_cv_c_bigendian=yes
13033 fi
13034 rm -fr conftest*
13035 fi
13036
13037 fi
13038 fi
13039
13040 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13041 if test $ac_cv_c_bigendian = yes; then
13042   cat >> confdefs.h <<\EOF
13043 #define WORDS_BIGENDIAN 1
13044 EOF
13045
13046 fi
13047
13048         echo $ac_n "checking size of short""... $ac_c" 1>&6
13049 echo "configure:13050: checking size of short" >&5
13050 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13051   echo $ac_n "(cached) $ac_c" 1>&6
13052 else
13053   if test "$cross_compiling" = yes; then
13054     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13055 else
13056   cat > conftest.$ac_ext <<EOF
13057 #line 13058 "configure"
13058 #include "confdefs.h"
13059 #include <stdio.h>
13060 main()
13061 {
13062   FILE *f=fopen("conftestval", "w");
13063   if (!f) exit(1);
13064   fprintf(f, "%d\n", sizeof(short));
13065   exit(0);
13066 }
13067 EOF
13068 if { (eval echo configure:13069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13069 then
13070   ac_cv_sizeof_short=`cat conftestval`
13071 else
13072   echo "configure: failed program was:" >&5
13073   cat conftest.$ac_ext >&5
13074   rm -fr conftest*
13075   ac_cv_sizeof_short=0
13076 fi
13077 rm -fr conftest*
13078 fi
13079
13080 fi
13081 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13082 cat >> confdefs.h <<EOF
13083 #define SIZEOF_SHORT $ac_cv_sizeof_short
13084 EOF
13085
13086  
13087         echo $ac_n "checking size of int""... $ac_c" 1>&6
13088 echo "configure:13089: checking size of int" >&5
13089 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13090   echo $ac_n "(cached) $ac_c" 1>&6
13091 else
13092   if test "$cross_compiling" = yes; then
13093     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13094 else
13095   cat > conftest.$ac_ext <<EOF
13096 #line 13097 "configure"
13097 #include "confdefs.h"
13098 #include <stdio.h>
13099 main()
13100 {
13101   FILE *f=fopen("conftestval", "w");
13102   if (!f) exit(1);
13103   fprintf(f, "%d\n", sizeof(int));
13104   exit(0);
13105 }
13106 EOF
13107 if { (eval echo configure:13108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13108 then
13109   ac_cv_sizeof_int=`cat conftestval`
13110 else
13111   echo "configure: failed program was:" >&5
13112   cat conftest.$ac_ext >&5
13113   rm -fr conftest*
13114   ac_cv_sizeof_int=0
13115 fi
13116 rm -fr conftest*
13117 fi
13118
13119 fi
13120 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13121 cat >> confdefs.h <<EOF
13122 #define SIZEOF_INT $ac_cv_sizeof_int
13123 EOF
13124
13125  
13126         echo $ac_n "checking size of long""... $ac_c" 1>&6
13127 echo "configure:13128: checking size of long" >&5
13128 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13129   echo $ac_n "(cached) $ac_c" 1>&6
13130 else
13131   if test "$cross_compiling" = yes; then
13132     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13133 else
13134   cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 #include <stdio.h>
13138 main()
13139 {
13140   FILE *f=fopen("conftestval", "w");
13141   if (!f) exit(1);
13142   fprintf(f, "%d\n", sizeof(long));
13143   exit(0);
13144 }
13145 EOF
13146 if { (eval echo configure:13147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13147 then
13148   ac_cv_sizeof_long=`cat conftestval`
13149 else
13150   echo "configure: failed program was:" >&5
13151   cat conftest.$ac_ext >&5
13152   rm -fr conftest*
13153   ac_cv_sizeof_long=0
13154 fi
13155 rm -fr conftest*
13156 fi
13157
13158 fi
13159 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13160 cat >> confdefs.h <<EOF
13161 #define SIZEOF_LONG $ac_cv_sizeof_long
13162 EOF
13163
13164
13165
13166         if test "$ac_cv_sizeof_int" -lt 4 ; then
13167                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13168
13169                 cat >> confdefs.h <<\EOF
13170 #define LBER_INT_T long
13171 EOF
13172
13173                 cat >> confdefs.h <<\EOF
13174 #define LBER_TAG_T long
13175 EOF
13176
13177                 cat >> confdefs.h <<\EOF
13178 #define LBER_SOCKET_T int
13179 EOF
13180
13181         else
13182                 cat >> confdefs.h <<\EOF
13183 #define LBER_INT_T int
13184 EOF
13185
13186                 cat >> confdefs.h <<\EOF
13187 #define LBER_TAG_T long
13188 EOF
13189
13190                 cat >> confdefs.h <<\EOF
13191 #define LBER_SOCKET_T int
13192 EOF
13193
13194         fi
13195 fi
13196
13197 cat >> confdefs.h <<\EOF
13198 #define LBER_LEN_T long
13199 EOF
13200
13201
13202 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13203 echo "configure:13204: checking for 8-bit clean memcmp" >&5
13204 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13205   echo $ac_n "(cached) $ac_c" 1>&6
13206 else
13207   if test "$cross_compiling" = yes; then
13208   ac_cv_func_memcmp_clean=no
13209 else
13210   cat > conftest.$ac_ext <<EOF
13211 #line 13212 "configure"
13212 #include "confdefs.h"
13213
13214 main()
13215 {
13216   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13217   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13218 }
13219
13220 EOF
13221 if { (eval echo configure:13222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13222 then
13223   ac_cv_func_memcmp_clean=yes
13224 else
13225   echo "configure: failed program was:" >&5
13226   cat conftest.$ac_ext >&5
13227   rm -fr conftest*
13228   ac_cv_func_memcmp_clean=no
13229 fi
13230 rm -fr conftest*
13231 fi
13232
13233 fi
13234
13235 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13236 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13237
13238 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13239 echo "configure:13240: checking for strftime" >&5
13240 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13241   echo $ac_n "(cached) $ac_c" 1>&6
13242 else
13243   cat > conftest.$ac_ext <<EOF
13244 #line 13245 "configure"
13245 #include "confdefs.h"
13246 /* System header to define __stub macros and hopefully few prototypes,
13247     which can conflict with char strftime(); below.  */
13248 #include <assert.h>
13249 /* Override any gcc2 internal prototype to avoid an error.  */
13250 /* We use char because int might match the return type of a gcc2
13251     builtin and then its argument prototype would still apply.  */
13252 char strftime();
13253 char (*f)();
13254
13255 int main() {
13256
13257 /* The GNU C library defines this for functions which it implements
13258     to always fail with ENOSYS.  Some functions are actually named
13259     something starting with __ and the normal name is an alias.  */
13260 #if defined (__stub_strftime) || defined (__stub___strftime)
13261 choke me
13262 #else
13263 f = strftime;
13264 #endif
13265
13266 ; return 0; }
13267 EOF
13268 if { (eval echo configure:13269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13269   rm -rf conftest*
13270   eval "ac_cv_func_strftime=yes"
13271 else
13272   echo "configure: failed program was:" >&5
13273   cat conftest.$ac_ext >&5
13274   rm -rf conftest*
13275   eval "ac_cv_func_strftime=no"
13276 fi
13277 rm -f conftest*
13278 fi
13279
13280 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13281   echo "$ac_t""yes" 1>&6
13282   cat >> confdefs.h <<\EOF
13283 #define HAVE_STRFTIME 1
13284 EOF
13285
13286 else
13287   echo "$ac_t""no" 1>&6
13288 # strftime is in -lintl on SCO UNIX.
13289 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13290 echo "configure:13291: checking for strftime in -lintl" >&5
13291 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13292 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13293   echo $ac_n "(cached) $ac_c" 1>&6
13294 else
13295   ac_save_LIBS="$LIBS"
13296 LIBS="-lintl  $LIBS"
13297 cat > conftest.$ac_ext <<EOF
13298 #line 13299 "configure"
13299 #include "confdefs.h"
13300 /* Override any gcc2 internal prototype to avoid an error.  */
13301 /* We use char because int might match the return type of a gcc2
13302     builtin and then its argument prototype would still apply.  */
13303 char strftime();
13304
13305 int main() {
13306 strftime()
13307 ; return 0; }
13308 EOF
13309 if { (eval echo configure:13310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13310   rm -rf conftest*
13311   eval "ac_cv_lib_$ac_lib_var=yes"
13312 else
13313   echo "configure: failed program was:" >&5
13314   cat conftest.$ac_ext >&5
13315   rm -rf conftest*
13316   eval "ac_cv_lib_$ac_lib_var=no"
13317 fi
13318 rm -f conftest*
13319 LIBS="$ac_save_LIBS"
13320
13321 fi
13322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13323   echo "$ac_t""yes" 1>&6
13324   cat >> confdefs.h <<\EOF
13325 #define HAVE_STRFTIME 1
13326 EOF
13327
13328 LIBS="-lintl $LIBS"
13329 else
13330   echo "$ac_t""no" 1>&6
13331 fi
13332
13333 fi
13334
13335
13336 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13337 echo "configure:13338: checking for inet_aton()" >&5
13338 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13339   echo $ac_n "(cached) $ac_c" 1>&6
13340 else
13341   cat > conftest.$ac_ext <<EOF
13342 #line 13343 "configure"
13343 #include "confdefs.h"
13344
13345 #ifdef HAVE_SYS_TYPES_H
13346 #       include <sys/types.h>
13347 #endif
13348 #ifdef HAVE_SYS_SOCKET_H
13349 #       include <sys/socket.h>
13350 #       ifdef HAVE_SYS_SELECT_H
13351 #               include <sys/select.h>
13352 #       endif
13353 #       include <netinet/in.h>
13354 #       ifdef HAVE_ARPA_INET_H
13355 #               include <arpa/inet.h>
13356 #       endif
13357 #endif
13358
13359 int main() {
13360 struct in_addr in;
13361 int rc = inet_aton( "255.255.255.255", &in );
13362 ; return 0; }
13363 EOF
13364 if { (eval echo configure:13365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13365   rm -rf conftest*
13366   ol_cv_func_inet_aton=yes
13367 else
13368   echo "configure: failed program was:" >&5
13369   cat conftest.$ac_ext >&5
13370   rm -rf conftest*
13371   ol_cv_func_inet_aton=no
13372 fi
13373 rm -f conftest*
13374 fi
13375
13376 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13377   if test $ol_cv_func_inet_aton != no; then
13378     cat >> confdefs.h <<\EOF
13379 #define HAVE_INET_ATON 1
13380 EOF
13381
13382   fi
13383  
13384
13385 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13386 echo "configure:13387: checking for vprintf" >&5
13387 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13388   echo $ac_n "(cached) $ac_c" 1>&6
13389 else
13390   cat > conftest.$ac_ext <<EOF
13391 #line 13392 "configure"
13392 #include "confdefs.h"
13393 /* System header to define __stub macros and hopefully few prototypes,
13394     which can conflict with char vprintf(); below.  */
13395 #include <assert.h>
13396 /* Override any gcc2 internal prototype to avoid an error.  */
13397 /* We use char because int might match the return type of a gcc2
13398     builtin and then its argument prototype would still apply.  */
13399 char vprintf();
13400 char (*f)();
13401
13402 int main() {
13403
13404 /* The GNU C library defines this for functions which it implements
13405     to always fail with ENOSYS.  Some functions are actually named
13406     something starting with __ and the normal name is an alias.  */
13407 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13408 choke me
13409 #else
13410 f = vprintf;
13411 #endif
13412
13413 ; return 0; }
13414 EOF
13415 if { (eval echo configure:13416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13416   rm -rf conftest*
13417   eval "ac_cv_func_vprintf=yes"
13418 else
13419   echo "configure: failed program was:" >&5
13420   cat conftest.$ac_ext >&5
13421   rm -rf conftest*
13422   eval "ac_cv_func_vprintf=no"
13423 fi
13424 rm -f conftest*
13425 fi
13426
13427 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13428   echo "$ac_t""yes" 1>&6
13429   cat >> confdefs.h <<\EOF
13430 #define HAVE_VPRINTF 1
13431 EOF
13432
13433 else
13434   echo "$ac_t""no" 1>&6
13435 fi
13436
13437 if test "$ac_cv_func_vprintf" != yes; then
13438 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13439 echo "configure:13440: checking for _doprnt" >&5
13440 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13441   echo $ac_n "(cached) $ac_c" 1>&6
13442 else
13443   cat > conftest.$ac_ext <<EOF
13444 #line 13445 "configure"
13445 #include "confdefs.h"
13446 /* System header to define __stub macros and hopefully few prototypes,
13447     which can conflict with char _doprnt(); below.  */
13448 #include <assert.h>
13449 /* Override any gcc2 internal prototype to avoid an error.  */
13450 /* We use char because int might match the return type of a gcc2
13451     builtin and then its argument prototype would still apply.  */
13452 char _doprnt();
13453 char (*f)();
13454
13455 int main() {
13456
13457 /* The GNU C library defines this for functions which it implements
13458     to always fail with ENOSYS.  Some functions are actually named
13459     something starting with __ and the normal name is an alias.  */
13460 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13461 choke me
13462 #else
13463 f = _doprnt;
13464 #endif
13465
13466 ; return 0; }
13467 EOF
13468 if { (eval echo configure:13469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13469   rm -rf conftest*
13470   eval "ac_cv_func__doprnt=yes"
13471 else
13472   echo "configure: failed program was:" >&5
13473   cat conftest.$ac_ext >&5
13474   rm -rf conftest*
13475   eval "ac_cv_func__doprnt=no"
13476 fi
13477 rm -f conftest*
13478 fi
13479
13480 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13481   echo "$ac_t""yes" 1>&6
13482   cat >> confdefs.h <<\EOF
13483 #define HAVE_DOPRNT 1
13484 EOF
13485
13486 else
13487   echo "$ac_t""no" 1>&6
13488 fi
13489
13490 fi
13491
13492
13493 if test $ac_cv_func_vprintf = yes ; then
13494                 for ac_func in vsnprintf vsprintf
13495 do
13496 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13497 echo "configure:13498: checking for $ac_func" >&5
13498 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13499   echo $ac_n "(cached) $ac_c" 1>&6
13500 else
13501   cat > conftest.$ac_ext <<EOF
13502 #line 13503 "configure"
13503 #include "confdefs.h"
13504 /* System header to define __stub macros and hopefully few prototypes,
13505     which can conflict with char $ac_func(); below.  */
13506 #include <assert.h>
13507 /* Override any gcc2 internal prototype to avoid an error.  */
13508 /* We use char because int might match the return type of a gcc2
13509     builtin and then its argument prototype would still apply.  */
13510 char $ac_func();
13511 char (*f)();
13512
13513 int main() {
13514
13515 /* The GNU C library defines this for functions which it implements
13516     to always fail with ENOSYS.  Some functions are actually named
13517     something starting with __ and the normal name is an alias.  */
13518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13519 choke me
13520 #else
13521 f = $ac_func;
13522 #endif
13523
13524 ; return 0; }
13525 EOF
13526 if { (eval echo configure:13527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13527   rm -rf conftest*
13528   eval "ac_cv_func_$ac_func=yes"
13529 else
13530   echo "configure: failed program was:" >&5
13531   cat conftest.$ac_ext >&5
13532   rm -rf conftest*
13533   eval "ac_cv_func_$ac_func=no"
13534 fi
13535 rm -f conftest*
13536 fi
13537
13538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13539   echo "$ac_t""yes" 1>&6
13540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13541   cat >> confdefs.h <<EOF
13542 #define $ac_tr_func 1
13543 EOF
13544  
13545 else
13546   echo "$ac_t""no" 1>&6
13547 fi
13548 done
13549
13550 fi
13551
13552 for ac_func in \
13553         bcopy                   \
13554         closesocket             \
13555         endgrent                \
13556         endpwent                \
13557         flock                   \
13558         getdtablesize   \
13559         getgrgid                \
13560         gethostname             \
13561         getpass                 \
13562         getpwuid                \
13563         getpwnam                \
13564         getspnam                \
13565         gettimeofday    \
13566         initgroups              \
13567         lockf                   \
13568         memcpy                  \
13569         memmove                 \
13570         mkstemp                 \
13571         read                    \
13572         recv                    \
13573         recvfrom                \
13574         setpwfile               \
13575         setgid                  \
13576         setegid                 \
13577         setsid                  \
13578         setuid                  \
13579         seteuid                 \
13580         signal                  \
13581         sigset                  \
13582         snprintf                \
13583         strdup                  \
13584         strerror                \
13585         strpbrk                 \
13586         strrchr                 \
13587         strsep                  \
13588         strstr                  \
13589         strtol                  \
13590         strtoul                 \
13591         strspn                  \
13592         sysconf                 \
13593         waitpid                 \
13594         wait4                   \
13595         write                   \
13596         send                    \
13597         sendto                  \
13598
13599 do
13600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13601 echo "configure:13602: checking for $ac_func" >&5
13602 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13603   echo $ac_n "(cached) $ac_c" 1>&6
13604 else
13605   cat > conftest.$ac_ext <<EOF
13606 #line 13607 "configure"
13607 #include "confdefs.h"
13608 /* System header to define __stub macros and hopefully few prototypes,
13609     which can conflict with char $ac_func(); below.  */
13610 #include <assert.h>
13611 /* Override any gcc2 internal prototype to avoid an error.  */
13612 /* We use char because int might match the return type of a gcc2
13613     builtin and then its argument prototype would still apply.  */
13614 char $ac_func();
13615 char (*f)();
13616
13617 int main() {
13618
13619 /* The GNU C library defines this for functions which it implements
13620     to always fail with ENOSYS.  Some functions are actually named
13621     something starting with __ and the normal name is an alias.  */
13622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13623 choke me
13624 #else
13625 f = $ac_func;
13626 #endif
13627
13628 ; return 0; }
13629 EOF
13630 if { (eval echo configure:13631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13631   rm -rf conftest*
13632   eval "ac_cv_func_$ac_func=yes"
13633 else
13634   echo "configure: failed program was:" >&5
13635   cat conftest.$ac_ext >&5
13636   rm -rf conftest*
13637   eval "ac_cv_func_$ac_func=no"
13638 fi
13639 rm -f conftest*
13640 fi
13641
13642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13643   echo "$ac_t""yes" 1>&6
13644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13645   cat >> confdefs.h <<EOF
13646 #define $ac_tr_func 1
13647 EOF
13648  
13649 else
13650   echo "$ac_t""no" 1>&6
13651 fi
13652 done
13653
13654
13655 for ac_func in getopt tempnam
13656 do
13657 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13658 echo "configure:13659: checking for $ac_func" >&5
13659 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13660   echo $ac_n "(cached) $ac_c" 1>&6
13661 else
13662   cat > conftest.$ac_ext <<EOF
13663 #line 13664 "configure"
13664 #include "confdefs.h"
13665 /* System header to define __stub macros and hopefully few prototypes,
13666     which can conflict with char $ac_func(); below.  */
13667 #include <assert.h>
13668 /* Override any gcc2 internal prototype to avoid an error.  */
13669 /* We use char because int might match the return type of a gcc2
13670     builtin and then its argument prototype would still apply.  */
13671 char $ac_func();
13672 char (*f)();
13673
13674 int main() {
13675
13676 /* The GNU C library defines this for functions which it implements
13677     to always fail with ENOSYS.  Some functions are actually named
13678     something starting with __ and the normal name is an alias.  */
13679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13680 choke me
13681 #else
13682 f = $ac_func;
13683 #endif
13684
13685 ; return 0; }
13686 EOF
13687 if { (eval echo configure:13688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13688   rm -rf conftest*
13689   eval "ac_cv_func_$ac_func=yes"
13690 else
13691   echo "configure: failed program was:" >&5
13692   cat conftest.$ac_ext >&5
13693   rm -rf conftest*
13694   eval "ac_cv_func_$ac_func=no"
13695 fi
13696 rm -f conftest*
13697 fi
13698
13699 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13700   echo "$ac_t""yes" 1>&6
13701     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13702   cat >> confdefs.h <<EOF
13703 #define $ac_tr_func 1
13704 EOF
13705  
13706 else
13707   echo "$ac_t""no" 1>&6
13708 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
13709 fi
13710 done
13711
13712
13713
13714 # Check Configuration
13715 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
13716 echo "configure:13717: checking declaration of sys_errlist" >&5
13717 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
13718   echo $ac_n "(cached) $ac_c" 1>&6
13719 else
13720   
13721         cat > conftest.$ac_ext <<EOF
13722 #line 13723 "configure"
13723 #include "confdefs.h"
13724
13725 #include <stdio.h>
13726 #include <sys/types.h>
13727 #include <errno.h> 
13728 int main() {
13729 char *c = (char *) *sys_errlist
13730 ; return 0; }
13731 EOF
13732 if { (eval echo configure:13733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13733   rm -rf conftest*
13734   ol_cv_dcl_sys_errlist=yes
13735         ol_cv_have_sys_errlist=yes
13736 else
13737   echo "configure: failed program was:" >&5
13738   cat conftest.$ac_ext >&5
13739   rm -rf conftest*
13740   ol_cv_dcl_sys_errlist=no
13741 fi
13742 rm -f conftest*
13743 fi
13744
13745 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
13746 #
13747 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
13748 if test $ol_cv_dcl_sys_errlist = no ; then
13749         cat >> confdefs.h <<\EOF
13750 #define DECL_SYS_ERRLIST 1
13751 EOF
13752
13753
13754         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
13755 echo "configure:13756: checking existence of sys_errlist" >&5
13756 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
13757   echo $ac_n "(cached) $ac_c" 1>&6
13758 else
13759   
13760                 cat > conftest.$ac_ext <<EOF
13761 #line 13762 "configure"
13762 #include "confdefs.h"
13763 #include <errno.h>
13764 int main() {
13765 char *c = (char *) *sys_errlist
13766 ; return 0; }
13767 EOF
13768 if { (eval echo configure:13769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13769   rm -rf conftest*
13770   ol_cv_have_sys_errlist=yes
13771 else
13772   echo "configure: failed program was:" >&5
13773   cat conftest.$ac_ext >&5
13774   rm -rf conftest*
13775   ol_cv_have_sys_errlist=no
13776 fi
13777 rm -f conftest*
13778 fi
13779
13780 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
13781 fi
13782 if test $ol_cv_have_sys_errlist = yes ; then
13783         cat >> confdefs.h <<\EOF
13784 #define HAVE_SYS_ERRLIST 1
13785 EOF
13786
13787 fi
13788
13789
13790
13791 if test "$ol_enable_debug" != no ; then
13792         cat >> confdefs.h <<\EOF
13793 #define LDAP_DEBUG 1
13794 EOF
13795
13796 fi
13797 if test "$ol_enable_syslog" = yes ; then
13798         cat >> confdefs.h <<\EOF
13799 #define LDAP_SYSLOG 1
13800 EOF
13801
13802 fi
13803 if test "$ol_enable_libui" = yes ; then
13804         cat >> confdefs.h <<\EOF
13805 #define LDAP_LIBUI 1
13806 EOF
13807
13808 fi
13809 if test "$ol_enable_cache" = no ; then
13810         cat >> confdefs.h <<\EOF
13811 #define LDAP_NOCACHE 1
13812 EOF
13813
13814 fi
13815 if test "$ol_enable_dns" != no ; then
13816         cat >> confdefs.h <<\EOF
13817 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
13818 EOF
13819
13820 fi
13821 if test "$ol_enable_proctitle" != no ; then
13822         cat >> confdefs.h <<\EOF
13823 #define LDAP_PROCTITLE 1
13824 EOF
13825
13826 fi
13827 if test "$ol_enable_referrals" != no ; then
13828         cat >> confdefs.h <<\EOF
13829 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
13830 EOF
13831
13832 fi
13833 if test "$ol_enable_cldap" != no ; then
13834         cat >> confdefs.h <<\EOF
13835 #define LDAP_CONNECTIONLESS 1
13836 EOF
13837
13838 fi
13839
13840 if test "$ol_enable_crypt" != no ; then
13841         cat >> confdefs.h <<\EOF
13842 #define SLAPD_CRYPT 1
13843 EOF
13844
13845 fi
13846 if test "$ol_enable_cleartext" != no ; then
13847         cat >> confdefs.h <<\EOF
13848 #define SLAPD_CLEARTEXT 1
13849 EOF
13850
13851 fi
13852 if test "$ol_enable_multimaster" != no ; then
13853         cat >> confdefs.h <<\EOF
13854 #define SLAPD_MULTIMASTER 1
13855 EOF
13856
13857 fi
13858 if test "$ol_enable_phonetic" != no ; then
13859         cat >> confdefs.h <<\EOF
13860 #define SLAPD_PHONETIC 1
13861 EOF
13862
13863 fi
13864 if test "$ol_enable_rlookups" != no ; then
13865         cat >> confdefs.h <<\EOF
13866 #define SLAPD_RLOOKUPS 1
13867 EOF
13868
13869 fi
13870
13871 if test "$ol_link_modules" != no ; then
13872         cat >> confdefs.h <<\EOF
13873 #define SLAPD_MODULES 1
13874 EOF
13875
13876         BUILD_SLAPD=yes
13877         MODULES_LIBS=-lltdl
13878         SLAPD_MODULES_LDFLAGS="-dlopen self"
13879 fi
13880
13881 if test "$ol_link_bdb2" != no ; then
13882         cat >> confdefs.h <<\EOF
13883 #define SLAPD_BDB2 1
13884 EOF
13885
13886         BUILD_SLAPD=yes
13887         BUILD_BDB2=yes
13888         if test "$ol_with_bdb2_module" != static ; then
13889                 cat >> confdefs.h <<\EOF
13890 #define SLAPD_BDB2_DYNAMIC 1
13891 EOF
13892
13893                 BUILD_BDB2=mod
13894                 BUILD_BDB2_DYNAMIC=shared
13895                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
13896         fi
13897 fi
13898
13899 if test "$ol_enable_ldap" != no ; then
13900         cat >> confdefs.h <<\EOF
13901 #define SLAPD_LDAP 1
13902 EOF
13903
13904         BUILD_SLAPD=yes
13905         BUILD_LDAP=yes
13906         if test "$ol_with_ldap_module" != static ; then
13907                 cat >> confdefs.h <<\EOF
13908 #define SLAPD_LDAP_DYNAMIC 1
13909 EOF
13910
13911                 BUILD_LDAP=mod
13912                 BUILD_LDAP_DYNAMIC=shared
13913                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
13914         fi
13915 fi
13916
13917 if test "$ol_link_ldbm" != no ; then
13918         cat >> confdefs.h <<\EOF
13919 #define SLAPD_LDBM 1
13920 EOF
13921
13922         BUILD_SLAPD=yes
13923         BUILD_LDBM=yes
13924         if test "$ol_with_ldbm_module" != static ; then
13925                 cat >> confdefs.h <<\EOF
13926 #define SLAPD_LDBM_DYNAMIC 1
13927 EOF
13928
13929                 BUILD_LDBM=mod
13930                 BUILD_LDBM_DYNAMIC=shared
13931                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
13932         fi
13933 fi
13934
13935 if test "$ol_enable_passwd" != no ; then
13936         cat >> confdefs.h <<\EOF
13937 #define SLAPD_PASSWD 1
13938 EOF
13939
13940         BUILD_SLAPD=yes
13941         BUILD_PASSWD=yes
13942         if test "$ol_with_passwd_module" != static ; then
13943                 cat >> confdefs.h <<\EOF
13944 #define SLAPD_PASSWD_DYNAMIC 1
13945 EOF
13946
13947                 BUILD_PASSWD=mod
13948                 BUILD_PASSWD_DYNAMIC=shared
13949                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
13950         fi
13951 fi
13952
13953 if test "$ol_link_perl" != no ; then
13954         cat >> confdefs.h <<\EOF
13955 #define SLAPD_PERL 1
13956 EOF
13957
13958         BUILD_SLAPD=yes
13959         BUILD_PERL=yes
13960         if test "$ol_with_perl_module" != static ; then
13961                 cat >> confdefs.h <<\EOF
13962 #define SLAPD_PERL_DYNAMIC 1
13963 EOF
13964
13965                 BUILD_PERL=mod
13966                 BUILD_PERL_DYNAMIC=shared
13967                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
13968         fi
13969 fi
13970
13971 if test "$ol_enable_shell" != no ; then
13972         cat >> confdefs.h <<\EOF
13973 #define SLAPD_SHELL 1
13974 EOF
13975
13976         BUILD_SLAPD=yes
13977         BUILD_SHELL=yes
13978         if test "$ol_with_shell_module" != static ; then
13979                 cat >> confdefs.h <<\EOF
13980 #define SLAPD_SHELL_DYNAMIC 1
13981 EOF
13982
13983                 BUILD_SHELL=mod
13984                 BUILD_SHELL_DYNAMIC=shared
13985                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
13986         fi
13987 fi
13988
13989 if test "$ol_enable_tcl" != no ; then
13990         cat >> confdefs.h <<\EOF
13991 #define SLAPD_TCL 1
13992 EOF
13993
13994         BUILD_SLAPD=yes
13995         BUILD_TCL=yes
13996         if test "$ol_with_tcl_module" != static; then
13997                 cat >> confdefs.h <<\EOF
13998 #define SLAPD_TCL_DYNAMIC 1
13999 EOF
14000
14001                 BUILD_TCL=mod
14002                 BUILD_TCL_DYNAMIC=shared
14003                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14004         fi
14005 fi
14006
14007 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14008         $BUILD_SLAPD = yes ; then
14009         BUILD_SLURPD=yes
14010 fi
14011
14012
14013
14014   
14015   
14016   
14017   
14018   
14019   
14020   
14021   
14022   
14023   
14024   
14025   
14026   
14027   
14028   
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054 trap '' 1 2 15
14055
14056 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14057
14058 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14059 # Let make expand exec_prefix.
14060 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14061
14062 # Any assignment to VPATH causes Sun make to only execute
14063 # the first set of double-colon rules, so remove it if not needed.
14064 # If there is a colon in the path, we need to keep it.
14065 if test "x$srcdir" = x.; then
14066   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14067 fi
14068
14069 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14070
14071 DEFS=-DHAVE_CONFIG_H
14072
14073 # Without the "./", some shells look in PATH for config.status.
14074 : ${CONFIG_STATUS=./config.status}
14075
14076 echo creating $CONFIG_STATUS
14077 rm -f $CONFIG_STATUS
14078 cat > $CONFIG_STATUS <<EOF
14079 #! /bin/sh
14080 # Generated automatically by configure.
14081 # Run this file to recreate the current configuration.
14082 # This directory was configured as follows,
14083 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14084 #
14085 # $0 $ac_configure_args
14086 #
14087 # Compiler output produced by configure, useful for debugging
14088 # configure, is in ./config.log if it exists.
14089
14090 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14091 for ac_option
14092 do
14093   case "\$ac_option" in
14094   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14095     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14096     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14097   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14098     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14099     exit 0 ;;
14100   -help | --help | --hel | --he | --h)
14101     echo "\$ac_cs_usage"; exit 0 ;;
14102   *) echo "\$ac_cs_usage"; exit 1 ;;
14103   esac
14104 done
14105
14106 ac_given_srcdir=$srcdir
14107 ac_given_INSTALL="$INSTALL"
14108
14109 trap 'rm -fr `echo "\
14110 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14111 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14112 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14113 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14114 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14115 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14116 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14117 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14118 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14119 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14120 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14121 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14122 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14123 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14124 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14125 include/Makefile:build/top.mk:include/Makefile.in \
14126 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14127 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14128 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14129 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14130 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14131 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14132 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14133 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14134 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14135 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14136 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14137 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14138 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14139 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14140 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14141 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14142 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14143 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14144 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14145 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14146 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14147 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14148 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14149 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14150 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14151  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14152 EOF
14153 cat >> $CONFIG_STATUS <<EOF
14154
14155 # Protect against being on the right side of a sed subst in config.status.
14156 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14157  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14158 $ac_vpsub
14159 $extrasub
14160 s%@SHELL@%$SHELL%g
14161 s%@CFLAGS@%$CFLAGS%g
14162 s%@CPPFLAGS@%$CPPFLAGS%g
14163 s%@CXXFLAGS@%$CXXFLAGS%g
14164 s%@FFLAGS@%$FFLAGS%g
14165 s%@DEFS@%$DEFS%g
14166 s%@LDFLAGS@%$LDFLAGS%g
14167 s%@LIBS@%$LIBS%g
14168 s%@exec_prefix@%$exec_prefix%g
14169 s%@prefix@%$prefix%g
14170 s%@program_transform_name@%$program_transform_name%g
14171 s%@bindir@%$bindir%g
14172 s%@sbindir@%$sbindir%g
14173 s%@libexecdir@%$libexecdir%g
14174 s%@datadir@%$datadir%g
14175 s%@sysconfdir@%$sysconfdir%g
14176 s%@sharedstatedir@%$sharedstatedir%g
14177 s%@localstatedir@%$localstatedir%g
14178 s%@libdir@%$libdir%g
14179 s%@includedir@%$includedir%g
14180 s%@oldincludedir@%$oldincludedir%g
14181 s%@infodir@%$infodir%g
14182 s%@mandir@%$mandir%g
14183 s%@host@%$host%g
14184 s%@host_alias@%$host_alias%g
14185 s%@host_cpu@%$host_cpu%g
14186 s%@host_vendor@%$host_vendor%g
14187 s%@host_os@%$host_os%g
14188 s%@target@%$target%g
14189 s%@target_alias@%$target_alias%g
14190 s%@target_cpu@%$target_cpu%g
14191 s%@target_vendor@%$target_vendor%g
14192 s%@target_os@%$target_os%g
14193 s%@build@%$build%g
14194 s%@build_alias@%$build_alias%g
14195 s%@build_cpu@%$build_cpu%g
14196 s%@build_vendor@%$build_vendor%g
14197 s%@build_os@%$build_os%g
14198 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14199 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14200 s%@INSTALL_DATA@%$INSTALL_DATA%g
14201 s%@PACKAGE@%$PACKAGE%g
14202 s%@VERSION@%$VERSION%g
14203 s%@ACLOCAL@%$ACLOCAL%g
14204 s%@AUTOCONF@%$AUTOCONF%g
14205 s%@AUTOMAKE@%$AUTOMAKE%g
14206 s%@AUTOHEADER@%$AUTOHEADER%g
14207 s%@MAKEINFO@%$MAKEINFO%g
14208 s%@install_sh@%$install_sh%g
14209 s%@AMTAR@%$AMTAR%g
14210 s%@AWK@%$AWK%g
14211 s%@AMTARFLAGS@%$AMTARFLAGS%g
14212 s%@SET_MAKE@%$SET_MAKE%g
14213 s%@top_builddir@%$top_builddir%g
14214 s%@ldap_subdir@%$ldap_subdir%g
14215 s%@CC@%$CC%g
14216 s%@RANLIB@%$RANLIB%g
14217 s%@LD@%$LD%g
14218 s%@NM@%$NM%g
14219 s%@LN_S@%$LN_S%g
14220 s%@LIBTOOL@%$LIBTOOL%g
14221 s%@LN_H@%$LN_H%g
14222 s%@SENDMAIL@%$SENDMAIL%g
14223 s%@EDITOR@%$EDITOR%g
14224 s%@FINGER@%$FINGER%g
14225 s%@PERLBIN@%$PERLBIN%g
14226 s%@CPP@%$CPP%g
14227 s%@EXEEXT@%$EXEEXT%g
14228 s%@OBJEXT@%$OBJEXT%g
14229 s%@OL_MKDEP@%$OL_MKDEP%g
14230 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14231 s%@LIBOBJS@%$LIBOBJS%g
14232 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14233 s%@BUILD_BDB2@%$BUILD_BDB2%g
14234 s%@BUILD_LDAP@%$BUILD_LDAP%g
14235 s%@BUILD_LDBM@%$BUILD_LDBM%g
14236 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14237 s%@BUILD_PERL@%$BUILD_PERL%g
14238 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14239 s%@BUILD_SHELL@%$BUILD_SHELL%g
14240 s%@BUILD_TCL@%$BUILD_TCL%g
14241 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14242 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14243 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14244 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14245 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14246 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14247 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14248 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14249 s%@LDAP_LIBS@%$LDAP_LIBS%g
14250 s%@LDIF_LIBS@%$LDIF_LIBS%g
14251 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14252 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14253 s%@LDBM_LIBS@%$LDBM_LIBS%g
14254 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14255 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14256 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14257 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14258 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14259 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14260 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14261 s%@KRB_LIBS@%$KRB_LIBS%g
14262 s%@READLINE_LIBS@%$READLINE_LIBS%g
14263 s%@SASL_LIBS@%$SASL_LIBS%g
14264 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14265 s%@TLS_LIBS@%$TLS_LIBS%g
14266 s%@MODULES_LIBS@%$MODULES_LIBS%g
14267
14268 CEOF
14269 EOF
14270
14271 cat >> $CONFIG_STATUS <<\EOF
14272
14273 # Split the substitutions into bite-sized pieces for seds with
14274 # small command number limits, like on Digital OSF/1 and HP-UX.
14275 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14276 ac_file=1 # Number of current file.
14277 ac_beg=1 # First line for current file.
14278 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14279 ac_more_lines=:
14280 ac_sed_cmds=""
14281 while $ac_more_lines; do
14282   if test $ac_beg -gt 1; then
14283     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14284   else
14285     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14286   fi
14287   if test ! -s conftest.s$ac_file; then
14288     ac_more_lines=false
14289     rm -f conftest.s$ac_file
14290   else
14291     if test -z "$ac_sed_cmds"; then
14292       ac_sed_cmds="sed -f conftest.s$ac_file"
14293     else
14294       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14295     fi
14296     ac_file=`expr $ac_file + 1`
14297     ac_beg=$ac_end
14298     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14299   fi
14300 done
14301 if test -z "$ac_sed_cmds"; then
14302   ac_sed_cmds=cat
14303 fi
14304 EOF
14305
14306 cat >> $CONFIG_STATUS <<EOF
14307
14308 CONFIG_FILES=\${CONFIG_FILES-"\
14309 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14310 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14311 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14312 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14313 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14314 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14315 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14316 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14317 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14318 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14319 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14320 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14321 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14322 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14323 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14324 include/Makefile:build/top.mk:include/Makefile.in \
14325 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14326 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14327 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14328 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14329 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14330 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14331 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14332 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14333 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14334 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14335 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14336 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14337 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14338 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14339 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14340 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14341 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14342 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14343 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14344 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14345 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14346 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14347 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14348 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14349 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14350 "}
14351 EOF
14352 cat >> $CONFIG_STATUS <<\EOF
14353 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14354   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14355   case "$ac_file" in
14356   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14357        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14358   *) ac_file_in="${ac_file}.in" ;;
14359   esac
14360
14361   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14362
14363   # Remove last slash and all that follows it.  Not all systems have dirname.
14364   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14365   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14366     # The file is in a subdirectory.
14367     test ! -d "$ac_dir" && mkdir "$ac_dir"
14368     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14369     # A "../" for each directory in $ac_dir_suffix.
14370     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14371   else
14372     ac_dir_suffix= ac_dots=
14373   fi
14374
14375   case "$ac_given_srcdir" in
14376   .)  srcdir=.
14377       if test -z "$ac_dots"; then top_srcdir=.
14378       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14379   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14380   *) # Relative path.
14381     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14382     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14383   esac
14384
14385   case "$ac_given_INSTALL" in
14386   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14387   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14388   esac
14389
14390   echo creating "$ac_file"
14391   rm -f "$ac_file"
14392   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14393   case "$ac_file" in
14394   *Makefile*) ac_comsub="1i\\
14395 # $configure_input" ;;
14396   *) ac_comsub= ;;
14397   esac
14398
14399   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14400   sed -e "$ac_comsub
14401 s%@configure_input@%$configure_input%g
14402 s%@srcdir@%$srcdir%g
14403 s%@top_srcdir@%$top_srcdir%g
14404 s%@INSTALL@%$INSTALL%g
14405 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14406 fi; done
14407 rm -f conftest.s*
14408
14409 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14410 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14411 #
14412 # ac_d sets the value in "#define NAME VALUE" lines.
14413 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14414 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14415 ac_dC='\3'
14416 ac_dD='%g'
14417 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14418 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14419 ac_uB='\([      ]\)%\1#\2define\3'
14420 ac_uC=' '
14421 ac_uD='\4%g'
14422 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14423 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14424 ac_eB='$%\1#\2define\3'
14425 ac_eC=' '
14426 ac_eD='%g'
14427
14428 if test "${CONFIG_HEADERS+set}" != set; then
14429 EOF
14430 cat >> $CONFIG_STATUS <<EOF
14431   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14432 EOF
14433 cat >> $CONFIG_STATUS <<\EOF
14434 fi
14435 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14436   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14437   case "$ac_file" in
14438   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14439        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14440   *) ac_file_in="${ac_file}.in" ;;
14441   esac
14442
14443   echo creating $ac_file
14444
14445   rm -f conftest.frag conftest.in conftest.out
14446   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14447   cat $ac_file_inputs > conftest.in
14448
14449 EOF
14450
14451 # Transform confdefs.h into a sed script conftest.vals that substitutes
14452 # the proper values into config.h.in to produce config.h.  And first:
14453 # Protect against being on the right side of a sed subst in config.status.
14454 # Protect against being in an unquoted here document in config.status.
14455 rm -f conftest.vals
14456 cat > conftest.hdr <<\EOF
14457 s/[\\&%]/\\&/g
14458 s%[\\$`]%\\&%g
14459 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14460 s%ac_d%ac_u%gp
14461 s%ac_u%ac_e%gp
14462 EOF
14463 sed -n -f conftest.hdr confdefs.h > conftest.vals
14464 rm -f conftest.hdr
14465
14466 # This sed command replaces #undef with comments.  This is necessary, for
14467 # example, in the case of _POSIX_SOURCE, which is predefined and required
14468 # on some systems where configure will not decide to define it.
14469 cat >> conftest.vals <<\EOF
14470 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14471 EOF
14472
14473 # Break up conftest.vals because some shells have a limit on
14474 # the size of here documents, and old seds have small limits too.
14475
14476 rm -f conftest.tail
14477 while :
14478 do
14479   ac_lines=`grep -c . conftest.vals`
14480   # grep -c gives empty output for an empty file on some AIX systems.
14481   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14482   # Write a limited-size here document to conftest.frag.
14483   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14484   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14485   echo 'CEOF
14486   sed -f conftest.frag conftest.in > conftest.out
14487   rm -f conftest.in
14488   mv conftest.out conftest.in
14489 ' >> $CONFIG_STATUS
14490   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14491   rm -f conftest.vals
14492   mv conftest.tail conftest.vals
14493 done
14494 rm -f conftest.vals
14495
14496 cat >> $CONFIG_STATUS <<\EOF
14497   rm -f conftest.frag conftest.h
14498   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14499   cat conftest.in >> conftest.h
14500   rm -f conftest.in
14501   if cmp -s $ac_file conftest.h 2>/dev/null; then
14502     echo "$ac_file is unchanged"
14503     rm -f conftest.h
14504   else
14505     # Remove last slash and all that follows it.  Not all systems have dirname.
14506       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14507       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14508       # The file is in a subdirectory.
14509       test ! -d "$ac_dir" && mkdir "$ac_dir"
14510     fi
14511     rm -f $ac_file
14512     mv conftest.h $ac_file
14513   fi
14514 fi; done
14515
14516 EOF
14517 cat >> $CONFIG_STATUS <<EOF
14518
14519 EOF
14520 cat >> $CONFIG_STATUS <<\EOF
14521
14522 date > stamp-h
14523 echo Please \"make depend\" to build dependencies
14524
14525 exit 0
14526 EOF
14527 chmod +x $CONFIG_STATUS
14528 rm -fr confdefs* $ac_clean_files
14529 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
14530