]> git.sur5r.net Git - openldap/blob - configure
b6144e2d6efc175c285b3bfef1c49603a6a2a3e6
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-multimaster        enable multimaster replication (no)"
65 ac_help="$ac_help
66     --enable-phonetic   enable phonetic/soundex (no)"
67 ac_help="$ac_help
68     --enable-quipu      build quipu migration tools (no)"
69 ac_help="$ac_help
70     --enable-rlookups   enable reverse lookups (auto)"
71 ac_help="$ac_help
72     --enable-wrappers   enable tcp wrapper support (no)"
73 ac_help="$ac_help
74     --enable-bdb2       enable bdb2 backend (no)"
75 ac_help="$ac_help
76       --with-bdb2-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldap       enable ldap backend (no)"
79 ac_help="$ac_help
80       --with-ldap-module        module type (static)"
81 ac_help="$ac_help
82     --enable-ldbm       enable ldbm backend (yes)"
83 ac_help="$ac_help
84       --with-ldbm-module        module type (static)"
85 ac_help="$ac_help
86       --with-ldbm-api   use LDBM API (auto)"
87 ac_help="$ac_help
88       --with-ldbm-type  use LDBM type (auto)"
89 ac_help="$ac_help
90     --enable-passwd     enable passwd backend (no)"
91 ac_help="$ac_help
92       --with-passwd-module      module type (static)"
93 ac_help="$ac_help
94     --enable-perl       enable perl backend (no)"
95 ac_help="$ac_help
96       --with-perl-module        module type (static)"
97 ac_help="$ac_help
98     --enable-shell      enable shell backend (no)"
99 ac_help="$ac_help
100       --with-shell-module       module type (static)"
101 ac_help="$ac_help
102     --enable-tcl        enable tcl backend (no)"
103 ac_help="$ac_help
104       --with-tcl-module module type (static)"
105 ac_help="$ac_help
106 SLURPD Options:"
107 ac_help="$ac_help
108   --enable-slurpd       enable building slurpd (auto)"
109 ac_help="$ac_help
110 Library Generation & Linking Options"
111 ac_help="$ac_help
112   --enable-static[=PKGS]  build static libraries [default=yes]"
113 ac_help="$ac_help
114   --enable-shared[=PKGS]  build shared libraries [default=yes]"
115 ac_help="$ac_help
116   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
117 ac_help="$ac_help
118   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
119 ac_help="$ac_help
120   --disable-libtool-lock  avoid locking (might break parallel builds)"
121
122 # Initialize some variables set by options.
123 # The variables have the same names as the options, with
124 # dashes changed to underlines.
125 build=NONE
126 cache_file=./config.cache
127 exec_prefix=NONE
128 host=NONE
129 no_create=
130 nonopt=NONE
131 no_recursion=
132 prefix=NONE
133 program_prefix=NONE
134 program_suffix=NONE
135 program_transform_name=s,x,x,
136 silent=
137 site=
138 srcdir=
139 target=NONE
140 verbose=
141 x_includes=NONE
142 x_libraries=NONE
143 bindir='${exec_prefix}/bin'
144 sbindir='${exec_prefix}/sbin'
145 libexecdir='${exec_prefix}/libexec'
146 datadir='${prefix}/share'
147 sysconfdir='${prefix}/etc'
148 sharedstatedir='${prefix}/com'
149 localstatedir='${prefix}/var'
150 libdir='${exec_prefix}/lib'
151 includedir='${prefix}/include'
152 oldincludedir='/usr/include'
153 infodir='${prefix}/info'
154 mandir='${prefix}/man'
155
156 # Initialize some other variables.
157 subdirs=
158 MFLAGS= MAKEFLAGS=
159 SHELL=${CONFIG_SHELL-/bin/sh}
160 # Maximum number of lines to put in a shell here document.
161 ac_max_here_lines=12
162
163 ac_prev=
164 for ac_option
165 do
166
167   # If the previous option needs an argument, assign it.
168   if test -n "$ac_prev"; then
169     eval "$ac_prev=\$ac_option"
170     ac_prev=
171     continue
172   fi
173
174   case "$ac_option" in
175   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
176   *) ac_optarg= ;;
177   esac
178
179   # Accept the important Cygnus configure options, so we can diagnose typos.
180
181   case "$ac_option" in
182
183   -bindir | --bindir | --bindi | --bind | --bin | --bi)
184     ac_prev=bindir ;;
185   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
186     bindir="$ac_optarg" ;;
187
188   -build | --build | --buil | --bui | --bu)
189     ac_prev=build ;;
190   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
191     build="$ac_optarg" ;;
192
193   -cache-file | --cache-file | --cache-fil | --cache-fi \
194   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
195     ac_prev=cache_file ;;
196   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
197   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
198     cache_file="$ac_optarg" ;;
199
200   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
201     ac_prev=datadir ;;
202   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
203   | --da=*)
204     datadir="$ac_optarg" ;;
205
206   -disable-* | --disable-*)
207     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
208     # Reject names that are not valid shell variable names.
209     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
210       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
211     fi
212     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213     eval "enable_${ac_feature}=no" ;;
214
215   -enable-* | --enable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     case "$ac_option" in
223       *=*) ;;
224       *) ac_optarg=yes ;;
225     esac
226     eval "enable_${ac_feature}='$ac_optarg'" ;;
227
228   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
229   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
230   | --exec | --exe | --ex)
231     ac_prev=exec_prefix ;;
232   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
233   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
234   | --exec=* | --exe=* | --ex=*)
235     exec_prefix="$ac_optarg" ;;
236
237   -gas | --gas | --ga | --g)
238     # Obsolete; use --with-gas.
239     with_gas=yes ;;
240
241   -help | --help | --hel | --he)
242     # Omit some internal or obsolete options to make the list less imposing.
243     # This message is too long to be a string in the A/UX 3.1 sh.
244     cat << EOF
245 Usage: configure [options] [host]
246 Options: [defaults in brackets after descriptions]
247 Configuration:
248   --cache-file=FILE       cache test results in FILE
249   --help                  print this message
250   --no-create             do not create output files
251   --quiet, --silent       do not print \`checking...' messages
252   --version               print the version of autoconf that created configure
253 Directory and file names:
254   --prefix=PREFIX         install architecture-independent files in PREFIX
255                           [$ac_default_prefix]
256   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
257                           [same as prefix]
258   --bindir=DIR            user executables in DIR [EPREFIX/bin]
259   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
260   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
261   --datadir=DIR           read-only architecture-independent data in DIR
262                           [PREFIX/share]
263   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
264   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
265                           [PREFIX/com]
266   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
267   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
268   --includedir=DIR        C header files in DIR [PREFIX/include]
269   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
270   --infodir=DIR           info documentation in DIR [PREFIX/info]
271   --mandir=DIR            man documentation in DIR [PREFIX/man]
272   --srcdir=DIR            find the sources in DIR [configure dir or ..]
273   --program-prefix=PREFIX prepend PREFIX to installed program names
274   --program-suffix=SUFFIX append SUFFIX to installed program names
275   --program-transform-name=PROGRAM
276                           run sed PROGRAM on installed program names
277 EOF
278     cat << EOF
279 Host type:
280   --build=BUILD           configure for building on BUILD [BUILD=HOST]
281   --host=HOST             configure for HOST [guessed]
282   --target=TARGET         configure for TARGET [TARGET=HOST]
283 Features and packages:
284   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
285   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
286   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
287   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
288   --x-includes=DIR        X include files are in DIR
289   --x-libraries=DIR       X library files are in DIR
290 EOF
291     if test -n "$ac_help"; then
292       echo "--enable and --with options recognized:$ac_help"
293     fi
294     exit 0 ;;
295
296   -host | --host | --hos | --ho)
297     ac_prev=host ;;
298   -host=* | --host=* | --hos=* | --ho=*)
299     host="$ac_optarg" ;;
300
301   -includedir | --includedir | --includedi | --included | --include \
302   | --includ | --inclu | --incl | --inc)
303     ac_prev=includedir ;;
304   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
305   | --includ=* | --inclu=* | --incl=* | --inc=*)
306     includedir="$ac_optarg" ;;
307
308   -infodir | --infodir | --infodi | --infod | --info | --inf)
309     ac_prev=infodir ;;
310   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
311     infodir="$ac_optarg" ;;
312
313   -libdir | --libdir | --libdi | --libd)
314     ac_prev=libdir ;;
315   -libdir=* | --libdir=* | --libdi=* | --libd=*)
316     libdir="$ac_optarg" ;;
317
318   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
319   | --libexe | --libex | --libe)
320     ac_prev=libexecdir ;;
321   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
322   | --libexe=* | --libex=* | --libe=*)
323     libexecdir="$ac_optarg" ;;
324
325   -localstatedir | --localstatedir | --localstatedi | --localstated \
326   | --localstate | --localstat | --localsta | --localst \
327   | --locals | --local | --loca | --loc | --lo)
328     ac_prev=localstatedir ;;
329   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
330   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
331   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
332     localstatedir="$ac_optarg" ;;
333
334   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335     ac_prev=mandir ;;
336   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337     mandir="$ac_optarg" ;;
338
339   -nfp | --nfp | --nf)
340     # Obsolete; use --without-fp.
341     with_fp=no ;;
342
343   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344   | --no-cr | --no-c)
345     no_create=yes ;;
346
347   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
348   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349     no_recursion=yes ;;
350
351   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
352   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
353   | --oldin | --oldi | --old | --ol | --o)
354     ac_prev=oldincludedir ;;
355   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
356   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
357   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
358     oldincludedir="$ac_optarg" ;;
359
360   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361     ac_prev=prefix ;;
362   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363     prefix="$ac_optarg" ;;
364
365   -program-prefix | --program-prefix | --program-prefi | --program-pref \
366   | --program-pre | --program-pr | --program-p)
367     ac_prev=program_prefix ;;
368   -program-prefix=* | --program-prefix=* | --program-prefi=* \
369   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
370     program_prefix="$ac_optarg" ;;
371
372   -program-suffix | --program-suffix | --program-suffi | --program-suff \
373   | --program-suf | --program-su | --program-s)
374     ac_prev=program_suffix ;;
375   -program-suffix=* | --program-suffix=* | --program-suffi=* \
376   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
377     program_suffix="$ac_optarg" ;;
378
379   -program-transform-name | --program-transform-name \
380   | --program-transform-nam | --program-transform-na \
381   | --program-transform-n | --program-transform- \
382   | --program-transform | --program-transfor \
383   | --program-transfo | --program-transf \
384   | --program-trans | --program-tran \
385   | --progr-tra | --program-tr | --program-t)
386     ac_prev=program_transform_name ;;
387   -program-transform-name=* | --program-transform-name=* \
388   | --program-transform-nam=* | --program-transform-na=* \
389   | --program-transform-n=* | --program-transform-=* \
390   | --program-transform=* | --program-transfor=* \
391   | --program-transfo=* | --program-transf=* \
392   | --program-trans=* | --program-tran=* \
393   | --progr-tra=* | --program-tr=* | --program-t=*)
394     program_transform_name="$ac_optarg" ;;
395
396   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
397   | -silent | --silent | --silen | --sile | --sil)
398     silent=yes ;;
399
400   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401     ac_prev=sbindir ;;
402   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403   | --sbi=* | --sb=*)
404     sbindir="$ac_optarg" ;;
405
406   -sharedstatedir | --sharedstatedir | --sharedstatedi \
407   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
408   | --sharedst | --shareds | --shared | --share | --shar \
409   | --sha | --sh)
410     ac_prev=sharedstatedir ;;
411   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
412   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
413   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414   | --sha=* | --sh=*)
415     sharedstatedir="$ac_optarg" ;;
416
417   -site | --site | --sit)
418     ac_prev=site ;;
419   -site=* | --site=* | --sit=*)
420     site="$ac_optarg" ;;
421
422   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423     ac_prev=srcdir ;;
424   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425     srcdir="$ac_optarg" ;;
426
427   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
428   | --syscon | --sysco | --sysc | --sys | --sy)
429     ac_prev=sysconfdir ;;
430   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
431   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
432     sysconfdir="$ac_optarg" ;;
433
434   -target | --target | --targe | --targ | --tar | --ta | --t)
435     ac_prev=target ;;
436   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
437     target="$ac_optarg" ;;
438
439   -v | -verbose | --verbose | --verbos | --verbo | --verb)
440     verbose=yes ;;
441
442   -version | --version | --versio | --versi | --vers)
443     echo "configure generated by autoconf version 2.13.1"
444     exit 0 ;;
445
446   -with-* | --with-*)
447     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
448     # Reject names that are not valid shell variable names.
449     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
450       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451     fi
452     ac_package=`echo $ac_package| sed 's/-/_/g'`
453     case "$ac_option" in
454       *=*) ;;
455       *) ac_optarg=yes ;;
456     esac
457     eval "with_${ac_package}='$ac_optarg'" ;;
458
459   -without-* | --without-*)
460     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
461     # Reject names that are not valid shell variable names.
462     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
463       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464     fi
465     ac_package=`echo $ac_package| sed 's/-/_/g'`
466     eval "with_${ac_package}=no" ;;
467
468   --x)
469     # Obsolete; use --with-x.
470     with_x=yes ;;
471
472   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
473   | --x-incl | --x-inc | --x-in | --x-i)
474     ac_prev=x_includes ;;
475   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
476   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
477     x_includes="$ac_optarg" ;;
478
479   -x-libraries | --x-libraries | --x-librarie | --x-librari \
480   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
481     ac_prev=x_libraries ;;
482   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
483   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
484     x_libraries="$ac_optarg" ;;
485
486   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
487     ;;
488
489   *)
490     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
491       echo "configure: warning: $ac_option: invalid host type" 1>&2
492     fi
493     if test "x$nonopt" != xNONE; then
494       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
495     fi
496     nonopt="$ac_option"
497     ;;
498
499   esac
500 done
501
502 if test -n "$ac_prev"; then
503   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
504 fi
505
506 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
507
508 # File descriptor usage:
509 # 0 standard input
510 # 1 file creation
511 # 2 errors and warnings
512 # 3 some systems may open it to /dev/tty
513 # 4 used on the Kubota Titan
514 # 6 checking for... messages and results
515 # 5 compiler messages saved in config.log
516 if test "$silent" = yes; then
517   exec 6>/dev/null
518 else
519   exec 6>&1
520 fi
521 exec 5>./config.log
522
523 echo "\
524 This file contains any messages produced by compilers while
525 running configure, to aid debugging if configure makes a mistake.
526 " 1>&5
527
528 # Strip out --no-create and --no-recursion so they do not pile up.
529 # Also quote any args containing shell metacharacters.
530 ac_configure_args=
531 for ac_arg
532 do
533   case "$ac_arg" in
534   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
535   | --no-cr | --no-c) ;;
536   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
537   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
538   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
539   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
540   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
541   esac
542 done
543
544 # NLS nuisances.
545 # Only set these to C if already set.  These must not be set unconditionally
546 # because not all systems understand e.g. LANG=C (notably SCO).
547 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
548 # Non-C LC_CTYPE values break the ctype check.
549 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
550 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
551 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
552 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
553
554 # confdefs.h avoids OS command line length limits that DEFS can exceed.
555 rm -rf conftest* confdefs.h
556 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
557 echo > confdefs.h
558
559 # A filename unique to this package, relative to the directory that
560 # configure is in, which we can look for to find out if srcdir is correct.
561 ac_unique_file=build/version
562
563 # Find the source files, if location was not specified.
564 if test -z "$srcdir"; then
565   ac_srcdir_defaulted=yes
566   # Try the directory containing this script, then its parent.
567   ac_prog=$0
568   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
569   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
570   srcdir=$ac_confdir
571   if test ! -r $srcdir/$ac_unique_file; then
572     srcdir=..
573   fi
574 else
575   ac_srcdir_defaulted=no
576 fi
577 if test ! -r $srcdir/$ac_unique_file; then
578   if test "$ac_srcdir_defaulted" = yes; then
579     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
580   else
581     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
582   fi
583 fi
584 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
585
586 # Prefer explicitly selected file to automatically selected ones.
587 if test -z "$CONFIG_SITE"; then
588   if test "x$prefix" != xNONE; then
589     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
590   else
591     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
592   fi
593 fi
594 for ac_site_file in $CONFIG_SITE; do
595   if test -r "$ac_site_file"; then
596     echo "loading site script $ac_site_file"
597     . "$ac_site_file"
598   fi
599 done
600
601
602 ac_ext=c
603 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
604 ac_cpp='$CPP $CPPFLAGS'
605 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
606 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
607 cross_compiling=$ac_cv_prog_cc_cross
608
609 ac_exeext=
610 ac_objext=o
611 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
612   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
613   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614     ac_n= ac_c='
615 ' ac_t='        '
616   else
617     ac_n=-n ac_c= ac_t=
618   fi
619 else
620   ac_n= ac_c='\c' ac_t=
621 fi
622
623 ac_aux_dir=
624 for ac_dir in build $srcdir/build; do
625   if 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   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
637 fi
638 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
639 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
640 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
641
642 OL_VERSION=`cat $ac_aux_dir/version`
643 if test -z "$OL_VERSION"; then
644         { echo "configure: error: could not determine version" 1>&2; exit 1; }
645 fi
646
647
648 echo $ac_n "checking host system type""... $ac_c" 1>&6
649 echo "configure:650: checking host system type" >&5
650 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
651
652 # Make sure we can run config.sub.
653   if $ac_config_sub sun4 >/dev/null 2>&1; then :
654     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
655   fi
656
657   ac_cv_host_alias=$host
658   case "$ac_cv_host_alias" in
659   NONE)
660     case $nonopt in
661     NONE)
662       if ac_cv_host_alias=`$ac_config_guess`; then :
663       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
664       fi ;;
665     *) ac_cv_host_alias=$nonopt ;;
666     esac ;;
667   esac
668
669   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
670   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
671   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
672   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
673 else
674   echo $ac_n "(cached) $ac_c" 1>&6
675 fi
676
677 echo "$ac_t""$ac_cv_host" 1>&6
678
679 host=$ac_cv_host
680 host_alias=$ac_cv_host_alias
681 host_cpu=$ac_cv_host_cpu
682 host_vendor=$ac_cv_host_vendor
683 host_os=$ac_cv_host_os
684
685
686
687
688
689 echo $ac_n "checking target system type""... $ac_c" 1>&6
690 echo "configure:691: checking target system type" >&5
691 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
692
693 # Make sure we can run config.sub.
694   if $ac_config_sub sun4 >/dev/null 2>&1; then :
695     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
696   fi
697
698   ac_cv_target_alias=$target
699   case "$ac_cv_target_alias" in
700   NONE)
701     case $nonopt in
702     NONE)
703       ac_cv_target_alias=$host_alias ;;
704
705     *) ac_cv_target_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
710   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_target" 1>&6
718
719 target=$ac_cv_target
720 target_alias=$ac_cv_target_alias
721 target_cpu=$ac_cv_target_cpu
722 target_vendor=$ac_cv_target_vendor
723 target_os=$ac_cv_target_os
724
725
726
727
728
729 echo $ac_n "checking build system type""... $ac_c" 1>&6
730 echo "configure:731: checking build system type" >&5
731 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_build_alias=$build
739   case "$ac_cv_build_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_build_alias=$host_alias ;;
744
745     *) ac_cv_build_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
750   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_build" 1>&6
758
759 build=$ac_cv_build
760 build_alias=$ac_cv_build_alias
761 build_cpu=$ac_cv_build_cpu
762 build_vendor=$ac_cv_build_vendor
763 build_os=$ac_cv_build_os
764
765
766
767
768
769 # Do some error checking and defaulting for the host and target type.
770 # The inputs are:
771 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
772 #
773 # The rules are:
774 # 1. You are not allowed to specify --host, --target, and nonopt at the
775 #    same time.
776 # 2. Host defaults to nonopt.
777 # 3. If nonopt is not specified, then host defaults to the current host,
778 #    as determined by config.guess.
779 # 4. Target and build default to nonopt.
780 # 5. If nonopt is not specified, then target and build default to host.
781
782 # The aliases save the names the user supplied, while $host etc.
783 # will get canonicalized.
784 case $host---$target---$nonopt in
785 NONE---*---* | *---NONE---* | *---*---NONE) ;;
786 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
787 esac
788
789 test "$host_alias" != "$target_alias" &&
790   test "$program_prefix$program_suffix$program_transform_name" = \
791     NONENONEs,x,x, &&
792   program_prefix=${target_alias}-
793
794
795 # Find a good install program.  We prefer a C program (faster),
796 # so one script is as good as another.  But avoid the broken or
797 # incompatible versions:
798 # SysV /etc/install, /usr/sbin/install
799 # SunOS /usr/etc/install
800 # IRIX /sbin/install
801 # AIX /bin/install
802 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
803 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
804 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
805 # ./install, which can be erroneously created by make from ./install.sh.
806 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
807 echo "configure:808: checking for a BSD compatible install" >&5
808 if test -z "$INSTALL"; then
809 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
813   for ac_dir in $PATH; do
814     # Account for people who put trailing slashes in PATH elements.
815     case "$ac_dir/" in
816     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
817     *)
818       # OSF1 and SCO ODT 3.0 have their own names for install.
819       # Don't use installbsd from OSF since it installs stuff as root
820       # by default.
821       for ac_prog in ginstall scoinst install; do
822         if test -f $ac_dir/$ac_prog; then
823           if test $ac_prog = install &&
824             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
825             # AIX install.  It has an incompatible calling convention.
826             :
827           elif test $ac_prog = install &&
828             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
829             # program-specific install script used by HP pwplus--don't use.
830             :
831           else
832             ac_cv_path_install="$ac_dir/$ac_prog -c"
833             break 2
834           fi
835         fi
836       done
837       ;;
838     esac
839   done
840   IFS="$ac_save_IFS"
841
842 fi
843   if test "${ac_cv_path_install+set}" = set; then
844     INSTALL="$ac_cv_path_install"
845   else
846     # As a last resort, use the slow shell script.  We don't cache a
847     # path for INSTALL within a source directory, because that will
848     # break other packages using the cache if that directory is
849     # removed, or if the path is relative.
850     INSTALL="$ac_install_sh"
851   fi
852 fi
853 echo "$ac_t""$INSTALL" 1>&6
854
855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
856 # It thinks the first close brace ends the variable substitution.
857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
858
859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
860
861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
862
863 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
864 echo "configure:865: checking whether build environment is sane" >&5
865 # Just in case
866 sleep 1
867 echo timestamp > conftestfile
868 # Do `set' in a subshell so we don't clobber the current shell's
869 # arguments.  Must try -L first in case configure is actually a
870 # symlink; some systems play weird games with the mod time of symlinks
871 # (eg FreeBSD returns the mod time of the symlink's containing
872 # directory).
873 if (
874    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
875    if test "$*" = "X"; then
876       # -L didn't work.
877       set X `ls -t $srcdir/configure conftestfile`
878    fi
879    if test "$*" != "X $srcdir/configure conftestfile" \
880       && test "$*" != "X conftestfile $srcdir/configure"; then
881
882       # If neither matched, then we have a broken ls.  This can happen
883       # if, for instance, CONFIG_SHELL is bash and it inherits a
884       # broken ls alias from the environment.  This has actually
885       # happened.  Such a system could not be considered "sane".
886       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
887 alias in your environment" 1>&2; exit 1; }
888    fi
889
890    test "$2" = conftestfile
891    )
892 then
893    # Ok.
894    :
895 else
896    { echo "configure: error: newly created file is older than distributed files!
897 Check your system clock" 1>&2; exit 1; }
898 fi
899 rm -f conftest*
900 echo "$ac_t""yes" 1>&6
901 if test "$program_transform_name" = s,x,x,; then
902   program_transform_name=
903 else
904   # Double any \ or $.  echo might interpret backslashes.
905   cat <<\EOF_SED > conftestsed
906 s,\\,\\\\,g; s,\$,$$,g
907 EOF_SED
908   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
909   rm -f conftestsed
910 fi
911 test "$program_prefix" != NONE &&
912   program_transform_name="s,^,${program_prefix},;$program_transform_name"
913 # Use a double $ so make ignores it.
914 test "$program_suffix" != NONE &&
915   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
916
917 # sed with no file args requires a program.
918 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
919
920 for ac_prog in mawk gawk nawk awk
921 do
922 # Extract the first word of "$ac_prog", so it can be a program name with args.
923 set dummy $ac_prog; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$AWK"; then
930   ac_cv_prog_AWK="$AWK" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
933   ac_dummy="$PATH"
934   for ac_dir in $ac_dummy; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       ac_cv_prog_AWK="$ac_prog"
938       break
939     fi
940   done
941   IFS="$ac_save_ifs"
942 fi
943 fi
944 AWK="$ac_cv_prog_AWK"
945 if test -n "$AWK"; then
946   echo "$ac_t""$AWK" 1>&6
947 else
948   echo "$ac_t""no" 1>&6
949 fi
950
951 test -n "$AWK" && break
952 done
953
954 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
955 echo "configure:956: checking whether ${MAKE-make} sets \${MAKE}" >&5
956 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
957 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   cat > conftestmake <<\EOF
961 all:
962         @echo 'ac_maketemp="${MAKE}"'
963 EOF
964 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
965 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
966 if test -n "$ac_maketemp"; then
967   eval ac_cv_prog_make_${ac_make}_set=yes
968 else
969   eval ac_cv_prog_make_${ac_make}_set=no
970 fi
971 rm -f conftestmake
972 fi
973 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
974   echo "$ac_t""yes" 1>&6
975   SET_MAKE=
976 else
977   echo "$ac_t""no" 1>&6
978   SET_MAKE="MAKE=${MAKE-make}"
979 fi
980
981
982
983 PACKAGE=OpenLDAP
984
985 VERSION=$OL_VERSION
986
987 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
988   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
989 fi
990
991
992
993 missing_dir=`cd $ac_aux_dir && pwd`
994 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
995 echo "configure:996: checking for working aclocal" >&5
996 # Run test in a subshell; some versions of sh will print an error if
997 # an executable is not found, even if stderr is redirected.
998 # Redirect stdin to placate older versions of autoconf.  Sigh.
999 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1000    ACLOCAL=aclocal
1001    echo "$ac_t""found" 1>&6
1002 else
1003    ACLOCAL="$missing_dir/missing aclocal"
1004    echo "$ac_t""missing" 1>&6
1005 fi
1006
1007 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1008 echo "configure:1009: checking for working autoconf" >&5
1009 # Run test in a subshell; some versions of sh will print an error if
1010 # an executable is not found, even if stderr is redirected.
1011 # Redirect stdin to placate older versions of autoconf.  Sigh.
1012 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1013    AUTOCONF=autoconf
1014    echo "$ac_t""found" 1>&6
1015 else
1016    AUTOCONF="$missing_dir/missing autoconf"
1017    echo "$ac_t""missing" 1>&6
1018 fi
1019
1020 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working automake" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (automake --version) < /dev/null > /dev/null 2>&1; then
1026    AUTOMAKE=automake
1027    echo "$ac_t""found" 1>&6
1028 else
1029    AUTOMAKE="$missing_dir/missing automake"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoheader" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOHEADER=autoheader
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOHEADER="$missing_dir/missing autoheader"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working makeinfo" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1052    MAKEINFO=makeinfo
1053    echo "$ac_t""found" 1>&6
1054 else
1055    MAKEINFO="$missing_dir/missing makeinfo"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 install_sh="$missing_dir/install-sh"
1060 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1061
1062 for ac_prog in gnutar gtar tar
1063 do
1064 # Extract the first word of "$ac_prog", so it can be a program name with args.
1065 set dummy $ac_prog; ac_word=$2
1066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067 echo "configure:1068: checking for $ac_word" >&5
1068 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071   if test -n "$AMTAR"; then
1072   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1073 else
1074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1075   ac_dummy="$PATH"
1076   for ac_dir in $ac_dummy; do
1077     test -z "$ac_dir" && ac_dir=.
1078     if test -f $ac_dir/$ac_word; then
1079       ac_cv_prog_AMTAR="$ac_prog"
1080       break
1081     fi
1082   done
1083   IFS="$ac_save_ifs"
1084 fi
1085 fi
1086 AMTAR="$ac_cv_prog_AMTAR"
1087 if test -n "$AMTAR"; then
1088   echo "$ac_t""$AMTAR" 1>&6
1089 else
1090   echo "$ac_t""no" 1>&6
1091 fi
1092
1093 test -n "$AMTAR" && break
1094 done
1095
1096
1097 AMTARFLAGS=
1098 if test -n "$AMTAR"; then
1099   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1100         AMTARFLAGS=o
1101   fi
1102 fi
1103
1104
1105
1106 cat >> confdefs.h <<EOF
1107 #define OPENLDAP_PACKAGE "$PACKAGE"
1108 EOF
1109
1110 cat >> confdefs.h <<EOF
1111 #define OPENLDAP_VERSION "$VERSION"
1112 EOF
1113
1114
1115
1116
1117 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1118 echo "configure:1119: checking configure arguments" >&5
1119
1120
1121 top_builddir=`pwd`
1122
1123 ldap_subdir="openldap"
1124
1125 # Check whether --with-subdir or --without-subdir was given.
1126 if test "${with_subdir+set}" = set; then
1127   withval="$with_subdir"
1128   
1129         if test "$withval" = "no"; then
1130                 ldap_subdir=""
1131         elif test "$withval" != "yes"; then
1132                 ldap_subdir="$withval"
1133         fi
1134
1135 fi
1136
1137
1138 # OpenLDAP --enable-debug
1139         # Check whether --enable-debug or --disable-debug was given.
1140 if test "${enable_debug+set}" = set; then
1141   enableval="$enable_debug"
1142   
1143         ol_arg=invalid
1144         for ol_val in auto yes no ; do
1145                 if test "$enableval" = "$ol_val" ; then
1146                         ol_arg="$ol_val"
1147                 fi
1148         done
1149         if test "$ol_arg" = "invalid" ; then
1150                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1151         fi
1152         ol_enable_debug="$ol_arg"
1153
1154 else
1155         ol_enable_debug="yes"
1156 fi
1157 # end --enable-debug
1158 # OpenLDAP --enable-syslog
1159         # Check whether --enable-syslog or --disable-syslog was given.
1160 if test "${enable_syslog+set}" = set; then
1161   enableval="$enable_syslog"
1162   
1163         ol_arg=invalid
1164         for ol_val in auto yes no ; do
1165                 if test "$enableval" = "$ol_val" ; then
1166                         ol_arg="$ol_val"
1167                 fi
1168         done
1169         if test "$ol_arg" = "invalid" ; then
1170                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1171         fi
1172         ol_enable_syslog="$ol_arg"
1173
1174 else
1175         ol_enable_syslog="auto"
1176 fi
1177 # end --enable-syslog
1178 # OpenLDAP --enable-proctitle
1179         # Check whether --enable-proctitle or --disable-proctitle was given.
1180 if test "${enable_proctitle+set}" = set; then
1181   enableval="$enable_proctitle"
1182   
1183         ol_arg=invalid
1184         for ol_val in auto yes no ; do
1185                 if test "$enableval" = "$ol_val" ; then
1186                         ol_arg="$ol_val"
1187                 fi
1188         done
1189         if test "$ol_arg" = "invalid" ; then
1190                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1191         fi
1192         ol_enable_proctitle="$ol_arg"
1193
1194 else
1195         ol_enable_proctitle="yes"
1196 fi
1197 # end --enable-proctitle
1198 # OpenLDAP --enable-cache
1199         # Check whether --enable-cache or --disable-cache was given.
1200 if test "${enable_cache+set}" = set; then
1201   enableval="$enable_cache"
1202   
1203         ol_arg=invalid
1204         for ol_val in auto yes no ; do
1205                 if test "$enableval" = "$ol_val" ; then
1206                         ol_arg="$ol_val"
1207                 fi
1208         done
1209         if test "$ol_arg" = "invalid" ; then
1210                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1211         fi
1212         ol_enable_cache="$ol_arg"
1213
1214 else
1215         ol_enable_cache="yes"
1216 fi
1217 # end --enable-cache
1218 # OpenLDAP --enable-dns
1219         # Check whether --enable-dns or --disable-dns was given.
1220 if test "${enable_dns+set}" = set; then
1221   enableval="$enable_dns"
1222   
1223         ol_arg=invalid
1224         for ol_val in auto yes no ; do
1225                 if test "$enableval" = "$ol_val" ; then
1226                         ol_arg="$ol_val"
1227                 fi
1228         done
1229         if test "$ol_arg" = "invalid" ; then
1230                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1231         fi
1232         ol_enable_dns="$ol_arg"
1233
1234 else
1235         ol_enable_dns="no"
1236 fi
1237 # end --enable-dns
1238 # OpenLDAP --enable-referrals
1239         # Check whether --enable-referrals or --disable-referrals was given.
1240 if test "${enable_referrals+set}" = set; then
1241   enableval="$enable_referrals"
1242   
1243         ol_arg=invalid
1244         for ol_val in auto yes no ; do
1245                 if test "$enableval" = "$ol_val" ; then
1246                         ol_arg="$ol_val"
1247                 fi
1248         done
1249         if test "$ol_arg" = "invalid" ; then
1250                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1251         fi
1252         ol_enable_referrals="$ol_arg"
1253
1254 else
1255         ol_enable_referrals="yes"
1256 fi
1257 # end --enable-referrals
1258 # OpenLDAP --enable-cldap
1259         # Check whether --enable-cldap or --disable-cldap was given.
1260 if test "${enable_cldap+set}" = set; then
1261   enableval="$enable_cldap"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no ; do
1265                 if test "$enableval" = "$ol_val" ; then
1266                         ol_arg="$ol_val"
1267                 fi
1268         done
1269         if test "$ol_arg" = "invalid" ; then
1270                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1271         fi
1272         ol_enable_cldap="$ol_arg"
1273
1274 else
1275         ol_enable_cldap="no"
1276 fi
1277 # end --enable-cldap
1278 # OpenLDAP --enable-x_compile
1279         # Check whether --enable-x_compile or --disable-x_compile was given.
1280 if test "${enable_x_compile+set}" = set; then
1281   enableval="$enable_x_compile"
1282   
1283         ol_arg=invalid
1284         for ol_val in yes no ; do
1285                 if test "$enableval" = "$ol_val" ; then
1286                         ol_arg="$ol_val"
1287                 fi
1288         done
1289         if test "$ol_arg" = "invalid" ; then
1290                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1291         fi
1292         ol_enable_x_compile="$ol_arg"
1293
1294 else
1295         ol_enable_x_compile="no"
1296 fi
1297 # end --enable-x_compile
1298
1299 # OpenLDAP --enable-dmalloc
1300         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1301 if test "${enable_dmalloc+set}" = set; then
1302   enableval="$enable_dmalloc"
1303   
1304         ol_arg=invalid
1305         for ol_val in auto yes no ; do
1306                 if test "$enableval" = "$ol_val" ; then
1307                         ol_arg="$ol_val"
1308                 fi
1309         done
1310         if test "$ol_arg" = "invalid" ; then
1311                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1312         fi
1313         ol_enable_dmalloc="$ol_arg"
1314
1315 else
1316         ol_enable_dmalloc="no"
1317 fi
1318 # end --enable-dmalloc
1319
1320 # OpenLDAP --with-cyrus_sasl
1321         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1322 if test "${with_cyrus_sasl+set}" = set; then
1323   withval="$with_cyrus_sasl"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no  ; do
1327                 if test "$withval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1333         fi
1334         ol_with_cyrus_sasl="$ol_arg"
1335
1336 else
1337         ol_with_cyrus_sasl="auto"
1338 fi
1339 # end --with-cyrus_sasl
1340
1341 # OpenLDAP --with-fetch
1342         # Check whether --with-fetch or --without-fetch was given.
1343 if test "${with_fetch+set}" = set; then
1344   withval="$with_fetch"
1345   
1346         ol_arg=invalid
1347         for ol_val in auto yes no  ; do
1348                 if test "$withval" = "$ol_val" ; then
1349                         ol_arg="$ol_val"
1350                 fi
1351         done
1352         if test "$ol_arg" = "invalid" ; then
1353                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1354         fi
1355         ol_with_fetch="$ol_arg"
1356
1357 else
1358         ol_with_fetch="auto"
1359 fi
1360 # end --with-fetch
1361
1362 # OpenLDAP --with-kerberos
1363         # Check whether --with-kerberos or --without-kerberos was given.
1364 if test "${with_kerberos+set}" = set; then
1365   withval="$with_kerberos"
1366   
1367         ol_arg=invalid
1368         for ol_val in auto k5 k4 afs yes no ; do
1369                 if test "$withval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1375         fi
1376         ol_with_kerberos="$ol_arg"
1377
1378 else
1379         ol_with_kerberos="auto"
1380 fi
1381 # end --with-kerberos
1382
1383 # OpenLDAP --with-readline
1384         # Check whether --with-readline or --without-readline was given.
1385 if test "${with_readline+set}" = set; then
1386   withval="$with_readline"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no  ; do
1390                 if test "$withval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1396         fi
1397         ol_with_readline="$ol_arg"
1398
1399 else
1400         ol_with_readline="auto"
1401 fi
1402 # end --with-readline
1403
1404 # OpenLDAP --with-threads
1405         # Check whether --with-threads or --without-threads was given.
1406 if test "${with_threads+set}" = set; then
1407   withval="$with_threads"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto posix mach lwp yes no manual  ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1417         fi
1418         ol_with_threads="$ol_arg"
1419
1420 else
1421         ol_with_threads="auto"
1422 fi
1423 # end --with-threads
1424
1425 # OpenLDAP --with-tls
1426         # Check whether --with-tls or --without-tls was given.
1427 if test "${with_tls+set}" = set; then
1428   withval="$with_tls"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto ssleay openssl yes no  ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1438         fi
1439         ol_with_tls="$ol_arg"
1440
1441 else
1442         ol_with_tls="auto"
1443 fi
1444 # end --with-tls
1445
1446 # OpenLDAP --with-yielding_select
1447         # Check whether --with-yielding_select or --without-yielding_select was given.
1448 if test "${with_yielding_select+set}" = set; then
1449   withval="$with_yielding_select"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no manual  ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1459         fi
1460         ol_with_yielding_select="$ol_arg"
1461
1462 else
1463         ol_with_yielding_select="auto"
1464 fi
1465 # end --with-yielding_select
1466
1467
1468
1469 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1470 if test "${with_xxldapdoptions+set}" = set; then
1471   withval="$with_xxldapdoptions"
1472   :
1473 fi
1474
1475 # OpenLDAP --enable-ldapd
1476         # Check whether --enable-ldapd or --disable-ldapd was given.
1477 if test "${enable_ldapd+set}" = set; then
1478   enableval="$enable_ldapd"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no ; do
1482                 if test "$enableval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1488         fi
1489         ol_enable_ldapd="$ol_arg"
1490
1491 else
1492         ol_enable_ldapd="no"
1493 fi
1494 # end --enable-ldapd
1495
1496 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1497 if test "${with_xxslapdoptions+set}" = set; then
1498   withval="$with_xxslapdoptions"
1499   :
1500 fi
1501
1502 # OpenLDAP --enable-slapd
1503         # Check whether --enable-slapd or --disable-slapd was given.
1504 if test "${enable_slapd+set}" = set; then
1505   enableval="$enable_slapd"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1515         fi
1516         ol_enable_slapd="$ol_arg"
1517
1518 else
1519         ol_enable_slapd="yes"
1520 fi
1521 # end --enable-slapd
1522 # OpenLDAP --enable-cleartext
1523         # Check whether --enable-cleartext or --disable-cleartext was given.
1524 if test "${enable_cleartext+set}" = set; then
1525   enableval="$enable_cleartext"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no ; do
1529                 if test "$enableval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1535         fi
1536         ol_enable_cleartext="$ol_arg"
1537
1538 else
1539         ol_enable_cleartext="yes"
1540 fi
1541 # end --enable-cleartext
1542 # OpenLDAP --enable-crypt
1543         # Check whether --enable-crypt or --disable-crypt was given.
1544 if test "${enable_crypt+set}" = set; then
1545   enableval="$enable_crypt"
1546   
1547         ol_arg=invalid
1548         for ol_val in auto yes no ; do
1549                 if test "$enableval" = "$ol_val" ; then
1550                         ol_arg="$ol_val"
1551                 fi
1552         done
1553         if test "$ol_arg" = "invalid" ; then
1554                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1555         fi
1556         ol_enable_crypt="$ol_arg"
1557
1558 else
1559         ol_enable_crypt="auto"
1560 fi
1561 # end --enable-crypt
1562 # OpenLDAP --enable-modules
1563         # Check whether --enable-modules or --disable-modules was given.
1564 if test "${enable_modules+set}" = set; then
1565   enableval="$enable_modules"
1566   
1567         ol_arg=invalid
1568         for ol_val in auto yes no ; do
1569                 if test "$enableval" = "$ol_val" ; then
1570                         ol_arg="$ol_val"
1571                 fi
1572         done
1573         if test "$ol_arg" = "invalid" ; then
1574                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1575         fi
1576         ol_enable_modules="$ol_arg"
1577
1578 else
1579         ol_enable_modules="no"
1580 fi
1581 # end --enable-modules
1582 # OpenLDAP --enable-multimaster
1583         # Check whether --enable-multimaster or --disable-multimaster was given.
1584 if test "${enable_multimaster+set}" = set; then
1585   enableval="$enable_multimaster"
1586   
1587         ol_arg=invalid
1588         for ol_val in auto yes no ; do
1589                 if test "$enableval" = "$ol_val" ; then
1590                         ol_arg="$ol_val"
1591                 fi
1592         done
1593         if test "$ol_arg" = "invalid" ; then
1594                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1595         fi
1596         ol_enable_multimaster="$ol_arg"
1597
1598 else
1599         ol_enable_multimaster="no"
1600 fi
1601 # end --enable-multimaster
1602 # OpenLDAP --enable-phonetic
1603         # Check whether --enable-phonetic or --disable-phonetic was given.
1604 if test "${enable_phonetic+set}" = set; then
1605   enableval="$enable_phonetic"
1606   
1607         ol_arg=invalid
1608         for ol_val in auto yes no ; do
1609                 if test "$enableval" = "$ol_val" ; then
1610                         ol_arg="$ol_val"
1611                 fi
1612         done
1613         if test "$ol_arg" = "invalid" ; then
1614                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1615         fi
1616         ol_enable_phonetic="$ol_arg"
1617
1618 else
1619         ol_enable_phonetic="no"
1620 fi
1621 # end --enable-phonetic
1622 # OpenLDAP --enable-quipu
1623         # Check whether --enable-quipu or --disable-quipu was given.
1624 if test "${enable_quipu+set}" = set; then
1625   enableval="$enable_quipu"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no ; do
1629                 if test "$enableval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1635         fi
1636         ol_enable_quipu="$ol_arg"
1637
1638 else
1639         ol_enable_quipu="no"
1640 fi
1641 # end --enable-quipu
1642 # OpenLDAP --enable-rlookups
1643         # Check whether --enable-rlookups or --disable-rlookups was given.
1644 if test "${enable_rlookups+set}" = set; then
1645   enableval="$enable_rlookups"
1646   
1647         ol_arg=invalid
1648         for ol_val in auto yes no ; do
1649                 if test "$enableval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1655         fi
1656         ol_enable_rlookups="$ol_arg"
1657
1658 else
1659         ol_enable_rlookups="auto"
1660 fi
1661 # end --enable-rlookups
1662 # OpenLDAP --enable-wrappers
1663         # Check whether --enable-wrappers or --disable-wrappers was given.
1664 if test "${enable_wrappers+set}" = set; then
1665   enableval="$enable_wrappers"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto yes no ; do
1669                 if test "$enableval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1675         fi
1676         ol_enable_wrappers="$ol_arg"
1677
1678 else
1679         ol_enable_wrappers="no"
1680 fi
1681 # end --enable-wrappers
1682
1683 # OpenLDAP --enable-bdb2
1684         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1685 if test "${enable_bdb2+set}" = set; then
1686   enableval="$enable_bdb2"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1696         fi
1697         ol_enable_bdb2="$ol_arg"
1698
1699 else
1700         ol_enable_bdb2="no"
1701 fi
1702 # end --enable-bdb2
1703 # OpenLDAP --with-bdb2_module
1704         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1705 if test "${with_bdb2_module+set}" = set; then
1706   withval="$with_bdb2_module"
1707   
1708         ol_arg=invalid
1709         for ol_val in static dynamic ; do
1710                 if test "$withval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1716         fi
1717         ol_with_bdb2_module="$ol_arg"
1718
1719 else
1720         ol_with_bdb2_module="static"
1721 fi
1722 # end --with-bdb2_module
1723
1724 # OpenLDAP --enable-ldap
1725         # Check whether --enable-ldap or --disable-ldap was given.
1726 if test "${enable_ldap+set}" = set; then
1727   enableval="$enable_ldap"
1728   
1729         ol_arg=invalid
1730         for ol_val in auto yes no ; do
1731                 if test "$enableval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1737         fi
1738         ol_enable_ldap="$ol_arg"
1739
1740 else
1741         ol_enable_ldap="no"
1742 fi
1743 # end --enable-ldap
1744 # OpenLDAP --with-ldap_module
1745         # Check whether --with-ldap_module or --without-ldap_module was given.
1746 if test "${with_ldap_module+set}" = set; then
1747   withval="$with_ldap_module"
1748   
1749         ol_arg=invalid
1750         for ol_val in static dynamic ; do
1751                 if test "$withval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1757         fi
1758         ol_with_ldap_module="$ol_arg"
1759
1760 else
1761         ol_with_ldap_module="static"
1762 fi
1763 # end --with-ldap_module
1764
1765 # OpenLDAP --enable-ldbm
1766         # Check whether --enable-ldbm or --disable-ldbm was given.
1767 if test "${enable_ldbm+set}" = set; then
1768   enableval="$enable_ldbm"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1778         fi
1779         ol_enable_ldbm="$ol_arg"
1780
1781 else
1782         ol_enable_ldbm="yes"
1783 fi
1784 # end --enable-ldbm
1785 # OpenLDAP --with-ldbm_module
1786         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1787 if test "${with_ldbm_module+set}" = set; then
1788   withval="$with_ldbm_module"
1789   
1790         ol_arg=invalid
1791         for ol_val in static dynamic ; do
1792                 if test "$withval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1798         fi
1799         ol_with_ldbm_module="$ol_arg"
1800
1801 else
1802         ol_with_ldbm_module="static"
1803 fi
1804 # end --with-ldbm_module
1805
1806 # OpenLDAP --with-ldbm_api
1807         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1808 if test "${with_ldbm_api+set}" = set; then
1809   withval="$with_ldbm_api"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1813                 if test "$withval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1819         fi
1820         ol_with_ldbm_api="$ol_arg"
1821
1822 else
1823         ol_with_ldbm_api="auto"
1824 fi
1825 # end --with-ldbm_api
1826
1827 # OpenLDAP --with-ldbm_type
1828         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1829 if test "${with_ldbm_type+set}" = set; then
1830   withval="$with_ldbm_type"
1831   
1832         ol_arg=invalid
1833         for ol_val in auto btree hash ; do
1834                 if test "$withval" = "$ol_val" ; then
1835                         ol_arg="$ol_val"
1836                 fi
1837         done
1838         if test "$ol_arg" = "invalid" ; then
1839                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1840         fi
1841         ol_with_ldbm_type="$ol_arg"
1842
1843 else
1844         ol_with_ldbm_type="auto"
1845 fi
1846 # end --with-ldbm_type
1847
1848
1849 # OpenLDAP --enable-passwd
1850         # Check whether --enable-passwd or --disable-passwd was given.
1851 if test "${enable_passwd+set}" = set; then
1852   enableval="$enable_passwd"
1853   
1854         ol_arg=invalid
1855         for ol_val in auto yes no ; do
1856                 if test "$enableval" = "$ol_val" ; then
1857                         ol_arg="$ol_val"
1858                 fi
1859         done
1860         if test "$ol_arg" = "invalid" ; then
1861                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1862         fi
1863         ol_enable_passwd="$ol_arg"
1864
1865 else
1866         ol_enable_passwd="no"
1867 fi
1868 # end --enable-passwd
1869 # OpenLDAP --with-passwd_module
1870         # Check whether --with-passwd_module or --without-passwd_module was given.
1871 if test "${with_passwd_module+set}" = set; then
1872   withval="$with_passwd_module"
1873   
1874         ol_arg=invalid
1875         for ol_val in static dynamic ; do
1876                 if test "$withval" = "$ol_val" ; then
1877                         ol_arg="$ol_val"
1878                 fi
1879         done
1880         if test "$ol_arg" = "invalid" ; then
1881                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1882         fi
1883         ol_with_passwd_module="$ol_arg"
1884
1885 else
1886         ol_with_passwd_module="static"
1887 fi
1888 # end --with-passwd_module
1889
1890 # OpenLDAP --enable-perl
1891         # Check whether --enable-perl or --disable-perl was given.
1892 if test "${enable_perl+set}" = set; then
1893   enableval="$enable_perl"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1903         fi
1904         ol_enable_perl="$ol_arg"
1905
1906 else
1907         ol_enable_perl="no"
1908 fi
1909 # end --enable-perl
1910 # OpenLDAP --with-perl_module
1911         # Check whether --with-perl_module or --without-perl_module was given.
1912 if test "${with_perl_module+set}" = set; then
1913   withval="$with_perl_module"
1914   
1915         ol_arg=invalid
1916         for ol_val in static dynamic ; do
1917                 if test "$withval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1923         fi
1924         ol_with_perl_module="$ol_arg"
1925
1926 else
1927         ol_with_perl_module="static"
1928 fi
1929 # end --with-perl_module
1930
1931 # OpenLDAP --enable-shell
1932         # Check whether --enable-shell or --disable-shell was given.
1933 if test "${enable_shell+set}" = set; then
1934   enableval="$enable_shell"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1944         fi
1945         ol_enable_shell="$ol_arg"
1946
1947 else
1948         ol_enable_shell="no"
1949 fi
1950 # end --enable-shell
1951 # OpenLDAP --with-shell_module
1952         # Check whether --with-shell_module or --without-shell_module was given.
1953 if test "${with_shell_module+set}" = set; then
1954   withval="$with_shell_module"
1955   
1956         ol_arg=invalid
1957         for ol_val in static dynamic ; do
1958                 if test "$withval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1964         fi
1965         ol_with_shell_module="$ol_arg"
1966
1967 else
1968         ol_with_shell_module="static"
1969 fi
1970 # end --with-shell_module
1971
1972 # OpenLDAP --enable-tcl
1973         # Check whether --enable-tcl or --disable-tcl was given.
1974 if test "${enable_tcl+set}" = set; then
1975   enableval="$enable_tcl"
1976   
1977         ol_arg=invalid
1978         for ol_val in auto yes no ; do
1979                 if test "$enableval" = "$ol_val" ; then
1980                         ol_arg="$ol_val"
1981                 fi
1982         done
1983         if test "$ol_arg" = "invalid" ; then
1984                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1985         fi
1986         ol_enable_tcl="$ol_arg"
1987
1988 else
1989         ol_enable_tcl="no"
1990 fi
1991 # end --enable-tcl
1992 # OpenLDAP --with-tcl_module
1993         # Check whether --with-tcl_module or --without-tcl_module was given.
1994 if test "${with_tcl_module+set}" = set; then
1995   withval="$with_tcl_module"
1996   
1997         ol_arg=invalid
1998         for ol_val in static dynamic ; do
1999                 if test "$withval" = "$ol_val" ; then
2000                         ol_arg="$ol_val"
2001                 fi
2002         done
2003         if test "$ol_arg" = "invalid" ; then
2004                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2005         fi
2006         ol_with_tcl_module="$ol_arg"
2007
2008 else
2009         ol_with_tcl_module="static"
2010 fi
2011 # end --with-tcl_module
2012
2013
2014 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2015 if test "${with_xxslurpdoptions+set}" = set; then
2016   withval="$with_xxslurpdoptions"
2017   :
2018 fi
2019
2020 # OpenLDAP --enable-slurpd
2021         # Check whether --enable-slurpd or --disable-slurpd was given.
2022 if test "${enable_slurpd+set}" = set; then
2023   enableval="$enable_slurpd"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2033         fi
2034         ol_enable_slurpd="$ol_arg"
2035
2036 else
2037         ol_enable_slurpd="auto"
2038 fi
2039 # end --enable-slurpd
2040
2041 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2042 if test "${with_xxliboptions+set}" = set; then
2043   withval="$with_xxliboptions"
2044   :
2045 fi
2046
2047 # Check whether --enable-static or --disable-static was given.
2048 if test "${enable_static+set}" = set; then
2049   enableval="$enable_static"
2050   p=${PACKAGE-default}
2051 case "$enableval" in
2052 yes) enable_static=yes ;;
2053 no) enable_static=no ;;
2054 *)
2055   enable_static=no
2056   # Look at the argument we got.  We use all the common list separators.
2057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2058   for pkg in $enableval; do
2059     if test "X$pkg" = "X$p"; then
2060       enable_static=yes
2061     fi
2062   done
2063   IFS="$ac_save_ifs"
2064   ;;
2065 esac
2066 else
2067   enable_static=yes
2068 fi
2069
2070 # Check whether --enable-shared or --disable-shared was given.
2071 if test "${enable_shared+set}" = set; then
2072   enableval="$enable_shared"
2073   p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_shared=yes ;;
2076 no) enable_shared=no ;;
2077 *)
2078   enable_shared=no
2079   # Look at the argument we got.  We use all the common list separators.
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081   for pkg in $enableval; do
2082     if test "X$pkg" = "X$p"; then
2083       enable_shared=yes
2084     fi
2085   done
2086   IFS="$ac_save_ifs"
2087   ;;
2088 esac
2089 else
2090   enable_shared=yes
2091 fi
2092
2093
2094 # validate options
2095 if test $ol_enable_dns = yes ; then
2096         if test $ol_enable_referrals = no ; then
2097                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2098         fi
2099         if test $ol_enable_referrals = auto ; then
2100                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2101                 ol_enable_referrals=yes
2102         fi
2103 fi
2104
2105 if test $ol_enable_slapd = no ; then
2106                 if test $ol_enable_bdb2 = yes ; then
2107                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2108         fi
2109         if test $ol_enable_ldap = yes ; then
2110                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2111         fi
2112         if test $ol_enable_ldbm = yes ; then
2113                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2114         fi
2115         if test $ol_enable_passwd = yes ; then
2116                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2117         fi
2118         if test $ol_enable_perl = yes ; then
2119                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2120         fi
2121         if test $ol_enable_shell = yes ; then
2122                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2123         fi
2124         if test $ol_enable_tcl = yes ; then
2125                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2126         fi
2127         if test $ol_enable_modules = yes ; then
2128                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2129         fi
2130         if test $ol_enable_multimaster = yes ; then
2131                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2132         fi
2133         if test $ol_enable_wrappers = yes ; then
2134                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2135         fi
2136         if test $ol_enable_phonetic = yes ; then
2137                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2138         fi
2139         if test $ol_enable_quipu = yes ; then
2140                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2141         fi
2142         if test $ol_enable_rlookups = yes ; then
2143                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2144         fi
2145         if test $ol_with_ldbm_api != auto ; then
2146                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2147         fi
2148         if test $ol_with_ldbm_type != auto ; then
2149                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2150         fi
2151         if test $ol_with_bdb2_module != static ; then
2152                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2153         fi
2154         if test $ol_with_ldap_module != static ; then
2155                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2156         fi
2157         if test $ol_with_ldbm_module != static ; then
2158                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2159         fi
2160         if test $ol_with_passwd_module != static ; then
2161                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2162         fi
2163         if test $ol_with_perl_module != static ; then
2164                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2165         fi
2166         if test $ol_with_shell_module != static ; then
2167                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2168         fi
2169         if test $ol_with_tcl_module != static ; then
2170                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2171         fi
2172         if test $ol_enable_slurpd = yes ; then
2173                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2174         fi
2175
2176         # force settings to no
2177         ol_enable_bdb2=no
2178         ol_enable_ldap=no
2179         ol_enable_ldbm=no
2180         ol_enable_passwd=no
2181         ol_enable_perl=no
2182         ol_enable_shell=no
2183         ol_enable_tcl=no
2184
2185         ol_enable_modules=no
2186         ol_enable_multimaster=no
2187         ol_enable_phonetic=no
2188         ol_enable_quipu=no
2189         ol_enable_rlookups=no
2190         ol_enable_wrappers=no
2191
2192         ol_with_ldbm_api=no
2193         ol_with_ldbm_type=no
2194
2195         ol_with_bdb2_module=static
2196         ol_with_ldap_module=static
2197         ol_with_ldbm_module=static
2198         ol_with_passwd_module=static
2199         ol_with_perl_module=static
2200         ol_with_shell_module=static
2201         ol_with_tcl_module=static
2202
2203         ol_enable_slurpd=no
2204
2205 elif test $ol_enable_ldbm = no ; then
2206         
2207         if test $ol_with_ldbm_api != auto ; then
2208                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2209         fi
2210
2211         if test $ol_with_ldbm_type != auto ; then
2212                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2213         fi
2214
2215         if test $ol_with_ldbm_module != static ; then
2216                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2217         fi
2218
2219         if test $ol_enable_bdb2 = yes ; then
2220                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2221         fi
2222
2223         if test $ol_enable_modules != yes -a \
2224                 $ol_enable_ldap = no -a \
2225                 $ol_enable_passwd = no -a \
2226                 $ol_enable_perl = no -a \
2227                 $ol_enable_shell = no -a \
2228                 $ol_enable_tcl = no ; then
2229                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2230         fi
2231
2232         ol_with_ldbm_api=no
2233         ol_with_ldbm_type=no
2234         ol_with_ldbm_module=static
2235
2236 elif test $ol_enable_bdb2 = yes ; then
2237         
2238         if test $ol_with_ldbm_api != auto -a \
2239                 $ol_with_ldbm_api != db2 ; then
2240                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2241         fi
2242
2243         ol_with_ldbm_api=db2
2244
2245 else
2246         
2247         if test $ol_enable_bdb2 != no ; then
2248                 if test $ol_with_ldbm_api != auto -a \
2249                         $ol_with_ldbm_api != db2 ; then
2250                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2251                         ol_enable_bdb2=no
2252                 fi
2253         fi
2254
2255         if test $ol_with_ldbm_api = gdbm -a \
2256                 $ol_with_ldbm_type = btree ; then
2257                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2258         fi
2259         if test $ol_with_ldbm_api = mdbm -a \
2260                 $ol_with_ldbm_type = btree ; then
2261                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2262         fi
2263         if test $ol_with_ldbm_api = ndbm -a \
2264                 $ol_with_ldbm_type = btree ; then
2265                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2266         fi
2267 fi
2268
2269 if test $ol_enable_slurpd = yes ; then
2270                 if test $ol_with_threads = no ; then
2271                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2272         fi
2273 fi
2274
2275 echo "$ac_t""done" 1>&6
2276
2277 ## Initialize vars
2278 LDAP_LIBS=
2279 LDIF_LIBS=
2280 LDBM_LIBS=
2281 LTHREAD_LIBS=
2282 LUTIL_LIBS=
2283
2284 LDAPD_LIBS=
2285 SLAPD_LIBS=
2286 SLURPD_LIBS=
2287
2288 BUILD_LDAPD=no
2289 BUILD_SLAPD=no
2290 BUILD_SLURPD=no
2291
2292 BUILD_BDB2=no
2293 BUILD_LDAP=no
2294 BUILD_LDBM=no
2295 BUILD_PASSWD=no
2296 BUILD_PERL=no
2297 BUILD_QUIPU=no
2298 BUILD_SHELL=no
2299 BUILD_TCL=no
2300 BUILD_THREAD=no
2301
2302 BUILD_BDB2_DYNAMIC=static
2303 BUILD_LDAP_DYNAMIC=static
2304 BUILD_LDBM_DYNAMIC=static
2305 BUILD_PASSWD_DYNAMIC=static
2306 BUILD_PERL_DYNAMIC=static
2307 BUILD_SHELL_DYNAMIC=static
2308 BUILD_TCL_DYNAMIC=static
2309
2310 SLAPD_MODULES_LDFLAGS=
2311 SLAPD_MODULES_CPPFLAGS=
2312 SLAPD_MODULES_LIST=
2313
2314 SLAPD_PERL_LDFLAGS=
2315 SLAPD_PERL_CPPFLAGS=
2316
2317 KRB_LIBS=
2318 READLINE_LIBS=
2319 SASL_LIBS=
2320 TERMCAP_LIBS=
2321 TLS_LIBS=
2322 MODULES_LIBS=
2323
2324
2325
2326 cat >> confdefs.h <<\EOF
2327 #define HAVE_MKVERSION 1
2328 EOF
2329
2330
2331
2332
2333
2334 ol_aix_threads=no
2335 case "$target" in
2336 *-*-aix*)       if test -z "$CC" ; then
2337                 case "$ol_with_threads" in
2338                 auto | yes |  posix) ol_aix_threads=yes ;;
2339                 esac
2340         fi
2341 ;;
2342 esac
2343
2344 if test $ol_aix_threads = yes ; then
2345         if test -z "${CC}" ; then
2346                 for ac_prog in cc_r xlc_r cc
2347 do
2348 # Extract the first word of "$ac_prog", so it can be a program name with args.
2349 set dummy $ac_prog; ac_word=$2
2350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2351 echo "configure:2352: checking for $ac_word" >&5
2352 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2353   echo $ac_n "(cached) $ac_c" 1>&6
2354 else
2355   if test -n "$CC"; then
2356   ac_cv_prog_CC="$CC" # Let the user override the test.
2357 else
2358   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2359   ac_dummy="$PATH"
2360   for ac_dir in $ac_dummy; do
2361     test -z "$ac_dir" && ac_dir=.
2362     if test -f $ac_dir/$ac_word; then
2363       ac_cv_prog_CC="$ac_prog"
2364       break
2365     fi
2366   done
2367   IFS="$ac_save_ifs"
2368 fi
2369 fi
2370 CC="$ac_cv_prog_CC"
2371 if test -n "$CC"; then
2372   echo "$ac_t""$CC" 1>&6
2373 else
2374   echo "$ac_t""no" 1>&6
2375 fi
2376
2377 test -n "$CC" && break
2378 done
2379
2380
2381                 if test "$CC" = cc ; then
2382                                                 if test $ol_with_threads != auto ; then
2383                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2384                         else
2385                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2386                         fi
2387                         ol_with_threads=no
2388                 fi
2389         fi
2390
2391         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2392                 ol_with_threads=posix
2393                 ol_cv_pthread_create=yes
2394         fi
2395 fi
2396
2397 if test -z "${CC}"; then
2398         for ac_prog in cc
2399 do
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2403 echo "configure:2404: checking for $ac_word" >&5
2404 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2405   echo $ac_n "(cached) $ac_c" 1>&6
2406 else
2407   if test -n "$CC"; then
2408   ac_cv_prog_CC="$CC" # Let the user override the test.
2409 else
2410   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2411   ac_dummy="$PATH"
2412   for ac_dir in $ac_dummy; do
2413     test -z "$ac_dir" && ac_dir=.
2414     if test -f $ac_dir/$ac_word; then
2415       ac_cv_prog_CC="$ac_prog"
2416       break
2417     fi
2418   done
2419   IFS="$ac_save_ifs"
2420 fi
2421 fi
2422 CC="$ac_cv_prog_CC"
2423 if test -n "$CC"; then
2424   echo "$ac_t""$CC" 1>&6
2425 else
2426   echo "$ac_t""no" 1>&6
2427 fi
2428
2429 test -n "$CC" && break
2430 done
2431
2432 fi
2433
2434
2435
2436 # Check whether --enable-fast-install or --disable-fast-install was given.
2437 if test "${enable_fast_install+set}" = set; then
2438   enableval="$enable_fast_install"
2439   p=${PACKAGE-default}
2440 case "$enableval" in
2441 yes) enable_fast_install=yes ;;
2442 no) enable_fast_install=no ;;
2443 *)
2444   enable_fast_install=no
2445   # Look at the argument we got.  We use all the common list separators.
2446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2447   for pkg in $enableval; do
2448     if test "X$pkg" = "X$p"; then
2449       enable_fast_install=yes
2450     fi
2451   done
2452   IFS="$ac_save_ifs"
2453   ;;
2454 esac
2455 else
2456   enable_fast_install=yes
2457 fi
2458
2459 # Extract the first word of "ranlib", so it can be a program name with args.
2460 set dummy ranlib; ac_word=$2
2461 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2462 echo "configure:2463: checking for $ac_word" >&5
2463 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2464   echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466   if test -n "$RANLIB"; then
2467   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2468 else
2469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2470   ac_dummy="$PATH"
2471   for ac_dir in $ac_dummy; do
2472     test -z "$ac_dir" && ac_dir=.
2473     if test -f $ac_dir/$ac_word; then
2474       ac_cv_prog_RANLIB="ranlib"
2475       break
2476     fi
2477   done
2478   IFS="$ac_save_ifs"
2479   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2480 fi
2481 fi
2482 RANLIB="$ac_cv_prog_RANLIB"
2483 if test -n "$RANLIB"; then
2484   echo "$ac_t""$RANLIB" 1>&6
2485 else
2486   echo "$ac_t""no" 1>&6
2487 fi
2488
2489 # Extract the first word of "gcc", so it can be a program name with args.
2490 set dummy gcc; ac_word=$2
2491 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2492 echo "configure:2493: checking for $ac_word" >&5
2493 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2494   echo $ac_n "(cached) $ac_c" 1>&6
2495 else
2496   if test -n "$CC"; then
2497   ac_cv_prog_CC="$CC" # Let the user override the test.
2498 else
2499   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2500   ac_dummy="$PATH"
2501   for ac_dir in $ac_dummy; do
2502     test -z "$ac_dir" && ac_dir=.
2503     if test -f $ac_dir/$ac_word; then
2504       ac_cv_prog_CC="gcc"
2505       break
2506     fi
2507   done
2508   IFS="$ac_save_ifs"
2509 fi
2510 fi
2511 CC="$ac_cv_prog_CC"
2512 if test -n "$CC"; then
2513   echo "$ac_t""$CC" 1>&6
2514 else
2515   echo "$ac_t""no" 1>&6
2516 fi
2517
2518 if test -z "$CC"; then
2519   # Extract the first word of "cc", so it can be a program name with args.
2520 set dummy cc; ac_word=$2
2521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2522 echo "configure:2523: checking for $ac_word" >&5
2523 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2524   echo $ac_n "(cached) $ac_c" 1>&6
2525 else
2526   if test -n "$CC"; then
2527   ac_cv_prog_CC="$CC" # Let the user override the test.
2528 else
2529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2530   ac_prog_rejected=no
2531   ac_dummy="$PATH"
2532   for ac_dir in $ac_dummy; do
2533     test -z "$ac_dir" && ac_dir=.
2534     if test -f $ac_dir/$ac_word; then
2535       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2536         ac_prog_rejected=yes
2537         continue
2538       fi
2539       ac_cv_prog_CC="cc"
2540       break
2541     fi
2542   done
2543   IFS="$ac_save_ifs"
2544 if test $ac_prog_rejected = yes; then
2545   # We found a bogon in the path, so make sure we never use it.
2546   set dummy $ac_cv_prog_CC
2547   shift
2548   if test $# -gt 0; then
2549     # We chose a different compiler from the bogus one.
2550     # However, it has the same basename, so the bogon will be chosen
2551     # first if we set CC to just the basename; use the full file name.
2552     shift
2553     set dummy "$ac_dir/$ac_word" "$@"
2554     shift
2555     ac_cv_prog_CC="$@"
2556   fi
2557 fi
2558 fi
2559 fi
2560 CC="$ac_cv_prog_CC"
2561 if test -n "$CC"; then
2562   echo "$ac_t""$CC" 1>&6
2563 else
2564   echo "$ac_t""no" 1>&6
2565 fi
2566
2567   if test -z "$CC"; then
2568     case "`uname -s`" in
2569     *win32* | *WIN32* | *CYGWIN*)
2570       # Extract the first word of "cl", so it can be a program name with args.
2571 set dummy cl; ac_word=$2
2572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2573 echo "configure:2574: checking for $ac_word" >&5
2574 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2575   echo $ac_n "(cached) $ac_c" 1>&6
2576 else
2577   if test -n "$CC"; then
2578   ac_cv_prog_CC="$CC" # Let the user override the test.
2579 else
2580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2581   ac_dummy="$PATH"
2582   for ac_dir in $ac_dummy; do
2583     test -z "$ac_dir" && ac_dir=.
2584     if test -f $ac_dir/$ac_word; then
2585       ac_cv_prog_CC="cl"
2586       break
2587     fi
2588   done
2589   IFS="$ac_save_ifs"
2590 fi
2591 fi
2592 CC="$ac_cv_prog_CC"
2593 if test -n "$CC"; then
2594   echo "$ac_t""$CC" 1>&6
2595 else
2596   echo "$ac_t""no" 1>&6
2597 fi
2598  ;;
2599     esac
2600   fi
2601   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2602 fi
2603
2604 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2605 echo "configure:2606: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2606
2607 ac_ext=c
2608 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2609 ac_cpp='$CPP $CPPFLAGS'
2610 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2611 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2612 cross_compiling=$ac_cv_prog_cc_cross
2613
2614 cat > conftest.$ac_ext << EOF
2615
2616 #line 2617 "configure"
2617 #include "confdefs.h"
2618
2619 main(){return(0);}
2620 EOF
2621 if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2622   ac_cv_prog_cc_works=yes
2623   # If we can't run a trivial program, we are probably using a cross compiler.
2624   if (./conftest; exit) 2>/dev/null; then
2625     ac_cv_prog_cc_cross=no
2626   else
2627     ac_cv_prog_cc_cross=yes
2628   fi
2629 else
2630   echo "configure: failed program was:" >&5
2631   cat conftest.$ac_ext >&5
2632   ac_cv_prog_cc_works=no
2633 fi
2634 rm -fr conftest*
2635 ac_ext=c
2636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2637 ac_cpp='$CPP $CPPFLAGS'
2638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2639 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2640 cross_compiling=$ac_cv_prog_cc_cross
2641
2642 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2643 if test $ac_cv_prog_cc_works = no; then
2644   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2645 fi
2646 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2647 echo "configure:2648: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2648 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2649 cross_compiling=$ac_cv_prog_cc_cross
2650
2651 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2652 echo "configure:2653: checking whether we are using GNU C" >&5
2653 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2654   echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656   cat > conftest.c <<EOF
2657 #ifdef __GNUC__
2658   yes;
2659 #endif
2660 EOF
2661 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2662   ac_cv_prog_gcc=yes
2663 else
2664   ac_cv_prog_gcc=no
2665 fi
2666 fi
2667
2668 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2669
2670 if test $ac_cv_prog_gcc = yes; then
2671   GCC=yes
2672 else
2673   GCC=
2674 fi
2675
2676 ac_test_CFLAGS="${CFLAGS+set}"
2677 ac_save_CFLAGS="$CFLAGS"
2678 CFLAGS=
2679 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2680 echo "configure:2681: checking whether ${CC-cc} accepts -g" >&5
2681 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   echo 'void f(){}' > conftest.c
2685 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2686   ac_cv_prog_cc_g=yes
2687 else
2688   ac_cv_prog_cc_g=no
2689 fi
2690 rm -f conftest*
2691
2692 fi
2693
2694 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2695 if test "$ac_test_CFLAGS" = set; then
2696   CFLAGS="$ac_save_CFLAGS"
2697 elif test $ac_cv_prog_cc_g = yes; then
2698   if test "$GCC" = yes; then
2699     CFLAGS="-g -O2"
2700   else
2701     CFLAGS="-g"
2702   fi
2703 else
2704   if test "$GCC" = yes; then
2705     CFLAGS="-O2"
2706   else
2707     CFLAGS=
2708   fi
2709 fi
2710
2711 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2712 if test "${with_gnu_ld+set}" = set; then
2713   withval="$with_gnu_ld"
2714   test "$withval" = no || with_gnu_ld=yes
2715 else
2716   with_gnu_ld=no
2717 fi
2718
2719 ac_prog=ld
2720 if test "$ac_cv_prog_gcc" = yes; then
2721   # Check if gcc -print-prog-name=ld gives a path.
2722   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2723 echo "configure:2724: checking for ld used by GCC" >&5
2724   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2725   case "$ac_prog" in
2726     # Accept absolute paths.
2727     [\\/]* | [A-Za-z]:[\\/]*)
2728       re_direlt='/[^/][^/]*/\.\./'
2729       # Canonicalize the path of ld
2730       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2731       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2732         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2733       done
2734       test -z "$LD" && LD="$ac_prog"
2735       ;;
2736   "")
2737     # If it fails, then pretend we aren't using GCC.
2738     ac_prog=ld
2739     ;;
2740   *)
2741     # If it is relative, then search for the first ld in PATH.
2742     with_gnu_ld=unknown
2743     ;;
2744   esac
2745 elif test "$with_gnu_ld" = yes; then
2746   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2747 echo "configure:2748: checking for GNU ld" >&5
2748 else
2749   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2750 echo "configure:2751: checking for non-GNU ld" >&5
2751 fi
2752 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2753   echo $ac_n "(cached) $ac_c" 1>&6
2754 else
2755   if test -z "$LD"; then
2756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2757   for ac_dir in $PATH; do
2758     test -z "$ac_dir" && ac_dir=.
2759     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2760       ac_cv_path_LD="$ac_dir/$ac_prog"
2761       # Check to see if the program is GNU ld.  I'd rather use --version,
2762       # but apparently some GNU ld's only accept -v.
2763       # Break only if it was the GNU/non-GNU ld that we prefer.
2764       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2765         test "$with_gnu_ld" != no && break
2766       else
2767         test "$with_gnu_ld" != yes && break
2768       fi
2769     fi
2770   done
2771   IFS="$ac_save_ifs"
2772 else
2773   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2774 fi
2775 fi
2776
2777 LD="$ac_cv_path_LD"
2778 if test -n "$LD"; then
2779   echo "$ac_t""$LD" 1>&6
2780 else
2781   echo "$ac_t""no" 1>&6
2782 fi
2783 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2784
2785 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2786 echo "configure:2787: checking if the linker ($LD) is GNU ld" >&5
2787 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2788   echo $ac_n "(cached) $ac_c" 1>&6
2789 else
2790   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2791 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2792   ac_cv_prog_gnu_ld=yes
2793 else
2794   ac_cv_prog_gnu_ld=no
2795 fi
2796 fi
2797
2798 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2799
2800
2801 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2802 echo "configure:2803: checking for BSD-compatible nm" >&5
2803 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2804   echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806   if test -n "$NM"; then
2807   # Let the user override the test.
2808   ac_cv_path_NM="$NM"
2809 else
2810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2811   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2812     test -z "$ac_dir" && ac_dir=.
2813     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2814       # Check to see if the nm accepts a BSD-compat flag.
2815       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2816       #   nm: unknown option "B" ignored
2817       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2818         ac_cv_path_NM="$ac_dir/nm -B"
2819         break
2820       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2821         ac_cv_path_NM="$ac_dir/nm -p"
2822         break
2823       else
2824         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2825         continue # so that we can try to find one that supports BSD flags
2826       fi
2827     fi
2828   done
2829   IFS="$ac_save_ifs"
2830   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2831 fi
2832 fi
2833
2834 NM="$ac_cv_path_NM"
2835 echo "$ac_t""$NM" 1>&6
2836
2837
2838 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2839 echo "configure:2840: checking whether ln -s works" >&5
2840 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2841   echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843   rm -f conftestdata
2844 if ln -s X conftestdata 2>/dev/null
2845 then
2846   rm -f conftestdata
2847   ac_cv_prog_LN_S="ln -s"
2848 else
2849   ac_cv_prog_LN_S=ln
2850 fi
2851 fi
2852 LN_S="$ac_cv_prog_LN_S"
2853 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2854   echo "$ac_t""yes" 1>&6
2855 else
2856   echo "$ac_t""no" 1>&6
2857 fi
2858
2859
2860 # Check for any special flags to pass to ltconfig.
2861 libtool_flags="--cache-file=$cache_file"
2862 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2863 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2864 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2865 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2866 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2867 libtool_flags="$libtool_flags --enable-dlopen"
2868
2869 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2870 if test "${enable_libtool_lock+set}" = set; then
2871   enableval="$enable_libtool_lock"
2872   :
2873 fi
2874
2875 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2876 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2877
2878 # Some flags need to be propagated to the compiler or linker for good
2879 # libtool support.
2880 case "$host" in
2881 *-*-irix6*)
2882   # Find out which ABI we are using.
2883   echo '#line 2884 "configure"' > conftest.$ac_ext
2884   if { (eval echo configure:2885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2885     case "`/usr/bin/file conftest.o`" in
2886     *32-bit*)
2887       LD="${LD-ld} -32"
2888       ;;
2889     *N32*)
2890       LD="${LD-ld} -n32"
2891       ;;
2892     *64-bit*)
2893       LD="${LD-ld} -64"
2894       ;;
2895     esac
2896   fi
2897   rm -rf conftest*
2898   ;;
2899
2900 *-*-sco3.2v5*)
2901   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2902   SAVE_CFLAGS="$CFLAGS"
2903   CFLAGS="$CFLAGS -belf"
2904   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2905 echo "configure:2906: checking whether the C compiler needs -belf" >&5
2906 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912
2913 int main() {
2914
2915 ; return 0; }
2916 EOF
2917 if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2918   rm -rf conftest*
2919   lt_cv_cc_needs_belf=yes
2920 else
2921   echo "configure: failed program was:" >&5
2922   cat conftest.$ac_ext >&5
2923   rm -rf conftest*
2924   lt_cv_cc_needs_belf=no
2925 fi
2926 rm -f conftest*
2927 fi
2928
2929 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2930   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2931     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2932     CFLAGS="$SAVE_CFLAGS"
2933   fi
2934   ;;
2935
2936
2937 esac
2938
2939
2940 # Save cache, so that ltconfig can load it
2941
2942
2943 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2944 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2945 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2946 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2947 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2948 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2949 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2950 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2951
2952 # Reload cache, that may have been modified by ltconfig
2953
2954
2955 # This can be used to rebuild libtool when needed
2956 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2957
2958 # Always use our own libtool.
2959 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2960
2961 # Redirect the config.log output again, so that the ltconfig log is not
2962 # clobbered by the next message.
2963 exec 5>>./config.log
2964
2965
2966 for ac_prog in mawk gawk nawk awk
2967 do
2968 # Extract the first word of "$ac_prog", so it can be a program name with args.
2969 set dummy $ac_prog; ac_word=$2
2970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2971 echo "configure:2972: checking for $ac_word" >&5
2972 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   if test -n "$AWK"; then
2976   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2977 else
2978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2979   ac_dummy="$PATH"
2980   for ac_dir in $ac_dummy; do
2981     test -z "$ac_dir" && ac_dir=.
2982     if test -f $ac_dir/$ac_word; then
2983       ac_cv_prog_AWK="$ac_prog"
2984       break
2985     fi
2986   done
2987   IFS="$ac_save_ifs"
2988 fi
2989 fi
2990 AWK="$ac_cv_prog_AWK"
2991 if test -n "$AWK"; then
2992   echo "$ac_t""$AWK" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996
2997 test -n "$AWK" && break
2998 done
2999
3000 # test for ln hardlink support
3001 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3002 echo "configure:3003: checking whether ln works" >&5
3003 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3004   echo $ac_n "(cached) $ac_c" 1>&6
3005 else
3006   rm -f conftest.src conftest.dst
3007 echo "conftest" > conftest.src
3008 if ln conftest.src conftest.dst 2>/dev/null
3009 then
3010   ol_cv_prog_LN_H="ln"
3011 else
3012   ol_cv_prog_LN_H="cp"
3013 fi
3014 rm -f conftest.src conftest.dst
3015
3016 fi
3017 LN_H="$ol_cv_prog_LN_H"
3018 if test "$ol_cv_prog_LN_H" = "ln"; then
3019         echo "$ac_t""yes" 1>&6
3020 else
3021         echo "$ac_t""no" 1>&6
3022 fi
3023
3024 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3025 echo "configure:3026: checking whether ln -s works" >&5
3026 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3027   echo $ac_n "(cached) $ac_c" 1>&6
3028 else
3029   rm -f conftestdata
3030 if ln -s X conftestdata 2>/dev/null
3031 then
3032   rm -f conftestdata
3033   ac_cv_prog_LN_S="ln -s"
3034 else
3035   ac_cv_prog_LN_S=ln
3036 fi
3037 fi
3038 LN_S="$ac_cv_prog_LN_S"
3039 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3040   echo "$ac_t""yes" 1>&6
3041 else
3042   echo "$ac_t""no" 1>&6
3043 fi
3044
3045
3046 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3047         LN_S="$LN_H"
3048 fi
3049
3050 # Extract the first word of "sendmail", so it can be a program name with args.
3051 set dummy sendmail; ac_word=$2
3052 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3053 echo "configure:3054: checking for $ac_word" >&5
3054 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   case "$SENDMAIL" in
3058   /*)
3059   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3060   ;;
3061   ?:/*)                  
3062   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3063   ;;
3064   *)
3065   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3066   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3067   for ac_dir in $ac_dummy; do 
3068     test -z "$ac_dir" && ac_dir=.
3069     if test -f $ac_dir/$ac_word; then
3070       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3071       break
3072     fi
3073   done
3074   IFS="$ac_save_ifs"
3075   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3076   ;;
3077 esac
3078 fi
3079 SENDMAIL="$ac_cv_path_SENDMAIL"
3080 if test -n "$SENDMAIL"; then
3081   echo "$ac_t""$SENDMAIL" 1>&6
3082 else
3083   echo "$ac_t""no" 1>&6
3084 fi
3085
3086 # Extract the first word of "vi", so it can be a program name with args.
3087 set dummy vi; ac_word=$2
3088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3089 echo "configure:3090: checking for $ac_word" >&5
3090 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3091   echo $ac_n "(cached) $ac_c" 1>&6
3092 else
3093   case "$EDITOR" in
3094   /*)
3095   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3096   ;;
3097   ?:/*)                  
3098   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3099   ;;
3100   *)
3101   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3102   ac_dummy="$PATH:/usr/ucb"
3103   for ac_dir in $ac_dummy; do 
3104     test -z "$ac_dir" && ac_dir=.
3105     if test -f $ac_dir/$ac_word; then
3106       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3107       break
3108     fi
3109   done
3110   IFS="$ac_save_ifs"
3111   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3112   ;;
3113 esac
3114 fi
3115 EDITOR="$ac_cv_path_EDITOR"
3116 if test -n "$EDITOR"; then
3117   echo "$ac_t""$EDITOR" 1>&6
3118 else
3119   echo "$ac_t""no" 1>&6
3120 fi
3121
3122 # Extract the first word of "finger", so it can be a program name with args.
3123 set dummy finger; ac_word=$2
3124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3125 echo "configure:3126: checking for $ac_word" >&5
3126 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   case "$FINGER" in
3130   /*)
3131   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3132   ;;
3133   ?:/*)                  
3134   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3135   ;;
3136   *)
3137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3138   ac_dummy="$PATH:/usr/ucb"
3139   for ac_dir in $ac_dummy; do 
3140     test -z "$ac_dir" && ac_dir=.
3141     if test -f $ac_dir/$ac_word; then
3142       ac_cv_path_FINGER="$ac_dir/$ac_word"
3143       break
3144     fi
3145   done
3146   IFS="$ac_save_ifs"
3147   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3148   ;;
3149 esac
3150 fi
3151 FINGER="$ac_cv_path_FINGER"
3152 if test -n "$FINGER"; then
3153   echo "$ac_t""$FINGER" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158
3159 ol_link_perl=no
3160 if test $ol_enable_perl != no ; then
3161         # Extract the first word of "perl", so it can be a program name with args.
3162 set dummy perl; ac_word=$2
3163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3164 echo "configure:3165: checking for $ac_word" >&5
3165 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3166   echo $ac_n "(cached) $ac_c" 1>&6
3167 else
3168   case "$PERLBIN" in
3169   /*)
3170   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3171   ;;
3172   ?:/*)                  
3173   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3174   ;;
3175   *)
3176   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3177   ac_dummy="$PATH"
3178   for ac_dir in $ac_dummy; do 
3179     test -z "$ac_dir" && ac_dir=.
3180     if test -f $ac_dir/$ac_word; then
3181       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3182       break
3183     fi
3184   done
3185   IFS="$ac_save_ifs"
3186   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3187   ;;
3188 esac
3189 fi
3190 PERLBIN="$ac_cv_path_PERLBIN"
3191 if test -n "$PERLBIN"; then
3192   echo "$ac_t""$PERLBIN" 1>&6
3193 else
3194   echo "$ac_t""no" 1>&6
3195 fi
3196
3197
3198         if test "no$PERLBIN" = "no" ; then
3199                 if test $ol_enable_perl = yes ; then
3200                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3201                 fi
3202
3203         else
3204                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3205                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3206
3207                                 ol_link_perl=yes
3208         fi
3209 fi
3210
3211 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3212 echo "configure:3213: checking how to run the C preprocessor" >&5
3213 # On Suns, sometimes $CPP names a directory.
3214 if test -n "$CPP" && test -d "$CPP"; then
3215   CPP=
3216 fi
3217 if test -z "$CPP"; then
3218 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221     # This must be in double quotes, not single quotes, because CPP may get
3222   # substituted into the Makefile and "${CC-cc}" will confuse make.
3223   CPP="${CC-cc} -E"
3224   # On the NeXT, cc -E runs the code through the compiler's parser,
3225   # not just through cpp.
3226   cat > conftest.$ac_ext <<EOF
3227 #line 3228 "configure"
3228 #include "confdefs.h"
3229 #include <assert.h>
3230 Syntax Error
3231 EOF
3232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3233 { (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3235 if test -z "$ac_err"; then
3236   :
3237 else
3238   echo "$ac_err" >&5
3239   echo "configure: failed program was:" >&5
3240   cat conftest.$ac_ext >&5
3241   rm -rf conftest*
3242   CPP="${CC-cc} -E -traditional-cpp"
3243   cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 #include <assert.h>
3247 Syntax Error
3248 EOF
3249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3250 { (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3252 if test -z "$ac_err"; then
3253   :
3254 else
3255   echo "$ac_err" >&5
3256   echo "configure: failed program was:" >&5
3257   cat conftest.$ac_ext >&5
3258   rm -rf conftest*
3259   CPP="${CC-cc} -nologo -E"
3260   cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263 #include <assert.h>
3264 Syntax Error
3265 EOF
3266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3267 { (eval echo configure:3268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3269 if test -z "$ac_err"; then
3270   :
3271 else
3272   echo "$ac_err" >&5
3273   echo "configure: failed program was:" >&5
3274   cat conftest.$ac_ext >&5
3275   rm -rf conftest*
3276   CPP=/lib/cpp
3277 fi
3278 rm -f conftest*
3279 fi
3280 rm -f conftest*
3281 fi
3282 rm -f conftest*
3283   ac_cv_prog_CPP="$CPP"
3284 fi
3285   CPP="$ac_cv_prog_CPP"
3286 else
3287   ac_cv_prog_CPP="$CPP"
3288 fi
3289 echo "$ac_t""$CPP" 1>&6
3290
3291
3292 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3293         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3294
3295 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3296         echo "configure: warning: programs compiled here do run here..." 1>&2
3297         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3298
3299 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3300         echo "configure: warning: programs compiled here do not run here..." 1>&2
3301         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3302 fi
3303
3304 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3305 echo "configure:3306: checking for AIX" >&5
3306 cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 #ifdef _AIX
3310   yes
3311 #endif
3312
3313 EOF
3314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3315   egrep "yes" >/dev/null 2>&1; then
3316   rm -rf conftest*
3317   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3318 #define _ALL_SOURCE 1
3319 EOF
3320
3321 else
3322   rm -rf conftest*
3323   echo "$ac_t""no" 1>&6
3324 fi
3325 rm -f conftest*
3326
3327
3328 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3329 echo "configure:3330: checking for POSIXized ISC" >&5
3330 if test -d /etc/conf/kconfig.d &&
3331   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3332 then
3333   echo "$ac_t""yes" 1>&6
3334   ISC=yes # If later tests want to check for ISC.
3335   cat >> confdefs.h <<\EOF
3336 #define _POSIX_SOURCE 1
3337 EOF
3338
3339   if test "$GCC" = yes; then
3340     CC="$CC -posix"
3341   else
3342     CC="$CC -Xp"
3343   fi
3344 else
3345   echo "$ac_t""no" 1>&6
3346   ISC=
3347 fi
3348
3349 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3350 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3351 echo "configure:3352: checking for minix/config.h" >&5
3352 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 #include <minix/config.h>
3359 EOF
3360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3361 { (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3363 if test -z "$ac_err"; then
3364   rm -rf conftest*
3365   eval "ac_cv_header_$ac_safe=yes"
3366 else
3367   echo "$ac_err" >&5
3368   echo "configure: failed program was:" >&5
3369   cat conftest.$ac_ext >&5
3370   rm -rf conftest*
3371   eval "ac_cv_header_$ac_safe=no"
3372 fi
3373 rm -f conftest*
3374 fi
3375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3376   echo "$ac_t""yes" 1>&6
3377   MINIX=yes
3378 else
3379   echo "$ac_t""no" 1>&6
3380 MINIX=
3381 fi
3382
3383 if test "$MINIX" = yes; then
3384   cat >> confdefs.h <<\EOF
3385 #define _POSIX_SOURCE 1
3386 EOF
3387
3388   cat >> confdefs.h <<\EOF
3389 #define _POSIX_1_SOURCE 2
3390 EOF
3391
3392   cat >> confdefs.h <<\EOF
3393 #define _MINIX 1
3394 EOF
3395
3396 fi
3397
3398
3399 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3400 echo "configure:3401: checking for Cygwin environment" >&5
3401 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407
3408 int main() {
3409
3410 #ifndef __CYGWIN__
3411 #define __CYGWIN__ __CYGWIN32__
3412 #endif
3413 return __CYGWIN__;
3414 ; return 0; }
3415 EOF
3416 if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3417   rm -rf conftest*
3418   ac_cv_cygwin=yes
3419 else
3420   echo "configure: failed program was:" >&5
3421   cat conftest.$ac_ext >&5
3422   rm -rf conftest*
3423   ac_cv_cygwin=no
3424 fi
3425 rm -f conftest*
3426 fi
3427
3428 echo "$ac_t""$ac_cv_cygwin" 1>&6
3429 CYGWIN=
3430 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3431 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3432 echo "configure:3433: checking for mingw32 environment" >&5
3433 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   cat > conftest.$ac_ext <<EOF
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439
3440 int main() {
3441 return __MINGW32__;
3442 ; return 0; }
3443 EOF
3444 if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3445   rm -rf conftest*
3446   ac_cv_mingw32=yes
3447 else
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450   rm -rf conftest*
3451   ac_cv_mingw32=no
3452 fi
3453 rm -f conftest*
3454 fi
3455
3456 echo "$ac_t""$ac_cv_mingw32" 1>&6
3457 MINGW32=
3458 test "$ac_cv_mingw32" = yes && MINGW32=yes
3459 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3460 echo "configure:3461: checking for EMX OS/2 environment" >&5
3461 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   cat > conftest.$ac_ext <<EOF
3465 #line 3466 "configure"
3466 #include "confdefs.h"
3467
3468 int main() {
3469 return __EMX__;
3470 ; return 0; }
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3473   rm -rf conftest*
3474   ac_cv_emxos2=yes
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   rm -rf conftest*
3479   ac_cv_emxos2=no
3480 fi
3481 rm -f conftest*
3482 fi
3483
3484 echo "$ac_t""$ac_cv_emxos2" 1>&6
3485 EMXOS2=
3486 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3487
3488
3489
3490 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3491 echo "configure:3492: checking for executable suffix" >&5
3492 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3496   ac_cv_exeext=.exe
3497 else
3498   rm -f conftest*
3499   echo 'int main () { return 0; }' > conftest.$ac_ext
3500   ac_cv_exeext=
3501   if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3502     for file in conftest.*; do
3503       case $file in
3504       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3505       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3506       esac
3507     done
3508   else
3509     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3510   fi
3511   rm -f conftest*
3512   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3513 fi
3514 fi
3515
3516 EXEEXT=""
3517 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3518 echo "$ac_t""${ac_cv_exeext}" 1>&6
3519 ac_exeext=$EXEEXT
3520
3521 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3522 echo "configure:3523: checking for object suffix" >&5
3523 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3524   echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526   rm -f conftest*
3527 echo 'int i = 1;' > conftest.$ac_ext
3528 if { (eval echo configure:3529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3529   for ac_file in conftest.*; do
3530     case $ac_file in
3531     *.c) ;;
3532     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3533     esac
3534   done
3535 else
3536   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3537 fi
3538 rm -f conftest*
3539 fi
3540
3541 echo "$ac_t""$ac_cv_objext" 1>&6
3542 OBJEXT=$ac_cv_objext
3543 ac_objext=$ac_cv_objext
3544
3545
3546 cat >> confdefs.h <<EOF
3547 #define EXEEXT "${EXEEXT}"
3548 EOF
3549
3550
3551 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3552 echo "configure:3553: checking for be_app in -lbe" >&5
3553 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   ac_save_LIBS="$LIBS"
3558 LIBS="-lbe -lroot -lnet $LIBS"
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 /* Override any gcc2 internal prototype to avoid an error.  */
3563 /* We use char because int might match the return type of a gcc2
3564     builtin and then its argument prototype would still apply.  */
3565 char be_app();
3566
3567 int main() {
3568 be_app()
3569 ; return 0; }
3570 EOF
3571 if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3572   rm -rf conftest*
3573   eval "ac_cv_lib_$ac_lib_var=yes"
3574 else
3575   echo "configure: failed program was:" >&5
3576   cat conftest.$ac_ext >&5
3577   rm -rf conftest*
3578   eval "ac_cv_lib_$ac_lib_var=no"
3579 fi
3580 rm -f conftest*
3581 LIBS="$ac_save_LIBS"
3582
3583 fi
3584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3585   echo "$ac_t""yes" 1>&6
3586   LIBS="$LIBS -lbe -lroot -lnet"
3587 else
3588   echo "$ac_t""no" 1>&6
3589 :
3590 fi
3591
3592
3593
3594
3595
3596 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3597 echo "configure:3598: checking for ${CC-cc} option to accept ANSI C" >&5
3598 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   am_cv_prog_cc_stdc=no
3602 ac_save_CC="$CC"
3603 # Don't try gcc -ansi; that turns off useful extensions and
3604 # breaks some systems' header files.
3605 # AIX                   -qlanglvl=ansi
3606 # Ultrix and OSF/1      -std1
3607 # HP-UX 10.20 and later -Ae
3608 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3609 # SVR4                  -Xc -D__EXTENSIONS__
3610 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3611 do
3612   CC="$ac_save_CC $ac_arg"
3613   cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616 #include <stdarg.h>
3617 #include <stdio.h>
3618 #include <sys/types.h>
3619 #include <sys/stat.h>
3620 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3621 struct buf { int x; };
3622 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3623 static char *e (p, i)
3624      char **p;
3625      int i;
3626 {
3627   return p[i];
3628 }
3629 static char *f (char * (*g) (char **, int), char **p, ...)
3630 {
3631   char *s;
3632   va_list v;
3633   va_start (v,p);
3634   s = g (p, va_arg (v,int));
3635   va_end (v);
3636   return s;
3637 }
3638 int test (int i, double x);
3639 struct s1 {int (*f) (int a);};
3640 struct s2 {int (*f) (double a);};
3641 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3642 int argc;
3643 char **argv;
3644
3645 int main() {
3646
3647 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3648
3649 ; return 0; }
3650 EOF
3651 if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3652   rm -rf conftest*
3653   am_cv_prog_cc_stdc="$ac_arg"; break
3654 else
3655   echo "configure: failed program was:" >&5
3656   cat conftest.$ac_ext >&5
3657 fi
3658 rm -f conftest*
3659 done
3660 CC="$ac_save_CC"
3661
3662 fi
3663
3664 if test -z "$am_cv_prog_cc_stdc"; then
3665   echo "$ac_t""none needed" 1>&6
3666 else
3667   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3668 fi
3669 case "x$am_cv_prog_cc_stdc" in
3670   x|xno) ;;
3671   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3672 esac
3673
3674 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3675         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3676 fi
3677
3678 # test for make depend flag
3679 OL_MKDEP=
3680 OL_MKDEP_FLAGS=
3681 if test -z "${MKDEP}"; then
3682         OL_MKDEP="${CC-cc}"
3683         if test -z "${MKDEP_FLAGS}"; then
3684                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3685 echo "configure:3686: checking for ${OL_MKDEP} depend flag" >&5
3686 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   
3690                         ol_cv_mkdep=no
3691                         for flag in "-M" "-xM"; do
3692                                 cat > conftest.c <<EOF
3693  noCode;
3694 EOF
3695                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3696                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3697                                 then
3698                                         if test ! -f conftest."${ac_object}" ; then
3699                                                 ol_cv_mkdep=$flag
3700                                                 OL_MKDEP_FLAGS="$flag"
3701                                                 break
3702                                         fi
3703                                 fi
3704                         done
3705                         rm -f conftest*
3706                 
3707 fi
3708
3709 echo "$ac_t""$ol_cv_mkdep" 1>&6
3710         else
3711                 cc_cv_mkdep=yes
3712                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3713         fi
3714 else
3715         cc_cv_mkdep=yes
3716         OL_MKDEP="${MKDEP}"
3717         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3718 fi
3719
3720
3721
3722 if test "${ol_cv_mkdep}" = no ; then
3723         # this will soon become an error
3724         echo "configure: warning: do not know how to generate dependencies" 1>&2
3725 fi
3726
3727 ol_link_modules=no
3728 if test $ol_enable_modules != no ; then
3729         for ac_hdr in ltdl.h
3730 do
3731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3733 echo "configure:3734: checking for $ac_hdr" >&5
3734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737   cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740 #include <$ac_hdr>
3741 EOF
3742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3743 { (eval echo configure:3744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3745 if test -z "$ac_err"; then
3746   rm -rf conftest*
3747   eval "ac_cv_header_$ac_safe=yes"
3748 else
3749   echo "$ac_err" >&5
3750   echo "configure: failed program was:" >&5
3751   cat conftest.$ac_ext >&5
3752   rm -rf conftest*
3753   eval "ac_cv_header_$ac_safe=no"
3754 fi
3755 rm -f conftest*
3756 fi
3757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3758   echo "$ac_t""yes" 1>&6
3759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3760   cat >> confdefs.h <<EOF
3761 #define $ac_tr_hdr 1
3762 EOF
3763  
3764 else
3765   echo "$ac_t""no" 1>&6
3766 fi
3767 done
3768
3769
3770         if test $ac_cv_header_ltdl_h = no ; then
3771                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3772
3773         fi
3774
3775         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3776 echo "configure:3777: checking for lt_dlinit in -lltdl" >&5
3777 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3779   echo $ac_n "(cached) $ac_c" 1>&6
3780 else
3781   ac_save_LIBS="$LIBS"
3782 LIBS="-lltdl  $LIBS"
3783 cat > conftest.$ac_ext <<EOF
3784 #line 3785 "configure"
3785 #include "confdefs.h"
3786 /* Override any gcc2 internal prototype to avoid an error.  */
3787 /* We use char because int might match the return type of a gcc2
3788     builtin and then its argument prototype would still apply.  */
3789 char lt_dlinit();
3790
3791 int main() {
3792 lt_dlinit()
3793 ; return 0; }
3794 EOF
3795 if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3796   rm -rf conftest*
3797   eval "ac_cv_lib_$ac_lib_var=yes"
3798 else
3799   echo "configure: failed program was:" >&5
3800   cat conftest.$ac_ext >&5
3801   rm -rf conftest*
3802   eval "ac_cv_lib_$ac_lib_var=no"
3803 fi
3804 rm -f conftest*
3805 LIBS="$ac_save_LIBS"
3806
3807 fi
3808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3809   echo "$ac_t""yes" 1>&6
3810     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3811     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3812   cat >> confdefs.h <<EOF
3813 #define $ac_tr_lib 1
3814 EOF
3815
3816   LIBS="-lltdl $LIBS"
3817
3818 else
3819   echo "$ac_t""no" 1>&6
3820 fi
3821
3822         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3823                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3824         fi
3825         ol_link_modules=yes
3826 else
3827         ol_with_bdb2_module=static
3828         ol_with_ldap_module=static
3829         ol_with_ldbm_module=static
3830         ol_with_passwd_module=static
3831         ol_with_perl_module=static
3832         ol_with_shell_module=static
3833         ol_with_tcl_module=static
3834 fi
3835
3836 # test for EBCDIC
3837 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3838 echo "configure:3839: checking for EBCDIC" >&5
3839 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3840   echo $ac_n "(cached) $ac_c" 1>&6
3841 else
3842   
3843         cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846
3847 #if !('M' == 0xd4)
3848 #include <__ASCII__/generate_error.h>
3849 #endif
3850
3851 EOF
3852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3853 { (eval echo configure:3854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3855 if test -z "$ac_err"; then
3856   rm -rf conftest*
3857   ol_cv_cpp_ebcdic=yes
3858 else
3859   echo "$ac_err" >&5
3860   echo "configure: failed program was:" >&5
3861   cat conftest.$ac_ext >&5
3862   rm -rf conftest*
3863   ol_cv_cpp_ebcdic=no
3864 fi
3865 rm -f conftest*
3866 fi
3867
3868 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3869 if test $ol_cv_cpp_ebcdic = yes ; then
3870         cat >> confdefs.h <<\EOF
3871 #define HAVE_EBCDIC 1
3872 EOF
3873
3874 fi
3875
3876 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3877 echo "configure:3878: checking for ANSI C header files" >&5
3878 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <stdlib.h>
3885 #include <stdarg.h>
3886 #include <string.h>
3887 #include <float.h>
3888 EOF
3889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3890 { (eval echo configure:3891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3892 if test -z "$ac_err"; then
3893   rm -rf conftest*
3894   ol_cv_header_stdc=yes
3895 else
3896   echo "$ac_err" >&5
3897   echo "configure: failed program was:" >&5
3898   cat conftest.$ac_ext >&5
3899   rm -rf conftest*
3900   ol_cv_header_stdc=no
3901 fi
3902 rm -f conftest*
3903
3904 if test $ol_cv_header_stdc = yes; then
3905   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <string.h>
3910 EOF
3911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3912   egrep "memchr" >/dev/null 2>&1; then
3913   :
3914 else
3915   rm -rf conftest*
3916   ol_cv_header_stdc=no
3917 fi
3918 rm -f conftest*
3919
3920 fi
3921
3922 if test $ol_cv_header_stdc = yes; then
3923   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 #include <stdlib.h>
3928 EOF
3929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3930   egrep "free" >/dev/null 2>&1; then
3931   :
3932 else
3933   rm -rf conftest*
3934   ol_cv_header_stdc=no
3935 fi
3936 rm -f conftest*
3937
3938 fi
3939
3940 if test $ol_cv_header_stdc = yes; then
3941   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3942 if test "$cross_compiling" = yes; then
3943   :
3944 else
3945   cat > conftest.$ac_ext <<EOF
3946 #line 3947 "configure"
3947 #include "confdefs.h"
3948 #include <ctype.h>
3949 #ifndef HAVE_EBCDIC
3950 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3951 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3952 #else
3953 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3954                 || ('j' <= (c) && (c) <= 'r') \
3955                 || ('s' <= (c) && (c) <= 'z'))
3956 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3957 #endif
3958 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3959 int main () { int i; for (i = 0; i < 256; i++)
3960 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3961 exit (0); }
3962
3963 EOF
3964 if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3965 then
3966   :
3967 else
3968   echo "configure: failed program was:" >&5
3969   cat conftest.$ac_ext >&5
3970   rm -fr conftest*
3971   ol_cv_header_stdc=no
3972 fi
3973 rm -fr conftest*
3974 fi
3975
3976 fi
3977 fi
3978
3979 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3980 if test $ol_cv_header_stdc = yes; then
3981   cat >> confdefs.h <<\EOF
3982 #define STDC_HEADERS 1
3983 EOF
3984
3985 fi
3986 ac_cv_header_stdc=disable
3987
3988
3989 if test $ol_cv_header_stdc != yes; then
3990         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3991 fi
3992
3993 ac_header_dirent=no
3994 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3995 do
3996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3997 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3998 echo "configure:3999: checking for $ac_hdr that defines DIR" >&5
3999 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <sys/types.h>
4006 #include <$ac_hdr>
4007 int main() {
4008 DIR *dirp = 0;
4009 ; return 0; }
4010 EOF
4011 if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4012   rm -rf conftest*
4013   eval "ac_cv_header_dirent_$ac_safe=yes"
4014 else
4015   echo "configure: failed program was:" >&5
4016   cat conftest.$ac_ext >&5
4017   rm -rf conftest*
4018   eval "ac_cv_header_dirent_$ac_safe=no"
4019 fi
4020 rm -f conftest*
4021 fi
4022 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4023   echo "$ac_t""yes" 1>&6
4024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4025   cat >> confdefs.h <<EOF
4026 #define $ac_tr_hdr 1
4027 EOF
4028  ac_header_dirent=$ac_hdr; break
4029 else
4030   echo "$ac_t""no" 1>&6
4031 fi
4032 done
4033 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4034 if test $ac_header_dirent = dirent.h; then
4035 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4036 echo "configure:4037: checking for opendir in -ldir" >&5
4037 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4039   echo $ac_n "(cached) $ac_c" 1>&6
4040 else
4041   ac_save_LIBS="$LIBS"
4042 LIBS="-ldir  $LIBS"
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 /* Override any gcc2 internal prototype to avoid an error.  */
4047 /* We use char because int might match the return type of a gcc2
4048     builtin and then its argument prototype would still apply.  */
4049 char opendir();
4050
4051 int main() {
4052 opendir()
4053 ; return 0; }
4054 EOF
4055 if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4056   rm -rf conftest*
4057   eval "ac_cv_lib_$ac_lib_var=yes"
4058 else
4059   echo "configure: failed program was:" >&5
4060   cat conftest.$ac_ext >&5
4061   rm -rf conftest*
4062   eval "ac_cv_lib_$ac_lib_var=no"
4063 fi
4064 rm -f conftest*
4065 LIBS="$ac_save_LIBS"
4066
4067 fi
4068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4069   echo "$ac_t""yes" 1>&6
4070   LIBS="$LIBS -ldir"
4071 else
4072   echo "$ac_t""no" 1>&6
4073 fi
4074
4075 else
4076 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4077 echo "configure:4078: checking for opendir in -lx" >&5
4078 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4079 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082   ac_save_LIBS="$LIBS"
4083 LIBS="-lx  $LIBS"
4084 cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 /* Override any gcc2 internal prototype to avoid an error.  */
4088 /* We use char because int might match the return type of a gcc2
4089     builtin and then its argument prototype would still apply.  */
4090 char opendir();
4091
4092 int main() {
4093 opendir()
4094 ; return 0; }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4097   rm -rf conftest*
4098   eval "ac_cv_lib_$ac_lib_var=yes"
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -rf conftest*
4103   eval "ac_cv_lib_$ac_lib_var=no"
4104 fi
4105 rm -f conftest*
4106 LIBS="$ac_save_LIBS"
4107
4108 fi
4109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4110   echo "$ac_t""yes" 1>&6
4111   LIBS="$LIBS -lx"
4112 else
4113   echo "$ac_t""no" 1>&6
4114 fi
4115
4116 fi
4117
4118 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4119 echo "configure:4120: checking for sys/wait.h that is POSIX.1 compatible" >&5
4120 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4121   echo $ac_n "(cached) $ac_c" 1>&6
4122 else
4123   cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 #include <sys/types.h>
4127 #include <sys/wait.h>
4128 #ifndef WEXITSTATUS
4129 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4130 #endif
4131 #ifndef WIFEXITED
4132 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4133 #endif
4134 int main() {
4135 int s;
4136 wait (&s);
4137 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4138 ; return 0; }
4139 EOF
4140 if { (eval echo configure:4141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4141   rm -rf conftest*
4142   ac_cv_header_sys_wait_h=yes
4143 else
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   ac_cv_header_sys_wait_h=no
4148 fi
4149 rm -f conftest*
4150 fi
4151
4152 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4153 if test $ac_cv_header_sys_wait_h = yes; then
4154   cat >> confdefs.h <<\EOF
4155 #define HAVE_SYS_WAIT_H 1
4156 EOF
4157
4158 fi
4159
4160 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4161 echo "configure:4162: checking POSIX termios" >&5
4162 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4163   echo $ac_n "(cached) $ac_c" 1>&6
4164 else
4165   cat > conftest.$ac_ext <<EOF
4166 #line 4167 "configure"
4167 #include "confdefs.h"
4168 #include <sys/types.h>
4169 #include <unistd.h>
4170 #include <termios.h>
4171 int main() {
4172 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4173    tcgetattr(0, 0);
4174 ; return 0; }
4175 EOF
4176 if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4177   rm -rf conftest*
4178   am_cv_sys_posix_termios=yes
4179 else
4180   echo "configure: failed program was:" >&5
4181   cat conftest.$ac_ext >&5
4182   rm -rf conftest*
4183   am_cv_sys_posix_termios=no
4184 fi
4185 rm -f conftest*
4186 fi
4187
4188 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4189
4190
4191  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4192 echo "configure:4193: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4193 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4197
4198   gwinsz_in_termios_h=no
4199   if test $am_cv_sys_posix_termios = yes; then
4200     cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 #include <sys/types.h>
4204 #     include <termios.h>
4205 #     ifdef TIOCGWINSZ
4206         yes
4207 #     endif
4208     
4209 EOF
4210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4211   egrep "yes" >/dev/null 2>&1; then
4212   rm -rf conftest*
4213   gwinsz_in_termios_h=yes
4214 fi
4215 rm -f conftest*
4216
4217   fi
4218
4219   if test $gwinsz_in_termios_h = no; then
4220     cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223 #include <sys/types.h>
4224 #     include <sys/ioctl.h>
4225 #     ifdef TIOCGWINSZ
4226         yes
4227 #     endif
4228     
4229 EOF
4230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4231   egrep "yes" >/dev/null 2>&1; then
4232   rm -rf conftest*
4233   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4234 fi
4235 rm -f conftest*
4236
4237   fi
4238   
4239 fi
4240
4241 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4242   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4243     cat >> confdefs.h <<\EOF
4244 #define GWINSZ_IN_SYS_IOCTL 1
4245 EOF
4246
4247   fi
4248
4249 if test $am_cv_sys_posix_termios = yes ; then
4250         cat >> confdefs.h <<\EOF
4251 #define HAVE_POSIX_TERMIOS 1
4252 EOF
4253
4254 fi
4255
4256 for ac_hdr in \
4257         arpa/inet.h             \
4258         arpa/nameser.h  \
4259         assert.h                \
4260         crypt.h                 \
4261         errno.h                 \
4262         fcntl.h                 \
4263         filio.h                 \
4264         getopt.h                \
4265         grp.h                   \
4266         libutil.h               \
4267         limits.h                \
4268         locale.h                \
4269         netinet/tcp.h   \
4270         malloc.h                \
4271         memory.h                \
4272         psap.h                  \
4273         pwd.h                   \
4274         resolv.h                \
4275         sgtty.h                 \
4276         shadow.h                \
4277         stdarg.h                \
4278         stddef.h                \
4279         string.h                \
4280         strings.h               \
4281         sysexits.h              \
4282         sys/file.h              \
4283         sys/filio.h             \
4284         sys/errno.h             \
4285         sys/ioctl.h             \
4286         sys/param.h             \
4287         sys/resource.h  \
4288         sys/select.h    \
4289         sys/socket.h    \
4290         sys/syslog.h    \
4291         sys/time.h              \
4292         sys/types.h             \
4293         syslog.h                \
4294         termios.h               \
4295         unistd.h                \
4296
4297 do
4298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4300 echo "configure:4301: checking for $ac_hdr" >&5
4301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4302   echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304   cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 #include <$ac_hdr>
4308 EOF
4309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4310 { (eval echo configure:4311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4312 if test -z "$ac_err"; then
4313   rm -rf conftest*
4314   eval "ac_cv_header_$ac_safe=yes"
4315 else
4316   echo "$ac_err" >&5
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   eval "ac_cv_header_$ac_safe=no"
4321 fi
4322 rm -f conftest*
4323 fi
4324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4325   echo "$ac_t""yes" 1>&6
4326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4327   cat >> confdefs.h <<EOF
4328 #define $ac_tr_hdr 1
4329 EOF
4330  
4331 else
4332   echo "$ac_t""no" 1>&6
4333 fi
4334 done
4335
4336
4337
4338
4339 echo $ac_n "checking for socket""... $ac_c" 1>&6
4340 echo "configure:4341: checking for socket" >&5
4341 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 /* System header to define __stub macros and hopefully few prototypes,
4348     which can conflict with char socket(); below.  */
4349 #include <assert.h>
4350 /* Override any gcc2 internal prototype to avoid an error.  */
4351 /* We use char because int might match the return type of a gcc2
4352     builtin and then its argument prototype would still apply.  */
4353 char socket();
4354 char (*f)();
4355
4356 int main() {
4357
4358 /* The GNU C library defines this for functions which it implements
4359     to always fail with ENOSYS.  Some functions are actually named
4360     something starting with __ and the normal name is an alias.  */
4361 #if defined (__stub_socket) || defined (__stub___socket)
4362 choke me
4363 #else
4364 f = socket;
4365 #endif
4366
4367 ; return 0; }
4368 EOF
4369 if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4370   rm -rf conftest*
4371   eval "ac_cv_func_socket=yes"
4372 else
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   eval "ac_cv_func_socket=no"
4377 fi
4378 rm -f conftest*
4379 fi
4380
4381 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4382   echo "$ac_t""yes" 1>&6
4383   :
4384 else
4385   echo "$ac_t""no" 1>&6
4386         
4387         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4388 echo "configure:4389: checking for main in -lsocket" >&5
4389 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   ac_save_LIBS="$LIBS"
4394 LIBS="-lsocket  $LIBS"
4395 cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398
4399 int main() {
4400 main()
4401 ; return 0; }
4402 EOF
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=yes"
4406 else
4407   echo "configure: failed program was:" >&5
4408   cat conftest.$ac_ext >&5
4409   rm -rf conftest*
4410   eval "ac_cv_lib_$ac_lib_var=no"
4411 fi
4412 rm -f conftest*
4413 LIBS="$ac_save_LIBS"
4414
4415 fi
4416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4417   echo "$ac_t""yes" 1>&6
4418     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4419     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4420   cat >> confdefs.h <<EOF
4421 #define $ac_tr_lib 1
4422 EOF
4423
4424   LIBS="-lsocket $LIBS"
4425
4426 else
4427   echo "$ac_t""no" 1>&6
4428 fi
4429
4430         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4431 echo "configure:4432: checking for main in -lnet" >&5
4432 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4434   echo $ac_n "(cached) $ac_c" 1>&6
4435 else
4436   ac_save_LIBS="$LIBS"
4437 LIBS="-lnet  $LIBS"
4438 cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441
4442 int main() {
4443 main()
4444 ; return 0; }
4445 EOF
4446 if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4447   rm -rf conftest*
4448   eval "ac_cv_lib_$ac_lib_var=yes"
4449 else
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452   rm -rf conftest*
4453   eval "ac_cv_lib_$ac_lib_var=no"
4454 fi
4455 rm -f conftest*
4456 LIBS="$ac_save_LIBS"
4457
4458 fi
4459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4460   echo "$ac_t""yes" 1>&6
4461     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4462     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4463   cat >> confdefs.h <<EOF
4464 #define $ac_tr_lib 1
4465 EOF
4466
4467   LIBS="-lnet $LIBS"
4468
4469 else
4470   echo "$ac_t""no" 1>&6
4471 fi
4472
4473         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4474 echo "configure:4475: checking for socket in -lnet" >&5
4475 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4477   echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479   ac_save_LIBS="$LIBS"
4480 LIBS="-lnet  $LIBS"
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 /* Override any gcc2 internal prototype to avoid an error.  */
4485 /* We use char because int might match the return type of a gcc2
4486     builtin and then its argument prototype would still apply.  */
4487 char socket();
4488
4489 int main() {
4490 socket()
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4494   rm -rf conftest*
4495   eval "ac_cv_lib_$ac_lib_var=yes"
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   eval "ac_cv_lib_$ac_lib_var=no"
4501 fi
4502 rm -f conftest*
4503 LIBS="$ac_save_LIBS"
4504
4505 fi
4506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4507   echo "$ac_t""yes" 1>&6
4508     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4509     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4510   cat >> confdefs.h <<EOF
4511 #define $ac_tr_lib 1
4512 EOF
4513
4514   LIBS="-lnet $LIBS"
4515
4516 else
4517   echo "$ac_t""no" 1>&6
4518 fi
4519
4520         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4521 echo "configure:4522: checking for main in -lnsl_s" >&5
4522 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4524   echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526   ac_save_LIBS="$LIBS"
4527 LIBS="-lnsl_s  $LIBS"
4528 cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531
4532 int main() {
4533 main()
4534 ; return 0; }
4535 EOF
4536 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4537   rm -rf conftest*
4538   eval "ac_cv_lib_$ac_lib_var=yes"
4539 else
4540   echo "configure: failed program was:" >&5
4541   cat conftest.$ac_ext >&5
4542   rm -rf conftest*
4543   eval "ac_cv_lib_$ac_lib_var=no"
4544 fi
4545 rm -f conftest*
4546 LIBS="$ac_save_LIBS"
4547
4548 fi
4549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4550   echo "$ac_t""yes" 1>&6
4551     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4552     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4553   cat >> confdefs.h <<EOF
4554 #define $ac_tr_lib 1
4555 EOF
4556
4557   LIBS="-lnsl_s $LIBS"
4558
4559 else
4560   echo "$ac_t""no" 1>&6
4561 fi
4562
4563         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4564 echo "configure:4565: checking for main in -lnsl" >&5
4565 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4566 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4567   echo $ac_n "(cached) $ac_c" 1>&6
4568 else
4569   ac_save_LIBS="$LIBS"
4570 LIBS="-lnsl  $LIBS"
4571 cat > conftest.$ac_ext <<EOF
4572 #line 4573 "configure"
4573 #include "confdefs.h"
4574
4575 int main() {
4576 main()
4577 ; return 0; }
4578 EOF
4579 if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4580   rm -rf conftest*
4581   eval "ac_cv_lib_$ac_lib_var=yes"
4582 else
4583   echo "configure: failed program was:" >&5
4584   cat conftest.$ac_ext >&5
4585   rm -rf conftest*
4586   eval "ac_cv_lib_$ac_lib_var=no"
4587 fi
4588 rm -f conftest*
4589 LIBS="$ac_save_LIBS"
4590
4591 fi
4592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4593   echo "$ac_t""yes" 1>&6
4594     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4595     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4596   cat >> confdefs.h <<EOF
4597 #define $ac_tr_lib 1
4598 EOF
4599
4600   LIBS="-lnsl $LIBS"
4601
4602 else
4603   echo "$ac_t""no" 1>&6
4604 fi
4605
4606         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4607 echo "configure:4608: checking for socket in -linet" >&5
4608 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4610   echo $ac_n "(cached) $ac_c" 1>&6
4611 else
4612   ac_save_LIBS="$LIBS"
4613 LIBS="-linet  $LIBS"
4614 cat > conftest.$ac_ext <<EOF
4615 #line 4616 "configure"
4616 #include "confdefs.h"
4617 /* Override any gcc2 internal prototype to avoid an error.  */
4618 /* We use char because int might match the return type of a gcc2
4619     builtin and then its argument prototype would still apply.  */
4620 char socket();
4621
4622 int main() {
4623 socket()
4624 ; return 0; }
4625 EOF
4626 if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4627   rm -rf conftest*
4628   eval "ac_cv_lib_$ac_lib_var=yes"
4629 else
4630   echo "configure: failed program was:" >&5
4631   cat conftest.$ac_ext >&5
4632   rm -rf conftest*
4633   eval "ac_cv_lib_$ac_lib_var=no"
4634 fi
4635 rm -f conftest*
4636 LIBS="$ac_save_LIBS"
4637
4638 fi
4639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4640   echo "$ac_t""yes" 1>&6
4641     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4643   cat >> confdefs.h <<EOF
4644 #define $ac_tr_lib 1
4645 EOF
4646
4647   LIBS="-linet $LIBS"
4648
4649 else
4650   echo "$ac_t""no" 1>&6
4651 fi
4652
4653         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4654 echo "configure:4655: checking for main in -lgen" >&5
4655 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4656 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4657   echo $ac_n "(cached) $ac_c" 1>&6
4658 else
4659   ac_save_LIBS="$LIBS"
4660 LIBS="-lgen  $LIBS"
4661 cat > conftest.$ac_ext <<EOF
4662 #line 4663 "configure"
4663 #include "confdefs.h"
4664
4665 int main() {
4666 main()
4667 ; return 0; }
4668 EOF
4669 if { (eval echo configure:4670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4670   rm -rf conftest*
4671   eval "ac_cv_lib_$ac_lib_var=yes"
4672 else
4673   echo "configure: failed program was:" >&5
4674   cat conftest.$ac_ext >&5
4675   rm -rf conftest*
4676   eval "ac_cv_lib_$ac_lib_var=no"
4677 fi
4678 rm -f conftest*
4679 LIBS="$ac_save_LIBS"
4680
4681 fi
4682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4683   echo "$ac_t""yes" 1>&6
4684     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4685     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4686   cat >> confdefs.h <<EOF
4687 #define $ac_tr_lib 1
4688 EOF
4689
4690   LIBS="-lgen $LIBS"
4691
4692 else
4693   echo "$ac_t""no" 1>&6
4694 fi
4695
4696
4697 fi
4698
4699
4700 echo $ac_n "checking for select""... $ac_c" 1>&6
4701 echo "configure:4702: checking for select" >&5
4702 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4703   echo $ac_n "(cached) $ac_c" 1>&6
4704 else
4705   cat > conftest.$ac_ext <<EOF
4706 #line 4707 "configure"
4707 #include "confdefs.h"
4708 /* System header to define __stub macros and hopefully few prototypes,
4709     which can conflict with char select(); below.  */
4710 #include <assert.h>
4711 /* Override any gcc2 internal prototype to avoid an error.  */
4712 /* We use char because int might match the return type of a gcc2
4713     builtin and then its argument prototype would still apply.  */
4714 char select();
4715 char (*f)();
4716
4717 int main() {
4718
4719 /* The GNU C library defines this for functions which it implements
4720     to always fail with ENOSYS.  Some functions are actually named
4721     something starting with __ and the normal name is an alias.  */
4722 #if defined (__stub_select) || defined (__stub___select)
4723 choke me
4724 #else
4725 f = select;
4726 #endif
4727
4728 ; return 0; }
4729 EOF
4730 if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4731   rm -rf conftest*
4732   eval "ac_cv_func_select=yes"
4733 else
4734   echo "configure: failed program was:" >&5
4735   cat conftest.$ac_ext >&5
4736   rm -rf conftest*
4737   eval "ac_cv_func_select=no"
4738 fi
4739 rm -f conftest*
4740 fi
4741
4742 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4743   echo "$ac_t""yes" 1>&6
4744   :
4745 else
4746   echo "$ac_t""no" 1>&6
4747 { echo "configure: error: select() required." 1>&2; exit 1; }
4748 fi
4749
4750
4751 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4752 echo "configure:4753: checking types of arguments for select()" >&5
4753  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4754   echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4757   echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4763      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4764       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4765        cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 #ifdef HAVE_SYS_TYPES_H
4769 #include <sys/types.h>
4770 #endif
4771 #ifdef HAVE_SYS_TIME_H
4772 #include <sys/time.h>
4773 #endif
4774 #ifdef HAVE_SYS_SELECT_H
4775 #include <sys/select.h>
4776 #endif
4777 #ifdef HAVE_SYS_SOCKET_H
4778 #include <sys/socket.h>
4779 #endif
4780 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);
4781 int main() {
4782
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4786   rm -rf conftest*
4787           ac_not_found=no ; break 3
4788 else
4789   echo "configure: failed program was:" >&5
4790   cat conftest.$ac_ext >&5
4791   rm -rf conftest*
4792   ac_not_found=yes
4793 fi
4794 rm -f conftest*
4795       done
4796      done
4797     done
4798    
4799 fi
4800   
4801 fi
4802  
4803 fi
4804  if test "$ac_not_found" = yes; then
4805   ac_cv_func_select_arg1=int 
4806   ac_cv_func_select_arg234='int *' 
4807   ac_cv_func_select_arg5='struct timeval *'
4808  fi
4809  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4810  cat >> confdefs.h <<EOF
4811 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4812 EOF
4813
4814  cat >> confdefs.h <<EOF
4815 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4816 EOF
4817
4818  cat >> confdefs.h <<EOF
4819 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4820 EOF
4821
4822
4823
4824
4825 for ac_hdr in regex.h 
4826 do
4827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4829 echo "configure:4830: checking for $ac_hdr" >&5
4830 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4831   echo $ac_n "(cached) $ac_c" 1>&6
4832 else
4833   cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 #include <$ac_hdr>
4837 EOF
4838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4839 { (eval echo configure:4840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4841 if test -z "$ac_err"; then
4842   rm -rf conftest*
4843   eval "ac_cv_header_$ac_safe=yes"
4844 else
4845   echo "$ac_err" >&5
4846   echo "configure: failed program was:" >&5
4847   cat conftest.$ac_ext >&5
4848   rm -rf conftest*
4849   eval "ac_cv_header_$ac_safe=no"
4850 fi
4851 rm -f conftest*
4852 fi
4853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4854   echo "$ac_t""yes" 1>&6
4855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4856   cat >> confdefs.h <<EOF
4857 #define $ac_tr_hdr 1
4858 EOF
4859  
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863 done
4864
4865 if test "$ac_cv_header_regex_h" != yes ; then
4866         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4867 fi
4868 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4869 echo "configure:4870: checking for regfree" >&5
4870 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 /* System header to define __stub macros and hopefully few prototypes,
4877     which can conflict with char regfree(); below.  */
4878 #include <assert.h>
4879 /* Override any gcc2 internal prototype to avoid an error.  */
4880 /* We use char because int might match the return type of a gcc2
4881     builtin and then its argument prototype would still apply.  */
4882 char regfree();
4883 char (*f)();
4884
4885 int main() {
4886
4887 /* The GNU C library defines this for functions which it implements
4888     to always fail with ENOSYS.  Some functions are actually named
4889     something starting with __ and the normal name is an alias.  */
4890 #if defined (__stub_regfree) || defined (__stub___regfree)
4891 choke me
4892 #else
4893 f = regfree;
4894 #endif
4895
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899   rm -rf conftest*
4900   eval "ac_cv_func_regfree=yes"
4901 else
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   eval "ac_cv_func_regfree=no"
4906 fi
4907 rm -f conftest*
4908 fi
4909
4910 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4911   echo "$ac_t""yes" 1>&6
4912   :
4913 else
4914   echo "$ac_t""no" 1>&6
4915 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4916 fi
4917
4918
4919
4920 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4921 echo "configure:4922: checking for compatible POSIX regex" >&5
4922 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4923   echo $ac_n "(cached) $ac_c" 1>&6
4924 else
4925   
4926         if test "$cross_compiling" = yes; then
4927   ol_cv_c_posix_regex=cross
4928 else
4929   cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932
4933 #include <sys/types.h>
4934 #include <regex.h>
4935 static char *pattern, *string;
4936 main()
4937 {
4938         int rc;
4939         regex_t re;
4940
4941         pattern = "^A";
4942
4943         if(regcomp(&re, pattern, 0)) {
4944                 return -1;
4945         }
4946         
4947         string = "ALL MATCH";
4948         
4949         rc = regexec(&re, string, 0, (void*)0, 0);
4950
4951         regfree(&re);
4952
4953         return rc;
4954 }
4955 EOF
4956 if { (eval echo configure:4957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4957 then
4958   ol_cv_c_posix_regex=yes
4959 else
4960   echo "configure: failed program was:" >&5
4961   cat conftest.$ac_ext >&5
4962   rm -fr conftest*
4963   ol_cv_c_posix_regex=no
4964 fi
4965 rm -fr conftest*
4966 fi
4967
4968 fi
4969
4970 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4971
4972 if test "$ol_cv_c_posix_regex" = no ; then
4973         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4974 fi
4975
4976
4977 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4978 echo "configure:4979: checking for sigset in -lV3" >&5
4979 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4981   echo $ac_n "(cached) $ac_c" 1>&6
4982 else
4983   ac_save_LIBS="$LIBS"
4984 LIBS="-lV3  $LIBS"
4985 cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4988 /* Override any gcc2 internal prototype to avoid an error.  */
4989 /* We use char because int might match the return type of a gcc2
4990     builtin and then its argument prototype would still apply.  */
4991 char sigset();
4992
4993 int main() {
4994 sigset()
4995 ; return 0; }
4996 EOF
4997 if { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4998   rm -rf conftest*
4999   eval "ac_cv_lib_$ac_lib_var=yes"
5000 else
5001   echo "configure: failed program was:" >&5
5002   cat conftest.$ac_ext >&5
5003   rm -rf conftest*
5004   eval "ac_cv_lib_$ac_lib_var=no"
5005 fi
5006 rm -f conftest*
5007 LIBS="$ac_save_LIBS"
5008
5009 fi
5010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5011   echo "$ac_t""yes" 1>&6
5012     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5014   cat >> confdefs.h <<EOF
5015 #define $ac_tr_lib 1
5016 EOF
5017
5018   LIBS="-lV3 $LIBS"
5019
5020 else
5021   echo "$ac_t""no" 1>&6
5022 fi
5023
5024
5025
5026 # find res_search
5027 if test $ol_enable_dns != no ; then
5028                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5029 echo "configure:5030: checking for res_search" >&5
5030 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036 /* System header to define __stub macros and hopefully few prototypes,
5037     which can conflict with char res_search(); below.  */
5038 #include <assert.h>
5039 /* Override any gcc2 internal prototype to avoid an error.  */
5040 /* We use char because int might match the return type of a gcc2
5041     builtin and then its argument prototype would still apply.  */
5042 char res_search();
5043 char (*f)();
5044
5045 int main() {
5046
5047 /* The GNU C library defines this for functions which it implements
5048     to always fail with ENOSYS.  Some functions are actually named
5049     something starting with __ and the normal name is an alias.  */
5050 #if defined (__stub_res_search) || defined (__stub___res_search)
5051 choke me
5052 #else
5053 f = res_search;
5054 #endif
5055
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   eval "ac_cv_func_res_search=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_func_res_search=no"
5066 fi
5067 rm -f conftest*
5068 fi
5069
5070 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5071   echo "$ac_t""yes" 1>&6
5072   :
5073 else
5074   echo "$ac_t""no" 1>&6
5075 fi
5076
5077         if test $ac_cv_func_res_search = no ; then 
5078                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5079 echo "configure:5080: checking for res_search in -lbind" >&5
5080 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5081 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5082   echo $ac_n "(cached) $ac_c" 1>&6
5083 else
5084   ac_save_LIBS="$LIBS"
5085 LIBS="-lbind  $LIBS"
5086 cat > conftest.$ac_ext <<EOF
5087 #line 5088 "configure"
5088 #include "confdefs.h"
5089 /* Override any gcc2 internal prototype to avoid an error.  */
5090 /* We use char because int might match the return type of a gcc2
5091     builtin and then its argument prototype would still apply.  */
5092 char res_search();
5093
5094 int main() {
5095 res_search()
5096 ; return 0; }
5097 EOF
5098 if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5099   rm -rf conftest*
5100   eval "ac_cv_lib_$ac_lib_var=yes"
5101 else
5102   echo "configure: failed program was:" >&5
5103   cat conftest.$ac_ext >&5
5104   rm -rf conftest*
5105   eval "ac_cv_lib_$ac_lib_var=no"
5106 fi
5107 rm -f conftest*
5108 LIBS="$ac_save_LIBS"
5109
5110 fi
5111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5112   echo "$ac_t""yes" 1>&6
5113     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5114     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5115   cat >> confdefs.h <<EOF
5116 #define $ac_tr_lib 1
5117 EOF
5118
5119   LIBS="-lbind $LIBS"
5120
5121 else
5122   echo "$ac_t""no" 1>&6
5123 fi
5124
5125                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5126         fi
5127         if test $ac_cv_func_res_search = no ; then 
5128                 echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5129 echo "configure:5130: checking for __res_search in -lbind" >&5
5130 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5132   echo $ac_n "(cached) $ac_c" 1>&6
5133 else
5134   ac_save_LIBS="$LIBS"
5135 LIBS="-lbind  $LIBS"
5136 cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139 /* Override any gcc2 internal prototype to avoid an error.  */
5140 /* We use char because int might match the return type of a gcc2
5141     builtin and then its argument prototype would still apply.  */
5142 char __res_search();
5143
5144 int main() {
5145 __res_search()
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   eval "ac_cv_lib_$ac_lib_var=yes"
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154   rm -rf conftest*
5155   eval "ac_cv_lib_$ac_lib_var=no"
5156 fi
5157 rm -f conftest*
5158 LIBS="$ac_save_LIBS"
5159
5160 fi
5161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5162   echo "$ac_t""yes" 1>&6
5163     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5165   cat >> confdefs.h <<EOF
5166 #define $ac_tr_lib 1
5167 EOF
5168
5169   LIBS="-lbind $LIBS"
5170
5171 else
5172   echo "$ac_t""no" 1>&6
5173 fi
5174
5175                 ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5176         fi
5177         if test $ac_cv_func_res_search = no ; then 
5178                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5179 echo "configure:5180: checking for res_search in -lresolv" >&5
5180 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5182   echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184   ac_save_LIBS="$LIBS"
5185 LIBS="-lresolv  $LIBS"
5186 cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 /* Override any gcc2 internal prototype to avoid an error.  */
5190 /* We use char because int might match the return type of a gcc2
5191     builtin and then its argument prototype would still apply.  */
5192 char res_search();
5193
5194 int main() {
5195 res_search()
5196 ; return 0; }
5197 EOF
5198 if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5199   rm -rf conftest*
5200   eval "ac_cv_lib_$ac_lib_var=yes"
5201 else
5202   echo "configure: failed program was:" >&5
5203   cat conftest.$ac_ext >&5
5204   rm -rf conftest*
5205   eval "ac_cv_lib_$ac_lib_var=no"
5206 fi
5207 rm -f conftest*
5208 LIBS="$ac_save_LIBS"
5209
5210 fi
5211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5212   echo "$ac_t""yes" 1>&6
5213     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5214     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5215   cat >> confdefs.h <<EOF
5216 #define $ac_tr_lib 1
5217 EOF
5218
5219   LIBS="-lresolv $LIBS"
5220
5221 else
5222   echo "$ac_t""no" 1>&6
5223 fi
5224
5225                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5226         fi
5227
5228         if test "$ac_cv_func_res_search" = yes ; then
5229                 cat >> confdefs.h <<\EOF
5230 #define HAVE_RES_SEARCH 1
5231 EOF
5232
5233         elif test $ol_enable_dns = yes ; then
5234                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5235         else
5236                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5237         fi
5238 fi
5239
5240
5241 # ISODE tests
5242 ol_link_isode=no
5243 if test $ol_enable_ldapd != no ; then
5244         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5245
5246                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5247 echo "configure:5248: checking for main in -lxtpp" >&5
5248 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5250   echo $ac_n "(cached) $ac_c" 1>&6
5251 else
5252   ac_save_LIBS="$LIBS"
5253 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5254 cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257
5258 int main() {
5259 main()
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5263   rm -rf conftest*
5264   eval "ac_cv_lib_$ac_lib_var=yes"
5265 else
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   eval "ac_cv_lib_$ac_lib_var=no"
5270 fi
5271 rm -f conftest*
5272 LIBS="$ac_save_LIBS"
5273
5274 fi
5275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5276   echo "$ac_t""yes" 1>&6
5277   
5278                 ol_link_isode=yes
5279                 cat >> confdefs.h <<\EOF
5280 #define HAVE_XTPP 1
5281 EOF
5282
5283                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5284                 
5285 else
5286   echo "$ac_t""no" 1>&6
5287 :
5288 fi
5289
5290         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5291 echo "configure:5292: checking for main in -ldsap" >&5
5292 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   ac_save_LIBS="$LIBS"
5297 LIBS="-ldsap -lisode $LIBS"
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301
5302 int main() {
5303 main()
5304 ; return 0; }
5305 EOF
5306 if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5307   rm -rf conftest*
5308   eval "ac_cv_lib_$ac_lib_var=yes"
5309 else
5310   echo "configure: failed program was:" >&5
5311   cat conftest.$ac_ext >&5
5312   rm -rf conftest*
5313   eval "ac_cv_lib_$ac_lib_var=no"
5314 fi
5315 rm -f conftest*
5316 LIBS="$ac_save_LIBS"
5317
5318 fi
5319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5320   echo "$ac_t""yes" 1>&6
5321   
5322                 ol_link_isode=yes
5323                 cat >> confdefs.h <<\EOF
5324 #define HAVE_DSAP 1
5325 EOF
5326
5327                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5328                 
5329 else
5330   echo "$ac_t""no" 1>&6
5331 :
5332 fi
5333
5334         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5335 echo "configure:5336: checking for main in -lisode" >&5
5336 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5338   echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340   ac_save_LIBS="$LIBS"
5341 LIBS="-lisode  $LIBS"
5342 cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345
5346 int main() {
5347 main()
5348 ; return 0; }
5349 EOF
5350 if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351   rm -rf conftest*
5352   eval "ac_cv_lib_$ac_lib_var=yes"
5353 else
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_lib_$ac_lib_var=no"
5358 fi
5359 rm -f conftest*
5360 LIBS="$ac_save_LIBS"
5361
5362 fi
5363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5364   echo "$ac_t""yes" 1>&6
5365   
5366                 ol_link_isode=yes
5367                 cat >> confdefs.h <<\EOF
5368 #define HAVE_ISODE 1
5369 EOF
5370
5371                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5372                 
5373 else
5374   echo "$ac_t""no" 1>&6
5375 :
5376 fi
5377
5378 fi
5379
5380 if test $ol_link_isode != no; then
5381         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5382 echo "configure:5383: checking for main in -lpp" >&5
5383 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5385   echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387   ac_save_LIBS="$LIBS"
5388 LIBS="-lpp  $LIBS"
5389 cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392
5393 int main() {
5394 main()
5395 ; return 0; }
5396 EOF
5397 if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5398   rm -rf conftest*
5399   eval "ac_cv_lib_$ac_lib_var=yes"
5400 else
5401   echo "configure: failed program was:" >&5
5402   cat conftest.$ac_ext >&5
5403   rm -rf conftest*
5404   eval "ac_cv_lib_$ac_lib_var=no"
5405 fi
5406 rm -f conftest*
5407 LIBS="$ac_save_LIBS"
5408
5409 fi
5410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5411   echo "$ac_t""yes" 1>&6
5412   
5413                 cat >> confdefs.h <<\EOF
5414 #define HAVE_PP 1
5415 EOF
5416
5417                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5418                 
5419 else
5420   echo "$ac_t""no" 1>&6
5421 :
5422 fi
5423
5424
5425         # Extract the first word of "pepsy", so it can be a program name with args.
5426 set dummy pepsy; ac_word=$2
5427 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5428 echo "configure:5429: checking for $ac_word" >&5
5429 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5430   echo $ac_n "(cached) $ac_c" 1>&6
5431 else
5432   case "$PEPSY" in
5433   /*)
5434   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5435   ;;
5436   ?:/*)                  
5437   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5438   ;;
5439   *)
5440   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5441   ac_dummy="$PATH"
5442   for ac_dir in $ac_dummy; do 
5443     test -z "$ac_dir" && ac_dir=.
5444     if test -f $ac_dir/$ac_word; then
5445       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5446       break
5447     fi
5448   done
5449   IFS="$ac_save_ifs"
5450   ;;
5451 esac
5452 fi
5453 PEPSY="$ac_cv_path_PEPSY"
5454 if test -n "$PEPSY"; then
5455   echo "$ac_t""$PEPSY" 1>&6
5456 else
5457   echo "$ac_t""no" 1>&6
5458 fi
5459
5460 fi
5461
5462 if test $ol_enable_quipu != no ; then
5463         for ac_hdr in quipu/commonarg.h
5464 do
5465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5467 echo "configure:5468: checking for $ac_hdr" >&5
5468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 #include <$ac_hdr>
5475 EOF
5476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5477 { (eval echo configure:5478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5479 if test -z "$ac_err"; then
5480   rm -rf conftest*
5481   eval "ac_cv_header_$ac_safe=yes"
5482 else
5483   echo "$ac_err" >&5
5484   echo "configure: failed program was:" >&5
5485   cat conftest.$ac_ext >&5
5486   rm -rf conftest*
5487   eval "ac_cv_header_$ac_safe=no"
5488 fi
5489 rm -f conftest*
5490 fi
5491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5492   echo "$ac_t""yes" 1>&6
5493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5494   cat >> confdefs.h <<EOF
5495 #define $ac_tr_hdr 1
5496 EOF
5497  
5498 else
5499   echo "$ac_t""no" 1>&6
5500 fi
5501 done
5502
5503
5504         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5505                 BUILD_QUIPU=yes
5506         elif test $ol_enable_quipu = auto ; then
5507                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5508         else
5509                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5510         fi
5511 fi
5512
5513 ol_link_kerberos=no
5514
5515 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5516         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5517 do
5518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5520 echo "configure:5521: checking for $ac_hdr" >&5
5521 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5522   echo $ac_n "(cached) $ac_c" 1>&6
5523 else
5524   cat > conftest.$ac_ext <<EOF
5525 #line 5526 "configure"
5526 #include "confdefs.h"
5527 #include <$ac_hdr>
5528 EOF
5529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5530 { (eval echo configure:5531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5532 if test -z "$ac_err"; then
5533   rm -rf conftest*
5534   eval "ac_cv_header_$ac_safe=yes"
5535 else
5536   echo "$ac_err" >&5
5537   echo "configure: failed program was:" >&5
5538   cat conftest.$ac_ext >&5
5539   rm -rf conftest*
5540   eval "ac_cv_header_$ac_safe=no"
5541 fi
5542 rm -f conftest*
5543 fi
5544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5545   echo "$ac_t""yes" 1>&6
5546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5547   cat >> confdefs.h <<EOF
5548 #define $ac_tr_hdr 1
5549 EOF
5550  
5551 else
5552   echo "$ac_t""no" 1>&6
5553 fi
5554 done
5555
5556
5557         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5558                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5559 echo "configure:5560: checking for main in -lkrb4" >&5
5560 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5562   echo $ac_n "(cached) $ac_c" 1>&6
5563 else
5564   ac_save_LIBS="$LIBS"
5565 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5566 cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569
5570 int main() {
5571 main()
5572 ; return 0; }
5573 EOF
5574 if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5575   rm -rf conftest*
5576   eval "ac_cv_lib_$ac_lib_var=yes"
5577 else
5578   echo "configure: failed program was:" >&5
5579   cat conftest.$ac_ext >&5
5580   rm -rf conftest*
5581   eval "ac_cv_lib_$ac_lib_var=no"
5582 fi
5583 rm -f conftest*
5584 LIBS="$ac_save_LIBS"
5585
5586 fi
5587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5588   echo "$ac_t""yes" 1>&6
5589   have_k5=yes
5590 else
5591   echo "$ac_t""no" 1>&6
5592 have_k5=no
5593 fi
5594
5595
5596                 if test $have_k5 = yes ; then
5597                         ol_with_kerberos=found
5598                         ol_link_kerberos=yes
5599
5600                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5601
5602                         LIBS="$KRB_LIBS $LIBS"
5603
5604                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5605 echo "configure:5606: checking for des_debug in Kerberos libraries" >&5
5606 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5607   echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609   
5610                                                                 save_LIBS="$LIBS"
5611                                 LIBS="$KRB_LIBS $LIBS"
5612                                 cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615
5616 #include <kerberosIV/krb.h>
5617 #include <kerberosIV/des.h>
5618 extern int des_debug;
5619
5620 int main() {
5621
5622 des_debug = 1;
5623
5624 ; return 0; }
5625 EOF
5626 if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5627   rm -rf conftest*
5628   ol_cv_var_des_debug=yes
5629 else
5630   echo "configure: failed program was:" >&5
5631   cat conftest.$ac_ext >&5
5632   rm -rf conftest*
5633   ol_cv_var_des_debug=no
5634 fi
5635 rm -f conftest*
5636                                                                 LIBS="$save_LIBS"
5637                         
5638 fi
5639
5640 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5641
5642                         if test $ol_cv_var_des_debug = yes ; then
5643                                 cat >> confdefs.h <<\EOF
5644 #define HAVE_DES_DEBUG 1
5645 EOF
5646
5647                         fi
5648
5649                         LIBS="$save_LIBS"
5650                 fi
5651         fi
5652 fi
5653
5654 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5655         for ac_hdr in krb.h des.h
5656 do
5657 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5658 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5659 echo "configure:5660: checking for $ac_hdr" >&5
5660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5661   echo $ac_n "(cached) $ac_c" 1>&6
5662 else
5663   cat > conftest.$ac_ext <<EOF
5664 #line 5665 "configure"
5665 #include "confdefs.h"
5666 #include <$ac_hdr>
5667 EOF
5668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5669 { (eval echo configure:5670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5671 if test -z "$ac_err"; then
5672   rm -rf conftest*
5673   eval "ac_cv_header_$ac_safe=yes"
5674 else
5675   echo "$ac_err" >&5
5676   echo "configure: failed program was:" >&5
5677   cat conftest.$ac_ext >&5
5678   rm -rf conftest*
5679   eval "ac_cv_header_$ac_safe=no"
5680 fi
5681 rm -f conftest*
5682 fi
5683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5684   echo "$ac_t""yes" 1>&6
5685     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5686   cat >> confdefs.h <<EOF
5687 #define $ac_tr_hdr 1
5688 EOF
5689  
5690 else
5691   echo "$ac_t""no" 1>&6
5692 fi
5693 done
5694
5695
5696         if test $ac_cv_header_krb_h = yes ; then
5697                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5698 echo "configure:5699: checking for main in -lkrb" >&5
5699 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5700 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5701   echo $ac_n "(cached) $ac_c" 1>&6
5702 else
5703   ac_save_LIBS="$LIBS"
5704 LIBS="-lkrb -ldes $LIBS"
5705 cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708
5709 int main() {
5710 main()
5711 ; return 0; }
5712 EOF
5713 if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5714   rm -rf conftest*
5715   eval "ac_cv_lib_$ac_lib_var=yes"
5716 else
5717   echo "configure: failed program was:" >&5
5718   cat conftest.$ac_ext >&5
5719   rm -rf conftest*
5720   eval "ac_cv_lib_$ac_lib_var=no"
5721 fi
5722 rm -f conftest*
5723 LIBS="$ac_save_LIBS"
5724
5725 fi
5726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5727   echo "$ac_t""yes" 1>&6
5728   have_k4=yes
5729 else
5730   echo "$ac_t""no" 1>&6
5731 have_k4=no
5732 fi
5733
5734
5735                 if test $have_k4 = yes ; then
5736                         ol_with_kerberos=found
5737                         ol_link_kerberos=yes
5738
5739                         KRB_LIBS="-lkrb -ldes"
5740                 fi
5741         fi
5742 fi
5743
5744 if test $ol_link_kerberos = yes ; then
5745         cat >> confdefs.h <<\EOF
5746 #define HAVE_KERBEROS 1
5747 EOF
5748
5749 fi
5750
5751 ol_link_tls=no
5752 if test $ol_with_tls != no ; then
5753         
5754         for ac_hdr in openssl/ssl.h ssl.h
5755 do
5756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5758 echo "configure:5759: checking for $ac_hdr" >&5
5759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5760   echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762   cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765 #include <$ac_hdr>
5766 EOF
5767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5768 { (eval echo configure:5769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5770 if test -z "$ac_err"; then
5771   rm -rf conftest*
5772   eval "ac_cv_header_$ac_safe=yes"
5773 else
5774   echo "$ac_err" >&5
5775   echo "configure: failed program was:" >&5
5776   cat conftest.$ac_ext >&5
5777   rm -rf conftest*
5778   eval "ac_cv_header_$ac_safe=no"
5779 fi
5780 rm -f conftest*
5781 fi
5782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5783   echo "$ac_t""yes" 1>&6
5784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5785   cat >> confdefs.h <<EOF
5786 #define $ac_tr_hdr 1
5787 EOF
5788  
5789 else
5790   echo "$ac_t""no" 1>&6
5791 fi
5792 done
5793
5794         
5795         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5796                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5797 echo "configure:5798: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5798 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5800   echo $ac_n "(cached) $ac_c" 1>&6
5801 else
5802   ac_save_LIBS="$LIBS"
5803 LIBS="-lssl -lcrypto $LIBS"
5804 cat > conftest.$ac_ext <<EOF
5805 #line 5806 "configure"
5806 #include "confdefs.h"
5807 /* Override any gcc2 internal prototype to avoid an error.  */
5808 /* We use char because int might match the return type of a gcc2
5809     builtin and then its argument prototype would still apply.  */
5810 char SSLeay_add_ssl_algorithms();
5811
5812 int main() {
5813 SSLeay_add_ssl_algorithms()
5814 ; return 0; }
5815 EOF
5816 if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5817   rm -rf conftest*
5818   eval "ac_cv_lib_$ac_lib_var=yes"
5819 else
5820   echo "configure: failed program was:" >&5
5821   cat conftest.$ac_ext >&5
5822   rm -rf conftest*
5823   eval "ac_cv_lib_$ac_lib_var=no"
5824 fi
5825 rm -f conftest*
5826 LIBS="$ac_save_LIBS"
5827
5828 fi
5829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5830   echo "$ac_t""yes" 1>&6
5831   have_ssleay=yes
5832                         need_rsaref=no
5833 else
5834   echo "$ac_t""no" 1>&6
5835 have_ssleay=no
5836 fi
5837
5838                         
5839                 if test $have_ssleay = no ; then
5840                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5841 echo "configure:5842: checking for SSL_library_init in -lssl" >&5
5842 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   ac_save_LIBS="$LIBS"
5847 LIBS="-lssl -lcrypto $LIBS"
5848 cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851 /* Override any gcc2 internal prototype to avoid an error.  */
5852 /* We use char because int might match the return type of a gcc2
5853     builtin and then its argument prototype would still apply.  */
5854 char SSL_library_init();
5855
5856 int main() {
5857 SSL_library_init()
5858 ; return 0; }
5859 EOF
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5861   rm -rf conftest*
5862   eval "ac_cv_lib_$ac_lib_var=yes"
5863 else
5864   echo "configure: failed program was:" >&5
5865   cat conftest.$ac_ext >&5
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=no"
5868 fi
5869 rm -f conftest*
5870 LIBS="$ac_save_LIBS"
5871
5872 fi
5873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875   have_ssleay=yes
5876                                 need_rsaref=no
5877 else
5878   echo "$ac_t""no" 1>&6
5879 have_ssleay=no
5880 fi
5881
5882                 fi
5883
5884                 if test $have_ssleay = no ; then
5885                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5886 echo "configure:5887: checking for ssl3_accept in -lssl" >&5
5887 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5889   echo $ac_n "(cached) $ac_c" 1>&6
5890 else
5891   ac_save_LIBS="$LIBS"
5892 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5893 cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5896 /* Override any gcc2 internal prototype to avoid an error.  */
5897 /* We use char because int might match the return type of a gcc2
5898     builtin and then its argument prototype would still apply.  */
5899 char ssl3_accept();
5900
5901 int main() {
5902 ssl3_accept()
5903 ; return 0; }
5904 EOF
5905 if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5906   rm -rf conftest*
5907   eval "ac_cv_lib_$ac_lib_var=yes"
5908 else
5909   echo "configure: failed program was:" >&5
5910   cat conftest.$ac_ext >&5
5911   rm -rf conftest*
5912   eval "ac_cv_lib_$ac_lib_var=no"
5913 fi
5914 rm -f conftest*
5915 LIBS="$ac_save_LIBS"
5916
5917 fi
5918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5919   echo "$ac_t""yes" 1>&6
5920   have_ssleay=yes
5921                                 need_rsaref=yes
5922 else
5923   echo "$ac_t""no" 1>&6
5924 have_ssleay=no
5925 fi
5926
5927                 fi
5928
5929                 if test $have_ssleay = yes ; then
5930                         ol_with_tls=found
5931                         ol_link_tls=yes
5932
5933                         cat >> confdefs.h <<\EOF
5934 #define HAVE_SSLEAY 1
5935 EOF
5936
5937
5938                         if test $need_rsaref = yes; then
5939                                 cat >> confdefs.h <<\EOF
5940 #define HAVE_RSAREF 1
5941 EOF
5942
5943
5944                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5945                         else
5946                                 TLS_LIBS="-lssl -lcrypto"
5947                         fi
5948                 fi
5949         fi
5950 fi
5951
5952 if test $ol_link_tls = yes ; then
5953         cat >> confdefs.h <<\EOF
5954 #define HAVE_TLS 1
5955 EOF
5956
5957 fi      
5958
5959 for ac_func in \
5960         ctime_r                 \
5961         gethostbyname_r gethostbyaddr_r \
5962
5963 do
5964 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5965 echo "configure:5966: checking for $ac_func" >&5
5966 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5967   echo $ac_n "(cached) $ac_c" 1>&6
5968 else
5969   cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972 /* System header to define __stub macros and hopefully few prototypes,
5973     which can conflict with char $ac_func(); below.  */
5974 #include <assert.h>
5975 /* Override any gcc2 internal prototype to avoid an error.  */
5976 /* We use char because int might match the return type of a gcc2
5977     builtin and then its argument prototype would still apply.  */
5978 char $ac_func();
5979 char (*f)();
5980
5981 int main() {
5982
5983 /* The GNU C library defines this for functions which it implements
5984     to always fail with ENOSYS.  Some functions are actually named
5985     something starting with __ and the normal name is an alias.  */
5986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5987 choke me
5988 #else
5989 f = $ac_func;
5990 #endif
5991
5992 ; return 0; }
5993 EOF
5994 if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5995   rm -rf conftest*
5996   eval "ac_cv_func_$ac_func=yes"
5997 else
5998   echo "configure: failed program was:" >&5
5999   cat conftest.$ac_ext >&5
6000   rm -rf conftest*
6001   eval "ac_cv_func_$ac_func=no"
6002 fi
6003 rm -f conftest*
6004 fi
6005
6006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6007   echo "$ac_t""yes" 1>&6
6008     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6009   cat >> confdefs.h <<EOF
6010 #define $ac_tr_func 1
6011 EOF
6012  
6013 else
6014   echo "$ac_t""no" 1>&6
6015 fi
6016 done
6017
6018
6019 if test "$ac_cv_func_ctime_r" = no ; then
6020         ol_cv_func_ctime_r_nargs=0
6021 else
6022         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6023 echo "configure:6024: checking number of arguments of ctime_r" >&5
6024 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   cat > conftest.$ac_ext <<EOF
6028 #line 6029 "configure"
6029 #include "confdefs.h"
6030 #include <time.h>
6031 int main() {
6032 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6033 ; return 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6036   rm -rf conftest*
6037   ol_cv_func_ctime_r_nargs=3
6038 else
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   cat > conftest.$ac_ext <<EOF
6043 #line 6044 "configure"
6044 #include "confdefs.h"
6045 #include <time.h>
6046 int main() {
6047 time_t ti; char *buffer; ctime_r(&ti,buffer);
6048 ; return 0; }
6049 EOF
6050 if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6051   rm -rf conftest*
6052   ol_cv_func_ctime_r_nargs=2
6053 else
6054   echo "configure: failed program was:" >&5
6055   cat conftest.$ac_ext >&5
6056   rm -rf conftest*
6057   ol_cv_func_ctime_r_nargs=0
6058 fi
6059 rm -f conftest*
6060 fi
6061 rm -f conftest*
6062 fi
6063
6064 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6065   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6066     cat >> confdefs.h <<EOF
6067 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6068 EOF
6069
6070   fi
6071
6072 fi
6073
6074 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6075         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6076 echo "configure:6077: checking number of arguments of gethostbyname_r" >&5
6077 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6078   echo $ac_n "(cached) $ac_c" 1>&6
6079 else
6080   cat > conftest.$ac_ext <<EOF
6081 #line 6082 "configure"
6082 #include "confdefs.h"
6083 #include <sys/types.h>
6084 #include <sys/socket.h>
6085 #include <netinet/in.h>
6086 #include <netdb.h>
6087 #define BUFSIZE (sizeof(struct hostent)+10)
6088 int main() {
6089 struct hostent hent; char buffer[BUFSIZE];
6090                 int bufsize=BUFSIZE;int h_errno;
6091                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6092                         buffer, bufsize, &h_errno);
6093 ; return 0; }
6094 EOF
6095 if { (eval echo configure:6096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6096   rm -rf conftest*
6097   ol_cv_func_gethostbyname_r_nargs=5
6098 else
6099   echo "configure: failed program was:" >&5
6100   cat conftest.$ac_ext >&5
6101   rm -rf conftest*
6102   cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105 #include <sys/types.h>
6106 #include <sys/socket.h>
6107 #include <netinet/in.h>
6108 #include <netdb.h>
6109 #define BUFSIZE (sizeof(struct hostent)+10)
6110 int main() {
6111 struct hostent hent;struct hostent *rhent;
6112                         char buffer[BUFSIZE];
6113                         int bufsize=BUFSIZE;int h_errno;
6114                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6115                                 &rhent, &h_errno);
6116 ; return 0; }
6117 EOF
6118 if { (eval echo configure:6119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6119   rm -rf conftest*
6120   ol_cv_func_gethostbyname_r_nargs=6
6121 else
6122   echo "configure: failed program was:" >&5
6123   cat conftest.$ac_ext >&5
6124   rm -rf conftest*
6125   ol_cv_func_gethostbyname_r_nargs=0
6126 fi
6127 rm -f conftest*
6128 fi
6129 rm -f conftest*
6130 fi
6131
6132 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6133   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6134         cat >> confdefs.h <<EOF
6135 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6136 EOF
6137
6138   fi
6139
6140 else
6141         ol_cv_func_gethostbyname_r_nargs=0
6142 fi
6143  
6144 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6145         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6146 echo "configure:6147: checking number of arguments of gethostbyaddr_r" >&5
6147 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6148   echo $ac_n "(cached) $ac_c" 1>&6
6149 else
6150   cat > conftest.$ac_ext <<EOF
6151 #line 6152 "configure"
6152 #include "confdefs.h"
6153 #include <sys/types.h>
6154 #include <sys/socket.h>
6155 #include <netinet/in.h>
6156 #include <netdb.h>
6157 #define BUFSIZE (sizeof(struct hostent)+10)
6158 int main() {
6159 struct hostent hent; char buffer[BUFSIZE]; 
6160             struct in_addr add;
6161             size_t alen=sizeof(struct in_addr);
6162             int bufsize=BUFSIZE;int h_errno;
6163                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6164                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6165 ; return 0; }
6166 EOF
6167 if { (eval echo configure:6168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6168   rm -rf conftest*
6169   ol_cv_func_gethostbyaddr_r_nargs=7
6170 else
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   cat > conftest.$ac_ext <<EOF
6175 #line 6176 "configure"
6176 #include "confdefs.h"
6177 #include <sys/types.h>
6178 #include <sys/socket.h>
6179 #include <netinet/in.h>
6180 #include <netdb.h>
6181 #define BUFSIZE (sizeof(struct hostent)+10)
6182 int main() {
6183 struct hostent hent;
6184                         struct hostent *rhent; char buffer[BUFSIZE]; 
6185                         struct in_addr add;
6186                         size_t alen=sizeof(struct in_addr);
6187                         int bufsize=BUFSIZE;int h_errno;
6188                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6189                                 alen, AF_INET, &hent, buffer, bufsize, 
6190                                 &rhent, &h_errno);
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6194   rm -rf conftest*
6195   ol_cv_func_gethostbyaddr_r_nargs=8
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   ol_cv_func_gethostbyaddr_r_nargs=0
6201 fi
6202 rm -f conftest*
6203 fi
6204 rm -f conftest*
6205 fi
6206
6207 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6208   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6209     cat >> confdefs.h <<EOF
6210 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6211 EOF
6212
6213   fi
6214
6215 else
6216         ol_cv_func_gethostbyaddr_r_nargs=0
6217 fi
6218
6219 if test "$ac_cv_func_ctime_r" = yes \
6220         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6221         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6222         -a "$ac_cv_func_gethostbyname_r" = yes \
6223         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6224         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6225         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6226         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6227         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6228         ; then
6229  
6230         cat >> confdefs.h <<\EOF
6231 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6232 EOF
6233
6234 fi
6235
6236 ol_link_threads=no
6237 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6238         -o $ol_with_threads = posix ; then
6239
6240         for ac_hdr in pthread.h sched.h
6241 do
6242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6244 echo "configure:6245: checking for $ac_hdr" >&5
6245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6246   echo $ac_n "(cached) $ac_c" 1>&6
6247 else
6248   cat > conftest.$ac_ext <<EOF
6249 #line 6250 "configure"
6250 #include "confdefs.h"
6251 #include <$ac_hdr>
6252 EOF
6253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6254 { (eval echo configure:6255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6256 if test -z "$ac_err"; then
6257   rm -rf conftest*
6258   eval "ac_cv_header_$ac_safe=yes"
6259 else
6260   echo "$ac_err" >&5
6261   echo "configure: failed program was:" >&5
6262   cat conftest.$ac_ext >&5
6263   rm -rf conftest*
6264   eval "ac_cv_header_$ac_safe=no"
6265 fi
6266 rm -f conftest*
6267 fi
6268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6269   echo "$ac_t""yes" 1>&6
6270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6271   cat >> confdefs.h <<EOF
6272 #define $ac_tr_hdr 1
6273 EOF
6274  
6275 else
6276   echo "$ac_t""no" 1>&6
6277 fi
6278 done
6279
6280
6281         if test $ac_cv_header_pthread_h = yes ; then
6282                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6283 echo "configure:6284: checking POSIX thread version" >&5
6284 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6285   echo $ac_n "(cached) $ac_c" 1>&6
6286 else
6287   
6288         cat > conftest.$ac_ext <<EOF
6289 #line 6290 "configure"
6290 #include "confdefs.h"
6291
6292 #               include <pthread.h>
6293                 /* this check could be improved */
6294 #               ifdef PTHREAD_ONCE_INIT
6295                         pthread_version_final
6296 #               endif
6297         
6298 EOF
6299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6300   egrep "pthread_version_final" >/dev/null 2>&1; then
6301   rm -rf conftest*
6302   ol_pthread_final=yes
6303 else
6304   rm -rf conftest*
6305   ol_pthread_final=no
6306 fi
6307 rm -f conftest*
6308
6309
6310         cat > conftest.$ac_ext <<EOF
6311 #line 6312 "configure"
6312 #include "confdefs.h"
6313
6314 #               include <pthread.h>
6315                 /* this check could be improved */
6316 #               ifdef pthread_once_init
6317                         pthread_version_draft4
6318 #               endif
6319         
6320 EOF
6321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6322   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6323   rm -rf conftest*
6324   ol_pthread_draft4=yes
6325 else
6326   rm -rf conftest*
6327   ol_pthread_draft4=no
6328 fi
6329 rm -f conftest*
6330
6331
6332         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6333                 ol_cv_pthread_version=final
6334         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6335                 ol_cv_pthread_version=draft4
6336         else
6337                 ol_cv_pthread_version=unknown
6338         fi
6339
6340 fi
6341
6342 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6343
6344
6345                 if test $ol_cv_pthread_version = final ; then
6346                         cat >> confdefs.h <<\EOF
6347 #define HAVE_PTHREADS_FINAL 1
6348 EOF
6349
6350                 elif test $ol_cv_pthread_version = draft4 ; then
6351                         cat >> confdefs.h <<\EOF
6352 #define HAVE_PTHREADS_D4 1
6353 EOF
6354
6355                 else
6356                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6357                 fi
6358
6359                 # consider threads found
6360                 ol_with_threads=found
6361
6362                 
6363         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6364 echo "configure:6365: checking for LinuxThreads pthread.h" >&5
6365 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6366   echo $ac_n "(cached) $ac_c" 1>&6
6367 else
6368   cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6371 #include <pthread.h>
6372 EOF
6373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6374   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6375   rm -rf conftest*
6376   ol_cv_header_linux_threads=yes
6377 else
6378   rm -rf conftest*
6379   ol_cv_header_linux_threads=no
6380 fi
6381 rm -f conftest*
6382
6383                 
6384 fi
6385
6386 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6387         if test $ol_cv_header_linux_threads = yes; then
6388                 cat >> confdefs.h <<\EOF
6389 #define HAVE_LINUX_THREADS 1
6390 EOF
6391
6392         fi
6393
6394
6395                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6396                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6397 echo "configure:6398: checking for pthread_create in default libraries" >&5
6398 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6399   echo $ac_n "(cached) $ac_c" 1>&6
6400 else
6401   
6402                 if test "$cross_compiling" = yes; then
6403                         ol_cv_pthread_create=yes
6404 else
6405   cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408
6409 #include <pthread.h>
6410 #ifndef NULL
6411 #define NULL (void*)0
6412 #endif
6413
6414 static void *task(p)
6415         void *p;
6416 {
6417         return (void *) (p == NULL);
6418 }
6419
6420 int main(argc, argv)
6421         int argc;
6422         char **argv;
6423 {
6424         pthread_t t;
6425         int status;
6426
6427         /* make sure pthread_create() isn't just a stub */
6428 #if HAVE_PTHREADS_D4
6429         status = pthread_create(&t, pthread_attr_default, task, NULL);
6430 #else
6431         status = pthread_create(&t, NULL, task, NULL);
6432 #endif
6433
6434         if( status ) return status;
6435
6436         /* make sure pthread_detach() isn't just a stub */
6437 #if HAVE_PTHREADS_D4
6438         status = pthread_detach( &t );
6439 #else
6440         status = pthread_detach( t );
6441 #endif
6442
6443         return status;
6444 }
6445
6446 EOF
6447 if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6448 then
6449   ol_cv_pthread_create=yes
6450 else
6451   echo "configure: failed program was:" >&5
6452   cat conftest.$ac_ext >&5
6453   rm -fr conftest*
6454   ol_cv_pthread_create=no
6455 fi
6456 rm -fr conftest*
6457 fi
6458
6459 fi
6460
6461 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6462
6463                 if test $ol_cv_pthread_create != no ; then
6464                         ol_link_threads=posix
6465                         ol_link_pthreads=""
6466                 fi
6467                 
6468                 # Pthread try link: -mt (ol_cv_pthread_mt)
6469         if test "$ol_link_threads" = no ; then
6470                 # try -mt
6471                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6472 echo "configure:6473: checking for pthread link with -mt" >&5
6473 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6474   echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476   
6477                         # save the flags
6478                         ol_LIBS="$LIBS"
6479                         LIBS="-mt $LIBS"
6480
6481                         cat > conftest.$ac_ext <<EOF
6482 #line 6483 "configure"
6483 #include "confdefs.h"
6484
6485 #include <pthread.h>
6486 #ifndef NULL
6487 #define NULL (void*)0
6488 #endif
6489
6490 int main() {
6491
6492         pthread_t t;
6493
6494 #if HAVE_PTHREADS_D4
6495         pthread_create(&t, pthread_attr_default, NULL, NULL);
6496         pthread_detach( &t );
6497 #else
6498         pthread_create(&t, NULL, NULL, NULL);
6499         pthread_detach( t );
6500 #endif
6501 #ifdef HAVE_LINUX_THREADS
6502         pthread_kill_other_threads_np();
6503 #endif
6504
6505 ; return 0; }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6508   rm -rf conftest*
6509   ol_cv_pthread_mt=yes
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -rf conftest*
6514   ol_cv_pthread_mt=no
6515 fi
6516 rm -f conftest*
6517
6518                 # restore the LIBS
6519                 LIBS="$ol_LIBS"
6520                 
6521 fi
6522
6523 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6524
6525                 if test $ol_cv_pthread_mt = yes ; then
6526                         ol_link_pthreads="-mt"
6527                         ol_link_threads=posix
6528                 fi
6529         fi
6530
6531                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6532         if test "$ol_link_threads" = no ; then
6533                 # try -kthread
6534                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6535 echo "configure:6536: checking for pthread link with -kthread" >&5
6536 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   
6540                         # save the flags
6541                         ol_LIBS="$LIBS"
6542                         LIBS="-kthread $LIBS"
6543
6544                         cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547
6548 #include <pthread.h>
6549 #ifndef NULL
6550 #define NULL (void*)0
6551 #endif
6552
6553 int main() {
6554
6555         pthread_t t;
6556
6557 #if HAVE_PTHREADS_D4
6558         pthread_create(&t, pthread_attr_default, NULL, NULL);
6559         pthread_detach( &t );
6560 #else
6561         pthread_create(&t, NULL, NULL, NULL);
6562         pthread_detach( t );
6563 #endif
6564 #ifdef HAVE_LINUX_THREADS
6565         pthread_kill_other_threads_np();
6566 #endif
6567
6568 ; return 0; }
6569 EOF
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571   rm -rf conftest*
6572   ol_cv_pthread_kthread=yes
6573 else
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   ol_cv_pthread_kthread=no
6578 fi
6579 rm -f conftest*
6580
6581                 # restore the LIBS
6582                 LIBS="$ol_LIBS"
6583                 
6584 fi
6585
6586 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6587
6588                 if test $ol_cv_pthread_kthread = yes ; then
6589                         ol_link_pthreads="-kthread"
6590                         ol_link_threads=posix
6591                 fi
6592         fi
6593
6594                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6595         if test "$ol_link_threads" = no ; then
6596                 # try -pthread
6597                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6598 echo "configure:6599: checking for pthread link with -pthread" >&5
6599 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6600   echo $ac_n "(cached) $ac_c" 1>&6
6601 else
6602   
6603                         # save the flags
6604                         ol_LIBS="$LIBS"
6605                         LIBS="-pthread $LIBS"
6606
6607                         cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610
6611 #include <pthread.h>
6612 #ifndef NULL
6613 #define NULL (void*)0
6614 #endif
6615
6616 int main() {
6617
6618         pthread_t t;
6619
6620 #if HAVE_PTHREADS_D4
6621         pthread_create(&t, pthread_attr_default, NULL, NULL);
6622         pthread_detach( &t );
6623 #else
6624         pthread_create(&t, NULL, NULL, NULL);
6625         pthread_detach( t );
6626 #endif
6627 #ifdef HAVE_LINUX_THREADS
6628         pthread_kill_other_threads_np();
6629 #endif
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   ol_cv_pthread_pthread=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   ol_cv_pthread_pthread=no
6641 fi
6642 rm -f conftest*
6643
6644                 # restore the LIBS
6645                 LIBS="$ol_LIBS"
6646                 
6647 fi
6648
6649 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6650
6651                 if test $ol_cv_pthread_pthread = yes ; then
6652                         ol_link_pthreads="-pthread"
6653                         ol_link_threads=posix
6654                 fi
6655         fi
6656
6657                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6658         if test "$ol_link_threads" = no ; then
6659                 # try -pthreads
6660                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6661 echo "configure:6662: checking for pthread link with -pthreads" >&5
6662 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   
6666                         # save the flags
6667                         ol_LIBS="$LIBS"
6668                         LIBS="-pthreads $LIBS"
6669
6670                         cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673
6674 #include <pthread.h>
6675 #ifndef NULL
6676 #define NULL (void*)0
6677 #endif
6678
6679 int main() {
6680
6681         pthread_t t;
6682
6683 #if HAVE_PTHREADS_D4
6684         pthread_create(&t, pthread_attr_default, NULL, NULL);
6685         pthread_detach( &t );
6686 #else
6687         pthread_create(&t, NULL, NULL, NULL);
6688         pthread_detach( t );
6689 #endif
6690 #ifdef HAVE_LINUX_THREADS
6691         pthread_kill_other_threads_np();
6692 #endif
6693
6694 ; return 0; }
6695 EOF
6696 if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6697   rm -rf conftest*
6698   ol_cv_pthread_pthreads=yes
6699 else
6700   echo "configure: failed program was:" >&5
6701   cat conftest.$ac_ext >&5
6702   rm -rf conftest*
6703   ol_cv_pthread_pthreads=no
6704 fi
6705 rm -f conftest*
6706
6707                 # restore the LIBS
6708                 LIBS="$ol_LIBS"
6709                 
6710 fi
6711
6712 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6713
6714                 if test $ol_cv_pthread_pthreads = yes ; then
6715                         ol_link_pthreads="-pthreads"
6716                         ol_link_threads=posix
6717                 fi
6718         fi
6719
6720                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6721         if test "$ol_link_threads" = no ; then
6722                 # try -mthreads
6723                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6724 echo "configure:6725: checking for pthread link with -mthreads" >&5
6725 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   
6729                         # save the flags
6730                         ol_LIBS="$LIBS"
6731                         LIBS="-mthreads $LIBS"
6732
6733                         cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736
6737 #include <pthread.h>
6738 #ifndef NULL
6739 #define NULL (void*)0
6740 #endif
6741
6742 int main() {
6743
6744         pthread_t t;
6745
6746 #if HAVE_PTHREADS_D4
6747         pthread_create(&t, pthread_attr_default, NULL, NULL);
6748         pthread_detach( &t );
6749 #else
6750         pthread_create(&t, NULL, NULL, NULL);
6751         pthread_detach( t );
6752 #endif
6753 #ifdef HAVE_LINUX_THREADS
6754         pthread_kill_other_threads_np();
6755 #endif
6756
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   ol_cv_pthread_mthreads=yes
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765   rm -rf conftest*
6766   ol_cv_pthread_mthreads=no
6767 fi
6768 rm -f conftest*
6769
6770                 # restore the LIBS
6771                 LIBS="$ol_LIBS"
6772                 
6773 fi
6774
6775 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6776
6777                 if test $ol_cv_pthread_mthreads = yes ; then
6778                         ol_link_pthreads="-mthreads"
6779                         ol_link_threads=posix
6780                 fi
6781         fi
6782
6783                 # Pthread try link: -thread (ol_cv_pthread_thread)
6784         if test "$ol_link_threads" = no ; then
6785                 # try -thread
6786                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6787 echo "configure:6788: checking for pthread link with -thread" >&5
6788 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   
6792                         # save the flags
6793                         ol_LIBS="$LIBS"
6794                         LIBS="-thread $LIBS"
6795
6796                         cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799
6800 #include <pthread.h>
6801 #ifndef NULL
6802 #define NULL (void*)0
6803 #endif
6804
6805 int main() {
6806
6807         pthread_t t;
6808
6809 #if HAVE_PTHREADS_D4
6810         pthread_create(&t, pthread_attr_default, NULL, NULL);
6811         pthread_detach( &t );
6812 #else
6813         pthread_create(&t, NULL, NULL, NULL);
6814         pthread_detach( t );
6815 #endif
6816 #ifdef HAVE_LINUX_THREADS
6817         pthread_kill_other_threads_np();
6818 #endif
6819
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   ol_cv_pthread_thread=yes
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   ol_cv_pthread_thread=no
6830 fi
6831 rm -f conftest*
6832
6833                 # restore the LIBS
6834                 LIBS="$ol_LIBS"
6835                 
6836 fi
6837
6838 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6839
6840                 if test $ol_cv_pthread_thread = yes ; then
6841                         ol_link_pthreads="-thread"
6842                         ol_link_threads=posix
6843                 fi
6844         fi
6845
6846
6847                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6848         if test "$ol_link_threads" = no ; then
6849                 # try -lpthread -lmach -lexc -lc_r
6850                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6851 echo "configure:6852: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6852 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   
6856                         # save the flags
6857                         ol_LIBS="$LIBS"
6858                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6859
6860                         cat > conftest.$ac_ext <<EOF
6861 #line 6862 "configure"
6862 #include "confdefs.h"
6863
6864 #include <pthread.h>
6865 #ifndef NULL
6866 #define NULL (void*)0
6867 #endif
6868
6869 int main() {
6870
6871         pthread_t t;
6872
6873 #if HAVE_PTHREADS_D4
6874         pthread_create(&t, pthread_attr_default, NULL, NULL);
6875         pthread_detach( &t );
6876 #else
6877         pthread_create(&t, NULL, NULL, NULL);
6878         pthread_detach( t );
6879 #endif
6880 #ifdef HAVE_LINUX_THREADS
6881         pthread_kill_other_threads_np();
6882 #endif
6883
6884 ; return 0; }
6885 EOF
6886 if { (eval echo configure:6887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6887   rm -rf conftest*
6888   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6889 else
6890   echo "configure: failed program was:" >&5
6891   cat conftest.$ac_ext >&5
6892   rm -rf conftest*
6893   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6894 fi
6895 rm -f conftest*
6896
6897                 # restore the LIBS
6898                 LIBS="$ol_LIBS"
6899                 
6900 fi
6901
6902 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6903
6904                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6905                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6906                         ol_link_threads=posix
6907                 fi
6908         fi
6909
6910                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6911         if test "$ol_link_threads" = no ; then
6912                 # try -lpthread -lmach -lexc
6913                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6914 echo "configure:6915: checking for pthread link with -lpthread -lmach -lexc" >&5
6915 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6916   echo $ac_n "(cached) $ac_c" 1>&6
6917 else
6918   
6919                         # save the flags
6920                         ol_LIBS="$LIBS"
6921                         LIBS="-lpthread -lmach -lexc $LIBS"
6922
6923                         cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926
6927 #include <pthread.h>
6928 #ifndef NULL
6929 #define NULL (void*)0
6930 #endif
6931
6932 int main() {
6933
6934         pthread_t t;
6935
6936 #if HAVE_PTHREADS_D4
6937         pthread_create(&t, pthread_attr_default, NULL, NULL);
6938         pthread_detach( &t );
6939 #else
6940         pthread_create(&t, NULL, NULL, NULL);
6941         pthread_detach( t );
6942 #endif
6943 #ifdef HAVE_LINUX_THREADS
6944         pthread_kill_other_threads_np();
6945 #endif
6946
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   ol_cv_pthread_lpthread_lmach_lexc=yes
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   ol_cv_pthread_lpthread_lmach_lexc=no
6957 fi
6958 rm -f conftest*
6959
6960                 # restore the LIBS
6961                 LIBS="$ol_LIBS"
6962                 
6963 fi
6964
6965 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6966
6967                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6968                         ol_link_pthreads="-lpthread -lmach -lexc"
6969                         ol_link_threads=posix
6970                 fi
6971         fi
6972
6973
6974                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6975         if test "$ol_link_threads" = no ; then
6976                 # try -lpthread -Wl,-woff,85
6977                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6978 echo "configure:6979: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6979 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   
6983                         # save the flags
6984                         ol_LIBS="$LIBS"
6985                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6986
6987                         cat > conftest.$ac_ext <<EOF
6988 #line 6989 "configure"
6989 #include "confdefs.h"
6990
6991 #include <pthread.h>
6992 #ifndef NULL
6993 #define NULL (void*)0
6994 #endif
6995
6996 int main() {
6997
6998         pthread_t t;
6999
7000 #if HAVE_PTHREADS_D4
7001         pthread_create(&t, pthread_attr_default, NULL, NULL);
7002         pthread_detach( &t );
7003 #else
7004         pthread_create(&t, NULL, NULL, NULL);
7005         pthread_detach( t );
7006 #endif
7007 #ifdef HAVE_LINUX_THREADS
7008         pthread_kill_other_threads_np();
7009 #endif
7010
7011 ; return 0; }
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7014   rm -rf conftest*
7015   ol_cv_pthread_lib_lpthread_woff=yes
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019   rm -rf conftest*
7020   ol_cv_pthread_lib_lpthread_woff=no
7021 fi
7022 rm -f conftest*
7023
7024                 # restore the LIBS
7025                 LIBS="$ol_LIBS"
7026                 
7027 fi
7028
7029 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7030
7031                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7032                         ol_link_pthreads="-lpthread -Wl,-woff,85"
7033                         ol_link_threads=posix
7034                 fi
7035         fi
7036
7037
7038                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7039         if test "$ol_link_threads" = no ; then
7040                 # try -lpthread
7041                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7042 echo "configure:7043: checking for pthread link with -lpthread" >&5
7043 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7044   echo $ac_n "(cached) $ac_c" 1>&6
7045 else
7046   
7047                         # save the flags
7048                         ol_LIBS="$LIBS"
7049                         LIBS="-lpthread $LIBS"
7050
7051                         cat > conftest.$ac_ext <<EOF
7052 #line 7053 "configure"
7053 #include "confdefs.h"
7054
7055 #include <pthread.h>
7056 #ifndef NULL
7057 #define NULL (void*)0
7058 #endif
7059
7060 int main() {
7061
7062         pthread_t t;
7063
7064 #if HAVE_PTHREADS_D4
7065         pthread_create(&t, pthread_attr_default, NULL, NULL);
7066         pthread_detach( &t );
7067 #else
7068         pthread_create(&t, NULL, NULL, NULL);
7069         pthread_detach( t );
7070 #endif
7071 #ifdef HAVE_LINUX_THREADS
7072         pthread_kill_other_threads_np();
7073 #endif
7074
7075 ; return 0; }
7076 EOF
7077 if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7078   rm -rf conftest*
7079   ol_cv_pthread_lpthread=yes
7080 else
7081   echo "configure: failed program was:" >&5
7082   cat conftest.$ac_ext >&5
7083   rm -rf conftest*
7084   ol_cv_pthread_lpthread=no
7085 fi
7086 rm -f conftest*
7087
7088                 # restore the LIBS
7089                 LIBS="$ol_LIBS"
7090                 
7091 fi
7092
7093 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7094
7095                 if test $ol_cv_pthread_lpthread = yes ; then
7096                         ol_link_pthreads="-lpthread"
7097                         ol_link_threads=posix
7098                 fi
7099         fi
7100
7101                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7102         if test "$ol_link_threads" = no ; then
7103                 # try -lc_r
7104                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7105 echo "configure:7106: checking for pthread link with -lc_r" >&5
7106 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7107   echo $ac_n "(cached) $ac_c" 1>&6
7108 else
7109   
7110                         # save the flags
7111                         ol_LIBS="$LIBS"
7112                         LIBS="-lc_r $LIBS"
7113
7114                         cat > conftest.$ac_ext <<EOF
7115 #line 7116 "configure"
7116 #include "confdefs.h"
7117
7118 #include <pthread.h>
7119 #ifndef NULL
7120 #define NULL (void*)0
7121 #endif
7122
7123 int main() {
7124
7125         pthread_t t;
7126
7127 #if HAVE_PTHREADS_D4
7128         pthread_create(&t, pthread_attr_default, NULL, NULL);
7129         pthread_detach( &t );
7130 #else
7131         pthread_create(&t, NULL, NULL, NULL);
7132         pthread_detach( t );
7133 #endif
7134 #ifdef HAVE_LINUX_THREADS
7135         pthread_kill_other_threads_np();
7136 #endif
7137
7138 ; return 0; }
7139 EOF
7140 if { (eval echo configure:7141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7141   rm -rf conftest*
7142   ol_cv_pthread_lc_r=yes
7143 else
7144   echo "configure: failed program was:" >&5
7145   cat conftest.$ac_ext >&5
7146   rm -rf conftest*
7147   ol_cv_pthread_lc_r=no
7148 fi
7149 rm -f conftest*
7150
7151                 # restore the LIBS
7152                 LIBS="$ol_LIBS"
7153                 
7154 fi
7155
7156 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
7157
7158                 if test $ol_cv_pthread_lc_r = yes ; then
7159                         ol_link_pthreads="-lc_r"
7160                         ol_link_threads=posix
7161                 fi
7162         fi
7163
7164
7165                 # Pthread try link: -threads (ol_cv_pthread_threads)
7166         if test "$ol_link_threads" = no ; then
7167                 # try -threads
7168                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
7169 echo "configure:7170: checking for pthread link with -threads" >&5
7170 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
7171   echo $ac_n "(cached) $ac_c" 1>&6
7172 else
7173   
7174                         # save the flags
7175                         ol_LIBS="$LIBS"
7176                         LIBS="-threads $LIBS"
7177
7178                         cat > conftest.$ac_ext <<EOF
7179 #line 7180 "configure"
7180 #include "confdefs.h"
7181
7182 #include <pthread.h>
7183 #ifndef NULL
7184 #define NULL (void*)0
7185 #endif
7186
7187 int main() {
7188
7189         pthread_t t;
7190
7191 #if HAVE_PTHREADS_D4
7192         pthread_create(&t, pthread_attr_default, NULL, NULL);
7193         pthread_detach( &t );
7194 #else
7195         pthread_create(&t, NULL, NULL, NULL);
7196         pthread_detach( t );
7197 #endif
7198 #ifdef HAVE_LINUX_THREADS
7199         pthread_kill_other_threads_np();
7200 #endif
7201
7202 ; return 0; }
7203 EOF
7204 if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7205   rm -rf conftest*
7206   ol_cv_pthread_threads=yes
7207 else
7208   echo "configure: failed program was:" >&5
7209   cat conftest.$ac_ext >&5
7210   rm -rf conftest*
7211   ol_cv_pthread_threads=no
7212 fi
7213 rm -f conftest*
7214
7215                 # restore the LIBS
7216                 LIBS="$ol_LIBS"
7217                 
7218 fi
7219
7220 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7221
7222                 if test $ol_cv_pthread_threads = yes ; then
7223                         ol_link_pthreads="-threads"
7224                         ol_link_threads=posix
7225                 fi
7226         fi
7227
7228
7229                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7230         if test "$ol_link_threads" = no ; then
7231                 # try -lpthreads -lmach -lexc -lc_r
7232                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7233 echo "configure:7234: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7234 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
7235   echo $ac_n "(cached) $ac_c" 1>&6
7236 else
7237   
7238                         # save the flags
7239                         ol_LIBS="$LIBS"
7240                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7241
7242                         cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245
7246 #include <pthread.h>
7247 #ifndef NULL
7248 #define NULL (void*)0
7249 #endif
7250
7251 int main() {
7252
7253         pthread_t t;
7254
7255 #if HAVE_PTHREADS_D4
7256         pthread_create(&t, pthread_attr_default, NULL, NULL);
7257         pthread_detach( &t );
7258 #else
7259         pthread_create(&t, NULL, NULL, NULL);
7260         pthread_detach( t );
7261 #endif
7262 #ifdef HAVE_LINUX_THREADS
7263         pthread_kill_other_threads_np();
7264 #endif
7265
7266 ; return 0; }
7267 EOF
7268 if { (eval echo configure:7269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7269   rm -rf conftest*
7270   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7271 else
7272   echo "configure: failed program was:" >&5
7273   cat conftest.$ac_ext >&5
7274   rm -rf conftest*
7275   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7276 fi
7277 rm -f conftest*
7278
7279                 # restore the LIBS
7280                 LIBS="$ol_LIBS"
7281                 
7282 fi
7283
7284 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7285
7286                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7287                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7288                         ol_link_threads=posix
7289                 fi
7290         fi
7291
7292                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7293         if test "$ol_link_threads" = no ; then
7294                 # try -lpthreads -lmach -lexc
7295                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7296 echo "configure:7297: checking for pthread link with -lpthreads -lmach -lexc" >&5
7297 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
7298   echo $ac_n "(cached) $ac_c" 1>&6
7299 else
7300   
7301                         # save the flags
7302                         ol_LIBS="$LIBS"
7303                         LIBS="-lpthreads -lmach -lexc $LIBS"
7304
7305                         cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308
7309 #include <pthread.h>
7310 #ifndef NULL
7311 #define NULL (void*)0
7312 #endif
7313
7314 int main() {
7315
7316         pthread_t t;
7317
7318 #if HAVE_PTHREADS_D4
7319         pthread_create(&t, pthread_attr_default, NULL, NULL);
7320         pthread_detach( &t );
7321 #else
7322         pthread_create(&t, NULL, NULL, NULL);
7323         pthread_detach( t );
7324 #endif
7325 #ifdef HAVE_LINUX_THREADS
7326         pthread_kill_other_threads_np();
7327 #endif
7328
7329 ; return 0; }
7330 EOF
7331 if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7332   rm -rf conftest*
7333   ol_cv_pthread_lpthreads_lmach_lexc=yes
7334 else
7335   echo "configure: failed program was:" >&5
7336   cat conftest.$ac_ext >&5
7337   rm -rf conftest*
7338   ol_cv_pthread_lpthreads_lmach_lexc=no
7339 fi
7340 rm -f conftest*
7341
7342                 # restore the LIBS
7343                 LIBS="$ol_LIBS"
7344                 
7345 fi
7346
7347 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7348
7349                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7350                         ol_link_pthreads="-lpthreads -lmach -lexc"
7351                         ol_link_threads=posix
7352                 fi
7353         fi
7354
7355                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7356         if test "$ol_link_threads" = no ; then
7357                 # try -lpthreads -lexc
7358                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7359 echo "configure:7360: checking for pthread link with -lpthreads -lexc" >&5
7360 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
7361   echo $ac_n "(cached) $ac_c" 1>&6
7362 else
7363   
7364                         # save the flags
7365                         ol_LIBS="$LIBS"
7366                         LIBS="-lpthreads -lexc $LIBS"
7367
7368                         cat > conftest.$ac_ext <<EOF
7369 #line 7370 "configure"
7370 #include "confdefs.h"
7371
7372 #include <pthread.h>
7373 #ifndef NULL
7374 #define NULL (void*)0
7375 #endif
7376
7377 int main() {
7378
7379         pthread_t t;
7380
7381 #if HAVE_PTHREADS_D4
7382         pthread_create(&t, pthread_attr_default, NULL, NULL);
7383         pthread_detach( &t );
7384 #else
7385         pthread_create(&t, NULL, NULL, NULL);
7386         pthread_detach( t );
7387 #endif
7388 #ifdef HAVE_LINUX_THREADS
7389         pthread_kill_other_threads_np();
7390 #endif
7391
7392 ; return 0; }
7393 EOF
7394 if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7395   rm -rf conftest*
7396   ol_cv_pthread_lpthreads_lexc=yes
7397 else
7398   echo "configure: failed program was:" >&5
7399   cat conftest.$ac_ext >&5
7400   rm -rf conftest*
7401   ol_cv_pthread_lpthreads_lexc=no
7402 fi
7403 rm -f conftest*
7404
7405                 # restore the LIBS
7406                 LIBS="$ol_LIBS"
7407                 
7408 fi
7409
7410 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7411
7412                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7413                         ol_link_pthreads="-lpthreads -lexc"
7414                         ol_link_threads=posix
7415                 fi
7416         fi
7417
7418
7419                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7420         if test "$ol_link_threads" = no ; then
7421                 # try -lpthreads
7422                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7423 echo "configure:7424: checking for pthread link with -lpthreads" >&5
7424 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
7425   echo $ac_n "(cached) $ac_c" 1>&6
7426 else
7427   
7428                         # save the flags
7429                         ol_LIBS="$LIBS"
7430                         LIBS="-lpthreads $LIBS"
7431
7432                         cat > conftest.$ac_ext <<EOF
7433 #line 7434 "configure"
7434 #include "confdefs.h"
7435
7436 #include <pthread.h>
7437 #ifndef NULL
7438 #define NULL (void*)0
7439 #endif
7440
7441 int main() {
7442
7443         pthread_t t;
7444
7445 #if HAVE_PTHREADS_D4
7446         pthread_create(&t, pthread_attr_default, NULL, NULL);
7447         pthread_detach( &t );
7448 #else
7449         pthread_create(&t, NULL, NULL, NULL);
7450         pthread_detach( t );
7451 #endif
7452 #ifdef HAVE_LINUX_THREADS
7453         pthread_kill_other_threads_np();
7454 #endif
7455
7456 ; return 0; }
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7459   rm -rf conftest*
7460   ol_cv_pthread_lib_lpthreads=yes
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -rf conftest*
7465   ol_cv_pthread_lib_lpthreads=no
7466 fi
7467 rm -f conftest*
7468
7469                 # restore the LIBS
7470                 LIBS="$ol_LIBS"
7471                 
7472 fi
7473
7474 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7475
7476                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7477                         ol_link_pthreads="-lpthreads"
7478                         ol_link_threads=posix
7479                 fi
7480         fi
7481
7482
7483                 if test $ol_link_threads != no ; then
7484                         cat >> confdefs.h <<\EOF
7485 #define HAVE_PTHREADS 1
7486 EOF
7487
7488
7489                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7490
7491                                                 save_CPPFLAGS="$CPPFLAGS"
7492                         save_LIBS="$LIBS"
7493                         LIBS="$LTHREAD_LIBS $LIBS"
7494
7495                                                                                                 for ac_func in sched_yield pthread_yield
7496 do
7497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7498 echo "configure:7499: checking for $ac_func" >&5
7499 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 /* System header to define __stub macros and hopefully few prototypes,
7506     which can conflict with char $ac_func(); below.  */
7507 #include <assert.h>
7508 /* Override any gcc2 internal prototype to avoid an error.  */
7509 /* We use char because int might match the return type of a gcc2
7510     builtin and then its argument prototype would still apply.  */
7511 char $ac_func();
7512 char (*f)();
7513
7514 int main() {
7515
7516 /* The GNU C library defines this for functions which it implements
7517     to always fail with ENOSYS.  Some functions are actually named
7518     something starting with __ and the normal name is an alias.  */
7519 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7520 choke me
7521 #else
7522 f = $ac_func;
7523 #endif
7524
7525 ; return 0; }
7526 EOF
7527 if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7528   rm -rf conftest*
7529   eval "ac_cv_func_$ac_func=yes"
7530 else
7531   echo "configure: failed program was:" >&5
7532   cat conftest.$ac_ext >&5
7533   rm -rf conftest*
7534   eval "ac_cv_func_$ac_func=no"
7535 fi
7536 rm -f conftest*
7537 fi
7538
7539 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7540   echo "$ac_t""yes" 1>&6
7541     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7542   cat >> confdefs.h <<EOF
7543 #define $ac_tr_func 1
7544 EOF
7545  
7546 else
7547   echo "$ac_t""no" 1>&6
7548 fi
7549 done
7550
7551
7552                         if test $ac_cv_func_sched_yield = no -a \
7553                                 $ac_cv_func_pthread_yield = no ; then
7554                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7555 echo "configure:7556: checking for sched_yield in -lrt" >&5
7556 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7558   echo $ac_n "(cached) $ac_c" 1>&6
7559 else
7560   ac_save_LIBS="$LIBS"
7561 LIBS="-lrt  $LIBS"
7562 cat > conftest.$ac_ext <<EOF
7563 #line 7564 "configure"
7564 #include "confdefs.h"
7565 /* Override any gcc2 internal prototype to avoid an error.  */
7566 /* We use char because int might match the return type of a gcc2
7567     builtin and then its argument prototype would still apply.  */
7568 char sched_yield();
7569
7570 int main() {
7571 sched_yield()
7572 ; return 0; }
7573 EOF
7574 if { (eval echo configure:7575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7575   rm -rf conftest*
7576   eval "ac_cv_lib_$ac_lib_var=yes"
7577 else
7578   echo "configure: failed program was:" >&5
7579   cat conftest.$ac_ext >&5
7580   rm -rf conftest*
7581   eval "ac_cv_lib_$ac_lib_var=no"
7582 fi
7583 rm -f conftest*
7584 LIBS="$ac_save_LIBS"
7585
7586 fi
7587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7588   echo "$ac_t""yes" 1>&6
7589   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7590                                         cat >> confdefs.h <<\EOF
7591 #define HAVE_SCHED_YIELD 1
7592 EOF
7593
7594                                         ac_cv_func_sched_yield=yes
7595 else
7596   echo "$ac_t""no" 1>&6
7597 ac_cv_func_sched_yield=no
7598 fi
7599
7600                         fi
7601                         if test $ac_cv_func_sched_yield = no -a \
7602                                 $ac_cv_func_pthread_yield = no ; then
7603                                                                                                 for ac_func in thr_yield
7604 do
7605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7606 echo "configure:7607: checking for $ac_func" >&5
7607 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7608   echo $ac_n "(cached) $ac_c" 1>&6
7609 else
7610   cat > conftest.$ac_ext <<EOF
7611 #line 7612 "configure"
7612 #include "confdefs.h"
7613 /* System header to define __stub macros and hopefully few prototypes,
7614     which can conflict with char $ac_func(); below.  */
7615 #include <assert.h>
7616 /* Override any gcc2 internal prototype to avoid an error.  */
7617 /* We use char because int might match the return type of a gcc2
7618     builtin and then its argument prototype would still apply.  */
7619 char $ac_func();
7620 char (*f)();
7621
7622 int main() {
7623
7624 /* The GNU C library defines this for functions which it implements
7625     to always fail with ENOSYS.  Some functions are actually named
7626     something starting with __ and the normal name is an alias.  */
7627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7628 choke me
7629 #else
7630 f = $ac_func;
7631 #endif
7632
7633 ; return 0; }
7634 EOF
7635 if { (eval echo configure:7636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7636   rm -rf conftest*
7637   eval "ac_cv_func_$ac_func=yes"
7638 else
7639   echo "configure: failed program was:" >&5
7640   cat conftest.$ac_ext >&5
7641   rm -rf conftest*
7642   eval "ac_cv_func_$ac_func=no"
7643 fi
7644 rm -f conftest*
7645 fi
7646
7647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7648   echo "$ac_t""yes" 1>&6
7649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7650   cat >> confdefs.h <<EOF
7651 #define $ac_tr_func 1
7652 EOF
7653  
7654 else
7655   echo "$ac_t""no" 1>&6
7656 fi
7657 done
7658
7659                         fi
7660                         if test $ac_cv_func_sched_yield = no -a \
7661                                 $ac_cv_func_pthread_yield = no -a \
7662                                 "$ac_cv_func_thr_yield" = no ; then
7663                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7664                         fi
7665
7666                                                 for ac_func in pthread_kill
7667 do
7668 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7669 echo "configure:7670: checking for $ac_func" >&5
7670 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7671   echo $ac_n "(cached) $ac_c" 1>&6
7672 else
7673   cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7676 /* System header to define __stub macros and hopefully few prototypes,
7677     which can conflict with char $ac_func(); below.  */
7678 #include <assert.h>
7679 /* Override any gcc2 internal prototype to avoid an error.  */
7680 /* We use char because int might match the return type of a gcc2
7681     builtin and then its argument prototype would still apply.  */
7682 char $ac_func();
7683 char (*f)();
7684
7685 int main() {
7686
7687 /* The GNU C library defines this for functions which it implements
7688     to always fail with ENOSYS.  Some functions are actually named
7689     something starting with __ and the normal name is an alias.  */
7690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7691 choke me
7692 #else
7693 f = $ac_func;
7694 #endif
7695
7696 ; return 0; }
7697 EOF
7698 if { (eval echo configure:7699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7699   rm -rf conftest*
7700   eval "ac_cv_func_$ac_func=yes"
7701 else
7702   echo "configure: failed program was:" >&5
7703   cat conftest.$ac_ext >&5
7704   rm -rf conftest*
7705   eval "ac_cv_func_$ac_func=no"
7706 fi
7707 rm -f conftest*
7708 fi
7709
7710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7711   echo "$ac_t""yes" 1>&6
7712     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7713   cat >> confdefs.h <<EOF
7714 #define $ac_tr_func 1
7715 EOF
7716  
7717 else
7718   echo "$ac_t""no" 1>&6
7719 fi
7720 done
7721
7722
7723                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7724 echo "configure:7725: checking for pthread_detach with <pthread.h>" >&5
7725 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7726   echo $ac_n "(cached) $ac_c" 1>&6
7727 else
7728   
7729                                                                 cat > conftest.$ac_ext <<EOF
7730 #line 7731 "configure"
7731 #include "confdefs.h"
7732
7733 #include <pthread.h>
7734 #ifndef NULL
7735 #define NULL (void*)0
7736 #endif
7737
7738 int main() {
7739 pthread_detach(NULL);
7740 ; return 0; }
7741 EOF
7742 if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7743   rm -rf conftest*
7744   ol_cv_func_pthread_detach=yes
7745 else
7746   echo "configure: failed program was:" >&5
7747   cat conftest.$ac_ext >&5
7748   rm -rf conftest*
7749   ol_cv_func_pthread_detach=no
7750 fi
7751 rm -f conftest*
7752                         
7753 fi
7754
7755 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7756
7757                         if test $ol_cv_func_pthread_detach = no ; then
7758                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7759                         fi
7760
7761                         cat >> confdefs.h <<\EOF
7762 #define HAVE_PTHREAD_DETACH 1
7763 EOF
7764
7765
7766                                                 for ac_func in \
7767                                 pthread_setconcurrency \
7768                                 pthread_getconcurrency \
7769                                 thr_setconcurrency \
7770                                 thr_getconcurrency \
7771                         
7772 do
7773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7774 echo "configure:7775: checking for $ac_func" >&5
7775 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7776   echo $ac_n "(cached) $ac_c" 1>&6
7777 else
7778   cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 /* System header to define __stub macros and hopefully few prototypes,
7782     which can conflict with char $ac_func(); below.  */
7783 #include <assert.h>
7784 /* Override any gcc2 internal prototype to avoid an error.  */
7785 /* We use char because int might match the return type of a gcc2
7786     builtin and then its argument prototype would still apply.  */
7787 char $ac_func();
7788 char (*f)();
7789
7790 int main() {
7791
7792 /* The GNU C library defines this for functions which it implements
7793     to always fail with ENOSYS.  Some functions are actually named
7794     something starting with __ and the normal name is an alias.  */
7795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7796 choke me
7797 #else
7798 f = $ac_func;
7799 #endif
7800
7801 ; return 0; }
7802 EOF
7803 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7804   rm -rf conftest*
7805   eval "ac_cv_func_$ac_func=yes"
7806 else
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   eval "ac_cv_func_$ac_func=no"
7811 fi
7812 rm -f conftest*
7813 fi
7814
7815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7816   echo "$ac_t""yes" 1>&6
7817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7818   cat >> confdefs.h <<EOF
7819 #define $ac_tr_func 1
7820 EOF
7821  
7822 else
7823   echo "$ac_t""no" 1>&6
7824 fi
7825 done
7826
7827
7828                         
7829         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7830 echo "configure:7831: checking for pthread_kill_other_threads_np" >&5
7831 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7832   echo $ac_n "(cached) $ac_c" 1>&6
7833 else
7834   cat > conftest.$ac_ext <<EOF
7835 #line 7836 "configure"
7836 #include "confdefs.h"
7837 /* System header to define __stub macros and hopefully few prototypes,
7838     which can conflict with char pthread_kill_other_threads_np(); below.  */
7839 #include <assert.h>
7840 /* Override any gcc2 internal prototype to avoid an error.  */
7841 /* We use char because int might match the return type of a gcc2
7842     builtin and then its argument prototype would still apply.  */
7843 char pthread_kill_other_threads_np();
7844 char (*f)();
7845
7846 int main() {
7847
7848 /* The GNU C library defines this for functions which it implements
7849     to always fail with ENOSYS.  Some functions are actually named
7850     something starting with __ and the normal name is an alias.  */
7851 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7852 choke me
7853 #else
7854 f = pthread_kill_other_threads_np;
7855 #endif
7856
7857 ; return 0; }
7858 EOF
7859 if { (eval echo configure:7860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7860   rm -rf conftest*
7861   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7862 else
7863   echo "configure: failed program was:" >&5
7864   cat conftest.$ac_ext >&5
7865   rm -rf conftest*
7866   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7867 fi
7868 rm -f conftest*
7869 fi
7870
7871 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7872   echo "$ac_t""yes" 1>&6
7873   :
7874 else
7875   echo "$ac_t""no" 1>&6
7876 fi
7877
7878         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7879 echo "configure:7880: checking for LinuxThreads implementation" >&5
7880 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7881   echo $ac_n "(cached) $ac_c" 1>&6
7882 else
7883   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7884 fi
7885
7886 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7887
7888                         
7889         
7890         
7891         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7892 echo "configure:7893: checking for LinuxThreads consistency" >&5
7893 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   
7897                 if test $ol_cv_header_linux_threads = yes -a \
7898                         $ol_cv_sys_linux_threads = yes; then
7899                         ol_cv_linux_threads=yes
7900                 elif test $ol_cv_header_linux_threads = no -a \
7901                         $ol_cv_sys_linux_threads = no; then
7902                         ol_cv_linux_threads=no
7903                 else
7904                         ol_cv_linux_threads=error
7905                 fi
7906         
7907 fi
7908
7909 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7910
7911
7912                         if test $ol_cv_linux_threads = error; then
7913                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7914                         fi
7915
7916                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7917 echo "configure:7918: checking if pthread_create() works" >&5
7918 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7919   echo $ac_n "(cached) $ac_c" 1>&6
7920 else
7921   
7922                         if test "$cross_compiling" = yes; then
7923                                 ol_cv_pthread_create_works=yes
7924 else
7925   cat > conftest.$ac_ext <<EOF
7926 #line 7927 "configure"
7927 #include "confdefs.h"
7928
7929 #include <pthread.h>
7930 #ifndef NULL
7931 #define NULL (void*)0
7932 #endif
7933
7934 static void *task(p)
7935         void *p;
7936 {
7937         return (void *) (p == NULL);
7938 }
7939
7940 int main(argc, argv)
7941         int argc;
7942         char **argv;
7943 {
7944         pthread_t t;
7945 #if HAVE_PTHREADS_D4
7946         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7947 #else
7948         exit(pthread_create(&t, NULL, task, NULL));
7949 #endif
7950 }
7951
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7954 then
7955   ol_cv_pthread_create_works=yes
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -fr conftest*
7960   ol_cv_pthread_create_works=no
7961 fi
7962 rm -fr conftest*
7963 fi
7964
7965 fi
7966
7967 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7968
7969                         if test $ol_cv_pthread_create_works = no ; then
7970                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7971                         fi
7972
7973                                                 if test $ol_with_yielding_select = auto ; then
7974                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7975 echo "configure:7976: checking if select yields when using pthreads" >&5
7976 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7977   echo $ac_n "(cached) $ac_c" 1>&6
7978 else
7979   
7980                                 if test "$cross_compiling" = yes; then
7981   ol_cv_pthread_select_yields=cross
7982 else
7983   cat > conftest.$ac_ext <<EOF
7984 #line 7985 "configure"
7985 #include "confdefs.h"
7986
7987 #include <sys/types.h>
7988 #include <sys/time.h>
7989 #include <unistd.h>
7990 #include <pthread.h>
7991 #ifndef NULL
7992 #define NULL (void*) 0
7993 #endif
7994
7995 static int fildes[2];
7996
7997 static void *task(p)
7998         void *p;
7999 {
8000         int i;
8001         struct timeval tv;
8002
8003         fd_set rfds;
8004
8005         tv.tv_sec=10;
8006         tv.tv_usec=0;
8007
8008         FD_ZERO(&rfds);
8009         FD_SET(fildes[0], &rfds);
8010
8011         /* we're not interested in any fds */
8012         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
8013
8014         if(i < 0) {
8015                 perror("select");
8016                 exit(10);
8017         }
8018
8019         exit(0); /* if we exit here, the select blocked the whole process */
8020 }
8021
8022 int main(argc, argv)
8023         int argc;
8024         char **argv;
8025 {
8026         pthread_t t;
8027
8028         /* create a pipe to select */
8029         if(pipe(&fildes[0])) {
8030                 perror("select");
8031                 exit(1);
8032         }
8033
8034 #ifdef HAVE_PTHREAD_SETCONCURRENCY
8035         (void) pthread_setconcurrency(2);
8036 #else
8037 #ifdef HAVE_THR_SETCONCURRENCY
8038         /* Set Solaris LWP concurrency to 2 */
8039         thr_setconcurrency(2);
8040 #endif
8041 #endif
8042
8043 #if HAVE_PTHREADS_D4
8044         pthread_create(&t, pthread_attr_default, task, NULL);
8045 #else
8046         pthread_create(&t, NULL, task, NULL);
8047 #endif
8048
8049 #if HAVE_SCHED_YIELD
8050         sched_yield();  /* make sure task runs first */
8051 #else
8052 #ifdef HAVE_PTHREAD_YIELD
8053         pthread_yield();        /* make sure task runs first */
8054 #endif
8055 #endif
8056
8057         exit(2);
8058 }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8061 then
8062   ol_cv_pthread_select_yields=no
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -fr conftest*
8067   ol_cv_pthread_select_yields=yes
8068 fi
8069 rm -fr conftest*
8070 fi
8071
8072 fi
8073
8074 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
8075
8076                                 if test $ol_cv_pthread_select_yields = cross ; then
8077                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
8078                                 fi
8079
8080                                 if test $ol_cv_pthread_select_yields = yes ; then
8081                                         ol_with_yielding_select=yes
8082                                 fi
8083                         fi
8084
8085                                                 CPPFLAGS="$save_CPPFLAGS"
8086                         LIBS="$save_LIBS"
8087                 else
8088                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
8089                 fi
8090         fi
8091
8092         if test $ol_with_threads = posix ; then
8093                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
8094         fi
8095 fi
8096
8097 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8098         -o $ol_with_threads = mach ; then
8099
8100                 for ac_hdr in mach/cthreads.h
8101 do
8102 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8103 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8104 echo "configure:8105: checking for $ac_hdr" >&5
8105 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8106   echo $ac_n "(cached) $ac_c" 1>&6
8107 else
8108   cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111 #include <$ac_hdr>
8112 EOF
8113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8114 { (eval echo configure:8115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8116 if test -z "$ac_err"; then
8117   rm -rf conftest*
8118   eval "ac_cv_header_$ac_safe=yes"
8119 else
8120   echo "$ac_err" >&5
8121   echo "configure: failed program was:" >&5
8122   cat conftest.$ac_ext >&5
8123   rm -rf conftest*
8124   eval "ac_cv_header_$ac_safe=no"
8125 fi
8126 rm -f conftest*
8127 fi
8128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8129   echo "$ac_t""yes" 1>&6
8130     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8131   cat >> confdefs.h <<EOF
8132 #define $ac_tr_hdr 1
8133 EOF
8134  
8135 else
8136   echo "$ac_t""no" 1>&6
8137 fi
8138 done
8139
8140         if test $ac_cv_header_mach_cthreads_h = yes ; then
8141                 ol_with_threads=found
8142
8143                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
8144 echo "configure:8145: checking for cthread_fork" >&5
8145 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 /* System header to define __stub macros and hopefully few prototypes,
8152     which can conflict with char cthread_fork(); below.  */
8153 #include <assert.h>
8154 /* Override any gcc2 internal prototype to avoid an error.  */
8155 /* We use char because int might match the return type of a gcc2
8156     builtin and then its argument prototype would still apply.  */
8157 char cthread_fork();
8158 char (*f)();
8159
8160 int main() {
8161
8162 /* The GNU C library defines this for functions which it implements
8163     to always fail with ENOSYS.  Some functions are actually named
8164     something starting with __ and the normal name is an alias.  */
8165 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
8166 choke me
8167 #else
8168 f = cthread_fork;
8169 #endif
8170
8171 ; return 0; }
8172 EOF
8173 if { (eval echo configure:8174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8174   rm -rf conftest*
8175   eval "ac_cv_func_cthread_fork=yes"
8176 else
8177   echo "configure: failed program was:" >&5
8178   cat conftest.$ac_ext >&5
8179   rm -rf conftest*
8180   eval "ac_cv_func_cthread_fork=no"
8181 fi
8182 rm -f conftest*
8183 fi
8184
8185 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
8186   echo "$ac_t""yes" 1>&6
8187   ol_link_threads=yes
8188 else
8189   echo "$ac_t""no" 1>&6
8190 fi
8191
8192
8193                 if test $ol_link_threads = no ; then
8194                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
8195 echo "configure:8196: checking for cthread_fork with -all_load" >&5
8196 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   
8200                                                                 save_LIBS="$LIBS"
8201                                 LIBS="-all_load $LIBS"
8202                                 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 #include <mach/cthreads.h>
8206 int main() {
8207
8208                                         cthread_fork((void *)0, (void *)0);
8209                                         
8210 ; return 0; }
8211 EOF
8212 if { (eval echo configure:8213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8213   rm -rf conftest*
8214   ol_cv_cthread_all_load=yes
8215 else
8216   echo "configure: failed program was:" >&5
8217   cat conftest.$ac_ext >&5
8218   rm -rf conftest*
8219   ol_cv_cthread_all_load=no
8220 fi
8221 rm -f conftest*
8222                                                                 LIBS="$save_LIBS"
8223                         
8224 fi
8225
8226 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8227
8228                         if test $ol_cv_cthread_all_load = yes ; then
8229                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8230                                 ol_link_threads=mach
8231                         fi
8232                 fi
8233
8234                 if test $ol_link_threads != no ; then
8235                         : check for cthread specific functionality here
8236                         cat >> confdefs.h <<\EOF
8237 #define HAVE_MACH_CTHREADS 1
8238 EOF
8239
8240                 else
8241                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8242                 fi
8243         fi
8244
8245         if test $ol_with_threads = mach ; then
8246                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8247         fi
8248 fi
8249
8250 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8251         -o $ol_with_threads = lwp ; then
8252
8253                 for ac_hdr in thread.h synch.h
8254 do
8255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8257 echo "configure:8258: checking for $ac_hdr" >&5
8258 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8259   echo $ac_n "(cached) $ac_c" 1>&6
8260 else
8261   cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 #include <$ac_hdr>
8265 EOF
8266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8267 { (eval echo configure:8268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8269 if test -z "$ac_err"; then
8270   rm -rf conftest*
8271   eval "ac_cv_header_$ac_safe=yes"
8272 else
8273   echo "$ac_err" >&5
8274   echo "configure: failed program was:" >&5
8275   cat conftest.$ac_ext >&5
8276   rm -rf conftest*
8277   eval "ac_cv_header_$ac_safe=no"
8278 fi
8279 rm -f conftest*
8280 fi
8281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8282   echo "$ac_t""yes" 1>&6
8283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8284   cat >> confdefs.h <<EOF
8285 #define $ac_tr_hdr 1
8286 EOF
8287  
8288 else
8289   echo "$ac_t""no" 1>&6
8290 fi
8291 done
8292
8293         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8294                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8295 echo "configure:8296: checking for thr_create in -lthread" >&5
8296 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
8297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8298   echo $ac_n "(cached) $ac_c" 1>&6
8299 else
8300   ac_save_LIBS="$LIBS"
8301 LIBS="-lthread  $LIBS"
8302 cat > conftest.$ac_ext <<EOF
8303 #line 8304 "configure"
8304 #include "confdefs.h"
8305 /* Override any gcc2 internal prototype to avoid an error.  */
8306 /* We use char because int might match the return type of a gcc2
8307     builtin and then its argument prototype would still apply.  */
8308 char thr_create();
8309
8310 int main() {
8311 thr_create()
8312 ; return 0; }
8313 EOF
8314 if { (eval echo configure:8315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8315   rm -rf conftest*
8316   eval "ac_cv_lib_$ac_lib_var=yes"
8317 else
8318   echo "configure: failed program was:" >&5
8319   cat conftest.$ac_ext >&5
8320   rm -rf conftest*
8321   eval "ac_cv_lib_$ac_lib_var=no"
8322 fi
8323 rm -f conftest*
8324 LIBS="$ac_save_LIBS"
8325
8326 fi
8327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8328   echo "$ac_t""yes" 1>&6
8329   have_thr=yes
8330 else
8331   echo "$ac_t""no" 1>&6
8332 have_thr=no
8333 fi
8334
8335
8336                 if test $have_thr = yes ; then
8337                         cat >> confdefs.h <<\EOF
8338 #define HAVE_THR 1
8339 EOF
8340
8341                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8342                         ol_link_threads=thr
8343
8344                         if test $ol_with_yielding_select = auto ; then
8345                                 ol_with_yielding_select=yes
8346                         fi
8347
8348                                                 for ac_func in \
8349                                 thr_setconcurrency \
8350                                 thr_getconcurrency \
8351                         
8352 do
8353 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8354 echo "configure:8355: checking for $ac_func" >&5
8355 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8356   echo $ac_n "(cached) $ac_c" 1>&6
8357 else
8358   cat > conftest.$ac_ext <<EOF
8359 #line 8360 "configure"
8360 #include "confdefs.h"
8361 /* System header to define __stub macros and hopefully few prototypes,
8362     which can conflict with char $ac_func(); below.  */
8363 #include <assert.h>
8364 /* Override any gcc2 internal prototype to avoid an error.  */
8365 /* We use char because int might match the return type of a gcc2
8366     builtin and then its argument prototype would still apply.  */
8367 char $ac_func();
8368 char (*f)();
8369
8370 int main() {
8371
8372 /* The GNU C library defines this for functions which it implements
8373     to always fail with ENOSYS.  Some functions are actually named
8374     something starting with __ and the normal name is an alias.  */
8375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8376 choke me
8377 #else
8378 f = $ac_func;
8379 #endif
8380
8381 ; return 0; }
8382 EOF
8383 if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8384   rm -rf conftest*
8385   eval "ac_cv_func_$ac_func=yes"
8386 else
8387   echo "configure: failed program was:" >&5
8388   cat conftest.$ac_ext >&5
8389   rm -rf conftest*
8390   eval "ac_cv_func_$ac_func=no"
8391 fi
8392 rm -f conftest*
8393 fi
8394
8395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8396   echo "$ac_t""yes" 1>&6
8397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8398   cat >> confdefs.h <<EOF
8399 #define $ac_tr_func 1
8400 EOF
8401  
8402 else
8403   echo "$ac_t""no" 1>&6
8404 fi
8405 done
8406
8407                 fi
8408         fi
8409
8410                 for ac_hdr in lwp/lwp.h
8411 do
8412 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8413 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8414 echo "configure:8415: checking for $ac_hdr" >&5
8415 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8416   echo $ac_n "(cached) $ac_c" 1>&6
8417 else
8418   cat > conftest.$ac_ext <<EOF
8419 #line 8420 "configure"
8420 #include "confdefs.h"
8421 #include <$ac_hdr>
8422 EOF
8423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8424 { (eval echo configure:8425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8426 if test -z "$ac_err"; then
8427   rm -rf conftest*
8428   eval "ac_cv_header_$ac_safe=yes"
8429 else
8430   echo "$ac_err" >&5
8431   echo "configure: failed program was:" >&5
8432   cat conftest.$ac_ext >&5
8433   rm -rf conftest*
8434   eval "ac_cv_header_$ac_safe=no"
8435 fi
8436 rm -f conftest*
8437 fi
8438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8439   echo "$ac_t""yes" 1>&6
8440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8441   cat >> confdefs.h <<EOF
8442 #define $ac_tr_hdr 1
8443 EOF
8444  
8445 else
8446   echo "$ac_t""no" 1>&6
8447 fi
8448 done
8449
8450         if test $ac_cv_header_lwp_lwp_h = yes ; then
8451                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8452 echo "configure:8453: checking for lwp_create in -llwp" >&5
8453 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
8454 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8455   echo $ac_n "(cached) $ac_c" 1>&6
8456 else
8457   ac_save_LIBS="$LIBS"
8458 LIBS="-llwp  $LIBS"
8459 cat > conftest.$ac_ext <<EOF
8460 #line 8461 "configure"
8461 #include "confdefs.h"
8462 /* Override any gcc2 internal prototype to avoid an error.  */
8463 /* We use char because int might match the return type of a gcc2
8464     builtin and then its argument prototype would still apply.  */
8465 char lwp_create();
8466
8467 int main() {
8468 lwp_create()
8469 ; return 0; }
8470 EOF
8471 if { (eval echo configure:8472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8472   rm -rf conftest*
8473   eval "ac_cv_lib_$ac_lib_var=yes"
8474 else
8475   echo "configure: failed program was:" >&5
8476   cat conftest.$ac_ext >&5
8477   rm -rf conftest*
8478   eval "ac_cv_lib_$ac_lib_var=no"
8479 fi
8480 rm -f conftest*
8481 LIBS="$ac_save_LIBS"
8482
8483 fi
8484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8485   echo "$ac_t""yes" 1>&6
8486   have_lwp=yes
8487 else
8488   echo "$ac_t""no" 1>&6
8489 have_lwp=no
8490 fi
8491
8492
8493                 if test $have_lwp = yes ; then
8494                         cat >> confdefs.h <<\EOF
8495 #define HAVE_LWP 1
8496 EOF
8497
8498                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8499                         ol_link_threads=lwp
8500
8501                         if test $ol_with_yielding_select = auto ; then
8502                                 ol_with_yielding_select=no
8503                         fi
8504                 fi
8505         fi
8506 fi
8507
8508 if test $ol_with_yielding_select = yes ; then
8509         cat >> confdefs.h <<\EOF
8510 #define HAVE_YIELDING_SELECT 1
8511 EOF
8512
8513 fi
8514
8515 if test $ol_with_threads = manual ; then
8516                 ol_link_threads=yes
8517
8518         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8519
8520         for ac_hdr in pthread.h sched.h
8521 do
8522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8524 echo "configure:8525: checking for $ac_hdr" >&5
8525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8526   echo $ac_n "(cached) $ac_c" 1>&6
8527 else
8528   cat > conftest.$ac_ext <<EOF
8529 #line 8530 "configure"
8530 #include "confdefs.h"
8531 #include <$ac_hdr>
8532 EOF
8533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8534 { (eval echo configure:8535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8536 if test -z "$ac_err"; then
8537   rm -rf conftest*
8538   eval "ac_cv_header_$ac_safe=yes"
8539 else
8540   echo "$ac_err" >&5
8541   echo "configure: failed program was:" >&5
8542   cat conftest.$ac_ext >&5
8543   rm -rf conftest*
8544   eval "ac_cv_header_$ac_safe=no"
8545 fi
8546 rm -f conftest*
8547 fi
8548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8549   echo "$ac_t""yes" 1>&6
8550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8551   cat >> confdefs.h <<EOF
8552 #define $ac_tr_hdr 1
8553 EOF
8554  
8555 else
8556   echo "$ac_t""no" 1>&6
8557 fi
8558 done
8559
8560         for ac_func in sched_yield pthread_yield
8561 do
8562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8563 echo "configure:8564: checking for $ac_func" >&5
8564 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8565   echo $ac_n "(cached) $ac_c" 1>&6
8566 else
8567   cat > conftest.$ac_ext <<EOF
8568 #line 8569 "configure"
8569 #include "confdefs.h"
8570 /* System header to define __stub macros and hopefully few prototypes,
8571     which can conflict with char $ac_func(); below.  */
8572 #include <assert.h>
8573 /* Override any gcc2 internal prototype to avoid an error.  */
8574 /* We use char because int might match the return type of a gcc2
8575     builtin and then its argument prototype would still apply.  */
8576 char $ac_func();
8577 char (*f)();
8578
8579 int main() {
8580
8581 /* The GNU C library defines this for functions which it implements
8582     to always fail with ENOSYS.  Some functions are actually named
8583     something starting with __ and the normal name is an alias.  */
8584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8585 choke me
8586 #else
8587 f = $ac_func;
8588 #endif
8589
8590 ; return 0; }
8591 EOF
8592 if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8593   rm -rf conftest*
8594   eval "ac_cv_func_$ac_func=yes"
8595 else
8596   echo "configure: failed program was:" >&5
8597   cat conftest.$ac_ext >&5
8598   rm -rf conftest*
8599   eval "ac_cv_func_$ac_func=no"
8600 fi
8601 rm -f conftest*
8602 fi
8603
8604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8605   echo "$ac_t""yes" 1>&6
8606     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8607   cat >> confdefs.h <<EOF
8608 #define $ac_tr_func 1
8609 EOF
8610  
8611 else
8612   echo "$ac_t""no" 1>&6
8613 fi
8614 done
8615
8616         
8617         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8618 echo "configure:8619: checking for LinuxThreads pthread.h" >&5
8619 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8620   echo $ac_n "(cached) $ac_c" 1>&6
8621 else
8622   cat > conftest.$ac_ext <<EOF
8623 #line 8624 "configure"
8624 #include "confdefs.h"
8625 #include <pthread.h>
8626 EOF
8627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8628   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8629   rm -rf conftest*
8630   ol_cv_header_linux_threads=yes
8631 else
8632   rm -rf conftest*
8633   ol_cv_header_linux_threads=no
8634 fi
8635 rm -f conftest*
8636
8637                 
8638 fi
8639
8640 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8641         if test $ol_cv_header_linux_threads = yes; then
8642                 cat >> confdefs.h <<\EOF
8643 #define HAVE_LINUX_THREADS 1
8644 EOF
8645
8646         fi
8647
8648
8649         for ac_hdr in mach/cthreads.h
8650 do
8651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8653 echo "configure:8654: checking for $ac_hdr" >&5
8654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8655   echo $ac_n "(cached) $ac_c" 1>&6
8656 else
8657   cat > conftest.$ac_ext <<EOF
8658 #line 8659 "configure"
8659 #include "confdefs.h"
8660 #include <$ac_hdr>
8661 EOF
8662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8663 { (eval echo configure:8664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8665 if test -z "$ac_err"; then
8666   rm -rf conftest*
8667   eval "ac_cv_header_$ac_safe=yes"
8668 else
8669   echo "$ac_err" >&5
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_header_$ac_safe=no"
8674 fi
8675 rm -f conftest*
8676 fi
8677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8678   echo "$ac_t""yes" 1>&6
8679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8680   cat >> confdefs.h <<EOF
8681 #define $ac_tr_hdr 1
8682 EOF
8683  
8684 else
8685   echo "$ac_t""no" 1>&6
8686 fi
8687 done
8688
8689         for ac_hdr in lwp/lwp.h
8690 do
8691 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8692 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8693 echo "configure:8694: checking for $ac_hdr" >&5
8694 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8695   echo $ac_n "(cached) $ac_c" 1>&6
8696 else
8697   cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 #include <$ac_hdr>
8701 EOF
8702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8703 { (eval echo configure:8704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8705 if test -z "$ac_err"; then
8706   rm -rf conftest*
8707   eval "ac_cv_header_$ac_safe=yes"
8708 else
8709   echo "$ac_err" >&5
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -rf conftest*
8713   eval "ac_cv_header_$ac_safe=no"
8714 fi
8715 rm -f conftest*
8716 fi
8717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8718   echo "$ac_t""yes" 1>&6
8719     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8720   cat >> confdefs.h <<EOF
8721 #define $ac_tr_hdr 1
8722 EOF
8723  
8724 else
8725   echo "$ac_t""no" 1>&6
8726 fi
8727 done
8728
8729         for ac_hdr in thread.h synch.h
8730 do
8731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8733 echo "configure:8734: checking for $ac_hdr" >&5
8734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8735   echo $ac_n "(cached) $ac_c" 1>&6
8736 else
8737   cat > conftest.$ac_ext <<EOF
8738 #line 8739 "configure"
8739 #include "confdefs.h"
8740 #include <$ac_hdr>
8741 EOF
8742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8743 { (eval echo configure:8744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8745 if test -z "$ac_err"; then
8746   rm -rf conftest*
8747   eval "ac_cv_header_$ac_safe=yes"
8748 else
8749   echo "$ac_err" >&5
8750   echo "configure: failed program was:" >&5
8751   cat conftest.$ac_ext >&5
8752   rm -rf conftest*
8753   eval "ac_cv_header_$ac_safe=no"
8754 fi
8755 rm -f conftest*
8756 fi
8757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8758   echo "$ac_t""yes" 1>&6
8759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8760   cat >> confdefs.h <<EOF
8761 #define $ac_tr_hdr 1
8762 EOF
8763  
8764 else
8765   echo "$ac_t""no" 1>&6
8766 fi
8767 done
8768
8769 fi
8770
8771 if test $ol_link_threads != no ; then  
8772                         cat >> confdefs.h <<\EOF
8773 #define REENTRANT 1
8774 EOF
8775
8776         cat >> confdefs.h <<\EOF
8777 #define _REENTRANT 1
8778 EOF
8779
8780         cat >> confdefs.h <<\EOF
8781 #define THREAD_SAFE 1
8782 EOF
8783
8784         cat >> confdefs.h <<\EOF
8785 #define _THREAD_SAFE 1
8786 EOF
8787
8788         cat >> confdefs.h <<\EOF
8789 #define THREADSAFE 1
8790 EOF
8791
8792         cat >> confdefs.h <<\EOF
8793 #define _THREADSAFE 1
8794 EOF
8795
8796         cat >> confdefs.h <<\EOF
8797 #define _SGI_MP_SOURCE 1
8798 EOF
8799
8800
8801                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8802 echo "configure:8803: checking for thread specific errno" >&5
8803 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   
8807                 cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 #include <errno.h>
8811 int main() {
8812 errno = 0;
8813 ; return 0; }
8814 EOF
8815 if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8816   rm -rf conftest*
8817   ol_cv_errno_thread_specific=yes
8818 else
8819   echo "configure: failed program was:" >&5
8820   cat conftest.$ac_ext >&5
8821   rm -rf conftest*
8822   ol_cv_errno_thread_specific=no
8823 fi
8824 rm -f conftest*
8825         
8826 fi
8827
8828 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8829
8830                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8831 echo "configure:8832: checking for thread specific h_errno" >&5
8832 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8833   echo $ac_n "(cached) $ac_c" 1>&6
8834 else
8835   
8836                 cat > conftest.$ac_ext <<EOF
8837 #line 8838 "configure"
8838 #include "confdefs.h"
8839 #include <netdb.h>
8840 int main() {
8841 h_errno = 0;
8842 ; return 0; }
8843 EOF
8844 if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8845   rm -rf conftest*
8846   ol_cv_h_errno_thread_specific=yes
8847 else
8848   echo "configure: failed program was:" >&5
8849   cat conftest.$ac_ext >&5
8850   rm -rf conftest*
8851   ol_cv_h_errno_thread_specific=no
8852 fi
8853 rm -f conftest*
8854         
8855 fi
8856
8857 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8858
8859         if test $ol_cv_errno_thread_specific != yes \
8860                 -o $ol_cv_h_errno_thread_specific != yes ; then
8861                 LIBS="$LTHREAD_LIBS $LIBS"
8862                 LTHREAD_LIBS=""
8863         fi
8864
8865 fi  
8866
8867 if test $ol_link_threads = no ; then
8868         if test $ol_with_threads = yes ; then
8869                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8870         fi
8871
8872         if test $ol_with_threads = auto ; then
8873                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8874                 ol_with_threads=no
8875         fi
8876
8877         cat >> confdefs.h <<\EOF
8878 #define NO_THREADS 1
8879 EOF
8880
8881         LTHREAD_LIBS=""
8882 fi
8883
8884 if test $ol_link_threads != no ; then
8885         cat >> confdefs.h <<\EOF
8886 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8887 EOF
8888
8889 fi
8890
8891
8892 ol_link_ldbm=no 
8893 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8894         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8895 echo "configure:8896: checking for DB2 library" >&5
8896 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8897   echo $ac_n "(cached) $ac_c" 1>&6
8898 else
8899         ol_LIBS="$LIBS"
8900         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8901 echo "configure:8902: checking for db_open in -ldb" >&5
8902 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8903 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8904   echo $ac_n "(cached) $ac_c" 1>&6
8905 else
8906   ac_save_LIBS="$LIBS"
8907 LIBS="-ldb  $LIBS"
8908 cat > conftest.$ac_ext <<EOF
8909 #line 8910 "configure"
8910 #include "confdefs.h"
8911 /* Override any gcc2 internal prototype to avoid an error.  */
8912 /* We use char because int might match the return type of a gcc2
8913     builtin and then its argument prototype would still apply.  */
8914 char db_open();
8915
8916 int main() {
8917 db_open()
8918 ; return 0; }
8919 EOF
8920 if { (eval echo configure:8921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8921   rm -rf conftest*
8922   eval "ac_cv_lib_$ac_lib_var=yes"
8923 else
8924   echo "configure: failed program was:" >&5
8925   cat conftest.$ac_ext >&5
8926   rm -rf conftest*
8927   eval "ac_cv_lib_$ac_lib_var=no"
8928 fi
8929 rm -f conftest*
8930 LIBS="$ac_save_LIBS"
8931
8932 fi
8933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8934   echo "$ac_t""yes" 1>&6
8935   ol_cv_lib_db2=-ldb
8936 else
8937   echo "$ac_t""no" 1>&6
8938 ol_cv_lib_db2=no
8939 fi
8940
8941         LIBS="$ol_LIBS"
8942
8943 fi
8944
8945 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8946
8947 for ac_hdr in db.h
8948 do
8949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8951 echo "configure:8952: checking for $ac_hdr" >&5
8952 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8953   echo $ac_n "(cached) $ac_c" 1>&6
8954 else
8955   cat > conftest.$ac_ext <<EOF
8956 #line 8957 "configure"
8957 #include "confdefs.h"
8958 #include <$ac_hdr>
8959 EOF
8960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8961 { (eval echo configure:8962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8963 if test -z "$ac_err"; then
8964   rm -rf conftest*
8965   eval "ac_cv_header_$ac_safe=yes"
8966 else
8967   echo "$ac_err" >&5
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -rf conftest*
8971   eval "ac_cv_header_$ac_safe=no"
8972 fi
8973 rm -f conftest*
8974 fi
8975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8976   echo "$ac_t""yes" 1>&6
8977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8978   cat >> confdefs.h <<EOF
8979 #define $ac_tr_hdr 1
8980 EOF
8981  
8982 else
8983   echo "$ac_t""no" 1>&6
8984 fi
8985 done
8986
8987 if test $ac_cv_header_db_h = yes ; then
8988         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8989 echo "configure:8990: checking if db.h is DB2" >&5
8990 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8991   echo $ac_n "(cached) $ac_c" 1>&6
8992 else
8993   
8994                 cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997
8998 #                       include <db.h>
8999                         /* this check could be improved */
9000 #                       ifdef DB_VERSION_MAJOR
9001 #                               if DB_VERSION_MAJOR == 2
9002                                         __db_version_2
9003 #                               endif
9004 #                       endif
9005                 
9006 EOF
9007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9008   egrep "__db_version_2" >/dev/null 2>&1; then
9009   rm -rf conftest*
9010   ol_cv_header_db2=yes
9011 else
9012   rm -rf conftest*
9013   ol_cv_header_db2=no
9014 fi
9015 rm -f conftest*
9016
9017 fi
9018
9019 echo "$ac_t""$ol_cv_header_db2" 1>&6
9020 else
9021         ol_cv_header_db2=no
9022 fi
9023
9024
9025  
9026  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
9027 echo "configure:9028: checking for Berkeley DB2" >&5
9028 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
9029   echo $ac_n "(cached) $ac_c" 1>&6
9030 else
9031   
9032         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
9033                 ol_cv_berkeley_db2=no
9034         else
9035                 ol_cv_berkeley_db2=yes
9036         fi
9037
9038 fi
9039
9040 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
9041  if test $ol_cv_berkeley_db2 = yes ; then
9042         cat >> confdefs.h <<\EOF
9043 #define HAVE_BERKELEY_DB2 1
9044 EOF
9045
9046  fi
9047
9048
9049         if test $ol_cv_berkeley_db2 = yes ; then
9050                 ol_link_ldbm=db2
9051                 ol_with_ldbm_api=db2
9052
9053                 if test $ol_with_ldbm_type = hash ; then
9054                         cat >> confdefs.h <<\EOF
9055 #define LDBM_USE_DBHASH 1
9056 EOF
9057
9058                 else
9059                         cat >> confdefs.h <<\EOF
9060 #define LDBM_USE_DBBTREE 1
9061 EOF
9062
9063                 fi
9064
9065                                                 if test $ol_cv_lib_db2 != yes ; then
9066                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
9067                 fi
9068         fi
9069 fi
9070
9071 ol_link_bdb2=no
9072 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
9073         ol_link_bdb2=yes
9074 fi
9075
9076 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
9077         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
9078 echo "configure:9079: checking for Berkeley DB library" >&5
9079 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
9080   echo $ac_n "(cached) $ac_c" 1>&6
9081 else
9082   
9083         for ac_hdr in db1/db.h
9084 do
9085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9087 echo "configure:9088: checking for $ac_hdr" >&5
9088 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9089   echo $ac_n "(cached) $ac_c" 1>&6
9090 else
9091   cat > conftest.$ac_ext <<EOF
9092 #line 9093 "configure"
9093 #include "confdefs.h"
9094 #include <$ac_hdr>
9095 EOF
9096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9097 { (eval echo configure:9098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9099 if test -z "$ac_err"; then
9100   rm -rf conftest*
9101   eval "ac_cv_header_$ac_safe=yes"
9102 else
9103   echo "$ac_err" >&5
9104   echo "configure: failed program was:" >&5
9105   cat conftest.$ac_ext >&5
9106   rm -rf conftest*
9107   eval "ac_cv_header_$ac_safe=no"
9108 fi
9109 rm -f conftest*
9110 fi
9111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9112   echo "$ac_t""yes" 1>&6
9113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9114   cat >> confdefs.h <<EOF
9115 #define $ac_tr_hdr 1
9116 EOF
9117  
9118 else
9119   echo "$ac_t""no" 1>&6
9120 fi
9121 done
9122
9123         ol_LIBS="$LIBS"
9124         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
9125 echo "configure:9126: checking for dbopen" >&5
9126 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
9127   echo $ac_n "(cached) $ac_c" 1>&6
9128 else
9129   cat > conftest.$ac_ext <<EOF
9130 #line 9131 "configure"
9131 #include "confdefs.h"
9132 /* System header to define __stub macros and hopefully few prototypes,
9133     which can conflict with char dbopen(); below.  */
9134 #include <assert.h>
9135 /* Override any gcc2 internal prototype to avoid an error.  */
9136 /* We use char because int might match the return type of a gcc2
9137     builtin and then its argument prototype would still apply.  */
9138 char dbopen();
9139 char (*f)();
9140
9141 int main() {
9142
9143 /* The GNU C library defines this for functions which it implements
9144     to always fail with ENOSYS.  Some functions are actually named
9145     something starting with __ and the normal name is an alias.  */
9146 #if defined (__stub_dbopen) || defined (__stub___dbopen)
9147 choke me
9148 #else
9149 f = dbopen;
9150 #endif
9151
9152 ; return 0; }
9153 EOF
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9155   rm -rf conftest*
9156   eval "ac_cv_func_dbopen=yes"
9157 else
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -rf conftest*
9161   eval "ac_cv_func_dbopen=no"
9162 fi
9163 rm -f conftest*
9164 fi
9165
9166 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
9167   echo "$ac_t""yes" 1>&6
9168   ol_cv_lib_db=yes
9169 else
9170   echo "$ac_t""no" 1>&6
9171
9172                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
9173 echo "configure:9174: checking for dbopen in -ldb1" >&5
9174 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
9175 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9176   echo $ac_n "(cached) $ac_c" 1>&6
9177 else
9178   ac_save_LIBS="$LIBS"
9179 LIBS="-ldb1  $LIBS"
9180 cat > conftest.$ac_ext <<EOF
9181 #line 9182 "configure"
9182 #include "confdefs.h"
9183 /* Override any gcc2 internal prototype to avoid an error.  */
9184 /* We use char because int might match the return type of a gcc2
9185     builtin and then its argument prototype would still apply.  */
9186 char dbopen();
9187
9188 int main() {
9189 dbopen()
9190 ; return 0; }
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9193   rm -rf conftest*
9194   eval "ac_cv_lib_$ac_lib_var=yes"
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   eval "ac_cv_lib_$ac_lib_var=no"
9200 fi
9201 rm -f conftest*
9202 LIBS="$ac_save_LIBS"
9203
9204 fi
9205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9206   echo "$ac_t""yes" 1>&6
9207   ol_cv_lib_db=-ldb1
9208 else
9209   echo "$ac_t""no" 1>&6
9210
9211                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9212 echo "configure:9213: checking for dbopen in -ldb" >&5
9213 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
9214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9215   echo $ac_n "(cached) $ac_c" 1>&6
9216 else
9217   ac_save_LIBS="$LIBS"
9218 LIBS="-ldb  $LIBS"
9219 cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222 /* Override any gcc2 internal prototype to avoid an error.  */
9223 /* We use char because int might match the return type of a gcc2
9224     builtin and then its argument prototype would still apply.  */
9225 char dbopen();
9226
9227 int main() {
9228 dbopen()
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9232   rm -rf conftest*
9233   eval "ac_cv_lib_$ac_lib_var=yes"
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_lib_$ac_lib_var=no"
9239 fi
9240 rm -f conftest*
9241 LIBS="$ac_save_LIBS"
9242
9243 fi
9244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9245   echo "$ac_t""yes" 1>&6
9246   ol_cv_lib_db=-ldb
9247 else
9248   echo "$ac_t""no" 1>&6
9249 ol_cv_lib_db=no
9250 fi
9251
9252                 
9253 fi
9254
9255         
9256 fi
9257
9258         LIBS="$ol_LIBS"
9259
9260 fi
9261
9262 echo "$ac_t""$ol_cv_lib_db" 1>&6
9263
9264
9265 for ac_hdr in db_185.h
9266 do
9267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9269 echo "configure:9270: checking for $ac_hdr" >&5
9270 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9271   echo $ac_n "(cached) $ac_c" 1>&6
9272 else
9273   cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276 #include <$ac_hdr>
9277 EOF
9278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9279 { (eval echo configure:9280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9281 if test -z "$ac_err"; then
9282   rm -rf conftest*
9283   eval "ac_cv_header_$ac_safe=yes"
9284 else
9285   echo "$ac_err" >&5
9286   echo "configure: failed program was:" >&5
9287   cat conftest.$ac_ext >&5
9288   rm -rf conftest*
9289   eval "ac_cv_header_$ac_safe=no"
9290 fi
9291 rm -f conftest*
9292 fi
9293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9294   echo "$ac_t""yes" 1>&6
9295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9296   cat >> confdefs.h <<EOF
9297 #define $ac_tr_hdr 1
9298 EOF
9299  
9300 else
9301   echo "$ac_t""no" 1>&6
9302 fi
9303 done
9304
9305 if test "$ol_cv_header_db2" = yes ; then
9306         
9307         ol_cv_header_db=$ac_cv_header_db_185_h
9308 else
9309         ol_cv_header_db=$ac_cv_header_db_h
9310 fi
9311
9312
9313  
9314  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9315 echo "configure:9316: checking for Berkeley DB" >&5
9316 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   
9320         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9321                 ol_cv_berkeley_db=no
9322         else
9323                 ol_cv_berkeley_db=yes
9324         fi
9325
9326 fi
9327
9328 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9329  if test $ol_cv_berkeley_db = yes ; then
9330         cat >> confdefs.h <<\EOF
9331 #define HAVE_BERKELEY_DB 1
9332 EOF
9333
9334  fi
9335
9336
9337         if test $ol_cv_berkeley_db = yes ; then
9338                 ol_link_ldbm=db
9339                 ol_with_ldbm_api=db
9340
9341                 if test $ol_with_ldbm_type = hash ; then
9342                         cat >> confdefs.h <<\EOF
9343 #define LDBM_USE_DBHASH 1
9344 EOF
9345
9346                 else
9347                         cat >> confdefs.h <<\EOF
9348 #define LDBM_USE_DBBTREE 1
9349 EOF
9350
9351                 fi
9352
9353                                                 if test $ol_cv_lib_db != yes ; then
9354                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9355                 fi
9356         fi
9357 fi
9358
9359 if test $ol_with_ldbm_api = manual ; then
9360                 ol_link_ldbm=yes
9361
9362         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9363
9364         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9365 do
9366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9367 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9368 echo "configure:9369: checking for $ac_hdr" >&5
9369 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 #include <$ac_hdr>
9376 EOF
9377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9378 { (eval echo configure:9379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9380 if test -z "$ac_err"; then
9381   rm -rf conftest*
9382   eval "ac_cv_header_$ac_safe=yes"
9383 else
9384   echo "$ac_err" >&5
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   eval "ac_cv_header_$ac_safe=no"
9389 fi
9390 rm -f conftest*
9391 fi
9392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9393   echo "$ac_t""yes" 1>&6
9394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9395   cat >> confdefs.h <<EOF
9396 #define $ac_tr_hdr 1
9397 EOF
9398  
9399 else
9400   echo "$ac_t""no" 1>&6
9401 fi
9402 done
9403
9404 fi
9405
9406 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9407         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9408         ol_with_ldbm_api=none
9409 fi
9410
9411 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9412         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9413 echo "configure:9414: checking for MDBM library" >&5
9414 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
9415   echo $ac_n "(cached) $ac_c" 1>&6
9416 else
9417         ol_LIBS="$LIBS"
9418         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9419 echo "configure:9420: checking for mdbm_set_chain" >&5
9420 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
9421   echo $ac_n "(cached) $ac_c" 1>&6
9422 else
9423   cat > conftest.$ac_ext <<EOF
9424 #line 9425 "configure"
9425 #include "confdefs.h"
9426 /* System header to define __stub macros and hopefully few prototypes,
9427     which can conflict with char mdbm_set_chain(); below.  */
9428 #include <assert.h>
9429 /* Override any gcc2 internal prototype to avoid an error.  */
9430 /* We use char because int might match the return type of a gcc2
9431     builtin and then its argument prototype would still apply.  */
9432 char mdbm_set_chain();
9433 char (*f)();
9434
9435 int main() {
9436
9437 /* The GNU C library defines this for functions which it implements
9438     to always fail with ENOSYS.  Some functions are actually named
9439     something starting with __ and the normal name is an alias.  */
9440 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9441 choke me
9442 #else
9443 f = mdbm_set_chain;
9444 #endif
9445
9446 ; return 0; }
9447 EOF
9448 if { (eval echo configure:9449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9449   rm -rf conftest*
9450   eval "ac_cv_func_mdbm_set_chain=yes"
9451 else
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -rf conftest*
9455   eval "ac_cv_func_mdbm_set_chain=no"
9456 fi
9457 rm -f conftest*
9458 fi
9459
9460 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9461   echo "$ac_t""yes" 1>&6
9462   ol_cv_lib_mdbm=yes
9463 else
9464   echo "$ac_t""no" 1>&6
9465
9466                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9467 echo "configure:9468: checking for mdbm_set_chain in -lmdbm" >&5
9468 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
9469 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9470   echo $ac_n "(cached) $ac_c" 1>&6
9471 else
9472   ac_save_LIBS="$LIBS"
9473 LIBS="-lmdbm  $LIBS"
9474 cat > conftest.$ac_ext <<EOF
9475 #line 9476 "configure"
9476 #include "confdefs.h"
9477 /* Override any gcc2 internal prototype to avoid an error.  */
9478 /* We use char because int might match the return type of a gcc2
9479     builtin and then its argument prototype would still apply.  */
9480 char mdbm_set_chain();
9481
9482 int main() {
9483 mdbm_set_chain()
9484 ; return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9487   rm -rf conftest*
9488   eval "ac_cv_lib_$ac_lib_var=yes"
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -rf conftest*
9493   eval "ac_cv_lib_$ac_lib_var=no"
9494 fi
9495 rm -f conftest*
9496 LIBS="$ac_save_LIBS"
9497
9498 fi
9499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9500   echo "$ac_t""yes" 1>&6
9501   ol_cv_lib_mdbm=-lmdbm
9502 else
9503   echo "$ac_t""no" 1>&6
9504 ol_cv_lib_mdbm=no
9505 fi
9506
9507         
9508 fi
9509
9510         LIBS="$ol_LIBS"
9511
9512 fi
9513
9514 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9515
9516
9517  for ac_hdr in mdbm.h
9518 do
9519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9521 echo "configure:9522: checking for $ac_hdr" >&5
9522 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9523   echo $ac_n "(cached) $ac_c" 1>&6
9524 else
9525   cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 #include <$ac_hdr>
9529 EOF
9530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9531 { (eval echo configure:9532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9533 if test -z "$ac_err"; then
9534   rm -rf conftest*
9535   eval "ac_cv_header_$ac_safe=yes"
9536 else
9537   echo "$ac_err" >&5
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   eval "ac_cv_header_$ac_safe=no"
9542 fi
9543 rm -f conftest*
9544 fi
9545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9546   echo "$ac_t""yes" 1>&6
9547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9548   cat >> confdefs.h <<EOF
9549 #define $ac_tr_hdr 1
9550 EOF
9551  
9552 else
9553   echo "$ac_t""no" 1>&6
9554 fi
9555 done
9556
9557  echo $ac_n "checking for db""... $ac_c" 1>&6
9558 echo "configure:9559: checking for db" >&5
9559 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562   
9563         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9564                 ol_cv_mdbm=no
9565         else
9566                 ol_cv_mdbm=yes
9567         fi
9568
9569 fi
9570
9571 echo "$ac_t""$ol_cv_mdbm" 1>&6
9572  if test $ol_cv_mdbm = yes ; then
9573         cat >> confdefs.h <<\EOF
9574 #define HAVE_MDBM 1
9575 EOF
9576
9577  fi
9578
9579
9580         if test $ol_cv_mdbm = yes ; then
9581                 ol_link_ldbm=mdbm
9582                 ol_with_ldbm_api=mdbm
9583                 if test $ol_cv_lib_mdbm != yes ; then
9584                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9585                 fi
9586         fi
9587 fi
9588
9589 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9590         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9591 echo "configure:9592: checking for GDBM library" >&5
9592 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9593   echo $ac_n "(cached) $ac_c" 1>&6
9594 else
9595         ol_LIBS="$LIBS"
9596         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9597 echo "configure:9598: checking for gdbm_open" >&5
9598 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9599   echo $ac_n "(cached) $ac_c" 1>&6
9600 else
9601   cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 /* System header to define __stub macros and hopefully few prototypes,
9605     which can conflict with char gdbm_open(); below.  */
9606 #include <assert.h>
9607 /* Override any gcc2 internal prototype to avoid an error.  */
9608 /* We use char because int might match the return type of a gcc2
9609     builtin and then its argument prototype would still apply.  */
9610 char gdbm_open();
9611 char (*f)();
9612
9613 int main() {
9614
9615 /* The GNU C library defines this for functions which it implements
9616     to always fail with ENOSYS.  Some functions are actually named
9617     something starting with __ and the normal name is an alias.  */
9618 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9619 choke me
9620 #else
9621 f = gdbm_open;
9622 #endif
9623
9624 ; return 0; }
9625 EOF
9626 if { (eval echo configure:9627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9627   rm -rf conftest*
9628   eval "ac_cv_func_gdbm_open=yes"
9629 else
9630   echo "configure: failed program was:" >&5
9631   cat conftest.$ac_ext >&5
9632   rm -rf conftest*
9633   eval "ac_cv_func_gdbm_open=no"
9634 fi
9635 rm -f conftest*
9636 fi
9637
9638 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9639   echo "$ac_t""yes" 1>&6
9640   ol_cv_lib_gdbm=yes
9641 else
9642   echo "$ac_t""no" 1>&6
9643
9644                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9645 echo "configure:9646: checking for gdbm_open in -lgdbm" >&5
9646 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   ac_save_LIBS="$LIBS"
9651 LIBS="-lgdbm  $LIBS"
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 /* Override any gcc2 internal prototype to avoid an error.  */
9656 /* We use char because int might match the return type of a gcc2
9657     builtin and then its argument prototype would still apply.  */
9658 char gdbm_open();
9659
9660 int main() {
9661 gdbm_open()
9662 ; return 0; }
9663 EOF
9664 if { (eval echo configure:9665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9665   rm -rf conftest*
9666   eval "ac_cv_lib_$ac_lib_var=yes"
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670   rm -rf conftest*
9671   eval "ac_cv_lib_$ac_lib_var=no"
9672 fi
9673 rm -f conftest*
9674 LIBS="$ac_save_LIBS"
9675
9676 fi
9677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9678   echo "$ac_t""yes" 1>&6
9679   ol_cv_lib_gdbm=-lgdbm
9680 else
9681   echo "$ac_t""no" 1>&6
9682 ol_cv_lib_gdbm=no
9683 fi
9684
9685         
9686 fi
9687
9688         LIBS="$ol_LIBS"
9689
9690 fi
9691
9692 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9693
9694
9695  for ac_hdr in gdbm.h
9696 do
9697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9699 echo "configure:9700: checking for $ac_hdr" >&5
9700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   cat > conftest.$ac_ext <<EOF
9704 #line 9705 "configure"
9705 #include "confdefs.h"
9706 #include <$ac_hdr>
9707 EOF
9708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9709 { (eval echo configure:9710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9711 if test -z "$ac_err"; then
9712   rm -rf conftest*
9713   eval "ac_cv_header_$ac_safe=yes"
9714 else
9715   echo "$ac_err" >&5
9716   echo "configure: failed program was:" >&5
9717   cat conftest.$ac_ext >&5
9718   rm -rf conftest*
9719   eval "ac_cv_header_$ac_safe=no"
9720 fi
9721 rm -f conftest*
9722 fi
9723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9724   echo "$ac_t""yes" 1>&6
9725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9726   cat >> confdefs.h <<EOF
9727 #define $ac_tr_hdr 1
9728 EOF
9729  
9730 else
9731   echo "$ac_t""no" 1>&6
9732 fi
9733 done
9734
9735  echo $ac_n "checking for db""... $ac_c" 1>&6
9736 echo "configure:9737: checking for db" >&5
9737 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9738   echo $ac_n "(cached) $ac_c" 1>&6
9739 else
9740   
9741         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9742                 ol_cv_gdbm=no
9743         else
9744                 ol_cv_gdbm=yes
9745         fi
9746
9747 fi
9748
9749 echo "$ac_t""$ol_cv_gdbm" 1>&6
9750  if test $ol_cv_gdbm = yes ; then
9751         cat >> confdefs.h <<\EOF
9752 #define HAVE_GDBM 1
9753 EOF
9754
9755  fi
9756
9757
9758         if test $ol_cv_gdbm = yes ; then
9759                 ol_link_ldbm=gdbm
9760                 ol_with_ldbm_api=gdbm
9761
9762                 if test $ol_cv_lib_gdbm != yes ; then
9763                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9764                 fi
9765         fi
9766 fi
9767
9768 if test $ol_with_ldbm_api = auto ; then
9769         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9770 elif test $ol_with_ldbm_api = ndbm ; then
9771         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9772 echo "configure:9773: checking for NDBM library" >&5
9773 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9774   echo $ac_n "(cached) $ac_c" 1>&6
9775 else
9776         ol_LIBS="$LIBS"
9777         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9778 echo "configure:9779: checking for dbm_open" >&5
9779 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9780   echo $ac_n "(cached) $ac_c" 1>&6
9781 else
9782   cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 /* System header to define __stub macros and hopefully few prototypes,
9786     which can conflict with char dbm_open(); below.  */
9787 #include <assert.h>
9788 /* Override any gcc2 internal prototype to avoid an error.  */
9789 /* We use char because int might match the return type of a gcc2
9790     builtin and then its argument prototype would still apply.  */
9791 char dbm_open();
9792 char (*f)();
9793
9794 int main() {
9795
9796 /* The GNU C library defines this for functions which it implements
9797     to always fail with ENOSYS.  Some functions are actually named
9798     something starting with __ and the normal name is an alias.  */
9799 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9800 choke me
9801 #else
9802 f = dbm_open;
9803 #endif
9804
9805 ; return 0; }
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9808   rm -rf conftest*
9809   eval "ac_cv_func_dbm_open=yes"
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813   rm -rf conftest*
9814   eval "ac_cv_func_dbm_open=no"
9815 fi
9816 rm -f conftest*
9817 fi
9818
9819 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9820   echo "$ac_t""yes" 1>&6
9821   ol_cv_lib_ndbm=yes
9822 else
9823   echo "$ac_t""no" 1>&6
9824
9825                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9826 echo "configure:9827: checking for dbm_open in -lndbm" >&5
9827 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9829   echo $ac_n "(cached) $ac_c" 1>&6
9830 else
9831   ac_save_LIBS="$LIBS"
9832 LIBS="-lndbm  $LIBS"
9833 cat > conftest.$ac_ext <<EOF
9834 #line 9835 "configure"
9835 #include "confdefs.h"
9836 /* Override any gcc2 internal prototype to avoid an error.  */
9837 /* We use char because int might match the return type of a gcc2
9838     builtin and then its argument prototype would still apply.  */
9839 char dbm_open();
9840
9841 int main() {
9842 dbm_open()
9843 ; return 0; }
9844 EOF
9845 if { (eval echo configure:9846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9846   rm -rf conftest*
9847   eval "ac_cv_lib_$ac_lib_var=yes"
9848 else
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -rf conftest*
9852   eval "ac_cv_lib_$ac_lib_var=no"
9853 fi
9854 rm -f conftest*
9855 LIBS="$ac_save_LIBS"
9856
9857 fi
9858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9859   echo "$ac_t""yes" 1>&6
9860   ol_cv_lib_ndbm=-lndbm
9861 else
9862   echo "$ac_t""no" 1>&6
9863
9864                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9865 echo "configure:9866: checking for dbm_open in -ldbm" >&5
9866 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9867 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9868   echo $ac_n "(cached) $ac_c" 1>&6
9869 else
9870   ac_save_LIBS="$LIBS"
9871 LIBS="-ldbm  $LIBS"
9872 cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 /* We use char because int might match the return type of a gcc2
9877     builtin and then its argument prototype would still apply.  */
9878 char dbm_open();
9879
9880 int main() {
9881 dbm_open()
9882 ; return 0; }
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9885   rm -rf conftest*
9886   eval "ac_cv_lib_$ac_lib_var=yes"
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890   rm -rf conftest*
9891   eval "ac_cv_lib_$ac_lib_var=no"
9892 fi
9893 rm -f conftest*
9894 LIBS="$ac_save_LIBS"
9895
9896 fi
9897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9898   echo "$ac_t""yes" 1>&6
9899   ol_cv_lib_ndbm=-ldbm
9900 else
9901   echo "$ac_t""no" 1>&6
9902 ol_cv_lib_ndbm=no
9903 fi
9904                 
9905 fi
9906
9907         
9908 fi
9909
9910         LIBS="$ol_LIBS"
9911
9912 fi
9913
9914 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9915
9916
9917  for ac_hdr in ndbm.h
9918 do
9919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9921 echo "configure:9922: checking for $ac_hdr" >&5
9922 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9923   echo $ac_n "(cached) $ac_c" 1>&6
9924 else
9925   cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 #include <$ac_hdr>
9929 EOF
9930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9931 { (eval echo configure:9932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9933 if test -z "$ac_err"; then
9934   rm -rf conftest*
9935   eval "ac_cv_header_$ac_safe=yes"
9936 else
9937   echo "$ac_err" >&5
9938   echo "configure: failed program was:" >&5
9939   cat conftest.$ac_ext >&5
9940   rm -rf conftest*
9941   eval "ac_cv_header_$ac_safe=no"
9942 fi
9943 rm -f conftest*
9944 fi
9945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9946   echo "$ac_t""yes" 1>&6
9947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9948   cat >> confdefs.h <<EOF
9949 #define $ac_tr_hdr 1
9950 EOF
9951  
9952 else
9953   echo "$ac_t""no" 1>&6
9954 fi
9955 done
9956
9957  echo $ac_n "checking for db""... $ac_c" 1>&6
9958 echo "configure:9959: checking for db" >&5
9959 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9960   echo $ac_n "(cached) $ac_c" 1>&6
9961 else
9962   
9963         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9964                 ol_cv_ndbm=no
9965         else
9966                 ol_cv_ndbm=yes
9967         fi
9968
9969 fi
9970
9971 echo "$ac_t""$ol_cv_ndbm" 1>&6
9972  if test $ol_cv_ndbm = yes ; then
9973         cat >> confdefs.h <<\EOF
9974 #define HAVE_NDBM 1
9975 EOF
9976
9977  fi
9978
9979
9980         if test $ol_cv_ndbm = yes ; then
9981                 ol_link_ldbm=ndbm
9982                 ol_with_ldbm_api=ndbm
9983
9984                 if test $ol_cv_lib_ndbm != yes ; then
9985                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9986                 fi
9987         fi
9988 fi
9989
9990 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9991         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9992         if test $ol_enable_ldbm = yes ; then
9993                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9994         fi
9995
9996         echo "configure: warning: disabling LDBM" 1>&2
9997         ol_enable_ldbm=no
9998 fi
9999
10000 if test $ol_enable_wrappers != no ; then
10001         for ac_hdr in tcpd.h
10002 do
10003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10005 echo "configure:10006: checking for $ac_hdr" >&5
10006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   cat > conftest.$ac_ext <<EOF
10010 #line 10011 "configure"
10011 #include "confdefs.h"
10012 #include <$ac_hdr>
10013 EOF
10014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10015 { (eval echo configure:10016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10017 if test -z "$ac_err"; then
10018   rm -rf conftest*
10019   eval "ac_cv_header_$ac_safe=yes"
10020 else
10021   echo "$ac_err" >&5
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   eval "ac_cv_header_$ac_safe=no"
10026 fi
10027 rm -f conftest*
10028 fi
10029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10030   echo "$ac_t""yes" 1>&6
10031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10032   cat >> confdefs.h <<EOF
10033 #define $ac_tr_hdr 1
10034 EOF
10035  
10036 else
10037   echo "$ac_t""no" 1>&6
10038 fi
10039 done
10040
10041
10042         if test $ac_cv_header_tcpd_h != yes ; then
10043                 have_wrappers=no
10044         else
10045                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
10046 echo "configure:10047: checking for main in -lwrap" >&5
10047 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
10048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   ac_save_LIBS="$LIBS"
10052 LIBS="-lwrap  $LIBS"
10053 cat > conftest.$ac_ext <<EOF
10054 #line 10055 "configure"
10055 #include "confdefs.h"
10056
10057 int main() {
10058 main()
10059 ; return 0; }
10060 EOF
10061 if { (eval echo configure:10062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10062   rm -rf conftest*
10063   eval "ac_cv_lib_$ac_lib_var=yes"
10064 else
10065   echo "configure: failed program was:" >&5
10066   cat conftest.$ac_ext >&5
10067   rm -rf conftest*
10068   eval "ac_cv_lib_$ac_lib_var=no"
10069 fi
10070 rm -f conftest*
10071 LIBS="$ac_save_LIBS"
10072
10073 fi
10074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10075   echo "$ac_t""yes" 1>&6
10076   have_wrappers=yes
10077 else
10078   echo "$ac_t""no" 1>&6
10079 have_wrappers=no
10080 fi
10081
10082         fi
10083
10084         if test $have_wrappers = yes ; then
10085                 cat >> confdefs.h <<\EOF
10086 #define HAVE_TCPD 1
10087 EOF
10088
10089                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
10090
10091                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
10092 echo "configure:10093: checking for main in -lnsl" >&5
10093 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
10094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   ac_save_LIBS="$LIBS"
10098 LIBS="-lnsl  $LIBS"
10099 cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102
10103 int main() {
10104 main()
10105 ; return 0; }
10106 EOF
10107 if { (eval echo configure:10108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10108   rm -rf conftest*
10109   eval "ac_cv_lib_$ac_lib_var=yes"
10110 else
10111   echo "configure: failed program was:" >&5
10112   cat conftest.$ac_ext >&5
10113   rm -rf conftest*
10114   eval "ac_cv_lib_$ac_lib_var=no"
10115 fi
10116 rm -f conftest*
10117 LIBS="$ac_save_LIBS"
10118
10119 fi
10120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10121   echo "$ac_t""yes" 1>&6
10122     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10123     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10124   cat >> confdefs.h <<EOF
10125 #define $ac_tr_lib 1
10126 EOF
10127
10128   LIBS="-lnsl $LIBS"
10129
10130 else
10131   echo "$ac_t""no" 1>&6
10132 fi
10133
10134         else
10135                 echo "configure: warning: could not find -lwrap" 1>&2
10136                 if test $ol_enable_wrappers = yes ; then
10137                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
10138                 fi
10139
10140                 echo "configure: warning: disabling wrappers support" 1>&2
10141                 ol_enable_wrappers=no
10142         fi
10143 fi
10144
10145 if test $ol_enable_syslog != no ; then
10146         echo $ac_n "checking for openlog""... $ac_c" 1>&6
10147 echo "configure:10148: checking for openlog" >&5
10148 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 /* System header to define __stub macros and hopefully few prototypes,
10155     which can conflict with char openlog(); below.  */
10156 #include <assert.h>
10157 /* Override any gcc2 internal prototype to avoid an error.  */
10158 /* We use char because int might match the return type of a gcc2
10159     builtin and then its argument prototype would still apply.  */
10160 char openlog();
10161 char (*f)();
10162
10163 int main() {
10164
10165 /* The GNU C library defines this for functions which it implements
10166     to always fail with ENOSYS.  Some functions are actually named
10167     something starting with __ and the normal name is an alias.  */
10168 #if defined (__stub_openlog) || defined (__stub___openlog)
10169 choke me
10170 #else
10171 f = openlog;
10172 #endif
10173
10174 ; return 0; }
10175 EOF
10176 if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10177   rm -rf conftest*
10178   eval "ac_cv_func_openlog=yes"
10179 else
10180   echo "configure: failed program was:" >&5
10181   cat conftest.$ac_ext >&5
10182   rm -rf conftest*
10183   eval "ac_cv_func_openlog=no"
10184 fi
10185 rm -f conftest*
10186 fi
10187
10188 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190   :
10191 else
10192   echo "$ac_t""no" 1>&6
10193 fi
10194
10195         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
10196                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
10197         fi
10198         ol_enable_syslog=$ac_cv_func_openlog
10199 fi
10200
10201 if test $ol_enable_dmalloc != no ; then
10202         for ac_hdr in dmalloc.h
10203 do
10204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10206 echo "configure:10207: checking for $ac_hdr" >&5
10207 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10208   echo $ac_n "(cached) $ac_c" 1>&6
10209 else
10210   cat > conftest.$ac_ext <<EOF
10211 #line 10212 "configure"
10212 #include "confdefs.h"
10213 #include <$ac_hdr>
10214 EOF
10215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10216 { (eval echo configure:10217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10218 if test -z "$ac_err"; then
10219   rm -rf conftest*
10220   eval "ac_cv_header_$ac_safe=yes"
10221 else
10222   echo "$ac_err" >&5
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   eval "ac_cv_header_$ac_safe=no"
10227 fi
10228 rm -f conftest*
10229 fi
10230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10231   echo "$ac_t""yes" 1>&6
10232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10233   cat >> confdefs.h <<EOF
10234 #define $ac_tr_hdr 1
10235 EOF
10236  
10237 else
10238   echo "$ac_t""no" 1>&6
10239 fi
10240 done
10241
10242         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10243 echo "configure:10244: checking for dmalloc_shutdown in -ldmalloc" >&5
10244 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
10245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   ac_save_LIBS="$LIBS"
10249 LIBS="-ldmalloc  $LIBS"
10250 cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 /* Override any gcc2 internal prototype to avoid an error.  */
10254 /* We use char because int might match the return type of a gcc2
10255     builtin and then its argument prototype would still apply.  */
10256 char dmalloc_shutdown();
10257
10258 int main() {
10259 dmalloc_shutdown()
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10263   rm -rf conftest*
10264   eval "ac_cv_lib_$ac_lib_var=yes"
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   eval "ac_cv_lib_$ac_lib_var=no"
10270 fi
10271 rm -f conftest*
10272 LIBS="$ac_save_LIBS"
10273
10274 fi
10275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10276   echo "$ac_t""yes" 1>&6
10277     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10278     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10279   cat >> confdefs.h <<EOF
10280 #define $ac_tr_lib 1
10281 EOF
10282
10283   LIBS="-ldmalloc $LIBS"
10284
10285 else
10286   echo "$ac_t""no" 1>&6
10287 fi
10288
10289 fi
10290
10291 if test $ol_enable_tcl != no ; then
10292         for ac_hdr in tcl.h
10293 do
10294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10296 echo "configure:10297: checking for $ac_hdr" >&5
10297 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   cat > conftest.$ac_ext <<EOF
10301 #line 10302 "configure"
10302 #include "confdefs.h"
10303 #include <$ac_hdr>
10304 EOF
10305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10306 { (eval echo configure:10307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10308 if test -z "$ac_err"; then
10309   rm -rf conftest*
10310   eval "ac_cv_header_$ac_safe=yes"
10311 else
10312   echo "$ac_err" >&5
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -rf conftest*
10316   eval "ac_cv_header_$ac_safe=no"
10317 fi
10318 rm -f conftest*
10319 fi
10320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10321   echo "$ac_t""yes" 1>&6
10322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10323   cat >> confdefs.h <<EOF
10324 #define $ac_tr_hdr 1
10325 EOF
10326  
10327 else
10328   echo "$ac_t""no" 1>&6
10329 fi
10330 done
10331
10332
10333         if test $ac_cv_header_tcl_h != yes ; then
10334                 have_tcl=no
10335         else
10336                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10337 echo "configure:10338: checking for main in -ltcl" >&5
10338 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
10339 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10340   echo $ac_n "(cached) $ac_c" 1>&6
10341 else
10342   ac_save_LIBS="$LIBS"
10343 LIBS="-ltcl  $LIBS"
10344 cat > conftest.$ac_ext <<EOF
10345 #line 10346 "configure"
10346 #include "confdefs.h"
10347
10348 int main() {
10349 main()
10350 ; return 0; }
10351 EOF
10352 if { (eval echo configure:10353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10353   rm -rf conftest*
10354   eval "ac_cv_lib_$ac_lib_var=yes"
10355 else
10356   echo "configure: failed program was:" >&5
10357   cat conftest.$ac_ext >&5
10358   rm -rf conftest*
10359   eval "ac_cv_lib_$ac_lib_var=no"
10360 fi
10361 rm -f conftest*
10362 LIBS="$ac_save_LIBS"
10363
10364 fi
10365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10366   echo "$ac_t""yes" 1>&6
10367   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10368 else
10369   echo "$ac_t""no" 1>&6
10370 have_tcl=no
10371 fi
10372
10373
10374                 if test $have_tcl != yes; then
10375                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10376 echo "configure:10377: checking for main in -ltcl7.6" >&5
10377 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
10378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   ac_save_LIBS="$LIBS"
10382 LIBS="-ltcl7.6  $LIBS"
10383 cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386
10387 int main() {
10388 main()
10389 ; return 0; }
10390 EOF
10391 if { (eval echo configure:10392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10392   rm -rf conftest*
10393   eval "ac_cv_lib_$ac_lib_var=yes"
10394 else
10395   echo "configure: failed program was:" >&5
10396   cat conftest.$ac_ext >&5
10397   rm -rf conftest*
10398   eval "ac_cv_lib_$ac_lib_var=no"
10399 fi
10400 rm -f conftest*
10401 LIBS="$ac_save_LIBS"
10402
10403 fi
10404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10405   echo "$ac_t""yes" 1>&6
10406   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10407 else
10408   echo "$ac_t""no" 1>&6
10409 have_tcl=no
10410 fi
10411
10412                 fi
10413
10414                 if test $have_tcl != yes; then
10415                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10416 echo "configure:10417: checking for main in -ltcl8.0" >&5
10417 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
10418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10419   echo $ac_n "(cached) $ac_c" 1>&6
10420 else
10421   ac_save_LIBS="$LIBS"
10422 LIBS="-ltcl8.0  $LIBS"
10423 cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426
10427 int main() {
10428 main()
10429 ; return 0; }
10430 EOF
10431 if { (eval echo configure:10432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10432   rm -rf conftest*
10433   eval "ac_cv_lib_$ac_lib_var=yes"
10434 else
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_lib_$ac_lib_var=no"
10439 fi
10440 rm -f conftest*
10441 LIBS="$ac_save_LIBS"
10442
10443 fi
10444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10447 else
10448   echo "$ac_t""no" 1>&6
10449 have_tcl=no
10450 fi
10451
10452                 fi
10453         fi
10454
10455         if test $have_tcl != yes ; then
10456                 echo "configure: warning: could not find -ltcl" 1>&2
10457                 if test $ol_enable_tcl = yes ; then
10458                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10459                 fi
10460
10461                 ol_enable_tcl=no
10462         fi
10463 fi
10464
10465 # ud needs termcap (should insert check here)
10466 ol_link_termcap=no
10467 for ac_hdr in termcap.h ncurses.h
10468 do
10469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10471 echo "configure:10472: checking for $ac_hdr" >&5
10472 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   cat > conftest.$ac_ext <<EOF
10476 #line 10477 "configure"
10477 #include "confdefs.h"
10478 #include <$ac_hdr>
10479 EOF
10480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10481 { (eval echo configure:10482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10483 if test -z "$ac_err"; then
10484   rm -rf conftest*
10485   eval "ac_cv_header_$ac_safe=yes"
10486 else
10487   echo "$ac_err" >&5
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -rf conftest*
10491   eval "ac_cv_header_$ac_safe=no"
10492 fi
10493 rm -f conftest*
10494 fi
10495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10496   echo "$ac_t""yes" 1>&6
10497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10498   cat >> confdefs.h <<EOF
10499 #define $ac_tr_hdr 1
10500 EOF
10501  
10502 else
10503   echo "$ac_t""no" 1>&6
10504 fi
10505 done
10506
10507
10508 if test $ol_link_termcap = no ; then
10509         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10510 echo "configure:10511: checking for tputs in -ltermcap" >&5
10511 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10513   echo $ac_n "(cached) $ac_c" 1>&6
10514 else
10515   ac_save_LIBS="$LIBS"
10516 LIBS="-ltermcap  $LIBS"
10517 cat > conftest.$ac_ext <<EOF
10518 #line 10519 "configure"
10519 #include "confdefs.h"
10520 /* Override any gcc2 internal prototype to avoid an error.  */
10521 /* We use char because int might match the return type of a gcc2
10522     builtin and then its argument prototype would still apply.  */
10523 char tputs();
10524
10525 int main() {
10526 tputs()
10527 ; return 0; }
10528 EOF
10529 if { (eval echo configure:10530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10530   rm -rf conftest*
10531   eval "ac_cv_lib_$ac_lib_var=yes"
10532 else
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -rf conftest*
10536   eval "ac_cv_lib_$ac_lib_var=no"
10537 fi
10538 rm -f conftest*
10539 LIBS="$ac_save_LIBS"
10540
10541 fi
10542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10543   echo "$ac_t""yes" 1>&6
10544   have_termcap=yes
10545 else
10546   echo "$ac_t""no" 1>&6
10547 have_termcap=no
10548 fi
10549
10550         if test $have_termcap = yes ; then
10551                 cat >> confdefs.h <<\EOF
10552 #define HAVE_TERMCAP 1
10553 EOF
10554
10555                 ol_link_termcap=yes
10556                 TERMCAP_LIBS=-ltermcap
10557         fi
10558 fi
10559
10560 if test $ol_link_termcap = no ; then
10561         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10562 echo "configure:10563: checking for initscr in -lncurses" >&5
10563 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10565   echo $ac_n "(cached) $ac_c" 1>&6
10566 else
10567   ac_save_LIBS="$LIBS"
10568 LIBS="-lncurses  $LIBS"
10569 cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572 /* Override any gcc2 internal prototype to avoid an error.  */
10573 /* We use char because int might match the return type of a gcc2
10574     builtin and then its argument prototype would still apply.  */
10575 char initscr();
10576
10577 int main() {
10578 initscr()
10579 ; return 0; }
10580 EOF
10581 if { (eval echo configure:10582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10582   rm -rf conftest*
10583   eval "ac_cv_lib_$ac_lib_var=yes"
10584 else
10585   echo "configure: failed program was:" >&5
10586   cat conftest.$ac_ext >&5
10587   rm -rf conftest*
10588   eval "ac_cv_lib_$ac_lib_var=no"
10589 fi
10590 rm -f conftest*
10591 LIBS="$ac_save_LIBS"
10592
10593 fi
10594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596   have_ncurses=yes
10597 else
10598   echo "$ac_t""no" 1>&6
10599 have_ncurses=no
10600 fi
10601
10602         if test $have_ncurses = yes ; then
10603                 cat >> confdefs.h <<\EOF
10604 #define HAVE_NCURSES 1
10605 EOF
10606
10607                 ol_link_termcap=yes
10608                 TERMCAP_LIBS=-lncurses
10609         fi
10610 fi
10611
10612 if test $ol_link_termcap = no ; then
10613         cat >> confdefs.h <<\EOF
10614 #define NO_TERMCAP 1
10615 EOF
10616
10617         TERMCAP_LIBS=
10618 fi
10619
10620 ol_link_sasl=no
10621 if test $ol_with_cyrus_sasl != no ; then
10622         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10623 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10624 echo "configure:10625: checking for sasl.h" >&5
10625 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 #include <sasl.h>
10632 EOF
10633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10634 { (eval echo configure:10635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10636 if test -z "$ac_err"; then
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=yes"
10639 else
10640   echo "$ac_err" >&5
10641   echo "configure: failed program was:" >&5
10642   cat conftest.$ac_ext >&5
10643   rm -rf conftest*
10644   eval "ac_cv_header_$ac_safe=no"
10645 fi
10646 rm -f conftest*
10647 fi
10648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10649   echo "$ac_t""yes" 1>&6
10650   :
10651 else
10652   echo "$ac_t""no" 1>&6
10653 fi
10654
10655
10656         if test $ac_cv_header_sasl_h = yes ; then
10657                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10658 echo "configure:10659: checking for sasl_client_init in -lsasl" >&5
10659 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
10660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10661   echo $ac_n "(cached) $ac_c" 1>&6
10662 else
10663   ac_save_LIBS="$LIBS"
10664 LIBS="-lsasl  $LIBS"
10665 cat > conftest.$ac_ext <<EOF
10666 #line 10667 "configure"
10667 #include "confdefs.h"
10668 /* Override any gcc2 internal prototype to avoid an error.  */
10669 /* We use char because int might match the return type of a gcc2
10670     builtin and then its argument prototype would still apply.  */
10671 char sasl_client_init();
10672
10673 int main() {
10674 sasl_client_init()
10675 ; return 0; }
10676 EOF
10677 if { (eval echo configure:10678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10678   rm -rf conftest*
10679   eval "ac_cv_lib_$ac_lib_var=yes"
10680 else
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_lib_$ac_lib_var=no"
10685 fi
10686 rm -f conftest*
10687 LIBS="$ac_save_LIBS"
10688
10689 fi
10690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10691   echo "$ac_t""yes" 1>&6
10692   have_cyrus_sasl=yes
10693 else
10694   echo "$ac_t""no" 1>&6
10695 have_cyrus_sasl=no
10696 fi
10697
10698
10699                 if test $have_cyrus_sasl != no ; then
10700                         SASL_LIBS="-lsasl"
10701                         cat >> confdefs.h <<\EOF
10702 #define HAVE_CYRUS_SASL 1
10703 EOF
10704
10705                         ol_link_sasl=yes
10706                 fi
10707         fi
10708
10709         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10710                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10711         fi
10712 fi
10713
10714 ol_link_fetch=no
10715 if test $ol_with_fetch != no ; then
10716         ol=$LIBS
10717 LIBS="-lfetch -lcom_err $LIBS"
10718 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10719 echo "configure:10720: checking fetch(3) library" >&5
10720 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
10721   echo $ac_n "(cached) $ac_c" 1>&6
10722 else
10723   
10724         cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727
10728 #include <sys/param.h>
10729 #include <stdio.h>
10730 #include <fetch.h>
10731 int main() {
10732 struct url *u = fetchParseURL("file:///"); 
10733 ; return 0; }
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10736   rm -rf conftest*
10737   ol_cv_lib_fetch=yes
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   ol_cv_lib_fetch=no
10743 fi
10744 rm -f conftest*
10745 fi
10746
10747 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10748 LIBS=$ol_LIBS
10749 if test $ol_cv_lib_fetch != no ; then
10750         ol_link_fetch="-lfetch -lcom_err"
10751         cat >> confdefs.h <<\EOF
10752 #define HAVE_FETCH 1
10753 EOF
10754
10755 fi
10756
10757
10758         if test $ol_cv_lib_fetch != no ; then
10759                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10760                 ol_link_fetch=freebsd
10761
10762         elif test $ol_with_fetch != auto ; then
10763                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10764         fi 
10765 fi
10766
10767 ol_link_readline=no
10768 if test $ol_with_readline != no ; then
10769         for ac_hdr in readline/readline.h readline/history.h
10770 do
10771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10773 echo "configure:10774: checking for $ac_hdr" >&5
10774 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10775   echo $ac_n "(cached) $ac_c" 1>&6
10776 else
10777   cat > conftest.$ac_ext <<EOF
10778 #line 10779 "configure"
10779 #include "confdefs.h"
10780 #include <$ac_hdr>
10781 EOF
10782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10783 { (eval echo configure:10784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10785 if test -z "$ac_err"; then
10786   rm -rf conftest*
10787   eval "ac_cv_header_$ac_safe=yes"
10788 else
10789   echo "$ac_err" >&5
10790   echo "configure: failed program was:" >&5
10791   cat conftest.$ac_ext >&5
10792   rm -rf conftest*
10793   eval "ac_cv_header_$ac_safe=no"
10794 fi
10795 rm -f conftest*
10796 fi
10797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10798   echo "$ac_t""yes" 1>&6
10799     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10800   cat >> confdefs.h <<EOF
10801 #define $ac_tr_hdr 1
10802 EOF
10803  
10804 else
10805   echo "$ac_t""no" 1>&6
10806 fi
10807 done
10808
10809
10810         if test $ac_cv_header_readline_readline_h = yes ; then
10811                 save_LIBS="$LIBS"
10812                 LIBS="$TERMCAP_LIBS $LIBS"
10813                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10814 echo "configure:10815: checking for readline in -lreadline" >&5
10815 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10816 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   ac_save_LIBS="$LIBS"
10820 LIBS="-lreadline  $LIBS"
10821 cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 /* Override any gcc2 internal prototype to avoid an error.  */
10825 /* We use char because int might match the return type of a gcc2
10826     builtin and then its argument prototype would still apply.  */
10827 char readline();
10828
10829 int main() {
10830 readline()
10831 ; return 0; }
10832 EOF
10833 if { (eval echo configure:10834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10834   rm -rf conftest*
10835   eval "ac_cv_lib_$ac_lib_var=yes"
10836 else
10837   echo "configure: failed program was:" >&5
10838   cat conftest.$ac_ext >&5
10839   rm -rf conftest*
10840   eval "ac_cv_lib_$ac_lib_var=no"
10841 fi
10842 rm -f conftest*
10843 LIBS="$ac_save_LIBS"
10844
10845 fi
10846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10847   echo "$ac_t""yes" 1>&6
10848   have_readline=yes
10849 else
10850   echo "$ac_t""no" 1>&6
10851 have_readline=no
10852 fi
10853
10854                 LIBS="$save_LIBS"
10855                         
10856                 if test $have_readline = yes ; then
10857                         ol_with_readline=found
10858                         ol_link_readline=yes
10859
10860                         READLINE_LIBS="-lreadline"
10861                 fi
10862         fi
10863 fi
10864
10865 if test $ol_link_readline = yes ; then
10866         cat >> confdefs.h <<\EOF
10867 #define HAVE_READLINE 1
10868 EOF
10869
10870 fi
10871
10872
10873 # FreeBSD (and others) have crypt(3) in -lcrypt
10874 if test $ol_enable_crypt != no ; then
10875         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10876 echo "configure:10877: checking for crypt" >&5
10877 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 /* System header to define __stub macros and hopefully few prototypes,
10884     which can conflict with char crypt(); below.  */
10885 #include <assert.h>
10886 /* Override any gcc2 internal prototype to avoid an error.  */
10887 /* We use char because int might match the return type of a gcc2
10888     builtin and then its argument prototype would still apply.  */
10889 char crypt();
10890 char (*f)();
10891
10892 int main() {
10893
10894 /* The GNU C library defines this for functions which it implements
10895     to always fail with ENOSYS.  Some functions are actually named
10896     something starting with __ and the normal name is an alias.  */
10897 #if defined (__stub_crypt) || defined (__stub___crypt)
10898 choke me
10899 #else
10900 f = crypt;
10901 #endif
10902
10903 ; return 0; }
10904 EOF
10905 if { (eval echo configure:10906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10906   rm -rf conftest*
10907   eval "ac_cv_func_crypt=yes"
10908 else
10909   echo "configure: failed program was:" >&5
10910   cat conftest.$ac_ext >&5
10911   rm -rf conftest*
10912   eval "ac_cv_func_crypt=no"
10913 fi
10914 rm -f conftest*
10915 fi
10916
10917 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   have_crypt=yes
10920 else
10921   echo "$ac_t""no" 1>&6
10922
10923                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10924 echo "configure:10925: checking for crypt in -lcrypt" >&5
10925 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10926 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10927   echo $ac_n "(cached) $ac_c" 1>&6
10928 else
10929   ac_save_LIBS="$LIBS"
10930 LIBS="-lcrypt  $LIBS"
10931 cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 /* Override any gcc2 internal prototype to avoid an error.  */
10935 /* We use char because int might match the return type of a gcc2
10936     builtin and then its argument prototype would still apply.  */
10937 char crypt();
10938
10939 int main() {
10940 crypt()
10941 ; return 0; }
10942 EOF
10943 if { (eval echo configure:10944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10944   rm -rf conftest*
10945   eval "ac_cv_lib_$ac_lib_var=yes"
10946 else
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=no"
10951 fi
10952 rm -f conftest*
10953 LIBS="$ac_save_LIBS"
10954
10955 fi
10956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10957   echo "$ac_t""yes" 1>&6
10958   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10959                         have_crypt=yes
10960 else
10961   echo "$ac_t""no" 1>&6
10962 have_crypt=no
10963 fi
10964
10965 fi
10966
10967
10968         if test $have_crypt = yes ; then
10969                 cat >> confdefs.h <<\EOF
10970 #define HAVE_CRYPT 1
10971 EOF
10972
10973         else
10974                 echo "configure: warning: could not find crypt" 1>&2
10975                 if test $ol_enable_crypt = yes ; then
10976                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10977                 fi
10978
10979                 echo "configure: warning: disabling crypt support" 1>&2
10980                 ol_enable_crypt=no
10981         fi
10982 fi
10983
10984 # FreeBSD (and others) have setproctitle(3) in -lutil
10985 if test $ol_enable_proctitle != no ; then
10986         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10987 echo "configure:10988: checking for setproctitle" >&5
10988 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10989   echo $ac_n "(cached) $ac_c" 1>&6
10990 else
10991   cat > conftest.$ac_ext <<EOF
10992 #line 10993 "configure"
10993 #include "confdefs.h"
10994 /* System header to define __stub macros and hopefully few prototypes,
10995     which can conflict with char setproctitle(); below.  */
10996 #include <assert.h>
10997 /* Override any gcc2 internal prototype to avoid an error.  */
10998 /* We use char because int might match the return type of a gcc2
10999     builtin and then its argument prototype would still apply.  */
11000 char setproctitle();
11001 char (*f)();
11002
11003 int main() {
11004
11005 /* The GNU C library defines this for functions which it implements
11006     to always fail with ENOSYS.  Some functions are actually named
11007     something starting with __ and the normal name is an alias.  */
11008 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
11009 choke me
11010 #else
11011 f = setproctitle;
11012 #endif
11013
11014 ; return 0; }
11015 EOF
11016 if { (eval echo configure:11017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11017   rm -rf conftest*
11018   eval "ac_cv_func_setproctitle=yes"
11019 else
11020   echo "configure: failed program was:" >&5
11021   cat conftest.$ac_ext >&5
11022   rm -rf conftest*
11023   eval "ac_cv_func_setproctitle=no"
11024 fi
11025 rm -f conftest*
11026 fi
11027
11028 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
11029   echo "$ac_t""yes" 1>&6
11030   have_setproctitle=yes
11031 else
11032   echo "$ac_t""no" 1>&6
11033
11034                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
11035 echo "configure:11036: checking for setproctitle in -lutil" >&5
11036 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
11037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11038   echo $ac_n "(cached) $ac_c" 1>&6
11039 else
11040   ac_save_LIBS="$LIBS"
11041 LIBS="-lutil  $LIBS"
11042 cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045 /* Override any gcc2 internal prototype to avoid an error.  */
11046 /* We use char because int might match the return type of a gcc2
11047     builtin and then its argument prototype would still apply.  */
11048 char setproctitle();
11049
11050 int main() {
11051 setproctitle()
11052 ; return 0; }
11053 EOF
11054 if { (eval echo configure:11055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11055   rm -rf conftest*
11056   eval "ac_cv_lib_$ac_lib_var=yes"
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   eval "ac_cv_lib_$ac_lib_var=no"
11062 fi
11063 rm -f conftest*
11064 LIBS="$ac_save_LIBS"
11065
11066 fi
11067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11068   echo "$ac_t""yes" 1>&6
11069   have_setproctitle=yes
11070                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
11071 else
11072   echo "$ac_t""no" 1>&6
11073 have_setproctitle=no
11074                         LIBOBJS="$LIBOBJS setproctitle.o"
11075 fi
11076
11077 fi
11078
11079
11080         if test $have_setproctitle = yes ; then
11081                 cat >> confdefs.h <<\EOF
11082 #define HAVE_SETPROCTITLE 1
11083 EOF
11084
11085         fi
11086 fi
11087
11088 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
11089 echo "configure:11090: checking for uid_t in sys/types.h" >&5
11090 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
11091   echo $ac_n "(cached) $ac_c" 1>&6
11092 else
11093   cat > conftest.$ac_ext <<EOF
11094 #line 11095 "configure"
11095 #include "confdefs.h"
11096 #include <sys/types.h>
11097 EOF
11098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11099   egrep "uid_t" >/dev/null 2>&1; then
11100   rm -rf conftest*
11101   ac_cv_type_uid_t=yes
11102 else
11103   rm -rf conftest*
11104   ac_cv_type_uid_t=no
11105 fi
11106 rm -f conftest*
11107
11108 fi
11109
11110 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
11111 if test $ac_cv_type_uid_t = no; then
11112   cat >> confdefs.h <<\EOF
11113 #define uid_t int
11114 EOF
11115
11116   cat >> confdefs.h <<\EOF
11117 #define gid_t int
11118 EOF
11119
11120 fi
11121
11122 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
11123 echo "configure:11124: checking type of array argument to getgroups" >&5
11124 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
11125   echo $ac_n "(cached) $ac_c" 1>&6
11126 else
11127   if test "$cross_compiling" = yes; then
11128   ac_cv_type_getgroups=cross
11129 else
11130   cat > conftest.$ac_ext <<EOF
11131 #line 11132 "configure"
11132 #include "confdefs.h"
11133
11134 /* Thanks to Mike Rendell for this test.  */
11135 #include <sys/types.h>
11136 #define NGID 256
11137 #undef MAX
11138 #define MAX(x, y) ((x) > (y) ? (x) : (y))
11139 main()
11140 {
11141   gid_t gidset[NGID];
11142   int i, n;
11143   union { gid_t gval; long lval; }  val;
11144
11145   val.lval = -1;
11146   for (i = 0; i < NGID; i++)
11147     gidset[i] = val.gval;
11148   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11149                  gidset);
11150   /* Exit non-zero if getgroups seems to require an array of ints.  This
11151      happens when gid_t is short but getgroups modifies an array of ints.  */
11152   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
11153 }
11154
11155 EOF
11156 if { (eval echo configure:11157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11157 then
11158     ac_cv_type_getgroups=gid_t
11159 else
11160   echo "configure: failed program was:" >&5
11161   cat conftest.$ac_ext >&5
11162   rm -fr conftest*
11163   ac_cv_type_getgroups=int
11164 fi
11165 rm -fr conftest*
11166 fi
11167
11168 if test $ac_cv_type_getgroups = cross; then
11169         cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <unistd.h>
11173 EOF
11174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11175   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
11176   rm -rf conftest*
11177   ac_cv_type_getgroups=gid_t
11178 else
11179   rm -rf conftest*
11180   ac_cv_type_getgroups=int
11181 fi
11182 rm -f conftest*
11183
11184 fi
11185 fi
11186
11187 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
11188 cat >> confdefs.h <<EOF
11189 #define GETGROUPS_T $ac_cv_type_getgroups
11190 EOF
11191
11192  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11193 echo "configure:11194: checking for ANSI C header files" >&5
11194 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197   cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include <stdlib.h>
11201 #include <stdarg.h>
11202 #include <string.h>
11203 #include <float.h>
11204 EOF
11205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11206 { (eval echo configure:11207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11208 if test -z "$ac_err"; then
11209   rm -rf conftest*
11210   ac_cv_header_stdc=yes
11211 else
11212   echo "$ac_err" >&5
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -rf conftest*
11216   ac_cv_header_stdc=no
11217 fi
11218 rm -f conftest*
11219
11220 if test $ac_cv_header_stdc = yes; then
11221   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11222 cat > conftest.$ac_ext <<EOF
11223 #line 11224 "configure"
11224 #include "confdefs.h"
11225 #include <string.h>
11226 EOF
11227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11228   egrep "memchr" >/dev/null 2>&1; then
11229   :
11230 else
11231   rm -rf conftest*
11232   ac_cv_header_stdc=no
11233 fi
11234 rm -f conftest*
11235
11236 fi
11237
11238 if test $ac_cv_header_stdc = yes; then
11239   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11240 cat > conftest.$ac_ext <<EOF
11241 #line 11242 "configure"
11242 #include "confdefs.h"
11243 #include <stdlib.h>
11244 EOF
11245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11246   egrep "free" >/dev/null 2>&1; then
11247   :
11248 else
11249   rm -rf conftest*
11250   ac_cv_header_stdc=no
11251 fi
11252 rm -f conftest*
11253
11254 fi
11255
11256 if test $ac_cv_header_stdc = yes; then
11257   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11258 if test "$cross_compiling" = yes; then
11259   :
11260 else
11261   cat > conftest.$ac_ext <<EOF
11262 #line 11263 "configure"
11263 #include "confdefs.h"
11264 #include <ctype.h>
11265 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11266 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11267 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11268 int main () { int i; for (i = 0; i < 256; i++)
11269 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11270 exit (0); }
11271
11272 EOF
11273 if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11274 then
11275   :
11276 else
11277   echo "configure: failed program was:" >&5
11278   cat conftest.$ac_ext >&5
11279   rm -fr conftest*
11280   ac_cv_header_stdc=no
11281 fi
11282 rm -fr conftest*
11283 fi
11284
11285 fi
11286 fi
11287
11288 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11289 if test $ac_cv_header_stdc = yes; then
11290   cat >> confdefs.h <<\EOF
11291 #define STDC_HEADERS 1
11292 EOF
11293
11294 fi
11295
11296 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11297 echo "configure:11298: checking for mode_t" >&5
11298 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 #include <sys/types.h>
11305 #if STDC_HEADERS
11306 #include <stdlib.h>
11307 #include <stddef.h>
11308 #endif
11309 EOF
11310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11311   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11312   rm -rf conftest*
11313   eval "ac_cv_type_mode_t=yes"
11314 else
11315   rm -rf conftest*
11316   eval "ac_cv_type_mode_t=no"
11317 fi
11318 rm -f conftest*
11319
11320 fi
11321 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
11322   echo "$ac_t""yes" 1>&6
11323 else
11324   echo "$ac_t""no" 1>&6
11325   cat >> confdefs.h <<EOF
11326 #define mode_t int
11327 EOF
11328
11329 fi
11330
11331 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11332 echo "configure:11333: checking for off_t" >&5
11333 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
11334   echo $ac_n "(cached) $ac_c" 1>&6
11335 else
11336   cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339 #include <sys/types.h>
11340 #if STDC_HEADERS
11341 #include <stdlib.h>
11342 #include <stddef.h>
11343 #endif
11344 EOF
11345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11346   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11347   rm -rf conftest*
11348   eval "ac_cv_type_off_t=yes"
11349 else
11350   rm -rf conftest*
11351   eval "ac_cv_type_off_t=no"
11352 fi
11353 rm -f conftest*
11354
11355 fi
11356 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
11357   echo "$ac_t""yes" 1>&6
11358 else
11359   echo "$ac_t""no" 1>&6
11360   cat >> confdefs.h <<EOF
11361 #define off_t long
11362 EOF
11363
11364 fi
11365
11366 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11367 echo "configure:11368: checking for pid_t" >&5
11368 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
11369   echo $ac_n "(cached) $ac_c" 1>&6
11370 else
11371   cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 #include <sys/types.h>
11375 #if STDC_HEADERS
11376 #include <stdlib.h>
11377 #include <stddef.h>
11378 #endif
11379 EOF
11380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11381   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11382   rm -rf conftest*
11383   eval "ac_cv_type_pid_t=yes"
11384 else
11385   rm -rf conftest*
11386   eval "ac_cv_type_pid_t=no"
11387 fi
11388 rm -f conftest*
11389
11390 fi
11391 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
11392   echo "$ac_t""yes" 1>&6
11393 else
11394   echo "$ac_t""no" 1>&6
11395   cat >> confdefs.h <<EOF
11396 #define pid_t int
11397 EOF
11398
11399 fi
11400
11401 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11402 echo "configure:11403: checking for ptrdiff_t" >&5
11403 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11404   echo $ac_n "(cached) $ac_c" 1>&6
11405 else
11406   cat > conftest.$ac_ext <<EOF
11407 #line 11408 "configure"
11408 #include "confdefs.h"
11409 #include <stddef.h>
11410 int main() {
11411 ptrdiff_t p
11412 ; return 0; }
11413 EOF
11414 if { (eval echo configure:11415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11415   rm -rf conftest*
11416   am_cv_type_ptrdiff_t=yes
11417 else
11418   echo "configure: failed program was:" >&5
11419   cat conftest.$ac_ext >&5
11420   rm -rf conftest*
11421   am_cv_type_ptrdiff_t=no
11422 fi
11423 rm -f conftest*
11424 fi
11425
11426 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11427    if test $am_cv_type_ptrdiff_t = yes; then
11428      cat >> confdefs.h <<\EOF
11429 #define HAVE_PTRDIFF_T 1
11430 EOF
11431
11432    fi
11433
11434 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11435 echo "configure:11436: checking return type of signal handlers" >&5
11436 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11437   echo $ac_n "(cached) $ac_c" 1>&6
11438 else
11439   cat > conftest.$ac_ext <<EOF
11440 #line 11441 "configure"
11441 #include "confdefs.h"
11442 #include <sys/types.h>
11443 #include <signal.h>
11444 #ifdef signal
11445 #undef signal
11446 #endif
11447 #ifdef __cplusplus
11448 extern "C" void (*signal (int, void (*)(int)))(int);
11449 #else
11450 void (*signal ()) ();
11451 #endif
11452
11453 int main() {
11454 int i;
11455 ; return 0; }
11456 EOF
11457 if { (eval echo configure:11458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11458   rm -rf conftest*
11459   ac_cv_type_signal=void
11460 else
11461   echo "configure: failed program was:" >&5
11462   cat conftest.$ac_ext >&5
11463   rm -rf conftest*
11464   ac_cv_type_signal=int
11465 fi
11466 rm -f conftest*
11467 fi
11468
11469 echo "$ac_t""$ac_cv_type_signal" 1>&6
11470 cat >> confdefs.h <<EOF
11471 #define RETSIGTYPE $ac_cv_type_signal
11472 EOF
11473
11474
11475 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11476 echo "configure:11477: checking for sig_atomic_t" >&5
11477 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11478   echo $ac_n "(cached) $ac_c" 1>&6
11479 else
11480   cat > conftest.$ac_ext <<EOF
11481 #line 11482 "configure"
11482 #include "confdefs.h"
11483 #include <signal.h>
11484 int main() {
11485 sig_atomic_t atomic;
11486 ; return 0; }
11487 EOF
11488 if { (eval echo configure:11489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11489   rm -rf conftest*
11490   ol_cv_type_sig_atomic_t=yes
11491 else
11492   echo "configure: failed program was:" >&5
11493   cat conftest.$ac_ext >&5
11494   rm -rf conftest*
11495   ol_cv_type_sig_atomic_t=no
11496 fi
11497 rm -f conftest*
11498 fi
11499
11500 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11501   if test $ol_cv_type_sig_atomic_t = no; then
11502     cat >> confdefs.h <<\EOF
11503 #define sig_atomic_t int
11504 EOF
11505
11506   fi
11507  
11508 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11509 echo "configure:11510: checking for size_t" >&5
11510 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11511   echo $ac_n "(cached) $ac_c" 1>&6
11512 else
11513   cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <sys/types.h>
11517 #if STDC_HEADERS
11518 #include <stdlib.h>
11519 #include <stddef.h>
11520 #endif
11521 EOF
11522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11523   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11524   rm -rf conftest*
11525   eval "ac_cv_type_size_t=yes"
11526 else
11527   rm -rf conftest*
11528   eval "ac_cv_type_size_t=no"
11529 fi
11530 rm -f conftest*
11531
11532 fi
11533 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11534   echo "$ac_t""yes" 1>&6
11535 else
11536   echo "$ac_t""no" 1>&6
11537   cat >> confdefs.h <<EOF
11538 #define size_t unsigned
11539 EOF
11540
11541 fi
11542
11543 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11544 echo "configure:11545: checking for socklen_t" >&5
11545 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11546   echo $ac_n "(cached) $ac_c" 1>&6
11547 else
11548   cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551
11552 #ifdef HAVE_SYS_TYPES_H
11553 #include <sys/types.h>
11554 #endif
11555 #ifdef HAVE_SYS_SOCKET_H
11556 #include <sys/socket.h>
11557 #endif
11558
11559 int main() {
11560 socklen_t len;
11561 ; return 0; }
11562 EOF
11563 if { (eval echo configure:11564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11564   rm -rf conftest*
11565   ol_cv_type_socklen_t=yes
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   ol_cv_type_socklen_t=no
11571 fi
11572 rm -f conftest*
11573 fi
11574
11575 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11576   if test $ol_cv_type_socklen_t = no; then
11577     cat >> confdefs.h <<\EOF
11578 #define socklen_t int
11579 EOF
11580
11581   fi
11582  
11583 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11584 echo "configure:11585: checking for member st_blksize in aggregate type struct stat" >&5
11585 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11586   echo $ac_n "(cached) $ac_c" 1>&6
11587 else
11588   cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591 #include <sys/types.h>
11592 #include <sys/stat.h>
11593 int main() {
11594 struct stat foo; foo.st_blksize;
11595 ; return 0; }
11596 EOF
11597 if { (eval echo configure:11598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11598   rm -rf conftest*
11599   ac_cv_c_struct_member_st_blksize=yes
11600 else
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -rf conftest*
11604   ac_cv_c_struct_member_st_blksize=no
11605 fi
11606 rm -f conftest*
11607 fi
11608
11609 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11610 st_blksize="$ac_cv_c_struct_member_st_blksize"
11611 if test $ac_cv_c_struct_member_st_blksize = yes; then
11612   cat >> confdefs.h <<\EOF
11613 #define HAVE_ST_BLKSIZE 1
11614 EOF
11615
11616 fi
11617
11618 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11619 echo "configure:11620: checking whether time.h and sys/time.h may both be included" >&5
11620 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11621   echo $ac_n "(cached) $ac_c" 1>&6
11622 else
11623   cat > conftest.$ac_ext <<EOF
11624 #line 11625 "configure"
11625 #include "confdefs.h"
11626 #include <sys/types.h>
11627 #include <sys/time.h>
11628 #include <time.h>
11629 int main() {
11630 struct tm *tp;
11631 ; return 0; }
11632 EOF
11633 if { (eval echo configure:11634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11634   rm -rf conftest*
11635   ac_cv_header_time=yes
11636 else
11637   echo "configure: failed program was:" >&5
11638   cat conftest.$ac_ext >&5
11639   rm -rf conftest*
11640   ac_cv_header_time=no
11641 fi
11642 rm -f conftest*
11643 fi
11644
11645 echo "$ac_t""$ac_cv_header_time" 1>&6
11646 if test $ac_cv_header_time = yes; then
11647   cat >> confdefs.h <<\EOF
11648 #define TIME_WITH_SYS_TIME 1
11649 EOF
11650
11651 fi
11652
11653 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11654 echo "configure:11655: checking whether struct tm is in sys/time.h or time.h" >&5
11655 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11656   echo $ac_n "(cached) $ac_c" 1>&6
11657 else
11658   cat > conftest.$ac_ext <<EOF
11659 #line 11660 "configure"
11660 #include "confdefs.h"
11661 #include <sys/types.h>
11662 #include <time.h>
11663 int main() {
11664 struct tm *tp; tp->tm_sec;
11665 ; return 0; }
11666 EOF
11667 if { (eval echo configure:11668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11668   rm -rf conftest*
11669   ac_cv_struct_tm=time.h
11670 else
11671   echo "configure: failed program was:" >&5
11672   cat conftest.$ac_ext >&5
11673   rm -rf conftest*
11674   ac_cv_struct_tm=sys/time.h
11675 fi
11676 rm -f conftest*
11677 fi
11678
11679 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11680 if test $ac_cv_struct_tm = sys/time.h; then
11681   cat >> confdefs.h <<\EOF
11682 #define TM_IN_SYS_TIME 1
11683 EOF
11684
11685 fi
11686
11687 # test for pw_gecos in struct passwd
11688 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11689 echo "configure:11690: checking struct passwd for pw_gecos" >&5
11690 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11691   echo $ac_n "(cached) $ac_c" 1>&6
11692 else
11693   
11694         cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697 #include <pwd.h>
11698 int main() {
11699
11700         struct passwd pwd;
11701         pwd.pw_gecos = pwd.pw_name;
11702
11703 ; return 0; }
11704 EOF
11705 if { (eval echo configure:11706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11706   rm -rf conftest*
11707   ol_cv_struct_passwd_pw_gecos=yes
11708 else
11709   echo "configure: failed program was:" >&5
11710   cat conftest.$ac_ext >&5
11711   rm -rf conftest*
11712   ol_cv_struct_passwd_pw_gecos=no
11713 fi
11714 rm -f conftest*
11715 fi
11716
11717 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11718 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11719         cat >> confdefs.h <<\EOF
11720 #define HAVE_PW_GECOS 1
11721 EOF
11722
11723 fi
11724
11725 # test for pw_passwd in struct passwd
11726 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11727 echo "configure:11728: checking struct passwd for pw_passwd" >&5
11728 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11729   echo $ac_n "(cached) $ac_c" 1>&6
11730 else
11731   
11732         cat > conftest.$ac_ext <<EOF
11733 #line 11734 "configure"
11734 #include "confdefs.h"
11735 #include <pwd.h>
11736 int main() {
11737
11738         struct passwd pwd;
11739         pwd.pw_passwd = pwd.pw_name;
11740
11741 ; return 0; }
11742 EOF
11743 if { (eval echo configure:11744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11744   rm -rf conftest*
11745   ol_cv_struct_passwd_pw_passwd=yes
11746 else
11747   echo "configure: failed program was:" >&5
11748   cat conftest.$ac_ext >&5
11749   rm -rf conftest*
11750   ol_cv_struct_passwd_pw_passwd=no
11751 fi
11752 rm -f conftest*
11753 fi
11754
11755 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11756 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11757         cat >> confdefs.h <<\EOF
11758 #define HAVE_PW_PASSWD 1
11759 EOF
11760
11761 fi
11762
11763
11764 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11765 echo "configure:11766: checking if toupper() requires islower()" >&5
11766 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11767   echo $ac_n "(cached) $ac_c" 1>&6
11768 else
11769   
11770         if test "$cross_compiling" = yes; then
11771   ol_cv_c_upper_lower=safe
11772 else
11773   cat > conftest.$ac_ext <<EOF
11774 #line 11775 "configure"
11775 #include "confdefs.h"
11776
11777 #include <ctype.h>
11778 main()
11779 {
11780         if ('C' == toupper('C'))
11781                 exit(0);
11782         else
11783                 exit(1);
11784 }
11785 EOF
11786 if { (eval echo configure:11787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11787 then
11788   ol_cv_c_upper_lower=no
11789 else
11790   echo "configure: failed program was:" >&5
11791   cat conftest.$ac_ext >&5
11792   rm -fr conftest*
11793   ol_cv_c_upper_lower=yes
11794 fi
11795 rm -fr conftest*
11796 fi
11797
11798 fi
11799
11800 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11801 if test $ol_cv_c_upper_lower != no ; then
11802         cat >> confdefs.h <<\EOF
11803 #define C_UPPER_LOWER 1
11804 EOF
11805
11806 fi
11807
11808 echo $ac_n "checking for working const""... $ac_c" 1>&6
11809 echo "configure:11810: checking for working const" >&5
11810 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11811   echo $ac_n "(cached) $ac_c" 1>&6
11812 else
11813   cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816
11817 int main() {
11818
11819 /* Ultrix mips cc rejects this.  */
11820 typedef int charset[2]; const charset x;
11821 /* SunOS 4.1.1 cc rejects this.  */
11822 char const *const *ccp;
11823 char **p;
11824 /* NEC SVR4.0.2 mips cc rejects this.  */
11825 struct point {int x, y;};
11826 static struct point const zero = {0,0};
11827 /* AIX XL C 1.02.0.0 rejects this.
11828    It does not let you subtract one const X* pointer from another in an arm
11829    of an if-expression whose if-part is not a constant expression */
11830 const char *g = "string";
11831 ccp = &g + (g ? g-g : 0);
11832 /* HPUX 7.0 cc rejects these. */
11833 ++ccp;
11834 p = (char**) ccp;
11835 ccp = (char const *const *) p;
11836 { /* SCO 3.2v4 cc rejects this.  */
11837   char *t;
11838   char const *s = 0 ? (char *) 0 : (char const *) 0;
11839
11840   *t++ = 0;
11841 }
11842 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11843   int x[] = {25, 17};
11844   const int *foo = &x[0];
11845   ++foo;
11846 }
11847 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11848   typedef const int *iptr;
11849   iptr p = 0;
11850   ++p;
11851 }
11852 { /* AIX XL C 1.02.0.0 rejects this saying
11853      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11854   struct s { int j; const int *ap[3]; };
11855   struct s *b; b->j = 5;
11856 }
11857 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11858   const int foo = 10;
11859 }
11860
11861 ; return 0; }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11864   rm -rf conftest*
11865   ac_cv_c_const=yes
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -rf conftest*
11870   ac_cv_c_const=no
11871 fi
11872 rm -f conftest*
11873 fi
11874
11875 echo "$ac_t""$ac_cv_c_const" 1>&6
11876 if test $ac_cv_c_const = no; then
11877   cat >> confdefs.h <<\EOF
11878 #define const 
11879 EOF
11880
11881 fi
11882
11883 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11884 echo "configure:11885: checking if compiler understands volatile" >&5
11885 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11886   echo $ac_n "(cached) $ac_c" 1>&6
11887 else
11888   cat > conftest.$ac_ext <<EOF
11889 #line 11890 "configure"
11890 #include "confdefs.h"
11891 int x, y, z;
11892 int main() {
11893 volatile int a; int * volatile b = x ? &y : &z;
11894       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11895       *b = 0;
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11899   rm -rf conftest*
11900   ol_cv_c_volatile=yes
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   ol_cv_c_volatile=no
11906 fi
11907 rm -f conftest*
11908 fi
11909
11910 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11911   if test $ol_cv_c_volatile = yes; then
11912     : 
11913   else
11914     cat >> confdefs.h <<\EOF
11915 #define volatile 
11916 EOF
11917
11918   fi
11919  
11920
11921 if test $cross_compiling = yes ; then
11922         cat >> confdefs.h <<\EOF
11923 #define CROSS_COMPILING 1
11924 EOF
11925
11926
11927         cat >> confdefs.h <<\EOF
11928 #define LBER_INT_T long
11929 EOF
11930
11931         cat >> confdefs.h <<\EOF
11932 #define LBER_TAG_T long
11933 EOF
11934
11935         cat >> confdefs.h <<\EOF
11936 #define LBER_SOCKET_T int
11937 EOF
11938
11939
11940 else
11941         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11942 echo "configure:11943: checking whether byte ordering is bigendian" >&5
11943 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11944   echo $ac_n "(cached) $ac_c" 1>&6
11945 else
11946   ac_cv_c_bigendian=unknown
11947 # See if sys/param.h defines the BYTE_ORDER macro.
11948 cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 #include <sys/types.h>
11952 #include <sys/param.h>
11953 int main() {
11954
11955 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11956  bogus endian macros
11957 #endif
11958 ; return 0; }
11959 EOF
11960 if { (eval echo configure:11961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11961   rm -rf conftest*
11962   # It does; now see whether it defined to BIG_ENDIAN or not.
11963 cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11966 #include <sys/types.h>
11967 #include <sys/param.h>
11968 int main() {
11969
11970 #if BYTE_ORDER != BIG_ENDIAN
11971  not big endian
11972 #endif
11973 ; return 0; }
11974 EOF
11975 if { (eval echo configure:11976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11976   rm -rf conftest*
11977   ac_cv_c_bigendian=yes
11978 else
11979   echo "configure: failed program was:" >&5
11980   cat conftest.$ac_ext >&5
11981   rm -rf conftest*
11982   ac_cv_c_bigendian=no
11983 fi
11984 rm -f conftest*
11985 else
11986   echo "configure: failed program was:" >&5
11987   cat conftest.$ac_ext >&5
11988 fi
11989 rm -f conftest*
11990 if test $ac_cv_c_bigendian = unknown; then
11991 if test "$cross_compiling" = yes; then
11992     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11993 else
11994   cat > conftest.$ac_ext <<EOF
11995 #line 11996 "configure"
11996 #include "confdefs.h"
11997 main () {
11998   /* Are we little or big endian?  From Harbison&Steele.  */
11999   union
12000   {
12001     long l;
12002     char c[sizeof (long)];
12003   } u;
12004   u.l = 1;
12005   exit (u.c[sizeof (long) - 1] == 1);
12006 }
12007 EOF
12008 if { (eval echo configure:12009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12009 then
12010   ac_cv_c_bigendian=no
12011 else
12012   echo "configure: failed program was:" >&5
12013   cat conftest.$ac_ext >&5
12014   rm -fr conftest*
12015   ac_cv_c_bigendian=yes
12016 fi
12017 rm -fr conftest*
12018 fi
12019
12020 fi
12021 fi
12022
12023 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
12024 if test $ac_cv_c_bigendian = yes; then
12025   cat >> confdefs.h <<\EOF
12026 #define WORDS_BIGENDIAN 1
12027 EOF
12028
12029 fi
12030
12031         echo $ac_n "checking size of short""... $ac_c" 1>&6
12032 echo "configure:12033: checking size of short" >&5
12033 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
12034   echo $ac_n "(cached) $ac_c" 1>&6
12035 else
12036   if test "$cross_compiling" = yes; then
12037     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12038 else
12039   cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 #include <stdio.h>
12043 main()
12044 {
12045   FILE *f=fopen("conftestval", "w");
12046   if (!f) exit(1);
12047   fprintf(f, "%d\n", sizeof(short));
12048   exit(0);
12049 }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12052 then
12053   ac_cv_sizeof_short=`cat conftestval`
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -fr conftest*
12058   ac_cv_sizeof_short=0
12059 fi
12060 rm -fr conftest*
12061 fi
12062
12063 fi
12064 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
12065 cat >> confdefs.h <<EOF
12066 #define SIZEOF_SHORT $ac_cv_sizeof_short
12067 EOF
12068
12069  
12070         echo $ac_n "checking size of int""... $ac_c" 1>&6
12071 echo "configure:12072: checking size of int" >&5
12072 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   if test "$cross_compiling" = yes; then
12076     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12077 else
12078   cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 #include <stdio.h>
12082 main()
12083 {
12084   FILE *f=fopen("conftestval", "w");
12085   if (!f) exit(1);
12086   fprintf(f, "%d\n", sizeof(int));
12087   exit(0);
12088 }
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12091 then
12092   ac_cv_sizeof_int=`cat conftestval`
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -fr conftest*
12097   ac_cv_sizeof_int=0
12098 fi
12099 rm -fr conftest*
12100 fi
12101
12102 fi
12103 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
12104 cat >> confdefs.h <<EOF
12105 #define SIZEOF_INT $ac_cv_sizeof_int
12106 EOF
12107
12108  
12109         echo $ac_n "checking size of long""... $ac_c" 1>&6
12110 echo "configure:12111: checking size of long" >&5
12111 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
12112   echo $ac_n "(cached) $ac_c" 1>&6
12113 else
12114   if test "$cross_compiling" = yes; then
12115     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12116 else
12117   cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120 #include <stdio.h>
12121 main()
12122 {
12123   FILE *f=fopen("conftestval", "w");
12124   if (!f) exit(1);
12125   fprintf(f, "%d\n", sizeof(long));
12126   exit(0);
12127 }
12128 EOF
12129 if { (eval echo configure:12130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12130 then
12131   ac_cv_sizeof_long=`cat conftestval`
12132 else
12133   echo "configure: failed program was:" >&5
12134   cat conftest.$ac_ext >&5
12135   rm -fr conftest*
12136   ac_cv_sizeof_long=0
12137 fi
12138 rm -fr conftest*
12139 fi
12140
12141 fi
12142 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
12143 cat >> confdefs.h <<EOF
12144 #define SIZEOF_LONG $ac_cv_sizeof_long
12145 EOF
12146
12147
12148
12149         if test "$ac_cv_sizeof_int" -lt 4 ; then
12150                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
12151
12152                 cat >> confdefs.h <<\EOF
12153 #define LBER_INT_T long
12154 EOF
12155
12156                 cat >> confdefs.h <<\EOF
12157 #define LBER_TAG_T long
12158 EOF
12159
12160                 cat >> confdefs.h <<\EOF
12161 #define LBER_SOCKET_T int
12162 EOF
12163
12164         else
12165                 cat >> confdefs.h <<\EOF
12166 #define LBER_INT_T int
12167 EOF
12168
12169                 cat >> confdefs.h <<\EOF
12170 #define LBER_TAG_T long
12171 EOF
12172
12173                 cat >> confdefs.h <<\EOF
12174 #define LBER_SOCKET_T int
12175 EOF
12176
12177         fi
12178 fi
12179
12180 cat >> confdefs.h <<\EOF
12181 #define LBER_LEN_T long
12182 EOF
12183
12184
12185 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
12186 echo "configure:12187: checking for 8-bit clean memcmp" >&5
12187 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
12188   echo $ac_n "(cached) $ac_c" 1>&6
12189 else
12190   if test "$cross_compiling" = yes; then
12191   ac_cv_func_memcmp_clean=no
12192 else
12193   cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196
12197 main()
12198 {
12199   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
12200   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
12201 }
12202
12203 EOF
12204 if { (eval echo configure:12205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12205 then
12206   ac_cv_func_memcmp_clean=yes
12207 else
12208   echo "configure: failed program was:" >&5
12209   cat conftest.$ac_ext >&5
12210   rm -fr conftest*
12211   ac_cv_func_memcmp_clean=no
12212 fi
12213 rm -fr conftest*
12214 fi
12215
12216 fi
12217
12218 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
12219 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
12220
12221 echo $ac_n "checking for strftime""... $ac_c" 1>&6
12222 echo "configure:12223: checking for strftime" >&5
12223 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
12224   echo $ac_n "(cached) $ac_c" 1>&6
12225 else
12226   cat > conftest.$ac_ext <<EOF
12227 #line 12228 "configure"
12228 #include "confdefs.h"
12229 /* System header to define __stub macros and hopefully few prototypes,
12230     which can conflict with char strftime(); below.  */
12231 #include <assert.h>
12232 /* Override any gcc2 internal prototype to avoid an error.  */
12233 /* We use char because int might match the return type of a gcc2
12234     builtin and then its argument prototype would still apply.  */
12235 char strftime();
12236 char (*f)();
12237
12238 int main() {
12239
12240 /* The GNU C library defines this for functions which it implements
12241     to always fail with ENOSYS.  Some functions are actually named
12242     something starting with __ and the normal name is an alias.  */
12243 #if defined (__stub_strftime) || defined (__stub___strftime)
12244 choke me
12245 #else
12246 f = strftime;
12247 #endif
12248
12249 ; return 0; }
12250 EOF
12251 if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12252   rm -rf conftest*
12253   eval "ac_cv_func_strftime=yes"
12254 else
12255   echo "configure: failed program was:" >&5
12256   cat conftest.$ac_ext >&5
12257   rm -rf conftest*
12258   eval "ac_cv_func_strftime=no"
12259 fi
12260 rm -f conftest*
12261 fi
12262
12263 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12264   echo "$ac_t""yes" 1>&6
12265   cat >> confdefs.h <<\EOF
12266 #define HAVE_STRFTIME 1
12267 EOF
12268
12269 else
12270   echo "$ac_t""no" 1>&6
12271 # strftime is in -lintl on SCO UNIX.
12272 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12273 echo "configure:12274: checking for strftime in -lintl" >&5
12274 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
12275 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12276   echo $ac_n "(cached) $ac_c" 1>&6
12277 else
12278   ac_save_LIBS="$LIBS"
12279 LIBS="-lintl  $LIBS"
12280 cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283 /* Override any gcc2 internal prototype to avoid an error.  */
12284 /* We use char because int might match the return type of a gcc2
12285     builtin and then its argument prototype would still apply.  */
12286 char strftime();
12287
12288 int main() {
12289 strftime()
12290 ; return 0; }
12291 EOF
12292 if { (eval echo configure:12293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12293   rm -rf conftest*
12294   eval "ac_cv_lib_$ac_lib_var=yes"
12295 else
12296   echo "configure: failed program was:" >&5
12297   cat conftest.$ac_ext >&5
12298   rm -rf conftest*
12299   eval "ac_cv_lib_$ac_lib_var=no"
12300 fi
12301 rm -f conftest*
12302 LIBS="$ac_save_LIBS"
12303
12304 fi
12305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12306   echo "$ac_t""yes" 1>&6
12307   cat >> confdefs.h <<\EOF
12308 #define HAVE_STRFTIME 1
12309 EOF
12310
12311 LIBS="-lintl $LIBS"
12312 else
12313   echo "$ac_t""no" 1>&6
12314 fi
12315
12316 fi
12317
12318
12319 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12320 echo "configure:12321: checking for inet_aton()" >&5
12321 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
12322   echo $ac_n "(cached) $ac_c" 1>&6
12323 else
12324   cat > conftest.$ac_ext <<EOF
12325 #line 12326 "configure"
12326 #include "confdefs.h"
12327
12328 #ifdef HAVE_SYS_TYPES_H
12329 #       include <sys/types.h>
12330 #endif
12331 #ifdef HAVE_SYS_SOCKET_H
12332 #       include <sys/socket.h>
12333 #       ifdef HAVE_SYS_SELECT_H
12334 #               include <sys/select.h>
12335 #       endif
12336 #       include <netinet/in.h>
12337 #       ifdef HAVE_ARPA_INET_H
12338 #               include <arpa/inet.h>
12339 #       endif
12340 #endif
12341
12342 int main() {
12343 struct in_addr in;
12344 int rc = inet_aton( "255.255.255.255", &in );
12345 ; return 0; }
12346 EOF
12347 if { (eval echo configure:12348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12348   rm -rf conftest*
12349   ol_cv_func_inet_aton=yes
12350 else
12351   echo "configure: failed program was:" >&5
12352   cat conftest.$ac_ext >&5
12353   rm -rf conftest*
12354   ol_cv_func_inet_aton=no
12355 fi
12356 rm -f conftest*
12357 fi
12358
12359 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12360   if test $ol_cv_func_inet_aton != no; then
12361     cat >> confdefs.h <<\EOF
12362 #define HAVE_INET_ATON 1
12363 EOF
12364
12365   fi
12366  
12367
12368 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12369 echo "configure:12370: checking for vprintf" >&5
12370 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
12371   echo $ac_n "(cached) $ac_c" 1>&6
12372 else
12373   cat > conftest.$ac_ext <<EOF
12374 #line 12375 "configure"
12375 #include "confdefs.h"
12376 /* System header to define __stub macros and hopefully few prototypes,
12377     which can conflict with char vprintf(); below.  */
12378 #include <assert.h>
12379 /* Override any gcc2 internal prototype to avoid an error.  */
12380 /* We use char because int might match the return type of a gcc2
12381     builtin and then its argument prototype would still apply.  */
12382 char vprintf();
12383 char (*f)();
12384
12385 int main() {
12386
12387 /* The GNU C library defines this for functions which it implements
12388     to always fail with ENOSYS.  Some functions are actually named
12389     something starting with __ and the normal name is an alias.  */
12390 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12391 choke me
12392 #else
12393 f = vprintf;
12394 #endif
12395
12396 ; return 0; }
12397 EOF
12398 if { (eval echo configure:12399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12399   rm -rf conftest*
12400   eval "ac_cv_func_vprintf=yes"
12401 else
12402   echo "configure: failed program was:" >&5
12403   cat conftest.$ac_ext >&5
12404   rm -rf conftest*
12405   eval "ac_cv_func_vprintf=no"
12406 fi
12407 rm -f conftest*
12408 fi
12409
12410 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12411   echo "$ac_t""yes" 1>&6
12412   cat >> confdefs.h <<\EOF
12413 #define HAVE_VPRINTF 1
12414 EOF
12415
12416 else
12417   echo "$ac_t""no" 1>&6
12418 fi
12419
12420 if test "$ac_cv_func_vprintf" != yes; then
12421 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12422 echo "configure:12423: checking for _doprnt" >&5
12423 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
12424   echo $ac_n "(cached) $ac_c" 1>&6
12425 else
12426   cat > conftest.$ac_ext <<EOF
12427 #line 12428 "configure"
12428 #include "confdefs.h"
12429 /* System header to define __stub macros and hopefully few prototypes,
12430     which can conflict with char _doprnt(); below.  */
12431 #include <assert.h>
12432 /* Override any gcc2 internal prototype to avoid an error.  */
12433 /* We use char because int might match the return type of a gcc2
12434     builtin and then its argument prototype would still apply.  */
12435 char _doprnt();
12436 char (*f)();
12437
12438 int main() {
12439
12440 /* The GNU C library defines this for functions which it implements
12441     to always fail with ENOSYS.  Some functions are actually named
12442     something starting with __ and the normal name is an alias.  */
12443 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12444 choke me
12445 #else
12446 f = _doprnt;
12447 #endif
12448
12449 ; return 0; }
12450 EOF
12451 if { (eval echo configure:12452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12452   rm -rf conftest*
12453   eval "ac_cv_func__doprnt=yes"
12454 else
12455   echo "configure: failed program was:" >&5
12456   cat conftest.$ac_ext >&5
12457   rm -rf conftest*
12458   eval "ac_cv_func__doprnt=no"
12459 fi
12460 rm -f conftest*
12461 fi
12462
12463 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12464   echo "$ac_t""yes" 1>&6
12465   cat >> confdefs.h <<\EOF
12466 #define HAVE_DOPRNT 1
12467 EOF
12468
12469 else
12470   echo "$ac_t""no" 1>&6
12471 fi
12472
12473 fi
12474
12475
12476 if test $ac_cv_func_vprintf = yes ; then
12477                 for ac_func in vsnprintf vsprintf
12478 do
12479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12480 echo "configure:12481: checking for $ac_func" >&5
12481 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12482   echo $ac_n "(cached) $ac_c" 1>&6
12483 else
12484   cat > conftest.$ac_ext <<EOF
12485 #line 12486 "configure"
12486 #include "confdefs.h"
12487 /* System header to define __stub macros and hopefully few prototypes,
12488     which can conflict with char $ac_func(); below.  */
12489 #include <assert.h>
12490 /* Override any gcc2 internal prototype to avoid an error.  */
12491 /* We use char because int might match the return type of a gcc2
12492     builtin and then its argument prototype would still apply.  */
12493 char $ac_func();
12494 char (*f)();
12495
12496 int main() {
12497
12498 /* The GNU C library defines this for functions which it implements
12499     to always fail with ENOSYS.  Some functions are actually named
12500     something starting with __ and the normal name is an alias.  */
12501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12502 choke me
12503 #else
12504 f = $ac_func;
12505 #endif
12506
12507 ; return 0; }
12508 EOF
12509 if { (eval echo configure:12510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12510   rm -rf conftest*
12511   eval "ac_cv_func_$ac_func=yes"
12512 else
12513   echo "configure: failed program was:" >&5
12514   cat conftest.$ac_ext >&5
12515   rm -rf conftest*
12516   eval "ac_cv_func_$ac_func=no"
12517 fi
12518 rm -f conftest*
12519 fi
12520
12521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12522   echo "$ac_t""yes" 1>&6
12523     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12524   cat >> confdefs.h <<EOF
12525 #define $ac_tr_func 1
12526 EOF
12527  
12528 else
12529   echo "$ac_t""no" 1>&6
12530 fi
12531 done
12532
12533 fi
12534
12535 for ac_func in \
12536         bcopy                   \
12537         closesocket             \
12538         endgrent                \
12539         endpwent                \
12540         flock                   \
12541         getdtablesize   \
12542         getgrgid                \
12543         gethostname             \
12544         getpass                 \
12545         getpwuid                \
12546         getpwnam                \
12547         getspnam                \
12548         gettimeofday    \
12549         initgroups              \
12550         lockf                   \
12551         memcpy                  \
12552         memmove                 \
12553         mkstemp                 \
12554         read                    \
12555         recv                    \
12556         recvfrom                \
12557         setpwfile               \
12558         setgid                  \
12559         setegid                 \
12560         setsid                  \
12561         setuid                  \
12562         seteuid                 \
12563         signal                  \
12564         sigset                  \
12565         snprintf                \
12566         strdup                  \
12567         strerror                \
12568         strpbrk                 \
12569         strrchr                 \
12570         strsep                  \
12571         strstr                  \
12572         strtol                  \
12573         strtoul                 \
12574         strspn                  \
12575         sysconf                 \
12576         waitpid                 \
12577         wait4                   \
12578         write                   \
12579         send                    \
12580         sendto                  \
12581
12582 do
12583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12584 echo "configure:12585: checking for $ac_func" >&5
12585 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12586   echo $ac_n "(cached) $ac_c" 1>&6
12587 else
12588   cat > conftest.$ac_ext <<EOF
12589 #line 12590 "configure"
12590 #include "confdefs.h"
12591 /* System header to define __stub macros and hopefully few prototypes,
12592     which can conflict with char $ac_func(); below.  */
12593 #include <assert.h>
12594 /* Override any gcc2 internal prototype to avoid an error.  */
12595 /* We use char because int might match the return type of a gcc2
12596     builtin and then its argument prototype would still apply.  */
12597 char $ac_func();
12598 char (*f)();
12599
12600 int main() {
12601
12602 /* The GNU C library defines this for functions which it implements
12603     to always fail with ENOSYS.  Some functions are actually named
12604     something starting with __ and the normal name is an alias.  */
12605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12606 choke me
12607 #else
12608 f = $ac_func;
12609 #endif
12610
12611 ; return 0; }
12612 EOF
12613 if { (eval echo configure:12614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12614   rm -rf conftest*
12615   eval "ac_cv_func_$ac_func=yes"
12616 else
12617   echo "configure: failed program was:" >&5
12618   cat conftest.$ac_ext >&5
12619   rm -rf conftest*
12620   eval "ac_cv_func_$ac_func=no"
12621 fi
12622 rm -f conftest*
12623 fi
12624
12625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12626   echo "$ac_t""yes" 1>&6
12627     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12628   cat >> confdefs.h <<EOF
12629 #define $ac_tr_func 1
12630 EOF
12631  
12632 else
12633   echo "$ac_t""no" 1>&6
12634 fi
12635 done
12636
12637
12638 for ac_func in getopt tempnam
12639 do
12640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12641 echo "configure:12642: checking for $ac_func" >&5
12642 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   cat > conftest.$ac_ext <<EOF
12646 #line 12647 "configure"
12647 #include "confdefs.h"
12648 /* System header to define __stub macros and hopefully few prototypes,
12649     which can conflict with char $ac_func(); below.  */
12650 #include <assert.h>
12651 /* Override any gcc2 internal prototype to avoid an error.  */
12652 /* We use char because int might match the return type of a gcc2
12653     builtin and then its argument prototype would still apply.  */
12654 char $ac_func();
12655 char (*f)();
12656
12657 int main() {
12658
12659 /* The GNU C library defines this for functions which it implements
12660     to always fail with ENOSYS.  Some functions are actually named
12661     something starting with __ and the normal name is an alias.  */
12662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12663 choke me
12664 #else
12665 f = $ac_func;
12666 #endif
12667
12668 ; return 0; }
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12671   rm -rf conftest*
12672   eval "ac_cv_func_$ac_func=yes"
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -rf conftest*
12677   eval "ac_cv_func_$ac_func=no"
12678 fi
12679 rm -f conftest*
12680 fi
12681
12682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12685   cat >> confdefs.h <<EOF
12686 #define $ac_tr_func 1
12687 EOF
12688  
12689 else
12690   echo "$ac_t""no" 1>&6
12691 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12692 fi
12693 done
12694
12695
12696
12697 # Check Configuration
12698 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12699 echo "configure:12700: checking declaration of sys_errlist" >&5
12700 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12701   echo $ac_n "(cached) $ac_c" 1>&6
12702 else
12703   
12704         cat > conftest.$ac_ext <<EOF
12705 #line 12706 "configure"
12706 #include "confdefs.h"
12707
12708 #include <stdio.h>
12709 #include <sys/types.h>
12710 #include <errno.h> 
12711 int main() {
12712 char *c = (char *) *sys_errlist
12713 ; return 0; }
12714 EOF
12715 if { (eval echo configure:12716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12716   rm -rf conftest*
12717   ol_cv_dcl_sys_errlist=yes
12718         ol_cv_have_sys_errlist=yes
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   ol_cv_dcl_sys_errlist=no
12724 fi
12725 rm -f conftest*
12726 fi
12727
12728 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12729 #
12730 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12731 if test $ol_cv_dcl_sys_errlist = no ; then
12732         cat >> confdefs.h <<\EOF
12733 #define DECL_SYS_ERRLIST 1
12734 EOF
12735
12736
12737         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12738 echo "configure:12739: checking existence of sys_errlist" >&5
12739 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12740   echo $ac_n "(cached) $ac_c" 1>&6
12741 else
12742   
12743                 cat > conftest.$ac_ext <<EOF
12744 #line 12745 "configure"
12745 #include "confdefs.h"
12746 #include <errno.h>
12747 int main() {
12748 char *c = (char *) *sys_errlist
12749 ; return 0; }
12750 EOF
12751 if { (eval echo configure:12752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12752   rm -rf conftest*
12753   ol_cv_have_sys_errlist=yes
12754 else
12755   echo "configure: failed program was:" >&5
12756   cat conftest.$ac_ext >&5
12757   rm -rf conftest*
12758   ol_cv_have_sys_errlist=no
12759 fi
12760 rm -f conftest*
12761 fi
12762
12763 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12764 fi
12765 if test $ol_cv_have_sys_errlist = yes ; then
12766         cat >> confdefs.h <<\EOF
12767 #define HAVE_SYS_ERRLIST 1
12768 EOF
12769
12770 fi
12771
12772
12773
12774 if test "$ol_enable_debug" != no ; then
12775         cat >> confdefs.h <<\EOF
12776 #define LDAP_DEBUG 1
12777 EOF
12778
12779 fi
12780 if test "$ol_enable_syslog" = yes ; then
12781         cat >> confdefs.h <<\EOF
12782 #define LDAP_SYSLOG 1
12783 EOF
12784
12785 fi
12786 if test "$ol_enable_libui" = yes ; then
12787         cat >> confdefs.h <<\EOF
12788 #define LDAP_LIBUI 1
12789 EOF
12790
12791 fi
12792 if test "$ol_enable_cache" = no ; then
12793         cat >> confdefs.h <<\EOF
12794 #define LDAP_NOCACHE 1
12795 EOF
12796
12797 fi
12798 if test "$ol_enable_dns" != no ; then
12799         cat >> confdefs.h <<\EOF
12800 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12801 EOF
12802
12803 fi
12804 if test "$ol_enable_proctitle" != no ; then
12805         cat >> confdefs.h <<\EOF
12806 #define LDAP_PROCTITLE 1
12807 EOF
12808
12809 fi
12810 if test "$ol_enable_referrals" != no ; then
12811         cat >> confdefs.h <<\EOF
12812 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12813 EOF
12814
12815 fi
12816 if test "$ol_enable_cldap" != no ; then
12817         cat >> confdefs.h <<\EOF
12818 #define LDAP_CONNECTIONLESS 1
12819 EOF
12820
12821 fi
12822
12823 if test "$ol_enable_crypt" != no ; then
12824         cat >> confdefs.h <<\EOF
12825 #define SLAPD_CRYPT 1
12826 EOF
12827
12828 fi
12829 if test "$ol_enable_cleartext" != no ; then
12830         cat >> confdefs.h <<\EOF
12831 #define SLAPD_CLEARTEXT 1
12832 EOF
12833
12834 fi
12835 if test "$ol_enable_multimaster" != no ; then
12836         cat >> confdefs.h <<\EOF
12837 #define SLAPD_MULTIMASTER 1
12838 EOF
12839
12840 fi
12841 if test "$ol_enable_phonetic" != no ; then
12842         cat >> confdefs.h <<\EOF
12843 #define SLAPD_PHONETIC 1
12844 EOF
12845
12846 fi
12847 if test "$ol_enable_rlookups" != no ; then
12848         cat >> confdefs.h <<\EOF
12849 #define SLAPD_RLOOKUPS 1
12850 EOF
12851
12852 fi
12853
12854 if test "$ol_link_modules" != no ; then
12855         cat >> confdefs.h <<\EOF
12856 #define SLAPD_MODULES 1
12857 EOF
12858
12859         BUILD_SLAPD=yes
12860         MODULES_LIBS=-lltdl
12861         SLAPD_MODULES_LDFLAGS="-dlopen self"
12862 fi
12863
12864 if test "$ol_link_bdb2" != no ; then
12865         cat >> confdefs.h <<\EOF
12866 #define SLAPD_BDB2 1
12867 EOF
12868
12869         BUILD_SLAPD=yes
12870         BUILD_BDB2=yes
12871         if test "$ol_with_bdb2_module" != static ; then
12872                 cat >> confdefs.h <<\EOF
12873 #define SLAPD_BDB2_DYNAMIC 1
12874 EOF
12875
12876                 BUILD_BDB2=mod
12877                 BUILD_BDB2_DYNAMIC=shared
12878                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
12879         fi
12880 fi
12881
12882 if test "$ol_enable_ldap" != no ; then
12883         cat >> confdefs.h <<\EOF
12884 #define SLAPD_LDAP 1
12885 EOF
12886
12887         BUILD_SLAPD=yes
12888         BUILD_LDAP=yes
12889         if test "$ol_with_ldap_module" != static ; then
12890                 cat >> confdefs.h <<\EOF
12891 #define SLAPD_LDAP_DYNAMIC 1
12892 EOF
12893
12894                 BUILD_LDAP=mod
12895                 BUILD_LDAP_DYNAMIC=shared
12896                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
12897         fi
12898 fi
12899
12900 if test "$ol_link_ldbm" != no ; then
12901         cat >> confdefs.h <<\EOF
12902 #define SLAPD_LDBM 1
12903 EOF
12904
12905         BUILD_SLAPD=yes
12906         BUILD_LDBM=yes
12907         if test "$ol_with_ldbm_module" != static ; then
12908                 cat >> confdefs.h <<\EOF
12909 #define SLAPD_LDBM_DYNAMIC 1
12910 EOF
12911
12912                 BUILD_LDBM=mod
12913                 BUILD_LDBM_DYNAMIC=shared
12914                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
12915         fi
12916 fi
12917
12918 if test "$ol_enable_passwd" != no ; then
12919         cat >> confdefs.h <<\EOF
12920 #define SLAPD_PASSWD 1
12921 EOF
12922
12923         BUILD_SLAPD=yes
12924         BUILD_PASSWD=yes
12925         if test "$ol_with_passwd_module" != static ; then
12926                 cat >> confdefs.h <<\EOF
12927 #define SLAPD_PASSWD_DYNAMIC 1
12928 EOF
12929
12930                 BUILD_PASSWD=mod
12931                 BUILD_PASSWD_DYNAMIC=shared
12932                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
12933         fi
12934 fi
12935
12936 if test "$ol_link_perl" != no ; then
12937         cat >> confdefs.h <<\EOF
12938 #define SLAPD_PERL 1
12939 EOF
12940
12941         BUILD_SLAPD=yes
12942         BUILD_PERL=yes
12943         if test "$ol_with_perl_module" != static ; then
12944                 cat >> confdefs.h <<\EOF
12945 #define SLAPD_PERL_DYNAMIC 1
12946 EOF
12947
12948                 BUILD_PERL=mod
12949                 BUILD_PERL_DYNAMIC=shared
12950                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
12951         fi
12952 fi
12953
12954 if test "$ol_enable_shell" != no ; then
12955         cat >> confdefs.h <<\EOF
12956 #define SLAPD_SHELL 1
12957 EOF
12958
12959         BUILD_SLAPD=yes
12960         BUILD_SHELL=yes
12961         if test "$ol_with_shell_module" != static ; then
12962                 cat >> confdefs.h <<\EOF
12963 #define SLAPD_SHELL_DYNAMIC 1
12964 EOF
12965
12966                 BUILD_SHELL=mod
12967                 BUILD_SHELL_DYNAMIC=shared
12968                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
12969         fi
12970 fi
12971
12972 if test "$ol_enable_tcl" != no ; then
12973         cat >> confdefs.h <<\EOF
12974 #define SLAPD_TCL 1
12975 EOF
12976
12977         BUILD_SLAPD=yes
12978         BUILD_TCL=yes
12979         if test "$ol_with_tcl_module" != static; then
12980                 cat >> confdefs.h <<\EOF
12981 #define SLAPD_TCL_DYNAMIC 1
12982 EOF
12983
12984                 BUILD_TCL=mod
12985                 BUILD_TCL_DYNAMIC=shared
12986                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
12987         fi
12988 fi
12989
12990 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12991         $BUILD_SLAPD = yes ; then
12992         BUILD_SLURPD=yes
12993 fi
12994
12995 if test "$ol_link_isode" != no ; then
12996         BUILD_LDAPD=yes
12997 fi
12998
12999
13000
13001
13002   
13003   
13004   
13005   
13006   
13007   
13008   
13009   
13010   
13011   
13012   
13013   
13014   
13015   
13016   
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043 trap '' 1 2 15
13044
13045 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13046
13047 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13048 # Let make expand exec_prefix.
13049 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13050
13051 # Any assignment to VPATH causes Sun make to only execute
13052 # the first set of double-colon rules, so remove it if not needed.
13053 # If there is a colon in the path, we need to keep it.
13054 if test "x$srcdir" = x.; then
13055   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13056 fi
13057
13058 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13059
13060 DEFS=-DHAVE_CONFIG_H
13061
13062 # Without the "./", some shells look in PATH for config.status.
13063 : ${CONFIG_STATUS=./config.status}
13064
13065 echo creating $CONFIG_STATUS
13066 rm -f $CONFIG_STATUS
13067 cat > $CONFIG_STATUS <<EOF
13068 #! /bin/sh
13069 # Generated automatically by configure.
13070 # Run this file to recreate the current configuration.
13071 # This directory was configured as follows,
13072 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13073 #
13074 # $0 $ac_configure_args
13075 #
13076 # Compiler output produced by configure, useful for debugging
13077 # configure, is in ./config.log if it exists.
13078
13079 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13080 for ac_option
13081 do
13082   case "\$ac_option" in
13083   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13084     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13085     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13086   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13087     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
13088     exit 0 ;;
13089   -help | --help | --hel | --he | --h)
13090     echo "\$ac_cs_usage"; exit 0 ;;
13091   *) echo "\$ac_cs_usage"; exit 1 ;;
13092   esac
13093 done
13094
13095 ac_given_srcdir=$srcdir
13096 ac_given_INSTALL="$INSTALL"
13097
13098 trap 'rm -fr `echo "\
13099 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13100 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13101 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13102 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13103 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13104 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13105 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13106 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13107 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13108 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13109 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13110 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13111 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13112 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13113 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13114 include/Makefile:build/top.mk:include/Makefile.in \
13115 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13116 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13117 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13118 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13119 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13120 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13121 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13122 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13123 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13124 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13125 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13126 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13127 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13128 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13129 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13130 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13131 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13132 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13133 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13134 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13135 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13136 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13137 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13138 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13139 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13140 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13141  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13142 EOF
13143 cat >> $CONFIG_STATUS <<EOF
13144
13145 # Protect against being on the right side of a sed subst in config.status.
13146 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13147  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13148 $ac_vpsub
13149 $extrasub
13150 s%@SHELL@%$SHELL%g
13151 s%@CFLAGS@%$CFLAGS%g
13152 s%@CPPFLAGS@%$CPPFLAGS%g
13153 s%@CXXFLAGS@%$CXXFLAGS%g
13154 s%@FFLAGS@%$FFLAGS%g
13155 s%@DEFS@%$DEFS%g
13156 s%@LDFLAGS@%$LDFLAGS%g
13157 s%@LIBS@%$LIBS%g
13158 s%@exec_prefix@%$exec_prefix%g
13159 s%@prefix@%$prefix%g
13160 s%@program_transform_name@%$program_transform_name%g
13161 s%@bindir@%$bindir%g
13162 s%@sbindir@%$sbindir%g
13163 s%@libexecdir@%$libexecdir%g
13164 s%@datadir@%$datadir%g
13165 s%@sysconfdir@%$sysconfdir%g
13166 s%@sharedstatedir@%$sharedstatedir%g
13167 s%@localstatedir@%$localstatedir%g
13168 s%@libdir@%$libdir%g
13169 s%@includedir@%$includedir%g
13170 s%@oldincludedir@%$oldincludedir%g
13171 s%@infodir@%$infodir%g
13172 s%@mandir@%$mandir%g
13173 s%@host@%$host%g
13174 s%@host_alias@%$host_alias%g
13175 s%@host_cpu@%$host_cpu%g
13176 s%@host_vendor@%$host_vendor%g
13177 s%@host_os@%$host_os%g
13178 s%@target@%$target%g
13179 s%@target_alias@%$target_alias%g
13180 s%@target_cpu@%$target_cpu%g
13181 s%@target_vendor@%$target_vendor%g
13182 s%@target_os@%$target_os%g
13183 s%@build@%$build%g
13184 s%@build_alias@%$build_alias%g
13185 s%@build_cpu@%$build_cpu%g
13186 s%@build_vendor@%$build_vendor%g
13187 s%@build_os@%$build_os%g
13188 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13189 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13190 s%@INSTALL_DATA@%$INSTALL_DATA%g
13191 s%@PACKAGE@%$PACKAGE%g
13192 s%@VERSION@%$VERSION%g
13193 s%@ACLOCAL@%$ACLOCAL%g
13194 s%@AUTOCONF@%$AUTOCONF%g
13195 s%@AUTOMAKE@%$AUTOMAKE%g
13196 s%@AUTOHEADER@%$AUTOHEADER%g
13197 s%@MAKEINFO@%$MAKEINFO%g
13198 s%@install_sh@%$install_sh%g
13199 s%@AMTAR@%$AMTAR%g
13200 s%@AWK@%$AWK%g
13201 s%@AMTARFLAGS@%$AMTARFLAGS%g
13202 s%@SET_MAKE@%$SET_MAKE%g
13203 s%@top_builddir@%$top_builddir%g
13204 s%@ldap_subdir@%$ldap_subdir%g
13205 s%@CC@%$CC%g
13206 s%@RANLIB@%$RANLIB%g
13207 s%@LD@%$LD%g
13208 s%@NM@%$NM%g
13209 s%@LN_S@%$LN_S%g
13210 s%@LIBTOOL@%$LIBTOOL%g
13211 s%@LN_H@%$LN_H%g
13212 s%@SENDMAIL@%$SENDMAIL%g
13213 s%@EDITOR@%$EDITOR%g
13214 s%@FINGER@%$FINGER%g
13215 s%@PERLBIN@%$PERLBIN%g
13216 s%@CPP@%$CPP%g
13217 s%@EXEEXT@%$EXEEXT%g
13218 s%@OBJEXT@%$OBJEXT%g
13219 s%@OL_MKDEP@%$OL_MKDEP%g
13220 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
13221 s%@PEPSY@%$PEPSY%g
13222 s%@LIBOBJS@%$LIBOBJS%g
13223 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
13224 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
13225 s%@BUILD_BDB2@%$BUILD_BDB2%g
13226 s%@BUILD_LDAP@%$BUILD_LDAP%g
13227 s%@BUILD_LDBM@%$BUILD_LDBM%g
13228 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
13229 s%@BUILD_PERL@%$BUILD_PERL%g
13230 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
13231 s%@BUILD_SHELL@%$BUILD_SHELL%g
13232 s%@BUILD_TCL@%$BUILD_TCL%g
13233 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13234 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13235 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13236 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13237 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13238 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13239 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13240 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13241 s%@LDAP_LIBS@%$LDAP_LIBS%g
13242 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13243 s%@LDIF_LIBS@%$LDIF_LIBS%g
13244 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13245 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13246 s%@LDBM_LIBS@%$LDBM_LIBS%g
13247 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13248 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13249 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13250 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13251 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
13252 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13253 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13254 s%@KRB_LIBS@%$KRB_LIBS%g
13255 s%@READLINE_LIBS@%$READLINE_LIBS%g
13256 s%@SASL_LIBS@%$SASL_LIBS%g
13257 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13258 s%@TLS_LIBS@%$TLS_LIBS%g
13259 s%@MODULES_LIBS@%$MODULES_LIBS%g
13260
13261 CEOF
13262 EOF
13263
13264 cat >> $CONFIG_STATUS <<\EOF
13265
13266 # Split the substitutions into bite-sized pieces for seds with
13267 # small command number limits, like on Digital OSF/1 and HP-UX.
13268 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13269 ac_file=1 # Number of current file.
13270 ac_beg=1 # First line for current file.
13271 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13272 ac_more_lines=:
13273 ac_sed_cmds=""
13274 while $ac_more_lines; do
13275   if test $ac_beg -gt 1; then
13276     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13277   else
13278     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13279   fi
13280   if test ! -s conftest.s$ac_file; then
13281     ac_more_lines=false
13282     rm -f conftest.s$ac_file
13283   else
13284     if test -z "$ac_sed_cmds"; then
13285       ac_sed_cmds="sed -f conftest.s$ac_file"
13286     else
13287       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13288     fi
13289     ac_file=`expr $ac_file + 1`
13290     ac_beg=$ac_end
13291     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13292   fi
13293 done
13294 if test -z "$ac_sed_cmds"; then
13295   ac_sed_cmds=cat
13296 fi
13297 EOF
13298
13299 cat >> $CONFIG_STATUS <<EOF
13300
13301 CONFIG_FILES=\${CONFIG_FILES-"\
13302 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13303 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13304 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13305 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13306 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13307 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13308 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13309 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13310 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13311 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13312 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13313 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13314 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13315 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13316 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13317 include/Makefile:build/top.mk:include/Makefile.in \
13318 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13319 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13320 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13321 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13322 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13323 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13324 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13325 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13326 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13327 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13328 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13329 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13330 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13331 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13332 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13333 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13334 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13335 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13336 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13337 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13338 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13339 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13340 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13341 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13342 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13343 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13344 "}
13345 EOF
13346 cat >> $CONFIG_STATUS <<\EOF
13347 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13348   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13349   case "$ac_file" in
13350   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13351        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13352   *) ac_file_in="${ac_file}.in" ;;
13353   esac
13354
13355   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13356
13357   # Remove last slash and all that follows it.  Not all systems have dirname.
13358   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13359   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13360     # The file is in a subdirectory.
13361     test ! -d "$ac_dir" && mkdir "$ac_dir"
13362     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13363     # A "../" for each directory in $ac_dir_suffix.
13364     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13365   else
13366     ac_dir_suffix= ac_dots=
13367   fi
13368
13369   case "$ac_given_srcdir" in
13370   .)  srcdir=.
13371       if test -z "$ac_dots"; then top_srcdir=.
13372       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13373   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13374   *) # Relative path.
13375     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13376     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13377   esac
13378
13379   case "$ac_given_INSTALL" in
13380   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13381   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13382   esac
13383
13384   echo creating "$ac_file"
13385   rm -f "$ac_file"
13386   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13387   case "$ac_file" in
13388   *Makefile*) ac_comsub="1i\\
13389 # $configure_input" ;;
13390   *) ac_comsub= ;;
13391   esac
13392
13393   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13394   sed -e "$ac_comsub
13395 s%@configure_input@%$configure_input%g
13396 s%@srcdir@%$srcdir%g
13397 s%@top_srcdir@%$top_srcdir%g
13398 s%@INSTALL@%$INSTALL%g
13399 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13400 fi; done
13401 rm -f conftest.s*
13402
13403 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13404 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13405 #
13406 # ac_d sets the value in "#define NAME VALUE" lines.
13407 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13408 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13409 ac_dC='\3'
13410 ac_dD='%g'
13411 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13412 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13413 ac_uB='\([      ]\)%\1#\2define\3'
13414 ac_uC=' '
13415 ac_uD='\4%g'
13416 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13417 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13418 ac_eB='$%\1#\2define\3'
13419 ac_eC=' '
13420 ac_eD='%g'
13421
13422 if test "${CONFIG_HEADERS+set}" != set; then
13423 EOF
13424 cat >> $CONFIG_STATUS <<EOF
13425   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13426 EOF
13427 cat >> $CONFIG_STATUS <<\EOF
13428 fi
13429 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13430   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13431   case "$ac_file" in
13432   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13433        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13434   *) ac_file_in="${ac_file}.in" ;;
13435   esac
13436
13437   echo creating $ac_file
13438
13439   rm -f conftest.frag conftest.in conftest.out
13440   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13441   cat $ac_file_inputs > conftest.in
13442
13443 EOF
13444
13445 # Transform confdefs.h into a sed script conftest.vals that substitutes
13446 # the proper values into config.h.in to produce config.h.  And first:
13447 # Protect against being on the right side of a sed subst in config.status.
13448 # Protect against being in an unquoted here document in config.status.
13449 rm -f conftest.vals
13450 cat > conftest.hdr <<\EOF
13451 s/[\\&%]/\\&/g
13452 s%[\\$`]%\\&%g
13453 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13454 s%ac_d%ac_u%gp
13455 s%ac_u%ac_e%gp
13456 EOF
13457 sed -n -f conftest.hdr confdefs.h > conftest.vals
13458 rm -f conftest.hdr
13459
13460 # This sed command replaces #undef with comments.  This is necessary, for
13461 # example, in the case of _POSIX_SOURCE, which is predefined and required
13462 # on some systems where configure will not decide to define it.
13463 cat >> conftest.vals <<\EOF
13464 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13465 EOF
13466
13467 # Break up conftest.vals because some shells have a limit on
13468 # the size of here documents, and old seds have small limits too.
13469
13470 rm -f conftest.tail
13471 while :
13472 do
13473   ac_lines=`grep -c . conftest.vals`
13474   # grep -c gives empty output for an empty file on some AIX systems.
13475   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13476   # Write a limited-size here document to conftest.frag.
13477   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13478   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13479   echo 'CEOF
13480   sed -f conftest.frag conftest.in > conftest.out
13481   rm -f conftest.in
13482   mv conftest.out conftest.in
13483 ' >> $CONFIG_STATUS
13484   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13485   rm -f conftest.vals
13486   mv conftest.tail conftest.vals
13487 done
13488 rm -f conftest.vals
13489
13490 cat >> $CONFIG_STATUS <<\EOF
13491   rm -f conftest.frag conftest.h
13492   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13493   cat conftest.in >> conftest.h
13494   rm -f conftest.in
13495   if cmp -s $ac_file conftest.h 2>/dev/null; then
13496     echo "$ac_file is unchanged"
13497     rm -f conftest.h
13498   else
13499     # Remove last slash and all that follows it.  Not all systems have dirname.
13500       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13501       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13502       # The file is in a subdirectory.
13503       test ! -d "$ac_dir" && mkdir "$ac_dir"
13504     fi
13505     rm -f $ac_file
13506     mv conftest.h $ac_file
13507   fi
13508 fi; done
13509
13510 EOF
13511 cat >> $CONFIG_STATUS <<EOF
13512
13513 EOF
13514 cat >> $CONFIG_STATUS <<\EOF
13515
13516 date > stamp-h
13517 echo Please \"make depend\" to build dependencies
13518
13519 exit 0
13520 EOF
13521 chmod +x $CONFIG_STATUS
13522 rm -fr confdefs* $ac_clean_files
13523 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13524