]> git.sur5r.net Git - openldap/blob - configure
a5e22e95f651b1526ae439b6cd69476aac131775
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
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"
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=$ac_aux_dir/config.guess
639 ac_config_sub=$ac_aux_dir/config.sub
640 ac_configure=$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 # Do some error checking and defaulting for the host and target type.
649 # The inputs are:
650 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
651 #
652 # The rules are:
653 # 1. You are not allowed to specify --host, --target, and nonopt at the
654 #    same time.
655 # 2. Host defaults to nonopt.
656 # 3. If nonopt is not specified, then host defaults to the current host,
657 #    as determined by config.guess.
658 # 4. Target and build default to nonopt.
659 # 5. If nonopt is not specified, then target and build default to host.
660
661 # The aliases save the names the user supplied, while $host etc.
662 # will get canonicalized.
663 case $host---$target---$nonopt in
664 NONE---*---* | *---NONE---* | *---*---NONE) ;;
665 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
666 esac
667
668
669 # Make sure we can run config.sub.
670 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
671 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
672 fi
673
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
676
677 host_alias=$host
678 case "$host_alias" in
679 NONE)
680   case $nonopt in
681   NONE)
682     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
683     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684     fi ;;
685   *) host_alias=$nonopt ;;
686   esac ;;
687 esac
688
689 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
690 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 echo "$ac_t""$host" 1>&6
694
695 echo $ac_n "checking target system type""... $ac_c" 1>&6
696 echo "configure:697: checking target system type" >&5
697
698 target_alias=$target
699 case "$target_alias" in
700 NONE)
701   case $nonopt in
702   NONE) target_alias=$host_alias ;;
703   *) target_alias=$nonopt ;;
704   esac ;;
705 esac
706
707 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
708 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 echo "$ac_t""$target" 1>&6
712
713 echo $ac_n "checking build system type""... $ac_c" 1>&6
714 echo "configure:715: checking build system type" >&5
715
716 build_alias=$build
717 case "$build_alias" in
718 NONE)
719   case $nonopt in
720   NONE) build_alias=$host_alias ;;
721   *) build_alias=$nonopt ;;
722   esac ;;
723 esac
724
725 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
726 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729 echo "$ac_t""$build" 1>&6
730
731 test "$host_alias" != "$target_alias" &&
732   test "$program_prefix$program_suffix$program_transform_name" = \
733     NONENONEs,x,x, &&
734   program_prefix=${target_alias}-
735
736
737 # Find a good install program.  We prefer a C program (faster),
738 # so one script is as good as another.  But avoid the broken or
739 # incompatible versions:
740 # SysV /etc/install, /usr/sbin/install
741 # SunOS /usr/etc/install
742 # IRIX /sbin/install
743 # AIX /bin/install
744 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
745 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
746 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
747 # ./install, which can be erroneously created by make from ./install.sh.
748 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
749 echo "configure:750: checking for a BSD compatible install" >&5
750 if test -z "$INSTALL"; then
751 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
752   echo $ac_n "(cached) $ac_c" 1>&6
753 else
754     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
755   for ac_dir in $PATH; do
756     # Account for people who put trailing slashes in PATH elements.
757     case "$ac_dir/" in
758     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
759     *)
760       # OSF1 and SCO ODT 3.0 have their own names for install.
761       # Don't use installbsd from OSF since it installs stuff as root
762       # by default.
763       for ac_prog in ginstall scoinst install; do
764         if test -f $ac_dir/$ac_prog; then
765           if test $ac_prog = install &&
766             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
767             # AIX install.  It has an incompatible calling convention.
768             :
769           else
770             ac_cv_path_install="$ac_dir/$ac_prog -c"
771             break 2
772           fi
773         fi
774       done
775       ;;
776     esac
777   done
778   IFS="$ac_save_IFS"
779
780 fi
781   if test "${ac_cv_path_install+set}" = set; then
782     INSTALL="$ac_cv_path_install"
783   else
784     # As a last resort, use the slow shell script.  We don't cache a
785     # path for INSTALL within a source directory, because that will
786     # break other packages using the cache if that directory is
787     # removed, or if the path is relative.
788     INSTALL="$ac_install_sh"
789   fi
790 fi
791 echo "$ac_t""$INSTALL" 1>&6
792
793 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
794 # It thinks the first close brace ends the variable substitution.
795 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
796
797 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
798
799 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
800
801 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
802 echo "configure:803: checking whether build environment is sane" >&5
803 # Just in case
804 sleep 1
805 echo timestamp > conftestfile
806 # Do `set' in a subshell so we don't clobber the current shell's
807 # arguments.  Must try -L first in case configure is actually a
808 # symlink; some systems play weird games with the mod time of symlinks
809 # (eg FreeBSD returns the mod time of the symlink's containing
810 # directory).
811 if (
812    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
813    if test "$*" = "X"; then
814       # -L didn't work.
815       set X `ls -t $srcdir/configure conftestfile`
816    fi
817    if test "$*" != "X $srcdir/configure conftestfile" \
818       && test "$*" != "X conftestfile $srcdir/configure"; then
819
820       # If neither matched, then we have a broken ls.  This can happen
821       # if, for instance, CONFIG_SHELL is bash and it inherits a
822       # broken ls alias from the environment.  This has actually
823       # happened.  Such a system could not be considered "sane".
824       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
825 alias in your environment" 1>&2; exit 1; }
826    fi
827
828    test "$2" = conftestfile
829    )
830 then
831    # Ok.
832    :
833 else
834    { echo "configure: error: newly created file is older than distributed files!
835 Check your system clock" 1>&2; exit 1; }
836 fi
837 rm -f conftest*
838 echo "$ac_t""yes" 1>&6
839 if test "$program_transform_name" = s,x,x,; then
840   program_transform_name=
841 else
842   # Double any \ or $.  echo might interpret backslashes.
843   cat <<\EOF_SED > conftestsed
844 s,\\,\\\\,g; s,\$,$$,g
845 EOF_SED
846   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
847   rm -f conftestsed
848 fi
849 test "$program_prefix" != NONE &&
850   program_transform_name="s,^,${program_prefix},; $program_transform_name"
851 # Use a double $ so make ignores it.
852 test "$program_suffix" != NONE &&
853   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
854
855 # sed with no file args requires a program.
856 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
857
858 for ac_prog in mawk gawk nawk awk
859 do
860 # Extract the first word of "$ac_prog", so it can be a program name with args.
861 set dummy $ac_prog; ac_word=$2
862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
863 echo "configure:864: checking for $ac_word" >&5
864 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
865   echo $ac_n "(cached) $ac_c" 1>&6
866 else
867   if test -n "$AWK"; then
868   ac_cv_prog_AWK="$AWK" # Let the user override the test.
869 else
870   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
871   ac_dummy="$PATH"
872   for ac_dir in $ac_dummy; do
873     test -z "$ac_dir" && ac_dir=.
874     if test -f $ac_dir/$ac_word; then
875       ac_cv_prog_AWK="$ac_prog"
876       break
877     fi
878   done
879   IFS="$ac_save_ifs"
880 fi
881 fi
882 AWK="$ac_cv_prog_AWK"
883 if test -n "$AWK"; then
884   echo "$ac_t""$AWK" 1>&6
885 else
886   echo "$ac_t""no" 1>&6
887 fi
888
889 test -n "$AWK" && break
890 done
891
892 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
893 echo "configure:894: checking whether ${MAKE-make} sets \${MAKE}" >&5
894 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
895 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
896   echo $ac_n "(cached) $ac_c" 1>&6
897 else
898   cat > conftestmake <<\EOF
899 all:
900         @echo 'ac_maketemp="${MAKE}"'
901 EOF
902 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
903 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
904 if test -n "$ac_maketemp"; then
905   eval ac_cv_prog_make_${ac_make}_set=yes
906 else
907   eval ac_cv_prog_make_${ac_make}_set=no
908 fi
909 rm -f conftestmake
910 fi
911 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
912   echo "$ac_t""yes" 1>&6
913   SET_MAKE=
914 else
915   echo "$ac_t""no" 1>&6
916   SET_MAKE="MAKE=${MAKE-make}"
917 fi
918
919
920
921 PACKAGE=OpenLDAP
922
923 VERSION=$OL_VERSION
924
925 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
926   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
927 fi
928
929
930
931 missing_dir=`cd $ac_aux_dir && pwd`
932 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
933 echo "configure:934: checking for working aclocal" >&5
934 # Run test in a subshell; some versions of sh will print an error if
935 # an executable is not found, even if stderr is redirected.
936 # Redirect stdin to placate older versions of autoconf.  Sigh.
937 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
938    ACLOCAL=aclocal
939    echo "$ac_t""found" 1>&6
940 else
941    ACLOCAL="$missing_dir/missing aclocal"
942    echo "$ac_t""missing" 1>&6
943 fi
944
945 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
946 echo "configure:947: checking for working autoconf" >&5
947 # Run test in a subshell; some versions of sh will print an error if
948 # an executable is not found, even if stderr is redirected.
949 # Redirect stdin to placate older versions of autoconf.  Sigh.
950 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
951    AUTOCONF=autoconf
952    echo "$ac_t""found" 1>&6
953 else
954    AUTOCONF="$missing_dir/missing autoconf"
955    echo "$ac_t""missing" 1>&6
956 fi
957
958 echo $ac_n "checking for working automake""... $ac_c" 1>&6
959 echo "configure:960: checking for working automake" >&5
960 # Run test in a subshell; some versions of sh will print an error if
961 # an executable is not found, even if stderr is redirected.
962 # Redirect stdin to placate older versions of autoconf.  Sigh.
963 if (automake --version) < /dev/null > /dev/null 2>&1; then
964    AUTOMAKE=automake
965    echo "$ac_t""found" 1>&6
966 else
967    AUTOMAKE="$missing_dir/missing automake"
968    echo "$ac_t""missing" 1>&6
969 fi
970
971 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
972 echo "configure:973: checking for working autoheader" >&5
973 # Run test in a subshell; some versions of sh will print an error if
974 # an executable is not found, even if stderr is redirected.
975 # Redirect stdin to placate older versions of autoconf.  Sigh.
976 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
977    AUTOHEADER=autoheader
978    echo "$ac_t""found" 1>&6
979 else
980    AUTOHEADER="$missing_dir/missing autoheader"
981    echo "$ac_t""missing" 1>&6
982 fi
983
984 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
985 echo "configure:986: checking for working makeinfo" >&5
986 # Run test in a subshell; some versions of sh will print an error if
987 # an executable is not found, even if stderr is redirected.
988 # Redirect stdin to placate older versions of autoconf.  Sigh.
989 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
990    MAKEINFO=makeinfo
991    echo "$ac_t""found" 1>&6
992 else
993    MAKEINFO="$missing_dir/missing makeinfo"
994    echo "$ac_t""missing" 1>&6
995 fi
996
997 install_sh="$missing_dir/install-sh"
998 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
999
1000 for ac_prog in gnutar gtar tar
1001 do
1002 # Extract the first word of "$ac_prog", so it can be a program name with args.
1003 set dummy $ac_prog; ac_word=$2
1004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1005 echo "configure:1006: checking for $ac_word" >&5
1006 if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
1007   echo $ac_n "(cached) $ac_c" 1>&6
1008 else
1009   if test -n "$AMTAR"; then
1010   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1011 else
1012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1013   ac_dummy="$PATH"
1014   for ac_dir in $ac_dummy; do
1015     test -z "$ac_dir" && ac_dir=.
1016     if test -f $ac_dir/$ac_word; then
1017       ac_cv_prog_AMTAR="$ac_prog"
1018       break
1019     fi
1020   done
1021   IFS="$ac_save_ifs"
1022 fi
1023 fi
1024 AMTAR="$ac_cv_prog_AMTAR"
1025 if test -n "$AMTAR"; then
1026   echo "$ac_t""$AMTAR" 1>&6
1027 else
1028   echo "$ac_t""no" 1>&6
1029 fi
1030
1031 test -n "$AMTAR" && break
1032 done
1033
1034
1035 AMTARFLAGS=
1036 if test -n "$AMTAR"; then
1037   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1038         AMTARFLAGS=o
1039   fi
1040 fi
1041
1042
1043
1044 cat >> confdefs.h <<EOF
1045 #define OPENLDAP_PACKAGE "$PACKAGE"
1046 EOF
1047
1048 cat >> confdefs.h <<EOF
1049 #define OPENLDAP_VERSION "$VERSION"
1050 EOF
1051
1052
1053
1054
1055 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1056 echo "configure:1057: checking configure arguments" >&5
1057
1058
1059 top_builddir=`pwd`
1060
1061 ldap_subdir="openldap"
1062
1063 # Check whether --with-subdir or --without-subdir was given.
1064 if test "${with_subdir+set}" = set; then
1065   withval="$with_subdir"
1066   
1067         if test "$withval" = "no"; then
1068                 ldap_subdir=""
1069         elif test "$withval" != "yes"; then
1070                 ldap_subdir="$withval"
1071         fi
1072
1073 fi
1074
1075
1076 # OpenLDAP --enable-debug
1077         # Check whether --enable-debug or --disable-debug was given.
1078 if test "${enable_debug+set}" = set; then
1079   enableval="$enable_debug"
1080   
1081         ol_arg=invalid
1082         for ol_val in auto yes no ; do
1083                 if test "$enableval" = "$ol_val" ; then
1084                         ol_arg="$ol_val"
1085                 fi
1086         done
1087         if test "$ol_arg" = "invalid" ; then
1088                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1089         fi
1090         ol_enable_debug="$ol_arg"
1091
1092 else
1093         ol_enable_debug="yes"
1094 fi
1095 # end --enable-debug
1096 # OpenLDAP --enable-syslog
1097         # Check whether --enable-syslog or --disable-syslog was given.
1098 if test "${enable_syslog+set}" = set; then
1099   enableval="$enable_syslog"
1100   
1101         ol_arg=invalid
1102         for ol_val in auto yes no ; do
1103                 if test "$enableval" = "$ol_val" ; then
1104                         ol_arg="$ol_val"
1105                 fi
1106         done
1107         if test "$ol_arg" = "invalid" ; then
1108                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1109         fi
1110         ol_enable_syslog="$ol_arg"
1111
1112 else
1113         ol_enable_syslog="auto"
1114 fi
1115 # end --enable-syslog
1116 # OpenLDAP --enable-proctitle
1117         # Check whether --enable-proctitle or --disable-proctitle was given.
1118 if test "${enable_proctitle+set}" = set; then
1119   enableval="$enable_proctitle"
1120   
1121         ol_arg=invalid
1122         for ol_val in auto yes no ; do
1123                 if test "$enableval" = "$ol_val" ; then
1124                         ol_arg="$ol_val"
1125                 fi
1126         done
1127         if test "$ol_arg" = "invalid" ; then
1128                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1129         fi
1130         ol_enable_proctitle="$ol_arg"
1131
1132 else
1133         ol_enable_proctitle="yes"
1134 fi
1135 # end --enable-proctitle
1136 # OpenLDAP --enable-cache
1137         # Check whether --enable-cache or --disable-cache was given.
1138 if test "${enable_cache+set}" = set; then
1139   enableval="$enable_cache"
1140   
1141         ol_arg=invalid
1142         for ol_val in auto yes no ; do
1143                 if test "$enableval" = "$ol_val" ; then
1144                         ol_arg="$ol_val"
1145                 fi
1146         done
1147         if test "$ol_arg" = "invalid" ; then
1148                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1149         fi
1150         ol_enable_cache="$ol_arg"
1151
1152 else
1153         ol_enable_cache="yes"
1154 fi
1155 # end --enable-cache
1156 # OpenLDAP --enable-dns
1157         # Check whether --enable-dns or --disable-dns was given.
1158 if test "${enable_dns+set}" = set; then
1159   enableval="$enable_dns"
1160   
1161         ol_arg=invalid
1162         for ol_val in auto yes no ; do
1163                 if test "$enableval" = "$ol_val" ; then
1164                         ol_arg="$ol_val"
1165                 fi
1166         done
1167         if test "$ol_arg" = "invalid" ; then
1168                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1169         fi
1170         ol_enable_dns="$ol_arg"
1171
1172 else
1173         ol_enable_dns="no"
1174 fi
1175 # end --enable-dns
1176 # OpenLDAP --enable-referrals
1177         # Check whether --enable-referrals or --disable-referrals was given.
1178 if test "${enable_referrals+set}" = set; then
1179   enableval="$enable_referrals"
1180   
1181         ol_arg=invalid
1182         for ol_val in auto yes no ; do
1183                 if test "$enableval" = "$ol_val" ; then
1184                         ol_arg="$ol_val"
1185                 fi
1186         done
1187         if test "$ol_arg" = "invalid" ; then
1188                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1189         fi
1190         ol_enable_referrals="$ol_arg"
1191
1192 else
1193         ol_enable_referrals="yes"
1194 fi
1195 # end --enable-referrals
1196 # OpenLDAP --enable-cldap
1197         # Check whether --enable-cldap or --disable-cldap was given.
1198 if test "${enable_cldap+set}" = set; then
1199   enableval="$enable_cldap"
1200   
1201         ol_arg=invalid
1202         for ol_val in auto yes no ; do
1203                 if test "$enableval" = "$ol_val" ; then
1204                         ol_arg="$ol_val"
1205                 fi
1206         done
1207         if test "$ol_arg" = "invalid" ; then
1208                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1209         fi
1210         ol_enable_cldap="$ol_arg"
1211
1212 else
1213         ol_enable_cldap="no"
1214 fi
1215 # end --enable-cldap
1216 # OpenLDAP --enable-x_compile
1217         # Check whether --enable-x_compile or --disable-x_compile was given.
1218 if test "${enable_x_compile+set}" = set; then
1219   enableval="$enable_x_compile"
1220   
1221         ol_arg=invalid
1222         for ol_val in yes no ; do
1223                 if test "$enableval" = "$ol_val" ; then
1224                         ol_arg="$ol_val"
1225                 fi
1226         done
1227         if test "$ol_arg" = "invalid" ; then
1228                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1229         fi
1230         ol_enable_x_compile="$ol_arg"
1231
1232 else
1233         ol_enable_x_compile="no"
1234 fi
1235 # end --enable-x_compile
1236
1237 # OpenLDAP --enable-dmalloc
1238         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1239 if test "${enable_dmalloc+set}" = set; then
1240   enableval="$enable_dmalloc"
1241   
1242         ol_arg=invalid
1243         for ol_val in auto yes no ; do
1244                 if test "$enableval" = "$ol_val" ; then
1245                         ol_arg="$ol_val"
1246                 fi
1247         done
1248         if test "$ol_arg" = "invalid" ; then
1249                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1250         fi
1251         ol_enable_dmalloc="$ol_arg"
1252
1253 else
1254         ol_enable_dmalloc="no"
1255 fi
1256 # end --enable-dmalloc
1257
1258 # OpenLDAP --with-cyrus_sasl
1259         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1260 if test "${with_cyrus_sasl+set}" = set; then
1261   withval="$with_cyrus_sasl"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no  ; do
1265                 if test "$withval" = "$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 $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1271         fi
1272         ol_with_cyrus_sasl="$ol_arg"
1273
1274 else
1275         ol_with_cyrus_sasl="auto"
1276 fi
1277 # end --with-cyrus_sasl
1278
1279 # OpenLDAP --with-fetch
1280         # Check whether --with-fetch or --without-fetch was given.
1281 if test "${with_fetch+set}" = set; then
1282   withval="$with_fetch"
1283   
1284         ol_arg=invalid
1285         for ol_val in auto yes no  ; do
1286                 if test "$withval" = "$ol_val" ; then
1287                         ol_arg="$ol_val"
1288                 fi
1289         done
1290         if test "$ol_arg" = "invalid" ; then
1291                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1292         fi
1293         ol_with_fetch="$ol_arg"
1294
1295 else
1296         ol_with_fetch="auto"
1297 fi
1298 # end --with-fetch
1299
1300 # OpenLDAP --with-kerberos
1301         # Check whether --with-kerberos or --without-kerberos was given.
1302 if test "${with_kerberos+set}" = set; then
1303   withval="$with_kerberos"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto k5 k4 afs yes no ; do
1307                 if test "$withval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1313         fi
1314         ol_with_kerberos="$ol_arg"
1315
1316 else
1317         ol_with_kerberos="auto"
1318 fi
1319 # end --with-kerberos
1320
1321 # OpenLDAP --with-readline
1322         # Check whether --with-readline or --without-readline was given.
1323 if test "${with_readline+set}" = set; then
1324   withval="$with_readline"
1325   
1326         ol_arg=invalid
1327         for ol_val in auto yes no  ; do
1328                 if test "$withval" = "$ol_val" ; then
1329                         ol_arg="$ol_val"
1330                 fi
1331         done
1332         if test "$ol_arg" = "invalid" ; then
1333                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1334         fi
1335         ol_with_readline="$ol_arg"
1336
1337 else
1338         ol_with_readline="auto"
1339 fi
1340 # end --with-readline
1341
1342 # OpenLDAP --with-threads
1343         # Check whether --with-threads or --without-threads was given.
1344 if test "${with_threads+set}" = set; then
1345   withval="$with_threads"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto posix mach lwp yes no manual  ; do
1349                 if test "$withval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1355         fi
1356         ol_with_threads="$ol_arg"
1357
1358 else
1359         ol_with_threads="auto"
1360 fi
1361 # end --with-threads
1362
1363 # OpenLDAP --with-tls
1364         # Check whether --with-tls or --without-tls was given.
1365 if test "${with_tls+set}" = set; then
1366   withval="$with_tls"
1367   
1368         ol_arg=invalid
1369         for ol_val in auto ssleay openssl yes no  ; do
1370                 if test "$withval" = "$ol_val" ; then
1371                         ol_arg="$ol_val"
1372                 fi
1373         done
1374         if test "$ol_arg" = "invalid" ; then
1375                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1376         fi
1377         ol_with_tls="$ol_arg"
1378
1379 else
1380         ol_with_tls="auto"
1381 fi
1382 # end --with-tls
1383
1384 # OpenLDAP --with-yielding_select
1385         # Check whether --with-yielding_select or --without-yielding_select was given.
1386 if test "${with_yielding_select+set}" = set; then
1387   withval="$with_yielding_select"
1388   
1389         ol_arg=invalid
1390         for ol_val in auto yes no manual  ; do
1391                 if test "$withval" = "$ol_val" ; then
1392                         ol_arg="$ol_val"
1393                 fi
1394         done
1395         if test "$ol_arg" = "invalid" ; then
1396                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1397         fi
1398         ol_with_yielding_select="$ol_arg"
1399
1400 else
1401         ol_with_yielding_select="auto"
1402 fi
1403 # end --with-yielding_select
1404
1405
1406
1407 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1408 if test "${with_xxldapdoptions+set}" = set; then
1409   withval="$with_xxldapdoptions"
1410   :
1411 fi
1412
1413 # OpenLDAP --enable-ldapd
1414         # Check whether --enable-ldapd or --disable-ldapd was given.
1415 if test "${enable_ldapd+set}" = set; then
1416   enableval="$enable_ldapd"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1426         fi
1427         ol_enable_ldapd="$ol_arg"
1428
1429 else
1430         ol_enable_ldapd="no"
1431 fi
1432 # end --enable-ldapd
1433
1434 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1435 if test "${with_xxslapdoptions+set}" = set; then
1436   withval="$with_xxslapdoptions"
1437   :
1438 fi
1439
1440 # OpenLDAP --enable-slapd
1441         # Check whether --enable-slapd or --disable-slapd was given.
1442 if test "${enable_slapd+set}" = set; then
1443   enableval="$enable_slapd"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1453         fi
1454         ol_enable_slapd="$ol_arg"
1455
1456 else
1457         ol_enable_slapd="yes"
1458 fi
1459 # end --enable-slapd
1460 # OpenLDAP --enable-cleartext
1461         # Check whether --enable-cleartext or --disable-cleartext was given.
1462 if test "${enable_cleartext+set}" = set; then
1463   enableval="$enable_cleartext"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1473         fi
1474         ol_enable_cleartext="$ol_arg"
1475
1476 else
1477         ol_enable_cleartext="yes"
1478 fi
1479 # end --enable-cleartext
1480 # OpenLDAP --enable-crypt
1481         # Check whether --enable-crypt or --disable-crypt was given.
1482 if test "${enable_crypt+set}" = set; then
1483   enableval="$enable_crypt"
1484   
1485         ol_arg=invalid
1486         for ol_val in auto yes no ; do
1487                 if test "$enableval" = "$ol_val" ; then
1488                         ol_arg="$ol_val"
1489                 fi
1490         done
1491         if test "$ol_arg" = "invalid" ; then
1492                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1493         fi
1494         ol_enable_crypt="$ol_arg"
1495
1496 else
1497         ol_enable_crypt="auto"
1498 fi
1499 # end --enable-crypt
1500 # OpenLDAP --enable-modules
1501         # Check whether --enable-modules or --disable-modules was given.
1502 if test "${enable_modules+set}" = set; then
1503   enableval="$enable_modules"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1513         fi
1514         ol_enable_modules="$ol_arg"
1515
1516 else
1517         ol_enable_modules="no"
1518 fi
1519 # end --enable-modules
1520 # OpenLDAP --enable-multimaster
1521         # Check whether --enable-multimaster or --disable-multimaster was given.
1522 if test "${enable_multimaster+set}" = set; then
1523   enableval="$enable_multimaster"
1524   
1525         ol_arg=invalid
1526         for ol_val in auto yes no ; do
1527                 if test "$enableval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1533         fi
1534         ol_enable_multimaster="$ol_arg"
1535
1536 else
1537         ol_enable_multimaster="no"
1538 fi
1539 # end --enable-multimaster
1540 # OpenLDAP --enable-phonetic
1541         # Check whether --enable-phonetic or --disable-phonetic was given.
1542 if test "${enable_phonetic+set}" = set; then
1543   enableval="$enable_phonetic"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no ; do
1547                 if test "$enableval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1553         fi
1554         ol_enable_phonetic="$ol_arg"
1555
1556 else
1557         ol_enable_phonetic="no"
1558 fi
1559 # end --enable-phonetic
1560 # OpenLDAP --enable-quipu
1561         # Check whether --enable-quipu or --disable-quipu was given.
1562 if test "${enable_quipu+set}" = set; then
1563   enableval="$enable_quipu"
1564   
1565         ol_arg=invalid
1566         for ol_val in auto yes no ; do
1567                 if test "$enableval" = "$ol_val" ; then
1568                         ol_arg="$ol_val"
1569                 fi
1570         done
1571         if test "$ol_arg" = "invalid" ; then
1572                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1573         fi
1574         ol_enable_quipu="$ol_arg"
1575
1576 else
1577         ol_enable_quipu="no"
1578 fi
1579 # end --enable-quipu
1580 # OpenLDAP --enable-rlookups
1581         # Check whether --enable-rlookups or --disable-rlookups was given.
1582 if test "${enable_rlookups+set}" = set; then
1583   enableval="$enable_rlookups"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto yes no ; do
1587                 if test "$enableval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1593         fi
1594         ol_enable_rlookups="$ol_arg"
1595
1596 else
1597         ol_enable_rlookups="auto"
1598 fi
1599 # end --enable-rlookups
1600 # OpenLDAP --enable-wrappers
1601         # Check whether --enable-wrappers or --disable-wrappers was given.
1602 if test "${enable_wrappers+set}" = set; then
1603   enableval="$enable_wrappers"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto yes no ; do
1607                 if test "$enableval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1613         fi
1614         ol_enable_wrappers="$ol_arg"
1615
1616 else
1617         ol_enable_wrappers="no"
1618 fi
1619 # end --enable-wrappers
1620
1621 # OpenLDAP --enable-bdb2
1622         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1623 if test "${enable_bdb2+set}" = set; then
1624   enableval="$enable_bdb2"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto yes no ; do
1628                 if test "$enableval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1634         fi
1635         ol_enable_bdb2="$ol_arg"
1636
1637 else
1638         ol_enable_bdb2="no"
1639 fi
1640 # end --enable-bdb2
1641 # OpenLDAP --with-bdb2_module
1642         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1643 if test "${with_bdb2_module+set}" = set; then
1644   withval="$with_bdb2_module"
1645   
1646         ol_arg=invalid
1647         for ol_val in static dynamic ; do
1648                 if test "$withval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1654         fi
1655         ol_with_bdb2_module="$ol_arg"
1656
1657 else
1658         ol_with_bdb2_module="static"
1659 fi
1660 # end --with-bdb2_module
1661
1662 # OpenLDAP --enable-ldap
1663         # Check whether --enable-ldap or --disable-ldap was given.
1664 if test "${enable_ldap+set}" = set; then
1665   enableval="$enable_ldap"
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-ldap" 1>&2; exit 1; }
1675         fi
1676         ol_enable_ldap="$ol_arg"
1677
1678 else
1679         ol_enable_ldap="no"
1680 fi
1681 # end --enable-ldap
1682 # OpenLDAP --with-ldap_module
1683         # Check whether --with-ldap_module or --without-ldap_module was given.
1684 if test "${with_ldap_module+set}" = set; then
1685   withval="$with_ldap_module"
1686   
1687         ol_arg=invalid
1688         for ol_val in static dynamic ; do
1689                 if test "$withval" = "$ol_val" ; then
1690                         ol_arg="$ol_val"
1691                 fi
1692         done
1693         if test "$ol_arg" = "invalid" ; then
1694                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1695         fi
1696         ol_with_ldap_module="$ol_arg"
1697
1698 else
1699         ol_with_ldap_module="static"
1700 fi
1701 # end --with-ldap_module
1702
1703 # OpenLDAP --enable-ldbm
1704         # Check whether --enable-ldbm or --disable-ldbm was given.
1705 if test "${enable_ldbm+set}" = set; then
1706   enableval="$enable_ldbm"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$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 $enableval for --enable-ldbm" 1>&2; exit 1; }
1716         fi
1717         ol_enable_ldbm="$ol_arg"
1718
1719 else
1720         ol_enable_ldbm="yes"
1721 fi
1722 # end --enable-ldbm
1723 # OpenLDAP --with-ldbm_module
1724         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1725 if test "${with_ldbm_module+set}" = set; then
1726   withval="$with_ldbm_module"
1727   
1728         ol_arg=invalid
1729         for ol_val in static dynamic ; do
1730                 if test "$withval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1736         fi
1737         ol_with_ldbm_module="$ol_arg"
1738
1739 else
1740         ol_with_ldbm_module="static"
1741 fi
1742 # end --with-ldbm_module
1743
1744 # OpenLDAP --with-ldbm_api
1745         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1746 if test "${with_ldbm_api+set}" = set; then
1747   withval="$with_ldbm_api"
1748   
1749         ol_arg=invalid
1750         for ol_val in auto db2 db mdbm gdbm ndbm manual ; 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-ldbm_api" 1>&2; exit 1; }
1757         fi
1758         ol_with_ldbm_api="$ol_arg"
1759
1760 else
1761         ol_with_ldbm_api="auto"
1762 fi
1763 # end --with-ldbm_api
1764
1765 # OpenLDAP --with-ldbm_type
1766         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1767 if test "${with_ldbm_type+set}" = set; then
1768   withval="$with_ldbm_type"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto btree hash ; do
1772                 if test "$withval" = "$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 $withval for --with-ldbm_type" 1>&2; exit 1; }
1778         fi
1779         ol_with_ldbm_type="$ol_arg"
1780
1781 else
1782         ol_with_ldbm_type="auto"
1783 fi
1784 # end --with-ldbm_type
1785
1786
1787 # OpenLDAP --enable-passwd
1788         # Check whether --enable-passwd or --disable-passwd was given.
1789 if test "${enable_passwd+set}" = set; then
1790   enableval="$enable_passwd"
1791   
1792         ol_arg=invalid
1793         for ol_val in auto yes no ; do
1794                 if test "$enableval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1800         fi
1801         ol_enable_passwd="$ol_arg"
1802
1803 else
1804         ol_enable_passwd="no"
1805 fi
1806 # end --enable-passwd
1807 # OpenLDAP --with-passwd_module
1808         # Check whether --with-passwd_module or --without-passwd_module was given.
1809 if test "${with_passwd_module+set}" = set; then
1810   withval="$with_passwd_module"
1811   
1812         ol_arg=invalid
1813         for ol_val in static dynamic ; do
1814                 if test "$withval" = "$ol_val" ; then
1815                         ol_arg="$ol_val"
1816                 fi
1817         done
1818         if test "$ol_arg" = "invalid" ; then
1819                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1820         fi
1821         ol_with_passwd_module="$ol_arg"
1822
1823 else
1824         ol_with_passwd_module="static"
1825 fi
1826 # end --with-passwd_module
1827
1828 # OpenLDAP --enable-perl
1829         # Check whether --enable-perl or --disable-perl was given.
1830 if test "${enable_perl+set}" = set; then
1831   enableval="$enable_perl"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1841         fi
1842         ol_enable_perl="$ol_arg"
1843
1844 else
1845         ol_enable_perl="no"
1846 fi
1847 # end --enable-perl
1848 # OpenLDAP --with-perl_module
1849         # Check whether --with-perl_module or --without-perl_module was given.
1850 if test "${with_perl_module+set}" = set; then
1851   withval="$with_perl_module"
1852   
1853         ol_arg=invalid
1854         for ol_val in static dynamic ; do
1855                 if test "$withval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1861         fi
1862         ol_with_perl_module="$ol_arg"
1863
1864 else
1865         ol_with_perl_module="static"
1866 fi
1867 # end --with-perl_module
1868
1869 # OpenLDAP --enable-shell
1870         # Check whether --enable-shell or --disable-shell was given.
1871 if test "${enable_shell+set}" = set; then
1872   enableval="$enable_shell"
1873   
1874         ol_arg=invalid
1875         for ol_val in auto yes no ; do
1876                 if test "$enableval" = "$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 $enableval for --enable-shell" 1>&2; exit 1; }
1882         fi
1883         ol_enable_shell="$ol_arg"
1884
1885 else
1886         ol_enable_shell="no"
1887 fi
1888 # end --enable-shell
1889 # OpenLDAP --with-shell_module
1890         # Check whether --with-shell_module or --without-shell_module was given.
1891 if test "${with_shell_module+set}" = set; then
1892   withval="$with_shell_module"
1893   
1894         ol_arg=invalid
1895         for ol_val in static dynamic ; do
1896                 if test "$withval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1902         fi
1903         ol_with_shell_module="$ol_arg"
1904
1905 else
1906         ol_with_shell_module="static"
1907 fi
1908 # end --with-shell_module
1909
1910 # OpenLDAP --enable-tcl
1911         # Check whether --enable-tcl or --disable-tcl was given.
1912 if test "${enable_tcl+set}" = set; then
1913   enableval="$enable_tcl"
1914   
1915         ol_arg=invalid
1916         for ol_val in auto yes no ; do
1917                 if test "$enableval" = "$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 $enableval for --enable-tcl" 1>&2; exit 1; }
1923         fi
1924         ol_enable_tcl="$ol_arg"
1925
1926 else
1927         ol_enable_tcl="no"
1928 fi
1929 # end --enable-tcl
1930 # OpenLDAP --with-tcl_module
1931         # Check whether --with-tcl_module or --without-tcl_module was given.
1932 if test "${with_tcl_module+set}" = set; then
1933   withval="$with_tcl_module"
1934   
1935         ol_arg=invalid
1936         for ol_val in static dynamic ; do
1937                 if test "$withval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1943         fi
1944         ol_with_tcl_module="$ol_arg"
1945
1946 else
1947         ol_with_tcl_module="static"
1948 fi
1949 # end --with-tcl_module
1950
1951
1952 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1953 if test "${with_xxslurpdoptions+set}" = set; then
1954   withval="$with_xxslurpdoptions"
1955   :
1956 fi
1957
1958 # OpenLDAP --enable-slurpd
1959         # Check whether --enable-slurpd or --disable-slurpd was given.
1960 if test "${enable_slurpd+set}" = set; then
1961   enableval="$enable_slurpd"
1962   
1963         ol_arg=invalid
1964         for ol_val in auto yes no ; do
1965                 if test "$enableval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1971         fi
1972         ol_enable_slurpd="$ol_arg"
1973
1974 else
1975         ol_enable_slurpd="auto"
1976 fi
1977 # end --enable-slurpd
1978
1979 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1980 if test "${with_xxliboptions+set}" = set; then
1981   withval="$with_xxliboptions"
1982   :
1983 fi
1984
1985 # Check whether --enable-static or --disable-static was given.
1986 if test "${enable_static+set}" = set; then
1987   enableval="$enable_static"
1988   p=${PACKAGE-default}
1989 case "$enableval" in
1990 yes) enable_static=yes ;;
1991 no) enable_static=no ;;
1992 *)
1993   enable_static=no
1994   # Look at the argument we got.  We use all the common list separators.
1995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1996   for pkg in $enableval; do
1997     if test "X$pkg" = "X$p"; then
1998       enable_static=yes
1999     fi
2000   done
2001   IFS="$ac_save_ifs"
2002   ;;
2003 esac
2004 else
2005   enable_static=yes
2006 fi
2007
2008 # Check whether --enable-shared or --disable-shared was given.
2009 if test "${enable_shared+set}" = set; then
2010   enableval="$enable_shared"
2011   p=${PACKAGE-default}
2012 case "$enableval" in
2013 yes) enable_shared=yes ;;
2014 no) enable_shared=no ;;
2015 *)
2016   enable_shared=no
2017   # Look at the argument we got.  We use all the common list separators.
2018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2019   for pkg in $enableval; do
2020     if test "X$pkg" = "X$p"; then
2021       enable_shared=yes
2022     fi
2023   done
2024   IFS="$ac_save_ifs"
2025   ;;
2026 esac
2027 else
2028   enable_shared=yes
2029 fi
2030
2031
2032 # validate options
2033 if test $ol_enable_dns = yes ; then
2034         if test $ol_enable_referrals = no ; then
2035                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2036         fi
2037         if test $ol_enable_referrals = auto ; then
2038                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2039                 ol_enable_referrals=yes
2040         fi
2041 fi
2042
2043 if test $ol_enable_slapd = no ; then
2044                 if test $ol_enable_bdb2 = yes ; then
2045                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2046         fi
2047         if test $ol_enable_ldap = yes ; then
2048                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2049         fi
2050         if test $ol_enable_ldbm = yes ; then
2051                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2052         fi
2053         if test $ol_enable_passwd = yes ; then
2054                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2055         fi
2056         if test $ol_enable_perl = yes ; then
2057                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2058         fi
2059         if test $ol_enable_shell = yes ; then
2060                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2061         fi
2062         if test $ol_enable_tcl = yes ; then
2063                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2064         fi
2065         if test $ol_enable_modules = yes ; then
2066                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2067         fi
2068         if test $ol_enable_multimaster = yes ; then
2069                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2070         fi
2071         if test $ol_enable_wrappers = yes ; then
2072                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2073         fi
2074         if test $ol_enable_phonetic = yes ; then
2075                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2076         fi
2077         if test $ol_enable_quipu = yes ; then
2078                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2079         fi
2080         if test $ol_enable_rlookups = yes ; then
2081                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2082         fi
2083         if test $ol_with_ldbm_api != auto ; then
2084                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2085         fi
2086         if test $ol_with_ldbm_type != auto ; then
2087                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2088         fi
2089         if test $ol_with_bdb2_module != static ; then
2090                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2091         fi
2092         if test $ol_with_ldap_module != static ; then
2093                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2094         fi
2095         if test $ol_with_ldbm_module != static ; then
2096                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2097         fi
2098         if test $ol_with_passwd_module != static ; then
2099                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2100         fi
2101         if test $ol_with_perl_module != static ; then
2102                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2103         fi
2104         if test $ol_with_shell_module != static ; then
2105                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2106         fi
2107         if test $ol_with_tcl_module != static ; then
2108                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2109         fi
2110         if test $ol_enable_slurpd = yes ; then
2111                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2112         fi
2113
2114         # force settings to no
2115         ol_enable_bdb2=no
2116         ol_enable_ldap=no
2117         ol_enable_ldbm=no
2118         ol_enable_passwd=no
2119         ol_enable_perl=no
2120         ol_enable_shell=no
2121         ol_enable_tcl=no
2122
2123         ol_enable_modules=no
2124         ol_enable_multimaster=no
2125         ol_enable_phonetic=no
2126         ol_enable_quipu=no
2127         ol_enable_rlookups=no
2128         ol_enable_wrappers=no
2129
2130         ol_with_ldbm_api=no
2131         ol_with_ldbm_type=no
2132
2133         ol_with_bdb2_module=static
2134         ol_with_ldap_module=static
2135         ol_with_ldbm_module=static
2136         ol_with_passwd_module=static
2137         ol_with_perl_module=static
2138         ol_with_shell_module=static
2139         ol_with_tcl_module=static
2140
2141         ol_enable_slurpd=no
2142
2143 elif test $ol_enable_ldbm = no ; then
2144         
2145         if test $ol_with_ldbm_api != auto ; then
2146                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2147         fi
2148
2149         if test $ol_with_ldbm_type != auto ; then
2150                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2151         fi
2152
2153         if test $ol_with_ldbm_module != static ; then
2154                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2155         fi
2156
2157         if test $ol_enable_bdb2 = yes ; then
2158                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2159         fi
2160
2161         if test $ol_enable_modules != yes -a \
2162                 $ol_enable_ldap = no -a \
2163                 $ol_enable_passwd = no -a \
2164                 $ol_enable_perl = no -a \
2165                 $ol_enable_shell = no -a \
2166                 $ol_enable_tcl = no ; then
2167                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2168         fi
2169
2170         ol_with_ldbm_api=no
2171         ol_with_ldbm_type=no
2172         ol_with_ldbm_module=static
2173
2174 elif test $ol_enable_bdb2 = yes ; then
2175         
2176         if test $ol_with_ldbm_api != auto -a \
2177                 $ol_with_ldbm_api != db2 ; then
2178                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2179         fi
2180
2181         ol_with_ldbm_api=db2
2182
2183 else
2184         
2185         if test $ol_enable_bdb2 != no ; then
2186                 if test $ol_with_ldbm_api != auto -a \
2187                         $ol_with_ldbm_api != db2 ; then
2188                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2189                         ol_enable_bdb2=no
2190                 fi
2191         fi
2192
2193         if test $ol_with_ldbm_api = gdbm -a \
2194                 $ol_with_ldbm_type = btree ; then
2195                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2196         fi
2197         if test $ol_with_ldbm_api = mdbm -a \
2198                 $ol_with_ldbm_type = btree ; then
2199                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2200         fi
2201         if test $ol_with_ldbm_api = ndbm -a \
2202                 $ol_with_ldbm_type = btree ; then
2203                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2204         fi
2205 fi
2206
2207 if test $ol_enable_slurpd = yes ; then
2208                 if test $ol_with_threads = no ; then
2209                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2210         fi
2211 fi
2212
2213 echo "$ac_t""done" 1>&6
2214
2215 ## Initialize vars
2216 LDAP_LIBS=
2217 LDIF_LIBS=
2218 LDBM_LIBS=
2219 LTHREAD_LIBS=
2220 LUTIL_LIBS=
2221
2222 LDAPD_LIBS=
2223 SLAPD_LIBS=
2224 SLURPD_LIBS=
2225
2226 BUILD_LDAPD=no
2227 BUILD_SLAPD=no
2228 BUILD_SLURPD=no
2229
2230 BUILD_BDB2=no
2231 BUILD_LDAP=no
2232 BUILD_LDBM=no
2233 BUILD_PASSWD=no
2234 BUILD_PERL=no
2235 BUILD_QUIPU=no
2236 BUILD_SHELL=no
2237 BUILD_TCL=no
2238 BUILD_THREAD=no
2239
2240 BUILD_BDB2_DYNAMIC=static
2241 BUILD_LDAP_DYNAMIC=static
2242 BUILD_LDBM_DYNAMIC=static
2243 BUILD_PASSWD_DYNAMIC=static
2244 BUILD_PERL_DYNAMIC=static
2245 BUILD_SHELL_DYNAMIC=static
2246 BUILD_TCL_DYNAMIC=static
2247
2248 SLAPD_MODULES_LDFLAGS=
2249 SLAPD_MODULES_CPPFLAGS=
2250 SLAPD_MODULES_LIST=
2251
2252 SLAPD_PERL_LDFLAGS=
2253 SLAPD_PERL_CPPFLAGS=
2254
2255 KRB_LIBS=
2256 READLINE_LIBS=
2257 SASL_LIBS=
2258 TERMCAP_LIBS=
2259 TLS_LIBS=
2260 MODULES_LIBS=
2261
2262
2263
2264 cat >> confdefs.h <<\EOF
2265 #define HAVE_MKVERSION 1
2266 EOF
2267
2268
2269
2270
2271
2272 ol_aix_threads=no
2273 case "$target" in
2274 *-*-aix*)       if test -z "$CC" ; then
2275                 case "$ol_with_threads" in
2276                 auto | yes |  posix) ol_aix_threads=yes ;;
2277                 esac
2278         fi
2279 ;;
2280 esac
2281
2282 if test $ol_aix_threads = yes ; then
2283         if test -z "${CC}" ; then
2284                 for ac_prog in cc_r xlc_r cc
2285 do
2286 # Extract the first word of "$ac_prog", so it can be a program name with args.
2287 set dummy $ac_prog; ac_word=$2
2288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2289 echo "configure:2290: checking for $ac_word" >&5
2290 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   if test -n "$CC"; then
2294   ac_cv_prog_CC="$CC" # Let the user override the test.
2295 else
2296   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2297   ac_dummy="$PATH"
2298   for ac_dir in $ac_dummy; do
2299     test -z "$ac_dir" && ac_dir=.
2300     if test -f $ac_dir/$ac_word; then
2301       ac_cv_prog_CC="$ac_prog"
2302       break
2303     fi
2304   done
2305   IFS="$ac_save_ifs"
2306 fi
2307 fi
2308 CC="$ac_cv_prog_CC"
2309 if test -n "$CC"; then
2310   echo "$ac_t""$CC" 1>&6
2311 else
2312   echo "$ac_t""no" 1>&6
2313 fi
2314
2315 test -n "$CC" && break
2316 done
2317
2318
2319                 if test "$CC" = cc ; then
2320                                                 if test $ol_with_threads != auto ; then
2321                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2322                         else
2323                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2324                         fi
2325                         ol_with_threads=no
2326                 fi
2327         fi
2328
2329         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2330                 ol_with_threads=posix
2331                 ol_cv_pthread_create=yes
2332         fi
2333 fi
2334
2335 if test -z "${CC}"; then
2336         for ac_prog in cc
2337 do
2338 # Extract the first word of "$ac_prog", so it can be a program name with args.
2339 set dummy $ac_prog; ac_word=$2
2340 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2341 echo "configure:2342: checking for $ac_word" >&5
2342 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2343   echo $ac_n "(cached) $ac_c" 1>&6
2344 else
2345   if test -n "$CC"; then
2346   ac_cv_prog_CC="$CC" # Let the user override the test.
2347 else
2348   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2349   ac_dummy="$PATH"
2350   for ac_dir in $ac_dummy; do
2351     test -z "$ac_dir" && ac_dir=.
2352     if test -f $ac_dir/$ac_word; then
2353       ac_cv_prog_CC="$ac_prog"
2354       break
2355     fi
2356   done
2357   IFS="$ac_save_ifs"
2358 fi
2359 fi
2360 CC="$ac_cv_prog_CC"
2361 if test -n "$CC"; then
2362   echo "$ac_t""$CC" 1>&6
2363 else
2364   echo "$ac_t""no" 1>&6
2365 fi
2366
2367 test -n "$CC" && break
2368 done
2369
2370 fi
2371
2372
2373
2374 # Check whether --enable-fast-install or --disable-fast-install was given.
2375 if test "${enable_fast_install+set}" = set; then
2376   enableval="$enable_fast_install"
2377   p=${PACKAGE-default}
2378 case "$enableval" in
2379 yes) enable_fast_install=yes ;;
2380 no) enable_fast_install=no ;;
2381 *)
2382   enable_fast_install=no
2383   # Look at the argument we got.  We use all the common list separators.
2384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2385   for pkg in $enableval; do
2386     if test "X$pkg" = "X$p"; then
2387       enable_fast_install=yes
2388     fi
2389   done
2390   IFS="$ac_save_ifs"
2391   ;;
2392 esac
2393 else
2394   enable_fast_install=yes
2395 fi
2396
2397 # Extract the first word of "ranlib", so it can be a program name with args.
2398 set dummy ranlib; ac_word=$2
2399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2400 echo "configure:2401: checking for $ac_word" >&5
2401 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2402   echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404   if test -n "$RANLIB"; then
2405   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2406 else
2407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2408   ac_dummy="$PATH"
2409   for ac_dir in $ac_dummy; do
2410     test -z "$ac_dir" && ac_dir=.
2411     if test -f $ac_dir/$ac_word; then
2412       ac_cv_prog_RANLIB="ranlib"
2413       break
2414     fi
2415   done
2416   IFS="$ac_save_ifs"
2417   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2418 fi
2419 fi
2420 RANLIB="$ac_cv_prog_RANLIB"
2421 if test -n "$RANLIB"; then
2422   echo "$ac_t""$RANLIB" 1>&6
2423 else
2424   echo "$ac_t""no" 1>&6
2425 fi
2426
2427 # Extract the first word of "gcc", so it can be a program name with args.
2428 set dummy gcc; ac_word=$2
2429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2430 echo "configure:2431: checking for $ac_word" >&5
2431 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2432   echo $ac_n "(cached) $ac_c" 1>&6
2433 else
2434   if test -n "$CC"; then
2435   ac_cv_prog_CC="$CC" # Let the user override the test.
2436 else
2437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2438   ac_dummy="$PATH"
2439   for ac_dir in $ac_dummy; do
2440     test -z "$ac_dir" && ac_dir=.
2441     if test -f $ac_dir/$ac_word; then
2442       ac_cv_prog_CC="gcc"
2443       break
2444     fi
2445   done
2446   IFS="$ac_save_ifs"
2447 fi
2448 fi
2449 CC="$ac_cv_prog_CC"
2450 if test -n "$CC"; then
2451   echo "$ac_t""$CC" 1>&6
2452 else
2453   echo "$ac_t""no" 1>&6
2454 fi
2455
2456 if test -z "$CC"; then
2457   # Extract the first word of "cc", so it can be a program name with args.
2458 set dummy cc; ac_word=$2
2459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2460 echo "configure:2461: checking for $ac_word" >&5
2461 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2462   echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464   if test -n "$CC"; then
2465   ac_cv_prog_CC="$CC" # Let the user override the test.
2466 else
2467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2468   ac_prog_rejected=no
2469   ac_dummy="$PATH"
2470   for ac_dir in $ac_dummy; do
2471     test -z "$ac_dir" && ac_dir=.
2472     if test -f $ac_dir/$ac_word; then
2473       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2474         ac_prog_rejected=yes
2475         continue
2476       fi
2477       ac_cv_prog_CC="cc"
2478       break
2479     fi
2480   done
2481   IFS="$ac_save_ifs"
2482 if test $ac_prog_rejected = yes; then
2483   # We found a bogon in the path, so make sure we never use it.
2484   set dummy $ac_cv_prog_CC
2485   shift
2486   if test $# -gt 0; then
2487     # We chose a different compiler from the bogus one.
2488     # However, it has the same basename, so the bogon will be chosen
2489     # first if we set CC to just the basename; use the full file name.
2490     shift
2491     set dummy "$ac_dir/$ac_word" "$@"
2492     shift
2493     ac_cv_prog_CC="$@"
2494   fi
2495 fi
2496 fi
2497 fi
2498 CC="$ac_cv_prog_CC"
2499 if test -n "$CC"; then
2500   echo "$ac_t""$CC" 1>&6
2501 else
2502   echo "$ac_t""no" 1>&6
2503 fi
2504
2505   if test -z "$CC"; then
2506     case "`uname -s`" in
2507     *win32* | *WIN32*)
2508       # Extract the first word of "cl", so it can be a program name with args.
2509 set dummy cl; ac_word=$2
2510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2511 echo "configure:2512: checking for $ac_word" >&5
2512 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2513   echo $ac_n "(cached) $ac_c" 1>&6
2514 else
2515   if test -n "$CC"; then
2516   ac_cv_prog_CC="$CC" # Let the user override the test.
2517 else
2518   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2519   ac_dummy="$PATH"
2520   for ac_dir in $ac_dummy; do
2521     test -z "$ac_dir" && ac_dir=.
2522     if test -f $ac_dir/$ac_word; then
2523       ac_cv_prog_CC="cl"
2524       break
2525     fi
2526   done
2527   IFS="$ac_save_ifs"
2528 fi
2529 fi
2530 CC="$ac_cv_prog_CC"
2531 if test -n "$CC"; then
2532   echo "$ac_t""$CC" 1>&6
2533 else
2534   echo "$ac_t""no" 1>&6
2535 fi
2536  ;;
2537     esac
2538   fi
2539   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2540 fi
2541
2542 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2543 echo "configure:2544: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2544
2545 ac_ext=c
2546 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2547 ac_cpp='$CPP $CPPFLAGS'
2548 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2549 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2550 cross_compiling=$ac_cv_prog_cc_cross
2551
2552 cat > conftest.$ac_ext << EOF
2553
2554 #line 2555 "configure"
2555 #include "confdefs.h"
2556
2557 main(){return(0);}
2558 EOF
2559 if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2560   ac_cv_prog_cc_works=yes
2561   # If we can't run a trivial program, we are probably using a cross compiler.
2562   if (./conftest; exit) 2>/dev/null; then
2563     ac_cv_prog_cc_cross=no
2564   else
2565     ac_cv_prog_cc_cross=yes
2566   fi
2567 else
2568   echo "configure: failed program was:" >&5
2569   cat conftest.$ac_ext >&5
2570   ac_cv_prog_cc_works=no
2571 fi
2572 rm -fr conftest*
2573 ac_ext=c
2574 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2575 ac_cpp='$CPP $CPPFLAGS'
2576 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2577 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2578 cross_compiling=$ac_cv_prog_cc_cross
2579
2580 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2581 if test $ac_cv_prog_cc_works = no; then
2582   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2583 fi
2584 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2585 echo "configure:2586: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2586 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2587 cross_compiling=$ac_cv_prog_cc_cross
2588
2589 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2590 echo "configure:2591: checking whether we are using GNU C" >&5
2591 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2592   echo $ac_n "(cached) $ac_c" 1>&6
2593 else
2594   cat > conftest.c <<EOF
2595 #ifdef __GNUC__
2596   yes;
2597 #endif
2598 EOF
2599 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2600   ac_cv_prog_gcc=yes
2601 else
2602   ac_cv_prog_gcc=no
2603 fi
2604 fi
2605
2606 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2607
2608 if test $ac_cv_prog_gcc = yes; then
2609   GCC=yes
2610 else
2611   GCC=
2612 fi
2613
2614 ac_test_CFLAGS="${CFLAGS+set}"
2615 ac_save_CFLAGS="$CFLAGS"
2616 CFLAGS=
2617 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2618 echo "configure:2619: checking whether ${CC-cc} accepts -g" >&5
2619 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   echo 'void f(){}' > conftest.c
2623 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2624   ac_cv_prog_cc_g=yes
2625 else
2626   ac_cv_prog_cc_g=no
2627 fi
2628 rm -f conftest*
2629
2630 fi
2631
2632 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2633 if test "$ac_test_CFLAGS" = set; then
2634   CFLAGS="$ac_save_CFLAGS"
2635 elif test $ac_cv_prog_cc_g = yes; then
2636   if test "$GCC" = yes; then
2637     CFLAGS="-g -O2"
2638   else
2639     CFLAGS="-g"
2640   fi
2641 else
2642   if test "$GCC" = yes; then
2643     CFLAGS="-O2"
2644   else
2645     CFLAGS=
2646   fi
2647 fi
2648
2649 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2650 if test "${with_gnu_ld+set}" = set; then
2651   withval="$with_gnu_ld"
2652   test "$withval" = no || with_gnu_ld=yes
2653 else
2654   with_gnu_ld=no
2655 fi
2656
2657 ac_prog=ld
2658 if test "$ac_cv_prog_gcc" = yes; then
2659   # Check if gcc -print-prog-name=ld gives a path.
2660   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2661 echo "configure:2662: checking for ld used by GCC" >&5
2662   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2663   case "$ac_prog" in
2664     # Accept absolute paths.
2665     [\\/]* | [A-Za-z]:[\\/]*)
2666       re_direlt='/[^/][^/]*/\.\./'
2667       # Canonicalize the path of ld
2668       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2669       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2670         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2671       done
2672       test -z "$LD" && LD="$ac_prog"
2673       ;;
2674   "")
2675     # If it fails, then pretend we aren't using GCC.
2676     ac_prog=ld
2677     ;;
2678   *)
2679     # If it is relative, then search for the first ld in PATH.
2680     with_gnu_ld=unknown
2681     ;;
2682   esac
2683 elif test "$with_gnu_ld" = yes; then
2684   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2685 echo "configure:2686: checking for GNU ld" >&5
2686 else
2687   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2688 echo "configure:2689: checking for non-GNU ld" >&5
2689 fi
2690 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2691   echo $ac_n "(cached) $ac_c" 1>&6
2692 else
2693   if test -z "$LD"; then
2694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2695   for ac_dir in $PATH; do
2696     test -z "$ac_dir" && ac_dir=.
2697     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2698       ac_cv_path_LD="$ac_dir/$ac_prog"
2699       # Check to see if the program is GNU ld.  I'd rather use --version,
2700       # but apparently some GNU ld's only accept -v.
2701       # Break only if it was the GNU/non-GNU ld that we prefer.
2702       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2703         test "$with_gnu_ld" != no && break
2704       else
2705         test "$with_gnu_ld" != yes && break
2706       fi
2707     fi
2708   done
2709   IFS="$ac_save_ifs"
2710 else
2711   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2712 fi
2713 fi
2714
2715 LD="$ac_cv_path_LD"
2716 if test -n "$LD"; then
2717   echo "$ac_t""$LD" 1>&6
2718 else
2719   echo "$ac_t""no" 1>&6
2720 fi
2721 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2722
2723 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2724 echo "configure:2725: checking if the linker ($LD) is GNU ld" >&5
2725 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2729 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2730   ac_cv_prog_gnu_ld=yes
2731 else
2732   ac_cv_prog_gnu_ld=no
2733 fi
2734 fi
2735
2736 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2737
2738
2739 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2740 echo "configure:2741: checking for BSD-compatible nm" >&5
2741 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   if test -n "$NM"; then
2745   # Let the user override the test.
2746   ac_cv_path_NM="$NM"
2747 else
2748   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2749   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2750     test -z "$ac_dir" && ac_dir=.
2751     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2752       # Check to see if the nm accepts a BSD-compat flag.
2753       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2754       #   nm: unknown option "B" ignored
2755       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2756         ac_cv_path_NM="$ac_dir/nm -B"
2757         break
2758       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2759         ac_cv_path_NM="$ac_dir/nm -p"
2760         break
2761       else
2762         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2763         continue # so that we can try to find one that supports BSD flags
2764       fi
2765     fi
2766   done
2767   IFS="$ac_save_ifs"
2768   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2769 fi
2770 fi
2771
2772 NM="$ac_cv_path_NM"
2773 echo "$ac_t""$NM" 1>&6
2774
2775
2776 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2777 echo "configure:2778: checking whether ln -s works" >&5
2778 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2779   echo $ac_n "(cached) $ac_c" 1>&6
2780 else
2781   rm -f conftestdata
2782 if ln -s X conftestdata 2>/dev/null
2783 then
2784   rm -f conftestdata
2785   ac_cv_prog_LN_S="ln -s"
2786 else
2787   ac_cv_prog_LN_S=ln
2788 fi
2789 fi
2790 LN_S="$ac_cv_prog_LN_S"
2791 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2792   echo "$ac_t""yes" 1>&6
2793 else
2794   echo "$ac_t""no" 1>&6
2795 fi
2796
2797
2798 # Check for any special flags to pass to ltconfig.
2799 libtool_flags="--cache-file=$cache_file"
2800 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2801 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2802 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2803 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2804 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2805 libtool_flags="$libtool_flags --enable-dlopen"
2806
2807 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2808 if test "${enable_libtool_lock+set}" = set; then
2809   enableval="$enable_libtool_lock"
2810   :
2811 fi
2812
2813 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2814 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2815
2816 # Some flags need to be propagated to the compiler or linker for good
2817 # libtool support.
2818 case "$host" in
2819 *-*-irix6*)
2820   # Find out which ABI we are using.
2821   echo '#line 11 "configure/Which_ABI"' > conftest.$ac_ext
2822   if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2823     case "`/usr/bin/file conftest.o`" in
2824     *32-bit*)
2825       LD="${LD-ld} -32"
2826       ;;
2827     *N32*)
2828       LD="${LD-ld} -n32"
2829       ;;
2830     *64-bit*)
2831       LD="${LD-ld} -64"
2832       ;;
2833     esac
2834   fi
2835   rm -rf conftest*
2836   ;;
2837
2838 *-*-sco3.2v5*)
2839   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2840   SAVE_CFLAGS="$CFLAGS"
2841   CFLAGS="$CFLAGS -belf"
2842   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2843 echo "configure:2844: checking whether the C compiler needs -belf" >&5
2844 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   cat > conftest.$ac_ext <<EOF
2848 #line 2849 "configure"
2849 #include "confdefs.h"
2850
2851 int main() {
2852
2853 ; return 0; }
2854 EOF
2855 if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2856   rm -rf conftest*
2857   lt_cv_cc_needs_belf=yes
2858 else
2859   echo "configure: failed program was:" >&5
2860   cat conftest.$ac_ext >&5
2861   rm -rf conftest*
2862   lt_cv_cc_needs_belf=no
2863 fi
2864 rm -f conftest*
2865 fi
2866
2867 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2868   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2869     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2870     CFLAGS="$SAVE_CFLAGS"
2871   fi
2872   ;;
2873
2874
2875 esac
2876
2877
2878 # Save cache, so that ltconfig can load it
2879
2880
2881 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2882 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2883 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2884 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2885 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2886 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2887 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2888 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2889
2890 # Reload cache, that may have been modified by ltconfig
2891
2892
2893 # This can be used to rebuild libtool when needed
2894 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2895
2896 # Always use our own libtool.
2897 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2898
2899 # Redirect the config.log output again, so that the ltconfig log is not
2900 # clobbered by the next message.
2901 exec 5>>./config.log
2902
2903
2904 for ac_prog in mawk gawk nawk awk
2905 do
2906 # Extract the first word of "$ac_prog", so it can be a program name with args.
2907 set dummy $ac_prog; ac_word=$2
2908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2909 echo "configure:2910: checking for $ac_word" >&5
2910 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   if test -n "$AWK"; then
2914   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2915 else
2916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2917   ac_dummy="$PATH"
2918   for ac_dir in $ac_dummy; do
2919     test -z "$ac_dir" && ac_dir=.
2920     if test -f $ac_dir/$ac_word; then
2921       ac_cv_prog_AWK="$ac_prog"
2922       break
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926 fi
2927 fi
2928 AWK="$ac_cv_prog_AWK"
2929 if test -n "$AWK"; then
2930   echo "$ac_t""$AWK" 1>&6
2931 else
2932   echo "$ac_t""no" 1>&6
2933 fi
2934
2935 test -n "$AWK" && break
2936 done
2937
2938 # test for ln hardlink support
2939 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2940 echo "configure:2941: checking whether ln works" >&5
2941 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   rm -f conftest.src conftest.dst
2945 echo "conftest" > conftest.src
2946 if ln conftest.src conftest.dst 2>/dev/null
2947 then
2948   ol_cv_prog_LN_H="ln"
2949 else
2950   ol_cv_prog_LN_H="cp"
2951 fi
2952 rm -f conftest.src conftest.dst
2953
2954 fi
2955 LN_H="$ol_cv_prog_LN_H"
2956 if test "$ol_cv_prog_LN_H" = "ln"; then
2957         echo "$ac_t""yes" 1>&6
2958 else
2959         echo "$ac_t""no" 1>&6
2960 fi
2961
2962 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2963 echo "configure:2964: checking whether ln -s works" >&5
2964 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967   rm -f conftestdata
2968 if ln -s X conftestdata 2>/dev/null
2969 then
2970   rm -f conftestdata
2971   ac_cv_prog_LN_S="ln -s"
2972 else
2973   ac_cv_prog_LN_S=ln
2974 fi
2975 fi
2976 LN_S="$ac_cv_prog_LN_S"
2977 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2978   echo "$ac_t""yes" 1>&6
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983
2984 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2985         LN_S="$LN_H"
2986 fi
2987
2988 # Extract the first word of "sendmail", so it can be a program name with args.
2989 set dummy sendmail; ac_word=$2
2990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2991 echo "configure:2992: checking for $ac_word" >&5
2992 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   case "$SENDMAIL" in
2996   /*)
2997   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2998   ;;
2999   ?:/*)                  
3000   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3001   ;;
3002   *)
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3004   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3005   for ac_dir in $ac_dummy; do 
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/$ac_word; then
3008       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3009       break
3010     fi
3011   done
3012   IFS="$ac_save_ifs"
3013   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3014   ;;
3015 esac
3016 fi
3017 SENDMAIL="$ac_cv_path_SENDMAIL"
3018 if test -n "$SENDMAIL"; then
3019   echo "$ac_t""$SENDMAIL" 1>&6
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024 # Extract the first word of "vi", so it can be a program name with args.
3025 set dummy vi; ac_word=$2
3026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3027 echo "configure:3028: checking for $ac_word" >&5
3028 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   case "$EDITOR" in
3032   /*)
3033   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3034   ;;
3035   ?:/*)                  
3036   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3037   ;;
3038   *)
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH:/usr/ucb"
3041   for ac_dir in $ac_dummy; do 
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3050   ;;
3051 esac
3052 fi
3053 EDITOR="$ac_cv_path_EDITOR"
3054 if test -n "$EDITOR"; then
3055   echo "$ac_t""$EDITOR" 1>&6
3056 else
3057   echo "$ac_t""no" 1>&6
3058 fi
3059
3060 # Extract the first word of "finger", so it can be a program name with args.
3061 set dummy finger; ac_word=$2
3062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3063 echo "configure:3064: checking for $ac_word" >&5
3064 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   case "$FINGER" in
3068   /*)
3069   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3070   ;;
3071   ?:/*)                  
3072   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3073   ;;
3074   *)
3075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3076   ac_dummy="$PATH:/usr/ucb"
3077   for ac_dir in $ac_dummy; do 
3078     test -z "$ac_dir" && ac_dir=.
3079     if test -f $ac_dir/$ac_word; then
3080       ac_cv_path_FINGER="$ac_dir/$ac_word"
3081       break
3082     fi
3083   done
3084   IFS="$ac_save_ifs"
3085   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3086   ;;
3087 esac
3088 fi
3089 FINGER="$ac_cv_path_FINGER"
3090 if test -n "$FINGER"; then
3091   echo "$ac_t""$FINGER" 1>&6
3092 else
3093   echo "$ac_t""no" 1>&6
3094 fi
3095
3096
3097 ol_link_perl=no
3098 if test $ol_enable_perl != no ; then
3099         # Extract the first word of "perl", so it can be a program name with args.
3100 set dummy perl; ac_word=$2
3101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3102 echo "configure:3103: checking for $ac_word" >&5
3103 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
3104   echo $ac_n "(cached) $ac_c" 1>&6
3105 else
3106   case "$PERLBIN" in
3107   /*)
3108   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3109   ;;
3110   ?:/*)                  
3111   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3112   ;;
3113   *)
3114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3115   ac_dummy="$PATH"
3116   for ac_dir in $ac_dummy; do 
3117     test -z "$ac_dir" && ac_dir=.
3118     if test -f $ac_dir/$ac_word; then
3119       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3120       break
3121     fi
3122   done
3123   IFS="$ac_save_ifs"
3124   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3125   ;;
3126 esac
3127 fi
3128 PERLBIN="$ac_cv_path_PERLBIN"
3129 if test -n "$PERLBIN"; then
3130   echo "$ac_t""$PERLBIN" 1>&6
3131 else
3132   echo "$ac_t""no" 1>&6
3133 fi
3134
3135
3136         if test "no$PERLBIN" = "no" ; then
3137                 if test $ol_enable_perl = yes ; then
3138                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3139                 fi
3140
3141         else
3142                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3143                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3144
3145                                 ol_link_perl=yes
3146         fi
3147 fi
3148
3149 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3150 echo "configure:3151: checking how to run the C preprocessor" >&5
3151 # On Suns, sometimes $CPP names a directory.
3152 if test -n "$CPP" && test -d "$CPP"; then
3153   CPP=
3154 fi
3155 if test -z "$CPP"; then
3156 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159     # This must be in double quotes, not single quotes, because CPP may get
3160   # substituted into the Makefile and "${CC-cc}" will confuse make.
3161   CPP="${CC-cc} -E"
3162   # On the NeXT, cc -E runs the code through the compiler's parser,
3163   # not just through cpp.
3164   cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <assert.h>
3168 Syntax Error
3169 EOF
3170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3171 { (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3173 if test -z "$ac_err"; then
3174   :
3175 else
3176   echo "$ac_err" >&5
3177   echo "configure: failed program was:" >&5
3178   cat conftest.$ac_ext >&5
3179   rm -rf conftest*
3180   CPP="${CC-cc} -E -traditional-cpp"
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184 #include <assert.h>
3185 Syntax Error
3186 EOF
3187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3188 { (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3190 if test -z "$ac_err"; then
3191   :
3192 else
3193   echo "$ac_err" >&5
3194   echo "configure: failed program was:" >&5
3195   cat conftest.$ac_ext >&5
3196   rm -rf conftest*
3197   CPP="${CC-cc} -nologo -E"
3198   cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201 #include <assert.h>
3202 Syntax Error
3203 EOF
3204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3205 { (eval echo configure:3206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3207 if test -z "$ac_err"; then
3208   :
3209 else
3210   echo "$ac_err" >&5
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   CPP=/lib/cpp
3215 fi
3216 rm -f conftest*
3217 fi
3218 rm -f conftest*
3219 fi
3220 rm -f conftest*
3221   ac_cv_prog_CPP="$CPP"
3222 fi
3223   CPP="$ac_cv_prog_CPP"
3224 else
3225   ac_cv_prog_CPP="$CPP"
3226 fi
3227 echo "$ac_t""$CPP" 1>&6
3228
3229
3230 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3231         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3232
3233 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3234         echo "configure: warning: programs compiled here do run here..." 1>&2
3235         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3236
3237 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3238         echo "configure: warning: programs compiled here do not run here..." 1>&2
3239         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3240 fi
3241
3242 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3243 echo "configure:3244: checking for AIX" >&5
3244 cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 #ifdef _AIX
3248   yes
3249 #endif
3250
3251 EOF
3252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3253   egrep "yes" >/dev/null 2>&1; then
3254   rm -rf conftest*
3255   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3256 #define _ALL_SOURCE 1
3257 EOF
3258
3259 else
3260   rm -rf conftest*
3261   echo "$ac_t""no" 1>&6
3262 fi
3263 rm -f conftest*
3264
3265
3266 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3267 echo "configure:3268: checking for POSIXized ISC" >&5
3268 if test -d /etc/conf/kconfig.d &&
3269   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3270 then
3271   echo "$ac_t""yes" 1>&6
3272   ISC=yes # If later tests want to check for ISC.
3273   cat >> confdefs.h <<\EOF
3274 #define _POSIX_SOURCE 1
3275 EOF
3276
3277   if test "$GCC" = yes; then
3278     CC="$CC -posix"
3279   else
3280     CC="$CC -Xp"
3281   fi
3282 else
3283   echo "$ac_t""no" 1>&6
3284   ISC=
3285 fi
3286
3287 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3288 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3289 echo "configure:3290: checking for minix/config.h" >&5
3290 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <minix/config.h>
3297 EOF
3298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3299 { (eval echo configure:3300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3301 if test -z "$ac_err"; then
3302   rm -rf conftest*
3303   eval "ac_cv_header_$ac_safe=yes"
3304 else
3305   echo "$ac_err" >&5
3306   echo "configure: failed program was:" >&5
3307   cat conftest.$ac_ext >&5
3308   rm -rf conftest*
3309   eval "ac_cv_header_$ac_safe=no"
3310 fi
3311 rm -f conftest*
3312 fi
3313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3314   echo "$ac_t""yes" 1>&6
3315   MINIX=yes
3316 else
3317   echo "$ac_t""no" 1>&6
3318 MINIX=
3319 fi
3320
3321 if test "$MINIX" = yes; then
3322   cat >> confdefs.h <<\EOF
3323 #define _POSIX_SOURCE 1
3324 EOF
3325
3326   cat >> confdefs.h <<\EOF
3327 #define _POSIX_1_SOURCE 2
3328 EOF
3329
3330   cat >> confdefs.h <<\EOF
3331 #define _MINIX 1
3332 EOF
3333
3334 fi
3335
3336
3337 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3338 echo "configure:3339: checking for Cygwin environment" >&5
3339 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3340   echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342   cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345
3346 int main() {
3347
3348 #ifndef __CYGWIN__
3349 #define __CYGWIN__ __CYGWIN32__
3350 #endif
3351 return __CYGWIN__;
3352 ; return 0; }
3353 EOF
3354 if { (eval echo configure:3355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3355   rm -rf conftest*
3356   ac_cv_cygwin=yes
3357 else
3358   echo "configure: failed program was:" >&5
3359   cat conftest.$ac_ext >&5
3360   rm -rf conftest*
3361   ac_cv_cygwin=no
3362 fi
3363 rm -f conftest*
3364 rm -f conftest*
3365 fi
3366
3367 echo "$ac_t""$ac_cv_cygwin" 1>&6
3368 CYGWIN=
3369 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3370 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3371 echo "configure:3372: checking for mingw32 environment" >&5
3372 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3373   echo $ac_n "(cached) $ac_c" 1>&6
3374 else
3375   cat > conftest.$ac_ext <<EOF
3376 #line 3377 "configure"
3377 #include "confdefs.h"
3378
3379 int main() {
3380 return __MINGW32__;
3381 ; return 0; }
3382 EOF
3383 if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3384   rm -rf conftest*
3385   ac_cv_mingw32=yes
3386 else
3387   echo "configure: failed program was:" >&5
3388   cat conftest.$ac_ext >&5
3389   rm -rf conftest*
3390   ac_cv_mingw32=no
3391 fi
3392 rm -f conftest*
3393 rm -f conftest*
3394 fi
3395
3396 echo "$ac_t""$ac_cv_mingw32" 1>&6
3397 MINGW32=
3398 test "$ac_cv_mingw32" = yes && MINGW32=yes
3399
3400
3401 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3402 echo "configure:3403: checking for executable suffix" >&5
3403 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3407   ac_cv_exeext=.exe
3408 else
3409   rm -f conftest*
3410   echo 'int main () { return 0; }' > conftest.$ac_ext
3411   ac_cv_exeext=
3412   if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3413     for file in conftest.*; do
3414       case $file in
3415       *.c | *.o | *.obj) ;;
3416       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3417       esac
3418     done
3419   else
3420     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3421   fi
3422   rm -f conftest*
3423   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3424 fi
3425 fi
3426
3427 EXEEXT=""
3428 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3429 echo "$ac_t""${ac_cv_exeext}" 1>&6
3430 ac_exeext=$EXEEXT
3431
3432 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3433 echo "configure:3434: checking for object suffix" >&5
3434 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   rm -f conftest*
3438 echo 'int i = 1;' > conftest.$ac_ext
3439 if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3440   for ac_file in conftest.*; do
3441     case $ac_file in
3442     *.c) ;;
3443     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3444     esac
3445   done
3446 else
3447   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3448 fi
3449 rm -f conftest*
3450 fi
3451
3452 echo "$ac_t""$ac_cv_objext" 1>&6
3453 OBJEXT=$ac_cv_objext
3454 ac_objext=$ac_cv_objext
3455
3456
3457 cat >> confdefs.h <<EOF
3458 #define EXEEXT "${EXEEXT}"
3459 EOF
3460
3461
3462 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3463 echo "configure:3464: checking for be_app in -lbe" >&5
3464 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   ac_save_LIBS="$LIBS"
3469 LIBS="-lbe -lroot -lnet $LIBS"
3470 cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 /* Override any gcc2 internal prototype to avoid an error.  */
3474 /* We use char because int might match the return type of a gcc2
3475     builtin and then its argument prototype would still apply.  */
3476 char be_app();
3477
3478 int main() {
3479 be_app()
3480 ; return 0; }
3481 EOF
3482 if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3483   rm -rf conftest*
3484   eval "ac_cv_lib_$ac_lib_var=yes"
3485 else
3486   echo "configure: failed program was:" >&5
3487   cat conftest.$ac_ext >&5
3488   rm -rf conftest*
3489   eval "ac_cv_lib_$ac_lib_var=no"
3490 fi
3491 rm -f conftest*
3492 LIBS="$ac_save_LIBS"
3493
3494 fi
3495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3496   echo "$ac_t""yes" 1>&6
3497   LIBS="$LIBS -lbe -lroot -lnet"
3498 else
3499   echo "$ac_t""no" 1>&6
3500 :
3501 fi
3502
3503
3504
3505
3506
3507 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3508 echo "configure:3509: checking for ${CC-cc} option to accept ANSI C" >&5
3509 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3510   echo $ac_n "(cached) $ac_c" 1>&6
3511 else
3512   am_cv_prog_cc_stdc=no
3513 ac_save_CC="$CC"
3514 # Don't try gcc -ansi; that turns off useful extensions and
3515 # breaks some systems' header files.
3516 # AIX                   -qlanglvl=ansi
3517 # Ultrix and OSF/1      -std1
3518 # HP-UX 10.20 and later -Ae
3519 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3520 # SVR4                  -Xc -D__EXTENSIONS__
3521 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3522 do
3523   CC="$ac_save_CC $ac_arg"
3524   cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527 #include <stdarg.h>
3528 #include <stdio.h>
3529 #include <sys/types.h>
3530 #include <sys/stat.h>
3531 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3532 struct buf { int x; };
3533 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3534 static char *e (p, i)
3535      char **p;
3536      int i;
3537 {
3538   return p[i];
3539 }
3540 static char *f (char * (*g) (char **, int), char **p, ...)
3541 {
3542   char *s;
3543   va_list v;
3544   va_start (v,p);
3545   s = g (p, va_arg (v,int));
3546   va_end (v);
3547   return s;
3548 }
3549 int test (int i, double x);
3550 struct s1 {int (*f) (int a);};
3551 struct s2 {int (*f) (double a);};
3552 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3553 int argc;
3554 char **argv;
3555
3556 int main() {
3557
3558 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3559
3560 ; return 0; }
3561 EOF
3562 if { (eval echo configure:3563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3563   rm -rf conftest*
3564   am_cv_prog_cc_stdc="$ac_arg"; break
3565 else
3566   echo "configure: failed program was:" >&5
3567   cat conftest.$ac_ext >&5
3568 fi
3569 rm -f conftest*
3570 done
3571 CC="$ac_save_CC"
3572
3573 fi
3574
3575 if test -z "$am_cv_prog_cc_stdc"; then
3576   echo "$ac_t""none needed" 1>&6
3577 else
3578   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3579 fi
3580 case "x$am_cv_prog_cc_stdc" in
3581   x|xno) ;;
3582   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3583 esac
3584
3585 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3586         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3587 fi
3588
3589 # test for make depend flag
3590 OL_MKDEP=
3591 OL_MKDEP_FLAGS=
3592 if test -z "${MKDEP}"; then
3593         OL_MKDEP="${CC-cc}"
3594         if test -z "${MKDEP_FLAGS}"; then
3595                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ${OL_MKDEP} depend flag" >&5
3597 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3598   echo $ac_n "(cached) $ac_c" 1>&6
3599 else
3600   
3601                         ol_cv_mkdep=no
3602                         for flag in "-M" "-xM"; do
3603                                 cat > conftest.c <<EOF
3604  noCode;
3605 EOF
3606                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3607                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3608                                 then
3609                                         if test ! -f conftest."${ac_object}" ; then
3610                                                 ol_cv_mkdep=$flag
3611                                                 OL_MKDEP_FLAGS="$flag"
3612                                                 break
3613                                         fi
3614                                 fi
3615                         done
3616                         rm -f conftest*
3617                 
3618 fi
3619
3620 echo "$ac_t""$ol_cv_mkdep" 1>&6
3621         else
3622                 cc_cv_mkdep=yes
3623                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3624         fi
3625 else
3626         cc_cv_mkdep=yes
3627         OL_MKDEP="${MKDEP}"
3628         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3629 fi
3630
3631
3632
3633 if test "${ol_cv_mkdep}" = no ; then
3634         # this will soon become an error
3635         echo "configure: warning: do not know how to generate dependencies" 1>&2
3636 fi
3637
3638 ol_link_modules=no
3639 if test $ol_enable_modules != no ; then
3640         for ac_hdr in ltdl.h
3641 do
3642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3644 echo "configure:3645: checking for $ac_hdr" >&5
3645 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651 #include <$ac_hdr>
3652 EOF
3653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3654 { (eval echo configure:3655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3656 if test -z "$ac_err"; then
3657   rm -rf conftest*
3658   eval "ac_cv_header_$ac_safe=yes"
3659 else
3660   echo "$ac_err" >&5
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663   rm -rf conftest*
3664   eval "ac_cv_header_$ac_safe=no"
3665 fi
3666 rm -f conftest*
3667 fi
3668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3669   echo "$ac_t""yes" 1>&6
3670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3671   cat >> confdefs.h <<EOF
3672 #define $ac_tr_hdr 1
3673 EOF
3674  
3675 else
3676   echo "$ac_t""no" 1>&6
3677 fi
3678 done
3679
3680
3681         if test $ac_cv_header_ltdl_h = no ; then
3682                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3683
3684         fi
3685
3686         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3687 echo "configure:3688: checking for lt_dlinit in -lltdl" >&5
3688 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-%__p_%'`
3689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   ac_save_LIBS="$LIBS"
3693 LIBS="-lltdl  $LIBS"
3694 cat > conftest.$ac_ext <<EOF
3695 #line 3696 "configure"
3696 #include "confdefs.h"
3697 /* Override any gcc2 internal prototype to avoid an error.  */
3698 /* We use char because int might match the return type of a gcc2
3699     builtin and then its argument prototype would still apply.  */
3700 char lt_dlinit();
3701
3702 int main() {
3703 lt_dlinit()
3704 ; return 0; }
3705 EOF
3706 if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3707   rm -rf conftest*
3708   eval "ac_cv_lib_$ac_lib_var=yes"
3709 else
3710   echo "configure: failed program was:" >&5
3711   cat conftest.$ac_ext >&5
3712   rm -rf conftest*
3713   eval "ac_cv_lib_$ac_lib_var=no"
3714 fi
3715 rm -f conftest*
3716 LIBS="$ac_save_LIBS"
3717
3718 fi
3719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3720   echo "$ac_t""yes" 1>&6
3721     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3722     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3723   cat >> confdefs.h <<EOF
3724 #define $ac_tr_lib 1
3725 EOF
3726
3727   LIBS="-lltdl $LIBS"
3728
3729 else
3730   echo "$ac_t""no" 1>&6
3731 fi
3732
3733         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3734                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3735         fi
3736         ol_link_modules=yes
3737 else
3738         ol_with_bdb2_module=static
3739         ol_with_ldap_module=static
3740         ol_with_ldbm_module=static
3741         ol_with_passwd_module=static
3742         ol_with_perl_module=static
3743         ol_with_shell_module=static
3744         ol_with_tcl_module=static
3745 fi
3746
3747 # test for EBCDIC
3748 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3749 echo "configure:3750: checking for EBCDIC" >&5
3750 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
3751   echo $ac_n "(cached) $ac_c" 1>&6
3752 else
3753   
3754         cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757
3758 #if !('M' == 0xd4)
3759 #include <__ASCII__/generate_error.h>
3760 #endif
3761
3762 EOF
3763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3764 { (eval echo configure:3765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3766 if test -z "$ac_err"; then
3767   rm -rf conftest*
3768   ol_cv_cpp_ebcdic=yes
3769 else
3770   echo "$ac_err" >&5
3771   echo "configure: failed program was:" >&5
3772   cat conftest.$ac_ext >&5
3773   rm -rf conftest*
3774   ol_cv_cpp_ebcdic=no
3775 fi
3776 rm -f conftest*
3777 fi
3778
3779 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3780 if test $ol_cv_cpp_ebcdic = yes ; then
3781         cat >> confdefs.h <<\EOF
3782 #define HAVE_EBCDIC 1
3783 EOF
3784
3785 fi
3786
3787 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3788 echo "configure:3789: checking for ANSI C header files" >&5
3789 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795 #include <stdlib.h>
3796 #include <stdarg.h>
3797 #include <string.h>
3798 #include <float.h>
3799 EOF
3800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3801 { (eval echo configure:3802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3803 if test -z "$ac_err"; then
3804   rm -rf conftest*
3805   ol_cv_header_stdc=yes
3806 else
3807   echo "$ac_err" >&5
3808   echo "configure: failed program was:" >&5
3809   cat conftest.$ac_ext >&5
3810   rm -rf conftest*
3811   ol_cv_header_stdc=no
3812 fi
3813 rm -f conftest*
3814
3815 if test $ol_cv_header_stdc = yes; then
3816   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3817 cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820 #include <string.h>
3821 EOF
3822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3823   egrep "memchr" >/dev/null 2>&1; then
3824   :
3825 else
3826   rm -rf conftest*
3827   ol_cv_header_stdc=no
3828 fi
3829 rm -f conftest*
3830
3831 fi
3832
3833 if test $ol_cv_header_stdc = yes; then
3834   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <stdlib.h>
3839 EOF
3840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3841   egrep "free" >/dev/null 2>&1; then
3842   :
3843 else
3844   rm -rf conftest*
3845   ol_cv_header_stdc=no
3846 fi
3847 rm -f conftest*
3848
3849 fi
3850
3851 if test $ol_cv_header_stdc = yes; then
3852   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3853 if test "$cross_compiling" = yes; then
3854   :
3855 else
3856   cat > conftest.$ac_ext <<EOF
3857 #line 3858 "configure"
3858 #include "confdefs.h"
3859 #include <ctype.h>
3860 #ifndef HAVE_EBCDIC
3861 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3862 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3863 #else
3864 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3865                 || ('j' <= (c) && (c) <= 'r') \
3866                 || ('s' <= (c) && (c) <= 'z'))
3867 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3868 #endif
3869 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3870 int main () { int i; for (i = 0; i < 256; i++)
3871 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3872 exit (0); }
3873
3874 EOF
3875 if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3876 then
3877   :
3878 else
3879   echo "configure: failed program was:" >&5
3880   cat conftest.$ac_ext >&5
3881   rm -fr conftest*
3882   ol_cv_header_stdc=no
3883 fi
3884 rm -fr conftest*
3885 fi
3886
3887 fi
3888 fi
3889
3890 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3891 if test $ol_cv_header_stdc = yes; then
3892   cat >> confdefs.h <<\EOF
3893 #define STDC_HEADERS 1
3894 EOF
3895
3896 fi
3897 ac_cv_header_stdc=disable
3898
3899
3900 if test $ol_cv_header_stdc != yes; then
3901         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3902 fi
3903
3904 ac_header_dirent=no
3905 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3906 do
3907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3908 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3909 echo "configure:3910: checking for $ac_hdr that defines DIR" >&5
3910 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 #include <sys/types.h>
3917 #include <$ac_hdr>
3918 int main() {
3919 DIR *dirp = 0;
3920 ; return 0; }
3921 EOF
3922 if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3923   rm -rf conftest*
3924   eval "ac_cv_header_dirent_$ac_safe=yes"
3925 else
3926   echo "configure: failed program was:" >&5
3927   cat conftest.$ac_ext >&5
3928   rm -rf conftest*
3929   eval "ac_cv_header_dirent_$ac_safe=no"
3930 fi
3931 rm -f conftest*
3932 fi
3933 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3934   echo "$ac_t""yes" 1>&6
3935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3936   cat >> confdefs.h <<EOF
3937 #define $ac_tr_hdr 1
3938 EOF
3939  ac_header_dirent=$ac_hdr; break
3940 else
3941   echo "$ac_t""no" 1>&6
3942 fi
3943 done
3944 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3945 if test $ac_header_dirent = dirent.h; then
3946 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3947 echo "configure:3948: checking for opendir in -ldir" >&5
3948 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   ac_save_LIBS="$LIBS"
3953 LIBS="-ldir  $LIBS"
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957 /* Override any gcc2 internal prototype to avoid an error.  */
3958 /* We use char because int might match the return type of a gcc2
3959     builtin and then its argument prototype would still apply.  */
3960 char opendir();
3961
3962 int main() {
3963 opendir()
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3967   rm -rf conftest*
3968   eval "ac_cv_lib_$ac_lib_var=yes"
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=no"
3974 fi
3975 rm -f conftest*
3976 LIBS="$ac_save_LIBS"
3977
3978 fi
3979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3980   echo "$ac_t""yes" 1>&6
3981   LIBS="$LIBS -ldir"
3982 else
3983   echo "$ac_t""no" 1>&6
3984 fi
3985
3986 else
3987 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3988 echo "configure:3989: checking for opendir in -lx" >&5
3989 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3990 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   ac_save_LIBS="$LIBS"
3994 LIBS="-lx  $LIBS"
3995 cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998 /* Override any gcc2 internal prototype to avoid an error.  */
3999 /* We use char because int might match the return type of a gcc2
4000     builtin and then its argument prototype would still apply.  */
4001 char opendir();
4002
4003 int main() {
4004 opendir()
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4008   rm -rf conftest*
4009   eval "ac_cv_lib_$ac_lib_var=yes"
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -rf conftest*
4014   eval "ac_cv_lib_$ac_lib_var=no"
4015 fi
4016 rm -f conftest*
4017 LIBS="$ac_save_LIBS"
4018
4019 fi
4020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4021   echo "$ac_t""yes" 1>&6
4022   LIBS="$LIBS -lx"
4023 else
4024   echo "$ac_t""no" 1>&6
4025 fi
4026
4027 fi
4028
4029 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4030 echo "configure:4031: checking for sys/wait.h that is POSIX.1 compatible" >&5
4031 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   cat > conftest.$ac_ext <<EOF
4035 #line 4036 "configure"
4036 #include "confdefs.h"
4037 #include <sys/types.h>
4038 #include <sys/wait.h>
4039 #ifndef WEXITSTATUS
4040 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4041 #endif
4042 #ifndef WIFEXITED
4043 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4044 #endif
4045 int main() {
4046 int s;
4047 wait (&s);
4048 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4049 ; return 0; }
4050 EOF
4051 if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4052   rm -rf conftest*
4053   ac_cv_header_sys_wait_h=yes
4054 else
4055   echo "configure: failed program was:" >&5
4056   cat conftest.$ac_ext >&5
4057   rm -rf conftest*
4058   ac_cv_header_sys_wait_h=no
4059 fi
4060 rm -f conftest*
4061 fi
4062
4063 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4064 if test $ac_cv_header_sys_wait_h = yes; then
4065   cat >> confdefs.h <<\EOF
4066 #define HAVE_SYS_WAIT_H 1
4067 EOF
4068
4069 fi
4070
4071 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4072 echo "configure:4073: checking POSIX termios" >&5
4073 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 #include <sys/types.h>
4080 #include <unistd.h>
4081 #include <termios.h>
4082 int main() {
4083 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4084    tcgetattr(0, 0);
4085 ; return 0; }
4086 EOF
4087 if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4088   rm -rf conftest*
4089   am_cv_sys_posix_termios=yes
4090 else
4091   echo "configure: failed program was:" >&5
4092   cat conftest.$ac_ext >&5
4093   rm -rf conftest*
4094   am_cv_sys_posix_termios=no
4095 fi
4096 rm -f conftest*
4097 fi
4098
4099 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4100
4101
4102  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4103 echo "configure:4104: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4104 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
4105   echo $ac_n "(cached) $ac_c" 1>&6
4106 else
4107   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4108
4109   gwinsz_in_termios_h=no
4110   if test $am_cv_sys_posix_termios = yes; then
4111     cat > conftest.$ac_ext <<EOF
4112 #line 4113 "configure"
4113 #include "confdefs.h"
4114 #include <sys/types.h>
4115 #     include <termios.h>
4116 #     ifdef TIOCGWINSZ
4117         yes
4118 #     endif
4119     
4120 EOF
4121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4122   egrep "yes" >/dev/null 2>&1; then
4123   rm -rf conftest*
4124   gwinsz_in_termios_h=yes
4125 fi
4126 rm -f conftest*
4127
4128   fi
4129
4130   if test $gwinsz_in_termios_h = no; then
4131     cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <sys/types.h>
4135 #     include <sys/ioctl.h>
4136 #     ifdef TIOCGWINSZ
4137         yes
4138 #     endif
4139     
4140 EOF
4141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4142   egrep "yes" >/dev/null 2>&1; then
4143   rm -rf conftest*
4144   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4145 fi
4146 rm -f conftest*
4147
4148   fi
4149   
4150 fi
4151
4152 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4153   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4154     cat >> confdefs.h <<\EOF
4155 #define GWINSZ_IN_SYS_IOCTL 1
4156 EOF
4157
4158   fi
4159
4160 if test $am_cv_sys_posix_termios = yes ; then
4161         cat >> confdefs.h <<\EOF
4162 #define HAVE_POSIX_TERMIOS 1
4163 EOF
4164
4165 fi
4166
4167 for ac_hdr in \
4168         arpa/inet.h             \
4169         arpa/nameser.h  \
4170         assert.h                \
4171         crypt.h                 \
4172         errno.h                 \
4173         fcntl.h                 \
4174         filio.h                 \
4175         getopt.h                \
4176         grp.h                   \
4177         libutil.h               \
4178         limits.h                \
4179         locale.h                \
4180         netinet/tcp.h   \
4181         malloc.h                \
4182         memory.h                \
4183         psap.h                  \
4184         pwd.h                   \
4185         resolv.h                \
4186         sgtty.h                 \
4187         shadow.h                \
4188         stdarg.h                \
4189         stddef.h                \
4190         string.h                \
4191         strings.h               \
4192         sysexits.h              \
4193         sys/file.h              \
4194         sys/filio.h             \
4195         sys/errno.h             \
4196         sys/ioctl.h             \
4197         sys/param.h             \
4198         sys/resource.h  \
4199         sys/select.h    \
4200         sys/socket.h    \
4201         sys/syslog.h    \
4202         sys/time.h              \
4203         sys/types.h             \
4204         syslog.h                \
4205         termios.h               \
4206         unistd.h                \
4207
4208 do
4209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4211 echo "configure:4212: checking for $ac_hdr" >&5
4212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4213   echo $ac_n "(cached) $ac_c" 1>&6
4214 else
4215   cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <$ac_hdr>
4219 EOF
4220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4221 { (eval echo configure:4222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4223 if test -z "$ac_err"; then
4224   rm -rf conftest*
4225   eval "ac_cv_header_$ac_safe=yes"
4226 else
4227   echo "$ac_err" >&5
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -rf conftest*
4231   eval "ac_cv_header_$ac_safe=no"
4232 fi
4233 rm -f conftest*
4234 fi
4235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4236   echo "$ac_t""yes" 1>&6
4237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4238   cat >> confdefs.h <<EOF
4239 #define $ac_tr_hdr 1
4240 EOF
4241  
4242 else
4243   echo "$ac_t""no" 1>&6
4244 fi
4245 done
4246
4247
4248
4249
4250 echo $ac_n "checking for socket""... $ac_c" 1>&6
4251 echo "configure:4252: checking for socket" >&5
4252 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
4253   echo $ac_n "(cached) $ac_c" 1>&6
4254 else
4255   cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 /* System header to define __stub macros and hopefully few prototypes,
4259     which can conflict with char socket(); below.  */
4260 #include <assert.h>
4261 /* Override any gcc2 internal prototype to avoid an error.  */
4262 /* We use char because int might match the return type of a gcc2
4263     builtin and then its argument prototype would still apply.  */
4264 char socket();
4265
4266 int main() {
4267
4268 /* The GNU C library defines this for functions which it implements
4269     to always fail with ENOSYS.  Some functions are actually named
4270     something starting with __ and the normal name is an alias.  */
4271 #if defined (__stub_socket) || defined (__stub___socket)
4272 choke me
4273 #else
4274 socket();
4275 #endif
4276
4277 ; return 0; }
4278 EOF
4279 if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4280   rm -rf conftest*
4281   eval "ac_cv_func_socket=yes"
4282 else
4283   echo "configure: failed program was:" >&5
4284   cat conftest.$ac_ext >&5
4285   rm -rf conftest*
4286   eval "ac_cv_func_socket=no"
4287 fi
4288 rm -f conftest*
4289 fi
4290
4291 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4292   echo "$ac_t""yes" 1>&6
4293   :
4294 else
4295   echo "$ac_t""no" 1>&6
4296         
4297         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4298 echo "configure:4299: checking for main in -lsocket" >&5
4299 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4301   echo $ac_n "(cached) $ac_c" 1>&6
4302 else
4303   ac_save_LIBS="$LIBS"
4304 LIBS="-lsocket  $LIBS"
4305 cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308
4309 int main() {
4310 main()
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4314   rm -rf conftest*
4315   eval "ac_cv_lib_$ac_lib_var=yes"
4316 else
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   eval "ac_cv_lib_$ac_lib_var=no"
4321 fi
4322 rm -f conftest*
4323 LIBS="$ac_save_LIBS"
4324
4325 fi
4326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4327   echo "$ac_t""yes" 1>&6
4328     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4330   cat >> confdefs.h <<EOF
4331 #define $ac_tr_lib 1
4332 EOF
4333
4334   LIBS="-lsocket $LIBS"
4335
4336 else
4337   echo "$ac_t""no" 1>&6
4338 fi
4339
4340         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4341 echo "configure:4342: checking for main in -lnet" >&5
4342 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
4343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   ac_save_LIBS="$LIBS"
4347 LIBS="-lnet  $LIBS"
4348 cat > conftest.$ac_ext <<EOF
4349 #line 4350 "configure"
4350 #include "confdefs.h"
4351
4352 int main() {
4353 main()
4354 ; return 0; }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4357   rm -rf conftest*
4358   eval "ac_cv_lib_$ac_lib_var=yes"
4359 else
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -rf conftest*
4363   eval "ac_cv_lib_$ac_lib_var=no"
4364 fi
4365 rm -f conftest*
4366 LIBS="$ac_save_LIBS"
4367
4368 fi
4369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4370   echo "$ac_t""yes" 1>&6
4371     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4372     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4373   cat >> confdefs.h <<EOF
4374 #define $ac_tr_lib 1
4375 EOF
4376
4377   LIBS="-lnet $LIBS"
4378
4379 else
4380   echo "$ac_t""no" 1>&6
4381 fi
4382
4383         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4384 echo "configure:4385: checking for socket in -lnet" >&5
4385 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
4386 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   ac_save_LIBS="$LIBS"
4390 LIBS="-lnet  $LIBS"
4391 cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 /* Override any gcc2 internal prototype to avoid an error.  */
4395 /* We use char because int might match the return type of a gcc2
4396     builtin and then its argument prototype would still apply.  */
4397 char socket();
4398
4399 int main() {
4400 socket()
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 net | 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="-lnet $LIBS"
4425
4426 else
4427   echo "$ac_t""no" 1>&6
4428 fi
4429
4430         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4431 echo "configure:4432: checking for main in -lnsl_s" >&5
4432 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
4433 if eval "test \"`echo '$''{'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="-lnsl_s  $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 nsl_s | 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="-lnsl_s $LIBS"
4468
4469 else
4470   echo "$ac_t""no" 1>&6
4471 fi
4472
4473         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4474 echo "configure:4475: checking for main in -lnsl" >&5
4475 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4476 if eval "test \"`echo '$''{'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="-lnsl  $LIBS"
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484
4485 int main() {
4486 main()
4487 ; return 0; }
4488 EOF
4489 if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4490   rm -rf conftest*
4491   eval "ac_cv_lib_$ac_lib_var=yes"
4492 else
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -rf conftest*
4496   eval "ac_cv_lib_$ac_lib_var=no"
4497 fi
4498 rm -f conftest*
4499 LIBS="$ac_save_LIBS"
4500
4501 fi
4502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4503   echo "$ac_t""yes" 1>&6
4504     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4505     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4506   cat >> confdefs.h <<EOF
4507 #define $ac_tr_lib 1
4508 EOF
4509
4510   LIBS="-lnsl $LIBS"
4511
4512 else
4513   echo "$ac_t""no" 1>&6
4514 fi
4515
4516         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4517 echo "configure:4518: checking for socket in -linet" >&5
4518 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
4519 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4520   echo $ac_n "(cached) $ac_c" 1>&6
4521 else
4522   ac_save_LIBS="$LIBS"
4523 LIBS="-linet  $LIBS"
4524 cat > conftest.$ac_ext <<EOF
4525 #line 4526 "configure"
4526 #include "confdefs.h"
4527 /* Override any gcc2 internal prototype to avoid an error.  */
4528 /* We use char because int might match the return type of a gcc2
4529     builtin and then its argument prototype would still apply.  */
4530 char socket();
4531
4532 int main() {
4533 socket()
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 inet | 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="-linet $LIBS"
4558
4559 else
4560   echo "$ac_t""no" 1>&6
4561 fi
4562
4563         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4564 echo "configure:4565: checking for main in -lgen" >&5
4565 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
4566 if eval "test \"`echo '$''{'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="-lgen  $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 gen | 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="-lgen $LIBS"
4601
4602 else
4603   echo "$ac_t""no" 1>&6
4604 fi
4605
4606
4607 fi
4608
4609
4610 echo $ac_n "checking for select""... $ac_c" 1>&6
4611 echo "configure:4612: checking for select" >&5
4612 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 /* System header to define __stub macros and hopefully few prototypes,
4619     which can conflict with char select(); below.  */
4620 #include <assert.h>
4621 /* Override any gcc2 internal prototype to avoid an error.  */
4622 /* We use char because int might match the return type of a gcc2
4623     builtin and then its argument prototype would still apply.  */
4624 char select();
4625
4626 int main() {
4627
4628 /* The GNU C library defines this for functions which it implements
4629     to always fail with ENOSYS.  Some functions are actually named
4630     something starting with __ and the normal name is an alias.  */
4631 #if defined (__stub_select) || defined (__stub___select)
4632 choke me
4633 #else
4634 select();
4635 #endif
4636
4637 ; return 0; }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4640   rm -rf conftest*
4641   eval "ac_cv_func_select=yes"
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -rf conftest*
4646   eval "ac_cv_func_select=no"
4647 fi
4648 rm -f conftest*
4649 fi
4650
4651 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4652   echo "$ac_t""yes" 1>&6
4653   :
4654 else
4655   echo "$ac_t""no" 1>&6
4656 { echo "configure: error: select() required." 1>&2; exit 1; }
4657 fi
4658
4659
4660 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4661 echo "configure:4662: checking types of arguments for select()" >&5
4662  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4672      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4673       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4674        cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #ifdef HAVE_SYS_TYPES_H
4678 #include <sys/types.h>
4679 #endif
4680 #ifdef HAVE_SYS_TIME_H
4681 #include <sys/time.h>
4682 #endif
4683 #ifdef HAVE_SYS_SELECT_H
4684 #include <sys/select.h>
4685 #endif
4686 #ifdef HAVE_SYS_SOCKET_H
4687 #include <sys/socket.h>
4688 #endif
4689 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);
4690 int main() {
4691
4692 ; return 0; }
4693 EOF
4694 if { (eval echo configure:4695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4695   rm -rf conftest*
4696           ac_not_found=no ; break 3
4697 else
4698   echo "configure: failed program was:" >&5
4699   cat conftest.$ac_ext >&5
4700   rm -rf conftest*
4701   ac_not_found=yes
4702 fi
4703 rm -f conftest*
4704       done
4705      done
4706     done
4707    
4708 fi
4709   
4710 fi
4711  
4712 fi
4713  if test "$ac_not_found" = yes; then
4714   ac_cv_func_select_arg1=int 
4715   ac_cv_func_select_arg234='int *' 
4716   ac_cv_func_select_arg5='struct timeval *'
4717  fi
4718  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4719  cat >> confdefs.h <<EOF
4720 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4721 EOF
4722
4723  cat >> confdefs.h <<EOF
4724 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4725 EOF
4726
4727  cat >> confdefs.h <<EOF
4728 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4729 EOF
4730
4731
4732
4733
4734 for ac_hdr in regex.h 
4735 do
4736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4738 echo "configure:4739: checking for $ac_hdr" >&5
4739 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 #include <$ac_hdr>
4746 EOF
4747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4748 { (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4750 if test -z "$ac_err"; then
4751   rm -rf conftest*
4752   eval "ac_cv_header_$ac_safe=yes"
4753 else
4754   echo "$ac_err" >&5
4755   echo "configure: failed program was:" >&5
4756   cat conftest.$ac_ext >&5
4757   rm -rf conftest*
4758   eval "ac_cv_header_$ac_safe=no"
4759 fi
4760 rm -f conftest*
4761 fi
4762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4763   echo "$ac_t""yes" 1>&6
4764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4765   cat >> confdefs.h <<EOF
4766 #define $ac_tr_hdr 1
4767 EOF
4768  
4769 else
4770   echo "$ac_t""no" 1>&6
4771 fi
4772 done
4773
4774 if test "$ac_cv_header_regex_h" != yes ; then
4775         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4776 fi
4777 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4778 echo "configure:4779: checking for regfree" >&5
4779 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 /* System header to define __stub macros and hopefully few prototypes,
4786     which can conflict with char regfree(); below.  */
4787 #include <assert.h>
4788 /* Override any gcc2 internal prototype to avoid an error.  */
4789 /* We use char because int might match the return type of a gcc2
4790     builtin and then its argument prototype would still apply.  */
4791 char regfree();
4792
4793 int main() {
4794
4795 /* The GNU C library defines this for functions which it implements
4796     to always fail with ENOSYS.  Some functions are actually named
4797     something starting with __ and the normal name is an alias.  */
4798 #if defined (__stub_regfree) || defined (__stub___regfree)
4799 choke me
4800 #else
4801 regfree();
4802 #endif
4803
4804 ; return 0; }
4805 EOF
4806 if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4807   rm -rf conftest*
4808   eval "ac_cv_func_regfree=yes"
4809 else
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_func_regfree=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817
4818 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4819   echo "$ac_t""yes" 1>&6
4820   :
4821 else
4822   echo "$ac_t""no" 1>&6
4823 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4824 fi
4825
4826
4827
4828 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4829 echo "configure:4830: checking for compatible POSIX regex" >&5
4830 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
4831   echo $ac_n "(cached) $ac_c" 1>&6
4832 else
4833   
4834         if test "$cross_compiling" = yes; then
4835   ol_cv_c_posix_regex=cross
4836 else
4837   cat > conftest.$ac_ext <<EOF
4838 #line 4839 "configure"
4839 #include "confdefs.h"
4840
4841 #include <sys/types.h>
4842 #include <regex.h>
4843 static char *pattern, *string;
4844 main()
4845 {
4846         int rc;
4847         regex_t re;
4848
4849         pattern = "^A";
4850
4851         if(regcomp(&re, pattern, 0)) {
4852                 return -1;
4853         }
4854         
4855         string = "ALL MATCH";
4856         
4857         rc = regexec(&re, string, 0, (void*)0, 0);
4858
4859         regfree(&re);
4860
4861         return rc;
4862 }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4865 then
4866   ol_cv_c_posix_regex=yes
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -fr conftest*
4871   ol_cv_c_posix_regex=no
4872 fi
4873 rm -fr conftest*
4874 fi
4875
4876 fi
4877
4878 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4879
4880 if test "$ol_cv_c_posix_regex" = no ; then
4881         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4882 fi
4883
4884
4885 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4886 echo "configure:4887: checking for sigset in -lV3" >&5
4887 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4889   echo $ac_n "(cached) $ac_c" 1>&6
4890 else
4891   ac_save_LIBS="$LIBS"
4892 LIBS="-lV3  $LIBS"
4893 cat > conftest.$ac_ext <<EOF
4894 #line 4895 "configure"
4895 #include "confdefs.h"
4896 /* Override any gcc2 internal prototype to avoid an error.  */
4897 /* We use char because int might match the return type of a gcc2
4898     builtin and then its argument prototype would still apply.  */
4899 char sigset();
4900
4901 int main() {
4902 sigset()
4903 ; return 0; }
4904 EOF
4905 if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4906   rm -rf conftest*
4907   eval "ac_cv_lib_$ac_lib_var=yes"
4908 else
4909   echo "configure: failed program was:" >&5
4910   cat conftest.$ac_ext >&5
4911   rm -rf conftest*
4912   eval "ac_cv_lib_$ac_lib_var=no"
4913 fi
4914 rm -f conftest*
4915 LIBS="$ac_save_LIBS"
4916
4917 fi
4918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4919   echo "$ac_t""yes" 1>&6
4920     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4921     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4922   cat >> confdefs.h <<EOF
4923 #define $ac_tr_lib 1
4924 EOF
4925
4926   LIBS="-lV3 $LIBS"
4927
4928 else
4929   echo "$ac_t""no" 1>&6
4930 fi
4931
4932
4933
4934 # find res_search
4935 if test $ol_enable_dns != no ; then
4936                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4937 echo "configure:4938: checking for res_search" >&5
4938 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   cat > conftest.$ac_ext <<EOF
4942 #line 4943 "configure"
4943 #include "confdefs.h"
4944 /* System header to define __stub macros and hopefully few prototypes,
4945     which can conflict with char res_search(); below.  */
4946 #include <assert.h>
4947 /* Override any gcc2 internal prototype to avoid an error.  */
4948 /* We use char because int might match the return type of a gcc2
4949     builtin and then its argument prototype would still apply.  */
4950 char res_search();
4951
4952 int main() {
4953
4954 /* The GNU C library defines this for functions which it implements
4955     to always fail with ENOSYS.  Some functions are actually named
4956     something starting with __ and the normal name is an alias.  */
4957 #if defined (__stub_res_search) || defined (__stub___res_search)
4958 choke me
4959 #else
4960 res_search();
4961 #endif
4962
4963 ; return 0; }
4964 EOF
4965 if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4966   rm -rf conftest*
4967   eval "ac_cv_func_res_search=yes"
4968 else
4969   echo "configure: failed program was:" >&5
4970   cat conftest.$ac_ext >&5
4971   rm -rf conftest*
4972   eval "ac_cv_func_res_search=no"
4973 fi
4974 rm -f conftest*
4975 fi
4976
4977 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4978   echo "$ac_t""yes" 1>&6
4979   :
4980 else
4981   echo "$ac_t""no" 1>&6
4982 fi
4983
4984         if test $ac_cv_func_res_search = no ; then 
4985                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4986 echo "configure:4987: checking for res_search in -lbind" >&5
4987 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
4988 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4989   echo $ac_n "(cached) $ac_c" 1>&6
4990 else
4991   ac_save_LIBS="$LIBS"
4992 LIBS="-lbind  $LIBS"
4993 cat > conftest.$ac_ext <<EOF
4994 #line 4995 "configure"
4995 #include "confdefs.h"
4996 /* Override any gcc2 internal prototype to avoid an error.  */
4997 /* We use char because int might match the return type of a gcc2
4998     builtin and then its argument prototype would still apply.  */
4999 char res_search();
5000
5001 int main() {
5002 res_search()
5003 ; return 0; }
5004 EOF
5005 if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5006   rm -rf conftest*
5007   eval "ac_cv_lib_$ac_lib_var=yes"
5008 else
5009   echo "configure: failed program was:" >&5
5010   cat conftest.$ac_ext >&5
5011   rm -rf conftest*
5012   eval "ac_cv_lib_$ac_lib_var=no"
5013 fi
5014 rm -f conftest*
5015 LIBS="$ac_save_LIBS"
5016
5017 fi
5018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5019   echo "$ac_t""yes" 1>&6
5020     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5021     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5022   cat >> confdefs.h <<EOF
5023 #define $ac_tr_lib 1
5024 EOF
5025
5026   LIBS="-lbind $LIBS"
5027
5028 else
5029   echo "$ac_t""no" 1>&6
5030 fi
5031
5032                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5033         fi
5034         if test $ac_cv_func_res_search = no ; then 
5035                 echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5036 echo "configure:5037: checking for __res_search in -lbind" >&5
5037 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'`
5038 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5039   echo $ac_n "(cached) $ac_c" 1>&6
5040 else
5041   ac_save_LIBS="$LIBS"
5042 LIBS="-lbind  $LIBS"
5043 cat > conftest.$ac_ext <<EOF
5044 #line 5045 "configure"
5045 #include "confdefs.h"
5046 /* Override any gcc2 internal prototype to avoid an error.  */
5047 /* We use char because int might match the return type of a gcc2
5048     builtin and then its argument prototype would still apply.  */
5049 char __res_search();
5050
5051 int main() {
5052 __res_search()
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   eval "ac_cv_lib_$ac_lib_var=yes"
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=no"
5063 fi
5064 rm -f conftest*
5065 LIBS="$ac_save_LIBS"
5066
5067 fi
5068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5069   echo "$ac_t""yes" 1>&6
5070     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5071     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5072   cat >> confdefs.h <<EOF
5073 #define $ac_tr_lib 1
5074 EOF
5075
5076   LIBS="-lbind $LIBS"
5077
5078 else
5079   echo "$ac_t""no" 1>&6
5080 fi
5081
5082                 ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5083         fi
5084         if test $ac_cv_func_res_search = no ; then 
5085                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5086 echo "configure:5087: checking for res_search in -lresolv" >&5
5087 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5089   echo $ac_n "(cached) $ac_c" 1>&6
5090 else
5091   ac_save_LIBS="$LIBS"
5092 LIBS="-lresolv  $LIBS"
5093 cat > conftest.$ac_ext <<EOF
5094 #line 5095 "configure"
5095 #include "confdefs.h"
5096 /* Override any gcc2 internal prototype to avoid an error.  */
5097 /* We use char because int might match the return type of a gcc2
5098     builtin and then its argument prototype would still apply.  */
5099 char res_search();
5100
5101 int main() {
5102 res_search()
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   eval "ac_cv_lib_$ac_lib_var=yes"
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   eval "ac_cv_lib_$ac_lib_var=no"
5113 fi
5114 rm -f conftest*
5115 LIBS="$ac_save_LIBS"
5116
5117 fi
5118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5119   echo "$ac_t""yes" 1>&6
5120     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5122   cat >> confdefs.h <<EOF
5123 #define $ac_tr_lib 1
5124 EOF
5125
5126   LIBS="-lresolv $LIBS"
5127
5128 else
5129   echo "$ac_t""no" 1>&6
5130 fi
5131
5132                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5133         fi
5134
5135         if test "$ac_cv_func_res_search" = yes ; then
5136                 cat >> confdefs.h <<\EOF
5137 #define HAVE_RES_SEARCH 1
5138 EOF
5139
5140         elif test $ol_enable_dns = yes ; then
5141                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5142         else
5143                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5144         fi
5145 fi
5146
5147
5148 # ISODE tests
5149 ol_link_isode=no
5150 if test $ol_enable_ldapd != no ; then
5151         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5152
5153                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5154 echo "configure:5155: checking for main in -lxtpp" >&5
5155 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
5156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159   ac_save_LIBS="$LIBS"
5160 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5161 cat > conftest.$ac_ext <<EOF
5162 #line 5163 "configure"
5163 #include "confdefs.h"
5164
5165 int main() {
5166 main()
5167 ; return 0; }
5168 EOF
5169 if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5170   rm -rf conftest*
5171   eval "ac_cv_lib_$ac_lib_var=yes"
5172 else
5173   echo "configure: failed program was:" >&5
5174   cat conftest.$ac_ext >&5
5175   rm -rf conftest*
5176   eval "ac_cv_lib_$ac_lib_var=no"
5177 fi
5178 rm -f conftest*
5179 LIBS="$ac_save_LIBS"
5180
5181 fi
5182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5183   echo "$ac_t""yes" 1>&6
5184   
5185                 ol_link_isode=yes
5186                 cat >> confdefs.h <<\EOF
5187 #define HAVE_XTPP 1
5188 EOF
5189
5190                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5191                 
5192 else
5193   echo "$ac_t""no" 1>&6
5194 :
5195 fi
5196
5197         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5198 echo "configure:5199: checking for main in -ldsap" >&5
5199 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
5200 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5201   echo $ac_n "(cached) $ac_c" 1>&6
5202 else
5203   ac_save_LIBS="$LIBS"
5204 LIBS="-ldsap -lisode $LIBS"
5205 cat > conftest.$ac_ext <<EOF
5206 #line 5207 "configure"
5207 #include "confdefs.h"
5208
5209 int main() {
5210 main()
5211 ; return 0; }
5212 EOF
5213 if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5214   rm -rf conftest*
5215   eval "ac_cv_lib_$ac_lib_var=yes"
5216 else
5217   echo "configure: failed program was:" >&5
5218   cat conftest.$ac_ext >&5
5219   rm -rf conftest*
5220   eval "ac_cv_lib_$ac_lib_var=no"
5221 fi
5222 rm -f conftest*
5223 LIBS="$ac_save_LIBS"
5224
5225 fi
5226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5227   echo "$ac_t""yes" 1>&6
5228   
5229                 ol_link_isode=yes
5230                 cat >> confdefs.h <<\EOF
5231 #define HAVE_DSAP 1
5232 EOF
5233
5234                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5235                 
5236 else
5237   echo "$ac_t""no" 1>&6
5238 :
5239 fi
5240
5241         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5242 echo "configure:5243: checking for main in -lisode" >&5
5243 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
5244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   ac_save_LIBS="$LIBS"
5248 LIBS="-lisode  $LIBS"
5249 cat > conftest.$ac_ext <<EOF
5250 #line 5251 "configure"
5251 #include "confdefs.h"
5252
5253 int main() {
5254 main()
5255 ; return 0; }
5256 EOF
5257 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5258   rm -rf conftest*
5259   eval "ac_cv_lib_$ac_lib_var=yes"
5260 else
5261   echo "configure: failed program was:" >&5
5262   cat conftest.$ac_ext >&5
5263   rm -rf conftest*
5264   eval "ac_cv_lib_$ac_lib_var=no"
5265 fi
5266 rm -f conftest*
5267 LIBS="$ac_save_LIBS"
5268
5269 fi
5270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5271   echo "$ac_t""yes" 1>&6
5272   
5273                 ol_link_isode=yes
5274                 cat >> confdefs.h <<\EOF
5275 #define HAVE_ISODE 1
5276 EOF
5277
5278                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5279                 
5280 else
5281   echo "$ac_t""no" 1>&6
5282 :
5283 fi
5284
5285 fi
5286
5287 if test $ol_link_isode != no; then
5288         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5289 echo "configure:5290: checking for main in -lpp" >&5
5290 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
5291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5292   echo $ac_n "(cached) $ac_c" 1>&6
5293 else
5294   ac_save_LIBS="$LIBS"
5295 LIBS="-lpp  $LIBS"
5296 cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 main()
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=yes"
5307 else
5308   echo "configure: failed program was:" >&5
5309   cat conftest.$ac_ext >&5
5310   rm -rf conftest*
5311   eval "ac_cv_lib_$ac_lib_var=no"
5312 fi
5313 rm -f conftest*
5314 LIBS="$ac_save_LIBS"
5315
5316 fi
5317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5318   echo "$ac_t""yes" 1>&6
5319   
5320                 cat >> confdefs.h <<\EOF
5321 #define HAVE_PP 1
5322 EOF
5323
5324                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5325                 
5326 else
5327   echo "$ac_t""no" 1>&6
5328 :
5329 fi
5330
5331
5332         # Extract the first word of "pepsy", so it can be a program name with args.
5333 set dummy pepsy; ac_word=$2
5334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5335 echo "configure:5336: checking for $ac_word" >&5
5336 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
5337   echo $ac_n "(cached) $ac_c" 1>&6
5338 else
5339   case "$PEPSY" in
5340   /*)
5341   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5342   ;;
5343   ?:/*)                  
5344   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5345   ;;
5346   *)
5347   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5348   ac_dummy="$PATH"
5349   for ac_dir in $ac_dummy; do 
5350     test -z "$ac_dir" && ac_dir=.
5351     if test -f $ac_dir/$ac_word; then
5352       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5353       break
5354     fi
5355   done
5356   IFS="$ac_save_ifs"
5357   ;;
5358 esac
5359 fi
5360 PEPSY="$ac_cv_path_PEPSY"
5361 if test -n "$PEPSY"; then
5362   echo "$ac_t""$PEPSY" 1>&6
5363 else
5364   echo "$ac_t""no" 1>&6
5365 fi
5366
5367 fi
5368
5369 if test $ol_enable_quipu != no ; then
5370         for ac_hdr in quipu/commonarg.h
5371 do
5372 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5373 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5374 echo "configure:5375: checking for $ac_hdr" >&5
5375 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 #include <$ac_hdr>
5382 EOF
5383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5384 { (eval echo configure:5385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5386 if test -z "$ac_err"; then
5387   rm -rf conftest*
5388   eval "ac_cv_header_$ac_safe=yes"
5389 else
5390   echo "$ac_err" >&5
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_header_$ac_safe=no"
5395 fi
5396 rm -f conftest*
5397 fi
5398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5399   echo "$ac_t""yes" 1>&6
5400     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5401   cat >> confdefs.h <<EOF
5402 #define $ac_tr_hdr 1
5403 EOF
5404  
5405 else
5406   echo "$ac_t""no" 1>&6
5407 fi
5408 done
5409
5410
5411         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5412                 BUILD_QUIPU=yes
5413         elif test $ol_enable_quipu = auto ; then
5414                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5415         else
5416                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5417         fi
5418 fi
5419
5420 ol_link_kerberos=no
5421
5422 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5423         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5424 do
5425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5427 echo "configure:5428: checking for $ac_hdr" >&5
5428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5429   echo $ac_n "(cached) $ac_c" 1>&6
5430 else
5431   cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 #include <$ac_hdr>
5435 EOF
5436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5437 { (eval echo configure:5438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5439 if test -z "$ac_err"; then
5440   rm -rf conftest*
5441   eval "ac_cv_header_$ac_safe=yes"
5442 else
5443   echo "$ac_err" >&5
5444   echo "configure: failed program was:" >&5
5445   cat conftest.$ac_ext >&5
5446   rm -rf conftest*
5447   eval "ac_cv_header_$ac_safe=no"
5448 fi
5449 rm -f conftest*
5450 fi
5451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5452   echo "$ac_t""yes" 1>&6
5453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5454   cat >> confdefs.h <<EOF
5455 #define $ac_tr_hdr 1
5456 EOF
5457  
5458 else
5459   echo "$ac_t""no" 1>&6
5460 fi
5461 done
5462
5463
5464         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5465                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5466 echo "configure:5467: checking for main in -lkrb4" >&5
5467 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
5468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   ac_save_LIBS="$LIBS"
5472 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5473 cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476
5477 int main() {
5478 main()
5479 ; return 0; }
5480 EOF
5481 if { (eval echo configure:5482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5482   rm -rf conftest*
5483   eval "ac_cv_lib_$ac_lib_var=yes"
5484 else
5485   echo "configure: failed program was:" >&5
5486   cat conftest.$ac_ext >&5
5487   rm -rf conftest*
5488   eval "ac_cv_lib_$ac_lib_var=no"
5489 fi
5490 rm -f conftest*
5491 LIBS="$ac_save_LIBS"
5492
5493 fi
5494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5495   echo "$ac_t""yes" 1>&6
5496   have_k5=yes
5497 else
5498   echo "$ac_t""no" 1>&6
5499 have_k5=no
5500 fi
5501
5502
5503                 if test $have_k5 = yes ; then
5504                         ol_with_kerberos=found
5505                         ol_link_kerberos=yes
5506
5507                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5508
5509                         LIBS="$KRB_LIBS $LIBS"
5510
5511                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5512 echo "configure:5513: checking for des_debug in Kerberos libraries" >&5
5513 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
5514   echo $ac_n "(cached) $ac_c" 1>&6
5515 else
5516   
5517                                                                 save_LIBS="$LIBS"
5518                                 LIBS="$KRB_LIBS $LIBS"
5519                                 cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522
5523 #include <kerberosIV/krb.h>
5524 #include <kerberosIV/des.h>
5525 extern int des_debug;
5526
5527 int main() {
5528
5529 des_debug = 1;
5530
5531 ; return 0; }
5532 EOF
5533 if { (eval echo configure:5534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5534   rm -rf conftest*
5535   ol_cv_var_des_debug=yes
5536 else
5537   echo "configure: failed program was:" >&5
5538   cat conftest.$ac_ext >&5
5539   rm -rf conftest*
5540   ol_cv_var_des_debug=no
5541 fi
5542 rm -f conftest*
5543                                                                 LIBS="$save_LIBS"
5544                         
5545 fi
5546
5547 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5548
5549                         if test $ol_cv_var_des_debug = yes ; then
5550                                 cat >> confdefs.h <<\EOF
5551 #define HAVE_DES_DEBUG 1
5552 EOF
5553
5554                         fi
5555
5556                         LIBS="$save_LIBS"
5557                 fi
5558         fi
5559 fi
5560
5561 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5562         for ac_hdr in krb.h des.h
5563 do
5564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5566 echo "configure:5567: checking for $ac_hdr" >&5
5567 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5568   echo $ac_n "(cached) $ac_c" 1>&6
5569 else
5570   cat > conftest.$ac_ext <<EOF
5571 #line 5572 "configure"
5572 #include "confdefs.h"
5573 #include <$ac_hdr>
5574 EOF
5575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5576 { (eval echo configure:5577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5578 if test -z "$ac_err"; then
5579   rm -rf conftest*
5580   eval "ac_cv_header_$ac_safe=yes"
5581 else
5582   echo "$ac_err" >&5
5583   echo "configure: failed program was:" >&5
5584   cat conftest.$ac_ext >&5
5585   rm -rf conftest*
5586   eval "ac_cv_header_$ac_safe=no"
5587 fi
5588 rm -f conftest*
5589 fi
5590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5591   echo "$ac_t""yes" 1>&6
5592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5593   cat >> confdefs.h <<EOF
5594 #define $ac_tr_hdr 1
5595 EOF
5596  
5597 else
5598   echo "$ac_t""no" 1>&6
5599 fi
5600 done
5601
5602
5603         if test $ac_cv_header_krb_h = yes ; then
5604                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5605 echo "configure:5606: checking for main in -lkrb" >&5
5606 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
5607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5608   echo $ac_n "(cached) $ac_c" 1>&6
5609 else
5610   ac_save_LIBS="$LIBS"
5611 LIBS="-lkrb -ldes $LIBS"
5612 cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615
5616 int main() {
5617 main()
5618 ; return 0; }
5619 EOF
5620 if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5621   rm -rf conftest*
5622   eval "ac_cv_lib_$ac_lib_var=yes"
5623 else
5624   echo "configure: failed program was:" >&5
5625   cat conftest.$ac_ext >&5
5626   rm -rf conftest*
5627   eval "ac_cv_lib_$ac_lib_var=no"
5628 fi
5629 rm -f conftest*
5630 LIBS="$ac_save_LIBS"
5631
5632 fi
5633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5634   echo "$ac_t""yes" 1>&6
5635   have_k4=yes
5636 else
5637   echo "$ac_t""no" 1>&6
5638 have_k4=no
5639 fi
5640
5641
5642                 if test $have_k4 = yes ; then
5643                         ol_with_kerberos=found
5644                         ol_link_kerberos=yes
5645
5646                         KRB_LIBS="-lkrb -ldes"
5647                 fi
5648         fi
5649 fi
5650
5651 if test $ol_link_kerberos = yes ; then
5652         cat >> confdefs.h <<\EOF
5653 #define HAVE_KERBEROS 1
5654 EOF
5655
5656 fi
5657
5658 ol_link_tls=no
5659 if test $ol_with_tls != no ; then
5660         
5661         for ac_hdr in openssl/ssl.h ssl.h
5662 do
5663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5665 echo "configure:5666: checking for $ac_hdr" >&5
5666 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5667   echo $ac_n "(cached) $ac_c" 1>&6
5668 else
5669   cat > conftest.$ac_ext <<EOF
5670 #line 5671 "configure"
5671 #include "confdefs.h"
5672 #include <$ac_hdr>
5673 EOF
5674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5675 { (eval echo configure:5676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5677 if test -z "$ac_err"; then
5678   rm -rf conftest*
5679   eval "ac_cv_header_$ac_safe=yes"
5680 else
5681   echo "$ac_err" >&5
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   eval "ac_cv_header_$ac_safe=no"
5686 fi
5687 rm -f conftest*
5688 fi
5689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5690   echo "$ac_t""yes" 1>&6
5691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5692   cat >> confdefs.h <<EOF
5693 #define $ac_tr_hdr 1
5694 EOF
5695  
5696 else
5697   echo "$ac_t""no" 1>&6
5698 fi
5699 done
5700
5701         
5702         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5703                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5704 echo "configure:5705: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5705 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
5706 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   ac_save_LIBS="$LIBS"
5710 LIBS="-lssl -lcrypto $LIBS"
5711 cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714 /* Override any gcc2 internal prototype to avoid an error.  */
5715 /* We use char because int might match the return type of a gcc2
5716     builtin and then its argument prototype would still apply.  */
5717 char SSLeay_add_ssl_algorithms();
5718
5719 int main() {
5720 SSLeay_add_ssl_algorithms()
5721 ; return 0; }
5722 EOF
5723 if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5724   rm -rf conftest*
5725   eval "ac_cv_lib_$ac_lib_var=yes"
5726 else
5727   echo "configure: failed program was:" >&5
5728   cat conftest.$ac_ext >&5
5729   rm -rf conftest*
5730   eval "ac_cv_lib_$ac_lib_var=no"
5731 fi
5732 rm -f conftest*
5733 LIBS="$ac_save_LIBS"
5734
5735 fi
5736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5737   echo "$ac_t""yes" 1>&6
5738   have_ssleay=yes
5739                         need_rsaref=no
5740 else
5741   echo "$ac_t""no" 1>&6
5742 have_ssleay=no
5743 fi
5744
5745                         
5746                 if test $have_ssleay = no ; then
5747                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5748 echo "configure:5749: checking for SSL_library_init in -lssl" >&5
5749 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
5750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5751   echo $ac_n "(cached) $ac_c" 1>&6
5752 else
5753   ac_save_LIBS="$LIBS"
5754 LIBS="-lssl -lcrypto $LIBS"
5755 cat > conftest.$ac_ext <<EOF
5756 #line 5757 "configure"
5757 #include "confdefs.h"
5758 /* Override any gcc2 internal prototype to avoid an error.  */
5759 /* We use char because int might match the return type of a gcc2
5760     builtin and then its argument prototype would still apply.  */
5761 char SSL_library_init();
5762
5763 int main() {
5764 SSL_library_init()
5765 ; return 0; }
5766 EOF
5767 if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5768   rm -rf conftest*
5769   eval "ac_cv_lib_$ac_lib_var=yes"
5770 else
5771   echo "configure: failed program was:" >&5
5772   cat conftest.$ac_ext >&5
5773   rm -rf conftest*
5774   eval "ac_cv_lib_$ac_lib_var=no"
5775 fi
5776 rm -f conftest*
5777 LIBS="$ac_save_LIBS"
5778
5779 fi
5780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5781   echo "$ac_t""yes" 1>&6
5782   have_ssleay=yes
5783                                 need_rsaref=no
5784 else
5785   echo "$ac_t""no" 1>&6
5786 have_ssleay=no
5787 fi
5788
5789                 fi
5790
5791                 if test $have_ssleay = no ; then
5792                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5793 echo "configure:5794: checking for ssl3_accept in -lssl" >&5
5794 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
5795 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5796   echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798   ac_save_LIBS="$LIBS"
5799 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5800 cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803 /* Override any gcc2 internal prototype to avoid an error.  */
5804 /* We use char because int might match the return type of a gcc2
5805     builtin and then its argument prototype would still apply.  */
5806 char ssl3_accept();
5807
5808 int main() {
5809 ssl3_accept()
5810 ; return 0; }
5811 EOF
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5813   rm -rf conftest*
5814   eval "ac_cv_lib_$ac_lib_var=yes"
5815 else
5816   echo "configure: failed program was:" >&5
5817   cat conftest.$ac_ext >&5
5818   rm -rf conftest*
5819   eval "ac_cv_lib_$ac_lib_var=no"
5820 fi
5821 rm -f conftest*
5822 LIBS="$ac_save_LIBS"
5823
5824 fi
5825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5826   echo "$ac_t""yes" 1>&6
5827   have_ssleay=yes
5828                                 need_rsaref=yes
5829 else
5830   echo "$ac_t""no" 1>&6
5831 have_ssleay=no
5832 fi
5833
5834                 fi
5835
5836                 if test $have_ssleay = yes ; then
5837                         ol_with_tls=found
5838                         ol_link_tls=yes
5839
5840                         cat >> confdefs.h <<\EOF
5841 #define HAVE_SSLEAY 1
5842 EOF
5843
5844
5845                         if test $need_rsaref = yes; then
5846                                 cat >> confdefs.h <<\EOF
5847 #define HAVE_RSAREF 1
5848 EOF
5849
5850
5851                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5852                         else
5853                                 TLS_LIBS="-lssl -lcrypto"
5854                         fi
5855                 fi
5856         fi
5857 fi
5858
5859 if test $ol_link_tls = yes ; then
5860         cat >> confdefs.h <<\EOF
5861 #define HAVE_TLS 1
5862 EOF
5863
5864 fi      
5865
5866 for ac_func in \
5867         ctime_r                 \
5868         gethostbyname_r gethostbyaddr_r \
5869
5870 do
5871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5872 echo "configure:5873: checking for $ac_func" >&5
5873 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 /* System header to define __stub macros and hopefully few prototypes,
5880     which can conflict with char $ac_func(); below.  */
5881 #include <assert.h>
5882 /* Override any gcc2 internal prototype to avoid an error.  */
5883 /* We use char because int might match the return type of a gcc2
5884     builtin and then its argument prototype would still apply.  */
5885 char $ac_func();
5886
5887 int main() {
5888
5889 /* The GNU C library defines this for functions which it implements
5890     to always fail with ENOSYS.  Some functions are actually named
5891     something starting with __ and the normal name is an alias.  */
5892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5893 choke me
5894 #else
5895 $ac_func();
5896 #endif
5897
5898 ; return 0; }
5899 EOF
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901   rm -rf conftest*
5902   eval "ac_cv_func_$ac_func=yes"
5903 else
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   eval "ac_cv_func_$ac_func=no"
5908 fi
5909 rm -f conftest*
5910 fi
5911
5912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5913   echo "$ac_t""yes" 1>&6
5914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5915   cat >> confdefs.h <<EOF
5916 #define $ac_tr_func 1
5917 EOF
5918  
5919 else
5920   echo "$ac_t""no" 1>&6
5921 fi
5922 done
5923
5924
5925 if test "$ac_cv_func_ctime_r" = no ; then
5926         ol_cv_func_ctime_r_nargs=0
5927 else
5928         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5929 echo "configure:5930: checking number of arguments of ctime_r" >&5
5930 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
5931   echo $ac_n "(cached) $ac_c" 1>&6
5932 else
5933   cat > conftest.$ac_ext <<EOF
5934 #line 5935 "configure"
5935 #include "confdefs.h"
5936 #include <time.h>
5937 int main() {
5938 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5939 ; return 0; }
5940 EOF
5941 if { (eval echo configure:5942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5942   rm -rf conftest*
5943   ol_cv_func_ctime_r_nargs=3
5944 else
5945   echo "configure: failed program was:" >&5
5946   cat conftest.$ac_ext >&5
5947   rm -rf conftest*
5948   cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951 #include <time.h>
5952 int main() {
5953 time_t ti; char *buffer; ctime_r(&ti,buffer);
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5957   rm -rf conftest*
5958   ol_cv_func_ctime_r_nargs=2
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   ol_cv_func_ctime_r_nargs=0
5964 fi
5965 rm -f conftest*
5966 fi
5967 rm -f conftest*
5968 fi
5969
5970 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5971   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5972     cat >> confdefs.h <<EOF
5973 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5974 EOF
5975
5976   fi
5977
5978 fi
5979
5980 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5981         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5982 echo "configure:5983: checking number of arguments of gethostbyname_r" >&5
5983 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
5984   echo $ac_n "(cached) $ac_c" 1>&6
5985 else
5986   cat > conftest.$ac_ext <<EOF
5987 #line 5988 "configure"
5988 #include "confdefs.h"
5989 #include <sys/types.h>
5990 #include <sys/socket.h>
5991 #include <netinet/in.h>
5992 #include <netdb.h>
5993 #define BUFSIZE (sizeof(struct hostent)+10)
5994 int main() {
5995 struct hostent hent; char buffer[BUFSIZE];
5996                 int bufsize=BUFSIZE;int h_errno;
5997                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5998                         buffer, bufsize, &h_errno);
5999 ; return 0; }
6000 EOF
6001 if { (eval echo configure:6002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6002   rm -rf conftest*
6003   ol_cv_func_gethostbyname_r_nargs=5
6004 else
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -rf conftest*
6008   cat > conftest.$ac_ext <<EOF
6009 #line 6010 "configure"
6010 #include "confdefs.h"
6011 #include <sys/types.h>
6012 #include <sys/socket.h>
6013 #include <netinet/in.h>
6014 #include <netdb.h>
6015 #define BUFSIZE (sizeof(struct hostent)+10)
6016 int main() {
6017 struct hostent hent;struct hostent *rhent;
6018                         char buffer[BUFSIZE];
6019                         int bufsize=BUFSIZE;int h_errno;
6020                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6021                                 &rhent, &h_errno);
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6025   rm -rf conftest*
6026   ol_cv_func_gethostbyname_r_nargs=6
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   ol_cv_func_gethostbyname_r_nargs=0
6032 fi
6033 rm -f conftest*
6034 fi
6035 rm -f conftest*
6036 fi
6037
6038 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6039   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6040         cat >> confdefs.h <<EOF
6041 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6042 EOF
6043
6044   fi
6045
6046 else
6047         ol_cv_func_gethostbyname_r_nargs=0
6048 fi
6049  
6050 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6051         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6052 echo "configure:6053: checking number of arguments of gethostbyaddr_r" >&5
6053 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
6054   echo $ac_n "(cached) $ac_c" 1>&6
6055 else
6056   cat > conftest.$ac_ext <<EOF
6057 #line 6058 "configure"
6058 #include "confdefs.h"
6059 #include <sys/types.h>
6060 #include <sys/socket.h>
6061 #include <netinet/in.h>
6062 #include <netdb.h>
6063 #define BUFSIZE (sizeof(struct hostent)+10)
6064 int main() {
6065 struct hostent hent; char buffer[BUFSIZE]; 
6066             struct in_addr add;
6067             size_t alen=sizeof(struct in_addr);
6068             int bufsize=BUFSIZE;int h_errno;
6069                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6070                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6071 ; return 0; }
6072 EOF
6073 if { (eval echo configure:6074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6074   rm -rf conftest*
6075   ol_cv_func_gethostbyaddr_r_nargs=7
6076 else
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
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;
6090                         struct hostent *rhent; char buffer[BUFSIZE]; 
6091                         struct in_addr add;
6092                         size_t alen=sizeof(struct in_addr);
6093                         int bufsize=BUFSIZE;int h_errno;
6094                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6095                                 alen, AF_INET, &hent, buffer, bufsize, 
6096                                 &rhent, &h_errno);
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6100   rm -rf conftest*
6101   ol_cv_func_gethostbyaddr_r_nargs=8
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105   rm -rf conftest*
6106   ol_cv_func_gethostbyaddr_r_nargs=0
6107 fi
6108 rm -f conftest*
6109 fi
6110 rm -f conftest*
6111 fi
6112
6113 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6114   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6115     cat >> confdefs.h <<EOF
6116 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6117 EOF
6118
6119   fi
6120
6121 else
6122         ol_cv_func_gethostbyaddr_r_nargs=0
6123 fi
6124
6125 if test "$ac_cv_func_ctime_r" = yes \
6126         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6127         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6128         -a "$ac_cv_func_gethostbyname_r" = yes \
6129         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6130         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6131         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6132         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6133         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6134         ; then
6135  
6136         cat >> confdefs.h <<\EOF
6137 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6138 EOF
6139
6140 fi
6141
6142 ol_link_threads=no
6143 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6144         -o $ol_with_threads = posix ; then
6145
6146         for ac_hdr in pthread.h sched.h
6147 do
6148 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6149 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6150 echo "configure:6151: checking for $ac_hdr" >&5
6151 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6152   echo $ac_n "(cached) $ac_c" 1>&6
6153 else
6154   cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 #include <$ac_hdr>
6158 EOF
6159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6160 { (eval echo configure:6161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6162 if test -z "$ac_err"; then
6163   rm -rf conftest*
6164   eval "ac_cv_header_$ac_safe=yes"
6165 else
6166   echo "$ac_err" >&5
6167   echo "configure: failed program was:" >&5
6168   cat conftest.$ac_ext >&5
6169   rm -rf conftest*
6170   eval "ac_cv_header_$ac_safe=no"
6171 fi
6172 rm -f conftest*
6173 fi
6174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6175   echo "$ac_t""yes" 1>&6
6176     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6177   cat >> confdefs.h <<EOF
6178 #define $ac_tr_hdr 1
6179 EOF
6180  
6181 else
6182   echo "$ac_t""no" 1>&6
6183 fi
6184 done
6185
6186
6187         if test $ac_cv_header_pthread_h = yes ; then
6188                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6189 echo "configure:6190: checking POSIX thread version" >&5
6190 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
6191   echo $ac_n "(cached) $ac_c" 1>&6
6192 else
6193   
6194         cat > conftest.$ac_ext <<EOF
6195 #line 6196 "configure"
6196 #include "confdefs.h"
6197
6198 #               include <pthread.h>
6199                 /* this check could be improved */
6200 #               ifdef PTHREAD_ONCE_INIT
6201                         pthread_version_final
6202 #               endif
6203         
6204 EOF
6205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6206   egrep "pthread_version_final" >/dev/null 2>&1; then
6207   rm -rf conftest*
6208   ol_pthread_final=yes
6209 else
6210   rm -rf conftest*
6211   ol_pthread_final=no
6212 fi
6213 rm -f conftest*
6214
6215
6216         cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219
6220 #               include <pthread.h>
6221                 /* this check could be improved */
6222 #               ifdef pthread_once_init
6223                         pthread_version_draft4
6224 #               endif
6225         
6226 EOF
6227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6228   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6229   rm -rf conftest*
6230   ol_pthread_draft4=yes
6231 else
6232   rm -rf conftest*
6233   ol_pthread_draft4=no
6234 fi
6235 rm -f conftest*
6236
6237
6238         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6239                 ol_cv_pthread_version=final
6240         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6241                 ol_cv_pthread_version=draft4
6242         else
6243                 ol_cv_pthread_version=unknown
6244         fi
6245
6246 fi
6247
6248 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6249
6250
6251                 if test $ol_cv_pthread_version = final ; then
6252                         cat >> confdefs.h <<\EOF
6253 #define HAVE_PTHREADS_FINAL 1
6254 EOF
6255
6256                 elif test $ol_cv_pthread_version = draft4 ; then
6257                         cat >> confdefs.h <<\EOF
6258 #define HAVE_PTHREADS_D4 1
6259 EOF
6260
6261                 else
6262                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6263                 fi
6264
6265                 # consider threads found
6266                 ol_with_threads=found
6267
6268                 
6269         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6270 echo "configure:6271: checking for LinuxThreads pthread.h" >&5
6271 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6272   echo $ac_n "(cached) $ac_c" 1>&6
6273 else
6274   cat > conftest.$ac_ext <<EOF
6275 #line 6276 "configure"
6276 #include "confdefs.h"
6277 #include <pthread.h>
6278 EOF
6279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6280   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6281   rm -rf conftest*
6282   ol_cv_header_linux_threads=yes
6283 else
6284   rm -rf conftest*
6285   ol_cv_header_linux_threads=no
6286 fi
6287 rm -f conftest*
6288
6289                 
6290 fi
6291
6292 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6293         if test $ol_cv_header_linux_threads = yes; then
6294                 cat >> confdefs.h <<\EOF
6295 #define HAVE_LINUX_THREADS 1
6296 EOF
6297
6298         fi
6299
6300
6301                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6302                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6303 echo "configure:6304: checking for pthread_create in default libraries" >&5
6304 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
6305   echo $ac_n "(cached) $ac_c" 1>&6
6306 else
6307   
6308                 if test "$cross_compiling" = yes; then
6309                         ol_cv_pthread_create=yes
6310 else
6311   cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314
6315 #include <pthread.h>
6316 #ifndef NULL
6317 #define NULL (void*)0
6318 #endif
6319
6320 static void *task(p)
6321         void *p;
6322 {
6323         return (void *) (p == NULL);
6324 }
6325
6326 int main(argc, argv)
6327         int argc;
6328         char **argv;
6329 {
6330         pthread_t t;
6331         int status;
6332
6333         /* make sure pthread_create() isn't just a stub */
6334 #if HAVE_PTHREADS_D4
6335         status = pthread_create(&t, pthread_attr_default, task, NULL);
6336 #else
6337         status = pthread_create(&t, NULL, task, NULL);
6338 #endif
6339
6340         if( status ) return status;
6341
6342         /* make sure pthread_detach() isn't just a stub */
6343 #if HAVE_PTHREADS_D4
6344         status = pthread_detach( &t );
6345 #else
6346         status = pthread_detach( t );
6347 #endif
6348
6349         return status;
6350 }
6351
6352 EOF
6353 if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6354 then
6355   ol_cv_pthread_create=yes
6356 else
6357   echo "configure: failed program was:" >&5
6358   cat conftest.$ac_ext >&5
6359   rm -fr conftest*
6360   ol_cv_pthread_create=no
6361 fi
6362 rm -fr conftest*
6363 fi
6364
6365 fi
6366
6367 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6368
6369                 if test $ol_cv_pthread_create != no ; then
6370                         ol_link_threads=posix
6371                         ol_link_pthreads=""
6372                 fi
6373                 
6374                 # Pthread try link: -mt (ol_cv_pthread_mt)
6375         if test "$ol_link_threads" = no ; then
6376                 # try -mt
6377                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6378 echo "configure:6379: checking for pthread link with -mt" >&5
6379 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
6380   echo $ac_n "(cached) $ac_c" 1>&6
6381 else
6382   
6383                         # save the flags
6384                         ol_LIBS="$LIBS"
6385                         LIBS="-mt $LIBS"
6386
6387                         cat > conftest.$ac_ext <<EOF
6388 #line 6389 "configure"
6389 #include "confdefs.h"
6390
6391 #include <pthread.h>
6392 #ifndef NULL
6393 #define NULL (void*)0
6394 #endif
6395
6396 int main() {
6397
6398         pthread_t t;
6399
6400 #if HAVE_PTHREADS_D4
6401         pthread_create(&t, pthread_attr_default, NULL, NULL);
6402         pthread_detach( &t );
6403 #else
6404         pthread_create(&t, NULL, NULL, NULL);
6405         pthread_detach( t );
6406 #endif
6407 #ifdef HAVE_LINUX_THREADS
6408         pthread_kill_other_threads_np();
6409 #endif
6410
6411 ; return 0; }
6412 EOF
6413 if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6414   rm -rf conftest*
6415   ol_cv_pthread_mt=yes
6416 else
6417   echo "configure: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   rm -rf conftest*
6420   ol_cv_pthread_mt=no
6421 fi
6422 rm -f conftest*
6423
6424                 # restore the LIBS
6425                 LIBS="$ol_LIBS"
6426                 
6427 fi
6428
6429 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6430
6431                 if test $ol_cv_pthread_mt = yes ; then
6432                         ol_link_pthreads="-mt"
6433                         ol_link_threads=posix
6434                 fi
6435         fi
6436
6437                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6438         if test "$ol_link_threads" = no ; then
6439                 # try -kthread
6440                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6441 echo "configure:6442: checking for pthread link with -kthread" >&5
6442 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
6443   echo $ac_n "(cached) $ac_c" 1>&6
6444 else
6445   
6446                         # save the flags
6447                         ol_LIBS="$LIBS"
6448                         LIBS="-kthread $LIBS"
6449
6450                         cat > conftest.$ac_ext <<EOF
6451 #line 6452 "configure"
6452 #include "confdefs.h"
6453
6454 #include <pthread.h>
6455 #ifndef NULL
6456 #define NULL (void*)0
6457 #endif
6458
6459 int main() {
6460
6461         pthread_t t;
6462
6463 #if HAVE_PTHREADS_D4
6464         pthread_create(&t, pthread_attr_default, NULL, NULL);
6465         pthread_detach( &t );
6466 #else
6467         pthread_create(&t, NULL, NULL, NULL);
6468         pthread_detach( t );
6469 #endif
6470 #ifdef HAVE_LINUX_THREADS
6471         pthread_kill_other_threads_np();
6472 #endif
6473
6474 ; return 0; }
6475 EOF
6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6477   rm -rf conftest*
6478   ol_cv_pthread_kthread=yes
6479 else
6480   echo "configure: failed program was:" >&5
6481   cat conftest.$ac_ext >&5
6482   rm -rf conftest*
6483   ol_cv_pthread_kthread=no
6484 fi
6485 rm -f conftest*
6486
6487                 # restore the LIBS
6488                 LIBS="$ol_LIBS"
6489                 
6490 fi
6491
6492 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6493
6494                 if test $ol_cv_pthread_kthread = yes ; then
6495                         ol_link_pthreads="-kthread"
6496                         ol_link_threads=posix
6497                 fi
6498         fi
6499
6500                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6501         if test "$ol_link_threads" = no ; then
6502                 # try -pthread
6503                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6504 echo "configure:6505: checking for pthread link with -pthread" >&5
6505 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
6506   echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508   
6509                         # save the flags
6510                         ol_LIBS="$LIBS"
6511                         LIBS="-pthread $LIBS"
6512
6513                         cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516
6517 #include <pthread.h>
6518 #ifndef NULL
6519 #define NULL (void*)0
6520 #endif
6521
6522 int main() {
6523
6524         pthread_t t;
6525
6526 #if HAVE_PTHREADS_D4
6527         pthread_create(&t, pthread_attr_default, NULL, NULL);
6528         pthread_detach( &t );
6529 #else
6530         pthread_create(&t, NULL, NULL, NULL);
6531         pthread_detach( t );
6532 #endif
6533 #ifdef HAVE_LINUX_THREADS
6534         pthread_kill_other_threads_np();
6535 #endif
6536
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   ol_cv_pthread_pthread=yes
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   ol_cv_pthread_pthread=no
6547 fi
6548 rm -f conftest*
6549
6550                 # restore the LIBS
6551                 LIBS="$ol_LIBS"
6552                 
6553 fi
6554
6555 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6556
6557                 if test $ol_cv_pthread_pthread = yes ; then
6558                         ol_link_pthreads="-pthread"
6559                         ol_link_threads=posix
6560                 fi
6561         fi
6562
6563                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6564         if test "$ol_link_threads" = no ; then
6565                 # try -pthreads
6566                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6567 echo "configure:6568: checking for pthread link with -pthreads" >&5
6568 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
6569   echo $ac_n "(cached) $ac_c" 1>&6
6570 else
6571   
6572                         # save the flags
6573                         ol_LIBS="$LIBS"
6574                         LIBS="-pthreads $LIBS"
6575
6576                         cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579
6580 #include <pthread.h>
6581 #ifndef NULL
6582 #define NULL (void*)0
6583 #endif
6584
6585 int main() {
6586
6587         pthread_t t;
6588
6589 #if HAVE_PTHREADS_D4
6590         pthread_create(&t, pthread_attr_default, NULL, NULL);
6591         pthread_detach( &t );
6592 #else
6593         pthread_create(&t, NULL, NULL, NULL);
6594         pthread_detach( t );
6595 #endif
6596 #ifdef HAVE_LINUX_THREADS
6597         pthread_kill_other_threads_np();
6598 #endif
6599
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6603   rm -rf conftest*
6604   ol_cv_pthread_pthreads=yes
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608   rm -rf conftest*
6609   ol_cv_pthread_pthreads=no
6610 fi
6611 rm -f conftest*
6612
6613                 # restore the LIBS
6614                 LIBS="$ol_LIBS"
6615                 
6616 fi
6617
6618 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6619
6620                 if test $ol_cv_pthread_pthreads = yes ; then
6621                         ol_link_pthreads="-pthreads"
6622                         ol_link_threads=posix
6623                 fi
6624         fi
6625
6626                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6627         if test "$ol_link_threads" = no ; then
6628                 # try -mthreads
6629                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6630 echo "configure:6631: checking for pthread link with -mthreads" >&5
6631 if eval "test \"`echo '$''{'ol_cv_pthread_mthreads'+set}'`\" = set"; then
6632   echo $ac_n "(cached) $ac_c" 1>&6
6633 else
6634   
6635                         # save the flags
6636                         ol_LIBS="$LIBS"
6637                         LIBS="-mthreads $LIBS"
6638
6639                         cat > conftest.$ac_ext <<EOF
6640 #line 6641 "configure"
6641 #include "confdefs.h"
6642
6643 #include <pthread.h>
6644 #ifndef NULL
6645 #define NULL (void*)0
6646 #endif
6647
6648 int main() {
6649
6650         pthread_t t;
6651
6652 #if HAVE_PTHREADS_D4
6653         pthread_create(&t, pthread_attr_default, NULL, NULL);
6654         pthread_detach( &t );
6655 #else
6656         pthread_create(&t, NULL, NULL, NULL);
6657         pthread_detach( t );
6658 #endif
6659 #ifdef HAVE_LINUX_THREADS
6660         pthread_kill_other_threads_np();
6661 #endif
6662
6663 ; return 0; }
6664 EOF
6665 if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6666   rm -rf conftest*
6667   ol_cv_pthread_mthreads=yes
6668 else
6669   echo "configure: failed program was:" >&5
6670   cat conftest.$ac_ext >&5
6671   rm -rf conftest*
6672   ol_cv_pthread_mthreads=no
6673 fi
6674 rm -f conftest*
6675
6676                 # restore the LIBS
6677                 LIBS="$ol_LIBS"
6678                 
6679 fi
6680
6681 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6682
6683                 if test $ol_cv_pthread_mthreads = yes ; then
6684                         ol_link_pthreads="-mthreads"
6685                         ol_link_threads=posix
6686                 fi
6687         fi
6688
6689                 # Pthread try link: -thread (ol_cv_pthread_thread)
6690         if test "$ol_link_threads" = no ; then
6691                 # try -thread
6692                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6693 echo "configure:6694: checking for pthread link with -thread" >&5
6694 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   
6698                         # save the flags
6699                         ol_LIBS="$LIBS"
6700                         LIBS="-thread $LIBS"
6701
6702                         cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705
6706 #include <pthread.h>
6707 #ifndef NULL
6708 #define NULL (void*)0
6709 #endif
6710
6711 int main() {
6712
6713         pthread_t t;
6714
6715 #if HAVE_PTHREADS_D4
6716         pthread_create(&t, pthread_attr_default, NULL, NULL);
6717         pthread_detach( &t );
6718 #else
6719         pthread_create(&t, NULL, NULL, NULL);
6720         pthread_detach( t );
6721 #endif
6722 #ifdef HAVE_LINUX_THREADS
6723         pthread_kill_other_threads_np();
6724 #endif
6725
6726 ; return 0; }
6727 EOF
6728 if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6729   rm -rf conftest*
6730   ol_cv_pthread_thread=yes
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   ol_cv_pthread_thread=no
6736 fi
6737 rm -f conftest*
6738
6739                 # restore the LIBS
6740                 LIBS="$ol_LIBS"
6741                 
6742 fi
6743
6744 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6745
6746                 if test $ol_cv_pthread_thread = yes ; then
6747                         ol_link_pthreads="-thread"
6748                         ol_link_threads=posix
6749                 fi
6750         fi
6751
6752
6753                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6754         if test "$ol_link_threads" = no ; then
6755                 # try -lpthread -lmach -lexc -lc_r
6756                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6757 echo "configure:6758: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6758 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
6759   echo $ac_n "(cached) $ac_c" 1>&6
6760 else
6761   
6762                         # save the flags
6763                         ol_LIBS="$LIBS"
6764                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6765
6766                         cat > conftest.$ac_ext <<EOF
6767 #line 6768 "configure"
6768 #include "confdefs.h"
6769
6770 #include <pthread.h>
6771 #ifndef NULL
6772 #define NULL (void*)0
6773 #endif
6774
6775 int main() {
6776
6777         pthread_t t;
6778
6779 #if HAVE_PTHREADS_D4
6780         pthread_create(&t, pthread_attr_default, NULL, NULL);
6781         pthread_detach( &t );
6782 #else
6783         pthread_create(&t, NULL, NULL, NULL);
6784         pthread_detach( t );
6785 #endif
6786 #ifdef HAVE_LINUX_THREADS
6787         pthread_kill_other_threads_np();
6788 #endif
6789
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798   rm -rf conftest*
6799   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6800 fi
6801 rm -f conftest*
6802
6803                 # restore the LIBS
6804                 LIBS="$ol_LIBS"
6805                 
6806 fi
6807
6808 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6809
6810                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6811                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6812                         ol_link_threads=posix
6813                 fi
6814         fi
6815
6816                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6817         if test "$ol_link_threads" = no ; then
6818                 # try -lpthread -lmach -lexc
6819                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6820 echo "configure:6821: checking for pthread link with -lpthread -lmach -lexc" >&5
6821 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   
6825                         # save the flags
6826                         ol_LIBS="$LIBS"
6827                         LIBS="-lpthread -lmach -lexc $LIBS"
6828
6829                         cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832
6833 #include <pthread.h>
6834 #ifndef NULL
6835 #define NULL (void*)0
6836 #endif
6837
6838 int main() {
6839
6840         pthread_t t;
6841
6842 #if HAVE_PTHREADS_D4
6843         pthread_create(&t, pthread_attr_default, NULL, NULL);
6844         pthread_detach( &t );
6845 #else
6846         pthread_create(&t, NULL, NULL, NULL);
6847         pthread_detach( t );
6848 #endif
6849 #ifdef HAVE_LINUX_THREADS
6850         pthread_kill_other_threads_np();
6851 #endif
6852
6853 ; return 0; }
6854 EOF
6855 if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6856   rm -rf conftest*
6857   ol_cv_pthread_lpthread_lmach_lexc=yes
6858 else
6859   echo "configure: failed program was:" >&5
6860   cat conftest.$ac_ext >&5
6861   rm -rf conftest*
6862   ol_cv_pthread_lpthread_lmach_lexc=no
6863 fi
6864 rm -f conftest*
6865
6866                 # restore the LIBS
6867                 LIBS="$ol_LIBS"
6868                 
6869 fi
6870
6871 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6872
6873                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6874                         ol_link_pthreads="-lpthread -lmach -lexc"
6875                         ol_link_threads=posix
6876                 fi
6877         fi
6878
6879
6880                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6881         if test "$ol_link_threads" = no ; then
6882                 # try -lpthread -Wl,-woff,85
6883                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6884 echo "configure:6885: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6885 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
6886   echo $ac_n "(cached) $ac_c" 1>&6
6887 else
6888   
6889                         # save the flags
6890                         ol_LIBS="$LIBS"
6891                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6892
6893                         cat > conftest.$ac_ext <<EOF
6894 #line 6895 "configure"
6895 #include "confdefs.h"
6896
6897 #include <pthread.h>
6898 #ifndef NULL
6899 #define NULL (void*)0
6900 #endif
6901
6902 int main() {
6903
6904         pthread_t t;
6905
6906 #if HAVE_PTHREADS_D4
6907         pthread_create(&t, pthread_attr_default, NULL, NULL);
6908         pthread_detach( &t );
6909 #else
6910         pthread_create(&t, NULL, NULL, NULL);
6911         pthread_detach( t );
6912 #endif
6913 #ifdef HAVE_LINUX_THREADS
6914         pthread_kill_other_threads_np();
6915 #endif
6916
6917 ; return 0; }
6918 EOF
6919 if { (eval echo configure:6920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6920   rm -rf conftest*
6921   ol_cv_pthread_lib_lpthread_woff=yes
6922 else
6923   echo "configure: failed program was:" >&5
6924   cat conftest.$ac_ext >&5
6925   rm -rf conftest*
6926   ol_cv_pthread_lib_lpthread_woff=no
6927 fi
6928 rm -f conftest*
6929
6930                 # restore the LIBS
6931                 LIBS="$ol_LIBS"
6932                 
6933 fi
6934
6935 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6936
6937                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6938                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6939                         ol_link_threads=posix
6940                 fi
6941         fi
6942
6943
6944                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6945         if test "$ol_link_threads" = no ; then
6946                 # try -lpthread
6947                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6948 echo "configure:6949: checking for pthread link with -lpthread" >&5
6949 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
6950   echo $ac_n "(cached) $ac_c" 1>&6
6951 else
6952   
6953                         # save the flags
6954                         ol_LIBS="$LIBS"
6955                         LIBS="-lpthread $LIBS"
6956
6957                         cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960
6961 #include <pthread.h>
6962 #ifndef NULL
6963 #define NULL (void*)0
6964 #endif
6965
6966 int main() {
6967
6968         pthread_t t;
6969
6970 #if HAVE_PTHREADS_D4
6971         pthread_create(&t, pthread_attr_default, NULL, NULL);
6972         pthread_detach( &t );
6973 #else
6974         pthread_create(&t, NULL, NULL, NULL);
6975         pthread_detach( t );
6976 #endif
6977 #ifdef HAVE_LINUX_THREADS
6978         pthread_kill_other_threads_np();
6979 #endif
6980
6981 ; return 0; }
6982 EOF
6983 if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6984   rm -rf conftest*
6985   ol_cv_pthread_lpthread=yes
6986 else
6987   echo "configure: failed program was:" >&5
6988   cat conftest.$ac_ext >&5
6989   rm -rf conftest*
6990   ol_cv_pthread_lpthread=no
6991 fi
6992 rm -f conftest*
6993
6994                 # restore the LIBS
6995                 LIBS="$ol_LIBS"
6996                 
6997 fi
6998
6999 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7000
7001                 if test $ol_cv_pthread_lpthread = yes ; then
7002                         ol_link_pthreads="-lpthread"
7003                         ol_link_threads=posix
7004                 fi
7005         fi
7006
7007                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7008         if test "$ol_link_threads" = no ; then
7009                 # try -lc_r
7010                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7011 echo "configure:7012: checking for pthread link with -lc_r" >&5
7012 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
7013   echo $ac_n "(cached) $ac_c" 1>&6
7014 else
7015   
7016                         # save the flags
7017                         ol_LIBS="$LIBS"
7018                         LIBS="-lc_r $LIBS"
7019
7020                         cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7023
7024 #include <pthread.h>
7025 #ifndef NULL
7026 #define NULL (void*)0
7027 #endif
7028
7029 int main() {
7030
7031         pthread_t t;
7032
7033 #if HAVE_PTHREADS_D4
7034         pthread_create(&t, pthread_attr_default, NULL, NULL);
7035         pthread_detach( &t );
7036 #else
7037         pthread_create(&t, NULL, NULL, NULL);
7038         pthread_detach( t );
7039 #endif
7040 #ifdef HAVE_LINUX_THREADS
7041         pthread_kill_other_threads_np();
7042 #endif
7043
7044 ; return 0; }
7045 EOF
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047   rm -rf conftest*
7048   ol_cv_pthread_lc_r=yes
7049 else
7050   echo "configure: failed program was:" >&5
7051   cat conftest.$ac_ext >&5
7052   rm -rf conftest*
7053   ol_cv_pthread_lc_r=no
7054 fi
7055 rm -f conftest*
7056
7057                 # restore the LIBS
7058                 LIBS="$ol_LIBS"
7059                 
7060 fi
7061
7062 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
7063
7064                 if test $ol_cv_pthread_lc_r = yes ; then
7065                         ol_link_pthreads="-lc_r"
7066                         ol_link_threads=posix
7067                 fi
7068         fi
7069
7070
7071                 # Pthread try link: -threads (ol_cv_pthread_threads)
7072         if test "$ol_link_threads" = no ; then
7073                 # try -threads
7074                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
7075 echo "configure:7076: checking for pthread link with -threads" >&5
7076 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
7077   echo $ac_n "(cached) $ac_c" 1>&6
7078 else
7079   
7080                         # save the flags
7081                         ol_LIBS="$LIBS"
7082                         LIBS="-threads $LIBS"
7083
7084                         cat > conftest.$ac_ext <<EOF
7085 #line 7086 "configure"
7086 #include "confdefs.h"
7087
7088 #include <pthread.h>
7089 #ifndef NULL
7090 #define NULL (void*)0
7091 #endif
7092
7093 int main() {
7094
7095         pthread_t t;
7096
7097 #if HAVE_PTHREADS_D4
7098         pthread_create(&t, pthread_attr_default, NULL, NULL);
7099         pthread_detach( &t );
7100 #else
7101         pthread_create(&t, NULL, NULL, NULL);
7102         pthread_detach( t );
7103 #endif
7104 #ifdef HAVE_LINUX_THREADS
7105         pthread_kill_other_threads_np();
7106 #endif
7107
7108 ; return 0; }
7109 EOF
7110 if { (eval echo configure:7111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7111   rm -rf conftest*
7112   ol_cv_pthread_threads=yes
7113 else
7114   echo "configure: failed program was:" >&5
7115   cat conftest.$ac_ext >&5
7116   rm -rf conftest*
7117   ol_cv_pthread_threads=no
7118 fi
7119 rm -f conftest*
7120
7121                 # restore the LIBS
7122                 LIBS="$ol_LIBS"
7123                 
7124 fi
7125
7126 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7127
7128                 if test $ol_cv_pthread_threads = yes ; then
7129                         ol_link_pthreads="-threads"
7130                         ol_link_threads=posix
7131                 fi
7132         fi
7133
7134
7135                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7136         if test "$ol_link_threads" = no ; then
7137                 # try -lpthreads -lmach -lexc -lc_r
7138                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7139 echo "configure:7140: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7140 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
7141   echo $ac_n "(cached) $ac_c" 1>&6
7142 else
7143   
7144                         # save the flags
7145                         ol_LIBS="$LIBS"
7146                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7147
7148                         cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151
7152 #include <pthread.h>
7153 #ifndef NULL
7154 #define NULL (void*)0
7155 #endif
7156
7157 int main() {
7158
7159         pthread_t t;
7160
7161 #if HAVE_PTHREADS_D4
7162         pthread_create(&t, pthread_attr_default, NULL, NULL);
7163         pthread_detach( &t );
7164 #else
7165         pthread_create(&t, NULL, NULL, NULL);
7166         pthread_detach( t );
7167 #endif
7168 #ifdef HAVE_LINUX_THREADS
7169         pthread_kill_other_threads_np();
7170 #endif
7171
7172 ; return 0; }
7173 EOF
7174 if { (eval echo configure:7175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7175   rm -rf conftest*
7176   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7177 else
7178   echo "configure: failed program was:" >&5
7179   cat conftest.$ac_ext >&5
7180   rm -rf conftest*
7181   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7182 fi
7183 rm -f conftest*
7184
7185                 # restore the LIBS
7186                 LIBS="$ol_LIBS"
7187                 
7188 fi
7189
7190 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7191
7192                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7193                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7194                         ol_link_threads=posix
7195                 fi
7196         fi
7197
7198                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7199         if test "$ol_link_threads" = no ; then
7200                 # try -lpthreads -lmach -lexc
7201                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7202 echo "configure:7203: checking for pthread link with -lpthreads -lmach -lexc" >&5
7203 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
7204   echo $ac_n "(cached) $ac_c" 1>&6
7205 else
7206   
7207                         # save the flags
7208                         ol_LIBS="$LIBS"
7209                         LIBS="-lpthreads -lmach -lexc $LIBS"
7210
7211                         cat > conftest.$ac_ext <<EOF
7212 #line 7213 "configure"
7213 #include "confdefs.h"
7214
7215 #include <pthread.h>
7216 #ifndef NULL
7217 #define NULL (void*)0
7218 #endif
7219
7220 int main() {
7221
7222         pthread_t t;
7223
7224 #if HAVE_PTHREADS_D4
7225         pthread_create(&t, pthread_attr_default, NULL, NULL);
7226         pthread_detach( &t );
7227 #else
7228         pthread_create(&t, NULL, NULL, NULL);
7229         pthread_detach( t );
7230 #endif
7231 #ifdef HAVE_LINUX_THREADS
7232         pthread_kill_other_threads_np();
7233 #endif
7234
7235 ; return 0; }
7236 EOF
7237 if { (eval echo configure:7238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7238   rm -rf conftest*
7239   ol_cv_pthread_lpthreads_lmach_lexc=yes
7240 else
7241   echo "configure: failed program was:" >&5
7242   cat conftest.$ac_ext >&5
7243   rm -rf conftest*
7244   ol_cv_pthread_lpthreads_lmach_lexc=no
7245 fi
7246 rm -f conftest*
7247
7248                 # restore the LIBS
7249                 LIBS="$ol_LIBS"
7250                 
7251 fi
7252
7253 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7254
7255                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7256                         ol_link_pthreads="-lpthreads -lmach -lexc"
7257                         ol_link_threads=posix
7258                 fi
7259         fi
7260
7261                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7262         if test "$ol_link_threads" = no ; then
7263                 # try -lpthreads -lexc
7264                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7265 echo "configure:7266: checking for pthread link with -lpthreads -lexc" >&5
7266 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
7267   echo $ac_n "(cached) $ac_c" 1>&6
7268 else
7269   
7270                         # save the flags
7271                         ol_LIBS="$LIBS"
7272                         LIBS="-lpthreads -lexc $LIBS"
7273
7274                         cat > conftest.$ac_ext <<EOF
7275 #line 7276 "configure"
7276 #include "confdefs.h"
7277
7278 #include <pthread.h>
7279 #ifndef NULL
7280 #define NULL (void*)0
7281 #endif
7282
7283 int main() {
7284
7285         pthread_t t;
7286
7287 #if HAVE_PTHREADS_D4
7288         pthread_create(&t, pthread_attr_default, NULL, NULL);
7289         pthread_detach( &t );
7290 #else
7291         pthread_create(&t, NULL, NULL, NULL);
7292         pthread_detach( t );
7293 #endif
7294 #ifdef HAVE_LINUX_THREADS
7295         pthread_kill_other_threads_np();
7296 #endif
7297
7298 ; return 0; }
7299 EOF
7300 if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7301   rm -rf conftest*
7302   ol_cv_pthread_lpthreads_lexc=yes
7303 else
7304   echo "configure: failed program was:" >&5
7305   cat conftest.$ac_ext >&5
7306   rm -rf conftest*
7307   ol_cv_pthread_lpthreads_lexc=no
7308 fi
7309 rm -f conftest*
7310
7311                 # restore the LIBS
7312                 LIBS="$ol_LIBS"
7313                 
7314 fi
7315
7316 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7317
7318                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7319                         ol_link_pthreads="-lpthreads -lexc"
7320                         ol_link_threads=posix
7321                 fi
7322         fi
7323
7324
7325                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7326         if test "$ol_link_threads" = no ; then
7327                 # try -lpthreads
7328                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7329 echo "configure:7330: checking for pthread link with -lpthreads" >&5
7330 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
7331   echo $ac_n "(cached) $ac_c" 1>&6
7332 else
7333   
7334                         # save the flags
7335                         ol_LIBS="$LIBS"
7336                         LIBS="-lpthreads $LIBS"
7337
7338                         cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341
7342 #include <pthread.h>
7343 #ifndef NULL
7344 #define NULL (void*)0
7345 #endif
7346
7347 int main() {
7348
7349         pthread_t t;
7350
7351 #if HAVE_PTHREADS_D4
7352         pthread_create(&t, pthread_attr_default, NULL, NULL);
7353         pthread_detach( &t );
7354 #else
7355         pthread_create(&t, NULL, NULL, NULL);
7356         pthread_detach( t );
7357 #endif
7358 #ifdef HAVE_LINUX_THREADS
7359         pthread_kill_other_threads_np();
7360 #endif
7361
7362 ; return 0; }
7363 EOF
7364 if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7365   rm -rf conftest*
7366   ol_cv_pthread_lib_lpthreads=yes
7367 else
7368   echo "configure: failed program was:" >&5
7369   cat conftest.$ac_ext >&5
7370   rm -rf conftest*
7371   ol_cv_pthread_lib_lpthreads=no
7372 fi
7373 rm -f conftest*
7374
7375                 # restore the LIBS
7376                 LIBS="$ol_LIBS"
7377                 
7378 fi
7379
7380 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7381
7382                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7383                         ol_link_pthreads="-lpthreads"
7384                         ol_link_threads=posix
7385                 fi
7386         fi
7387
7388
7389                 if test $ol_link_threads != no ; then
7390                         cat >> confdefs.h <<\EOF
7391 #define HAVE_PTHREADS 1
7392 EOF
7393
7394
7395                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7396
7397                                                 save_CPPFLAGS="$CPPFLAGS"
7398                         save_LIBS="$LIBS"
7399                         LIBS="$LTHREAD_LIBS $LIBS"
7400
7401                                                                                                 for ac_func in sched_yield pthread_yield
7402 do
7403 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7404 echo "configure:7405: checking for $ac_func" >&5
7405 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7406   echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408   cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 /* System header to define __stub macros and hopefully few prototypes,
7412     which can conflict with char $ac_func(); below.  */
7413 #include <assert.h>
7414 /* Override any gcc2 internal prototype to avoid an error.  */
7415 /* We use char because int might match the return type of a gcc2
7416     builtin and then its argument prototype would still apply.  */
7417 char $ac_func();
7418
7419 int main() {
7420
7421 /* The GNU C library defines this for functions which it implements
7422     to always fail with ENOSYS.  Some functions are actually named
7423     something starting with __ and the normal name is an alias.  */
7424 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7425 choke me
7426 #else
7427 $ac_func();
7428 #endif
7429
7430 ; return 0; }
7431 EOF
7432 if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7433   rm -rf conftest*
7434   eval "ac_cv_func_$ac_func=yes"
7435 else
7436   echo "configure: failed program was:" >&5
7437   cat conftest.$ac_ext >&5
7438   rm -rf conftest*
7439   eval "ac_cv_func_$ac_func=no"
7440 fi
7441 rm -f conftest*
7442 fi
7443
7444 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7445   echo "$ac_t""yes" 1>&6
7446     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7447   cat >> confdefs.h <<EOF
7448 #define $ac_tr_func 1
7449 EOF
7450  
7451 else
7452   echo "$ac_t""no" 1>&6
7453 fi
7454 done
7455
7456
7457                         if test $ac_cv_func_sched_yield = no -a \
7458                                 $ac_cv_func_pthread_yield = no ; then
7459                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7460 echo "configure:7461: checking for sched_yield in -lrt" >&5
7461 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
7462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7463   echo $ac_n "(cached) $ac_c" 1>&6
7464 else
7465   ac_save_LIBS="$LIBS"
7466 LIBS="-lrt  $LIBS"
7467 cat > conftest.$ac_ext <<EOF
7468 #line 7469 "configure"
7469 #include "confdefs.h"
7470 /* Override any gcc2 internal prototype to avoid an error.  */
7471 /* We use char because int might match the return type of a gcc2
7472     builtin and then its argument prototype would still apply.  */
7473 char sched_yield();
7474
7475 int main() {
7476 sched_yield()
7477 ; return 0; }
7478 EOF
7479 if { (eval echo configure:7480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7480   rm -rf conftest*
7481   eval "ac_cv_lib_$ac_lib_var=yes"
7482 else
7483   echo "configure: failed program was:" >&5
7484   cat conftest.$ac_ext >&5
7485   rm -rf conftest*
7486   eval "ac_cv_lib_$ac_lib_var=no"
7487 fi
7488 rm -f conftest*
7489 LIBS="$ac_save_LIBS"
7490
7491 fi
7492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7493   echo "$ac_t""yes" 1>&6
7494   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7495                                         cat >> confdefs.h <<\EOF
7496 #define HAVE_SCHED_YIELD 1
7497 EOF
7498
7499                                         ac_cv_func_sched_yield=yes
7500 else
7501   echo "$ac_t""no" 1>&6
7502 ac_cv_func_sched_yield=no
7503 fi
7504
7505                         fi
7506                         if test $ac_cv_func_sched_yield = no -a \
7507                                 $ac_cv_func_pthread_yield = no ; then
7508                                                                                                 for ac_func in thr_yield
7509 do
7510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7511 echo "configure:7512: checking for $ac_func" >&5
7512 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7513   echo $ac_n "(cached) $ac_c" 1>&6
7514 else
7515   cat > conftest.$ac_ext <<EOF
7516 #line 7517 "configure"
7517 #include "confdefs.h"
7518 /* System header to define __stub macros and hopefully few prototypes,
7519     which can conflict with char $ac_func(); below.  */
7520 #include <assert.h>
7521 /* Override any gcc2 internal prototype to avoid an error.  */
7522 /* We use char because int might match the return type of a gcc2
7523     builtin and then its argument prototype would still apply.  */
7524 char $ac_func();
7525
7526 int main() {
7527
7528 /* The GNU C library defines this for functions which it implements
7529     to always fail with ENOSYS.  Some functions are actually named
7530     something starting with __ and the normal name is an alias.  */
7531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7532 choke me
7533 #else
7534 $ac_func();
7535 #endif
7536
7537 ; return 0; }
7538 EOF
7539 if { (eval echo configure:7540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7540   rm -rf conftest*
7541   eval "ac_cv_func_$ac_func=yes"
7542 else
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -rf conftest*
7546   eval "ac_cv_func_$ac_func=no"
7547 fi
7548 rm -f conftest*
7549 fi
7550
7551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7552   echo "$ac_t""yes" 1>&6
7553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7554   cat >> confdefs.h <<EOF
7555 #define $ac_tr_func 1
7556 EOF
7557  
7558 else
7559   echo "$ac_t""no" 1>&6
7560 fi
7561 done
7562
7563                         fi
7564                         if test $ac_cv_func_sched_yield = no -a \
7565                                 $ac_cv_func_pthread_yield = no -a \
7566                                 "$ac_cv_func_thr_yield" = no ; then
7567                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7568                         fi
7569
7570                                                 for ac_func in pthread_kill
7571 do
7572 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7573 echo "configure:7574: checking for $ac_func" >&5
7574 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7575   echo $ac_n "(cached) $ac_c" 1>&6
7576 else
7577   cat > conftest.$ac_ext <<EOF
7578 #line 7579 "configure"
7579 #include "confdefs.h"
7580 /* System header to define __stub macros and hopefully few prototypes,
7581     which can conflict with char $ac_func(); below.  */
7582 #include <assert.h>
7583 /* Override any gcc2 internal prototype to avoid an error.  */
7584 /* We use char because int might match the return type of a gcc2
7585     builtin and then its argument prototype would still apply.  */
7586 char $ac_func();
7587
7588 int main() {
7589
7590 /* The GNU C library defines this for functions which it implements
7591     to always fail with ENOSYS.  Some functions are actually named
7592     something starting with __ and the normal name is an alias.  */
7593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7594 choke me
7595 #else
7596 $ac_func();
7597 #endif
7598
7599 ; return 0; }
7600 EOF
7601 if { (eval echo configure:7602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7602   rm -rf conftest*
7603   eval "ac_cv_func_$ac_func=yes"
7604 else
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   eval "ac_cv_func_$ac_func=no"
7609 fi
7610 rm -f conftest*
7611 fi
7612
7613 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7614   echo "$ac_t""yes" 1>&6
7615     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7616   cat >> confdefs.h <<EOF
7617 #define $ac_tr_func 1
7618 EOF
7619  
7620 else
7621   echo "$ac_t""no" 1>&6
7622 fi
7623 done
7624
7625
7626                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7627 echo "configure:7628: checking for pthread_detach with <pthread.h>" >&5
7628 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
7629   echo $ac_n "(cached) $ac_c" 1>&6
7630 else
7631   
7632                                                                 cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635
7636 #include <pthread.h>
7637 #ifndef NULL
7638 #define NULL (void*)0
7639 #endif
7640
7641 int main() {
7642 pthread_detach(NULL);
7643 ; return 0; }
7644 EOF
7645 if { (eval echo configure:7646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7646   rm -rf conftest*
7647   ol_cv_func_pthread_detach=yes
7648 else
7649   echo "configure: failed program was:" >&5
7650   cat conftest.$ac_ext >&5
7651   rm -rf conftest*
7652   ol_cv_func_pthread_detach=no
7653 fi
7654 rm -f conftest*
7655                         
7656 fi
7657
7658 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7659
7660                         if test $ol_cv_func_pthread_detach = no ; then
7661                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7662                         fi
7663
7664                         cat >> confdefs.h <<\EOF
7665 #define HAVE_PTHREAD_DETACH 1
7666 EOF
7667
7668
7669                                                 for ac_func in \
7670                                 pthread_setconcurrency \
7671                                 pthread_getconcurrency \
7672                                 thr_setconcurrency \
7673                                 thr_getconcurrency \
7674                         
7675 do
7676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7677 echo "configure:7678: checking for $ac_func" >&5
7678 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7679   echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681   cat > conftest.$ac_ext <<EOF
7682 #line 7683 "configure"
7683 #include "confdefs.h"
7684 /* System header to define __stub macros and hopefully few prototypes,
7685     which can conflict with char $ac_func(); below.  */
7686 #include <assert.h>
7687 /* Override any gcc2 internal prototype to avoid an error.  */
7688 /* We use char because int might match the return type of a gcc2
7689     builtin and then its argument prototype would still apply.  */
7690 char $ac_func();
7691
7692 int main() {
7693
7694 /* The GNU C library defines this for functions which it implements
7695     to always fail with ENOSYS.  Some functions are actually named
7696     something starting with __ and the normal name is an alias.  */
7697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7698 choke me
7699 #else
7700 $ac_func();
7701 #endif
7702
7703 ; return 0; }
7704 EOF
7705 if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7706   rm -rf conftest*
7707   eval "ac_cv_func_$ac_func=yes"
7708 else
7709   echo "configure: failed program was:" >&5
7710   cat conftest.$ac_ext >&5
7711   rm -rf conftest*
7712   eval "ac_cv_func_$ac_func=no"
7713 fi
7714 rm -f conftest*
7715 fi
7716
7717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7718   echo "$ac_t""yes" 1>&6
7719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7720   cat >> confdefs.h <<EOF
7721 #define $ac_tr_func 1
7722 EOF
7723  
7724 else
7725   echo "$ac_t""no" 1>&6
7726 fi
7727 done
7728
7729
7730                         
7731         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7732 echo "configure:7733: checking for pthread_kill_other_threads_np" >&5
7733 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
7734   echo $ac_n "(cached) $ac_c" 1>&6
7735 else
7736   cat > conftest.$ac_ext <<EOF
7737 #line 7738 "configure"
7738 #include "confdefs.h"
7739 /* System header to define __stub macros and hopefully few prototypes,
7740     which can conflict with char pthread_kill_other_threads_np(); below.  */
7741 #include <assert.h>
7742 /* Override any gcc2 internal prototype to avoid an error.  */
7743 /* We use char because int might match the return type of a gcc2
7744     builtin and then its argument prototype would still apply.  */
7745 char pthread_kill_other_threads_np();
7746
7747 int main() {
7748
7749 /* The GNU C library defines this for functions which it implements
7750     to always fail with ENOSYS.  Some functions are actually named
7751     something starting with __ and the normal name is an alias.  */
7752 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7753 choke me
7754 #else
7755 pthread_kill_other_threads_np();
7756 #endif
7757
7758 ; return 0; }
7759 EOF
7760 if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7761   rm -rf conftest*
7762   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7763 else
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7768 fi
7769 rm -f conftest*
7770 fi
7771
7772 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7773   echo "$ac_t""yes" 1>&6
7774   :
7775 else
7776   echo "$ac_t""no" 1>&6
7777 fi
7778
7779         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7780 echo "configure:7781: checking for LinuxThreads implementation" >&5
7781 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
7782   echo $ac_n "(cached) $ac_c" 1>&6
7783 else
7784   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7785 fi
7786
7787 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7788
7789                         
7790         
7791         
7792         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7793 echo "configure:7794: checking for LinuxThreads consistency" >&5
7794 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
7795   echo $ac_n "(cached) $ac_c" 1>&6
7796 else
7797   
7798                 if test $ol_cv_header_linux_threads = yes -a \
7799                         $ol_cv_sys_linux_threads = yes; then
7800                         ol_cv_linux_threads=yes
7801                 elif test $ol_cv_header_linux_threads = no -a \
7802                         $ol_cv_sys_linux_threads = no; then
7803                         ol_cv_linux_threads=no
7804                 else
7805                         ol_cv_linux_threads=error
7806                 fi
7807         
7808 fi
7809
7810 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7811
7812
7813                         if test $ol_cv_linux_threads = error; then
7814                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7815                         fi
7816
7817                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7818 echo "configure:7819: checking if pthread_create() works" >&5
7819 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
7820   echo $ac_n "(cached) $ac_c" 1>&6
7821 else
7822   
7823                         if test "$cross_compiling" = yes; then
7824                                 ol_cv_pthread_create_works=yes
7825 else
7826   cat > conftest.$ac_ext <<EOF
7827 #line 7828 "configure"
7828 #include "confdefs.h"
7829
7830 #include <pthread.h>
7831 #ifndef NULL
7832 #define NULL (void*)0
7833 #endif
7834
7835 static void *task(p)
7836         void *p;
7837 {
7838         return (void *) (p == NULL);
7839 }
7840
7841 int main(argc, argv)
7842         int argc;
7843         char **argv;
7844 {
7845         pthread_t t;
7846 #if HAVE_PTHREADS_D4
7847         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7848 #else
7849         exit(pthread_create(&t, NULL, task, NULL));
7850 #endif
7851 }
7852
7853 EOF
7854 if { (eval echo configure:7855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7855 then
7856   ol_cv_pthread_create_works=yes
7857 else
7858   echo "configure: failed program was:" >&5
7859   cat conftest.$ac_ext >&5
7860   rm -fr conftest*
7861   ol_cv_pthread_create_works=no
7862 fi
7863 rm -fr conftest*
7864 fi
7865
7866 fi
7867
7868 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7869
7870                         if test $ol_cv_pthread_create_works = no ; then
7871                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7872                         fi
7873
7874                                                 if test $ol_with_yielding_select = auto ; then
7875                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7876 echo "configure:7877: checking if select yields when using pthreads" >&5
7877 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
7878   echo $ac_n "(cached) $ac_c" 1>&6
7879 else
7880   
7881                                 if test "$cross_compiling" = yes; then
7882   ol_cv_pthread_select_yields=cross
7883 else
7884   cat > conftest.$ac_ext <<EOF
7885 #line 7886 "configure"
7886 #include "confdefs.h"
7887
7888 #include <sys/types.h>
7889 #include <sys/time.h>
7890 #include <unistd.h>
7891 #include <pthread.h>
7892 #ifndef NULL
7893 #define NULL (void*) 0
7894 #endif
7895
7896 static int fildes[2];
7897
7898 static void *task(p)
7899         void *p;
7900 {
7901         int i;
7902         struct timeval tv;
7903
7904         fd_set rfds;
7905
7906         tv.tv_sec=10;
7907         tv.tv_usec=0;
7908
7909         FD_ZERO(&rfds);
7910         FD_SET(fildes[0], &rfds);
7911
7912         /* we're not interested in any fds */
7913         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7914
7915         if(i < 0) {
7916                 perror("select");
7917                 exit(10);
7918         }
7919
7920         exit(0); /* if we exit here, the select blocked the whole process */
7921 }
7922
7923 int main(argc, argv)
7924         int argc;
7925         char **argv;
7926 {
7927         pthread_t t;
7928
7929         /* create a pipe to select */
7930         if(pipe(&fildes[0])) {
7931                 perror("select");
7932                 exit(1);
7933         }
7934
7935 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7936         (void) pthread_setconcurrency(2);
7937 #else
7938 #ifdef HAVE_THR_SETCONCURRENCY
7939         /* Set Solaris LWP concurrency to 2 */
7940         thr_setconcurrency(2);
7941 #endif
7942 #endif
7943
7944 #if HAVE_PTHREADS_D4
7945         pthread_create(&t, pthread_attr_default, task, NULL);
7946 #else
7947         pthread_create(&t, NULL, task, NULL);
7948 #endif
7949
7950 #if HAVE_SCHED_YIELD
7951         sched_yield();  /* make sure task runs first */
7952 #else
7953 #ifdef HAVE_PTHREAD_YIELD
7954         pthread_yield();        /* make sure task runs first */
7955 #endif
7956 #endif
7957
7958         exit(2);
7959 }
7960 EOF
7961 if { (eval echo configure:7962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7962 then
7963   ol_cv_pthread_select_yields=no
7964 else
7965   echo "configure: failed program was:" >&5
7966   cat conftest.$ac_ext >&5
7967   rm -fr conftest*
7968   ol_cv_pthread_select_yields=yes
7969 fi
7970 rm -fr conftest*
7971 fi
7972
7973 fi
7974
7975 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7976
7977                                 if test $ol_cv_pthread_select_yields = cross ; then
7978                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7979                                 fi
7980
7981                                 if test $ol_cv_pthread_select_yields = yes ; then
7982                                         ol_with_yielding_select=yes
7983                                 fi
7984                         fi
7985
7986                                                 CPPFLAGS="$save_CPPFLAGS"
7987                         LIBS="$save_LIBS"
7988                 else
7989                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7990                 fi
7991         fi
7992
7993         if test $ol_with_threads = posix ; then
7994                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7995         fi
7996 fi
7997
7998 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7999         -o $ol_with_threads = mach ; then
8000
8001                 for ac_hdr in mach/cthreads.h
8002 do
8003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8005 echo "configure:8006: checking for $ac_hdr" >&5
8006 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8007   echo $ac_n "(cached) $ac_c" 1>&6
8008 else
8009   cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 #include <$ac_hdr>
8013 EOF
8014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8015 { (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8017 if test -z "$ac_err"; then
8018   rm -rf conftest*
8019   eval "ac_cv_header_$ac_safe=yes"
8020 else
8021   echo "$ac_err" >&5
8022   echo "configure: failed program was:" >&5
8023   cat conftest.$ac_ext >&5
8024   rm -rf conftest*
8025   eval "ac_cv_header_$ac_safe=no"
8026 fi
8027 rm -f conftest*
8028 fi
8029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8030   echo "$ac_t""yes" 1>&6
8031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8032   cat >> confdefs.h <<EOF
8033 #define $ac_tr_hdr 1
8034 EOF
8035  
8036 else
8037   echo "$ac_t""no" 1>&6
8038 fi
8039 done
8040
8041         if test $ac_cv_header_mach_cthreads_h = yes ; then
8042                 ol_with_threads=found
8043
8044                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
8045 echo "configure:8046: checking for cthread_fork" >&5
8046 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
8047   echo $ac_n "(cached) $ac_c" 1>&6
8048 else
8049   cat > conftest.$ac_ext <<EOF
8050 #line 8051 "configure"
8051 #include "confdefs.h"
8052 /* System header to define __stub macros and hopefully few prototypes,
8053     which can conflict with char cthread_fork(); below.  */
8054 #include <assert.h>
8055 /* Override any gcc2 internal prototype to avoid an error.  */
8056 /* We use char because int might match the return type of a gcc2
8057     builtin and then its argument prototype would still apply.  */
8058 char cthread_fork();
8059
8060 int main() {
8061
8062 /* The GNU C library defines this for functions which it implements
8063     to always fail with ENOSYS.  Some functions are actually named
8064     something starting with __ and the normal name is an alias.  */
8065 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
8066 choke me
8067 #else
8068 cthread_fork();
8069 #endif
8070
8071 ; return 0; }
8072 EOF
8073 if { (eval echo configure:8074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8074   rm -rf conftest*
8075   eval "ac_cv_func_cthread_fork=yes"
8076 else
8077   echo "configure: failed program was:" >&5
8078   cat conftest.$ac_ext >&5
8079   rm -rf conftest*
8080   eval "ac_cv_func_cthread_fork=no"
8081 fi
8082 rm -f conftest*
8083 fi
8084
8085 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
8086   echo "$ac_t""yes" 1>&6
8087   ol_link_threads=yes
8088 else
8089   echo "$ac_t""no" 1>&6
8090 fi
8091
8092
8093                 if test $ol_link_threads = no ; then
8094                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
8095 echo "configure:8096: checking for cthread_fork with -all_load" >&5
8096 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
8097   echo $ac_n "(cached) $ac_c" 1>&6
8098 else
8099   
8100                                                                 save_LIBS="$LIBS"
8101                                 LIBS="-all_load $LIBS"
8102                                 cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 #include <mach/cthreads.h>
8106 int main() {
8107
8108                                         cthread_fork((void *)0, (void *)0);
8109                                         
8110 ; return 0; }
8111 EOF
8112 if { (eval echo configure:8113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8113   rm -rf conftest*
8114   ol_cv_cthread_all_load=yes
8115 else
8116   echo "configure: failed program was:" >&5
8117   cat conftest.$ac_ext >&5
8118   rm -rf conftest*
8119   ol_cv_cthread_all_load=no
8120 fi
8121 rm -f conftest*
8122                                                                 LIBS="$save_LIBS"
8123                         
8124 fi
8125
8126 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8127
8128                         if test $ol_cv_cthread_all_load = yes ; then
8129                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8130                                 ol_link_threads=mach
8131                         fi
8132                 fi
8133
8134                 if test $ol_link_threads != no ; then
8135                         : check for cthread specific functionality here
8136                         cat >> confdefs.h <<\EOF
8137 #define HAVE_MACH_CTHREADS 1
8138 EOF
8139
8140                 else
8141                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8142                 fi
8143         fi
8144
8145         if test $ol_with_threads = mach ; then
8146                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8147         fi
8148 fi
8149
8150 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8151         -o $ol_with_threads = lwp ; then
8152
8153                 for ac_hdr in thread.h synch.h
8154 do
8155 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8156 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8157 echo "configure:8158: checking for $ac_hdr" >&5
8158 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8159   echo $ac_n "(cached) $ac_c" 1>&6
8160 else
8161   cat > conftest.$ac_ext <<EOF
8162 #line 8163 "configure"
8163 #include "confdefs.h"
8164 #include <$ac_hdr>
8165 EOF
8166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8167 { (eval echo configure:8168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8169 if test -z "$ac_err"; then
8170   rm -rf conftest*
8171   eval "ac_cv_header_$ac_safe=yes"
8172 else
8173   echo "$ac_err" >&5
8174   echo "configure: failed program was:" >&5
8175   cat conftest.$ac_ext >&5
8176   rm -rf conftest*
8177   eval "ac_cv_header_$ac_safe=no"
8178 fi
8179 rm -f conftest*
8180 fi
8181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8182   echo "$ac_t""yes" 1>&6
8183     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8184   cat >> confdefs.h <<EOF
8185 #define $ac_tr_hdr 1
8186 EOF
8187  
8188 else
8189   echo "$ac_t""no" 1>&6
8190 fi
8191 done
8192
8193         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8194                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8195 echo "configure:8196: checking for thr_create in -lthread" >&5
8196 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
8197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8198   echo $ac_n "(cached) $ac_c" 1>&6
8199 else
8200   ac_save_LIBS="$LIBS"
8201 LIBS="-lthread  $LIBS"
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char thr_create();
8209
8210 int main() {
8211 thr_create()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 LIBS="$ac_save_LIBS"
8225
8226 fi
8227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8228   echo "$ac_t""yes" 1>&6
8229   have_thr=yes
8230 else
8231   echo "$ac_t""no" 1>&6
8232 have_thr=no
8233 fi
8234
8235
8236                 if test $have_thr = yes ; then
8237                         cat >> confdefs.h <<\EOF
8238 #define HAVE_THR 1
8239 EOF
8240
8241                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8242                         ol_link_threads=thr
8243
8244                         if test $ol_with_yielding_select = auto ; then
8245                                 ol_with_yielding_select=yes
8246                         fi
8247
8248                                                 for ac_func in \
8249                                 thr_setconcurrency \
8250                                 thr_getconcurrency \
8251                         
8252 do
8253 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8254 echo "configure:8255: checking for $ac_func" >&5
8255 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8256   echo $ac_n "(cached) $ac_c" 1>&6
8257 else
8258   cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* System header to define __stub macros and hopefully few prototypes,
8262     which can conflict with char $ac_func(); below.  */
8263 #include <assert.h>
8264 /* Override any gcc2 internal prototype to avoid an error.  */
8265 /* We use char because int might match the return type of a gcc2
8266     builtin and then its argument prototype would still apply.  */
8267 char $ac_func();
8268
8269 int main() {
8270
8271 /* The GNU C library defines this for functions which it implements
8272     to always fail with ENOSYS.  Some functions are actually named
8273     something starting with __ and the normal name is an alias.  */
8274 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8275 choke me
8276 #else
8277 $ac_func();
8278 #endif
8279
8280 ; return 0; }
8281 EOF
8282 if { (eval echo configure:8283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8283   rm -rf conftest*
8284   eval "ac_cv_func_$ac_func=yes"
8285 else
8286   echo "configure: failed program was:" >&5
8287   cat conftest.$ac_ext >&5
8288   rm -rf conftest*
8289   eval "ac_cv_func_$ac_func=no"
8290 fi
8291 rm -f conftest*
8292 fi
8293
8294 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8295   echo "$ac_t""yes" 1>&6
8296     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8297   cat >> confdefs.h <<EOF
8298 #define $ac_tr_func 1
8299 EOF
8300  
8301 else
8302   echo "$ac_t""no" 1>&6
8303 fi
8304 done
8305
8306                 fi
8307         fi
8308
8309                 for ac_hdr in lwp/lwp.h
8310 do
8311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8313 echo "configure:8314: checking for $ac_hdr" >&5
8314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8315   echo $ac_n "(cached) $ac_c" 1>&6
8316 else
8317   cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 #include <$ac_hdr>
8321 EOF
8322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8323 { (eval echo configure:8324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8325 if test -z "$ac_err"; then
8326   rm -rf conftest*
8327   eval "ac_cv_header_$ac_safe=yes"
8328 else
8329   echo "$ac_err" >&5
8330   echo "configure: failed program was:" >&5
8331   cat conftest.$ac_ext >&5
8332   rm -rf conftest*
8333   eval "ac_cv_header_$ac_safe=no"
8334 fi
8335 rm -f conftest*
8336 fi
8337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8338   echo "$ac_t""yes" 1>&6
8339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8340   cat >> confdefs.h <<EOF
8341 #define $ac_tr_hdr 1
8342 EOF
8343  
8344 else
8345   echo "$ac_t""no" 1>&6
8346 fi
8347 done
8348
8349         if test $ac_cv_header_lwp_lwp_h = yes ; then
8350                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8351 echo "configure:8352: checking for lwp_create in -llwp" >&5
8352 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
8353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8354   echo $ac_n "(cached) $ac_c" 1>&6
8355 else
8356   ac_save_LIBS="$LIBS"
8357 LIBS="-llwp  $LIBS"
8358 cat > conftest.$ac_ext <<EOF
8359 #line 8360 "configure"
8360 #include "confdefs.h"
8361 /* Override any gcc2 internal prototype to avoid an error.  */
8362 /* We use char because int might match the return type of a gcc2
8363     builtin and then its argument prototype would still apply.  */
8364 char lwp_create();
8365
8366 int main() {
8367 lwp_create()
8368 ; return 0; }
8369 EOF
8370 if { (eval echo configure:8371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8371   rm -rf conftest*
8372   eval "ac_cv_lib_$ac_lib_var=yes"
8373 else
8374   echo "configure: failed program was:" >&5
8375   cat conftest.$ac_ext >&5
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=no"
8378 fi
8379 rm -f conftest*
8380 LIBS="$ac_save_LIBS"
8381
8382 fi
8383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8384   echo "$ac_t""yes" 1>&6
8385   have_lwp=yes
8386 else
8387   echo "$ac_t""no" 1>&6
8388 have_lwp=no
8389 fi
8390
8391
8392                 if test $have_lwp = yes ; then
8393                         cat >> confdefs.h <<\EOF
8394 #define HAVE_LWP 1
8395 EOF
8396
8397                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8398                         ol_link_threads=lwp
8399
8400                         if test $ol_with_yielding_select = auto ; then
8401                                 ol_with_yielding_select=no
8402                         fi
8403                 fi
8404         fi
8405 fi
8406
8407 if test $ol_with_yielding_select = yes ; then
8408         cat >> confdefs.h <<\EOF
8409 #define HAVE_YIELDING_SELECT 1
8410 EOF
8411
8412 fi
8413
8414 if test $ol_with_threads = manual ; then
8415                 ol_link_threads=yes
8416
8417         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8418
8419         for ac_hdr in pthread.h sched.h
8420 do
8421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8423 echo "configure:8424: checking for $ac_hdr" >&5
8424 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8425   echo $ac_n "(cached) $ac_c" 1>&6
8426 else
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 #include <$ac_hdr>
8431 EOF
8432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8433 { (eval echo configure:8434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8435 if test -z "$ac_err"; then
8436   rm -rf conftest*
8437   eval "ac_cv_header_$ac_safe=yes"
8438 else
8439   echo "$ac_err" >&5
8440   echo "configure: failed program was:" >&5
8441   cat conftest.$ac_ext >&5
8442   rm -rf conftest*
8443   eval "ac_cv_header_$ac_safe=no"
8444 fi
8445 rm -f conftest*
8446 fi
8447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8448   echo "$ac_t""yes" 1>&6
8449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8450   cat >> confdefs.h <<EOF
8451 #define $ac_tr_hdr 1
8452 EOF
8453  
8454 else
8455   echo "$ac_t""no" 1>&6
8456 fi
8457 done
8458
8459         for ac_func in sched_yield pthread_yield
8460 do
8461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8462 echo "configure:8463: checking for $ac_func" >&5
8463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8464   echo $ac_n "(cached) $ac_c" 1>&6
8465 else
8466   cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 /* System header to define __stub macros and hopefully few prototypes,
8470     which can conflict with char $ac_func(); below.  */
8471 #include <assert.h>
8472 /* Override any gcc2 internal prototype to avoid an error.  */
8473 /* We use char because int might match the return type of a gcc2
8474     builtin and then its argument prototype would still apply.  */
8475 char $ac_func();
8476
8477 int main() {
8478
8479 /* The GNU C library defines this for functions which it implements
8480     to always fail with ENOSYS.  Some functions are actually named
8481     something starting with __ and the normal name is an alias.  */
8482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8483 choke me
8484 #else
8485 $ac_func();
8486 #endif
8487
8488 ; return 0; }
8489 EOF
8490 if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8491   rm -rf conftest*
8492   eval "ac_cv_func_$ac_func=yes"
8493 else
8494   echo "configure: failed program was:" >&5
8495   cat conftest.$ac_ext >&5
8496   rm -rf conftest*
8497   eval "ac_cv_func_$ac_func=no"
8498 fi
8499 rm -f conftest*
8500 fi
8501
8502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8503   echo "$ac_t""yes" 1>&6
8504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8505   cat >> confdefs.h <<EOF
8506 #define $ac_tr_func 1
8507 EOF
8508  
8509 else
8510   echo "$ac_t""no" 1>&6
8511 fi
8512 done
8513
8514         
8515         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8516 echo "configure:8517: checking for LinuxThreads pthread.h" >&5
8517 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
8518   echo $ac_n "(cached) $ac_c" 1>&6
8519 else
8520   cat > conftest.$ac_ext <<EOF
8521 #line 8522 "configure"
8522 #include "confdefs.h"
8523 #include <pthread.h>
8524 EOF
8525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8526   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8527   rm -rf conftest*
8528   ol_cv_header_linux_threads=yes
8529 else
8530   rm -rf conftest*
8531   ol_cv_header_linux_threads=no
8532 fi
8533 rm -f conftest*
8534
8535                 
8536 fi
8537
8538 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8539         if test $ol_cv_header_linux_threads = yes; then
8540                 cat >> confdefs.h <<\EOF
8541 #define HAVE_LINUX_THREADS 1
8542 EOF
8543
8544         fi
8545
8546
8547         for ac_hdr in mach/cthreads.h
8548 do
8549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8551 echo "configure:8552: checking for $ac_hdr" >&5
8552 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8553   echo $ac_n "(cached) $ac_c" 1>&6
8554 else
8555   cat > conftest.$ac_ext <<EOF
8556 #line 8557 "configure"
8557 #include "confdefs.h"
8558 #include <$ac_hdr>
8559 EOF
8560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8561 { (eval echo configure:8562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8563 if test -z "$ac_err"; then
8564   rm -rf conftest*
8565   eval "ac_cv_header_$ac_safe=yes"
8566 else
8567   echo "$ac_err" >&5
8568   echo "configure: failed program was:" >&5
8569   cat conftest.$ac_ext >&5
8570   rm -rf conftest*
8571   eval "ac_cv_header_$ac_safe=no"
8572 fi
8573 rm -f conftest*
8574 fi
8575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8576   echo "$ac_t""yes" 1>&6
8577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8578   cat >> confdefs.h <<EOF
8579 #define $ac_tr_hdr 1
8580 EOF
8581  
8582 else
8583   echo "$ac_t""no" 1>&6
8584 fi
8585 done
8586
8587         for ac_hdr in lwp/lwp.h
8588 do
8589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8591 echo "configure:8592: checking for $ac_hdr" >&5
8592 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8593   echo $ac_n "(cached) $ac_c" 1>&6
8594 else
8595   cat > conftest.$ac_ext <<EOF
8596 #line 8597 "configure"
8597 #include "confdefs.h"
8598 #include <$ac_hdr>
8599 EOF
8600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8601 { (eval echo configure:8602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8603 if test -z "$ac_err"; then
8604   rm -rf conftest*
8605   eval "ac_cv_header_$ac_safe=yes"
8606 else
8607   echo "$ac_err" >&5
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   eval "ac_cv_header_$ac_safe=no"
8612 fi
8613 rm -f conftest*
8614 fi
8615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8618   cat >> confdefs.h <<EOF
8619 #define $ac_tr_hdr 1
8620 EOF
8621  
8622 else
8623   echo "$ac_t""no" 1>&6
8624 fi
8625 done
8626
8627         for ac_hdr in thread.h synch.h
8628 do
8629 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8630 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8631 echo "configure:8632: checking for $ac_hdr" >&5
8632 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635   cat > conftest.$ac_ext <<EOF
8636 #line 8637 "configure"
8637 #include "confdefs.h"
8638 #include <$ac_hdr>
8639 EOF
8640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8641 { (eval echo configure:8642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8643 if test -z "$ac_err"; then
8644   rm -rf conftest*
8645   eval "ac_cv_header_$ac_safe=yes"
8646 else
8647   echo "$ac_err" >&5
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   eval "ac_cv_header_$ac_safe=no"
8652 fi
8653 rm -f conftest*
8654 fi
8655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8656   echo "$ac_t""yes" 1>&6
8657     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8658   cat >> confdefs.h <<EOF
8659 #define $ac_tr_hdr 1
8660 EOF
8661  
8662 else
8663   echo "$ac_t""no" 1>&6
8664 fi
8665 done
8666
8667 fi
8668
8669 if test $ol_link_threads != no ; then  
8670                         cat >> confdefs.h <<\EOF
8671 #define REENTRANT 1
8672 EOF
8673
8674         cat >> confdefs.h <<\EOF
8675 #define _REENTRANT 1
8676 EOF
8677
8678         cat >> confdefs.h <<\EOF
8679 #define THREAD_SAFE 1
8680 EOF
8681
8682         cat >> confdefs.h <<\EOF
8683 #define _THREAD_SAFE 1
8684 EOF
8685
8686         cat >> confdefs.h <<\EOF
8687 #define THREADSAFE 1
8688 EOF
8689
8690         cat >> confdefs.h <<\EOF
8691 #define _THREADSAFE 1
8692 EOF
8693
8694         cat >> confdefs.h <<\EOF
8695 #define _SGI_MP_SOURCE 1
8696 EOF
8697
8698
8699                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8700 echo "configure:8701: checking for thread specific errno" >&5
8701 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
8702   echo $ac_n "(cached) $ac_c" 1>&6
8703 else
8704   
8705                 cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708 #include <errno.h>
8709 int main() {
8710 errno = 0;
8711 ; return 0; }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8714   rm -rf conftest*
8715   ol_cv_errno_thread_specific=yes
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -rf conftest*
8720   ol_cv_errno_thread_specific=no
8721 fi
8722 rm -f conftest*
8723         
8724 fi
8725
8726 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8727
8728                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8729 echo "configure:8730: checking for thread specific h_errno" >&5
8730 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
8731   echo $ac_n "(cached) $ac_c" 1>&6
8732 else
8733   
8734                 cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737 #include <netdb.h>
8738 int main() {
8739 h_errno = 0;
8740 ; return 0; }
8741 EOF
8742 if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8743   rm -rf conftest*
8744   ol_cv_h_errno_thread_specific=yes
8745 else
8746   echo "configure: failed program was:" >&5
8747   cat conftest.$ac_ext >&5
8748   rm -rf conftest*
8749   ol_cv_h_errno_thread_specific=no
8750 fi
8751 rm -f conftest*
8752         
8753 fi
8754
8755 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8756
8757         if test $ol_cv_errno_thread_specific != yes \
8758                 -o $ol_cv_h_errno_thread_specific != yes ; then
8759                 LIBS="$LTHREAD_LIBS $LIBS"
8760                 LTHREAD_LIBS=""
8761         fi
8762
8763 fi  
8764
8765 if test $ol_link_threads = no ; then
8766         if test $ol_with_threads = yes ; then
8767                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8768         fi
8769
8770         if test $ol_with_threads = auto ; then
8771                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8772                 ol_with_threads=no
8773         fi
8774
8775         cat >> confdefs.h <<\EOF
8776 #define NO_THREADS 1
8777 EOF
8778
8779         LTHREAD_LIBS=""
8780 fi
8781
8782 if test $ol_link_threads != no ; then
8783         cat >> confdefs.h <<\EOF
8784 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8785 EOF
8786
8787 fi
8788
8789
8790 ol_link_ldbm=no 
8791 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8792         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8793 echo "configure:8794: checking for DB2 library" >&5
8794 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
8795   echo $ac_n "(cached) $ac_c" 1>&6
8796 else
8797         ol_LIBS="$LIBS"
8798         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8799 echo "configure:8800: checking for db_open in -ldb" >&5
8800 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
8801 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8802   echo $ac_n "(cached) $ac_c" 1>&6
8803 else
8804   ac_save_LIBS="$LIBS"
8805 LIBS="-ldb  $LIBS"
8806 cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 /* Override any gcc2 internal prototype to avoid an error.  */
8810 /* We use char because int might match the return type of a gcc2
8811     builtin and then its argument prototype would still apply.  */
8812 char db_open();
8813
8814 int main() {
8815 db_open()
8816 ; return 0; }
8817 EOF
8818 if { (eval echo configure:8819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8819   rm -rf conftest*
8820   eval "ac_cv_lib_$ac_lib_var=yes"
8821 else
8822   echo "configure: failed program was:" >&5
8823   cat conftest.$ac_ext >&5
8824   rm -rf conftest*
8825   eval "ac_cv_lib_$ac_lib_var=no"
8826 fi
8827 rm -f conftest*
8828 LIBS="$ac_save_LIBS"
8829
8830 fi
8831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8832   echo "$ac_t""yes" 1>&6
8833   ol_cv_lib_db2=-ldb
8834 else
8835   echo "$ac_t""no" 1>&6
8836 ol_cv_lib_db2=no
8837 fi
8838
8839         LIBS="$ol_LIBS"
8840
8841 fi
8842
8843 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8844
8845 for ac_hdr in db.h
8846 do
8847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8849 echo "configure:8850: checking for $ac_hdr" >&5
8850 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8851   echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853   cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 #include <$ac_hdr>
8857 EOF
8858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8859 { (eval echo configure:8860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8861 if test -z "$ac_err"; then
8862   rm -rf conftest*
8863   eval "ac_cv_header_$ac_safe=yes"
8864 else
8865   echo "$ac_err" >&5
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -rf conftest*
8869   eval "ac_cv_header_$ac_safe=no"
8870 fi
8871 rm -f conftest*
8872 fi
8873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8874   echo "$ac_t""yes" 1>&6
8875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8876   cat >> confdefs.h <<EOF
8877 #define $ac_tr_hdr 1
8878 EOF
8879  
8880 else
8881   echo "$ac_t""no" 1>&6
8882 fi
8883 done
8884
8885 if test $ac_cv_header_db_h = yes ; then
8886         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8887 echo "configure:8888: checking if db.h is DB2" >&5
8888 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
8889   echo $ac_n "(cached) $ac_c" 1>&6
8890 else
8891   
8892                 cat > conftest.$ac_ext <<EOF
8893 #line 8894 "configure"
8894 #include "confdefs.h"
8895
8896 #                       include <db.h>
8897                         /* this check could be improved */
8898 #                       ifdef DB_VERSION_MAJOR
8899 #                               if DB_VERSION_MAJOR == 2
8900                                         __db_version_2
8901 #                               endif
8902 #                       endif
8903                 
8904 EOF
8905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8906   egrep "__db_version_2" >/dev/null 2>&1; then
8907   rm -rf conftest*
8908   ol_cv_header_db2=yes
8909 else
8910   rm -rf conftest*
8911   ol_cv_header_db2=no
8912 fi
8913 rm -f conftest*
8914
8915 fi
8916
8917 echo "$ac_t""$ol_cv_header_db2" 1>&6
8918 else
8919         ol_cv_header_db2=no
8920 fi
8921
8922
8923  
8924  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8925 echo "configure:8926: checking for Berkeley DB2" >&5
8926 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
8927   echo $ac_n "(cached) $ac_c" 1>&6
8928 else
8929   
8930         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8931                 ol_cv_berkeley_db2=no
8932         else
8933                 ol_cv_berkeley_db2=yes
8934         fi
8935
8936 fi
8937
8938 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8939  if test $ol_cv_berkeley_db2 = yes ; then
8940         cat >> confdefs.h <<\EOF
8941 #define HAVE_BERKELEY_DB2 1
8942 EOF
8943
8944  fi
8945
8946
8947         if test $ol_cv_berkeley_db2 = yes ; then
8948                 ol_link_ldbm=db2
8949                 ol_with_ldbm_api=db2
8950
8951                 if test $ol_with_ldbm_type = hash ; then
8952                         cat >> confdefs.h <<\EOF
8953 #define LDBM_USE_DBHASH 1
8954 EOF
8955
8956                 else
8957                         cat >> confdefs.h <<\EOF
8958 #define LDBM_USE_DBBTREE 1
8959 EOF
8960
8961                 fi
8962
8963                                                 if test $ol_cv_lib_db2 != yes ; then
8964                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8965                 fi
8966         fi
8967 fi
8968
8969 ol_link_bdb2=no
8970 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8971         ol_link_bdb2=yes
8972 fi
8973
8974 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8975         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8976 echo "configure:8977: checking for Berkeley DB library" >&5
8977 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   
8981         for ac_hdr in db1/db.h
8982 do
8983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8985 echo "configure:8986: checking for $ac_hdr" >&5
8986 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8987   echo $ac_n "(cached) $ac_c" 1>&6
8988 else
8989   cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 #include <$ac_hdr>
8993 EOF
8994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8995 { (eval echo configure:8996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8997 if test -z "$ac_err"; then
8998   rm -rf conftest*
8999   eval "ac_cv_header_$ac_safe=yes"
9000 else
9001   echo "$ac_err" >&5
9002   echo "configure: failed program was:" >&5
9003   cat conftest.$ac_ext >&5
9004   rm -rf conftest*
9005   eval "ac_cv_header_$ac_safe=no"
9006 fi
9007 rm -f conftest*
9008 fi
9009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9010   echo "$ac_t""yes" 1>&6
9011     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9012   cat >> confdefs.h <<EOF
9013 #define $ac_tr_hdr 1
9014 EOF
9015  
9016 else
9017   echo "$ac_t""no" 1>&6
9018 fi
9019 done
9020
9021         ol_LIBS="$LIBS"
9022         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
9023 echo "configure:9024: checking for dbopen" >&5
9024 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
9025   echo $ac_n "(cached) $ac_c" 1>&6
9026 else
9027   cat > conftest.$ac_ext <<EOF
9028 #line 9029 "configure"
9029 #include "confdefs.h"
9030 /* System header to define __stub macros and hopefully few prototypes,
9031     which can conflict with char dbopen(); below.  */
9032 #include <assert.h>
9033 /* Override any gcc2 internal prototype to avoid an error.  */
9034 /* We use char because int might match the return type of a gcc2
9035     builtin and then its argument prototype would still apply.  */
9036 char dbopen();
9037
9038 int main() {
9039
9040 /* The GNU C library defines this for functions which it implements
9041     to always fail with ENOSYS.  Some functions are actually named
9042     something starting with __ and the normal name is an alias.  */
9043 #if defined (__stub_dbopen) || defined (__stub___dbopen)
9044 choke me
9045 #else
9046 dbopen();
9047 #endif
9048
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_func_dbopen=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_func_dbopen=no"
9059 fi
9060 rm -f conftest*
9061 fi
9062
9063 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
9064   echo "$ac_t""yes" 1>&6
9065   ol_cv_lib_db=yes
9066 else
9067   echo "$ac_t""no" 1>&6
9068
9069                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
9070 echo "configure:9071: checking for dbopen in -ldb1" >&5
9071 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
9072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   ac_save_LIBS="$LIBS"
9076 LIBS="-ldb1  $LIBS"
9077 cat > conftest.$ac_ext <<EOF
9078 #line 9079 "configure"
9079 #include "confdefs.h"
9080 /* Override any gcc2 internal prototype to avoid an error.  */
9081 /* We use char because int might match the return type of a gcc2
9082     builtin and then its argument prototype would still apply.  */
9083 char dbopen();
9084
9085 int main() {
9086 dbopen()
9087 ; return 0; }
9088 EOF
9089 if { (eval echo configure:9090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9090   rm -rf conftest*
9091   eval "ac_cv_lib_$ac_lib_var=yes"
9092 else
9093   echo "configure: failed program was:" >&5
9094   cat conftest.$ac_ext >&5
9095   rm -rf conftest*
9096   eval "ac_cv_lib_$ac_lib_var=no"
9097 fi
9098 rm -f conftest*
9099 LIBS="$ac_save_LIBS"
9100
9101 fi
9102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9103   echo "$ac_t""yes" 1>&6
9104   ol_cv_lib_db=-ldb1
9105 else
9106   echo "$ac_t""no" 1>&6
9107
9108                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9109 echo "configure:9110: checking for dbopen in -ldb" >&5
9110 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
9111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9112   echo $ac_n "(cached) $ac_c" 1>&6
9113 else
9114   ac_save_LIBS="$LIBS"
9115 LIBS="-ldb  $LIBS"
9116 cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119 /* Override any gcc2 internal prototype to avoid an error.  */
9120 /* We use char because int might match the return type of a gcc2
9121     builtin and then its argument prototype would still apply.  */
9122 char dbopen();
9123
9124 int main() {
9125 dbopen()
9126 ; return 0; }
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9129   rm -rf conftest*
9130   eval "ac_cv_lib_$ac_lib_var=yes"
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   eval "ac_cv_lib_$ac_lib_var=no"
9136 fi
9137 rm -f conftest*
9138 LIBS="$ac_save_LIBS"
9139
9140 fi
9141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143   ol_cv_lib_db=-ldb
9144 else
9145   echo "$ac_t""no" 1>&6
9146 ol_cv_lib_db=no
9147 fi
9148
9149                 
9150 fi
9151
9152         
9153 fi
9154
9155         LIBS="$ol_LIBS"
9156
9157 fi
9158
9159 echo "$ac_t""$ol_cv_lib_db" 1>&6
9160
9161
9162 for ac_hdr in db_185.h
9163 do
9164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9166 echo "configure:9167: checking for $ac_hdr" >&5
9167 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9168   echo $ac_n "(cached) $ac_c" 1>&6
9169 else
9170   cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 #include <$ac_hdr>
9174 EOF
9175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9176 { (eval echo configure:9177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9178 if test -z "$ac_err"; then
9179   rm -rf conftest*
9180   eval "ac_cv_header_$ac_safe=yes"
9181 else
9182   echo "$ac_err" >&5
9183   echo "configure: failed program was:" >&5
9184   cat conftest.$ac_ext >&5
9185   rm -rf conftest*
9186   eval "ac_cv_header_$ac_safe=no"
9187 fi
9188 rm -f conftest*
9189 fi
9190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9191   echo "$ac_t""yes" 1>&6
9192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9193   cat >> confdefs.h <<EOF
9194 #define $ac_tr_hdr 1
9195 EOF
9196  
9197 else
9198   echo "$ac_t""no" 1>&6
9199 fi
9200 done
9201
9202 if test "$ol_cv_header_db2" = yes ; then
9203         
9204         ol_cv_header_db=$ac_cv_header_db_185_h
9205 else
9206         ol_cv_header_db=$ac_cv_header_db_h
9207 fi
9208
9209
9210  
9211  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9212 echo "configure:9213: checking for Berkeley DB" >&5
9213 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   
9217         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9218                 ol_cv_berkeley_db=no
9219         else
9220                 ol_cv_berkeley_db=yes
9221         fi
9222
9223 fi
9224
9225 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9226  if test $ol_cv_berkeley_db = yes ; then
9227         cat >> confdefs.h <<\EOF
9228 #define HAVE_BERKELEY_DB 1
9229 EOF
9230
9231  fi
9232
9233
9234         if test $ol_cv_berkeley_db = yes ; then
9235                 ol_link_ldbm=db
9236                 ol_with_ldbm_api=db
9237
9238                 if test $ol_with_ldbm_type = hash ; then
9239                         cat >> confdefs.h <<\EOF
9240 #define LDBM_USE_DBHASH 1
9241 EOF
9242
9243                 else
9244                         cat >> confdefs.h <<\EOF
9245 #define LDBM_USE_DBBTREE 1
9246 EOF
9247
9248                 fi
9249
9250                                                 if test $ol_cv_lib_db != yes ; then
9251                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9252                 fi
9253         fi
9254 fi
9255
9256 if test $ol_with_ldbm_api = manual ; then
9257                 ol_link_ldbm=yes
9258
9259         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9260
9261         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9262 do
9263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9265 echo "configure:9266: checking for $ac_hdr" >&5
9266 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9267   echo $ac_n "(cached) $ac_c" 1>&6
9268 else
9269   cat > conftest.$ac_ext <<EOF
9270 #line 9271 "configure"
9271 #include "confdefs.h"
9272 #include <$ac_hdr>
9273 EOF
9274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9275 { (eval echo configure:9276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9277 if test -z "$ac_err"; then
9278   rm -rf conftest*
9279   eval "ac_cv_header_$ac_safe=yes"
9280 else
9281   echo "$ac_err" >&5
9282   echo "configure: failed program was:" >&5
9283   cat conftest.$ac_ext >&5
9284   rm -rf conftest*
9285   eval "ac_cv_header_$ac_safe=no"
9286 fi
9287 rm -f conftest*
9288 fi
9289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9290   echo "$ac_t""yes" 1>&6
9291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9292   cat >> confdefs.h <<EOF
9293 #define $ac_tr_hdr 1
9294 EOF
9295  
9296 else
9297   echo "$ac_t""no" 1>&6
9298 fi
9299 done
9300
9301 fi
9302
9303 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9304         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9305         ol_with_ldbm_api=none
9306 fi
9307
9308 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9309         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9310 echo "configure:9311: checking for MDBM library" >&5
9311 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
9312   echo $ac_n "(cached) $ac_c" 1>&6
9313 else
9314         ol_LIBS="$LIBS"
9315         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9316 echo "configure:9317: checking for mdbm_set_chain" >&5
9317 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
9318   echo $ac_n "(cached) $ac_c" 1>&6
9319 else
9320   cat > conftest.$ac_ext <<EOF
9321 #line 9322 "configure"
9322 #include "confdefs.h"
9323 /* System header to define __stub macros and hopefully few prototypes,
9324     which can conflict with char mdbm_set_chain(); below.  */
9325 #include <assert.h>
9326 /* Override any gcc2 internal prototype to avoid an error.  */
9327 /* We use char because int might match the return type of a gcc2
9328     builtin and then its argument prototype would still apply.  */
9329 char mdbm_set_chain();
9330
9331 int main() {
9332
9333 /* The GNU C library defines this for functions which it implements
9334     to always fail with ENOSYS.  Some functions are actually named
9335     something starting with __ and the normal name is an alias.  */
9336 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9337 choke me
9338 #else
9339 mdbm_set_chain();
9340 #endif
9341
9342 ; return 0; }
9343 EOF
9344 if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9345   rm -rf conftest*
9346   eval "ac_cv_func_mdbm_set_chain=yes"
9347 else
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -rf conftest*
9351   eval "ac_cv_func_mdbm_set_chain=no"
9352 fi
9353 rm -f conftest*
9354 fi
9355
9356 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9357   echo "$ac_t""yes" 1>&6
9358   ol_cv_lib_mdbm=yes
9359 else
9360   echo "$ac_t""no" 1>&6
9361
9362                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9363 echo "configure:9364: checking for mdbm_set_chain in -lmdbm" >&5
9364 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
9365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9366   echo $ac_n "(cached) $ac_c" 1>&6
9367 else
9368   ac_save_LIBS="$LIBS"
9369 LIBS="-lmdbm  $LIBS"
9370 cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 /* Override any gcc2 internal prototype to avoid an error.  */
9374 /* We use char because int might match the return type of a gcc2
9375     builtin and then its argument prototype would still apply.  */
9376 char mdbm_set_chain();
9377
9378 int main() {
9379 mdbm_set_chain()
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=yes"
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   eval "ac_cv_lib_$ac_lib_var=no"
9390 fi
9391 rm -f conftest*
9392 LIBS="$ac_save_LIBS"
9393
9394 fi
9395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9396   echo "$ac_t""yes" 1>&6
9397   ol_cv_lib_mdbm=-lmdbm
9398 else
9399   echo "$ac_t""no" 1>&6
9400 ol_cv_lib_mdbm=no
9401 fi
9402
9403         
9404 fi
9405
9406         LIBS="$ol_LIBS"
9407
9408 fi
9409
9410 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9411
9412
9413  for ac_hdr in mdbm.h
9414 do
9415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9417 echo "configure:9418: checking for $ac_hdr" >&5
9418 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9419   echo $ac_n "(cached) $ac_c" 1>&6
9420 else
9421   cat > conftest.$ac_ext <<EOF
9422 #line 9423 "configure"
9423 #include "confdefs.h"
9424 #include <$ac_hdr>
9425 EOF
9426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9427 { (eval echo configure:9428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9429 if test -z "$ac_err"; then
9430   rm -rf conftest*
9431   eval "ac_cv_header_$ac_safe=yes"
9432 else
9433   echo "$ac_err" >&5
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   eval "ac_cv_header_$ac_safe=no"
9438 fi
9439 rm -f conftest*
9440 fi
9441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9442   echo "$ac_t""yes" 1>&6
9443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9444   cat >> confdefs.h <<EOF
9445 #define $ac_tr_hdr 1
9446 EOF
9447  
9448 else
9449   echo "$ac_t""no" 1>&6
9450 fi
9451 done
9452
9453  echo $ac_n "checking for db""... $ac_c" 1>&6
9454 echo "configure:9455: checking for db" >&5
9455 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   
9459         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9460                 ol_cv_mdbm=no
9461         else
9462                 ol_cv_mdbm=yes
9463         fi
9464
9465 fi
9466
9467 echo "$ac_t""$ol_cv_mdbm" 1>&6
9468  if test $ol_cv_mdbm = yes ; then
9469         cat >> confdefs.h <<\EOF
9470 #define HAVE_MDBM 1
9471 EOF
9472
9473  fi
9474
9475
9476         if test $ol_cv_mdbm = yes ; then
9477                 ol_link_ldbm=mdbm
9478                 ol_with_ldbm_api=mdbm
9479                 if test $ol_cv_lib_mdbm != yes ; then
9480                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9481                 fi
9482         fi
9483 fi
9484
9485 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9486         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9487 echo "configure:9488: checking for GDBM library" >&5
9488 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491         ol_LIBS="$LIBS"
9492         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9493 echo "configure:9494: checking for gdbm_open" >&5
9494 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497   cat > conftest.$ac_ext <<EOF
9498 #line 9499 "configure"
9499 #include "confdefs.h"
9500 /* System header to define __stub macros and hopefully few prototypes,
9501     which can conflict with char gdbm_open(); below.  */
9502 #include <assert.h>
9503 /* Override any gcc2 internal prototype to avoid an error.  */
9504 /* We use char because int might match the return type of a gcc2
9505     builtin and then its argument prototype would still apply.  */
9506 char gdbm_open();
9507
9508 int main() {
9509
9510 /* The GNU C library defines this for functions which it implements
9511     to always fail with ENOSYS.  Some functions are actually named
9512     something starting with __ and the normal name is an alias.  */
9513 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9514 choke me
9515 #else
9516 gdbm_open();
9517 #endif
9518
9519 ; return 0; }
9520 EOF
9521 if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9522   rm -rf conftest*
9523   eval "ac_cv_func_gdbm_open=yes"
9524 else
9525   echo "configure: failed program was:" >&5
9526   cat conftest.$ac_ext >&5
9527   rm -rf conftest*
9528   eval "ac_cv_func_gdbm_open=no"
9529 fi
9530 rm -f conftest*
9531 fi
9532
9533 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9534   echo "$ac_t""yes" 1>&6
9535   ol_cv_lib_gdbm=yes
9536 else
9537   echo "$ac_t""no" 1>&6
9538
9539                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9540 echo "configure:9541: checking for gdbm_open in -lgdbm" >&5
9541 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
9542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9543   echo $ac_n "(cached) $ac_c" 1>&6
9544 else
9545   ac_save_LIBS="$LIBS"
9546 LIBS="-lgdbm  $LIBS"
9547 cat > conftest.$ac_ext <<EOF
9548 #line 9549 "configure"
9549 #include "confdefs.h"
9550 /* Override any gcc2 internal prototype to avoid an error.  */
9551 /* We use char because int might match the return type of a gcc2
9552     builtin and then its argument prototype would still apply.  */
9553 char gdbm_open();
9554
9555 int main() {
9556 gdbm_open()
9557 ; return 0; }
9558 EOF
9559 if { (eval echo configure:9560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9560   rm -rf conftest*
9561   eval "ac_cv_lib_$ac_lib_var=yes"
9562 else
9563   echo "configure: failed program was:" >&5
9564   cat conftest.$ac_ext >&5
9565   rm -rf conftest*
9566   eval "ac_cv_lib_$ac_lib_var=no"
9567 fi
9568 rm -f conftest*
9569 LIBS="$ac_save_LIBS"
9570
9571 fi
9572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9573   echo "$ac_t""yes" 1>&6
9574   ol_cv_lib_gdbm=-lgdbm
9575 else
9576   echo "$ac_t""no" 1>&6
9577 ol_cv_lib_gdbm=no
9578 fi
9579
9580         
9581 fi
9582
9583         LIBS="$ol_LIBS"
9584
9585 fi
9586
9587 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9588
9589
9590  for ac_hdr in gdbm.h
9591 do
9592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9594 echo "configure:9595: checking for $ac_hdr" >&5
9595 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9596   echo $ac_n "(cached) $ac_c" 1>&6
9597 else
9598   cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 #include <$ac_hdr>
9602 EOF
9603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9604 { (eval echo configure:9605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9606 if test -z "$ac_err"; then
9607   rm -rf conftest*
9608   eval "ac_cv_header_$ac_safe=yes"
9609 else
9610   echo "$ac_err" >&5
9611   echo "configure: failed program was:" >&5
9612   cat conftest.$ac_ext >&5
9613   rm -rf conftest*
9614   eval "ac_cv_header_$ac_safe=no"
9615 fi
9616 rm -f conftest*
9617 fi
9618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9619   echo "$ac_t""yes" 1>&6
9620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9621   cat >> confdefs.h <<EOF
9622 #define $ac_tr_hdr 1
9623 EOF
9624  
9625 else
9626   echo "$ac_t""no" 1>&6
9627 fi
9628 done
9629
9630  echo $ac_n "checking for db""... $ac_c" 1>&6
9631 echo "configure:9632: checking for db" >&5
9632 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
9633   echo $ac_n "(cached) $ac_c" 1>&6
9634 else
9635   
9636         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9637                 ol_cv_gdbm=no
9638         else
9639                 ol_cv_gdbm=yes
9640         fi
9641
9642 fi
9643
9644 echo "$ac_t""$ol_cv_gdbm" 1>&6
9645  if test $ol_cv_gdbm = yes ; then
9646         cat >> confdefs.h <<\EOF
9647 #define HAVE_GDBM 1
9648 EOF
9649
9650  fi
9651
9652
9653         if test $ol_cv_gdbm = yes ; then
9654                 ol_link_ldbm=gdbm
9655                 ol_with_ldbm_api=gdbm
9656
9657                 if test $ol_cv_lib_gdbm != yes ; then
9658                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9659                 fi
9660         fi
9661 fi
9662
9663 if test $ol_with_ldbm_api = auto ; then
9664         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9665 elif test $ol_with_ldbm_api = ndbm ; then
9666         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9667 echo "configure:9668: checking for NDBM library" >&5
9668 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
9669   echo $ac_n "(cached) $ac_c" 1>&6
9670 else
9671         ol_LIBS="$LIBS"
9672         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9673 echo "configure:9674: checking for dbm_open" >&5
9674 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
9675   echo $ac_n "(cached) $ac_c" 1>&6
9676 else
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 /* System header to define __stub macros and hopefully few prototypes,
9681     which can conflict with char dbm_open(); below.  */
9682 #include <assert.h>
9683 /* Override any gcc2 internal prototype to avoid an error.  */
9684 /* We use char because int might match the return type of a gcc2
9685     builtin and then its argument prototype would still apply.  */
9686 char dbm_open();
9687
9688 int main() {
9689
9690 /* The GNU C library defines this for functions which it implements
9691     to always fail with ENOSYS.  Some functions are actually named
9692     something starting with __ and the normal name is an alias.  */
9693 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9694 choke me
9695 #else
9696 dbm_open();
9697 #endif
9698
9699 ; return 0; }
9700 EOF
9701 if { (eval echo configure:9702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9702   rm -rf conftest*
9703   eval "ac_cv_func_dbm_open=yes"
9704 else
9705   echo "configure: failed program was:" >&5
9706   cat conftest.$ac_ext >&5
9707   rm -rf conftest*
9708   eval "ac_cv_func_dbm_open=no"
9709 fi
9710 rm -f conftest*
9711 fi
9712
9713 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9714   echo "$ac_t""yes" 1>&6
9715   ol_cv_lib_ndbm=yes
9716 else
9717   echo "$ac_t""no" 1>&6
9718
9719                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9720 echo "configure:9721: checking for dbm_open in -lndbm" >&5
9721 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
9722 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9723   echo $ac_n "(cached) $ac_c" 1>&6
9724 else
9725   ac_save_LIBS="$LIBS"
9726 LIBS="-lndbm  $LIBS"
9727 cat > conftest.$ac_ext <<EOF
9728 #line 9729 "configure"
9729 #include "confdefs.h"
9730 /* Override any gcc2 internal prototype to avoid an error.  */
9731 /* We use char because int might match the return type of a gcc2
9732     builtin and then its argument prototype would still apply.  */
9733 char dbm_open();
9734
9735 int main() {
9736 dbm_open()
9737 ; return 0; }
9738 EOF
9739 if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9740   rm -rf conftest*
9741   eval "ac_cv_lib_$ac_lib_var=yes"
9742 else
9743   echo "configure: failed program was:" >&5
9744   cat conftest.$ac_ext >&5
9745   rm -rf conftest*
9746   eval "ac_cv_lib_$ac_lib_var=no"
9747 fi
9748 rm -f conftest*
9749 LIBS="$ac_save_LIBS"
9750
9751 fi
9752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9753   echo "$ac_t""yes" 1>&6
9754   ol_cv_lib_ndbm=-lndbm
9755 else
9756   echo "$ac_t""no" 1>&6
9757
9758                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9759 echo "configure:9760: checking for dbm_open in -ldbm" >&5
9760 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
9761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   ac_save_LIBS="$LIBS"
9765 LIBS="-ldbm  $LIBS"
9766 cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769 /* Override any gcc2 internal prototype to avoid an error.  */
9770 /* We use char because int might match the return type of a gcc2
9771     builtin and then its argument prototype would still apply.  */
9772 char dbm_open();
9773
9774 int main() {
9775 dbm_open()
9776 ; return 0; }
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9779   rm -rf conftest*
9780   eval "ac_cv_lib_$ac_lib_var=yes"
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -rf conftest*
9785   eval "ac_cv_lib_$ac_lib_var=no"
9786 fi
9787 rm -f conftest*
9788 LIBS="$ac_save_LIBS"
9789
9790 fi
9791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9792   echo "$ac_t""yes" 1>&6
9793   ol_cv_lib_ndbm=-ldbm
9794 else
9795   echo "$ac_t""no" 1>&6
9796 ol_cv_lib_ndbm=no
9797 fi
9798                 
9799 fi
9800
9801         
9802 fi
9803
9804         LIBS="$ol_LIBS"
9805
9806 fi
9807
9808 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9809
9810
9811  for ac_hdr in ndbm.h
9812 do
9813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9815 echo "configure:9816: checking for $ac_hdr" >&5
9816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9817   echo $ac_n "(cached) $ac_c" 1>&6
9818 else
9819   cat > conftest.$ac_ext <<EOF
9820 #line 9821 "configure"
9821 #include "confdefs.h"
9822 #include <$ac_hdr>
9823 EOF
9824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9825 { (eval echo configure:9826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9827 if test -z "$ac_err"; then
9828   rm -rf conftest*
9829   eval "ac_cv_header_$ac_safe=yes"
9830 else
9831   echo "$ac_err" >&5
9832   echo "configure: failed program was:" >&5
9833   cat conftest.$ac_ext >&5
9834   rm -rf conftest*
9835   eval "ac_cv_header_$ac_safe=no"
9836 fi
9837 rm -f conftest*
9838 fi
9839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9840   echo "$ac_t""yes" 1>&6
9841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9842   cat >> confdefs.h <<EOF
9843 #define $ac_tr_hdr 1
9844 EOF
9845  
9846 else
9847   echo "$ac_t""no" 1>&6
9848 fi
9849 done
9850
9851  echo $ac_n "checking for db""... $ac_c" 1>&6
9852 echo "configure:9853: checking for db" >&5
9853 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
9854   echo $ac_n "(cached) $ac_c" 1>&6
9855 else
9856   
9857         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9858                 ol_cv_ndbm=no
9859         else
9860                 ol_cv_ndbm=yes
9861         fi
9862
9863 fi
9864
9865 echo "$ac_t""$ol_cv_ndbm" 1>&6
9866  if test $ol_cv_ndbm = yes ; then
9867         cat >> confdefs.h <<\EOF
9868 #define HAVE_NDBM 1
9869 EOF
9870
9871  fi
9872
9873
9874         if test $ol_cv_ndbm = yes ; then
9875                 ol_link_ldbm=ndbm
9876                 ol_with_ldbm_api=ndbm
9877
9878                 if test $ol_cv_lib_ndbm != yes ; then
9879                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9880                 fi
9881         fi
9882 fi
9883
9884 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9885         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9886         if test $ol_enable_ldbm = yes ; then
9887                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9888         fi
9889
9890         echo "configure: warning: disabling LDBM" 1>&2
9891         ol_enable_ldbm=no
9892 fi
9893
9894 if test $ol_enable_wrappers != no ; then
9895         for ac_hdr in tcpd.h
9896 do
9897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9899 echo "configure:9900: checking for $ac_hdr" >&5
9900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9901   echo $ac_n "(cached) $ac_c" 1>&6
9902 else
9903   cat > conftest.$ac_ext <<EOF
9904 #line 9905 "configure"
9905 #include "confdefs.h"
9906 #include <$ac_hdr>
9907 EOF
9908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9909 { (eval echo configure:9910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9911 if test -z "$ac_err"; then
9912   rm -rf conftest*
9913   eval "ac_cv_header_$ac_safe=yes"
9914 else
9915   echo "$ac_err" >&5
9916   echo "configure: failed program was:" >&5
9917   cat conftest.$ac_ext >&5
9918   rm -rf conftest*
9919   eval "ac_cv_header_$ac_safe=no"
9920 fi
9921 rm -f conftest*
9922 fi
9923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9924   echo "$ac_t""yes" 1>&6
9925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9926   cat >> confdefs.h <<EOF
9927 #define $ac_tr_hdr 1
9928 EOF
9929  
9930 else
9931   echo "$ac_t""no" 1>&6
9932 fi
9933 done
9934
9935
9936         if test $ac_cv_header_tcpd_h != yes ; then
9937                 have_wrappers=no
9938         else
9939                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9940 echo "configure:9941: checking for main in -lwrap" >&5
9941 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
9942 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9943   echo $ac_n "(cached) $ac_c" 1>&6
9944 else
9945   ac_save_LIBS="$LIBS"
9946 LIBS="-lwrap  $LIBS"
9947 cat > conftest.$ac_ext <<EOF
9948 #line 9949 "configure"
9949 #include "confdefs.h"
9950
9951 int main() {
9952 main()
9953 ; return 0; }
9954 EOF
9955 if { (eval echo configure:9956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9956   rm -rf conftest*
9957   eval "ac_cv_lib_$ac_lib_var=yes"
9958 else
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   eval "ac_cv_lib_$ac_lib_var=no"
9963 fi
9964 rm -f conftest*
9965 LIBS="$ac_save_LIBS"
9966
9967 fi
9968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9969   echo "$ac_t""yes" 1>&6
9970   have_wrappers=yes
9971 else
9972   echo "$ac_t""no" 1>&6
9973 have_wrappers=no
9974 fi
9975
9976         fi
9977
9978         if test $have_wrappers = yes ; then
9979                 cat >> confdefs.h <<\EOF
9980 #define HAVE_TCPD 1
9981 EOF
9982
9983                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9984
9985                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9986 echo "configure:9987: checking for main in -lnsl" >&5
9987 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
9988 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9989   echo $ac_n "(cached) $ac_c" 1>&6
9990 else
9991   ac_save_LIBS="$LIBS"
9992 LIBS="-lnsl  $LIBS"
9993 cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996
9997 int main() {
9998 main()
9999 ; return 0; }
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10002   rm -rf conftest*
10003   eval "ac_cv_lib_$ac_lib_var=yes"
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -rf conftest*
10008   eval "ac_cv_lib_$ac_lib_var=no"
10009 fi
10010 rm -f conftest*
10011 LIBS="$ac_save_LIBS"
10012
10013 fi
10014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10015   echo "$ac_t""yes" 1>&6
10016     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10018   cat >> confdefs.h <<EOF
10019 #define $ac_tr_lib 1
10020 EOF
10021
10022   LIBS="-lnsl $LIBS"
10023
10024 else
10025   echo "$ac_t""no" 1>&6
10026 fi
10027
10028         else
10029                 echo "configure: warning: could not find -lwrap" 1>&2
10030                 if test $ol_enable_wrappers = yes ; then
10031                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
10032                 fi
10033
10034                 echo "configure: warning: disabling wrappers support" 1>&2
10035                 ol_enable_wrappers=no
10036         fi
10037 fi
10038
10039 if test $ol_enable_syslog != no ; then
10040         echo $ac_n "checking for openlog""... $ac_c" 1>&6
10041 echo "configure:10042: checking for openlog" >&5
10042 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
10043   echo $ac_n "(cached) $ac_c" 1>&6
10044 else
10045   cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048 /* System header to define __stub macros and hopefully few prototypes,
10049     which can conflict with char openlog(); below.  */
10050 #include <assert.h>
10051 /* Override any gcc2 internal prototype to avoid an error.  */
10052 /* We use char because int might match the return type of a gcc2
10053     builtin and then its argument prototype would still apply.  */
10054 char openlog();
10055
10056 int main() {
10057
10058 /* The GNU C library defines this for functions which it implements
10059     to always fail with ENOSYS.  Some functions are actually named
10060     something starting with __ and the normal name is an alias.  */
10061 #if defined (__stub_openlog) || defined (__stub___openlog)
10062 choke me
10063 #else
10064 openlog();
10065 #endif
10066
10067 ; return 0; }
10068 EOF
10069 if { (eval echo configure:10070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10070   rm -rf conftest*
10071   eval "ac_cv_func_openlog=yes"
10072 else
10073   echo "configure: failed program was:" >&5
10074   cat conftest.$ac_ext >&5
10075   rm -rf conftest*
10076   eval "ac_cv_func_openlog=no"
10077 fi
10078 rm -f conftest*
10079 fi
10080
10081 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
10082   echo "$ac_t""yes" 1>&6
10083   :
10084 else
10085   echo "$ac_t""no" 1>&6
10086 fi
10087
10088         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
10089                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
10090         fi
10091         ol_enable_syslog=$ac_cv_func_openlog
10092 fi
10093
10094 if test $ol_enable_dmalloc != no ; then
10095         for ac_hdr in dmalloc.h
10096 do
10097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10099 echo "configure:10100: checking for $ac_hdr" >&5
10100 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10101   echo $ac_n "(cached) $ac_c" 1>&6
10102 else
10103   cat > conftest.$ac_ext <<EOF
10104 #line 10105 "configure"
10105 #include "confdefs.h"
10106 #include <$ac_hdr>
10107 EOF
10108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10109 { (eval echo configure:10110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10111 if test -z "$ac_err"; then
10112   rm -rf conftest*
10113   eval "ac_cv_header_$ac_safe=yes"
10114 else
10115   echo "$ac_err" >&5
10116   echo "configure: failed program was:" >&5
10117   cat conftest.$ac_ext >&5
10118   rm -rf conftest*
10119   eval "ac_cv_header_$ac_safe=no"
10120 fi
10121 rm -f conftest*
10122 fi
10123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10124   echo "$ac_t""yes" 1>&6
10125     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10126   cat >> confdefs.h <<EOF
10127 #define $ac_tr_hdr 1
10128 EOF
10129  
10130 else
10131   echo "$ac_t""no" 1>&6
10132 fi
10133 done
10134
10135         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10136 echo "configure:10137: checking for dmalloc_shutdown in -ldmalloc" >&5
10137 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
10138 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   ac_save_LIBS="$LIBS"
10142 LIBS="-ldmalloc  $LIBS"
10143 cat > conftest.$ac_ext <<EOF
10144 #line 10145 "configure"
10145 #include "confdefs.h"
10146 /* Override any gcc2 internal prototype to avoid an error.  */
10147 /* We use char because int might match the return type of a gcc2
10148     builtin and then its argument prototype would still apply.  */
10149 char dmalloc_shutdown();
10150
10151 int main() {
10152 dmalloc_shutdown()
10153 ; return 0; }
10154 EOF
10155 if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10156   rm -rf conftest*
10157   eval "ac_cv_lib_$ac_lib_var=yes"
10158 else
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161   rm -rf conftest*
10162   eval "ac_cv_lib_$ac_lib_var=no"
10163 fi
10164 rm -f conftest*
10165 LIBS="$ac_save_LIBS"
10166
10167 fi
10168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10169   echo "$ac_t""yes" 1>&6
10170     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10171     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10172   cat >> confdefs.h <<EOF
10173 #define $ac_tr_lib 1
10174 EOF
10175
10176   LIBS="-ldmalloc $LIBS"
10177
10178 else
10179   echo "$ac_t""no" 1>&6
10180 fi
10181
10182 fi
10183
10184 if test $ol_enable_tcl != no ; then
10185         for ac_hdr in tcl.h
10186 do
10187 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10188 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10189 echo "configure:10190: checking for $ac_hdr" >&5
10190 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10191   echo $ac_n "(cached) $ac_c" 1>&6
10192 else
10193   cat > conftest.$ac_ext <<EOF
10194 #line 10195 "configure"
10195 #include "confdefs.h"
10196 #include <$ac_hdr>
10197 EOF
10198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10199 { (eval echo configure:10200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10201 if test -z "$ac_err"; then
10202   rm -rf conftest*
10203   eval "ac_cv_header_$ac_safe=yes"
10204 else
10205   echo "$ac_err" >&5
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   eval "ac_cv_header_$ac_safe=no"
10210 fi
10211 rm -f conftest*
10212 fi
10213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10214   echo "$ac_t""yes" 1>&6
10215     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10216   cat >> confdefs.h <<EOF
10217 #define $ac_tr_hdr 1
10218 EOF
10219  
10220 else
10221   echo "$ac_t""no" 1>&6
10222 fi
10223 done
10224
10225
10226         if test $ac_cv_header_tcl_h != yes ; then
10227                 have_tcl=no
10228         else
10229                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10230 echo "configure:10231: checking for main in -ltcl" >&5
10231 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
10232 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10233   echo $ac_n "(cached) $ac_c" 1>&6
10234 else
10235   ac_save_LIBS="$LIBS"
10236 LIBS="-ltcl  $LIBS"
10237 cat > conftest.$ac_ext <<EOF
10238 #line 10239 "configure"
10239 #include "confdefs.h"
10240
10241 int main() {
10242 main()
10243 ; return 0; }
10244 EOF
10245 if { (eval echo configure:10246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10246   rm -rf conftest*
10247   eval "ac_cv_lib_$ac_lib_var=yes"
10248 else
10249   echo "configure: failed program was:" >&5
10250   cat conftest.$ac_ext >&5
10251   rm -rf conftest*
10252   eval "ac_cv_lib_$ac_lib_var=no"
10253 fi
10254 rm -f conftest*
10255 LIBS="$ac_save_LIBS"
10256
10257 fi
10258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10259   echo "$ac_t""yes" 1>&6
10260   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10261 else
10262   echo "$ac_t""no" 1>&6
10263 have_tcl=no
10264 fi
10265
10266
10267                 if test $have_tcl != yes; then
10268                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10269 echo "configure:10270: checking for main in -ltcl7.6" >&5
10270 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
10271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10272   echo $ac_n "(cached) $ac_c" 1>&6
10273 else
10274   ac_save_LIBS="$LIBS"
10275 LIBS="-ltcl7.6  $LIBS"
10276 cat > conftest.$ac_ext <<EOF
10277 #line 10278 "configure"
10278 #include "confdefs.h"
10279
10280 int main() {
10281 main()
10282 ; return 0; }
10283 EOF
10284 if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10285   rm -rf conftest*
10286   eval "ac_cv_lib_$ac_lib_var=yes"
10287 else
10288   echo "configure: failed program was:" >&5
10289   cat conftest.$ac_ext >&5
10290   rm -rf conftest*
10291   eval "ac_cv_lib_$ac_lib_var=no"
10292 fi
10293 rm -f conftest*
10294 LIBS="$ac_save_LIBS"
10295
10296 fi
10297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10298   echo "$ac_t""yes" 1>&6
10299   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10300 else
10301   echo "$ac_t""no" 1>&6
10302 have_tcl=no
10303 fi
10304
10305                 fi
10306
10307                 if test $have_tcl != yes; then
10308                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10309 echo "configure:10310: checking for main in -ltcl8.0" >&5
10310 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
10311 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10312   echo $ac_n "(cached) $ac_c" 1>&6
10313 else
10314   ac_save_LIBS="$LIBS"
10315 LIBS="-ltcl8.0  $LIBS"
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319
10320 int main() {
10321 main()
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   eval "ac_cv_lib_$ac_lib_var=yes"
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   eval "ac_cv_lib_$ac_lib_var=no"
10332 fi
10333 rm -f conftest*
10334 LIBS="$ac_save_LIBS"
10335
10336 fi
10337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10338   echo "$ac_t""yes" 1>&6
10339   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10340 else
10341   echo "$ac_t""no" 1>&6
10342 have_tcl=no
10343 fi
10344
10345                 fi
10346         fi
10347
10348         if test $have_tcl != yes ; then
10349                 echo "configure: warning: could not find -ltcl" 1>&2
10350                 if test $ol_enable_tcl = yes ; then
10351                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10352                 fi
10353
10354                 ol_enable_tcl=no
10355         fi
10356 fi
10357
10358 # ud needs termcap (should insert check here)
10359 ol_link_termcap=no
10360 for ac_hdr in termcap.h ncurses.h
10361 do
10362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10364 echo "configure:10365: checking for $ac_hdr" >&5
10365 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   cat > conftest.$ac_ext <<EOF
10369 #line 10370 "configure"
10370 #include "confdefs.h"
10371 #include <$ac_hdr>
10372 EOF
10373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10374 { (eval echo configure:10375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10376 if test -z "$ac_err"; then
10377   rm -rf conftest*
10378   eval "ac_cv_header_$ac_safe=yes"
10379 else
10380   echo "$ac_err" >&5
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -rf conftest*
10384   eval "ac_cv_header_$ac_safe=no"
10385 fi
10386 rm -f conftest*
10387 fi
10388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10389   echo "$ac_t""yes" 1>&6
10390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10391   cat >> confdefs.h <<EOF
10392 #define $ac_tr_hdr 1
10393 EOF
10394  
10395 else
10396   echo "$ac_t""no" 1>&6
10397 fi
10398 done
10399
10400
10401 if test $ol_link_termcap = no ; then
10402         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10403 echo "configure:10404: checking for tputs in -ltermcap" >&5
10404 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
10405 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10406   echo $ac_n "(cached) $ac_c" 1>&6
10407 else
10408   ac_save_LIBS="$LIBS"
10409 LIBS="-ltermcap  $LIBS"
10410 cat > conftest.$ac_ext <<EOF
10411 #line 10412 "configure"
10412 #include "confdefs.h"
10413 /* Override any gcc2 internal prototype to avoid an error.  */
10414 /* We use char because int might match the return type of a gcc2
10415     builtin and then its argument prototype would still apply.  */
10416 char tputs();
10417
10418 int main() {
10419 tputs()
10420 ; return 0; }
10421 EOF
10422 if { (eval echo configure:10423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10423   rm -rf conftest*
10424   eval "ac_cv_lib_$ac_lib_var=yes"
10425 else
10426   echo "configure: failed program was:" >&5
10427   cat conftest.$ac_ext >&5
10428   rm -rf conftest*
10429   eval "ac_cv_lib_$ac_lib_var=no"
10430 fi
10431 rm -f conftest*
10432 LIBS="$ac_save_LIBS"
10433
10434 fi
10435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10436   echo "$ac_t""yes" 1>&6
10437   have_termcap=yes
10438 else
10439   echo "$ac_t""no" 1>&6
10440 have_termcap=no
10441 fi
10442
10443         if test $have_termcap = yes ; then
10444                 cat >> confdefs.h <<\EOF
10445 #define HAVE_TERMCAP 1
10446 EOF
10447
10448                 ol_link_termcap=yes
10449                 TERMCAP_LIBS=-ltermcap
10450         fi
10451 fi
10452
10453 if test $ol_link_termcap = no ; then
10454         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10455 echo "configure:10456: checking for initscr in -lncurses" >&5
10456 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
10457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10458   echo $ac_n "(cached) $ac_c" 1>&6
10459 else
10460   ac_save_LIBS="$LIBS"
10461 LIBS="-lncurses  $LIBS"
10462 cat > conftest.$ac_ext <<EOF
10463 #line 10464 "configure"
10464 #include "confdefs.h"
10465 /* Override any gcc2 internal prototype to avoid an error.  */
10466 /* We use char because int might match the return type of a gcc2
10467     builtin and then its argument prototype would still apply.  */
10468 char initscr();
10469
10470 int main() {
10471 initscr()
10472 ; return 0; }
10473 EOF
10474 if { (eval echo configure:10475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10475   rm -rf conftest*
10476   eval "ac_cv_lib_$ac_lib_var=yes"
10477 else
10478   echo "configure: failed program was:" >&5
10479   cat conftest.$ac_ext >&5
10480   rm -rf conftest*
10481   eval "ac_cv_lib_$ac_lib_var=no"
10482 fi
10483 rm -f conftest*
10484 LIBS="$ac_save_LIBS"
10485
10486 fi
10487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10488   echo "$ac_t""yes" 1>&6
10489   have_ncurses=yes
10490 else
10491   echo "$ac_t""no" 1>&6
10492 have_ncurses=no
10493 fi
10494
10495         if test $have_ncurses = yes ; then
10496                 cat >> confdefs.h <<\EOF
10497 #define HAVE_NCURSES 1
10498 EOF
10499
10500                 ol_link_termcap=yes
10501                 TERMCAP_LIBS=-lncurses
10502         fi
10503 fi
10504
10505 if test $ol_link_termcap = no ; then
10506         cat >> confdefs.h <<\EOF
10507 #define NO_TERMCAP 1
10508 EOF
10509
10510         TERMCAP_LIBS=
10511 fi
10512
10513 ol_link_sasl=no
10514 if test $ol_with_cyrus_sasl != no ; then
10515         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10516 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10517 echo "configure:10518: checking for sasl.h" >&5
10518 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   cat > conftest.$ac_ext <<EOF
10522 #line 10523 "configure"
10523 #include "confdefs.h"
10524 #include <sasl.h>
10525 EOF
10526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10527 { (eval echo configure:10528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10529 if test -z "$ac_err"; then
10530   rm -rf conftest*
10531   eval "ac_cv_header_$ac_safe=yes"
10532 else
10533   echo "$ac_err" >&5
10534   echo "configure: failed program was:" >&5
10535   cat conftest.$ac_ext >&5
10536   rm -rf conftest*
10537   eval "ac_cv_header_$ac_safe=no"
10538 fi
10539 rm -f conftest*
10540 fi
10541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10542   echo "$ac_t""yes" 1>&6
10543   :
10544 else
10545   echo "$ac_t""no" 1>&6
10546 fi
10547
10548
10549         if test $ac_cv_header_sasl_h = yes ; then
10550                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10551 echo "configure:10552: checking for sasl_client_init in -lsasl" >&5
10552 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
10553 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10554   echo $ac_n "(cached) $ac_c" 1>&6
10555 else
10556   ac_save_LIBS="$LIBS"
10557 LIBS="-lsasl  $LIBS"
10558 cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 /* Override any gcc2 internal prototype to avoid an error.  */
10562 /* We use char because int might match the return type of a gcc2
10563     builtin and then its argument prototype would still apply.  */
10564 char sasl_client_init();
10565
10566 int main() {
10567 sasl_client_init()
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_lib_$ac_lib_var=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_lib_$ac_lib_var=no"
10578 fi
10579 rm -f conftest*
10580 LIBS="$ac_save_LIBS"
10581
10582 fi
10583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585   have_cyrus_sasl=yes
10586 else
10587   echo "$ac_t""no" 1>&6
10588 have_cyrus_sasl=no
10589 fi
10590
10591
10592                 if test $have_cyrus_sasl != no ; then
10593                         SASL_LIBS="-lsasl"
10594                         cat >> confdefs.h <<\EOF
10595 #define HAVE_CYRUS_SASL 1
10596 EOF
10597
10598                         ol_link_sasl=yes
10599                 fi
10600         fi
10601
10602         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10603                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10604         fi
10605 fi
10606
10607 ol_link_fetch=no
10608 if test $ol_with_fetch != no ; then
10609         ol=$LIBS
10610 LIBS="-lfetch -lcom_err $LIBS"
10611 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10612 echo "configure:10613: checking fetch(3) library" >&5
10613 if eval "test \"`echo '$''{'ol_cv_lib_fetch'+set}'`\" = set"; then
10614   echo $ac_n "(cached) $ac_c" 1>&6
10615 else
10616   
10617         cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620
10621 #include <sys/param.h>
10622 #include <stdio.h>
10623 #include <fetch.h>
10624 int main() {
10625 struct url *u = fetchParseURL("file:///"); 
10626 ; return 0; }
10627 EOF
10628 if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10629   rm -rf conftest*
10630   ol_cv_lib_fetch=yes
10631 else
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   ol_cv_lib_fetch=no
10636 fi
10637 rm -f conftest*
10638 fi
10639
10640 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10641 LIBS=$ol_LIBS
10642 if test $ol_cv_lib_fetch != no ; then
10643         ol_link_fetch="-lfetch -lcom_err"
10644         cat >> confdefs.h <<\EOF
10645 #define HAVE_FETCH 1
10646 EOF
10647
10648 fi
10649
10650
10651         if test $ol_cv_lib_fetch != no ; then
10652                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10653                 ol_link_fetch=freebsd
10654
10655         elif test $ol_with_fetch != auto ; then
10656                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10657         fi 
10658 fi
10659
10660 ol_link_readline=no
10661 if test $ol_with_readline != no ; then
10662         for ac_hdr in readline/readline.h readline/history.h
10663 do
10664 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10665 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10666 echo "configure:10667: checking for $ac_hdr" >&5
10667 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10668   echo $ac_n "(cached) $ac_c" 1>&6
10669 else
10670   cat > conftest.$ac_ext <<EOF
10671 #line 10672 "configure"
10672 #include "confdefs.h"
10673 #include <$ac_hdr>
10674 EOF
10675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10676 { (eval echo configure:10677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10678 if test -z "$ac_err"; then
10679   rm -rf conftest*
10680   eval "ac_cv_header_$ac_safe=yes"
10681 else
10682   echo "$ac_err" >&5
10683   echo "configure: failed program was:" >&5
10684   cat conftest.$ac_ext >&5
10685   rm -rf conftest*
10686   eval "ac_cv_header_$ac_safe=no"
10687 fi
10688 rm -f conftest*
10689 fi
10690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10691   echo "$ac_t""yes" 1>&6
10692     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10693   cat >> confdefs.h <<EOF
10694 #define $ac_tr_hdr 1
10695 EOF
10696  
10697 else
10698   echo "$ac_t""no" 1>&6
10699 fi
10700 done
10701
10702
10703         if test $ac_cv_header_readline_readline_h = yes ; then
10704                 save_LIBS="$LIBS"
10705                 LIBS="$TERMCAP_LIBS $LIBS"
10706                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10707 echo "configure:10708: checking for readline in -lreadline" >&5
10708 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
10709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10710   echo $ac_n "(cached) $ac_c" 1>&6
10711 else
10712   ac_save_LIBS="$LIBS"
10713 LIBS="-lreadline  $LIBS"
10714 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717 /* Override any gcc2 internal prototype to avoid an error.  */
10718 /* We use char because int might match the return type of a gcc2
10719     builtin and then its argument prototype would still apply.  */
10720 char readline();
10721
10722 int main() {
10723 readline()
10724 ; return 0; }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=yes"
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_lib_$ac_lib_var=no"
10734 fi
10735 rm -f conftest*
10736 LIBS="$ac_save_LIBS"
10737
10738 fi
10739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10740   echo "$ac_t""yes" 1>&6
10741   have_readline=yes
10742 else
10743   echo "$ac_t""no" 1>&6
10744 have_readline=no
10745 fi
10746
10747                 LIBS="$save_LIBS"
10748                         
10749                 if test $have_readline = yes ; then
10750                         ol_with_readline=found
10751                         ol_link_readline=yes
10752
10753                         READLINE_LIBS="-lreadline"
10754                 fi
10755         fi
10756 fi
10757
10758 if test $ol_link_readline = yes ; then
10759         cat >> confdefs.h <<\EOF
10760 #define HAVE_READLINE 1
10761 EOF
10762
10763 fi
10764
10765
10766 # FreeBSD (and others) have crypt(3) in -lcrypt
10767 if test $ol_enable_crypt != no ; then
10768         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10769 echo "configure:10770: checking for crypt" >&5
10770 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
10771   echo $ac_n "(cached) $ac_c" 1>&6
10772 else
10773   cat > conftest.$ac_ext <<EOF
10774 #line 10775 "configure"
10775 #include "confdefs.h"
10776 /* System header to define __stub macros and hopefully few prototypes,
10777     which can conflict with char crypt(); below.  */
10778 #include <assert.h>
10779 /* Override any gcc2 internal prototype to avoid an error.  */
10780 /* We use char because int might match the return type of a gcc2
10781     builtin and then its argument prototype would still apply.  */
10782 char crypt();
10783
10784 int main() {
10785
10786 /* The GNU C library defines this for functions which it implements
10787     to always fail with ENOSYS.  Some functions are actually named
10788     something starting with __ and the normal name is an alias.  */
10789 #if defined (__stub_crypt) || defined (__stub___crypt)
10790 choke me
10791 #else
10792 crypt();
10793 #endif
10794
10795 ; return 0; }
10796 EOF
10797 if { (eval echo configure:10798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10798   rm -rf conftest*
10799   eval "ac_cv_func_crypt=yes"
10800 else
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   eval "ac_cv_func_crypt=no"
10805 fi
10806 rm -f conftest*
10807 fi
10808
10809 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10810   echo "$ac_t""yes" 1>&6
10811   have_crypt=yes
10812 else
10813   echo "$ac_t""no" 1>&6
10814
10815                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10816 echo "configure:10817: checking for crypt in -lcrypt" >&5
10817 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   ac_save_LIBS="$LIBS"
10822 LIBS="-lcrypt  $LIBS"
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 /* Override any gcc2 internal prototype to avoid an error.  */
10827 /* We use char because int might match the return type of a gcc2
10828     builtin and then its argument prototype would still apply.  */
10829 char crypt();
10830
10831 int main() {
10832 crypt()
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   eval "ac_cv_lib_$ac_lib_var=yes"
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_lib_$ac_lib_var=no"
10843 fi
10844 rm -f conftest*
10845 LIBS="$ac_save_LIBS"
10846
10847 fi
10848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10849   echo "$ac_t""yes" 1>&6
10850   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10851                         have_crypt=yes
10852 else
10853   echo "$ac_t""no" 1>&6
10854 have_crypt=no
10855 fi
10856
10857 fi
10858
10859
10860         if test $have_crypt = yes ; then
10861                 cat >> confdefs.h <<\EOF
10862 #define HAVE_CRYPT 1
10863 EOF
10864
10865         else
10866                 echo "configure: warning: could not find crypt" 1>&2
10867                 if test $ol_enable_crypt = yes ; then
10868                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10869                 fi
10870
10871                 echo "configure: warning: disabling crypt support" 1>&2
10872                 ol_enable_crypt=no
10873         fi
10874 fi
10875
10876 # FreeBSD (and others) have setproctitle(3) in -lutil
10877 if test $ol_enable_proctitle != no ; then
10878         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10879 echo "configure:10880: checking for setproctitle" >&5
10880 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
10881   echo $ac_n "(cached) $ac_c" 1>&6
10882 else
10883   cat > conftest.$ac_ext <<EOF
10884 #line 10885 "configure"
10885 #include "confdefs.h"
10886 /* System header to define __stub macros and hopefully few prototypes,
10887     which can conflict with char setproctitle(); below.  */
10888 #include <assert.h>
10889 /* Override any gcc2 internal prototype to avoid an error.  */
10890 /* We use char because int might match the return type of a gcc2
10891     builtin and then its argument prototype would still apply.  */
10892 char setproctitle();
10893
10894 int main() {
10895
10896 /* The GNU C library defines this for functions which it implements
10897     to always fail with ENOSYS.  Some functions are actually named
10898     something starting with __ and the normal name is an alias.  */
10899 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10900 choke me
10901 #else
10902 setproctitle();
10903 #endif
10904
10905 ; return 0; }
10906 EOF
10907 if { (eval echo configure:10908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10908   rm -rf conftest*
10909   eval "ac_cv_func_setproctitle=yes"
10910 else
10911   echo "configure: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   rm -rf conftest*
10914   eval "ac_cv_func_setproctitle=no"
10915 fi
10916 rm -f conftest*
10917 fi
10918
10919 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10920   echo "$ac_t""yes" 1>&6
10921   have_setproctitle=yes
10922 else
10923   echo "$ac_t""no" 1>&6
10924
10925                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10926 echo "configure:10927: checking for setproctitle in -lutil" >&5
10927 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
10928 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   ac_save_LIBS="$LIBS"
10932 LIBS="-lutil  $LIBS"
10933 cat > conftest.$ac_ext <<EOF
10934 #line 10935 "configure"
10935 #include "confdefs.h"
10936 /* Override any gcc2 internal prototype to avoid an error.  */
10937 /* We use char because int might match the return type of a gcc2
10938     builtin and then its argument prototype would still apply.  */
10939 char setproctitle();
10940
10941 int main() {
10942 setproctitle()
10943 ; return 0; }
10944 EOF
10945 if { (eval echo configure:10946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10946   rm -rf conftest*
10947   eval "ac_cv_lib_$ac_lib_var=yes"
10948 else
10949   echo "configure: failed program was:" >&5
10950   cat conftest.$ac_ext >&5
10951   rm -rf conftest*
10952   eval "ac_cv_lib_$ac_lib_var=no"
10953 fi
10954 rm -f conftest*
10955 LIBS="$ac_save_LIBS"
10956
10957 fi
10958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10959   echo "$ac_t""yes" 1>&6
10960   have_setproctitle=yes
10961                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10962 else
10963   echo "$ac_t""no" 1>&6
10964 have_setproctitle=no
10965                         LIBOBJS="$LIBOBJS setproctitle.o"
10966 fi
10967
10968 fi
10969
10970
10971         if test $have_setproctitle = yes ; then
10972                 cat >> confdefs.h <<\EOF
10973 #define HAVE_SETPROCTITLE 1
10974 EOF
10975
10976         fi
10977 fi
10978
10979 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10980 echo "configure:10981: checking for uid_t in sys/types.h" >&5
10981 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10982   echo $ac_n "(cached) $ac_c" 1>&6
10983 else
10984   cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 #include <sys/types.h>
10988 EOF
10989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10990   egrep "uid_t" >/dev/null 2>&1; then
10991   rm -rf conftest*
10992   ac_cv_type_uid_t=yes
10993 else
10994   rm -rf conftest*
10995   ac_cv_type_uid_t=no
10996 fi
10997 rm -f conftest*
10998
10999 fi
11000
11001 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
11002 if test $ac_cv_type_uid_t = no; then
11003   cat >> confdefs.h <<\EOF
11004 #define uid_t int
11005 EOF
11006
11007   cat >> confdefs.h <<\EOF
11008 #define gid_t int
11009 EOF
11010
11011 fi
11012
11013 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
11014 echo "configure:11015: checking type of array argument to getgroups" >&5
11015 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
11016   echo $ac_n "(cached) $ac_c" 1>&6
11017 else
11018   if test "$cross_compiling" = yes; then
11019   ac_cv_type_getgroups=cross
11020 else
11021   cat > conftest.$ac_ext <<EOF
11022 #line 11023 "configure"
11023 #include "confdefs.h"
11024
11025 /* Thanks to Mike Rendell for this test.  */
11026 #include <sys/types.h>
11027 #define NGID 256
11028 #undef MAX
11029 #define MAX(x, y) ((x) > (y) ? (x) : (y))
11030 main()
11031 {
11032   gid_t gidset[NGID];
11033   int i, n;
11034   union { gid_t gval; long lval; }  val;
11035
11036   val.lval = -1;
11037   for (i = 0; i < NGID; i++)
11038     gidset[i] = val.gval;
11039   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11040                  gidset);
11041   /* Exit non-zero if getgroups seems to require an array of ints.  This
11042      happens when gid_t is short but getgroups modifies an array of ints.  */
11043   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
11044 }
11045
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11048 then
11049     ac_cv_type_getgroups=gid_t
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -fr conftest*
11054   ac_cv_type_getgroups=int
11055 fi
11056 rm -fr conftest*
11057 fi
11058
11059 if test $ac_cv_type_getgroups = cross; then
11060         cat > conftest.$ac_ext <<EOF
11061 #line 11062 "configure"
11062 #include "confdefs.h"
11063 #include <unistd.h>
11064 EOF
11065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11066   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
11067   rm -rf conftest*
11068   ac_cv_type_getgroups=gid_t
11069 else
11070   rm -rf conftest*
11071   ac_cv_type_getgroups=int
11072 fi
11073 rm -f conftest*
11074
11075 fi
11076 fi
11077
11078 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
11079 cat >> confdefs.h <<EOF
11080 #define GETGROUPS_T $ac_cv_type_getgroups
11081 EOF
11082
11083  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11084 echo "configure:11085: checking for ANSI C header files" >&5
11085 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   cat > conftest.$ac_ext <<EOF
11089 #line 11090 "configure"
11090 #include "confdefs.h"
11091 #include <stdlib.h>
11092 #include <stdarg.h>
11093 #include <string.h>
11094 #include <float.h>
11095 EOF
11096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11097 { (eval echo configure:11098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11099 if test -z "$ac_err"; then
11100   rm -rf conftest*
11101   ac_cv_header_stdc=yes
11102 else
11103   echo "$ac_err" >&5
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   ac_cv_header_stdc=no
11108 fi
11109 rm -f conftest*
11110
11111 if test $ac_cv_header_stdc = yes; then
11112   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11113 cat > conftest.$ac_ext <<EOF
11114 #line 11115 "configure"
11115 #include "confdefs.h"
11116 #include <string.h>
11117 EOF
11118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11119   egrep "memchr" >/dev/null 2>&1; then
11120   :
11121 else
11122   rm -rf conftest*
11123   ac_cv_header_stdc=no
11124 fi
11125 rm -f conftest*
11126
11127 fi
11128
11129 if test $ac_cv_header_stdc = yes; then
11130   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11131 cat > conftest.$ac_ext <<EOF
11132 #line 11133 "configure"
11133 #include "confdefs.h"
11134 #include <stdlib.h>
11135 EOF
11136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11137   egrep "free" >/dev/null 2>&1; then
11138   :
11139 else
11140   rm -rf conftest*
11141   ac_cv_header_stdc=no
11142 fi
11143 rm -f conftest*
11144
11145 fi
11146
11147 if test $ac_cv_header_stdc = yes; then
11148   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11149 if test "$cross_compiling" = yes; then
11150   :
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 #include <ctype.h>
11156 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11157 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11158 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11159 int main () { int i; for (i = 0; i < 256; i++)
11160 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11161 exit (0); }
11162
11163 EOF
11164 if { (eval echo configure:11165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11165 then
11166   :
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -fr conftest*
11171   ac_cv_header_stdc=no
11172 fi
11173 rm -fr conftest*
11174 fi
11175
11176 fi
11177 fi
11178
11179 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11180 if test $ac_cv_header_stdc = yes; then
11181   cat >> confdefs.h <<\EOF
11182 #define STDC_HEADERS 1
11183 EOF
11184
11185 fi
11186
11187 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11188 echo "configure:11189: checking for mode_t" >&5
11189 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
11190   echo $ac_n "(cached) $ac_c" 1>&6
11191 else
11192   cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 #include <sys/types.h>
11196 #if STDC_HEADERS
11197 #include <stdlib.h>
11198 #include <stddef.h>
11199 #endif
11200 EOF
11201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11202   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11203   rm -rf conftest*
11204   ac_cv_type_mode_t=yes
11205 else
11206   rm -rf conftest*
11207   ac_cv_type_mode_t=no
11208 fi
11209 rm -f conftest*
11210
11211 fi
11212 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
11213 if test $ac_cv_type_mode_t = no; then
11214   cat >> confdefs.h <<\EOF
11215 #define mode_t int
11216 EOF
11217
11218 fi
11219
11220 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11221 echo "configure:11222: checking for off_t" >&5
11222 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
11223   echo $ac_n "(cached) $ac_c" 1>&6
11224 else
11225   cat > conftest.$ac_ext <<EOF
11226 #line 11227 "configure"
11227 #include "confdefs.h"
11228 #include <sys/types.h>
11229 #if STDC_HEADERS
11230 #include <stdlib.h>
11231 #include <stddef.h>
11232 #endif
11233 EOF
11234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11235   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11236   rm -rf conftest*
11237   ac_cv_type_off_t=yes
11238 else
11239   rm -rf conftest*
11240   ac_cv_type_off_t=no
11241 fi
11242 rm -f conftest*
11243
11244 fi
11245 echo "$ac_t""$ac_cv_type_off_t" 1>&6
11246 if test $ac_cv_type_off_t = no; then
11247   cat >> confdefs.h <<\EOF
11248 #define off_t long
11249 EOF
11250
11251 fi
11252
11253 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11254 echo "configure:11255: checking for pid_t" >&5
11255 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 #include <sys/types.h>
11262 #if STDC_HEADERS
11263 #include <stdlib.h>
11264 #include <stddef.h>
11265 #endif
11266 EOF
11267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11268   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11269   rm -rf conftest*
11270   ac_cv_type_pid_t=yes
11271 else
11272   rm -rf conftest*
11273   ac_cv_type_pid_t=no
11274 fi
11275 rm -f conftest*
11276
11277 fi
11278 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
11279 if test $ac_cv_type_pid_t = no; then
11280   cat >> confdefs.h <<\EOF
11281 #define pid_t int
11282 EOF
11283
11284 fi
11285
11286 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11287 echo "configure:11288: checking for ptrdiff_t" >&5
11288 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 #include <stddef.h>
11295 int main() {
11296 ptrdiff_t p
11297 ; return 0; }
11298 EOF
11299 if { (eval echo configure:11300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11300   rm -rf conftest*
11301   am_cv_type_ptrdiff_t=yes
11302 else
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   am_cv_type_ptrdiff_t=no
11307 fi
11308 rm -f conftest*
11309 fi
11310
11311 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11312    if test $am_cv_type_ptrdiff_t = yes; then
11313      cat >> confdefs.h <<\EOF
11314 #define HAVE_PTRDIFF_T 1
11315 EOF
11316
11317    fi
11318
11319 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11320 echo "configure:11321: checking return type of signal handlers" >&5
11321 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
11322   echo $ac_n "(cached) $ac_c" 1>&6
11323 else
11324   cat > conftest.$ac_ext <<EOF
11325 #line 11326 "configure"
11326 #include "confdefs.h"
11327 #include <sys/types.h>
11328 #include <signal.h>
11329 #ifdef signal
11330 #undef signal
11331 #endif
11332 #ifdef __cplusplus
11333 extern "C" void (*signal (int, void (*)(int)))(int);
11334 #else
11335 void (*signal ()) ();
11336 #endif
11337
11338 int main() {
11339 int i;
11340 ; return 0; }
11341 EOF
11342 if { (eval echo configure:11343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11343   rm -rf conftest*
11344   ac_cv_type_signal=void
11345 else
11346   echo "configure: failed program was:" >&5
11347   cat conftest.$ac_ext >&5
11348   rm -rf conftest*
11349   ac_cv_type_signal=int
11350 fi
11351 rm -f conftest*
11352 fi
11353
11354 echo "$ac_t""$ac_cv_type_signal" 1>&6
11355 cat >> confdefs.h <<EOF
11356 #define RETSIGTYPE $ac_cv_type_signal
11357 EOF
11358
11359
11360 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11361 echo "configure:11362: checking for sig_atomic_t" >&5
11362 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
11363   echo $ac_n "(cached) $ac_c" 1>&6
11364 else
11365   cat > conftest.$ac_ext <<EOF
11366 #line 11367 "configure"
11367 #include "confdefs.h"
11368 #include <signal.h>
11369 int main() {
11370 sig_atomic_t atomic;
11371 ; return 0; }
11372 EOF
11373 if { (eval echo configure:11374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11374   rm -rf conftest*
11375   ol_cv_type_sig_atomic_t=yes
11376 else
11377   echo "configure: failed program was:" >&5
11378   cat conftest.$ac_ext >&5
11379   rm -rf conftest*
11380   ol_cv_type_sig_atomic_t=no
11381 fi
11382 rm -f conftest*
11383 fi
11384
11385 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11386   if test $ol_cv_type_sig_atomic_t = no; then
11387     cat >> confdefs.h <<\EOF
11388 #define sig_atomic_t int
11389 EOF
11390
11391   fi
11392  
11393 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11394 echo "configure:11395: checking for size_t" >&5
11395 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <sys/types.h>
11402 #if STDC_HEADERS
11403 #include <stdlib.h>
11404 #include <stddef.h>
11405 #endif
11406 EOF
11407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11408   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11409   rm -rf conftest*
11410   ac_cv_type_size_t=yes
11411 else
11412   rm -rf conftest*
11413   ac_cv_type_size_t=no
11414 fi
11415 rm -f conftest*
11416
11417 fi
11418 echo "$ac_t""$ac_cv_type_size_t" 1>&6
11419 if test $ac_cv_type_size_t = no; then
11420   cat >> confdefs.h <<\EOF
11421 #define size_t unsigned
11422 EOF
11423
11424 fi
11425
11426 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11427 echo "configure:11428: checking for socklen_t" >&5
11428 if eval "test \"`echo '$''{'ol_cv_type_socklen_t'+set}'`\" = set"; then
11429   echo $ac_n "(cached) $ac_c" 1>&6
11430 else
11431   cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434
11435 #ifdef HAVE_SYS_TYPES_H
11436 #include <sys/types.h>
11437 #endif
11438 #ifdef HAVE_SYS_SOCKET_H
11439 #include <sys/socket.h>
11440 #endif
11441
11442 int main() {
11443 socklen_t len;
11444 ; return 0; }
11445 EOF
11446 if { (eval echo configure:11447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11447   rm -rf conftest*
11448   ol_cv_type_socklen_t=yes
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   ol_cv_type_socklen_t=no
11454 fi
11455 rm -f conftest*
11456 fi
11457
11458 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11459   if test $ol_cv_type_socklen_t = no; then
11460     cat >> confdefs.h <<\EOF
11461 #define socklen_t int
11462 EOF
11463
11464   fi
11465  
11466 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11467 echo "configure:11468: checking for st_blksize in struct stat" >&5
11468 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 #include <sys/types.h>
11475 #include <sys/stat.h>
11476 int main() {
11477 struct stat s; s.st_blksize;
11478 ; return 0; }
11479 EOF
11480 if { (eval echo configure:11481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11481   rm -rf conftest*
11482   ac_cv_struct_st_blksize=yes
11483 else
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   ac_cv_struct_st_blksize=no
11488 fi
11489 rm -f conftest*
11490 fi
11491
11492 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
11493 if test $ac_cv_struct_st_blksize = yes; then
11494   cat >> confdefs.h <<\EOF
11495 #define HAVE_ST_BLKSIZE 1
11496 EOF
11497
11498 fi
11499
11500 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11501 echo "configure:11502: checking whether time.h and sys/time.h may both be included" >&5
11502 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <sys/types.h>
11509 #include <sys/time.h>
11510 #include <time.h>
11511 int main() {
11512 struct tm *tp;
11513 ; return 0; }
11514 EOF
11515 if { (eval echo configure:11516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11516   rm -rf conftest*
11517   ac_cv_header_time=yes
11518 else
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -rf conftest*
11522   ac_cv_header_time=no
11523 fi
11524 rm -f conftest*
11525 fi
11526
11527 echo "$ac_t""$ac_cv_header_time" 1>&6
11528 if test $ac_cv_header_time = yes; then
11529   cat >> confdefs.h <<\EOF
11530 #define TIME_WITH_SYS_TIME 1
11531 EOF
11532
11533 fi
11534
11535 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11536 echo "configure:11537: checking whether struct tm is in sys/time.h or time.h" >&5
11537 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
11538   echo $ac_n "(cached) $ac_c" 1>&6
11539 else
11540   cat > conftest.$ac_ext <<EOF
11541 #line 11542 "configure"
11542 #include "confdefs.h"
11543 #include <sys/types.h>
11544 #include <time.h>
11545 int main() {
11546 struct tm *tp; tp->tm_sec;
11547 ; return 0; }
11548 EOF
11549 if { (eval echo configure:11550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11550   rm -rf conftest*
11551   ac_cv_struct_tm=time.h
11552 else
11553   echo "configure: failed program was:" >&5
11554   cat conftest.$ac_ext >&5
11555   rm -rf conftest*
11556   ac_cv_struct_tm=sys/time.h
11557 fi
11558 rm -f conftest*
11559 fi
11560
11561 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11562 if test $ac_cv_struct_tm = sys/time.h; then
11563   cat >> confdefs.h <<\EOF
11564 #define TM_IN_SYS_TIME 1
11565 EOF
11566
11567 fi
11568
11569 # test for pw_gecos in struct passwd
11570 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11571 echo "configure:11572: checking struct passwd for pw_gecos" >&5
11572 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
11573   echo $ac_n "(cached) $ac_c" 1>&6
11574 else
11575   
11576         cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579 #include <pwd.h>
11580 int main() {
11581
11582         struct passwd pwd;
11583         pwd.pw_gecos = pwd.pw_name;
11584
11585 ; return 0; }
11586 EOF
11587 if { (eval echo configure:11588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11588   rm -rf conftest*
11589   ol_cv_struct_passwd_pw_gecos=yes
11590 else
11591   echo "configure: failed program was:" >&5
11592   cat conftest.$ac_ext >&5
11593   rm -rf conftest*
11594   ol_cv_struct_passwd_pw_gecos=no
11595 fi
11596 rm -f conftest*
11597 fi
11598
11599 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11600 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11601         cat >> confdefs.h <<\EOF
11602 #define HAVE_PW_GECOS 1
11603 EOF
11604
11605 fi
11606
11607 # test for pw_passwd in struct passwd
11608 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11609 echo "configure:11610: checking struct passwd for pw_passwd" >&5
11610 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
11611   echo $ac_n "(cached) $ac_c" 1>&6
11612 else
11613   
11614         cat > conftest.$ac_ext <<EOF
11615 #line 11616 "configure"
11616 #include "confdefs.h"
11617 #include <pwd.h>
11618 int main() {
11619
11620         struct passwd pwd;
11621         pwd.pw_passwd = pwd.pw_name;
11622
11623 ; return 0; }
11624 EOF
11625 if { (eval echo configure:11626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11626   rm -rf conftest*
11627   ol_cv_struct_passwd_pw_passwd=yes
11628 else
11629   echo "configure: failed program was:" >&5
11630   cat conftest.$ac_ext >&5
11631   rm -rf conftest*
11632   ol_cv_struct_passwd_pw_passwd=no
11633 fi
11634 rm -f conftest*
11635 fi
11636
11637 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11638 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11639         cat >> confdefs.h <<\EOF
11640 #define HAVE_PW_PASSWD 1
11641 EOF
11642
11643 fi
11644
11645
11646 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11647 echo "configure:11648: checking if toupper() requires islower()" >&5
11648 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   
11652         if test "$cross_compiling" = yes; then
11653   ol_cv_c_upper_lower=safe
11654 else
11655   cat > conftest.$ac_ext <<EOF
11656 #line 11657 "configure"
11657 #include "confdefs.h"
11658
11659 #include <ctype.h>
11660 main()
11661 {
11662         if ('C' == toupper('C'))
11663                 exit(0);
11664         else
11665                 exit(1);
11666 }
11667 EOF
11668 if { (eval echo configure:11669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11669 then
11670   ol_cv_c_upper_lower=no
11671 else
11672   echo "configure: failed program was:" >&5
11673   cat conftest.$ac_ext >&5
11674   rm -fr conftest*
11675   ol_cv_c_upper_lower=yes
11676 fi
11677 rm -fr conftest*
11678 fi
11679
11680 fi
11681
11682 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11683 if test $ol_cv_c_upper_lower != no ; then
11684         cat >> confdefs.h <<\EOF
11685 #define C_UPPER_LOWER 1
11686 EOF
11687
11688 fi
11689
11690 echo $ac_n "checking for working const""... $ac_c" 1>&6
11691 echo "configure:11692: checking for working const" >&5
11692 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698
11699 int main() {
11700
11701 /* Ultrix mips cc rejects this.  */
11702 typedef int charset[2]; const charset x;
11703 /* SunOS 4.1.1 cc rejects this.  */
11704 char const *const *ccp;
11705 char **p;
11706 /* NEC SVR4.0.2 mips cc rejects this.  */
11707 struct point {int x, y;};
11708 static struct point const zero = {0,0};
11709 /* AIX XL C 1.02.0.0 rejects this.
11710    It does not let you subtract one const X* pointer from another in an arm
11711    of an if-expression whose if-part is not a constant expression */
11712 const char *g = "string";
11713 ccp = &g + (g ? g-g : 0);
11714 /* HPUX 7.0 cc rejects these. */
11715 ++ccp;
11716 p = (char**) ccp;
11717 ccp = (char const *const *) p;
11718 { /* SCO 3.2v4 cc rejects this.  */
11719   char *t;
11720   char const *s = 0 ? (char *) 0 : (char const *) 0;
11721
11722   *t++ = 0;
11723 }
11724 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11725   int x[] = {25, 17};
11726   const int *foo = &x[0];
11727   ++foo;
11728 }
11729 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11730   typedef const int *iptr;
11731   iptr p = 0;
11732   ++p;
11733 }
11734 { /* AIX XL C 1.02.0.0 rejects this saying
11735      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11736   struct s { int j; const int *ap[3]; };
11737   struct s *b; b->j = 5;
11738 }
11739 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11740   const int foo = 10;
11741 }
11742
11743 ; return 0; }
11744 EOF
11745 if { (eval echo configure:11746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11746   rm -rf conftest*
11747   ac_cv_c_const=yes
11748 else
11749   echo "configure: failed program was:" >&5
11750   cat conftest.$ac_ext >&5
11751   rm -rf conftest*
11752   ac_cv_c_const=no
11753 fi
11754 rm -f conftest*
11755 fi
11756
11757 echo "$ac_t""$ac_cv_c_const" 1>&6
11758 if test $ac_cv_c_const = no; then
11759   cat >> confdefs.h <<\EOF
11760 #define const 
11761 EOF
11762
11763 fi
11764
11765 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11766 echo "configure:11767: checking if compiler understands volatile" >&5
11767 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
11768   echo $ac_n "(cached) $ac_c" 1>&6
11769 else
11770   cat > conftest.$ac_ext <<EOF
11771 #line 11772 "configure"
11772 #include "confdefs.h"
11773 int x, y, z;
11774 int main() {
11775 volatile int a; int * volatile b = x ? &y : &z;
11776       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11777       *b = 0;
11778 ; return 0; }
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11781   rm -rf conftest*
11782   ol_cv_c_volatile=yes
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   ol_cv_c_volatile=no
11788 fi
11789 rm -f conftest*
11790 fi
11791
11792 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11793   if test $ol_cv_c_volatile = yes; then
11794     : 
11795   else
11796     cat >> confdefs.h <<\EOF
11797 #define volatile 
11798 EOF
11799
11800   fi
11801  
11802
11803 if test $cross_compiling = yes ; then
11804         cat >> confdefs.h <<\EOF
11805 #define CROSS_COMPILING 1
11806 EOF
11807
11808
11809         cat >> confdefs.h <<\EOF
11810 #define LBER_INT_T long
11811 EOF
11812
11813         cat >> confdefs.h <<\EOF
11814 #define LBER_TAG_T long
11815 EOF
11816
11817         cat >> confdefs.h <<\EOF
11818 #define LBER_SOCKET_T int
11819 EOF
11820
11821
11822 else
11823         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11824 echo "configure:11825: checking whether byte ordering is bigendian" >&5
11825 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
11826   echo $ac_n "(cached) $ac_c" 1>&6
11827 else
11828   ac_cv_c_bigendian=unknown
11829 # See if sys/param.h defines the BYTE_ORDER macro.
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 #include <sys/types.h>
11834 #include <sys/param.h>
11835 int main() {
11836
11837 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11838  bogus endian macros
11839 #endif
11840 ; return 0; }
11841 EOF
11842 if { (eval echo configure:11843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11843   rm -rf conftest*
11844   # It does; now see whether it defined to BIG_ENDIAN or not.
11845 cat > conftest.$ac_ext <<EOF
11846 #line 11847 "configure"
11847 #include "confdefs.h"
11848 #include <sys/types.h>
11849 #include <sys/param.h>
11850 int main() {
11851
11852 #if BYTE_ORDER != BIG_ENDIAN
11853  not big endian
11854 #endif
11855 ; return 0; }
11856 EOF
11857 if { (eval echo configure:11858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11858   rm -rf conftest*
11859   ac_cv_c_bigendian=yes
11860 else
11861   echo "configure: failed program was:" >&5
11862   cat conftest.$ac_ext >&5
11863   rm -rf conftest*
11864   ac_cv_c_bigendian=no
11865 fi
11866 rm -f conftest*
11867 else
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870 fi
11871 rm -f conftest*
11872 if test $ac_cv_c_bigendian = unknown; then
11873 if test "$cross_compiling" = yes; then
11874     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11875 else
11876   cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 main () {
11880   /* Are we little or big endian?  From Harbison&Steele.  */
11881   union
11882   {
11883     long l;
11884     char c[sizeof (long)];
11885   } u;
11886   u.l = 1;
11887   exit (u.c[sizeof (long) - 1] == 1);
11888 }
11889 EOF
11890 if { (eval echo configure:11891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11891 then
11892   ac_cv_c_bigendian=no
11893 else
11894   echo "configure: failed program was:" >&5
11895   cat conftest.$ac_ext >&5
11896   rm -fr conftest*
11897   ac_cv_c_bigendian=yes
11898 fi
11899 rm -fr conftest*
11900 fi
11901
11902 fi
11903 fi
11904
11905 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11906 if test $ac_cv_c_bigendian = yes; then
11907   cat >> confdefs.h <<\EOF
11908 #define WORDS_BIGENDIAN 1
11909 EOF
11910
11911 fi
11912
11913         echo $ac_n "checking size of short""... $ac_c" 1>&6
11914 echo "configure:11915: checking size of short" >&5
11915 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
11916   echo $ac_n "(cached) $ac_c" 1>&6
11917 else
11918   if test "$cross_compiling" = yes; then
11919     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11920 else
11921   cat > conftest.$ac_ext <<EOF
11922 #line 11923 "configure"
11923 #include "confdefs.h"
11924 #include <stdio.h>
11925 main()
11926 {
11927   FILE *f=fopen("conftestval", "w");
11928   if (!f) exit(1);
11929   fprintf(f, "%d\n", sizeof(short));
11930   exit(0);
11931 }
11932 EOF
11933 if { (eval echo configure:11934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11934 then
11935   ac_cv_sizeof_short=`cat conftestval`
11936 else
11937   echo "configure: failed program was:" >&5
11938   cat conftest.$ac_ext >&5
11939   rm -fr conftest*
11940   ac_cv_sizeof_short=0
11941 fi
11942 rm -fr conftest*
11943 fi
11944
11945 fi
11946 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11947 cat >> confdefs.h <<EOF
11948 #define SIZEOF_SHORT $ac_cv_sizeof_short
11949 EOF
11950
11951  
11952         echo $ac_n "checking size of int""... $ac_c" 1>&6
11953 echo "configure:11954: checking size of int" >&5
11954 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
11955   echo $ac_n "(cached) $ac_c" 1>&6
11956 else
11957   if test "$cross_compiling" = yes; then
11958     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11959 else
11960   cat > conftest.$ac_ext <<EOF
11961 #line 11962 "configure"
11962 #include "confdefs.h"
11963 #include <stdio.h>
11964 main()
11965 {
11966   FILE *f=fopen("conftestval", "w");
11967   if (!f) exit(1);
11968   fprintf(f, "%d\n", sizeof(int));
11969   exit(0);
11970 }
11971 EOF
11972 if { (eval echo configure:11973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11973 then
11974   ac_cv_sizeof_int=`cat conftestval`
11975 else
11976   echo "configure: failed program was:" >&5
11977   cat conftest.$ac_ext >&5
11978   rm -fr conftest*
11979   ac_cv_sizeof_int=0
11980 fi
11981 rm -fr conftest*
11982 fi
11983
11984 fi
11985 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11986 cat >> confdefs.h <<EOF
11987 #define SIZEOF_INT $ac_cv_sizeof_int
11988 EOF
11989
11990  
11991         echo $ac_n "checking size of long""... $ac_c" 1>&6
11992 echo "configure:11993: checking size of long" >&5
11993 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
11994   echo $ac_n "(cached) $ac_c" 1>&6
11995 else
11996   if test "$cross_compiling" = yes; then
11997     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11998 else
11999   cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 #include <stdio.h>
12003 main()
12004 {
12005   FILE *f=fopen("conftestval", "w");
12006   if (!f) exit(1);
12007   fprintf(f, "%d\n", sizeof(long));
12008   exit(0);
12009 }
12010 EOF
12011 if { (eval echo configure:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12012 then
12013   ac_cv_sizeof_long=`cat conftestval`
12014 else
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -fr conftest*
12018   ac_cv_sizeof_long=0
12019 fi
12020 rm -fr conftest*
12021 fi
12022
12023 fi
12024 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
12025 cat >> confdefs.h <<EOF
12026 #define SIZEOF_LONG $ac_cv_sizeof_long
12027 EOF
12028
12029
12030
12031         if test "$ac_cv_sizeof_int" -lt 4 ; then
12032                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
12033
12034                 cat >> confdefs.h <<\EOF
12035 #define LBER_INT_T long
12036 EOF
12037
12038                 cat >> confdefs.h <<\EOF
12039 #define LBER_TAG_T long
12040 EOF
12041
12042                 cat >> confdefs.h <<\EOF
12043 #define LBER_SOCKET_T int
12044 EOF
12045
12046         else
12047                 cat >> confdefs.h <<\EOF
12048 #define LBER_INT_T int
12049 EOF
12050
12051                 cat >> confdefs.h <<\EOF
12052 #define LBER_TAG_T long
12053 EOF
12054
12055                 cat >> confdefs.h <<\EOF
12056 #define LBER_SOCKET_T int
12057 EOF
12058
12059         fi
12060 fi
12061
12062 cat >> confdefs.h <<\EOF
12063 #define LBER_LEN_T long
12064 EOF
12065
12066
12067 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
12068 echo "configure:12069: checking for 8-bit clean memcmp" >&5
12069 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
12070   echo $ac_n "(cached) $ac_c" 1>&6
12071 else
12072   if test "$cross_compiling" = yes; then
12073   ac_cv_func_memcmp_clean=no
12074 else
12075   cat > conftest.$ac_ext <<EOF
12076 #line 12077 "configure"
12077 #include "confdefs.h"
12078
12079 main()
12080 {
12081   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
12082   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
12083 }
12084
12085 EOF
12086 if { (eval echo configure:12087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12087 then
12088   ac_cv_func_memcmp_clean=yes
12089 else
12090   echo "configure: failed program was:" >&5
12091   cat conftest.$ac_ext >&5
12092   rm -fr conftest*
12093   ac_cv_func_memcmp_clean=no
12094 fi
12095 rm -fr conftest*
12096 fi
12097
12098 fi
12099
12100 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
12101 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
12102
12103 echo $ac_n "checking for strftime""... $ac_c" 1>&6
12104 echo "configure:12105: checking for strftime" >&5
12105 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
12106   echo $ac_n "(cached) $ac_c" 1>&6
12107 else
12108   cat > conftest.$ac_ext <<EOF
12109 #line 12110 "configure"
12110 #include "confdefs.h"
12111 /* System header to define __stub macros and hopefully few prototypes,
12112     which can conflict with char strftime(); below.  */
12113 #include <assert.h>
12114 /* Override any gcc2 internal prototype to avoid an error.  */
12115 /* We use char because int might match the return type of a gcc2
12116     builtin and then its argument prototype would still apply.  */
12117 char strftime();
12118
12119 int main() {
12120
12121 /* The GNU C library defines this for functions which it implements
12122     to always fail with ENOSYS.  Some functions are actually named
12123     something starting with __ and the normal name is an alias.  */
12124 #if defined (__stub_strftime) || defined (__stub___strftime)
12125 choke me
12126 #else
12127 strftime();
12128 #endif
12129
12130 ; return 0; }
12131 EOF
12132 if { (eval echo configure:12133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12133   rm -rf conftest*
12134   eval "ac_cv_func_strftime=yes"
12135 else
12136   echo "configure: failed program was:" >&5
12137   cat conftest.$ac_ext >&5
12138   rm -rf conftest*
12139   eval "ac_cv_func_strftime=no"
12140 fi
12141 rm -f conftest*
12142 fi
12143
12144 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12145   echo "$ac_t""yes" 1>&6
12146   cat >> confdefs.h <<\EOF
12147 #define HAVE_STRFTIME 1
12148 EOF
12149
12150 else
12151   echo "$ac_t""no" 1>&6
12152 # strftime is in -lintl on SCO UNIX.
12153 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12154 echo "configure:12155: checking for strftime in -lintl" >&5
12155 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
12156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12157   echo $ac_n "(cached) $ac_c" 1>&6
12158 else
12159   ac_save_LIBS="$LIBS"
12160 LIBS="-lintl  $LIBS"
12161 cat > conftest.$ac_ext <<EOF
12162 #line 12163 "configure"
12163 #include "confdefs.h"
12164 /* Override any gcc2 internal prototype to avoid an error.  */
12165 /* We use char because int might match the return type of a gcc2
12166     builtin and then its argument prototype would still apply.  */
12167 char strftime();
12168
12169 int main() {
12170 strftime()
12171 ; return 0; }
12172 EOF
12173 if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12174   rm -rf conftest*
12175   eval "ac_cv_lib_$ac_lib_var=yes"
12176 else
12177   echo "configure: failed program was:" >&5
12178   cat conftest.$ac_ext >&5
12179   rm -rf conftest*
12180   eval "ac_cv_lib_$ac_lib_var=no"
12181 fi
12182 rm -f conftest*
12183 LIBS="$ac_save_LIBS"
12184
12185 fi
12186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12187   echo "$ac_t""yes" 1>&6
12188   cat >> confdefs.h <<\EOF
12189 #define HAVE_STRFTIME 1
12190 EOF
12191
12192 LIBS="-lintl $LIBS"
12193 else
12194   echo "$ac_t""no" 1>&6
12195 fi
12196
12197 fi
12198
12199
12200 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12201 echo "configure:12202: checking for inet_aton()" >&5
12202 if eval "test \"`echo '$''{'ol_cv_func_inet_aton'+set}'`\" = set"; then
12203   echo $ac_n "(cached) $ac_c" 1>&6
12204 else
12205   cat > conftest.$ac_ext <<EOF
12206 #line 12207 "configure"
12207 #include "confdefs.h"
12208
12209 #ifdef HAVE_SYS_TYPES_H
12210 #       include <sys/types.h>
12211 #endif
12212 #ifdef HAVE_SYS_SOCKET_H
12213 #       include <sys/socket.h>
12214 #       ifdef HAVE_SYS_SELECT_H
12215 #               include <sys/select.h>
12216 #       endif
12217 #       include <netinet/in.h>
12218 #       ifdef HAVE_ARPA_INET_H
12219 #               include <arpa/inet.h>
12220 #       endif
12221 #endif
12222
12223 int main() {
12224 struct in_addr in;
12225 int rc = inet_aton( "255.255.255.255", &in );
12226 ; return 0; }
12227 EOF
12228 if { (eval echo configure:12229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12229   rm -rf conftest*
12230   ol_cv_func_inet_aton=yes
12231 else
12232   echo "configure: failed program was:" >&5
12233   cat conftest.$ac_ext >&5
12234   rm -rf conftest*
12235   ol_cv_func_inet_aton=no
12236 fi
12237 rm -f conftest*
12238 fi
12239
12240 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12241   if test $ol_cv_func_inet_aton != no; then
12242     cat >> confdefs.h <<\EOF
12243 #define HAVE_INET_ATON 1
12244 EOF
12245
12246   fi
12247  
12248
12249 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12250 echo "configure:12251: checking for vprintf" >&5
12251 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
12252   echo $ac_n "(cached) $ac_c" 1>&6
12253 else
12254   cat > conftest.$ac_ext <<EOF
12255 #line 12256 "configure"
12256 #include "confdefs.h"
12257 /* System header to define __stub macros and hopefully few prototypes,
12258     which can conflict with char vprintf(); below.  */
12259 #include <assert.h>
12260 /* Override any gcc2 internal prototype to avoid an error.  */
12261 /* We use char because int might match the return type of a gcc2
12262     builtin and then its argument prototype would still apply.  */
12263 char vprintf();
12264
12265 int main() {
12266
12267 /* The GNU C library defines this for functions which it implements
12268     to always fail with ENOSYS.  Some functions are actually named
12269     something starting with __ and the normal name is an alias.  */
12270 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12271 choke me
12272 #else
12273 vprintf();
12274 #endif
12275
12276 ; return 0; }
12277 EOF
12278 if { (eval echo configure:12279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12279   rm -rf conftest*
12280   eval "ac_cv_func_vprintf=yes"
12281 else
12282   echo "configure: failed program was:" >&5
12283   cat conftest.$ac_ext >&5
12284   rm -rf conftest*
12285   eval "ac_cv_func_vprintf=no"
12286 fi
12287 rm -f conftest*
12288 fi
12289
12290 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12291   echo "$ac_t""yes" 1>&6
12292   cat >> confdefs.h <<\EOF
12293 #define HAVE_VPRINTF 1
12294 EOF
12295
12296 else
12297   echo "$ac_t""no" 1>&6
12298 fi
12299
12300 if test "$ac_cv_func_vprintf" != yes; then
12301 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12302 echo "configure:12303: checking for _doprnt" >&5
12303 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
12304   echo $ac_n "(cached) $ac_c" 1>&6
12305 else
12306   cat > conftest.$ac_ext <<EOF
12307 #line 12308 "configure"
12308 #include "confdefs.h"
12309 /* System header to define __stub macros and hopefully few prototypes,
12310     which can conflict with char _doprnt(); below.  */
12311 #include <assert.h>
12312 /* Override any gcc2 internal prototype to avoid an error.  */
12313 /* We use char because int might match the return type of a gcc2
12314     builtin and then its argument prototype would still apply.  */
12315 char _doprnt();
12316
12317 int main() {
12318
12319 /* The GNU C library defines this for functions which it implements
12320     to always fail with ENOSYS.  Some functions are actually named
12321     something starting with __ and the normal name is an alias.  */
12322 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12323 choke me
12324 #else
12325 _doprnt();
12326 #endif
12327
12328 ; return 0; }
12329 EOF
12330 if { (eval echo configure:12331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12331   rm -rf conftest*
12332   eval "ac_cv_func__doprnt=yes"
12333 else
12334   echo "configure: failed program was:" >&5
12335   cat conftest.$ac_ext >&5
12336   rm -rf conftest*
12337   eval "ac_cv_func__doprnt=no"
12338 fi
12339 rm -f conftest*
12340 fi
12341
12342 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12343   echo "$ac_t""yes" 1>&6
12344   cat >> confdefs.h <<\EOF
12345 #define HAVE_DOPRNT 1
12346 EOF
12347
12348 else
12349   echo "$ac_t""no" 1>&6
12350 fi
12351
12352 fi
12353
12354
12355 if test $ac_cv_func_vprintf = yes ; then
12356                 for ac_func in vsnprintf vsprintf
12357 do
12358 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12359 echo "configure:12360: checking for $ac_func" >&5
12360 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12361   echo $ac_n "(cached) $ac_c" 1>&6
12362 else
12363   cat > conftest.$ac_ext <<EOF
12364 #line 12365 "configure"
12365 #include "confdefs.h"
12366 /* System header to define __stub macros and hopefully few prototypes,
12367     which can conflict with char $ac_func(); below.  */
12368 #include <assert.h>
12369 /* Override any gcc2 internal prototype to avoid an error.  */
12370 /* We use char because int might match the return type of a gcc2
12371     builtin and then its argument prototype would still apply.  */
12372 char $ac_func();
12373
12374 int main() {
12375
12376 /* The GNU C library defines this for functions which it implements
12377     to always fail with ENOSYS.  Some functions are actually named
12378     something starting with __ and the normal name is an alias.  */
12379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12380 choke me
12381 #else
12382 $ac_func();
12383 #endif
12384
12385 ; return 0; }
12386 EOF
12387 if { (eval echo configure:12388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12388   rm -rf conftest*
12389   eval "ac_cv_func_$ac_func=yes"
12390 else
12391   echo "configure: failed program was:" >&5
12392   cat conftest.$ac_ext >&5
12393   rm -rf conftest*
12394   eval "ac_cv_func_$ac_func=no"
12395 fi
12396 rm -f conftest*
12397 fi
12398
12399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12400   echo "$ac_t""yes" 1>&6
12401     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12402   cat >> confdefs.h <<EOF
12403 #define $ac_tr_func 1
12404 EOF
12405  
12406 else
12407   echo "$ac_t""no" 1>&6
12408 fi
12409 done
12410
12411 fi
12412
12413 for ac_func in \
12414         bcopy                   \
12415         closesocket             \
12416         endgrent                \
12417         endpwent                \
12418         flock                   \
12419         getdtablesize   \
12420         getgrgid                \
12421         gethostname             \
12422         getpass                 \
12423         getpwuid                \
12424         getpwnam                \
12425         getspnam                \
12426         gettimeofday    \
12427         initgroups              \
12428         lockf                   \
12429         memcpy                  \
12430         memmove                 \
12431         mkstemp                 \
12432         read                    \
12433         recv                    \
12434         recvfrom                \
12435         setpwfile               \
12436         setgid                  \
12437         setegid                 \
12438         setsid                  \
12439         setuid                  \
12440         seteuid                 \
12441         signal                  \
12442         sigset                  \
12443         snprintf                \
12444         strdup                  \
12445         strerror                \
12446         strpbrk                 \
12447         strrchr                 \
12448         strsep                  \
12449         strstr                  \
12450         strtol                  \
12451         strtoul                 \
12452         strspn                  \
12453         sysconf                 \
12454         waitpid                 \
12455         wait4                   \
12456         write                   \
12457         send                    \
12458         sendto                  \
12459
12460 do
12461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12462 echo "configure:12463: checking for $ac_func" >&5
12463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12464   echo $ac_n "(cached) $ac_c" 1>&6
12465 else
12466   cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 /* System header to define __stub macros and hopefully few prototypes,
12470     which can conflict with char $ac_func(); below.  */
12471 #include <assert.h>
12472 /* Override any gcc2 internal prototype to avoid an error.  */
12473 /* We use char because int might match the return type of a gcc2
12474     builtin and then its argument prototype would still apply.  */
12475 char $ac_func();
12476
12477 int main() {
12478
12479 /* The GNU C library defines this for functions which it implements
12480     to always fail with ENOSYS.  Some functions are actually named
12481     something starting with __ and the normal name is an alias.  */
12482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12483 choke me
12484 #else
12485 $ac_func();
12486 #endif
12487
12488 ; return 0; }
12489 EOF
12490 if { (eval echo configure:12491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12491   rm -rf conftest*
12492   eval "ac_cv_func_$ac_func=yes"
12493 else
12494   echo "configure: failed program was:" >&5
12495   cat conftest.$ac_ext >&5
12496   rm -rf conftest*
12497   eval "ac_cv_func_$ac_func=no"
12498 fi
12499 rm -f conftest*
12500 fi
12501
12502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12503   echo "$ac_t""yes" 1>&6
12504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12505   cat >> confdefs.h <<EOF
12506 #define $ac_tr_func 1
12507 EOF
12508  
12509 else
12510   echo "$ac_t""no" 1>&6
12511 fi
12512 done
12513
12514
12515 for ac_func in getopt tempnam
12516 do
12517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12518 echo "configure:12519: checking for $ac_func" >&5
12519 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12520   echo $ac_n "(cached) $ac_c" 1>&6
12521 else
12522   cat > conftest.$ac_ext <<EOF
12523 #line 12524 "configure"
12524 #include "confdefs.h"
12525 /* System header to define __stub macros and hopefully few prototypes,
12526     which can conflict with char $ac_func(); below.  */
12527 #include <assert.h>
12528 /* Override any gcc2 internal prototype to avoid an error.  */
12529 /* We use char because int might match the return type of a gcc2
12530     builtin and then its argument prototype would still apply.  */
12531 char $ac_func();
12532
12533 int main() {
12534
12535 /* The GNU C library defines this for functions which it implements
12536     to always fail with ENOSYS.  Some functions are actually named
12537     something starting with __ and the normal name is an alias.  */
12538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12539 choke me
12540 #else
12541 $ac_func();
12542 #endif
12543
12544 ; return 0; }
12545 EOF
12546 if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12547   rm -rf conftest*
12548   eval "ac_cv_func_$ac_func=yes"
12549 else
12550   echo "configure: failed program was:" >&5
12551   cat conftest.$ac_ext >&5
12552   rm -rf conftest*
12553   eval "ac_cv_func_$ac_func=no"
12554 fi
12555 rm -f conftest*
12556 fi
12557
12558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12559   echo "$ac_t""yes" 1>&6
12560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12561   cat >> confdefs.h <<EOF
12562 #define $ac_tr_func 1
12563 EOF
12564  
12565 else
12566   echo "$ac_t""no" 1>&6
12567 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12568 fi
12569 done
12570
12571
12572
12573 # Check Configuration
12574 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12575 echo "configure:12576: checking declaration of sys_errlist" >&5
12576 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
12577   echo $ac_n "(cached) $ac_c" 1>&6
12578 else
12579   
12580         cat > conftest.$ac_ext <<EOF
12581 #line 12582 "configure"
12582 #include "confdefs.h"
12583
12584 #include <stdio.h>
12585 #include <sys/types.h>
12586 #include <errno.h> 
12587 int main() {
12588 char *c = (char *) *sys_errlist
12589 ; return 0; }
12590 EOF
12591 if { (eval echo configure:12592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12592   rm -rf conftest*
12593   ol_cv_dcl_sys_errlist=yes
12594         ol_cv_have_sys_errlist=yes
12595 else
12596   echo "configure: failed program was:" >&5
12597   cat conftest.$ac_ext >&5
12598   rm -rf conftest*
12599   ol_cv_dcl_sys_errlist=no
12600 fi
12601 rm -f conftest*
12602 fi
12603
12604 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12605 #
12606 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12607 if test $ol_cv_dcl_sys_errlist = no ; then
12608         cat >> confdefs.h <<\EOF
12609 #define DECL_SYS_ERRLIST 1
12610 EOF
12611
12612
12613         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12614 echo "configure:12615: checking existence of sys_errlist" >&5
12615 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
12616   echo $ac_n "(cached) $ac_c" 1>&6
12617 else
12618   
12619                 cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 #include <errno.h>
12623 int main() {
12624 char *c = (char *) *sys_errlist
12625 ; return 0; }
12626 EOF
12627 if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12628   rm -rf conftest*
12629   ol_cv_have_sys_errlist=yes
12630 else
12631   echo "configure: failed program was:" >&5
12632   cat conftest.$ac_ext >&5
12633   rm -rf conftest*
12634   ol_cv_have_sys_errlist=no
12635 fi
12636 rm -f conftest*
12637 fi
12638
12639 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12640 fi
12641 if test $ol_cv_have_sys_errlist = yes ; then
12642         cat >> confdefs.h <<\EOF
12643 #define HAVE_SYS_ERRLIST 1
12644 EOF
12645
12646 fi
12647
12648
12649
12650 if test "$ol_enable_debug" != no ; then
12651         cat >> confdefs.h <<\EOF
12652 #define LDAP_DEBUG 1
12653 EOF
12654
12655 fi
12656 if test "$ol_enable_syslog" = yes ; then
12657         cat >> confdefs.h <<\EOF
12658 #define LDAP_SYSLOG 1
12659 EOF
12660
12661 fi
12662 if test "$ol_enable_libui" = yes ; then
12663         cat >> confdefs.h <<\EOF
12664 #define LDAP_LIBUI 1
12665 EOF
12666
12667 fi
12668 if test "$ol_enable_cache" = no ; then
12669         cat >> confdefs.h <<\EOF
12670 #define LDAP_NOCACHE 1
12671 EOF
12672
12673 fi
12674 if test "$ol_enable_dns" != no ; then
12675         cat >> confdefs.h <<\EOF
12676 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12677 EOF
12678
12679 fi
12680 if test "$ol_enable_proctitle" != no ; then
12681         cat >> confdefs.h <<\EOF
12682 #define LDAP_PROCTITLE 1
12683 EOF
12684
12685 fi
12686 if test "$ol_enable_referrals" != no ; then
12687         cat >> confdefs.h <<\EOF
12688 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12689 EOF
12690
12691 fi
12692 if test "$ol_enable_cldap" != no ; then
12693         cat >> confdefs.h <<\EOF
12694 #define LDAP_CONNECTIONLESS 1
12695 EOF
12696
12697 fi
12698
12699 if test "$ol_enable_crypt" != no ; then
12700         cat >> confdefs.h <<\EOF
12701 #define SLAPD_CRYPT 1
12702 EOF
12703
12704 fi
12705 if test "$ol_enable_cleartext" != no ; then
12706         cat >> confdefs.h <<\EOF
12707 #define SLAPD_CLEARTEXT 1
12708 EOF
12709
12710 fi
12711 if test "$ol_enable_multimaster" != no ; then
12712         cat >> confdefs.h <<\EOF
12713 #define SLAPD_MULTIMASTER 1
12714 EOF
12715
12716 fi
12717 if test "$ol_enable_phonetic" != no ; then
12718         cat >> confdefs.h <<\EOF
12719 #define SLAPD_PHONETIC 1
12720 EOF
12721
12722 fi
12723 if test "$ol_enable_rlookups" != no ; then
12724         cat >> confdefs.h <<\EOF
12725 #define SLAPD_RLOOKUPS 1
12726 EOF
12727
12728 fi
12729
12730 if test "$ol_link_modules" != no ; then
12731         cat >> confdefs.h <<\EOF
12732 #define SLAPD_MODULES 1
12733 EOF
12734
12735         BUILD_SLAPD=yes
12736         MODULES_LIBS=-lltdl
12737         SLAPD_MODULES_LDFLAGS="-dlopen self"
12738 fi
12739
12740 if test "$ol_link_bdb2" != no ; then
12741         cat >> confdefs.h <<\EOF
12742 #define SLAPD_BDB2 1
12743 EOF
12744
12745         BUILD_SLAPD=yes
12746         BUILD_BDB2=yes
12747         if test "$ol_with_bdb2_module" != static ; then
12748                 cat >> confdefs.h <<\EOF
12749 #define SLAPD_BDB2_DYNAMIC 1
12750 EOF
12751
12752                 BUILD_BDB2=mod
12753                 BUILD_BDB2_DYNAMIC=shared
12754                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
12755         fi
12756 fi
12757
12758 if test "$ol_enable_ldap" != no ; then
12759         cat >> confdefs.h <<\EOF
12760 #define SLAPD_LDAP 1
12761 EOF
12762
12763         BUILD_SLAPD=yes
12764         BUILD_LDAP=yes
12765         if test "$ol_with_ldap_module" != static ; then
12766                 cat >> confdefs.h <<\EOF
12767 #define SLAPD_LDAP_DYNAMIC 1
12768 EOF
12769
12770                 BUILD_LDAP=mod
12771                 BUILD_LDAP_DYNAMIC=shared
12772                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
12773         fi
12774 fi
12775
12776 if test "$ol_link_ldbm" != no ; then
12777         cat >> confdefs.h <<\EOF
12778 #define SLAPD_LDBM 1
12779 EOF
12780
12781         BUILD_SLAPD=yes
12782         BUILD_LDBM=yes
12783         if test "$ol_with_ldbm_module" != static ; then
12784                 cat >> confdefs.h <<\EOF
12785 #define SLAPD_LDBM_DYNAMIC 1
12786 EOF
12787
12788                 BUILD_LDBM=mod
12789                 BUILD_LDBM_DYNAMIC=shared
12790                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
12791         fi
12792 fi
12793
12794 if test "$ol_enable_passwd" != no ; then
12795         cat >> confdefs.h <<\EOF
12796 #define SLAPD_PASSWD 1
12797 EOF
12798
12799         BUILD_SLAPD=yes
12800         BUILD_PASSWD=yes
12801         if test "$ol_with_passwd_module" != static ; then
12802                 cat >> confdefs.h <<\EOF
12803 #define SLAPD_PASSWD_DYNAMIC 1
12804 EOF
12805
12806                 BUILD_PASSWD=mod
12807                 BUILD_PASSWD_DYNAMIC=shared
12808                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
12809         fi
12810 fi
12811
12812 if test "$ol_link_perl" != no ; then
12813         cat >> confdefs.h <<\EOF
12814 #define SLAPD_PERL 1
12815 EOF
12816
12817         BUILD_SLAPD=yes
12818         BUILD_PERL=yes
12819         if test "$ol_with_perl_module" != static ; then
12820                 cat >> confdefs.h <<\EOF
12821 #define SLAPD_PERL_DYNAMIC 1
12822 EOF
12823
12824                 BUILD_PERL=mod
12825                 BUILD_PERL_DYNAMIC=shared
12826                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
12827         fi
12828 fi
12829
12830 if test "$ol_enable_shell" != no ; then
12831         cat >> confdefs.h <<\EOF
12832 #define SLAPD_SHELL 1
12833 EOF
12834
12835         BUILD_SLAPD=yes
12836         BUILD_SHELL=yes
12837         if test "$ol_with_shell_module" != static ; then
12838                 cat >> confdefs.h <<\EOF
12839 #define SLAPD_SHELL_DYNAMIC 1
12840 EOF
12841
12842                 BUILD_SHELL=mod
12843                 BUILD_SHELL_DYNAMIC=shared
12844                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
12845         fi
12846 fi
12847
12848 if test "$ol_enable_tcl" != no ; then
12849         cat >> confdefs.h <<\EOF
12850 #define SLAPD_TCL 1
12851 EOF
12852
12853         BUILD_SLAPD=yes
12854         BUILD_TCL=yes
12855         if test "$ol_with_tcl_module" != static; then
12856                 cat >> confdefs.h <<\EOF
12857 #define SLAPD_TCL_DYNAMIC 1
12858 EOF
12859
12860                 BUILD_TCL=mod
12861                 BUILD_TCL_DYNAMIC=shared
12862                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
12863         fi
12864 fi
12865
12866 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12867         $BUILD_SLAPD = yes ; then
12868         BUILD_SLURPD=yes
12869 fi
12870
12871 if test "$ol_link_isode" != no ; then
12872         BUILD_LDAPD=yes
12873 fi
12874
12875
12876
12877
12878   
12879   
12880   
12881   
12882   
12883   
12884   
12885   
12886   
12887   
12888   
12889   
12890   
12891   
12892   
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919 trap '' 1 2 15
12920
12921 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12922
12923 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12924 # Let make expand exec_prefix.
12925 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12926
12927 # Any assignment to VPATH causes Sun make to only execute
12928 # the first set of double-colon rules, so remove it if not needed.
12929 # If there is a colon in the path, we need to keep it.
12930 if test "x$srcdir" = x.; then
12931   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12932 fi
12933
12934 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12935
12936 DEFS=-DHAVE_CONFIG_H
12937
12938 # Without the "./", some shells look in PATH for config.status.
12939 : ${CONFIG_STATUS=./config.status}
12940
12941 echo creating $CONFIG_STATUS
12942 rm -f $CONFIG_STATUS
12943 cat > $CONFIG_STATUS <<EOF
12944 #! /bin/sh
12945 # Generated automatically by configure.
12946 # Run this file to recreate the current configuration.
12947 # This directory was configured as follows,
12948 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12949 #
12950 # $0 $ac_configure_args
12951 #
12952 # Compiler output produced by configure, useful for debugging
12953 # configure, is in ./config.log if it exists.
12954
12955 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12956 for ac_option
12957 do
12958   case "\$ac_option" in
12959   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12960     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12961     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12962   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12963     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12964     exit 0 ;;
12965   -help | --help | --hel | --he | --h)
12966     echo "\$ac_cs_usage"; exit 0 ;;
12967   *) echo "\$ac_cs_usage"; exit 1 ;;
12968   esac
12969 done
12970
12971 ac_given_srcdir=$srcdir
12972 ac_given_INSTALL="$INSTALL"
12973
12974 trap 'rm -fr `echo "\
12975 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12976 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12977 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12978 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12979 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12980 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12981 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12982 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12983 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12984 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12985 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12986 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12987 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12988 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12989 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12990 include/Makefile:build/top.mk:include/Makefile.in \
12991 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12992 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12993 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12994 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12995 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12996 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12997 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12998 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12999 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13000 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13001 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13002 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13003 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13004 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13005 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13006 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13007 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13008 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13009 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13010 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13011 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13012 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13013 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13014 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13015 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13016 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13017  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13018 EOF
13019 cat >> $CONFIG_STATUS <<EOF
13020
13021 # Protect against being on the right side of a sed subst in config.status.
13022 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13023  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13024 $ac_vpsub
13025 $extrasub
13026 s%@SHELL@%$SHELL%g
13027 s%@CFLAGS@%$CFLAGS%g
13028 s%@CPPFLAGS@%$CPPFLAGS%g
13029 s%@CXXFLAGS@%$CXXFLAGS%g
13030 s%@FFLAGS@%$FFLAGS%g
13031 s%@DEFS@%$DEFS%g
13032 s%@LDFLAGS@%$LDFLAGS%g
13033 s%@LIBS@%$LIBS%g
13034 s%@exec_prefix@%$exec_prefix%g
13035 s%@prefix@%$prefix%g
13036 s%@program_transform_name@%$program_transform_name%g
13037 s%@bindir@%$bindir%g
13038 s%@sbindir@%$sbindir%g
13039 s%@libexecdir@%$libexecdir%g
13040 s%@datadir@%$datadir%g
13041 s%@sysconfdir@%$sysconfdir%g
13042 s%@sharedstatedir@%$sharedstatedir%g
13043 s%@localstatedir@%$localstatedir%g
13044 s%@libdir@%$libdir%g
13045 s%@includedir@%$includedir%g
13046 s%@oldincludedir@%$oldincludedir%g
13047 s%@infodir@%$infodir%g
13048 s%@mandir@%$mandir%g
13049 s%@host@%$host%g
13050 s%@host_alias@%$host_alias%g
13051 s%@host_cpu@%$host_cpu%g
13052 s%@host_vendor@%$host_vendor%g
13053 s%@host_os@%$host_os%g
13054 s%@target@%$target%g
13055 s%@target_alias@%$target_alias%g
13056 s%@target_cpu@%$target_cpu%g
13057 s%@target_vendor@%$target_vendor%g
13058 s%@target_os@%$target_os%g
13059 s%@build@%$build%g
13060 s%@build_alias@%$build_alias%g
13061 s%@build_cpu@%$build_cpu%g
13062 s%@build_vendor@%$build_vendor%g
13063 s%@build_os@%$build_os%g
13064 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13065 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13066 s%@INSTALL_DATA@%$INSTALL_DATA%g
13067 s%@PACKAGE@%$PACKAGE%g
13068 s%@VERSION@%$VERSION%g
13069 s%@ACLOCAL@%$ACLOCAL%g
13070 s%@AUTOCONF@%$AUTOCONF%g
13071 s%@AUTOMAKE@%$AUTOMAKE%g
13072 s%@AUTOHEADER@%$AUTOHEADER%g
13073 s%@MAKEINFO@%$MAKEINFO%g
13074 s%@install_sh@%$install_sh%g
13075 s%@AMTAR@%$AMTAR%g
13076 s%@AWK@%$AWK%g
13077 s%@AMTARFLAGS@%$AMTARFLAGS%g
13078 s%@SET_MAKE@%$SET_MAKE%g
13079 s%@top_builddir@%$top_builddir%g
13080 s%@ldap_subdir@%$ldap_subdir%g
13081 s%@CC@%$CC%g
13082 s%@RANLIB@%$RANLIB%g
13083 s%@LD@%$LD%g
13084 s%@NM@%$NM%g
13085 s%@LN_S@%$LN_S%g
13086 s%@LIBTOOL@%$LIBTOOL%g
13087 s%@LN_H@%$LN_H%g
13088 s%@SENDMAIL@%$SENDMAIL%g
13089 s%@EDITOR@%$EDITOR%g
13090 s%@FINGER@%$FINGER%g
13091 s%@PERLBIN@%$PERLBIN%g
13092 s%@CPP@%$CPP%g
13093 s%@EXEEXT@%$EXEEXT%g
13094 s%@OBJEXT@%$OBJEXT%g
13095 s%@OL_MKDEP@%$OL_MKDEP%g
13096 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
13097 s%@PEPSY@%$PEPSY%g
13098 s%@LIBOBJS@%$LIBOBJS%g
13099 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
13100 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
13101 s%@BUILD_BDB2@%$BUILD_BDB2%g
13102 s%@BUILD_LDAP@%$BUILD_LDAP%g
13103 s%@BUILD_LDBM@%$BUILD_LDBM%g
13104 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
13105 s%@BUILD_PERL@%$BUILD_PERL%g
13106 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
13107 s%@BUILD_SHELL@%$BUILD_SHELL%g
13108 s%@BUILD_TCL@%$BUILD_TCL%g
13109 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13110 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13111 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13112 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13113 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13114 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13115 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13116 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13117 s%@LDAP_LIBS@%$LDAP_LIBS%g
13118 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13119 s%@LDIF_LIBS@%$LDIF_LIBS%g
13120 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13121 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13122 s%@LDBM_LIBS@%$LDBM_LIBS%g
13123 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13124 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13125 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13126 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13127 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
13128 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13129 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13130 s%@KRB_LIBS@%$KRB_LIBS%g
13131 s%@READLINE_LIBS@%$READLINE_LIBS%g
13132 s%@SASL_LIBS@%$SASL_LIBS%g
13133 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13134 s%@TLS_LIBS@%$TLS_LIBS%g
13135 s%@MODULES_LIBS@%$MODULES_LIBS%g
13136
13137 CEOF
13138 EOF
13139
13140 cat >> $CONFIG_STATUS <<\EOF
13141
13142 # Split the substitutions into bite-sized pieces for seds with
13143 # small command number limits, like on Digital OSF/1 and HP-UX.
13144 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13145 ac_file=1 # Number of current file.
13146 ac_beg=1 # First line for current file.
13147 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13148 ac_more_lines=:
13149 ac_sed_cmds=""
13150 while $ac_more_lines; do
13151   if test $ac_beg -gt 1; then
13152     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13153   else
13154     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13155   fi
13156   if test ! -s conftest.s$ac_file; then
13157     ac_more_lines=false
13158     rm -f conftest.s$ac_file
13159   else
13160     if test -z "$ac_sed_cmds"; then
13161       ac_sed_cmds="sed -f conftest.s$ac_file"
13162     else
13163       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13164     fi
13165     ac_file=`expr $ac_file + 1`
13166     ac_beg=$ac_end
13167     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13168   fi
13169 done
13170 if test -z "$ac_sed_cmds"; then
13171   ac_sed_cmds=cat
13172 fi
13173 EOF
13174
13175 cat >> $CONFIG_STATUS <<EOF
13176
13177 CONFIG_FILES=\${CONFIG_FILES-"\
13178 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13179 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13180 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13181 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13182 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13183 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13184 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13185 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13186 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13187 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13188 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13189 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13190 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13191 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13192 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13193 include/Makefile:build/top.mk:include/Makefile.in \
13194 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13195 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13196 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13197 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13198 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13199 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13200 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13201 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13202 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13203 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13204 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13205 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13206 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13207 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13208 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13209 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13210 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13211 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13212 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13213 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13214 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13215 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13216 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13217 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13218 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13219 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13220 "}
13221 EOF
13222 cat >> $CONFIG_STATUS <<\EOF
13223 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13224   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13225   case "$ac_file" in
13226   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13227        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13228   *) ac_file_in="${ac_file}.in" ;;
13229   esac
13230
13231   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13232
13233   # Remove last slash and all that follows it.  Not all systems have dirname.
13234   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13235   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13236     # The file is in a subdirectory.
13237     test ! -d "$ac_dir" && mkdir "$ac_dir"
13238     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13239     # A "../" for each directory in $ac_dir_suffix.
13240     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13241   else
13242     ac_dir_suffix= ac_dots=
13243   fi
13244
13245   case "$ac_given_srcdir" in
13246   .)  srcdir=.
13247       if test -z "$ac_dots"; then top_srcdir=.
13248       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13249   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13250   *) # Relative path.
13251     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13252     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13253   esac
13254
13255   case "$ac_given_INSTALL" in
13256   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13257   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13258   esac
13259
13260   echo creating "$ac_file"
13261   rm -f "$ac_file"
13262   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13263   case "$ac_file" in
13264   *Makefile*) ac_comsub="1i\\
13265 # $configure_input" ;;
13266   *) ac_comsub= ;;
13267   esac
13268
13269   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13270   sed -e "$ac_comsub
13271 s%@configure_input@%$configure_input%g
13272 s%@srcdir@%$srcdir%g
13273 s%@top_srcdir@%$top_srcdir%g
13274 s%@INSTALL@%$INSTALL%g
13275 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13276 fi; done
13277 rm -f conftest.s*
13278
13279 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13280 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13281 #
13282 # ac_d sets the value in "#define NAME VALUE" lines.
13283 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13284 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13285 ac_dC='\3'
13286 ac_dD='%g'
13287 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13288 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13289 ac_uB='\([      ]\)%\1#\2define\3'
13290 ac_uC=' '
13291 ac_uD='\4%g'
13292 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13293 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13294 ac_eB='$%\1#\2define\3'
13295 ac_eC=' '
13296 ac_eD='%g'
13297
13298 if test "${CONFIG_HEADERS+set}" != set; then
13299 EOF
13300 cat >> $CONFIG_STATUS <<EOF
13301   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13302 EOF
13303 cat >> $CONFIG_STATUS <<\EOF
13304 fi
13305 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13306   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13307   case "$ac_file" in
13308   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13309        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13310   *) ac_file_in="${ac_file}.in" ;;
13311   esac
13312
13313   echo creating $ac_file
13314
13315   rm -f conftest.frag conftest.in conftest.out
13316   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13317   cat $ac_file_inputs > conftest.in
13318
13319 EOF
13320
13321 # Transform confdefs.h into a sed script conftest.vals that substitutes
13322 # the proper values into config.h.in to produce config.h.  And first:
13323 # Protect against being on the right side of a sed subst in config.status.
13324 # Protect against being in an unquoted here document in config.status.
13325 rm -f conftest.vals
13326 cat > conftest.hdr <<\EOF
13327 s/[\\&%]/\\&/g
13328 s%[\\$`]%\\&%g
13329 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13330 s%ac_d%ac_u%gp
13331 s%ac_u%ac_e%gp
13332 EOF
13333 sed -n -f conftest.hdr confdefs.h > conftest.vals
13334 rm -f conftest.hdr
13335
13336 # This sed command replaces #undef with comments.  This is necessary, for
13337 # example, in the case of _POSIX_SOURCE, which is predefined and required
13338 # on some systems where configure will not decide to define it.
13339 cat >> conftest.vals <<\EOF
13340 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13341 EOF
13342
13343 # Break up conftest.vals because some shells have a limit on
13344 # the size of here documents, and old seds have small limits too.
13345
13346 rm -f conftest.tail
13347 while :
13348 do
13349   ac_lines=`grep -c . conftest.vals`
13350   # grep -c gives empty output for an empty file on some AIX systems.
13351   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13352   # Write a limited-size here document to conftest.frag.
13353   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13354   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13355   echo 'CEOF
13356   sed -f conftest.frag conftest.in > conftest.out
13357   rm -f conftest.in
13358   mv conftest.out conftest.in
13359 ' >> $CONFIG_STATUS
13360   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13361   rm -f conftest.vals
13362   mv conftest.tail conftest.vals
13363 done
13364 rm -f conftest.vals
13365
13366 cat >> $CONFIG_STATUS <<\EOF
13367   rm -f conftest.frag conftest.h
13368   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13369   cat conftest.in >> conftest.h
13370   rm -f conftest.in
13371   if cmp -s $ac_file conftest.h 2>/dev/null; then
13372     echo "$ac_file is unchanged"
13373     rm -f conftest.h
13374   else
13375     # Remove last slash and all that follows it.  Not all systems have dirname.
13376       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13377       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13378       # The file is in a subdirectory.
13379       test ! -d "$ac_dir" && mkdir "$ac_dir"
13380     fi
13381     rm -f $ac_file
13382     mv conftest.h $ac_file
13383   fi
13384 fi; done
13385
13386 EOF
13387 cat >> $CONFIG_STATUS <<EOF
13388
13389 EOF
13390 cat >> $CONFIG_STATUS <<\EOF
13391
13392 date > stamp-h
13393 echo Please \"make depend\" to build dependencies
13394
13395 exit 0
13396 EOF
13397 chmod +x $CONFIG_STATUS
13398 rm -fr confdefs* $ac_clean_files
13399 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13400