]> git.sur5r.net Git - openldap/blob - configure
Add basic configure support of --enable-quipu
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-multimaster        enable multimaster replication (no)"
65 ac_help="$ac_help
66     --enable-phonetic   enable phonetic/soundex (no)"
67 ac_help="$ac_help
68     --enable-quipu      build quipu migration tools (no)"
69 ac_help="$ac_help
70     --enable-rlookups   enable reverse lookups (auto)"
71 ac_help="$ac_help
72     --enable-wrappers   enable tcp wrapper support (no)"
73 ac_help="$ac_help
74     --enable-bdb2       enable bdb2 backend (no)"
75 ac_help="$ac_help
76       --with-bdb2-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldap       enable ldap backend (no)"
79 ac_help="$ac_help
80       --with-ldap-module        module type (static)"
81 ac_help="$ac_help
82     --enable-ldbm       enable ldbm backend (yes)"
83 ac_help="$ac_help
84       --with-ldbm-module        module type (static)"
85 ac_help="$ac_help
86       --with-ldbm-api   use LDBM API (auto)"
87 ac_help="$ac_help
88       --with-ldbm-type  use LDBM type (auto)"
89 ac_help="$ac_help
90     --enable-passwd     enable passwd backend (no)"
91 ac_help="$ac_help
92       --with-passwd-module      module type (static)"
93 ac_help="$ac_help
94     --enable-perl       enable perl backend (no)"
95 ac_help="$ac_help
96       --with-perl-module        module type (static)"
97 ac_help="$ac_help
98     --enable-shell      enable shell backend (no)"
99 ac_help="$ac_help
100       --with-shell-module       module type (static)"
101 ac_help="$ac_help
102     --enable-tcl        enable tcl backend (no)"
103 ac_help="$ac_help
104       --with-tcl-module module type (static)"
105 ac_help="$ac_help
106 SLURPD Options:"
107 ac_help="$ac_help
108   --enable-slurpd       enable building slurpd (auto)"
109 ac_help="$ac_help
110 Library Generation & Linking Options"
111 ac_help="$ac_help
112   --enable-static[=PKGS]  build static libraries [default=yes]"
113 ac_help="$ac_help
114   --enable-shared[=PKGS]  build shared libraries [default=yes]"
115 ac_help="$ac_help
116   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
117 ac_help="$ac_help
118   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
119 ac_help="$ac_help
120   --disable-libtool-lock  avoid locking (might break parallel builds)"
121
122 # Initialize some variables set by options.
123 # The variables have the same names as the options, with
124 # dashes changed to underlines.
125 build=NONE
126 cache_file=./config.cache
127 exec_prefix=NONE
128 host=NONE
129 no_create=
130 nonopt=NONE
131 no_recursion=
132 prefix=NONE
133 program_prefix=NONE
134 program_suffix=NONE
135 program_transform_name=s,x,x,
136 silent=
137 site=
138 srcdir=
139 target=NONE
140 verbose=
141 x_includes=NONE
142 x_libraries=NONE
143 bindir='${exec_prefix}/bin'
144 sbindir='${exec_prefix}/sbin'
145 libexecdir='${exec_prefix}/libexec'
146 datadir='${prefix}/share'
147 sysconfdir='${prefix}/etc'
148 sharedstatedir='${prefix}/com'
149 localstatedir='${prefix}/var'
150 libdir='${exec_prefix}/lib'
151 includedir='${prefix}/include'
152 oldincludedir='/usr/include'
153 infodir='${prefix}/info'
154 mandir='${prefix}/man'
155
156 # Initialize some other variables.
157 subdirs=
158 MFLAGS= MAKEFLAGS=
159 SHELL=${CONFIG_SHELL-/bin/sh}
160 # Maximum number of lines to put in a shell here document.
161 ac_max_here_lines=12
162
163 ac_prev=
164 for ac_option
165 do
166
167   # If the previous option needs an argument, assign it.
168   if test -n "$ac_prev"; then
169     eval "$ac_prev=\$ac_option"
170     ac_prev=
171     continue
172   fi
173
174   case "$ac_option" in
175   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
176   *) ac_optarg= ;;
177   esac
178
179   # Accept the important Cygnus configure options, so we can diagnose typos.
180
181   case "$ac_option" in
182
183   -bindir | --bindir | --bindi | --bind | --bin | --bi)
184     ac_prev=bindir ;;
185   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
186     bindir="$ac_optarg" ;;
187
188   -build | --build | --buil | --bui | --bu)
189     ac_prev=build ;;
190   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
191     build="$ac_optarg" ;;
192
193   -cache-file | --cache-file | --cache-fil | --cache-fi \
194   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
195     ac_prev=cache_file ;;
196   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
197   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
198     cache_file="$ac_optarg" ;;
199
200   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
201     ac_prev=datadir ;;
202   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
203   | --da=*)
204     datadir="$ac_optarg" ;;
205
206   -disable-* | --disable-*)
207     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
208     # Reject names that are not valid shell variable names.
209     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
210       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
211     fi
212     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213     eval "enable_${ac_feature}=no" ;;
214
215   -enable-* | --enable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     case "$ac_option" in
223       *=*) ;;
224       *) ac_optarg=yes ;;
225     esac
226     eval "enable_${ac_feature}='$ac_optarg'" ;;
227
228   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
229   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
230   | --exec | --exe | --ex)
231     ac_prev=exec_prefix ;;
232   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
233   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
234   | --exec=* | --exe=* | --ex=*)
235     exec_prefix="$ac_optarg" ;;
236
237   -gas | --gas | --ga | --g)
238     # Obsolete; use --with-gas.
239     with_gas=yes ;;
240
241   -help | --help | --hel | --he)
242     # Omit some internal or obsolete options to make the list less imposing.
243     # This message is too long to be a string in the A/UX 3.1 sh.
244     cat << EOF
245 Usage: configure [options] [host]
246 Options: [defaults in brackets after descriptions]
247 Configuration:
248   --cache-file=FILE       cache test results in FILE
249   --help                  print this message
250   --no-create             do not create output files
251   --quiet, --silent       do not print \`checking...' messages
252   --version               print the version of autoconf that created configure
253 Directory and file names:
254   --prefix=PREFIX         install architecture-independent files in PREFIX
255                           [$ac_default_prefix]
256   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
257                           [same as prefix]
258   --bindir=DIR            user executables in DIR [EPREFIX/bin]
259   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
260   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
261   --datadir=DIR           read-only architecture-independent data in DIR
262                           [PREFIX/share]
263   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
264   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
265                           [PREFIX/com]
266   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
267   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
268   --includedir=DIR        C header files in DIR [PREFIX/include]
269   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
270   --infodir=DIR           info documentation in DIR [PREFIX/info]
271   --mandir=DIR            man documentation in DIR [PREFIX/man]
272   --srcdir=DIR            find the sources in DIR [configure dir or ..]
273   --program-prefix=PREFIX prepend PREFIX to installed program names
274   --program-suffix=SUFFIX append SUFFIX to installed program names
275   --program-transform-name=PROGRAM
276                           run sed PROGRAM on installed program names
277 EOF
278     cat << EOF
279 Host type:
280   --build=BUILD           configure for building on BUILD [BUILD=HOST]
281   --host=HOST             configure for HOST [guessed]
282   --target=TARGET         configure for TARGET [TARGET=HOST]
283 Features and packages:
284   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
285   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
286   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
287   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
288   --x-includes=DIR        X include files are in DIR
289   --x-libraries=DIR       X library files are in DIR
290 EOF
291     if test -n "$ac_help"; then
292       echo "--enable and --with options recognized:$ac_help"
293     fi
294     exit 0 ;;
295
296   -host | --host | --hos | --ho)
297     ac_prev=host ;;
298   -host=* | --host=* | --hos=* | --ho=*)
299     host="$ac_optarg" ;;
300
301   -includedir | --includedir | --includedi | --included | --include \
302   | --includ | --inclu | --incl | --inc)
303     ac_prev=includedir ;;
304   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
305   | --includ=* | --inclu=* | --incl=* | --inc=*)
306     includedir="$ac_optarg" ;;
307
308   -infodir | --infodir | --infodi | --infod | --info | --inf)
309     ac_prev=infodir ;;
310   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
311     infodir="$ac_optarg" ;;
312
313   -libdir | --libdir | --libdi | --libd)
314     ac_prev=libdir ;;
315   -libdir=* | --libdir=* | --libdi=* | --libd=*)
316     libdir="$ac_optarg" ;;
317
318   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
319   | --libexe | --libex | --libe)
320     ac_prev=libexecdir ;;
321   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
322   | --libexe=* | --libex=* | --libe=*)
323     libexecdir="$ac_optarg" ;;
324
325   -localstatedir | --localstatedir | --localstatedi | --localstated \
326   | --localstate | --localstat | --localsta | --localst \
327   | --locals | --local | --loca | --loc | --lo)
328     ac_prev=localstatedir ;;
329   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
330   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
331   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
332     localstatedir="$ac_optarg" ;;
333
334   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335     ac_prev=mandir ;;
336   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337     mandir="$ac_optarg" ;;
338
339   -nfp | --nfp | --nf)
340     # Obsolete; use --without-fp.
341     with_fp=no ;;
342
343   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344   | --no-cr | --no-c)
345     no_create=yes ;;
346
347   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
348   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349     no_recursion=yes ;;
350
351   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
352   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
353   | --oldin | --oldi | --old | --ol | --o)
354     ac_prev=oldincludedir ;;
355   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
356   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
357   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
358     oldincludedir="$ac_optarg" ;;
359
360   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361     ac_prev=prefix ;;
362   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363     prefix="$ac_optarg" ;;
364
365   -program-prefix | --program-prefix | --program-prefi | --program-pref \
366   | --program-pre | --program-pr | --program-p)
367     ac_prev=program_prefix ;;
368   -program-prefix=* | --program-prefix=* | --program-prefi=* \
369   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
370     program_prefix="$ac_optarg" ;;
371
372   -program-suffix | --program-suffix | --program-suffi | --program-suff \
373   | --program-suf | --program-su | --program-s)
374     ac_prev=program_suffix ;;
375   -program-suffix=* | --program-suffix=* | --program-suffi=* \
376   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
377     program_suffix="$ac_optarg" ;;
378
379   -program-transform-name | --program-transform-name \
380   | --program-transform-nam | --program-transform-na \
381   | --program-transform-n | --program-transform- \
382   | --program-transform | --program-transfor \
383   | --program-transfo | --program-transf \
384   | --program-trans | --program-tran \
385   | --progr-tra | --program-tr | --program-t)
386     ac_prev=program_transform_name ;;
387   -program-transform-name=* | --program-transform-name=* \
388   | --program-transform-nam=* | --program-transform-na=* \
389   | --program-transform-n=* | --program-transform-=* \
390   | --program-transform=* | --program-transfor=* \
391   | --program-transfo=* | --program-transf=* \
392   | --program-trans=* | --program-tran=* \
393   | --progr-tra=* | --program-tr=* | --program-t=*)
394     program_transform_name="$ac_optarg" ;;
395
396   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
397   | -silent | --silent | --silen | --sile | --sil)
398     silent=yes ;;
399
400   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401     ac_prev=sbindir ;;
402   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403   | --sbi=* | --sb=*)
404     sbindir="$ac_optarg" ;;
405
406   -sharedstatedir | --sharedstatedir | --sharedstatedi \
407   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
408   | --sharedst | --shareds | --shared | --share | --shar \
409   | --sha | --sh)
410     ac_prev=sharedstatedir ;;
411   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
412   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
413   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414   | --sha=* | --sh=*)
415     sharedstatedir="$ac_optarg" ;;
416
417   -site | --site | --sit)
418     ac_prev=site ;;
419   -site=* | --site=* | --sit=*)
420     site="$ac_optarg" ;;
421
422   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423     ac_prev=srcdir ;;
424   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425     srcdir="$ac_optarg" ;;
426
427   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
428   | --syscon | --sysco | --sysc | --sys | --sy)
429     ac_prev=sysconfdir ;;
430   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
431   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
432     sysconfdir="$ac_optarg" ;;
433
434   -target | --target | --targe | --targ | --tar | --ta | --t)
435     ac_prev=target ;;
436   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
437     target="$ac_optarg" ;;
438
439   -v | -verbose | --verbose | --verbos | --verbo | --verb)
440     verbose=yes ;;
441
442   -version | --version | --versio | --versi | --vers)
443     echo "configure generated by autoconf version 2.13.1"
444     exit 0 ;;
445
446   -with-* | --with-*)
447     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
448     # Reject names that are not valid shell variable names.
449     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
450       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451     fi
452     ac_package=`echo $ac_package| sed 's/-/_/g'`
453     case "$ac_option" in
454       *=*) ;;
455       *) ac_optarg=yes ;;
456     esac
457     eval "with_${ac_package}='$ac_optarg'" ;;
458
459   -without-* | --without-*)
460     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
461     # Reject names that are not valid shell variable names.
462     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
463       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464     fi
465     ac_package=`echo $ac_package| sed 's/-/_/g'`
466     eval "with_${ac_package}=no" ;;
467
468   --x)
469     # Obsolete; use --with-x.
470     with_x=yes ;;
471
472   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
473   | --x-incl | --x-inc | --x-in | --x-i)
474     ac_prev=x_includes ;;
475   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
476   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
477     x_includes="$ac_optarg" ;;
478
479   -x-libraries | --x-libraries | --x-librarie | --x-librari \
480   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
481     ac_prev=x_libraries ;;
482   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
483   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
484     x_libraries="$ac_optarg" ;;
485
486   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
487     ;;
488
489   *)
490     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
491       echo "configure: warning: $ac_option: invalid host type" 1>&2
492     fi
493     if test "x$nonopt" != xNONE; then
494       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
495     fi
496     nonopt="$ac_option"
497     ;;
498
499   esac
500 done
501
502 if test -n "$ac_prev"; then
503   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
504 fi
505
506 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
507
508 # File descriptor usage:
509 # 0 standard input
510 # 1 file creation
511 # 2 errors and warnings
512 # 3 some systems may open it to /dev/tty
513 # 4 used on the Kubota Titan
514 # 6 checking for... messages and results
515 # 5 compiler messages saved in config.log
516 if test "$silent" = yes; then
517   exec 6>/dev/null
518 else
519   exec 6>&1
520 fi
521 exec 5>./config.log
522
523 echo "\
524 This file contains any messages produced by compilers while
525 running configure, to aid debugging if configure makes a mistake.
526 " 1>&5
527
528 # Strip out --no-create and --no-recursion so they do not pile up.
529 # Also quote any args containing shell metacharacters.
530 ac_configure_args=
531 for ac_arg
532 do
533   case "$ac_arg" in
534   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
535   | --no-cr | --no-c) ;;
536   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
537   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
538   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
539   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
540   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
541   esac
542 done
543
544 # NLS nuisances.
545 # Only set these to C if already set.  These must not be set unconditionally
546 # because not all systems understand e.g. LANG=C (notably SCO).
547 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
548 # Non-C LC_CTYPE values break the ctype check.
549 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
550 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
551 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
552 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
553
554 # confdefs.h avoids OS command line length limits that DEFS can exceed.
555 rm -rf conftest* confdefs.h
556 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
557 echo > confdefs.h
558
559 # A filename unique to this package, relative to the directory that
560 # configure is in, which we can look for to find out if srcdir is correct.
561 ac_unique_file=build/version
562
563 # Find the source files, if location was not specified.
564 if test -z "$srcdir"; then
565   ac_srcdir_defaulted=yes
566   # Try the directory containing this script, then its parent.
567   ac_prog=$0
568   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
569   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
570   srcdir=$ac_confdir
571   if test ! -r $srcdir/$ac_unique_file; then
572     srcdir=..
573   fi
574 else
575   ac_srcdir_defaulted=no
576 fi
577 if test ! -r $srcdir/$ac_unique_file; then
578   if test "$ac_srcdir_defaulted" = yes; then
579     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
580   else
581     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
582   fi
583 fi
584 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
585
586 # Prefer explicitly selected file to automatically selected ones.
587 if test -z "$CONFIG_SITE"; then
588   if test "x$prefix" != xNONE; then
589     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
590   else
591     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
592   fi
593 fi
594 for ac_site_file in $CONFIG_SITE; do
595   if test -r "$ac_site_file"; then
596     echo "loading site script $ac_site_file"
597     . "$ac_site_file"
598   fi
599 done
600
601
602 ac_ext=c
603 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
604 ac_cpp='$CPP $CPPFLAGS'
605 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
606 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
607 cross_compiling=$ac_cv_prog_cc_cross
608
609 ac_exeext=
610 ac_objext=o
611 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
612   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
613   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614     ac_n= ac_c='
615 ' ac_t='        '
616   else
617     ac_n=-n ac_c= ac_t=
618   fi
619 else
620   ac_n= ac_c='\c' ac_t=
621 fi
622
623 ac_aux_dir=
624 for ac_dir in build $srcdir/build; do
625   if test -f $ac_dir/install-sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install-sh -c"
628     break
629   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
637 fi
638 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
639 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
640 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
641
642 OL_VERSION=`cat $ac_aux_dir/version`
643 if test -z "$OL_VERSION"; then
644         { echo "configure: error: could not determine version" 1>&2; exit 1; }
645 fi
646
647
648 echo $ac_n "checking host system type""... $ac_c" 1>&6
649 echo "configure:650: checking host system type" >&5
650 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
651
652 # Make sure we can run config.sub.
653   if $ac_config_sub sun4 >/dev/null 2>&1; then :
654     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
655   fi
656
657   ac_cv_host_alias=$host
658   case "$ac_cv_host_alias" in
659   NONE)
660     case $nonopt in
661     NONE)
662       if ac_cv_host_alias=`$ac_config_guess`; then :
663       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
664       fi ;;
665     *) ac_cv_host_alias=$nonopt ;;
666     esac ;;
667   esac
668
669   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
670   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
671   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
672   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
673 else
674   echo $ac_n "(cached) $ac_c" 1>&6
675 fi
676
677 echo "$ac_t""$ac_cv_host" 1>&6
678
679 host=$ac_cv_host
680 host_alias=$ac_cv_host_alias
681 host_cpu=$ac_cv_host_cpu
682 host_vendor=$ac_cv_host_vendor
683 host_os=$ac_cv_host_os
684
685
686
687
688
689 echo $ac_n "checking target system type""... $ac_c" 1>&6
690 echo "configure:691: checking target system type" >&5
691 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
692
693 # Make sure we can run config.sub.
694   if $ac_config_sub sun4 >/dev/null 2>&1; then :
695     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
696   fi
697
698   ac_cv_target_alias=$target
699   case "$ac_cv_target_alias" in
700   NONE)
701     case $nonopt in
702     NONE)
703       ac_cv_target_alias=$host_alias ;;
704
705     *) ac_cv_target_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
710   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_target" 1>&6
718
719 target=$ac_cv_target
720 target_alias=$ac_cv_target_alias
721 target_cpu=$ac_cv_target_cpu
722 target_vendor=$ac_cv_target_vendor
723 target_os=$ac_cv_target_os
724
725
726
727
728
729 echo $ac_n "checking build system type""... $ac_c" 1>&6
730 echo "configure:731: checking build system type" >&5
731 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_build_alias=$build
739   case "$ac_cv_build_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_build_alias=$host_alias ;;
744
745     *) ac_cv_build_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
750   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_build" 1>&6
758
759 build=$ac_cv_build
760 build_alias=$ac_cv_build_alias
761 build_cpu=$ac_cv_build_cpu
762 build_vendor=$ac_cv_build_vendor
763 build_os=$ac_cv_build_os
764
765
766
767
768
769 # Do some error checking and defaulting for the host and target type.
770 # The inputs are:
771 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
772 #
773 # The rules are:
774 # 1. You are not allowed to specify --host, --target, and nonopt at the
775 #    same time.
776 # 2. Host defaults to nonopt.
777 # 3. If nonopt is not specified, then host defaults to the current host,
778 #    as determined by config.guess.
779 # 4. Target and build default to nonopt.
780 # 5. If nonopt is not specified, then target and build default to host.
781
782 # The aliases save the names the user supplied, while $host etc.
783 # will get canonicalized.
784 case $host---$target---$nonopt in
785 NONE---*---* | *---NONE---* | *---*---NONE) ;;
786 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
787 esac
788
789 test "$host_alias" != "$target_alias" &&
790   test "$program_prefix$program_suffix$program_transform_name" = \
791     NONENONEs,x,x, &&
792   program_prefix=${target_alias}-
793
794
795 # Find a good install program.  We prefer a C program (faster),
796 # so one script is as good as another.  But avoid the broken or
797 # incompatible versions:
798 # SysV /etc/install, /usr/sbin/install
799 # SunOS /usr/etc/install
800 # IRIX /sbin/install
801 # AIX /bin/install
802 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
803 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
804 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
805 # ./install, which can be erroneously created by make from ./install.sh.
806 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
807 echo "configure:808: checking for a BSD compatible install" >&5
808 if test -z "$INSTALL"; then
809 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
813   for ac_dir in $PATH; do
814     # Account for people who put trailing slashes in PATH elements.
815     case "$ac_dir/" in
816     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
817     *)
818       # OSF1 and SCO ODT 3.0 have their own names for install.
819       # Don't use installbsd from OSF since it installs stuff as root
820       # by default.
821       for ac_prog in ginstall scoinst install; do
822         if test -f $ac_dir/$ac_prog; then
823           if test $ac_prog = install &&
824             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
825             # AIX install.  It has an incompatible calling convention.
826             :
827           elif test $ac_prog = install &&
828             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
829             # program-specific install script used by HP pwplus--don't use.
830             :
831           else
832             ac_cv_path_install="$ac_dir/$ac_prog -c"
833             break 2
834           fi
835         fi
836       done
837       ;;
838     esac
839   done
840   IFS="$ac_save_IFS"
841
842 fi
843   if test "${ac_cv_path_install+set}" = set; then
844     INSTALL="$ac_cv_path_install"
845   else
846     # As a last resort, use the slow shell script.  We don't cache a
847     # path for INSTALL within a source directory, because that will
848     # break other packages using the cache if that directory is
849     # removed, or if the path is relative.
850     INSTALL="$ac_install_sh"
851   fi
852 fi
853 echo "$ac_t""$INSTALL" 1>&6
854
855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
856 # It thinks the first close brace ends the variable substitution.
857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
858
859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
860
861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
862
863 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
864 echo "configure:865: checking whether build environment is sane" >&5
865 # Just in case
866 sleep 1
867 echo timestamp > conftestfile
868 # Do `set' in a subshell so we don't clobber the current shell's
869 # arguments.  Must try -L first in case configure is actually a
870 # symlink; some systems play weird games with the mod time of symlinks
871 # (eg FreeBSD returns the mod time of the symlink's containing
872 # directory).
873 if (
874    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
875    if test "$*" = "X"; then
876       # -L didn't work.
877       set X `ls -t $srcdir/configure conftestfile`
878    fi
879    if test "$*" != "X $srcdir/configure conftestfile" \
880       && test "$*" != "X conftestfile $srcdir/configure"; then
881
882       # If neither matched, then we have a broken ls.  This can happen
883       # if, for instance, CONFIG_SHELL is bash and it inherits a
884       # broken ls alias from the environment.  This has actually
885       # happened.  Such a system could not be considered "sane".
886       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
887 alias in your environment" 1>&2; exit 1; }
888    fi
889
890    test "$2" = conftestfile
891    )
892 then
893    # Ok.
894    :
895 else
896    { echo "configure: error: newly created file is older than distributed files!
897 Check your system clock" 1>&2; exit 1; }
898 fi
899 rm -f conftest*
900 echo "$ac_t""yes" 1>&6
901 if test "$program_transform_name" = s,x,x,; then
902   program_transform_name=
903 else
904   # Double any \ or $.  echo might interpret backslashes.
905   cat <<\EOF_SED > conftestsed
906 s,\\,\\\\,g; s,\$,$$,g
907 EOF_SED
908   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
909   rm -f conftestsed
910 fi
911 test "$program_prefix" != NONE &&
912   program_transform_name="s,^,${program_prefix},;$program_transform_name"
913 # Use a double $ so make ignores it.
914 test "$program_suffix" != NONE &&
915   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
916
917 # sed with no file args requires a program.
918 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
919
920 for ac_prog in mawk gawk nawk awk
921 do
922 # Extract the first word of "$ac_prog", so it can be a program name with args.
923 set dummy $ac_prog; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$AWK"; then
930   ac_cv_prog_AWK="$AWK" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
933   ac_dummy="$PATH"
934   for ac_dir in $ac_dummy; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       ac_cv_prog_AWK="$ac_prog"
938       break
939     fi
940   done
941   IFS="$ac_save_ifs"
942 fi
943 fi
944 AWK="$ac_cv_prog_AWK"
945 if test -n "$AWK"; then
946   echo "$ac_t""$AWK" 1>&6
947 else
948   echo "$ac_t""no" 1>&6
949 fi
950
951 test -n "$AWK" && break
952 done
953
954 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
955 echo "configure:956: checking whether ${MAKE-make} sets \${MAKE}" >&5
956 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
957 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   cat > conftestmake <<\EOF
961 all:
962         @echo 'ac_maketemp="${MAKE}"'
963 EOF
964 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
965 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
966 if test -n "$ac_maketemp"; then
967   eval ac_cv_prog_make_${ac_make}_set=yes
968 else
969   eval ac_cv_prog_make_${ac_make}_set=no
970 fi
971 rm -f conftestmake
972 fi
973 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
974   echo "$ac_t""yes" 1>&6
975   SET_MAKE=
976 else
977   echo "$ac_t""no" 1>&6
978   SET_MAKE="MAKE=${MAKE-make}"
979 fi
980
981
982
983 PACKAGE=OpenLDAP
984
985 VERSION=$OL_VERSION
986
987 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
988   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
989 fi
990
991
992
993 missing_dir=`cd $ac_aux_dir && pwd`
994 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
995 echo "configure:996: checking for working aclocal" >&5
996 # Run test in a subshell; some versions of sh will print an error if
997 # an executable is not found, even if stderr is redirected.
998 # Redirect stdin to placate older versions of autoconf.  Sigh.
999 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1000    ACLOCAL=aclocal
1001    echo "$ac_t""found" 1>&6
1002 else
1003    ACLOCAL="$missing_dir/missing aclocal"
1004    echo "$ac_t""missing" 1>&6
1005 fi
1006
1007 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1008 echo "configure:1009: checking for working autoconf" >&5
1009 # Run test in a subshell; some versions of sh will print an error if
1010 # an executable is not found, even if stderr is redirected.
1011 # Redirect stdin to placate older versions of autoconf.  Sigh.
1012 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1013    AUTOCONF=autoconf
1014    echo "$ac_t""found" 1>&6
1015 else
1016    AUTOCONF="$missing_dir/missing autoconf"
1017    echo "$ac_t""missing" 1>&6
1018 fi
1019
1020 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working automake" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (automake --version) < /dev/null > /dev/null 2>&1; then
1026    AUTOMAKE=automake
1027    echo "$ac_t""found" 1>&6
1028 else
1029    AUTOMAKE="$missing_dir/missing automake"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoheader" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOHEADER=autoheader
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOHEADER="$missing_dir/missing autoheader"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working makeinfo" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1052    MAKEINFO=makeinfo
1053    echo "$ac_t""found" 1>&6
1054 else
1055    MAKEINFO="$missing_dir/missing makeinfo"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 install_sh="$missing_dir/install-sh"
1060 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1061
1062 for ac_prog in gnutar gtar tar
1063 do
1064 # Extract the first word of "$ac_prog", so it can be a program name with args.
1065 set dummy $ac_prog; ac_word=$2
1066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067 echo "configure:1068: checking for $ac_word" >&5
1068 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071   if test -n "$AMTAR"; then
1072   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1073 else
1074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1075   ac_dummy="$PATH"
1076   for ac_dir in $ac_dummy; do
1077     test -z "$ac_dir" && ac_dir=.
1078     if test -f $ac_dir/$ac_word; then
1079       ac_cv_prog_AMTAR="$ac_prog"
1080       break
1081     fi
1082   done
1083   IFS="$ac_save_ifs"
1084 fi
1085 fi
1086 AMTAR="$ac_cv_prog_AMTAR"
1087 if test -n "$AMTAR"; then
1088   echo "$ac_t""$AMTAR" 1>&6
1089 else
1090   echo "$ac_t""no" 1>&6
1091 fi
1092
1093 test -n "$AMTAR" && break
1094 done
1095
1096
1097 AMTARFLAGS=
1098 if test -n "$AMTAR"; then
1099   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1100         AMTARFLAGS=o
1101   fi
1102 fi
1103
1104
1105
1106 cat >> confdefs.h <<EOF
1107 #define OPENLDAP_PACKAGE "$PACKAGE"
1108 EOF
1109
1110 cat >> confdefs.h <<EOF
1111 #define OPENLDAP_VERSION "$VERSION"
1112 EOF
1113
1114
1115
1116
1117 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1118 echo "configure:1119: checking configure arguments" >&5
1119
1120
1121 top_builddir=`pwd`
1122
1123 ldap_subdir="openldap"
1124
1125 # Check whether --with-subdir or --without-subdir was given.
1126 if test "${with_subdir+set}" = set; then
1127   withval="$with_subdir"
1128   
1129         if test "$withval" = "no"; then
1130                 ldap_subdir=""
1131         elif test "$withval" != "yes"; then
1132                 ldap_subdir="$withval"
1133         fi
1134
1135 fi
1136
1137
1138 # OpenLDAP --enable-debug
1139         # Check whether --enable-debug or --disable-debug was given.
1140 if test "${enable_debug+set}" = set; then
1141   enableval="$enable_debug"
1142   
1143         ol_arg=invalid
1144         for ol_val in auto yes no ; do
1145                 if test "$enableval" = "$ol_val" ; then
1146                         ol_arg="$ol_val"
1147                 fi
1148         done
1149         if test "$ol_arg" = "invalid" ; then
1150                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1151         fi
1152         ol_enable_debug="$ol_arg"
1153
1154 else
1155         ol_enable_debug="yes"
1156 fi
1157 # end --enable-debug
1158 # OpenLDAP --enable-syslog
1159         # Check whether --enable-syslog or --disable-syslog was given.
1160 if test "${enable_syslog+set}" = set; then
1161   enableval="$enable_syslog"
1162   
1163         ol_arg=invalid
1164         for ol_val in auto yes no ; do
1165                 if test "$enableval" = "$ol_val" ; then
1166                         ol_arg="$ol_val"
1167                 fi
1168         done
1169         if test "$ol_arg" = "invalid" ; then
1170                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1171         fi
1172         ol_enable_syslog="$ol_arg"
1173
1174 else
1175         ol_enable_syslog="auto"
1176 fi
1177 # end --enable-syslog
1178 # OpenLDAP --enable-proctitle
1179         # Check whether --enable-proctitle or --disable-proctitle was given.
1180 if test "${enable_proctitle+set}" = set; then
1181   enableval="$enable_proctitle"
1182   
1183         ol_arg=invalid
1184         for ol_val in auto yes no ; do
1185                 if test "$enableval" = "$ol_val" ; then
1186                         ol_arg="$ol_val"
1187                 fi
1188         done
1189         if test "$ol_arg" = "invalid" ; then
1190                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1191         fi
1192         ol_enable_proctitle="$ol_arg"
1193
1194 else
1195         ol_enable_proctitle="yes"
1196 fi
1197 # end --enable-proctitle
1198 # OpenLDAP --enable-cache
1199         # Check whether --enable-cache or --disable-cache was given.
1200 if test "${enable_cache+set}" = set; then
1201   enableval="$enable_cache"
1202   
1203         ol_arg=invalid
1204         for ol_val in auto yes no ; do
1205                 if test "$enableval" = "$ol_val" ; then
1206                         ol_arg="$ol_val"
1207                 fi
1208         done
1209         if test "$ol_arg" = "invalid" ; then
1210                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1211         fi
1212         ol_enable_cache="$ol_arg"
1213
1214 else
1215         ol_enable_cache="yes"
1216 fi
1217 # end --enable-cache
1218 # OpenLDAP --enable-dns
1219         # Check whether --enable-dns or --disable-dns was given.
1220 if test "${enable_dns+set}" = set; then
1221   enableval="$enable_dns"
1222   
1223         ol_arg=invalid
1224         for ol_val in auto yes no ; do
1225                 if test "$enableval" = "$ol_val" ; then
1226                         ol_arg="$ol_val"
1227                 fi
1228         done
1229         if test "$ol_arg" = "invalid" ; then
1230                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1231         fi
1232         ol_enable_dns="$ol_arg"
1233
1234 else
1235         ol_enable_dns="no"
1236 fi
1237 # end --enable-dns
1238 # OpenLDAP --enable-referrals
1239         # Check whether --enable-referrals or --disable-referrals was given.
1240 if test "${enable_referrals+set}" = set; then
1241   enableval="$enable_referrals"
1242   
1243         ol_arg=invalid
1244         for ol_val in auto yes no ; do
1245                 if test "$enableval" = "$ol_val" ; then
1246                         ol_arg="$ol_val"
1247                 fi
1248         done
1249         if test "$ol_arg" = "invalid" ; then
1250                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1251         fi
1252         ol_enable_referrals="$ol_arg"
1253
1254 else
1255         ol_enable_referrals="yes"
1256 fi
1257 # end --enable-referrals
1258 # OpenLDAP --enable-cldap
1259         # Check whether --enable-cldap or --disable-cldap was given.
1260 if test "${enable_cldap+set}" = set; then
1261   enableval="$enable_cldap"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no ; do
1265                 if test "$enableval" = "$ol_val" ; then
1266                         ol_arg="$ol_val"
1267                 fi
1268         done
1269         if test "$ol_arg" = "invalid" ; then
1270                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1271         fi
1272         ol_enable_cldap="$ol_arg"
1273
1274 else
1275         ol_enable_cldap="no"
1276 fi
1277 # end --enable-cldap
1278 # OpenLDAP --enable-x_compile
1279         # Check whether --enable-x_compile or --disable-x_compile was given.
1280 if test "${enable_x_compile+set}" = set; then
1281   enableval="$enable_x_compile"
1282   
1283         ol_arg=invalid
1284         for ol_val in yes no ; do
1285                 if test "$enableval" = "$ol_val" ; then
1286                         ol_arg="$ol_val"
1287                 fi
1288         done
1289         if test "$ol_arg" = "invalid" ; then
1290                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1291         fi
1292         ol_enable_x_compile="$ol_arg"
1293
1294 else
1295         ol_enable_x_compile="no"
1296 fi
1297 # end --enable-x_compile
1298
1299 # OpenLDAP --enable-dmalloc
1300         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1301 if test "${enable_dmalloc+set}" = set; then
1302   enableval="$enable_dmalloc"
1303   
1304         ol_arg=invalid
1305         for ol_val in auto yes no ; do
1306                 if test "$enableval" = "$ol_val" ; then
1307                         ol_arg="$ol_val"
1308                 fi
1309         done
1310         if test "$ol_arg" = "invalid" ; then
1311                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1312         fi
1313         ol_enable_dmalloc="$ol_arg"
1314
1315 else
1316         ol_enable_dmalloc="no"
1317 fi
1318 # end --enable-dmalloc
1319
1320 # OpenLDAP --with-cyrus_sasl
1321         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1322 if test "${with_cyrus_sasl+set}" = set; then
1323   withval="$with_cyrus_sasl"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no  ; do
1327                 if test "$withval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1333         fi
1334         ol_with_cyrus_sasl="$ol_arg"
1335
1336 else
1337         ol_with_cyrus_sasl="auto"
1338 fi
1339 # end --with-cyrus_sasl
1340
1341 # OpenLDAP --with-fetch
1342         # Check whether --with-fetch or --without-fetch was given.
1343 if test "${with_fetch+set}" = set; then
1344   withval="$with_fetch"
1345   
1346         ol_arg=invalid
1347         for ol_val in auto yes no  ; do
1348                 if test "$withval" = "$ol_val" ; then
1349                         ol_arg="$ol_val"
1350                 fi
1351         done
1352         if test "$ol_arg" = "invalid" ; then
1353                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1354         fi
1355         ol_with_fetch="$ol_arg"
1356
1357 else
1358         ol_with_fetch="auto"
1359 fi
1360 # end --with-fetch
1361
1362 # OpenLDAP --with-kerberos
1363         # Check whether --with-kerberos or --without-kerberos was given.
1364 if test "${with_kerberos+set}" = set; then
1365   withval="$with_kerberos"
1366   
1367         ol_arg=invalid
1368         for ol_val in auto k5 k4 afs yes no ; do
1369                 if test "$withval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1375         fi
1376         ol_with_kerberos="$ol_arg"
1377
1378 else
1379         ol_with_kerberos="auto"
1380 fi
1381 # end --with-kerberos
1382
1383 # OpenLDAP --with-readline
1384         # Check whether --with-readline or --without-readline was given.
1385 if test "${with_readline+set}" = set; then
1386   withval="$with_readline"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no  ; do
1390                 if test "$withval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1396         fi
1397         ol_with_readline="$ol_arg"
1398
1399 else
1400         ol_with_readline="auto"
1401 fi
1402 # end --with-readline
1403
1404 # OpenLDAP --with-threads
1405         # Check whether --with-threads or --without-threads was given.
1406 if test "${with_threads+set}" = set; then
1407   withval="$with_threads"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto posix mach lwp yes no manual  ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1417         fi
1418         ol_with_threads="$ol_arg"
1419
1420 else
1421         ol_with_threads="auto"
1422 fi
1423 # end --with-threads
1424
1425 # OpenLDAP --with-tls
1426         # Check whether --with-tls or --without-tls was given.
1427 if test "${with_tls+set}" = set; then
1428   withval="$with_tls"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto ssleay openssl yes no  ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1438         fi
1439         ol_with_tls="$ol_arg"
1440
1441 else
1442         ol_with_tls="auto"
1443 fi
1444 # end --with-tls
1445
1446 # OpenLDAP --with-yielding_select
1447         # Check whether --with-yielding_select or --without-yielding_select was given.
1448 if test "${with_yielding_select+set}" = set; then
1449   withval="$with_yielding_select"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no manual  ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1459         fi
1460         ol_with_yielding_select="$ol_arg"
1461
1462 else
1463         ol_with_yielding_select="auto"
1464 fi
1465 # end --with-yielding_select
1466
1467
1468
1469 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1470 if test "${with_xxldapdoptions+set}" = set; then
1471   withval="$with_xxldapdoptions"
1472   :
1473 fi
1474
1475 # OpenLDAP --enable-ldapd
1476         # Check whether --enable-ldapd or --disable-ldapd was given.
1477 if test "${enable_ldapd+set}" = set; then
1478   enableval="$enable_ldapd"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no ; do
1482                 if test "$enableval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1488         fi
1489         ol_enable_ldapd="$ol_arg"
1490
1491 else
1492         ol_enable_ldapd="no"
1493 fi
1494 # end --enable-ldapd
1495
1496 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1497 if test "${with_xxslapdoptions+set}" = set; then
1498   withval="$with_xxslapdoptions"
1499   :
1500 fi
1501
1502 # OpenLDAP --enable-slapd
1503         # Check whether --enable-slapd or --disable-slapd was given.
1504 if test "${enable_slapd+set}" = set; then
1505   enableval="$enable_slapd"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1515         fi
1516         ol_enable_slapd="$ol_arg"
1517
1518 else
1519         ol_enable_slapd="yes"
1520 fi
1521 # end --enable-slapd
1522 # OpenLDAP --enable-cleartext
1523         # Check whether --enable-cleartext or --disable-cleartext was given.
1524 if test "${enable_cleartext+set}" = set; then
1525   enableval="$enable_cleartext"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no ; do
1529                 if test "$enableval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1535         fi
1536         ol_enable_cleartext="$ol_arg"
1537
1538 else
1539         ol_enable_cleartext="yes"
1540 fi
1541 # end --enable-cleartext
1542 # OpenLDAP --enable-crypt
1543         # Check whether --enable-crypt or --disable-crypt was given.
1544 if test "${enable_crypt+set}" = set; then
1545   enableval="$enable_crypt"
1546   
1547         ol_arg=invalid
1548         for ol_val in auto yes no ; do
1549                 if test "$enableval" = "$ol_val" ; then
1550                         ol_arg="$ol_val"
1551                 fi
1552         done
1553         if test "$ol_arg" = "invalid" ; then
1554                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1555         fi
1556         ol_enable_crypt="$ol_arg"
1557
1558 else
1559         ol_enable_crypt="auto"
1560 fi
1561 # end --enable-crypt
1562 # OpenLDAP --enable-modules
1563         # Check whether --enable-modules or --disable-modules was given.
1564 if test "${enable_modules+set}" = set; then
1565   enableval="$enable_modules"
1566   
1567         ol_arg=invalid
1568         for ol_val in auto yes no ; do
1569                 if test "$enableval" = "$ol_val" ; then
1570                         ol_arg="$ol_val"
1571                 fi
1572         done
1573         if test "$ol_arg" = "invalid" ; then
1574                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1575         fi
1576         ol_enable_modules="$ol_arg"
1577
1578 else
1579         ol_enable_modules="no"
1580 fi
1581 # end --enable-modules
1582 # OpenLDAP --enable-multimaster
1583         # Check whether --enable-multimaster or --disable-multimaster was given.
1584 if test "${enable_multimaster+set}" = set; then
1585   enableval="$enable_multimaster"
1586   
1587         ol_arg=invalid
1588         for ol_val in auto yes no ; do
1589                 if test "$enableval" = "$ol_val" ; then
1590                         ol_arg="$ol_val"
1591                 fi
1592         done
1593         if test "$ol_arg" = "invalid" ; then
1594                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1595         fi
1596         ol_enable_multimaster="$ol_arg"
1597
1598 else
1599         ol_enable_multimaster="no"
1600 fi
1601 # end --enable-multimaster
1602 # OpenLDAP --enable-phonetic
1603         # Check whether --enable-phonetic or --disable-phonetic was given.
1604 if test "${enable_phonetic+set}" = set; then
1605   enableval="$enable_phonetic"
1606   
1607         ol_arg=invalid
1608         for ol_val in auto yes no ; do
1609                 if test "$enableval" = "$ol_val" ; then
1610                         ol_arg="$ol_val"
1611                 fi
1612         done
1613         if test "$ol_arg" = "invalid" ; then
1614                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1615         fi
1616         ol_enable_phonetic="$ol_arg"
1617
1618 else
1619         ol_enable_phonetic="no"
1620 fi
1621 # end --enable-phonetic
1622 # OpenLDAP --enable-quipu
1623         # Check whether --enable-quipu or --disable-quipu was given.
1624 if test "${enable_quipu+set}" = set; then
1625   enableval="$enable_quipu"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no ; do
1629                 if test "$enableval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1635         fi
1636         ol_enable_quipu="$ol_arg"
1637
1638 else
1639         ol_enable_quipu="no"
1640 fi
1641 # end --enable-quipu
1642 # OpenLDAP --enable-rlookups
1643         # Check whether --enable-rlookups or --disable-rlookups was given.
1644 if test "${enable_rlookups+set}" = set; then
1645   enableval="$enable_rlookups"
1646   
1647         ol_arg=invalid
1648         for ol_val in auto yes no ; do
1649                 if test "$enableval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1655         fi
1656         ol_enable_rlookups="$ol_arg"
1657
1658 else
1659         ol_enable_rlookups="auto"
1660 fi
1661 # end --enable-rlookups
1662 # OpenLDAP --enable-wrappers
1663         # Check whether --enable-wrappers or --disable-wrappers was given.
1664 if test "${enable_wrappers+set}" = set; then
1665   enableval="$enable_wrappers"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto yes no ; do
1669                 if test "$enableval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1675         fi
1676         ol_enable_wrappers="$ol_arg"
1677
1678 else
1679         ol_enable_wrappers="no"
1680 fi
1681 # end --enable-wrappers
1682
1683 # OpenLDAP --enable-bdb2
1684         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1685 if test "${enable_bdb2+set}" = set; then
1686   enableval="$enable_bdb2"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1696         fi
1697         ol_enable_bdb2="$ol_arg"
1698
1699 else
1700         ol_enable_bdb2="no"
1701 fi
1702 # end --enable-bdb2
1703 # OpenLDAP --with-bdb2_module
1704         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1705 if test "${with_bdb2_module+set}" = set; then
1706   withval="$with_bdb2_module"
1707   
1708         ol_arg=invalid
1709         for ol_val in static dynamic ; do
1710                 if test "$withval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1716         fi
1717         ol_with_bdb2_module="$ol_arg"
1718
1719 else
1720         ol_with_bdb2_module="static"
1721 fi
1722 # end --with-bdb2_module
1723
1724 # OpenLDAP --enable-ldap
1725         # Check whether --enable-ldap or --disable-ldap was given.
1726 if test "${enable_ldap+set}" = set; then
1727   enableval="$enable_ldap"
1728   
1729         ol_arg=invalid
1730         for ol_val in auto yes no ; do
1731                 if test "$enableval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1737         fi
1738         ol_enable_ldap="$ol_arg"
1739
1740 else
1741         ol_enable_ldap="no"
1742 fi
1743 # end --enable-ldap
1744 # OpenLDAP --with-ldap_module
1745         # Check whether --with-ldap_module or --without-ldap_module was given.
1746 if test "${with_ldap_module+set}" = set; then
1747   withval="$with_ldap_module"
1748   
1749         ol_arg=invalid
1750         for ol_val in static dynamic ; do
1751                 if test "$withval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1757         fi
1758         ol_with_ldap_module="$ol_arg"
1759
1760 else
1761         ol_with_ldap_module="static"
1762 fi
1763 # end --with-ldap_module
1764
1765 # OpenLDAP --enable-ldbm
1766         # Check whether --enable-ldbm or --disable-ldbm was given.
1767 if test "${enable_ldbm+set}" = set; then
1768   enableval="$enable_ldbm"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1778         fi
1779         ol_enable_ldbm="$ol_arg"
1780
1781 else
1782         ol_enable_ldbm="yes"
1783 fi
1784 # end --enable-ldbm
1785 # OpenLDAP --with-ldbm_module
1786         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1787 if test "${with_ldbm_module+set}" = set; then
1788   withval="$with_ldbm_module"
1789   
1790         ol_arg=invalid
1791         for ol_val in static dynamic ; do
1792                 if test "$withval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1798         fi
1799         ol_with_ldbm_module="$ol_arg"
1800
1801 else
1802         ol_with_ldbm_module="static"
1803 fi
1804 # end --with-ldbm_module
1805
1806 # OpenLDAP --with-ldbm_api
1807         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1808 if test "${with_ldbm_api+set}" = set; then
1809   withval="$with_ldbm_api"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1813                 if test "$withval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1819         fi
1820         ol_with_ldbm_api="$ol_arg"
1821
1822 else
1823         ol_with_ldbm_api="auto"
1824 fi
1825 # end --with-ldbm_api
1826
1827 # OpenLDAP --with-ldbm_type
1828         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1829 if test "${with_ldbm_type+set}" = set; then
1830   withval="$with_ldbm_type"
1831   
1832         ol_arg=invalid
1833         for ol_val in auto btree hash ; do
1834                 if test "$withval" = "$ol_val" ; then
1835                         ol_arg="$ol_val"
1836                 fi
1837         done
1838         if test "$ol_arg" = "invalid" ; then
1839                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1840         fi
1841         ol_with_ldbm_type="$ol_arg"
1842
1843 else
1844         ol_with_ldbm_type="auto"
1845 fi
1846 # end --with-ldbm_type
1847
1848
1849 # OpenLDAP --enable-passwd
1850         # Check whether --enable-passwd or --disable-passwd was given.
1851 if test "${enable_passwd+set}" = set; then
1852   enableval="$enable_passwd"
1853   
1854         ol_arg=invalid
1855         for ol_val in auto yes no ; do
1856                 if test "$enableval" = "$ol_val" ; then
1857                         ol_arg="$ol_val"
1858                 fi
1859         done
1860         if test "$ol_arg" = "invalid" ; then
1861                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1862         fi
1863         ol_enable_passwd="$ol_arg"
1864
1865 else
1866         ol_enable_passwd="no"
1867 fi
1868 # end --enable-passwd
1869 # OpenLDAP --with-passwd_module
1870         # Check whether --with-passwd_module or --without-passwd_module was given.
1871 if test "${with_passwd_module+set}" = set; then
1872   withval="$with_passwd_module"
1873   
1874         ol_arg=invalid
1875         for ol_val in static dynamic ; do
1876                 if test "$withval" = "$ol_val" ; then
1877                         ol_arg="$ol_val"
1878                 fi
1879         done
1880         if test "$ol_arg" = "invalid" ; then
1881                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1882         fi
1883         ol_with_passwd_module="$ol_arg"
1884
1885 else
1886         ol_with_passwd_module="static"
1887 fi
1888 # end --with-passwd_module
1889
1890 # OpenLDAP --enable-perl
1891         # Check whether --enable-perl or --disable-perl was given.
1892 if test "${enable_perl+set}" = set; then
1893   enableval="$enable_perl"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1903         fi
1904         ol_enable_perl="$ol_arg"
1905
1906 else
1907         ol_enable_perl="no"
1908 fi
1909 # end --enable-perl
1910 # OpenLDAP --with-perl_module
1911         # Check whether --with-perl_module or --without-perl_module was given.
1912 if test "${with_perl_module+set}" = set; then
1913   withval="$with_perl_module"
1914   
1915         ol_arg=invalid
1916         for ol_val in static dynamic ; do
1917                 if test "$withval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1923         fi
1924         ol_with_perl_module="$ol_arg"
1925
1926 else
1927         ol_with_perl_module="static"
1928 fi
1929 # end --with-perl_module
1930
1931 # OpenLDAP --enable-shell
1932         # Check whether --enable-shell or --disable-shell was given.
1933 if test "${enable_shell+set}" = set; then
1934   enableval="$enable_shell"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1944         fi
1945         ol_enable_shell="$ol_arg"
1946
1947 else
1948         ol_enable_shell="no"
1949 fi
1950 # end --enable-shell
1951 # OpenLDAP --with-shell_module
1952         # Check whether --with-shell_module or --without-shell_module was given.
1953 if test "${with_shell_module+set}" = set; then
1954   withval="$with_shell_module"
1955   
1956         ol_arg=invalid
1957         for ol_val in static dynamic ; do
1958                 if test "$withval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1964         fi
1965         ol_with_shell_module="$ol_arg"
1966
1967 else
1968         ol_with_shell_module="static"
1969 fi
1970 # end --with-shell_module
1971
1972 # OpenLDAP --enable-tcl
1973         # Check whether --enable-tcl or --disable-tcl was given.
1974 if test "${enable_tcl+set}" = set; then
1975   enableval="$enable_tcl"
1976   
1977         ol_arg=invalid
1978         for ol_val in auto yes no ; do
1979                 if test "$enableval" = "$ol_val" ; then
1980                         ol_arg="$ol_val"
1981                 fi
1982         done
1983         if test "$ol_arg" = "invalid" ; then
1984                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1985         fi
1986         ol_enable_tcl="$ol_arg"
1987
1988 else
1989         ol_enable_tcl="no"
1990 fi
1991 # end --enable-tcl
1992 # OpenLDAP --with-tcl_module
1993         # Check whether --with-tcl_module or --without-tcl_module was given.
1994 if test "${with_tcl_module+set}" = set; then
1995   withval="$with_tcl_module"
1996   
1997         ol_arg=invalid
1998         for ol_val in static dynamic ; do
1999                 if test "$withval" = "$ol_val" ; then
2000                         ol_arg="$ol_val"
2001                 fi
2002         done
2003         if test "$ol_arg" = "invalid" ; then
2004                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2005         fi
2006         ol_with_tcl_module="$ol_arg"
2007
2008 else
2009         ol_with_tcl_module="static"
2010 fi
2011 # end --with-tcl_module
2012
2013
2014 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2015 if test "${with_xxslurpdoptions+set}" = set; then
2016   withval="$with_xxslurpdoptions"
2017   :
2018 fi
2019
2020 # OpenLDAP --enable-slurpd
2021         # Check whether --enable-slurpd or --disable-slurpd was given.
2022 if test "${enable_slurpd+set}" = set; then
2023   enableval="$enable_slurpd"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2033         fi
2034         ol_enable_slurpd="$ol_arg"
2035
2036 else
2037         ol_enable_slurpd="auto"
2038 fi
2039 # end --enable-slurpd
2040
2041 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2042 if test "${with_xxliboptions+set}" = set; then
2043   withval="$with_xxliboptions"
2044   :
2045 fi
2046
2047 # Check whether --enable-static or --disable-static was given.
2048 if test "${enable_static+set}" = set; then
2049   enableval="$enable_static"
2050   p=${PACKAGE-default}
2051 case "$enableval" in
2052 yes) enable_static=yes ;;
2053 no) enable_static=no ;;
2054 *)
2055   enable_static=no
2056   # Look at the argument we got.  We use all the common list separators.
2057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2058   for pkg in $enableval; do
2059     if test "X$pkg" = "X$p"; then
2060       enable_static=yes
2061     fi
2062   done
2063   IFS="$ac_save_ifs"
2064   ;;
2065 esac
2066 else
2067   enable_static=yes
2068 fi
2069
2070 # Check whether --enable-shared or --disable-shared was given.
2071 if test "${enable_shared+set}" = set; then
2072   enableval="$enable_shared"
2073   p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_shared=yes ;;
2076 no) enable_shared=no ;;
2077 *)
2078   enable_shared=no
2079   # Look at the argument we got.  We use all the common list separators.
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081   for pkg in $enableval; do
2082     if test "X$pkg" = "X$p"; then
2083       enable_shared=yes
2084     fi
2085   done
2086   IFS="$ac_save_ifs"
2087   ;;
2088 esac
2089 else
2090   enable_shared=yes
2091 fi
2092
2093
2094 # validate options
2095 if test $ol_enable_dns = yes ; then
2096         if test $ol_enable_referrals = no ; then
2097                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2098         fi
2099         if test $ol_enable_referrals = auto ; then
2100                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2101                 ol_enable_referrals=yes
2102         fi
2103 fi
2104
2105 if test $ol_enable_slapd = no ; then
2106                 if test $ol_enable_bdb2 = yes ; then
2107                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2108         fi
2109         if test $ol_enable_ldap = yes ; then
2110                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2111         fi
2112         if test $ol_enable_ldbm = yes ; then
2113                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2114         fi
2115         if test $ol_enable_passwd = yes ; then
2116                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2117         fi
2118         if test $ol_enable_perl = yes ; then
2119                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2120         fi
2121         if test $ol_enable_shell = yes ; then
2122                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2123         fi
2124         if test $ol_enable_tcl = yes ; then
2125                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2126         fi
2127         if test $ol_enable_modules = yes ; then
2128                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2129         fi
2130         if test $ol_enable_multimaster = yes ; then
2131                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2132         fi
2133         if test $ol_enable_wrappers = yes ; then
2134                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2135         fi
2136         if test $ol_enable_phonetic = yes ; then
2137                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2138         fi
2139         if test $ol_enable_quipu = yes ; then
2140                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2141         fi
2142         if test $ol_enable_rlookups = yes ; then
2143                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2144         fi
2145         if test $ol_with_ldbm_api != auto ; then
2146                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2147         fi
2148         if test $ol_with_ldbm_type != auto ; then
2149                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2150         fi
2151         if test $ol_with_bdb2_module != static ; then
2152                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2153         fi
2154         if test $ol_with_ldap_module != static ; then
2155                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2156         fi
2157         if test $ol_with_ldbm_module != static ; then
2158                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2159         fi
2160         if test $ol_with_passwd_module != static ; then
2161                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2162         fi
2163         if test $ol_with_perl_module != static ; then
2164                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2165         fi
2166         if test $ol_with_shell_module != static ; then
2167                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2168         fi
2169         if test $ol_with_tcl_module != static ; then
2170                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2171         fi
2172         if test $ol_enable_slurpd = yes ; then
2173                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2174         fi
2175
2176         # force settings to no
2177         ol_enable_bdb2=no
2178         ol_enable_ldap=no
2179         ol_enable_ldbm=no
2180         ol_enable_passwd=no
2181         ol_enable_perl=no
2182         ol_enable_shell=no
2183         ol_enable_tcl=no
2184
2185         ol_enable_modules=no
2186         ol_enable_multimaster=no
2187         ol_enable_phonetic=no
2188         ol_enable_quipu=no
2189         ol_enable_rlookups=no
2190         ol_enable_wrappers=no
2191
2192         ol_with_ldbm_api=no
2193         ol_with_ldbm_type=no
2194
2195         ol_with_bdb2_module=static
2196         ol_with_ldap_module=static
2197         ol_with_ldbm_module=static
2198         ol_with_passwd_module=static
2199         ol_with_perl_module=static
2200         ol_with_shell_module=static
2201         ol_with_tcl_module=static
2202
2203         ol_enable_slurpd=no
2204
2205 elif test $ol_enable_ldbm = no ; then
2206         
2207         if test $ol_with_ldbm_api != auto ; then
2208                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2209         fi
2210
2211         if test $ol_with_ldbm_type != auto ; then
2212                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2213         fi
2214
2215         if test $ol_with_ldbm_module != static ; then
2216                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2217         fi
2218
2219         if test $ol_enable_bdb2 = yes ; then
2220                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2221         fi
2222
2223         if test $ol_enable_modules != yes -a \
2224                 $ol_enable_ldap = no -a \
2225                 $ol_enable_passwd = no -a \
2226                 $ol_enable_perl = no -a \
2227                 $ol_enable_shell = no -a \
2228                 $ol_enable_tcl = no ; then
2229                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2230         fi
2231
2232         ol_with_ldbm_api=no
2233         ol_with_ldbm_type=no
2234         ol_with_ldbm_module=static
2235
2236 elif test $ol_enable_bdb2 = yes ; then
2237         
2238         if test $ol_with_ldbm_api != auto -a \
2239                 $ol_with_ldbm_api != db2 ; then
2240                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2241         fi
2242
2243         ol_with_ldbm_api=db2
2244
2245 else
2246         
2247         if test $ol_enable_bdb2 != no ; then
2248                 if test $ol_with_ldbm_api != auto -a \
2249                         $ol_with_ldbm_api != db2 ; then
2250                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2251                         ol_enable_bdb2=no
2252                 fi
2253         fi
2254
2255         if test $ol_with_ldbm_api = gdbm -a \
2256                 $ol_with_ldbm_type = btree ; then
2257                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2258         fi
2259         if test $ol_with_ldbm_api = mdbm -a \
2260                 $ol_with_ldbm_type = btree ; then
2261                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2262         fi
2263         if test $ol_with_ldbm_api = ndbm -a \
2264                 $ol_with_ldbm_type = btree ; then
2265                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2266         fi
2267 fi
2268
2269 if test $ol_enable_slurpd = yes ; then
2270                 if test $ol_with_threads = no ; then
2271                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2272         fi
2273 fi
2274
2275 echo "$ac_t""done" 1>&6
2276
2277 ## Initialize vars
2278 LDAP_LIBS=
2279 LDIF_LIBS=
2280 LDBM_LIBS=
2281 LTHREAD_LIBS=
2282 LUTIL_LIBS=
2283
2284 LDAPD_LIBS=
2285 SLAPD_LIBS=
2286 SLURPD_LIBS=
2287
2288 BUILD_LDAPD=no
2289 BUILD_SLAPD=no
2290 BUILD_SLURPD=no
2291
2292 BUILD_BDB2=no
2293 BUILD_LDAP=no
2294 BUILD_LDBM=no
2295 BUILD_PASSWD=no
2296 BUILD_PERL=no
2297 BUILD_QUIPU=no
2298 BUILD_SHELL=no
2299 BUILD_TCL=no
2300 BUILD_THREAD=no
2301
2302 BUILD_BDB2_DYNAMIC=no
2303 BUILD_LDAP_DYNAMIC=no
2304 BUILD_LDBM_DYNAMIC=no
2305 BUILD_PASSWD_DYNAMIC=no
2306 BUILD_PERL_DYNAMIC=no
2307 BUILD_SHELL_DYNAMIC=no
2308 BUILD_TCL_DYNAMIC=no
2309
2310 SLAPD_MODULES_LDFLAGS=
2311 SLAPD_MODULES_CPPFLAGS=
2312
2313 SLAPD_PERL_LDFLAGS=
2314 SLAPD_PERL_CPPFLAGS=
2315
2316 KRB_LIBS=
2317 READLINE_LIBS=
2318 TERMCAP_LIBS=
2319 TLS_LIBS=
2320
2321
2322
2323 cat >> confdefs.h <<\EOF
2324 #define HAVE_MKVERSION 1
2325 EOF
2326
2327
2328
2329
2330
2331 ol_aix_threads=no
2332 case "$target" in
2333 *-*-aix*)       if test -z "$CC" ; then
2334                 case "$ol_with_threads" in
2335                 auto | yes |  posix) ol_aix_threads=yes ;;
2336                 esac
2337         fi
2338 ;;
2339 esac
2340
2341 if test $ol_aix_threads = yes ; then
2342         if test -z "${CC}" ; then
2343                 for ac_prog in cc_r xlc_r cc
2344 do
2345 # Extract the first word of "$ac_prog", so it can be a program name with args.
2346 set dummy $ac_prog; ac_word=$2
2347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2348 echo "configure:2349: checking for $ac_word" >&5
2349 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2350   echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352   if test -n "$CC"; then
2353   ac_cv_prog_CC="$CC" # Let the user override the test.
2354 else
2355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2356   ac_dummy="$PATH"
2357   for ac_dir in $ac_dummy; do
2358     test -z "$ac_dir" && ac_dir=.
2359     if test -f $ac_dir/$ac_word; then
2360       ac_cv_prog_CC="$ac_prog"
2361       break
2362     fi
2363   done
2364   IFS="$ac_save_ifs"
2365 fi
2366 fi
2367 CC="$ac_cv_prog_CC"
2368 if test -n "$CC"; then
2369   echo "$ac_t""$CC" 1>&6
2370 else
2371   echo "$ac_t""no" 1>&6
2372 fi
2373
2374 test -n "$CC" && break
2375 done
2376
2377
2378                 if test "$CC" = cc ; then
2379                                                 if test $ol_with_threads != auto ; then
2380                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2381                         else
2382                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2383                         fi
2384                         ol_with_threads=no
2385                 fi
2386         fi
2387
2388         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2389                 ol_with_threads=posix
2390                 ol_cv_pthread_create=yes
2391         fi
2392 fi
2393
2394 if test -z "${CC}"; then
2395         for ac_prog in cc
2396 do
2397 # Extract the first word of "$ac_prog", so it can be a program name with args.
2398 set dummy $ac_prog; ac_word=$2
2399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2400 echo "configure:2401: checking for $ac_word" >&5
2401 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2402   echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404   if test -n "$CC"; then
2405   ac_cv_prog_CC="$CC" # Let the user override the test.
2406 else
2407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2408   ac_dummy="$PATH"
2409   for ac_dir in $ac_dummy; do
2410     test -z "$ac_dir" && ac_dir=.
2411     if test -f $ac_dir/$ac_word; then
2412       ac_cv_prog_CC="$ac_prog"
2413       break
2414     fi
2415   done
2416   IFS="$ac_save_ifs"
2417 fi
2418 fi
2419 CC="$ac_cv_prog_CC"
2420 if test -n "$CC"; then
2421   echo "$ac_t""$CC" 1>&6
2422 else
2423   echo "$ac_t""no" 1>&6
2424 fi
2425
2426 test -n "$CC" && break
2427 done
2428
2429 fi
2430
2431
2432 # Check whether --enable-fast-install or --disable-fast-install was given.
2433 if test "${enable_fast_install+set}" = set; then
2434   enableval="$enable_fast_install"
2435   p=${PACKAGE-default}
2436 case "$enableval" in
2437 yes) enable_fast_install=yes ;;
2438 no) enable_fast_install=no ;;
2439 *)
2440   enable_fast_install=no
2441   # Look at the argument we got.  We use all the common list separators.
2442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2443   for pkg in $enableval; do
2444     if test "X$pkg" = "X$p"; then
2445       enable_fast_install=yes
2446     fi
2447   done
2448   IFS="$ac_save_ifs"
2449   ;;
2450 esac
2451 else
2452   enable_fast_install=yes
2453 fi
2454
2455 # Extract the first word of "ranlib", so it can be a program name with args.
2456 set dummy ranlib; ac_word=$2
2457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2458 echo "configure:2459: checking for $ac_word" >&5
2459 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2460   echo $ac_n "(cached) $ac_c" 1>&6
2461 else
2462   if test -n "$RANLIB"; then
2463   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2464 else
2465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2466   ac_dummy="$PATH"
2467   for ac_dir in $ac_dummy; do
2468     test -z "$ac_dir" && ac_dir=.
2469     if test -f $ac_dir/$ac_word; then
2470       ac_cv_prog_RANLIB="ranlib"
2471       break
2472     fi
2473   done
2474   IFS="$ac_save_ifs"
2475   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2476 fi
2477 fi
2478 RANLIB="$ac_cv_prog_RANLIB"
2479 if test -n "$RANLIB"; then
2480   echo "$ac_t""$RANLIB" 1>&6
2481 else
2482   echo "$ac_t""no" 1>&6
2483 fi
2484
2485 # Extract the first word of "gcc", so it can be a program name with args.
2486 set dummy gcc; ac_word=$2
2487 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2488 echo "configure:2489: checking for $ac_word" >&5
2489 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2490   echo $ac_n "(cached) $ac_c" 1>&6
2491 else
2492   if test -n "$CC"; then
2493   ac_cv_prog_CC="$CC" # Let the user override the test.
2494 else
2495   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2496   ac_dummy="$PATH"
2497   for ac_dir in $ac_dummy; do
2498     test -z "$ac_dir" && ac_dir=.
2499     if test -f $ac_dir/$ac_word; then
2500       ac_cv_prog_CC="gcc"
2501       break
2502     fi
2503   done
2504   IFS="$ac_save_ifs"
2505 fi
2506 fi
2507 CC="$ac_cv_prog_CC"
2508 if test -n "$CC"; then
2509   echo "$ac_t""$CC" 1>&6
2510 else
2511   echo "$ac_t""no" 1>&6
2512 fi
2513
2514 if test -z "$CC"; then
2515   # Extract the first word of "cc", so it can be a program name with args.
2516 set dummy cc; ac_word=$2
2517 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2518 echo "configure:2519: checking for $ac_word" >&5
2519 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2520   echo $ac_n "(cached) $ac_c" 1>&6
2521 else
2522   if test -n "$CC"; then
2523   ac_cv_prog_CC="$CC" # Let the user override the test.
2524 else
2525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2526   ac_prog_rejected=no
2527   ac_dummy="$PATH"
2528   for ac_dir in $ac_dummy; do
2529     test -z "$ac_dir" && ac_dir=.
2530     if test -f $ac_dir/$ac_word; then
2531       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2532         ac_prog_rejected=yes
2533         continue
2534       fi
2535       ac_cv_prog_CC="cc"
2536       break
2537     fi
2538   done
2539   IFS="$ac_save_ifs"
2540 if test $ac_prog_rejected = yes; then
2541   # We found a bogon in the path, so make sure we never use it.
2542   set dummy $ac_cv_prog_CC
2543   shift
2544   if test $# -gt 0; then
2545     # We chose a different compiler from the bogus one.
2546     # However, it has the same basename, so the bogon will be chosen
2547     # first if we set CC to just the basename; use the full file name.
2548     shift
2549     set dummy "$ac_dir/$ac_word" "$@"
2550     shift
2551     ac_cv_prog_CC="$@"
2552   fi
2553 fi
2554 fi
2555 fi
2556 CC="$ac_cv_prog_CC"
2557 if test -n "$CC"; then
2558   echo "$ac_t""$CC" 1>&6
2559 else
2560   echo "$ac_t""no" 1>&6
2561 fi
2562
2563   if test -z "$CC"; then
2564     case "`uname -s`" in
2565     *win32* | *WIN32* | *CYGWIN*)
2566       # Extract the first word of "cl", so it can be a program name with args.
2567 set dummy cl; ac_word=$2
2568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2569 echo "configure:2570: checking for $ac_word" >&5
2570 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2571   echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573   if test -n "$CC"; then
2574   ac_cv_prog_CC="$CC" # Let the user override the test.
2575 else
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2577   ac_dummy="$PATH"
2578   for ac_dir in $ac_dummy; do
2579     test -z "$ac_dir" && ac_dir=.
2580     if test -f $ac_dir/$ac_word; then
2581       ac_cv_prog_CC="cl"
2582       break
2583     fi
2584   done
2585   IFS="$ac_save_ifs"
2586 fi
2587 fi
2588 CC="$ac_cv_prog_CC"
2589 if test -n "$CC"; then
2590   echo "$ac_t""$CC" 1>&6
2591 else
2592   echo "$ac_t""no" 1>&6
2593 fi
2594  ;;
2595     esac
2596   fi
2597   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2598 fi
2599
2600 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2601 echo "configure:2602: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2602
2603 ac_ext=c
2604 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2605 ac_cpp='$CPP $CPPFLAGS'
2606 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2607 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2608 cross_compiling=$ac_cv_prog_cc_cross
2609
2610 cat > conftest.$ac_ext << EOF
2611
2612 #line 2613 "configure"
2613 #include "confdefs.h"
2614
2615 main(){return(0);}
2616 EOF
2617 if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2618   ac_cv_prog_cc_works=yes
2619   # If we can't run a trivial program, we are probably using a cross compiler.
2620   if (./conftest; exit) 2>/dev/null; then
2621     ac_cv_prog_cc_cross=no
2622   else
2623     ac_cv_prog_cc_cross=yes
2624   fi
2625 else
2626   echo "configure: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   ac_cv_prog_cc_works=no
2629 fi
2630 rm -fr conftest*
2631 ac_ext=c
2632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2633 ac_cpp='$CPP $CPPFLAGS'
2634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2636 cross_compiling=$ac_cv_prog_cc_cross
2637
2638 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2639 if test $ac_cv_prog_cc_works = no; then
2640   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2641 fi
2642 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2643 echo "configure:2644: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2644 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2645 cross_compiling=$ac_cv_prog_cc_cross
2646
2647 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2648 echo "configure:2649: checking whether we are using GNU C" >&5
2649 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2650   echo $ac_n "(cached) $ac_c" 1>&6
2651 else
2652   cat > conftest.c <<EOF
2653 #ifdef __GNUC__
2654   yes;
2655 #endif
2656 EOF
2657 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2658   ac_cv_prog_gcc=yes
2659 else
2660   ac_cv_prog_gcc=no
2661 fi
2662 fi
2663
2664 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2665
2666 if test $ac_cv_prog_gcc = yes; then
2667   GCC=yes
2668 else
2669   GCC=
2670 fi
2671
2672 ac_test_CFLAGS="${CFLAGS+set}"
2673 ac_save_CFLAGS="$CFLAGS"
2674 CFLAGS=
2675 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2676 echo "configure:2677: checking whether ${CC-cc} accepts -g" >&5
2677 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   echo 'void f(){}' > conftest.c
2681 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2682   ac_cv_prog_cc_g=yes
2683 else
2684   ac_cv_prog_cc_g=no
2685 fi
2686 rm -f conftest*
2687
2688 fi
2689
2690 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2691 if test "$ac_test_CFLAGS" = set; then
2692   CFLAGS="$ac_save_CFLAGS"
2693 elif test $ac_cv_prog_cc_g = yes; then
2694   if test "$GCC" = yes; then
2695     CFLAGS="-g -O2"
2696   else
2697     CFLAGS="-g"
2698   fi
2699 else
2700   if test "$GCC" = yes; then
2701     CFLAGS="-O2"
2702   else
2703     CFLAGS=
2704   fi
2705 fi
2706
2707 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2708 if test "${with_gnu_ld+set}" = set; then
2709   withval="$with_gnu_ld"
2710   test "$withval" = no || with_gnu_ld=yes
2711 else
2712   with_gnu_ld=no
2713 fi
2714
2715 ac_prog=ld
2716 if test "$ac_cv_prog_gcc" = yes; then
2717   # Check if gcc -print-prog-name=ld gives a path.
2718   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2719 echo "configure:2720: checking for ld used by GCC" >&5
2720   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2721   case "$ac_prog" in
2722     # Accept absolute paths.
2723     [\\/]* | [A-Za-z]:[\\/]*)
2724       re_direlt='/[^/][^/]*/\.\./'
2725       # Canonicalize the path of ld
2726       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2727       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2728         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2729       done
2730       test -z "$LD" && LD="$ac_prog"
2731       ;;
2732   "")
2733     # If it fails, then pretend we aren't using GCC.
2734     ac_prog=ld
2735     ;;
2736   *)
2737     # If it is relative, then search for the first ld in PATH.
2738     with_gnu_ld=unknown
2739     ;;
2740   esac
2741 elif test "$with_gnu_ld" = yes; then
2742   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2743 echo "configure:2744: checking for GNU ld" >&5
2744 else
2745   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2746 echo "configure:2747: checking for non-GNU ld" >&5
2747 fi
2748 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2749   echo $ac_n "(cached) $ac_c" 1>&6
2750 else
2751   if test -z "$LD"; then
2752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2753   for ac_dir in $PATH; do
2754     test -z "$ac_dir" && ac_dir=.
2755     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2756       ac_cv_path_LD="$ac_dir/$ac_prog"
2757       # Check to see if the program is GNU ld.  I'd rather use --version,
2758       # but apparently some GNU ld's only accept -v.
2759       # Break only if it was the GNU/non-GNU ld that we prefer.
2760       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2761         test "$with_gnu_ld" != no && break
2762       else
2763         test "$with_gnu_ld" != yes && break
2764       fi
2765     fi
2766   done
2767   IFS="$ac_save_ifs"
2768 else
2769   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2770 fi
2771 fi
2772
2773 LD="$ac_cv_path_LD"
2774 if test -n "$LD"; then
2775   echo "$ac_t""$LD" 1>&6
2776 else
2777   echo "$ac_t""no" 1>&6
2778 fi
2779 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2780
2781 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2782 echo "configure:2783: checking if the linker ($LD) is GNU ld" >&5
2783 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2784   echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2787 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2788   ac_cv_prog_gnu_ld=yes
2789 else
2790   ac_cv_prog_gnu_ld=no
2791 fi
2792 fi
2793
2794 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2795
2796
2797 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2798 echo "configure:2799: checking for BSD-compatible nm" >&5
2799 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2800   echo $ac_n "(cached) $ac_c" 1>&6
2801 else
2802   if test -n "$NM"; then
2803   # Let the user override the test.
2804   ac_cv_path_NM="$NM"
2805 else
2806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2807   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2808     test -z "$ac_dir" && ac_dir=.
2809     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2810       # Check to see if the nm accepts a BSD-compat flag.
2811       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2812       #   nm: unknown option "B" ignored
2813       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2814         ac_cv_path_NM="$ac_dir/nm -B"
2815         break
2816       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2817         ac_cv_path_NM="$ac_dir/nm -p"
2818         break
2819       else
2820         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2821         continue # so that we can try to find one that supports BSD flags
2822       fi
2823     fi
2824   done
2825   IFS="$ac_save_ifs"
2826   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2827 fi
2828 fi
2829
2830 NM="$ac_cv_path_NM"
2831 echo "$ac_t""$NM" 1>&6
2832
2833
2834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2835 echo "configure:2836: checking whether ln -s works" >&5
2836 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2837   echo $ac_n "(cached) $ac_c" 1>&6
2838 else
2839   rm -f conftestdata
2840 if ln -s X conftestdata 2>/dev/null
2841 then
2842   rm -f conftestdata
2843   ac_cv_prog_LN_S="ln -s"
2844 else
2845   ac_cv_prog_LN_S=ln
2846 fi
2847 fi
2848 LN_S="$ac_cv_prog_LN_S"
2849 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2850   echo "$ac_t""yes" 1>&6
2851 else
2852   echo "$ac_t""no" 1>&6
2853 fi
2854
2855
2856 # Check for any special flags to pass to ltconfig.
2857 libtool_flags="--cache-file=$cache_file"
2858 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2859 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2860 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2861 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2862 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2863
2864
2865 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2866 if test "${enable_libtool_lock+set}" = set; then
2867   enableval="$enable_libtool_lock"
2868   :
2869 fi
2870
2871 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2872 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2873
2874 # Some flags need to be propagated to the compiler or linker for good
2875 # libtool support.
2876 case "$host" in
2877 *-*-irix6*)
2878   # Find out which ABI we are using.
2879   echo '#line 2880 "configure"' > conftest.$ac_ext
2880   if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2881     case "`/usr/bin/file conftest.o`" in
2882     *32-bit*)
2883       LD="${LD-ld} -32"
2884       ;;
2885     *N32*)
2886       LD="${LD-ld} -n32"
2887       ;;
2888     *64-bit*)
2889       LD="${LD-ld} -64"
2890       ;;
2891     esac
2892   fi
2893   rm -rf conftest*
2894   ;;
2895
2896 *-*-sco3.2v5*)
2897   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2898   SAVE_CFLAGS="$CFLAGS"
2899   CFLAGS="$CFLAGS -belf"
2900   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2901 echo "configure:2902: checking whether the C compiler needs -belf" >&5
2902 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2903   echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905   cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908
2909 int main() {
2910
2911 ; return 0; }
2912 EOF
2913 if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2914   rm -rf conftest*
2915   lt_cv_cc_needs_belf=yes
2916 else
2917   echo "configure: failed program was:" >&5
2918   cat conftest.$ac_ext >&5
2919   rm -rf conftest*
2920   lt_cv_cc_needs_belf=no
2921 fi
2922 rm -f conftest*
2923 fi
2924
2925 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2926   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2927     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2928     CFLAGS="$SAVE_CFLAGS"
2929   fi
2930   ;;
2931
2932
2933 esac
2934
2935
2936 # Save cache, so that ltconfig can load it
2937
2938
2939 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2940 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2941 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2942 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2943 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2944 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2945 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2946 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2947
2948 # Reload cache, that may have been modified by ltconfig
2949
2950
2951 # This can be used to rebuild libtool when needed
2952 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2953
2954 # Always use our own libtool.
2955 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2956
2957 # Redirect the config.log output again, so that the ltconfig log is not
2958 # clobbered by the next message.
2959 exec 5>>./config.log
2960
2961
2962 for ac_prog in mawk gawk nawk awk
2963 do
2964 # Extract the first word of "$ac_prog", so it can be a program name with args.
2965 set dummy $ac_prog; ac_word=$2
2966 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2967 echo "configure:2968: checking for $ac_word" >&5
2968 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2969   echo $ac_n "(cached) $ac_c" 1>&6
2970 else
2971   if test -n "$AWK"; then
2972   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2973 else
2974   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2975   ac_dummy="$PATH"
2976   for ac_dir in $ac_dummy; do
2977     test -z "$ac_dir" && ac_dir=.
2978     if test -f $ac_dir/$ac_word; then
2979       ac_cv_prog_AWK="$ac_prog"
2980       break
2981     fi
2982   done
2983   IFS="$ac_save_ifs"
2984 fi
2985 fi
2986 AWK="$ac_cv_prog_AWK"
2987 if test -n "$AWK"; then
2988   echo "$ac_t""$AWK" 1>&6
2989 else
2990   echo "$ac_t""no" 1>&6
2991 fi
2992
2993 test -n "$AWK" && break
2994 done
2995
2996 # test for ln hardlink support
2997 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2998 echo "configure:2999: checking whether ln works" >&5
2999 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3000   echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002   rm -f conftest.src conftest.dst
3003 echo "conftest" > conftest.src
3004 if ln conftest.src conftest.dst 2>/dev/null
3005 then
3006   ol_cv_prog_LN_H="ln"
3007 else
3008   ol_cv_prog_LN_H="cp"
3009 fi
3010 rm -f conftest.src conftest.dst
3011
3012 fi
3013 LN_H="$ol_cv_prog_LN_H"
3014 if test "$ol_cv_prog_LN_H" = "ln"; then
3015         echo "$ac_t""yes" 1>&6
3016 else
3017         echo "$ac_t""no" 1>&6
3018 fi
3019
3020 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3021 echo "configure:3022: checking whether ln -s works" >&5
3022 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   rm -f conftestdata
3026 if ln -s X conftestdata 2>/dev/null
3027 then
3028   rm -f conftestdata
3029   ac_cv_prog_LN_S="ln -s"
3030 else
3031   ac_cv_prog_LN_S=ln
3032 fi
3033 fi
3034 LN_S="$ac_cv_prog_LN_S"
3035 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3036   echo "$ac_t""yes" 1>&6
3037 else
3038   echo "$ac_t""no" 1>&6
3039 fi
3040
3041
3042 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3043         LN_S="$LN_H"
3044 fi
3045
3046 # Extract the first word of "sendmail", so it can be a program name with args.
3047 set dummy sendmail; ac_word=$2
3048 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3049 echo "configure:3050: checking for $ac_word" >&5
3050 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3051   echo $ac_n "(cached) $ac_c" 1>&6
3052 else
3053   case "$SENDMAIL" in
3054   /*)
3055   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3056   ;;
3057   ?:/*)                  
3058   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3059   ;;
3060   *)
3061   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3062   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3063   for ac_dir in $ac_dummy; do 
3064     test -z "$ac_dir" && ac_dir=.
3065     if test -f $ac_dir/$ac_word; then
3066       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3067       break
3068     fi
3069   done
3070   IFS="$ac_save_ifs"
3071   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3072   ;;
3073 esac
3074 fi
3075 SENDMAIL="$ac_cv_path_SENDMAIL"
3076 if test -n "$SENDMAIL"; then
3077   echo "$ac_t""$SENDMAIL" 1>&6
3078 else
3079   echo "$ac_t""no" 1>&6
3080 fi
3081
3082 # Extract the first word of "vi", so it can be a program name with args.
3083 set dummy vi; ac_word=$2
3084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3085 echo "configure:3086: checking for $ac_word" >&5
3086 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3087   echo $ac_n "(cached) $ac_c" 1>&6
3088 else
3089   case "$EDITOR" in
3090   /*)
3091   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3092   ;;
3093   ?:/*)                  
3094   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3095   ;;
3096   *)
3097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3098   ac_dummy="$PATH:/usr/ucb"
3099   for ac_dir in $ac_dummy; do 
3100     test -z "$ac_dir" && ac_dir=.
3101     if test -f $ac_dir/$ac_word; then
3102       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3103       break
3104     fi
3105   done
3106   IFS="$ac_save_ifs"
3107   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3108   ;;
3109 esac
3110 fi
3111 EDITOR="$ac_cv_path_EDITOR"
3112 if test -n "$EDITOR"; then
3113   echo "$ac_t""$EDITOR" 1>&6
3114 else
3115   echo "$ac_t""no" 1>&6
3116 fi
3117
3118 # Extract the first word of "finger", so it can be a program name with args.
3119 set dummy finger; ac_word=$2
3120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3121 echo "configure:3122: checking for $ac_word" >&5
3122 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3123   echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125   case "$FINGER" in
3126   /*)
3127   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3128   ;;
3129   ?:/*)                  
3130   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3131   ;;
3132   *)
3133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3134   ac_dummy="$PATH:/usr/ucb"
3135   for ac_dir in $ac_dummy; do 
3136     test -z "$ac_dir" && ac_dir=.
3137     if test -f $ac_dir/$ac_word; then
3138       ac_cv_path_FINGER="$ac_dir/$ac_word"
3139       break
3140     fi
3141   done
3142   IFS="$ac_save_ifs"
3143   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3144   ;;
3145 esac
3146 fi
3147 FINGER="$ac_cv_path_FINGER"
3148 if test -n "$FINGER"; then
3149   echo "$ac_t""$FINGER" 1>&6
3150 else
3151   echo "$ac_t""no" 1>&6
3152 fi
3153
3154
3155 ol_link_perl=no
3156 if test $ol_enable_perl != no ; then
3157         # Extract the first word of "perl", so it can be a program name with args.
3158 set dummy perl; ac_word=$2
3159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3160 echo "configure:3161: checking for $ac_word" >&5
3161 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164   case "$PERLBIN" in
3165   /*)
3166   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3167   ;;
3168   ?:/*)                  
3169   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3170   ;;
3171   *)
3172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3173   ac_dummy="$PATH"
3174   for ac_dir in $ac_dummy; do 
3175     test -z "$ac_dir" && ac_dir=.
3176     if test -f $ac_dir/$ac_word; then
3177       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3178       break
3179     fi
3180   done
3181   IFS="$ac_save_ifs"
3182   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3183   ;;
3184 esac
3185 fi
3186 PERLBIN="$ac_cv_path_PERLBIN"
3187 if test -n "$PERLBIN"; then
3188   echo "$ac_t""$PERLBIN" 1>&6
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192
3193
3194         if test "no$PERLBIN" = "no" ; then
3195                 if test $ol_enable_perl = yes ; then
3196                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3197                 fi
3198
3199         else
3200                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3201                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3202
3203                                 ol_link_perl=yes
3204         fi
3205 fi
3206
3207 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3208 echo "configure:3209: checking how to run the C preprocessor" >&5
3209 # On Suns, sometimes $CPP names a directory.
3210 if test -n "$CPP" && test -d "$CPP"; then
3211   CPP=
3212 fi
3213 if test -z "$CPP"; then
3214 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217     # This must be in double quotes, not single quotes, because CPP may get
3218   # substituted into the Makefile and "${CC-cc}" will confuse make.
3219   CPP="${CC-cc} -E"
3220   # On the NeXT, cc -E runs the code through the compiler's parser,
3221   # not just through cpp.
3222   cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 #include <assert.h>
3226 Syntax Error
3227 EOF
3228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3229 { (eval echo configure:3230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3231 if test -z "$ac_err"; then
3232   :
3233 else
3234   echo "$ac_err" >&5
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   CPP="${CC-cc} -E -traditional-cpp"
3239   cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 #include <assert.h>
3243 Syntax Error
3244 EOF
3245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3246 { (eval echo configure:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3248 if test -z "$ac_err"; then
3249   :
3250 else
3251   echo "$ac_err" >&5
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   CPP="${CC-cc} -nologo -E"
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 #include <assert.h>
3260 Syntax Error
3261 EOF
3262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3263 { (eval echo configure:3264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3265 if test -z "$ac_err"; then
3266   :
3267 else
3268   echo "$ac_err" >&5
3269   echo "configure: failed program was:" >&5
3270   cat conftest.$ac_ext >&5
3271   rm -rf conftest*
3272   CPP=/lib/cpp
3273 fi
3274 rm -f conftest*
3275 fi
3276 rm -f conftest*
3277 fi
3278 rm -f conftest*
3279   ac_cv_prog_CPP="$CPP"
3280 fi
3281   CPP="$ac_cv_prog_CPP"
3282 else
3283   ac_cv_prog_CPP="$CPP"
3284 fi
3285 echo "$ac_t""$CPP" 1>&6
3286
3287
3288 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3289         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3290
3291 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3292         echo "configure: warning: programs compiled here do run here..." 1>&2
3293         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3294
3295 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3296         echo "configure: warning: programs compiled here do not run here..." 1>&2
3297         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3298 fi
3299
3300 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3301 echo "configure:3302: checking for AIX" >&5
3302 cat > conftest.$ac_ext <<EOF
3303 #line 3304 "configure"
3304 #include "confdefs.h"
3305 #ifdef _AIX
3306   yes
3307 #endif
3308
3309 EOF
3310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3311   egrep "yes" >/dev/null 2>&1; then
3312   rm -rf conftest*
3313   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3314 #define _ALL_SOURCE 1
3315 EOF
3316
3317 else
3318   rm -rf conftest*
3319   echo "$ac_t""no" 1>&6
3320 fi
3321 rm -f conftest*
3322
3323
3324 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3325 echo "configure:3326: checking for POSIXized ISC" >&5
3326 if test -d /etc/conf/kconfig.d &&
3327   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3328 then
3329   echo "$ac_t""yes" 1>&6
3330   ISC=yes # If later tests want to check for ISC.
3331   cat >> confdefs.h <<\EOF
3332 #define _POSIX_SOURCE 1
3333 EOF
3334
3335   if test "$GCC" = yes; then
3336     CC="$CC -posix"
3337   else
3338     CC="$CC -Xp"
3339   fi
3340 else
3341   echo "$ac_t""no" 1>&6
3342   ISC=
3343 fi
3344
3345 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3346 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3347 echo "configure:3348: checking for minix/config.h" >&5
3348 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3349   echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351   cat > conftest.$ac_ext <<EOF
3352 #line 3353 "configure"
3353 #include "confdefs.h"
3354 #include <minix/config.h>
3355 EOF
3356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3357 { (eval echo configure:3358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3359 if test -z "$ac_err"; then
3360   rm -rf conftest*
3361   eval "ac_cv_header_$ac_safe=yes"
3362 else
3363   echo "$ac_err" >&5
3364   echo "configure: failed program was:" >&5
3365   cat conftest.$ac_ext >&5
3366   rm -rf conftest*
3367   eval "ac_cv_header_$ac_safe=no"
3368 fi
3369 rm -f conftest*
3370 fi
3371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3372   echo "$ac_t""yes" 1>&6
3373   MINIX=yes
3374 else
3375   echo "$ac_t""no" 1>&6
3376 MINIX=
3377 fi
3378
3379 if test "$MINIX" = yes; then
3380   cat >> confdefs.h <<\EOF
3381 #define _POSIX_SOURCE 1
3382 EOF
3383
3384   cat >> confdefs.h <<\EOF
3385 #define _POSIX_1_SOURCE 2
3386 EOF
3387
3388   cat >> confdefs.h <<\EOF
3389 #define _MINIX 1
3390 EOF
3391
3392 fi
3393
3394
3395 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3396 echo "configure:3397: checking for Cygwin environment" >&5
3397 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3398   echo $ac_n "(cached) $ac_c" 1>&6
3399 else
3400   cat > conftest.$ac_ext <<EOF
3401 #line 3402 "configure"
3402 #include "confdefs.h"
3403
3404 int main() {
3405
3406 #ifndef __CYGWIN__
3407 #define __CYGWIN__ __CYGWIN32__
3408 #endif
3409 return __CYGWIN__;
3410 ; return 0; }
3411 EOF
3412 if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3413   rm -rf conftest*
3414   ac_cv_cygwin=yes
3415 else
3416   echo "configure: failed program was:" >&5
3417   cat conftest.$ac_ext >&5
3418   rm -rf conftest*
3419   ac_cv_cygwin=no
3420 fi
3421 rm -f conftest*
3422 fi
3423
3424 echo "$ac_t""$ac_cv_cygwin" 1>&6
3425 CYGWIN=
3426 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3427 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3428 echo "configure:3429: checking for mingw32 environment" >&5
3429 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435
3436 int main() {
3437 return __MINGW32__;
3438 ; return 0; }
3439 EOF
3440 if { (eval echo configure:3441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3441   rm -rf conftest*
3442   ac_cv_mingw32=yes
3443 else
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -rf conftest*
3447   ac_cv_mingw32=no
3448 fi
3449 rm -f conftest*
3450 fi
3451
3452 echo "$ac_t""$ac_cv_mingw32" 1>&6
3453 MINGW32=
3454 test "$ac_cv_mingw32" = yes && MINGW32=yes
3455 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3456 echo "configure:3457: checking for EMX OS/2 environment" >&5
3457 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   cat > conftest.$ac_ext <<EOF
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463
3464 int main() {
3465 return __EMX__;
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3469   rm -rf conftest*
3470   ac_cv_emxos2=yes
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   ac_cv_emxos2=no
3476 fi
3477 rm -f conftest*
3478 fi
3479
3480 echo "$ac_t""$ac_cv_emxos2" 1>&6
3481 EMXOS2=
3482 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3483
3484
3485
3486 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3487 echo "configure:3488: checking for executable suffix" >&5
3488 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3492   ac_cv_exeext=.exe
3493 else
3494   rm -f conftest*
3495   echo 'int main () { return 0; }' > conftest.$ac_ext
3496   ac_cv_exeext=
3497   if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3498     for file in conftest.*; do
3499       case $file in
3500       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3501       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3502       esac
3503     done
3504   else
3505     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3506   fi
3507   rm -f conftest*
3508   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3509 fi
3510 fi
3511
3512 EXEEXT=""
3513 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3514 echo "$ac_t""${ac_cv_exeext}" 1>&6
3515 ac_exeext=$EXEEXT
3516
3517 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3518 echo "configure:3519: checking for object suffix" >&5
3519 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3520   echo $ac_n "(cached) $ac_c" 1>&6
3521 else
3522   rm -f conftest*
3523 echo 'int i = 1;' > conftest.$ac_ext
3524 if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3525   for ac_file in conftest.*; do
3526     case $ac_file in
3527     *.c) ;;
3528     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3529     esac
3530   done
3531 else
3532   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3533 fi
3534 rm -f conftest*
3535 fi
3536
3537 echo "$ac_t""$ac_cv_objext" 1>&6
3538 OBJEXT=$ac_cv_objext
3539 ac_objext=$ac_cv_objext
3540
3541
3542 cat >> confdefs.h <<EOF
3543 #define EXEEXT "${EXEEXT}"
3544 EOF
3545
3546
3547 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3548 echo "configure:3549: checking for be_app in -lbe" >&5
3549 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3551   echo $ac_n "(cached) $ac_c" 1>&6
3552 else
3553   ac_save_LIBS="$LIBS"
3554 LIBS="-lbe -lroot -lnet $LIBS"
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 /* Override any gcc2 internal prototype to avoid an error.  */
3559 /* We use char because int might match the return type of a gcc2
3560     builtin and then its argument prototype would still apply.  */
3561 char be_app();
3562
3563 int main() {
3564 be_app()
3565 ; return 0; }
3566 EOF
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3568   rm -rf conftest*
3569   eval "ac_cv_lib_$ac_lib_var=yes"
3570 else
3571   echo "configure: failed program was:" >&5
3572   cat conftest.$ac_ext >&5
3573   rm -rf conftest*
3574   eval "ac_cv_lib_$ac_lib_var=no"
3575 fi
3576 rm -f conftest*
3577 LIBS="$ac_save_LIBS"
3578
3579 fi
3580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3581   echo "$ac_t""yes" 1>&6
3582   LIBS="$LIBS -lbe -lroot -lnet"
3583 else
3584   echo "$ac_t""no" 1>&6
3585 :
3586 fi
3587
3588
3589
3590
3591
3592 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3593 echo "configure:3594: checking for ${CC-cc} option to accept ANSI C" >&5
3594 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3595   echo $ac_n "(cached) $ac_c" 1>&6
3596 else
3597   am_cv_prog_cc_stdc=no
3598 ac_save_CC="$CC"
3599 # Don't try gcc -ansi; that turns off useful extensions and
3600 # breaks some systems' header files.
3601 # AIX                   -qlanglvl=ansi
3602 # Ultrix and OSF/1      -std1
3603 # HP-UX 10.20 and later -Ae
3604 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3605 # SVR4                  -Xc -D__EXTENSIONS__
3606 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3607 do
3608   CC="$ac_save_CC $ac_arg"
3609   cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 #include <stdarg.h>
3613 #include <stdio.h>
3614 #include <sys/types.h>
3615 #include <sys/stat.h>
3616 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3617 struct buf { int x; };
3618 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3619 static char *e (p, i)
3620      char **p;
3621      int i;
3622 {
3623   return p[i];
3624 }
3625 static char *f (char * (*g) (char **, int), char **p, ...)
3626 {
3627   char *s;
3628   va_list v;
3629   va_start (v,p);
3630   s = g (p, va_arg (v,int));
3631   va_end (v);
3632   return s;
3633 }
3634 int test (int i, double x);
3635 struct s1 {int (*f) (int a);};
3636 struct s2 {int (*f) (double a);};
3637 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3638 int argc;
3639 char **argv;
3640
3641 int main() {
3642
3643 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3644
3645 ; return 0; }
3646 EOF
3647 if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3648   rm -rf conftest*
3649   am_cv_prog_cc_stdc="$ac_arg"; break
3650 else
3651   echo "configure: failed program was:" >&5
3652   cat conftest.$ac_ext >&5
3653 fi
3654 rm -f conftest*
3655 done
3656 CC="$ac_save_CC"
3657
3658 fi
3659
3660 if test -z "$am_cv_prog_cc_stdc"; then
3661   echo "$ac_t""none needed" 1>&6
3662 else
3663   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3664 fi
3665 case "x$am_cv_prog_cc_stdc" in
3666   x|xno) ;;
3667   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3668 esac
3669
3670 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3671         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3672 fi
3673
3674 # test for make depend flag
3675 OL_MKDEP=
3676 OL_MKDEP_FLAGS=
3677 if test -z "${MKDEP}"; then
3678         OL_MKDEP="${CC-cc}"
3679         if test -z "${MKDEP_FLAGS}"; then
3680                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3681 echo "configure:3682: checking for ${OL_MKDEP} depend flag" >&5
3682 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   
3686                         ol_cv_mkdep=no
3687                         for flag in "-M" "-xM"; do
3688                                 cat > conftest.c <<EOF
3689  noCode;
3690 EOF
3691                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3692                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3693                                 then
3694                                         if test ! -f conftest."${ac_object}" ; then
3695                                                 ol_cv_mkdep=$flag
3696                                                 OL_MKDEP_FLAGS="$flag"
3697                                                 break
3698                                         fi
3699                                 fi
3700                         done
3701                         rm -f conftest*
3702                 
3703 fi
3704
3705 echo "$ac_t""$ol_cv_mkdep" 1>&6
3706         else
3707                 cc_cv_mkdep=yes
3708                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3709         fi
3710 else
3711         cc_cv_mkdep=yes
3712         OL_MKDEP="${MKDEP}"
3713         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3714 fi
3715
3716
3717
3718 if test "${ol_cv_mkdep}" = no ; then
3719         # this will soon become an error
3720         echo "configure: warning: do not know how to generate dependencies" 1>&2
3721 fi
3722
3723 ol_link_modules=no
3724 if test $ol_enable_modules != no ; then
3725         # Extract the first word of "glib-config", so it can be a program name with args.
3726 set dummy glib-config; ac_word=$2
3727 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3728 echo "configure:3729: checking for $ac_word" >&5
3729 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3730   echo $ac_n "(cached) $ac_c" 1>&6
3731 else
3732   case "$GLIBCONFIG" in
3733   /*)
3734   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3735   ;;
3736   ?:/*)                  
3737   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3738   ;;
3739   *)
3740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3741   ac_dummy="$PATH"
3742   for ac_dir in $ac_dummy; do 
3743     test -z "$ac_dir" && ac_dir=.
3744     if test -f $ac_dir/$ac_word; then
3745       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3746       break
3747     fi
3748   done
3749   IFS="$ac_save_ifs"
3750   ;;
3751 esac
3752 fi
3753 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3754 if test -n "$GLIBCONFIG"; then
3755   echo "$ac_t""$GLIBCONFIG" 1>&6
3756 else
3757   echo "$ac_t""no" 1>&6
3758 fi
3759
3760
3761         if test "no$GLIBCONFIG" = "no" ; then
3762                 if test $ol_enable_modules = yes ; then
3763                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3764                 fi
3765
3766         else
3767                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3768                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3769                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3770
3771                                 ol_link_modules=yes
3772         fi
3773 else
3774         ol_with_bdb2_module=static
3775         ol_with_ldap_module=static
3776         ol_with_ldbm_module=static
3777         ol_with_passwd_module=static
3778         ol_with_perl_module=static
3779         ol_with_shell_module=static
3780         ol_with_tcl_module=static
3781 fi
3782
3783 # test for EBCDIC
3784 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3785 echo "configure:3786: checking for EBCDIC" >&5
3786 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3787   echo $ac_n "(cached) $ac_c" 1>&6
3788 else
3789   
3790         cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793
3794 #if !('M' == 0xd4)
3795 #include <__ASCII__/generate_error.h>
3796 #endif
3797
3798 EOF
3799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3800 { (eval echo configure:3801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3802 if test -z "$ac_err"; then
3803   rm -rf conftest*
3804   ol_cv_cpp_ebcdic=yes
3805 else
3806   echo "$ac_err" >&5
3807   echo "configure: failed program was:" >&5
3808   cat conftest.$ac_ext >&5
3809   rm -rf conftest*
3810   ol_cv_cpp_ebcdic=no
3811 fi
3812 rm -f conftest*
3813 fi
3814
3815 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3816 if test $ol_cv_cpp_ebcdic = yes ; then
3817         cat >> confdefs.h <<\EOF
3818 #define HAVE_EBCDIC 1
3819 EOF
3820
3821 fi
3822
3823 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3824 echo "configure:3825: checking for ANSI C header files" >&5
3825 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3826   echo $ac_n "(cached) $ac_c" 1>&6
3827 else
3828   cat > conftest.$ac_ext <<EOF
3829 #line 3830 "configure"
3830 #include "confdefs.h"
3831 #include <stdlib.h>
3832 #include <stdarg.h>
3833 #include <string.h>
3834 #include <float.h>
3835 EOF
3836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3837 { (eval echo configure:3838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3839 if test -z "$ac_err"; then
3840   rm -rf conftest*
3841   ol_cv_header_stdc=yes
3842 else
3843   echo "$ac_err" >&5
3844   echo "configure: failed program was:" >&5
3845   cat conftest.$ac_ext >&5
3846   rm -rf conftest*
3847   ol_cv_header_stdc=no
3848 fi
3849 rm -f conftest*
3850
3851 if test $ol_cv_header_stdc = yes; then
3852   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3853 cat > conftest.$ac_ext <<EOF
3854 #line 3855 "configure"
3855 #include "confdefs.h"
3856 #include <string.h>
3857 EOF
3858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3859   egrep "memchr" >/dev/null 2>&1; then
3860   :
3861 else
3862   rm -rf conftest*
3863   ol_cv_header_stdc=no
3864 fi
3865 rm -f conftest*
3866
3867 fi
3868
3869 if test $ol_cv_header_stdc = yes; then
3870   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 #include <stdlib.h>
3875 EOF
3876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3877   egrep "free" >/dev/null 2>&1; then
3878   :
3879 else
3880   rm -rf conftest*
3881   ol_cv_header_stdc=no
3882 fi
3883 rm -f conftest*
3884
3885 fi
3886
3887 if test $ol_cv_header_stdc = yes; then
3888   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3889 if test "$cross_compiling" = yes; then
3890   :
3891 else
3892   cat > conftest.$ac_ext <<EOF
3893 #line 3894 "configure"
3894 #include "confdefs.h"
3895 #include <ctype.h>
3896 #ifndef HAVE_EBCDIC
3897 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3898 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3899 #else
3900 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3901                 || ('j' <= (c) && (c) <= 'r') \
3902                 || ('s' <= (c) && (c) <= 'z'))
3903 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3904 #endif
3905 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3906 int main () { int i; for (i = 0; i < 256; i++)
3907 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3908 exit (0); }
3909
3910 EOF
3911 if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3912 then
3913   :
3914 else
3915   echo "configure: failed program was:" >&5
3916   cat conftest.$ac_ext >&5
3917   rm -fr conftest*
3918   ol_cv_header_stdc=no
3919 fi
3920 rm -fr conftest*
3921 fi
3922
3923 fi
3924 fi
3925
3926 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3927 if test $ol_cv_header_stdc = yes; then
3928   cat >> confdefs.h <<\EOF
3929 #define STDC_HEADERS 1
3930 EOF
3931
3932 fi
3933 ac_cv_header_stdc=disable
3934
3935
3936 if test $ol_cv_header_stdc != yes; then
3937         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3938 fi
3939
3940 ac_header_dirent=no
3941 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3942 do
3943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3944 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3945 echo "configure:3946: checking for $ac_hdr that defines DIR" >&5
3946 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 #include <sys/types.h>
3953 #include <$ac_hdr>
3954 int main() {
3955 DIR *dirp = 0;
3956 ; return 0; }
3957 EOF
3958 if { (eval echo configure:3959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3959   rm -rf conftest*
3960   eval "ac_cv_header_dirent_$ac_safe=yes"
3961 else
3962   echo "configure: failed program was:" >&5
3963   cat conftest.$ac_ext >&5
3964   rm -rf conftest*
3965   eval "ac_cv_header_dirent_$ac_safe=no"
3966 fi
3967 rm -f conftest*
3968 fi
3969 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3970   echo "$ac_t""yes" 1>&6
3971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3972   cat >> confdefs.h <<EOF
3973 #define $ac_tr_hdr 1
3974 EOF
3975  ac_header_dirent=$ac_hdr; break
3976 else
3977   echo "$ac_t""no" 1>&6
3978 fi
3979 done
3980 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3981 if test $ac_header_dirent = dirent.h; then
3982 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3983 echo "configure:3984: checking for opendir in -ldir" >&5
3984 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
3985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3986   echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988   ac_save_LIBS="$LIBS"
3989 LIBS="-ldir  $LIBS"
3990 cat > conftest.$ac_ext <<EOF
3991 #line 3992 "configure"
3992 #include "confdefs.h"
3993 /* Override any gcc2 internal prototype to avoid an error.  */
3994 /* We use char because int might match the return type of a gcc2
3995     builtin and then its argument prototype would still apply.  */
3996 char opendir();
3997
3998 int main() {
3999 opendir()
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4003   rm -rf conftest*
4004   eval "ac_cv_lib_$ac_lib_var=yes"
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   eval "ac_cv_lib_$ac_lib_var=no"
4010 fi
4011 rm -f conftest*
4012 LIBS="$ac_save_LIBS"
4013
4014 fi
4015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4016   echo "$ac_t""yes" 1>&6
4017   LIBS="$LIBS -ldir"
4018 else
4019   echo "$ac_t""no" 1>&6
4020 fi
4021
4022 else
4023 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4024 echo "configure:4025: checking for opendir in -lx" >&5
4025 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   ac_save_LIBS="$LIBS"
4030 LIBS="-lx  $LIBS"
4031 cat > conftest.$ac_ext <<EOF
4032 #line 4033 "configure"
4033 #include "confdefs.h"
4034 /* Override any gcc2 internal prototype to avoid an error.  */
4035 /* We use char because int might match the return type of a gcc2
4036     builtin and then its argument prototype would still apply.  */
4037 char opendir();
4038
4039 int main() {
4040 opendir()
4041 ; return 0; }
4042 EOF
4043 if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4044   rm -rf conftest*
4045   eval "ac_cv_lib_$ac_lib_var=yes"
4046 else
4047   echo "configure: failed program was:" >&5
4048   cat conftest.$ac_ext >&5
4049   rm -rf conftest*
4050   eval "ac_cv_lib_$ac_lib_var=no"
4051 fi
4052 rm -f conftest*
4053 LIBS="$ac_save_LIBS"
4054
4055 fi
4056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4057   echo "$ac_t""yes" 1>&6
4058   LIBS="$LIBS -lx"
4059 else
4060   echo "$ac_t""no" 1>&6
4061 fi
4062
4063 fi
4064
4065 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4066 echo "configure:4067: checking for sys/wait.h that is POSIX.1 compatible" >&5
4067 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4068   echo $ac_n "(cached) $ac_c" 1>&6
4069 else
4070   cat > conftest.$ac_ext <<EOF
4071 #line 4072 "configure"
4072 #include "confdefs.h"
4073 #include <sys/types.h>
4074 #include <sys/wait.h>
4075 #ifndef WEXITSTATUS
4076 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4077 #endif
4078 #ifndef WIFEXITED
4079 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4080 #endif
4081 int main() {
4082 int s;
4083 wait (&s);
4084 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4085 ; return 0; }
4086 EOF
4087 if { (eval echo configure:4088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4088   rm -rf conftest*
4089   ac_cv_header_sys_wait_h=yes
4090 else
4091   echo "configure: failed program was:" >&5
4092   cat conftest.$ac_ext >&5
4093   rm -rf conftest*
4094   ac_cv_header_sys_wait_h=no
4095 fi
4096 rm -f conftest*
4097 fi
4098
4099 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4100 if test $ac_cv_header_sys_wait_h = yes; then
4101   cat >> confdefs.h <<\EOF
4102 #define HAVE_SYS_WAIT_H 1
4103 EOF
4104
4105 fi
4106
4107 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4108 echo "configure:4109: checking POSIX termios" >&5
4109 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4110   echo $ac_n "(cached) $ac_c" 1>&6
4111 else
4112   cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4115 #include <sys/types.h>
4116 #include <unistd.h>
4117 #include <termios.h>
4118 int main() {
4119 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4120    tcgetattr(0, 0);
4121 ; return 0; }
4122 EOF
4123 if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4124   rm -rf conftest*
4125   am_cv_sys_posix_termios=yes
4126 else
4127   echo "configure: failed program was:" >&5
4128   cat conftest.$ac_ext >&5
4129   rm -rf conftest*
4130   am_cv_sys_posix_termios=no
4131 fi
4132 rm -f conftest*
4133 fi
4134
4135 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4136
4137
4138  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4139 echo "configure:4140: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4140 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4144
4145   gwinsz_in_termios_h=no
4146   if test $am_cv_sys_posix_termios = yes; then
4147     cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 #include <sys/types.h>
4151 #     include <termios.h>
4152 #     ifdef TIOCGWINSZ
4153         yes
4154 #     endif
4155     
4156 EOF
4157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4158   egrep "yes" >/dev/null 2>&1; then
4159   rm -rf conftest*
4160   gwinsz_in_termios_h=yes
4161 fi
4162 rm -f conftest*
4163
4164   fi
4165
4166   if test $gwinsz_in_termios_h = no; then
4167     cat > conftest.$ac_ext <<EOF
4168 #line 4169 "configure"
4169 #include "confdefs.h"
4170 #include <sys/types.h>
4171 #     include <sys/ioctl.h>
4172 #     ifdef TIOCGWINSZ
4173         yes
4174 #     endif
4175     
4176 EOF
4177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4178   egrep "yes" >/dev/null 2>&1; then
4179   rm -rf conftest*
4180   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4181 fi
4182 rm -f conftest*
4183
4184   fi
4185   
4186 fi
4187
4188 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4189   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4190     cat >> confdefs.h <<\EOF
4191 #define GWINSZ_IN_SYS_IOCTL 1
4192 EOF
4193
4194   fi
4195
4196 if test $am_cv_sys_posix_termios = yes ; then
4197         cat >> confdefs.h <<\EOF
4198 #define HAVE_POSIX_TERMIOS 1
4199 EOF
4200
4201 fi
4202
4203 for ac_hdr in \
4204         arpa/inet.h             \
4205         arpa/nameser.h  \
4206         assert.h                \
4207         crypt.h                 \
4208         errno.h                 \
4209         fcntl.h                 \
4210         filio.h                 \
4211         getopt.h                \
4212         grp.h                   \
4213         libutil.h               \
4214         limits.h                \
4215         locale.h                \
4216         netinet/tcp.h   \
4217         malloc.h                \
4218         memory.h                \
4219         psap.h                  \
4220         pwd.h                   \
4221         resolv.h                \
4222         sgtty.h                 \
4223         shadow.h                \
4224         stdarg.h                \
4225         stddef.h                \
4226         string.h                \
4227         strings.h               \
4228         sysexits.h              \
4229         sys/file.h              \
4230         sys/filio.h             \
4231         sys/errno.h             \
4232         sys/ioctl.h             \
4233         sys/param.h             \
4234         sys/resource.h  \
4235         sys/select.h    \
4236         sys/socket.h    \
4237         sys/syslog.h    \
4238         sys/time.h              \
4239         sys/types.h             \
4240         syslog.h                \
4241         termios.h               \
4242         unistd.h                \
4243
4244 do
4245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4247 echo "configure:4248: checking for $ac_hdr" >&5
4248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 #include <$ac_hdr>
4255 EOF
4256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4257 { (eval echo configure:4258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4259 if test -z "$ac_err"; then
4260   rm -rf conftest*
4261   eval "ac_cv_header_$ac_safe=yes"
4262 else
4263   echo "$ac_err" >&5
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   eval "ac_cv_header_$ac_safe=no"
4268 fi
4269 rm -f conftest*
4270 fi
4271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4272   echo "$ac_t""yes" 1>&6
4273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4274   cat >> confdefs.h <<EOF
4275 #define $ac_tr_hdr 1
4276 EOF
4277  
4278 else
4279   echo "$ac_t""no" 1>&6
4280 fi
4281 done
4282
4283
4284
4285
4286 echo $ac_n "checking for socket""... $ac_c" 1>&6
4287 echo "configure:4288: checking for socket" >&5
4288 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4289   echo $ac_n "(cached) $ac_c" 1>&6
4290 else
4291   cat > conftest.$ac_ext <<EOF
4292 #line 4293 "configure"
4293 #include "confdefs.h"
4294 /* System header to define __stub macros and hopefully few prototypes,
4295     which can conflict with char socket(); below.  */
4296 #include <assert.h>
4297 /* Override any gcc2 internal prototype to avoid an error.  */
4298 /* We use char because int might match the return type of a gcc2
4299     builtin and then its argument prototype would still apply.  */
4300 char socket();
4301 char (*f)();
4302
4303 int main() {
4304
4305 /* The GNU C library defines this for functions which it implements
4306     to always fail with ENOSYS.  Some functions are actually named
4307     something starting with __ and the normal name is an alias.  */
4308 #if defined (__stub_socket) || defined (__stub___socket)
4309 choke me
4310 #else
4311 f = socket;
4312 #endif
4313
4314 ; return 0; }
4315 EOF
4316 if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4317   rm -rf conftest*
4318   eval "ac_cv_func_socket=yes"
4319 else
4320   echo "configure: failed program was:" >&5
4321   cat conftest.$ac_ext >&5
4322   rm -rf conftest*
4323   eval "ac_cv_func_socket=no"
4324 fi
4325 rm -f conftest*
4326 fi
4327
4328 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4329   echo "$ac_t""yes" 1>&6
4330   :
4331 else
4332   echo "$ac_t""no" 1>&6
4333         
4334         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4335 echo "configure:4336: checking for main in -lsocket" >&5
4336 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   ac_save_LIBS="$LIBS"
4341 LIBS="-lsocket  $LIBS"
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345
4346 int main() {
4347 main()
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4351   rm -rf conftest*
4352   eval "ac_cv_lib_$ac_lib_var=yes"
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=no"
4358 fi
4359 rm -f conftest*
4360 LIBS="$ac_save_LIBS"
4361
4362 fi
4363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4364   echo "$ac_t""yes" 1>&6
4365     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4366     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4367   cat >> confdefs.h <<EOF
4368 #define $ac_tr_lib 1
4369 EOF
4370
4371   LIBS="-lsocket $LIBS"
4372
4373 else
4374   echo "$ac_t""no" 1>&6
4375 fi
4376
4377         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4378 echo "configure:4379: checking for main in -lnet" >&5
4379 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   ac_save_LIBS="$LIBS"
4384 LIBS="-lnet  $LIBS"
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388
4389 int main() {
4390 main()
4391 ; return 0; }
4392 EOF
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394   rm -rf conftest*
4395   eval "ac_cv_lib_$ac_lib_var=yes"
4396 else
4397   echo "configure: failed program was:" >&5
4398   cat conftest.$ac_ext >&5
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=no"
4401 fi
4402 rm -f conftest*
4403 LIBS="$ac_save_LIBS"
4404
4405 fi
4406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407   echo "$ac_t""yes" 1>&6
4408     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4409     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4410   cat >> confdefs.h <<EOF
4411 #define $ac_tr_lib 1
4412 EOF
4413
4414   LIBS="-lnet $LIBS"
4415
4416 else
4417   echo "$ac_t""no" 1>&6
4418 fi
4419
4420         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4421 echo "configure:4422: checking for socket in -lnet" >&5
4422 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4424   echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426   ac_save_LIBS="$LIBS"
4427 LIBS="-lnet  $LIBS"
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 /* Override any gcc2 internal prototype to avoid an error.  */
4432 /* We use char because int might match the return type of a gcc2
4433     builtin and then its argument prototype would still apply.  */
4434 char socket();
4435
4436 int main() {
4437 socket()
4438 ; return 0; }
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441   rm -rf conftest*
4442   eval "ac_cv_lib_$ac_lib_var=yes"
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -rf conftest*
4447   eval "ac_cv_lib_$ac_lib_var=no"
4448 fi
4449 rm -f conftest*
4450 LIBS="$ac_save_LIBS"
4451
4452 fi
4453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4454   echo "$ac_t""yes" 1>&6
4455     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4456     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4457   cat >> confdefs.h <<EOF
4458 #define $ac_tr_lib 1
4459 EOF
4460
4461   LIBS="-lnet $LIBS"
4462
4463 else
4464   echo "$ac_t""no" 1>&6
4465 fi
4466
4467         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4468 echo "configure:4469: checking for main in -lnsl_s" >&5
4469 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4470 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4471   echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473   ac_save_LIBS="$LIBS"
4474 LIBS="-lnsl_s  $LIBS"
4475 cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4478
4479 int main() {
4480 main()
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   eval "ac_cv_lib_$ac_lib_var=yes"
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   eval "ac_cv_lib_$ac_lib_var=no"
4491 fi
4492 rm -f conftest*
4493 LIBS="$ac_save_LIBS"
4494
4495 fi
4496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4500   cat >> confdefs.h <<EOF
4501 #define $ac_tr_lib 1
4502 EOF
4503
4504   LIBS="-lnsl_s $LIBS"
4505
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509
4510         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4511 echo "configure:4512: checking for main in -lnsl" >&5
4512 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   ac_save_LIBS="$LIBS"
4517 LIBS="-lnsl  $LIBS"
4518 cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521
4522 int main() {
4523 main()
4524 ; return 0; }
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4527   rm -rf conftest*
4528   eval "ac_cv_lib_$ac_lib_var=yes"
4529 else
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -rf conftest*
4533   eval "ac_cv_lib_$ac_lib_var=no"
4534 fi
4535 rm -f conftest*
4536 LIBS="$ac_save_LIBS"
4537
4538 fi
4539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4540   echo "$ac_t""yes" 1>&6
4541     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4542     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4543   cat >> confdefs.h <<EOF
4544 #define $ac_tr_lib 1
4545 EOF
4546
4547   LIBS="-lnsl $LIBS"
4548
4549 else
4550   echo "$ac_t""no" 1>&6
4551 fi
4552
4553         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4554 echo "configure:4555: checking for socket in -linet" >&5
4555 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   ac_save_LIBS="$LIBS"
4560 LIBS="-linet  $LIBS"
4561 cat > conftest.$ac_ext <<EOF
4562 #line 4563 "configure"
4563 #include "confdefs.h"
4564 /* Override any gcc2 internal prototype to avoid an error.  */
4565 /* We use char because int might match the return type of a gcc2
4566     builtin and then its argument prototype would still apply.  */
4567 char socket();
4568
4569 int main() {
4570 socket()
4571 ; return 0; }
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4574   rm -rf conftest*
4575   eval "ac_cv_lib_$ac_lib_var=yes"
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=no"
4581 fi
4582 rm -f conftest*
4583 LIBS="$ac_save_LIBS"
4584
4585 fi
4586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4587   echo "$ac_t""yes" 1>&6
4588     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4589     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4590   cat >> confdefs.h <<EOF
4591 #define $ac_tr_lib 1
4592 EOF
4593
4594   LIBS="-linet $LIBS"
4595
4596 else
4597   echo "$ac_t""no" 1>&6
4598 fi
4599
4600         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4601 echo "configure:4602: checking for main in -lgen" >&5
4602 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4604   echo $ac_n "(cached) $ac_c" 1>&6
4605 else
4606   ac_save_LIBS="$LIBS"
4607 LIBS="-lgen  $LIBS"
4608 cat > conftest.$ac_ext <<EOF
4609 #line 4610 "configure"
4610 #include "confdefs.h"
4611
4612 int main() {
4613 main()
4614 ; return 0; }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4617   rm -rf conftest*
4618   eval "ac_cv_lib_$ac_lib_var=yes"
4619 else
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   eval "ac_cv_lib_$ac_lib_var=no"
4624 fi
4625 rm -f conftest*
4626 LIBS="$ac_save_LIBS"
4627
4628 fi
4629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4630   echo "$ac_t""yes" 1>&6
4631     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4632     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4633   cat >> confdefs.h <<EOF
4634 #define $ac_tr_lib 1
4635 EOF
4636
4637   LIBS="-lgen $LIBS"
4638
4639 else
4640   echo "$ac_t""no" 1>&6
4641 fi
4642
4643
4644 fi
4645
4646
4647 echo $ac_n "checking for select""... $ac_c" 1>&6
4648 echo "configure:4649: checking for select" >&5
4649 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   cat > conftest.$ac_ext <<EOF
4653 #line 4654 "configure"
4654 #include "confdefs.h"
4655 /* System header to define __stub macros and hopefully few prototypes,
4656     which can conflict with char select(); below.  */
4657 #include <assert.h>
4658 /* Override any gcc2 internal prototype to avoid an error.  */
4659 /* We use char because int might match the return type of a gcc2
4660     builtin and then its argument prototype would still apply.  */
4661 char select();
4662 char (*f)();
4663
4664 int main() {
4665
4666 /* The GNU C library defines this for functions which it implements
4667     to always fail with ENOSYS.  Some functions are actually named
4668     something starting with __ and the normal name is an alias.  */
4669 #if defined (__stub_select) || defined (__stub___select)
4670 choke me
4671 #else
4672 f = select;
4673 #endif
4674
4675 ; return 0; }
4676 EOF
4677 if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4678   rm -rf conftest*
4679   eval "ac_cv_func_select=yes"
4680 else
4681   echo "configure: failed program was:" >&5
4682   cat conftest.$ac_ext >&5
4683   rm -rf conftest*
4684   eval "ac_cv_func_select=no"
4685 fi
4686 rm -f conftest*
4687 fi
4688
4689 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4690   echo "$ac_t""yes" 1>&6
4691   :
4692 else
4693   echo "$ac_t""no" 1>&6
4694 { echo "configure: error: select() required." 1>&2; exit 1; }
4695 fi
4696
4697
4698 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4699 echo "configure:4700: checking types of arguments for select()" >&5
4700  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4701   echo $ac_n "(cached) $ac_c" 1>&6
4702 else
4703    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4704   echo $ac_n "(cached) $ac_c" 1>&6
4705 else
4706     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4707   echo $ac_n "(cached) $ac_c" 1>&6
4708 else
4709      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4710      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4711       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4712        cat > conftest.$ac_ext <<EOF
4713 #line 4714 "configure"
4714 #include "confdefs.h"
4715 #ifdef HAVE_SYS_TYPES_H
4716 #include <sys/types.h>
4717 #endif
4718 #ifdef HAVE_SYS_TIME_H
4719 #include <sys/time.h>
4720 #endif
4721 #ifdef HAVE_SYS_SELECT_H
4722 #include <sys/select.h>
4723 #endif
4724 #ifdef HAVE_SYS_SOCKET_H
4725 #include <sys/socket.h>
4726 #endif
4727 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);
4728 int main() {
4729
4730 ; return 0; }
4731 EOF
4732 if { (eval echo configure:4733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4733   rm -rf conftest*
4734           ac_not_found=no ; break 3
4735 else
4736   echo "configure: failed program was:" >&5
4737   cat conftest.$ac_ext >&5
4738   rm -rf conftest*
4739   ac_not_found=yes
4740 fi
4741 rm -f conftest*
4742       done
4743      done
4744     done
4745    
4746 fi
4747   
4748 fi
4749  
4750 fi
4751  if test "$ac_not_found" = yes; then
4752   ac_cv_func_select_arg1=int 
4753   ac_cv_func_select_arg234='int *' 
4754   ac_cv_func_select_arg5='struct timeval *'
4755  fi
4756  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4757  cat >> confdefs.h <<EOF
4758 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4759 EOF
4760
4761  cat >> confdefs.h <<EOF
4762 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4763 EOF
4764
4765  cat >> confdefs.h <<EOF
4766 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4767 EOF
4768
4769
4770
4771
4772 for ac_hdr in regex.h 
4773 do
4774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4776 echo "configure:4777: checking for $ac_hdr" >&5
4777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4778   echo $ac_n "(cached) $ac_c" 1>&6
4779 else
4780   cat > conftest.$ac_ext <<EOF
4781 #line 4782 "configure"
4782 #include "confdefs.h"
4783 #include <$ac_hdr>
4784 EOF
4785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4786 { (eval echo configure:4787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4788 if test -z "$ac_err"; then
4789   rm -rf conftest*
4790   eval "ac_cv_header_$ac_safe=yes"
4791 else
4792   echo "$ac_err" >&5
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_header_$ac_safe=no"
4797 fi
4798 rm -f conftest*
4799 fi
4800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4803   cat >> confdefs.h <<EOF
4804 #define $ac_tr_hdr 1
4805 EOF
4806  
4807 else
4808   echo "$ac_t""no" 1>&6
4809 fi
4810 done
4811
4812 if test "$ac_cv_header_regex_h" != yes ; then
4813         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4814 fi
4815 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4816 echo "configure:4817: checking for regfree" >&5
4817 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4818   echo $ac_n "(cached) $ac_c" 1>&6
4819 else
4820   cat > conftest.$ac_ext <<EOF
4821 #line 4822 "configure"
4822 #include "confdefs.h"
4823 /* System header to define __stub macros and hopefully few prototypes,
4824     which can conflict with char regfree(); below.  */
4825 #include <assert.h>
4826 /* Override any gcc2 internal prototype to avoid an error.  */
4827 /* We use char because int might match the return type of a gcc2
4828     builtin and then its argument prototype would still apply.  */
4829 char regfree();
4830 char (*f)();
4831
4832 int main() {
4833
4834 /* The GNU C library defines this for functions which it implements
4835     to always fail with ENOSYS.  Some functions are actually named
4836     something starting with __ and the normal name is an alias.  */
4837 #if defined (__stub_regfree) || defined (__stub___regfree)
4838 choke me
4839 #else
4840 f = regfree;
4841 #endif
4842
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   eval "ac_cv_func_regfree=yes"
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   eval "ac_cv_func_regfree=no"
4853 fi
4854 rm -f conftest*
4855 fi
4856
4857 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859   :
4860 else
4861   echo "$ac_t""no" 1>&6
4862 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4863 fi
4864
4865
4866
4867 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4868 echo "configure:4869: checking for compatible POSIX regex" >&5
4869 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4870   echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872   
4873         if test "$cross_compiling" = yes; then
4874   ol_cv_c_posix_regex=cross
4875 else
4876   cat > conftest.$ac_ext <<EOF
4877 #line 4878 "configure"
4878 #include "confdefs.h"
4879
4880 #include <sys/types.h>
4881 #include <regex.h>
4882 static char *pattern, *string;
4883 main()
4884 {
4885         int rc;
4886         regex_t re;
4887
4888         pattern = "^A";
4889
4890         if(regcomp(&re, pattern, 0)) {
4891                 return -1;
4892         }
4893         
4894         string = "ALL MATCH";
4895         
4896         rc = regexec(&re, string, 0, (void*)0, 0);
4897
4898         regfree(&re);
4899
4900         return rc;
4901 }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4904 then
4905   ol_cv_c_posix_regex=yes
4906 else
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -fr conftest*
4910   ol_cv_c_posix_regex=no
4911 fi
4912 rm -fr conftest*
4913 fi
4914
4915 fi
4916
4917 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4918
4919 if test "$ol_cv_c_posix_regex" = no ; then
4920         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4921 fi
4922
4923
4924 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4925 echo "configure:4926: checking for sigset in -lV3" >&5
4926 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4928   echo $ac_n "(cached) $ac_c" 1>&6
4929 else
4930   ac_save_LIBS="$LIBS"
4931 LIBS="-lV3  $LIBS"
4932 cat > conftest.$ac_ext <<EOF
4933 #line 4934 "configure"
4934 #include "confdefs.h"
4935 /* Override any gcc2 internal prototype to avoid an error.  */
4936 /* We use char because int might match the return type of a gcc2
4937     builtin and then its argument prototype would still apply.  */
4938 char sigset();
4939
4940 int main() {
4941 sigset()
4942 ; return 0; }
4943 EOF
4944 if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4945   rm -rf conftest*
4946   eval "ac_cv_lib_$ac_lib_var=yes"
4947 else
4948   echo "configure: failed program was:" >&5
4949   cat conftest.$ac_ext >&5
4950   rm -rf conftest*
4951   eval "ac_cv_lib_$ac_lib_var=no"
4952 fi
4953 rm -f conftest*
4954 LIBS="$ac_save_LIBS"
4955
4956 fi
4957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4958   echo "$ac_t""yes" 1>&6
4959     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4961   cat >> confdefs.h <<EOF
4962 #define $ac_tr_lib 1
4963 EOF
4964
4965   LIBS="-lV3 $LIBS"
4966
4967 else
4968   echo "$ac_t""no" 1>&6
4969 fi
4970
4971
4972
4973 # find res_search
4974 if test $ol_enable_dns != no ; then
4975                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4976 echo "configure:4977: checking for res_search" >&5
4977 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4978   echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980   cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 /* System header to define __stub macros and hopefully few prototypes,
4984     which can conflict with char res_search(); below.  */
4985 #include <assert.h>
4986 /* Override any gcc2 internal prototype to avoid an error.  */
4987 /* We use char because int might match the return type of a gcc2
4988     builtin and then its argument prototype would still apply.  */
4989 char res_search();
4990 char (*f)();
4991
4992 int main() {
4993
4994 /* The GNU C library defines this for functions which it implements
4995     to always fail with ENOSYS.  Some functions are actually named
4996     something starting with __ and the normal name is an alias.  */
4997 #if defined (__stub_res_search) || defined (__stub___res_search)
4998 choke me
4999 #else
5000 f = res_search;
5001 #endif
5002
5003 ; return 0; }
5004 EOF
5005 if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5006   rm -rf conftest*
5007   eval "ac_cv_func_res_search=yes"
5008 else
5009   echo "configure: failed program was:" >&5
5010   cat conftest.$ac_ext >&5
5011   rm -rf conftest*
5012   eval "ac_cv_func_res_search=no"
5013 fi
5014 rm -f conftest*
5015 fi
5016
5017 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019   :
5020 else
5021   echo "$ac_t""no" 1>&6
5022 fi
5023
5024         if test $ac_cv_func_res_search = no ; then 
5025                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5026 echo "configure:5027: checking for res_search in -lbind" >&5
5027 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5029   echo $ac_n "(cached) $ac_c" 1>&6
5030 else
5031   ac_save_LIBS="$LIBS"
5032 LIBS="-lbind  $LIBS"
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036 /* Override any gcc2 internal prototype to avoid an error.  */
5037 /* We use char because int might match the return type of a gcc2
5038     builtin and then its argument prototype would still apply.  */
5039 char res_search();
5040
5041 int main() {
5042 res_search()
5043 ; return 0; }
5044 EOF
5045 if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5046   rm -rf conftest*
5047   eval "ac_cv_lib_$ac_lib_var=yes"
5048 else
5049   echo "configure: failed program was:" >&5
5050   cat conftest.$ac_ext >&5
5051   rm -rf conftest*
5052   eval "ac_cv_lib_$ac_lib_var=no"
5053 fi
5054 rm -f conftest*
5055 LIBS="$ac_save_LIBS"
5056
5057 fi
5058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5059   echo "$ac_t""yes" 1>&6
5060     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5061     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5062   cat >> confdefs.h <<EOF
5063 #define $ac_tr_lib 1
5064 EOF
5065
5066   LIBS="-lbind $LIBS"
5067
5068 else
5069   echo "$ac_t""no" 1>&6
5070 fi
5071
5072                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5073         fi
5074         if test $ac_cv_func_res_search = no ; then 
5075                 echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5076 echo "configure:5077: checking for __res_search in -lbind" >&5
5077 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5079   echo $ac_n "(cached) $ac_c" 1>&6
5080 else
5081   ac_save_LIBS="$LIBS"
5082 LIBS="-lbind  $LIBS"
5083 cat > conftest.$ac_ext <<EOF
5084 #line 5085 "configure"
5085 #include "confdefs.h"
5086 /* Override any gcc2 internal prototype to avoid an error.  */
5087 /* We use char because int might match the return type of a gcc2
5088     builtin and then its argument prototype would still apply.  */
5089 char __res_search();
5090
5091 int main() {
5092 __res_search()
5093 ; return 0; }
5094 EOF
5095 if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5096   rm -rf conftest*
5097   eval "ac_cv_lib_$ac_lib_var=yes"
5098 else
5099   echo "configure: failed program was:" >&5
5100   cat conftest.$ac_ext >&5
5101   rm -rf conftest*
5102   eval "ac_cv_lib_$ac_lib_var=no"
5103 fi
5104 rm -f conftest*
5105 LIBS="$ac_save_LIBS"
5106
5107 fi
5108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5109   echo "$ac_t""yes" 1>&6
5110     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5111     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5112   cat >> confdefs.h <<EOF
5113 #define $ac_tr_lib 1
5114 EOF
5115
5116   LIBS="-lbind $LIBS"
5117
5118 else
5119   echo "$ac_t""no" 1>&6
5120 fi
5121
5122                 ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5123         fi
5124         if test $ac_cv_func_res_search = no ; then 
5125                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5126 echo "configure:5127: checking for res_search in -lresolv" >&5
5127 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5129   echo $ac_n "(cached) $ac_c" 1>&6
5130 else
5131   ac_save_LIBS="$LIBS"
5132 LIBS="-lresolv  $LIBS"
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 /* Override any gcc2 internal prototype to avoid an error.  */
5137 /* We use char because int might match the return type of a gcc2
5138     builtin and then its argument prototype would still apply.  */
5139 char res_search();
5140
5141 int main() {
5142 res_search()
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_lib_$ac_lib_var=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=no"
5153 fi
5154 rm -f conftest*
5155 LIBS="$ac_save_LIBS"
5156
5157 fi
5158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5159   echo "$ac_t""yes" 1>&6
5160     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5162   cat >> confdefs.h <<EOF
5163 #define $ac_tr_lib 1
5164 EOF
5165
5166   LIBS="-lresolv $LIBS"
5167
5168 else
5169   echo "$ac_t""no" 1>&6
5170 fi
5171
5172                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5173         fi
5174
5175         if test "$ac_cv_func_res_search" = yes ; then
5176                 cat >> confdefs.h <<\EOF
5177 #define HAVE_RES_SEARCH 1
5178 EOF
5179
5180         elif test $ol_enable_dns = yes ; then
5181                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5182         else
5183                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5184         fi
5185 fi
5186
5187
5188 # ISODE tests
5189 ol_link_isode=no
5190 if test $ol_enable_ldapd != no ; then
5191         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5192
5193                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5194 echo "configure:5195: checking for main in -lxtpp" >&5
5195 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   ac_save_LIBS="$LIBS"
5200 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5201 cat > conftest.$ac_ext <<EOF
5202 #line 5203 "configure"
5203 #include "confdefs.h"
5204
5205 int main() {
5206 main()
5207 ; return 0; }
5208 EOF
5209 if { (eval echo configure:5210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=yes"
5212 else
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   eval "ac_cv_lib_$ac_lib_var=no"
5217 fi
5218 rm -f conftest*
5219 LIBS="$ac_save_LIBS"
5220
5221 fi
5222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5223   echo "$ac_t""yes" 1>&6
5224   
5225                 ol_link_isode=yes
5226                 cat >> confdefs.h <<\EOF
5227 #define HAVE_XTPP 1
5228 EOF
5229
5230                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5231                 
5232 else
5233   echo "$ac_t""no" 1>&6
5234 :
5235 fi
5236
5237         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5238 echo "configure:5239: checking for main in -ldsap" >&5
5239 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5241   echo $ac_n "(cached) $ac_c" 1>&6
5242 else
5243   ac_save_LIBS="$LIBS"
5244 LIBS="-ldsap -lisode $LIBS"
5245 cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248
5249 int main() {
5250 main()
5251 ; return 0; }
5252 EOF
5253 if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5254   rm -rf conftest*
5255   eval "ac_cv_lib_$ac_lib_var=yes"
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259   rm -rf conftest*
5260   eval "ac_cv_lib_$ac_lib_var=no"
5261 fi
5262 rm -f conftest*
5263 LIBS="$ac_save_LIBS"
5264
5265 fi
5266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5267   echo "$ac_t""yes" 1>&6
5268   
5269                 ol_link_isode=yes
5270                 cat >> confdefs.h <<\EOF
5271 #define HAVE_DSAP 1
5272 EOF
5273
5274                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5275                 
5276 else
5277   echo "$ac_t""no" 1>&6
5278 :
5279 fi
5280
5281         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5282 echo "configure:5283: checking for main in -lisode" >&5
5283 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5285   echo $ac_n "(cached) $ac_c" 1>&6
5286 else
5287   ac_save_LIBS="$LIBS"
5288 LIBS="-lisode  $LIBS"
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292
5293 int main() {
5294 main()
5295 ; return 0; }
5296 EOF
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5298   rm -rf conftest*
5299   eval "ac_cv_lib_$ac_lib_var=yes"
5300 else
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303   rm -rf conftest*
5304   eval "ac_cv_lib_$ac_lib_var=no"
5305 fi
5306 rm -f conftest*
5307 LIBS="$ac_save_LIBS"
5308
5309 fi
5310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5311   echo "$ac_t""yes" 1>&6
5312   
5313                 ol_link_isode=yes
5314                 cat >> confdefs.h <<\EOF
5315 #define HAVE_ISODE 1
5316 EOF
5317
5318                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5319                 
5320 else
5321   echo "$ac_t""no" 1>&6
5322 :
5323 fi
5324
5325 fi
5326
5327 if test $ol_link_isode != no; then
5328         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5329 echo "configure:5330: checking for main in -lpp" >&5
5330 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5332   echo $ac_n "(cached) $ac_c" 1>&6
5333 else
5334   ac_save_LIBS="$LIBS"
5335 LIBS="-lpp  $LIBS"
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 int main() {
5341 main()
5342 ; return 0; }
5343 EOF
5344 if { (eval echo configure:5345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5345   rm -rf conftest*
5346   eval "ac_cv_lib_$ac_lib_var=yes"
5347 else
5348   echo "configure: failed program was:" >&5
5349   cat conftest.$ac_ext >&5
5350   rm -rf conftest*
5351   eval "ac_cv_lib_$ac_lib_var=no"
5352 fi
5353 rm -f conftest*
5354 LIBS="$ac_save_LIBS"
5355
5356 fi
5357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5358   echo "$ac_t""yes" 1>&6
5359   
5360                 cat >> confdefs.h <<\EOF
5361 #define HAVE_PP 1
5362 EOF
5363
5364                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5365                 
5366 else
5367   echo "$ac_t""no" 1>&6
5368 :
5369 fi
5370
5371
5372         # Extract the first word of "pepsy", so it can be a program name with args.
5373 set dummy pepsy; ac_word=$2
5374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5375 echo "configure:5376: checking for $ac_word" >&5
5376 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5377   echo $ac_n "(cached) $ac_c" 1>&6
5378 else
5379   case "$PEPSY" in
5380   /*)
5381   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5382   ;;
5383   ?:/*)                  
5384   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5385   ;;
5386   *)
5387   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5388   ac_dummy="$PATH"
5389   for ac_dir in $ac_dummy; do 
5390     test -z "$ac_dir" && ac_dir=.
5391     if test -f $ac_dir/$ac_word; then
5392       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5393       break
5394     fi
5395   done
5396   IFS="$ac_save_ifs"
5397   ;;
5398 esac
5399 fi
5400 PEPSY="$ac_cv_path_PEPSY"
5401 if test -n "$PEPSY"; then
5402   echo "$ac_t""$PEPSY" 1>&6
5403 else
5404   echo "$ac_t""no" 1>&6
5405 fi
5406
5407 fi
5408
5409 if test $ol_enable_quipu != no ; then
5410         for ac_hdr in quipu/commonarg.h
5411 do
5412 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5413 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5414 echo "configure:5415: checking for $ac_hdr" >&5
5415 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5416   echo $ac_n "(cached) $ac_c" 1>&6
5417 else
5418   cat > conftest.$ac_ext <<EOF
5419 #line 5420 "configure"
5420 #include "confdefs.h"
5421 #include <$ac_hdr>
5422 EOF
5423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5424 { (eval echo configure:5425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5426 if test -z "$ac_err"; then
5427   rm -rf conftest*
5428   eval "ac_cv_header_$ac_safe=yes"
5429 else
5430   echo "$ac_err" >&5
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   eval "ac_cv_header_$ac_safe=no"
5435 fi
5436 rm -f conftest*
5437 fi
5438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5439   echo "$ac_t""yes" 1>&6
5440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5441   cat >> confdefs.h <<EOF
5442 #define $ac_tr_hdr 1
5443 EOF
5444  
5445 else
5446   echo "$ac_t""no" 1>&6
5447 fi
5448 done
5449
5450
5451         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5452                 BUILD_QUIPU=yes
5453         elif test $ol_enable_quipu = auto ; then
5454                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5455         else
5456                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5457         fi
5458 fi
5459
5460 ol_link_kerberos=no
5461
5462 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5463         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5464 do
5465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5467 echo "configure:5468: checking for $ac_hdr" >&5
5468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 #include <$ac_hdr>
5475 EOF
5476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5477 { (eval echo configure:5478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5479 if test -z "$ac_err"; then
5480   rm -rf conftest*
5481   eval "ac_cv_header_$ac_safe=yes"
5482 else
5483   echo "$ac_err" >&5
5484   echo "configure: failed program was:" >&5
5485   cat conftest.$ac_ext >&5
5486   rm -rf conftest*
5487   eval "ac_cv_header_$ac_safe=no"
5488 fi
5489 rm -f conftest*
5490 fi
5491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5492   echo "$ac_t""yes" 1>&6
5493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5494   cat >> confdefs.h <<EOF
5495 #define $ac_tr_hdr 1
5496 EOF
5497  
5498 else
5499   echo "$ac_t""no" 1>&6
5500 fi
5501 done
5502
5503
5504         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5505                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5506 echo "configure:5507: checking for main in -lkrb4" >&5
5507 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5509   echo $ac_n "(cached) $ac_c" 1>&6
5510 else
5511   ac_save_LIBS="$LIBS"
5512 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5513 cat > conftest.$ac_ext <<EOF
5514 #line 5515 "configure"
5515 #include "confdefs.h"
5516
5517 int main() {
5518 main()
5519 ; return 0; }
5520 EOF
5521 if { (eval echo configure:5522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5522   rm -rf conftest*
5523   eval "ac_cv_lib_$ac_lib_var=yes"
5524 else
5525   echo "configure: failed program was:" >&5
5526   cat conftest.$ac_ext >&5
5527   rm -rf conftest*
5528   eval "ac_cv_lib_$ac_lib_var=no"
5529 fi
5530 rm -f conftest*
5531 LIBS="$ac_save_LIBS"
5532
5533 fi
5534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5535   echo "$ac_t""yes" 1>&6
5536   have_k5=yes
5537 else
5538   echo "$ac_t""no" 1>&6
5539 have_k5=no
5540 fi
5541
5542
5543                 if test $have_k5 = yes ; then
5544                         ol_with_kerberos=found
5545                         ol_link_kerberos=yes
5546
5547                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5548
5549                         LIBS="$KRB_LIBS $LIBS"
5550
5551                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5552 echo "configure:5553: checking for des_debug in Kerberos libraries" >&5
5553 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5554   echo $ac_n "(cached) $ac_c" 1>&6
5555 else
5556   
5557                                                                 save_LIBS="$LIBS"
5558                                 LIBS="$KRB_LIBS $LIBS"
5559                                 cat > conftest.$ac_ext <<EOF
5560 #line 5561 "configure"
5561 #include "confdefs.h"
5562
5563 #include <kerberosIV/krb.h>
5564 #include <kerberosIV/des.h>
5565 extern int des_debug;
5566
5567 int main() {
5568
5569 des_debug = 1;
5570
5571 ; return 0; }
5572 EOF
5573 if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5574   rm -rf conftest*
5575   ol_cv_var_des_debug=yes
5576 else
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   ol_cv_var_des_debug=no
5581 fi
5582 rm -f conftest*
5583                                                                 LIBS="$save_LIBS"
5584                         
5585 fi
5586
5587 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5588
5589                         if test $ol_cv_var_des_debug = yes ; then
5590                                 cat >> confdefs.h <<\EOF
5591 #define HAVE_DES_DEBUG 1
5592 EOF
5593
5594                         fi
5595
5596                         LIBS="$save_LIBS"
5597                 fi
5598         fi
5599 fi
5600
5601 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5602         for ac_hdr in krb.h des.h
5603 do
5604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5606 echo "configure:5607: checking for $ac_hdr" >&5
5607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5608   echo $ac_n "(cached) $ac_c" 1>&6
5609 else
5610   cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613 #include <$ac_hdr>
5614 EOF
5615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5616 { (eval echo configure:5617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5618 if test -z "$ac_err"; then
5619   rm -rf conftest*
5620   eval "ac_cv_header_$ac_safe=yes"
5621 else
5622   echo "$ac_err" >&5
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   eval "ac_cv_header_$ac_safe=no"
5627 fi
5628 rm -f conftest*
5629 fi
5630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5633   cat >> confdefs.h <<EOF
5634 #define $ac_tr_hdr 1
5635 EOF
5636  
5637 else
5638   echo "$ac_t""no" 1>&6
5639 fi
5640 done
5641
5642
5643         if test $ac_cv_header_krb_h = yes ; then
5644                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5645 echo "configure:5646: checking for main in -lkrb" >&5
5646 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5648   echo $ac_n "(cached) $ac_c" 1>&6
5649 else
5650   ac_save_LIBS="$LIBS"
5651 LIBS="-lkrb -ldes $LIBS"
5652 cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655
5656 int main() {
5657 main()
5658 ; return 0; }
5659 EOF
5660 if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5661   rm -rf conftest*
5662   eval "ac_cv_lib_$ac_lib_var=yes"
5663 else
5664   echo "configure: failed program was:" >&5
5665   cat conftest.$ac_ext >&5
5666   rm -rf conftest*
5667   eval "ac_cv_lib_$ac_lib_var=no"
5668 fi
5669 rm -f conftest*
5670 LIBS="$ac_save_LIBS"
5671
5672 fi
5673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5674   echo "$ac_t""yes" 1>&6
5675   have_k4=yes
5676 else
5677   echo "$ac_t""no" 1>&6
5678 have_k4=no
5679 fi
5680
5681
5682                 if test $have_k4 = yes ; then
5683                         ol_with_kerberos=found
5684                         ol_link_kerberos=yes
5685
5686                         KRB_LIBS="-lkrb -ldes"
5687                 fi
5688         fi
5689 fi
5690
5691 if test $ol_link_kerberos = yes ; then
5692         cat >> confdefs.h <<\EOF
5693 #define HAVE_KERBEROS 1
5694 EOF
5695
5696 fi
5697
5698 ol_link_tls=no
5699 if test $ol_with_tls != no ; then
5700         
5701         for ac_hdr in openssl/ssl.h ssl.h
5702 do
5703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5705 echo "configure:5706: checking for $ac_hdr" >&5
5706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712 #include <$ac_hdr>
5713 EOF
5714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5715 { (eval echo configure:5716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5717 if test -z "$ac_err"; then
5718   rm -rf conftest*
5719   eval "ac_cv_header_$ac_safe=yes"
5720 else
5721   echo "$ac_err" >&5
5722   echo "configure: failed program was:" >&5
5723   cat conftest.$ac_ext >&5
5724   rm -rf conftest*
5725   eval "ac_cv_header_$ac_safe=no"
5726 fi
5727 rm -f conftest*
5728 fi
5729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5730   echo "$ac_t""yes" 1>&6
5731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5732   cat >> confdefs.h <<EOF
5733 #define $ac_tr_hdr 1
5734 EOF
5735  
5736 else
5737   echo "$ac_t""no" 1>&6
5738 fi
5739 done
5740
5741         
5742         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5743                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5744 echo "configure:5745: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5745 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5747   echo $ac_n "(cached) $ac_c" 1>&6
5748 else
5749   ac_save_LIBS="$LIBS"
5750 LIBS="-lssl -lcrypto $LIBS"
5751 cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 /* We use char because int might match the return type of a gcc2
5756     builtin and then its argument prototype would still apply.  */
5757 char SSLeay_add_ssl_algorithms();
5758
5759 int main() {
5760 SSLeay_add_ssl_algorithms()
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_lib_$ac_lib_var=no"
5771 fi
5772 rm -f conftest*
5773 LIBS="$ac_save_LIBS"
5774
5775 fi
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5777   echo "$ac_t""yes" 1>&6
5778   have_ssleay=yes
5779                         need_rsaref=no
5780 else
5781   echo "$ac_t""no" 1>&6
5782 have_ssleay=no
5783 fi
5784
5785                         
5786                 if test $have_ssleay = no ; then
5787                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5788 echo "configure:5789: checking for SSL_library_init in -lssl" >&5
5789 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5791   echo $ac_n "(cached) $ac_c" 1>&6
5792 else
5793   ac_save_LIBS="$LIBS"
5794 LIBS="-lssl -lcrypto $LIBS"
5795 cat > conftest.$ac_ext <<EOF
5796 #line 5797 "configure"
5797 #include "confdefs.h"
5798 /* Override any gcc2 internal prototype to avoid an error.  */
5799 /* We use char because int might match the return type of a gcc2
5800     builtin and then its argument prototype would still apply.  */
5801 char SSL_library_init();
5802
5803 int main() {
5804 SSL_library_init()
5805 ; return 0; }
5806 EOF
5807 if { (eval echo configure:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5808   rm -rf conftest*
5809   eval "ac_cv_lib_$ac_lib_var=yes"
5810 else
5811   echo "configure: failed program was:" >&5
5812   cat conftest.$ac_ext >&5
5813   rm -rf conftest*
5814   eval "ac_cv_lib_$ac_lib_var=no"
5815 fi
5816 rm -f conftest*
5817 LIBS="$ac_save_LIBS"
5818
5819 fi
5820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5821   echo "$ac_t""yes" 1>&6
5822   have_ssleay=yes
5823                                 need_rsaref=no
5824 else
5825   echo "$ac_t""no" 1>&6
5826 have_ssleay=no
5827 fi
5828
5829                 fi
5830
5831                 if test $have_ssleay = no ; then
5832                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5833 echo "configure:5834: checking for ssl3_accept in -lssl" >&5
5834 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5836   echo $ac_n "(cached) $ac_c" 1>&6
5837 else
5838   ac_save_LIBS="$LIBS"
5839 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5840 cat > conftest.$ac_ext <<EOF
5841 #line 5842 "configure"
5842 #include "confdefs.h"
5843 /* Override any gcc2 internal prototype to avoid an error.  */
5844 /* We use char because int might match the return type of a gcc2
5845     builtin and then its argument prototype would still apply.  */
5846 char ssl3_accept();
5847
5848 int main() {
5849 ssl3_accept()
5850 ; return 0; }
5851 EOF
5852 if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5853   rm -rf conftest*
5854   eval "ac_cv_lib_$ac_lib_var=yes"
5855 else
5856   echo "configure: failed program was:" >&5
5857   cat conftest.$ac_ext >&5
5858   rm -rf conftest*
5859   eval "ac_cv_lib_$ac_lib_var=no"
5860 fi
5861 rm -f conftest*
5862 LIBS="$ac_save_LIBS"
5863
5864 fi
5865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5866   echo "$ac_t""yes" 1>&6
5867   have_ssleay=yes
5868                                 need_rsaref=yes
5869 else
5870   echo "$ac_t""no" 1>&6
5871 have_ssleay=no
5872 fi
5873
5874                 fi
5875
5876                 if test $have_ssleay = yes ; then
5877                         ol_with_tls=found
5878                         ol_link_tls=yes
5879
5880                         cat >> confdefs.h <<\EOF
5881 #define HAVE_SSLEAY 1
5882 EOF
5883
5884
5885                         if test $need_rsaref = yes; then
5886                                 cat >> confdefs.h <<\EOF
5887 #define HAVE_RSAREF 1
5888 EOF
5889
5890
5891                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5892                         else
5893                                 TLS_LIBS="-lssl -lcrypto"
5894                         fi
5895                 fi
5896         fi
5897 fi
5898
5899 if test $ol_link_tls = yes ; then
5900         cat >> confdefs.h <<\EOF
5901 #define HAVE_TLS 1
5902 EOF
5903
5904 fi      
5905
5906 for ac_func in \
5907         ctime_r                 \
5908         gethostbyname_r gethostbyaddr_r \
5909
5910 do
5911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5912 echo "configure:5913: checking for $ac_func" >&5
5913 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 /* System header to define __stub macros and hopefully few prototypes,
5920     which can conflict with char $ac_func(); below.  */
5921 #include <assert.h>
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 /* We use char because int might match the return type of a gcc2
5924     builtin and then its argument prototype would still apply.  */
5925 char $ac_func();
5926 char (*f)();
5927
5928 int main() {
5929
5930 /* The GNU C library defines this for functions which it implements
5931     to always fail with ENOSYS.  Some functions are actually named
5932     something starting with __ and the normal name is an alias.  */
5933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5934 choke me
5935 #else
5936 f = $ac_func;
5937 #endif
5938
5939 ; return 0; }
5940 EOF
5941 if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5942   rm -rf conftest*
5943   eval "ac_cv_func_$ac_func=yes"
5944 else
5945   echo "configure: failed program was:" >&5
5946   cat conftest.$ac_ext >&5
5947   rm -rf conftest*
5948   eval "ac_cv_func_$ac_func=no"
5949 fi
5950 rm -f conftest*
5951 fi
5952
5953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5954   echo "$ac_t""yes" 1>&6
5955     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5956   cat >> confdefs.h <<EOF
5957 #define $ac_tr_func 1
5958 EOF
5959  
5960 else
5961   echo "$ac_t""no" 1>&6
5962 fi
5963 done
5964
5965
5966 if test "$ac_cv_func_ctime_r" = no ; then
5967         ol_cv_func_ctime_r_nargs=0
5968 else
5969         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5970 echo "configure:5971: checking number of arguments of ctime_r" >&5
5971 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5972   echo $ac_n "(cached) $ac_c" 1>&6
5973 else
5974   cat > conftest.$ac_ext <<EOF
5975 #line 5976 "configure"
5976 #include "confdefs.h"
5977 #include <time.h>
5978 int main() {
5979 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5980 ; return 0; }
5981 EOF
5982 if { (eval echo configure:5983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5983   rm -rf conftest*
5984   ol_cv_func_ctime_r_nargs=3
5985 else
5986   echo "configure: failed program was:" >&5
5987   cat conftest.$ac_ext >&5
5988   rm -rf conftest*
5989   cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992 #include <time.h>
5993 int main() {
5994 time_t ti; char *buffer; ctime_r(&ti,buffer);
5995 ; return 0; }
5996 EOF
5997 if { (eval echo configure:5998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5998   rm -rf conftest*
5999   ol_cv_func_ctime_r_nargs=2
6000 else
6001   echo "configure: failed program was:" >&5
6002   cat conftest.$ac_ext >&5
6003   rm -rf conftest*
6004   ol_cv_func_ctime_r_nargs=0
6005 fi
6006 rm -f conftest*
6007 fi
6008 rm -f conftest*
6009 fi
6010
6011 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6012   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6013     cat >> confdefs.h <<EOF
6014 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6015 EOF
6016
6017   fi
6018
6019 fi
6020
6021 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6022         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6023 echo "configure:6024: checking number of arguments of gethostbyname_r" >&5
6024 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   cat > conftest.$ac_ext <<EOF
6028 #line 6029 "configure"
6029 #include "confdefs.h"
6030 #include <sys/types.h>
6031 #include <sys/socket.h>
6032 #include <netinet/in.h>
6033 #include <netdb.h>
6034 #define BUFSIZE (sizeof(struct hostent)+10)
6035 int main() {
6036 struct hostent hent; char buffer[BUFSIZE];
6037                 int bufsize=BUFSIZE;int h_errno;
6038                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6039                         buffer, bufsize, &h_errno);
6040 ; return 0; }
6041 EOF
6042 if { (eval echo configure:6043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6043   rm -rf conftest*
6044   ol_cv_func_gethostbyname_r_nargs=5
6045 else
6046   echo "configure: failed program was:" >&5
6047   cat conftest.$ac_ext >&5
6048   rm -rf conftest*
6049   cat > conftest.$ac_ext <<EOF
6050 #line 6051 "configure"
6051 #include "confdefs.h"
6052 #include <sys/types.h>
6053 #include <sys/socket.h>
6054 #include <netinet/in.h>
6055 #include <netdb.h>
6056 #define BUFSIZE (sizeof(struct hostent)+10)
6057 int main() {
6058 struct hostent hent;struct hostent *rhent;
6059                         char buffer[BUFSIZE];
6060                         int bufsize=BUFSIZE;int h_errno;
6061                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6062                                 &rhent, &h_errno);
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6066   rm -rf conftest*
6067   ol_cv_func_gethostbyname_r_nargs=6
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   ol_cv_func_gethostbyname_r_nargs=0
6073 fi
6074 rm -f conftest*
6075 fi
6076 rm -f conftest*
6077 fi
6078
6079 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6080   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6081         cat >> confdefs.h <<EOF
6082 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6083 EOF
6084
6085   fi
6086
6087 else
6088         ol_cv_func_gethostbyname_r_nargs=0
6089 fi
6090  
6091 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6092         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6093 echo "configure:6094: checking number of arguments of gethostbyaddr_r" >&5
6094 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 #include <sys/types.h>
6101 #include <sys/socket.h>
6102 #include <netinet/in.h>
6103 #include <netdb.h>
6104 #define BUFSIZE (sizeof(struct hostent)+10)
6105 int main() {
6106 struct hostent hent; char buffer[BUFSIZE]; 
6107             struct in_addr add;
6108             size_t alen=sizeof(struct in_addr);
6109             int bufsize=BUFSIZE;int h_errno;
6110                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6111                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6112 ; return 0; }
6113 EOF
6114 if { (eval echo configure:6115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6115   rm -rf conftest*
6116   ol_cv_func_gethostbyaddr_r_nargs=7
6117 else
6118   echo "configure: failed program was:" >&5
6119   cat conftest.$ac_ext >&5
6120   rm -rf conftest*
6121   cat > conftest.$ac_ext <<EOF
6122 #line 6123 "configure"
6123 #include "confdefs.h"
6124 #include <sys/types.h>
6125 #include <sys/socket.h>
6126 #include <netinet/in.h>
6127 #include <netdb.h>
6128 #define BUFSIZE (sizeof(struct hostent)+10)
6129 int main() {
6130 struct hostent hent;
6131                         struct hostent *rhent; char buffer[BUFSIZE]; 
6132                         struct in_addr add;
6133                         size_t alen=sizeof(struct in_addr);
6134                         int bufsize=BUFSIZE;int h_errno;
6135                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6136                                 alen, AF_INET, &hent, buffer, bufsize, 
6137                                 &rhent, &h_errno);
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6141   rm -rf conftest*
6142   ol_cv_func_gethostbyaddr_r_nargs=8
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   ol_cv_func_gethostbyaddr_r_nargs=0
6148 fi
6149 rm -f conftest*
6150 fi
6151 rm -f conftest*
6152 fi
6153
6154 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6155   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6156     cat >> confdefs.h <<EOF
6157 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6158 EOF
6159
6160   fi
6161
6162 else
6163         ol_cv_func_gethostbyaddr_r_nargs=0
6164 fi
6165
6166 if test "$ac_cv_func_ctime_r" = yes \
6167         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6168         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6169         -a "$ac_cv_func_gethostbyname_r" = yes \
6170         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6171         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6172         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6173         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6174         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6175         ; then
6176  
6177         cat >> confdefs.h <<\EOF
6178 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6179 EOF
6180
6181 fi
6182
6183 ol_link_threads=no
6184 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6185         -o $ol_with_threads = posix ; then
6186
6187         for ac_hdr in pthread.h sched.h
6188 do
6189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6191 echo "configure:6192: checking for $ac_hdr" >&5
6192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6193   echo $ac_n "(cached) $ac_c" 1>&6
6194 else
6195   cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198 #include <$ac_hdr>
6199 EOF
6200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6201 { (eval echo configure:6202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6203 if test -z "$ac_err"; then
6204   rm -rf conftest*
6205   eval "ac_cv_header_$ac_safe=yes"
6206 else
6207   echo "$ac_err" >&5
6208   echo "configure: failed program was:" >&5
6209   cat conftest.$ac_ext >&5
6210   rm -rf conftest*
6211   eval "ac_cv_header_$ac_safe=no"
6212 fi
6213 rm -f conftest*
6214 fi
6215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6216   echo "$ac_t""yes" 1>&6
6217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6218   cat >> confdefs.h <<EOF
6219 #define $ac_tr_hdr 1
6220 EOF
6221  
6222 else
6223   echo "$ac_t""no" 1>&6
6224 fi
6225 done
6226
6227
6228         if test $ac_cv_header_pthread_h = yes ; then
6229                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6230 echo "configure:6231: checking POSIX thread version" >&5
6231 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6232   echo $ac_n "(cached) $ac_c" 1>&6
6233 else
6234   
6235         cat > conftest.$ac_ext <<EOF
6236 #line 6237 "configure"
6237 #include "confdefs.h"
6238
6239 #               include <pthread.h>
6240                 /* this check could be improved */
6241 #               ifdef PTHREAD_ONCE_INIT
6242                         pthread_version_final
6243 #               endif
6244         
6245 EOF
6246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6247   egrep "pthread_version_final" >/dev/null 2>&1; then
6248   rm -rf conftest*
6249   ol_pthread_final=yes
6250 else
6251   rm -rf conftest*
6252   ol_pthread_final=no
6253 fi
6254 rm -f conftest*
6255
6256
6257         cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260
6261 #               include <pthread.h>
6262                 /* this check could be improved */
6263 #               ifdef pthread_once_init
6264                         pthread_version_draft4
6265 #               endif
6266         
6267 EOF
6268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6269   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6270   rm -rf conftest*
6271   ol_pthread_draft4=yes
6272 else
6273   rm -rf conftest*
6274   ol_pthread_draft4=no
6275 fi
6276 rm -f conftest*
6277
6278
6279         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6280                 ol_cv_pthread_version=final
6281         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6282                 ol_cv_pthread_version=draft4
6283         else
6284                 ol_cv_pthread_version=unknown
6285         fi
6286
6287 fi
6288
6289 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6290
6291
6292                 if test $ol_cv_pthread_version = final ; then
6293                         cat >> confdefs.h <<\EOF
6294 #define HAVE_PTHREADS_FINAL 1
6295 EOF
6296
6297                 elif test $ol_cv_pthread_version = draft4 ; then
6298                         cat >> confdefs.h <<\EOF
6299 #define HAVE_PTHREADS_D4 1
6300 EOF
6301
6302                 else
6303                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6304                 fi
6305
6306                 # consider threads found
6307                 ol_with_threads=found
6308
6309                 
6310         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6311 echo "configure:6312: checking for LinuxThreads pthread.h" >&5
6312 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6313   echo $ac_n "(cached) $ac_c" 1>&6
6314 else
6315   cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6318 #include <pthread.h>
6319 EOF
6320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6321   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6322   rm -rf conftest*
6323   ol_cv_header_linux_threads=yes
6324 else
6325   rm -rf conftest*
6326   ol_cv_header_linux_threads=no
6327 fi
6328 rm -f conftest*
6329
6330                 
6331 fi
6332
6333 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6334         if test $ol_cv_header_linux_threads = yes; then
6335                 cat >> confdefs.h <<\EOF
6336 #define HAVE_LINUX_THREADS 1
6337 EOF
6338
6339         fi
6340
6341
6342                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6343                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6344 echo "configure:6345: checking for pthread_create in default libraries" >&5
6345 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6346   echo $ac_n "(cached) $ac_c" 1>&6
6347 else
6348   
6349                 if test "$cross_compiling" = yes; then
6350                         ol_cv_pthread_create=yes
6351 else
6352   cat > conftest.$ac_ext <<EOF
6353 #line 6354 "configure"
6354 #include "confdefs.h"
6355
6356 #include <pthread.h>
6357 #ifndef NULL
6358 #define NULL (void*)0
6359 #endif
6360
6361 static void *task(p)
6362         void *p;
6363 {
6364         return (void *) (p == NULL);
6365 }
6366
6367 int main(argc, argv)
6368         int argc;
6369         char **argv;
6370 {
6371         pthread_t t;
6372         int status;
6373
6374         /* make sure pthread_create() isn't just a stub */
6375 #if HAVE_PTHREADS_D4
6376         status = pthread_create(&t, pthread_attr_default, task, NULL);
6377 #else
6378         status = pthread_create(&t, NULL, task, NULL);
6379 #endif
6380
6381         if( status ) return status;
6382
6383         /* make sure pthread_detach() isn't just a stub */
6384 #if HAVE_PTHREADS_D4
6385         status = pthread_detach( &t );
6386 #else
6387         status = pthread_detach( t );
6388 #endif
6389
6390         return status;
6391 }
6392
6393 EOF
6394 if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6395 then
6396   ol_cv_pthread_create=yes
6397 else
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -fr conftest*
6401   ol_cv_pthread_create=no
6402 fi
6403 rm -fr conftest*
6404 fi
6405
6406 fi
6407
6408 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6409
6410                 if test $ol_cv_pthread_create != no ; then
6411                         ol_link_threads=posix
6412                         ol_link_pthreads=""
6413                 fi
6414                 
6415                 # Pthread try link: -mt (ol_cv_pthread_mt)
6416         if test "$ol_link_threads" = no ; then
6417                 # try -mt
6418                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6419 echo "configure:6420: checking for pthread link with -mt" >&5
6420 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6421   echo $ac_n "(cached) $ac_c" 1>&6
6422 else
6423   
6424                         # save the flags
6425                         ol_LIBS="$LIBS"
6426                         LIBS="-mt $LIBS"
6427
6428                         cat > conftest.$ac_ext <<EOF
6429 #line 6430 "configure"
6430 #include "confdefs.h"
6431
6432 #include <pthread.h>
6433 #ifndef NULL
6434 #define NULL (void*)0
6435 #endif
6436
6437 int main() {
6438
6439         pthread_t t;
6440
6441 #if HAVE_PTHREADS_D4
6442         pthread_create(&t, pthread_attr_default, NULL, NULL);
6443         pthread_detach( &t );
6444 #else
6445         pthread_create(&t, NULL, NULL, NULL);
6446         pthread_detach( t );
6447 #endif
6448 #ifdef HAVE_LINUX_THREADS
6449         pthread_kill_other_threads_np();
6450 #endif
6451
6452 ; return 0; }
6453 EOF
6454 if { (eval echo configure:6455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6455   rm -rf conftest*
6456   ol_cv_pthread_mt=yes
6457 else
6458   echo "configure: failed program was:" >&5
6459   cat conftest.$ac_ext >&5
6460   rm -rf conftest*
6461   ol_cv_pthread_mt=no
6462 fi
6463 rm -f conftest*
6464
6465                 # restore the LIBS
6466                 LIBS="$ol_LIBS"
6467                 
6468 fi
6469
6470 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6471
6472                 if test $ol_cv_pthread_mt = yes ; then
6473                         ol_link_pthreads="-mt"
6474                         ol_link_threads=posix
6475                 fi
6476         fi
6477
6478                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6479         if test "$ol_link_threads" = no ; then
6480                 # try -kthread
6481                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6482 echo "configure:6483: checking for pthread link with -kthread" >&5
6483 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6484   echo $ac_n "(cached) $ac_c" 1>&6
6485 else
6486   
6487                         # save the flags
6488                         ol_LIBS="$LIBS"
6489                         LIBS="-kthread $LIBS"
6490
6491                         cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494
6495 #include <pthread.h>
6496 #ifndef NULL
6497 #define NULL (void*)0
6498 #endif
6499
6500 int main() {
6501
6502         pthread_t t;
6503
6504 #if HAVE_PTHREADS_D4
6505         pthread_create(&t, pthread_attr_default, NULL, NULL);
6506         pthread_detach( &t );
6507 #else
6508         pthread_create(&t, NULL, NULL, NULL);
6509         pthread_detach( t );
6510 #endif
6511 #ifdef HAVE_LINUX_THREADS
6512         pthread_kill_other_threads_np();
6513 #endif
6514
6515 ; return 0; }
6516 EOF
6517 if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6518   rm -rf conftest*
6519   ol_cv_pthread_kthread=yes
6520 else
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523   rm -rf conftest*
6524   ol_cv_pthread_kthread=no
6525 fi
6526 rm -f conftest*
6527
6528                 # restore the LIBS
6529                 LIBS="$ol_LIBS"
6530                 
6531 fi
6532
6533 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6534
6535                 if test $ol_cv_pthread_kthread = yes ; then
6536                         ol_link_pthreads="-kthread"
6537                         ol_link_threads=posix
6538                 fi
6539         fi
6540
6541                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6542         if test "$ol_link_threads" = no ; then
6543                 # try -pthread
6544                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6545 echo "configure:6546: checking for pthread link with -pthread" >&5
6546 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6547   echo $ac_n "(cached) $ac_c" 1>&6
6548 else
6549   
6550                         # save the flags
6551                         ol_LIBS="$LIBS"
6552                         LIBS="-pthread $LIBS"
6553
6554                         cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557
6558 #include <pthread.h>
6559 #ifndef NULL
6560 #define NULL (void*)0
6561 #endif
6562
6563 int main() {
6564
6565         pthread_t t;
6566
6567 #if HAVE_PTHREADS_D4
6568         pthread_create(&t, pthread_attr_default, NULL, NULL);
6569         pthread_detach( &t );
6570 #else
6571         pthread_create(&t, NULL, NULL, NULL);
6572         pthread_detach( t );
6573 #endif
6574 #ifdef HAVE_LINUX_THREADS
6575         pthread_kill_other_threads_np();
6576 #endif
6577
6578 ; return 0; }
6579 EOF
6580 if { (eval echo configure:6581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6581   rm -rf conftest*
6582   ol_cv_pthread_pthread=yes
6583 else
6584   echo "configure: failed program was:" >&5
6585   cat conftest.$ac_ext >&5
6586   rm -rf conftest*
6587   ol_cv_pthread_pthread=no
6588 fi
6589 rm -f conftest*
6590
6591                 # restore the LIBS
6592                 LIBS="$ol_LIBS"
6593                 
6594 fi
6595
6596 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6597
6598                 if test $ol_cv_pthread_pthread = yes ; then
6599                         ol_link_pthreads="-pthread"
6600                         ol_link_threads=posix
6601                 fi
6602         fi
6603
6604                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6605         if test "$ol_link_threads" = no ; then
6606                 # try -pthreads
6607                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6608 echo "configure:6609: checking for pthread link with -pthreads" >&5
6609 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6610   echo $ac_n "(cached) $ac_c" 1>&6
6611 else
6612   
6613                         # save the flags
6614                         ol_LIBS="$LIBS"
6615                         LIBS="-pthreads $LIBS"
6616
6617                         cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620
6621 #include <pthread.h>
6622 #ifndef NULL
6623 #define NULL (void*)0
6624 #endif
6625
6626 int main() {
6627
6628         pthread_t t;
6629
6630 #if HAVE_PTHREADS_D4
6631         pthread_create(&t, pthread_attr_default, NULL, NULL);
6632         pthread_detach( &t );
6633 #else
6634         pthread_create(&t, NULL, NULL, NULL);
6635         pthread_detach( t );
6636 #endif
6637 #ifdef HAVE_LINUX_THREADS
6638         pthread_kill_other_threads_np();
6639 #endif
6640
6641 ; return 0; }
6642 EOF
6643 if { (eval echo configure:6644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6644   rm -rf conftest*
6645   ol_cv_pthread_pthreads=yes
6646 else
6647   echo "configure: failed program was:" >&5
6648   cat conftest.$ac_ext >&5
6649   rm -rf conftest*
6650   ol_cv_pthread_pthreads=no
6651 fi
6652 rm -f conftest*
6653
6654                 # restore the LIBS
6655                 LIBS="$ol_LIBS"
6656                 
6657 fi
6658
6659 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6660
6661                 if test $ol_cv_pthread_pthreads = yes ; then
6662                         ol_link_pthreads="-pthreads"
6663                         ol_link_threads=posix
6664                 fi
6665         fi
6666
6667                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6668         if test "$ol_link_threads" = no ; then
6669                 # try -mthreads
6670                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6671 echo "configure:6672: checking for pthread link with -mthreads" >&5
6672 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6673   echo $ac_n "(cached) $ac_c" 1>&6
6674 else
6675   
6676                         # save the flags
6677                         ol_LIBS="$LIBS"
6678                         LIBS="-mthreads $LIBS"
6679
6680                         cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683
6684 #include <pthread.h>
6685 #ifndef NULL
6686 #define NULL (void*)0
6687 #endif
6688
6689 int main() {
6690
6691         pthread_t t;
6692
6693 #if HAVE_PTHREADS_D4
6694         pthread_create(&t, pthread_attr_default, NULL, NULL);
6695         pthread_detach( &t );
6696 #else
6697         pthread_create(&t, NULL, NULL, NULL);
6698         pthread_detach( t );
6699 #endif
6700 #ifdef HAVE_LINUX_THREADS
6701         pthread_kill_other_threads_np();
6702 #endif
6703
6704 ; return 0; }
6705 EOF
6706 if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6707   rm -rf conftest*
6708   ol_cv_pthread_mthreads=yes
6709 else
6710   echo "configure: failed program was:" >&5
6711   cat conftest.$ac_ext >&5
6712   rm -rf conftest*
6713   ol_cv_pthread_mthreads=no
6714 fi
6715 rm -f conftest*
6716
6717                 # restore the LIBS
6718                 LIBS="$ol_LIBS"
6719                 
6720 fi
6721
6722 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6723
6724                 if test $ol_cv_pthread_mthreads = yes ; then
6725                         ol_link_pthreads="-mthreads"
6726                         ol_link_threads=posix
6727                 fi
6728         fi
6729
6730                 # Pthread try link: -thread (ol_cv_pthread_thread)
6731         if test "$ol_link_threads" = no ; then
6732                 # try -thread
6733                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6734 echo "configure:6735: checking for pthread link with -thread" >&5
6735 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6736   echo $ac_n "(cached) $ac_c" 1>&6
6737 else
6738   
6739                         # save the flags
6740                         ol_LIBS="$LIBS"
6741                         LIBS="-thread $LIBS"
6742
6743                         cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746
6747 #include <pthread.h>
6748 #ifndef NULL
6749 #define NULL (void*)0
6750 #endif
6751
6752 int main() {
6753
6754         pthread_t t;
6755
6756 #if HAVE_PTHREADS_D4
6757         pthread_create(&t, pthread_attr_default, NULL, NULL);
6758         pthread_detach( &t );
6759 #else
6760         pthread_create(&t, NULL, NULL, NULL);
6761         pthread_detach( t );
6762 #endif
6763 #ifdef HAVE_LINUX_THREADS
6764         pthread_kill_other_threads_np();
6765 #endif
6766
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   ol_cv_pthread_thread=yes
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   ol_cv_pthread_thread=no
6777 fi
6778 rm -f conftest*
6779
6780                 # restore the LIBS
6781                 LIBS="$ol_LIBS"
6782                 
6783 fi
6784
6785 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6786
6787                 if test $ol_cv_pthread_thread = yes ; then
6788                         ol_link_pthreads="-thread"
6789                         ol_link_threads=posix
6790                 fi
6791         fi
6792
6793
6794                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6795         if test "$ol_link_threads" = no ; then
6796                 # try -lpthread -lmach -lexc -lc_r
6797                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6798 echo "configure:6799: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6799 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6800   echo $ac_n "(cached) $ac_c" 1>&6
6801 else
6802   
6803                         # save the flags
6804                         ol_LIBS="$LIBS"
6805                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6806
6807                         cat > conftest.$ac_ext <<EOF
6808 #line 6809 "configure"
6809 #include "confdefs.h"
6810
6811 #include <pthread.h>
6812 #ifndef NULL
6813 #define NULL (void*)0
6814 #endif
6815
6816 int main() {
6817
6818         pthread_t t;
6819
6820 #if HAVE_PTHREADS_D4
6821         pthread_create(&t, pthread_attr_default, NULL, NULL);
6822         pthread_detach( &t );
6823 #else
6824         pthread_create(&t, NULL, NULL, NULL);
6825         pthread_detach( t );
6826 #endif
6827 #ifdef HAVE_LINUX_THREADS
6828         pthread_kill_other_threads_np();
6829 #endif
6830
6831 ; return 0; }
6832 EOF
6833 if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6834   rm -rf conftest*
6835   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6836 else
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6841 fi
6842 rm -f conftest*
6843
6844                 # restore the LIBS
6845                 LIBS="$ol_LIBS"
6846                 
6847 fi
6848
6849 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6850
6851                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6852                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6853                         ol_link_threads=posix
6854                 fi
6855         fi
6856
6857                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6858         if test "$ol_link_threads" = no ; then
6859                 # try -lpthread -lmach -lexc
6860                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6861 echo "configure:6862: checking for pthread link with -lpthread -lmach -lexc" >&5
6862 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6863   echo $ac_n "(cached) $ac_c" 1>&6
6864 else
6865   
6866                         # save the flags
6867                         ol_LIBS="$LIBS"
6868                         LIBS="-lpthread -lmach -lexc $LIBS"
6869
6870                         cat > conftest.$ac_ext <<EOF
6871 #line 6872 "configure"
6872 #include "confdefs.h"
6873
6874 #include <pthread.h>
6875 #ifndef NULL
6876 #define NULL (void*)0
6877 #endif
6878
6879 int main() {
6880
6881         pthread_t t;
6882
6883 #if HAVE_PTHREADS_D4
6884         pthread_create(&t, pthread_attr_default, NULL, NULL);
6885         pthread_detach( &t );
6886 #else
6887         pthread_create(&t, NULL, NULL, NULL);
6888         pthread_detach( t );
6889 #endif
6890 #ifdef HAVE_LINUX_THREADS
6891         pthread_kill_other_threads_np();
6892 #endif
6893
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   ol_cv_pthread_lpthread_lmach_lexc=yes
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   ol_cv_pthread_lpthread_lmach_lexc=no
6904 fi
6905 rm -f conftest*
6906
6907                 # restore the LIBS
6908                 LIBS="$ol_LIBS"
6909                 
6910 fi
6911
6912 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6913
6914                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6915                         ol_link_pthreads="-lpthread -lmach -lexc"
6916                         ol_link_threads=posix
6917                 fi
6918         fi
6919
6920
6921                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6922         if test "$ol_link_threads" = no ; then
6923                 # try -lpthread -Wl,-woff,85
6924                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6925 echo "configure:6926: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6926 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6927   echo $ac_n "(cached) $ac_c" 1>&6
6928 else
6929   
6930                         # save the flags
6931                         ol_LIBS="$LIBS"
6932                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6933
6934                         cat > conftest.$ac_ext <<EOF
6935 #line 6936 "configure"
6936 #include "confdefs.h"
6937
6938 #include <pthread.h>
6939 #ifndef NULL
6940 #define NULL (void*)0
6941 #endif
6942
6943 int main() {
6944
6945         pthread_t t;
6946
6947 #if HAVE_PTHREADS_D4
6948         pthread_create(&t, pthread_attr_default, NULL, NULL);
6949         pthread_detach( &t );
6950 #else
6951         pthread_create(&t, NULL, NULL, NULL);
6952         pthread_detach( t );
6953 #endif
6954 #ifdef HAVE_LINUX_THREADS
6955         pthread_kill_other_threads_np();
6956 #endif
6957
6958 ; return 0; }
6959 EOF
6960 if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6961   rm -rf conftest*
6962   ol_cv_pthread_lib_lpthread_woff=yes
6963 else
6964   echo "configure: failed program was:" >&5
6965   cat conftest.$ac_ext >&5
6966   rm -rf conftest*
6967   ol_cv_pthread_lib_lpthread_woff=no
6968 fi
6969 rm -f conftest*
6970
6971                 # restore the LIBS
6972                 LIBS="$ol_LIBS"
6973                 
6974 fi
6975
6976 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6977
6978                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6979                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6980                         ol_link_threads=posix
6981                 fi
6982         fi
6983
6984
6985                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6986         if test "$ol_link_threads" = no ; then
6987                 # try -lpthread
6988                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6989 echo "configure:6990: checking for pthread link with -lpthread" >&5
6990 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6991   echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993   
6994                         # save the flags
6995                         ol_LIBS="$LIBS"
6996                         LIBS="-lpthread $LIBS"
6997
6998                         cat > conftest.$ac_ext <<EOF
6999 #line 7000 "configure"
7000 #include "confdefs.h"
7001
7002 #include <pthread.h>
7003 #ifndef NULL
7004 #define NULL (void*)0
7005 #endif
7006
7007 int main() {
7008
7009         pthread_t t;
7010
7011 #if HAVE_PTHREADS_D4
7012         pthread_create(&t, pthread_attr_default, NULL, NULL);
7013         pthread_detach( &t );
7014 #else
7015         pthread_create(&t, NULL, NULL, NULL);
7016         pthread_detach( t );
7017 #endif
7018 #ifdef HAVE_LINUX_THREADS
7019         pthread_kill_other_threads_np();
7020 #endif
7021
7022 ; return 0; }
7023 EOF
7024 if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7025   rm -rf conftest*
7026   ol_cv_pthread_lpthread=yes
7027 else
7028   echo "configure: failed program was:" >&5
7029   cat conftest.$ac_ext >&5
7030   rm -rf conftest*
7031   ol_cv_pthread_lpthread=no
7032 fi
7033 rm -f conftest*
7034
7035                 # restore the LIBS
7036                 LIBS="$ol_LIBS"
7037                 
7038 fi
7039
7040 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7041
7042                 if test $ol_cv_pthread_lpthread = yes ; then
7043                         ol_link_pthreads="-lpthread"
7044                         ol_link_threads=posix
7045                 fi
7046         fi
7047
7048                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7049         if test "$ol_link_threads" = no ; then
7050                 # try -lc_r
7051                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7052 echo "configure:7053: checking for pthread link with -lc_r" >&5
7053 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7054   echo $ac_n "(cached) $ac_c" 1>&6
7055 else
7056   
7057                         # save the flags
7058                         ol_LIBS="$LIBS"
7059                         LIBS="-lc_r $LIBS"
7060
7061                         cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064
7065 #include <pthread.h>
7066 #ifndef NULL
7067 #define NULL (void*)0
7068 #endif
7069
7070 int main() {
7071
7072         pthread_t t;
7073
7074 #if HAVE_PTHREADS_D4
7075         pthread_create(&t, pthread_attr_default, NULL, NULL);
7076         pthread_detach( &t );
7077 #else
7078         pthread_create(&t, NULL, NULL, NULL);
7079         pthread_detach( t );
7080 #endif
7081 #ifdef HAVE_LINUX_THREADS
7082         pthread_kill_other_threads_np();
7083 #endif
7084
7085 ; return 0; }
7086 EOF
7087 if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7088   rm -rf conftest*
7089   ol_cv_pthread_lc_r=yes
7090 else
7091   echo "configure: failed program was:" >&5
7092   cat conftest.$ac_ext >&5
7093   rm -rf conftest*
7094   ol_cv_pthread_lc_r=no
7095 fi
7096 rm -f conftest*
7097
7098                 # restore the LIBS
7099                 LIBS="$ol_LIBS"
7100                 
7101 fi
7102
7103 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
7104
7105                 if test $ol_cv_pthread_lc_r = yes ; then
7106                         ol_link_pthreads="-lc_r"
7107                         ol_link_threads=posix
7108                 fi
7109         fi
7110
7111
7112                 # Pthread try link: -threads (ol_cv_pthread_threads)
7113         if test "$ol_link_threads" = no ; then
7114                 # try -threads
7115                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
7116 echo "configure:7117: checking for pthread link with -threads" >&5
7117 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
7118   echo $ac_n "(cached) $ac_c" 1>&6
7119 else
7120   
7121                         # save the flags
7122                         ol_LIBS="$LIBS"
7123                         LIBS="-threads $LIBS"
7124
7125                         cat > conftest.$ac_ext <<EOF
7126 #line 7127 "configure"
7127 #include "confdefs.h"
7128
7129 #include <pthread.h>
7130 #ifndef NULL
7131 #define NULL (void*)0
7132 #endif
7133
7134 int main() {
7135
7136         pthread_t t;
7137
7138 #if HAVE_PTHREADS_D4
7139         pthread_create(&t, pthread_attr_default, NULL, NULL);
7140         pthread_detach( &t );
7141 #else
7142         pthread_create(&t, NULL, NULL, NULL);
7143         pthread_detach( t );
7144 #endif
7145 #ifdef HAVE_LINUX_THREADS
7146         pthread_kill_other_threads_np();
7147 #endif
7148
7149 ; return 0; }
7150 EOF
7151 if { (eval echo configure:7152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7152   rm -rf conftest*
7153   ol_cv_pthread_threads=yes
7154 else
7155   echo "configure: failed program was:" >&5
7156   cat conftest.$ac_ext >&5
7157   rm -rf conftest*
7158   ol_cv_pthread_threads=no
7159 fi
7160 rm -f conftest*
7161
7162                 # restore the LIBS
7163                 LIBS="$ol_LIBS"
7164                 
7165 fi
7166
7167 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7168
7169                 if test $ol_cv_pthread_threads = yes ; then
7170                         ol_link_pthreads="-threads"
7171                         ol_link_threads=posix
7172                 fi
7173         fi
7174
7175
7176                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7177         if test "$ol_link_threads" = no ; then
7178                 # try -lpthreads -lmach -lexc -lc_r
7179                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7180 echo "configure:7181: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7181 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
7182   echo $ac_n "(cached) $ac_c" 1>&6
7183 else
7184   
7185                         # save the flags
7186                         ol_LIBS="$LIBS"
7187                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7188
7189                         cat > conftest.$ac_ext <<EOF
7190 #line 7191 "configure"
7191 #include "confdefs.h"
7192
7193 #include <pthread.h>
7194 #ifndef NULL
7195 #define NULL (void*)0
7196 #endif
7197
7198 int main() {
7199
7200         pthread_t t;
7201
7202 #if HAVE_PTHREADS_D4
7203         pthread_create(&t, pthread_attr_default, NULL, NULL);
7204         pthread_detach( &t );
7205 #else
7206         pthread_create(&t, NULL, NULL, NULL);
7207         pthread_detach( t );
7208 #endif
7209 #ifdef HAVE_LINUX_THREADS
7210         pthread_kill_other_threads_np();
7211 #endif
7212
7213 ; return 0; }
7214 EOF
7215 if { (eval echo configure:7216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7216   rm -rf conftest*
7217   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7218 else
7219   echo "configure: failed program was:" >&5
7220   cat conftest.$ac_ext >&5
7221   rm -rf conftest*
7222   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7223 fi
7224 rm -f conftest*
7225
7226                 # restore the LIBS
7227                 LIBS="$ol_LIBS"
7228                 
7229 fi
7230
7231 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7232
7233                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7234                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7235                         ol_link_threads=posix
7236                 fi
7237         fi
7238
7239                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7240         if test "$ol_link_threads" = no ; then
7241                 # try -lpthreads -lmach -lexc
7242                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7243 echo "configure:7244: checking for pthread link with -lpthreads -lmach -lexc" >&5
7244 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
7245   echo $ac_n "(cached) $ac_c" 1>&6
7246 else
7247   
7248                         # save the flags
7249                         ol_LIBS="$LIBS"
7250                         LIBS="-lpthreads -lmach -lexc $LIBS"
7251
7252                         cat > conftest.$ac_ext <<EOF
7253 #line 7254 "configure"
7254 #include "confdefs.h"
7255
7256 #include <pthread.h>
7257 #ifndef NULL
7258 #define NULL (void*)0
7259 #endif
7260
7261 int main() {
7262
7263         pthread_t t;
7264
7265 #if HAVE_PTHREADS_D4
7266         pthread_create(&t, pthread_attr_default, NULL, NULL);
7267         pthread_detach( &t );
7268 #else
7269         pthread_create(&t, NULL, NULL, NULL);
7270         pthread_detach( t );
7271 #endif
7272 #ifdef HAVE_LINUX_THREADS
7273         pthread_kill_other_threads_np();
7274 #endif
7275
7276 ; return 0; }
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279   rm -rf conftest*
7280   ol_cv_pthread_lpthreads_lmach_lexc=yes
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -rf conftest*
7285   ol_cv_pthread_lpthreads_lmach_lexc=no
7286 fi
7287 rm -f conftest*
7288
7289                 # restore the LIBS
7290                 LIBS="$ol_LIBS"
7291                 
7292 fi
7293
7294 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7295
7296                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7297                         ol_link_pthreads="-lpthreads -lmach -lexc"
7298                         ol_link_threads=posix
7299                 fi
7300         fi
7301
7302                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7303         if test "$ol_link_threads" = no ; then
7304                 # try -lpthreads -lexc
7305                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7306 echo "configure:7307: checking for pthread link with -lpthreads -lexc" >&5
7307 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
7308   echo $ac_n "(cached) $ac_c" 1>&6
7309 else
7310   
7311                         # save the flags
7312                         ol_LIBS="$LIBS"
7313                         LIBS="-lpthreads -lexc $LIBS"
7314
7315                         cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318
7319 #include <pthread.h>
7320 #ifndef NULL
7321 #define NULL (void*)0
7322 #endif
7323
7324 int main() {
7325
7326         pthread_t t;
7327
7328 #if HAVE_PTHREADS_D4
7329         pthread_create(&t, pthread_attr_default, NULL, NULL);
7330         pthread_detach( &t );
7331 #else
7332         pthread_create(&t, NULL, NULL, NULL);
7333         pthread_detach( t );
7334 #endif
7335 #ifdef HAVE_LINUX_THREADS
7336         pthread_kill_other_threads_np();
7337 #endif
7338
7339 ; return 0; }
7340 EOF
7341 if { (eval echo configure:7342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7342   rm -rf conftest*
7343   ol_cv_pthread_lpthreads_lexc=yes
7344 else
7345   echo "configure: failed program was:" >&5
7346   cat conftest.$ac_ext >&5
7347   rm -rf conftest*
7348   ol_cv_pthread_lpthreads_lexc=no
7349 fi
7350 rm -f conftest*
7351
7352                 # restore the LIBS
7353                 LIBS="$ol_LIBS"
7354                 
7355 fi
7356
7357 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7358
7359                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7360                         ol_link_pthreads="-lpthreads -lexc"
7361                         ol_link_threads=posix
7362                 fi
7363         fi
7364
7365
7366                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7367         if test "$ol_link_threads" = no ; then
7368                 # try -lpthreads
7369                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7370 echo "configure:7371: checking for pthread link with -lpthreads" >&5
7371 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
7372   echo $ac_n "(cached) $ac_c" 1>&6
7373 else
7374   
7375                         # save the flags
7376                         ol_LIBS="$LIBS"
7377                         LIBS="-lpthreads $LIBS"
7378
7379                         cat > conftest.$ac_ext <<EOF
7380 #line 7381 "configure"
7381 #include "confdefs.h"
7382
7383 #include <pthread.h>
7384 #ifndef NULL
7385 #define NULL (void*)0
7386 #endif
7387
7388 int main() {
7389
7390         pthread_t t;
7391
7392 #if HAVE_PTHREADS_D4
7393         pthread_create(&t, pthread_attr_default, NULL, NULL);
7394         pthread_detach( &t );
7395 #else
7396         pthread_create(&t, NULL, NULL, NULL);
7397         pthread_detach( t );
7398 #endif
7399 #ifdef HAVE_LINUX_THREADS
7400         pthread_kill_other_threads_np();
7401 #endif
7402
7403 ; return 0; }
7404 EOF
7405 if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7406   rm -rf conftest*
7407   ol_cv_pthread_lib_lpthreads=yes
7408 else
7409   echo "configure: failed program was:" >&5
7410   cat conftest.$ac_ext >&5
7411   rm -rf conftest*
7412   ol_cv_pthread_lib_lpthreads=no
7413 fi
7414 rm -f conftest*
7415
7416                 # restore the LIBS
7417                 LIBS="$ol_LIBS"
7418                 
7419 fi
7420
7421 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7422
7423                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7424                         ol_link_pthreads="-lpthreads"
7425                         ol_link_threads=posix
7426                 fi
7427         fi
7428
7429
7430                 if test $ol_link_threads != no ; then
7431                         cat >> confdefs.h <<\EOF
7432 #define HAVE_PTHREADS 1
7433 EOF
7434
7435
7436                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7437
7438                                                 save_CPPFLAGS="$CPPFLAGS"
7439                         save_LIBS="$LIBS"
7440                         LIBS="$LTHREAD_LIBS $LIBS"
7441
7442                                                                                                 for ac_func in sched_yield pthread_yield
7443 do
7444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7445 echo "configure:7446: checking for $ac_func" >&5
7446 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7447   echo $ac_n "(cached) $ac_c" 1>&6
7448 else
7449   cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* System header to define __stub macros and hopefully few prototypes,
7453     which can conflict with char $ac_func(); below.  */
7454 #include <assert.h>
7455 /* Override any gcc2 internal prototype to avoid an error.  */
7456 /* We use char because int might match the return type of a gcc2
7457     builtin and then its argument prototype would still apply.  */
7458 char $ac_func();
7459 char (*f)();
7460
7461 int main() {
7462
7463 /* The GNU C library defines this for functions which it implements
7464     to always fail with ENOSYS.  Some functions are actually named
7465     something starting with __ and the normal name is an alias.  */
7466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7467 choke me
7468 #else
7469 f = $ac_func;
7470 #endif
7471
7472 ; return 0; }
7473 EOF
7474 if { (eval echo configure:7475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7475   rm -rf conftest*
7476   eval "ac_cv_func_$ac_func=yes"
7477 else
7478   echo "configure: failed program was:" >&5
7479   cat conftest.$ac_ext >&5
7480   rm -rf conftest*
7481   eval "ac_cv_func_$ac_func=no"
7482 fi
7483 rm -f conftest*
7484 fi
7485
7486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7487   echo "$ac_t""yes" 1>&6
7488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7489   cat >> confdefs.h <<EOF
7490 #define $ac_tr_func 1
7491 EOF
7492  
7493 else
7494   echo "$ac_t""no" 1>&6
7495 fi
7496 done
7497
7498
7499                         if test $ac_cv_func_sched_yield = no -a \
7500                                 $ac_cv_func_pthread_yield = no ; then
7501                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7502 echo "configure:7503: checking for sched_yield in -lrt" >&5
7503 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7505   echo $ac_n "(cached) $ac_c" 1>&6
7506 else
7507   ac_save_LIBS="$LIBS"
7508 LIBS="-lrt  $LIBS"
7509 cat > conftest.$ac_ext <<EOF
7510 #line 7511 "configure"
7511 #include "confdefs.h"
7512 /* Override any gcc2 internal prototype to avoid an error.  */
7513 /* We use char because int might match the return type of a gcc2
7514     builtin and then its argument prototype would still apply.  */
7515 char sched_yield();
7516
7517 int main() {
7518 sched_yield()
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7522   rm -rf conftest*
7523   eval "ac_cv_lib_$ac_lib_var=yes"
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   eval "ac_cv_lib_$ac_lib_var=no"
7529 fi
7530 rm -f conftest*
7531 LIBS="$ac_save_LIBS"
7532
7533 fi
7534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7535   echo "$ac_t""yes" 1>&6
7536   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7537                                         cat >> confdefs.h <<\EOF
7538 #define HAVE_SCHED_YIELD 1
7539 EOF
7540
7541                                         ac_cv_func_sched_yield=yes
7542 else
7543   echo "$ac_t""no" 1>&6
7544 ac_cv_func_sched_yield=no
7545 fi
7546
7547                         fi
7548                         if test $ac_cv_func_sched_yield = no -a \
7549                                 $ac_cv_func_pthread_yield = no ; then
7550                                                                                                 for ac_func in thr_yield
7551 do
7552 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7553 echo "configure:7554: checking for $ac_func" >&5
7554 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7555   echo $ac_n "(cached) $ac_c" 1>&6
7556 else
7557   cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 /* System header to define __stub macros and hopefully few prototypes,
7561     which can conflict with char $ac_func(); below.  */
7562 #include <assert.h>
7563 /* Override any gcc2 internal prototype to avoid an error.  */
7564 /* We use char because int might match the return type of a gcc2
7565     builtin and then its argument prototype would still apply.  */
7566 char $ac_func();
7567 char (*f)();
7568
7569 int main() {
7570
7571 /* The GNU C library defines this for functions which it implements
7572     to always fail with ENOSYS.  Some functions are actually named
7573     something starting with __ and the normal name is an alias.  */
7574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7575 choke me
7576 #else
7577 f = $ac_func;
7578 #endif
7579
7580 ; return 0; }
7581 EOF
7582 if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7583   rm -rf conftest*
7584   eval "ac_cv_func_$ac_func=yes"
7585 else
7586   echo "configure: failed program was:" >&5
7587   cat conftest.$ac_ext >&5
7588   rm -rf conftest*
7589   eval "ac_cv_func_$ac_func=no"
7590 fi
7591 rm -f conftest*
7592 fi
7593
7594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7597   cat >> confdefs.h <<EOF
7598 #define $ac_tr_func 1
7599 EOF
7600  
7601 else
7602   echo "$ac_t""no" 1>&6
7603 fi
7604 done
7605
7606                         fi
7607                         if test $ac_cv_func_sched_yield = no -a \
7608                                 $ac_cv_func_pthread_yield = no -a \
7609                                 "$ac_cv_func_thr_yield" = no ; then
7610                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7611                         fi
7612
7613                                                 for ac_func in pthread_kill
7614 do
7615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7616 echo "configure:7617: checking for $ac_func" >&5
7617 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7618   echo $ac_n "(cached) $ac_c" 1>&6
7619 else
7620   cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 /* System header to define __stub macros and hopefully few prototypes,
7624     which can conflict with char $ac_func(); below.  */
7625 #include <assert.h>
7626 /* Override any gcc2 internal prototype to avoid an error.  */
7627 /* We use char because int might match the return type of a gcc2
7628     builtin and then its argument prototype would still apply.  */
7629 char $ac_func();
7630 char (*f)();
7631
7632 int main() {
7633
7634 /* The GNU C library defines this for functions which it implements
7635     to always fail with ENOSYS.  Some functions are actually named
7636     something starting with __ and the normal name is an alias.  */
7637 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7638 choke me
7639 #else
7640 f = $ac_func;
7641 #endif
7642
7643 ; return 0; }
7644 EOF
7645 if { (eval echo configure:7646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7646   rm -rf conftest*
7647   eval "ac_cv_func_$ac_func=yes"
7648 else
7649   echo "configure: failed program was:" >&5
7650   cat conftest.$ac_ext >&5
7651   rm -rf conftest*
7652   eval "ac_cv_func_$ac_func=no"
7653 fi
7654 rm -f conftest*
7655 fi
7656
7657 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7658   echo "$ac_t""yes" 1>&6
7659     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7660   cat >> confdefs.h <<EOF
7661 #define $ac_tr_func 1
7662 EOF
7663  
7664 else
7665   echo "$ac_t""no" 1>&6
7666 fi
7667 done
7668
7669
7670                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7671 echo "configure:7672: checking for pthread_detach with <pthread.h>" >&5
7672 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7673   echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675   
7676                                                                 cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679
7680 #include <pthread.h>
7681 #ifndef NULL
7682 #define NULL (void*)0
7683 #endif
7684
7685 int main() {
7686 pthread_detach(NULL);
7687 ; return 0; }
7688 EOF
7689 if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7690   rm -rf conftest*
7691   ol_cv_func_pthread_detach=yes
7692 else
7693   echo "configure: failed program was:" >&5
7694   cat conftest.$ac_ext >&5
7695   rm -rf conftest*
7696   ol_cv_func_pthread_detach=no
7697 fi
7698 rm -f conftest*
7699                         
7700 fi
7701
7702 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7703
7704                         if test $ol_cv_func_pthread_detach = no ; then
7705                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7706                         fi
7707
7708                         cat >> confdefs.h <<\EOF
7709 #define HAVE_PTHREAD_DETACH 1
7710 EOF
7711
7712
7713                                                 for ac_func in \
7714                                 pthread_setconcurrency \
7715                                 pthread_getconcurrency \
7716                                 thr_setconcurrency \
7717                                 thr_getconcurrency \
7718                         
7719 do
7720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7721 echo "configure:7722: checking for $ac_func" >&5
7722 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7723   echo $ac_n "(cached) $ac_c" 1>&6
7724 else
7725   cat > conftest.$ac_ext <<EOF
7726 #line 7727 "configure"
7727 #include "confdefs.h"
7728 /* System header to define __stub macros and hopefully few prototypes,
7729     which can conflict with char $ac_func(); below.  */
7730 #include <assert.h>
7731 /* Override any gcc2 internal prototype to avoid an error.  */
7732 /* We use char because int might match the return type of a gcc2
7733     builtin and then its argument prototype would still apply.  */
7734 char $ac_func();
7735 char (*f)();
7736
7737 int main() {
7738
7739 /* The GNU C library defines this for functions which it implements
7740     to always fail with ENOSYS.  Some functions are actually named
7741     something starting with __ and the normal name is an alias.  */
7742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7743 choke me
7744 #else
7745 f = $ac_func;
7746 #endif
7747
7748 ; return 0; }
7749 EOF
7750 if { (eval echo configure:7751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7751   rm -rf conftest*
7752   eval "ac_cv_func_$ac_func=yes"
7753 else
7754   echo "configure: failed program was:" >&5
7755   cat conftest.$ac_ext >&5
7756   rm -rf conftest*
7757   eval "ac_cv_func_$ac_func=no"
7758 fi
7759 rm -f conftest*
7760 fi
7761
7762 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7763   echo "$ac_t""yes" 1>&6
7764     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7765   cat >> confdefs.h <<EOF
7766 #define $ac_tr_func 1
7767 EOF
7768  
7769 else
7770   echo "$ac_t""no" 1>&6
7771 fi
7772 done
7773
7774
7775                         
7776         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7777 echo "configure:7778: checking for pthread_kill_other_threads_np" >&5
7778 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7779   echo $ac_n "(cached) $ac_c" 1>&6
7780 else
7781   cat > conftest.$ac_ext <<EOF
7782 #line 7783 "configure"
7783 #include "confdefs.h"
7784 /* System header to define __stub macros and hopefully few prototypes,
7785     which can conflict with char pthread_kill_other_threads_np(); below.  */
7786 #include <assert.h>
7787 /* Override any gcc2 internal prototype to avoid an error.  */
7788 /* We use char because int might match the return type of a gcc2
7789     builtin and then its argument prototype would still apply.  */
7790 char pthread_kill_other_threads_np();
7791 char (*f)();
7792
7793 int main() {
7794
7795 /* The GNU C library defines this for functions which it implements
7796     to always fail with ENOSYS.  Some functions are actually named
7797     something starting with __ and the normal name is an alias.  */
7798 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7799 choke me
7800 #else
7801 f = pthread_kill_other_threads_np;
7802 #endif
7803
7804 ; return 0; }
7805 EOF
7806 if { (eval echo configure:7807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7807   rm -rf conftest*
7808   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7809 else
7810   echo "configure: failed program was:" >&5
7811   cat conftest.$ac_ext >&5
7812   rm -rf conftest*
7813   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7814 fi
7815 rm -f conftest*
7816 fi
7817
7818 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7819   echo "$ac_t""yes" 1>&6
7820   :
7821 else
7822   echo "$ac_t""no" 1>&6
7823 fi
7824
7825         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7826 echo "configure:7827: checking for LinuxThreads implementation" >&5
7827 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7828   echo $ac_n "(cached) $ac_c" 1>&6
7829 else
7830   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7831 fi
7832
7833 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7834
7835                         
7836         
7837         
7838         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7839 echo "configure:7840: checking for LinuxThreads consistency" >&5
7840 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7841   echo $ac_n "(cached) $ac_c" 1>&6
7842 else
7843   
7844                 if test $ol_cv_header_linux_threads = yes -a \
7845                         $ol_cv_sys_linux_threads = yes; then
7846                         ol_cv_linux_threads=yes
7847                 elif test $ol_cv_header_linux_threads = no -a \
7848                         $ol_cv_sys_linux_threads = no; then
7849                         ol_cv_linux_threads=no
7850                 else
7851                         ol_cv_linux_threads=error
7852                 fi
7853         
7854 fi
7855
7856 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7857
7858
7859                         if test $ol_cv_linux_threads = error; then
7860                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7861                         fi
7862
7863                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7864 echo "configure:7865: checking if pthread_create() works" >&5
7865 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7866   echo $ac_n "(cached) $ac_c" 1>&6
7867 else
7868   
7869                         if test "$cross_compiling" = yes; then
7870                                 ol_cv_pthread_create_works=yes
7871 else
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875
7876 #include <pthread.h>
7877 #ifndef NULL
7878 #define NULL (void*)0
7879 #endif
7880
7881 static void *task(p)
7882         void *p;
7883 {
7884         return (void *) (p == NULL);
7885 }
7886
7887 int main(argc, argv)
7888         int argc;
7889         char **argv;
7890 {
7891         pthread_t t;
7892 #if HAVE_PTHREADS_D4
7893         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7894 #else
7895         exit(pthread_create(&t, NULL, task, NULL));
7896 #endif
7897 }
7898
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7901 then
7902   ol_cv_pthread_create_works=yes
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -fr conftest*
7907   ol_cv_pthread_create_works=no
7908 fi
7909 rm -fr conftest*
7910 fi
7911
7912 fi
7913
7914 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7915
7916                         if test $ol_cv_pthread_create_works = no ; then
7917                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7918                         fi
7919
7920                                                 if test $ol_with_yielding_select = auto ; then
7921                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7922 echo "configure:7923: checking if select yields when using pthreads" >&5
7923 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7924   echo $ac_n "(cached) $ac_c" 1>&6
7925 else
7926   
7927                                 if test "$cross_compiling" = yes; then
7928   ol_cv_pthread_select_yields=cross
7929 else
7930   cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933
7934 #include <sys/types.h>
7935 #include <sys/time.h>
7936 #include <unistd.h>
7937 #include <pthread.h>
7938 #ifndef NULL
7939 #define NULL (void*) 0
7940 #endif
7941
7942 static int fildes[2];
7943
7944 static void *task(p)
7945         void *p;
7946 {
7947         int i;
7948         struct timeval tv;
7949
7950         fd_set rfds;
7951
7952         tv.tv_sec=10;
7953         tv.tv_usec=0;
7954
7955         FD_ZERO(&rfds);
7956         FD_SET(fildes[0], &rfds);
7957
7958         /* we're not interested in any fds */
7959         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7960
7961         if(i < 0) {
7962                 perror("select");
7963                 exit(10);
7964         }
7965
7966         exit(0); /* if we exit here, the select blocked the whole process */
7967 }
7968
7969 int main(argc, argv)
7970         int argc;
7971         char **argv;
7972 {
7973         pthread_t t;
7974
7975         /* create a pipe to select */
7976         if(pipe(&fildes[0])) {
7977                 perror("select");
7978                 exit(1);
7979         }
7980
7981 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7982         (void) pthread_setconcurrency(2);
7983 #else
7984 #ifdef HAVE_THR_SETCONCURRENCY
7985         /* Set Solaris LWP concurrency to 2 */
7986         thr_setconcurrency(2);
7987 #endif
7988 #endif
7989
7990 #if HAVE_PTHREADS_D4
7991         pthread_create(&t, pthread_attr_default, task, NULL);
7992 #else
7993         pthread_create(&t, NULL, task, NULL);
7994 #endif
7995
7996 #if HAVE_SCHED_YIELD
7997         sched_yield();  /* make sure task runs first */
7998 #else
7999 #ifdef HAVE_PTHREAD_YIELD
8000         pthread_yield();        /* make sure task runs first */
8001 #endif
8002 #endif
8003
8004         exit(2);
8005 }
8006 EOF
8007 if { (eval echo configure:8008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8008 then
8009   ol_cv_pthread_select_yields=no
8010 else
8011   echo "configure: failed program was:" >&5
8012   cat conftest.$ac_ext >&5
8013   rm -fr conftest*
8014   ol_cv_pthread_select_yields=yes
8015 fi
8016 rm -fr conftest*
8017 fi
8018
8019 fi
8020
8021 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
8022
8023                                 if test $ol_cv_pthread_select_yields = cross ; then
8024                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
8025                                 fi
8026
8027                                 if test $ol_cv_pthread_select_yields = yes ; then
8028                                         ol_with_yielding_select=yes
8029                                 fi
8030                         fi
8031
8032                                                 CPPFLAGS="$save_CPPFLAGS"
8033                         LIBS="$save_LIBS"
8034                 else
8035                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
8036                 fi
8037         fi
8038
8039         if test $ol_with_threads = posix ; then
8040                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
8041         fi
8042 fi
8043
8044 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8045         -o $ol_with_threads = mach ; then
8046
8047                 for ac_hdr in mach/cthreads.h
8048 do
8049 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8050 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8051 echo "configure:8052: checking for $ac_hdr" >&5
8052 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 #include <$ac_hdr>
8059 EOF
8060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8061 { (eval echo configure:8062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8063 if test -z "$ac_err"; then
8064   rm -rf conftest*
8065   eval "ac_cv_header_$ac_safe=yes"
8066 else
8067   echo "$ac_err" >&5
8068   echo "configure: failed program was:" >&5
8069   cat conftest.$ac_ext >&5
8070   rm -rf conftest*
8071   eval "ac_cv_header_$ac_safe=no"
8072 fi
8073 rm -f conftest*
8074 fi
8075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8076   echo "$ac_t""yes" 1>&6
8077     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8078   cat >> confdefs.h <<EOF
8079 #define $ac_tr_hdr 1
8080 EOF
8081  
8082 else
8083   echo "$ac_t""no" 1>&6
8084 fi
8085 done
8086
8087         if test $ac_cv_header_mach_cthreads_h = yes ; then
8088                 ol_with_threads=found
8089
8090                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
8091 echo "configure:8092: checking for cthread_fork" >&5
8092 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
8093   echo $ac_n "(cached) $ac_c" 1>&6
8094 else
8095   cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 /* System header to define __stub macros and hopefully few prototypes,
8099     which can conflict with char cthread_fork(); below.  */
8100 #include <assert.h>
8101 /* Override any gcc2 internal prototype to avoid an error.  */
8102 /* We use char because int might match the return type of a gcc2
8103     builtin and then its argument prototype would still apply.  */
8104 char cthread_fork();
8105 char (*f)();
8106
8107 int main() {
8108
8109 /* The GNU C library defines this for functions which it implements
8110     to always fail with ENOSYS.  Some functions are actually named
8111     something starting with __ and the normal name is an alias.  */
8112 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
8113 choke me
8114 #else
8115 f = cthread_fork;
8116 #endif
8117
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   eval "ac_cv_func_cthread_fork=yes"
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   eval "ac_cv_func_cthread_fork=no"
8128 fi
8129 rm -f conftest*
8130 fi
8131
8132 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
8133   echo "$ac_t""yes" 1>&6
8134   ol_link_threads=yes
8135 else
8136   echo "$ac_t""no" 1>&6
8137 fi
8138
8139
8140                 if test $ol_link_threads = no ; then
8141                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
8142 echo "configure:8143: checking for cthread_fork with -all_load" >&5
8143 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
8144   echo $ac_n "(cached) $ac_c" 1>&6
8145 else
8146   
8147                                                                 save_LIBS="$LIBS"
8148                                 LIBS="-all_load $LIBS"
8149                                 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 #include <mach/cthreads.h>
8153 int main() {
8154
8155                                         cthread_fork((void *)0, (void *)0);
8156                                         
8157 ; return 0; }
8158 EOF
8159 if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8160   rm -rf conftest*
8161   ol_cv_cthread_all_load=yes
8162 else
8163   echo "configure: failed program was:" >&5
8164   cat conftest.$ac_ext >&5
8165   rm -rf conftest*
8166   ol_cv_cthread_all_load=no
8167 fi
8168 rm -f conftest*
8169                                                                 LIBS="$save_LIBS"
8170                         
8171 fi
8172
8173 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8174
8175                         if test $ol_cv_cthread_all_load = yes ; then
8176                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8177                                 ol_link_threads=mach
8178                         fi
8179                 fi
8180
8181                 if test $ol_link_threads != no ; then
8182                         : check for cthread specific functionality here
8183                         cat >> confdefs.h <<\EOF
8184 #define HAVE_MACH_CTHREADS 1
8185 EOF
8186
8187                 else
8188                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8189                 fi
8190         fi
8191
8192         if test $ol_with_threads = mach ; then
8193                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8194         fi
8195 fi
8196
8197 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8198         -o $ol_with_threads = lwp ; then
8199
8200                 for ac_hdr in thread.h synch.h
8201 do
8202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8204 echo "configure:8205: checking for $ac_hdr" >&5
8205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 #include <$ac_hdr>
8212 EOF
8213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8214 { (eval echo configure:8215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8216 if test -z "$ac_err"; then
8217   rm -rf conftest*
8218   eval "ac_cv_header_$ac_safe=yes"
8219 else
8220   echo "$ac_err" >&5
8221   echo "configure: failed program was:" >&5
8222   cat conftest.$ac_ext >&5
8223   rm -rf conftest*
8224   eval "ac_cv_header_$ac_safe=no"
8225 fi
8226 rm -f conftest*
8227 fi
8228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8229   echo "$ac_t""yes" 1>&6
8230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8231   cat >> confdefs.h <<EOF
8232 #define $ac_tr_hdr 1
8233 EOF
8234  
8235 else
8236   echo "$ac_t""no" 1>&6
8237 fi
8238 done
8239
8240         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8241                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8242 echo "configure:8243: checking for thr_create in -lthread" >&5
8243 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
8244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   ac_save_LIBS="$LIBS"
8248 LIBS="-lthread  $LIBS"
8249 cat > conftest.$ac_ext <<EOF
8250 #line 8251 "configure"
8251 #include "confdefs.h"
8252 /* Override any gcc2 internal prototype to avoid an error.  */
8253 /* We use char because int might match the return type of a gcc2
8254     builtin and then its argument prototype would still apply.  */
8255 char thr_create();
8256
8257 int main() {
8258 thr_create()
8259 ; return 0; }
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8262   rm -rf conftest*
8263   eval "ac_cv_lib_$ac_lib_var=yes"
8264 else
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=no"
8269 fi
8270 rm -f conftest*
8271 LIBS="$ac_save_LIBS"
8272
8273 fi
8274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276   have_thr=yes
8277 else
8278   echo "$ac_t""no" 1>&6
8279 have_thr=no
8280 fi
8281
8282
8283                 if test $have_thr = yes ; then
8284                         cat >> confdefs.h <<\EOF
8285 #define HAVE_THR 1
8286 EOF
8287
8288                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8289                         ol_link_threads=thr
8290
8291                         if test $ol_with_yielding_select = auto ; then
8292                                 ol_with_yielding_select=yes
8293                         fi
8294
8295                                                 for ac_func in \
8296                                 thr_setconcurrency \
8297                                 thr_getconcurrency \
8298                         
8299 do
8300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8301 echo "configure:8302: checking for $ac_func" >&5
8302 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8303   echo $ac_n "(cached) $ac_c" 1>&6
8304 else
8305   cat > conftest.$ac_ext <<EOF
8306 #line 8307 "configure"
8307 #include "confdefs.h"
8308 /* System header to define __stub macros and hopefully few prototypes,
8309     which can conflict with char $ac_func(); below.  */
8310 #include <assert.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 $ac_func();
8315 char (*f)();
8316
8317 int main() {
8318
8319 /* The GNU C library defines this for functions which it implements
8320     to always fail with ENOSYS.  Some functions are actually named
8321     something starting with __ and the normal name is an alias.  */
8322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8323 choke me
8324 #else
8325 f = $ac_func;
8326 #endif
8327
8328 ; return 0; }
8329 EOF
8330 if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8331   rm -rf conftest*
8332   eval "ac_cv_func_$ac_func=yes"
8333 else
8334   echo "configure: failed program was:" >&5
8335   cat conftest.$ac_ext >&5
8336   rm -rf conftest*
8337   eval "ac_cv_func_$ac_func=no"
8338 fi
8339 rm -f conftest*
8340 fi
8341
8342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8345   cat >> confdefs.h <<EOF
8346 #define $ac_tr_func 1
8347 EOF
8348  
8349 else
8350   echo "$ac_t""no" 1>&6
8351 fi
8352 done
8353
8354                 fi
8355         fi
8356
8357                 for ac_hdr in lwp/lwp.h
8358 do
8359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8361 echo "configure:8362: checking for $ac_hdr" >&5
8362 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8363   echo $ac_n "(cached) $ac_c" 1>&6
8364 else
8365   cat > conftest.$ac_ext <<EOF
8366 #line 8367 "configure"
8367 #include "confdefs.h"
8368 #include <$ac_hdr>
8369 EOF
8370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8371 { (eval echo configure:8372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8373 if test -z "$ac_err"; then
8374   rm -rf conftest*
8375   eval "ac_cv_header_$ac_safe=yes"
8376 else
8377   echo "$ac_err" >&5
8378   echo "configure: failed program was:" >&5
8379   cat conftest.$ac_ext >&5
8380   rm -rf conftest*
8381   eval "ac_cv_header_$ac_safe=no"
8382 fi
8383 rm -f conftest*
8384 fi
8385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8386   echo "$ac_t""yes" 1>&6
8387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8388   cat >> confdefs.h <<EOF
8389 #define $ac_tr_hdr 1
8390 EOF
8391  
8392 else
8393   echo "$ac_t""no" 1>&6
8394 fi
8395 done
8396
8397         if test $ac_cv_header_lwp_lwp_h = yes ; then
8398                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8399 echo "configure:8400: checking for lwp_create in -llwp" >&5
8400 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
8401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8402   echo $ac_n "(cached) $ac_c" 1>&6
8403 else
8404   ac_save_LIBS="$LIBS"
8405 LIBS="-llwp  $LIBS"
8406 cat > conftest.$ac_ext <<EOF
8407 #line 8408 "configure"
8408 #include "confdefs.h"
8409 /* Override any gcc2 internal prototype to avoid an error.  */
8410 /* We use char because int might match the return type of a gcc2
8411     builtin and then its argument prototype would still apply.  */
8412 char lwp_create();
8413
8414 int main() {
8415 lwp_create()
8416 ; return 0; }
8417 EOF
8418 if { (eval echo configure:8419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8419   rm -rf conftest*
8420   eval "ac_cv_lib_$ac_lib_var=yes"
8421 else
8422   echo "configure: failed program was:" >&5
8423   cat conftest.$ac_ext >&5
8424   rm -rf conftest*
8425   eval "ac_cv_lib_$ac_lib_var=no"
8426 fi
8427 rm -f conftest*
8428 LIBS="$ac_save_LIBS"
8429
8430 fi
8431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8432   echo "$ac_t""yes" 1>&6
8433   have_lwp=yes
8434 else
8435   echo "$ac_t""no" 1>&6
8436 have_lwp=no
8437 fi
8438
8439
8440                 if test $have_lwp = yes ; then
8441                         cat >> confdefs.h <<\EOF
8442 #define HAVE_LWP 1
8443 EOF
8444
8445                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8446                         ol_link_threads=lwp
8447
8448                         if test $ol_with_yielding_select = auto ; then
8449                                 ol_with_yielding_select=no
8450                         fi
8451                 fi
8452         fi
8453 fi
8454
8455 if test $ol_with_yielding_select = yes ; then
8456         cat >> confdefs.h <<\EOF
8457 #define HAVE_YIELDING_SELECT 1
8458 EOF
8459
8460 fi
8461
8462 if test $ol_with_threads = manual ; then
8463                 ol_link_threads=yes
8464
8465         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8466
8467         for ac_hdr in pthread.h sched.h
8468 do
8469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8471 echo "configure:8472: checking for $ac_hdr" >&5
8472 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8473   echo $ac_n "(cached) $ac_c" 1>&6
8474 else
8475   cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 #include <$ac_hdr>
8479 EOF
8480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8481 { (eval echo configure:8482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8483 if test -z "$ac_err"; then
8484   rm -rf conftest*
8485   eval "ac_cv_header_$ac_safe=yes"
8486 else
8487   echo "$ac_err" >&5
8488   echo "configure: failed program was:" >&5
8489   cat conftest.$ac_ext >&5
8490   rm -rf conftest*
8491   eval "ac_cv_header_$ac_safe=no"
8492 fi
8493 rm -f conftest*
8494 fi
8495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8496   echo "$ac_t""yes" 1>&6
8497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8498   cat >> confdefs.h <<EOF
8499 #define $ac_tr_hdr 1
8500 EOF
8501  
8502 else
8503   echo "$ac_t""no" 1>&6
8504 fi
8505 done
8506
8507         for ac_func in sched_yield pthread_yield
8508 do
8509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8510 echo "configure:8511: checking for $ac_func" >&5
8511 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8512   echo $ac_n "(cached) $ac_c" 1>&6
8513 else
8514   cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 /* System header to define __stub macros and hopefully few prototypes,
8518     which can conflict with char $ac_func(); below.  */
8519 #include <assert.h>
8520 /* Override any gcc2 internal prototype to avoid an error.  */
8521 /* We use char because int might match the return type of a gcc2
8522     builtin and then its argument prototype would still apply.  */
8523 char $ac_func();
8524 char (*f)();
8525
8526 int main() {
8527
8528 /* The GNU C library defines this for functions which it implements
8529     to always fail with ENOSYS.  Some functions are actually named
8530     something starting with __ and the normal name is an alias.  */
8531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8532 choke me
8533 #else
8534 f = $ac_func;
8535 #endif
8536
8537 ; return 0; }
8538 EOF
8539 if { (eval echo configure:8540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8540   rm -rf conftest*
8541   eval "ac_cv_func_$ac_func=yes"
8542 else
8543   echo "configure: failed program was:" >&5
8544   cat conftest.$ac_ext >&5
8545   rm -rf conftest*
8546   eval "ac_cv_func_$ac_func=no"
8547 fi
8548 rm -f conftest*
8549 fi
8550
8551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8552   echo "$ac_t""yes" 1>&6
8553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8554   cat >> confdefs.h <<EOF
8555 #define $ac_tr_func 1
8556 EOF
8557  
8558 else
8559   echo "$ac_t""no" 1>&6
8560 fi
8561 done
8562
8563         
8564         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8565 echo "configure:8566: checking for LinuxThreads pthread.h" >&5
8566 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8567   echo $ac_n "(cached) $ac_c" 1>&6
8568 else
8569   cat > conftest.$ac_ext <<EOF
8570 #line 8571 "configure"
8571 #include "confdefs.h"
8572 #include <pthread.h>
8573 EOF
8574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8575   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8576   rm -rf conftest*
8577   ol_cv_header_linux_threads=yes
8578 else
8579   rm -rf conftest*
8580   ol_cv_header_linux_threads=no
8581 fi
8582 rm -f conftest*
8583
8584                 
8585 fi
8586
8587 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8588         if test $ol_cv_header_linux_threads = yes; then
8589                 cat >> confdefs.h <<\EOF
8590 #define HAVE_LINUX_THREADS 1
8591 EOF
8592
8593         fi
8594
8595
8596         for ac_hdr in mach/cthreads.h
8597 do
8598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8600 echo "configure:8601: checking for $ac_hdr" >&5
8601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8602   echo $ac_n "(cached) $ac_c" 1>&6
8603 else
8604   cat > conftest.$ac_ext <<EOF
8605 #line 8606 "configure"
8606 #include "confdefs.h"
8607 #include <$ac_hdr>
8608 EOF
8609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8610 { (eval echo configure:8611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8612 if test -z "$ac_err"; then
8613   rm -rf conftest*
8614   eval "ac_cv_header_$ac_safe=yes"
8615 else
8616   echo "$ac_err" >&5
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -rf conftest*
8620   eval "ac_cv_header_$ac_safe=no"
8621 fi
8622 rm -f conftest*
8623 fi
8624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8625   echo "$ac_t""yes" 1>&6
8626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8627   cat >> confdefs.h <<EOF
8628 #define $ac_tr_hdr 1
8629 EOF
8630  
8631 else
8632   echo "$ac_t""no" 1>&6
8633 fi
8634 done
8635
8636         for ac_hdr in lwp/lwp.h
8637 do
8638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8639 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8640 echo "configure:8641: checking for $ac_hdr" >&5
8641 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8642   echo $ac_n "(cached) $ac_c" 1>&6
8643 else
8644   cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 #include <$ac_hdr>
8648 EOF
8649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8650 { (eval echo configure:8651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8652 if test -z "$ac_err"; then
8653   rm -rf conftest*
8654   eval "ac_cv_header_$ac_safe=yes"
8655 else
8656   echo "$ac_err" >&5
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -rf conftest*
8660   eval "ac_cv_header_$ac_safe=no"
8661 fi
8662 rm -f conftest*
8663 fi
8664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8665   echo "$ac_t""yes" 1>&6
8666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8667   cat >> confdefs.h <<EOF
8668 #define $ac_tr_hdr 1
8669 EOF
8670  
8671 else
8672   echo "$ac_t""no" 1>&6
8673 fi
8674 done
8675
8676         for ac_hdr in thread.h synch.h
8677 do
8678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8679 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8680 echo "configure:8681: checking for $ac_hdr" >&5
8681 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8682   echo $ac_n "(cached) $ac_c" 1>&6
8683 else
8684   cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 #include <$ac_hdr>
8688 EOF
8689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8690 { (eval echo configure:8691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8692 if test -z "$ac_err"; then
8693   rm -rf conftest*
8694   eval "ac_cv_header_$ac_safe=yes"
8695 else
8696   echo "$ac_err" >&5
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -rf conftest*
8700   eval "ac_cv_header_$ac_safe=no"
8701 fi
8702 rm -f conftest*
8703 fi
8704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8705   echo "$ac_t""yes" 1>&6
8706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8707   cat >> confdefs.h <<EOF
8708 #define $ac_tr_hdr 1
8709 EOF
8710  
8711 else
8712   echo "$ac_t""no" 1>&6
8713 fi
8714 done
8715
8716 fi
8717
8718 if test $ol_link_threads != no ; then  
8719                         cat >> confdefs.h <<\EOF
8720 #define REENTRANT 1
8721 EOF
8722
8723         cat >> confdefs.h <<\EOF
8724 #define _REENTRANT 1
8725 EOF
8726
8727         cat >> confdefs.h <<\EOF
8728 #define THREAD_SAFE 1
8729 EOF
8730
8731         cat >> confdefs.h <<\EOF
8732 #define _THREAD_SAFE 1
8733 EOF
8734
8735         cat >> confdefs.h <<\EOF
8736 #define THREADSAFE 1
8737 EOF
8738
8739         cat >> confdefs.h <<\EOF
8740 #define _THREADSAFE 1
8741 EOF
8742
8743         cat >> confdefs.h <<\EOF
8744 #define _SGI_MP_SOURCE 1
8745 EOF
8746
8747
8748                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8749 echo "configure:8750: checking for thread specific errno" >&5
8750 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8751   echo $ac_n "(cached) $ac_c" 1>&6
8752 else
8753   
8754                 cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757 #include <errno.h>
8758 int main() {
8759 errno = 0;
8760 ; return 0; }
8761 EOF
8762 if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8763   rm -rf conftest*
8764   ol_cv_errno_thread_specific=yes
8765 else
8766   echo "configure: failed program was:" >&5
8767   cat conftest.$ac_ext >&5
8768   rm -rf conftest*
8769   ol_cv_errno_thread_specific=no
8770 fi
8771 rm -f conftest*
8772         
8773 fi
8774
8775 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8776
8777                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8778 echo "configure:8779: checking for thread specific h_errno" >&5
8779 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   
8783                 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 #include <netdb.h>
8787 int main() {
8788 h_errno = 0;
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8792   rm -rf conftest*
8793   ol_cv_h_errno_thread_specific=yes
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   ol_cv_h_errno_thread_specific=no
8799 fi
8800 rm -f conftest*
8801         
8802 fi
8803
8804 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8805
8806         if test $ol_cv_errno_thread_specific != yes \
8807                 -o $ol_cv_h_errno_thread_specific != yes ; then
8808                 LIBS="$LTHREAD_LIBS $LIBS"
8809                 LTHREAD_LIBS=""
8810         fi
8811
8812 fi  
8813
8814 if test $ol_link_threads = no ; then
8815         if test $ol_with_threads = yes ; then
8816                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8817         fi
8818
8819         if test $ol_with_threads = auto ; then
8820                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8821                 ol_with_threads=no
8822         fi
8823
8824         cat >> confdefs.h <<\EOF
8825 #define NO_THREADS 1
8826 EOF
8827
8828         LTHREAD_LIBS=""
8829 fi
8830
8831 if test $ol_link_threads != no ; then
8832         cat >> confdefs.h <<\EOF
8833 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8834 EOF
8835
8836 fi
8837
8838
8839 ol_link_ldbm=no 
8840 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8841         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8842 echo "configure:8843: checking for DB2 library" >&5
8843 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8844   echo $ac_n "(cached) $ac_c" 1>&6
8845 else
8846         ol_LIBS="$LIBS"
8847         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8848 echo "configure:8849: checking for db_open in -ldb" >&5
8849 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8850 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8851   echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853   ac_save_LIBS="$LIBS"
8854 LIBS="-ldb  $LIBS"
8855 cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 /* Override any gcc2 internal prototype to avoid an error.  */
8859 /* We use char because int might match the return type of a gcc2
8860     builtin and then its argument prototype would still apply.  */
8861 char db_open();
8862
8863 int main() {
8864 db_open()
8865 ; return 0; }
8866 EOF
8867 if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8868   rm -rf conftest*
8869   eval "ac_cv_lib_$ac_lib_var=yes"
8870 else
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_lib_$ac_lib_var=no"
8875 fi
8876 rm -f conftest*
8877 LIBS="$ac_save_LIBS"
8878
8879 fi
8880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8881   echo "$ac_t""yes" 1>&6
8882   ol_cv_lib_db2=-ldb
8883 else
8884   echo "$ac_t""no" 1>&6
8885 ol_cv_lib_db2=no
8886 fi
8887
8888         LIBS="$ol_LIBS"
8889
8890 fi
8891
8892 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8893
8894 for ac_hdr in db.h
8895 do
8896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8898 echo "configure:8899: checking for $ac_hdr" >&5
8899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 #include <$ac_hdr>
8906 EOF
8907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8908 { (eval echo configure:8909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8910 if test -z "$ac_err"; then
8911   rm -rf conftest*
8912   eval "ac_cv_header_$ac_safe=yes"
8913 else
8914   echo "$ac_err" >&5
8915   echo "configure: failed program was:" >&5
8916   cat conftest.$ac_ext >&5
8917   rm -rf conftest*
8918   eval "ac_cv_header_$ac_safe=no"
8919 fi
8920 rm -f conftest*
8921 fi
8922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8923   echo "$ac_t""yes" 1>&6
8924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8925   cat >> confdefs.h <<EOF
8926 #define $ac_tr_hdr 1
8927 EOF
8928  
8929 else
8930   echo "$ac_t""no" 1>&6
8931 fi
8932 done
8933
8934 if test $ac_cv_header_db_h = yes ; then
8935         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8936 echo "configure:8937: checking if db.h is DB2" >&5
8937 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   
8941                 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944
8945 #                       include <db.h>
8946                         /* this check could be improved */
8947 #                       ifdef DB_VERSION_MAJOR
8948 #                               if DB_VERSION_MAJOR == 2
8949                                         __db_version_2
8950 #                               endif
8951 #                       endif
8952                 
8953 EOF
8954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8955   egrep "__db_version_2" >/dev/null 2>&1; then
8956   rm -rf conftest*
8957   ol_cv_header_db2=yes
8958 else
8959   rm -rf conftest*
8960   ol_cv_header_db2=no
8961 fi
8962 rm -f conftest*
8963
8964 fi
8965
8966 echo "$ac_t""$ol_cv_header_db2" 1>&6
8967 else
8968         ol_cv_header_db2=no
8969 fi
8970
8971
8972  
8973  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8974 echo "configure:8975: checking for Berkeley DB2" >&5
8975 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8976   echo $ac_n "(cached) $ac_c" 1>&6
8977 else
8978   
8979         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8980                 ol_cv_berkeley_db2=no
8981         else
8982                 ol_cv_berkeley_db2=yes
8983         fi
8984
8985 fi
8986
8987 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8988  if test $ol_cv_berkeley_db2 = yes ; then
8989         cat >> confdefs.h <<\EOF
8990 #define HAVE_BERKELEY_DB2 1
8991 EOF
8992
8993  fi
8994
8995
8996         if test $ol_cv_berkeley_db2 = yes ; then
8997                 ol_link_ldbm=db2
8998                 ol_with_ldbm_api=db2
8999
9000                 if test $ol_with_ldbm_type = hash ; then
9001                         cat >> confdefs.h <<\EOF
9002 #define LDBM_USE_DBHASH 1
9003 EOF
9004
9005                 else
9006                         cat >> confdefs.h <<\EOF
9007 #define LDBM_USE_DBBTREE 1
9008 EOF
9009
9010                 fi
9011
9012                                                 if test $ol_cv_lib_db2 != yes ; then
9013                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
9014                 fi
9015         fi
9016 fi
9017
9018 ol_link_bdb2=no
9019 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
9020         ol_link_bdb2=yes
9021 fi
9022
9023 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
9024         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
9025 echo "configure:9026: checking for Berkeley DB library" >&5
9026 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
9027   echo $ac_n "(cached) $ac_c" 1>&6
9028 else
9029   
9030         for ac_hdr in db1/db.h
9031 do
9032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9034 echo "configure:9035: checking for $ac_hdr" >&5
9035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9036   echo $ac_n "(cached) $ac_c" 1>&6
9037 else
9038   cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041 #include <$ac_hdr>
9042 EOF
9043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9044 { (eval echo configure:9045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9046 if test -z "$ac_err"; then
9047   rm -rf conftest*
9048   eval "ac_cv_header_$ac_safe=yes"
9049 else
9050   echo "$ac_err" >&5
9051   echo "configure: failed program was:" >&5
9052   cat conftest.$ac_ext >&5
9053   rm -rf conftest*
9054   eval "ac_cv_header_$ac_safe=no"
9055 fi
9056 rm -f conftest*
9057 fi
9058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9059   echo "$ac_t""yes" 1>&6
9060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9061   cat >> confdefs.h <<EOF
9062 #define $ac_tr_hdr 1
9063 EOF
9064  
9065 else
9066   echo "$ac_t""no" 1>&6
9067 fi
9068 done
9069
9070         ol_LIBS="$LIBS"
9071         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
9072 echo "configure:9073: checking for dbopen" >&5
9073 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
9074   echo $ac_n "(cached) $ac_c" 1>&6
9075 else
9076   cat > conftest.$ac_ext <<EOF
9077 #line 9078 "configure"
9078 #include "confdefs.h"
9079 /* System header to define __stub macros and hopefully few prototypes,
9080     which can conflict with char dbopen(); below.  */
9081 #include <assert.h>
9082 /* Override any gcc2 internal prototype to avoid an error.  */
9083 /* We use char because int might match the return type of a gcc2
9084     builtin and then its argument prototype would still apply.  */
9085 char dbopen();
9086 char (*f)();
9087
9088 int main() {
9089
9090 /* The GNU C library defines this for functions which it implements
9091     to always fail with ENOSYS.  Some functions are actually named
9092     something starting with __ and the normal name is an alias.  */
9093 #if defined (__stub_dbopen) || defined (__stub___dbopen)
9094 choke me
9095 #else
9096 f = dbopen;
9097 #endif
9098
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9102   rm -rf conftest*
9103   eval "ac_cv_func_dbopen=yes"
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   eval "ac_cv_func_dbopen=no"
9109 fi
9110 rm -f conftest*
9111 fi
9112
9113 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
9114   echo "$ac_t""yes" 1>&6
9115   ol_cv_lib_db=yes
9116 else
9117   echo "$ac_t""no" 1>&6
9118
9119                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
9120 echo "configure:9121: checking for dbopen in -ldb1" >&5
9121 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
9122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   ac_save_LIBS="$LIBS"
9126 LIBS="-ldb1  $LIBS"
9127 cat > conftest.$ac_ext <<EOF
9128 #line 9129 "configure"
9129 #include "confdefs.h"
9130 /* Override any gcc2 internal prototype to avoid an error.  */
9131 /* We use char because int might match the return type of a gcc2
9132     builtin and then its argument prototype would still apply.  */
9133 char dbopen();
9134
9135 int main() {
9136 dbopen()
9137 ; return 0; }
9138 EOF
9139 if { (eval echo configure:9140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9140   rm -rf conftest*
9141   eval "ac_cv_lib_$ac_lib_var=yes"
9142 else
9143   echo "configure: failed program was:" >&5
9144   cat conftest.$ac_ext >&5
9145   rm -rf conftest*
9146   eval "ac_cv_lib_$ac_lib_var=no"
9147 fi
9148 rm -f conftest*
9149 LIBS="$ac_save_LIBS"
9150
9151 fi
9152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9153   echo "$ac_t""yes" 1>&6
9154   ol_cv_lib_db=-ldb1
9155 else
9156   echo "$ac_t""no" 1>&6
9157
9158                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9159 echo "configure:9160: checking for dbopen in -ldb" >&5
9160 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
9161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164   ac_save_LIBS="$LIBS"
9165 LIBS="-ldb  $LIBS"
9166 cat > conftest.$ac_ext <<EOF
9167 #line 9168 "configure"
9168 #include "confdefs.h"
9169 /* Override any gcc2 internal prototype to avoid an error.  */
9170 /* We use char because int might match the return type of a gcc2
9171     builtin and then its argument prototype would still apply.  */
9172 char dbopen();
9173
9174 int main() {
9175 dbopen()
9176 ; return 0; }
9177 EOF
9178 if { (eval echo configure:9179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9179   rm -rf conftest*
9180   eval "ac_cv_lib_$ac_lib_var=yes"
9181 else
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   eval "ac_cv_lib_$ac_lib_var=no"
9186 fi
9187 rm -f conftest*
9188 LIBS="$ac_save_LIBS"
9189
9190 fi
9191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9192   echo "$ac_t""yes" 1>&6
9193   ol_cv_lib_db=-ldb
9194 else
9195   echo "$ac_t""no" 1>&6
9196 ol_cv_lib_db=no
9197 fi
9198
9199                 
9200 fi
9201
9202         
9203 fi
9204
9205         LIBS="$ol_LIBS"
9206
9207 fi
9208
9209 echo "$ac_t""$ol_cv_lib_db" 1>&6
9210
9211
9212 for ac_hdr in db_185.h
9213 do
9214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9216 echo "configure:9217: checking for $ac_hdr" >&5
9217 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9218   echo $ac_n "(cached) $ac_c" 1>&6
9219 else
9220   cat > conftest.$ac_ext <<EOF
9221 #line 9222 "configure"
9222 #include "confdefs.h"
9223 #include <$ac_hdr>
9224 EOF
9225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9226 { (eval echo configure:9227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9228 if test -z "$ac_err"; then
9229   rm -rf conftest*
9230   eval "ac_cv_header_$ac_safe=yes"
9231 else
9232   echo "$ac_err" >&5
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -rf conftest*
9236   eval "ac_cv_header_$ac_safe=no"
9237 fi
9238 rm -f conftest*
9239 fi
9240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9241   echo "$ac_t""yes" 1>&6
9242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9243   cat >> confdefs.h <<EOF
9244 #define $ac_tr_hdr 1
9245 EOF
9246  
9247 else
9248   echo "$ac_t""no" 1>&6
9249 fi
9250 done
9251
9252 if test "$ol_cv_header_db2" = yes ; then
9253         
9254         ol_cv_header_db=$ac_cv_header_db_185_h
9255 else
9256         ol_cv_header_db=$ac_cv_header_db_h
9257 fi
9258
9259
9260  
9261  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9262 echo "configure:9263: checking for Berkeley DB" >&5
9263 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
9264   echo $ac_n "(cached) $ac_c" 1>&6
9265 else
9266   
9267         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9268                 ol_cv_berkeley_db=no
9269         else
9270                 ol_cv_berkeley_db=yes
9271         fi
9272
9273 fi
9274
9275 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9276  if test $ol_cv_berkeley_db = yes ; then
9277         cat >> confdefs.h <<\EOF
9278 #define HAVE_BERKELEY_DB 1
9279 EOF
9280
9281  fi
9282
9283
9284         if test $ol_cv_berkeley_db = yes ; then
9285                 ol_link_ldbm=db
9286                 ol_with_ldbm_api=db
9287
9288                 if test $ol_with_ldbm_type = hash ; then
9289                         cat >> confdefs.h <<\EOF
9290 #define LDBM_USE_DBHASH 1
9291 EOF
9292
9293                 else
9294                         cat >> confdefs.h <<\EOF
9295 #define LDBM_USE_DBBTREE 1
9296 EOF
9297
9298                 fi
9299
9300                                                 if test $ol_cv_lib_db != yes ; then
9301                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9302                 fi
9303         fi
9304 fi
9305
9306 if test $ol_with_ldbm_api = manual ; then
9307                 ol_link_ldbm=yes
9308
9309         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9310
9311         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9312 do
9313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9315 echo "configure:9316: checking for $ac_hdr" >&5
9316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   cat > conftest.$ac_ext <<EOF
9320 #line 9321 "configure"
9321 #include "confdefs.h"
9322 #include <$ac_hdr>
9323 EOF
9324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9325 { (eval echo configure:9326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9327 if test -z "$ac_err"; then
9328   rm -rf conftest*
9329   eval "ac_cv_header_$ac_safe=yes"
9330 else
9331   echo "$ac_err" >&5
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -rf conftest*
9335   eval "ac_cv_header_$ac_safe=no"
9336 fi
9337 rm -f conftest*
9338 fi
9339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9340   echo "$ac_t""yes" 1>&6
9341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9342   cat >> confdefs.h <<EOF
9343 #define $ac_tr_hdr 1
9344 EOF
9345  
9346 else
9347   echo "$ac_t""no" 1>&6
9348 fi
9349 done
9350
9351 fi
9352
9353 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9354         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9355         ol_with_ldbm_api=none
9356 fi
9357
9358 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9359         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9360 echo "configure:9361: checking for MDBM library" >&5
9361 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
9362   echo $ac_n "(cached) $ac_c" 1>&6
9363 else
9364         ol_LIBS="$LIBS"
9365         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9366 echo "configure:9367: checking for mdbm_set_chain" >&5
9367 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
9368   echo $ac_n "(cached) $ac_c" 1>&6
9369 else
9370   cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 /* System header to define __stub macros and hopefully few prototypes,
9374     which can conflict with char mdbm_set_chain(); below.  */
9375 #include <assert.h>
9376 /* Override any gcc2 internal prototype to avoid an error.  */
9377 /* We use char because int might match the return type of a gcc2
9378     builtin and then its argument prototype would still apply.  */
9379 char mdbm_set_chain();
9380 char (*f)();
9381
9382 int main() {
9383
9384 /* The GNU C library defines this for functions which it implements
9385     to always fail with ENOSYS.  Some functions are actually named
9386     something starting with __ and the normal name is an alias.  */
9387 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9388 choke me
9389 #else
9390 f = mdbm_set_chain;
9391 #endif
9392
9393 ; return 0; }
9394 EOF
9395 if { (eval echo configure:9396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9396   rm -rf conftest*
9397   eval "ac_cv_func_mdbm_set_chain=yes"
9398 else
9399   echo "configure: failed program was:" >&5
9400   cat conftest.$ac_ext >&5
9401   rm -rf conftest*
9402   eval "ac_cv_func_mdbm_set_chain=no"
9403 fi
9404 rm -f conftest*
9405 fi
9406
9407 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9408   echo "$ac_t""yes" 1>&6
9409   ol_cv_lib_mdbm=yes
9410 else
9411   echo "$ac_t""no" 1>&6
9412
9413                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9414 echo "configure:9415: checking for mdbm_set_chain in -lmdbm" >&5
9415 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
9416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9417   echo $ac_n "(cached) $ac_c" 1>&6
9418 else
9419   ac_save_LIBS="$LIBS"
9420 LIBS="-lmdbm  $LIBS"
9421 cat > conftest.$ac_ext <<EOF
9422 #line 9423 "configure"
9423 #include "confdefs.h"
9424 /* Override any gcc2 internal prototype to avoid an error.  */
9425 /* We use char because int might match the return type of a gcc2
9426     builtin and then its argument prototype would still apply.  */
9427 char mdbm_set_chain();
9428
9429 int main() {
9430 mdbm_set_chain()
9431 ; return 0; }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9434   rm -rf conftest*
9435   eval "ac_cv_lib_$ac_lib_var=yes"
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -rf conftest*
9440   eval "ac_cv_lib_$ac_lib_var=no"
9441 fi
9442 rm -f conftest*
9443 LIBS="$ac_save_LIBS"
9444
9445 fi
9446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9447   echo "$ac_t""yes" 1>&6
9448   ol_cv_lib_mdbm=-lmdbm
9449 else
9450   echo "$ac_t""no" 1>&6
9451 ol_cv_lib_mdbm=no
9452 fi
9453
9454         
9455 fi
9456
9457         LIBS="$ol_LIBS"
9458
9459 fi
9460
9461 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9462
9463
9464  for ac_hdr in mdbm.h
9465 do
9466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9468 echo "configure:9469: checking for $ac_hdr" >&5
9469 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9470   echo $ac_n "(cached) $ac_c" 1>&6
9471 else
9472   cat > conftest.$ac_ext <<EOF
9473 #line 9474 "configure"
9474 #include "confdefs.h"
9475 #include <$ac_hdr>
9476 EOF
9477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9478 { (eval echo configure:9479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9480 if test -z "$ac_err"; then
9481   rm -rf conftest*
9482   eval "ac_cv_header_$ac_safe=yes"
9483 else
9484   echo "$ac_err" >&5
9485   echo "configure: failed program was:" >&5
9486   cat conftest.$ac_ext >&5
9487   rm -rf conftest*
9488   eval "ac_cv_header_$ac_safe=no"
9489 fi
9490 rm -f conftest*
9491 fi
9492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9493   echo "$ac_t""yes" 1>&6
9494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9495   cat >> confdefs.h <<EOF
9496 #define $ac_tr_hdr 1
9497 EOF
9498  
9499 else
9500   echo "$ac_t""no" 1>&6
9501 fi
9502 done
9503
9504  echo $ac_n "checking for db""... $ac_c" 1>&6
9505 echo "configure:9506: checking for db" >&5
9506 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509   
9510         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9511                 ol_cv_mdbm=no
9512         else
9513                 ol_cv_mdbm=yes
9514         fi
9515
9516 fi
9517
9518 echo "$ac_t""$ol_cv_mdbm" 1>&6
9519  if test $ol_cv_mdbm = yes ; then
9520         cat >> confdefs.h <<\EOF
9521 #define HAVE_MDBM 1
9522 EOF
9523
9524  fi
9525
9526
9527         if test $ol_cv_mdbm = yes ; then
9528                 ol_link_ldbm=mdbm
9529                 ol_with_ldbm_api=mdbm
9530                 if test $ol_cv_lib_mdbm != yes ; then
9531                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9532                 fi
9533         fi
9534 fi
9535
9536 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9537         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9538 echo "configure:9539: checking for GDBM library" >&5
9539 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542         ol_LIBS="$LIBS"
9543         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9544 echo "configure:9545: checking for gdbm_open" >&5
9545 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9546   echo $ac_n "(cached) $ac_c" 1>&6
9547 else
9548   cat > conftest.$ac_ext <<EOF
9549 #line 9550 "configure"
9550 #include "confdefs.h"
9551 /* System header to define __stub macros and hopefully few prototypes,
9552     which can conflict with char gdbm_open(); below.  */
9553 #include <assert.h>
9554 /* Override any gcc2 internal prototype to avoid an error.  */
9555 /* We use char because int might match the return type of a gcc2
9556     builtin and then its argument prototype would still apply.  */
9557 char gdbm_open();
9558 char (*f)();
9559
9560 int main() {
9561
9562 /* The GNU C library defines this for functions which it implements
9563     to always fail with ENOSYS.  Some functions are actually named
9564     something starting with __ and the normal name is an alias.  */
9565 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9566 choke me
9567 #else
9568 f = gdbm_open;
9569 #endif
9570
9571 ; return 0; }
9572 EOF
9573 if { (eval echo configure:9574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9574   rm -rf conftest*
9575   eval "ac_cv_func_gdbm_open=yes"
9576 else
9577   echo "configure: failed program was:" >&5
9578   cat conftest.$ac_ext >&5
9579   rm -rf conftest*
9580   eval "ac_cv_func_gdbm_open=no"
9581 fi
9582 rm -f conftest*
9583 fi
9584
9585 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9586   echo "$ac_t""yes" 1>&6
9587   ol_cv_lib_gdbm=yes
9588 else
9589   echo "$ac_t""no" 1>&6
9590
9591                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9592 echo "configure:9593: checking for gdbm_open in -lgdbm" >&5
9593 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9595   echo $ac_n "(cached) $ac_c" 1>&6
9596 else
9597   ac_save_LIBS="$LIBS"
9598 LIBS="-lgdbm  $LIBS"
9599 cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602 /* Override any gcc2 internal prototype to avoid an error.  */
9603 /* We use char because int might match the return type of a gcc2
9604     builtin and then its argument prototype would still apply.  */
9605 char gdbm_open();
9606
9607 int main() {
9608 gdbm_open()
9609 ; return 0; }
9610 EOF
9611 if { (eval echo configure:9612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9612   rm -rf conftest*
9613   eval "ac_cv_lib_$ac_lib_var=yes"
9614 else
9615   echo "configure: failed program was:" >&5
9616   cat conftest.$ac_ext >&5
9617   rm -rf conftest*
9618   eval "ac_cv_lib_$ac_lib_var=no"
9619 fi
9620 rm -f conftest*
9621 LIBS="$ac_save_LIBS"
9622
9623 fi
9624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9625   echo "$ac_t""yes" 1>&6
9626   ol_cv_lib_gdbm=-lgdbm
9627 else
9628   echo "$ac_t""no" 1>&6
9629 ol_cv_lib_gdbm=no
9630 fi
9631
9632         
9633 fi
9634
9635         LIBS="$ol_LIBS"
9636
9637 fi
9638
9639 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9640
9641
9642  for ac_hdr in gdbm.h
9643 do
9644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9646 echo "configure:9647: checking for $ac_hdr" >&5
9647 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 #include <$ac_hdr>
9654 EOF
9655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9656 { (eval echo configure:9657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9658 if test -z "$ac_err"; then
9659   rm -rf conftest*
9660   eval "ac_cv_header_$ac_safe=yes"
9661 else
9662   echo "$ac_err" >&5
9663   echo "configure: failed program was:" >&5
9664   cat conftest.$ac_ext >&5
9665   rm -rf conftest*
9666   eval "ac_cv_header_$ac_safe=no"
9667 fi
9668 rm -f conftest*
9669 fi
9670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9671   echo "$ac_t""yes" 1>&6
9672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9673   cat >> confdefs.h <<EOF
9674 #define $ac_tr_hdr 1
9675 EOF
9676  
9677 else
9678   echo "$ac_t""no" 1>&6
9679 fi
9680 done
9681
9682  echo $ac_n "checking for db""... $ac_c" 1>&6
9683 echo "configure:9684: checking for db" >&5
9684 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9685   echo $ac_n "(cached) $ac_c" 1>&6
9686 else
9687   
9688         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9689                 ol_cv_gdbm=no
9690         else
9691                 ol_cv_gdbm=yes
9692         fi
9693
9694 fi
9695
9696 echo "$ac_t""$ol_cv_gdbm" 1>&6
9697  if test $ol_cv_gdbm = yes ; then
9698         cat >> confdefs.h <<\EOF
9699 #define HAVE_GDBM 1
9700 EOF
9701
9702  fi
9703
9704
9705         if test $ol_cv_gdbm = yes ; then
9706                 ol_link_ldbm=gdbm
9707                 ol_with_ldbm_api=gdbm
9708
9709                 if test $ol_cv_lib_gdbm != yes ; then
9710                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9711                 fi
9712         fi
9713 fi
9714
9715 if test $ol_with_ldbm_api = auto ; then
9716         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9717 elif test $ol_with_ldbm_api = ndbm ; then
9718         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9719 echo "configure:9720: checking for NDBM library" >&5
9720 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9721   echo $ac_n "(cached) $ac_c" 1>&6
9722 else
9723         ol_LIBS="$LIBS"
9724         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9725 echo "configure:9726: checking for dbm_open" >&5
9726 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9727   echo $ac_n "(cached) $ac_c" 1>&6
9728 else
9729   cat > conftest.$ac_ext <<EOF
9730 #line 9731 "configure"
9731 #include "confdefs.h"
9732 /* System header to define __stub macros and hopefully few prototypes,
9733     which can conflict with char dbm_open(); below.  */
9734 #include <assert.h>
9735 /* Override any gcc2 internal prototype to avoid an error.  */
9736 /* We use char because int might match the return type of a gcc2
9737     builtin and then its argument prototype would still apply.  */
9738 char dbm_open();
9739 char (*f)();
9740
9741 int main() {
9742
9743 /* The GNU C library defines this for functions which it implements
9744     to always fail with ENOSYS.  Some functions are actually named
9745     something starting with __ and the normal name is an alias.  */
9746 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9747 choke me
9748 #else
9749 f = dbm_open;
9750 #endif
9751
9752 ; return 0; }
9753 EOF
9754 if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9755   rm -rf conftest*
9756   eval "ac_cv_func_dbm_open=yes"
9757 else
9758   echo "configure: failed program was:" >&5
9759   cat conftest.$ac_ext >&5
9760   rm -rf conftest*
9761   eval "ac_cv_func_dbm_open=no"
9762 fi
9763 rm -f conftest*
9764 fi
9765
9766 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9767   echo "$ac_t""yes" 1>&6
9768   ol_cv_lib_ndbm=yes
9769 else
9770   echo "$ac_t""no" 1>&6
9771
9772                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9773 echo "configure:9774: checking for dbm_open in -lndbm" >&5
9774 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9776   echo $ac_n "(cached) $ac_c" 1>&6
9777 else
9778   ac_save_LIBS="$LIBS"
9779 LIBS="-lndbm  $LIBS"
9780 cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783 /* Override any gcc2 internal prototype to avoid an error.  */
9784 /* We use char because int might match the return type of a gcc2
9785     builtin and then its argument prototype would still apply.  */
9786 char dbm_open();
9787
9788 int main() {
9789 dbm_open()
9790 ; return 0; }
9791 EOF
9792 if { (eval echo configure:9793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9793   rm -rf conftest*
9794   eval "ac_cv_lib_$ac_lib_var=yes"
9795 else
9796   echo "configure: failed program was:" >&5
9797   cat conftest.$ac_ext >&5
9798   rm -rf conftest*
9799   eval "ac_cv_lib_$ac_lib_var=no"
9800 fi
9801 rm -f conftest*
9802 LIBS="$ac_save_LIBS"
9803
9804 fi
9805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9806   echo "$ac_t""yes" 1>&6
9807   ol_cv_lib_ndbm=-lndbm
9808 else
9809   echo "$ac_t""no" 1>&6
9810
9811                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9812 echo "configure:9813: checking for dbm_open in -ldbm" >&5
9813 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9815   echo $ac_n "(cached) $ac_c" 1>&6
9816 else
9817   ac_save_LIBS="$LIBS"
9818 LIBS="-ldbm  $LIBS"
9819 cat > conftest.$ac_ext <<EOF
9820 #line 9821 "configure"
9821 #include "confdefs.h"
9822 /* Override any gcc2 internal prototype to avoid an error.  */
9823 /* We use char because int might match the return type of a gcc2
9824     builtin and then its argument prototype would still apply.  */
9825 char dbm_open();
9826
9827 int main() {
9828 dbm_open()
9829 ; return 0; }
9830 EOF
9831 if { (eval echo configure:9832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9832   rm -rf conftest*
9833   eval "ac_cv_lib_$ac_lib_var=yes"
9834 else
9835   echo "configure: failed program was:" >&5
9836   cat conftest.$ac_ext >&5
9837   rm -rf conftest*
9838   eval "ac_cv_lib_$ac_lib_var=no"
9839 fi
9840 rm -f conftest*
9841 LIBS="$ac_save_LIBS"
9842
9843 fi
9844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9845   echo "$ac_t""yes" 1>&6
9846   ol_cv_lib_ndbm=-ldbm
9847 else
9848   echo "$ac_t""no" 1>&6
9849 ol_cv_lib_ndbm=no
9850 fi
9851                 
9852 fi
9853
9854         
9855 fi
9856
9857         LIBS="$ol_LIBS"
9858
9859 fi
9860
9861 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9862
9863
9864  for ac_hdr in ndbm.h
9865 do
9866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9868 echo "configure:9869: checking for $ac_hdr" >&5
9869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 #include <$ac_hdr>
9876 EOF
9877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9878 { (eval echo configure:9879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9880 if test -z "$ac_err"; then
9881   rm -rf conftest*
9882   eval "ac_cv_header_$ac_safe=yes"
9883 else
9884   echo "$ac_err" >&5
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   eval "ac_cv_header_$ac_safe=no"
9889 fi
9890 rm -f conftest*
9891 fi
9892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9893   echo "$ac_t""yes" 1>&6
9894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9895   cat >> confdefs.h <<EOF
9896 #define $ac_tr_hdr 1
9897 EOF
9898  
9899 else
9900   echo "$ac_t""no" 1>&6
9901 fi
9902 done
9903
9904  echo $ac_n "checking for db""... $ac_c" 1>&6
9905 echo "configure:9906: checking for db" >&5
9906 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   
9910         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9911                 ol_cv_ndbm=no
9912         else
9913                 ol_cv_ndbm=yes
9914         fi
9915
9916 fi
9917
9918 echo "$ac_t""$ol_cv_ndbm" 1>&6
9919  if test $ol_cv_ndbm = yes ; then
9920         cat >> confdefs.h <<\EOF
9921 #define HAVE_NDBM 1
9922 EOF
9923
9924  fi
9925
9926
9927         if test $ol_cv_ndbm = yes ; then
9928                 ol_link_ldbm=ndbm
9929                 ol_with_ldbm_api=ndbm
9930
9931                 if test $ol_cv_lib_ndbm != yes ; then
9932                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9933                 fi
9934         fi
9935 fi
9936
9937 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9938         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9939         if test $ol_enable_ldbm = yes ; then
9940                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9941         fi
9942
9943         echo "configure: warning: disabling LDBM" 1>&2
9944         ol_enable_ldbm=no
9945 fi
9946
9947 if test $ol_enable_wrappers != no ; then
9948         for ac_hdr in tcpd.h
9949 do
9950 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9951 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9952 echo "configure:9953: checking for $ac_hdr" >&5
9953 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9954   echo $ac_n "(cached) $ac_c" 1>&6
9955 else
9956   cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 #include <$ac_hdr>
9960 EOF
9961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9962 { (eval echo configure:9963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9964 if test -z "$ac_err"; then
9965   rm -rf conftest*
9966   eval "ac_cv_header_$ac_safe=yes"
9967 else
9968   echo "$ac_err" >&5
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971   rm -rf conftest*
9972   eval "ac_cv_header_$ac_safe=no"
9973 fi
9974 rm -f conftest*
9975 fi
9976 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9977   echo "$ac_t""yes" 1>&6
9978     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9979   cat >> confdefs.h <<EOF
9980 #define $ac_tr_hdr 1
9981 EOF
9982  
9983 else
9984   echo "$ac_t""no" 1>&6
9985 fi
9986 done
9987
9988
9989         if test $ac_cv_header_tcpd_h != yes ; then
9990                 have_wrappers=no
9991         else
9992                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9993 echo "configure:9994: checking for main in -lwrap" >&5
9994 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   ac_save_LIBS="$LIBS"
9999 LIBS="-lwrap  $LIBS"
10000 cat > conftest.$ac_ext <<EOF
10001 #line 10002 "configure"
10002 #include "confdefs.h"
10003
10004 int main() {
10005 main()
10006 ; return 0; }
10007 EOF
10008 if { (eval echo configure:10009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10009   rm -rf conftest*
10010   eval "ac_cv_lib_$ac_lib_var=yes"
10011 else
10012   echo "configure: failed program was:" >&5
10013   cat conftest.$ac_ext >&5
10014   rm -rf conftest*
10015   eval "ac_cv_lib_$ac_lib_var=no"
10016 fi
10017 rm -f conftest*
10018 LIBS="$ac_save_LIBS"
10019
10020 fi
10021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10022   echo "$ac_t""yes" 1>&6
10023   have_wrappers=yes
10024 else
10025   echo "$ac_t""no" 1>&6
10026 have_wrappers=no
10027 fi
10028
10029         fi
10030
10031         if test $have_wrappers = yes ; then
10032                 cat >> confdefs.h <<\EOF
10033 #define HAVE_TCPD 1
10034 EOF
10035
10036                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
10037
10038                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
10039 echo "configure:10040: checking for main in -lnsl" >&5
10040 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
10041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10042   echo $ac_n "(cached) $ac_c" 1>&6
10043 else
10044   ac_save_LIBS="$LIBS"
10045 LIBS="-lnsl  $LIBS"
10046 cat > conftest.$ac_ext <<EOF
10047 #line 10048 "configure"
10048 #include "confdefs.h"
10049
10050 int main() {
10051 main()
10052 ; return 0; }
10053 EOF
10054 if { (eval echo configure:10055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10055   rm -rf conftest*
10056   eval "ac_cv_lib_$ac_lib_var=yes"
10057 else
10058   echo "configure: failed program was:" >&5
10059   cat conftest.$ac_ext >&5
10060   rm -rf conftest*
10061   eval "ac_cv_lib_$ac_lib_var=no"
10062 fi
10063 rm -f conftest*
10064 LIBS="$ac_save_LIBS"
10065
10066 fi
10067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10068   echo "$ac_t""yes" 1>&6
10069     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10071   cat >> confdefs.h <<EOF
10072 #define $ac_tr_lib 1
10073 EOF
10074
10075   LIBS="-lnsl $LIBS"
10076
10077 else
10078   echo "$ac_t""no" 1>&6
10079 fi
10080
10081         else
10082                 echo "configure: warning: could not find -lwrap" 1>&2
10083                 if test $ol_enable_wrappers = yes ; then
10084                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
10085                 fi
10086
10087                 echo "configure: warning: disabling wrappers support" 1>&2
10088                 ol_enable_wrappers=no
10089         fi
10090 fi
10091
10092 if test $ol_enable_syslog != no ; then
10093         echo $ac_n "checking for openlog""... $ac_c" 1>&6
10094 echo "configure:10095: checking for openlog" >&5
10095 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
10096   echo $ac_n "(cached) $ac_c" 1>&6
10097 else
10098   cat > conftest.$ac_ext <<EOF
10099 #line 10100 "configure"
10100 #include "confdefs.h"
10101 /* System header to define __stub macros and hopefully few prototypes,
10102     which can conflict with char openlog(); below.  */
10103 #include <assert.h>
10104 /* Override any gcc2 internal prototype to avoid an error.  */
10105 /* We use char because int might match the return type of a gcc2
10106     builtin and then its argument prototype would still apply.  */
10107 char openlog();
10108 char (*f)();
10109
10110 int main() {
10111
10112 /* The GNU C library defines this for functions which it implements
10113     to always fail with ENOSYS.  Some functions are actually named
10114     something starting with __ and the normal name is an alias.  */
10115 #if defined (__stub_openlog) || defined (__stub___openlog)
10116 choke me
10117 #else
10118 f = openlog;
10119 #endif
10120
10121 ; return 0; }
10122 EOF
10123 if { (eval echo configure:10124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10124   rm -rf conftest*
10125   eval "ac_cv_func_openlog=yes"
10126 else
10127   echo "configure: failed program was:" >&5
10128   cat conftest.$ac_ext >&5
10129   rm -rf conftest*
10130   eval "ac_cv_func_openlog=no"
10131 fi
10132 rm -f conftest*
10133 fi
10134
10135 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137   :
10138 else
10139   echo "$ac_t""no" 1>&6
10140 fi
10141
10142         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
10143                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
10144         fi
10145         ol_enable_syslog=$ac_cv_func_openlog
10146 fi
10147
10148 if test $ol_enable_dmalloc != no ; then
10149         for ac_hdr in dmalloc.h
10150 do
10151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10153 echo "configure:10154: checking for $ac_hdr" >&5
10154 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <$ac_hdr>
10161 EOF
10162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10163 { (eval echo configure:10164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10165 if test -z "$ac_err"; then
10166   rm -rf conftest*
10167   eval "ac_cv_header_$ac_safe=yes"
10168 else
10169   echo "$ac_err" >&5
10170   echo "configure: failed program was:" >&5
10171   cat conftest.$ac_ext >&5
10172   rm -rf conftest*
10173   eval "ac_cv_header_$ac_safe=no"
10174 fi
10175 rm -f conftest*
10176 fi
10177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10178   echo "$ac_t""yes" 1>&6
10179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10180   cat >> confdefs.h <<EOF
10181 #define $ac_tr_hdr 1
10182 EOF
10183  
10184 else
10185   echo "$ac_t""no" 1>&6
10186 fi
10187 done
10188
10189         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10190 echo "configure:10191: checking for dmalloc_shutdown in -ldmalloc" >&5
10191 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
10192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10193   echo $ac_n "(cached) $ac_c" 1>&6
10194 else
10195   ac_save_LIBS="$LIBS"
10196 LIBS="-ldmalloc  $LIBS"
10197 cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 /* We use char because int might match the return type of a gcc2
10202     builtin and then its argument prototype would still apply.  */
10203 char dmalloc_shutdown();
10204
10205 int main() {
10206 dmalloc_shutdown()
10207 ; return 0; }
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10210   rm -rf conftest*
10211   eval "ac_cv_lib_$ac_lib_var=yes"
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_lib_$ac_lib_var=no"
10217 fi
10218 rm -f conftest*
10219 LIBS="$ac_save_LIBS"
10220
10221 fi
10222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10223   echo "$ac_t""yes" 1>&6
10224     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10225     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10226   cat >> confdefs.h <<EOF
10227 #define $ac_tr_lib 1
10228 EOF
10229
10230   LIBS="-ldmalloc $LIBS"
10231
10232 else
10233   echo "$ac_t""no" 1>&6
10234 fi
10235
10236 fi
10237
10238 if test $ol_enable_tcl != no ; then
10239         for ac_hdr in tcl.h
10240 do
10241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10243 echo "configure:10244: checking for $ac_hdr" >&5
10244 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250 #include <$ac_hdr>
10251 EOF
10252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10253 { (eval echo configure:10254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10255 if test -z "$ac_err"; then
10256   rm -rf conftest*
10257   eval "ac_cv_header_$ac_safe=yes"
10258 else
10259   echo "$ac_err" >&5
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -rf conftest*
10263   eval "ac_cv_header_$ac_safe=no"
10264 fi
10265 rm -f conftest*
10266 fi
10267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10268   echo "$ac_t""yes" 1>&6
10269     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10270   cat >> confdefs.h <<EOF
10271 #define $ac_tr_hdr 1
10272 EOF
10273  
10274 else
10275   echo "$ac_t""no" 1>&6
10276 fi
10277 done
10278
10279
10280         if test $ac_cv_header_tcl_h != yes ; then
10281                 have_tcl=no
10282         else
10283                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10284 echo "configure:10285: checking for main in -ltcl" >&5
10285 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
10286 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10287   echo $ac_n "(cached) $ac_c" 1>&6
10288 else
10289   ac_save_LIBS="$LIBS"
10290 LIBS="-ltcl  $LIBS"
10291 cat > conftest.$ac_ext <<EOF
10292 #line 10293 "configure"
10293 #include "confdefs.h"
10294
10295 int main() {
10296 main()
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10300   rm -rf conftest*
10301   eval "ac_cv_lib_$ac_lib_var=yes"
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_lib_$ac_lib_var=no"
10307 fi
10308 rm -f conftest*
10309 LIBS="$ac_save_LIBS"
10310
10311 fi
10312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10313   echo "$ac_t""yes" 1>&6
10314   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10315 else
10316   echo "$ac_t""no" 1>&6
10317 have_tcl=no
10318 fi
10319
10320
10321                 if test $have_tcl != yes; then
10322                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10323 echo "configure:10324: checking for main in -ltcl7.6" >&5
10324 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
10325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10326   echo $ac_n "(cached) $ac_c" 1>&6
10327 else
10328   ac_save_LIBS="$LIBS"
10329 LIBS="-ltcl7.6  $LIBS"
10330 cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333
10334 int main() {
10335 main()
10336 ; return 0; }
10337 EOF
10338 if { (eval echo configure:10339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10339   rm -rf conftest*
10340   eval "ac_cv_lib_$ac_lib_var=yes"
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   eval "ac_cv_lib_$ac_lib_var=no"
10346 fi
10347 rm -f conftest*
10348 LIBS="$ac_save_LIBS"
10349
10350 fi
10351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10352   echo "$ac_t""yes" 1>&6
10353   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10354 else
10355   echo "$ac_t""no" 1>&6
10356 have_tcl=no
10357 fi
10358
10359                 fi
10360
10361                 if test $have_tcl != yes; then
10362                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10363 echo "configure:10364: checking for main in -ltcl8.0" >&5
10364 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
10365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   ac_save_LIBS="$LIBS"
10369 LIBS="-ltcl8.0  $LIBS"
10370 cat > conftest.$ac_ext <<EOF
10371 #line 10372 "configure"
10372 #include "confdefs.h"
10373
10374 int main() {
10375 main()
10376 ; return 0; }
10377 EOF
10378 if { (eval echo configure:10379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10379   rm -rf conftest*
10380   eval "ac_cv_lib_$ac_lib_var=yes"
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   eval "ac_cv_lib_$ac_lib_var=no"
10386 fi
10387 rm -f conftest*
10388 LIBS="$ac_save_LIBS"
10389
10390 fi
10391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10392   echo "$ac_t""yes" 1>&6
10393   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10394 else
10395   echo "$ac_t""no" 1>&6
10396 have_tcl=no
10397 fi
10398
10399                 fi
10400         fi
10401
10402         if test $have_tcl != yes ; then
10403                 echo "configure: warning: could not find -ltcl" 1>&2
10404                 if test $ol_enable_tcl = yes ; then
10405                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10406                 fi
10407
10408                 ol_enable_tcl=no
10409         fi
10410 fi
10411
10412 # ud needs termcap (should insert check here)
10413 ol_link_termcap=no
10414 for ac_hdr in termcap.h ncurses.h
10415 do
10416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10418 echo "configure:10419: checking for $ac_hdr" >&5
10419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 #include <$ac_hdr>
10426 EOF
10427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10428 { (eval echo configure:10429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10430 if test -z "$ac_err"; then
10431   rm -rf conftest*
10432   eval "ac_cv_header_$ac_safe=yes"
10433 else
10434   echo "$ac_err" >&5
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_header_$ac_safe=no"
10439 fi
10440 rm -f conftest*
10441 fi
10442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10443   echo "$ac_t""yes" 1>&6
10444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10445   cat >> confdefs.h <<EOF
10446 #define $ac_tr_hdr 1
10447 EOF
10448  
10449 else
10450   echo "$ac_t""no" 1>&6
10451 fi
10452 done
10453
10454
10455 if test $ol_link_termcap = no ; then
10456         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10457 echo "configure:10458: checking for tputs in -ltermcap" >&5
10458 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   ac_save_LIBS="$LIBS"
10463 LIBS="-ltermcap  $LIBS"
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 /* We use char because int might match the return type of a gcc2
10469     builtin and then its argument prototype would still apply.  */
10470 char tputs();
10471
10472 int main() {
10473 tputs()
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_lib_$ac_lib_var=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=no"
10484 fi
10485 rm -f conftest*
10486 LIBS="$ac_save_LIBS"
10487
10488 fi
10489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10490   echo "$ac_t""yes" 1>&6
10491   have_termcap=yes
10492 else
10493   echo "$ac_t""no" 1>&6
10494 have_termcap=no
10495 fi
10496
10497         if test $have_termcap = yes ; then
10498                 cat >> confdefs.h <<\EOF
10499 #define HAVE_TERMCAP 1
10500 EOF
10501
10502                 ol_link_termcap=yes
10503                 TERMCAP_LIBS=-ltermcap
10504         fi
10505 fi
10506
10507 if test $ol_link_termcap = no ; then
10508         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10509 echo "configure:10510: checking for initscr in -lncurses" >&5
10510 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10511 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10512   echo $ac_n "(cached) $ac_c" 1>&6
10513 else
10514   ac_save_LIBS="$LIBS"
10515 LIBS="-lncurses  $LIBS"
10516 cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 /* Override any gcc2 internal prototype to avoid an error.  */
10520 /* We use char because int might match the return type of a gcc2
10521     builtin and then its argument prototype would still apply.  */
10522 char initscr();
10523
10524 int main() {
10525 initscr()
10526 ; return 0; }
10527 EOF
10528 if { (eval echo configure:10529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10529   rm -rf conftest*
10530   eval "ac_cv_lib_$ac_lib_var=yes"
10531 else
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   eval "ac_cv_lib_$ac_lib_var=no"
10536 fi
10537 rm -f conftest*
10538 LIBS="$ac_save_LIBS"
10539
10540 fi
10541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10542   echo "$ac_t""yes" 1>&6
10543   have_ncurses=yes
10544 else
10545   echo "$ac_t""no" 1>&6
10546 have_ncurses=no
10547 fi
10548
10549         if test $have_ncurses = yes ; then
10550                 cat >> confdefs.h <<\EOF
10551 #define HAVE_NCURSES 1
10552 EOF
10553
10554                 ol_link_termcap=yes
10555                 TERMCAP_LIBS=-lncurses
10556         fi
10557 fi
10558
10559 if test $ol_link_termcap = no ; then
10560         cat >> confdefs.h <<\EOF
10561 #define NO_TERMCAP 1
10562 EOF
10563
10564         TERMCAP_LIBS=
10565 fi
10566
10567 ol_link_sasl=no
10568 if test $ol_with_cyrus_sasl != no ; then
10569         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10570 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10571 echo "configure:10572: checking for sasl.h" >&5
10572 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 #include <sasl.h>
10579 EOF
10580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10581 { (eval echo configure:10582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10583 if test -z "$ac_err"; then
10584   rm -rf conftest*
10585   eval "ac_cv_header_$ac_safe=yes"
10586 else
10587   echo "$ac_err" >&5
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_header_$ac_safe=no"
10592 fi
10593 rm -f conftest*
10594 fi
10595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10596   echo "$ac_t""yes" 1>&6
10597   :
10598 else
10599   echo "$ac_t""no" 1>&6
10600 fi
10601
10602
10603         if test $ac_cv_header_sasl_h = yes ; then
10604                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10605 echo "configure:10606: checking for sasl_client_init in -lsasl" >&5
10606 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
10607 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   ac_save_LIBS="$LIBS"
10611 LIBS="-lsasl  $LIBS"
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615 /* Override any gcc2 internal prototype to avoid an error.  */
10616 /* We use char because int might match the return type of a gcc2
10617     builtin and then its argument prototype would still apply.  */
10618 char sasl_client_init();
10619
10620 int main() {
10621 sasl_client_init()
10622 ; return 0; }
10623 EOF
10624 if { (eval echo configure:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10625   rm -rf conftest*
10626   eval "ac_cv_lib_$ac_lib_var=yes"
10627 else
10628   echo "configure: failed program was:" >&5
10629   cat conftest.$ac_ext >&5
10630   rm -rf conftest*
10631   eval "ac_cv_lib_$ac_lib_var=no"
10632 fi
10633 rm -f conftest*
10634 LIBS="$ac_save_LIBS"
10635
10636 fi
10637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10638   echo "$ac_t""yes" 1>&6
10639   have_cyrus_sasl=yes
10640 else
10641   echo "$ac_t""no" 1>&6
10642 have_cyrus_sasl=no
10643 fi
10644
10645
10646                 if test $have_cyrus_sasl != no ; then
10647                         LUTIL_LIBS="$LUTIL_LIBS -lsasl"
10648                         cat >> confdefs.h <<\EOF
10649 #define HAVE_CYRUS_SASL 1
10650 EOF
10651
10652                         ol_link_sasl=yes
10653                 fi
10654         fi
10655
10656         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10657                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10658         fi
10659 fi
10660
10661 ol_link_fetch=no
10662 if test $ol_with_fetch != no ; then
10663         ol=$LIBS
10664 LIBS="-lfetch -lcom_err $LIBS"
10665 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10666 echo "configure:10667: checking fetch(3) library" >&5
10667 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
10668   echo $ac_n "(cached) $ac_c" 1>&6
10669 else
10670   
10671         cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674
10675 #include <sys/param.h>
10676 #include <stdio.h>
10677 #include <fetch.h>
10678 int main() {
10679 struct url *u = fetchParseURL("file:///"); 
10680 ; return 0; }
10681 EOF
10682 if { (eval echo configure:10683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10683   rm -rf conftest*
10684   ol_cv_lib_fetch=yes
10685 else
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -rf conftest*
10689   ol_cv_lib_fetch=no
10690 fi
10691 rm -f conftest*
10692 fi
10693
10694 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10695 LIBS=$ol_LIBS
10696 if test $ol_cv_lib_fetch != no ; then
10697         ol_link_fetch="-lfetch -lcom_err"
10698         cat >> confdefs.h <<\EOF
10699 #define HAVE_FETCH 1
10700 EOF
10701
10702 fi
10703
10704
10705         if test $ol_cv_lib_fetch != no ; then
10706                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10707                 ol_link_fetch=freebsd
10708
10709         elif test $ol_with_fetch != auto ; then
10710                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10711         fi 
10712 fi
10713
10714 ol_link_readline=no
10715 if test $ol_with_readline != no ; then
10716         for ac_hdr in readline/readline.h readline/history.h
10717 do
10718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10720 echo "configure:10721: checking for $ac_hdr" >&5
10721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727 #include <$ac_hdr>
10728 EOF
10729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10730 { (eval echo configure:10731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10732 if test -z "$ac_err"; then
10733   rm -rf conftest*
10734   eval "ac_cv_header_$ac_safe=yes"
10735 else
10736   echo "$ac_err" >&5
10737   echo "configure: failed program was:" >&5
10738   cat conftest.$ac_ext >&5
10739   rm -rf conftest*
10740   eval "ac_cv_header_$ac_safe=no"
10741 fi
10742 rm -f conftest*
10743 fi
10744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10745   echo "$ac_t""yes" 1>&6
10746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10747   cat >> confdefs.h <<EOF
10748 #define $ac_tr_hdr 1
10749 EOF
10750  
10751 else
10752   echo "$ac_t""no" 1>&6
10753 fi
10754 done
10755
10756
10757         if test $ac_cv_header_readline_readline_h = yes ; then
10758                 save_LIBS="$LIBS"
10759                 LIBS="$TERMCAP_LIBS $LIBS"
10760                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10761 echo "configure:10762: checking for readline in -lreadline" >&5
10762 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   ac_save_LIBS="$LIBS"
10767 LIBS="-lreadline  $LIBS"
10768 cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771 /* Override any gcc2 internal prototype to avoid an error.  */
10772 /* We use char because int might match the return type of a gcc2
10773     builtin and then its argument prototype would still apply.  */
10774 char readline();
10775
10776 int main() {
10777 readline()
10778 ; return 0; }
10779 EOF
10780 if { (eval echo configure:10781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10781   rm -rf conftest*
10782   eval "ac_cv_lib_$ac_lib_var=yes"
10783 else
10784   echo "configure: failed program was:" >&5
10785   cat conftest.$ac_ext >&5
10786   rm -rf conftest*
10787   eval "ac_cv_lib_$ac_lib_var=no"
10788 fi
10789 rm -f conftest*
10790 LIBS="$ac_save_LIBS"
10791
10792 fi
10793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10794   echo "$ac_t""yes" 1>&6
10795   have_readline=yes
10796 else
10797   echo "$ac_t""no" 1>&6
10798 have_readline=no
10799 fi
10800
10801                 LIBS="$save_LIBS"
10802                         
10803                 if test $have_readline = yes ; then
10804                         ol_with_readline=found
10805                         ol_link_readline=yes
10806
10807                         READLINE_LIBS="-lreadline"
10808                 fi
10809         fi
10810 fi
10811
10812 if test $ol_link_readline = yes ; then
10813         cat >> confdefs.h <<\EOF
10814 #define HAVE_READLINE 1
10815 EOF
10816
10817 fi
10818
10819
10820 # FreeBSD (and others) have crypt(3) in -lcrypt
10821 if test $ol_enable_crypt != no ; then
10822         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10823 echo "configure:10824: checking for crypt" >&5
10824 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10825   echo $ac_n "(cached) $ac_c" 1>&6
10826 else
10827   cat > conftest.$ac_ext <<EOF
10828 #line 10829 "configure"
10829 #include "confdefs.h"
10830 /* System header to define __stub macros and hopefully few prototypes,
10831     which can conflict with char crypt(); below.  */
10832 #include <assert.h>
10833 /* Override any gcc2 internal prototype to avoid an error.  */
10834 /* We use char because int might match the return type of a gcc2
10835     builtin and then its argument prototype would still apply.  */
10836 char crypt();
10837 char (*f)();
10838
10839 int main() {
10840
10841 /* The GNU C library defines this for functions which it implements
10842     to always fail with ENOSYS.  Some functions are actually named
10843     something starting with __ and the normal name is an alias.  */
10844 #if defined (__stub_crypt) || defined (__stub___crypt)
10845 choke me
10846 #else
10847 f = crypt;
10848 #endif
10849
10850 ; return 0; }
10851 EOF
10852 if { (eval echo configure:10853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10853   rm -rf conftest*
10854   eval "ac_cv_func_crypt=yes"
10855 else
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   eval "ac_cv_func_crypt=no"
10860 fi
10861 rm -f conftest*
10862 fi
10863
10864 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10865   echo "$ac_t""yes" 1>&6
10866   have_crypt=yes
10867 else
10868   echo "$ac_t""no" 1>&6
10869
10870                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10871 echo "configure:10872: checking for crypt in -lcrypt" >&5
10872 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10874   echo $ac_n "(cached) $ac_c" 1>&6
10875 else
10876   ac_save_LIBS="$LIBS"
10877 LIBS="-lcrypt  $LIBS"
10878 cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881 /* Override any gcc2 internal prototype to avoid an error.  */
10882 /* We use char because int might match the return type of a gcc2
10883     builtin and then its argument prototype would still apply.  */
10884 char crypt();
10885
10886 int main() {
10887 crypt()
10888 ; return 0; }
10889 EOF
10890 if { (eval echo configure:10891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10891   rm -rf conftest*
10892   eval "ac_cv_lib_$ac_lib_var=yes"
10893 else
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_lib_$ac_lib_var=no"
10898 fi
10899 rm -f conftest*
10900 LIBS="$ac_save_LIBS"
10901
10902 fi
10903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10904   echo "$ac_t""yes" 1>&6
10905   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10906                         have_crypt=yes
10907 else
10908   echo "$ac_t""no" 1>&6
10909 have_crypt=no
10910 fi
10911
10912 fi
10913
10914
10915         if test $have_crypt = yes ; then
10916                 cat >> confdefs.h <<\EOF
10917 #define HAVE_CRYPT 1
10918 EOF
10919
10920         else
10921                 echo "configure: warning: could not find crypt" 1>&2
10922                 if test $ol_enable_crypt = yes ; then
10923                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10924                 fi
10925
10926                 echo "configure: warning: disabling crypt support" 1>&2
10927                 ol_enable_crypt=no
10928         fi
10929 fi
10930
10931 # FreeBSD (and others) have setproctitle(3) in -lutil
10932 if test $ol_enable_proctitle != no ; then
10933         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10934 echo "configure:10935: checking for setproctitle" >&5
10935 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10936   echo $ac_n "(cached) $ac_c" 1>&6
10937 else
10938   cat > conftest.$ac_ext <<EOF
10939 #line 10940 "configure"
10940 #include "confdefs.h"
10941 /* System header to define __stub macros and hopefully few prototypes,
10942     which can conflict with char setproctitle(); below.  */
10943 #include <assert.h>
10944 /* Override any gcc2 internal prototype to avoid an error.  */
10945 /* We use char because int might match the return type of a gcc2
10946     builtin and then its argument prototype would still apply.  */
10947 char setproctitle();
10948 char (*f)();
10949
10950 int main() {
10951
10952 /* The GNU C library defines this for functions which it implements
10953     to always fail with ENOSYS.  Some functions are actually named
10954     something starting with __ and the normal name is an alias.  */
10955 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10956 choke me
10957 #else
10958 f = setproctitle;
10959 #endif
10960
10961 ; return 0; }
10962 EOF
10963 if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10964   rm -rf conftest*
10965   eval "ac_cv_func_setproctitle=yes"
10966 else
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -rf conftest*
10970   eval "ac_cv_func_setproctitle=no"
10971 fi
10972 rm -f conftest*
10973 fi
10974
10975 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10976   echo "$ac_t""yes" 1>&6
10977   have_setproctitle=yes
10978 else
10979   echo "$ac_t""no" 1>&6
10980
10981                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10982 echo "configure:10983: checking for setproctitle in -lutil" >&5
10983 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10985   echo $ac_n "(cached) $ac_c" 1>&6
10986 else
10987   ac_save_LIBS="$LIBS"
10988 LIBS="-lutil  $LIBS"
10989 cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 /* Override any gcc2 internal prototype to avoid an error.  */
10993 /* We use char because int might match the return type of a gcc2
10994     builtin and then its argument prototype would still apply.  */
10995 char setproctitle();
10996
10997 int main() {
10998 setproctitle()
10999 ; return 0; }
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=yes"
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=no"
11009 fi
11010 rm -f conftest*
11011 LIBS="$ac_save_LIBS"
11012
11013 fi
11014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11015   echo "$ac_t""yes" 1>&6
11016   have_setproctitle=yes
11017                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
11018 else
11019   echo "$ac_t""no" 1>&6
11020 have_setproctitle=no
11021                         LIBOBJS="$LIBOBJS setproctitle.o"
11022 fi
11023
11024 fi
11025
11026
11027         if test $have_setproctitle = yes ; then
11028                 cat >> confdefs.h <<\EOF
11029 #define HAVE_SETPROCTITLE 1
11030 EOF
11031
11032         fi
11033 fi
11034
11035 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
11036 echo "configure:11037: checking for uid_t in sys/types.h" >&5
11037 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
11038   echo $ac_n "(cached) $ac_c" 1>&6
11039 else
11040   cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043 #include <sys/types.h>
11044 EOF
11045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11046   egrep "uid_t" >/dev/null 2>&1; then
11047   rm -rf conftest*
11048   ac_cv_type_uid_t=yes
11049 else
11050   rm -rf conftest*
11051   ac_cv_type_uid_t=no
11052 fi
11053 rm -f conftest*
11054
11055 fi
11056
11057 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
11058 if test $ac_cv_type_uid_t = no; then
11059   cat >> confdefs.h <<\EOF
11060 #define uid_t int
11061 EOF
11062
11063   cat >> confdefs.h <<\EOF
11064 #define gid_t int
11065 EOF
11066
11067 fi
11068
11069 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
11070 echo "configure:11071: checking type of array argument to getgroups" >&5
11071 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
11072   echo $ac_n "(cached) $ac_c" 1>&6
11073 else
11074   if test "$cross_compiling" = yes; then
11075   ac_cv_type_getgroups=cross
11076 else
11077   cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080
11081 /* Thanks to Mike Rendell for this test.  */
11082 #include <sys/types.h>
11083 #define NGID 256
11084 #undef MAX
11085 #define MAX(x, y) ((x) > (y) ? (x) : (y))
11086 main()
11087 {
11088   gid_t gidset[NGID];
11089   int i, n;
11090   union { gid_t gval; long lval; }  val;
11091
11092   val.lval = -1;
11093   for (i = 0; i < NGID; i++)
11094     gidset[i] = val.gval;
11095   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11096                  gidset);
11097   /* Exit non-zero if getgroups seems to require an array of ints.  This
11098      happens when gid_t is short but getgroups modifies an array of ints.  */
11099   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
11100 }
11101
11102 EOF
11103 if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11104 then
11105     ac_cv_type_getgroups=gid_t
11106 else
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -fr conftest*
11110   ac_cv_type_getgroups=int
11111 fi
11112 rm -fr conftest*
11113 fi
11114
11115 if test $ac_cv_type_getgroups = cross; then
11116         cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 #include <unistd.h>
11120 EOF
11121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11122   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
11123   rm -rf conftest*
11124   ac_cv_type_getgroups=gid_t
11125 else
11126   rm -rf conftest*
11127   ac_cv_type_getgroups=int
11128 fi
11129 rm -f conftest*
11130
11131 fi
11132 fi
11133
11134 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
11135 cat >> confdefs.h <<EOF
11136 #define GETGROUPS_T $ac_cv_type_getgroups
11137 EOF
11138
11139  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11140 echo "configure:11141: checking for ANSI C header files" >&5
11141 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
11142   echo $ac_n "(cached) $ac_c" 1>&6
11143 else
11144   cat > conftest.$ac_ext <<EOF
11145 #line 11146 "configure"
11146 #include "confdefs.h"
11147 #include <stdlib.h>
11148 #include <stdarg.h>
11149 #include <string.h>
11150 #include <float.h>
11151 EOF
11152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11153 { (eval echo configure:11154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11155 if test -z "$ac_err"; then
11156   rm -rf conftest*
11157   ac_cv_header_stdc=yes
11158 else
11159   echo "$ac_err" >&5
11160   echo "configure: failed program was:" >&5
11161   cat conftest.$ac_ext >&5
11162   rm -rf conftest*
11163   ac_cv_header_stdc=no
11164 fi
11165 rm -f conftest*
11166
11167 if test $ac_cv_header_stdc = yes; then
11168   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11169 cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <string.h>
11173 EOF
11174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11175   egrep "memchr" >/dev/null 2>&1; then
11176   :
11177 else
11178   rm -rf conftest*
11179   ac_cv_header_stdc=no
11180 fi
11181 rm -f conftest*
11182
11183 fi
11184
11185 if test $ac_cv_header_stdc = yes; then
11186   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11187 cat > conftest.$ac_ext <<EOF
11188 #line 11189 "configure"
11189 #include "confdefs.h"
11190 #include <stdlib.h>
11191 EOF
11192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11193   egrep "free" >/dev/null 2>&1; then
11194   :
11195 else
11196   rm -rf conftest*
11197   ac_cv_header_stdc=no
11198 fi
11199 rm -f conftest*
11200
11201 fi
11202
11203 if test $ac_cv_header_stdc = yes; then
11204   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11205 if test "$cross_compiling" = yes; then
11206   :
11207 else
11208   cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211 #include <ctype.h>
11212 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11213 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11214 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11215 int main () { int i; for (i = 0; i < 256; i++)
11216 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11217 exit (0); }
11218
11219 EOF
11220 if { (eval echo configure:11221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11221 then
11222   :
11223 else
11224   echo "configure: failed program was:" >&5
11225   cat conftest.$ac_ext >&5
11226   rm -fr conftest*
11227   ac_cv_header_stdc=no
11228 fi
11229 rm -fr conftest*
11230 fi
11231
11232 fi
11233 fi
11234
11235 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11236 if test $ac_cv_header_stdc = yes; then
11237   cat >> confdefs.h <<\EOF
11238 #define STDC_HEADERS 1
11239 EOF
11240
11241 fi
11242
11243 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11244 echo "configure:11245: checking for mode_t" >&5
11245 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
11246   echo $ac_n "(cached) $ac_c" 1>&6
11247 else
11248   cat > conftest.$ac_ext <<EOF
11249 #line 11250 "configure"
11250 #include "confdefs.h"
11251 #include <sys/types.h>
11252 #if STDC_HEADERS
11253 #include <stdlib.h>
11254 #include <stddef.h>
11255 #endif
11256 EOF
11257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11258   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11259   rm -rf conftest*
11260   eval "ac_cv_type_mode_t=yes"
11261 else
11262   rm -rf conftest*
11263   eval "ac_cv_type_mode_t=no"
11264 fi
11265 rm -f conftest*
11266
11267 fi
11268 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
11269   echo "$ac_t""yes" 1>&6
11270 else
11271   echo "$ac_t""no" 1>&6
11272   cat >> confdefs.h <<EOF
11273 #define mode_t int
11274 EOF
11275
11276 fi
11277
11278 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11279 echo "configure:11280: checking for off_t" >&5
11280 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
11281   echo $ac_n "(cached) $ac_c" 1>&6
11282 else
11283   cat > conftest.$ac_ext <<EOF
11284 #line 11285 "configure"
11285 #include "confdefs.h"
11286 #include <sys/types.h>
11287 #if STDC_HEADERS
11288 #include <stdlib.h>
11289 #include <stddef.h>
11290 #endif
11291 EOF
11292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11293   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11294   rm -rf conftest*
11295   eval "ac_cv_type_off_t=yes"
11296 else
11297   rm -rf conftest*
11298   eval "ac_cv_type_off_t=no"
11299 fi
11300 rm -f conftest*
11301
11302 fi
11303 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
11304   echo "$ac_t""yes" 1>&6
11305 else
11306   echo "$ac_t""no" 1>&6
11307   cat >> confdefs.h <<EOF
11308 #define off_t long
11309 EOF
11310
11311 fi
11312
11313 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11314 echo "configure:11315: checking for pid_t" >&5
11315 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
11316   echo $ac_n "(cached) $ac_c" 1>&6
11317 else
11318   cat > conftest.$ac_ext <<EOF
11319 #line 11320 "configure"
11320 #include "confdefs.h"
11321 #include <sys/types.h>
11322 #if STDC_HEADERS
11323 #include <stdlib.h>
11324 #include <stddef.h>
11325 #endif
11326 EOF
11327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11328   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11329   rm -rf conftest*
11330   eval "ac_cv_type_pid_t=yes"
11331 else
11332   rm -rf conftest*
11333   eval "ac_cv_type_pid_t=no"
11334 fi
11335 rm -f conftest*
11336
11337 fi
11338 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
11339   echo "$ac_t""yes" 1>&6
11340 else
11341   echo "$ac_t""no" 1>&6
11342   cat >> confdefs.h <<EOF
11343 #define pid_t int
11344 EOF
11345
11346 fi
11347
11348 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11349 echo "configure:11350: checking for ptrdiff_t" >&5
11350 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11351   echo $ac_n "(cached) $ac_c" 1>&6
11352 else
11353   cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 #include <stddef.h>
11357 int main() {
11358 ptrdiff_t p
11359 ; return 0; }
11360 EOF
11361 if { (eval echo configure:11362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11362   rm -rf conftest*
11363   am_cv_type_ptrdiff_t=yes
11364 else
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   am_cv_type_ptrdiff_t=no
11369 fi
11370 rm -f conftest*
11371 fi
11372
11373 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11374    if test $am_cv_type_ptrdiff_t = yes; then
11375      cat >> confdefs.h <<\EOF
11376 #define HAVE_PTRDIFF_T 1
11377 EOF
11378
11379    fi
11380
11381 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11382 echo "configure:11383: checking return type of signal handlers" >&5
11383 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11384   echo $ac_n "(cached) $ac_c" 1>&6
11385 else
11386   cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389 #include <sys/types.h>
11390 #include <signal.h>
11391 #ifdef signal
11392 #undef signal
11393 #endif
11394 #ifdef __cplusplus
11395 extern "C" void (*signal (int, void (*)(int)))(int);
11396 #else
11397 void (*signal ()) ();
11398 #endif
11399
11400 int main() {
11401 int i;
11402 ; return 0; }
11403 EOF
11404 if { (eval echo configure:11405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11405   rm -rf conftest*
11406   ac_cv_type_signal=void
11407 else
11408   echo "configure: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   rm -rf conftest*
11411   ac_cv_type_signal=int
11412 fi
11413 rm -f conftest*
11414 fi
11415
11416 echo "$ac_t""$ac_cv_type_signal" 1>&6
11417 cat >> confdefs.h <<EOF
11418 #define RETSIGTYPE $ac_cv_type_signal
11419 EOF
11420
11421
11422 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11423 echo "configure:11424: checking for sig_atomic_t" >&5
11424 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11425   echo $ac_n "(cached) $ac_c" 1>&6
11426 else
11427   cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 #include <signal.h>
11431 int main() {
11432 sig_atomic_t atomic;
11433 ; return 0; }
11434 EOF
11435 if { (eval echo configure:11436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11436   rm -rf conftest*
11437   ol_cv_type_sig_atomic_t=yes
11438 else
11439   echo "configure: failed program was:" >&5
11440   cat conftest.$ac_ext >&5
11441   rm -rf conftest*
11442   ol_cv_type_sig_atomic_t=no
11443 fi
11444 rm -f conftest*
11445 fi
11446
11447 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11448   if test $ol_cv_type_sig_atomic_t = no; then
11449     cat >> confdefs.h <<\EOF
11450 #define sig_atomic_t int
11451 EOF
11452
11453   fi
11454  
11455 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11456 echo "configure:11457: checking for size_t" >&5
11457 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11458   echo $ac_n "(cached) $ac_c" 1>&6
11459 else
11460   cat > conftest.$ac_ext <<EOF
11461 #line 11462 "configure"
11462 #include "confdefs.h"
11463 #include <sys/types.h>
11464 #if STDC_HEADERS
11465 #include <stdlib.h>
11466 #include <stddef.h>
11467 #endif
11468 EOF
11469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11470   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11471   rm -rf conftest*
11472   eval "ac_cv_type_size_t=yes"
11473 else
11474   rm -rf conftest*
11475   eval "ac_cv_type_size_t=no"
11476 fi
11477 rm -f conftest*
11478
11479 fi
11480 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11481   echo "$ac_t""yes" 1>&6
11482 else
11483   echo "$ac_t""no" 1>&6
11484   cat >> confdefs.h <<EOF
11485 #define size_t unsigned
11486 EOF
11487
11488 fi
11489
11490 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11491 echo "configure:11492: checking for socklen_t" >&5
11492 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11493   echo $ac_n "(cached) $ac_c" 1>&6
11494 else
11495   cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498
11499 #ifdef HAVE_SYS_TYPES_H
11500 #include <sys/types.h>
11501 #endif
11502 #ifdef HAVE_SYS_SOCKET_H
11503 #include <sys/socket.h>
11504 #endif
11505
11506 int main() {
11507 socklen_t len;
11508 ; return 0; }
11509 EOF
11510 if { (eval echo configure:11511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11511   rm -rf conftest*
11512   ol_cv_type_socklen_t=yes
11513 else
11514   echo "configure: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   rm -rf conftest*
11517   ol_cv_type_socklen_t=no
11518 fi
11519 rm -f conftest*
11520 fi
11521
11522 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11523   if test $ol_cv_type_socklen_t = no; then
11524     cat >> confdefs.h <<\EOF
11525 #define socklen_t int
11526 EOF
11527
11528   fi
11529  
11530 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11531 echo "configure:11532: checking for member st_blksize in aggregate type struct stat" >&5
11532 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11533   echo $ac_n "(cached) $ac_c" 1>&6
11534 else
11535   cat > conftest.$ac_ext <<EOF
11536 #line 11537 "configure"
11537 #include "confdefs.h"
11538 #include <sys/types.h>
11539 #include <sys/stat.h>
11540 int main() {
11541 struct stat foo; foo.st_blksize;
11542 ; return 0; }
11543 EOF
11544 if { (eval echo configure:11545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11545   rm -rf conftest*
11546   ac_cv_c_struct_member_st_blksize=yes
11547 else
11548   echo "configure: failed program was:" >&5
11549   cat conftest.$ac_ext >&5
11550   rm -rf conftest*
11551   ac_cv_c_struct_member_st_blksize=no
11552 fi
11553 rm -f conftest*
11554 fi
11555
11556 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11557 st_blksize="$ac_cv_c_struct_member_st_blksize"
11558 if test $ac_cv_c_struct_member_st_blksize = yes; then
11559   cat >> confdefs.h <<\EOF
11560 #define HAVE_ST_BLKSIZE 1
11561 EOF
11562
11563 fi
11564
11565 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11566 echo "configure:11567: checking whether time.h and sys/time.h may both be included" >&5
11567 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11568   echo $ac_n "(cached) $ac_c" 1>&6
11569 else
11570   cat > conftest.$ac_ext <<EOF
11571 #line 11572 "configure"
11572 #include "confdefs.h"
11573 #include <sys/types.h>
11574 #include <sys/time.h>
11575 #include <time.h>
11576 int main() {
11577 struct tm *tp;
11578 ; return 0; }
11579 EOF
11580 if { (eval echo configure:11581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11581   rm -rf conftest*
11582   ac_cv_header_time=yes
11583 else
11584   echo "configure: failed program was:" >&5
11585   cat conftest.$ac_ext >&5
11586   rm -rf conftest*
11587   ac_cv_header_time=no
11588 fi
11589 rm -f conftest*
11590 fi
11591
11592 echo "$ac_t""$ac_cv_header_time" 1>&6
11593 if test $ac_cv_header_time = yes; then
11594   cat >> confdefs.h <<\EOF
11595 #define TIME_WITH_SYS_TIME 1
11596 EOF
11597
11598 fi
11599
11600 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11601 echo "configure:11602: checking whether struct tm is in sys/time.h or time.h" >&5
11602 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 #include <sys/types.h>
11609 #include <time.h>
11610 int main() {
11611 struct tm *tp; tp->tm_sec;
11612 ; return 0; }
11613 EOF
11614 if { (eval echo configure:11615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11615   rm -rf conftest*
11616   ac_cv_struct_tm=time.h
11617 else
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620   rm -rf conftest*
11621   ac_cv_struct_tm=sys/time.h
11622 fi
11623 rm -f conftest*
11624 fi
11625
11626 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11627 if test $ac_cv_struct_tm = sys/time.h; then
11628   cat >> confdefs.h <<\EOF
11629 #define TM_IN_SYS_TIME 1
11630 EOF
11631
11632 fi
11633
11634 # test for pw_gecos in struct passwd
11635 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11636 echo "configure:11637: checking struct passwd for pw_gecos" >&5
11637 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   
11641         cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644 #include <pwd.h>
11645 int main() {
11646
11647         struct passwd pwd;
11648         pwd.pw_gecos = pwd.pw_name;
11649
11650 ; return 0; }
11651 EOF
11652 if { (eval echo configure:11653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11653   rm -rf conftest*
11654   ol_cv_struct_passwd_pw_gecos=yes
11655 else
11656   echo "configure: failed program was:" >&5
11657   cat conftest.$ac_ext >&5
11658   rm -rf conftest*
11659   ol_cv_struct_passwd_pw_gecos=no
11660 fi
11661 rm -f conftest*
11662 fi
11663
11664 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11665 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11666         cat >> confdefs.h <<\EOF
11667 #define HAVE_PW_GECOS 1
11668 EOF
11669
11670 fi
11671
11672 # test for pw_passwd in struct passwd
11673 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11674 echo "configure:11675: checking struct passwd for pw_passwd" >&5
11675 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11676   echo $ac_n "(cached) $ac_c" 1>&6
11677 else
11678   
11679         cat > conftest.$ac_ext <<EOF
11680 #line 11681 "configure"
11681 #include "confdefs.h"
11682 #include <pwd.h>
11683 int main() {
11684
11685         struct passwd pwd;
11686         pwd.pw_passwd = pwd.pw_name;
11687
11688 ; return 0; }
11689 EOF
11690 if { (eval echo configure:11691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11691   rm -rf conftest*
11692   ol_cv_struct_passwd_pw_passwd=yes
11693 else
11694   echo "configure: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   rm -rf conftest*
11697   ol_cv_struct_passwd_pw_passwd=no
11698 fi
11699 rm -f conftest*
11700 fi
11701
11702 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11703 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11704         cat >> confdefs.h <<\EOF
11705 #define HAVE_PW_PASSWD 1
11706 EOF
11707
11708 fi
11709
11710
11711 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11712 echo "configure:11713: checking if toupper() requires islower()" >&5
11713 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11714   echo $ac_n "(cached) $ac_c" 1>&6
11715 else
11716   
11717         if test "$cross_compiling" = yes; then
11718   ol_cv_c_upper_lower=safe
11719 else
11720   cat > conftest.$ac_ext <<EOF
11721 #line 11722 "configure"
11722 #include "confdefs.h"
11723
11724 #include <ctype.h>
11725 main()
11726 {
11727         if ('C' == toupper('C'))
11728                 exit(0);
11729         else
11730                 exit(1);
11731 }
11732 EOF
11733 if { (eval echo configure:11734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11734 then
11735   ol_cv_c_upper_lower=no
11736 else
11737   echo "configure: failed program was:" >&5
11738   cat conftest.$ac_ext >&5
11739   rm -fr conftest*
11740   ol_cv_c_upper_lower=yes
11741 fi
11742 rm -fr conftest*
11743 fi
11744
11745 fi
11746
11747 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11748 if test $ol_cv_c_upper_lower != no ; then
11749         cat >> confdefs.h <<\EOF
11750 #define C_UPPER_LOWER 1
11751 EOF
11752
11753 fi
11754
11755 echo $ac_n "checking for working const""... $ac_c" 1>&6
11756 echo "configure:11757: checking for working const" >&5
11757 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11758   echo $ac_n "(cached) $ac_c" 1>&6
11759 else
11760   cat > conftest.$ac_ext <<EOF
11761 #line 11762 "configure"
11762 #include "confdefs.h"
11763
11764 int main() {
11765
11766 /* Ultrix mips cc rejects this.  */
11767 typedef int charset[2]; const charset x;
11768 /* SunOS 4.1.1 cc rejects this.  */
11769 char const *const *ccp;
11770 char **p;
11771 /* NEC SVR4.0.2 mips cc rejects this.  */
11772 struct point {int x, y;};
11773 static struct point const zero = {0,0};
11774 /* AIX XL C 1.02.0.0 rejects this.
11775    It does not let you subtract one const X* pointer from another in an arm
11776    of an if-expression whose if-part is not a constant expression */
11777 const char *g = "string";
11778 ccp = &g + (g ? g-g : 0);
11779 /* HPUX 7.0 cc rejects these. */
11780 ++ccp;
11781 p = (char**) ccp;
11782 ccp = (char const *const *) p;
11783 { /* SCO 3.2v4 cc rejects this.  */
11784   char *t;
11785   char const *s = 0 ? (char *) 0 : (char const *) 0;
11786
11787   *t++ = 0;
11788 }
11789 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11790   int x[] = {25, 17};
11791   const int *foo = &x[0];
11792   ++foo;
11793 }
11794 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11795   typedef const int *iptr;
11796   iptr p = 0;
11797   ++p;
11798 }
11799 { /* AIX XL C 1.02.0.0 rejects this saying
11800      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11801   struct s { int j; const int *ap[3]; };
11802   struct s *b; b->j = 5;
11803 }
11804 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11805   const int foo = 10;
11806 }
11807
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11811   rm -rf conftest*
11812   ac_cv_c_const=yes
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   ac_cv_c_const=no
11818 fi
11819 rm -f conftest*
11820 fi
11821
11822 echo "$ac_t""$ac_cv_c_const" 1>&6
11823 if test $ac_cv_c_const = no; then
11824   cat >> confdefs.h <<\EOF
11825 #define const 
11826 EOF
11827
11828 fi
11829
11830 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11831 echo "configure:11832: checking if compiler understands volatile" >&5
11832 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11833   echo $ac_n "(cached) $ac_c" 1>&6
11834 else
11835   cat > conftest.$ac_ext <<EOF
11836 #line 11837 "configure"
11837 #include "confdefs.h"
11838 int x, y, z;
11839 int main() {
11840 volatile int a; int * volatile b = x ? &y : &z;
11841       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11842       *b = 0;
11843 ; return 0; }
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11846   rm -rf conftest*
11847   ol_cv_c_volatile=yes
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -rf conftest*
11852   ol_cv_c_volatile=no
11853 fi
11854 rm -f conftest*
11855 fi
11856
11857 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11858   if test $ol_cv_c_volatile = yes; then
11859     : 
11860   else
11861     cat >> confdefs.h <<\EOF
11862 #define volatile 
11863 EOF
11864
11865   fi
11866  
11867
11868 if test $cross_compiling = yes ; then
11869         cat >> confdefs.h <<\EOF
11870 #define CROSS_COMPILING 1
11871 EOF
11872
11873
11874         cat >> confdefs.h <<\EOF
11875 #define LBER_INT_T long
11876 EOF
11877
11878         cat >> confdefs.h <<\EOF
11879 #define LBER_TAG_T long
11880 EOF
11881
11882         cat >> confdefs.h <<\EOF
11883 #define LBER_SOCKET_T int
11884 EOF
11885
11886
11887 else
11888         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11889 echo "configure:11890: checking whether byte ordering is bigendian" >&5
11890 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11891   echo $ac_n "(cached) $ac_c" 1>&6
11892 else
11893   ac_cv_c_bigendian=unknown
11894 # See if sys/param.h defines the BYTE_ORDER macro.
11895 cat > conftest.$ac_ext <<EOF
11896 #line 11897 "configure"
11897 #include "confdefs.h"
11898 #include <sys/types.h>
11899 #include <sys/param.h>
11900 int main() {
11901
11902 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11903  bogus endian macros
11904 #endif
11905 ; return 0; }
11906 EOF
11907 if { (eval echo configure:11908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11908   rm -rf conftest*
11909   # It does; now see whether it defined to BIG_ENDIAN or not.
11910 cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 #include <sys/types.h>
11914 #include <sys/param.h>
11915 int main() {
11916
11917 #if BYTE_ORDER != BIG_ENDIAN
11918  not big endian
11919 #endif
11920 ; return 0; }
11921 EOF
11922 if { (eval echo configure:11923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11923   rm -rf conftest*
11924   ac_cv_c_bigendian=yes
11925 else
11926   echo "configure: failed program was:" >&5
11927   cat conftest.$ac_ext >&5
11928   rm -rf conftest*
11929   ac_cv_c_bigendian=no
11930 fi
11931 rm -f conftest*
11932 else
11933   echo "configure: failed program was:" >&5
11934   cat conftest.$ac_ext >&5
11935 fi
11936 rm -f conftest*
11937 if test $ac_cv_c_bigendian = unknown; then
11938 if test "$cross_compiling" = yes; then
11939     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11940 else
11941   cat > conftest.$ac_ext <<EOF
11942 #line 11943 "configure"
11943 #include "confdefs.h"
11944 main () {
11945   /* Are we little or big endian?  From Harbison&Steele.  */
11946   union
11947   {
11948     long l;
11949     char c[sizeof (long)];
11950   } u;
11951   u.l = 1;
11952   exit (u.c[sizeof (long) - 1] == 1);
11953 }
11954 EOF
11955 if { (eval echo configure:11956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11956 then
11957   ac_cv_c_bigendian=no
11958 else
11959   echo "configure: failed program was:" >&5
11960   cat conftest.$ac_ext >&5
11961   rm -fr conftest*
11962   ac_cv_c_bigendian=yes
11963 fi
11964 rm -fr conftest*
11965 fi
11966
11967 fi
11968 fi
11969
11970 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11971 if test $ac_cv_c_bigendian = yes; then
11972   cat >> confdefs.h <<\EOF
11973 #define WORDS_BIGENDIAN 1
11974 EOF
11975
11976 fi
11977
11978         echo $ac_n "checking size of short""... $ac_c" 1>&6
11979 echo "configure:11980: checking size of short" >&5
11980 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11981   echo $ac_n "(cached) $ac_c" 1>&6
11982 else
11983   if test "$cross_compiling" = yes; then
11984     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11985 else
11986   cat > conftest.$ac_ext <<EOF
11987 #line 11988 "configure"
11988 #include "confdefs.h"
11989 #include <stdio.h>
11990 main()
11991 {
11992   FILE *f=fopen("conftestval", "w");
11993   if (!f) exit(1);
11994   fprintf(f, "%d\n", sizeof(short));
11995   exit(0);
11996 }
11997 EOF
11998 if { (eval echo configure:11999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11999 then
12000   ac_cv_sizeof_short=`cat conftestval`
12001 else
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -fr conftest*
12005   ac_cv_sizeof_short=0
12006 fi
12007 rm -fr conftest*
12008 fi
12009
12010 fi
12011 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
12012 cat >> confdefs.h <<EOF
12013 #define SIZEOF_SHORT $ac_cv_sizeof_short
12014 EOF
12015
12016  
12017         echo $ac_n "checking size of int""... $ac_c" 1>&6
12018 echo "configure:12019: checking size of int" >&5
12019 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
12020   echo $ac_n "(cached) $ac_c" 1>&6
12021 else
12022   if test "$cross_compiling" = yes; then
12023     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12024 else
12025   cat > conftest.$ac_ext <<EOF
12026 #line 12027 "configure"
12027 #include "confdefs.h"
12028 #include <stdio.h>
12029 main()
12030 {
12031   FILE *f=fopen("conftestval", "w");
12032   if (!f) exit(1);
12033   fprintf(f, "%d\n", sizeof(int));
12034   exit(0);
12035 }
12036 EOF
12037 if { (eval echo configure:12038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12038 then
12039   ac_cv_sizeof_int=`cat conftestval`
12040 else
12041   echo "configure: failed program was:" >&5
12042   cat conftest.$ac_ext >&5
12043   rm -fr conftest*
12044   ac_cv_sizeof_int=0
12045 fi
12046 rm -fr conftest*
12047 fi
12048
12049 fi
12050 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
12051 cat >> confdefs.h <<EOF
12052 #define SIZEOF_INT $ac_cv_sizeof_int
12053 EOF
12054
12055  
12056         echo $ac_n "checking size of long""... $ac_c" 1>&6
12057 echo "configure:12058: checking size of long" >&5
12058 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
12059   echo $ac_n "(cached) $ac_c" 1>&6
12060 else
12061   if test "$cross_compiling" = yes; then
12062     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
12063 else
12064   cat > conftest.$ac_ext <<EOF
12065 #line 12066 "configure"
12066 #include "confdefs.h"
12067 #include <stdio.h>
12068 main()
12069 {
12070   FILE *f=fopen("conftestval", "w");
12071   if (!f) exit(1);
12072   fprintf(f, "%d\n", sizeof(long));
12073   exit(0);
12074 }
12075 EOF
12076 if { (eval echo configure:12077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12077 then
12078   ac_cv_sizeof_long=`cat conftestval`
12079 else
12080   echo "configure: failed program was:" >&5
12081   cat conftest.$ac_ext >&5
12082   rm -fr conftest*
12083   ac_cv_sizeof_long=0
12084 fi
12085 rm -fr conftest*
12086 fi
12087
12088 fi
12089 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
12090 cat >> confdefs.h <<EOF
12091 #define SIZEOF_LONG $ac_cv_sizeof_long
12092 EOF
12093
12094
12095
12096         if test "$ac_cv_sizeof_int" -lt 4 ; then
12097                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
12098
12099                 cat >> confdefs.h <<\EOF
12100 #define LBER_INT_T long
12101 EOF
12102
12103                 cat >> confdefs.h <<\EOF
12104 #define LBER_TAG_T long
12105 EOF
12106
12107                 cat >> confdefs.h <<\EOF
12108 #define LBER_SOCKET_T int
12109 EOF
12110
12111         else
12112                 cat >> confdefs.h <<\EOF
12113 #define LBER_INT_T int
12114 EOF
12115
12116                 cat >> confdefs.h <<\EOF
12117 #define LBER_TAG_T long
12118 EOF
12119
12120                 cat >> confdefs.h <<\EOF
12121 #define LBER_SOCKET_T int
12122 EOF
12123
12124         fi
12125 fi
12126
12127 cat >> confdefs.h <<\EOF
12128 #define LBER_LEN_T long
12129 EOF
12130
12131
12132 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
12133 echo "configure:12134: checking for 8-bit clean memcmp" >&5
12134 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
12135   echo $ac_n "(cached) $ac_c" 1>&6
12136 else
12137   if test "$cross_compiling" = yes; then
12138   ac_cv_func_memcmp_clean=no
12139 else
12140   cat > conftest.$ac_ext <<EOF
12141 #line 12142 "configure"
12142 #include "confdefs.h"
12143
12144 main()
12145 {
12146   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
12147   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
12148 }
12149
12150 EOF
12151 if { (eval echo configure:12152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12152 then
12153   ac_cv_func_memcmp_clean=yes
12154 else
12155   echo "configure: failed program was:" >&5
12156   cat conftest.$ac_ext >&5
12157   rm -fr conftest*
12158   ac_cv_func_memcmp_clean=no
12159 fi
12160 rm -fr conftest*
12161 fi
12162
12163 fi
12164
12165 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
12166 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
12167
12168 echo $ac_n "checking for strftime""... $ac_c" 1>&6
12169 echo "configure:12170: checking for strftime" >&5
12170 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
12171   echo $ac_n "(cached) $ac_c" 1>&6
12172 else
12173   cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176 /* System header to define __stub macros and hopefully few prototypes,
12177     which can conflict with char strftime(); below.  */
12178 #include <assert.h>
12179 /* Override any gcc2 internal prototype to avoid an error.  */
12180 /* We use char because int might match the return type of a gcc2
12181     builtin and then its argument prototype would still apply.  */
12182 char strftime();
12183 char (*f)();
12184
12185 int main() {
12186
12187 /* The GNU C library defines this for functions which it implements
12188     to always fail with ENOSYS.  Some functions are actually named
12189     something starting with __ and the normal name is an alias.  */
12190 #if defined (__stub_strftime) || defined (__stub___strftime)
12191 choke me
12192 #else
12193 f = strftime;
12194 #endif
12195
12196 ; return 0; }
12197 EOF
12198 if { (eval echo configure:12199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12199   rm -rf conftest*
12200   eval "ac_cv_func_strftime=yes"
12201 else
12202   echo "configure: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   rm -rf conftest*
12205   eval "ac_cv_func_strftime=no"
12206 fi
12207 rm -f conftest*
12208 fi
12209
12210 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12211   echo "$ac_t""yes" 1>&6
12212   cat >> confdefs.h <<\EOF
12213 #define HAVE_STRFTIME 1
12214 EOF
12215
12216 else
12217   echo "$ac_t""no" 1>&6
12218 # strftime is in -lintl on SCO UNIX.
12219 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12220 echo "configure:12221: checking for strftime in -lintl" >&5
12221 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
12222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12223   echo $ac_n "(cached) $ac_c" 1>&6
12224 else
12225   ac_save_LIBS="$LIBS"
12226 LIBS="-lintl  $LIBS"
12227 cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 /* Override any gcc2 internal prototype to avoid an error.  */
12231 /* We use char because int might match the return type of a gcc2
12232     builtin and then its argument prototype would still apply.  */
12233 char strftime();
12234
12235 int main() {
12236 strftime()
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   eval "ac_cv_lib_$ac_lib_var=yes"
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   eval "ac_cv_lib_$ac_lib_var=no"
12247 fi
12248 rm -f conftest*
12249 LIBS="$ac_save_LIBS"
12250
12251 fi
12252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12253   echo "$ac_t""yes" 1>&6
12254   cat >> confdefs.h <<\EOF
12255 #define HAVE_STRFTIME 1
12256 EOF
12257
12258 LIBS="-lintl $LIBS"
12259 else
12260   echo "$ac_t""no" 1>&6
12261 fi
12262
12263 fi
12264
12265
12266 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12267 echo "configure:12268: checking for inet_aton()" >&5
12268 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   cat > conftest.$ac_ext <<EOF
12272 #line 12273 "configure"
12273 #include "confdefs.h"
12274
12275 #ifdef HAVE_SYS_TYPES_H
12276 #       include <sys/types.h>
12277 #endif
12278 #ifdef HAVE_SYS_SOCKET_H
12279 #       include <sys/socket.h>
12280 #       ifdef HAVE_SYS_SELECT_H
12281 #               include <sys/select.h>
12282 #       endif
12283 #       include <netinet/in.h>
12284 #       ifdef HAVE_ARPA_INET_H
12285 #               include <arpa/inet.h>
12286 #       endif
12287 #endif
12288
12289 int main() {
12290 struct in_addr in;
12291 int rc = inet_aton( "255.255.255.255", &in );
12292 ; return 0; }
12293 EOF
12294 if { (eval echo configure:12295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12295   rm -rf conftest*
12296   ol_cv_func_inet_aton=yes
12297 else
12298   echo "configure: failed program was:" >&5
12299   cat conftest.$ac_ext >&5
12300   rm -rf conftest*
12301   ol_cv_func_inet_aton=no
12302 fi
12303 rm -f conftest*
12304 fi
12305
12306 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12307   if test $ol_cv_func_inet_aton != no; then
12308     cat >> confdefs.h <<\EOF
12309 #define HAVE_INET_ATON 1
12310 EOF
12311
12312   fi
12313  
12314
12315 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12316 echo "configure:12317: checking for vprintf" >&5
12317 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
12318   echo $ac_n "(cached) $ac_c" 1>&6
12319 else
12320   cat > conftest.$ac_ext <<EOF
12321 #line 12322 "configure"
12322 #include "confdefs.h"
12323 /* System header to define __stub macros and hopefully few prototypes,
12324     which can conflict with char vprintf(); below.  */
12325 #include <assert.h>
12326 /* Override any gcc2 internal prototype to avoid an error.  */
12327 /* We use char because int might match the return type of a gcc2
12328     builtin and then its argument prototype would still apply.  */
12329 char vprintf();
12330 char (*f)();
12331
12332 int main() {
12333
12334 /* The GNU C library defines this for functions which it implements
12335     to always fail with ENOSYS.  Some functions are actually named
12336     something starting with __ and the normal name is an alias.  */
12337 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12338 choke me
12339 #else
12340 f = vprintf;
12341 #endif
12342
12343 ; return 0; }
12344 EOF
12345 if { (eval echo configure:12346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12346   rm -rf conftest*
12347   eval "ac_cv_func_vprintf=yes"
12348 else
12349   echo "configure: failed program was:" >&5
12350   cat conftest.$ac_ext >&5
12351   rm -rf conftest*
12352   eval "ac_cv_func_vprintf=no"
12353 fi
12354 rm -f conftest*
12355 fi
12356
12357 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12358   echo "$ac_t""yes" 1>&6
12359   cat >> confdefs.h <<\EOF
12360 #define HAVE_VPRINTF 1
12361 EOF
12362
12363 else
12364   echo "$ac_t""no" 1>&6
12365 fi
12366
12367 if test "$ac_cv_func_vprintf" != yes; then
12368 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12369 echo "configure:12370: checking for _doprnt" >&5
12370 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
12371   echo $ac_n "(cached) $ac_c" 1>&6
12372 else
12373   cat > conftest.$ac_ext <<EOF
12374 #line 12375 "configure"
12375 #include "confdefs.h"
12376 /* System header to define __stub macros and hopefully few prototypes,
12377     which can conflict with char _doprnt(); below.  */
12378 #include <assert.h>
12379 /* Override any gcc2 internal prototype to avoid an error.  */
12380 /* We use char because int might match the return type of a gcc2
12381     builtin and then its argument prototype would still apply.  */
12382 char _doprnt();
12383 char (*f)();
12384
12385 int main() {
12386
12387 /* The GNU C library defines this for functions which it implements
12388     to always fail with ENOSYS.  Some functions are actually named
12389     something starting with __ and the normal name is an alias.  */
12390 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12391 choke me
12392 #else
12393 f = _doprnt;
12394 #endif
12395
12396 ; return 0; }
12397 EOF
12398 if { (eval echo configure:12399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12399   rm -rf conftest*
12400   eval "ac_cv_func__doprnt=yes"
12401 else
12402   echo "configure: failed program was:" >&5
12403   cat conftest.$ac_ext >&5
12404   rm -rf conftest*
12405   eval "ac_cv_func__doprnt=no"
12406 fi
12407 rm -f conftest*
12408 fi
12409
12410 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12411   echo "$ac_t""yes" 1>&6
12412   cat >> confdefs.h <<\EOF
12413 #define HAVE_DOPRNT 1
12414 EOF
12415
12416 else
12417   echo "$ac_t""no" 1>&6
12418 fi
12419
12420 fi
12421
12422
12423 if test $ac_cv_func_vprintf = yes ; then
12424                 for ac_func in vsnprintf vsprintf
12425 do
12426 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12427 echo "configure:12428: checking for $ac_func" >&5
12428 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12429   echo $ac_n "(cached) $ac_c" 1>&6
12430 else
12431   cat > conftest.$ac_ext <<EOF
12432 #line 12433 "configure"
12433 #include "confdefs.h"
12434 /* System header to define __stub macros and hopefully few prototypes,
12435     which can conflict with char $ac_func(); below.  */
12436 #include <assert.h>
12437 /* Override any gcc2 internal prototype to avoid an error.  */
12438 /* We use char because int might match the return type of a gcc2
12439     builtin and then its argument prototype would still apply.  */
12440 char $ac_func();
12441 char (*f)();
12442
12443 int main() {
12444
12445 /* The GNU C library defines this for functions which it implements
12446     to always fail with ENOSYS.  Some functions are actually named
12447     something starting with __ and the normal name is an alias.  */
12448 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12449 choke me
12450 #else
12451 f = $ac_func;
12452 #endif
12453
12454 ; return 0; }
12455 EOF
12456 if { (eval echo configure:12457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12457   rm -rf conftest*
12458   eval "ac_cv_func_$ac_func=yes"
12459 else
12460   echo "configure: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   rm -rf conftest*
12463   eval "ac_cv_func_$ac_func=no"
12464 fi
12465 rm -f conftest*
12466 fi
12467
12468 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12469   echo "$ac_t""yes" 1>&6
12470     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12471   cat >> confdefs.h <<EOF
12472 #define $ac_tr_func 1
12473 EOF
12474  
12475 else
12476   echo "$ac_t""no" 1>&6
12477 fi
12478 done
12479
12480 fi
12481
12482 for ac_func in \
12483         bcopy                   \
12484         closesocket             \
12485         endgrent                \
12486         endpwent                \
12487         flock                   \
12488         getdtablesize   \
12489         getgrgid                \
12490         gethostname             \
12491         getpass                 \
12492         getpwuid                \
12493         getpwnam                \
12494         getspnam                \
12495         gettimeofday    \
12496         initgroups              \
12497         lockf                   \
12498         memcpy                  \
12499         memmove                 \
12500         mkstemp                 \
12501         read                    \
12502         recv                    \
12503         recvfrom                \
12504         setpwfile               \
12505         setgid                  \
12506         setegid                 \
12507         setsid                  \
12508         setuid                  \
12509         seteuid                 \
12510         signal                  \
12511         sigset                  \
12512         snprintf                \
12513         strdup                  \
12514         strerror                \
12515         strpbrk                 \
12516         strrchr                 \
12517         strsep                  \
12518         strstr                  \
12519         strtol                  \
12520         strtoul                 \
12521         strspn                  \
12522         sysconf                 \
12523         waitpid                 \
12524         wait4                   \
12525         write                   \
12526         send                    \
12527         sendto                  \
12528
12529 do
12530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12531 echo "configure:12532: checking for $ac_func" >&5
12532 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12533   echo $ac_n "(cached) $ac_c" 1>&6
12534 else
12535   cat > conftest.$ac_ext <<EOF
12536 #line 12537 "configure"
12537 #include "confdefs.h"
12538 /* System header to define __stub macros and hopefully few prototypes,
12539     which can conflict with char $ac_func(); below.  */
12540 #include <assert.h>
12541 /* Override any gcc2 internal prototype to avoid an error.  */
12542 /* We use char because int might match the return type of a gcc2
12543     builtin and then its argument prototype would still apply.  */
12544 char $ac_func();
12545 char (*f)();
12546
12547 int main() {
12548
12549 /* The GNU C library defines this for functions which it implements
12550     to always fail with ENOSYS.  Some functions are actually named
12551     something starting with __ and the normal name is an alias.  */
12552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12553 choke me
12554 #else
12555 f = $ac_func;
12556 #endif
12557
12558 ; return 0; }
12559 EOF
12560 if { (eval echo configure:12561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12561   rm -rf conftest*
12562   eval "ac_cv_func_$ac_func=yes"
12563 else
12564   echo "configure: failed program was:" >&5
12565   cat conftest.$ac_ext >&5
12566   rm -rf conftest*
12567   eval "ac_cv_func_$ac_func=no"
12568 fi
12569 rm -f conftest*
12570 fi
12571
12572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12573   echo "$ac_t""yes" 1>&6
12574     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12575   cat >> confdefs.h <<EOF
12576 #define $ac_tr_func 1
12577 EOF
12578  
12579 else
12580   echo "$ac_t""no" 1>&6
12581 fi
12582 done
12583
12584
12585 for ac_func in getopt tempnam
12586 do
12587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12588 echo "configure:12589: checking for $ac_func" >&5
12589 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   cat > conftest.$ac_ext <<EOF
12593 #line 12594 "configure"
12594 #include "confdefs.h"
12595 /* System header to define __stub macros and hopefully few prototypes,
12596     which can conflict with char $ac_func(); below.  */
12597 #include <assert.h>
12598 /* Override any gcc2 internal prototype to avoid an error.  */
12599 /* We use char because int might match the return type of a gcc2
12600     builtin and then its argument prototype would still apply.  */
12601 char $ac_func();
12602 char (*f)();
12603
12604 int main() {
12605
12606 /* The GNU C library defines this for functions which it implements
12607     to always fail with ENOSYS.  Some functions are actually named
12608     something starting with __ and the normal name is an alias.  */
12609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12610 choke me
12611 #else
12612 f = $ac_func;
12613 #endif
12614
12615 ; return 0; }
12616 EOF
12617 if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12618   rm -rf conftest*
12619   eval "ac_cv_func_$ac_func=yes"
12620 else
12621   echo "configure: failed program was:" >&5
12622   cat conftest.$ac_ext >&5
12623   rm -rf conftest*
12624   eval "ac_cv_func_$ac_func=no"
12625 fi
12626 rm -f conftest*
12627 fi
12628
12629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12630   echo "$ac_t""yes" 1>&6
12631     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12632   cat >> confdefs.h <<EOF
12633 #define $ac_tr_func 1
12634 EOF
12635  
12636 else
12637   echo "$ac_t""no" 1>&6
12638 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12639 fi
12640 done
12641
12642
12643
12644 # Check Configuration
12645 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12646 echo "configure:12647: checking declaration of sys_errlist" >&5
12647 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   
12651         cat > conftest.$ac_ext <<EOF
12652 #line 12653 "configure"
12653 #include "confdefs.h"
12654
12655 #include <stdio.h>
12656 #include <sys/types.h>
12657 #include <errno.h> 
12658 int main() {
12659 char *c = (char *) *sys_errlist
12660 ; return 0; }
12661 EOF
12662 if { (eval echo configure:12663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12663   rm -rf conftest*
12664   ol_cv_dcl_sys_errlist=yes
12665         ol_cv_have_sys_errlist=yes
12666 else
12667   echo "configure: failed program was:" >&5
12668   cat conftest.$ac_ext >&5
12669   rm -rf conftest*
12670   ol_cv_dcl_sys_errlist=no
12671 fi
12672 rm -f conftest*
12673 fi
12674
12675 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12676 #
12677 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12678 if test $ol_cv_dcl_sys_errlist = no ; then
12679         cat >> confdefs.h <<\EOF
12680 #define DECL_SYS_ERRLIST 1
12681 EOF
12682
12683
12684         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12685 echo "configure:12686: checking existence of sys_errlist" >&5
12686 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12687   echo $ac_n "(cached) $ac_c" 1>&6
12688 else
12689   
12690                 cat > conftest.$ac_ext <<EOF
12691 #line 12692 "configure"
12692 #include "confdefs.h"
12693 #include <errno.h>
12694 int main() {
12695 char *c = (char *) *sys_errlist
12696 ; return 0; }
12697 EOF
12698 if { (eval echo configure:12699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12699   rm -rf conftest*
12700   ol_cv_have_sys_errlist=yes
12701 else
12702   echo "configure: failed program was:" >&5
12703   cat conftest.$ac_ext >&5
12704   rm -rf conftest*
12705   ol_cv_have_sys_errlist=no
12706 fi
12707 rm -f conftest*
12708 fi
12709
12710 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12711 fi
12712 if test $ol_cv_have_sys_errlist = yes ; then
12713         cat >> confdefs.h <<\EOF
12714 #define HAVE_SYS_ERRLIST 1
12715 EOF
12716
12717 fi
12718
12719
12720
12721 if test "$ol_enable_debug" != no ; then
12722         cat >> confdefs.h <<\EOF
12723 #define LDAP_DEBUG 1
12724 EOF
12725
12726 fi
12727 if test "$ol_enable_syslog" = yes ; then
12728         cat >> confdefs.h <<\EOF
12729 #define LDAP_SYSLOG 1
12730 EOF
12731
12732 fi
12733 if test "$ol_enable_libui" = yes ; then
12734         cat >> confdefs.h <<\EOF
12735 #define LDAP_LIBUI 1
12736 EOF
12737
12738 fi
12739 if test "$ol_enable_cache" = no ; then
12740         cat >> confdefs.h <<\EOF
12741 #define LDAP_NOCACHE 1
12742 EOF
12743
12744 fi
12745 if test "$ol_enable_dns" != no ; then
12746         cat >> confdefs.h <<\EOF
12747 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12748 EOF
12749
12750 fi
12751 if test "$ol_enable_proctitle" != no ; then
12752         cat >> confdefs.h <<\EOF
12753 #define LDAP_PROCTITLE 1
12754 EOF
12755
12756 fi
12757 if test "$ol_enable_referrals" != no ; then
12758         cat >> confdefs.h <<\EOF
12759 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12760 EOF
12761
12762 fi
12763 if test "$ol_enable_cldap" != no ; then
12764         cat >> confdefs.h <<\EOF
12765 #define LDAP_CONNECTIONLESS 1
12766 EOF
12767
12768 fi
12769
12770 if test "$ol_enable_crypt" != no ; then
12771         cat >> confdefs.h <<\EOF
12772 #define SLAPD_CRYPT 1
12773 EOF
12774
12775 fi
12776 if test "$ol_enable_cleartext" != no ; then
12777         cat >> confdefs.h <<\EOF
12778 #define SLAPD_CLEARTEXT 1
12779 EOF
12780
12781 fi
12782 if test "$ol_enable_multimaster" != no ; then
12783         cat >> confdefs.h <<\EOF
12784 #define SLAPD_MULTIMASTER 1
12785 EOF
12786
12787 fi
12788 if test "$ol_enable_phonetic" != no ; then
12789         cat >> confdefs.h <<\EOF
12790 #define SLAPD_PHONETIC 1
12791 EOF
12792
12793 fi
12794 if test "$ol_enable_rlookups" != no ; then
12795         cat >> confdefs.h <<\EOF
12796 #define SLAPD_RLOOKUPS 1
12797 EOF
12798
12799 fi
12800
12801 if test "$ol_link_modules" != no ; then
12802         cat >> confdefs.h <<\EOF
12803 #define SLAPD_MODULES 1
12804 EOF
12805
12806         BUILD_SLAPD=yes
12807 fi
12808
12809 if test "$ol_link_bdb2" != no ; then
12810         cat >> confdefs.h <<\EOF
12811 #define SLAPD_BDB2 1
12812 EOF
12813
12814         BUILD_SLAPD=yes
12815         BUILD_BDB2=yes
12816         if test "$ol_with_bdb2_module" != static ; then
12817                 cat >> confdefs.h <<\EOF
12818 #define SLAPD_BDB2_DYNAMIC 1
12819 EOF
12820
12821                 BUILD_BDB2_DYNAMIC=yes
12822         fi
12823 fi
12824
12825 if test "$ol_enable_ldap" != no ; then
12826         cat >> confdefs.h <<\EOF
12827 #define SLAPD_LDAP 1
12828 EOF
12829
12830         BUILD_SLAPD=yes
12831         BUILD_LDAP=yes
12832         if test "$ol_with_ldap_module" != static ; then
12833                 cat >> confdefs.h <<\EOF
12834 #define SLAPD_LDAP_DYNAMIC 1
12835 EOF
12836
12837                 BUILD_LDAP_DYNAMIC=yes
12838         fi
12839 fi
12840
12841 if test "$ol_link_ldbm" != no ; then
12842         cat >> confdefs.h <<\EOF
12843 #define SLAPD_LDBM 1
12844 EOF
12845
12846         BUILD_SLAPD=yes
12847         BUILD_LDBM=yes
12848         if test "$ol_with_ldbm_module" != static ; then
12849                 cat >> confdefs.h <<\EOF
12850 #define SLAPD_LDBM_DYNAMIC 1
12851 EOF
12852
12853                 BUILD_LDBM_DYNAMIC=yes
12854         fi
12855 fi
12856
12857 if test "$ol_enable_passwd" != no ; then
12858         cat >> confdefs.h <<\EOF
12859 #define SLAPD_PASSWD 1
12860 EOF
12861
12862         BUILD_SLAPD=yes
12863         BUILD_PASSWD=yes
12864         if test "$ol_with_passwd_module" != static ; then
12865                 cat >> confdefs.h <<\EOF
12866 #define SLAPD_PASSWD_DYNAMIC 1
12867 EOF
12868
12869                 BUILD_PASSWD_DYNAMIC=yes
12870         fi
12871 fi
12872
12873 if test "$ol_link_perl" != no ; then
12874         cat >> confdefs.h <<\EOF
12875 #define SLAPD_PERL 1
12876 EOF
12877
12878         BUILD_SLAPD=yes
12879         BUILD_PERL=yes
12880         if test "$ol_with_perl_module" != static ; then
12881                 cat >> confdefs.h <<\EOF
12882 #define SLAPD_PERL_DYNAMIC 1
12883 EOF
12884
12885                 BUILD_PERL_DYNAMIC=yes
12886         fi
12887 fi
12888
12889 if test "$ol_enable_shell" != no ; then
12890         cat >> confdefs.h <<\EOF
12891 #define SLAPD_SHELL 1
12892 EOF
12893
12894         BUILD_SLAPD=yes
12895         BUILD_SHELL=yes
12896         if test "$ol_with_shell_module" != static ; then
12897                 cat >> confdefs.h <<\EOF
12898 #define SLAPD_SHELL_DYNAMIC 1
12899 EOF
12900
12901                 BUILD_SHELL_DYNAMIC=yes
12902         fi
12903 fi
12904
12905 if test "$ol_enable_tcl" != no ; then
12906         cat >> confdefs.h <<\EOF
12907 #define SLAPD_TCL 1
12908 EOF
12909
12910         BUILD_SLAPD=yes
12911         BUILD_TCL=yes
12912         if test "$ol_with_tcl_module" != static; then
12913                 cat >> confdefs.h <<\EOF
12914 #define SLAPD_TCL_DYNAMIC 1
12915 EOF
12916
12917                 BUILD_TCL_DYNAMIC=yes
12918         fi
12919 fi
12920
12921 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12922         $BUILD_SLAPD = yes ; then
12923         BUILD_SLURPD=yes
12924 fi
12925
12926 if test "$ol_link_isode" != no ; then
12927         BUILD_LDAPD=yes
12928 fi
12929
12930
12931
12932
12933   
12934   
12935   
12936   
12937   
12938   
12939   
12940   
12941   
12942   
12943   
12944   
12945   
12946   
12947   
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971 trap '' 1 2 15
12972
12973 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12974
12975 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12976 # Let make expand exec_prefix.
12977 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12978
12979 # Any assignment to VPATH causes Sun make to only execute
12980 # the first set of double-colon rules, so remove it if not needed.
12981 # If there is a colon in the path, we need to keep it.
12982 if test "x$srcdir" = x.; then
12983   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12984 fi
12985
12986 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12987
12988 DEFS=-DHAVE_CONFIG_H
12989
12990 # Without the "./", some shells look in PATH for config.status.
12991 : ${CONFIG_STATUS=./config.status}
12992
12993 echo creating $CONFIG_STATUS
12994 rm -f $CONFIG_STATUS
12995 cat > $CONFIG_STATUS <<EOF
12996 #! /bin/sh
12997 # Generated automatically by configure.
12998 # Run this file to recreate the current configuration.
12999 # This directory was configured as follows,
13000 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13001 #
13002 # $0 $ac_configure_args
13003 #
13004 # Compiler output produced by configure, useful for debugging
13005 # configure, is in ./config.log if it exists.
13006
13007 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13008 for ac_option
13009 do
13010   case "\$ac_option" in
13011   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13012     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13013     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13014   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13015     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
13016     exit 0 ;;
13017   -help | --help | --hel | --he | --h)
13018     echo "\$ac_cs_usage"; exit 0 ;;
13019   *) echo "\$ac_cs_usage"; exit 1 ;;
13020   esac
13021 done
13022
13023 ac_given_srcdir=$srcdir
13024 ac_given_INSTALL="$INSTALL"
13025
13026 trap 'rm -fr `echo "\
13027 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13028 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13029 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13030 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13031 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13032 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13033 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13034 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13035 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13036 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13037 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13038 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13039 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13040 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13041 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13042 include/Makefile:build/top.mk:include/Makefile.in \
13043 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13044 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13045 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13046 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13047 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13048 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13049 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13050 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13051 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13052 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13053 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13054 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
13055 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
13056 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
13057 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
13058 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
13059 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
13060 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
13061 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13062 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13063 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13064 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13065 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13066 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13067 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13068 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13069  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13070 EOF
13071 cat >> $CONFIG_STATUS <<EOF
13072
13073 # Protect against being on the right side of a sed subst in config.status.
13074 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13075  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13076 $ac_vpsub
13077 $extrasub
13078 s%@SHELL@%$SHELL%g
13079 s%@CFLAGS@%$CFLAGS%g
13080 s%@CPPFLAGS@%$CPPFLAGS%g
13081 s%@CXXFLAGS@%$CXXFLAGS%g
13082 s%@FFLAGS@%$FFLAGS%g
13083 s%@DEFS@%$DEFS%g
13084 s%@LDFLAGS@%$LDFLAGS%g
13085 s%@LIBS@%$LIBS%g
13086 s%@exec_prefix@%$exec_prefix%g
13087 s%@prefix@%$prefix%g
13088 s%@program_transform_name@%$program_transform_name%g
13089 s%@bindir@%$bindir%g
13090 s%@sbindir@%$sbindir%g
13091 s%@libexecdir@%$libexecdir%g
13092 s%@datadir@%$datadir%g
13093 s%@sysconfdir@%$sysconfdir%g
13094 s%@sharedstatedir@%$sharedstatedir%g
13095 s%@localstatedir@%$localstatedir%g
13096 s%@libdir@%$libdir%g
13097 s%@includedir@%$includedir%g
13098 s%@oldincludedir@%$oldincludedir%g
13099 s%@infodir@%$infodir%g
13100 s%@mandir@%$mandir%g
13101 s%@host@%$host%g
13102 s%@host_alias@%$host_alias%g
13103 s%@host_cpu@%$host_cpu%g
13104 s%@host_vendor@%$host_vendor%g
13105 s%@host_os@%$host_os%g
13106 s%@target@%$target%g
13107 s%@target_alias@%$target_alias%g
13108 s%@target_cpu@%$target_cpu%g
13109 s%@target_vendor@%$target_vendor%g
13110 s%@target_os@%$target_os%g
13111 s%@build@%$build%g
13112 s%@build_alias@%$build_alias%g
13113 s%@build_cpu@%$build_cpu%g
13114 s%@build_vendor@%$build_vendor%g
13115 s%@build_os@%$build_os%g
13116 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13117 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13118 s%@INSTALL_DATA@%$INSTALL_DATA%g
13119 s%@PACKAGE@%$PACKAGE%g
13120 s%@VERSION@%$VERSION%g
13121 s%@ACLOCAL@%$ACLOCAL%g
13122 s%@AUTOCONF@%$AUTOCONF%g
13123 s%@AUTOMAKE@%$AUTOMAKE%g
13124 s%@AUTOHEADER@%$AUTOHEADER%g
13125 s%@MAKEINFO@%$MAKEINFO%g
13126 s%@install_sh@%$install_sh%g
13127 s%@AMTAR@%$AMTAR%g
13128 s%@AWK@%$AWK%g
13129 s%@AMTARFLAGS@%$AMTARFLAGS%g
13130 s%@SET_MAKE@%$SET_MAKE%g
13131 s%@top_builddir@%$top_builddir%g
13132 s%@ldap_subdir@%$ldap_subdir%g
13133 s%@CC@%$CC%g
13134 s%@RANLIB@%$RANLIB%g
13135 s%@LD@%$LD%g
13136 s%@NM@%$NM%g
13137 s%@LN_S@%$LN_S%g
13138 s%@LIBTOOL@%$LIBTOOL%g
13139 s%@LN_H@%$LN_H%g
13140 s%@SENDMAIL@%$SENDMAIL%g
13141 s%@EDITOR@%$EDITOR%g
13142 s%@FINGER@%$FINGER%g
13143 s%@PERLBIN@%$PERLBIN%g
13144 s%@CPP@%$CPP%g
13145 s%@EXEEXT@%$EXEEXT%g
13146 s%@OBJEXT@%$OBJEXT%g
13147 s%@OL_MKDEP@%$OL_MKDEP%g
13148 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
13149 s%@GLIBCONFIG@%$GLIBCONFIG%g
13150 s%@PEPSY@%$PEPSY%g
13151 s%@LIBOBJS@%$LIBOBJS%g
13152 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
13153 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
13154 s%@BUILD_BDB2@%$BUILD_BDB2%g
13155 s%@BUILD_LDAP@%$BUILD_LDAP%g
13156 s%@BUILD_LDBM@%$BUILD_LDBM%g
13157 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
13158 s%@BUILD_PERL@%$BUILD_PERL%g
13159 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
13160 s%@BUILD_SHELL@%$BUILD_SHELL%g
13161 s%@BUILD_TCL@%$BUILD_TCL%g
13162 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13163 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13164 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13165 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13166 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13167 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13168 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13169 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13170 s%@LDAP_LIBS@%$LDAP_LIBS%g
13171 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13172 s%@LDIF_LIBS@%$LDIF_LIBS%g
13173 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13174 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13175 s%@LDBM_LIBS@%$LDBM_LIBS%g
13176 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13177 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13178 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13179 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13180 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13181 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13182 s%@KRB_LIBS@%$KRB_LIBS%g
13183 s%@READLINE_LIBS@%$READLINE_LIBS%g
13184 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13185 s%@TLS_LIBS@%$TLS_LIBS%g
13186
13187 CEOF
13188 EOF
13189
13190 cat >> $CONFIG_STATUS <<\EOF
13191
13192 # Split the substitutions into bite-sized pieces for seds with
13193 # small command number limits, like on Digital OSF/1 and HP-UX.
13194 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13195 ac_file=1 # Number of current file.
13196 ac_beg=1 # First line for current file.
13197 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13198 ac_more_lines=:
13199 ac_sed_cmds=""
13200 while $ac_more_lines; do
13201   if test $ac_beg -gt 1; then
13202     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13203   else
13204     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13205   fi
13206   if test ! -s conftest.s$ac_file; then
13207     ac_more_lines=false
13208     rm -f conftest.s$ac_file
13209   else
13210     if test -z "$ac_sed_cmds"; then
13211       ac_sed_cmds="sed -f conftest.s$ac_file"
13212     else
13213       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13214     fi
13215     ac_file=`expr $ac_file + 1`
13216     ac_beg=$ac_end
13217     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13218   fi
13219 done
13220 if test -z "$ac_sed_cmds"; then
13221   ac_sed_cmds=cat
13222 fi
13223 EOF
13224
13225 cat >> $CONFIG_STATUS <<EOF
13226
13227 CONFIG_FILES=\${CONFIG_FILES-"\
13228 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13229 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13230 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13231 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13232 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13233 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13234 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13235 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13236 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13237 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13238 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13239 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13240 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13241 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13242 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13243 include/Makefile:build/top.mk:include/Makefile.in \
13244 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13245 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13246 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13247 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13248 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13249 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13250 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13251 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13252 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13253 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13254 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13255 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
13256 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
13257 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
13258 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
13259 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
13260 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
13261 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
13262 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13263 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13264 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13265 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13266 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13267 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13268 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13269 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13270 "}
13271 EOF
13272 cat >> $CONFIG_STATUS <<\EOF
13273 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13274   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13275   case "$ac_file" in
13276   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13277        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13278   *) ac_file_in="${ac_file}.in" ;;
13279   esac
13280
13281   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13282
13283   # Remove last slash and all that follows it.  Not all systems have dirname.
13284   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13285   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13286     # The file is in a subdirectory.
13287     test ! -d "$ac_dir" && mkdir "$ac_dir"
13288     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13289     # A "../" for each directory in $ac_dir_suffix.
13290     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13291   else
13292     ac_dir_suffix= ac_dots=
13293   fi
13294
13295   case "$ac_given_srcdir" in
13296   .)  srcdir=.
13297       if test -z "$ac_dots"; then top_srcdir=.
13298       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13299   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13300   *) # Relative path.
13301     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13302     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13303   esac
13304
13305   case "$ac_given_INSTALL" in
13306   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13307   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13308   esac
13309
13310   echo creating "$ac_file"
13311   rm -f "$ac_file"
13312   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13313   case "$ac_file" in
13314   *Makefile*) ac_comsub="1i\\
13315 # $configure_input" ;;
13316   *) ac_comsub= ;;
13317   esac
13318
13319   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13320   sed -e "$ac_comsub
13321 s%@configure_input@%$configure_input%g
13322 s%@srcdir@%$srcdir%g
13323 s%@top_srcdir@%$top_srcdir%g
13324 s%@INSTALL@%$INSTALL%g
13325 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13326 fi; done
13327 rm -f conftest.s*
13328
13329 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13330 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13331 #
13332 # ac_d sets the value in "#define NAME VALUE" lines.
13333 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13334 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13335 ac_dC='\3'
13336 ac_dD='%g'
13337 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13338 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13339 ac_uB='\([      ]\)%\1#\2define\3'
13340 ac_uC=' '
13341 ac_uD='\4%g'
13342 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13343 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13344 ac_eB='$%\1#\2define\3'
13345 ac_eC=' '
13346 ac_eD='%g'
13347
13348 if test "${CONFIG_HEADERS+set}" != set; then
13349 EOF
13350 cat >> $CONFIG_STATUS <<EOF
13351   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13352 EOF
13353 cat >> $CONFIG_STATUS <<\EOF
13354 fi
13355 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13356   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13357   case "$ac_file" in
13358   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13359        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13360   *) ac_file_in="${ac_file}.in" ;;
13361   esac
13362
13363   echo creating $ac_file
13364
13365   rm -f conftest.frag conftest.in conftest.out
13366   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13367   cat $ac_file_inputs > conftest.in
13368
13369 EOF
13370
13371 # Transform confdefs.h into a sed script conftest.vals that substitutes
13372 # the proper values into config.h.in to produce config.h.  And first:
13373 # Protect against being on the right side of a sed subst in config.status.
13374 # Protect against being in an unquoted here document in config.status.
13375 rm -f conftest.vals
13376 cat > conftest.hdr <<\EOF
13377 s/[\\&%]/\\&/g
13378 s%[\\$`]%\\&%g
13379 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13380 s%ac_d%ac_u%gp
13381 s%ac_u%ac_e%gp
13382 EOF
13383 sed -n -f conftest.hdr confdefs.h > conftest.vals
13384 rm -f conftest.hdr
13385
13386 # This sed command replaces #undef with comments.  This is necessary, for
13387 # example, in the case of _POSIX_SOURCE, which is predefined and required
13388 # on some systems where configure will not decide to define it.
13389 cat >> conftest.vals <<\EOF
13390 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13391 EOF
13392
13393 # Break up conftest.vals because some shells have a limit on
13394 # the size of here documents, and old seds have small limits too.
13395
13396 rm -f conftest.tail
13397 while :
13398 do
13399   ac_lines=`grep -c . conftest.vals`
13400   # grep -c gives empty output for an empty file on some AIX systems.
13401   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13402   # Write a limited-size here document to conftest.frag.
13403   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13404   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13405   echo 'CEOF
13406   sed -f conftest.frag conftest.in > conftest.out
13407   rm -f conftest.in
13408   mv conftest.out conftest.in
13409 ' >> $CONFIG_STATUS
13410   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13411   rm -f conftest.vals
13412   mv conftest.tail conftest.vals
13413 done
13414 rm -f conftest.vals
13415
13416 cat >> $CONFIG_STATUS <<\EOF
13417   rm -f conftest.frag conftest.h
13418   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13419   cat conftest.in >> conftest.h
13420   rm -f conftest.in
13421   if cmp -s $ac_file conftest.h 2>/dev/null; then
13422     echo "$ac_file is unchanged"
13423     rm -f conftest.h
13424   else
13425     # Remove last slash and all that follows it.  Not all systems have dirname.
13426       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13427       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13428       # The file is in a subdirectory.
13429       test ! -d "$ac_dir" && mkdir "$ac_dir"
13430     fi
13431     rm -f $ac_file
13432     mv conftest.h $ac_file
13433   fi
13434 fi; done
13435
13436 EOF
13437 cat >> $CONFIG_STATUS <<EOF
13438
13439 EOF
13440 cat >> $CONFIG_STATUS <<\EOF
13441
13442 date > stamp-h
13443 echo Please \"make depend\" to build dependencies
13444
13445 exit 0
13446 EOF
13447 chmod +x $CONFIG_STATUS
13448 rm -fr confdefs* $ac_clean_files
13449 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13450