]> git.sur5r.net Git - openldap/blob - configure
3621c53a2f89f806d4071f72d60363bfa88ab215
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-multimaster        enable multimaster replication (no)"
65 ac_help="$ac_help
66     --enable-phonetic   enable phonetic/soundex (no)"
67 ac_help="$ac_help
68     --enable-quipu      build quipu migration tools (no)"
69 ac_help="$ac_help
70     --enable-rlookups   enable reverse lookups (auto)"
71 ac_help="$ac_help
72     --enable-wrappers   enable tcp wrapper support (no)"
73 ac_help="$ac_help
74     --enable-bdb2       enable bdb2 backend (no)"
75 ac_help="$ac_help
76       --with-bdb2-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldap       enable ldap backend (no)"
79 ac_help="$ac_help
80       --with-ldap-module        module type (static)"
81 ac_help="$ac_help
82     --enable-ldbm       enable ldbm backend (yes)"
83 ac_help="$ac_help
84       --with-ldbm-module        module type (static)"
85 ac_help="$ac_help
86       --with-ldbm-api   use LDBM API (auto)"
87 ac_help="$ac_help
88       --with-ldbm-type  use LDBM type (auto)"
89 ac_help="$ac_help
90     --enable-passwd     enable passwd backend (no)"
91 ac_help="$ac_help
92       --with-passwd-module      module type (static)"
93 ac_help="$ac_help
94     --enable-perl       enable perl backend (no)"
95 ac_help="$ac_help
96       --with-perl-module        module type (static)"
97 ac_help="$ac_help
98     --enable-shell      enable shell backend (no)"
99 ac_help="$ac_help
100       --with-shell-module       module type (static)"
101 ac_help="$ac_help
102     --enable-tcl        enable tcl backend (no)"
103 ac_help="$ac_help
104       --with-tcl-module module type (static)"
105 ac_help="$ac_help
106 SLURPD Options:"
107 ac_help="$ac_help
108   --enable-slurpd       enable building slurpd (auto)"
109 ac_help="$ac_help
110 Library Generation & Linking Options"
111 ac_help="$ac_help
112   --enable-static[=PKGS]  build static libraries [default=yes]"
113 ac_help="$ac_help
114   --enable-shared[=PKGS]  build shared libraries [default=yes]"
115 ac_help="$ac_help
116   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
117 ac_help="$ac_help
118   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
119 ac_help="$ac_help
120   --disable-libtool-lock  avoid locking (might break parallel builds)"
121
122 # Initialize some variables set by options.
123 # The variables have the same names as the options, with
124 # dashes changed to underlines.
125 build=NONE
126 cache_file=./config.cache
127 exec_prefix=NONE
128 host=NONE
129 no_create=
130 nonopt=NONE
131 no_recursion=
132 prefix=NONE
133 program_prefix=NONE
134 program_suffix=NONE
135 program_transform_name=s,x,x,
136 silent=
137 site=
138 srcdir=
139 target=NONE
140 verbose=
141 x_includes=NONE
142 x_libraries=NONE
143 bindir='${exec_prefix}/bin'
144 sbindir='${exec_prefix}/sbin'
145 libexecdir='${exec_prefix}/libexec'
146 datadir='${prefix}/share'
147 sysconfdir='${prefix}/etc'
148 sharedstatedir='${prefix}/com'
149 localstatedir='${prefix}/var'
150 libdir='${exec_prefix}/lib'
151 includedir='${prefix}/include'
152 oldincludedir='/usr/include'
153 infodir='${prefix}/info'
154 mandir='${prefix}/man'
155
156 # Initialize some other variables.
157 subdirs=
158 MFLAGS= MAKEFLAGS=
159 SHELL=${CONFIG_SHELL-/bin/sh}
160 # Maximum number of lines to put in a shell here document.
161 ac_max_here_lines=12
162
163 ac_prev=
164 for ac_option
165 do
166
167   # If the previous option needs an argument, assign it.
168   if test -n "$ac_prev"; then
169     eval "$ac_prev=\$ac_option"
170     ac_prev=
171     continue
172   fi
173
174   case "$ac_option" in
175   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
176   *) ac_optarg= ;;
177   esac
178
179   # Accept the important Cygnus configure options, so we can diagnose typos.
180
181   case "$ac_option" in
182
183   -bindir | --bindir | --bindi | --bind | --bin | --bi)
184     ac_prev=bindir ;;
185   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
186     bindir="$ac_optarg" ;;
187
188   -build | --build | --buil | --bui | --bu)
189     ac_prev=build ;;
190   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
191     build="$ac_optarg" ;;
192
193   -cache-file | --cache-file | --cache-fil | --cache-fi \
194   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
195     ac_prev=cache_file ;;
196   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
197   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
198     cache_file="$ac_optarg" ;;
199
200   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
201     ac_prev=datadir ;;
202   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
203   | --da=*)
204     datadir="$ac_optarg" ;;
205
206   -disable-* | --disable-*)
207     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
208     # Reject names that are not valid shell variable names.
209     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
210       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
211     fi
212     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213     eval "enable_${ac_feature}=no" ;;
214
215   -enable-* | --enable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     case "$ac_option" in
223       *=*) ;;
224       *) ac_optarg=yes ;;
225     esac
226     eval "enable_${ac_feature}='$ac_optarg'" ;;
227
228   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
229   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
230   | --exec | --exe | --ex)
231     ac_prev=exec_prefix ;;
232   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
233   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
234   | --exec=* | --exe=* | --ex=*)
235     exec_prefix="$ac_optarg" ;;
236
237   -gas | --gas | --ga | --g)
238     # Obsolete; use --with-gas.
239     with_gas=yes ;;
240
241   -help | --help | --hel | --he)
242     # Omit some internal or obsolete options to make the list less imposing.
243     # This message is too long to be a string in the A/UX 3.1 sh.
244     cat << EOF
245 Usage: configure [options] [host]
246 Options: [defaults in brackets after descriptions]
247 Configuration:
248   --cache-file=FILE       cache test results in FILE
249   --help                  print this message
250   --no-create             do not create output files
251   --quiet, --silent       do not print \`checking...' messages
252   --version               print the version of autoconf that created configure
253 Directory and file names:
254   --prefix=PREFIX         install architecture-independent files in PREFIX
255                           [$ac_default_prefix]
256   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
257                           [same as prefix]
258   --bindir=DIR            user executables in DIR [EPREFIX/bin]
259   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
260   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
261   --datadir=DIR           read-only architecture-independent data in DIR
262                           [PREFIX/share]
263   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
264   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
265                           [PREFIX/com]
266   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
267   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
268   --includedir=DIR        C header files in DIR [PREFIX/include]
269   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
270   --infodir=DIR           info documentation in DIR [PREFIX/info]
271   --mandir=DIR            man documentation in DIR [PREFIX/man]
272   --srcdir=DIR            find the sources in DIR [configure dir or ..]
273   --program-prefix=PREFIX prepend PREFIX to installed program names
274   --program-suffix=SUFFIX append SUFFIX to installed program names
275   --program-transform-name=PROGRAM
276                           run sed PROGRAM on installed program names
277 EOF
278     cat << EOF
279 Host type:
280   --build=BUILD           configure for building on BUILD [BUILD=HOST]
281   --host=HOST             configure for HOST [guessed]
282   --target=TARGET         configure for TARGET [TARGET=HOST]
283 Features and packages:
284   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
285   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
286   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
287   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
288   --x-includes=DIR        X include files are in DIR
289   --x-libraries=DIR       X library files are in DIR
290 EOF
291     if test -n "$ac_help"; then
292       echo "--enable and --with options recognized:$ac_help"
293     fi
294     exit 0 ;;
295
296   -host | --host | --hos | --ho)
297     ac_prev=host ;;
298   -host=* | --host=* | --hos=* | --ho=*)
299     host="$ac_optarg" ;;
300
301   -includedir | --includedir | --includedi | --included | --include \
302   | --includ | --inclu | --incl | --inc)
303     ac_prev=includedir ;;
304   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
305   | --includ=* | --inclu=* | --incl=* | --inc=*)
306     includedir="$ac_optarg" ;;
307
308   -infodir | --infodir | --infodi | --infod | --info | --inf)
309     ac_prev=infodir ;;
310   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
311     infodir="$ac_optarg" ;;
312
313   -libdir | --libdir | --libdi | --libd)
314     ac_prev=libdir ;;
315   -libdir=* | --libdir=* | --libdi=* | --libd=*)
316     libdir="$ac_optarg" ;;
317
318   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
319   | --libexe | --libex | --libe)
320     ac_prev=libexecdir ;;
321   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
322   | --libexe=* | --libex=* | --libe=*)
323     libexecdir="$ac_optarg" ;;
324
325   -localstatedir | --localstatedir | --localstatedi | --localstated \
326   | --localstate | --localstat | --localsta | --localst \
327   | --locals | --local | --loca | --loc | --lo)
328     ac_prev=localstatedir ;;
329   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
330   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
331   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
332     localstatedir="$ac_optarg" ;;
333
334   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335     ac_prev=mandir ;;
336   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337     mandir="$ac_optarg" ;;
338
339   -nfp | --nfp | --nf)
340     # Obsolete; use --without-fp.
341     with_fp=no ;;
342
343   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344   | --no-cr | --no-c)
345     no_create=yes ;;
346
347   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
348   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349     no_recursion=yes ;;
350
351   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
352   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
353   | --oldin | --oldi | --old | --ol | --o)
354     ac_prev=oldincludedir ;;
355   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
356   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
357   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
358     oldincludedir="$ac_optarg" ;;
359
360   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361     ac_prev=prefix ;;
362   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363     prefix="$ac_optarg" ;;
364
365   -program-prefix | --program-prefix | --program-prefi | --program-pref \
366   | --program-pre | --program-pr | --program-p)
367     ac_prev=program_prefix ;;
368   -program-prefix=* | --program-prefix=* | --program-prefi=* \
369   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
370     program_prefix="$ac_optarg" ;;
371
372   -program-suffix | --program-suffix | --program-suffi | --program-suff \
373   | --program-suf | --program-su | --program-s)
374     ac_prev=program_suffix ;;
375   -program-suffix=* | --program-suffix=* | --program-suffi=* \
376   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
377     program_suffix="$ac_optarg" ;;
378
379   -program-transform-name | --program-transform-name \
380   | --program-transform-nam | --program-transform-na \
381   | --program-transform-n | --program-transform- \
382   | --program-transform | --program-transfor \
383   | --program-transfo | --program-transf \
384   | --program-trans | --program-tran \
385   | --progr-tra | --program-tr | --program-t)
386     ac_prev=program_transform_name ;;
387   -program-transform-name=* | --program-transform-name=* \
388   | --program-transform-nam=* | --program-transform-na=* \
389   | --program-transform-n=* | --program-transform-=* \
390   | --program-transform=* | --program-transfor=* \
391   | --program-transfo=* | --program-transf=* \
392   | --program-trans=* | --program-tran=* \
393   | --progr-tra=* | --program-tr=* | --program-t=*)
394     program_transform_name="$ac_optarg" ;;
395
396   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
397   | -silent | --silent | --silen | --sile | --sil)
398     silent=yes ;;
399
400   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401     ac_prev=sbindir ;;
402   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403   | --sbi=* | --sb=*)
404     sbindir="$ac_optarg" ;;
405
406   -sharedstatedir | --sharedstatedir | --sharedstatedi \
407   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
408   | --sharedst | --shareds | --shared | --share | --shar \
409   | --sha | --sh)
410     ac_prev=sharedstatedir ;;
411   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
412   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
413   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414   | --sha=* | --sh=*)
415     sharedstatedir="$ac_optarg" ;;
416
417   -site | --site | --sit)
418     ac_prev=site ;;
419   -site=* | --site=* | --sit=*)
420     site="$ac_optarg" ;;
421
422   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423     ac_prev=srcdir ;;
424   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425     srcdir="$ac_optarg" ;;
426
427   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
428   | --syscon | --sysco | --sysc | --sys | --sy)
429     ac_prev=sysconfdir ;;
430   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
431   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
432     sysconfdir="$ac_optarg" ;;
433
434   -target | --target | --targe | --targ | --tar | --ta | --t)
435     ac_prev=target ;;
436   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
437     target="$ac_optarg" ;;
438
439   -v | -verbose | --verbose | --verbos | --verbo | --verb)
440     verbose=yes ;;
441
442   -version | --version | --versio | --versi | --vers)
443     echo "configure generated by autoconf version 2.13.1"
444     exit 0 ;;
445
446   -with-* | --with-*)
447     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
448     # Reject names that are not valid shell variable names.
449     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
450       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451     fi
452     ac_package=`echo $ac_package| sed 's/-/_/g'`
453     case "$ac_option" in
454       *=*) ;;
455       *) ac_optarg=yes ;;
456     esac
457     eval "with_${ac_package}='$ac_optarg'" ;;
458
459   -without-* | --without-*)
460     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
461     # Reject names that are not valid shell variable names.
462     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
463       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464     fi
465     ac_package=`echo $ac_package| sed 's/-/_/g'`
466     eval "with_${ac_package}=no" ;;
467
468   --x)
469     # Obsolete; use --with-x.
470     with_x=yes ;;
471
472   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
473   | --x-incl | --x-inc | --x-in | --x-i)
474     ac_prev=x_includes ;;
475   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
476   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
477     x_includes="$ac_optarg" ;;
478
479   -x-libraries | --x-libraries | --x-librarie | --x-librari \
480   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
481     ac_prev=x_libraries ;;
482   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
483   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
484     x_libraries="$ac_optarg" ;;
485
486   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
487     ;;
488
489   *)
490     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
491       echo "configure: warning: $ac_option: invalid host type" 1>&2
492     fi
493     if test "x$nonopt" != xNONE; then
494       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
495     fi
496     nonopt="$ac_option"
497     ;;
498
499   esac
500 done
501
502 if test -n "$ac_prev"; then
503   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
504 fi
505
506 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
507
508 # File descriptor usage:
509 # 0 standard input
510 # 1 file creation
511 # 2 errors and warnings
512 # 3 some systems may open it to /dev/tty
513 # 4 used on the Kubota Titan
514 # 6 checking for... messages and results
515 # 5 compiler messages saved in config.log
516 if test "$silent" = yes; then
517   exec 6>/dev/null
518 else
519   exec 6>&1
520 fi
521 exec 5>./config.log
522
523 echo "\
524 This file contains any messages produced by compilers while
525 running configure, to aid debugging if configure makes a mistake.
526 " 1>&5
527
528 # Strip out --no-create and --no-recursion so they do not pile up.
529 # Also quote any args containing shell metacharacters.
530 ac_configure_args=
531 for ac_arg
532 do
533   case "$ac_arg" in
534   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
535   | --no-cr | --no-c) ;;
536   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
537   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
538   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
539   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
540   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
541   esac
542 done
543
544 # NLS nuisances.
545 # Only set these to C if already set.  These must not be set unconditionally
546 # because not all systems understand e.g. LANG=C (notably SCO).
547 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
548 # Non-C LC_CTYPE values break the ctype check.
549 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
550 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
551 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
552 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
553
554 # confdefs.h avoids OS command line length limits that DEFS can exceed.
555 rm -rf conftest* confdefs.h
556 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
557 echo > confdefs.h
558
559 # A filename unique to this package, relative to the directory that
560 # configure is in, which we can look for to find out if srcdir is correct.
561 ac_unique_file=build/version
562
563 # Find the source files, if location was not specified.
564 if test -z "$srcdir"; then
565   ac_srcdir_defaulted=yes
566   # Try the directory containing this script, then its parent.
567   ac_prog=$0
568   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
569   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
570   srcdir=$ac_confdir
571   if test ! -r $srcdir/$ac_unique_file; then
572     srcdir=..
573   fi
574 else
575   ac_srcdir_defaulted=no
576 fi
577 if test ! -r $srcdir/$ac_unique_file; then
578   if test "$ac_srcdir_defaulted" = yes; then
579     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
580   else
581     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
582   fi
583 fi
584 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
585
586 # Prefer explicitly selected file to automatically selected ones.
587 if test -z "$CONFIG_SITE"; then
588   if test "x$prefix" != xNONE; then
589     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
590   else
591     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
592   fi
593 fi
594 for ac_site_file in $CONFIG_SITE; do
595   if test -r "$ac_site_file"; then
596     echo "loading site script $ac_site_file"
597     . "$ac_site_file"
598   fi
599 done
600
601
602 ac_ext=c
603 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
604 ac_cpp='$CPP $CPPFLAGS'
605 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
606 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
607 cross_compiling=$ac_cv_prog_cc_cross
608
609 ac_exeext=
610 ac_objext=o
611 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
612   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
613   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614     ac_n= ac_c='
615 ' ac_t='        '
616   else
617     ac_n=-n ac_c= ac_t=
618   fi
619 else
620   ac_n= ac_c='\c' ac_t=
621 fi
622
623 ac_aux_dir=
624 for ac_dir in build $srcdir/build; do
625   if test -f $ac_dir/install-sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install-sh -c"
628     break
629   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
637 fi
638 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
639 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
640 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
641
642 OL_VERSION=`cat $ac_aux_dir/version`
643 if test -z "$OL_VERSION"; then
644         { echo "configure: error: could not determine version" 1>&2; exit 1; }
645 fi
646
647
648 echo $ac_n "checking host system type""... $ac_c" 1>&6
649 echo "configure:650: checking host system type" >&5
650 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
651
652 # Make sure we can run config.sub.
653   if $ac_config_sub sun4 >/dev/null 2>&1; then :
654     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
655   fi
656
657   ac_cv_host_alias=$host
658   case "$ac_cv_host_alias" in
659   NONE)
660     case $nonopt in
661     NONE)
662       if ac_cv_host_alias=`$ac_config_guess`; then :
663       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
664       fi ;;
665     *) ac_cv_host_alias=$nonopt ;;
666     esac ;;
667   esac
668
669   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
670   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
671   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
672   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
673 else
674   echo $ac_n "(cached) $ac_c" 1>&6
675 fi
676
677 echo "$ac_t""$ac_cv_host" 1>&6
678
679 host=$ac_cv_host
680 host_alias=$ac_cv_host_alias
681 host_cpu=$ac_cv_host_cpu
682 host_vendor=$ac_cv_host_vendor
683 host_os=$ac_cv_host_os
684
685
686
687
688
689 echo $ac_n "checking target system type""... $ac_c" 1>&6
690 echo "configure:691: checking target system type" >&5
691 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
692
693 # Make sure we can run config.sub.
694   if $ac_config_sub sun4 >/dev/null 2>&1; then :
695     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
696   fi
697
698   ac_cv_target_alias=$target
699   case "$ac_cv_target_alias" in
700   NONE)
701     case $nonopt in
702     NONE)
703       ac_cv_target_alias=$host_alias ;;
704
705     *) ac_cv_target_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
710   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_target" 1>&6
718
719 target=$ac_cv_target
720 target_alias=$ac_cv_target_alias
721 target_cpu=$ac_cv_target_cpu
722 target_vendor=$ac_cv_target_vendor
723 target_os=$ac_cv_target_os
724
725
726
727
728
729 echo $ac_n "checking build system type""... $ac_c" 1>&6
730 echo "configure:731: checking build system type" >&5
731 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_build_alias=$build
739   case "$ac_cv_build_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_build_alias=$host_alias ;;
744
745     *) ac_cv_build_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
750   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_build" 1>&6
758
759 build=$ac_cv_build
760 build_alias=$ac_cv_build_alias
761 build_cpu=$ac_cv_build_cpu
762 build_vendor=$ac_cv_build_vendor
763 build_os=$ac_cv_build_os
764
765
766
767
768
769 # Do some error checking and defaulting for the host and target type.
770 # The inputs are:
771 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
772 #
773 # The rules are:
774 # 1. You are not allowed to specify --host, --target, and nonopt at the
775 #    same time.
776 # 2. Host defaults to nonopt.
777 # 3. If nonopt is not specified, then host defaults to the current host,
778 #    as determined by config.guess.
779 # 4. Target and build default to nonopt.
780 # 5. If nonopt is not specified, then target and build default to host.
781
782 # The aliases save the names the user supplied, while $host etc.
783 # will get canonicalized.
784 case $host---$target---$nonopt in
785 NONE---*---* | *---NONE---* | *---*---NONE) ;;
786 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
787 esac
788
789 test "$host_alias" != "$target_alias" &&
790   test "$program_prefix$program_suffix$program_transform_name" = \
791     NONENONEs,x,x, &&
792   program_prefix=${target_alias}-
793
794
795 # Find a good install program.  We prefer a C program (faster),
796 # so one script is as good as another.  But avoid the broken or
797 # incompatible versions:
798 # SysV /etc/install, /usr/sbin/install
799 # SunOS /usr/etc/install
800 # IRIX /sbin/install
801 # AIX /bin/install
802 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
803 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
804 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
805 # ./install, which can be erroneously created by make from ./install.sh.
806 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
807 echo "configure:808: checking for a BSD compatible install" >&5
808 if test -z "$INSTALL"; then
809 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
813   for ac_dir in $PATH; do
814     # Account for people who put trailing slashes in PATH elements.
815     case "$ac_dir/" in
816     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
817     *)
818       # OSF1 and SCO ODT 3.0 have their own names for install.
819       # Don't use installbsd from OSF since it installs stuff as root
820       # by default.
821       for ac_prog in ginstall scoinst install; do
822         if test -f $ac_dir/$ac_prog; then
823           if test $ac_prog = install &&
824             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
825             # AIX install.  It has an incompatible calling convention.
826             :
827           elif test $ac_prog = install &&
828             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
829             # program-specific install script used by HP pwplus--don't use.
830             :
831           else
832             ac_cv_path_install="$ac_dir/$ac_prog -c"
833             break 2
834           fi
835         fi
836       done
837       ;;
838     esac
839   done
840   IFS="$ac_save_IFS"
841
842 fi
843   if test "${ac_cv_path_install+set}" = set; then
844     INSTALL="$ac_cv_path_install"
845   else
846     # As a last resort, use the slow shell script.  We don't cache a
847     # path for INSTALL within a source directory, because that will
848     # break other packages using the cache if that directory is
849     # removed, or if the path is relative.
850     INSTALL="$ac_install_sh"
851   fi
852 fi
853 echo "$ac_t""$INSTALL" 1>&6
854
855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
856 # It thinks the first close brace ends the variable substitution.
857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
858
859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
860
861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
862
863 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
864 echo "configure:865: checking whether build environment is sane" >&5
865 # Just in case
866 sleep 1
867 echo timestamp > conftestfile
868 # Do `set' in a subshell so we don't clobber the current shell's
869 # arguments.  Must try -L first in case configure is actually a
870 # symlink; some systems play weird games with the mod time of symlinks
871 # (eg FreeBSD returns the mod time of the symlink's containing
872 # directory).
873 if (
874    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
875    if test "$*" = "X"; then
876       # -L didn't work.
877       set X `ls -t $srcdir/configure conftestfile`
878    fi
879    if test "$*" != "X $srcdir/configure conftestfile" \
880       && test "$*" != "X conftestfile $srcdir/configure"; then
881
882       # If neither matched, then we have a broken ls.  This can happen
883       # if, for instance, CONFIG_SHELL is bash and it inherits a
884       # broken ls alias from the environment.  This has actually
885       # happened.  Such a system could not be considered "sane".
886       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
887 alias in your environment" 1>&2; exit 1; }
888    fi
889
890    test "$2" = conftestfile
891    )
892 then
893    # Ok.
894    :
895 else
896    { echo "configure: error: newly created file is older than distributed files!
897 Check your system clock" 1>&2; exit 1; }
898 fi
899 rm -f conftest*
900 echo "$ac_t""yes" 1>&6
901 if test "$program_transform_name" = s,x,x,; then
902   program_transform_name=
903 else
904   # Double any \ or $.  echo might interpret backslashes.
905   cat <<\EOF_SED > conftestsed
906 s,\\,\\\\,g; s,\$,$$,g
907 EOF_SED
908   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
909   rm -f conftestsed
910 fi
911 test "$program_prefix" != NONE &&
912   program_transform_name="s,^,${program_prefix},;$program_transform_name"
913 # Use a double $ so make ignores it.
914 test "$program_suffix" != NONE &&
915   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
916
917 # sed with no file args requires a program.
918 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
919
920 for ac_prog in mawk gawk nawk awk
921 do
922 # Extract the first word of "$ac_prog", so it can be a program name with args.
923 set dummy $ac_prog; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$AWK"; then
930   ac_cv_prog_AWK="$AWK" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
933   ac_dummy="$PATH"
934   for ac_dir in $ac_dummy; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       ac_cv_prog_AWK="$ac_prog"
938       break
939     fi
940   done
941   IFS="$ac_save_ifs"
942 fi
943 fi
944 AWK="$ac_cv_prog_AWK"
945 if test -n "$AWK"; then
946   echo "$ac_t""$AWK" 1>&6
947 else
948   echo "$ac_t""no" 1>&6
949 fi
950
951 test -n "$AWK" && break
952 done
953
954 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
955 echo "configure:956: checking whether ${MAKE-make} sets \${MAKE}" >&5
956 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
957 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   cat > conftestmake <<\EOF
961 all:
962         @echo 'ac_maketemp="${MAKE}"'
963 EOF
964 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
965 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
966 if test -n "$ac_maketemp"; then
967   eval ac_cv_prog_make_${ac_make}_set=yes
968 else
969   eval ac_cv_prog_make_${ac_make}_set=no
970 fi
971 rm -f conftestmake
972 fi
973 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
974   echo "$ac_t""yes" 1>&6
975   SET_MAKE=
976 else
977   echo "$ac_t""no" 1>&6
978   SET_MAKE="MAKE=${MAKE-make}"
979 fi
980
981
982
983 PACKAGE=OpenLDAP
984
985 VERSION=$OL_VERSION
986
987 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
988   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
989 fi
990
991
992
993 missing_dir=`cd $ac_aux_dir && pwd`
994 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
995 echo "configure:996: checking for working aclocal" >&5
996 # Run test in a subshell; some versions of sh will print an error if
997 # an executable is not found, even if stderr is redirected.
998 # Redirect stdin to placate older versions of autoconf.  Sigh.
999 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1000    ACLOCAL=aclocal
1001    echo "$ac_t""found" 1>&6
1002 else
1003    ACLOCAL="$missing_dir/missing aclocal"
1004    echo "$ac_t""missing" 1>&6
1005 fi
1006
1007 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1008 echo "configure:1009: checking for working autoconf" >&5
1009 # Run test in a subshell; some versions of sh will print an error if
1010 # an executable is not found, even if stderr is redirected.
1011 # Redirect stdin to placate older versions of autoconf.  Sigh.
1012 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1013    AUTOCONF=autoconf
1014    echo "$ac_t""found" 1>&6
1015 else
1016    AUTOCONF="$missing_dir/missing autoconf"
1017    echo "$ac_t""missing" 1>&6
1018 fi
1019
1020 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working automake" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (automake --version) < /dev/null > /dev/null 2>&1; then
1026    AUTOMAKE=automake
1027    echo "$ac_t""found" 1>&6
1028 else
1029    AUTOMAKE="$missing_dir/missing automake"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoheader" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOHEADER=autoheader
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOHEADER="$missing_dir/missing autoheader"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working makeinfo" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1052    MAKEINFO=makeinfo
1053    echo "$ac_t""found" 1>&6
1054 else
1055    MAKEINFO="$missing_dir/missing makeinfo"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 install_sh="$missing_dir/install-sh"
1060 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1061
1062 for ac_prog in gnutar gtar tar
1063 do
1064 # Extract the first word of "$ac_prog", so it can be a program name with args.
1065 set dummy $ac_prog; ac_word=$2
1066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067 echo "configure:1068: checking for $ac_word" >&5
1068 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071   if test -n "$AMTAR"; then
1072   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1073 else
1074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1075   ac_dummy="$PATH"
1076   for ac_dir in $ac_dummy; do
1077     test -z "$ac_dir" && ac_dir=.
1078     if test -f $ac_dir/$ac_word; then
1079       ac_cv_prog_AMTAR="$ac_prog"
1080       break
1081     fi
1082   done
1083   IFS="$ac_save_ifs"
1084 fi
1085 fi
1086 AMTAR="$ac_cv_prog_AMTAR"
1087 if test -n "$AMTAR"; then
1088   echo "$ac_t""$AMTAR" 1>&6
1089 else
1090   echo "$ac_t""no" 1>&6
1091 fi
1092
1093 test -n "$AMTAR" && break
1094 done
1095
1096
1097 AMTARFLAGS=
1098 if test -n "$AMTAR"; then
1099   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1100         AMTARFLAGS=o
1101   fi
1102 fi
1103
1104
1105
1106 cat >> confdefs.h <<EOF
1107 #define OPENLDAP_PACKAGE "$PACKAGE"
1108 EOF
1109
1110 cat >> confdefs.h <<EOF
1111 #define OPENLDAP_VERSION "$VERSION"
1112 EOF
1113
1114
1115
1116
1117 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1118 echo "configure:1119: checking configure arguments" >&5
1119
1120
1121 top_builddir=`pwd`
1122
1123 ldap_subdir="/openldap"
1124
1125 # Check whether --with-subdir or --without-subdir was given.
1126 if test "${with_subdir+set}" = set; then
1127   withval="$with_subdir"
1128   case "$withval" in
1129         no) ldap_subdir=""
1130                 ;;
1131         yes)
1132                 ;;
1133         /*|\\*)
1134                 ldap_subdir="$withval"
1135                 ;;
1136         *)
1137                 ldap_subdir="/$withval"
1138                 ;;
1139 esac
1140
1141 fi
1142
1143
1144 # OpenLDAP --enable-debug
1145         # Check whether --enable-debug or --disable-debug was given.
1146 if test "${enable_debug+set}" = set; then
1147   enableval="$enable_debug"
1148   
1149         ol_arg=invalid
1150         for ol_val in auto yes no ; do
1151                 if test "$enableval" = "$ol_val" ; then
1152                         ol_arg="$ol_val"
1153                 fi
1154         done
1155         if test "$ol_arg" = "invalid" ; then
1156                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1157         fi
1158         ol_enable_debug="$ol_arg"
1159
1160 else
1161         ol_enable_debug="yes"
1162 fi
1163 # end --enable-debug
1164 # OpenLDAP --enable-syslog
1165         # Check whether --enable-syslog or --disable-syslog was given.
1166 if test "${enable_syslog+set}" = set; then
1167   enableval="$enable_syslog"
1168   
1169         ol_arg=invalid
1170         for ol_val in auto yes no ; do
1171                 if test "$enableval" = "$ol_val" ; then
1172                         ol_arg="$ol_val"
1173                 fi
1174         done
1175         if test "$ol_arg" = "invalid" ; then
1176                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1177         fi
1178         ol_enable_syslog="$ol_arg"
1179
1180 else
1181         ol_enable_syslog="auto"
1182 fi
1183 # end --enable-syslog
1184 # OpenLDAP --enable-proctitle
1185         # Check whether --enable-proctitle or --disable-proctitle was given.
1186 if test "${enable_proctitle+set}" = set; then
1187   enableval="$enable_proctitle"
1188   
1189         ol_arg=invalid
1190         for ol_val in auto yes no ; do
1191                 if test "$enableval" = "$ol_val" ; then
1192                         ol_arg="$ol_val"
1193                 fi
1194         done
1195         if test "$ol_arg" = "invalid" ; then
1196                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1197         fi
1198         ol_enable_proctitle="$ol_arg"
1199
1200 else
1201         ol_enable_proctitle="yes"
1202 fi
1203 # end --enable-proctitle
1204 # OpenLDAP --enable-cache
1205         # Check whether --enable-cache or --disable-cache was given.
1206 if test "${enable_cache+set}" = set; then
1207   enableval="$enable_cache"
1208   
1209         ol_arg=invalid
1210         for ol_val in auto yes no ; do
1211                 if test "$enableval" = "$ol_val" ; then
1212                         ol_arg="$ol_val"
1213                 fi
1214         done
1215         if test "$ol_arg" = "invalid" ; then
1216                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1217         fi
1218         ol_enable_cache="$ol_arg"
1219
1220 else
1221         ol_enable_cache="yes"
1222 fi
1223 # end --enable-cache
1224 # OpenLDAP --enable-dns
1225         # Check whether --enable-dns or --disable-dns was given.
1226 if test "${enable_dns+set}" = set; then
1227   enableval="$enable_dns"
1228   
1229         ol_arg=invalid
1230         for ol_val in auto yes no ; do
1231                 if test "$enableval" = "$ol_val" ; then
1232                         ol_arg="$ol_val"
1233                 fi
1234         done
1235         if test "$ol_arg" = "invalid" ; then
1236                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1237         fi
1238         ol_enable_dns="$ol_arg"
1239
1240 else
1241         ol_enable_dns="no"
1242 fi
1243 # end --enable-dns
1244 # OpenLDAP --enable-referrals
1245         # Check whether --enable-referrals or --disable-referrals was given.
1246 if test "${enable_referrals+set}" = set; then
1247   enableval="$enable_referrals"
1248   
1249         ol_arg=invalid
1250         for ol_val in auto yes no ; do
1251                 if test "$enableval" = "$ol_val" ; then
1252                         ol_arg="$ol_val"
1253                 fi
1254         done
1255         if test "$ol_arg" = "invalid" ; then
1256                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1257         fi
1258         ol_enable_referrals="$ol_arg"
1259
1260 else
1261         ol_enable_referrals="yes"
1262 fi
1263 # end --enable-referrals
1264 # OpenLDAP --enable-cldap
1265         # Check whether --enable-cldap or --disable-cldap was given.
1266 if test "${enable_cldap+set}" = set; then
1267   enableval="$enable_cldap"
1268   
1269         ol_arg=invalid
1270         for ol_val in auto yes no ; do
1271                 if test "$enableval" = "$ol_val" ; then
1272                         ol_arg="$ol_val"
1273                 fi
1274         done
1275         if test "$ol_arg" = "invalid" ; then
1276                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1277         fi
1278         ol_enable_cldap="$ol_arg"
1279
1280 else
1281         ol_enable_cldap="no"
1282 fi
1283 # end --enable-cldap
1284 # OpenLDAP --enable-x_compile
1285         # Check whether --enable-x_compile or --disable-x_compile was given.
1286 if test "${enable_x_compile+set}" = set; then
1287   enableval="$enable_x_compile"
1288   
1289         ol_arg=invalid
1290         for ol_val in yes no ; do
1291                 if test "$enableval" = "$ol_val" ; then
1292                         ol_arg="$ol_val"
1293                 fi
1294         done
1295         if test "$ol_arg" = "invalid" ; then
1296                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1297         fi
1298         ol_enable_x_compile="$ol_arg"
1299
1300 else
1301         ol_enable_x_compile="no"
1302 fi
1303 # end --enable-x_compile
1304
1305 # OpenLDAP --enable-dmalloc
1306         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1307 if test "${enable_dmalloc+set}" = set; then
1308   enableval="$enable_dmalloc"
1309   
1310         ol_arg=invalid
1311         for ol_val in auto yes no ; do
1312                 if test "$enableval" = "$ol_val" ; then
1313                         ol_arg="$ol_val"
1314                 fi
1315         done
1316         if test "$ol_arg" = "invalid" ; then
1317                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1318         fi
1319         ol_enable_dmalloc="$ol_arg"
1320
1321 else
1322         ol_enable_dmalloc="no"
1323 fi
1324 # end --enable-dmalloc
1325
1326 # OpenLDAP --with-cyrus_sasl
1327         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1328 if test "${with_cyrus_sasl+set}" = set; then
1329   withval="$with_cyrus_sasl"
1330   
1331         ol_arg=invalid
1332         for ol_val in auto yes no  ; do
1333                 if test "$withval" = "$ol_val" ; then
1334                         ol_arg="$ol_val"
1335                 fi
1336         done
1337         if test "$ol_arg" = "invalid" ; then
1338                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1339         fi
1340         ol_with_cyrus_sasl="$ol_arg"
1341
1342 else
1343         ol_with_cyrus_sasl="auto"
1344 fi
1345 # end --with-cyrus_sasl
1346
1347 # OpenLDAP --with-fetch
1348         # Check whether --with-fetch or --without-fetch was given.
1349 if test "${with_fetch+set}" = set; then
1350   withval="$with_fetch"
1351   
1352         ol_arg=invalid
1353         for ol_val in auto yes no  ; do
1354                 if test "$withval" = "$ol_val" ; then
1355                         ol_arg="$ol_val"
1356                 fi
1357         done
1358         if test "$ol_arg" = "invalid" ; then
1359                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1360         fi
1361         ol_with_fetch="$ol_arg"
1362
1363 else
1364         ol_with_fetch="auto"
1365 fi
1366 # end --with-fetch
1367
1368 # OpenLDAP --with-kerberos
1369         # Check whether --with-kerberos or --without-kerberos was given.
1370 if test "${with_kerberos+set}" = set; then
1371   withval="$with_kerberos"
1372   
1373         ol_arg=invalid
1374         for ol_val in auto k5 k4 afs yes no ; do
1375                 if test "$withval" = "$ol_val" ; then
1376                         ol_arg="$ol_val"
1377                 fi
1378         done
1379         if test "$ol_arg" = "invalid" ; then
1380                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1381         fi
1382         ol_with_kerberos="$ol_arg"
1383
1384 else
1385         ol_with_kerberos="auto"
1386 fi
1387 # end --with-kerberos
1388
1389 # OpenLDAP --with-readline
1390         # Check whether --with-readline or --without-readline was given.
1391 if test "${with_readline+set}" = set; then
1392   withval="$with_readline"
1393   
1394         ol_arg=invalid
1395         for ol_val in auto yes no  ; do
1396                 if test "$withval" = "$ol_val" ; then
1397                         ol_arg="$ol_val"
1398                 fi
1399         done
1400         if test "$ol_arg" = "invalid" ; then
1401                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1402         fi
1403         ol_with_readline="$ol_arg"
1404
1405 else
1406         ol_with_readline="auto"
1407 fi
1408 # end --with-readline
1409
1410 # OpenLDAP --with-threads
1411         # Check whether --with-threads or --without-threads was given.
1412 if test "${with_threads+set}" = set; then
1413   withval="$with_threads"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto posix mach lwp yes no manual  ; do
1417                 if test "$withval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1423         fi
1424         ol_with_threads="$ol_arg"
1425
1426 else
1427         ol_with_threads="auto"
1428 fi
1429 # end --with-threads
1430
1431 # OpenLDAP --with-tls
1432         # Check whether --with-tls or --without-tls was given.
1433 if test "${with_tls+set}" = set; then
1434   withval="$with_tls"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto ssleay openssl yes no  ; do
1438                 if test "$withval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1444         fi
1445         ol_with_tls="$ol_arg"
1446
1447 else
1448         ol_with_tls="auto"
1449 fi
1450 # end --with-tls
1451
1452 # OpenLDAP --with-yielding_select
1453         # Check whether --with-yielding_select or --without-yielding_select was given.
1454 if test "${with_yielding_select+set}" = set; then
1455   withval="$with_yielding_select"
1456   
1457         ol_arg=invalid
1458         for ol_val in auto yes no manual  ; do
1459                 if test "$withval" = "$ol_val" ; then
1460                         ol_arg="$ol_val"
1461                 fi
1462         done
1463         if test "$ol_arg" = "invalid" ; then
1464                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1465         fi
1466         ol_with_yielding_select="$ol_arg"
1467
1468 else
1469         ol_with_yielding_select="auto"
1470 fi
1471 # end --with-yielding_select
1472
1473
1474
1475 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1476 if test "${with_xxldapdoptions+set}" = set; then
1477   withval="$with_xxldapdoptions"
1478   :
1479 fi
1480
1481 # OpenLDAP --enable-ldapd
1482         # Check whether --enable-ldapd or --disable-ldapd was given.
1483 if test "${enable_ldapd+set}" = set; then
1484   enableval="$enable_ldapd"
1485   
1486         ol_arg=invalid
1487         for ol_val in auto yes no ; do
1488                 if test "$enableval" = "$ol_val" ; then
1489                         ol_arg="$ol_val"
1490                 fi
1491         done
1492         if test "$ol_arg" = "invalid" ; then
1493                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1494         fi
1495         ol_enable_ldapd="$ol_arg"
1496
1497 else
1498         ol_enable_ldapd="no"
1499 fi
1500 # end --enable-ldapd
1501
1502 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1503 if test "${with_xxslapdoptions+set}" = set; then
1504   withval="$with_xxslapdoptions"
1505   :
1506 fi
1507
1508 # OpenLDAP --enable-slapd
1509         # Check whether --enable-slapd or --disable-slapd was given.
1510 if test "${enable_slapd+set}" = set; then
1511   enableval="$enable_slapd"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no ; do
1515                 if test "$enableval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1521         fi
1522         ol_enable_slapd="$ol_arg"
1523
1524 else
1525         ol_enable_slapd="yes"
1526 fi
1527 # end --enable-slapd
1528 # OpenLDAP --enable-cleartext
1529         # Check whether --enable-cleartext or --disable-cleartext was given.
1530 if test "${enable_cleartext+set}" = set; then
1531   enableval="$enable_cleartext"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no ; do
1535                 if test "$enableval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1541         fi
1542         ol_enable_cleartext="$ol_arg"
1543
1544 else
1545         ol_enable_cleartext="yes"
1546 fi
1547 # end --enable-cleartext
1548 # OpenLDAP --enable-crypt
1549         # Check whether --enable-crypt or --disable-crypt was given.
1550 if test "${enable_crypt+set}" = set; then
1551   enableval="$enable_crypt"
1552   
1553         ol_arg=invalid
1554         for ol_val in auto yes no ; do
1555                 if test "$enableval" = "$ol_val" ; then
1556                         ol_arg="$ol_val"
1557                 fi
1558         done
1559         if test "$ol_arg" = "invalid" ; then
1560                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1561         fi
1562         ol_enable_crypt="$ol_arg"
1563
1564 else
1565         ol_enable_crypt="auto"
1566 fi
1567 # end --enable-crypt
1568 # OpenLDAP --enable-modules
1569         # Check whether --enable-modules or --disable-modules was given.
1570 if test "${enable_modules+set}" = set; then
1571   enableval="$enable_modules"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto yes no ; do
1575                 if test "$enableval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1581         fi
1582         ol_enable_modules="$ol_arg"
1583
1584 else
1585         ol_enable_modules="no"
1586 fi
1587 # end --enable-modules
1588 # OpenLDAP --enable-multimaster
1589         # Check whether --enable-multimaster or --disable-multimaster was given.
1590 if test "${enable_multimaster+set}" = set; then
1591   enableval="$enable_multimaster"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto yes no ; do
1595                 if test "$enableval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1601         fi
1602         ol_enable_multimaster="$ol_arg"
1603
1604 else
1605         ol_enable_multimaster="no"
1606 fi
1607 # end --enable-multimaster
1608 # OpenLDAP --enable-phonetic
1609         # Check whether --enable-phonetic or --disable-phonetic was given.
1610 if test "${enable_phonetic+set}" = set; then
1611   enableval="$enable_phonetic"
1612   
1613         ol_arg=invalid
1614         for ol_val in auto yes no ; do
1615                 if test "$enableval" = "$ol_val" ; then
1616                         ol_arg="$ol_val"
1617                 fi
1618         done
1619         if test "$ol_arg" = "invalid" ; then
1620                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1621         fi
1622         ol_enable_phonetic="$ol_arg"
1623
1624 else
1625         ol_enable_phonetic="no"
1626 fi
1627 # end --enable-phonetic
1628 # OpenLDAP --enable-quipu
1629         # Check whether --enable-quipu or --disable-quipu was given.
1630 if test "${enable_quipu+set}" = set; then
1631   enableval="$enable_quipu"
1632   
1633         ol_arg=invalid
1634         for ol_val in auto yes no ; do
1635                 if test "$enableval" = "$ol_val" ; then
1636                         ol_arg="$ol_val"
1637                 fi
1638         done
1639         if test "$ol_arg" = "invalid" ; then
1640                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1641         fi
1642         ol_enable_quipu="$ol_arg"
1643
1644 else
1645         ol_enable_quipu="no"
1646 fi
1647 # end --enable-quipu
1648 # OpenLDAP --enable-rlookups
1649         # Check whether --enable-rlookups or --disable-rlookups was given.
1650 if test "${enable_rlookups+set}" = set; then
1651   enableval="$enable_rlookups"
1652   
1653         ol_arg=invalid
1654         for ol_val in auto yes no ; do
1655                 if test "$enableval" = "$ol_val" ; then
1656                         ol_arg="$ol_val"
1657                 fi
1658         done
1659         if test "$ol_arg" = "invalid" ; then
1660                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1661         fi
1662         ol_enable_rlookups="$ol_arg"
1663
1664 else
1665         ol_enable_rlookups="auto"
1666 fi
1667 # end --enable-rlookups
1668 # OpenLDAP --enable-wrappers
1669         # Check whether --enable-wrappers or --disable-wrappers was given.
1670 if test "${enable_wrappers+set}" = set; then
1671   enableval="$enable_wrappers"
1672   
1673         ol_arg=invalid
1674         for ol_val in auto yes no ; do
1675                 if test "$enableval" = "$ol_val" ; then
1676                         ol_arg="$ol_val"
1677                 fi
1678         done
1679         if test "$ol_arg" = "invalid" ; then
1680                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1681         fi
1682         ol_enable_wrappers="$ol_arg"
1683
1684 else
1685         ol_enable_wrappers="no"
1686 fi
1687 # end --enable-wrappers
1688
1689 # OpenLDAP --enable-bdb2
1690         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1691 if test "${enable_bdb2+set}" = set; then
1692   enableval="$enable_bdb2"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1702         fi
1703         ol_enable_bdb2="$ol_arg"
1704
1705 else
1706         ol_enable_bdb2="no"
1707 fi
1708 # end --enable-bdb2
1709 # OpenLDAP --with-bdb2_module
1710         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1711 if test "${with_bdb2_module+set}" = set; then
1712   withval="$with_bdb2_module"
1713   
1714         ol_arg=invalid
1715         for ol_val in static dynamic ; do
1716                 if test "$withval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1722         fi
1723         ol_with_bdb2_module="$ol_arg"
1724
1725 else
1726         ol_with_bdb2_module="static"
1727 fi
1728 # end --with-bdb2_module
1729
1730 # OpenLDAP --enable-ldap
1731         # Check whether --enable-ldap or --disable-ldap was given.
1732 if test "${enable_ldap+set}" = set; then
1733   enableval="$enable_ldap"
1734   
1735         ol_arg=invalid
1736         for ol_val in auto yes no ; do
1737                 if test "$enableval" = "$ol_val" ; then
1738                         ol_arg="$ol_val"
1739                 fi
1740         done
1741         if test "$ol_arg" = "invalid" ; then
1742                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1743         fi
1744         ol_enable_ldap="$ol_arg"
1745
1746 else
1747         ol_enable_ldap="no"
1748 fi
1749 # end --enable-ldap
1750 # OpenLDAP --with-ldap_module
1751         # Check whether --with-ldap_module or --without-ldap_module was given.
1752 if test "${with_ldap_module+set}" = set; then
1753   withval="$with_ldap_module"
1754   
1755         ol_arg=invalid
1756         for ol_val in static dynamic ; do
1757                 if test "$withval" = "$ol_val" ; then
1758                         ol_arg="$ol_val"
1759                 fi
1760         done
1761         if test "$ol_arg" = "invalid" ; then
1762                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1763         fi
1764         ol_with_ldap_module="$ol_arg"
1765
1766 else
1767         ol_with_ldap_module="static"
1768 fi
1769 # end --with-ldap_module
1770
1771 # OpenLDAP --enable-ldbm
1772         # Check whether --enable-ldbm or --disable-ldbm was given.
1773 if test "${enable_ldbm+set}" = set; then
1774   enableval="$enable_ldbm"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1784         fi
1785         ol_enable_ldbm="$ol_arg"
1786
1787 else
1788         ol_enable_ldbm="yes"
1789 fi
1790 # end --enable-ldbm
1791 # OpenLDAP --with-ldbm_module
1792         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1793 if test "${with_ldbm_module+set}" = set; then
1794   withval="$with_ldbm_module"
1795   
1796         ol_arg=invalid
1797         for ol_val in static dynamic ; do
1798                 if test "$withval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1804         fi
1805         ol_with_ldbm_module="$ol_arg"
1806
1807 else
1808         ol_with_ldbm_module="static"
1809 fi
1810 # end --with-ldbm_module
1811
1812 # OpenLDAP --with-ldbm_api
1813         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1814 if test "${with_ldbm_api+set}" = set; then
1815   withval="$with_ldbm_api"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1819                 if test "$withval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1825         fi
1826         ol_with_ldbm_api="$ol_arg"
1827
1828 else
1829         ol_with_ldbm_api="auto"
1830 fi
1831 # end --with-ldbm_api
1832
1833 # OpenLDAP --with-ldbm_type
1834         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1835 if test "${with_ldbm_type+set}" = set; then
1836   withval="$with_ldbm_type"
1837   
1838         ol_arg=invalid
1839         for ol_val in auto btree hash ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1846         fi
1847         ol_with_ldbm_type="$ol_arg"
1848
1849 else
1850         ol_with_ldbm_type="auto"
1851 fi
1852 # end --with-ldbm_type
1853
1854
1855 # OpenLDAP --enable-passwd
1856         # Check whether --enable-passwd or --disable-passwd was given.
1857 if test "${enable_passwd+set}" = set; then
1858   enableval="$enable_passwd"
1859   
1860         ol_arg=invalid
1861         for ol_val in auto yes no ; do
1862                 if test "$enableval" = "$ol_val" ; then
1863                         ol_arg="$ol_val"
1864                 fi
1865         done
1866         if test "$ol_arg" = "invalid" ; then
1867                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1868         fi
1869         ol_enable_passwd="$ol_arg"
1870
1871 else
1872         ol_enable_passwd="no"
1873 fi
1874 # end --enable-passwd
1875 # OpenLDAP --with-passwd_module
1876         # Check whether --with-passwd_module or --without-passwd_module was given.
1877 if test "${with_passwd_module+set}" = set; then
1878   withval="$with_passwd_module"
1879   
1880         ol_arg=invalid
1881         for ol_val in static dynamic ; do
1882                 if test "$withval" = "$ol_val" ; then
1883                         ol_arg="$ol_val"
1884                 fi
1885         done
1886         if test "$ol_arg" = "invalid" ; then
1887                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1888         fi
1889         ol_with_passwd_module="$ol_arg"
1890
1891 else
1892         ol_with_passwd_module="static"
1893 fi
1894 # end --with-passwd_module
1895
1896 # OpenLDAP --enable-perl
1897         # Check whether --enable-perl or --disable-perl was given.
1898 if test "${enable_perl+set}" = set; then
1899   enableval="$enable_perl"
1900   
1901         ol_arg=invalid
1902         for ol_val in auto yes no ; do
1903                 if test "$enableval" = "$ol_val" ; then
1904                         ol_arg="$ol_val"
1905                 fi
1906         done
1907         if test "$ol_arg" = "invalid" ; then
1908                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1909         fi
1910         ol_enable_perl="$ol_arg"
1911
1912 else
1913         ol_enable_perl="no"
1914 fi
1915 # end --enable-perl
1916 # OpenLDAP --with-perl_module
1917         # Check whether --with-perl_module or --without-perl_module was given.
1918 if test "${with_perl_module+set}" = set; then
1919   withval="$with_perl_module"
1920   
1921         ol_arg=invalid
1922         for ol_val in static dynamic ; do
1923                 if test "$withval" = "$ol_val" ; then
1924                         ol_arg="$ol_val"
1925                 fi
1926         done
1927         if test "$ol_arg" = "invalid" ; then
1928                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1929         fi
1930         ol_with_perl_module="$ol_arg"
1931
1932 else
1933         ol_with_perl_module="static"
1934 fi
1935 # end --with-perl_module
1936
1937 # OpenLDAP --enable-shell
1938         # Check whether --enable-shell or --disable-shell was given.
1939 if test "${enable_shell+set}" = set; then
1940   enableval="$enable_shell"
1941   
1942         ol_arg=invalid
1943         for ol_val in auto yes no ; do
1944                 if test "$enableval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1950         fi
1951         ol_enable_shell="$ol_arg"
1952
1953 else
1954         ol_enable_shell="no"
1955 fi
1956 # end --enable-shell
1957 # OpenLDAP --with-shell_module
1958         # Check whether --with-shell_module or --without-shell_module was given.
1959 if test "${with_shell_module+set}" = set; then
1960   withval="$with_shell_module"
1961   
1962         ol_arg=invalid
1963         for ol_val in static dynamic ; do
1964                 if test "$withval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1970         fi
1971         ol_with_shell_module="$ol_arg"
1972
1973 else
1974         ol_with_shell_module="static"
1975 fi
1976 # end --with-shell_module
1977
1978 # OpenLDAP --enable-tcl
1979         # Check whether --enable-tcl or --disable-tcl was given.
1980 if test "${enable_tcl+set}" = set; then
1981   enableval="$enable_tcl"
1982   
1983         ol_arg=invalid
1984         for ol_val in auto yes no ; do
1985                 if test "$enableval" = "$ol_val" ; then
1986                         ol_arg="$ol_val"
1987                 fi
1988         done
1989         if test "$ol_arg" = "invalid" ; then
1990                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1991         fi
1992         ol_enable_tcl="$ol_arg"
1993
1994 else
1995         ol_enable_tcl="no"
1996 fi
1997 # end --enable-tcl
1998 # OpenLDAP --with-tcl_module
1999         # Check whether --with-tcl_module or --without-tcl_module was given.
2000 if test "${with_tcl_module+set}" = set; then
2001   withval="$with_tcl_module"
2002   
2003         ol_arg=invalid
2004         for ol_val in static dynamic ; do
2005                 if test "$withval" = "$ol_val" ; then
2006                         ol_arg="$ol_val"
2007                 fi
2008         done
2009         if test "$ol_arg" = "invalid" ; then
2010                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2011         fi
2012         ol_with_tcl_module="$ol_arg"
2013
2014 else
2015         ol_with_tcl_module="static"
2016 fi
2017 # end --with-tcl_module
2018
2019
2020 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2021 if test "${with_xxslurpdoptions+set}" = set; then
2022   withval="$with_xxslurpdoptions"
2023   :
2024 fi
2025
2026 # OpenLDAP --enable-slurpd
2027         # Check whether --enable-slurpd or --disable-slurpd was given.
2028 if test "${enable_slurpd+set}" = set; then
2029   enableval="$enable_slurpd"
2030   
2031         ol_arg=invalid
2032         for ol_val in auto yes no ; do
2033                 if test "$enableval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2039         fi
2040         ol_enable_slurpd="$ol_arg"
2041
2042 else
2043         ol_enable_slurpd="auto"
2044 fi
2045 # end --enable-slurpd
2046
2047 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2048 if test "${with_xxliboptions+set}" = set; then
2049   withval="$with_xxliboptions"
2050   :
2051 fi
2052
2053 # Check whether --enable-static or --disable-static was given.
2054 if test "${enable_static+set}" = set; then
2055   enableval="$enable_static"
2056   p=${PACKAGE-default}
2057 case "$enableval" in
2058 yes) enable_static=yes ;;
2059 no) enable_static=no ;;
2060 *)
2061   enable_static=no
2062   # Look at the argument we got.  We use all the common list separators.
2063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2064   for pkg in $enableval; do
2065     if test "X$pkg" = "X$p"; then
2066       enable_static=yes
2067     fi
2068   done
2069   IFS="$ac_save_ifs"
2070   ;;
2071 esac
2072 else
2073   enable_static=yes
2074 fi
2075
2076 # Check whether --enable-shared or --disable-shared was given.
2077 if test "${enable_shared+set}" = set; then
2078   enableval="$enable_shared"
2079   p=${PACKAGE-default}
2080 case "$enableval" in
2081 yes) enable_shared=yes ;;
2082 no) enable_shared=no ;;
2083 *)
2084   enable_shared=no
2085   # Look at the argument we got.  We use all the common list separators.
2086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2087   for pkg in $enableval; do
2088     if test "X$pkg" = "X$p"; then
2089       enable_shared=yes
2090     fi
2091   done
2092   IFS="$ac_save_ifs"
2093   ;;
2094 esac
2095 else
2096   enable_shared=yes
2097 fi
2098
2099
2100 # validate options
2101 if test $ol_enable_dns = yes ; then
2102         if test $ol_enable_referrals = no ; then
2103                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2104         fi
2105         if test $ol_enable_referrals = auto ; then
2106                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2107                 ol_enable_referrals=yes
2108         fi
2109 fi
2110
2111 if test $ol_enable_slapd = no ; then
2112                 if test $ol_enable_bdb2 = yes ; then
2113                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2114         fi
2115         if test $ol_enable_ldap = yes ; then
2116                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2117         fi
2118         if test $ol_enable_ldbm = yes ; then
2119                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2120         fi
2121         if test $ol_enable_passwd = yes ; then
2122                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2123         fi
2124         if test $ol_enable_perl = yes ; then
2125                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2126         fi
2127         if test $ol_enable_shell = yes ; then
2128                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2129         fi
2130         if test $ol_enable_tcl = yes ; then
2131                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2132         fi
2133         if test $ol_enable_modules = yes ; then
2134                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2135         fi
2136         if test $ol_enable_multimaster = yes ; then
2137                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2138         fi
2139         if test $ol_enable_wrappers = yes ; then
2140                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2141         fi
2142         if test $ol_enable_phonetic = yes ; then
2143                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2144         fi
2145         if test $ol_enable_quipu = yes ; then
2146                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2147         fi
2148         if test $ol_enable_rlookups = yes ; then
2149                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2150         fi
2151         if test $ol_with_ldbm_api != auto ; then
2152                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2153         fi
2154         if test $ol_with_ldbm_type != auto ; then
2155                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2156         fi
2157         if test $ol_with_bdb2_module != static ; then
2158                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2159         fi
2160         if test $ol_with_ldap_module != static ; then
2161                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2162         fi
2163         if test $ol_with_ldbm_module != static ; then
2164                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2165         fi
2166         if test $ol_with_passwd_module != static ; then
2167                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2168         fi
2169         if test $ol_with_perl_module != static ; then
2170                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2171         fi
2172         if test $ol_with_shell_module != static ; then
2173                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2174         fi
2175         if test $ol_with_tcl_module != static ; then
2176                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2177         fi
2178         if test $ol_enable_slurpd = yes ; then
2179                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2180         fi
2181
2182         # force settings to no
2183         ol_enable_bdb2=no
2184         ol_enable_ldap=no
2185         ol_enable_ldbm=no
2186         ol_enable_passwd=no
2187         ol_enable_perl=no
2188         ol_enable_shell=no
2189         ol_enable_tcl=no
2190
2191         ol_enable_modules=no
2192         ol_enable_multimaster=no
2193         ol_enable_phonetic=no
2194         ol_enable_quipu=no
2195         ol_enable_rlookups=no
2196         ol_enable_wrappers=no
2197
2198         ol_with_ldbm_api=no
2199         ol_with_ldbm_type=no
2200
2201         ol_with_bdb2_module=static
2202         ol_with_ldap_module=static
2203         ol_with_ldbm_module=static
2204         ol_with_passwd_module=static
2205         ol_with_perl_module=static
2206         ol_with_shell_module=static
2207         ol_with_tcl_module=static
2208
2209         ol_enable_slurpd=no
2210
2211 elif test $ol_enable_ldbm = no ; then
2212         
2213         if test $ol_with_ldbm_api != auto ; then
2214                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2215         fi
2216
2217         if test $ol_with_ldbm_type != auto ; then
2218                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2219         fi
2220
2221         if test $ol_with_ldbm_module != static ; then
2222                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2223         fi
2224
2225         if test $ol_enable_bdb2 = yes ; then
2226                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2227         fi
2228
2229         if test $ol_enable_modules != yes -a \
2230                 $ol_enable_ldap = no -a \
2231                 $ol_enable_passwd = no -a \
2232                 $ol_enable_perl = no -a \
2233                 $ol_enable_shell = no -a \
2234                 $ol_enable_tcl = no ; then
2235                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2236         fi
2237
2238         ol_with_ldbm_api=no
2239         ol_with_ldbm_type=no
2240         ol_with_ldbm_module=static
2241
2242 elif test $ol_enable_bdb2 = yes ; then
2243         
2244         if test $ol_with_ldbm_api != auto -a \
2245                 $ol_with_ldbm_api != db2 ; then
2246                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2247         fi
2248
2249         ol_with_ldbm_api=db2
2250
2251 else
2252         
2253         if test $ol_enable_bdb2 != no ; then
2254                 if test $ol_with_ldbm_api != auto -a \
2255                         $ol_with_ldbm_api != db2 ; then
2256                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2257                         ol_enable_bdb2=no
2258                 fi
2259         fi
2260
2261         if test $ol_with_ldbm_api = gdbm -a \
2262                 $ol_with_ldbm_type = btree ; then
2263                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2264         fi
2265         if test $ol_with_ldbm_api = mdbm -a \
2266                 $ol_with_ldbm_type = btree ; then
2267                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2268         fi
2269         if test $ol_with_ldbm_api = ndbm -a \
2270                 $ol_with_ldbm_type = btree ; then
2271                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2272         fi
2273 fi
2274
2275 if test $ol_enable_slurpd = yes ; then
2276                 if test $ol_with_threads = no ; then
2277                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2278         fi
2279 fi
2280
2281 echo "$ac_t""done" 1>&6
2282
2283 ## Initialize vars
2284 LDAP_LIBS=
2285 LDIF_LIBS=
2286 LDBM_LIBS=
2287 LTHREAD_LIBS=
2288 LUTIL_LIBS=
2289
2290 LDAPD_LIBS=
2291 SLAPD_LIBS=
2292 SLURPD_LIBS=
2293
2294 BUILD_LDAPD=no
2295 BUILD_SLAPD=no
2296 BUILD_SLURPD=no
2297
2298 BUILD_BDB2=no
2299 BUILD_LDAP=no
2300 BUILD_LDBM=no
2301 BUILD_PASSWD=no
2302 BUILD_PERL=no
2303 BUILD_QUIPU=no
2304 BUILD_SHELL=no
2305 BUILD_TCL=no
2306 BUILD_THREAD=no
2307
2308 BUILD_BDB2_DYNAMIC=static
2309 BUILD_LDAP_DYNAMIC=static
2310 BUILD_LDBM_DYNAMIC=static
2311 BUILD_PASSWD_DYNAMIC=static
2312 BUILD_PERL_DYNAMIC=static
2313 BUILD_SHELL_DYNAMIC=static
2314 BUILD_TCL_DYNAMIC=static
2315
2316 SLAPD_MODULES_LDFLAGS=
2317 SLAPD_MODULES_CPPFLAGS=
2318 SLAPD_MODULES_LIST=
2319
2320 SLAPD_PERL_LDFLAGS=
2321 SLAPD_PERL_CPPFLAGS=
2322
2323 KRB_LIBS=
2324 READLINE_LIBS=
2325 SASL_LIBS=
2326 TERMCAP_LIBS=
2327 TLS_LIBS=
2328 MODULES_LIBS=
2329
2330
2331
2332 cat >> confdefs.h <<\EOF
2333 #define HAVE_MKVERSION 1
2334 EOF
2335
2336
2337
2338
2339
2340 ol_aix_threads=no
2341 case "$target" in
2342 *-*-aix*)       if test -z "$CC" ; then
2343                 case "$ol_with_threads" in
2344                 auto | yes |  posix) ol_aix_threads=yes ;;
2345                 esac
2346         fi
2347 ;;
2348 esac
2349
2350 if test $ol_aix_threads = yes ; then
2351         if test -z "${CC}" ; then
2352                 for ac_prog in cc_r xlc_r cc
2353 do
2354 # Extract the first word of "$ac_prog", so it can be a program name with args.
2355 set dummy $ac_prog; ac_word=$2
2356 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2357 echo "configure:2358: checking for $ac_word" >&5
2358 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2359   echo $ac_n "(cached) $ac_c" 1>&6
2360 else
2361   if test -n "$CC"; then
2362   ac_cv_prog_CC="$CC" # Let the user override the test.
2363 else
2364   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2365   ac_dummy="$PATH"
2366   for ac_dir in $ac_dummy; do
2367     test -z "$ac_dir" && ac_dir=.
2368     if test -f $ac_dir/$ac_word; then
2369       ac_cv_prog_CC="$ac_prog"
2370       break
2371     fi
2372   done
2373   IFS="$ac_save_ifs"
2374 fi
2375 fi
2376 CC="$ac_cv_prog_CC"
2377 if test -n "$CC"; then
2378   echo "$ac_t""$CC" 1>&6
2379 else
2380   echo "$ac_t""no" 1>&6
2381 fi
2382
2383 test -n "$CC" && break
2384 done
2385
2386
2387                 if test "$CC" = cc ; then
2388                                                 if test $ol_with_threads != auto ; then
2389                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2390                         else
2391                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2392                         fi
2393                         ol_with_threads=no
2394                 fi
2395         fi
2396
2397         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2398                 ol_with_threads=posix
2399                 ol_cv_pthread_create=yes
2400         fi
2401 fi
2402
2403 if test -z "${CC}"; then
2404         for ac_prog in cc
2405 do
2406 # Extract the first word of "$ac_prog", so it can be a program name with args.
2407 set dummy $ac_prog; ac_word=$2
2408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2409 echo "configure:2410: checking for $ac_word" >&5
2410 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413   if test -n "$CC"; then
2414   ac_cv_prog_CC="$CC" # Let the user override the test.
2415 else
2416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2417   ac_dummy="$PATH"
2418   for ac_dir in $ac_dummy; do
2419     test -z "$ac_dir" && ac_dir=.
2420     if test -f $ac_dir/$ac_word; then
2421       ac_cv_prog_CC="$ac_prog"
2422       break
2423     fi
2424   done
2425   IFS="$ac_save_ifs"
2426 fi
2427 fi
2428 CC="$ac_cv_prog_CC"
2429 if test -n "$CC"; then
2430   echo "$ac_t""$CC" 1>&6
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434
2435 test -n "$CC" && break
2436 done
2437
2438 fi
2439
2440
2441
2442 # Check whether --enable-fast-install or --disable-fast-install was given.
2443 if test "${enable_fast_install+set}" = set; then
2444   enableval="$enable_fast_install"
2445   p=${PACKAGE-default}
2446 case "$enableval" in
2447 yes) enable_fast_install=yes ;;
2448 no) enable_fast_install=no ;;
2449 *)
2450   enable_fast_install=no
2451   # Look at the argument we got.  We use all the common list separators.
2452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2453   for pkg in $enableval; do
2454     if test "X$pkg" = "X$p"; then
2455       enable_fast_install=yes
2456     fi
2457   done
2458   IFS="$ac_save_ifs"
2459   ;;
2460 esac
2461 else
2462   enable_fast_install=yes
2463 fi
2464
2465 # Extract the first word of "ranlib", so it can be a program name with args.
2466 set dummy ranlib; ac_word=$2
2467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2468 echo "configure:2469: checking for $ac_word" >&5
2469 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   if test -n "$RANLIB"; then
2473   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2474 else
2475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2476   ac_dummy="$PATH"
2477   for ac_dir in $ac_dummy; do
2478     test -z "$ac_dir" && ac_dir=.
2479     if test -f $ac_dir/$ac_word; then
2480       ac_cv_prog_RANLIB="ranlib"
2481       break
2482     fi
2483   done
2484   IFS="$ac_save_ifs"
2485   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2486 fi
2487 fi
2488 RANLIB="$ac_cv_prog_RANLIB"
2489 if test -n "$RANLIB"; then
2490   echo "$ac_t""$RANLIB" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494
2495 # Extract the first word of "gcc", so it can be a program name with args.
2496 set dummy gcc; ac_word=$2
2497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_word" >&5
2499 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   if test -n "$CC"; then
2503   ac_cv_prog_CC="$CC" # Let the user override the test.
2504 else
2505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       ac_cv_prog_CC="gcc"
2511       break
2512     fi
2513   done
2514   IFS="$ac_save_ifs"
2515 fi
2516 fi
2517 CC="$ac_cv_prog_CC"
2518 if test -n "$CC"; then
2519   echo "$ac_t""$CC" 1>&6
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523
2524 if test -z "$CC"; then
2525   # Extract the first word of "cc", so it can be a program name with args.
2526 set dummy cc; ac_word=$2
2527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2528 echo "configure:2529: checking for $ac_word" >&5
2529 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2530   echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532   if test -n "$CC"; then
2533   ac_cv_prog_CC="$CC" # Let the user override the test.
2534 else
2535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2536   ac_prog_rejected=no
2537   ac_dummy="$PATH"
2538   for ac_dir in $ac_dummy; do
2539     test -z "$ac_dir" && ac_dir=.
2540     if test -f $ac_dir/$ac_word; then
2541       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2542         ac_prog_rejected=yes
2543         continue
2544       fi
2545       ac_cv_prog_CC="cc"
2546       break
2547     fi
2548   done
2549   IFS="$ac_save_ifs"
2550 if test $ac_prog_rejected = yes; then
2551   # We found a bogon in the path, so make sure we never use it.
2552   set dummy $ac_cv_prog_CC
2553   shift
2554   if test $# -gt 0; then
2555     # We chose a different compiler from the bogus one.
2556     # However, it has the same basename, so the bogon will be chosen
2557     # first if we set CC to just the basename; use the full file name.
2558     shift
2559     set dummy "$ac_dir/$ac_word" "$@"
2560     shift
2561     ac_cv_prog_CC="$@"
2562   fi
2563 fi
2564 fi
2565 fi
2566 CC="$ac_cv_prog_CC"
2567 if test -n "$CC"; then
2568   echo "$ac_t""$CC" 1>&6
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572
2573   if test -z "$CC"; then
2574     case "`uname -s`" in
2575     *win32* | *WIN32* | *CYGWIN*)
2576       # Extract the first word of "cl", so it can be a program name with args.
2577 set dummy cl; ac_word=$2
2578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2579 echo "configure:2580: checking for $ac_word" >&5
2580 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   if test -n "$CC"; then
2584   ac_cv_prog_CC="$CC" # Let the user override the test.
2585 else
2586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2587   ac_dummy="$PATH"
2588   for ac_dir in $ac_dummy; do
2589     test -z "$ac_dir" && ac_dir=.
2590     if test -f $ac_dir/$ac_word; then
2591       ac_cv_prog_CC="cl"
2592       break
2593     fi
2594   done
2595   IFS="$ac_save_ifs"
2596 fi
2597 fi
2598 CC="$ac_cv_prog_CC"
2599 if test -n "$CC"; then
2600   echo "$ac_t""$CC" 1>&6
2601 else
2602   echo "$ac_t""no" 1>&6
2603 fi
2604  ;;
2605     esac
2606   fi
2607   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2608 fi
2609
2610 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2611 echo "configure:2612: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2612
2613 ac_ext=c
2614 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2615 ac_cpp='$CPP $CPPFLAGS'
2616 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2617 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2618 cross_compiling=$ac_cv_prog_cc_cross
2619
2620 cat > conftest.$ac_ext << EOF
2621
2622 #line 2623 "configure"
2623 #include "confdefs.h"
2624
2625 main(){return(0);}
2626 EOF
2627 if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2628   ac_cv_prog_cc_works=yes
2629   # If we can't run a trivial program, we are probably using a cross compiler.
2630   if (./conftest; exit) 2>/dev/null; then
2631     ac_cv_prog_cc_cross=no
2632   else
2633     ac_cv_prog_cc_cross=yes
2634   fi
2635 else
2636   echo "configure: failed program was:" >&5
2637   cat conftest.$ac_ext >&5
2638   ac_cv_prog_cc_works=no
2639 fi
2640 rm -fr conftest*
2641 ac_ext=c
2642 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2643 ac_cpp='$CPP $CPPFLAGS'
2644 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2645 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2646 cross_compiling=$ac_cv_prog_cc_cross
2647
2648 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2649 if test $ac_cv_prog_cc_works = no; then
2650   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2651 fi
2652 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2653 echo "configure:2654: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2654 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2655 cross_compiling=$ac_cv_prog_cc_cross
2656
2657 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2658 echo "configure:2659: checking whether we are using GNU C" >&5
2659 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   cat > conftest.c <<EOF
2663 #ifdef __GNUC__
2664   yes;
2665 #endif
2666 EOF
2667 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2668   ac_cv_prog_gcc=yes
2669 else
2670   ac_cv_prog_gcc=no
2671 fi
2672 fi
2673
2674 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2675
2676 if test $ac_cv_prog_gcc = yes; then
2677   GCC=yes
2678 else
2679   GCC=
2680 fi
2681
2682 ac_test_CFLAGS="${CFLAGS+set}"
2683 ac_save_CFLAGS="$CFLAGS"
2684 CFLAGS=
2685 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2686 echo "configure:2687: checking whether ${CC-cc} accepts -g" >&5
2687 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2688   echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690   echo 'void f(){}' > conftest.c
2691 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2692   ac_cv_prog_cc_g=yes
2693 else
2694   ac_cv_prog_cc_g=no
2695 fi
2696 rm -f conftest*
2697
2698 fi
2699
2700 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2701 if test "$ac_test_CFLAGS" = set; then
2702   CFLAGS="$ac_save_CFLAGS"
2703 elif test $ac_cv_prog_cc_g = yes; then
2704   if test "$GCC" = yes; then
2705     CFLAGS="-g -O2"
2706   else
2707     CFLAGS="-g"
2708   fi
2709 else
2710   if test "$GCC" = yes; then
2711     CFLAGS="-O2"
2712   else
2713     CFLAGS=
2714   fi
2715 fi
2716
2717 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2718 if test "${with_gnu_ld+set}" = set; then
2719   withval="$with_gnu_ld"
2720   test "$withval" = no || with_gnu_ld=yes
2721 else
2722   with_gnu_ld=no
2723 fi
2724
2725 ac_prog=ld
2726 if test "$ac_cv_prog_gcc" = yes; then
2727   # Check if gcc -print-prog-name=ld gives a path.
2728   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2729 echo "configure:2730: checking for ld used by GCC" >&5
2730   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2731   case "$ac_prog" in
2732     # Accept absolute paths.
2733     [\\/]* | [A-Za-z]:[\\/]*)
2734       re_direlt='/[^/][^/]*/\.\./'
2735       # Canonicalize the path of ld
2736       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2737       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2738         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2739       done
2740       test -z "$LD" && LD="$ac_prog"
2741       ;;
2742   "")
2743     # If it fails, then pretend we aren't using GCC.
2744     ac_prog=ld
2745     ;;
2746   *)
2747     # If it is relative, then search for the first ld in PATH.
2748     with_gnu_ld=unknown
2749     ;;
2750   esac
2751 elif test "$with_gnu_ld" = yes; then
2752   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2753 echo "configure:2754: checking for GNU ld" >&5
2754 else
2755   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2756 echo "configure:2757: checking for non-GNU ld" >&5
2757 fi
2758 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2759   echo $ac_n "(cached) $ac_c" 1>&6
2760 else
2761   if test -z "$LD"; then
2762   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2763   for ac_dir in $PATH; do
2764     test -z "$ac_dir" && ac_dir=.
2765     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2766       ac_cv_path_LD="$ac_dir/$ac_prog"
2767       # Check to see if the program is GNU ld.  I'd rather use --version,
2768       # but apparently some GNU ld's only accept -v.
2769       # Break only if it was the GNU/non-GNU ld that we prefer.
2770       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2771         test "$with_gnu_ld" != no && break
2772       else
2773         test "$with_gnu_ld" != yes && break
2774       fi
2775     fi
2776   done
2777   IFS="$ac_save_ifs"
2778 else
2779   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2780 fi
2781 fi
2782
2783 LD="$ac_cv_path_LD"
2784 if test -n "$LD"; then
2785   echo "$ac_t""$LD" 1>&6
2786 else
2787   echo "$ac_t""no" 1>&6
2788 fi
2789 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2790
2791 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2792 echo "configure:2793: checking if the linker ($LD) is GNU ld" >&5
2793 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2797 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2798   ac_cv_prog_gnu_ld=yes
2799 else
2800   ac_cv_prog_gnu_ld=no
2801 fi
2802 fi
2803
2804 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2805
2806
2807 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2808 echo "configure:2809: checking for BSD-compatible nm" >&5
2809 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2810   echo $ac_n "(cached) $ac_c" 1>&6
2811 else
2812   if test -n "$NM"; then
2813   # Let the user override the test.
2814   ac_cv_path_NM="$NM"
2815 else
2816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2817   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2818     test -z "$ac_dir" && ac_dir=.
2819     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2820       # Check to see if the nm accepts a BSD-compat flag.
2821       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2822       #   nm: unknown option "B" ignored
2823       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2824         ac_cv_path_NM="$ac_dir/nm -B"
2825         break
2826       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2827         ac_cv_path_NM="$ac_dir/nm -p"
2828         break
2829       else
2830         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2831         continue # so that we can try to find one that supports BSD flags
2832       fi
2833     fi
2834   done
2835   IFS="$ac_save_ifs"
2836   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2837 fi
2838 fi
2839
2840 NM="$ac_cv_path_NM"
2841 echo "$ac_t""$NM" 1>&6
2842
2843
2844 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2845 echo "configure:2846: checking whether ln -s works" >&5
2846 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2847   echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849   rm -f conftestdata
2850 if ln -s X conftestdata 2>/dev/null
2851 then
2852   rm -f conftestdata
2853   ac_cv_prog_LN_S="ln -s"
2854 else
2855   ac_cv_prog_LN_S=ln
2856 fi
2857 fi
2858 LN_S="$ac_cv_prog_LN_S"
2859 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2860   echo "$ac_t""yes" 1>&6
2861 else
2862   echo "$ac_t""no" 1>&6
2863 fi
2864
2865
2866 # Check for any special flags to pass to ltconfig.
2867 libtool_flags="--cache-file=$cache_file"
2868 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2869 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2870 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2871 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2872 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2873 libtool_flags="$libtool_flags --enable-dlopen"
2874
2875 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2876 if test "${enable_libtool_lock+set}" = set; then
2877   enableval="$enable_libtool_lock"
2878   :
2879 fi
2880
2881 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2882 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2883
2884 # Some flags need to be propagated to the compiler or linker for good
2885 # libtool support.
2886 case "$host" in
2887 *-*-irix6*)
2888   # Find out which ABI we are using.
2889   echo '#line 2890 "configure"' > conftest.$ac_ext
2890   if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2891     case "`/usr/bin/file conftest.o`" in
2892     *32-bit*)
2893       LD="${LD-ld} -32"
2894       ;;
2895     *N32*)
2896       LD="${LD-ld} -n32"
2897       ;;
2898     *64-bit*)
2899       LD="${LD-ld} -64"
2900       ;;
2901     esac
2902   fi
2903   rm -rf conftest*
2904   ;;
2905
2906 *-*-sco3.2v5*)
2907   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2908   SAVE_CFLAGS="$CFLAGS"
2909   CFLAGS="$CFLAGS -belf"
2910   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2911 echo "configure:2912: checking whether the C compiler needs -belf" >&5
2912 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   cat > conftest.$ac_ext <<EOF
2916 #line 2917 "configure"
2917 #include "confdefs.h"
2918
2919 int main() {
2920
2921 ; return 0; }
2922 EOF
2923 if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2924   rm -rf conftest*
2925   lt_cv_cc_needs_belf=yes
2926 else
2927   echo "configure: failed program was:" >&5
2928   cat conftest.$ac_ext >&5
2929   rm -rf conftest*
2930   lt_cv_cc_needs_belf=no
2931 fi
2932 rm -f conftest*
2933 fi
2934
2935 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2936   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2937     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2938     CFLAGS="$SAVE_CFLAGS"
2939   fi
2940   ;;
2941
2942
2943 esac
2944
2945
2946 # Save cache, so that ltconfig can load it
2947
2948
2949 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2950 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2951 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2952 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2953 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2954 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2955 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2956 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2957
2958 # Reload cache, that may have been modified by ltconfig
2959
2960
2961 # This can be used to rebuild libtool when needed
2962 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2963
2964 # Always use our own libtool.
2965 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2966
2967 # Redirect the config.log output again, so that the ltconfig log is not
2968 # clobbered by the next message.
2969 exec 5>>./config.log
2970
2971
2972 for ac_prog in mawk gawk nawk awk
2973 do
2974 # Extract the first word of "$ac_prog", so it can be a program name with args.
2975 set dummy $ac_prog; ac_word=$2
2976 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2977 echo "configure:2978: checking for $ac_word" >&5
2978 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   if test -n "$AWK"; then
2982   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2983 else
2984   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2985   ac_dummy="$PATH"
2986   for ac_dir in $ac_dummy; do
2987     test -z "$ac_dir" && ac_dir=.
2988     if test -f $ac_dir/$ac_word; then
2989       ac_cv_prog_AWK="$ac_prog"
2990       break
2991     fi
2992   done
2993   IFS="$ac_save_ifs"
2994 fi
2995 fi
2996 AWK="$ac_cv_prog_AWK"
2997 if test -n "$AWK"; then
2998   echo "$ac_t""$AWK" 1>&6
2999 else
3000   echo "$ac_t""no" 1>&6
3001 fi
3002
3003 test -n "$AWK" && break
3004 done
3005
3006 # test for ln hardlink support
3007 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3008 echo "configure:3009: checking whether ln works" >&5
3009 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3010   echo $ac_n "(cached) $ac_c" 1>&6
3011 else
3012   rm -f conftest.src conftest.dst
3013 echo "conftest" > conftest.src
3014 if ln conftest.src conftest.dst 2>/dev/null
3015 then
3016   ol_cv_prog_LN_H="ln"
3017 else
3018   ol_cv_prog_LN_H="cp"
3019 fi
3020 rm -f conftest.src conftest.dst
3021
3022 fi
3023 LN_H="$ol_cv_prog_LN_H"
3024 if test "$ol_cv_prog_LN_H" = "ln"; then
3025         echo "$ac_t""yes" 1>&6
3026 else
3027         echo "$ac_t""no" 1>&6
3028 fi
3029
3030 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3031 echo "configure:3032: checking whether ln -s works" >&5
3032 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   rm -f conftestdata
3036 if ln -s X conftestdata 2>/dev/null
3037 then
3038   rm -f conftestdata
3039   ac_cv_prog_LN_S="ln -s"
3040 else
3041   ac_cv_prog_LN_S=ln
3042 fi
3043 fi
3044 LN_S="$ac_cv_prog_LN_S"
3045 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3046   echo "$ac_t""yes" 1>&6
3047 else
3048   echo "$ac_t""no" 1>&6
3049 fi
3050
3051
3052 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3053         LN_S="$LN_H"
3054 fi
3055
3056 # Extract the first word of "sendmail", so it can be a program name with args.
3057 set dummy sendmail; ac_word=$2
3058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3059 echo "configure:3060: checking for $ac_word" >&5
3060 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   case "$SENDMAIL" in
3064   /*)
3065   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3066   ;;
3067   ?:/*)                  
3068   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3069   ;;
3070   *)
3071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3072   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3073   for ac_dir in $ac_dummy; do 
3074     test -z "$ac_dir" && ac_dir=.
3075     if test -f $ac_dir/$ac_word; then
3076       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3077       break
3078     fi
3079   done
3080   IFS="$ac_save_ifs"
3081   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3082   ;;
3083 esac
3084 fi
3085 SENDMAIL="$ac_cv_path_SENDMAIL"
3086 if test -n "$SENDMAIL"; then
3087   echo "$ac_t""$SENDMAIL" 1>&6
3088 else
3089   echo "$ac_t""no" 1>&6
3090 fi
3091
3092 # Extract the first word of "vi", so it can be a program name with args.
3093 set dummy vi; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   case "$EDITOR" in
3100   /*)
3101   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3102   ;;
3103   ?:/*)                  
3104   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3105   ;;
3106   *)
3107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3108   ac_dummy="$PATH:/usr/ucb"
3109   for ac_dir in $ac_dummy; do 
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/$ac_word; then
3112       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3113       break
3114     fi
3115   done
3116   IFS="$ac_save_ifs"
3117   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3118   ;;
3119 esac
3120 fi
3121 EDITOR="$ac_cv_path_EDITOR"
3122 if test -n "$EDITOR"; then
3123   echo "$ac_t""$EDITOR" 1>&6
3124 else
3125   echo "$ac_t""no" 1>&6
3126 fi
3127
3128 # Extract the first word of "finger", so it can be a program name with args.
3129 set dummy finger; ac_word=$2
3130 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3131 echo "configure:3132: checking for $ac_word" >&5
3132 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   case "$FINGER" in
3136   /*)
3137   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3138   ;;
3139   ?:/*)                  
3140   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3141   ;;
3142   *)
3143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3144   ac_dummy="$PATH:/usr/ucb"
3145   for ac_dir in $ac_dummy; do 
3146     test -z "$ac_dir" && ac_dir=.
3147     if test -f $ac_dir/$ac_word; then
3148       ac_cv_path_FINGER="$ac_dir/$ac_word"
3149       break
3150     fi
3151   done
3152   IFS="$ac_save_ifs"
3153   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3154   ;;
3155 esac
3156 fi
3157 FINGER="$ac_cv_path_FINGER"
3158 if test -n "$FINGER"; then
3159   echo "$ac_t""$FINGER" 1>&6
3160 else
3161   echo "$ac_t""no" 1>&6
3162 fi
3163
3164
3165 ol_link_perl=no
3166 if test $ol_enable_perl != no ; then
3167         # Extract the first word of "perl", so it can be a program name with args.
3168 set dummy perl; ac_word=$2
3169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3170 echo "configure:3171: checking for $ac_word" >&5
3171 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3172   echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174   case "$PERLBIN" in
3175   /*)
3176   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3177   ;;
3178   ?:/*)                  
3179   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3180   ;;
3181   *)
3182   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3183   ac_dummy="$PATH"
3184   for ac_dir in $ac_dummy; do 
3185     test -z "$ac_dir" && ac_dir=.
3186     if test -f $ac_dir/$ac_word; then
3187       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3188       break
3189     fi
3190   done
3191   IFS="$ac_save_ifs"
3192   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3193   ;;
3194 esac
3195 fi
3196 PERLBIN="$ac_cv_path_PERLBIN"
3197 if test -n "$PERLBIN"; then
3198   echo "$ac_t""$PERLBIN" 1>&6
3199 else
3200   echo "$ac_t""no" 1>&6
3201 fi
3202
3203
3204         if test "no$PERLBIN" = "no" ; then
3205                 if test $ol_enable_perl = yes ; then
3206                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3207                 fi
3208
3209         else
3210                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3211                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3212
3213                                 ol_link_perl=yes
3214         fi
3215 fi
3216
3217 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3218 echo "configure:3219: checking how to run the C preprocessor" >&5
3219 # On Suns, sometimes $CPP names a directory.
3220 if test -n "$CPP" && test -d "$CPP"; then
3221   CPP=
3222 fi
3223 if test -z "$CPP"; then
3224 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227     # This must be in double quotes, not single quotes, because CPP may get
3228   # substituted into the Makefile and "${CC-cc}" will confuse make.
3229   CPP="${CC-cc} -E"
3230   # On the NeXT, cc -E runs the code through the compiler's parser,
3231   # not just through cpp.
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <assert.h>
3236 Syntax Error
3237 EOF
3238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3239 { (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241 if test -z "$ac_err"; then
3242   :
3243 else
3244   echo "$ac_err" >&5
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247   rm -rf conftest*
3248   CPP="${CC-cc} -E -traditional-cpp"
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <assert.h>
3253 Syntax Error
3254 EOF
3255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3256 { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3258 if test -z "$ac_err"; then
3259   :
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   CPP="${CC-cc} -nologo -E"
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include <assert.h>
3270 Syntax Error
3271 EOF
3272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3273 { (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3275 if test -z "$ac_err"; then
3276   :
3277 else
3278   echo "$ac_err" >&5
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   CPP=/lib/cpp
3283 fi
3284 rm -f conftest*
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289   ac_cv_prog_CPP="$CPP"
3290 fi
3291   CPP="$ac_cv_prog_CPP"
3292 else
3293   ac_cv_prog_CPP="$CPP"
3294 fi
3295 echo "$ac_t""$CPP" 1>&6
3296
3297
3298 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3299         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3300
3301 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3302         echo "configure: warning: programs compiled here do run here..." 1>&2
3303         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3304
3305 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3306         echo "configure: warning: programs compiled here do not run here..." 1>&2
3307         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3308 fi
3309
3310 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3311 echo "configure:3312: checking for AIX" >&5
3312 cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 #ifdef _AIX
3316   yes
3317 #endif
3318
3319 EOF
3320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3321   egrep "yes" >/dev/null 2>&1; then
3322   rm -rf conftest*
3323   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3324 #define _ALL_SOURCE 1
3325 EOF
3326
3327 else
3328   rm -rf conftest*
3329   echo "$ac_t""no" 1>&6
3330 fi
3331 rm -f conftest*
3332
3333
3334 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3335 echo "configure:3336: checking for POSIXized ISC" >&5
3336 if test -d /etc/conf/kconfig.d &&
3337   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3338 then
3339   echo "$ac_t""yes" 1>&6
3340   ISC=yes # If later tests want to check for ISC.
3341   cat >> confdefs.h <<\EOF
3342 #define _POSIX_SOURCE 1
3343 EOF
3344
3345   if test "$GCC" = yes; then
3346     CC="$CC -posix"
3347   else
3348     CC="$CC -Xp"
3349   fi
3350 else
3351   echo "$ac_t""no" 1>&6
3352   ISC=
3353 fi
3354
3355 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3356 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3357 echo "configure:3358: checking for minix/config.h" >&5
3358 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 #include <minix/config.h>
3365 EOF
3366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3367 { (eval echo configure:3368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3369 if test -z "$ac_err"; then
3370   rm -rf conftest*
3371   eval "ac_cv_header_$ac_safe=yes"
3372 else
3373   echo "$ac_err" >&5
3374   echo "configure: failed program was:" >&5
3375   cat conftest.$ac_ext >&5
3376   rm -rf conftest*
3377   eval "ac_cv_header_$ac_safe=no"
3378 fi
3379 rm -f conftest*
3380 fi
3381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3382   echo "$ac_t""yes" 1>&6
3383   MINIX=yes
3384 else
3385   echo "$ac_t""no" 1>&6
3386 MINIX=
3387 fi
3388
3389 if test "$MINIX" = yes; then
3390   cat >> confdefs.h <<\EOF
3391 #define _POSIX_SOURCE 1
3392 EOF
3393
3394   cat >> confdefs.h <<\EOF
3395 #define _POSIX_1_SOURCE 2
3396 EOF
3397
3398   cat >> confdefs.h <<\EOF
3399 #define _MINIX 1
3400 EOF
3401
3402 fi
3403
3404
3405 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3406 echo "configure:3407: checking for Cygwin environment" >&5
3407 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413
3414 int main() {
3415
3416 #ifndef __CYGWIN__
3417 #define __CYGWIN__ __CYGWIN32__
3418 #endif
3419 return __CYGWIN__;
3420 ; return 0; }
3421 EOF
3422 if { (eval echo configure:3423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3423   rm -rf conftest*
3424   ac_cv_cygwin=yes
3425 else
3426   echo "configure: failed program was:" >&5
3427   cat conftest.$ac_ext >&5
3428   rm -rf conftest*
3429   ac_cv_cygwin=no
3430 fi
3431 rm -f conftest*
3432 fi
3433
3434 echo "$ac_t""$ac_cv_cygwin" 1>&6
3435 CYGWIN=
3436 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3437 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3438 echo "configure:3439: checking for mingw32 environment" >&5
3439 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445
3446 int main() {
3447 return __MINGW32__;
3448 ; return 0; }
3449 EOF
3450 if { (eval echo configure:3451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3451   rm -rf conftest*
3452   ac_cv_mingw32=yes
3453 else
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   rm -rf conftest*
3457   ac_cv_mingw32=no
3458 fi
3459 rm -f conftest*
3460 fi
3461
3462 echo "$ac_t""$ac_cv_mingw32" 1>&6
3463 MINGW32=
3464 test "$ac_cv_mingw32" = yes && MINGW32=yes
3465 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3466 echo "configure:3467: checking for EMX OS/2 environment" >&5
3467 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473
3474 int main() {
3475 return __EMX__;
3476 ; return 0; }
3477 EOF
3478 if { (eval echo configure:3479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3479   rm -rf conftest*
3480   ac_cv_emxos2=yes
3481 else
3482   echo "configure: failed program was:" >&5
3483   cat conftest.$ac_ext >&5
3484   rm -rf conftest*
3485   ac_cv_emxos2=no
3486 fi
3487 rm -f conftest*
3488 fi
3489
3490 echo "$ac_t""$ac_cv_emxos2" 1>&6
3491 EMXOS2=
3492 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3493
3494
3495
3496 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3497 echo "configure:3498: checking for executable suffix" >&5
3498 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3502   ac_cv_exeext=.exe
3503 else
3504   rm -f conftest*
3505   echo 'int main () { return 0; }' > conftest.$ac_ext
3506   ac_cv_exeext=
3507   if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3508     for file in conftest.*; do
3509       case $file in
3510       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3511       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3512       esac
3513     done
3514   else
3515     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3516   fi
3517   rm -f conftest*
3518   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3519 fi
3520 fi
3521
3522 EXEEXT=""
3523 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3524 echo "$ac_t""${ac_cv_exeext}" 1>&6
3525 ac_exeext=$EXEEXT
3526
3527 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3528 echo "configure:3529: checking for object suffix" >&5
3529 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   rm -f conftest*
3533 echo 'int i = 1;' > conftest.$ac_ext
3534 if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3535   for ac_file in conftest.*; do
3536     case $ac_file in
3537     *.c) ;;
3538     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3539     esac
3540   done
3541 else
3542   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3543 fi
3544 rm -f conftest*
3545 fi
3546
3547 echo "$ac_t""$ac_cv_objext" 1>&6
3548 OBJEXT=$ac_cv_objext
3549 ac_objext=$ac_cv_objext
3550
3551
3552 cat >> confdefs.h <<EOF
3553 #define EXEEXT "${EXEEXT}"
3554 EOF
3555
3556
3557 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3558 echo "configure:3559: checking for be_app in -lbe" >&5
3559 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3560 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3561   echo $ac_n "(cached) $ac_c" 1>&6
3562 else
3563   ac_save_LIBS="$LIBS"
3564 LIBS="-lbe -lroot -lnet $LIBS"
3565 cat > conftest.$ac_ext <<EOF
3566 #line 3567 "configure"
3567 #include "confdefs.h"
3568 /* Override any gcc2 internal prototype to avoid an error.  */
3569 /* We use char because int might match the return type of a gcc2
3570     builtin and then its argument prototype would still apply.  */
3571 char be_app();
3572
3573 int main() {
3574 be_app()
3575 ; return 0; }
3576 EOF
3577 if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3578   rm -rf conftest*
3579   eval "ac_cv_lib_$ac_lib_var=yes"
3580 else
3581   echo "configure: failed program was:" >&5
3582   cat conftest.$ac_ext >&5
3583   rm -rf conftest*
3584   eval "ac_cv_lib_$ac_lib_var=no"
3585 fi
3586 rm -f conftest*
3587 LIBS="$ac_save_LIBS"
3588
3589 fi
3590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3591   echo "$ac_t""yes" 1>&6
3592   LIBS="$LIBS -lbe -lroot -lnet"
3593 else
3594   echo "$ac_t""no" 1>&6
3595 :
3596 fi
3597
3598
3599
3600
3601
3602 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3603 echo "configure:3604: checking for ${CC-cc} option to accept ANSI C" >&5
3604 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   am_cv_prog_cc_stdc=no
3608 ac_save_CC="$CC"
3609 # Don't try gcc -ansi; that turns off useful extensions and
3610 # breaks some systems' header files.
3611 # AIX                   -qlanglvl=ansi
3612 # Ultrix and OSF/1      -std1
3613 # HP-UX 10.20 and later -Ae
3614 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3615 # SVR4                  -Xc -D__EXTENSIONS__
3616 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3617 do
3618   CC="$ac_save_CC $ac_arg"
3619   cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 #include <stdarg.h>
3623 #include <stdio.h>
3624 #include <sys/types.h>
3625 #include <sys/stat.h>
3626 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3627 struct buf { int x; };
3628 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3629 static char *e (p, i)
3630      char **p;
3631      int i;
3632 {
3633   return p[i];
3634 }
3635 static char *f (char * (*g) (char **, int), char **p, ...)
3636 {
3637   char *s;
3638   va_list v;
3639   va_start (v,p);
3640   s = g (p, va_arg (v,int));
3641   va_end (v);
3642   return s;
3643 }
3644 int test (int i, double x);
3645 struct s1 {int (*f) (int a);};
3646 struct s2 {int (*f) (double a);};
3647 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3648 int argc;
3649 char **argv;
3650
3651 int main() {
3652
3653 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3654
3655 ; return 0; }
3656 EOF
3657 if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3658   rm -rf conftest*
3659   am_cv_prog_cc_stdc="$ac_arg"; break
3660 else
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663 fi
3664 rm -f conftest*
3665 done
3666 CC="$ac_save_CC"
3667
3668 fi
3669
3670 if test -z "$am_cv_prog_cc_stdc"; then
3671   echo "$ac_t""none needed" 1>&6
3672 else
3673   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3674 fi
3675 case "x$am_cv_prog_cc_stdc" in
3676   x|xno) ;;
3677   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3678 esac
3679
3680 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3681         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3682 fi
3683
3684 # test for make depend flag
3685 OL_MKDEP=
3686 OL_MKDEP_FLAGS=
3687 if test -z "${MKDEP}"; then
3688         OL_MKDEP="${CC-cc}"
3689         if test -z "${MKDEP_FLAGS}"; then
3690                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3691 echo "configure:3692: checking for ${OL_MKDEP} depend flag" >&5
3692 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   
3696                         ol_cv_mkdep=no
3697                         for flag in "-M" "-xM"; do
3698                                 cat > conftest.c <<EOF
3699  noCode;
3700 EOF
3701                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3702                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3703                                 then
3704                                         if test ! -f conftest."${ac_object}" ; then
3705                                                 ol_cv_mkdep=$flag
3706                                                 OL_MKDEP_FLAGS="$flag"
3707                                                 break
3708                                         fi
3709                                 fi
3710                         done
3711                         rm -f conftest*
3712                 
3713 fi
3714
3715 echo "$ac_t""$ol_cv_mkdep" 1>&6
3716         else
3717                 cc_cv_mkdep=yes
3718                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3719         fi
3720 else
3721         cc_cv_mkdep=yes
3722         OL_MKDEP="${MKDEP}"
3723         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3724 fi
3725
3726
3727
3728 if test "${ol_cv_mkdep}" = no ; then
3729         # this will soon become an error
3730         echo "configure: warning: do not know how to generate dependencies" 1>&2
3731 fi
3732
3733 ol_link_modules=no
3734 if test $ol_enable_modules != no ; then
3735         for ac_hdr in ltdl.h
3736 do
3737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3739 echo "configure:3740: checking for $ac_hdr" >&5
3740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3741   echo $ac_n "(cached) $ac_c" 1>&6
3742 else
3743   cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <$ac_hdr>
3747 EOF
3748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3749 { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3751 if test -z "$ac_err"; then
3752   rm -rf conftest*
3753   eval "ac_cv_header_$ac_safe=yes"
3754 else
3755   echo "$ac_err" >&5
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   eval "ac_cv_header_$ac_safe=no"
3760 fi
3761 rm -f conftest*
3762 fi
3763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3764   echo "$ac_t""yes" 1>&6
3765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3766   cat >> confdefs.h <<EOF
3767 #define $ac_tr_hdr 1
3768 EOF
3769  
3770 else
3771   echo "$ac_t""no" 1>&6
3772 fi
3773 done
3774
3775
3776         if test $ac_cv_header_ltdl_h = no ; then
3777                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3778
3779         fi
3780
3781         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3782 echo "configure:3783: checking for lt_dlinit in -lltdl" >&5
3783 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3785   echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787   ac_save_LIBS="$LIBS"
3788 LIBS="-lltdl  $LIBS"
3789 cat > conftest.$ac_ext <<EOF
3790 #line 3791 "configure"
3791 #include "confdefs.h"
3792 /* Override any gcc2 internal prototype to avoid an error.  */
3793 /* We use char because int might match the return type of a gcc2
3794     builtin and then its argument prototype would still apply.  */
3795 char lt_dlinit();
3796
3797 int main() {
3798 lt_dlinit()
3799 ; return 0; }
3800 EOF
3801 if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3802   rm -rf conftest*
3803   eval "ac_cv_lib_$ac_lib_var=yes"
3804 else
3805   echo "configure: failed program was:" >&5
3806   cat conftest.$ac_ext >&5
3807   rm -rf conftest*
3808   eval "ac_cv_lib_$ac_lib_var=no"
3809 fi
3810 rm -f conftest*
3811 LIBS="$ac_save_LIBS"
3812
3813 fi
3814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3815   echo "$ac_t""yes" 1>&6
3816     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3817     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3818   cat >> confdefs.h <<EOF
3819 #define $ac_tr_lib 1
3820 EOF
3821
3822   LIBS="-lltdl $LIBS"
3823
3824 else
3825   echo "$ac_t""no" 1>&6
3826 fi
3827
3828         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3829                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3830         fi
3831         ol_link_modules=yes
3832 else
3833         ol_with_bdb2_module=static
3834         ol_with_ldap_module=static
3835         ol_with_ldbm_module=static
3836         ol_with_passwd_module=static
3837         ol_with_perl_module=static
3838         ol_with_shell_module=static
3839         ol_with_tcl_module=static
3840 fi
3841
3842 # test for EBCDIC
3843 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3844 echo "configure:3845: checking for EBCDIC" >&5
3845 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3846   echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848   
3849         cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852
3853 #if !('M' == 0xd4)
3854 #include <__ASCII__/generate_error.h>
3855 #endif
3856
3857 EOF
3858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3859 { (eval echo configure:3860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3861 if test -z "$ac_err"; then
3862   rm -rf conftest*
3863   ol_cv_cpp_ebcdic=yes
3864 else
3865   echo "$ac_err" >&5
3866   echo "configure: failed program was:" >&5
3867   cat conftest.$ac_ext >&5
3868   rm -rf conftest*
3869   ol_cv_cpp_ebcdic=no
3870 fi
3871 rm -f conftest*
3872 fi
3873
3874 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3875 if test $ol_cv_cpp_ebcdic = yes ; then
3876         cat >> confdefs.h <<\EOF
3877 #define HAVE_EBCDIC 1
3878 EOF
3879
3880 fi
3881
3882 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3883 echo "configure:3884: checking for ANSI C header files" >&5
3884 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3885   echo $ac_n "(cached) $ac_c" 1>&6
3886 else
3887   cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 #include <stdlib.h>
3891 #include <stdarg.h>
3892 #include <string.h>
3893 #include <float.h>
3894 EOF
3895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3896 { (eval echo configure:3897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3898 if test -z "$ac_err"; then
3899   rm -rf conftest*
3900   ol_cv_header_stdc=yes
3901 else
3902   echo "$ac_err" >&5
3903   echo "configure: failed program was:" >&5
3904   cat conftest.$ac_ext >&5
3905   rm -rf conftest*
3906   ol_cv_header_stdc=no
3907 fi
3908 rm -f conftest*
3909
3910 if test $ol_cv_header_stdc = yes; then
3911   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <string.h>
3916 EOF
3917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918   egrep "memchr" >/dev/null 2>&1; then
3919   :
3920 else
3921   rm -rf conftest*
3922   ol_cv_header_stdc=no
3923 fi
3924 rm -f conftest*
3925
3926 fi
3927
3928 if test $ol_cv_header_stdc = yes; then
3929   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3930 cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 #include <stdlib.h>
3934 EOF
3935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3936   egrep "free" >/dev/null 2>&1; then
3937   :
3938 else
3939   rm -rf conftest*
3940   ol_cv_header_stdc=no
3941 fi
3942 rm -f conftest*
3943
3944 fi
3945
3946 if test $ol_cv_header_stdc = yes; then
3947   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3948 if test "$cross_compiling" = yes; then
3949   :
3950 else
3951   cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <ctype.h>
3955 #ifndef HAVE_EBCDIC
3956 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3957 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3958 #else
3959 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3960                 || ('j' <= (c) && (c) <= 'r') \
3961                 || ('s' <= (c) && (c) <= 'z'))
3962 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3963 #endif
3964 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3965 int main () { int i; for (i = 0; i < 256; i++)
3966 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3967 exit (0); }
3968
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3971 then
3972   :
3973 else
3974   echo "configure: failed program was:" >&5
3975   cat conftest.$ac_ext >&5
3976   rm -fr conftest*
3977   ol_cv_header_stdc=no
3978 fi
3979 rm -fr conftest*
3980 fi
3981
3982 fi
3983 fi
3984
3985 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3986 if test $ol_cv_header_stdc = yes; then
3987   cat >> confdefs.h <<\EOF
3988 #define STDC_HEADERS 1
3989 EOF
3990
3991 fi
3992 ac_cv_header_stdc=disable
3993
3994
3995 if test $ol_cv_header_stdc != yes; then
3996         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3997 fi
3998
3999 ac_header_dirent=no
4000 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4001 do
4002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4003 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4004 echo "configure:4005: checking for $ac_hdr that defines DIR" >&5
4005 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4006   echo $ac_n "(cached) $ac_c" 1>&6
4007 else
4008   cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011 #include <sys/types.h>
4012 #include <$ac_hdr>
4013 int main() {
4014 DIR *dirp = 0;
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   eval "ac_cv_header_dirent_$ac_safe=yes"
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   eval "ac_cv_header_dirent_$ac_safe=no"
4025 fi
4026 rm -f conftest*
4027 fi
4028 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4029   echo "$ac_t""yes" 1>&6
4030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4031   cat >> confdefs.h <<EOF
4032 #define $ac_tr_hdr 1
4033 EOF
4034  ac_header_dirent=$ac_hdr; break
4035 else
4036   echo "$ac_t""no" 1>&6
4037 fi
4038 done
4039 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4040 if test $ac_header_dirent = dirent.h; then
4041 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4042 echo "configure:4043: checking for opendir in -ldir" >&5
4043 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   ac_save_LIBS="$LIBS"
4048 LIBS="-ldir  $LIBS"
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 /* Override any gcc2 internal prototype to avoid an error.  */
4053 /* We use char because int might match the return type of a gcc2
4054     builtin and then its argument prototype would still apply.  */
4055 char opendir();
4056
4057 int main() {
4058 opendir()
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062   rm -rf conftest*
4063   eval "ac_cv_lib_$ac_lib_var=yes"
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067   rm -rf conftest*
4068   eval "ac_cv_lib_$ac_lib_var=no"
4069 fi
4070 rm -f conftest*
4071 LIBS="$ac_save_LIBS"
4072
4073 fi
4074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4075   echo "$ac_t""yes" 1>&6
4076   LIBS="$LIBS -ldir"
4077 else
4078   echo "$ac_t""no" 1>&6
4079 fi
4080
4081 else
4082 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4083 echo "configure:4084: checking for opendir in -lx" >&5
4084 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   ac_save_LIBS="$LIBS"
4089 LIBS="-lx  $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char opendir();
4097
4098 int main() {
4099 opendir()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117   LIBS="$LIBS -lx"
4118 else
4119   echo "$ac_t""no" 1>&6
4120 fi
4121
4122 fi
4123
4124 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4125 echo "configure:4126: checking for sys/wait.h that is POSIX.1 compatible" >&5
4126 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4127   echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129   cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <sys/types.h>
4133 #include <sys/wait.h>
4134 #ifndef WEXITSTATUS
4135 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4136 #endif
4137 #ifndef WIFEXITED
4138 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4139 #endif
4140 int main() {
4141 int s;
4142 wait (&s);
4143 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147   rm -rf conftest*
4148   ac_cv_header_sys_wait_h=yes
4149 else
4150   echo "configure: failed program was:" >&5
4151   cat conftest.$ac_ext >&5
4152   rm -rf conftest*
4153   ac_cv_header_sys_wait_h=no
4154 fi
4155 rm -f conftest*
4156 fi
4157
4158 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4159 if test $ac_cv_header_sys_wait_h = yes; then
4160   cat >> confdefs.h <<\EOF
4161 #define HAVE_SYS_WAIT_H 1
4162 EOF
4163
4164 fi
4165
4166 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4167 echo "configure:4168: checking POSIX termios" >&5
4168 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   cat > conftest.$ac_ext <<EOF
4172 #line 4173 "configure"
4173 #include "confdefs.h"
4174 #include <sys/types.h>
4175 #include <unistd.h>
4176 #include <termios.h>
4177 int main() {
4178 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4179    tcgetattr(0, 0);
4180 ; return 0; }
4181 EOF
4182 if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4183   rm -rf conftest*
4184   am_cv_sys_posix_termios=yes
4185 else
4186   echo "configure: failed program was:" >&5
4187   cat conftest.$ac_ext >&5
4188   rm -rf conftest*
4189   am_cv_sys_posix_termios=no
4190 fi
4191 rm -f conftest*
4192 fi
4193
4194 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4195
4196
4197  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4198 echo "configure:4199: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4199 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4200   echo $ac_n "(cached) $ac_c" 1>&6
4201 else
4202   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4203
4204   gwinsz_in_termios_h=no
4205   if test $am_cv_sys_posix_termios = yes; then
4206     cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209 #include <sys/types.h>
4210 #     include <termios.h>
4211 #     ifdef TIOCGWINSZ
4212         yes
4213 #     endif
4214     
4215 EOF
4216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4217   egrep "yes" >/dev/null 2>&1; then
4218   rm -rf conftest*
4219   gwinsz_in_termios_h=yes
4220 fi
4221 rm -f conftest*
4222
4223   fi
4224
4225   if test $gwinsz_in_termios_h = no; then
4226     cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 #include <sys/types.h>
4230 #     include <sys/ioctl.h>
4231 #     ifdef TIOCGWINSZ
4232         yes
4233 #     endif
4234     
4235 EOF
4236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4237   egrep "yes" >/dev/null 2>&1; then
4238   rm -rf conftest*
4239   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4240 fi
4241 rm -f conftest*
4242
4243   fi
4244   
4245 fi
4246
4247 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4248   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4249     cat >> confdefs.h <<\EOF
4250 #define GWINSZ_IN_SYS_IOCTL 1
4251 EOF
4252
4253   fi
4254
4255 if test $am_cv_sys_posix_termios = yes ; then
4256         cat >> confdefs.h <<\EOF
4257 #define HAVE_POSIX_TERMIOS 1
4258 EOF
4259
4260 fi
4261
4262 for ac_hdr in \
4263         arpa/inet.h             \
4264         arpa/nameser.h  \
4265         assert.h                \
4266         crypt.h                 \
4267         errno.h                 \
4268         fcntl.h                 \
4269         filio.h                 \
4270         getopt.h                \
4271         grp.h                   \
4272         libutil.h               \
4273         limits.h                \
4274         locale.h                \
4275         netinet/tcp.h   \
4276         malloc.h                \
4277         memory.h                \
4278         psap.h                  \
4279         pwd.h                   \
4280         resolv.h                \
4281         sgtty.h                 \
4282         shadow.h                \
4283         stdarg.h                \
4284         stddef.h                \
4285         string.h                \
4286         strings.h               \
4287         sysexits.h              \
4288         sys/file.h              \
4289         sys/filio.h             \
4290         sys/errno.h             \
4291         sys/ioctl.h             \
4292         sys/param.h             \
4293         sys/resource.h  \
4294         sys/select.h    \
4295         sys/socket.h    \
4296         sys/syslog.h    \
4297         sys/time.h              \
4298         sys/types.h             \
4299         syslog.h                \
4300         termios.h               \
4301         unistd.h                \
4302
4303 do
4304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4305 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_hdr" >&5
4307 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 #include <$ac_hdr>
4314 EOF
4315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4316 { (eval echo configure:4317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4318 if test -z "$ac_err"; then
4319   rm -rf conftest*
4320   eval "ac_cv_header_$ac_safe=yes"
4321 else
4322   echo "$ac_err" >&5
4323   echo "configure: failed program was:" >&5
4324   cat conftest.$ac_ext >&5
4325   rm -rf conftest*
4326   eval "ac_cv_header_$ac_safe=no"
4327 fi
4328 rm -f conftest*
4329 fi
4330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4331   echo "$ac_t""yes" 1>&6
4332     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4333   cat >> confdefs.h <<EOF
4334 #define $ac_tr_hdr 1
4335 EOF
4336  
4337 else
4338   echo "$ac_t""no" 1>&6
4339 fi
4340 done
4341
4342
4343
4344
4345 echo $ac_n "checking for socket""... $ac_c" 1>&6
4346 echo "configure:4347: checking for socket" >&5
4347 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   cat > conftest.$ac_ext <<EOF
4351 #line 4352 "configure"
4352 #include "confdefs.h"
4353 /* System header to define __stub macros and hopefully few prototypes,
4354     which can conflict with char socket(); below.  */
4355 #include <assert.h>
4356 /* Override any gcc2 internal prototype to avoid an error.  */
4357 /* We use char because int might match the return type of a gcc2
4358     builtin and then its argument prototype would still apply.  */
4359 char socket();
4360 char (*f)();
4361
4362 int main() {
4363
4364 /* The GNU C library defines this for functions which it implements
4365     to always fail with ENOSYS.  Some functions are actually named
4366     something starting with __ and the normal name is an alias.  */
4367 #if defined (__stub_socket) || defined (__stub___socket)
4368 choke me
4369 #else
4370 f = socket;
4371 #endif
4372
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376   rm -rf conftest*
4377   eval "ac_cv_func_socket=yes"
4378 else
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   eval "ac_cv_func_socket=no"
4383 fi
4384 rm -f conftest*
4385 fi
4386
4387 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4388   echo "$ac_t""yes" 1>&6
4389   :
4390 else
4391   echo "$ac_t""no" 1>&6
4392         
4393         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4394 echo "configure:4395: checking for main in -lsocket" >&5
4395 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4396 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4397   echo $ac_n "(cached) $ac_c" 1>&6
4398 else
4399   ac_save_LIBS="$LIBS"
4400 LIBS="-lsocket  $LIBS"
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404
4405 int main() {
4406 main()
4407 ; return 0; }
4408 EOF
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4410   rm -rf conftest*
4411   eval "ac_cv_lib_$ac_lib_var=yes"
4412 else
4413   echo "configure: failed program was:" >&5
4414   cat conftest.$ac_ext >&5
4415   rm -rf conftest*
4416   eval "ac_cv_lib_$ac_lib_var=no"
4417 fi
4418 rm -f conftest*
4419 LIBS="$ac_save_LIBS"
4420
4421 fi
4422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4423   echo "$ac_t""yes" 1>&6
4424     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4425     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4426   cat >> confdefs.h <<EOF
4427 #define $ac_tr_lib 1
4428 EOF
4429
4430   LIBS="-lsocket $LIBS"
4431
4432 else
4433   echo "$ac_t""no" 1>&6
4434 fi
4435
4436         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4437 echo "configure:4438: checking for main in -lnet" >&5
4438 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4439 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4440   echo $ac_n "(cached) $ac_c" 1>&6
4441 else
4442   ac_save_LIBS="$LIBS"
4443 LIBS="-lnet  $LIBS"
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447
4448 int main() {
4449 main()
4450 ; return 0; }
4451 EOF
4452 if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4453   rm -rf conftest*
4454   eval "ac_cv_lib_$ac_lib_var=yes"
4455 else
4456   echo "configure: failed program was:" >&5
4457   cat conftest.$ac_ext >&5
4458   rm -rf conftest*
4459   eval "ac_cv_lib_$ac_lib_var=no"
4460 fi
4461 rm -f conftest*
4462 LIBS="$ac_save_LIBS"
4463
4464 fi
4465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4466   echo "$ac_t""yes" 1>&6
4467     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4468     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4469   cat >> confdefs.h <<EOF
4470 #define $ac_tr_lib 1
4471 EOF
4472
4473   LIBS="-lnet $LIBS"
4474
4475 else
4476   echo "$ac_t""no" 1>&6
4477 fi
4478
4479         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4480 echo "configure:4481: checking for socket in -lnet" >&5
4481 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   ac_save_LIBS="$LIBS"
4486 LIBS="-lnet  $LIBS"
4487 cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490 /* Override any gcc2 internal prototype to avoid an error.  */
4491 /* We use char because int might match the return type of a gcc2
4492     builtin and then its argument prototype would still apply.  */
4493 char socket();
4494
4495 int main() {
4496 socket()
4497 ; return 0; }
4498 EOF
4499 if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4500   rm -rf conftest*
4501   eval "ac_cv_lib_$ac_lib_var=yes"
4502 else
4503   echo "configure: failed program was:" >&5
4504   cat conftest.$ac_ext >&5
4505   rm -rf conftest*
4506   eval "ac_cv_lib_$ac_lib_var=no"
4507 fi
4508 rm -f conftest*
4509 LIBS="$ac_save_LIBS"
4510
4511 fi
4512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4513   echo "$ac_t""yes" 1>&6
4514     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4516   cat >> confdefs.h <<EOF
4517 #define $ac_tr_lib 1
4518 EOF
4519
4520   LIBS="-lnet $LIBS"
4521
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525
4526         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4527 echo "configure:4528: checking for main in -lnsl_s" >&5
4528 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   ac_save_LIBS="$LIBS"
4533 LIBS="-lnsl_s  $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537
4538 int main() {
4539 main()
4540 ; return 0; }
4541 EOF
4542 if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4543   rm -rf conftest*
4544   eval "ac_cv_lib_$ac_lib_var=yes"
4545 else
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548   rm -rf conftest*
4549   eval "ac_cv_lib_$ac_lib_var=no"
4550 fi
4551 rm -f conftest*
4552 LIBS="$ac_save_LIBS"
4553
4554 fi
4555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4556   echo "$ac_t""yes" 1>&6
4557     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4558     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4559   cat >> confdefs.h <<EOF
4560 #define $ac_tr_lib 1
4561 EOF
4562
4563   LIBS="-lnsl_s $LIBS"
4564
4565 else
4566   echo "$ac_t""no" 1>&6
4567 fi
4568
4569         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4570 echo "configure:4571: checking for main in -lnsl" >&5
4571 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4572 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   ac_save_LIBS="$LIBS"
4576 LIBS="-lnsl  $LIBS"
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580
4581 int main() {
4582 main()
4583 ; return 0; }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4586   rm -rf conftest*
4587   eval "ac_cv_lib_$ac_lib_var=yes"
4588 else
4589   echo "configure: failed program was:" >&5
4590   cat conftest.$ac_ext >&5
4591   rm -rf conftest*
4592   eval "ac_cv_lib_$ac_lib_var=no"
4593 fi
4594 rm -f conftest*
4595 LIBS="$ac_save_LIBS"
4596
4597 fi
4598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4599   echo "$ac_t""yes" 1>&6
4600     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4601     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4602   cat >> confdefs.h <<EOF
4603 #define $ac_tr_lib 1
4604 EOF
4605
4606   LIBS="-lnsl $LIBS"
4607
4608 else
4609   echo "$ac_t""no" 1>&6
4610 fi
4611
4612         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4613 echo "configure:4614: checking for socket in -linet" >&5
4614 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4615 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4616   echo $ac_n "(cached) $ac_c" 1>&6
4617 else
4618   ac_save_LIBS="$LIBS"
4619 LIBS="-linet  $LIBS"
4620 cat > conftest.$ac_ext <<EOF
4621 #line 4622 "configure"
4622 #include "confdefs.h"
4623 /* Override any gcc2 internal prototype to avoid an error.  */
4624 /* We use char because int might match the return type of a gcc2
4625     builtin and then its argument prototype would still apply.  */
4626 char socket();
4627
4628 int main() {
4629 socket()
4630 ; return 0; }
4631 EOF
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4633   rm -rf conftest*
4634   eval "ac_cv_lib_$ac_lib_var=yes"
4635 else
4636   echo "configure: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   rm -rf conftest*
4639   eval "ac_cv_lib_$ac_lib_var=no"
4640 fi
4641 rm -f conftest*
4642 LIBS="$ac_save_LIBS"
4643
4644 fi
4645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4646   echo "$ac_t""yes" 1>&6
4647     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4648     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4649   cat >> confdefs.h <<EOF
4650 #define $ac_tr_lib 1
4651 EOF
4652
4653   LIBS="-linet $LIBS"
4654
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4660 echo "configure:4661: checking for main in -lgen" >&5
4661 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   ac_save_LIBS="$LIBS"
4666 LIBS="-lgen  $LIBS"
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670
4671 int main() {
4672 main()
4673 ; return 0; }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4676   rm -rf conftest*
4677   eval "ac_cv_lib_$ac_lib_var=yes"
4678 else
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   eval "ac_cv_lib_$ac_lib_var=no"
4683 fi
4684 rm -f conftest*
4685 LIBS="$ac_save_LIBS"
4686
4687 fi
4688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4689   echo "$ac_t""yes" 1>&6
4690     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4691     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4692   cat >> confdefs.h <<EOF
4693 #define $ac_tr_lib 1
4694 EOF
4695
4696   LIBS="-lgen $LIBS"
4697
4698 else
4699   echo "$ac_t""no" 1>&6
4700 fi
4701
4702
4703 fi
4704
4705
4706 echo $ac_n "checking for select""... $ac_c" 1>&6
4707 echo "configure:4708: checking for select" >&5
4708 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   cat > conftest.$ac_ext <<EOF
4712 #line 4713 "configure"
4713 #include "confdefs.h"
4714 /* System header to define __stub macros and hopefully few prototypes,
4715     which can conflict with char select(); below.  */
4716 #include <assert.h>
4717 /* Override any gcc2 internal prototype to avoid an error.  */
4718 /* We use char because int might match the return type of a gcc2
4719     builtin and then its argument prototype would still apply.  */
4720 char select();
4721 char (*f)();
4722
4723 int main() {
4724
4725 /* The GNU C library defines this for functions which it implements
4726     to always fail with ENOSYS.  Some functions are actually named
4727     something starting with __ and the normal name is an alias.  */
4728 #if defined (__stub_select) || defined (__stub___select)
4729 choke me
4730 #else
4731 f = select;
4732 #endif
4733
4734 ; return 0; }
4735 EOF
4736 if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737   rm -rf conftest*
4738   eval "ac_cv_func_select=yes"
4739 else
4740   echo "configure: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   rm -rf conftest*
4743   eval "ac_cv_func_select=no"
4744 fi
4745 rm -f conftest*
4746 fi
4747
4748 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4749   echo "$ac_t""yes" 1>&6
4750   :
4751 else
4752   echo "$ac_t""no" 1>&6
4753 { echo "configure: error: select() required." 1>&2; exit 1; }
4754 fi
4755
4756
4757 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4758 echo "configure:4759: checking types of arguments for select()" >&5
4759  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4763   echo $ac_n "(cached) $ac_c" 1>&6
4764 else
4765     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4769      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4770       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4771        cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774 #ifdef HAVE_SYS_TYPES_H
4775 #include <sys/types.h>
4776 #endif
4777 #ifdef HAVE_SYS_TIME_H
4778 #include <sys/time.h>
4779 #endif
4780 #ifdef HAVE_SYS_SELECT_H
4781 #include <sys/select.h>
4782 #endif
4783 #ifdef HAVE_SYS_SOCKET_H
4784 #include <sys/socket.h>
4785 #endif
4786 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);
4787 int main() {
4788
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4792   rm -rf conftest*
4793           ac_not_found=no ; break 3
4794 else
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   ac_not_found=yes
4799 fi
4800 rm -f conftest*
4801       done
4802      done
4803     done
4804    
4805 fi
4806   
4807 fi
4808  
4809 fi
4810  if test "$ac_not_found" = yes; then
4811   ac_cv_func_select_arg1=int 
4812   ac_cv_func_select_arg234='int *' 
4813   ac_cv_func_select_arg5='struct timeval *'
4814  fi
4815  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4816  cat >> confdefs.h <<EOF
4817 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4818 EOF
4819
4820  cat >> confdefs.h <<EOF
4821 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4822 EOF
4823
4824  cat >> confdefs.h <<EOF
4825 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4826 EOF
4827
4828
4829
4830
4831 for ac_hdr in regex.h 
4832 do
4833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4835 echo "configure:4836: checking for $ac_hdr" >&5
4836 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842 #include <$ac_hdr>
4843 EOF
4844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4845 { (eval echo configure:4846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4847 if test -z "$ac_err"; then
4848   rm -rf conftest*
4849   eval "ac_cv_header_$ac_safe=yes"
4850 else
4851   echo "$ac_err" >&5
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   eval "ac_cv_header_$ac_safe=no"
4856 fi
4857 rm -f conftest*
4858 fi
4859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4862   cat >> confdefs.h <<EOF
4863 #define $ac_tr_hdr 1
4864 EOF
4865  
4866 else
4867   echo "$ac_t""no" 1>&6
4868 fi
4869 done
4870
4871 if test "$ac_cv_header_regex_h" != yes ; then
4872         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4873 fi
4874 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4875 echo "configure:4876: checking for regfree" >&5
4876 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 /* System header to define __stub macros and hopefully few prototypes,
4883     which can conflict with char regfree(); below.  */
4884 #include <assert.h>
4885 /* Override any gcc2 internal prototype to avoid an error.  */
4886 /* We use char because int might match the return type of a gcc2
4887     builtin and then its argument prototype would still apply.  */
4888 char regfree();
4889 char (*f)();
4890
4891 int main() {
4892
4893 /* The GNU C library defines this for functions which it implements
4894     to always fail with ENOSYS.  Some functions are actually named
4895     something starting with __ and the normal name is an alias.  */
4896 #if defined (__stub_regfree) || defined (__stub___regfree)
4897 choke me
4898 #else
4899 f = regfree;
4900 #endif
4901
4902 ; return 0; }
4903 EOF
4904 if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4905   rm -rf conftest*
4906   eval "ac_cv_func_regfree=yes"
4907 else
4908   echo "configure: failed program was:" >&5
4909   cat conftest.$ac_ext >&5
4910   rm -rf conftest*
4911   eval "ac_cv_func_regfree=no"
4912 fi
4913 rm -f conftest*
4914 fi
4915
4916 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4917   echo "$ac_t""yes" 1>&6
4918   :
4919 else
4920   echo "$ac_t""no" 1>&6
4921 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4922 fi
4923
4924
4925
4926 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4927 echo "configure:4928: checking for compatible POSIX regex" >&5
4928 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   
4932         if test "$cross_compiling" = yes; then
4933   ol_cv_c_posix_regex=cross
4934 else
4935   cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938
4939 #include <sys/types.h>
4940 #include <regex.h>
4941 static char *pattern, *string;
4942 main()
4943 {
4944         int rc;
4945         regex_t re;
4946
4947         pattern = "^A";
4948
4949         if(regcomp(&re, pattern, 0)) {
4950                 return -1;
4951         }
4952         
4953         string = "ALL MATCH";
4954         
4955         rc = regexec(&re, string, 0, (void*)0, 0);
4956
4957         regfree(&re);
4958
4959         return rc;
4960 }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4963 then
4964   ol_cv_c_posix_regex=yes
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -fr conftest*
4969   ol_cv_c_posix_regex=no
4970 fi
4971 rm -fr conftest*
4972 fi
4973
4974 fi
4975
4976 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4977
4978 if test "$ol_cv_c_posix_regex" = no ; then
4979         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4980 fi
4981
4982
4983 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4984 echo "configure:4985: checking for sigset in -lV3" >&5
4985 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4987   echo $ac_n "(cached) $ac_c" 1>&6
4988 else
4989   ac_save_LIBS="$LIBS"
4990 LIBS="-lV3  $LIBS"
4991 cat > conftest.$ac_ext <<EOF
4992 #line 4993 "configure"
4993 #include "confdefs.h"
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 /* We use char because int might match the return type of a gcc2
4996     builtin and then its argument prototype would still apply.  */
4997 char sigset();
4998
4999 int main() {
5000 sigset()
5001 ; return 0; }
5002 EOF
5003 if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=yes"
5006 else
5007   echo "configure: failed program was:" >&5
5008   cat conftest.$ac_ext >&5
5009   rm -rf conftest*
5010   eval "ac_cv_lib_$ac_lib_var=no"
5011 fi
5012 rm -f conftest*
5013 LIBS="$ac_save_LIBS"
5014
5015 fi
5016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5017   echo "$ac_t""yes" 1>&6
5018     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_lib 1
5022 EOF
5023
5024   LIBS="-lV3 $LIBS"
5025
5026 else
5027   echo "$ac_t""no" 1>&6
5028 fi
5029
5030
5031
5032 # find res_search
5033 if test $ol_enable_dns != no ; then
5034                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5035 echo "configure:5036: checking for res_search" >&5
5036 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5037   echo $ac_n "(cached) $ac_c" 1>&6
5038 else
5039   cat > conftest.$ac_ext <<EOF
5040 #line 5041 "configure"
5041 #include "confdefs.h"
5042 /* System header to define __stub macros and hopefully few prototypes,
5043     which can conflict with char res_search(); below.  */
5044 #include <assert.h>
5045 /* Override any gcc2 internal prototype to avoid an error.  */
5046 /* We use char because int might match the return type of a gcc2
5047     builtin and then its argument prototype would still apply.  */
5048 char res_search();
5049 char (*f)();
5050
5051 int main() {
5052
5053 /* The GNU C library defines this for functions which it implements
5054     to always fail with ENOSYS.  Some functions are actually named
5055     something starting with __ and the normal name is an alias.  */
5056 #if defined (__stub_res_search) || defined (__stub___res_search)
5057 choke me
5058 #else
5059 f = res_search;
5060 #endif
5061
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065   rm -rf conftest*
5066   eval "ac_cv_func_res_search=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_func_res_search=no"
5072 fi
5073 rm -f conftest*
5074 fi
5075
5076 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078   :
5079 else
5080   echo "$ac_t""no" 1>&6
5081 fi
5082
5083         if test $ac_cv_func_res_search = no ; then 
5084                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5085 echo "configure:5086: checking for res_search in -lbind" >&5
5086 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   ac_save_LIBS="$LIBS"
5091 LIBS="-lbind  $LIBS"
5092 cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char res_search();
5099
5100 int main() {
5101 res_search()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lbind $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130
5131                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5132         fi
5133         if test $ac_cv_func_res_search = no ; then 
5134                 echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5135 echo "configure:5136: checking for __res_search in -lbind" >&5
5136 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-lbind  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char __res_search();
5149
5150 int main() {
5151 __res_search()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-lbind $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180
5181                 ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5182         fi
5183         if test $ac_cv_func_res_search = no ; then 
5184                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5185 echo "configure:5186: checking for res_search in -lresolv" >&5
5186 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190   ac_save_LIBS="$LIBS"
5191 LIBS="-lresolv  $LIBS"
5192 cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195 /* Override any gcc2 internal prototype to avoid an error.  */
5196 /* We use char because int might match the return type of a gcc2
5197     builtin and then its argument prototype would still apply.  */
5198 char res_search();
5199
5200 int main() {
5201 res_search()
5202 ; return 0; }
5203 EOF
5204 if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5205   rm -rf conftest*
5206   eval "ac_cv_lib_$ac_lib_var=yes"
5207 else
5208   echo "configure: failed program was:" >&5
5209   cat conftest.$ac_ext >&5
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=no"
5212 fi
5213 rm -f conftest*
5214 LIBS="$ac_save_LIBS"
5215
5216 fi
5217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5221   cat >> confdefs.h <<EOF
5222 #define $ac_tr_lib 1
5223 EOF
5224
5225   LIBS="-lresolv $LIBS"
5226
5227 else
5228   echo "$ac_t""no" 1>&6
5229 fi
5230
5231                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5232         fi
5233
5234         if test "$ac_cv_func_res_search" = yes ; then
5235                 cat >> confdefs.h <<\EOF
5236 #define HAVE_RES_SEARCH 1
5237 EOF
5238
5239         elif test $ol_enable_dns = yes ; then
5240                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5241         else
5242                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5243         fi
5244 fi
5245
5246
5247 # ISODE tests
5248 ol_link_isode=no
5249 if test $ol_enable_ldapd != no ; then
5250         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5251
5252                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5253 echo "configure:5254: checking for main in -lxtpp" >&5
5254 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5256   echo $ac_n "(cached) $ac_c" 1>&6
5257 else
5258   ac_save_LIBS="$LIBS"
5259 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5260 cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263
5264 int main() {
5265 main()
5266 ; return 0; }
5267 EOF
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5269   rm -rf conftest*
5270   eval "ac_cv_lib_$ac_lib_var=yes"
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274   rm -rf conftest*
5275   eval "ac_cv_lib_$ac_lib_var=no"
5276 fi
5277 rm -f conftest*
5278 LIBS="$ac_save_LIBS"
5279
5280 fi
5281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283   
5284                 ol_link_isode=yes
5285                 cat >> confdefs.h <<\EOF
5286 #define HAVE_XTPP 1
5287 EOF
5288
5289                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5290                 
5291 else
5292   echo "$ac_t""no" 1>&6
5293 :
5294 fi
5295
5296         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5297 echo "configure:5298: checking for main in -ldsap" >&5
5298 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   ac_save_LIBS="$LIBS"
5303 LIBS="-ldsap -lisode $LIBS"
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307
5308 int main() {
5309 main()
5310 ; return 0; }
5311 EOF
5312 if { (eval echo configure:5313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=yes"
5315 else
5316   echo "configure: failed program was:" >&5
5317   cat conftest.$ac_ext >&5
5318   rm -rf conftest*
5319   eval "ac_cv_lib_$ac_lib_var=no"
5320 fi
5321 rm -f conftest*
5322 LIBS="$ac_save_LIBS"
5323
5324 fi
5325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5326   echo "$ac_t""yes" 1>&6
5327   
5328                 ol_link_isode=yes
5329                 cat >> confdefs.h <<\EOF
5330 #define HAVE_DSAP 1
5331 EOF
5332
5333                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5334                 
5335 else
5336   echo "$ac_t""no" 1>&6
5337 :
5338 fi
5339
5340         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5341 echo "configure:5342: checking for main in -lisode" >&5
5342 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5344   echo $ac_n "(cached) $ac_c" 1>&6
5345 else
5346   ac_save_LIBS="$LIBS"
5347 LIBS="-lisode  $LIBS"
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351
5352 int main() {
5353 main()
5354 ; return 0; }
5355 EOF
5356 if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=yes"
5359 else
5360   echo "configure: failed program was:" >&5
5361   cat conftest.$ac_ext >&5
5362   rm -rf conftest*
5363   eval "ac_cv_lib_$ac_lib_var=no"
5364 fi
5365 rm -f conftest*
5366 LIBS="$ac_save_LIBS"
5367
5368 fi
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5370   echo "$ac_t""yes" 1>&6
5371   
5372                 ol_link_isode=yes
5373                 cat >> confdefs.h <<\EOF
5374 #define HAVE_ISODE 1
5375 EOF
5376
5377                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5378                 
5379 else
5380   echo "$ac_t""no" 1>&6
5381 :
5382 fi
5383
5384 fi
5385
5386 if test $ol_link_isode != no; then
5387         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5388 echo "configure:5389: checking for main in -lpp" >&5
5389 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5391   echo $ac_n "(cached) $ac_c" 1>&6
5392 else
5393   ac_save_LIBS="$LIBS"
5394 LIBS="-lpp  $LIBS"
5395 cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398
5399 int main() {
5400 main()
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   eval "ac_cv_lib_$ac_lib_var=yes"
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   eval "ac_cv_lib_$ac_lib_var=no"
5411 fi
5412 rm -f conftest*
5413 LIBS="$ac_save_LIBS"
5414
5415 fi
5416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5417   echo "$ac_t""yes" 1>&6
5418   
5419                 cat >> confdefs.h <<\EOF
5420 #define HAVE_PP 1
5421 EOF
5422
5423                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5424                 
5425 else
5426   echo "$ac_t""no" 1>&6
5427 :
5428 fi
5429
5430
5431         # Extract the first word of "pepsy", so it can be a program name with args.
5432 set dummy pepsy; ac_word=$2
5433 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5434 echo "configure:5435: checking for $ac_word" >&5
5435 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5436   echo $ac_n "(cached) $ac_c" 1>&6
5437 else
5438   case "$PEPSY" in
5439   /*)
5440   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5441   ;;
5442   ?:/*)                  
5443   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5444   ;;
5445   *)
5446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5447   ac_dummy="$PATH"
5448   for ac_dir in $ac_dummy; do 
5449     test -z "$ac_dir" && ac_dir=.
5450     if test -f $ac_dir/$ac_word; then
5451       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5452       break
5453     fi
5454   done
5455   IFS="$ac_save_ifs"
5456   ;;
5457 esac
5458 fi
5459 PEPSY="$ac_cv_path_PEPSY"
5460 if test -n "$PEPSY"; then
5461   echo "$ac_t""$PEPSY" 1>&6
5462 else
5463   echo "$ac_t""no" 1>&6
5464 fi
5465
5466 fi
5467
5468 if test $ol_enable_quipu != no ; then
5469         for ac_hdr in quipu/commonarg.h
5470 do
5471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5473 echo "configure:5474: checking for $ac_hdr" >&5
5474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5475   echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477   cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480 #include <$ac_hdr>
5481 EOF
5482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5483 { (eval echo configure:5484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5485 if test -z "$ac_err"; then
5486   rm -rf conftest*
5487   eval "ac_cv_header_$ac_safe=yes"
5488 else
5489   echo "$ac_err" >&5
5490   echo "configure: failed program was:" >&5
5491   cat conftest.$ac_ext >&5
5492   rm -rf conftest*
5493   eval "ac_cv_header_$ac_safe=no"
5494 fi
5495 rm -f conftest*
5496 fi
5497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5498   echo "$ac_t""yes" 1>&6
5499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5500   cat >> confdefs.h <<EOF
5501 #define $ac_tr_hdr 1
5502 EOF
5503  
5504 else
5505   echo "$ac_t""no" 1>&6
5506 fi
5507 done
5508
5509
5510         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5511                 BUILD_QUIPU=yes
5512         elif test $ol_enable_quipu = auto ; then
5513                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5514         else
5515                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5516         fi
5517 fi
5518
5519 ol_link_kerberos=no
5520
5521 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5522         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5523 do
5524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5526 echo "configure:5527: checking for $ac_hdr" >&5
5527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5528   echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530   cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 #include <$ac_hdr>
5534 EOF
5535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5536 { (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5538 if test -z "$ac_err"; then
5539   rm -rf conftest*
5540   eval "ac_cv_header_$ac_safe=yes"
5541 else
5542   echo "$ac_err" >&5
5543   echo "configure: failed program was:" >&5
5544   cat conftest.$ac_ext >&5
5545   rm -rf conftest*
5546   eval "ac_cv_header_$ac_safe=no"
5547 fi
5548 rm -f conftest*
5549 fi
5550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5551   echo "$ac_t""yes" 1>&6
5552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5553   cat >> confdefs.h <<EOF
5554 #define $ac_tr_hdr 1
5555 EOF
5556  
5557 else
5558   echo "$ac_t""no" 1>&6
5559 fi
5560 done
5561
5562
5563         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5564                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5565 echo "configure:5566: checking for main in -lkrb4" >&5
5566 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5568   echo $ac_n "(cached) $ac_c" 1>&6
5569 else
5570   ac_save_LIBS="$LIBS"
5571 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5572 cat > conftest.$ac_ext <<EOF
5573 #line 5574 "configure"
5574 #include "confdefs.h"
5575
5576 int main() {
5577 main()
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5581   rm -rf conftest*
5582   eval "ac_cv_lib_$ac_lib_var=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_lib_$ac_lib_var=no"
5588 fi
5589 rm -f conftest*
5590 LIBS="$ac_save_LIBS"
5591
5592 fi
5593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5594   echo "$ac_t""yes" 1>&6
5595   have_k5=yes
5596 else
5597   echo "$ac_t""no" 1>&6
5598 have_k5=no
5599 fi
5600
5601
5602                 if test $have_k5 = yes ; then
5603                         ol_with_kerberos=found
5604                         ol_link_kerberos=yes
5605
5606                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5607
5608                         LIBS="$KRB_LIBS $LIBS"
5609
5610                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5611 echo "configure:5612: checking for des_debug in Kerberos libraries" >&5
5612 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5613   echo $ac_n "(cached) $ac_c" 1>&6
5614 else
5615   
5616                                                                 save_LIBS="$LIBS"
5617                                 LIBS="$KRB_LIBS $LIBS"
5618                                 cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621
5622 #include <kerberosIV/krb.h>
5623 #include <kerberosIV/des.h>
5624 extern int des_debug;
5625
5626 int main() {
5627
5628 des_debug = 1;
5629
5630 ; return 0; }
5631 EOF
5632 if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5633   rm -rf conftest*
5634   ol_cv_var_des_debug=yes
5635 else
5636   echo "configure: failed program was:" >&5
5637   cat conftest.$ac_ext >&5
5638   rm -rf conftest*
5639   ol_cv_var_des_debug=no
5640 fi
5641 rm -f conftest*
5642                                                                 LIBS="$save_LIBS"
5643                         
5644 fi
5645
5646 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5647
5648                         if test $ol_cv_var_des_debug = yes ; then
5649                                 cat >> confdefs.h <<\EOF
5650 #define HAVE_DES_DEBUG 1
5651 EOF
5652
5653                         fi
5654
5655                         LIBS="$save_LIBS"
5656                 fi
5657         fi
5658 fi
5659
5660 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5661         for ac_hdr in krb.h des.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 \"\${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_krb_h = yes ; then
5703                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5704 echo "configure:5705: checking for main in -lkrb" >&5
5705 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5706 if eval "test \"\${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="-lkrb -ldes $LIBS"
5711 cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714
5715 int main() {
5716 main()
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   eval "ac_cv_lib_$ac_lib_var=yes"
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   eval "ac_cv_lib_$ac_lib_var=no"
5727 fi
5728 rm -f conftest*
5729 LIBS="$ac_save_LIBS"
5730
5731 fi
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734   have_k4=yes
5735 else
5736   echo "$ac_t""no" 1>&6
5737 have_k4=no
5738 fi
5739
5740
5741                 if test $have_k4 = yes ; then
5742                         ol_with_kerberos=found
5743                         ol_link_kerberos=yes
5744
5745                         KRB_LIBS="-lkrb -ldes"
5746                 fi
5747         fi
5748 fi
5749
5750 if test $ol_link_kerberos = yes ; then
5751         cat >> confdefs.h <<\EOF
5752 #define HAVE_KERBEROS 1
5753 EOF
5754
5755 fi
5756
5757 ol_link_tls=no
5758 if test $ol_with_tls != no ; then
5759         
5760         for ac_hdr in openssl/ssl.h ssl.h
5761 do
5762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5764 echo "configure:5765: checking for $ac_hdr" >&5
5765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5766   echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768   cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771 #include <$ac_hdr>
5772 EOF
5773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5774 { (eval echo configure:5775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5776 if test -z "$ac_err"; then
5777   rm -rf conftest*
5778   eval "ac_cv_header_$ac_safe=yes"
5779 else
5780   echo "$ac_err" >&5
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   eval "ac_cv_header_$ac_safe=no"
5785 fi
5786 rm -f conftest*
5787 fi
5788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5789   echo "$ac_t""yes" 1>&6
5790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5791   cat >> confdefs.h <<EOF
5792 #define $ac_tr_hdr 1
5793 EOF
5794  
5795 else
5796   echo "$ac_t""no" 1>&6
5797 fi
5798 done
5799
5800         
5801         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5802                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5803 echo "configure:5804: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5804 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5806   echo $ac_n "(cached) $ac_c" 1>&6
5807 else
5808   ac_save_LIBS="$LIBS"
5809 LIBS="-lssl -lcrypto $LIBS"
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 /* Override any gcc2 internal prototype to avoid an error.  */
5814 /* We use char because int might match the return type of a gcc2
5815     builtin and then its argument prototype would still apply.  */
5816 char SSLeay_add_ssl_algorithms();
5817
5818 int main() {
5819 SSLeay_add_ssl_algorithms()
5820 ; return 0; }
5821 EOF
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5823   rm -rf conftest*
5824   eval "ac_cv_lib_$ac_lib_var=yes"
5825 else
5826   echo "configure: failed program was:" >&5
5827   cat conftest.$ac_ext >&5
5828   rm -rf conftest*
5829   eval "ac_cv_lib_$ac_lib_var=no"
5830 fi
5831 rm -f conftest*
5832 LIBS="$ac_save_LIBS"
5833
5834 fi
5835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837   have_ssleay=yes
5838                         need_rsaref=no
5839 else
5840   echo "$ac_t""no" 1>&6
5841 have_ssleay=no
5842 fi
5843
5844                         
5845                 if test $have_ssleay = no ; then
5846                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5847 echo "configure:5848: checking for SSL_library_init in -lssl" >&5
5848 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5850   echo $ac_n "(cached) $ac_c" 1>&6
5851 else
5852   ac_save_LIBS="$LIBS"
5853 LIBS="-lssl -lcrypto $LIBS"
5854 cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 /* Override any gcc2 internal prototype to avoid an error.  */
5858 /* We use char because int might match the return type of a gcc2
5859     builtin and then its argument prototype would still apply.  */
5860 char SSL_library_init();
5861
5862 int main() {
5863 SSL_library_init()
5864 ; return 0; }
5865 EOF
5866 if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5867   rm -rf conftest*
5868   eval "ac_cv_lib_$ac_lib_var=yes"
5869 else
5870   echo "configure: failed program was:" >&5
5871   cat conftest.$ac_ext >&5
5872   rm -rf conftest*
5873   eval "ac_cv_lib_$ac_lib_var=no"
5874 fi
5875 rm -f conftest*
5876 LIBS="$ac_save_LIBS"
5877
5878 fi
5879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5880   echo "$ac_t""yes" 1>&6
5881   have_ssleay=yes
5882                                 need_rsaref=no
5883 else
5884   echo "$ac_t""no" 1>&6
5885 have_ssleay=no
5886 fi
5887
5888                 fi
5889
5890                 if test $have_ssleay = no ; then
5891                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5892 echo "configure:5893: checking for ssl3_accept in -lssl" >&5
5893 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5894 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5895   echo $ac_n "(cached) $ac_c" 1>&6
5896 else
5897   ac_save_LIBS="$LIBS"
5898 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char ssl3_accept();
5906
5907 int main() {
5908 ssl3_accept()
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_lib_$ac_lib_var=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=no"
5919 fi
5920 rm -f conftest*
5921 LIBS="$ac_save_LIBS"
5922
5923 fi
5924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5925   echo "$ac_t""yes" 1>&6
5926   have_ssleay=yes
5927                                 need_rsaref=yes
5928 else
5929   echo "$ac_t""no" 1>&6
5930 have_ssleay=no
5931 fi
5932
5933                 fi
5934
5935                 if test $have_ssleay = yes ; then
5936                         ol_with_tls=found
5937                         ol_link_tls=yes
5938
5939                         cat >> confdefs.h <<\EOF
5940 #define HAVE_SSLEAY 1
5941 EOF
5942
5943
5944                         if test $need_rsaref = yes; then
5945                                 cat >> confdefs.h <<\EOF
5946 #define HAVE_RSAREF 1
5947 EOF
5948
5949
5950                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5951                         else
5952                                 TLS_LIBS="-lssl -lcrypto"
5953                         fi
5954                 fi
5955         fi
5956 fi
5957
5958 if test $ol_link_tls = yes ; then
5959         cat >> confdefs.h <<\EOF
5960 #define HAVE_TLS 1
5961 EOF
5962
5963 fi      
5964
5965 for ac_func in \
5966         ctime_r                 \
5967         gethostbyname_r gethostbyaddr_r \
5968
5969 do
5970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5971 echo "configure:5972: checking for $ac_func" >&5
5972 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* System header to define __stub macros and hopefully few prototypes,
5979     which can conflict with char $ac_func(); below.  */
5980 #include <assert.h>
5981 /* Override any gcc2 internal prototype to avoid an error.  */
5982 /* We use char because int might match the return type of a gcc2
5983     builtin and then its argument prototype would still apply.  */
5984 char $ac_func();
5985 char (*f)();
5986
5987 int main() {
5988
5989 /* The GNU C library defines this for functions which it implements
5990     to always fail with ENOSYS.  Some functions are actually named
5991     something starting with __ and the normal name is an alias.  */
5992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5993 choke me
5994 #else
5995 f = $ac_func;
5996 #endif
5997
5998 ; return 0; }
5999 EOF
6000 if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6001   rm -rf conftest*
6002   eval "ac_cv_func_$ac_func=yes"
6003 else
6004   echo "configure: failed program was:" >&5
6005   cat conftest.$ac_ext >&5
6006   rm -rf conftest*
6007   eval "ac_cv_func_$ac_func=no"
6008 fi
6009 rm -f conftest*
6010 fi
6011
6012 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6013   echo "$ac_t""yes" 1>&6
6014     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6015   cat >> confdefs.h <<EOF
6016 #define $ac_tr_func 1
6017 EOF
6018  
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022 done
6023
6024
6025 if test "$ac_cv_func_ctime_r" = no ; then
6026         ol_cv_func_ctime_r_nargs=0
6027 else
6028         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6029 echo "configure:6030: checking number of arguments of ctime_r" >&5
6030 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 #include <time.h>
6037 int main() {
6038 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6042   rm -rf conftest*
6043   ol_cv_func_ctime_r_nargs=3
6044 else
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 #include <time.h>
6052 int main() {
6053 time_t ti; char *buffer; ctime_r(&ti,buffer);
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6057   rm -rf conftest*
6058   ol_cv_func_ctime_r_nargs=2
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   ol_cv_func_ctime_r_nargs=0
6064 fi
6065 rm -f conftest*
6066 fi
6067 rm -f conftest*
6068 fi
6069
6070 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6071   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6072     cat >> confdefs.h <<EOF
6073 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6074 EOF
6075
6076   fi
6077
6078 fi
6079
6080 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6081         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6082 echo "configure:6083: checking number of arguments of gethostbyname_r" >&5
6083 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6084   echo $ac_n "(cached) $ac_c" 1>&6
6085 else
6086   cat > conftest.$ac_ext <<EOF
6087 #line 6088 "configure"
6088 #include "confdefs.h"
6089 #include <sys/types.h>
6090 #include <sys/socket.h>
6091 #include <netinet/in.h>
6092 #include <netdb.h>
6093 #define BUFSIZE (sizeof(struct hostent)+10)
6094 int main() {
6095 struct hostent hent; char buffer[BUFSIZE];
6096                 int bufsize=BUFSIZE;int h_errno;
6097                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6098                         buffer, bufsize, &h_errno);
6099 ; return 0; }
6100 EOF
6101 if { (eval echo configure:6102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6102   rm -rf conftest*
6103   ol_cv_func_gethostbyname_r_nargs=5
6104 else
6105   echo "configure: failed program was:" >&5
6106   cat conftest.$ac_ext >&5
6107   rm -rf conftest*
6108   cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 #include <sys/types.h>
6112 #include <sys/socket.h>
6113 #include <netinet/in.h>
6114 #include <netdb.h>
6115 #define BUFSIZE (sizeof(struct hostent)+10)
6116 int main() {
6117 struct hostent hent;struct hostent *rhent;
6118                         char buffer[BUFSIZE];
6119                         int bufsize=BUFSIZE;int h_errno;
6120                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6121                                 &rhent, &h_errno);
6122 ; return 0; }
6123 EOF
6124 if { (eval echo configure:6125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6125   rm -rf conftest*
6126   ol_cv_func_gethostbyname_r_nargs=6
6127 else
6128   echo "configure: failed program was:" >&5
6129   cat conftest.$ac_ext >&5
6130   rm -rf conftest*
6131   ol_cv_func_gethostbyname_r_nargs=0
6132 fi
6133 rm -f conftest*
6134 fi
6135 rm -f conftest*
6136 fi
6137
6138 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6139   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6140         cat >> confdefs.h <<EOF
6141 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6142 EOF
6143
6144   fi
6145
6146 else
6147         ol_cv_func_gethostbyname_r_nargs=0
6148 fi
6149  
6150 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6151         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6152 echo "configure:6153: checking number of arguments of gethostbyaddr_r" >&5
6153 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6154   echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156   cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 #include <sys/types.h>
6160 #include <sys/socket.h>
6161 #include <netinet/in.h>
6162 #include <netdb.h>
6163 #define BUFSIZE (sizeof(struct hostent)+10)
6164 int main() {
6165 struct hostent hent; char buffer[BUFSIZE]; 
6166             struct in_addr add;
6167             size_t alen=sizeof(struct in_addr);
6168             int bufsize=BUFSIZE;int h_errno;
6169                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6170                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6171 ; return 0; }
6172 EOF
6173 if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6174   rm -rf conftest*
6175   ol_cv_func_gethostbyaddr_r_nargs=7
6176 else
6177   echo "configure: failed program was:" >&5
6178   cat conftest.$ac_ext >&5
6179   rm -rf conftest*
6180   cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 #include <sys/types.h>
6184 #include <sys/socket.h>
6185 #include <netinet/in.h>
6186 #include <netdb.h>
6187 #define BUFSIZE (sizeof(struct hostent)+10)
6188 int main() {
6189 struct hostent hent;
6190                         struct hostent *rhent; char buffer[BUFSIZE]; 
6191                         struct in_addr add;
6192                         size_t alen=sizeof(struct in_addr);
6193                         int bufsize=BUFSIZE;int h_errno;
6194                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6195                                 alen, AF_INET, &hent, buffer, bufsize, 
6196                                 &rhent, &h_errno);
6197 ; return 0; }
6198 EOF
6199 if { (eval echo configure:6200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6200   rm -rf conftest*
6201   ol_cv_func_gethostbyaddr_r_nargs=8
6202 else
6203   echo "configure: failed program was:" >&5
6204   cat conftest.$ac_ext >&5
6205   rm -rf conftest*
6206   ol_cv_func_gethostbyaddr_r_nargs=0
6207 fi
6208 rm -f conftest*
6209 fi
6210 rm -f conftest*
6211 fi
6212
6213 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6214   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6215     cat >> confdefs.h <<EOF
6216 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6217 EOF
6218
6219   fi
6220
6221 else
6222         ol_cv_func_gethostbyaddr_r_nargs=0
6223 fi
6224
6225 if test "$ac_cv_func_ctime_r" = yes \
6226         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6227         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6228         -a "$ac_cv_func_gethostbyname_r" = yes \
6229         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6230         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6231         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6232         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6233         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6234         ; then
6235  
6236         cat >> confdefs.h <<\EOF
6237 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6238 EOF
6239
6240 fi
6241
6242 ol_link_threads=no
6243 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6244         -o $ol_with_threads = posix ; then
6245
6246         for ac_hdr in pthread.h sched.h
6247 do
6248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6250 echo "configure:6251: checking for $ac_hdr" >&5
6251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6252   echo $ac_n "(cached) $ac_c" 1>&6
6253 else
6254   cat > conftest.$ac_ext <<EOF
6255 #line 6256 "configure"
6256 #include "confdefs.h"
6257 #include <$ac_hdr>
6258 EOF
6259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6260 { (eval echo configure:6261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6262 if test -z "$ac_err"; then
6263   rm -rf conftest*
6264   eval "ac_cv_header_$ac_safe=yes"
6265 else
6266   echo "$ac_err" >&5
6267   echo "configure: failed program was:" >&5
6268   cat conftest.$ac_ext >&5
6269   rm -rf conftest*
6270   eval "ac_cv_header_$ac_safe=no"
6271 fi
6272 rm -f conftest*
6273 fi
6274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6275   echo "$ac_t""yes" 1>&6
6276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6277   cat >> confdefs.h <<EOF
6278 #define $ac_tr_hdr 1
6279 EOF
6280  
6281 else
6282   echo "$ac_t""no" 1>&6
6283 fi
6284 done
6285
6286
6287         if test $ac_cv_header_pthread_h = yes ; then
6288                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6289 echo "configure:6290: checking POSIX thread version" >&5
6290 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   
6294         cat > conftest.$ac_ext <<EOF
6295 #line 6296 "configure"
6296 #include "confdefs.h"
6297
6298 #               include <pthread.h>
6299                 /* this check could be improved */
6300 #               ifdef PTHREAD_ONCE_INIT
6301                         pthread_version_final
6302 #               endif
6303         
6304 EOF
6305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6306   egrep "pthread_version_final" >/dev/null 2>&1; then
6307   rm -rf conftest*
6308   ol_pthread_final=yes
6309 else
6310   rm -rf conftest*
6311   ol_pthread_final=no
6312 fi
6313 rm -f conftest*
6314
6315
6316         cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6319
6320 #               include <pthread.h>
6321                 /* this check could be improved */
6322 #               ifdef pthread_once_init
6323                         pthread_version_draft4
6324 #               endif
6325         
6326 EOF
6327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6328   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6329   rm -rf conftest*
6330   ol_pthread_draft4=yes
6331 else
6332   rm -rf conftest*
6333   ol_pthread_draft4=no
6334 fi
6335 rm -f conftest*
6336
6337
6338         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6339                 ol_cv_pthread_version=final
6340         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6341                 ol_cv_pthread_version=draft4
6342         else
6343                 ol_cv_pthread_version=unknown
6344         fi
6345
6346 fi
6347
6348 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6349
6350
6351                 if test $ol_cv_pthread_version = final ; then
6352                         cat >> confdefs.h <<\EOF
6353 #define HAVE_PTHREADS_FINAL 1
6354 EOF
6355
6356                 elif test $ol_cv_pthread_version = draft4 ; then
6357                         cat >> confdefs.h <<\EOF
6358 #define HAVE_PTHREADS_D4 1
6359 EOF
6360
6361                 else
6362                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6363                 fi
6364
6365                 # consider threads found
6366                 ol_with_threads=found
6367
6368                 
6369         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6370 echo "configure:6371: checking for LinuxThreads pthread.h" >&5
6371 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 #include <pthread.h>
6378 EOF
6379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6380   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6381   rm -rf conftest*
6382   ol_cv_header_linux_threads=yes
6383 else
6384   rm -rf conftest*
6385   ol_cv_header_linux_threads=no
6386 fi
6387 rm -f conftest*
6388
6389                 
6390 fi
6391
6392 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6393         if test $ol_cv_header_linux_threads = yes; then
6394                 cat >> confdefs.h <<\EOF
6395 #define HAVE_LINUX_THREADS 1
6396 EOF
6397
6398         fi
6399
6400
6401                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6402                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6403 echo "configure:6404: checking for pthread_create in default libraries" >&5
6404 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6405   echo $ac_n "(cached) $ac_c" 1>&6
6406 else
6407   
6408                 if test "$cross_compiling" = yes; then
6409                         ol_cv_pthread_create=yes
6410 else
6411   cat > conftest.$ac_ext <<EOF
6412 #line 6413 "configure"
6413 #include "confdefs.h"
6414
6415 #include <pthread.h>
6416 #ifndef NULL
6417 #define NULL (void*)0
6418 #endif
6419
6420 static void *task(p)
6421         void *p;
6422 {
6423         return (void *) (p == NULL);
6424 }
6425
6426 int main(argc, argv)
6427         int argc;
6428         char **argv;
6429 {
6430         pthread_t t;
6431         int status;
6432
6433         /* make sure pthread_create() isn't just a stub */
6434 #if HAVE_PTHREADS_D4
6435         status = pthread_create(&t, pthread_attr_default, task, NULL);
6436 #else
6437         status = pthread_create(&t, NULL, task, NULL);
6438 #endif
6439
6440         if( status ) return status;
6441
6442         /* make sure pthread_detach() isn't just a stub */
6443 #if HAVE_PTHREADS_D4
6444         status = pthread_detach( &t );
6445 #else
6446         status = pthread_detach( t );
6447 #endif
6448
6449         return status;
6450 }
6451
6452 EOF
6453 if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6454 then
6455   ol_cv_pthread_create=yes
6456 else
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -fr conftest*
6460   ol_cv_pthread_create=no
6461 fi
6462 rm -fr conftest*
6463 fi
6464
6465 fi
6466
6467 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6468
6469                 if test $ol_cv_pthread_create != no ; then
6470                         ol_link_threads=posix
6471                         ol_link_pthreads=""
6472                 fi
6473                 
6474                 # Pthread try link: -mt (ol_cv_pthread_mt)
6475         if test "$ol_link_threads" = no ; then
6476                 # try -mt
6477                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6478 echo "configure:6479: checking for pthread link with -mt" >&5
6479 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   
6483                         # save the flags
6484                         ol_LIBS="$LIBS"
6485                         LIBS="-mt $LIBS"
6486
6487                         cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490
6491 #include <pthread.h>
6492 #ifndef NULL
6493 #define NULL (void*)0
6494 #endif
6495
6496 int main() {
6497
6498         pthread_t t;
6499
6500 #if HAVE_PTHREADS_D4
6501         pthread_create(&t, pthread_attr_default, NULL, NULL);
6502         pthread_detach( &t );
6503 #else
6504         pthread_create(&t, NULL, NULL, NULL);
6505         pthread_detach( t );
6506 #endif
6507 #ifdef HAVE_LINUX_THREADS
6508         pthread_kill_other_threads_np();
6509 #endif
6510
6511 ; return 0; }
6512 EOF
6513 if { (eval echo configure:6514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6514   rm -rf conftest*
6515   ol_cv_pthread_mt=yes
6516 else
6517   echo "configure: failed program was:" >&5
6518   cat conftest.$ac_ext >&5
6519   rm -rf conftest*
6520   ol_cv_pthread_mt=no
6521 fi
6522 rm -f conftest*
6523
6524                 # restore the LIBS
6525                 LIBS="$ol_LIBS"
6526                 
6527 fi
6528
6529 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6530
6531                 if test $ol_cv_pthread_mt = yes ; then
6532                         ol_link_pthreads="-mt"
6533                         ol_link_threads=posix
6534                 fi
6535         fi
6536
6537                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6538         if test "$ol_link_threads" = no ; then
6539                 # try -kthread
6540                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6541 echo "configure:6542: checking for pthread link with -kthread" >&5
6542 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6543   echo $ac_n "(cached) $ac_c" 1>&6
6544 else
6545   
6546                         # save the flags
6547                         ol_LIBS="$LIBS"
6548                         LIBS="-kthread $LIBS"
6549
6550                         cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553
6554 #include <pthread.h>
6555 #ifndef NULL
6556 #define NULL (void*)0
6557 #endif
6558
6559 int main() {
6560
6561         pthread_t t;
6562
6563 #if HAVE_PTHREADS_D4
6564         pthread_create(&t, pthread_attr_default, NULL, NULL);
6565         pthread_detach( &t );
6566 #else
6567         pthread_create(&t, NULL, NULL, NULL);
6568         pthread_detach( t );
6569 #endif
6570 #ifdef HAVE_LINUX_THREADS
6571         pthread_kill_other_threads_np();
6572 #endif
6573
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   ol_cv_pthread_kthread=yes
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   ol_cv_pthread_kthread=no
6584 fi
6585 rm -f conftest*
6586
6587                 # restore the LIBS
6588                 LIBS="$ol_LIBS"
6589                 
6590 fi
6591
6592 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6593
6594                 if test $ol_cv_pthread_kthread = yes ; then
6595                         ol_link_pthreads="-kthread"
6596                         ol_link_threads=posix
6597                 fi
6598         fi
6599
6600                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6601         if test "$ol_link_threads" = no ; then
6602                 # try -pthread
6603                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6604 echo "configure:6605: checking for pthread link with -pthread" >&5
6605 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6606   echo $ac_n "(cached) $ac_c" 1>&6
6607 else
6608   
6609                         # save the flags
6610                         ol_LIBS="$LIBS"
6611                         LIBS="-pthread $LIBS"
6612
6613                         cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616
6617 #include <pthread.h>
6618 #ifndef NULL
6619 #define NULL (void*)0
6620 #endif
6621
6622 int main() {
6623
6624         pthread_t t;
6625
6626 #if HAVE_PTHREADS_D4
6627         pthread_create(&t, pthread_attr_default, NULL, NULL);
6628         pthread_detach( &t );
6629 #else
6630         pthread_create(&t, NULL, NULL, NULL);
6631         pthread_detach( t );
6632 #endif
6633 #ifdef HAVE_LINUX_THREADS
6634         pthread_kill_other_threads_np();
6635 #endif
6636
6637 ; return 0; }
6638 EOF
6639 if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6640   rm -rf conftest*
6641   ol_cv_pthread_pthread=yes
6642 else
6643   echo "configure: failed program was:" >&5
6644   cat conftest.$ac_ext >&5
6645   rm -rf conftest*
6646   ol_cv_pthread_pthread=no
6647 fi
6648 rm -f conftest*
6649
6650                 # restore the LIBS
6651                 LIBS="$ol_LIBS"
6652                 
6653 fi
6654
6655 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6656
6657                 if test $ol_cv_pthread_pthread = yes ; then
6658                         ol_link_pthreads="-pthread"
6659                         ol_link_threads=posix
6660                 fi
6661         fi
6662
6663                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6664         if test "$ol_link_threads" = no ; then
6665                 # try -pthreads
6666                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6667 echo "configure:6668: checking for pthread link with -pthreads" >&5
6668 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6669   echo $ac_n "(cached) $ac_c" 1>&6
6670 else
6671   
6672                         # save the flags
6673                         ol_LIBS="$LIBS"
6674                         LIBS="-pthreads $LIBS"
6675
6676                         cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679
6680 #include <pthread.h>
6681 #ifndef NULL
6682 #define NULL (void*)0
6683 #endif
6684
6685 int main() {
6686
6687         pthread_t t;
6688
6689 #if HAVE_PTHREADS_D4
6690         pthread_create(&t, pthread_attr_default, NULL, NULL);
6691         pthread_detach( &t );
6692 #else
6693         pthread_create(&t, NULL, NULL, NULL);
6694         pthread_detach( t );
6695 #endif
6696 #ifdef HAVE_LINUX_THREADS
6697         pthread_kill_other_threads_np();
6698 #endif
6699
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6703   rm -rf conftest*
6704   ol_cv_pthread_pthreads=yes
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   ol_cv_pthread_pthreads=no
6710 fi
6711 rm -f conftest*
6712
6713                 # restore the LIBS
6714                 LIBS="$ol_LIBS"
6715                 
6716 fi
6717
6718 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6719
6720                 if test $ol_cv_pthread_pthreads = yes ; then
6721                         ol_link_pthreads="-pthreads"
6722                         ol_link_threads=posix
6723                 fi
6724         fi
6725
6726                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6727         if test "$ol_link_threads" = no ; then
6728                 # try -mthreads
6729                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6730 echo "configure:6731: checking for pthread link with -mthreads" >&5
6731 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6732   echo $ac_n "(cached) $ac_c" 1>&6
6733 else
6734   
6735                         # save the flags
6736                         ol_LIBS="$LIBS"
6737                         LIBS="-mthreads $LIBS"
6738
6739                         cat > conftest.$ac_ext <<EOF
6740 #line 6741 "configure"
6741 #include "confdefs.h"
6742
6743 #include <pthread.h>
6744 #ifndef NULL
6745 #define NULL (void*)0
6746 #endif
6747
6748 int main() {
6749
6750         pthread_t t;
6751
6752 #if HAVE_PTHREADS_D4
6753         pthread_create(&t, pthread_attr_default, NULL, NULL);
6754         pthread_detach( &t );
6755 #else
6756         pthread_create(&t, NULL, NULL, NULL);
6757         pthread_detach( t );
6758 #endif
6759 #ifdef HAVE_LINUX_THREADS
6760         pthread_kill_other_threads_np();
6761 #endif
6762
6763 ; return 0; }
6764 EOF
6765 if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6766   rm -rf conftest*
6767   ol_cv_pthread_mthreads=yes
6768 else
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   ol_cv_pthread_mthreads=no
6773 fi
6774 rm -f conftest*
6775
6776                 # restore the LIBS
6777                 LIBS="$ol_LIBS"
6778                 
6779 fi
6780
6781 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6782
6783                 if test $ol_cv_pthread_mthreads = yes ; then
6784                         ol_link_pthreads="-mthreads"
6785                         ol_link_threads=posix
6786                 fi
6787         fi
6788
6789                 # Pthread try link: -thread (ol_cv_pthread_thread)
6790         if test "$ol_link_threads" = no ; then
6791                 # try -thread
6792                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6793 echo "configure:6794: checking for pthread link with -thread" >&5
6794 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6795   echo $ac_n "(cached) $ac_c" 1>&6
6796 else
6797   
6798                         # save the flags
6799                         ol_LIBS="$LIBS"
6800                         LIBS="-thread $LIBS"
6801
6802                         cat > conftest.$ac_ext <<EOF
6803 #line 6804 "configure"
6804 #include "confdefs.h"
6805
6806 #include <pthread.h>
6807 #ifndef NULL
6808 #define NULL (void*)0
6809 #endif
6810
6811 int main() {
6812
6813         pthread_t t;
6814
6815 #if HAVE_PTHREADS_D4
6816         pthread_create(&t, pthread_attr_default, NULL, NULL);
6817         pthread_detach( &t );
6818 #else
6819         pthread_create(&t, NULL, NULL, NULL);
6820         pthread_detach( t );
6821 #endif
6822 #ifdef HAVE_LINUX_THREADS
6823         pthread_kill_other_threads_np();
6824 #endif
6825
6826 ; return 0; }
6827 EOF
6828 if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6829   rm -rf conftest*
6830   ol_cv_pthread_thread=yes
6831 else
6832   echo "configure: failed program was:" >&5
6833   cat conftest.$ac_ext >&5
6834   rm -rf conftest*
6835   ol_cv_pthread_thread=no
6836 fi
6837 rm -f conftest*
6838
6839                 # restore the LIBS
6840                 LIBS="$ol_LIBS"
6841                 
6842 fi
6843
6844 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6845
6846                 if test $ol_cv_pthread_thread = yes ; then
6847                         ol_link_pthreads="-thread"
6848                         ol_link_threads=posix
6849                 fi
6850         fi
6851
6852
6853                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6854         if test "$ol_link_threads" = no ; then
6855                 # try -lpthread -lmach -lexc -lc_r
6856                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6857 echo "configure:6858: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6858 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   
6862                         # save the flags
6863                         ol_LIBS="$LIBS"
6864                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6865
6866                         cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869
6870 #include <pthread.h>
6871 #ifndef NULL
6872 #define NULL (void*)0
6873 #endif
6874
6875 int main() {
6876
6877         pthread_t t;
6878
6879 #if HAVE_PTHREADS_D4
6880         pthread_create(&t, pthread_attr_default, NULL, NULL);
6881         pthread_detach( &t );
6882 #else
6883         pthread_create(&t, NULL, NULL, NULL);
6884         pthread_detach( t );
6885 #endif
6886 #ifdef HAVE_LINUX_THREADS
6887         pthread_kill_other_threads_np();
6888 #endif
6889
6890 ; return 0; }
6891 EOF
6892 if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6893   rm -rf conftest*
6894   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6895 else
6896   echo "configure: failed program was:" >&5
6897   cat conftest.$ac_ext >&5
6898   rm -rf conftest*
6899   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6900 fi
6901 rm -f conftest*
6902
6903                 # restore the LIBS
6904                 LIBS="$ol_LIBS"
6905                 
6906 fi
6907
6908 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6909
6910                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6911                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6912                         ol_link_threads=posix
6913                 fi
6914         fi
6915
6916                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6917         if test "$ol_link_threads" = no ; then
6918                 # try -lpthread -lmach -lexc
6919                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6920 echo "configure:6921: checking for pthread link with -lpthread -lmach -lexc" >&5
6921 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6922   echo $ac_n "(cached) $ac_c" 1>&6
6923 else
6924   
6925                         # save the flags
6926                         ol_LIBS="$LIBS"
6927                         LIBS="-lpthread -lmach -lexc $LIBS"
6928
6929                         cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932
6933 #include <pthread.h>
6934 #ifndef NULL
6935 #define NULL (void*)0
6936 #endif
6937
6938 int main() {
6939
6940         pthread_t t;
6941
6942 #if HAVE_PTHREADS_D4
6943         pthread_create(&t, pthread_attr_default, NULL, NULL);
6944         pthread_detach( &t );
6945 #else
6946         pthread_create(&t, NULL, NULL, NULL);
6947         pthread_detach( t );
6948 #endif
6949 #ifdef HAVE_LINUX_THREADS
6950         pthread_kill_other_threads_np();
6951 #endif
6952
6953 ; return 0; }
6954 EOF
6955 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6956   rm -rf conftest*
6957   ol_cv_pthread_lpthread_lmach_lexc=yes
6958 else
6959   echo "configure: failed program was:" >&5
6960   cat conftest.$ac_ext >&5
6961   rm -rf conftest*
6962   ol_cv_pthread_lpthread_lmach_lexc=no
6963 fi
6964 rm -f conftest*
6965
6966                 # restore the LIBS
6967                 LIBS="$ol_LIBS"
6968                 
6969 fi
6970
6971 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6972
6973                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6974                         ol_link_pthreads="-lpthread -lmach -lexc"
6975                         ol_link_threads=posix
6976                 fi
6977         fi
6978
6979
6980                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6981         if test "$ol_link_threads" = no ; then
6982                 # try -lpthread -Wl,-woff,85
6983                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6984 echo "configure:6985: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6985 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6986   echo $ac_n "(cached) $ac_c" 1>&6
6987 else
6988   
6989                         # save the flags
6990                         ol_LIBS="$LIBS"
6991                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6992
6993                         cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996
6997 #include <pthread.h>
6998 #ifndef NULL
6999 #define NULL (void*)0
7000 #endif
7001
7002 int main() {
7003
7004         pthread_t t;
7005
7006 #if HAVE_PTHREADS_D4
7007         pthread_create(&t, pthread_attr_default, NULL, NULL);
7008         pthread_detach( &t );
7009 #else
7010         pthread_create(&t, NULL, NULL, NULL);
7011         pthread_detach( t );
7012 #endif
7013 #ifdef HAVE_LINUX_THREADS
7014         pthread_kill_other_threads_np();
7015 #endif
7016
7017 ; return 0; }
7018 EOF
7019 if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7020   rm -rf conftest*
7021   ol_cv_pthread_lib_lpthread_woff=yes
7022 else
7023   echo "configure: failed program was:" >&5
7024   cat conftest.$ac_ext >&5
7025   rm -rf conftest*
7026   ol_cv_pthread_lib_lpthread_woff=no
7027 fi
7028 rm -f conftest*
7029
7030                 # restore the LIBS
7031                 LIBS="$ol_LIBS"
7032                 
7033 fi
7034
7035 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7036
7037                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7038                         ol_link_pthreads="-lpthread -Wl,-woff,85"
7039                         ol_link_threads=posix
7040                 fi
7041         fi
7042
7043
7044                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7045         if test "$ol_link_threads" = no ; then
7046                 # try -lpthread
7047                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7048 echo "configure:7049: checking for pthread link with -lpthread" >&5
7049 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7050   echo $ac_n "(cached) $ac_c" 1>&6
7051 else
7052   
7053                         # save the flags
7054                         ol_LIBS="$LIBS"
7055                         LIBS="-lpthread $LIBS"
7056
7057                         cat > conftest.$ac_ext <<EOF
7058 #line 7059 "configure"
7059 #include "confdefs.h"
7060
7061 #include <pthread.h>
7062 #ifndef NULL
7063 #define NULL (void*)0
7064 #endif
7065
7066 int main() {
7067
7068         pthread_t t;
7069
7070 #if HAVE_PTHREADS_D4
7071         pthread_create(&t, pthread_attr_default, NULL, NULL);
7072         pthread_detach( &t );
7073 #else
7074         pthread_create(&t, NULL, NULL, NULL);
7075         pthread_detach( t );
7076 #endif
7077 #ifdef HAVE_LINUX_THREADS
7078         pthread_kill_other_threads_np();
7079 #endif
7080
7081 ; return 0; }
7082 EOF
7083 if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084   rm -rf conftest*
7085   ol_cv_pthread_lpthread=yes
7086 else
7087   echo "configure: failed program was:" >&5
7088   cat conftest.$ac_ext >&5
7089   rm -rf conftest*
7090   ol_cv_pthread_lpthread=no
7091 fi
7092 rm -f conftest*
7093
7094                 # restore the LIBS
7095                 LIBS="$ol_LIBS"
7096                 
7097 fi
7098
7099 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7100
7101                 if test $ol_cv_pthread_lpthread = yes ; then
7102                         ol_link_pthreads="-lpthread"
7103                         ol_link_threads=posix
7104                 fi
7105         fi
7106
7107                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7108         if test "$ol_link_threads" = no ; then
7109                 # try -lc_r
7110                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7111 echo "configure:7112: checking for pthread link with -lc_r" >&5
7112 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7113   echo $ac_n "(cached) $ac_c" 1>&6
7114 else
7115   
7116                         # save the flags
7117                         ol_LIBS="$LIBS"
7118                         LIBS="-lc_r $LIBS"
7119
7120                         cat > conftest.$ac_ext <<EOF
7121 #line 7122 "configure"
7122 #include "confdefs.h"
7123
7124 #include <pthread.h>
7125 #ifndef NULL
7126 #define NULL (void*)0
7127 #endif
7128
7129 int main() {
7130
7131         pthread_t t;
7132
7133 #if HAVE_PTHREADS_D4
7134         pthread_create(&t, pthread_attr_default, NULL, NULL);
7135         pthread_detach( &t );
7136 #else
7137         pthread_create(&t, NULL, NULL, NULL);
7138         pthread_detach( t );
7139 #endif
7140 #ifdef HAVE_LINUX_THREADS
7141         pthread_kill_other_threads_np();
7142 #endif
7143
7144 ; return 0; }
7145 EOF
7146 if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7147   rm -rf conftest*
7148   ol_cv_pthread_lc_r=yes
7149 else
7150   echo "configure: failed program was:" >&5
7151   cat conftest.$ac_ext >&5
7152   rm -rf conftest*
7153   ol_cv_pthread_lc_r=no
7154 fi
7155 rm -f conftest*
7156
7157                 # restore the LIBS
7158                 LIBS="$ol_LIBS"
7159                 
7160 fi
7161
7162 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
7163
7164                 if test $ol_cv_pthread_lc_r = yes ; then
7165                         ol_link_pthreads="-lc_r"
7166                         ol_link_threads=posix
7167                 fi
7168         fi
7169
7170
7171                 # Pthread try link: -threads (ol_cv_pthread_threads)
7172         if test "$ol_link_threads" = no ; then
7173                 # try -threads
7174                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
7175 echo "configure:7176: checking for pthread link with -threads" >&5
7176 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
7177   echo $ac_n "(cached) $ac_c" 1>&6
7178 else
7179   
7180                         # save the flags
7181                         ol_LIBS="$LIBS"
7182                         LIBS="-threads $LIBS"
7183
7184                         cat > conftest.$ac_ext <<EOF
7185 #line 7186 "configure"
7186 #include "confdefs.h"
7187
7188 #include <pthread.h>
7189 #ifndef NULL
7190 #define NULL (void*)0
7191 #endif
7192
7193 int main() {
7194
7195         pthread_t t;
7196
7197 #if HAVE_PTHREADS_D4
7198         pthread_create(&t, pthread_attr_default, NULL, NULL);
7199         pthread_detach( &t );
7200 #else
7201         pthread_create(&t, NULL, NULL, NULL);
7202         pthread_detach( t );
7203 #endif
7204 #ifdef HAVE_LINUX_THREADS
7205         pthread_kill_other_threads_np();
7206 #endif
7207
7208 ; return 0; }
7209 EOF
7210 if { (eval echo configure:7211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7211   rm -rf conftest*
7212   ol_cv_pthread_threads=yes
7213 else
7214   echo "configure: failed program was:" >&5
7215   cat conftest.$ac_ext >&5
7216   rm -rf conftest*
7217   ol_cv_pthread_threads=no
7218 fi
7219 rm -f conftest*
7220
7221                 # restore the LIBS
7222                 LIBS="$ol_LIBS"
7223                 
7224 fi
7225
7226 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7227
7228                 if test $ol_cv_pthread_threads = yes ; then
7229                         ol_link_pthreads="-threads"
7230                         ol_link_threads=posix
7231                 fi
7232         fi
7233
7234
7235                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7236         if test "$ol_link_threads" = no ; then
7237                 # try -lpthreads -lmach -lexc -lc_r
7238                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7239 echo "configure:7240: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7240 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
7241   echo $ac_n "(cached) $ac_c" 1>&6
7242 else
7243   
7244                         # save the flags
7245                         ol_LIBS="$LIBS"
7246                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7247
7248                         cat > conftest.$ac_ext <<EOF
7249 #line 7250 "configure"
7250 #include "confdefs.h"
7251
7252 #include <pthread.h>
7253 #ifndef NULL
7254 #define NULL (void*)0
7255 #endif
7256
7257 int main() {
7258
7259         pthread_t t;
7260
7261 #if HAVE_PTHREADS_D4
7262         pthread_create(&t, pthread_attr_default, NULL, NULL);
7263         pthread_detach( &t );
7264 #else
7265         pthread_create(&t, NULL, NULL, NULL);
7266         pthread_detach( t );
7267 #endif
7268 #ifdef HAVE_LINUX_THREADS
7269         pthread_kill_other_threads_np();
7270 #endif
7271
7272 ; return 0; }
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7275   rm -rf conftest*
7276   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7282 fi
7283 rm -f conftest*
7284
7285                 # restore the LIBS
7286                 LIBS="$ol_LIBS"
7287                 
7288 fi
7289
7290 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7291
7292                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7293                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7294                         ol_link_threads=posix
7295                 fi
7296         fi
7297
7298                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7299         if test "$ol_link_threads" = no ; then
7300                 # try -lpthreads -lmach -lexc
7301                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7302 echo "configure:7303: checking for pthread link with -lpthreads -lmach -lexc" >&5
7303 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
7304   echo $ac_n "(cached) $ac_c" 1>&6
7305 else
7306   
7307                         # save the flags
7308                         ol_LIBS="$LIBS"
7309                         LIBS="-lpthreads -lmach -lexc $LIBS"
7310
7311                         cat > conftest.$ac_ext <<EOF
7312 #line 7313 "configure"
7313 #include "confdefs.h"
7314
7315 #include <pthread.h>
7316 #ifndef NULL
7317 #define NULL (void*)0
7318 #endif
7319
7320 int main() {
7321
7322         pthread_t t;
7323
7324 #if HAVE_PTHREADS_D4
7325         pthread_create(&t, pthread_attr_default, NULL, NULL);
7326         pthread_detach( &t );
7327 #else
7328         pthread_create(&t, NULL, NULL, NULL);
7329         pthread_detach( t );
7330 #endif
7331 #ifdef HAVE_LINUX_THREADS
7332         pthread_kill_other_threads_np();
7333 #endif
7334
7335 ; return 0; }
7336 EOF
7337 if { (eval echo configure:7338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7338   rm -rf conftest*
7339   ol_cv_pthread_lpthreads_lmach_lexc=yes
7340 else
7341   echo "configure: failed program was:" >&5
7342   cat conftest.$ac_ext >&5
7343   rm -rf conftest*
7344   ol_cv_pthread_lpthreads_lmach_lexc=no
7345 fi
7346 rm -f conftest*
7347
7348                 # restore the LIBS
7349                 LIBS="$ol_LIBS"
7350                 
7351 fi
7352
7353 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7354
7355                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7356                         ol_link_pthreads="-lpthreads -lmach -lexc"
7357                         ol_link_threads=posix
7358                 fi
7359         fi
7360
7361                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7362         if test "$ol_link_threads" = no ; then
7363                 # try -lpthreads -lexc
7364                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7365 echo "configure:7366: checking for pthread link with -lpthreads -lexc" >&5
7366 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
7367   echo $ac_n "(cached) $ac_c" 1>&6
7368 else
7369   
7370                         # save the flags
7371                         ol_LIBS="$LIBS"
7372                         LIBS="-lpthreads -lexc $LIBS"
7373
7374                         cat > conftest.$ac_ext <<EOF
7375 #line 7376 "configure"
7376 #include "confdefs.h"
7377
7378 #include <pthread.h>
7379 #ifndef NULL
7380 #define NULL (void*)0
7381 #endif
7382
7383 int main() {
7384
7385         pthread_t t;
7386
7387 #if HAVE_PTHREADS_D4
7388         pthread_create(&t, pthread_attr_default, NULL, NULL);
7389         pthread_detach( &t );
7390 #else
7391         pthread_create(&t, NULL, NULL, NULL);
7392         pthread_detach( t );
7393 #endif
7394 #ifdef HAVE_LINUX_THREADS
7395         pthread_kill_other_threads_np();
7396 #endif
7397
7398 ; return 0; }
7399 EOF
7400 if { (eval echo configure:7401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7401   rm -rf conftest*
7402   ol_cv_pthread_lpthreads_lexc=yes
7403 else
7404   echo "configure: failed program was:" >&5
7405   cat conftest.$ac_ext >&5
7406   rm -rf conftest*
7407   ol_cv_pthread_lpthreads_lexc=no
7408 fi
7409 rm -f conftest*
7410
7411                 # restore the LIBS
7412                 LIBS="$ol_LIBS"
7413                 
7414 fi
7415
7416 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7417
7418                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7419                         ol_link_pthreads="-lpthreads -lexc"
7420                         ol_link_threads=posix
7421                 fi
7422         fi
7423
7424
7425                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7426         if test "$ol_link_threads" = no ; then
7427                 # try -lpthreads
7428                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7429 echo "configure:7430: checking for pthread link with -lpthreads" >&5
7430 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
7431   echo $ac_n "(cached) $ac_c" 1>&6
7432 else
7433   
7434                         # save the flags
7435                         ol_LIBS="$LIBS"
7436                         LIBS="-lpthreads $LIBS"
7437
7438                         cat > conftest.$ac_ext <<EOF
7439 #line 7440 "configure"
7440 #include "confdefs.h"
7441
7442 #include <pthread.h>
7443 #ifndef NULL
7444 #define NULL (void*)0
7445 #endif
7446
7447 int main() {
7448
7449         pthread_t t;
7450
7451 #if HAVE_PTHREADS_D4
7452         pthread_create(&t, pthread_attr_default, NULL, NULL);
7453         pthread_detach( &t );
7454 #else
7455         pthread_create(&t, NULL, NULL, NULL);
7456         pthread_detach( t );
7457 #endif
7458 #ifdef HAVE_LINUX_THREADS
7459         pthread_kill_other_threads_np();
7460 #endif
7461
7462 ; return 0; }
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7465   rm -rf conftest*
7466   ol_cv_pthread_lib_lpthreads=yes
7467 else
7468   echo "configure: failed program was:" >&5
7469   cat conftest.$ac_ext >&5
7470   rm -rf conftest*
7471   ol_cv_pthread_lib_lpthreads=no
7472 fi
7473 rm -f conftest*
7474
7475                 # restore the LIBS
7476                 LIBS="$ol_LIBS"
7477                 
7478 fi
7479
7480 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7481
7482                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7483                         ol_link_pthreads="-lpthreads"
7484                         ol_link_threads=posix
7485                 fi
7486         fi
7487
7488
7489                 if test $ol_link_threads != no ; then
7490                         cat >> confdefs.h <<\EOF
7491 #define HAVE_PTHREADS 1
7492 EOF
7493
7494
7495                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7496
7497                                                 save_CPPFLAGS="$CPPFLAGS"
7498                         save_LIBS="$LIBS"
7499                         LIBS="$LTHREAD_LIBS $LIBS"
7500
7501                                                                                                 for ac_func in sched_yield pthread_yield
7502 do
7503 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7504 echo "configure:7505: checking for $ac_func" >&5
7505 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7506   echo $ac_n "(cached) $ac_c" 1>&6
7507 else
7508   cat > conftest.$ac_ext <<EOF
7509 #line 7510 "configure"
7510 #include "confdefs.h"
7511 /* System header to define __stub macros and hopefully few prototypes,
7512     which can conflict with char $ac_func(); below.  */
7513 #include <assert.h>
7514 /* Override any gcc2 internal prototype to avoid an error.  */
7515 /* We use char because int might match the return type of a gcc2
7516     builtin and then its argument prototype would still apply.  */
7517 char $ac_func();
7518 char (*f)();
7519
7520 int main() {
7521
7522 /* The GNU C library defines this for functions which it implements
7523     to always fail with ENOSYS.  Some functions are actually named
7524     something starting with __ and the normal name is an alias.  */
7525 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7526 choke me
7527 #else
7528 f = $ac_func;
7529 #endif
7530
7531 ; return 0; }
7532 EOF
7533 if { (eval echo configure:7534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7534   rm -rf conftest*
7535   eval "ac_cv_func_$ac_func=yes"
7536 else
7537   echo "configure: failed program was:" >&5
7538   cat conftest.$ac_ext >&5
7539   rm -rf conftest*
7540   eval "ac_cv_func_$ac_func=no"
7541 fi
7542 rm -f conftest*
7543 fi
7544
7545 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7546   echo "$ac_t""yes" 1>&6
7547     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7548   cat >> confdefs.h <<EOF
7549 #define $ac_tr_func 1
7550 EOF
7551  
7552 else
7553   echo "$ac_t""no" 1>&6
7554 fi
7555 done
7556
7557
7558                         if test $ac_cv_func_sched_yield = no -a \
7559                                 $ac_cv_func_pthread_yield = no ; then
7560                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7561 echo "configure:7562: checking for sched_yield in -lrt" >&5
7562 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7563 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7564   echo $ac_n "(cached) $ac_c" 1>&6
7565 else
7566   ac_save_LIBS="$LIBS"
7567 LIBS="-lrt  $LIBS"
7568 cat > conftest.$ac_ext <<EOF
7569 #line 7570 "configure"
7570 #include "confdefs.h"
7571 /* Override any gcc2 internal prototype to avoid an error.  */
7572 /* We use char because int might match the return type of a gcc2
7573     builtin and then its argument prototype would still apply.  */
7574 char sched_yield();
7575
7576 int main() {
7577 sched_yield()
7578 ; return 0; }
7579 EOF
7580 if { (eval echo configure:7581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7581   rm -rf conftest*
7582   eval "ac_cv_lib_$ac_lib_var=yes"
7583 else
7584   echo "configure: failed program was:" >&5
7585   cat conftest.$ac_ext >&5
7586   rm -rf conftest*
7587   eval "ac_cv_lib_$ac_lib_var=no"
7588 fi
7589 rm -f conftest*
7590 LIBS="$ac_save_LIBS"
7591
7592 fi
7593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7594   echo "$ac_t""yes" 1>&6
7595   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7596                                         cat >> confdefs.h <<\EOF
7597 #define HAVE_SCHED_YIELD 1
7598 EOF
7599
7600                                         ac_cv_func_sched_yield=yes
7601 else
7602   echo "$ac_t""no" 1>&6
7603 ac_cv_func_sched_yield=no
7604 fi
7605
7606                         fi
7607                         if test $ac_cv_func_sched_yield = no -a \
7608                                 $ac_cv_func_pthread_yield = no ; then
7609                                                                                                 for ac_func in thr_yield
7610 do
7611 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7612 echo "configure:7613: checking for $ac_func" >&5
7613 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   cat > conftest.$ac_ext <<EOF
7617 #line 7618 "configure"
7618 #include "confdefs.h"
7619 /* System header to define __stub macros and hopefully few prototypes,
7620     which can conflict with char $ac_func(); below.  */
7621 #include <assert.h>
7622 /* Override any gcc2 internal prototype to avoid an error.  */
7623 /* We use char because int might match the return type of a gcc2
7624     builtin and then its argument prototype would still apply.  */
7625 char $ac_func();
7626 char (*f)();
7627
7628 int main() {
7629
7630 /* The GNU C library defines this for functions which it implements
7631     to always fail with ENOSYS.  Some functions are actually named
7632     something starting with __ and the normal name is an alias.  */
7633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7634 choke me
7635 #else
7636 f = $ac_func;
7637 #endif
7638
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   eval "ac_cv_func_$ac_func=yes"
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_func_$ac_func=no"
7649 fi
7650 rm -f conftest*
7651 fi
7652
7653 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7654   echo "$ac_t""yes" 1>&6
7655     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7656   cat >> confdefs.h <<EOF
7657 #define $ac_tr_func 1
7658 EOF
7659  
7660 else
7661   echo "$ac_t""no" 1>&6
7662 fi
7663 done
7664
7665                         fi
7666                         if test $ac_cv_func_sched_yield = no -a \
7667                                 $ac_cv_func_pthread_yield = no -a \
7668                                 "$ac_cv_func_thr_yield" = no ; then
7669                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7670                         fi
7671
7672                                                 for ac_func in pthread_kill
7673 do
7674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7675 echo "configure:7676: checking for $ac_func" >&5
7676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7677   echo $ac_n "(cached) $ac_c" 1>&6
7678 else
7679   cat > conftest.$ac_ext <<EOF
7680 #line 7681 "configure"
7681 #include "confdefs.h"
7682 /* System header to define __stub macros and hopefully few prototypes,
7683     which can conflict with char $ac_func(); below.  */
7684 #include <assert.h>
7685 /* Override any gcc2 internal prototype to avoid an error.  */
7686 /* We use char because int might match the return type of a gcc2
7687     builtin and then its argument prototype would still apply.  */
7688 char $ac_func();
7689 char (*f)();
7690
7691 int main() {
7692
7693 /* The GNU C library defines this for functions which it implements
7694     to always fail with ENOSYS.  Some functions are actually named
7695     something starting with __ and the normal name is an alias.  */
7696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7697 choke me
7698 #else
7699 f = $ac_func;
7700 #endif
7701
7702 ; return 0; }
7703 EOF
7704 if { (eval echo configure:7705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7705   rm -rf conftest*
7706   eval "ac_cv_func_$ac_func=yes"
7707 else
7708   echo "configure: failed program was:" >&5
7709   cat conftest.$ac_ext >&5
7710   rm -rf conftest*
7711   eval "ac_cv_func_$ac_func=no"
7712 fi
7713 rm -f conftest*
7714 fi
7715
7716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7717   echo "$ac_t""yes" 1>&6
7718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7719   cat >> confdefs.h <<EOF
7720 #define $ac_tr_func 1
7721 EOF
7722  
7723 else
7724   echo "$ac_t""no" 1>&6
7725 fi
7726 done
7727
7728
7729                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7730 echo "configure:7731: checking for pthread_detach with <pthread.h>" >&5
7731 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7732   echo $ac_n "(cached) $ac_c" 1>&6
7733 else
7734   
7735                                                                 cat > conftest.$ac_ext <<EOF
7736 #line 7737 "configure"
7737 #include "confdefs.h"
7738
7739 #include <pthread.h>
7740 #ifndef NULL
7741 #define NULL (void*)0
7742 #endif
7743
7744 int main() {
7745 pthread_detach(NULL);
7746 ; return 0; }
7747 EOF
7748 if { (eval echo configure:7749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7749   rm -rf conftest*
7750   ol_cv_func_pthread_detach=yes
7751 else
7752   echo "configure: failed program was:" >&5
7753   cat conftest.$ac_ext >&5
7754   rm -rf conftest*
7755   ol_cv_func_pthread_detach=no
7756 fi
7757 rm -f conftest*
7758                         
7759 fi
7760
7761 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7762
7763                         if test $ol_cv_func_pthread_detach = no ; then
7764                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7765                         fi
7766
7767                         cat >> confdefs.h <<\EOF
7768 #define HAVE_PTHREAD_DETACH 1
7769 EOF
7770
7771
7772                                                 for ac_func in \
7773                                 pthread_setconcurrency \
7774                                 pthread_getconcurrency \
7775                                 thr_setconcurrency \
7776                                 thr_getconcurrency \
7777                         
7778 do
7779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7780 echo "configure:7781: checking for $ac_func" >&5
7781 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7782   echo $ac_n "(cached) $ac_c" 1>&6
7783 else
7784   cat > conftest.$ac_ext <<EOF
7785 #line 7786 "configure"
7786 #include "confdefs.h"
7787 /* System header to define __stub macros and hopefully few prototypes,
7788     which can conflict with char $ac_func(); below.  */
7789 #include <assert.h>
7790 /* Override any gcc2 internal prototype to avoid an error.  */
7791 /* We use char because int might match the return type of a gcc2
7792     builtin and then its argument prototype would still apply.  */
7793 char $ac_func();
7794 char (*f)();
7795
7796 int main() {
7797
7798 /* The GNU C library defines this for functions which it implements
7799     to always fail with ENOSYS.  Some functions are actually named
7800     something starting with __ and the normal name is an alias.  */
7801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7802 choke me
7803 #else
7804 f = $ac_func;
7805 #endif
7806
7807 ; return 0; }
7808 EOF
7809 if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7810   rm -rf conftest*
7811   eval "ac_cv_func_$ac_func=yes"
7812 else
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -rf conftest*
7816   eval "ac_cv_func_$ac_func=no"
7817 fi
7818 rm -f conftest*
7819 fi
7820
7821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7822   echo "$ac_t""yes" 1>&6
7823     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7824   cat >> confdefs.h <<EOF
7825 #define $ac_tr_func 1
7826 EOF
7827  
7828 else
7829   echo "$ac_t""no" 1>&6
7830 fi
7831 done
7832
7833
7834                         
7835         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7836 echo "configure:7837: checking for pthread_kill_other_threads_np" >&5
7837 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7838   echo $ac_n "(cached) $ac_c" 1>&6
7839 else
7840   cat > conftest.$ac_ext <<EOF
7841 #line 7842 "configure"
7842 #include "confdefs.h"
7843 /* System header to define __stub macros and hopefully few prototypes,
7844     which can conflict with char pthread_kill_other_threads_np(); below.  */
7845 #include <assert.h>
7846 /* Override any gcc2 internal prototype to avoid an error.  */
7847 /* We use char because int might match the return type of a gcc2
7848     builtin and then its argument prototype would still apply.  */
7849 char pthread_kill_other_threads_np();
7850 char (*f)();
7851
7852 int main() {
7853
7854 /* The GNU C library defines this for functions which it implements
7855     to always fail with ENOSYS.  Some functions are actually named
7856     something starting with __ and the normal name is an alias.  */
7857 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7858 choke me
7859 #else
7860 f = pthread_kill_other_threads_np;
7861 #endif
7862
7863 ; return 0; }
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7866   rm -rf conftest*
7867   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -rf conftest*
7872   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7873 fi
7874 rm -f conftest*
7875 fi
7876
7877 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7878   echo "$ac_t""yes" 1>&6
7879   :
7880 else
7881   echo "$ac_t""no" 1>&6
7882 fi
7883
7884         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7885 echo "configure:7886: checking for LinuxThreads implementation" >&5
7886 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7887   echo $ac_n "(cached) $ac_c" 1>&6
7888 else
7889   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7890 fi
7891
7892 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7893
7894                         
7895         
7896         
7897         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7898 echo "configure:7899: checking for LinuxThreads consistency" >&5
7899 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902   
7903                 if test $ol_cv_header_linux_threads = yes -a \
7904                         $ol_cv_sys_linux_threads = yes; then
7905                         ol_cv_linux_threads=yes
7906                 elif test $ol_cv_header_linux_threads = no -a \
7907                         $ol_cv_sys_linux_threads = no; then
7908                         ol_cv_linux_threads=no
7909                 else
7910                         ol_cv_linux_threads=error
7911                 fi
7912         
7913 fi
7914
7915 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7916
7917
7918                         if test $ol_cv_linux_threads = error; then
7919                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7920                         fi
7921
7922                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7923 echo "configure:7924: checking if pthread_create() works" >&5
7924 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7925   echo $ac_n "(cached) $ac_c" 1>&6
7926 else
7927   
7928                         if test "$cross_compiling" = yes; then
7929                                 ol_cv_pthread_create_works=yes
7930 else
7931   cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934
7935 #include <pthread.h>
7936 #ifndef NULL
7937 #define NULL (void*)0
7938 #endif
7939
7940 static void *task(p)
7941         void *p;
7942 {
7943         return (void *) (p == NULL);
7944 }
7945
7946 int main(argc, argv)
7947         int argc;
7948         char **argv;
7949 {
7950         pthread_t t;
7951 #if HAVE_PTHREADS_D4
7952         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7953 #else
7954         exit(pthread_create(&t, NULL, task, NULL));
7955 #endif
7956 }
7957
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7960 then
7961   ol_cv_pthread_create_works=yes
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -fr conftest*
7966   ol_cv_pthread_create_works=no
7967 fi
7968 rm -fr conftest*
7969 fi
7970
7971 fi
7972
7973 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7974
7975                         if test $ol_cv_pthread_create_works = no ; then
7976                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7977                         fi
7978
7979                                                 if test $ol_with_yielding_select = auto ; then
7980                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7981 echo "configure:7982: checking if select yields when using pthreads" >&5
7982 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7983   echo $ac_n "(cached) $ac_c" 1>&6
7984 else
7985   
7986                                 if test "$cross_compiling" = yes; then
7987   ol_cv_pthread_select_yields=cross
7988 else
7989   cat > conftest.$ac_ext <<EOF
7990 #line 7991 "configure"
7991 #include "confdefs.h"
7992
7993 #include <sys/types.h>
7994 #include <sys/time.h>
7995 #include <unistd.h>
7996 #include <pthread.h>
7997 #ifndef NULL
7998 #define NULL (void*) 0
7999 #endif
8000
8001 static int fildes[2];
8002
8003 static void *task(p)
8004         void *p;
8005 {
8006         int i;
8007         struct timeval tv;
8008
8009         fd_set rfds;
8010
8011         tv.tv_sec=10;
8012         tv.tv_usec=0;
8013
8014         FD_ZERO(&rfds);
8015         FD_SET(fildes[0], &rfds);
8016
8017         /* we're not interested in any fds */
8018         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
8019
8020         if(i < 0) {
8021                 perror("select");
8022                 exit(10);
8023         }
8024
8025         exit(0); /* if we exit here, the select blocked the whole process */
8026 }
8027
8028 int main(argc, argv)
8029         int argc;
8030         char **argv;
8031 {
8032         pthread_t t;
8033
8034         /* create a pipe to select */
8035         if(pipe(&fildes[0])) {
8036                 perror("select");
8037                 exit(1);
8038         }
8039
8040 #ifdef HAVE_PTHREAD_SETCONCURRENCY
8041         (void) pthread_setconcurrency(2);
8042 #else
8043 #ifdef HAVE_THR_SETCONCURRENCY
8044         /* Set Solaris LWP concurrency to 2 */
8045         thr_setconcurrency(2);
8046 #endif
8047 #endif
8048
8049 #if HAVE_PTHREADS_D4
8050         pthread_create(&t, pthread_attr_default, task, NULL);
8051 #else
8052         pthread_create(&t, NULL, task, NULL);
8053 #endif
8054
8055 #if HAVE_SCHED_YIELD
8056         sched_yield();  /* make sure task runs first */
8057 #else
8058 #ifdef HAVE_PTHREAD_YIELD
8059         pthread_yield();        /* make sure task runs first */
8060 #endif
8061 #endif
8062
8063         exit(2);
8064 }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8067 then
8068   ol_cv_pthread_select_yields=no
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -fr conftest*
8073   ol_cv_pthread_select_yields=yes
8074 fi
8075 rm -fr conftest*
8076 fi
8077
8078 fi
8079
8080 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
8081
8082                                 if test $ol_cv_pthread_select_yields = cross ; then
8083                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
8084                                 fi
8085
8086                                 if test $ol_cv_pthread_select_yields = yes ; then
8087                                         ol_with_yielding_select=yes
8088                                 fi
8089                         fi
8090
8091                                                 CPPFLAGS="$save_CPPFLAGS"
8092                         LIBS="$save_LIBS"
8093                 else
8094                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
8095                 fi
8096         fi
8097
8098         if test $ol_with_threads = posix ; then
8099                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
8100         fi
8101 fi
8102
8103 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8104         -o $ol_with_threads = mach ; then
8105
8106                 for ac_hdr in mach/cthreads.h
8107 do
8108 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8109 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8110 echo "configure:8111: checking for $ac_hdr" >&5
8111 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8112   echo $ac_n "(cached) $ac_c" 1>&6
8113 else
8114   cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 #include <$ac_hdr>
8118 EOF
8119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8120 { (eval echo configure:8121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8122 if test -z "$ac_err"; then
8123   rm -rf conftest*
8124   eval "ac_cv_header_$ac_safe=yes"
8125 else
8126   echo "$ac_err" >&5
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   eval "ac_cv_header_$ac_safe=no"
8131 fi
8132 rm -f conftest*
8133 fi
8134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8135   echo "$ac_t""yes" 1>&6
8136     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8137   cat >> confdefs.h <<EOF
8138 #define $ac_tr_hdr 1
8139 EOF
8140  
8141 else
8142   echo "$ac_t""no" 1>&6
8143 fi
8144 done
8145
8146         if test $ac_cv_header_mach_cthreads_h = yes ; then
8147                 ol_with_threads=found
8148
8149                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
8150 echo "configure:8151: checking for cthread_fork" >&5
8151 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* System header to define __stub macros and hopefully few prototypes,
8158     which can conflict with char cthread_fork(); below.  */
8159 #include <assert.h>
8160 /* Override any gcc2 internal prototype to avoid an error.  */
8161 /* We use char because int might match the return type of a gcc2
8162     builtin and then its argument prototype would still apply.  */
8163 char cthread_fork();
8164 char (*f)();
8165
8166 int main() {
8167
8168 /* The GNU C library defines this for functions which it implements
8169     to always fail with ENOSYS.  Some functions are actually named
8170     something starting with __ and the normal name is an alias.  */
8171 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
8172 choke me
8173 #else
8174 f = cthread_fork;
8175 #endif
8176
8177 ; return 0; }
8178 EOF
8179 if { (eval echo configure:8180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8180   rm -rf conftest*
8181   eval "ac_cv_func_cthread_fork=yes"
8182 else
8183   echo "configure: failed program was:" >&5
8184   cat conftest.$ac_ext >&5
8185   rm -rf conftest*
8186   eval "ac_cv_func_cthread_fork=no"
8187 fi
8188 rm -f conftest*
8189 fi
8190
8191 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
8192   echo "$ac_t""yes" 1>&6
8193   ol_link_threads=yes
8194 else
8195   echo "$ac_t""no" 1>&6
8196 fi
8197
8198
8199                 if test $ol_link_threads = no ; then
8200                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
8201 echo "configure:8202: checking for cthread_fork with -all_load" >&5
8202 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
8203   echo $ac_n "(cached) $ac_c" 1>&6
8204 else
8205   
8206                                                                 save_LIBS="$LIBS"
8207                                 LIBS="-all_load $LIBS"
8208                                 cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 #include <mach/cthreads.h>
8212 int main() {
8213
8214                                         cthread_fork((void *)0, (void *)0);
8215                                         
8216 ; return 0; }
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8219   rm -rf conftest*
8220   ol_cv_cthread_all_load=yes
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -rf conftest*
8225   ol_cv_cthread_all_load=no
8226 fi
8227 rm -f conftest*
8228                                                                 LIBS="$save_LIBS"
8229                         
8230 fi
8231
8232 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8233
8234                         if test $ol_cv_cthread_all_load = yes ; then
8235                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8236                                 ol_link_threads=mach
8237                         fi
8238                 fi
8239
8240                 if test $ol_link_threads != no ; then
8241                         : check for cthread specific functionality here
8242                         cat >> confdefs.h <<\EOF
8243 #define HAVE_MACH_CTHREADS 1
8244 EOF
8245
8246                 else
8247                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8248                 fi
8249         fi
8250
8251         if test $ol_with_threads = mach ; then
8252                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8253         fi
8254 fi
8255
8256 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8257         -o $ol_with_threads = lwp ; then
8258
8259                 for ac_hdr in thread.h synch.h
8260 do
8261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8263 echo "configure:8264: checking for $ac_hdr" >&5
8264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8265   echo $ac_n "(cached) $ac_c" 1>&6
8266 else
8267   cat > conftest.$ac_ext <<EOF
8268 #line 8269 "configure"
8269 #include "confdefs.h"
8270 #include <$ac_hdr>
8271 EOF
8272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8273 { (eval echo configure:8274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8275 if test -z "$ac_err"; then
8276   rm -rf conftest*
8277   eval "ac_cv_header_$ac_safe=yes"
8278 else
8279   echo "$ac_err" >&5
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282   rm -rf conftest*
8283   eval "ac_cv_header_$ac_safe=no"
8284 fi
8285 rm -f conftest*
8286 fi
8287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8288   echo "$ac_t""yes" 1>&6
8289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8290   cat >> confdefs.h <<EOF
8291 #define $ac_tr_hdr 1
8292 EOF
8293  
8294 else
8295   echo "$ac_t""no" 1>&6
8296 fi
8297 done
8298
8299         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8300                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8301 echo "configure:8302: checking for thr_create in -lthread" >&5
8302 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
8303 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8304   echo $ac_n "(cached) $ac_c" 1>&6
8305 else
8306   ac_save_LIBS="$LIBS"
8307 LIBS="-lthread  $LIBS"
8308 cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 /* Override any gcc2 internal prototype to avoid an error.  */
8312 /* We use char because int might match the return type of a gcc2
8313     builtin and then its argument prototype would still apply.  */
8314 char thr_create();
8315
8316 int main() {
8317 thr_create()
8318 ; return 0; }
8319 EOF
8320 if { (eval echo configure:8321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8321   rm -rf conftest*
8322   eval "ac_cv_lib_$ac_lib_var=yes"
8323 else
8324   echo "configure: failed program was:" >&5
8325   cat conftest.$ac_ext >&5
8326   rm -rf conftest*
8327   eval "ac_cv_lib_$ac_lib_var=no"
8328 fi
8329 rm -f conftest*
8330 LIBS="$ac_save_LIBS"
8331
8332 fi
8333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8334   echo "$ac_t""yes" 1>&6
8335   have_thr=yes
8336 else
8337   echo "$ac_t""no" 1>&6
8338 have_thr=no
8339 fi
8340
8341
8342                 if test $have_thr = yes ; then
8343                         cat >> confdefs.h <<\EOF
8344 #define HAVE_THR 1
8345 EOF
8346
8347                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8348                         ol_link_threads=thr
8349
8350                         if test $ol_with_yielding_select = auto ; then
8351                                 ol_with_yielding_select=yes
8352                         fi
8353
8354                                                 for ac_func in \
8355                                 thr_setconcurrency \
8356                                 thr_getconcurrency \
8357                         
8358 do
8359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8360 echo "configure:8361: checking for $ac_func" >&5
8361 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8362   echo $ac_n "(cached) $ac_c" 1>&6
8363 else
8364   cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* System header to define __stub macros and hopefully few prototypes,
8368     which can conflict with char $ac_func(); below.  */
8369 #include <assert.h>
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char $ac_func();
8374 char (*f)();
8375
8376 int main() {
8377
8378 /* The GNU C library defines this for functions which it implements
8379     to always fail with ENOSYS.  Some functions are actually named
8380     something starting with __ and the normal name is an alias.  */
8381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8382 choke me
8383 #else
8384 f = $ac_func;
8385 #endif
8386
8387 ; return 0; }
8388 EOF
8389 if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8390   rm -rf conftest*
8391   eval "ac_cv_func_$ac_func=yes"
8392 else
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   eval "ac_cv_func_$ac_func=no"
8397 fi
8398 rm -f conftest*
8399 fi
8400
8401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8402   echo "$ac_t""yes" 1>&6
8403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8404   cat >> confdefs.h <<EOF
8405 #define $ac_tr_func 1
8406 EOF
8407  
8408 else
8409   echo "$ac_t""no" 1>&6
8410 fi
8411 done
8412
8413                 fi
8414         fi
8415
8416                 for ac_hdr in lwp/lwp.h
8417 do
8418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8420 echo "configure:8421: checking for $ac_hdr" >&5
8421 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8422   echo $ac_n "(cached) $ac_c" 1>&6
8423 else
8424   cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 #include <$ac_hdr>
8428 EOF
8429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8430 { (eval echo configure:8431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8432 if test -z "$ac_err"; then
8433   rm -rf conftest*
8434   eval "ac_cv_header_$ac_safe=yes"
8435 else
8436   echo "$ac_err" >&5
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_header_$ac_safe=no"
8441 fi
8442 rm -f conftest*
8443 fi
8444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8445   echo "$ac_t""yes" 1>&6
8446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8447   cat >> confdefs.h <<EOF
8448 #define $ac_tr_hdr 1
8449 EOF
8450  
8451 else
8452   echo "$ac_t""no" 1>&6
8453 fi
8454 done
8455
8456         if test $ac_cv_header_lwp_lwp_h = yes ; then
8457                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8458 echo "configure:8459: checking for lwp_create in -llwp" >&5
8459 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
8460 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8461   echo $ac_n "(cached) $ac_c" 1>&6
8462 else
8463   ac_save_LIBS="$LIBS"
8464 LIBS="-llwp  $LIBS"
8465 cat > conftest.$ac_ext <<EOF
8466 #line 8467 "configure"
8467 #include "confdefs.h"
8468 /* Override any gcc2 internal prototype to avoid an error.  */
8469 /* We use char because int might match the return type of a gcc2
8470     builtin and then its argument prototype would still apply.  */
8471 char lwp_create();
8472
8473 int main() {
8474 lwp_create()
8475 ; return 0; }
8476 EOF
8477 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8478   rm -rf conftest*
8479   eval "ac_cv_lib_$ac_lib_var=yes"
8480 else
8481   echo "configure: failed program was:" >&5
8482   cat conftest.$ac_ext >&5
8483   rm -rf conftest*
8484   eval "ac_cv_lib_$ac_lib_var=no"
8485 fi
8486 rm -f conftest*
8487 LIBS="$ac_save_LIBS"
8488
8489 fi
8490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8491   echo "$ac_t""yes" 1>&6
8492   have_lwp=yes
8493 else
8494   echo "$ac_t""no" 1>&6
8495 have_lwp=no
8496 fi
8497
8498
8499                 if test $have_lwp = yes ; then
8500                         cat >> confdefs.h <<\EOF
8501 #define HAVE_LWP 1
8502 EOF
8503
8504                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8505                         ol_link_threads=lwp
8506
8507                         if test $ol_with_yielding_select = auto ; then
8508                                 ol_with_yielding_select=no
8509                         fi
8510                 fi
8511         fi
8512 fi
8513
8514 if test $ol_with_yielding_select = yes ; then
8515         cat >> confdefs.h <<\EOF
8516 #define HAVE_YIELDING_SELECT 1
8517 EOF
8518
8519 fi
8520
8521 if test $ol_with_threads = manual ; then
8522                 ol_link_threads=yes
8523
8524         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8525
8526         for ac_hdr in pthread.h sched.h
8527 do
8528 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8529 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8530 echo "configure:8531: checking for $ac_hdr" >&5
8531 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8532   echo $ac_n "(cached) $ac_c" 1>&6
8533 else
8534   cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <$ac_hdr>
8538 EOF
8539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8540 { (eval echo configure:8541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8542 if test -z "$ac_err"; then
8543   rm -rf conftest*
8544   eval "ac_cv_header_$ac_safe=yes"
8545 else
8546   echo "$ac_err" >&5
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -rf conftest*
8550   eval "ac_cv_header_$ac_safe=no"
8551 fi
8552 rm -f conftest*
8553 fi
8554 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8555   echo "$ac_t""yes" 1>&6
8556     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8557   cat >> confdefs.h <<EOF
8558 #define $ac_tr_hdr 1
8559 EOF
8560  
8561 else
8562   echo "$ac_t""no" 1>&6
8563 fi
8564 done
8565
8566         for ac_func in sched_yield pthread_yield
8567 do
8568 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8569 echo "configure:8570: checking for $ac_func" >&5
8570 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8571   echo $ac_n "(cached) $ac_c" 1>&6
8572 else
8573   cat > conftest.$ac_ext <<EOF
8574 #line 8575 "configure"
8575 #include "confdefs.h"
8576 /* System header to define __stub macros and hopefully few prototypes,
8577     which can conflict with char $ac_func(); below.  */
8578 #include <assert.h>
8579 /* Override any gcc2 internal prototype to avoid an error.  */
8580 /* We use char because int might match the return type of a gcc2
8581     builtin and then its argument prototype would still apply.  */
8582 char $ac_func();
8583 char (*f)();
8584
8585 int main() {
8586
8587 /* The GNU C library defines this for functions which it implements
8588     to always fail with ENOSYS.  Some functions are actually named
8589     something starting with __ and the normal name is an alias.  */
8590 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8591 choke me
8592 #else
8593 f = $ac_func;
8594 #endif
8595
8596 ; return 0; }
8597 EOF
8598 if { (eval echo configure:8599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8599   rm -rf conftest*
8600   eval "ac_cv_func_$ac_func=yes"
8601 else
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604   rm -rf conftest*
8605   eval "ac_cv_func_$ac_func=no"
8606 fi
8607 rm -f conftest*
8608 fi
8609
8610 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8613   cat >> confdefs.h <<EOF
8614 #define $ac_tr_func 1
8615 EOF
8616  
8617 else
8618   echo "$ac_t""no" 1>&6
8619 fi
8620 done
8621
8622         
8623         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8624 echo "configure:8625: checking for LinuxThreads pthread.h" >&5
8625 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 #include <pthread.h>
8632 EOF
8633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8634   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8635   rm -rf conftest*
8636   ol_cv_header_linux_threads=yes
8637 else
8638   rm -rf conftest*
8639   ol_cv_header_linux_threads=no
8640 fi
8641 rm -f conftest*
8642
8643                 
8644 fi
8645
8646 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8647         if test $ol_cv_header_linux_threads = yes; then
8648                 cat >> confdefs.h <<\EOF
8649 #define HAVE_LINUX_THREADS 1
8650 EOF
8651
8652         fi
8653
8654
8655         for ac_hdr in mach/cthreads.h
8656 do
8657 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8658 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8659 echo "configure:8660: checking for $ac_hdr" >&5
8660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8661   echo $ac_n "(cached) $ac_c" 1>&6
8662 else
8663   cat > conftest.$ac_ext <<EOF
8664 #line 8665 "configure"
8665 #include "confdefs.h"
8666 #include <$ac_hdr>
8667 EOF
8668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8669 { (eval echo configure:8670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8671 if test -z "$ac_err"; then
8672   rm -rf conftest*
8673   eval "ac_cv_header_$ac_safe=yes"
8674 else
8675   echo "$ac_err" >&5
8676   echo "configure: failed program was:" >&5
8677   cat conftest.$ac_ext >&5
8678   rm -rf conftest*
8679   eval "ac_cv_header_$ac_safe=no"
8680 fi
8681 rm -f conftest*
8682 fi
8683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8684   echo "$ac_t""yes" 1>&6
8685     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8686   cat >> confdefs.h <<EOF
8687 #define $ac_tr_hdr 1
8688 EOF
8689  
8690 else
8691   echo "$ac_t""no" 1>&6
8692 fi
8693 done
8694
8695         for ac_hdr in lwp/lwp.h
8696 do
8697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8699 echo "configure:8700: checking for $ac_hdr" >&5
8700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8701   echo $ac_n "(cached) $ac_c" 1>&6
8702 else
8703   cat > conftest.$ac_ext <<EOF
8704 #line 8705 "configure"
8705 #include "confdefs.h"
8706 #include <$ac_hdr>
8707 EOF
8708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8709 { (eval echo configure:8710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8711 if test -z "$ac_err"; then
8712   rm -rf conftest*
8713   eval "ac_cv_header_$ac_safe=yes"
8714 else
8715   echo "$ac_err" >&5
8716   echo "configure: failed program was:" >&5
8717   cat conftest.$ac_ext >&5
8718   rm -rf conftest*
8719   eval "ac_cv_header_$ac_safe=no"
8720 fi
8721 rm -f conftest*
8722 fi
8723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8724   echo "$ac_t""yes" 1>&6
8725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8726   cat >> confdefs.h <<EOF
8727 #define $ac_tr_hdr 1
8728 EOF
8729  
8730 else
8731   echo "$ac_t""no" 1>&6
8732 fi
8733 done
8734
8735         for ac_hdr in thread.h synch.h
8736 do
8737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8739 echo "configure:8740: checking for $ac_hdr" >&5
8740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8741   echo $ac_n "(cached) $ac_c" 1>&6
8742 else
8743   cat > conftest.$ac_ext <<EOF
8744 #line 8745 "configure"
8745 #include "confdefs.h"
8746 #include <$ac_hdr>
8747 EOF
8748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8749 { (eval echo configure:8750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8751 if test -z "$ac_err"; then
8752   rm -rf conftest*
8753   eval "ac_cv_header_$ac_safe=yes"
8754 else
8755   echo "$ac_err" >&5
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -rf conftest*
8759   eval "ac_cv_header_$ac_safe=no"
8760 fi
8761 rm -f conftest*
8762 fi
8763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8764   echo "$ac_t""yes" 1>&6
8765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8766   cat >> confdefs.h <<EOF
8767 #define $ac_tr_hdr 1
8768 EOF
8769  
8770 else
8771   echo "$ac_t""no" 1>&6
8772 fi
8773 done
8774
8775 fi
8776
8777 if test $ol_link_threads != no ; then  
8778                         cat >> confdefs.h <<\EOF
8779 #define REENTRANT 1
8780 EOF
8781
8782         cat >> confdefs.h <<\EOF
8783 #define _REENTRANT 1
8784 EOF
8785
8786         cat >> confdefs.h <<\EOF
8787 #define THREAD_SAFE 1
8788 EOF
8789
8790         cat >> confdefs.h <<\EOF
8791 #define _THREAD_SAFE 1
8792 EOF
8793
8794         cat >> confdefs.h <<\EOF
8795 #define THREADSAFE 1
8796 EOF
8797
8798         cat >> confdefs.h <<\EOF
8799 #define _THREADSAFE 1
8800 EOF
8801
8802         cat >> confdefs.h <<\EOF
8803 #define _SGI_MP_SOURCE 1
8804 EOF
8805
8806
8807                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8808 echo "configure:8809: checking for thread specific errno" >&5
8809 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8810   echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812   
8813                 cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816 #include <errno.h>
8817 int main() {
8818 errno = 0;
8819 ; return 0; }
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8822   rm -rf conftest*
8823   ol_cv_errno_thread_specific=yes
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   ol_cv_errno_thread_specific=no
8829 fi
8830 rm -f conftest*
8831         
8832 fi
8833
8834 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8835
8836                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8837 echo "configure:8838: checking for thread specific h_errno" >&5
8838 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8839   echo $ac_n "(cached) $ac_c" 1>&6
8840 else
8841   
8842                 cat > conftest.$ac_ext <<EOF
8843 #line 8844 "configure"
8844 #include "confdefs.h"
8845 #include <netdb.h>
8846 int main() {
8847 h_errno = 0;
8848 ; return 0; }
8849 EOF
8850 if { (eval echo configure:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8851   rm -rf conftest*
8852   ol_cv_h_errno_thread_specific=yes
8853 else
8854   echo "configure: failed program was:" >&5
8855   cat conftest.$ac_ext >&5
8856   rm -rf conftest*
8857   ol_cv_h_errno_thread_specific=no
8858 fi
8859 rm -f conftest*
8860         
8861 fi
8862
8863 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8864
8865         if test $ol_cv_errno_thread_specific != yes \
8866                 -o $ol_cv_h_errno_thread_specific != yes ; then
8867                 LIBS="$LTHREAD_LIBS $LIBS"
8868                 LTHREAD_LIBS=""
8869         fi
8870
8871 fi  
8872
8873 if test $ol_link_threads = no ; then
8874         if test $ol_with_threads = yes ; then
8875                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8876         fi
8877
8878         if test $ol_with_threads = auto ; then
8879                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8880                 ol_with_threads=no
8881         fi
8882
8883         cat >> confdefs.h <<\EOF
8884 #define NO_THREADS 1
8885 EOF
8886
8887         LTHREAD_LIBS=""
8888 fi
8889
8890 if test $ol_link_threads != no ; then
8891         cat >> confdefs.h <<\EOF
8892 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8893 EOF
8894
8895 fi
8896
8897
8898 ol_link_ldbm=no 
8899 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8900         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8901 echo "configure:8902: checking for DB2 library" >&5
8902 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8903   echo $ac_n "(cached) $ac_c" 1>&6
8904 else
8905         ol_LIBS="$LIBS"
8906         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8907 echo "configure:8908: checking for db_open in -ldb" >&5
8908 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8910   echo $ac_n "(cached) $ac_c" 1>&6
8911 else
8912   ac_save_LIBS="$LIBS"
8913 LIBS="-ldb  $LIBS"
8914 cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917 /* Override any gcc2 internal prototype to avoid an error.  */
8918 /* We use char because int might match the return type of a gcc2
8919     builtin and then its argument prototype would still apply.  */
8920 char db_open();
8921
8922 int main() {
8923 db_open()
8924 ; return 0; }
8925 EOF
8926 if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8927   rm -rf conftest*
8928   eval "ac_cv_lib_$ac_lib_var=yes"
8929 else
8930   echo "configure: failed program was:" >&5
8931   cat conftest.$ac_ext >&5
8932   rm -rf conftest*
8933   eval "ac_cv_lib_$ac_lib_var=no"
8934 fi
8935 rm -f conftest*
8936 LIBS="$ac_save_LIBS"
8937
8938 fi
8939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8940   echo "$ac_t""yes" 1>&6
8941   ol_cv_lib_db2=-ldb
8942 else
8943   echo "$ac_t""no" 1>&6
8944 ol_cv_lib_db2=no
8945 fi
8946
8947         LIBS="$ol_LIBS"
8948
8949 fi
8950
8951 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8952
8953 for ac_hdr in db.h
8954 do
8955 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8956 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8957 echo "configure:8958: checking for $ac_hdr" >&5
8958 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8959   echo $ac_n "(cached) $ac_c" 1>&6
8960 else
8961   cat > conftest.$ac_ext <<EOF
8962 #line 8963 "configure"
8963 #include "confdefs.h"
8964 #include <$ac_hdr>
8965 EOF
8966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8967 { (eval echo configure:8968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8969 if test -z "$ac_err"; then
8970   rm -rf conftest*
8971   eval "ac_cv_header_$ac_safe=yes"
8972 else
8973   echo "$ac_err" >&5
8974   echo "configure: failed program was:" >&5
8975   cat conftest.$ac_ext >&5
8976   rm -rf conftest*
8977   eval "ac_cv_header_$ac_safe=no"
8978 fi
8979 rm -f conftest*
8980 fi
8981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8982   echo "$ac_t""yes" 1>&6
8983     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8984   cat >> confdefs.h <<EOF
8985 #define $ac_tr_hdr 1
8986 EOF
8987  
8988 else
8989   echo "$ac_t""no" 1>&6
8990 fi
8991 done
8992
8993 if test $ac_cv_header_db_h = yes ; then
8994         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8995 echo "configure:8996: checking if db.h is DB2" >&5
8996 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8997   echo $ac_n "(cached) $ac_c" 1>&6
8998 else
8999   
9000                 cat > conftest.$ac_ext <<EOF
9001 #line 9002 "configure"
9002 #include "confdefs.h"
9003
9004 #                       include <db.h>
9005                         /* this check could be improved */
9006 #                       ifdef DB_VERSION_MAJOR
9007 #                               if DB_VERSION_MAJOR == 2
9008                                         __db_version_2
9009 #                               endif
9010 #                       endif
9011                 
9012 EOF
9013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9014   egrep "__db_version_2" >/dev/null 2>&1; then
9015   rm -rf conftest*
9016   ol_cv_header_db2=yes
9017 else
9018   rm -rf conftest*
9019   ol_cv_header_db2=no
9020 fi
9021 rm -f conftest*
9022
9023 fi
9024
9025 echo "$ac_t""$ol_cv_header_db2" 1>&6
9026 else
9027         ol_cv_header_db2=no
9028 fi
9029
9030
9031  
9032  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
9033 echo "configure:9034: checking for Berkeley DB2" >&5
9034 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   
9038         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
9039                 ol_cv_berkeley_db2=no
9040         else
9041                 ol_cv_berkeley_db2=yes
9042         fi
9043
9044 fi
9045
9046 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
9047  if test $ol_cv_berkeley_db2 = yes ; then
9048         cat >> confdefs.h <<\EOF
9049 #define HAVE_BERKELEY_DB2 1
9050 EOF
9051
9052  fi
9053
9054
9055         if test $ol_cv_berkeley_db2 = yes ; then
9056                 ol_link_ldbm=db2
9057                 ol_with_ldbm_api=db2
9058
9059                 if test $ol_with_ldbm_type = hash ; then
9060                         cat >> confdefs.h <<\EOF
9061 #define LDBM_USE_DBHASH 1
9062 EOF
9063
9064                 else
9065                         cat >> confdefs.h <<\EOF
9066 #define LDBM_USE_DBBTREE 1
9067 EOF
9068
9069                 fi
9070
9071                                                 if test $ol_cv_lib_db2 != yes ; then
9072                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
9073                 fi
9074         fi
9075 fi
9076
9077 ol_link_bdb2=no
9078 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
9079         ol_link_bdb2=yes
9080 fi
9081
9082 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
9083         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
9084 echo "configure:9085: checking for Berkeley DB library" >&5
9085 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
9086   echo $ac_n "(cached) $ac_c" 1>&6
9087 else
9088   
9089         for ac_hdr in db1/db.h
9090 do
9091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9093 echo "configure:9094: checking for $ac_hdr" >&5
9094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9095   echo $ac_n "(cached) $ac_c" 1>&6
9096 else
9097   cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 #include <$ac_hdr>
9101 EOF
9102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9103 { (eval echo configure:9104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9105 if test -z "$ac_err"; then
9106   rm -rf conftest*
9107   eval "ac_cv_header_$ac_safe=yes"
9108 else
9109   echo "$ac_err" >&5
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -rf conftest*
9113   eval "ac_cv_header_$ac_safe=no"
9114 fi
9115 rm -f conftest*
9116 fi
9117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9118   echo "$ac_t""yes" 1>&6
9119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9120   cat >> confdefs.h <<EOF
9121 #define $ac_tr_hdr 1
9122 EOF
9123  
9124 else
9125   echo "$ac_t""no" 1>&6
9126 fi
9127 done
9128
9129         ol_LIBS="$LIBS"
9130         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
9131 echo "configure:9132: checking for dbopen" >&5
9132 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 /* System header to define __stub macros and hopefully few prototypes,
9139     which can conflict with char dbopen(); below.  */
9140 #include <assert.h>
9141 /* Override any gcc2 internal prototype to avoid an error.  */
9142 /* We use char because int might match the return type of a gcc2
9143     builtin and then its argument prototype would still apply.  */
9144 char dbopen();
9145 char (*f)();
9146
9147 int main() {
9148
9149 /* The GNU C library defines this for functions which it implements
9150     to always fail with ENOSYS.  Some functions are actually named
9151     something starting with __ and the normal name is an alias.  */
9152 #if defined (__stub_dbopen) || defined (__stub___dbopen)
9153 choke me
9154 #else
9155 f = dbopen;
9156 #endif
9157
9158 ; return 0; }
9159 EOF
9160 if { (eval echo configure:9161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9161   rm -rf conftest*
9162   eval "ac_cv_func_dbopen=yes"
9163 else
9164   echo "configure: failed program was:" >&5
9165   cat conftest.$ac_ext >&5
9166   rm -rf conftest*
9167   eval "ac_cv_func_dbopen=no"
9168 fi
9169 rm -f conftest*
9170 fi
9171
9172 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
9173   echo "$ac_t""yes" 1>&6
9174   ol_cv_lib_db=yes
9175 else
9176   echo "$ac_t""no" 1>&6
9177
9178                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
9179 echo "configure:9180: checking for dbopen in -ldb1" >&5
9180 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
9181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9182   echo $ac_n "(cached) $ac_c" 1>&6
9183 else
9184   ac_save_LIBS="$LIBS"
9185 LIBS="-ldb1  $LIBS"
9186 cat > conftest.$ac_ext <<EOF
9187 #line 9188 "configure"
9188 #include "confdefs.h"
9189 /* Override any gcc2 internal prototype to avoid an error.  */
9190 /* We use char because int might match the return type of a gcc2
9191     builtin and then its argument prototype would still apply.  */
9192 char dbopen();
9193
9194 int main() {
9195 dbopen()
9196 ; return 0; }
9197 EOF
9198 if { (eval echo configure:9199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9199   rm -rf conftest*
9200   eval "ac_cv_lib_$ac_lib_var=yes"
9201 else
9202   echo "configure: failed program was:" >&5
9203   cat conftest.$ac_ext >&5
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=no"
9206 fi
9207 rm -f conftest*
9208 LIBS="$ac_save_LIBS"
9209
9210 fi
9211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9212   echo "$ac_t""yes" 1>&6
9213   ol_cv_lib_db=-ldb1
9214 else
9215   echo "$ac_t""no" 1>&6
9216
9217                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9218 echo "configure:9219: checking for dbopen in -ldb" >&5
9219 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
9220 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9221   echo $ac_n "(cached) $ac_c" 1>&6
9222 else
9223   ac_save_LIBS="$LIBS"
9224 LIBS="-ldb  $LIBS"
9225 cat > conftest.$ac_ext <<EOF
9226 #line 9227 "configure"
9227 #include "confdefs.h"
9228 /* Override any gcc2 internal prototype to avoid an error.  */
9229 /* We use char because int might match the return type of a gcc2
9230     builtin and then its argument prototype would still apply.  */
9231 char dbopen();
9232
9233 int main() {
9234 dbopen()
9235 ; return 0; }
9236 EOF
9237 if { (eval echo configure:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9238   rm -rf conftest*
9239   eval "ac_cv_lib_$ac_lib_var=yes"
9240 else
9241   echo "configure: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=no"
9245 fi
9246 rm -f conftest*
9247 LIBS="$ac_save_LIBS"
9248
9249 fi
9250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9251   echo "$ac_t""yes" 1>&6
9252   ol_cv_lib_db=-ldb
9253 else
9254   echo "$ac_t""no" 1>&6
9255 ol_cv_lib_db=no
9256 fi
9257
9258                 
9259 fi
9260
9261         
9262 fi
9263
9264         LIBS="$ol_LIBS"
9265
9266 fi
9267
9268 echo "$ac_t""$ol_cv_lib_db" 1>&6
9269
9270
9271 for ac_hdr in db_185.h
9272 do
9273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9275 echo "configure:9276: checking for $ac_hdr" >&5
9276 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282 #include <$ac_hdr>
9283 EOF
9284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9285 { (eval echo configure:9286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9287 if test -z "$ac_err"; then
9288   rm -rf conftest*
9289   eval "ac_cv_header_$ac_safe=yes"
9290 else
9291   echo "$ac_err" >&5
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   eval "ac_cv_header_$ac_safe=no"
9296 fi
9297 rm -f conftest*
9298 fi
9299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9300   echo "$ac_t""yes" 1>&6
9301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9302   cat >> confdefs.h <<EOF
9303 #define $ac_tr_hdr 1
9304 EOF
9305  
9306 else
9307   echo "$ac_t""no" 1>&6
9308 fi
9309 done
9310
9311 if test "$ol_cv_header_db2" = yes ; then
9312         
9313         ol_cv_header_db=$ac_cv_header_db_185_h
9314 else
9315         ol_cv_header_db=$ac_cv_header_db_h
9316 fi
9317
9318
9319  
9320  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9321 echo "configure:9322: checking for Berkeley DB" >&5
9322 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
9323   echo $ac_n "(cached) $ac_c" 1>&6
9324 else
9325   
9326         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9327                 ol_cv_berkeley_db=no
9328         else
9329                 ol_cv_berkeley_db=yes
9330         fi
9331
9332 fi
9333
9334 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9335  if test $ol_cv_berkeley_db = yes ; then
9336         cat >> confdefs.h <<\EOF
9337 #define HAVE_BERKELEY_DB 1
9338 EOF
9339
9340  fi
9341
9342
9343         if test $ol_cv_berkeley_db = yes ; then
9344                 ol_link_ldbm=db
9345                 ol_with_ldbm_api=db
9346
9347                 if test $ol_with_ldbm_type = hash ; then
9348                         cat >> confdefs.h <<\EOF
9349 #define LDBM_USE_DBHASH 1
9350 EOF
9351
9352                 else
9353                         cat >> confdefs.h <<\EOF
9354 #define LDBM_USE_DBBTREE 1
9355 EOF
9356
9357                 fi
9358
9359                                                 if test $ol_cv_lib_db != yes ; then
9360                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9361                 fi
9362         fi
9363 fi
9364
9365 if test $ol_with_ldbm_api = manual ; then
9366                 ol_link_ldbm=yes
9367
9368         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9369
9370         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9371 do
9372 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9373 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9374 echo "configure:9375: checking for $ac_hdr" >&5
9375 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9376   echo $ac_n "(cached) $ac_c" 1>&6
9377 else
9378   cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #include <$ac_hdr>
9382 EOF
9383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9384 { (eval echo configure:9385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9386 if test -z "$ac_err"; then
9387   rm -rf conftest*
9388   eval "ac_cv_header_$ac_safe=yes"
9389 else
9390   echo "$ac_err" >&5
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -rf conftest*
9394   eval "ac_cv_header_$ac_safe=no"
9395 fi
9396 rm -f conftest*
9397 fi
9398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9399   echo "$ac_t""yes" 1>&6
9400     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9401   cat >> confdefs.h <<EOF
9402 #define $ac_tr_hdr 1
9403 EOF
9404  
9405 else
9406   echo "$ac_t""no" 1>&6
9407 fi
9408 done
9409
9410 fi
9411
9412 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9413         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9414         ol_with_ldbm_api=none
9415 fi
9416
9417 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9418         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9419 echo "configure:9420: checking for MDBM library" >&5
9420 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
9421   echo $ac_n "(cached) $ac_c" 1>&6
9422 else
9423         ol_LIBS="$LIBS"
9424         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9425 echo "configure:9426: checking for mdbm_set_chain" >&5
9426 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
9427   echo $ac_n "(cached) $ac_c" 1>&6
9428 else
9429   cat > conftest.$ac_ext <<EOF
9430 #line 9431 "configure"
9431 #include "confdefs.h"
9432 /* System header to define __stub macros and hopefully few prototypes,
9433     which can conflict with char mdbm_set_chain(); below.  */
9434 #include <assert.h>
9435 /* Override any gcc2 internal prototype to avoid an error.  */
9436 /* We use char because int might match the return type of a gcc2
9437     builtin and then its argument prototype would still apply.  */
9438 char mdbm_set_chain();
9439 char (*f)();
9440
9441 int main() {
9442
9443 /* The GNU C library defines this for functions which it implements
9444     to always fail with ENOSYS.  Some functions are actually named
9445     something starting with __ and the normal name is an alias.  */
9446 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9447 choke me
9448 #else
9449 f = mdbm_set_chain;
9450 #endif
9451
9452 ; return 0; }
9453 EOF
9454 if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9455   rm -rf conftest*
9456   eval "ac_cv_func_mdbm_set_chain=yes"
9457 else
9458   echo "configure: failed program was:" >&5
9459   cat conftest.$ac_ext >&5
9460   rm -rf conftest*
9461   eval "ac_cv_func_mdbm_set_chain=no"
9462 fi
9463 rm -f conftest*
9464 fi
9465
9466 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9467   echo "$ac_t""yes" 1>&6
9468   ol_cv_lib_mdbm=yes
9469 else
9470   echo "$ac_t""no" 1>&6
9471
9472                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9473 echo "configure:9474: checking for mdbm_set_chain in -lmdbm" >&5
9474 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
9475 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478   ac_save_LIBS="$LIBS"
9479 LIBS="-lmdbm  $LIBS"
9480 cat > conftest.$ac_ext <<EOF
9481 #line 9482 "configure"
9482 #include "confdefs.h"
9483 /* Override any gcc2 internal prototype to avoid an error.  */
9484 /* We use char because int might match the return type of a gcc2
9485     builtin and then its argument prototype would still apply.  */
9486 char mdbm_set_chain();
9487
9488 int main() {
9489 mdbm_set_chain()
9490 ; return 0; }
9491 EOF
9492 if { (eval echo configure:9493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9493   rm -rf conftest*
9494   eval "ac_cv_lib_$ac_lib_var=yes"
9495 else
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -rf conftest*
9499   eval "ac_cv_lib_$ac_lib_var=no"
9500 fi
9501 rm -f conftest*
9502 LIBS="$ac_save_LIBS"
9503
9504 fi
9505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9506   echo "$ac_t""yes" 1>&6
9507   ol_cv_lib_mdbm=-lmdbm
9508 else
9509   echo "$ac_t""no" 1>&6
9510 ol_cv_lib_mdbm=no
9511 fi
9512
9513         
9514 fi
9515
9516         LIBS="$ol_LIBS"
9517
9518 fi
9519
9520 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9521
9522
9523  for ac_hdr in mdbm.h
9524 do
9525 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9526 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9527 echo "configure:9528: checking for $ac_hdr" >&5
9528 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531   cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 #include <$ac_hdr>
9535 EOF
9536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9537 { (eval echo configure:9538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9539 if test -z "$ac_err"; then
9540   rm -rf conftest*
9541   eval "ac_cv_header_$ac_safe=yes"
9542 else
9543   echo "$ac_err" >&5
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -rf conftest*
9547   eval "ac_cv_header_$ac_safe=no"
9548 fi
9549 rm -f conftest*
9550 fi
9551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9552   echo "$ac_t""yes" 1>&6
9553     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9554   cat >> confdefs.h <<EOF
9555 #define $ac_tr_hdr 1
9556 EOF
9557  
9558 else
9559   echo "$ac_t""no" 1>&6
9560 fi
9561 done
9562
9563  echo $ac_n "checking for db""... $ac_c" 1>&6
9564 echo "configure:9565: checking for db" >&5
9565 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568   
9569         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9570                 ol_cv_mdbm=no
9571         else
9572                 ol_cv_mdbm=yes
9573         fi
9574
9575 fi
9576
9577 echo "$ac_t""$ol_cv_mdbm" 1>&6
9578  if test $ol_cv_mdbm = yes ; then
9579         cat >> confdefs.h <<\EOF
9580 #define HAVE_MDBM 1
9581 EOF
9582
9583  fi
9584
9585
9586         if test $ol_cv_mdbm = yes ; then
9587                 ol_link_ldbm=mdbm
9588                 ol_with_ldbm_api=mdbm
9589                 if test $ol_cv_lib_mdbm != yes ; then
9590                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9591                 fi
9592         fi
9593 fi
9594
9595 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9596         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9597 echo "configure:9598: checking for GDBM library" >&5
9598 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9599   echo $ac_n "(cached) $ac_c" 1>&6
9600 else
9601         ol_LIBS="$LIBS"
9602         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9603 echo "configure:9604: checking for gdbm_open" >&5
9604 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9605   echo $ac_n "(cached) $ac_c" 1>&6
9606 else
9607   cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 /* System header to define __stub macros and hopefully few prototypes,
9611     which can conflict with char gdbm_open(); below.  */
9612 #include <assert.h>
9613 /* Override any gcc2 internal prototype to avoid an error.  */
9614 /* We use char because int might match the return type of a gcc2
9615     builtin and then its argument prototype would still apply.  */
9616 char gdbm_open();
9617 char (*f)();
9618
9619 int main() {
9620
9621 /* The GNU C library defines this for functions which it implements
9622     to always fail with ENOSYS.  Some functions are actually named
9623     something starting with __ and the normal name is an alias.  */
9624 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9625 choke me
9626 #else
9627 f = gdbm_open;
9628 #endif
9629
9630 ; return 0; }
9631 EOF
9632 if { (eval echo configure:9633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9633   rm -rf conftest*
9634   eval "ac_cv_func_gdbm_open=yes"
9635 else
9636   echo "configure: failed program was:" >&5
9637   cat conftest.$ac_ext >&5
9638   rm -rf conftest*
9639   eval "ac_cv_func_gdbm_open=no"
9640 fi
9641 rm -f conftest*
9642 fi
9643
9644 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9645   echo "$ac_t""yes" 1>&6
9646   ol_cv_lib_gdbm=yes
9647 else
9648   echo "$ac_t""no" 1>&6
9649
9650                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9651 echo "configure:9652: checking for gdbm_open in -lgdbm" >&5
9652 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   ac_save_LIBS="$LIBS"
9657 LIBS="-lgdbm  $LIBS"
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 /* Override any gcc2 internal prototype to avoid an error.  */
9662 /* We use char because int might match the return type of a gcc2
9663     builtin and then its argument prototype would still apply.  */
9664 char gdbm_open();
9665
9666 int main() {
9667 gdbm_open()
9668 ; return 0; }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9671   rm -rf conftest*
9672   eval "ac_cv_lib_$ac_lib_var=yes"
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676   rm -rf conftest*
9677   eval "ac_cv_lib_$ac_lib_var=no"
9678 fi
9679 rm -f conftest*
9680 LIBS="$ac_save_LIBS"
9681
9682 fi
9683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9684   echo "$ac_t""yes" 1>&6
9685   ol_cv_lib_gdbm=-lgdbm
9686 else
9687   echo "$ac_t""no" 1>&6
9688 ol_cv_lib_gdbm=no
9689 fi
9690
9691         
9692 fi
9693
9694         LIBS="$ol_LIBS"
9695
9696 fi
9697
9698 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9699
9700
9701  for ac_hdr in gdbm.h
9702 do
9703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9705 echo "configure:9706: checking for $ac_hdr" >&5
9706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9707   echo $ac_n "(cached) $ac_c" 1>&6
9708 else
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 #include <$ac_hdr>
9713 EOF
9714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9715 { (eval echo configure:9716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9717 if test -z "$ac_err"; then
9718   rm -rf conftest*
9719   eval "ac_cv_header_$ac_safe=yes"
9720 else
9721   echo "$ac_err" >&5
9722   echo "configure: failed program was:" >&5
9723   cat conftest.$ac_ext >&5
9724   rm -rf conftest*
9725   eval "ac_cv_header_$ac_safe=no"
9726 fi
9727 rm -f conftest*
9728 fi
9729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9730   echo "$ac_t""yes" 1>&6
9731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9732   cat >> confdefs.h <<EOF
9733 #define $ac_tr_hdr 1
9734 EOF
9735  
9736 else
9737   echo "$ac_t""no" 1>&6
9738 fi
9739 done
9740
9741  echo $ac_n "checking for db""... $ac_c" 1>&6
9742 echo "configure:9743: checking for db" >&5
9743 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9744   echo $ac_n "(cached) $ac_c" 1>&6
9745 else
9746   
9747         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9748                 ol_cv_gdbm=no
9749         else
9750                 ol_cv_gdbm=yes
9751         fi
9752
9753 fi
9754
9755 echo "$ac_t""$ol_cv_gdbm" 1>&6
9756  if test $ol_cv_gdbm = yes ; then
9757         cat >> confdefs.h <<\EOF
9758 #define HAVE_GDBM 1
9759 EOF
9760
9761  fi
9762
9763
9764         if test $ol_cv_gdbm = yes ; then
9765                 ol_link_ldbm=gdbm
9766                 ol_with_ldbm_api=gdbm
9767
9768                 if test $ol_cv_lib_gdbm != yes ; then
9769                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9770                 fi
9771         fi
9772 fi
9773
9774 if test $ol_with_ldbm_api = auto ; then
9775         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9776 elif test $ol_with_ldbm_api = ndbm ; then
9777         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9778 echo "configure:9779: checking for NDBM library" >&5
9779 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9780   echo $ac_n "(cached) $ac_c" 1>&6
9781 else
9782         ol_LIBS="$LIBS"
9783         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9784 echo "configure:9785: checking for dbm_open" >&5
9785 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9786   echo $ac_n "(cached) $ac_c" 1>&6
9787 else
9788   cat > conftest.$ac_ext <<EOF
9789 #line 9790 "configure"
9790 #include "confdefs.h"
9791 /* System header to define __stub macros and hopefully few prototypes,
9792     which can conflict with char dbm_open(); below.  */
9793 #include <assert.h>
9794 /* Override any gcc2 internal prototype to avoid an error.  */
9795 /* We use char because int might match the return type of a gcc2
9796     builtin and then its argument prototype would still apply.  */
9797 char dbm_open();
9798 char (*f)();
9799
9800 int main() {
9801
9802 /* The GNU C library defines this for functions which it implements
9803     to always fail with ENOSYS.  Some functions are actually named
9804     something starting with __ and the normal name is an alias.  */
9805 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9806 choke me
9807 #else
9808 f = dbm_open;
9809 #endif
9810
9811 ; return 0; }
9812 EOF
9813 if { (eval echo configure:9814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9814   rm -rf conftest*
9815   eval "ac_cv_func_dbm_open=yes"
9816 else
9817   echo "configure: failed program was:" >&5
9818   cat conftest.$ac_ext >&5
9819   rm -rf conftest*
9820   eval "ac_cv_func_dbm_open=no"
9821 fi
9822 rm -f conftest*
9823 fi
9824
9825 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9826   echo "$ac_t""yes" 1>&6
9827   ol_cv_lib_ndbm=yes
9828 else
9829   echo "$ac_t""no" 1>&6
9830
9831                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9832 echo "configure:9833: checking for dbm_open in -lndbm" >&5
9833 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9835   echo $ac_n "(cached) $ac_c" 1>&6
9836 else
9837   ac_save_LIBS="$LIBS"
9838 LIBS="-lndbm  $LIBS"
9839 cat > conftest.$ac_ext <<EOF
9840 #line 9841 "configure"
9841 #include "confdefs.h"
9842 /* Override any gcc2 internal prototype to avoid an error.  */
9843 /* We use char because int might match the return type of a gcc2
9844     builtin and then its argument prototype would still apply.  */
9845 char dbm_open();
9846
9847 int main() {
9848 dbm_open()
9849 ; return 0; }
9850 EOF
9851 if { (eval echo configure:9852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9852   rm -rf conftest*
9853   eval "ac_cv_lib_$ac_lib_var=yes"
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857   rm -rf conftest*
9858   eval "ac_cv_lib_$ac_lib_var=no"
9859 fi
9860 rm -f conftest*
9861 LIBS="$ac_save_LIBS"
9862
9863 fi
9864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9865   echo "$ac_t""yes" 1>&6
9866   ol_cv_lib_ndbm=-lndbm
9867 else
9868   echo "$ac_t""no" 1>&6
9869
9870                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9871 echo "configure:9872: checking for dbm_open in -ldbm" >&5
9872 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   ac_save_LIBS="$LIBS"
9877 LIBS="-ldbm  $LIBS"
9878 cat > conftest.$ac_ext <<EOF
9879 #line 9880 "configure"
9880 #include "confdefs.h"
9881 /* Override any gcc2 internal prototype to avoid an error.  */
9882 /* We use char because int might match the return type of a gcc2
9883     builtin and then its argument prototype would still apply.  */
9884 char dbm_open();
9885
9886 int main() {
9887 dbm_open()
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891   rm -rf conftest*
9892   eval "ac_cv_lib_$ac_lib_var=yes"
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   eval "ac_cv_lib_$ac_lib_var=no"
9898 fi
9899 rm -f conftest*
9900 LIBS="$ac_save_LIBS"
9901
9902 fi
9903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9904   echo "$ac_t""yes" 1>&6
9905   ol_cv_lib_ndbm=-ldbm
9906 else
9907   echo "$ac_t""no" 1>&6
9908 ol_cv_lib_ndbm=no
9909 fi
9910                 
9911 fi
9912
9913         
9914 fi
9915
9916         LIBS="$ol_LIBS"
9917
9918 fi
9919
9920 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9921
9922
9923  for ac_hdr in ndbm.h
9924 do
9925 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9926 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9927 echo "configure:9928: checking for $ac_hdr" >&5
9928 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9929   echo $ac_n "(cached) $ac_c" 1>&6
9930 else
9931   cat > conftest.$ac_ext <<EOF
9932 #line 9933 "configure"
9933 #include "confdefs.h"
9934 #include <$ac_hdr>
9935 EOF
9936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9937 { (eval echo configure:9938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9939 if test -z "$ac_err"; then
9940   rm -rf conftest*
9941   eval "ac_cv_header_$ac_safe=yes"
9942 else
9943   echo "$ac_err" >&5
9944   echo "configure: failed program was:" >&5
9945   cat conftest.$ac_ext >&5
9946   rm -rf conftest*
9947   eval "ac_cv_header_$ac_safe=no"
9948 fi
9949 rm -f conftest*
9950 fi
9951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9952   echo "$ac_t""yes" 1>&6
9953     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9954   cat >> confdefs.h <<EOF
9955 #define $ac_tr_hdr 1
9956 EOF
9957  
9958 else
9959   echo "$ac_t""no" 1>&6
9960 fi
9961 done
9962
9963  echo $ac_n "checking for db""... $ac_c" 1>&6
9964 echo "configure:9965: checking for db" >&5
9965 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9966   echo $ac_n "(cached) $ac_c" 1>&6
9967 else
9968   
9969         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9970                 ol_cv_ndbm=no
9971         else
9972                 ol_cv_ndbm=yes
9973         fi
9974
9975 fi
9976
9977 echo "$ac_t""$ol_cv_ndbm" 1>&6
9978  if test $ol_cv_ndbm = yes ; then
9979         cat >> confdefs.h <<\EOF
9980 #define HAVE_NDBM 1
9981 EOF
9982
9983  fi
9984
9985
9986         if test $ol_cv_ndbm = yes ; then
9987                 ol_link_ldbm=ndbm
9988                 ol_with_ldbm_api=ndbm
9989
9990                 if test $ol_cv_lib_ndbm != yes ; then
9991                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9992                 fi
9993         fi
9994 fi
9995
9996 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9997         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9998         if test $ol_enable_ldbm = yes ; then
9999                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
10000         fi
10001
10002         echo "configure: warning: disabling LDBM" 1>&2
10003         ol_enable_ldbm=no
10004 fi
10005
10006 if test $ol_enable_wrappers != no ; then
10007         for ac_hdr in tcpd.h
10008 do
10009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10011 echo "configure:10012: checking for $ac_hdr" >&5
10012 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   cat > conftest.$ac_ext <<EOF
10016 #line 10017 "configure"
10017 #include "confdefs.h"
10018 #include <$ac_hdr>
10019 EOF
10020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10021 { (eval echo configure:10022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10023 if test -z "$ac_err"; then
10024   rm -rf conftest*
10025   eval "ac_cv_header_$ac_safe=yes"
10026 else
10027   echo "$ac_err" >&5
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_header_$ac_safe=no"
10032 fi
10033 rm -f conftest*
10034 fi
10035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10038   cat >> confdefs.h <<EOF
10039 #define $ac_tr_hdr 1
10040 EOF
10041  
10042 else
10043   echo "$ac_t""no" 1>&6
10044 fi
10045 done
10046
10047
10048         if test $ac_cv_header_tcpd_h != yes ; then
10049                 have_wrappers=no
10050         else
10051                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
10052 echo "configure:10053: checking for main in -lwrap" >&5
10053 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
10054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   ac_save_LIBS="$LIBS"
10058 LIBS="-lwrap  $LIBS"
10059 cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062
10063 int main() {
10064 main()
10065 ; return 0; }
10066 EOF
10067 if { (eval echo configure:10068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10068   rm -rf conftest*
10069   eval "ac_cv_lib_$ac_lib_var=yes"
10070 else
10071   echo "configure: failed program was:" >&5
10072   cat conftest.$ac_ext >&5
10073   rm -rf conftest*
10074   eval "ac_cv_lib_$ac_lib_var=no"
10075 fi
10076 rm -f conftest*
10077 LIBS="$ac_save_LIBS"
10078
10079 fi
10080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10081   echo "$ac_t""yes" 1>&6
10082   have_wrappers=yes
10083 else
10084   echo "$ac_t""no" 1>&6
10085 have_wrappers=no
10086 fi
10087
10088         fi
10089
10090         if test $have_wrappers = yes ; then
10091                 cat >> confdefs.h <<\EOF
10092 #define HAVE_TCPD 1
10093 EOF
10094
10095                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
10096
10097                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
10098 echo "configure:10099: checking for main in -lnsl" >&5
10099 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
10100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10101   echo $ac_n "(cached) $ac_c" 1>&6
10102 else
10103   ac_save_LIBS="$LIBS"
10104 LIBS="-lnsl  $LIBS"
10105 cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108
10109 int main() {
10110 main()
10111 ; return 0; }
10112 EOF
10113 if { (eval echo configure:10114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10114   rm -rf conftest*
10115   eval "ac_cv_lib_$ac_lib_var=yes"
10116 else
10117   echo "configure: failed program was:" >&5
10118   cat conftest.$ac_ext >&5
10119   rm -rf conftest*
10120   eval "ac_cv_lib_$ac_lib_var=no"
10121 fi
10122 rm -f conftest*
10123 LIBS="$ac_save_LIBS"
10124
10125 fi
10126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10127   echo "$ac_t""yes" 1>&6
10128     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10129     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10130   cat >> confdefs.h <<EOF
10131 #define $ac_tr_lib 1
10132 EOF
10133
10134   LIBS="-lnsl $LIBS"
10135
10136 else
10137   echo "$ac_t""no" 1>&6
10138 fi
10139
10140         else
10141                 echo "configure: warning: could not find -lwrap" 1>&2
10142                 if test $ol_enable_wrappers = yes ; then
10143                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
10144                 fi
10145
10146                 echo "configure: warning: disabling wrappers support" 1>&2
10147                 ol_enable_wrappers=no
10148         fi
10149 fi
10150
10151 if test $ol_enable_syslog != no ; then
10152         echo $ac_n "checking for openlog""... $ac_c" 1>&6
10153 echo "configure:10154: checking for openlog" >&5
10154 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
10155   echo $ac_n "(cached) $ac_c" 1>&6
10156 else
10157   cat > conftest.$ac_ext <<EOF
10158 #line 10159 "configure"
10159 #include "confdefs.h"
10160 /* System header to define __stub macros and hopefully few prototypes,
10161     which can conflict with char openlog(); below.  */
10162 #include <assert.h>
10163 /* Override any gcc2 internal prototype to avoid an error.  */
10164 /* We use char because int might match the return type of a gcc2
10165     builtin and then its argument prototype would still apply.  */
10166 char openlog();
10167 char (*f)();
10168
10169 int main() {
10170
10171 /* The GNU C library defines this for functions which it implements
10172     to always fail with ENOSYS.  Some functions are actually named
10173     something starting with __ and the normal name is an alias.  */
10174 #if defined (__stub_openlog) || defined (__stub___openlog)
10175 choke me
10176 #else
10177 f = openlog;
10178 #endif
10179
10180 ; return 0; }
10181 EOF
10182 if { (eval echo configure:10183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10183   rm -rf conftest*
10184   eval "ac_cv_func_openlog=yes"
10185 else
10186   echo "configure: failed program was:" >&5
10187   cat conftest.$ac_ext >&5
10188   rm -rf conftest*
10189   eval "ac_cv_func_openlog=no"
10190 fi
10191 rm -f conftest*
10192 fi
10193
10194 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
10195   echo "$ac_t""yes" 1>&6
10196   :
10197 else
10198   echo "$ac_t""no" 1>&6
10199 fi
10200
10201         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
10202                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
10203         fi
10204         ol_enable_syslog=$ac_cv_func_openlog
10205 fi
10206
10207 if test $ol_enable_dmalloc != no ; then
10208         for ac_hdr in dmalloc.h
10209 do
10210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10212 echo "configure:10213: checking for $ac_hdr" >&5
10213 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10214   echo $ac_n "(cached) $ac_c" 1>&6
10215 else
10216   cat > conftest.$ac_ext <<EOF
10217 #line 10218 "configure"
10218 #include "confdefs.h"
10219 #include <$ac_hdr>
10220 EOF
10221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10222 { (eval echo configure:10223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10224 if test -z "$ac_err"; then
10225   rm -rf conftest*
10226   eval "ac_cv_header_$ac_safe=yes"
10227 else
10228   echo "$ac_err" >&5
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   eval "ac_cv_header_$ac_safe=no"
10233 fi
10234 rm -f conftest*
10235 fi
10236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10237   echo "$ac_t""yes" 1>&6
10238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10239   cat >> confdefs.h <<EOF
10240 #define $ac_tr_hdr 1
10241 EOF
10242  
10243 else
10244   echo "$ac_t""no" 1>&6
10245 fi
10246 done
10247
10248         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10249 echo "configure:10250: checking for dmalloc_shutdown in -ldmalloc" >&5
10250 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
10251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10252   echo $ac_n "(cached) $ac_c" 1>&6
10253 else
10254   ac_save_LIBS="$LIBS"
10255 LIBS="-ldmalloc  $LIBS"
10256 cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 /* Override any gcc2 internal prototype to avoid an error.  */
10260 /* We use char because int might match the return type of a gcc2
10261     builtin and then its argument prototype would still apply.  */
10262 char dmalloc_shutdown();
10263
10264 int main() {
10265 dmalloc_shutdown()
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10269   rm -rf conftest*
10270   eval "ac_cv_lib_$ac_lib_var=yes"
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_lib_$ac_lib_var=no"
10276 fi
10277 rm -f conftest*
10278 LIBS="$ac_save_LIBS"
10279
10280 fi
10281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10282   echo "$ac_t""yes" 1>&6
10283     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10284     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10285   cat >> confdefs.h <<EOF
10286 #define $ac_tr_lib 1
10287 EOF
10288
10289   LIBS="-ldmalloc $LIBS"
10290
10291 else
10292   echo "$ac_t""no" 1>&6
10293 fi
10294
10295 fi
10296
10297 if test $ol_enable_tcl != no ; then
10298         for ac_hdr in tcl.h
10299 do
10300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10302 echo "configure:10303: checking for $ac_hdr" >&5
10303 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10304   echo $ac_n "(cached) $ac_c" 1>&6
10305 else
10306   cat > conftest.$ac_ext <<EOF
10307 #line 10308 "configure"
10308 #include "confdefs.h"
10309 #include <$ac_hdr>
10310 EOF
10311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10312 { (eval echo configure:10313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10314 if test -z "$ac_err"; then
10315   rm -rf conftest*
10316   eval "ac_cv_header_$ac_safe=yes"
10317 else
10318   echo "$ac_err" >&5
10319   echo "configure: failed program was:" >&5
10320   cat conftest.$ac_ext >&5
10321   rm -rf conftest*
10322   eval "ac_cv_header_$ac_safe=no"
10323 fi
10324 rm -f conftest*
10325 fi
10326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10327   echo "$ac_t""yes" 1>&6
10328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10329   cat >> confdefs.h <<EOF
10330 #define $ac_tr_hdr 1
10331 EOF
10332  
10333 else
10334   echo "$ac_t""no" 1>&6
10335 fi
10336 done
10337
10338
10339         if test $ac_cv_header_tcl_h != yes ; then
10340                 have_tcl=no
10341         else
10342                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10343 echo "configure:10344: checking for main in -ltcl" >&5
10344 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
10345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10346   echo $ac_n "(cached) $ac_c" 1>&6
10347 else
10348   ac_save_LIBS="$LIBS"
10349 LIBS="-ltcl  $LIBS"
10350 cat > conftest.$ac_ext <<EOF
10351 #line 10352 "configure"
10352 #include "confdefs.h"
10353
10354 int main() {
10355 main()
10356 ; return 0; }
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10359   rm -rf conftest*
10360   eval "ac_cv_lib_$ac_lib_var=yes"
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_lib_$ac_lib_var=no"
10366 fi
10367 rm -f conftest*
10368 LIBS="$ac_save_LIBS"
10369
10370 fi
10371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10372   echo "$ac_t""yes" 1>&6
10373   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10374 else
10375   echo "$ac_t""no" 1>&6
10376 have_tcl=no
10377 fi
10378
10379
10380                 if test $have_tcl != yes; then
10381                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10382 echo "configure:10383: checking for main in -ltcl7.6" >&5
10383 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
10384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10385   echo $ac_n "(cached) $ac_c" 1>&6
10386 else
10387   ac_save_LIBS="$LIBS"
10388 LIBS="-ltcl7.6  $LIBS"
10389 cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392
10393 int main() {
10394 main()
10395 ; return 0; }
10396 EOF
10397 if { (eval echo configure:10398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10398   rm -rf conftest*
10399   eval "ac_cv_lib_$ac_lib_var=yes"
10400 else
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   eval "ac_cv_lib_$ac_lib_var=no"
10405 fi
10406 rm -f conftest*
10407 LIBS="$ac_save_LIBS"
10408
10409 fi
10410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10411   echo "$ac_t""yes" 1>&6
10412   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10413 else
10414   echo "$ac_t""no" 1>&6
10415 have_tcl=no
10416 fi
10417
10418                 fi
10419
10420                 if test $have_tcl != yes; then
10421                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10422 echo "configure:10423: checking for main in -ltcl8.0" >&5
10423 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
10424 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   ac_save_LIBS="$LIBS"
10428 LIBS="-ltcl8.0  $LIBS"
10429 cat > conftest.$ac_ext <<EOF
10430 #line 10431 "configure"
10431 #include "confdefs.h"
10432
10433 int main() {
10434 main()
10435 ; return 0; }
10436 EOF
10437 if { (eval echo configure:10438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10438   rm -rf conftest*
10439   eval "ac_cv_lib_$ac_lib_var=yes"
10440 else
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   eval "ac_cv_lib_$ac_lib_var=no"
10445 fi
10446 rm -f conftest*
10447 LIBS="$ac_save_LIBS"
10448
10449 fi
10450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10451   echo "$ac_t""yes" 1>&6
10452   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10453 else
10454   echo "$ac_t""no" 1>&6
10455 have_tcl=no
10456 fi
10457
10458                 fi
10459         fi
10460
10461         if test $have_tcl != yes ; then
10462                 echo "configure: warning: could not find -ltcl" 1>&2
10463                 if test $ol_enable_tcl = yes ; then
10464                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10465                 fi
10466
10467                 ol_enable_tcl=no
10468         fi
10469 fi
10470
10471 # ud needs termcap (should insert check here)
10472 ol_link_termcap=no
10473 for ac_hdr in termcap.h ncurses.h
10474 do
10475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10477 echo "configure:10478: checking for $ac_hdr" >&5
10478 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10479   echo $ac_n "(cached) $ac_c" 1>&6
10480 else
10481   cat > conftest.$ac_ext <<EOF
10482 #line 10483 "configure"
10483 #include "confdefs.h"
10484 #include <$ac_hdr>
10485 EOF
10486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10487 { (eval echo configure:10488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10489 if test -z "$ac_err"; then
10490   rm -rf conftest*
10491   eval "ac_cv_header_$ac_safe=yes"
10492 else
10493   echo "$ac_err" >&5
10494   echo "configure: failed program was:" >&5
10495   cat conftest.$ac_ext >&5
10496   rm -rf conftest*
10497   eval "ac_cv_header_$ac_safe=no"
10498 fi
10499 rm -f conftest*
10500 fi
10501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10502   echo "$ac_t""yes" 1>&6
10503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10504   cat >> confdefs.h <<EOF
10505 #define $ac_tr_hdr 1
10506 EOF
10507  
10508 else
10509   echo "$ac_t""no" 1>&6
10510 fi
10511 done
10512
10513
10514 if test $ol_link_termcap = no ; then
10515         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10516 echo "configure:10517: checking for tputs in -ltermcap" >&5
10517 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   ac_save_LIBS="$LIBS"
10522 LIBS="-ltermcap  $LIBS"
10523 cat > conftest.$ac_ext <<EOF
10524 #line 10525 "configure"
10525 #include "confdefs.h"
10526 /* Override any gcc2 internal prototype to avoid an error.  */
10527 /* We use char because int might match the return type of a gcc2
10528     builtin and then its argument prototype would still apply.  */
10529 char tputs();
10530
10531 int main() {
10532 tputs()
10533 ; return 0; }
10534 EOF
10535 if { (eval echo configure:10536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10536   rm -rf conftest*
10537   eval "ac_cv_lib_$ac_lib_var=yes"
10538 else
10539   echo "configure: failed program was:" >&5
10540   cat conftest.$ac_ext >&5
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=no"
10543 fi
10544 rm -f conftest*
10545 LIBS="$ac_save_LIBS"
10546
10547 fi
10548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10549   echo "$ac_t""yes" 1>&6
10550   have_termcap=yes
10551 else
10552   echo "$ac_t""no" 1>&6
10553 have_termcap=no
10554 fi
10555
10556         if test $have_termcap = yes ; then
10557                 cat >> confdefs.h <<\EOF
10558 #define HAVE_TERMCAP 1
10559 EOF
10560
10561                 ol_link_termcap=yes
10562                 TERMCAP_LIBS=-ltermcap
10563         fi
10564 fi
10565
10566 if test $ol_link_termcap = no ; then
10567         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10568 echo "configure:10569: checking for initscr in -lncurses" >&5
10569 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10570 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10571   echo $ac_n "(cached) $ac_c" 1>&6
10572 else
10573   ac_save_LIBS="$LIBS"
10574 LIBS="-lncurses  $LIBS"
10575 cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 /* Override any gcc2 internal prototype to avoid an error.  */
10579 /* We use char because int might match the return type of a gcc2
10580     builtin and then its argument prototype would still apply.  */
10581 char initscr();
10582
10583 int main() {
10584 initscr()
10585 ; return 0; }
10586 EOF
10587 if { (eval echo configure:10588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10588   rm -rf conftest*
10589   eval "ac_cv_lib_$ac_lib_var=yes"
10590 else
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -rf conftest*
10594   eval "ac_cv_lib_$ac_lib_var=no"
10595 fi
10596 rm -f conftest*
10597 LIBS="$ac_save_LIBS"
10598
10599 fi
10600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10601   echo "$ac_t""yes" 1>&6
10602   have_ncurses=yes
10603 else
10604   echo "$ac_t""no" 1>&6
10605 have_ncurses=no
10606 fi
10607
10608         if test $have_ncurses = yes ; then
10609                 cat >> confdefs.h <<\EOF
10610 #define HAVE_NCURSES 1
10611 EOF
10612
10613                 ol_link_termcap=yes
10614                 TERMCAP_LIBS=-lncurses
10615         fi
10616 fi
10617
10618 if test $ol_link_termcap = no ; then
10619         cat >> confdefs.h <<\EOF
10620 #define NO_TERMCAP 1
10621 EOF
10622
10623         TERMCAP_LIBS=
10624 fi
10625
10626 ol_link_sasl=no
10627 if test $ol_with_cyrus_sasl != no ; then
10628         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10629 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10630 echo "configure:10631: checking for sasl.h" >&5
10631 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10632   echo $ac_n "(cached) $ac_c" 1>&6
10633 else
10634   cat > conftest.$ac_ext <<EOF
10635 #line 10636 "configure"
10636 #include "confdefs.h"
10637 #include <sasl.h>
10638 EOF
10639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10640 { (eval echo configure:10641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10642 if test -z "$ac_err"; then
10643   rm -rf conftest*
10644   eval "ac_cv_header_$ac_safe=yes"
10645 else
10646   echo "$ac_err" >&5
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -rf conftest*
10650   eval "ac_cv_header_$ac_safe=no"
10651 fi
10652 rm -f conftest*
10653 fi
10654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10655   echo "$ac_t""yes" 1>&6
10656   :
10657 else
10658   echo "$ac_t""no" 1>&6
10659 fi
10660
10661
10662         if test $ac_cv_header_sasl_h = yes ; then
10663                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10664 echo "configure:10665: checking for sasl_client_init in -lsasl" >&5
10665 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
10666 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10667   echo $ac_n "(cached) $ac_c" 1>&6
10668 else
10669   ac_save_LIBS="$LIBS"
10670 LIBS="-lsasl  $LIBS"
10671 cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674 /* Override any gcc2 internal prototype to avoid an error.  */
10675 /* We use char because int might match the return type of a gcc2
10676     builtin and then its argument prototype would still apply.  */
10677 char sasl_client_init();
10678
10679 int main() {
10680 sasl_client_init()
10681 ; return 0; }
10682 EOF
10683 if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10684   rm -rf conftest*
10685   eval "ac_cv_lib_$ac_lib_var=yes"
10686 else
10687   echo "configure: failed program was:" >&5
10688   cat conftest.$ac_ext >&5
10689   rm -rf conftest*
10690   eval "ac_cv_lib_$ac_lib_var=no"
10691 fi
10692 rm -f conftest*
10693 LIBS="$ac_save_LIBS"
10694
10695 fi
10696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10697   echo "$ac_t""yes" 1>&6
10698   have_cyrus_sasl=yes
10699 else
10700   echo "$ac_t""no" 1>&6
10701 have_cyrus_sasl=no
10702 fi
10703
10704
10705                 if test $have_cyrus_sasl != no ; then
10706                         SASL_LIBS="-lsasl"
10707                         cat >> confdefs.h <<\EOF
10708 #define HAVE_CYRUS_SASL 1
10709 EOF
10710
10711                         ol_link_sasl=yes
10712                 fi
10713         fi
10714
10715         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10716                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10717         fi
10718 fi
10719
10720 ol_link_fetch=no
10721 if test $ol_with_fetch != no ; then
10722         ol=$LIBS
10723 LIBS="-lfetch -lcom_err $LIBS"
10724 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10725 echo "configure:10726: checking fetch(3) library" >&5
10726 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
10727   echo $ac_n "(cached) $ac_c" 1>&6
10728 else
10729   
10730         cat > conftest.$ac_ext <<EOF
10731 #line 10732 "configure"
10732 #include "confdefs.h"
10733
10734 #include <sys/param.h>
10735 #include <stdio.h>
10736 #include <fetch.h>
10737 int main() {
10738 struct url *u = fetchParseURL("file:///"); 
10739 ; return 0; }
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10742   rm -rf conftest*
10743   ol_cv_lib_fetch=yes
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   ol_cv_lib_fetch=no
10749 fi
10750 rm -f conftest*
10751 fi
10752
10753 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10754 LIBS=$ol_LIBS
10755 if test $ol_cv_lib_fetch != no ; then
10756         ol_link_fetch="-lfetch -lcom_err"
10757         cat >> confdefs.h <<\EOF
10758 #define HAVE_FETCH 1
10759 EOF
10760
10761 fi
10762
10763
10764         if test $ol_cv_lib_fetch != no ; then
10765                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10766                 ol_link_fetch=freebsd
10767
10768         elif test $ol_with_fetch != auto ; then
10769                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10770         fi 
10771 fi
10772
10773 ol_link_readline=no
10774 if test $ol_with_readline != no ; then
10775         for ac_hdr in readline/readline.h readline/history.h
10776 do
10777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10779 echo "configure:10780: checking for $ac_hdr" >&5
10780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10781   echo $ac_n "(cached) $ac_c" 1>&6
10782 else
10783   cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include <$ac_hdr>
10787 EOF
10788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10789 { (eval echo configure:10790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10791 if test -z "$ac_err"; then
10792   rm -rf conftest*
10793   eval "ac_cv_header_$ac_safe=yes"
10794 else
10795   echo "$ac_err" >&5
10796   echo "configure: failed program was:" >&5
10797   cat conftest.$ac_ext >&5
10798   rm -rf conftest*
10799   eval "ac_cv_header_$ac_safe=no"
10800 fi
10801 rm -f conftest*
10802 fi
10803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10804   echo "$ac_t""yes" 1>&6
10805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10806   cat >> confdefs.h <<EOF
10807 #define $ac_tr_hdr 1
10808 EOF
10809  
10810 else
10811   echo "$ac_t""no" 1>&6
10812 fi
10813 done
10814
10815
10816         if test $ac_cv_header_readline_readline_h = yes ; then
10817                 save_LIBS="$LIBS"
10818                 LIBS="$TERMCAP_LIBS $LIBS"
10819                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10820 echo "configure:10821: checking for readline in -lreadline" >&5
10821 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10823   echo $ac_n "(cached) $ac_c" 1>&6
10824 else
10825   ac_save_LIBS="$LIBS"
10826 LIBS="-lreadline  $LIBS"
10827 cat > conftest.$ac_ext <<EOF
10828 #line 10829 "configure"
10829 #include "confdefs.h"
10830 /* Override any gcc2 internal prototype to avoid an error.  */
10831 /* We use char because int might match the return type of a gcc2
10832     builtin and then its argument prototype would still apply.  */
10833 char readline();
10834
10835 int main() {
10836 readline()
10837 ; return 0; }
10838 EOF
10839 if { (eval echo configure:10840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10840   rm -rf conftest*
10841   eval "ac_cv_lib_$ac_lib_var=yes"
10842 else
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -rf conftest*
10846   eval "ac_cv_lib_$ac_lib_var=no"
10847 fi
10848 rm -f conftest*
10849 LIBS="$ac_save_LIBS"
10850
10851 fi
10852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10853   echo "$ac_t""yes" 1>&6
10854   have_readline=yes
10855 else
10856   echo "$ac_t""no" 1>&6
10857 have_readline=no
10858 fi
10859
10860                 LIBS="$save_LIBS"
10861                         
10862                 if test $have_readline = yes ; then
10863                         ol_with_readline=found
10864                         ol_link_readline=yes
10865
10866                         READLINE_LIBS="-lreadline"
10867                 fi
10868         fi
10869 fi
10870
10871 if test $ol_link_readline = yes ; then
10872         cat >> confdefs.h <<\EOF
10873 #define HAVE_READLINE 1
10874 EOF
10875
10876 fi
10877
10878
10879 # FreeBSD (and others) have crypt(3) in -lcrypt
10880 if test $ol_enable_crypt != no ; then
10881         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10882 echo "configure:10883: checking for crypt" >&5
10883 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10884   echo $ac_n "(cached) $ac_c" 1>&6
10885 else
10886   cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 /* System header to define __stub macros and hopefully few prototypes,
10890     which can conflict with char crypt(); below.  */
10891 #include <assert.h>
10892 /* Override any gcc2 internal prototype to avoid an error.  */
10893 /* We use char because int might match the return type of a gcc2
10894     builtin and then its argument prototype would still apply.  */
10895 char crypt();
10896 char (*f)();
10897
10898 int main() {
10899
10900 /* The GNU C library defines this for functions which it implements
10901     to always fail with ENOSYS.  Some functions are actually named
10902     something starting with __ and the normal name is an alias.  */
10903 #if defined (__stub_crypt) || defined (__stub___crypt)
10904 choke me
10905 #else
10906 f = crypt;
10907 #endif
10908
10909 ; return 0; }
10910 EOF
10911 if { (eval echo configure:10912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10912   rm -rf conftest*
10913   eval "ac_cv_func_crypt=yes"
10914 else
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   eval "ac_cv_func_crypt=no"
10919 fi
10920 rm -f conftest*
10921 fi
10922
10923 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10924   echo "$ac_t""yes" 1>&6
10925   have_crypt=yes
10926 else
10927   echo "$ac_t""no" 1>&6
10928
10929                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10930 echo "configure:10931: checking for crypt in -lcrypt" >&5
10931 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10932 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10933   echo $ac_n "(cached) $ac_c" 1>&6
10934 else
10935   ac_save_LIBS="$LIBS"
10936 LIBS="-lcrypt  $LIBS"
10937 cat > conftest.$ac_ext <<EOF
10938 #line 10939 "configure"
10939 #include "confdefs.h"
10940 /* Override any gcc2 internal prototype to avoid an error.  */
10941 /* We use char because int might match the return type of a gcc2
10942     builtin and then its argument prototype would still apply.  */
10943 char crypt();
10944
10945 int main() {
10946 crypt()
10947 ; return 0; }
10948 EOF
10949 if { (eval echo configure:10950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=yes"
10952 else
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_lib_$ac_lib_var=no"
10957 fi
10958 rm -f conftest*
10959 LIBS="$ac_save_LIBS"
10960
10961 fi
10962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10963   echo "$ac_t""yes" 1>&6
10964   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10965                         have_crypt=yes
10966 else
10967   echo "$ac_t""no" 1>&6
10968 have_crypt=no
10969 fi
10970
10971 fi
10972
10973
10974         if test $have_crypt = yes ; then
10975                 cat >> confdefs.h <<\EOF
10976 #define HAVE_CRYPT 1
10977 EOF
10978
10979         else
10980                 echo "configure: warning: could not find crypt" 1>&2
10981                 if test $ol_enable_crypt = yes ; then
10982                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10983                 fi
10984
10985                 echo "configure: warning: disabling crypt support" 1>&2
10986                 ol_enable_crypt=no
10987         fi
10988 fi
10989
10990 # FreeBSD (and others) have setproctitle(3) in -lutil
10991 if test $ol_enable_proctitle != no ; then
10992         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10993 echo "configure:10994: checking for setproctitle" >&5
10994 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10995   echo $ac_n "(cached) $ac_c" 1>&6
10996 else
10997   cat > conftest.$ac_ext <<EOF
10998 #line 10999 "configure"
10999 #include "confdefs.h"
11000 /* System header to define __stub macros and hopefully few prototypes,
11001     which can conflict with char setproctitle(); below.  */
11002 #include <assert.h>
11003 /* Override any gcc2 internal prototype to avoid an error.  */
11004 /* We use char because int might match the return type of a gcc2
11005     builtin and then its argument prototype would still apply.  */
11006 char setproctitle();
11007 char (*f)();
11008
11009 int main() {
11010
11011 /* The GNU C library defines this for functions which it implements
11012     to always fail with ENOSYS.  Some functions are actually named
11013     something starting with __ and the normal name is an alias.  */
11014 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
11015 choke me
11016 #else
11017 f = setproctitle;
11018 #endif
11019
11020 ; return 0; }
11021 EOF
11022 if { (eval echo configure:11023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11023   rm -rf conftest*
11024   eval "ac_cv_func_setproctitle=yes"
11025 else
11026   echo "configure: failed program was:" >&5
11027   cat conftest.$ac_ext >&5
11028   rm -rf conftest*
11029   eval "ac_cv_func_setproctitle=no"
11030 fi
11031 rm -f conftest*
11032 fi
11033
11034 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
11035   echo "$ac_t""yes" 1>&6
11036   have_setproctitle=yes
11037 else
11038   echo "$ac_t""no" 1>&6
11039
11040                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
11041 echo "configure:11042: checking for setproctitle in -lutil" >&5
11042 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
11043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11044   echo $ac_n "(cached) $ac_c" 1>&6
11045 else
11046   ac_save_LIBS="$LIBS"
11047 LIBS="-lutil  $LIBS"
11048 cat > conftest.$ac_ext <<EOF
11049 #line 11050 "configure"
11050 #include "confdefs.h"
11051 /* Override any gcc2 internal prototype to avoid an error.  */
11052 /* We use char because int might match the return type of a gcc2
11053     builtin and then its argument prototype would still apply.  */
11054 char setproctitle();
11055
11056 int main() {
11057 setproctitle()
11058 ; return 0; }
11059 EOF
11060 if { (eval echo configure:11061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11061   rm -rf conftest*
11062   eval "ac_cv_lib_$ac_lib_var=yes"
11063 else
11064   echo "configure: failed program was:" >&5
11065   cat conftest.$ac_ext >&5
11066   rm -rf conftest*
11067   eval "ac_cv_lib_$ac_lib_var=no"
11068 fi
11069 rm -f conftest*
11070 LIBS="$ac_save_LIBS"
11071
11072 fi
11073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11074   echo "$ac_t""yes" 1>&6
11075   have_setproctitle=yes
11076                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
11077 else
11078   echo "$ac_t""no" 1>&6
11079 have_setproctitle=no
11080                         LIBOBJS="$LIBOBJS setproctitle.o"
11081 fi
11082
11083 fi
11084
11085
11086         if test $have_setproctitle = yes ; then
11087                 cat >> confdefs.h <<\EOF
11088 #define HAVE_SETPROCTITLE 1
11089 EOF
11090
11091         fi
11092 fi
11093
11094 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
11095 echo "configure:11096: checking for uid_t in sys/types.h" >&5
11096 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
11097   echo $ac_n "(cached) $ac_c" 1>&6
11098 else
11099   cat > conftest.$ac_ext <<EOF
11100 #line 11101 "configure"
11101 #include "confdefs.h"
11102 #include <sys/types.h>
11103 EOF
11104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11105   egrep "uid_t" >/dev/null 2>&1; then
11106   rm -rf conftest*
11107   ac_cv_type_uid_t=yes
11108 else
11109   rm -rf conftest*
11110   ac_cv_type_uid_t=no
11111 fi
11112 rm -f conftest*
11113
11114 fi
11115
11116 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
11117 if test $ac_cv_type_uid_t = no; then
11118   cat >> confdefs.h <<\EOF
11119 #define uid_t int
11120 EOF
11121
11122   cat >> confdefs.h <<\EOF
11123 #define gid_t int
11124 EOF
11125
11126 fi
11127
11128 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
11129 echo "configure:11130: checking type of array argument to getgroups" >&5
11130 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
11131   echo $ac_n "(cached) $ac_c" 1>&6
11132 else
11133   if test "$cross_compiling" = yes; then
11134   ac_cv_type_getgroups=cross
11135 else
11136   cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139
11140 /* Thanks to Mike Rendell for this test.  */
11141 #include <sys/types.h>
11142 #define NGID 256
11143 #undef MAX
11144 #define MAX(x, y) ((x) > (y) ? (x) : (y))
11145 main()
11146 {
11147   gid_t gidset[NGID];
11148   int i, n;
11149   union { gid_t gval; long lval; }  val;
11150
11151   val.lval = -1;
11152   for (i = 0; i < NGID; i++)
11153     gidset[i] = val.gval;
11154   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11155                  gidset);
11156   /* Exit non-zero if getgroups seems to require an array of ints.  This
11157      happens when gid_t is short but getgroups modifies an array of ints.  */
11158   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
11159 }
11160
11161 EOF
11162 if { (eval echo configure:11163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11163 then
11164     ac_cv_type_getgroups=gid_t
11165 else
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -fr conftest*
11169   ac_cv_type_getgroups=int
11170 fi
11171 rm -fr conftest*
11172 fi
11173
11174 if test $ac_cv_type_getgroups = cross; then
11175         cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 #include <unistd.h>
11179 EOF
11180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11181   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
11182   rm -rf conftest*
11183   ac_cv_type_getgroups=gid_t
11184 else
11185   rm -rf conftest*
11186   ac_cv_type_getgroups=int
11187 fi
11188 rm -f conftest*
11189
11190 fi
11191 fi
11192
11193 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
11194 cat >> confdefs.h <<EOF
11195 #define GETGROUPS_T $ac_cv_type_getgroups
11196 EOF
11197
11198  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11199 echo "configure:11200: checking for ANSI C header files" >&5
11200 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
11201   echo $ac_n "(cached) $ac_c" 1>&6
11202 else
11203   cat > conftest.$ac_ext <<EOF
11204 #line 11205 "configure"
11205 #include "confdefs.h"
11206 #include <stdlib.h>
11207 #include <stdarg.h>
11208 #include <string.h>
11209 #include <float.h>
11210 EOF
11211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11212 { (eval echo configure:11213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11214 if test -z "$ac_err"; then
11215   rm -rf conftest*
11216   ac_cv_header_stdc=yes
11217 else
11218   echo "$ac_err" >&5
11219   echo "configure: failed program was:" >&5
11220   cat conftest.$ac_ext >&5
11221   rm -rf conftest*
11222   ac_cv_header_stdc=no
11223 fi
11224 rm -f conftest*
11225
11226 if test $ac_cv_header_stdc = yes; then
11227   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11228 cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 #include <string.h>
11232 EOF
11233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11234   egrep "memchr" >/dev/null 2>&1; then
11235   :
11236 else
11237   rm -rf conftest*
11238   ac_cv_header_stdc=no
11239 fi
11240 rm -f conftest*
11241
11242 fi
11243
11244 if test $ac_cv_header_stdc = yes; then
11245   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11246 cat > conftest.$ac_ext <<EOF
11247 #line 11248 "configure"
11248 #include "confdefs.h"
11249 #include <stdlib.h>
11250 EOF
11251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11252   egrep "free" >/dev/null 2>&1; then
11253   :
11254 else
11255   rm -rf conftest*
11256   ac_cv_header_stdc=no
11257 fi
11258 rm -f conftest*
11259
11260 fi
11261
11262 if test $ac_cv_header_stdc = yes; then
11263   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11264 if test "$cross_compiling" = yes; then
11265   :
11266 else
11267   cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 #include <ctype.h>
11271 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11272 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11273 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11274 int main () { int i; for (i = 0; i < 256; i++)
11275 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11276 exit (0); }
11277
11278 EOF
11279 if { (eval echo configure:11280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11280 then
11281   :
11282 else
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -fr conftest*
11286   ac_cv_header_stdc=no
11287 fi
11288 rm -fr conftest*
11289 fi
11290
11291 fi
11292 fi
11293
11294 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11295 if test $ac_cv_header_stdc = yes; then
11296   cat >> confdefs.h <<\EOF
11297 #define STDC_HEADERS 1
11298 EOF
11299
11300 fi
11301
11302 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11303 echo "configure:11304: checking for mode_t" >&5
11304 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
11305   echo $ac_n "(cached) $ac_c" 1>&6
11306 else
11307   cat > conftest.$ac_ext <<EOF
11308 #line 11309 "configure"
11309 #include "confdefs.h"
11310 #include <sys/types.h>
11311 #if STDC_HEADERS
11312 #include <stdlib.h>
11313 #include <stddef.h>
11314 #endif
11315 EOF
11316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11317   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11318   rm -rf conftest*
11319   eval "ac_cv_type_mode_t=yes"
11320 else
11321   rm -rf conftest*
11322   eval "ac_cv_type_mode_t=no"
11323 fi
11324 rm -f conftest*
11325
11326 fi
11327 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329 else
11330   echo "$ac_t""no" 1>&6
11331   cat >> confdefs.h <<EOF
11332 #define mode_t int
11333 EOF
11334
11335 fi
11336
11337 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11338 echo "configure:11339: checking for off_t" >&5
11339 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 #include <sys/types.h>
11346 #if STDC_HEADERS
11347 #include <stdlib.h>
11348 #include <stddef.h>
11349 #endif
11350 EOF
11351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11352   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11353   rm -rf conftest*
11354   eval "ac_cv_type_off_t=yes"
11355 else
11356   rm -rf conftest*
11357   eval "ac_cv_type_off_t=no"
11358 fi
11359 rm -f conftest*
11360
11361 fi
11362 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
11363   echo "$ac_t""yes" 1>&6
11364 else
11365   echo "$ac_t""no" 1>&6
11366   cat >> confdefs.h <<EOF
11367 #define off_t long
11368 EOF
11369
11370 fi
11371
11372 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11373 echo "configure:11374: checking for pid_t" >&5
11374 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
11375   echo $ac_n "(cached) $ac_c" 1>&6
11376 else
11377   cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380 #include <sys/types.h>
11381 #if STDC_HEADERS
11382 #include <stdlib.h>
11383 #include <stddef.h>
11384 #endif
11385 EOF
11386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11387   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11388   rm -rf conftest*
11389   eval "ac_cv_type_pid_t=yes"
11390 else
11391   rm -rf conftest*
11392   eval "ac_cv_type_pid_t=no"
11393 fi
11394 rm -f conftest*
11395
11396 fi
11397 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
11398   echo "$ac_t""yes" 1>&6
11399 else
11400   echo "$ac_t""no" 1>&6
11401   cat >> confdefs.h <<EOF
11402 #define pid_t int
11403 EOF
11404
11405 fi
11406
11407 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11408 echo "configure:11409: checking for ptrdiff_t" >&5
11409 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11410   echo $ac_n "(cached) $ac_c" 1>&6
11411 else
11412   cat > conftest.$ac_ext <<EOF
11413 #line 11414 "configure"
11414 #include "confdefs.h"
11415 #include <stddef.h>
11416 int main() {
11417 ptrdiff_t p
11418 ; return 0; }
11419 EOF
11420 if { (eval echo configure:11421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11421   rm -rf conftest*
11422   am_cv_type_ptrdiff_t=yes
11423 else
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   am_cv_type_ptrdiff_t=no
11428 fi
11429 rm -f conftest*
11430 fi
11431
11432 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11433    if test $am_cv_type_ptrdiff_t = yes; then
11434      cat >> confdefs.h <<\EOF
11435 #define HAVE_PTRDIFF_T 1
11436 EOF
11437
11438    fi
11439
11440 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11441 echo "configure:11442: checking return type of signal handlers" >&5
11442 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11443   echo $ac_n "(cached) $ac_c" 1>&6
11444 else
11445   cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448 #include <sys/types.h>
11449 #include <signal.h>
11450 #ifdef signal
11451 #undef signal
11452 #endif
11453 #ifdef __cplusplus
11454 extern "C" void (*signal (int, void (*)(int)))(int);
11455 #else
11456 void (*signal ()) ();
11457 #endif
11458
11459 int main() {
11460 int i;
11461 ; return 0; }
11462 EOF
11463 if { (eval echo configure:11464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11464   rm -rf conftest*
11465   ac_cv_type_signal=void
11466 else
11467   echo "configure: failed program was:" >&5
11468   cat conftest.$ac_ext >&5
11469   rm -rf conftest*
11470   ac_cv_type_signal=int
11471 fi
11472 rm -f conftest*
11473 fi
11474
11475 echo "$ac_t""$ac_cv_type_signal" 1>&6
11476 cat >> confdefs.h <<EOF
11477 #define RETSIGTYPE $ac_cv_type_signal
11478 EOF
11479
11480
11481 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11482 echo "configure:11483: checking for sig_atomic_t" >&5
11483 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 #include <signal.h>
11490 int main() {
11491 sig_atomic_t atomic;
11492 ; return 0; }
11493 EOF
11494 if { (eval echo configure:11495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11495   rm -rf conftest*
11496   ol_cv_type_sig_atomic_t=yes
11497 else
11498   echo "configure: failed program was:" >&5
11499   cat conftest.$ac_ext >&5
11500   rm -rf conftest*
11501   ol_cv_type_sig_atomic_t=no
11502 fi
11503 rm -f conftest*
11504 fi
11505
11506 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11507   if test $ol_cv_type_sig_atomic_t = no; then
11508     cat >> confdefs.h <<\EOF
11509 #define sig_atomic_t int
11510 EOF
11511
11512   fi
11513  
11514 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11515 echo "configure:11516: checking for size_t" >&5
11516 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11517   echo $ac_n "(cached) $ac_c" 1>&6
11518 else
11519   cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 #include <sys/types.h>
11523 #if STDC_HEADERS
11524 #include <stdlib.h>
11525 #include <stddef.h>
11526 #endif
11527 EOF
11528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11529   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11530   rm -rf conftest*
11531   eval "ac_cv_type_size_t=yes"
11532 else
11533   rm -rf conftest*
11534   eval "ac_cv_type_size_t=no"
11535 fi
11536 rm -f conftest*
11537
11538 fi
11539 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11540   echo "$ac_t""yes" 1>&6
11541 else
11542   echo "$ac_t""no" 1>&6
11543   cat >> confdefs.h <<EOF
11544 #define size_t unsigned
11545 EOF
11546
11547 fi
11548
11549 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11550 echo "configure:11551: checking for socklen_t" >&5
11551 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557
11558 #ifdef HAVE_SYS_TYPES_H
11559 #include <sys/types.h>
11560 #endif
11561 #ifdef HAVE_SYS_SOCKET_H
11562 #include <sys/socket.h>
11563 #endif
11564
11565 int main() {
11566 socklen_t len;
11567 ; return 0; }
11568 EOF
11569 if { (eval echo configure:11570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11570   rm -rf conftest*
11571   ol_cv_type_socklen_t=yes
11572 else
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -rf conftest*
11576   ol_cv_type_socklen_t=no
11577 fi
11578 rm -f conftest*
11579 fi
11580
11581 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11582   if test $ol_cv_type_socklen_t = no; then
11583     cat >> confdefs.h <<\EOF
11584 #define socklen_t int
11585 EOF
11586
11587   fi
11588  
11589 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11590 echo "configure:11591: checking for member st_blksize in aggregate type struct stat" >&5
11591 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 #include <sys/types.h>
11598 #include <sys/stat.h>
11599 int main() {
11600 struct stat foo; foo.st_blksize;
11601 ; return 0; }
11602 EOF
11603 if { (eval echo configure:11604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11604   rm -rf conftest*
11605   ac_cv_c_struct_member_st_blksize=yes
11606 else
11607   echo "configure: failed program was:" >&5
11608   cat conftest.$ac_ext >&5
11609   rm -rf conftest*
11610   ac_cv_c_struct_member_st_blksize=no
11611 fi
11612 rm -f conftest*
11613 fi
11614
11615 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11616 st_blksize="$ac_cv_c_struct_member_st_blksize"
11617 if test $ac_cv_c_struct_member_st_blksize = yes; then
11618   cat >> confdefs.h <<\EOF
11619 #define HAVE_ST_BLKSIZE 1
11620 EOF
11621
11622 fi
11623
11624 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11625 echo "configure:11626: checking whether time.h and sys/time.h may both be included" >&5
11626 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11627   echo $ac_n "(cached) $ac_c" 1>&6
11628 else
11629   cat > conftest.$ac_ext <<EOF
11630 #line 11631 "configure"
11631 #include "confdefs.h"
11632 #include <sys/types.h>
11633 #include <sys/time.h>
11634 #include <time.h>
11635 int main() {
11636 struct tm *tp;
11637 ; return 0; }
11638 EOF
11639 if { (eval echo configure:11640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11640   rm -rf conftest*
11641   ac_cv_header_time=yes
11642 else
11643   echo "configure: failed program was:" >&5
11644   cat conftest.$ac_ext >&5
11645   rm -rf conftest*
11646   ac_cv_header_time=no
11647 fi
11648 rm -f conftest*
11649 fi
11650
11651 echo "$ac_t""$ac_cv_header_time" 1>&6
11652 if test $ac_cv_header_time = yes; then
11653   cat >> confdefs.h <<\EOF
11654 #define TIME_WITH_SYS_TIME 1
11655 EOF
11656
11657 fi
11658
11659 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11660 echo "configure:11661: checking whether struct tm is in sys/time.h or time.h" >&5
11661 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11662   echo $ac_n "(cached) $ac_c" 1>&6
11663 else
11664   cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667 #include <sys/types.h>
11668 #include <time.h>
11669 int main() {
11670 struct tm *tp; tp->tm_sec;
11671 ; return 0; }
11672 EOF
11673 if { (eval echo configure:11674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11674   rm -rf conftest*
11675   ac_cv_struct_tm=time.h
11676 else
11677   echo "configure: failed program was:" >&5
11678   cat conftest.$ac_ext >&5
11679   rm -rf conftest*
11680   ac_cv_struct_tm=sys/time.h
11681 fi
11682 rm -f conftest*
11683 fi
11684
11685 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11686 if test $ac_cv_struct_tm = sys/time.h; then
11687   cat >> confdefs.h <<\EOF
11688 #define TM_IN_SYS_TIME 1
11689 EOF
11690
11691 fi
11692
11693 # test for pw_gecos in struct passwd
11694 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11695 echo "configure:11696: checking struct passwd for pw_gecos" >&5
11696 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11697   echo $ac_n "(cached) $ac_c" 1>&6
11698 else
11699   
11700         cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 #include <pwd.h>
11704 int main() {
11705
11706         struct passwd pwd;
11707         pwd.pw_gecos = pwd.pw_name;
11708
11709 ; return 0; }
11710 EOF
11711 if { (eval echo configure:11712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11712   rm -rf conftest*
11713   ol_cv_struct_passwd_pw_gecos=yes
11714 else
11715   echo "configure: failed program was:" >&5
11716   cat conftest.$ac_ext >&5
11717   rm -rf conftest*
11718   ol_cv_struct_passwd_pw_gecos=no
11719 fi
11720 rm -f conftest*
11721 fi
11722
11723 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11724 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11725         cat >> confdefs.h <<\EOF
11726 #define HAVE_PW_GECOS 1
11727 EOF
11728
11729 fi
11730
11731 # test for pw_passwd in struct passwd
11732 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11733 echo "configure:11734: checking struct passwd for pw_passwd" >&5
11734 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11735   echo $ac_n "(cached) $ac_c" 1>&6
11736 else
11737   
11738         cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741 #include <pwd.h>
11742 int main() {
11743
11744         struct passwd pwd;
11745         pwd.pw_passwd = pwd.pw_name;
11746
11747 ; return 0; }
11748 EOF
11749 if { (eval echo configure:11750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11750   rm -rf conftest*
11751   ol_cv_struct_passwd_pw_passwd=yes
11752 else
11753   echo "configure: failed program was:" >&5
11754   cat conftest.$ac_ext >&5
11755   rm -rf conftest*
11756   ol_cv_struct_passwd_pw_passwd=no
11757 fi
11758 rm -f conftest*
11759 fi
11760
11761 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11762 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11763         cat >> confdefs.h <<\EOF
11764 #define HAVE_PW_PASSWD 1
11765 EOF
11766
11767 fi
11768
11769
11770 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11771 echo "configure:11772: checking if toupper() requires islower()" >&5
11772 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   
11776         if test "$cross_compiling" = yes; then
11777   ol_cv_c_upper_lower=safe
11778 else
11779   cat > conftest.$ac_ext <<EOF
11780 #line 11781 "configure"
11781 #include "confdefs.h"
11782
11783 #include <ctype.h>
11784 main()
11785 {
11786         if ('C' == toupper('C'))
11787                 exit(0);
11788         else
11789                 exit(1);
11790 }
11791 EOF
11792 if { (eval echo configure:11793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11793 then
11794   ol_cv_c_upper_lower=no
11795 else
11796   echo "configure: failed program was:" >&5
11797   cat conftest.$ac_ext >&5
11798   rm -fr conftest*
11799   ol_cv_c_upper_lower=yes
11800 fi
11801 rm -fr conftest*
11802 fi
11803
11804 fi
11805
11806 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11807 if test $ol_cv_c_upper_lower != no ; then
11808         cat >> confdefs.h <<\EOF
11809 #define C_UPPER_LOWER 1
11810 EOF
11811
11812 fi
11813
11814 echo $ac_n "checking for working const""... $ac_c" 1>&6
11815 echo "configure:11816: checking for working const" >&5
11816 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11817   echo $ac_n "(cached) $ac_c" 1>&6
11818 else
11819   cat > conftest.$ac_ext <<EOF
11820 #line 11821 "configure"
11821 #include "confdefs.h"
11822
11823 int main() {
11824
11825 /* Ultrix mips cc rejects this.  */
11826 typedef int charset[2]; const charset x;
11827 /* SunOS 4.1.1 cc rejects this.  */
11828 char const *const *ccp;
11829 char **p;
11830 /* NEC SVR4.0.2 mips cc rejects this.  */
11831 struct point {int x, y;};
11832 static struct point const zero = {0,0};
11833 /* AIX XL C 1.02.0.0 rejects this.
11834    It does not let you subtract one const X* pointer from another in an arm
11835    of an if-expression whose if-part is not a constant expression */
11836 const char *g = "string";
11837 ccp = &g + (g ? g-g : 0);
11838 /* HPUX 7.0 cc rejects these. */
11839 ++ccp;
11840 p = (char**) ccp;
11841 ccp = (char const *const *) p;
11842 { /* SCO 3.2v4 cc rejects this.  */
11843   char *t;
11844   char const *s = 0 ? (char *) 0 : (char const *) 0;
11845
11846   *t++ = 0;
11847 }
11848 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11849   int x[] = {25, 17};
11850   const int *foo = &x[0];
11851   ++foo;
11852 }
11853 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11854   typedef const int *iptr;
11855   iptr p = 0;
11856   ++p;
11857 }
11858 { /* AIX XL C 1.02.0.0 rejects this saying
11859      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11860   struct s { int j; const int *ap[3]; };
11861   struct s *b; b->j = 5;
11862 }
11863 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11864   const int foo = 10;
11865 }
11866
11867 ; return 0; }
11868 EOF
11869 if { (eval echo configure:11870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11870   rm -rf conftest*
11871   ac_cv_c_const=yes
11872 else
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -rf conftest*
11876   ac_cv_c_const=no
11877 fi
11878 rm -f conftest*
11879 fi
11880
11881 echo "$ac_t""$ac_cv_c_const" 1>&6
11882 if test $ac_cv_c_const = no; then
11883   cat >> confdefs.h <<\EOF
11884 #define const 
11885 EOF
11886
11887 fi
11888
11889 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11890 echo "configure:11891: checking if compiler understands volatile" >&5
11891 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11892   echo $ac_n "(cached) $ac_c" 1>&6
11893 else
11894   cat > conftest.$ac_ext <<EOF
11895 #line 11896 "configure"
11896 #include "confdefs.h"
11897 int x, y, z;
11898 int main() {
11899 volatile int a; int * volatile b = x ? &y : &z;
11900       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11901       *b = 0;
11902 ; return 0; }
11903 EOF
11904 if { (eval echo configure:11905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11905   rm -rf conftest*
11906   ol_cv_c_volatile=yes
11907 else
11908   echo "configure: failed program was:" >&5
11909   cat conftest.$ac_ext >&5
11910   rm -rf conftest*
11911   ol_cv_c_volatile=no
11912 fi
11913 rm -f conftest*
11914 fi
11915
11916 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11917   if test $ol_cv_c_volatile = yes; then
11918     : 
11919   else
11920     cat >> confdefs.h <<\EOF
11921 #define volatile 
11922 EOF
11923
11924   fi
11925  
11926
11927 if test $cross_compiling = yes ; then
11928         cat >> confdefs.h <<\EOF
11929 #define CROSS_COMPILING 1
11930 EOF
11931
11932
11933         cat >> confdefs.h <<\EOF
11934 #define LBER_INT_T long
11935 EOF
11936
11937         cat >> confdefs.h <<\EOF
11938 #define LBER_TAG_T long
11939 EOF
11940
11941         cat >> confdefs.h <<\EOF
11942 #define LBER_SOCKET_T int
11943 EOF
11944
11945
11946 else
11947         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11948 echo "configure:11949: checking whether byte ordering is bigendian" >&5
11949 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   ac_cv_c_bigendian=unknown
11953 # See if sys/param.h defines the BYTE_ORDER macro.
11954 cat > conftest.$ac_ext <<EOF
11955 #line 11956 "configure"
11956 #include "confdefs.h"
11957 #include <sys/types.h>
11958 #include <sys/param.h>
11959 int main() {
11960
11961 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11962  bogus endian macros
11963 #endif
11964 ; return 0; }
11965 EOF
11966 if { (eval echo configure:11967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11967   rm -rf conftest*
11968   # It does; now see whether it defined to BIG_ENDIAN or not.
11969 cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 #include <sys/types.h>
11973 #include <sys/param.h>
11974 int main() {
11975
11976 #if BYTE_ORDER != BIG_ENDIAN
11977  not big endian
11978 #endif
11979 ; return 0; }
11980 EOF
11981 if { (eval echo configure:11982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11982   rm -rf conftest*
11983   ac_cv_c_bigendian=yes
11984 else
11985   echo "configure: failed program was:" >&5
11986   cat conftest.$ac_ext >&5
11987   rm -rf conftest*
11988   ac_cv_c_bigendian=no
11989 fi
11990 rm -f conftest*
11991 else
11992   echo "configure: failed program was:" >&5
11993   cat conftest.$ac_ext >&5
11994 fi
11995 rm -f conftest*
11996 if test $ac_cv_c_bigendian = unknown; then
11997 if test "$cross_compiling" = yes; then
11998     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11999 else
12000   cat > conftest.$ac_ext <<EOF
12001 #line 12002 "configure"
12002 #include "confdefs.h"
12003 main () {
12004   /* Are we little or big endian?  From Harbison&Steele.  */
12005   union
12006   {
12007     long l;
12008     char c[sizeof (long)];
12009   } u;
12010   u.l = 1;
12011   exit (u.c[sizeof (long) - 1] == 1);
12012 }
12013 EOF
12014 if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12015 then
12016   ac_cv_c_bigendian=no
12017 else
12018   echo "configure: failed program was:" >&5
12019   cat conftest.$ac_ext >&5
12020   rm -fr conftest*
12021   ac_cv_c_bigendian=yes
12022 fi
12023 rm -fr conftest*
12024 fi
12025
12026 fi
12027 fi
12028
12029 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
12030 if test $ac_cv_c_bigendian = yes; then
12031   cat >> confdefs.h <<\EOF
12032 #define WORDS_BIGENDIAN 1
12033 EOF
12034
12035 fi
12036
12037         echo $ac_n "checking size of short""... $ac_c" 1>&6
12038 echo "configure:12039: checking size of short" >&5
12039 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
12040   echo $ac_n "(cached) $ac_c" 1>&6
12041 else
12042   if test "$cross_compiling" = yes; then
12043     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12044 else
12045   cat > conftest.$ac_ext <<EOF
12046 #line 12047 "configure"
12047 #include "confdefs.h"
12048 #include <stdio.h>
12049 main()
12050 {
12051   FILE *f=fopen("conftestval", "w");
12052   if (!f) exit(1);
12053   fprintf(f, "%d\n", sizeof(short));
12054   exit(0);
12055 }
12056 EOF
12057 if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12058 then
12059   ac_cv_sizeof_short=`cat conftestval`
12060 else
12061   echo "configure: failed program was:" >&5
12062   cat conftest.$ac_ext >&5
12063   rm -fr conftest*
12064   ac_cv_sizeof_short=0
12065 fi
12066 rm -fr conftest*
12067 fi
12068
12069 fi
12070 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
12071 cat >> confdefs.h <<EOF
12072 #define SIZEOF_SHORT $ac_cv_sizeof_short
12073 EOF
12074
12075  
12076         echo $ac_n "checking size of int""... $ac_c" 1>&6
12077 echo "configure:12078: checking size of int" >&5
12078 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
12079   echo $ac_n "(cached) $ac_c" 1>&6
12080 else
12081   if test "$cross_compiling" = yes; then
12082     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12083 else
12084   cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087 #include <stdio.h>
12088 main()
12089 {
12090   FILE *f=fopen("conftestval", "w");
12091   if (!f) exit(1);
12092   fprintf(f, "%d\n", sizeof(int));
12093   exit(0);
12094 }
12095 EOF
12096 if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12097 then
12098   ac_cv_sizeof_int=`cat conftestval`
12099 else
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -fr conftest*
12103   ac_cv_sizeof_int=0
12104 fi
12105 rm -fr conftest*
12106 fi
12107
12108 fi
12109 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
12110 cat >> confdefs.h <<EOF
12111 #define SIZEOF_INT $ac_cv_sizeof_int
12112 EOF
12113
12114  
12115         echo $ac_n "checking size of long""... $ac_c" 1>&6
12116 echo "configure:12117: checking size of long" >&5
12117 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
12118   echo $ac_n "(cached) $ac_c" 1>&6
12119 else
12120   if test "$cross_compiling" = yes; then
12121     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12122 else
12123   cat > conftest.$ac_ext <<EOF
12124 #line 12125 "configure"
12125 #include "confdefs.h"
12126 #include <stdio.h>
12127 main()
12128 {
12129   FILE *f=fopen("conftestval", "w");
12130   if (!f) exit(1);
12131   fprintf(f, "%d\n", sizeof(long));
12132   exit(0);
12133 }
12134 EOF
12135 if { (eval echo configure:12136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12136 then
12137   ac_cv_sizeof_long=`cat conftestval`
12138 else
12139   echo "configure: failed program was:" >&5
12140   cat conftest.$ac_ext >&5
12141   rm -fr conftest*
12142   ac_cv_sizeof_long=0
12143 fi
12144 rm -fr conftest*
12145 fi
12146
12147 fi
12148 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
12149 cat >> confdefs.h <<EOF
12150 #define SIZEOF_LONG $ac_cv_sizeof_long
12151 EOF
12152
12153
12154
12155         if test "$ac_cv_sizeof_int" -lt 4 ; then
12156                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
12157
12158                 cat >> confdefs.h <<\EOF
12159 #define LBER_INT_T long
12160 EOF
12161
12162                 cat >> confdefs.h <<\EOF
12163 #define LBER_TAG_T long
12164 EOF
12165
12166                 cat >> confdefs.h <<\EOF
12167 #define LBER_SOCKET_T int
12168 EOF
12169
12170         else
12171                 cat >> confdefs.h <<\EOF
12172 #define LBER_INT_T int
12173 EOF
12174
12175                 cat >> confdefs.h <<\EOF
12176 #define LBER_TAG_T long
12177 EOF
12178
12179                 cat >> confdefs.h <<\EOF
12180 #define LBER_SOCKET_T int
12181 EOF
12182
12183         fi
12184 fi
12185
12186 cat >> confdefs.h <<\EOF
12187 #define LBER_LEN_T long
12188 EOF
12189
12190
12191 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
12192 echo "configure:12193: checking for 8-bit clean memcmp" >&5
12193 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
12194   echo $ac_n "(cached) $ac_c" 1>&6
12195 else
12196   if test "$cross_compiling" = yes; then
12197   ac_cv_func_memcmp_clean=no
12198 else
12199   cat > conftest.$ac_ext <<EOF
12200 #line 12201 "configure"
12201 #include "confdefs.h"
12202
12203 main()
12204 {
12205   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
12206   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
12207 }
12208
12209 EOF
12210 if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12211 then
12212   ac_cv_func_memcmp_clean=yes
12213 else
12214   echo "configure: failed program was:" >&5
12215   cat conftest.$ac_ext >&5
12216   rm -fr conftest*
12217   ac_cv_func_memcmp_clean=no
12218 fi
12219 rm -fr conftest*
12220 fi
12221
12222 fi
12223
12224 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
12225 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
12226
12227 echo $ac_n "checking for strftime""... $ac_c" 1>&6
12228 echo "configure:12229: checking for strftime" >&5
12229 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
12230   echo $ac_n "(cached) $ac_c" 1>&6
12231 else
12232   cat > conftest.$ac_ext <<EOF
12233 #line 12234 "configure"
12234 #include "confdefs.h"
12235 /* System header to define __stub macros and hopefully few prototypes,
12236     which can conflict with char strftime(); below.  */
12237 #include <assert.h>
12238 /* Override any gcc2 internal prototype to avoid an error.  */
12239 /* We use char because int might match the return type of a gcc2
12240     builtin and then its argument prototype would still apply.  */
12241 char strftime();
12242 char (*f)();
12243
12244 int main() {
12245
12246 /* The GNU C library defines this for functions which it implements
12247     to always fail with ENOSYS.  Some functions are actually named
12248     something starting with __ and the normal name is an alias.  */
12249 #if defined (__stub_strftime) || defined (__stub___strftime)
12250 choke me
12251 #else
12252 f = strftime;
12253 #endif
12254
12255 ; return 0; }
12256 EOF
12257 if { (eval echo configure:12258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12258   rm -rf conftest*
12259   eval "ac_cv_func_strftime=yes"
12260 else
12261   echo "configure: failed program was:" >&5
12262   cat conftest.$ac_ext >&5
12263   rm -rf conftest*
12264   eval "ac_cv_func_strftime=no"
12265 fi
12266 rm -f conftest*
12267 fi
12268
12269 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12270   echo "$ac_t""yes" 1>&6
12271   cat >> confdefs.h <<\EOF
12272 #define HAVE_STRFTIME 1
12273 EOF
12274
12275 else
12276   echo "$ac_t""no" 1>&6
12277 # strftime is in -lintl on SCO UNIX.
12278 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12279 echo "configure:12280: checking for strftime in -lintl" >&5
12280 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
12281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12282   echo $ac_n "(cached) $ac_c" 1>&6
12283 else
12284   ac_save_LIBS="$LIBS"
12285 LIBS="-lintl  $LIBS"
12286 cat > conftest.$ac_ext <<EOF
12287 #line 12288 "configure"
12288 #include "confdefs.h"
12289 /* Override any gcc2 internal prototype to avoid an error.  */
12290 /* We use char because int might match the return type of a gcc2
12291     builtin and then its argument prototype would still apply.  */
12292 char strftime();
12293
12294 int main() {
12295 strftime()
12296 ; return 0; }
12297 EOF
12298 if { (eval echo configure:12299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12299   rm -rf conftest*
12300   eval "ac_cv_lib_$ac_lib_var=yes"
12301 else
12302   echo "configure: failed program was:" >&5
12303   cat conftest.$ac_ext >&5
12304   rm -rf conftest*
12305   eval "ac_cv_lib_$ac_lib_var=no"
12306 fi
12307 rm -f conftest*
12308 LIBS="$ac_save_LIBS"
12309
12310 fi
12311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12312   echo "$ac_t""yes" 1>&6
12313   cat >> confdefs.h <<\EOF
12314 #define HAVE_STRFTIME 1
12315 EOF
12316
12317 LIBS="-lintl $LIBS"
12318 else
12319   echo "$ac_t""no" 1>&6
12320 fi
12321
12322 fi
12323
12324
12325 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12326 echo "configure:12327: checking for inet_aton()" >&5
12327 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
12328   echo $ac_n "(cached) $ac_c" 1>&6
12329 else
12330   cat > conftest.$ac_ext <<EOF
12331 #line 12332 "configure"
12332 #include "confdefs.h"
12333
12334 #ifdef HAVE_SYS_TYPES_H
12335 #       include <sys/types.h>
12336 #endif
12337 #ifdef HAVE_SYS_SOCKET_H
12338 #       include <sys/socket.h>
12339 #       ifdef HAVE_SYS_SELECT_H
12340 #               include <sys/select.h>
12341 #       endif
12342 #       include <netinet/in.h>
12343 #       ifdef HAVE_ARPA_INET_H
12344 #               include <arpa/inet.h>
12345 #       endif
12346 #endif
12347
12348 int main() {
12349 struct in_addr in;
12350 int rc = inet_aton( "255.255.255.255", &in );
12351 ; return 0; }
12352 EOF
12353 if { (eval echo configure:12354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12354   rm -rf conftest*
12355   ol_cv_func_inet_aton=yes
12356 else
12357   echo "configure: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   rm -rf conftest*
12360   ol_cv_func_inet_aton=no
12361 fi
12362 rm -f conftest*
12363 fi
12364
12365 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12366   if test $ol_cv_func_inet_aton != no; then
12367     cat >> confdefs.h <<\EOF
12368 #define HAVE_INET_ATON 1
12369 EOF
12370
12371   fi
12372  
12373
12374 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12375 echo "configure:12376: checking for vprintf" >&5
12376 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
12377   echo $ac_n "(cached) $ac_c" 1>&6
12378 else
12379   cat > conftest.$ac_ext <<EOF
12380 #line 12381 "configure"
12381 #include "confdefs.h"
12382 /* System header to define __stub macros and hopefully few prototypes,
12383     which can conflict with char vprintf(); below.  */
12384 #include <assert.h>
12385 /* Override any gcc2 internal prototype to avoid an error.  */
12386 /* We use char because int might match the return type of a gcc2
12387     builtin and then its argument prototype would still apply.  */
12388 char vprintf();
12389 char (*f)();
12390
12391 int main() {
12392
12393 /* The GNU C library defines this for functions which it implements
12394     to always fail with ENOSYS.  Some functions are actually named
12395     something starting with __ and the normal name is an alias.  */
12396 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12397 choke me
12398 #else
12399 f = vprintf;
12400 #endif
12401
12402 ; return 0; }
12403 EOF
12404 if { (eval echo configure:12405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12405   rm -rf conftest*
12406   eval "ac_cv_func_vprintf=yes"
12407 else
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -rf conftest*
12411   eval "ac_cv_func_vprintf=no"
12412 fi
12413 rm -f conftest*
12414 fi
12415
12416 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12417   echo "$ac_t""yes" 1>&6
12418   cat >> confdefs.h <<\EOF
12419 #define HAVE_VPRINTF 1
12420 EOF
12421
12422 else
12423   echo "$ac_t""no" 1>&6
12424 fi
12425
12426 if test "$ac_cv_func_vprintf" != yes; then
12427 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12428 echo "configure:12429: checking for _doprnt" >&5
12429 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
12430   echo $ac_n "(cached) $ac_c" 1>&6
12431 else
12432   cat > conftest.$ac_ext <<EOF
12433 #line 12434 "configure"
12434 #include "confdefs.h"
12435 /* System header to define __stub macros and hopefully few prototypes,
12436     which can conflict with char _doprnt(); below.  */
12437 #include <assert.h>
12438 /* Override any gcc2 internal prototype to avoid an error.  */
12439 /* We use char because int might match the return type of a gcc2
12440     builtin and then its argument prototype would still apply.  */
12441 char _doprnt();
12442 char (*f)();
12443
12444 int main() {
12445
12446 /* The GNU C library defines this for functions which it implements
12447     to always fail with ENOSYS.  Some functions are actually named
12448     something starting with __ and the normal name is an alias.  */
12449 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12450 choke me
12451 #else
12452 f = _doprnt;
12453 #endif
12454
12455 ; return 0; }
12456 EOF
12457 if { (eval echo configure:12458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12458   rm -rf conftest*
12459   eval "ac_cv_func__doprnt=yes"
12460 else
12461   echo "configure: failed program was:" >&5
12462   cat conftest.$ac_ext >&5
12463   rm -rf conftest*
12464   eval "ac_cv_func__doprnt=no"
12465 fi
12466 rm -f conftest*
12467 fi
12468
12469 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12470   echo "$ac_t""yes" 1>&6
12471   cat >> confdefs.h <<\EOF
12472 #define HAVE_DOPRNT 1
12473 EOF
12474
12475 else
12476   echo "$ac_t""no" 1>&6
12477 fi
12478
12479 fi
12480
12481
12482 if test $ac_cv_func_vprintf = yes ; then
12483                 for ac_func in vsnprintf vsprintf
12484 do
12485 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12486 echo "configure:12487: checking for $ac_func" >&5
12487 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12488   echo $ac_n "(cached) $ac_c" 1>&6
12489 else
12490   cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 /* System header to define __stub macros and hopefully few prototypes,
12494     which can conflict with char $ac_func(); below.  */
12495 #include <assert.h>
12496 /* Override any gcc2 internal prototype to avoid an error.  */
12497 /* We use char because int might match the return type of a gcc2
12498     builtin and then its argument prototype would still apply.  */
12499 char $ac_func();
12500 char (*f)();
12501
12502 int main() {
12503
12504 /* The GNU C library defines this for functions which it implements
12505     to always fail with ENOSYS.  Some functions are actually named
12506     something starting with __ and the normal name is an alias.  */
12507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12508 choke me
12509 #else
12510 f = $ac_func;
12511 #endif
12512
12513 ; return 0; }
12514 EOF
12515 if { (eval echo configure:12516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12516   rm -rf conftest*
12517   eval "ac_cv_func_$ac_func=yes"
12518 else
12519   echo "configure: failed program was:" >&5
12520   cat conftest.$ac_ext >&5
12521   rm -rf conftest*
12522   eval "ac_cv_func_$ac_func=no"
12523 fi
12524 rm -f conftest*
12525 fi
12526
12527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12528   echo "$ac_t""yes" 1>&6
12529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12530   cat >> confdefs.h <<EOF
12531 #define $ac_tr_func 1
12532 EOF
12533  
12534 else
12535   echo "$ac_t""no" 1>&6
12536 fi
12537 done
12538
12539 fi
12540
12541 for ac_func in \
12542         bcopy                   \
12543         closesocket             \
12544         endgrent                \
12545         endpwent                \
12546         flock                   \
12547         getdtablesize   \
12548         getgrgid                \
12549         gethostname             \
12550         getpass                 \
12551         getpwuid                \
12552         getpwnam                \
12553         getspnam                \
12554         gettimeofday    \
12555         initgroups              \
12556         lockf                   \
12557         memcpy                  \
12558         memmove                 \
12559         mkstemp                 \
12560         read                    \
12561         recv                    \
12562         recvfrom                \
12563         setpwfile               \
12564         setgid                  \
12565         setegid                 \
12566         setsid                  \
12567         setuid                  \
12568         seteuid                 \
12569         signal                  \
12570         sigset                  \
12571         snprintf                \
12572         strdup                  \
12573         strerror                \
12574         strpbrk                 \
12575         strrchr                 \
12576         strsep                  \
12577         strstr                  \
12578         strtol                  \
12579         strtoul                 \
12580         strspn                  \
12581         sysconf                 \
12582         waitpid                 \
12583         wait4                   \
12584         write                   \
12585         send                    \
12586         sendto                  \
12587
12588 do
12589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12590 echo "configure:12591: checking for $ac_func" >&5
12591 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12592   echo $ac_n "(cached) $ac_c" 1>&6
12593 else
12594   cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 /* System header to define __stub macros and hopefully few prototypes,
12598     which can conflict with char $ac_func(); below.  */
12599 #include <assert.h>
12600 /* Override any gcc2 internal prototype to avoid an error.  */
12601 /* We use char because int might match the return type of a gcc2
12602     builtin and then its argument prototype would still apply.  */
12603 char $ac_func();
12604 char (*f)();
12605
12606 int main() {
12607
12608 /* The GNU C library defines this for functions which it implements
12609     to always fail with ENOSYS.  Some functions are actually named
12610     something starting with __ and the normal name is an alias.  */
12611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12612 choke me
12613 #else
12614 f = $ac_func;
12615 #endif
12616
12617 ; return 0; }
12618 EOF
12619 if { (eval echo configure:12620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12620   rm -rf conftest*
12621   eval "ac_cv_func_$ac_func=yes"
12622 else
12623   echo "configure: failed program was:" >&5
12624   cat conftest.$ac_ext >&5
12625   rm -rf conftest*
12626   eval "ac_cv_func_$ac_func=no"
12627 fi
12628 rm -f conftest*
12629 fi
12630
12631 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12632   echo "$ac_t""yes" 1>&6
12633     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12634   cat >> confdefs.h <<EOF
12635 #define $ac_tr_func 1
12636 EOF
12637  
12638 else
12639   echo "$ac_t""no" 1>&6
12640 fi
12641 done
12642
12643
12644 for ac_func in getopt tempnam
12645 do
12646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12647 echo "configure:12648: checking for $ac_func" >&5
12648 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12649   echo $ac_n "(cached) $ac_c" 1>&6
12650 else
12651   cat > conftest.$ac_ext <<EOF
12652 #line 12653 "configure"
12653 #include "confdefs.h"
12654 /* System header to define __stub macros and hopefully few prototypes,
12655     which can conflict with char $ac_func(); below.  */
12656 #include <assert.h>
12657 /* Override any gcc2 internal prototype to avoid an error.  */
12658 /* We use char because int might match the return type of a gcc2
12659     builtin and then its argument prototype would still apply.  */
12660 char $ac_func();
12661 char (*f)();
12662
12663 int main() {
12664
12665 /* The GNU C library defines this for functions which it implements
12666     to always fail with ENOSYS.  Some functions are actually named
12667     something starting with __ and the normal name is an alias.  */
12668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12669 choke me
12670 #else
12671 f = $ac_func;
12672 #endif
12673
12674 ; return 0; }
12675 EOF
12676 if { (eval echo configure:12677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12677   rm -rf conftest*
12678   eval "ac_cv_func_$ac_func=yes"
12679 else
12680   echo "configure: failed program was:" >&5
12681   cat conftest.$ac_ext >&5
12682   rm -rf conftest*
12683   eval "ac_cv_func_$ac_func=no"
12684 fi
12685 rm -f conftest*
12686 fi
12687
12688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12689   echo "$ac_t""yes" 1>&6
12690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12691   cat >> confdefs.h <<EOF
12692 #define $ac_tr_func 1
12693 EOF
12694  
12695 else
12696   echo "$ac_t""no" 1>&6
12697 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12698 fi
12699 done
12700
12701
12702
12703 # Check Configuration
12704 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12705 echo "configure:12706: checking declaration of sys_errlist" >&5
12706 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12707   echo $ac_n "(cached) $ac_c" 1>&6
12708 else
12709   
12710         cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713
12714 #include <stdio.h>
12715 #include <sys/types.h>
12716 #include <errno.h> 
12717 int main() {
12718 char *c = (char *) *sys_errlist
12719 ; return 0; }
12720 EOF
12721 if { (eval echo configure:12722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12722   rm -rf conftest*
12723   ol_cv_dcl_sys_errlist=yes
12724         ol_cv_have_sys_errlist=yes
12725 else
12726   echo "configure: failed program was:" >&5
12727   cat conftest.$ac_ext >&5
12728   rm -rf conftest*
12729   ol_cv_dcl_sys_errlist=no
12730 fi
12731 rm -f conftest*
12732 fi
12733
12734 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12735 #
12736 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12737 if test $ol_cv_dcl_sys_errlist = no ; then
12738         cat >> confdefs.h <<\EOF
12739 #define DECL_SYS_ERRLIST 1
12740 EOF
12741
12742
12743         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12744 echo "configure:12745: checking existence of sys_errlist" >&5
12745 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12746   echo $ac_n "(cached) $ac_c" 1>&6
12747 else
12748   
12749                 cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 #include <errno.h>
12753 int main() {
12754 char *c = (char *) *sys_errlist
12755 ; return 0; }
12756 EOF
12757 if { (eval echo configure:12758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12758   rm -rf conftest*
12759   ol_cv_have_sys_errlist=yes
12760 else
12761   echo "configure: failed program was:" >&5
12762   cat conftest.$ac_ext >&5
12763   rm -rf conftest*
12764   ol_cv_have_sys_errlist=no
12765 fi
12766 rm -f conftest*
12767 fi
12768
12769 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12770 fi
12771 if test $ol_cv_have_sys_errlist = yes ; then
12772         cat >> confdefs.h <<\EOF
12773 #define HAVE_SYS_ERRLIST 1
12774 EOF
12775
12776 fi
12777
12778
12779
12780 if test "$ol_enable_debug" != no ; then
12781         cat >> confdefs.h <<\EOF
12782 #define LDAP_DEBUG 1
12783 EOF
12784
12785 fi
12786 if test "$ol_enable_syslog" = yes ; then
12787         cat >> confdefs.h <<\EOF
12788 #define LDAP_SYSLOG 1
12789 EOF
12790
12791 fi
12792 if test "$ol_enable_libui" = yes ; then
12793         cat >> confdefs.h <<\EOF
12794 #define LDAP_LIBUI 1
12795 EOF
12796
12797 fi
12798 if test "$ol_enable_cache" = no ; then
12799         cat >> confdefs.h <<\EOF
12800 #define LDAP_NOCACHE 1
12801 EOF
12802
12803 fi
12804 if test "$ol_enable_dns" != no ; then
12805         cat >> confdefs.h <<\EOF
12806 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12807 EOF
12808
12809 fi
12810 if test "$ol_enable_proctitle" != no ; then
12811         cat >> confdefs.h <<\EOF
12812 #define LDAP_PROCTITLE 1
12813 EOF
12814
12815 fi
12816 if test "$ol_enable_referrals" != no ; then
12817         cat >> confdefs.h <<\EOF
12818 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12819 EOF
12820
12821 fi
12822 if test "$ol_enable_cldap" != no ; then
12823         cat >> confdefs.h <<\EOF
12824 #define LDAP_CONNECTIONLESS 1
12825 EOF
12826
12827 fi
12828
12829 if test "$ol_enable_crypt" != no ; then
12830         cat >> confdefs.h <<\EOF
12831 #define SLAPD_CRYPT 1
12832 EOF
12833
12834 fi
12835 if test "$ol_enable_cleartext" != no ; then
12836         cat >> confdefs.h <<\EOF
12837 #define SLAPD_CLEARTEXT 1
12838 EOF
12839
12840 fi
12841 if test "$ol_enable_multimaster" != no ; then
12842         cat >> confdefs.h <<\EOF
12843 #define SLAPD_MULTIMASTER 1
12844 EOF
12845
12846 fi
12847 if test "$ol_enable_phonetic" != no ; then
12848         cat >> confdefs.h <<\EOF
12849 #define SLAPD_PHONETIC 1
12850 EOF
12851
12852 fi
12853 if test "$ol_enable_rlookups" != no ; then
12854         cat >> confdefs.h <<\EOF
12855 #define SLAPD_RLOOKUPS 1
12856 EOF
12857
12858 fi
12859
12860 if test "$ol_link_modules" != no ; then
12861         cat >> confdefs.h <<\EOF
12862 #define SLAPD_MODULES 1
12863 EOF
12864
12865         BUILD_SLAPD=yes
12866         MODULES_LIBS=-lltdl
12867         SLAPD_MODULES_LDFLAGS="-dlopen self"
12868 fi
12869
12870 if test "$ol_link_bdb2" != no ; then
12871         cat >> confdefs.h <<\EOF
12872 #define SLAPD_BDB2 1
12873 EOF
12874
12875         BUILD_SLAPD=yes
12876         BUILD_BDB2=yes
12877         if test "$ol_with_bdb2_module" != static ; then
12878                 cat >> confdefs.h <<\EOF
12879 #define SLAPD_BDB2_DYNAMIC 1
12880 EOF
12881
12882                 BUILD_BDB2=mod
12883                 BUILD_BDB2_DYNAMIC=shared
12884                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
12885         fi
12886 fi
12887
12888 if test "$ol_enable_ldap" != no ; then
12889         cat >> confdefs.h <<\EOF
12890 #define SLAPD_LDAP 1
12891 EOF
12892
12893         BUILD_SLAPD=yes
12894         BUILD_LDAP=yes
12895         if test "$ol_with_ldap_module" != static ; then
12896                 cat >> confdefs.h <<\EOF
12897 #define SLAPD_LDAP_DYNAMIC 1
12898 EOF
12899
12900                 BUILD_LDAP=mod
12901                 BUILD_LDAP_DYNAMIC=shared
12902                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
12903         fi
12904 fi
12905
12906 if test "$ol_link_ldbm" != no ; then
12907         cat >> confdefs.h <<\EOF
12908 #define SLAPD_LDBM 1
12909 EOF
12910
12911         BUILD_SLAPD=yes
12912         BUILD_LDBM=yes
12913         if test "$ol_with_ldbm_module" != static ; then
12914                 cat >> confdefs.h <<\EOF
12915 #define SLAPD_LDBM_DYNAMIC 1
12916 EOF
12917
12918                 BUILD_LDBM=mod
12919                 BUILD_LDBM_DYNAMIC=shared
12920                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
12921         fi
12922 fi
12923
12924 if test "$ol_enable_passwd" != no ; then
12925         cat >> confdefs.h <<\EOF
12926 #define SLAPD_PASSWD 1
12927 EOF
12928
12929         BUILD_SLAPD=yes
12930         BUILD_PASSWD=yes
12931         if test "$ol_with_passwd_module" != static ; then
12932                 cat >> confdefs.h <<\EOF
12933 #define SLAPD_PASSWD_DYNAMIC 1
12934 EOF
12935
12936                 BUILD_PASSWD=mod
12937                 BUILD_PASSWD_DYNAMIC=shared
12938                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
12939         fi
12940 fi
12941
12942 if test "$ol_link_perl" != no ; then
12943         cat >> confdefs.h <<\EOF
12944 #define SLAPD_PERL 1
12945 EOF
12946
12947         BUILD_SLAPD=yes
12948         BUILD_PERL=yes
12949         if test "$ol_with_perl_module" != static ; then
12950                 cat >> confdefs.h <<\EOF
12951 #define SLAPD_PERL_DYNAMIC 1
12952 EOF
12953
12954                 BUILD_PERL=mod
12955                 BUILD_PERL_DYNAMIC=shared
12956                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
12957         fi
12958 fi
12959
12960 if test "$ol_enable_shell" != no ; then
12961         cat >> confdefs.h <<\EOF
12962 #define SLAPD_SHELL 1
12963 EOF
12964
12965         BUILD_SLAPD=yes
12966         BUILD_SHELL=yes
12967         if test "$ol_with_shell_module" != static ; then
12968                 cat >> confdefs.h <<\EOF
12969 #define SLAPD_SHELL_DYNAMIC 1
12970 EOF
12971
12972                 BUILD_SHELL=mod
12973                 BUILD_SHELL_DYNAMIC=shared
12974                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
12975         fi
12976 fi
12977
12978 if test "$ol_enable_tcl" != no ; then
12979         cat >> confdefs.h <<\EOF
12980 #define SLAPD_TCL 1
12981 EOF
12982
12983         BUILD_SLAPD=yes
12984         BUILD_TCL=yes
12985         if test "$ol_with_tcl_module" != static; then
12986                 cat >> confdefs.h <<\EOF
12987 #define SLAPD_TCL_DYNAMIC 1
12988 EOF
12989
12990                 BUILD_TCL=mod
12991                 BUILD_TCL_DYNAMIC=shared
12992                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
12993         fi
12994 fi
12995
12996 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12997         $BUILD_SLAPD = yes ; then
12998         BUILD_SLURPD=yes
12999 fi
13000
13001 if test "$ol_link_isode" != no ; then
13002         BUILD_LDAPD=yes
13003 fi
13004
13005
13006
13007
13008   
13009   
13010   
13011   
13012   
13013   
13014   
13015   
13016   
13017   
13018   
13019   
13020   
13021   
13022   
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049 trap '' 1 2 15
13050
13051 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13052
13053 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13054 # Let make expand exec_prefix.
13055 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13056
13057 # Any assignment to VPATH causes Sun make to only execute
13058 # the first set of double-colon rules, so remove it if not needed.
13059 # If there is a colon in the path, we need to keep it.
13060 if test "x$srcdir" = x.; then
13061   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13062 fi
13063
13064 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13065
13066 DEFS=-DHAVE_CONFIG_H
13067
13068 # Without the "./", some shells look in PATH for config.status.
13069 : ${CONFIG_STATUS=./config.status}
13070
13071 echo creating $CONFIG_STATUS
13072 rm -f $CONFIG_STATUS
13073 cat > $CONFIG_STATUS <<EOF
13074 #! /bin/sh
13075 # Generated automatically by configure.
13076 # Run this file to recreate the current configuration.
13077 # This directory was configured as follows,
13078 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13079 #
13080 # $0 $ac_configure_args
13081 #
13082 # Compiler output produced by configure, useful for debugging
13083 # configure, is in ./config.log if it exists.
13084
13085 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13086 for ac_option
13087 do
13088   case "\$ac_option" in
13089   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13090     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13091     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13092   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13093     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
13094     exit 0 ;;
13095   -help | --help | --hel | --he | --h)
13096     echo "\$ac_cs_usage"; exit 0 ;;
13097   *) echo "\$ac_cs_usage"; exit 1 ;;
13098   esac
13099 done
13100
13101 ac_given_srcdir=$srcdir
13102 ac_given_INSTALL="$INSTALL"
13103
13104 trap 'rm -fr `echo "\
13105 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13106 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13107 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13108 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13109 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13110 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13111 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13112 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13113 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13114 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13115 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13116 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13117 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13118 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13119 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13120 include/Makefile:build/top.mk:include/Makefile.in \
13121 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13122 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13123 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13124 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13125 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13126 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13127 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13128 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13129 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13130 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13131 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13132 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13133 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13134 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13135 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13136 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13137 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13138 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13139 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13140 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13141 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13142 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13143 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13144 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13145 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13146 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13147  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13148 EOF
13149 cat >> $CONFIG_STATUS <<EOF
13150
13151 # Protect against being on the right side of a sed subst in config.status.
13152 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13153  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13154 $ac_vpsub
13155 $extrasub
13156 s%@SHELL@%$SHELL%g
13157 s%@CFLAGS@%$CFLAGS%g
13158 s%@CPPFLAGS@%$CPPFLAGS%g
13159 s%@CXXFLAGS@%$CXXFLAGS%g
13160 s%@FFLAGS@%$FFLAGS%g
13161 s%@DEFS@%$DEFS%g
13162 s%@LDFLAGS@%$LDFLAGS%g
13163 s%@LIBS@%$LIBS%g
13164 s%@exec_prefix@%$exec_prefix%g
13165 s%@prefix@%$prefix%g
13166 s%@program_transform_name@%$program_transform_name%g
13167 s%@bindir@%$bindir%g
13168 s%@sbindir@%$sbindir%g
13169 s%@libexecdir@%$libexecdir%g
13170 s%@datadir@%$datadir%g
13171 s%@sysconfdir@%$sysconfdir%g
13172 s%@sharedstatedir@%$sharedstatedir%g
13173 s%@localstatedir@%$localstatedir%g
13174 s%@libdir@%$libdir%g
13175 s%@includedir@%$includedir%g
13176 s%@oldincludedir@%$oldincludedir%g
13177 s%@infodir@%$infodir%g
13178 s%@mandir@%$mandir%g
13179 s%@host@%$host%g
13180 s%@host_alias@%$host_alias%g
13181 s%@host_cpu@%$host_cpu%g
13182 s%@host_vendor@%$host_vendor%g
13183 s%@host_os@%$host_os%g
13184 s%@target@%$target%g
13185 s%@target_alias@%$target_alias%g
13186 s%@target_cpu@%$target_cpu%g
13187 s%@target_vendor@%$target_vendor%g
13188 s%@target_os@%$target_os%g
13189 s%@build@%$build%g
13190 s%@build_alias@%$build_alias%g
13191 s%@build_cpu@%$build_cpu%g
13192 s%@build_vendor@%$build_vendor%g
13193 s%@build_os@%$build_os%g
13194 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13195 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13196 s%@INSTALL_DATA@%$INSTALL_DATA%g
13197 s%@PACKAGE@%$PACKAGE%g
13198 s%@VERSION@%$VERSION%g
13199 s%@ACLOCAL@%$ACLOCAL%g
13200 s%@AUTOCONF@%$AUTOCONF%g
13201 s%@AUTOMAKE@%$AUTOMAKE%g
13202 s%@AUTOHEADER@%$AUTOHEADER%g
13203 s%@MAKEINFO@%$MAKEINFO%g
13204 s%@install_sh@%$install_sh%g
13205 s%@AMTAR@%$AMTAR%g
13206 s%@AWK@%$AWK%g
13207 s%@AMTARFLAGS@%$AMTARFLAGS%g
13208 s%@SET_MAKE@%$SET_MAKE%g
13209 s%@top_builddir@%$top_builddir%g
13210 s%@ldap_subdir@%$ldap_subdir%g
13211 s%@CC@%$CC%g
13212 s%@RANLIB@%$RANLIB%g
13213 s%@LD@%$LD%g
13214 s%@NM@%$NM%g
13215 s%@LN_S@%$LN_S%g
13216 s%@LIBTOOL@%$LIBTOOL%g
13217 s%@LN_H@%$LN_H%g
13218 s%@SENDMAIL@%$SENDMAIL%g
13219 s%@EDITOR@%$EDITOR%g
13220 s%@FINGER@%$FINGER%g
13221 s%@PERLBIN@%$PERLBIN%g
13222 s%@CPP@%$CPP%g
13223 s%@EXEEXT@%$EXEEXT%g
13224 s%@OBJEXT@%$OBJEXT%g
13225 s%@OL_MKDEP@%$OL_MKDEP%g
13226 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
13227 s%@PEPSY@%$PEPSY%g
13228 s%@LIBOBJS@%$LIBOBJS%g
13229 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
13230 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
13231 s%@BUILD_BDB2@%$BUILD_BDB2%g
13232 s%@BUILD_LDAP@%$BUILD_LDAP%g
13233 s%@BUILD_LDBM@%$BUILD_LDBM%g
13234 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
13235 s%@BUILD_PERL@%$BUILD_PERL%g
13236 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
13237 s%@BUILD_SHELL@%$BUILD_SHELL%g
13238 s%@BUILD_TCL@%$BUILD_TCL%g
13239 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13240 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13241 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13242 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13243 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13244 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13245 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13246 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13247 s%@LDAP_LIBS@%$LDAP_LIBS%g
13248 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13249 s%@LDIF_LIBS@%$LDIF_LIBS%g
13250 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13251 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13252 s%@LDBM_LIBS@%$LDBM_LIBS%g
13253 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13254 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13255 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13256 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13257 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
13258 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13259 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13260 s%@KRB_LIBS@%$KRB_LIBS%g
13261 s%@READLINE_LIBS@%$READLINE_LIBS%g
13262 s%@SASL_LIBS@%$SASL_LIBS%g
13263 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13264 s%@TLS_LIBS@%$TLS_LIBS%g
13265 s%@MODULES_LIBS@%$MODULES_LIBS%g
13266
13267 CEOF
13268 EOF
13269
13270 cat >> $CONFIG_STATUS <<\EOF
13271
13272 # Split the substitutions into bite-sized pieces for seds with
13273 # small command number limits, like on Digital OSF/1 and HP-UX.
13274 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13275 ac_file=1 # Number of current file.
13276 ac_beg=1 # First line for current file.
13277 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13278 ac_more_lines=:
13279 ac_sed_cmds=""
13280 while $ac_more_lines; do
13281   if test $ac_beg -gt 1; then
13282     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13283   else
13284     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13285   fi
13286   if test ! -s conftest.s$ac_file; then
13287     ac_more_lines=false
13288     rm -f conftest.s$ac_file
13289   else
13290     if test -z "$ac_sed_cmds"; then
13291       ac_sed_cmds="sed -f conftest.s$ac_file"
13292     else
13293       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13294     fi
13295     ac_file=`expr $ac_file + 1`
13296     ac_beg=$ac_end
13297     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13298   fi
13299 done
13300 if test -z "$ac_sed_cmds"; then
13301   ac_sed_cmds=cat
13302 fi
13303 EOF
13304
13305 cat >> $CONFIG_STATUS <<EOF
13306
13307 CONFIG_FILES=\${CONFIG_FILES-"\
13308 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13309 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13310 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13311 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13312 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13313 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13314 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13315 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13316 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13317 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13318 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13319 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13320 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13321 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13322 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13323 include/Makefile:build/top.mk:include/Makefile.in \
13324 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13325 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13326 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13327 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13328 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13329 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13330 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13331 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13332 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13333 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13334 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13335 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
13336 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
13337 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
13338 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
13339 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
13340 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
13341 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
13342 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13343 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13344 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13345 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13346 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13347 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13348 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13349 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13350 "}
13351 EOF
13352 cat >> $CONFIG_STATUS <<\EOF
13353 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13354   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13355   case "$ac_file" in
13356   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13357        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13358   *) ac_file_in="${ac_file}.in" ;;
13359   esac
13360
13361   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13362
13363   # Remove last slash and all that follows it.  Not all systems have dirname.
13364   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13365   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13366     # The file is in a subdirectory.
13367     test ! -d "$ac_dir" && mkdir "$ac_dir"
13368     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13369     # A "../" for each directory in $ac_dir_suffix.
13370     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13371   else
13372     ac_dir_suffix= ac_dots=
13373   fi
13374
13375   case "$ac_given_srcdir" in
13376   .)  srcdir=.
13377       if test -z "$ac_dots"; then top_srcdir=.
13378       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13379   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13380   *) # Relative path.
13381     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13382     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13383   esac
13384
13385   case "$ac_given_INSTALL" in
13386   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13387   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13388   esac
13389
13390   echo creating "$ac_file"
13391   rm -f "$ac_file"
13392   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13393   case "$ac_file" in
13394   *Makefile*) ac_comsub="1i\\
13395 # $configure_input" ;;
13396   *) ac_comsub= ;;
13397   esac
13398
13399   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13400   sed -e "$ac_comsub
13401 s%@configure_input@%$configure_input%g
13402 s%@srcdir@%$srcdir%g
13403 s%@top_srcdir@%$top_srcdir%g
13404 s%@INSTALL@%$INSTALL%g
13405 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13406 fi; done
13407 rm -f conftest.s*
13408
13409 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13410 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13411 #
13412 # ac_d sets the value in "#define NAME VALUE" lines.
13413 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13414 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13415 ac_dC='\3'
13416 ac_dD='%g'
13417 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13418 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13419 ac_uB='\([      ]\)%\1#\2define\3'
13420 ac_uC=' '
13421 ac_uD='\4%g'
13422 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13423 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13424 ac_eB='$%\1#\2define\3'
13425 ac_eC=' '
13426 ac_eD='%g'
13427
13428 if test "${CONFIG_HEADERS+set}" != set; then
13429 EOF
13430 cat >> $CONFIG_STATUS <<EOF
13431   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13432 EOF
13433 cat >> $CONFIG_STATUS <<\EOF
13434 fi
13435 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13436   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13437   case "$ac_file" in
13438   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13439        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13440   *) ac_file_in="${ac_file}.in" ;;
13441   esac
13442
13443   echo creating $ac_file
13444
13445   rm -f conftest.frag conftest.in conftest.out
13446   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13447   cat $ac_file_inputs > conftest.in
13448
13449 EOF
13450
13451 # Transform confdefs.h into a sed script conftest.vals that substitutes
13452 # the proper values into config.h.in to produce config.h.  And first:
13453 # Protect against being on the right side of a sed subst in config.status.
13454 # Protect against being in an unquoted here document in config.status.
13455 rm -f conftest.vals
13456 cat > conftest.hdr <<\EOF
13457 s/[\\&%]/\\&/g
13458 s%[\\$`]%\\&%g
13459 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13460 s%ac_d%ac_u%gp
13461 s%ac_u%ac_e%gp
13462 EOF
13463 sed -n -f conftest.hdr confdefs.h > conftest.vals
13464 rm -f conftest.hdr
13465
13466 # This sed command replaces #undef with comments.  This is necessary, for
13467 # example, in the case of _POSIX_SOURCE, which is predefined and required
13468 # on some systems where configure will not decide to define it.
13469 cat >> conftest.vals <<\EOF
13470 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13471 EOF
13472
13473 # Break up conftest.vals because some shells have a limit on
13474 # the size of here documents, and old seds have small limits too.
13475
13476 rm -f conftest.tail
13477 while :
13478 do
13479   ac_lines=`grep -c . conftest.vals`
13480   # grep -c gives empty output for an empty file on some AIX systems.
13481   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13482   # Write a limited-size here document to conftest.frag.
13483   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13484   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13485   echo 'CEOF
13486   sed -f conftest.frag conftest.in > conftest.out
13487   rm -f conftest.in
13488   mv conftest.out conftest.in
13489 ' >> $CONFIG_STATUS
13490   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13491   rm -f conftest.vals
13492   mv conftest.tail conftest.vals
13493 done
13494 rm -f conftest.vals
13495
13496 cat >> $CONFIG_STATUS <<\EOF
13497   rm -f conftest.frag conftest.h
13498   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13499   cat conftest.in >> conftest.h
13500   rm -f conftest.in
13501   if cmp -s $ac_file conftest.h 2>/dev/null; then
13502     echo "$ac_file is unchanged"
13503     rm -f conftest.h
13504   else
13505     # Remove last slash and all that follows it.  Not all systems have dirname.
13506       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13507       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13508       # The file is in a subdirectory.
13509       test ! -d "$ac_dir" && mkdir "$ac_dir"
13510     fi
13511     rm -f $ac_file
13512     mv conftest.h $ac_file
13513   fi
13514 fi; done
13515
13516 EOF
13517 cat >> $CONFIG_STATUS <<EOF
13518
13519 EOF
13520 cat >> $CONFIG_STATUS <<\EOF
13521
13522 date > stamp-h
13523 echo Please \"make depend\" to build dependencies
13524
13525 exit 0
13526 EOF
13527 chmod +x $CONFIG_STATUS
13528 rm -fr confdefs* $ac_clean_files
13529 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13530