]> git.sur5r.net Git - openldap/blob - configure
Original test failed under FreeBSD. Reworked LN_H detection
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-proctitle    enable proctitle support (yes)"
21 ac_help="$ac_help
22   --enable-cache        enable caching (yes)"
23 ac_help="$ac_help
24   --enable-dns          enable V2 DNS  extension (no)"
25 ac_help="$ac_help
26   --enable-referrals    enable V2 Referrals extension (yes)"
27 ac_help="$ac_help
28   --enable-cldap        enable connectionless ldap (no)"
29 ac_help="$ac_help
30   --enable-x-compile    enable cross compiling (no)"
31 ac_help="$ac_help
32   --enable-dmalloc      enable debug malloc support (no)"
33 ac_help="$ac_help
34   --with-kerberos       with Kerberos support (auto)"
35 ac_help="$ac_help
36   --with-readline  with readline support (auto)"
37 ac_help="$ac_help
38   --with-threads        use threads (auto)"
39 ac_help="$ac_help
40   --with-tls  with TLS/SSL support (auto)"
41 ac_help="$ac_help
42   --with-yielding-select        with implicitly yielding select (auto)"
43 ac_help="$ac_help
44 LDAPD Options:"
45 ac_help="$ac_help
46   --enable-ldapd        enable building ldapd (no)"
47 ac_help="$ac_help
48 SLAPD Options:"
49 ac_help="$ac_help
50   --enable-slapd        enable building slapd (yes)"
51 ac_help="$ac_help
52     --enable-aclgroups  enable ACL group support (auto)"
53 ac_help="$ac_help
54     --enable-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-wrappers   enable tcp wrapper support (no)"
59 ac_help="$ac_help
60     --enable-phonetic   enable phonetic/soundex (no)"
61 ac_help="$ac_help
62     --enable-rlookups   enable reverse lookups (auto)"
63 ac_help="$ac_help
64     --enable-bdb2       enable bdb2 backend (no)"
65 ac_help="$ac_help
66     --enable-ldbm       enable ldbm backend (yes)"
67 ac_help="$ac_help
68       --with-ldbm-api   use LDBM API (auto)"
69 ac_help="$ac_help
70       --with-ldbm-type  use LDBM type (auto)"
71 ac_help="$ac_help
72     --enable-passwd     enable passwd backend (no)"
73 ac_help="$ac_help
74     --enable-perl       enable perl backend (no)"
75 ac_help="$ac_help
76     --enable-shell      enable shell backend (no)"
77 ac_help="$ac_help
78     --enable-tcl        enable tcl backend (no)"
79 ac_help="$ac_help
80 SLURPD Options:"
81 ac_help="$ac_help
82   --enable-slurpd       enable building slurpd (auto)"
83 ac_help="$ac_help
84 Library Generation & Linking Options"
85 ac_help="$ac_help
86   --enable-static         build static libraries [default=yes]
87   --enable-static=PKGS    only build shared libraries if the current package
88                           appears as an element in the PKGS list"
89 ac_help="$ac_help
90   --enable-shared         build shared libraries [default=yes]
91   --enable-shared=PKGS    only build shared libraries if the current package
92                           appears as an element in the PKGS list"
93 ac_help="$ac_help
94   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
95
96 # Initialize some variables set by options.
97 # The variables have the same names as the options, with
98 # dashes changed to underlines.
99 build=NONE
100 cache_file=./config.cache
101 exec_prefix=NONE
102 host=NONE
103 no_create=
104 nonopt=NONE
105 no_recursion=
106 prefix=NONE
107 program_prefix=NONE
108 program_suffix=NONE
109 program_transform_name=s,x,x,
110 silent=
111 site=
112 srcdir=
113 target=NONE
114 verbose=
115 x_includes=NONE
116 x_libraries=NONE
117 bindir='${exec_prefix}/bin'
118 sbindir='${exec_prefix}/sbin'
119 libexecdir='${exec_prefix}/libexec'
120 datadir='${prefix}/share'
121 sysconfdir='${prefix}/etc'
122 sharedstatedir='${prefix}/com'
123 localstatedir='${prefix}/var'
124 libdir='${exec_prefix}/lib'
125 includedir='${prefix}/include'
126 oldincludedir='/usr/include'
127 infodir='${prefix}/info'
128 mandir='${prefix}/man'
129
130 # Initialize some other variables.
131 subdirs=
132 MFLAGS= MAKEFLAGS=
133 SHELL=${CONFIG_SHELL-/bin/sh}
134 # Maximum number of lines to put in a shell here document.
135 ac_max_here_lines=12
136
137 ac_prev=
138 for ac_option
139 do
140
141   # If the previous option needs an argument, assign it.
142   if test -n "$ac_prev"; then
143     eval "$ac_prev=\$ac_option"
144     ac_prev=
145     continue
146   fi
147
148   case "$ac_option" in
149   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
150   *) ac_optarg= ;;
151   esac
152
153   # Accept the important Cygnus configure options, so we can diagnose typos.
154
155   case "$ac_option" in
156
157   -bindir | --bindir | --bindi | --bind | --bin | --bi)
158     ac_prev=bindir ;;
159   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
160     bindir="$ac_optarg" ;;
161
162   -build | --build | --buil | --bui | --bu)
163     ac_prev=build ;;
164   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
165     build="$ac_optarg" ;;
166
167   -cache-file | --cache-file | --cache-fil | --cache-fi \
168   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
169     ac_prev=cache_file ;;
170   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
171   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
172     cache_file="$ac_optarg" ;;
173
174   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
175     ac_prev=datadir ;;
176   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
177   | --da=*)
178     datadir="$ac_optarg" ;;
179
180   -disable-* | --disable-*)
181     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
182     # Reject names that are not valid shell variable names.
183     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
184       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185     fi
186     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187     eval "enable_${ac_feature}=no" ;;
188
189   -enable-* | --enable-*)
190     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
191     # Reject names that are not valid shell variable names.
192     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
193       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194     fi
195     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196     case "$ac_option" in
197       *=*) ;;
198       *) ac_optarg=yes ;;
199     esac
200     eval "enable_${ac_feature}='$ac_optarg'" ;;
201
202   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
203   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
204   | --exec | --exe | --ex)
205     ac_prev=exec_prefix ;;
206   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
207   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
208   | --exec=* | --exe=* | --ex=*)
209     exec_prefix="$ac_optarg" ;;
210
211   -gas | --gas | --ga | --g)
212     # Obsolete; use --with-gas.
213     with_gas=yes ;;
214
215   -help | --help | --hel | --he)
216     # Omit some internal or obsolete options to make the list less imposing.
217     # This message is too long to be a string in the A/UX 3.1 sh.
218     cat << EOF
219 Usage: configure [options] [host]
220 Options: [defaults in brackets after descriptions]
221 Configuration:
222   --cache-file=FILE       cache test results in FILE
223   --help                  print this message
224   --no-create             do not create output files
225   --quiet, --silent       do not print \`checking...' messages
226   --version               print the version of autoconf that created configure
227 Directory and file names:
228   --prefix=PREFIX         install architecture-independent files in PREFIX
229                           [$ac_default_prefix]
230   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
231                           [same as prefix]
232   --bindir=DIR            user executables in DIR [EPREFIX/bin]
233   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
234   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
235   --datadir=DIR           read-only architecture-independent data in DIR
236                           [PREFIX/share]
237   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
238   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
239                           [PREFIX/com]
240   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
241   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
242   --includedir=DIR        C header files in DIR [PREFIX/include]
243   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
244   --infodir=DIR           info documentation in DIR [PREFIX/info]
245   --mandir=DIR            man documentation in DIR [PREFIX/man]
246   --srcdir=DIR            find the sources in DIR [configure dir or ..]
247   --program-prefix=PREFIX prepend PREFIX to installed program names
248   --program-suffix=SUFFIX append SUFFIX to installed program names
249   --program-transform-name=PROGRAM
250                           run sed PROGRAM on installed program names
251 EOF
252     cat << EOF
253 Host type:
254   --build=BUILD           configure for building on BUILD [BUILD=HOST]
255   --host=HOST             configure for HOST [guessed]
256   --target=TARGET         configure for TARGET [TARGET=HOST]
257 Features and packages:
258   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
259   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
260   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
261   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
262   --x-includes=DIR        X include files are in DIR
263   --x-libraries=DIR       X library files are in DIR
264 EOF
265     if test -n "$ac_help"; then
266       echo "--enable and --with options recognized:$ac_help"
267     fi
268     exit 0 ;;
269
270   -host | --host | --hos | --ho)
271     ac_prev=host ;;
272   -host=* | --host=* | --hos=* | --ho=*)
273     host="$ac_optarg" ;;
274
275   -includedir | --includedir | --includedi | --included | --include \
276   | --includ | --inclu | --incl | --inc)
277     ac_prev=includedir ;;
278   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
279   | --includ=* | --inclu=* | --incl=* | --inc=*)
280     includedir="$ac_optarg" ;;
281
282   -infodir | --infodir | --infodi | --infod | --info | --inf)
283     ac_prev=infodir ;;
284   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
285     infodir="$ac_optarg" ;;
286
287   -libdir | --libdir | --libdi | --libd)
288     ac_prev=libdir ;;
289   -libdir=* | --libdir=* | --libdi=* | --libd=*)
290     libdir="$ac_optarg" ;;
291
292   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
293   | --libexe | --libex | --libe)
294     ac_prev=libexecdir ;;
295   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
296   | --libexe=* | --libex=* | --libe=*)
297     libexecdir="$ac_optarg" ;;
298
299   -localstatedir | --localstatedir | --localstatedi | --localstated \
300   | --localstate | --localstat | --localsta | --localst \
301   | --locals | --local | --loca | --loc | --lo)
302     ac_prev=localstatedir ;;
303   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
304   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
305   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
306     localstatedir="$ac_optarg" ;;
307
308   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
309     ac_prev=mandir ;;
310   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
311     mandir="$ac_optarg" ;;
312
313   -nfp | --nfp | --nf)
314     # Obsolete; use --without-fp.
315     with_fp=no ;;
316
317   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
318   | --no-cr | --no-c)
319     no_create=yes ;;
320
321   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
322   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
323     no_recursion=yes ;;
324
325   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
326   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
327   | --oldin | --oldi | --old | --ol | --o)
328     ac_prev=oldincludedir ;;
329   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
330   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
331   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
332     oldincludedir="$ac_optarg" ;;
333
334   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
335     ac_prev=prefix ;;
336   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
337     prefix="$ac_optarg" ;;
338
339   -program-prefix | --program-prefix | --program-prefi | --program-pref \
340   | --program-pre | --program-pr | --program-p)
341     ac_prev=program_prefix ;;
342   -program-prefix=* | --program-prefix=* | --program-prefi=* \
343   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
344     program_prefix="$ac_optarg" ;;
345
346   -program-suffix | --program-suffix | --program-suffi | --program-suff \
347   | --program-suf | --program-su | --program-s)
348     ac_prev=program_suffix ;;
349   -program-suffix=* | --program-suffix=* | --program-suffi=* \
350   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
351     program_suffix="$ac_optarg" ;;
352
353   -program-transform-name | --program-transform-name \
354   | --program-transform-nam | --program-transform-na \
355   | --program-transform-n | --program-transform- \
356   | --program-transform | --program-transfor \
357   | --program-transfo | --program-transf \
358   | --program-trans | --program-tran \
359   | --progr-tra | --program-tr | --program-t)
360     ac_prev=program_transform_name ;;
361   -program-transform-name=* | --program-transform-name=* \
362   | --program-transform-nam=* | --program-transform-na=* \
363   | --program-transform-n=* | --program-transform-=* \
364   | --program-transform=* | --program-transfor=* \
365   | --program-transfo=* | --program-transf=* \
366   | --program-trans=* | --program-tran=* \
367   | --progr-tra=* | --program-tr=* | --program-t=*)
368     program_transform_name="$ac_optarg" ;;
369
370   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
371   | -silent | --silent | --silen | --sile | --sil)
372     silent=yes ;;
373
374   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
375     ac_prev=sbindir ;;
376   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
377   | --sbi=* | --sb=*)
378     sbindir="$ac_optarg" ;;
379
380   -sharedstatedir | --sharedstatedir | --sharedstatedi \
381   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
382   | --sharedst | --shareds | --shared | --share | --shar \
383   | --sha | --sh)
384     ac_prev=sharedstatedir ;;
385   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
386   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
387   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
388   | --sha=* | --sh=*)
389     sharedstatedir="$ac_optarg" ;;
390
391   -site | --site | --sit)
392     ac_prev=site ;;
393   -site=* | --site=* | --sit=*)
394     site="$ac_optarg" ;;
395
396   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
397     ac_prev=srcdir ;;
398   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
399     srcdir="$ac_optarg" ;;
400
401   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
402   | --syscon | --sysco | --sysc | --sys | --sy)
403     ac_prev=sysconfdir ;;
404   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
405   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
406     sysconfdir="$ac_optarg" ;;
407
408   -target | --target | --targe | --targ | --tar | --ta | --t)
409     ac_prev=target ;;
410   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
411     target="$ac_optarg" ;;
412
413   -v | -verbose | --verbose | --verbos | --verbo | --verb)
414     verbose=yes ;;
415
416   -version | --version | --versio | --versi | --vers)
417     echo "configure generated by autoconf version 2.13"
418     exit 0 ;;
419
420   -with-* | --with-*)
421     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
422     # Reject names that are not valid shell variable names.
423     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
424       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425     fi
426     ac_package=`echo $ac_package| sed 's/-/_/g'`
427     case "$ac_option" in
428       *=*) ;;
429       *) ac_optarg=yes ;;
430     esac
431     eval "with_${ac_package}='$ac_optarg'" ;;
432
433   -without-* | --without-*)
434     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
435     # Reject names that are not valid shell variable names.
436     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
437       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438     fi
439     ac_package=`echo $ac_package| sed 's/-/_/g'`
440     eval "with_${ac_package}=no" ;;
441
442   --x)
443     # Obsolete; use --with-x.
444     with_x=yes ;;
445
446   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
447   | --x-incl | --x-inc | --x-in | --x-i)
448     ac_prev=x_includes ;;
449   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
450   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
451     x_includes="$ac_optarg" ;;
452
453   -x-libraries | --x-libraries | --x-librarie | --x-librari \
454   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
455     ac_prev=x_libraries ;;
456   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
457   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
458     x_libraries="$ac_optarg" ;;
459
460   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
461     ;;
462
463   *)
464     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
465       echo "configure: warning: $ac_option: invalid host type" 1>&2
466     fi
467     if test "x$nonopt" != xNONE; then
468       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
469     fi
470     nonopt="$ac_option"
471     ;;
472
473   esac
474 done
475
476 if test -n "$ac_prev"; then
477   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 fi
479
480 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
481
482 # File descriptor usage:
483 # 0 standard input
484 # 1 file creation
485 # 2 errors and warnings
486 # 3 some systems may open it to /dev/tty
487 # 4 used on the Kubota Titan
488 # 6 checking for... messages and results
489 # 5 compiler messages saved in config.log
490 if test "$silent" = yes; then
491   exec 6>/dev/null
492 else
493   exec 6>&1
494 fi
495 exec 5>./config.log
496
497 echo "\
498 This file contains any messages produced by compilers while
499 running configure, to aid debugging if configure makes a mistake.
500 " 1>&5
501
502 # Strip out --no-create and --no-recursion so they do not pile up.
503 # Also quote any args containing shell metacharacters.
504 ac_configure_args=
505 for ac_arg
506 do
507   case "$ac_arg" in
508   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
509   | --no-cr | --no-c) ;;
510   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
511   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
512   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
513   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
514   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
515   esac
516 done
517
518 # NLS nuisances.
519 # Only set these to C if already set.  These must not be set unconditionally
520 # because not all systems understand e.g. LANG=C (notably SCO).
521 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
522 # Non-C LC_CTYPE values break the ctype check.
523 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
524 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
525 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
526 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
527
528 # confdefs.h avoids OS command line length limits that DEFS can exceed.
529 rm -rf conftest* confdefs.h
530 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
531 echo > confdefs.h
532
533 # A filename unique to this package, relative to the directory that
534 # configure is in, which we can look for to find out if srcdir is correct.
535 ac_unique_file=include/ldap.h
536
537 # Find the source files, if location was not specified.
538 if test -z "$srcdir"; then
539   ac_srcdir_defaulted=yes
540   # Try the directory containing this script, then its parent.
541   ac_prog=$0
542   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
543   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
544   srcdir=$ac_confdir
545   if test ! -r $srcdir/$ac_unique_file; then
546     srcdir=..
547   fi
548 else
549   ac_srcdir_defaulted=no
550 fi
551 if test ! -r $srcdir/$ac_unique_file; then
552   if test "$ac_srcdir_defaulted" = yes; then
553     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
554   else
555     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556   fi
557 fi
558 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
559
560 # Prefer explicitly selected file to automatically selected ones.
561 if test -z "$CONFIG_SITE"; then
562   if test "x$prefix" != xNONE; then
563     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
564   else
565     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566   fi
567 fi
568 for ac_site_file in $CONFIG_SITE; do
569   if test -r "$ac_site_file"; then
570     echo "loading site script $ac_site_file"
571     . "$ac_site_file"
572   fi
573 done
574
575 if test -r "$cache_file"; then
576   echo "loading cache $cache_file"
577   . $cache_file
578 else
579   echo "creating cache $cache_file"
580   > $cache_file
581 fi
582
583 ac_ext=c
584 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
585 ac_cpp='$CPP $CPPFLAGS'
586 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
587 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
588 cross_compiling=$ac_cv_prog_cc_cross
589
590 ac_exeext=
591 ac_objext=o
592 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
593   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
594   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
595     ac_n= ac_c='
596 ' ac_t='        '
597   else
598     ac_n=-n ac_c= ac_t=
599   fi
600 else
601   ac_n= ac_c='\c' ac_t=
602 fi
603
604 ac_aux_dir=
605 for ac_dir in build $srcdir/build; do
606   if test -f $ac_dir/install-sh; then
607     ac_aux_dir=$ac_dir
608     ac_install_sh="$ac_aux_dir/install-sh -c"
609     break
610   elif test -f $ac_dir/install.sh; then
611     ac_aux_dir=$ac_dir
612     ac_install_sh="$ac_aux_dir/install.sh -c"
613     break
614   fi
615 done
616 if test -z "$ac_aux_dir"; then
617   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
618 fi
619 ac_config_guess=$ac_aux_dir/config.guess
620 ac_config_sub=$ac_aux_dir/config.sub
621 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
622 # Find a good install program.  We prefer a C program (faster),
623 # so one script is as good as another.  But avoid the broken or
624 # incompatible versions:
625 # SysV /etc/install, /usr/sbin/install
626 # SunOS /usr/etc/install
627 # IRIX /sbin/install
628 # AIX /bin/install
629 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
630 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
631 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
632 # ./install, which can be erroneously created by make from ./install.sh.
633 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
634 echo "configure:635: checking for a BSD compatible install" >&5
635 if test -z "$INSTALL"; then
636 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
637   echo $ac_n "(cached) $ac_c" 1>&6
638 else
639     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
640   for ac_dir in $PATH; do
641     # Account for people who put trailing slashes in PATH elements.
642     case "$ac_dir/" in
643     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
644     *)
645       # OSF1 and SCO ODT 3.0 have their own names for install.
646       # Don't use installbsd from OSF since it installs stuff as root
647       # by default.
648       for ac_prog in ginstall scoinst install; do
649         if test -f $ac_dir/$ac_prog; then
650           if test $ac_prog = install &&
651             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
652             # AIX install.  It has an incompatible calling convention.
653             :
654           else
655             ac_cv_path_install="$ac_dir/$ac_prog -c"
656             break 2
657           fi
658         fi
659       done
660       ;;
661     esac
662   done
663   IFS="$ac_save_IFS"
664
665 fi
666   if test "${ac_cv_path_install+set}" = set; then
667     INSTALL="$ac_cv_path_install"
668   else
669     # As a last resort, use the slow shell script.  We don't cache a
670     # path for INSTALL within a source directory, because that will
671     # break other packages using the cache if that directory is
672     # removed, or if the path is relative.
673     INSTALL="$ac_install_sh"
674   fi
675 fi
676 echo "$ac_t""$INSTALL" 1>&6
677
678 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
679 # It thinks the first close brace ends the variable substitution.
680 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
681
682 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
683
684 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
685
686 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
687 echo "configure:688: checking whether build environment is sane" >&5
688 # Just in case
689 sleep 1
690 echo timestamp > conftestfile
691 # Do `set' in a subshell so we don't clobber the current shell's
692 # arguments.  Must try -L first in case configure is actually a
693 # symlink; some systems play weird games with the mod time of symlinks
694 # (eg FreeBSD returns the mod time of the symlink's containing
695 # directory).
696 if (
697    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
698    if test "$*" = "X"; then
699       # -L didn't work.
700       set X `ls -t $srcdir/configure conftestfile`
701    fi
702    if test "$*" != "X $srcdir/configure conftestfile" \
703       && test "$*" != "X conftestfile $srcdir/configure"; then
704
705       # If neither matched, then we have a broken ls.  This can happen
706       # if, for instance, CONFIG_SHELL is bash and it inherits a
707       # broken ls alias from the environment.  This has actually
708       # happened.  Such a system could not be considered "sane".
709       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
710 alias in your environment" 1>&2; exit 1; }
711    fi
712
713    test "$2" = conftestfile
714    )
715 then
716    # Ok.
717    :
718 else
719    { echo "configure: error: newly created file is older than distributed files!
720 Check your system clock" 1>&2; exit 1; }
721 fi
722 rm -f conftest*
723 echo "$ac_t""yes" 1>&6
724 if test "$program_transform_name" = s,x,x,; then
725   program_transform_name=
726 else
727   # Double any \ or $.  echo might interpret backslashes.
728   cat <<\EOF_SED > conftestsed
729 s,\\,\\\\,g; s,\$,$$,g
730 EOF_SED
731   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
732   rm -f conftestsed
733 fi
734 test "$program_prefix" != NONE &&
735   program_transform_name="s,^,${program_prefix},; $program_transform_name"
736 # Use a double $ so make ignores it.
737 test "$program_suffix" != NONE &&
738   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
739
740 # sed with no file args requires a program.
741 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
742
743 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
744 echo "configure:745: checking whether ${MAKE-make} sets \${MAKE}" >&5
745 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
746 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
747   echo $ac_n "(cached) $ac_c" 1>&6
748 else
749   cat > conftestmake <<\EOF
750 all:
751         @echo 'ac_maketemp="${MAKE}"'
752 EOF
753 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
754 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
755 if test -n "$ac_maketemp"; then
756   eval ac_cv_prog_make_${ac_make}_set=yes
757 else
758   eval ac_cv_prog_make_${ac_make}_set=no
759 fi
760 rm -f conftestmake
761 fi
762 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
763   echo "$ac_t""yes" 1>&6
764   SET_MAKE=
765 else
766   echo "$ac_t""no" 1>&6
767   SET_MAKE="MAKE=${MAKE-make}"
768 fi
769
770
771 PACKAGE=OpenLDAP
772
773 VERSION=2.0-devel
774
775 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
776   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
777 fi
778
779
780
781 missing_dir=`cd $ac_aux_dir && pwd`
782 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
783 echo "configure:784: checking for working aclocal" >&5
784 # Run test in a subshell; some versions of sh will print an error if
785 # an executable is not found, even if stderr is redirected.
786 # Redirect stdin to placate older versions of autoconf.  Sigh.
787 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
788    ACLOCAL=aclocal
789    echo "$ac_t""found" 1>&6
790 else
791    ACLOCAL="$missing_dir/missing aclocal"
792    echo "$ac_t""missing" 1>&6
793 fi
794
795 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
796 echo "configure:797: checking for working autoconf" >&5
797 # Run test in a subshell; some versions of sh will print an error if
798 # an executable is not found, even if stderr is redirected.
799 # Redirect stdin to placate older versions of autoconf.  Sigh.
800 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
801    AUTOCONF=autoconf
802    echo "$ac_t""found" 1>&6
803 else
804    AUTOCONF="$missing_dir/missing autoconf"
805    echo "$ac_t""missing" 1>&6
806 fi
807
808 echo $ac_n "checking for working automake""... $ac_c" 1>&6
809 echo "configure:810: checking for working automake" >&5
810 # Run test in a subshell; some versions of sh will print an error if
811 # an executable is not found, even if stderr is redirected.
812 # Redirect stdin to placate older versions of autoconf.  Sigh.
813 if (automake --version) < /dev/null > /dev/null 2>&1; then
814    AUTOMAKE=automake
815    echo "$ac_t""found" 1>&6
816 else
817    AUTOMAKE="$missing_dir/missing automake"
818    echo "$ac_t""missing" 1>&6
819 fi
820
821 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
822 echo "configure:823: checking for working autoheader" >&5
823 # Run test in a subshell; some versions of sh will print an error if
824 # an executable is not found, even if stderr is redirected.
825 # Redirect stdin to placate older versions of autoconf.  Sigh.
826 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
827    AUTOHEADER=autoheader
828    echo "$ac_t""found" 1>&6
829 else
830    AUTOHEADER="$missing_dir/missing autoheader"
831    echo "$ac_t""missing" 1>&6
832 fi
833
834 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
835 echo "configure:836: checking for working makeinfo" >&5
836 # Run test in a subshell; some versions of sh will print an error if
837 # an executable is not found, even if stderr is redirected.
838 # Redirect stdin to placate older versions of autoconf.  Sigh.
839 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
840    MAKEINFO=makeinfo
841    echo "$ac_t""found" 1>&6
842 else
843    MAKEINFO="$missing_dir/missing makeinfo"
844    echo "$ac_t""missing" 1>&6
845 fi
846
847
848
849
850 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
851 echo "configure:852: checking configure arguments" >&5
852
853
854 top_builddir=`pwd`
855
856 ldap_subdir="openldap"
857
858 # Check whether --with-subdir or --without-subdir was given.
859 if test "${with_subdir+set}" = set; then
860   withval="$with_subdir"
861   
862         if test "$withval" = "no"; then
863                 ldap_subdir=""
864         elif test "$withval" != "yes"; then
865                 ldap_subdir="$withval"
866         fi
867
868 fi
869
870
871 # OpenLDAP --enable-debug
872         # Check whether --enable-debug or --disable-debug was given.
873 if test "${enable_debug+set}" = set; then
874   enableval="$enable_debug"
875   
876         ol_arg=invalid
877         for ol_val in auto yes no ; do
878                 if test "$enableval" = "$ol_val" ; then
879                         ol_arg="$ol_val"
880                 fi
881         done
882         if test "$ol_arg" = "invalid" ; then
883                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
884         fi
885         ol_enable_debug="$ol_arg"
886
887 else
888         ol_enable_debug="yes"
889 fi
890 # end --enable-debug
891 ol_enable_syslog=no
892 # OpenLDAP --enable-proctitle
893         # Check whether --enable-proctitle or --disable-proctitle was given.
894 if test "${enable_proctitle+set}" = set; then
895   enableval="$enable_proctitle"
896   
897         ol_arg=invalid
898         for ol_val in auto yes no ; do
899                 if test "$enableval" = "$ol_val" ; then
900                         ol_arg="$ol_val"
901                 fi
902         done
903         if test "$ol_arg" = "invalid" ; then
904                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
905         fi
906         ol_enable_proctitle="$ol_arg"
907
908 else
909         ol_enable_proctitle="yes"
910 fi
911 # end --enable-proctitle
912 # OpenLDAP --enable-cache
913         # Check whether --enable-cache or --disable-cache was given.
914 if test "${enable_cache+set}" = set; then
915   enableval="$enable_cache"
916   
917         ol_arg=invalid
918         for ol_val in auto yes no ; do
919                 if test "$enableval" = "$ol_val" ; then
920                         ol_arg="$ol_val"
921                 fi
922         done
923         if test "$ol_arg" = "invalid" ; then
924                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
925         fi
926         ol_enable_cache="$ol_arg"
927
928 else
929         ol_enable_cache="yes"
930 fi
931 # end --enable-cache
932 # OpenLDAP --enable-dns
933         # Check whether --enable-dns or --disable-dns was given.
934 if test "${enable_dns+set}" = set; then
935   enableval="$enable_dns"
936   
937         ol_arg=invalid
938         for ol_val in auto yes no ; do
939                 if test "$enableval" = "$ol_val" ; then
940                         ol_arg="$ol_val"
941                 fi
942         done
943         if test "$ol_arg" = "invalid" ; then
944                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
945         fi
946         ol_enable_dns="$ol_arg"
947
948 else
949         ol_enable_dns="no"
950 fi
951 # end --enable-dns
952 # OpenLDAP --enable-referrals
953         # Check whether --enable-referrals or --disable-referrals was given.
954 if test "${enable_referrals+set}" = set; then
955   enableval="$enable_referrals"
956   
957         ol_arg=invalid
958         for ol_val in auto yes no ; do
959                 if test "$enableval" = "$ol_val" ; then
960                         ol_arg="$ol_val"
961                 fi
962         done
963         if test "$ol_arg" = "invalid" ; then
964                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
965         fi
966         ol_enable_referrals="$ol_arg"
967
968 else
969         ol_enable_referrals="yes"
970 fi
971 # end --enable-referrals
972 # OpenLDAP --enable-cldap
973         # Check whether --enable-cldap or --disable-cldap was given.
974 if test "${enable_cldap+set}" = set; then
975   enableval="$enable_cldap"
976   
977         ol_arg=invalid
978         for ol_val in auto yes no ; do
979                 if test "$enableval" = "$ol_val" ; then
980                         ol_arg="$ol_val"
981                 fi
982         done
983         if test "$ol_arg" = "invalid" ; then
984                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
985         fi
986         ol_enable_cldap="$ol_arg"
987
988 else
989         ol_enable_cldap="no"
990 fi
991 # end --enable-cldap
992 # OpenLDAP --enable-x_compile
993         # Check whether --enable-x_compile or --disable-x_compile was given.
994 if test "${enable_x_compile+set}" = set; then
995   enableval="$enable_x_compile"
996   
997         ol_arg=invalid
998         for ol_val in yes no ; do
999                 if test "$enableval" = "$ol_val" ; then
1000                         ol_arg="$ol_val"
1001                 fi
1002         done
1003         if test "$ol_arg" = "invalid" ; then
1004                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1005         fi
1006         ol_enable_x_compile="$ol_arg"
1007
1008 else
1009         ol_enable_x_compile="no"
1010 fi
1011 # end --enable-x_compile
1012
1013 # OpenLDAP --enable-dmalloc
1014         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1015 if test "${enable_dmalloc+set}" = set; then
1016   enableval="$enable_dmalloc"
1017   
1018         ol_arg=invalid
1019         for ol_val in auto yes no ; do
1020                 if test "$enableval" = "$ol_val" ; then
1021                         ol_arg="$ol_val"
1022                 fi
1023         done
1024         if test "$ol_arg" = "invalid" ; then
1025                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1026         fi
1027         ol_enable_dmalloc="$ol_arg"
1028
1029 else
1030         ol_enable_dmalloc="no"
1031 fi
1032 # end --enable-dmalloc
1033
1034 # OpenLDAP --with-kerberos
1035         # Check whether --with-kerberos or --without-kerberos was given.
1036 if test "${with_kerberos+set}" = set; then
1037   withval="$with_kerberos"
1038   
1039         ol_arg=invalid
1040         for ol_val in auto k5 k4 afs yes no ; do
1041                 if test "$withval" = "$ol_val" ; then
1042                         ol_arg="$ol_val"
1043                 fi
1044         done
1045         if test "$ol_arg" = "invalid" ; then
1046                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1047         fi
1048         ol_with_kerberos="$ol_arg"
1049
1050 else
1051         ol_with_kerberos="auto"
1052 fi
1053 # end --with-kerberos
1054
1055 # OpenLDAP --with-readline
1056         # Check whether --with-readline or --without-readline was given.
1057 if test "${with_readline+set}" = set; then
1058   withval="$with_readline"
1059   
1060         ol_arg=invalid
1061         for ol_val in auto yes no  ; do
1062                 if test "$withval" = "$ol_val" ; then
1063                         ol_arg="$ol_val"
1064                 fi
1065         done
1066         if test "$ol_arg" = "invalid" ; then
1067                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1068         fi
1069         ol_with_readline="$ol_arg"
1070
1071 else
1072         ol_with_readline="auto"
1073 fi
1074 # end --with-readline
1075
1076 # OpenLDAP --with-threads
1077         # Check whether --with-threads or --without-threads was given.
1078 if test "${with_threads+set}" = set; then
1079   withval="$with_threads"
1080   
1081         ol_arg=invalid
1082         for ol_val in auto posix mach lwp yes no manual  ; do
1083                 if test "$withval" = "$ol_val" ; then
1084                         ol_arg="$ol_val"
1085                 fi
1086         done
1087         if test "$ol_arg" = "invalid" ; then
1088                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1089         fi
1090         ol_with_threads="$ol_arg"
1091
1092 else
1093         ol_with_threads="auto"
1094 fi
1095 # end --with-threads
1096
1097 # OpenLDAP --with-tls
1098         # Check whether --with-tls or --without-tls was given.
1099 if test "${with_tls+set}" = set; then
1100   withval="$with_tls"
1101   
1102         ol_arg=invalid
1103         for ol_val in auto ssleay openssl yes no  ; do
1104                 if test "$withval" = "$ol_val" ; then
1105                         ol_arg="$ol_val"
1106                 fi
1107         done
1108         if test "$ol_arg" = "invalid" ; then
1109                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1110         fi
1111         ol_with_tls="$ol_arg"
1112
1113 else
1114         ol_with_tls="auto"
1115 fi
1116 # end --with-tls
1117
1118 # OpenLDAP --with-yielding_select
1119         # Check whether --with-yielding_select or --without-yielding_select was given.
1120 if test "${with_yielding_select+set}" = set; then
1121   withval="$with_yielding_select"
1122   
1123         ol_arg=invalid
1124         for ol_val in auto yes no manual  ; do
1125                 if test "$withval" = "$ol_val" ; then
1126                         ol_arg="$ol_val"
1127                 fi
1128         done
1129         if test "$ol_arg" = "invalid" ; then
1130                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1131         fi
1132         ol_with_yielding_select="$ol_arg"
1133
1134 else
1135         ol_with_yielding_select="auto"
1136 fi
1137 # end --with-yielding_select
1138
1139
1140
1141 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1142 if test "${with_xxldapdoptions+set}" = set; then
1143   withval="$with_xxldapdoptions"
1144   :
1145 fi
1146
1147 # OpenLDAP --enable-ldapd
1148         # Check whether --enable-ldapd or --disable-ldapd was given.
1149 if test "${enable_ldapd+set}" = set; then
1150   enableval="$enable_ldapd"
1151   
1152         ol_arg=invalid
1153         for ol_val in auto yes no ; do
1154                 if test "$enableval" = "$ol_val" ; then
1155                         ol_arg="$ol_val"
1156                 fi
1157         done
1158         if test "$ol_arg" = "invalid" ; then
1159                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1160         fi
1161         ol_enable_ldapd="$ol_arg"
1162
1163 else
1164         ol_enable_ldapd="no"
1165 fi
1166 # end --enable-ldapd
1167
1168 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1169 if test "${with_xxslapdoptions+set}" = set; then
1170   withval="$with_xxslapdoptions"
1171   :
1172 fi
1173
1174 # OpenLDAP --enable-slapd
1175         # Check whether --enable-slapd or --disable-slapd was given.
1176 if test "${enable_slapd+set}" = set; then
1177   enableval="$enable_slapd"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1187         fi
1188         ol_enable_slapd="$ol_arg"
1189
1190 else
1191         ol_enable_slapd="yes"
1192 fi
1193 # end --enable-slapd
1194 # OpenLDAP --enable-aclgroups
1195         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1196 if test "${enable_aclgroups+set}" = set; then
1197   enableval="$enable_aclgroups"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1207         fi
1208         ol_enable_aclgroups="$ol_arg"
1209
1210 else
1211         ol_enable_aclgroups="auto"
1212 fi
1213 # end --enable-aclgroups
1214 # OpenLDAP --enable-cleartext
1215         # Check whether --enable-cleartext or --disable-cleartext was given.
1216 if test "${enable_cleartext+set}" = set; then
1217   enableval="$enable_cleartext"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1227         fi
1228         ol_enable_cleartext="$ol_arg"
1229
1230 else
1231         ol_enable_cleartext="yes"
1232 fi
1233 # end --enable-cleartext
1234 # OpenLDAP --enable-crypt
1235         # Check whether --enable-crypt or --disable-crypt was given.
1236 if test "${enable_crypt+set}" = set; then
1237   enableval="$enable_crypt"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1247         fi
1248         ol_enable_crypt="$ol_arg"
1249
1250 else
1251         ol_enable_crypt="auto"
1252 fi
1253 # end --enable-crypt
1254 # OpenLDAP --enable-wrappers
1255         # Check whether --enable-wrappers or --disable-wrappers was given.
1256 if test "${enable_wrappers+set}" = set; then
1257   enableval="$enable_wrappers"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1267         fi
1268         ol_enable_wrappers="$ol_arg"
1269
1270 else
1271         ol_enable_wrappers="no"
1272 fi
1273 # end --enable-wrappers
1274 # OpenLDAP --enable-phonetic
1275         # Check whether --enable-phonetic or --disable-phonetic was given.
1276 if test "${enable_phonetic+set}" = set; then
1277   enableval="$enable_phonetic"
1278   
1279         ol_arg=invalid
1280         for ol_val in auto yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1287         fi
1288         ol_enable_phonetic="$ol_arg"
1289
1290 else
1291         ol_enable_phonetic="no"
1292 fi
1293 # end --enable-phonetic
1294 # OpenLDAP --enable-rlookups
1295         # Check whether --enable-rlookups or --disable-rlookups was given.
1296 if test "${enable_rlookups+set}" = set; then
1297   enableval="$enable_rlookups"
1298   
1299         ol_arg=invalid
1300         for ol_val in auto yes no ; do
1301                 if test "$enableval" = "$ol_val" ; then
1302                         ol_arg="$ol_val"
1303                 fi
1304         done
1305         if test "$ol_arg" = "invalid" ; then
1306                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1307         fi
1308         ol_enable_rlookups="$ol_arg"
1309
1310 else
1311         ol_enable_rlookups="auto"
1312 fi
1313 # end --enable-rlookups
1314
1315 # OpenLDAP --enable-bdb2
1316         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1317 if test "${enable_bdb2+set}" = set; then
1318   enableval="$enable_bdb2"
1319   
1320         ol_arg=invalid
1321         for ol_val in auto yes no ; do
1322                 if test "$enableval" = "$ol_val" ; then
1323                         ol_arg="$ol_val"
1324                 fi
1325         done
1326         if test "$ol_arg" = "invalid" ; then
1327                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1328         fi
1329         ol_enable_bdb2="$ol_arg"
1330
1331 else
1332         ol_enable_bdb2="no"
1333 fi
1334 # end --enable-bdb2
1335 # OpenLDAP --enable-ldbm
1336         # Check whether --enable-ldbm or --disable-ldbm was given.
1337 if test "${enable_ldbm+set}" = set; then
1338   enableval="$enable_ldbm"
1339   
1340         ol_arg=invalid
1341         for ol_val in auto yes no ; do
1342                 if test "$enableval" = "$ol_val" ; then
1343                         ol_arg="$ol_val"
1344                 fi
1345         done
1346         if test "$ol_arg" = "invalid" ; then
1347                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1348         fi
1349         ol_enable_ldbm="$ol_arg"
1350
1351 else
1352         ol_enable_ldbm="yes"
1353 fi
1354 # end --enable-ldbm
1355 # OpenLDAP --with-ldbm_api
1356         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1357 if test "${with_ldbm_api+set}" = set; then
1358   withval="$with_ldbm_api"
1359   
1360         ol_arg=invalid
1361         for ol_val in auto db2 db gdbm ndbm manual ; do
1362                 if test "$withval" = "$ol_val" ; then
1363                         ol_arg="$ol_val"
1364                 fi
1365         done
1366         if test "$ol_arg" = "invalid" ; then
1367                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1368         fi
1369         ol_with_ldbm_api="$ol_arg"
1370
1371 else
1372         ol_with_ldbm_api="auto"
1373 fi
1374 # end --with-ldbm_api
1375
1376 # OpenLDAP --with-ldbm_type
1377         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1378 if test "${with_ldbm_type+set}" = set; then
1379   withval="$with_ldbm_type"
1380   
1381         ol_arg=invalid
1382         for ol_val in auto btree hash ; do
1383                 if test "$withval" = "$ol_val" ; then
1384                         ol_arg="$ol_val"
1385                 fi
1386         done
1387         if test "$ol_arg" = "invalid" ; then
1388                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1389         fi
1390         ol_with_ldbm_type="$ol_arg"
1391
1392 else
1393         ol_with_ldbm_type="auto"
1394 fi
1395 # end --with-ldbm_type
1396
1397
1398 # OpenLDAP --enable-passwd
1399         # Check whether --enable-passwd or --disable-passwd was given.
1400 if test "${enable_passwd+set}" = set; then
1401   enableval="$enable_passwd"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto yes no ; do
1405                 if test "$enableval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1411         fi
1412         ol_enable_passwd="$ol_arg"
1413
1414 else
1415         ol_enable_passwd="no"
1416 fi
1417 # end --enable-passwd
1418 # OpenLDAP --enable-perl
1419         # Check whether --enable-perl or --disable-perl was given.
1420 if test "${enable_perl+set}" = set; then
1421   enableval="$enable_perl"
1422   
1423         ol_arg=invalid
1424         for ol_val in auto yes no ; do
1425                 if test "$enableval" = "$ol_val" ; then
1426                         ol_arg="$ol_val"
1427                 fi
1428         done
1429         if test "$ol_arg" = "invalid" ; then
1430                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1431         fi
1432         ol_enable_perl="$ol_arg"
1433
1434 else
1435         ol_enable_perl="no"
1436 fi
1437 # end --enable-perl
1438 # OpenLDAP --enable-shell
1439         # Check whether --enable-shell or --disable-shell was given.
1440 if test "${enable_shell+set}" = set; then
1441   enableval="$enable_shell"
1442   
1443         ol_arg=invalid
1444         for ol_val in auto yes no ; do
1445                 if test "$enableval" = "$ol_val" ; then
1446                         ol_arg="$ol_val"
1447                 fi
1448         done
1449         if test "$ol_arg" = "invalid" ; then
1450                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1451         fi
1452         ol_enable_shell="$ol_arg"
1453
1454 else
1455         ol_enable_shell="no"
1456 fi
1457 # end --enable-shell
1458 # OpenLDAP --enable-tcl
1459         # Check whether --enable-tcl or --disable-tcl was given.
1460 if test "${enable_tcl+set}" = set; then
1461   enableval="$enable_tcl"
1462   
1463         ol_arg=invalid
1464         for ol_val in auto yes no ; do
1465                 if test "$enableval" = "$ol_val" ; then
1466                         ol_arg="$ol_val"
1467                 fi
1468         done
1469         if test "$ol_arg" = "invalid" ; then
1470                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1471         fi
1472         ol_enable_tcl="$ol_arg"
1473
1474 else
1475         ol_enable_tcl="no"
1476 fi
1477 # end --enable-tcl
1478
1479 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1480 if test "${with_xxslurpdoptions+set}" = set; then
1481   withval="$with_xxslurpdoptions"
1482   :
1483 fi
1484
1485 # OpenLDAP --enable-slurpd
1486         # Check whether --enable-slurpd or --disable-slurpd was given.
1487 if test "${enable_slurpd+set}" = set; then
1488   enableval="$enable_slurpd"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1498         fi
1499         ol_enable_slurpd="$ol_arg"
1500
1501 else
1502         ol_enable_slurpd="auto"
1503 fi
1504 # end --enable-slurpd
1505
1506 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1507 if test "${with_xxliboptions+set}" = set; then
1508   withval="$with_xxliboptions"
1509   :
1510 fi
1511
1512 # Check whether --enable-static or --disable-static was given.
1513 if test "${enable_static+set}" = set; then
1514   enableval="$enable_static"
1515   p=${PACKAGE-default}
1516 case "$enableval" in
1517 yes) enable_static=yes ;;
1518 no) enable_static=no ;;
1519 *)
1520   enable_static=no
1521   # Look at the argument we got.  We use all the common list separators.
1522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1523   for pkg in $enableval; do
1524     if test "X$pkg" = "X$p"; then
1525       enable_static=yes
1526     fi
1527   done
1528   IFS="$ac_save_ifs"
1529   ;;
1530 esac
1531 else
1532   enable_static=yes
1533 fi
1534
1535 # Check whether --enable-shared or --disable-shared was given.
1536 if test "${enable_shared+set}" = set; then
1537   enableval="$enable_shared"
1538   p=${PACKAGE-default}
1539 case "$enableval" in
1540 yes) enable_shared=yes ;;
1541 no) enable_shared=no ;;
1542 *)
1543   enable_shared=no
1544   # Look at the argument we got.  We use all the common list separators.
1545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1546   for pkg in $enableval; do
1547     if test "X$pkg" = "X$p"; then
1548       enable_shared=yes
1549     fi
1550   done
1551   IFS="$ac_save_ifs"
1552   ;;
1553 esac
1554 else
1555   enable_shared=yes
1556 fi
1557
1558
1559 # validate options
1560 if test $ol_enable_dns = yes ; then
1561         if test $ol_enable_referrals = no ; then
1562                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1563         fi
1564         if test $ol_enable_referrals = auto ; then
1565                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1566                 ol_enable_referrals=yes
1567         fi
1568 fi
1569
1570 if test $ol_enable_slapd = no ; then
1571                 if test $ol_enable_bdb2 = yes ; then
1572                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1573         fi
1574         if test $ol_enable_ldbm = yes ; then
1575                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1576         fi
1577         if test $ol_enable_passwd = yes ; then
1578                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1579         fi
1580         if test $ol_enable_perl = yes ; then
1581                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1582         fi
1583         if test $ol_enable_shell = yes ; then
1584                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1585         fi
1586         if test $ol_enable_tcl = yes ; then
1587                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1588         fi
1589         if test $ol_enable_aclgroups = yes ; then
1590                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1591         fi
1592         if test $ol_enable_wrappers = yes ; then
1593                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1594         fi
1595         if test $ol_enable_phonetic = yes ; then
1596                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1597         fi
1598         if test $ol_enable_rlookups = yes ; then
1599                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1600         fi
1601         if test $ol_with_ldbm_api != auto ; then
1602                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1603         fi
1604         if test $ol_with_ldbm_type != auto ; then
1605                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1606         fi
1607         if test $ol_enable_slurpd = yes ; then
1608                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1609         fi
1610
1611         # force settings to no
1612         ol_enable_bdb2=no
1613         ol_enable_ldbm=no
1614         ol_enable_passwd=no
1615         ol_enable_perl=no
1616         ol_enable_shell=no
1617         ol_enable_tcl=no
1618         ol_enable_aclgroups=no
1619         ol_enable_wrappers=no
1620         ol_enable_phonetic=no
1621         ol_enable_rlookups=no
1622         ol_with_ldbm_api=no
1623         ol_with_ldbm_type=no
1624         ol_enable_slurpd=no
1625
1626 elif test $ol_enable_ldbm = no ; then
1627         
1628         if test $ol_with_ldbm_api != auto ; then
1629                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1630         fi
1631
1632         if test $ol_with_ldbm_type != auto ; then
1633                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1634         fi
1635
1636         if test $ol_enable_bdb2 = yes ; then
1637                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1638         fi
1639
1640         if test $ol_enable_passwd = no -a \
1641                 $ol_enable_perl = no -a \
1642                 $ol_enable_shell = no -a \
1643                 $ol_enable_tcl = no ; then
1644                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1645         fi
1646
1647         ol_with_ldbm_api=no
1648         ol_with_ldbm_type=no
1649
1650 elif test $ol_enable_bdb2 = yes ; then
1651         
1652         if test $ol_with_ldbm_api != auto -a \
1653                 $ol_with_ldbm_api != db2 ; then
1654                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1655         fi
1656
1657         ol_with_ldbm_api=db2
1658
1659 else
1660         
1661         if test $ol_enable_bdb2 != no ; then
1662                 if test $ol_with_ldbm_api != auto -a \
1663                         $ol_with_ldbm_api != db2 ; then
1664                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1665                         ol_enable_bdb2=no
1666                 fi
1667         fi
1668
1669         if test $ol_with_ldbm_api = gdbm -a \
1670                 $ol_with_ldbm_type = btree ; then
1671                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1672         fi
1673         if test $ol_with_ldbm_api = ndbm -a \
1674                 $ol_with_ldbm_type = btree ; then
1675                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1676         fi
1677 fi
1678
1679 if test $ol_enable_slurpd = yes ; then
1680                 if test $ol_with_threads = no ; then
1681                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1682         fi
1683 fi
1684
1685 echo "$ac_t""done" 1>&6
1686
1687
1688 # Make sure we can run config.sub.
1689 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1690 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1691 fi
1692
1693 echo $ac_n "checking host system type""... $ac_c" 1>&6
1694 echo "configure:1695: checking host system type" >&5
1695
1696 host_alias=$host
1697 case "$host_alias" in
1698 NONE)
1699   case $nonopt in
1700   NONE)
1701     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1702     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1703     fi ;;
1704   *) host_alias=$nonopt ;;
1705   esac ;;
1706 esac
1707
1708 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1709 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1710 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1711 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1712 echo "$ac_t""$host" 1>&6
1713
1714
1715 ## Initialize vars
1716 LDAP_LIBS=
1717 LDBM_LIBS=
1718 LTHREAD_LIBS=
1719 LUTIL_LIBS=
1720
1721 LDAPD_LIBS=
1722 SLAPD_LIBS=
1723 SLURPD_LIBS=
1724
1725 BUILD_LDAPD=no
1726 BUILD_SLAPD=no
1727 BUILD_SLURPD=no
1728
1729 BUILD_BDB2=no
1730 BUILD_LDBM=no
1731 BUILD_PASSWD=no
1732 BUILD_PERL=no
1733 BUILD_SHELL=no
1734 BUILD_TCL=no
1735 BUILD_THREAD=no
1736
1737 SLAPD_PERL_LDFLAGS=
1738 SLAPD_PERL_CPPFLAGS=
1739
1740 KRB_LIBS=
1741 READLINE_LIBS=
1742 TERMCAP_LIBS=
1743 TLS_LIBS=
1744
1745
1746 # Find a good install program.  We prefer a C program (faster),
1747 # so one script is as good as another.  But avoid the broken or
1748 # incompatible versions:
1749 # SysV /etc/install, /usr/sbin/install
1750 # SunOS /usr/etc/install
1751 # IRIX /sbin/install
1752 # AIX /bin/install
1753 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1754 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1755 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1756 # ./install, which can be erroneously created by make from ./install.sh.
1757 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1758 echo "configure:1759: checking for a BSD compatible install" >&5
1759 if test -z "$INSTALL"; then
1760 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1761   echo $ac_n "(cached) $ac_c" 1>&6
1762 else
1763     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1764   for ac_dir in $PATH; do
1765     # Account for people who put trailing slashes in PATH elements.
1766     case "$ac_dir/" in
1767     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1768     *)
1769       # OSF1 and SCO ODT 3.0 have their own names for install.
1770       # Don't use installbsd from OSF since it installs stuff as root
1771       # by default.
1772       for ac_prog in ginstall scoinst install; do
1773         if test -f $ac_dir/$ac_prog; then
1774           if test $ac_prog = install &&
1775             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1776             # AIX install.  It has an incompatible calling convention.
1777             :
1778           else
1779             ac_cv_path_install="$ac_dir/$ac_prog -c"
1780             break 2
1781           fi
1782         fi
1783       done
1784       ;;
1785     esac
1786   done
1787   IFS="$ac_save_IFS"
1788
1789 fi
1790   if test "${ac_cv_path_install+set}" = set; then
1791     INSTALL="$ac_cv_path_install"
1792   else
1793     # As a last resort, use the slow shell script.  We don't cache a
1794     # path for INSTALL within a source directory, because that will
1795     # break other packages using the cache if that directory is
1796     # removed, or if the path is relative.
1797     INSTALL="$ac_install_sh"
1798   fi
1799 fi
1800 echo "$ac_t""$INSTALL" 1>&6
1801
1802 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1803 # It thinks the first close brace ends the variable substitution.
1804 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1805
1806 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1807
1808 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1809
1810
1811 CC=${CC-"cc"}
1812
1813 # Extract the first word of "ranlib", so it can be a program name with args.
1814 set dummy ranlib; ac_word=$2
1815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1816 echo "configure:1817: checking for $ac_word" >&5
1817 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1818   echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820   if test -n "$RANLIB"; then
1821   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1822 else
1823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1824   ac_dummy="$PATH"
1825   for ac_dir in $ac_dummy; do
1826     test -z "$ac_dir" && ac_dir=.
1827     if test -f $ac_dir/$ac_word; then
1828       ac_cv_prog_RANLIB="ranlib"
1829       break
1830     fi
1831   done
1832   IFS="$ac_save_ifs"
1833   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1834 fi
1835 fi
1836 RANLIB="$ac_cv_prog_RANLIB"
1837 if test -n "$RANLIB"; then
1838   echo "$ac_t""$RANLIB" 1>&6
1839 else
1840   echo "$ac_t""no" 1>&6
1841 fi
1842
1843 # Extract the first word of "gcc", so it can be a program name with args.
1844 set dummy gcc; ac_word=$2
1845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1846 echo "configure:1847: checking for $ac_word" >&5
1847 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1848   echo $ac_n "(cached) $ac_c" 1>&6
1849 else
1850   if test -n "$CC"; then
1851   ac_cv_prog_CC="$CC" # Let the user override the test.
1852 else
1853   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1854   ac_dummy="$PATH"
1855   for ac_dir in $ac_dummy; do
1856     test -z "$ac_dir" && ac_dir=.
1857     if test -f $ac_dir/$ac_word; then
1858       ac_cv_prog_CC="gcc"
1859       break
1860     fi
1861   done
1862   IFS="$ac_save_ifs"
1863 fi
1864 fi
1865 CC="$ac_cv_prog_CC"
1866 if test -n "$CC"; then
1867   echo "$ac_t""$CC" 1>&6
1868 else
1869   echo "$ac_t""no" 1>&6
1870 fi
1871
1872 if test -z "$CC"; then
1873   # Extract the first word of "cc", so it can be a program name with args.
1874 set dummy cc; ac_word=$2
1875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1876 echo "configure:1877: checking for $ac_word" >&5
1877 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1878   echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880   if test -n "$CC"; then
1881   ac_cv_prog_CC="$CC" # Let the user override the test.
1882 else
1883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1884   ac_prog_rejected=no
1885   ac_dummy="$PATH"
1886   for ac_dir in $ac_dummy; do
1887     test -z "$ac_dir" && ac_dir=.
1888     if test -f $ac_dir/$ac_word; then
1889       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1890         ac_prog_rejected=yes
1891         continue
1892       fi
1893       ac_cv_prog_CC="cc"
1894       break
1895     fi
1896   done
1897   IFS="$ac_save_ifs"
1898 if test $ac_prog_rejected = yes; then
1899   # We found a bogon in the path, so make sure we never use it.
1900   set dummy $ac_cv_prog_CC
1901   shift
1902   if test $# -gt 0; then
1903     # We chose a different compiler from the bogus one.
1904     # However, it has the same basename, so the bogon will be chosen
1905     # first if we set CC to just the basename; use the full file name.
1906     shift
1907     set dummy "$ac_dir/$ac_word" "$@"
1908     shift
1909     ac_cv_prog_CC="$@"
1910   fi
1911 fi
1912 fi
1913 fi
1914 CC="$ac_cv_prog_CC"
1915 if test -n "$CC"; then
1916   echo "$ac_t""$CC" 1>&6
1917 else
1918   echo "$ac_t""no" 1>&6
1919 fi
1920
1921   if test -z "$CC"; then
1922     case "`uname -s`" in
1923     *win32* | *WIN32*)
1924       # Extract the first word of "cl", so it can be a program name with args.
1925 set dummy cl; ac_word=$2
1926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1927 echo "configure:1928: checking for $ac_word" >&5
1928 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1929   echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931   if test -n "$CC"; then
1932   ac_cv_prog_CC="$CC" # Let the user override the test.
1933 else
1934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1935   ac_dummy="$PATH"
1936   for ac_dir in $ac_dummy; do
1937     test -z "$ac_dir" && ac_dir=.
1938     if test -f $ac_dir/$ac_word; then
1939       ac_cv_prog_CC="cl"
1940       break
1941     fi
1942   done
1943   IFS="$ac_save_ifs"
1944 fi
1945 fi
1946 CC="$ac_cv_prog_CC"
1947 if test -n "$CC"; then
1948   echo "$ac_t""$CC" 1>&6
1949 else
1950   echo "$ac_t""no" 1>&6
1951 fi
1952  ;;
1953     esac
1954   fi
1955   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1956 fi
1957
1958 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1959 echo "configure:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1960
1961 ac_ext=c
1962 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1963 ac_cpp='$CPP $CPPFLAGS'
1964 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1965 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1966 cross_compiling=$ac_cv_prog_cc_cross
1967
1968 cat > conftest.$ac_ext << EOF
1969
1970 #line 1971 "configure"
1971 #include "confdefs.h"
1972
1973 main(){return(0);}
1974 EOF
1975 if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1976   ac_cv_prog_cc_works=yes
1977   # If we can't run a trivial program, we are probably using a cross compiler.
1978   if (./conftest; exit) 2>/dev/null; then
1979     ac_cv_prog_cc_cross=no
1980   else
1981     ac_cv_prog_cc_cross=yes
1982   fi
1983 else
1984   echo "configure: failed program was:" >&5
1985   cat conftest.$ac_ext >&5
1986   ac_cv_prog_cc_works=no
1987 fi
1988 rm -fr conftest*
1989 ac_ext=c
1990 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1991 ac_cpp='$CPP $CPPFLAGS'
1992 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1993 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1994 cross_compiling=$ac_cv_prog_cc_cross
1995
1996 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1997 if test $ac_cv_prog_cc_works = no; then
1998   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1999 fi
2000 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2002 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2003 cross_compiling=$ac_cv_prog_cc_cross
2004
2005 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2006 echo "configure:2007: checking whether we are using GNU C" >&5
2007 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2008   echo $ac_n "(cached) $ac_c" 1>&6
2009 else
2010   cat > conftest.c <<EOF
2011 #ifdef __GNUC__
2012   yes;
2013 #endif
2014 EOF
2015 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2016   ac_cv_prog_gcc=yes
2017 else
2018   ac_cv_prog_gcc=no
2019 fi
2020 fi
2021
2022 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2023
2024 if test $ac_cv_prog_gcc = yes; then
2025   GCC=yes
2026 else
2027   GCC=
2028 fi
2029
2030 ac_test_CFLAGS="${CFLAGS+set}"
2031 ac_save_CFLAGS="$CFLAGS"
2032 CFLAGS=
2033 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2034 echo "configure:2035: checking whether ${CC-cc} accepts -g" >&5
2035 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   echo 'void f(){}' > conftest.c
2039 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2040   ac_cv_prog_cc_g=yes
2041 else
2042   ac_cv_prog_cc_g=no
2043 fi
2044 rm -f conftest*
2045
2046 fi
2047
2048 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2049 if test "$ac_test_CFLAGS" = set; then
2050   CFLAGS="$ac_save_CFLAGS"
2051 elif test $ac_cv_prog_cc_g = yes; then
2052   if test "$GCC" = yes; then
2053     CFLAGS="-g -O2"
2054   else
2055     CFLAGS="-g"
2056   fi
2057 else
2058   if test "$GCC" = yes; then
2059     CFLAGS="-O2"
2060   else
2061     CFLAGS=
2062   fi
2063 fi
2064
2065 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2066 if test "${with_gnu_ld+set}" = set; then
2067   withval="$with_gnu_ld"
2068   test "$withval" = no || with_gnu_ld=yes
2069 else
2070   with_gnu_ld=no
2071 fi
2072
2073
2074 ac_prog=ld
2075 if test "$ac_cv_prog_gcc" = yes; then
2076   # Check if gcc -print-prog-name=ld gives a path.
2077   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2078 echo "configure:2079: checking for ld used by GCC" >&5
2079   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2080   case "$ac_prog" in
2081   # Accept absolute paths.
2082   /* | A-Za-z:\\*)
2083     test -z "$LD" && LD="$ac_prog"
2084     ;;
2085   "")
2086     # If it fails, then pretend we aren't using GCC.
2087     ac_prog=ld
2088     ;;
2089   *)
2090     # If it is relative, then search for the first ld in PATH.
2091     with_gnu_ld=unknown
2092     ;;
2093   esac
2094 elif test "$with_gnu_ld" = yes; then
2095   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2096 echo "configure:2097: checking for GNU ld" >&5
2097 else
2098   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2099 echo "configure:2100: checking for non-GNU ld" >&5
2100 fi
2101 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2102   echo $ac_n "(cached) $ac_c" 1>&6
2103 else
2104   if test -z "$LD"; then
2105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2106   for ac_dir in $PATH; do
2107     test -z "$ac_dir" && ac_dir=.
2108     if test -f "$ac_dir/$ac_prog"; then
2109       ac_cv_path_LD="$ac_dir/$ac_prog"
2110       # Check to see if the program is GNU ld.  I'd rather use --version,
2111       # but apparently some GNU ld's only accept -v.
2112       # Break only if it was the GNU/non-GNU ld that we prefer.
2113       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2114         test "$with_gnu_ld" != no && break
2115       else
2116         test "$with_gnu_ld" != yes && break
2117       fi
2118     fi
2119   done
2120   IFS="$ac_save_ifs"
2121 else
2122   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2123 fi
2124 fi
2125
2126 LD="$ac_cv_path_LD"
2127 if test -n "$LD"; then
2128   echo "$ac_t""$LD" 1>&6
2129 else
2130   echo "$ac_t""no" 1>&6
2131 fi
2132 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2133
2134 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2135 echo "configure:2136: checking if the linker ($LD) is GNU ld" >&5
2136 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2137   echo $ac_n "(cached) $ac_c" 1>&6
2138 else
2139   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2140 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2141   ac_cv_prog_gnu_ld=yes
2142 else
2143   ac_cv_prog_gnu_ld=no
2144 fi
2145 fi
2146
2147 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2148
2149
2150 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2151 echo "configure:2152: checking for BSD-compatible nm" >&5
2152 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2153   echo $ac_n "(cached) $ac_c" 1>&6
2154 else
2155   case "$NM" in
2156 /* | A-Za-z:\\*)
2157   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2158   ;;
2159 *)
2160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2161   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2162     test -z "$ac_dir" && ac_dir=.
2163     if test -f $ac_dir/nm; then
2164       # Check to see if the nm accepts a BSD-compat flag.
2165       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2166       #   nm: unknown option "B" ignored
2167       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2168         ac_cv_path_NM="$ac_dir/nm -B"
2169       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2170         ac_cv_path_NM="$ac_dir/nm -p"
2171       else
2172         ac_cv_path_NM="$ac_dir/nm"
2173       fi
2174       break
2175     fi
2176   done
2177   IFS="$ac_save_ifs"
2178   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2179   ;;
2180 esac
2181 fi
2182
2183 NM="$ac_cv_path_NM"
2184 echo "$ac_t""$NM" 1>&6
2185
2186
2187 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2188 echo "configure:2189: checking whether ln -s works" >&5
2189 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2190   echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192   rm -f conftestdata
2193 if ln -s X conftestdata 2>/dev/null
2194 then
2195   rm -f conftestdata
2196   ac_cv_prog_LN_S="ln -s"
2197 else
2198   ac_cv_prog_LN_S=ln
2199 fi
2200 fi
2201 LN_S="$ac_cv_prog_LN_S"
2202 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2203   echo "$ac_t""yes" 1>&6
2204 else
2205   echo "$ac_t""no" 1>&6
2206 fi
2207
2208 # Always use our own libtool.
2209 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2210
2211 # Check for any special flags to pass to ltconfig.
2212 libtool_flags=
2213 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2214 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2215 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2216 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2217 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2218
2219 # Some flags need to be propagated to the compiler or linker for good
2220 # libtool support.
2221 case "$host" in
2222 *-*-irix6*)
2223   # Find out which ABI we are using.
2224   echo '#line 2225 "configure"' > conftest.$ac_ext
2225   if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2226     case "`/usr/bin/file conftest.o`" in
2227     *32-bit*)
2228       LD="${LD-ld} -32"
2229       ;;
2230     *N32*)
2231       LD="${LD-ld} -n32"
2232       ;;
2233     *64-bit*)
2234       LD="${LD-ld} -64"
2235       ;;
2236     esac
2237   fi
2238   rm -rf conftest*
2239   ;;
2240
2241 *-*-sco3.2v5*)
2242   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2243   CFLAGS="$CFLAGS -belf"
2244   ;;
2245 esac
2246
2247 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2248 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2249 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2250 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2251 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2252 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2253
2254
2255 for ac_prog in mawk gawk nawk awk
2256 do
2257 # Extract the first word of "$ac_prog", so it can be a program name with args.
2258 set dummy $ac_prog; ac_word=$2
2259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2260 echo "configure:2261: checking for $ac_word" >&5
2261 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2262   echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264   if test -n "$AWK"; then
2265   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2266 else
2267   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2268   ac_dummy="$PATH"
2269   for ac_dir in $ac_dummy; do
2270     test -z "$ac_dir" && ac_dir=.
2271     if test -f $ac_dir/$ac_word; then
2272       ac_cv_prog_AWK="$ac_prog"
2273       break
2274     fi
2275   done
2276   IFS="$ac_save_ifs"
2277 fi
2278 fi
2279 AWK="$ac_cv_prog_AWK"
2280 if test -n "$AWK"; then
2281   echo "$ac_t""$AWK" 1>&6
2282 else
2283   echo "$ac_t""no" 1>&6
2284 fi
2285
2286 test -n "$AWK" && break
2287 done
2288
2289 # test for ln hardlink support
2290 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2291 echo "configure:2292: checking whether ln works" >&5
2292 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2293   echo $ac_n "(cached) $ac_c" 1>&6
2294 else
2295   rm -f conftest.src conftest.dst
2296 echo "conftest" > conftest.src
2297 if ln conftest.src conftest.dst 2>/dev/null
2298 then
2299   ol_cv_prog_LN_H="ln"
2300 else
2301   ol_cv_prog_LN_H="cp"
2302 fi
2303 rm -f conftest.src conftest.dst
2304
2305 fi
2306 LN_H="$ol_cv_prog_LN_H"
2307 if test "$ol_cv_prog_LN_H" = "ln"; then
2308         echo "$ac_t""yes" 1>&6
2309 else
2310         echo "$ac_t""no" 1>&6
2311 fi
2312
2313 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2314 echo "configure:2315: checking whether ln -s works" >&5
2315 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   rm -f conftestdata
2319 if ln -s X conftestdata 2>/dev/null
2320 then
2321   rm -f conftestdata
2322   ac_cv_prog_LN_S="ln -s"
2323 else
2324   ac_cv_prog_LN_S=ln
2325 fi
2326 fi
2327 LN_S="$ac_cv_prog_LN_S"
2328 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2329   echo "$ac_t""yes" 1>&6
2330 else
2331   echo "$ac_t""no" 1>&6
2332 fi
2333
2334
2335 # Extract the first word of "sendmail", so it can be a program name with args.
2336 set dummy sendmail; ac_word=$2
2337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2338 echo "configure:2339: checking for $ac_word" >&5
2339 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2340   echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342   case "$SENDMAIL" in
2343   /*)
2344   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2345   ;;
2346   ?:/*)                  
2347   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2348   ;;
2349   *)
2350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2351   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2352   for ac_dir in $ac_dummy; do 
2353     test -z "$ac_dir" && ac_dir=.
2354     if test -f $ac_dir/$ac_word; then
2355       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2356       break
2357     fi
2358   done
2359   IFS="$ac_save_ifs"
2360   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2361   ;;
2362 esac
2363 fi
2364 SENDMAIL="$ac_cv_path_SENDMAIL"
2365 if test -n "$SENDMAIL"; then
2366   echo "$ac_t""$SENDMAIL" 1>&6
2367 else
2368   echo "$ac_t""no" 1>&6
2369 fi
2370
2371 # Extract the first word of "vi", so it can be a program name with args.
2372 set dummy vi; ac_word=$2
2373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2374 echo "configure:2375: checking for $ac_word" >&5
2375 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2376   echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378   case "$EDITOR" in
2379   /*)
2380   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2381   ;;
2382   ?:/*)                  
2383   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2384   ;;
2385   *)
2386   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2387   ac_dummy="$PATH:/usr/ucb"
2388   for ac_dir in $ac_dummy; do 
2389     test -z "$ac_dir" && ac_dir=.
2390     if test -f $ac_dir/$ac_word; then
2391       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2392       break
2393     fi
2394   done
2395   IFS="$ac_save_ifs"
2396   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2397   ;;
2398 esac
2399 fi
2400 EDITOR="$ac_cv_path_EDITOR"
2401 if test -n "$EDITOR"; then
2402   echo "$ac_t""$EDITOR" 1>&6
2403 else
2404   echo "$ac_t""no" 1>&6
2405 fi
2406
2407 # Extract the first word of "finger", so it can be a program name with args.
2408 set dummy finger; ac_word=$2
2409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2410 echo "configure:2411: checking for $ac_word" >&5
2411 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2412   echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414   case "$FINGER" in
2415   /*)
2416   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2417   ;;
2418   ?:/*)                  
2419   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2420   ;;
2421   *)
2422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2423   ac_dummy="$PATH:/usr/ucb"
2424   for ac_dir in $ac_dummy; do 
2425     test -z "$ac_dir" && ac_dir=.
2426     if test -f $ac_dir/$ac_word; then
2427       ac_cv_path_FINGER="$ac_dir/$ac_word"
2428       break
2429     fi
2430   done
2431   IFS="$ac_save_ifs"
2432   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2433   ;;
2434 esac
2435 fi
2436 FINGER="$ac_cv_path_FINGER"
2437 if test -n "$FINGER"; then
2438   echo "$ac_t""$FINGER" 1>&6
2439 else
2440   echo "$ac_t""no" 1>&6
2441 fi
2442
2443
2444 if test $ol_enable_perl = yes ; then
2445         # Extract the first word of "perl", so it can be a program name with args.
2446 set dummy perl; ac_word=$2
2447 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2448 echo "configure:2449: checking for $ac_word" >&5
2449 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2450   echo $ac_n "(cached) $ac_c" 1>&6
2451 else
2452   case "$PERLBIN" in
2453   /*)
2454   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2455   ;;
2456   ?:/*)                  
2457   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2458   ;;
2459   *)
2460   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2461   ac_dummy="$PATH"
2462   for ac_dir in $ac_dummy; do 
2463     test -z "$ac_dir" && ac_dir=.
2464     if test -f $ac_dir/$ac_word; then
2465       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2466       break
2467     fi
2468   done
2469   IFS="$ac_save_ifs"
2470   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2471   ;;
2472 esac
2473 fi
2474 PERLBIN="$ac_cv_path_PERLBIN"
2475 if test -n "$PERLBIN"; then
2476   echo "$ac_t""$PERLBIN" 1>&6
2477 else
2478   echo "$ac_t""no" 1>&6
2479 fi
2480
2481
2482         if test "no$PERLBIN" = "no" ; then
2483                 ol_enable_perl=no
2484         fi
2485
2486         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2487         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e perl_inc`"
2488 fi
2489
2490 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2491 echo "configure:2492: checking how to run the C preprocessor" >&5
2492 # On Suns, sometimes $CPP names a directory.
2493 if test -n "$CPP" && test -d "$CPP"; then
2494   CPP=
2495 fi
2496 if test -z "$CPP"; then
2497 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2498   echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500     # This must be in double quotes, not single quotes, because CPP may get
2501   # substituted into the Makefile and "${CC-cc}" will confuse make.
2502   CPP="${CC-cc} -E"
2503   # On the NeXT, cc -E runs the code through the compiler's parser,
2504   # not just through cpp.
2505   cat > conftest.$ac_ext <<EOF
2506 #line 2507 "configure"
2507 #include "confdefs.h"
2508 #include <assert.h>
2509 Syntax Error
2510 EOF
2511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2512 { (eval echo configure:2513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2514 if test -z "$ac_err"; then
2515   :
2516 else
2517   echo "$ac_err" >&5
2518   echo "configure: failed program was:" >&5
2519   cat conftest.$ac_ext >&5
2520   rm -rf conftest*
2521   CPP="${CC-cc} -E -traditional-cpp"
2522   cat > conftest.$ac_ext <<EOF
2523 #line 2524 "configure"
2524 #include "confdefs.h"
2525 #include <assert.h>
2526 Syntax Error
2527 EOF
2528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2529 { (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2531 if test -z "$ac_err"; then
2532   :
2533 else
2534   echo "$ac_err" >&5
2535   echo "configure: failed program was:" >&5
2536   cat conftest.$ac_ext >&5
2537   rm -rf conftest*
2538   CPP="${CC-cc} -nologo -E"
2539   cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542 #include <assert.h>
2543 Syntax Error
2544 EOF
2545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2546 { (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2548 if test -z "$ac_err"; then
2549   :
2550 else
2551   echo "$ac_err" >&5
2552   echo "configure: failed program was:" >&5
2553   cat conftest.$ac_ext >&5
2554   rm -rf conftest*
2555   CPP=/lib/cpp
2556 fi
2557 rm -f conftest*
2558 fi
2559 rm -f conftest*
2560 fi
2561 rm -f conftest*
2562   ac_cv_prog_CPP="$CPP"
2563 fi
2564   CPP="$ac_cv_prog_CPP"
2565 else
2566   ac_cv_prog_CPP="$CPP"
2567 fi
2568 echo "$ac_t""$CPP" 1>&6
2569
2570
2571 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2572         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2573
2574 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2575         echo "configure: warning: programs compiled here do run here..." 1>&2
2576         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2577
2578 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2579         echo "configure: warning: programs compiled here do not run here..." 1>&2
2580         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2581 fi
2582
2583 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2584 echo "configure:2585: checking for AIX" >&5
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 #ifdef _AIX
2589   yes
2590 #endif
2591
2592 EOF
2593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2594   egrep "yes" >/dev/null 2>&1; then
2595   rm -rf conftest*
2596   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2597 #define _ALL_SOURCE 1
2598 EOF
2599
2600 else
2601   rm -rf conftest*
2602   echo "$ac_t""no" 1>&6
2603 fi
2604 rm -f conftest*
2605
2606
2607 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2608 echo "configure:2609: checking for POSIXized ISC" >&5
2609 if test -d /etc/conf/kconfig.d &&
2610   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2611 then
2612   echo "$ac_t""yes" 1>&6
2613   ISC=yes # If later tests want to check for ISC.
2614   cat >> confdefs.h <<\EOF
2615 #define _POSIX_SOURCE 1
2616 EOF
2617
2618   if test "$GCC" = yes; then
2619     CC="$CC -posix"
2620   else
2621     CC="$CC -Xp"
2622   fi
2623 else
2624   echo "$ac_t""no" 1>&6
2625   ISC=
2626 fi
2627
2628 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2629 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2630 echo "configure:2631: checking for minix/config.h" >&5
2631 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2632   echo $ac_n "(cached) $ac_c" 1>&6
2633 else
2634   cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 #include <minix/config.h>
2638 EOF
2639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2640 { (eval echo configure:2641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2642 if test -z "$ac_err"; then
2643   rm -rf conftest*
2644   eval "ac_cv_header_$ac_safe=yes"
2645 else
2646   echo "$ac_err" >&5
2647   echo "configure: failed program was:" >&5
2648   cat conftest.$ac_ext >&5
2649   rm -rf conftest*
2650   eval "ac_cv_header_$ac_safe=no"
2651 fi
2652 rm -f conftest*
2653 fi
2654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2655   echo "$ac_t""yes" 1>&6
2656   MINIX=yes
2657 else
2658   echo "$ac_t""no" 1>&6
2659 MINIX=
2660 fi
2661
2662 if test "$MINIX" = yes; then
2663   cat >> confdefs.h <<\EOF
2664 #define _POSIX_SOURCE 1
2665 EOF
2666
2667   cat >> confdefs.h <<\EOF
2668 #define _POSIX_1_SOURCE 2
2669 EOF
2670
2671   cat >> confdefs.h <<\EOF
2672 #define _MINIX 1
2673 EOF
2674
2675 fi
2676
2677
2678 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2679 echo "configure:2680: checking for be_app in -lbe" >&5
2680 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2681 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   ac_save_LIBS="$LIBS"
2685 LIBS="-lbe  $LIBS"
2686 cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 /* Override any gcc2 internal prototype to avoid an error.  */
2690 /* We use char because int might match the return type of a gcc2
2691     builtin and then its argument prototype would still apply.  */
2692 char be_app();
2693
2694 int main() {
2695 be_app()
2696 ; return 0; }
2697 EOF
2698 if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2699   rm -rf conftest*
2700   eval "ac_cv_lib_$ac_lib_var=yes"
2701 else
2702   echo "configure: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   rm -rf conftest*
2705   eval "ac_cv_lib_$ac_lib_var=no"
2706 fi
2707 rm -f conftest*
2708 LIBS="$ac_save_LIBS"
2709
2710 fi
2711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2712   echo "$ac_t""yes" 1>&6
2713   LIBS="$LIBS -lbe -lroot"
2714 else
2715   echo "$ac_t""no" 1>&6
2716 fi
2717
2718
2719 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2720 echo "configure:2721: checking for Cygwin environment" >&5
2721 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2722   echo $ac_n "(cached) $ac_c" 1>&6
2723 else
2724   cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727
2728 int main() {
2729
2730 #ifndef __CYGWIN__
2731 #define __CYGWIN__ __CYGWIN32__
2732 #endif
2733 return __CYGWIN__;
2734 ; return 0; }
2735 EOF
2736 if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2737   rm -rf conftest*
2738   ac_cv_cygwin=yes
2739 else
2740   echo "configure: failed program was:" >&5
2741   cat conftest.$ac_ext >&5
2742   rm -rf conftest*
2743   ac_cv_cygwin=no
2744 fi
2745 rm -f conftest*
2746 rm -f conftest*
2747 fi
2748
2749 echo "$ac_t""$ac_cv_cygwin" 1>&6
2750 CYGWIN=
2751 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2752 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2753 echo "configure:2754: checking for mingw32 environment" >&5
2754 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   cat > conftest.$ac_ext <<EOF
2758 #line 2759 "configure"
2759 #include "confdefs.h"
2760
2761 int main() {
2762 return __MINGW32__;
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2766   rm -rf conftest*
2767   ac_cv_mingw32=yes
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   ac_cv_mingw32=no
2773 fi
2774 rm -f conftest*
2775 rm -f conftest*
2776 fi
2777
2778 echo "$ac_t""$ac_cv_mingw32" 1>&6
2779 MINGW32=
2780 test "$ac_cv_mingw32" = yes && MINGW32=yes
2781
2782
2783 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2784 echo "configure:2785: checking for executable suffix" >&5
2785 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2786   echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2789   ac_cv_exeext=.exe
2790 else
2791   rm -f conftest*
2792   echo 'int main () { return 0; }' > conftest.$ac_ext
2793   ac_cv_exeext=
2794   if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2795     for file in conftest.*; do
2796       case $file in
2797       *.c | *.o | *.obj) ;;
2798       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2799       esac
2800     done
2801   else
2802     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2803   fi
2804   rm -f conftest*
2805   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2806 fi
2807 fi
2808
2809 EXEEXT=""
2810 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2811 echo "$ac_t""${ac_cv_exeext}" 1>&6
2812 ac_exeext=$EXEEXT
2813
2814 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2815 echo "configure:2816: checking for object suffix" >&5
2816 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   rm -f conftest*
2820 echo 'int i = 1;' > conftest.$ac_ext
2821 if { (eval echo configure:2822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2822   for ac_file in conftest.*; do
2823     case $ac_file in
2824     *.c) ;;
2825     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2826     esac
2827   done
2828 else
2829   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2830 fi
2831 rm -f conftest*
2832 fi
2833
2834 echo "$ac_t""$ac_cv_objext" 1>&6
2835 OBJEXT=$ac_cv_objext
2836 ac_objext=$ac_cv_objext
2837
2838
2839
2840
2841
2842 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2843 echo "configure:2844: checking for ${CC-cc} option to accept ANSI C" >&5
2844 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847   am_cv_prog_cc_stdc=no
2848 ac_save_CC="$CC"
2849 # Don't try gcc -ansi; that turns off useful extensions and
2850 # breaks some systems' header files.
2851 # AIX                   -qlanglvl=ansi
2852 # Ultrix and OSF/1      -std1
2853 # HP-UX                 -Aa -D_HPUX_SOURCE
2854 # SVR4                  -Xc -D__EXTENSIONS__
2855 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2856 do
2857   CC="$ac_save_CC $ac_arg"
2858   cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <stdarg.h>
2862 #include <stdio.h>
2863 #include <sys/types.h>
2864 #include <sys/stat.h>
2865 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2866 struct buf { int x; };
2867 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2868 static char *e (p, i)
2869      char **p;
2870      int i;
2871 {
2872   return p[i];
2873 }
2874 static char *f (char * (*g) (char **, int), char **p, ...)
2875 {
2876   char *s;
2877   va_list v;
2878   va_start (v,p);
2879   s = g (p, va_arg (v,int));
2880   va_end (v);
2881   return s;
2882 }
2883 int test (int i, double x);
2884 struct s1 {int (*f) (int a);};
2885 struct s2 {int (*f) (double a);};
2886 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2887 int argc;
2888 char **argv;
2889
2890 int main() {
2891
2892 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2893
2894 ; return 0; }
2895 EOF
2896 if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2897   rm -rf conftest*
2898   am_cv_prog_cc_stdc="$ac_arg"; break
2899 else
2900   echo "configure: failed program was:" >&5
2901   cat conftest.$ac_ext >&5
2902 fi
2903 rm -f conftest*
2904 done
2905 CC="$ac_save_CC"
2906
2907 fi
2908
2909 if test -z "$am_cv_prog_cc_stdc"; then
2910   echo "$ac_t""none needed" 1>&6
2911 else
2912   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2913 fi
2914 case "x$am_cv_prog_cc_stdc" in
2915   x|xno) ;;
2916   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2917 esac
2918
2919 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2920         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2921 fi
2922
2923
2924
2925
2926 echo $ac_n "checking for socket""... $ac_c" 1>&6
2927 echo "configure:2928: checking for socket" >&5
2928 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   cat > conftest.$ac_ext <<EOF
2932 #line 2933 "configure"
2933 #include "confdefs.h"
2934 /* System header to define __stub macros and hopefully few prototypes,
2935     which can conflict with char socket(); below.  */
2936 #include <assert.h>
2937 /* Override any gcc2 internal prototype to avoid an error.  */
2938 /* We use char because int might match the return type of a gcc2
2939     builtin and then its argument prototype would still apply.  */
2940 char socket();
2941
2942 int main() {
2943
2944 /* The GNU C library defines this for functions which it implements
2945     to always fail with ENOSYS.  Some functions are actually named
2946     something starting with __ and the normal name is an alias.  */
2947 #if defined (__stub_socket) || defined (__stub___socket)
2948 choke me
2949 #else
2950 socket();
2951 #endif
2952
2953 ; return 0; }
2954 EOF
2955 if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956   rm -rf conftest*
2957   eval "ac_cv_func_socket=yes"
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_func_socket=no"
2963 fi
2964 rm -f conftest*
2965 fi
2966
2967 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2968   echo "$ac_t""yes" 1>&6
2969   have_socket=yes
2970 else
2971   echo "$ac_t""no" 1>&6
2972         
2973         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2974 echo "configure:2975: checking for main in -lsocket" >&5
2975 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   ac_save_LIBS="$LIBS"
2980 LIBS="-lsocket  $LIBS"
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984
2985 int main() {
2986 main()
2987 ; return 0; }
2988 EOF
2989 if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2990   rm -rf conftest*
2991   eval "ac_cv_lib_$ac_lib_var=yes"
2992 else
2993   echo "configure: failed program was:" >&5
2994   cat conftest.$ac_ext >&5
2995   rm -rf conftest*
2996   eval "ac_cv_lib_$ac_lib_var=no"
2997 fi
2998 rm -f conftest*
2999 LIBS="$ac_save_LIBS"
3000
3001 fi
3002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3003   echo "$ac_t""yes" 1>&6
3004     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3005     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3006   cat >> confdefs.h <<EOF
3007 #define $ac_tr_lib 1
3008 EOF
3009
3010   LIBS="-lsocket $LIBS"
3011
3012 else
3013   echo "$ac_t""no" 1>&6
3014 fi
3015
3016         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3017 echo "configure:3018: checking for main in -lnet" >&5
3018 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   ac_save_LIBS="$LIBS"
3023 LIBS="-lnet  $LIBS"
3024 cat > conftest.$ac_ext <<EOF
3025 #line 3026 "configure"
3026 #include "confdefs.h"
3027
3028 int main() {
3029 main()
3030 ; return 0; }
3031 EOF
3032 if { (eval echo configure:3033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3033   rm -rf conftest*
3034   eval "ac_cv_lib_$ac_lib_var=yes"
3035 else
3036   echo "configure: failed program was:" >&5
3037   cat conftest.$ac_ext >&5
3038   rm -rf conftest*
3039   eval "ac_cv_lib_$ac_lib_var=no"
3040 fi
3041 rm -f conftest*
3042 LIBS="$ac_save_LIBS"
3043
3044 fi
3045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3046   echo "$ac_t""yes" 1>&6
3047     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3048     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3049   cat >> confdefs.h <<EOF
3050 #define $ac_tr_lib 1
3051 EOF
3052
3053   LIBS="-lnet $LIBS"
3054
3055 else
3056   echo "$ac_t""no" 1>&6
3057 fi
3058
3059         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3060 echo "configure:3061: checking for main in -lnsl_s" >&5
3061 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   ac_save_LIBS="$LIBS"
3066 LIBS="-lnsl_s  $LIBS"
3067 cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070
3071 int main() {
3072 main()
3073 ; return 0; }
3074 EOF
3075 if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3076   rm -rf conftest*
3077   eval "ac_cv_lib_$ac_lib_var=yes"
3078 else
3079   echo "configure: failed program was:" >&5
3080   cat conftest.$ac_ext >&5
3081   rm -rf conftest*
3082   eval "ac_cv_lib_$ac_lib_var=no"
3083 fi
3084 rm -f conftest*
3085 LIBS="$ac_save_LIBS"
3086
3087 fi
3088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3089   echo "$ac_t""yes" 1>&6
3090     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3092   cat >> confdefs.h <<EOF
3093 #define $ac_tr_lib 1
3094 EOF
3095
3096   LIBS="-lnsl_s $LIBS"
3097
3098 else
3099   echo "$ac_t""no" 1>&6
3100 fi
3101
3102         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3103 echo "configure:3104: checking for main in -lnsl" >&5
3104 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3105 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3106   echo $ac_n "(cached) $ac_c" 1>&6
3107 else
3108   ac_save_LIBS="$LIBS"
3109 LIBS="-lnsl  $LIBS"
3110 cat > conftest.$ac_ext <<EOF
3111 #line 3112 "configure"
3112 #include "confdefs.h"
3113
3114 int main() {
3115 main()
3116 ; return 0; }
3117 EOF
3118 if { (eval echo configure:3119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3119   rm -rf conftest*
3120   eval "ac_cv_lib_$ac_lib_var=yes"
3121 else
3122   echo "configure: failed program was:" >&5
3123   cat conftest.$ac_ext >&5
3124   rm -rf conftest*
3125   eval "ac_cv_lib_$ac_lib_var=no"
3126 fi
3127 rm -f conftest*
3128 LIBS="$ac_save_LIBS"
3129
3130 fi
3131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3132   echo "$ac_t""yes" 1>&6
3133     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3134     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3135   cat >> confdefs.h <<EOF
3136 #define $ac_tr_lib 1
3137 EOF
3138
3139   LIBS="-lnsl $LIBS"
3140
3141 else
3142   echo "$ac_t""no" 1>&6
3143 fi
3144
3145         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3146 echo "configure:3147: checking for socket in -linet" >&5
3147 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3148 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   ac_save_LIBS="$LIBS"
3152 LIBS="-linet  $LIBS"
3153 cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156 /* Override any gcc2 internal prototype to avoid an error.  */
3157 /* We use char because int might match the return type of a gcc2
3158     builtin and then its argument prototype would still apply.  */
3159 char socket();
3160
3161 int main() {
3162 socket()
3163 ; return 0; }
3164 EOF
3165 if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3166   rm -rf conftest*
3167   eval "ac_cv_lib_$ac_lib_var=yes"
3168 else
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   eval "ac_cv_lib_$ac_lib_var=no"
3173 fi
3174 rm -f conftest*
3175 LIBS="$ac_save_LIBS"
3176
3177 fi
3178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3179   echo "$ac_t""yes" 1>&6
3180     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3181     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3182   cat >> confdefs.h <<EOF
3183 #define $ac_tr_lib 1
3184 EOF
3185
3186   LIBS="-linet $LIBS"
3187
3188 else
3189   echo "$ac_t""no" 1>&6
3190 fi
3191
3192         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3193 echo "configure:3194: checking for main in -lgen" >&5
3194 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3195 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3196   echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198   ac_save_LIBS="$LIBS"
3199 LIBS="-lgen  $LIBS"
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203
3204 int main() {
3205 main()
3206 ; return 0; }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3209   rm -rf conftest*
3210   eval "ac_cv_lib_$ac_lib_var=yes"
3211 else
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   eval "ac_cv_lib_$ac_lib_var=no"
3216 fi
3217 rm -f conftest*
3218 LIBS="$ac_save_LIBS"
3219
3220 fi
3221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3222   echo "$ac_t""yes" 1>&6
3223     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3224     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3225   cat >> confdefs.h <<EOF
3226 #define $ac_tr_lib 1
3227 EOF
3228
3229   LIBS="-lgen $LIBS"
3230
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235
3236 fi
3237
3238
3239 for ac_func in res_search
3240 do
3241 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_func" >&5
3243 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 /* System header to define __stub macros and hopefully few prototypes,
3250     which can conflict with char $ac_func(); below.  */
3251 #include <assert.h>
3252 /* Override any gcc2 internal prototype to avoid an error.  */
3253 /* We use char because int might match the return type of a gcc2
3254     builtin and then its argument prototype would still apply.  */
3255 char $ac_func();
3256
3257 int main() {
3258
3259 /* The GNU C library defines this for functions which it implements
3260     to always fail with ENOSYS.  Some functions are actually named
3261     something starting with __ and the normal name is an alias.  */
3262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3263 choke me
3264 #else
3265 $ac_func();
3266 #endif
3267
3268 ; return 0; }
3269 EOF
3270 if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3271   rm -rf conftest*
3272   eval "ac_cv_func_$ac_func=yes"
3273 else
3274   echo "configure: failed program was:" >&5
3275   cat conftest.$ac_ext >&5
3276   rm -rf conftest*
3277   eval "ac_cv_func_$ac_func=no"
3278 fi
3279 rm -f conftest*
3280 fi
3281
3282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3283   echo "$ac_t""yes" 1>&6
3284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3285   cat >> confdefs.h <<EOF
3286 #define $ac_tr_func 1
3287 EOF
3288  
3289 else
3290   echo "$ac_t""no" 1>&6
3291 fi
3292 done
3293
3294 if test $ac_cv_func_res_search = "no" ; then 
3295         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3296 echo "configure:3297: checking for res_search in -lbind" >&5
3297 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3298 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   ac_save_LIBS="$LIBS"
3302 LIBS="-lbind  $LIBS"
3303 cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 /* Override any gcc2 internal prototype to avoid an error.  */
3307 /* We use char because int might match the return type of a gcc2
3308     builtin and then its argument prototype would still apply.  */
3309 char res_search();
3310
3311 int main() {
3312 res_search()
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3316   rm -rf conftest*
3317   eval "ac_cv_lib_$ac_lib_var=yes"
3318 else
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321   rm -rf conftest*
3322   eval "ac_cv_lib_$ac_lib_var=no"
3323 fi
3324 rm -f conftest*
3325 LIBS="$ac_save_LIBS"
3326
3327 fi
3328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3329   echo "$ac_t""yes" 1>&6
3330     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3331     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3332   cat >> confdefs.h <<EOF
3333 #define $ac_tr_lib 1
3334 EOF
3335
3336   LIBS="-lbind $LIBS"
3337
3338 else
3339   echo "$ac_t""no" 1>&6
3340 fi
3341
3342         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3343                 cat >> confdefs.h <<\EOF
3344 #define HAVE_RES_SEARCH 1
3345 EOF
3346
3347         else
3348                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3349 echo "configure:3350: checking for res_search in -lresolv" >&5
3350 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   ac_save_LIBS="$LIBS"
3355 LIBS="-lresolv  $LIBS"
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 /* Override any gcc2 internal prototype to avoid an error.  */
3360 /* We use char because int might match the return type of a gcc2
3361     builtin and then its argument prototype would still apply.  */
3362 char res_search();
3363
3364 int main() {
3365 res_search()
3366 ; return 0; }
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3369   rm -rf conftest*
3370   eval "ac_cv_lib_$ac_lib_var=yes"
3371 else
3372   echo "configure: failed program was:" >&5
3373   cat conftest.$ac_ext >&5
3374   rm -rf conftest*
3375   eval "ac_cv_lib_$ac_lib_var=no"
3376 fi
3377 rm -f conftest*
3378 LIBS="$ac_save_LIBS"
3379
3380 fi
3381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3382   echo "$ac_t""yes" 1>&6
3383     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3384     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3385   cat >> confdefs.h <<EOF
3386 #define $ac_tr_lib 1
3387 EOF
3388
3389   LIBS="-lresolv $LIBS"
3390
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394
3395                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3396                         cat >> confdefs.h <<\EOF
3397 #define HAVE_RES_SEARCH 1
3398 EOF
3399
3400                 fi
3401         fi
3402 fi
3403
3404 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3405 echo "configure:3406: checking for sigset in -lV3" >&5
3406 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3407 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   ac_save_LIBS="$LIBS"
3411 LIBS="-lV3  $LIBS"
3412 cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 /* Override any gcc2 internal prototype to avoid an error.  */
3416 /* We use char because int might match the return type of a gcc2
3417     builtin and then its argument prototype would still apply.  */
3418 char sigset();
3419
3420 int main() {
3421 sigset()
3422 ; return 0; }
3423 EOF
3424 if { (eval echo configure:3425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3425   rm -rf conftest*
3426   eval "ac_cv_lib_$ac_lib_var=yes"
3427 else
3428   echo "configure: failed program was:" >&5
3429   cat conftest.$ac_ext >&5
3430   rm -rf conftest*
3431   eval "ac_cv_lib_$ac_lib_var=no"
3432 fi
3433 rm -f conftest*
3434 LIBS="$ac_save_LIBS"
3435
3436 fi
3437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3438   echo "$ac_t""yes" 1>&6
3439     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3440     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3441   cat >> confdefs.h <<EOF
3442 #define $ac_tr_lib 1
3443 EOF
3444
3445   LIBS="-lV3 $LIBS"
3446
3447 else
3448   echo "$ac_t""no" 1>&6
3449 fi
3450
3451
3452 # ISODE tests
3453 ol_link_isode=no
3454 if test $ol_enable_ldapd != no ; then
3455                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3456 echo "configure:3457: checking for main in -lxtpp" >&5
3457 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3458 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   ac_save_LIBS="$LIBS"
3462 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466
3467 int main() {
3468 main()
3469 ; return 0; }
3470 EOF
3471 if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3472   rm -rf conftest*
3473   eval "ac_cv_lib_$ac_lib_var=yes"
3474 else
3475   echo "configure: failed program was:" >&5
3476   cat conftest.$ac_ext >&5
3477   rm -rf conftest*
3478   eval "ac_cv_lib_$ac_lib_var=no"
3479 fi
3480 rm -f conftest*
3481 LIBS="$ac_save_LIBS"
3482
3483 fi
3484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3485   echo "$ac_t""yes" 1>&6
3486   
3487                 ol_link_isode=yes
3488                 cat >> confdefs.h <<\EOF
3489 #define HAVE_XTPP 1
3490 EOF
3491
3492                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3493                 
3494 else
3495   echo "$ac_t""no" 1>&6
3496 :
3497 fi
3498
3499         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3500 echo "configure:3501: checking for main in -ldsap" >&5
3501 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3502 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   ac_save_LIBS="$LIBS"
3506 LIBS="-ldsap -lisode $LIBS"
3507 cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510
3511 int main() {
3512 main()
3513 ; return 0; }
3514 EOF
3515 if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3516   rm -rf conftest*
3517   eval "ac_cv_lib_$ac_lib_var=yes"
3518 else
3519   echo "configure: failed program was:" >&5
3520   cat conftest.$ac_ext >&5
3521   rm -rf conftest*
3522   eval "ac_cv_lib_$ac_lib_var=no"
3523 fi
3524 rm -f conftest*
3525 LIBS="$ac_save_LIBS"
3526
3527 fi
3528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3529   echo "$ac_t""yes" 1>&6
3530   
3531                 ol_link_isode=yes
3532                 cat >> confdefs.h <<\EOF
3533 #define HAVE_DSAP 1
3534 EOF
3535
3536                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3537                 
3538 else
3539   echo "$ac_t""no" 1>&6
3540 :
3541 fi
3542
3543         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3544 echo "configure:3545: checking for main in -lisode" >&5
3545 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3546 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3547   echo $ac_n "(cached) $ac_c" 1>&6
3548 else
3549   ac_save_LIBS="$LIBS"
3550 LIBS="-lisode  $LIBS"
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554
3555 int main() {
3556 main()
3557 ; return 0; }
3558 EOF
3559 if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3560   rm -rf conftest*
3561   eval "ac_cv_lib_$ac_lib_var=yes"
3562 else
3563   echo "configure: failed program was:" >&5
3564   cat conftest.$ac_ext >&5
3565   rm -rf conftest*
3566   eval "ac_cv_lib_$ac_lib_var=no"
3567 fi
3568 rm -f conftest*
3569 LIBS="$ac_save_LIBS"
3570
3571 fi
3572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3573   echo "$ac_t""yes" 1>&6
3574   
3575                 ol_link_isode=yes
3576                 cat >> confdefs.h <<\EOF
3577 #define HAVE_ISODE 1
3578 EOF
3579
3580                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3581                 
3582 else
3583   echo "$ac_t""no" 1>&6
3584 :
3585 fi
3586
3587 fi
3588
3589 if test $ol_link_isode != no; then
3590         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3591 echo "configure:3592: checking for main in -lpp" >&5
3592 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   ac_save_LIBS="$LIBS"
3597 LIBS="-lpp  $LIBS"
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601
3602 int main() {
3603 main()
3604 ; return 0; }
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3607   rm -rf conftest*
3608   eval "ac_cv_lib_$ac_lib_var=yes"
3609 else
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   eval "ac_cv_lib_$ac_lib_var=no"
3614 fi
3615 rm -f conftest*
3616 LIBS="$ac_save_LIBS"
3617
3618 fi
3619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3620   echo "$ac_t""yes" 1>&6
3621   
3622                 cat >> confdefs.h <<\EOF
3623 #define HAVE_PP 1
3624 EOF
3625
3626                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3627                 
3628 else
3629   echo "$ac_t""no" 1>&6
3630 :
3631 fi
3632
3633
3634         # Extract the first word of "pepsy", so it can be a program name with args.
3635 set dummy pepsy; ac_word=$2
3636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3637 echo "configure:3638: checking for $ac_word" >&5
3638 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   case "$PEPSY" in
3642   /*)
3643   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3644   ;;
3645   ?:/*)                  
3646   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3647   ;;
3648   *)
3649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3650   ac_dummy="$PATH"
3651   for ac_dir in $ac_dummy; do 
3652     test -z "$ac_dir" && ac_dir=.
3653     if test -f $ac_dir/$ac_word; then
3654       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3655       break
3656     fi
3657   done
3658   IFS="$ac_save_ifs"
3659   ;;
3660 esac
3661 fi
3662 PEPSY="$ac_cv_path_PEPSY"
3663 if test -n "$PEPSY"; then
3664   echo "$ac_t""$PEPSY" 1>&6
3665 else
3666   echo "$ac_t""no" 1>&6
3667 fi
3668
3669 fi
3670
3671 ol_link_kerberos=no
3672
3673 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3674         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3675 do
3676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3678 echo "configure:3679: checking for $ac_hdr" >&5
3679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3680   echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682   cat > conftest.$ac_ext <<EOF
3683 #line 3684 "configure"
3684 #include "confdefs.h"
3685 #include <$ac_hdr>
3686 EOF
3687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3688 { (eval echo configure:3689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3690 if test -z "$ac_err"; then
3691   rm -rf conftest*
3692   eval "ac_cv_header_$ac_safe=yes"
3693 else
3694   echo "$ac_err" >&5
3695   echo "configure: failed program was:" >&5
3696   cat conftest.$ac_ext >&5
3697   rm -rf conftest*
3698   eval "ac_cv_header_$ac_safe=no"
3699 fi
3700 rm -f conftest*
3701 fi
3702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3703   echo "$ac_t""yes" 1>&6
3704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3705   cat >> confdefs.h <<EOF
3706 #define $ac_tr_hdr 1
3707 EOF
3708  
3709 else
3710   echo "$ac_t""no" 1>&6
3711 fi
3712 done
3713
3714
3715         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3716                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3717 echo "configure:3718: checking for main in -lkrb4" >&5
3718 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3720   echo $ac_n "(cached) $ac_c" 1>&6
3721 else
3722   ac_save_LIBS="$LIBS"
3723 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3724 cat > conftest.$ac_ext <<EOF
3725 #line 3726 "configure"
3726 #include "confdefs.h"
3727
3728 int main() {
3729 main()
3730 ; return 0; }
3731 EOF
3732 if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3733   rm -rf conftest*
3734   eval "ac_cv_lib_$ac_lib_var=yes"
3735 else
3736   echo "configure: failed program was:" >&5
3737   cat conftest.$ac_ext >&5
3738   rm -rf conftest*
3739   eval "ac_cv_lib_$ac_lib_var=no"
3740 fi
3741 rm -f conftest*
3742 LIBS="$ac_save_LIBS"
3743
3744 fi
3745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3746   echo "$ac_t""yes" 1>&6
3747   have_k5=yes
3748 else
3749   echo "$ac_t""no" 1>&6
3750 have_k5=no
3751 fi
3752
3753
3754                 if test $have_k5 = yes ; then
3755                         ol_with_kerberos=found
3756                         ol_link_kerberos=yes
3757
3758                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3759
3760                         LIBS="$KRB_LIBS $LIBS"
3761
3762                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3763 echo "configure:3764: checking for des_debug in Kerberos libraries" >&5
3764 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3765   echo $ac_n "(cached) $ac_c" 1>&6
3766 else
3767   
3768                                                                 save_LIBS="$LIBS"
3769                                 LIBS="$KRB_LIBS $LIBS"
3770                                 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773
3774 #include <kerberosIV/krb.h>
3775 #include <kerberosIV/des.h>
3776 extern int des_debug;
3777
3778 int main() {
3779
3780 des_debug = 1;
3781
3782 ; return 0; }
3783 EOF
3784 if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3785   rm -rf conftest*
3786   ol_cv_var_des_debug=yes
3787 else
3788   echo "configure: failed program was:" >&5
3789   cat conftest.$ac_ext >&5
3790   rm -rf conftest*
3791   ol_cv_var_des_debug=no
3792 fi
3793 rm -f conftest*
3794                                                                 LIBS="$save_LIBS"
3795                         
3796 fi
3797
3798 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3799
3800                         if test $ol_cv_var_des_debug = yes ; then
3801                                 cat >> confdefs.h <<\EOF
3802 #define HAVE_DES_DEBUG 1
3803 EOF
3804
3805                         fi
3806
3807                         LIBS="$save_LIBS"
3808                 fi
3809         fi
3810 fi
3811
3812 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3813         for ac_hdr in krb.h des.h
3814 do
3815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3817 echo "configure:3818: checking for $ac_hdr" >&5
3818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3819   echo $ac_n "(cached) $ac_c" 1>&6
3820 else
3821   cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 #include <$ac_hdr>
3825 EOF
3826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3827 { (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3829 if test -z "$ac_err"; then
3830   rm -rf conftest*
3831   eval "ac_cv_header_$ac_safe=yes"
3832 else
3833   echo "$ac_err" >&5
3834   echo "configure: failed program was:" >&5
3835   cat conftest.$ac_ext >&5
3836   rm -rf conftest*
3837   eval "ac_cv_header_$ac_safe=no"
3838 fi
3839 rm -f conftest*
3840 fi
3841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3844   cat >> confdefs.h <<EOF
3845 #define $ac_tr_hdr 1
3846 EOF
3847  
3848 else
3849   echo "$ac_t""no" 1>&6
3850 fi
3851 done
3852
3853
3854         if test $ac_cv_header_krb_h = yes ; then
3855                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3856 echo "configure:3857: checking for main in -lkrb" >&5
3857 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3858 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   ac_save_LIBS="$LIBS"
3862 LIBS="-lkrb -ldes $LIBS"
3863 cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866
3867 int main() {
3868 main()
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3872   rm -rf conftest*
3873   eval "ac_cv_lib_$ac_lib_var=yes"
3874 else
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=no"
3879 fi
3880 rm -f conftest*
3881 LIBS="$ac_save_LIBS"
3882
3883 fi
3884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3885   echo "$ac_t""yes" 1>&6
3886   have_k4=yes
3887 else
3888   echo "$ac_t""no" 1>&6
3889 have_k4=no
3890 fi
3891
3892
3893                 if test $have_k4 = yes ; then
3894                         ol_with_kerberos=found
3895                         ol_link_kerberos=yes
3896
3897                         KRB_LIBS="-lkrb -ldes"
3898                 fi
3899         fi
3900 fi
3901
3902 if test $ol_link_kerberos = yes ; then
3903         cat >> confdefs.h <<\EOF
3904 #define HAVE_KERBEROS 1
3905 EOF
3906
3907 fi
3908
3909 ol_link_tls=no
3910 if test $ol_with_tls != no ; then
3911         
3912         for ac_hdr in ssl.h
3913 do
3914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3916 echo "configure:3917: checking for $ac_hdr" >&5
3917 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3918   echo $ac_n "(cached) $ac_c" 1>&6
3919 else
3920   cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923 #include <$ac_hdr>
3924 EOF
3925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3926 { (eval echo configure:3927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3928 if test -z "$ac_err"; then
3929   rm -rf conftest*
3930   eval "ac_cv_header_$ac_safe=yes"
3931 else
3932   echo "$ac_err" >&5
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   eval "ac_cv_header_$ac_safe=no"
3937 fi
3938 rm -f conftest*
3939 fi
3940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3941   echo "$ac_t""yes" 1>&6
3942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3943   cat >> confdefs.h <<EOF
3944 #define $ac_tr_hdr 1
3945 EOF
3946  
3947 else
3948   echo "$ac_t""no" 1>&6
3949 fi
3950 done
3951
3952         
3953         if test $ac_cv_header_ssl_h = yes ; then
3954                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
3955 echo "configure:3956: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
3956 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
3957 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3958   echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960   ac_save_LIBS="$LIBS"
3961 LIBS="-lssl -lcrypto $LIBS"
3962 cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 /* Override any gcc2 internal prototype to avoid an error.  */
3966 /* We use char because int might match the return type of a gcc2
3967     builtin and then its argument prototype would still apply.  */
3968 char SSLeay_add_ssl_algorithms();
3969
3970 int main() {
3971 SSLeay_add_ssl_algorithms()
3972 ; return 0; }
3973 EOF
3974 if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3975   rm -rf conftest*
3976   eval "ac_cv_lib_$ac_lib_var=yes"
3977 else
3978   echo "configure: failed program was:" >&5
3979   cat conftest.$ac_ext >&5
3980   rm -rf conftest*
3981   eval "ac_cv_lib_$ac_lib_var=no"
3982 fi
3983 rm -f conftest*
3984 LIBS="$ac_save_LIBS"
3985
3986 fi
3987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3988   echo "$ac_t""yes" 1>&6
3989   have_ssleay=yes
3990                         need_rsaref=no
3991 else
3992   echo "$ac_t""no" 1>&6
3993 have_ssleay=no
3994 fi
3995
3996                         
3997                 if test $have_ssleay = no ; then
3998                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
3999 echo "configure:4000: checking for ssl3_accept in -lssl" >&5
4000 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4002   echo $ac_n "(cached) $ac_c" 1>&6
4003 else
4004   ac_save_LIBS="$LIBS"
4005 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4006 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009 /* Override any gcc2 internal prototype to avoid an error.  */
4010 /* We use char because int might match the return type of a gcc2
4011     builtin and then its argument prototype would still apply.  */
4012 char ssl3_accept();
4013
4014 int main() {
4015 ssl3_accept()
4016 ; return 0; }
4017 EOF
4018 if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4019   rm -rf conftest*
4020   eval "ac_cv_lib_$ac_lib_var=yes"
4021 else
4022   echo "configure: failed program was:" >&5
4023   cat conftest.$ac_ext >&5
4024   rm -rf conftest*
4025   eval "ac_cv_lib_$ac_lib_var=no"
4026 fi
4027 rm -f conftest*
4028 LIBS="$ac_save_LIBS"
4029
4030 fi
4031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4032   echo "$ac_t""yes" 1>&6
4033   have_ssleay=yes
4034                                 need_rsaref=yes
4035 else
4036   echo "$ac_t""no" 1>&6
4037 have_ssleay=no
4038 fi
4039
4040                 fi
4041
4042                 if test $have_ssleay = yes ; then
4043                         ol_with_tls=found
4044                         ol_link_tls=yes
4045
4046                         cat >> confdefs.h <<\EOF
4047 #define HAVE_SSLEAY 1
4048 EOF
4049
4050
4051                         if test $need_rsaref = yes; then
4052                                 cat >> confdefs.h <<\EOF
4053 #define HAVE_RSAREF 1
4054 EOF
4055
4056
4057                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4058                         else
4059                                 TLS_LIBS="-lssl -lcrypto"
4060                         fi
4061                 fi
4062         fi
4063 fi
4064
4065 if test $ol_link_tls = yes ; then
4066         cat >> confdefs.h <<\EOF
4067 #define HAVE_TLS 1
4068 EOF
4069
4070 fi      
4071
4072 for ac_func in \
4073         ctime_r                 \
4074         gethostbyname_r gethostbyaddr_r \
4075
4076 do
4077 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4078 echo "configure:4079: checking for $ac_func" >&5
4079 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082   cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4085 /* System header to define __stub macros and hopefully few prototypes,
4086     which can conflict with char $ac_func(); below.  */
4087 #include <assert.h>
4088 /* Override any gcc2 internal prototype to avoid an error.  */
4089 /* We use char because int might match the return type of a gcc2
4090     builtin and then its argument prototype would still apply.  */
4091 char $ac_func();
4092
4093 int main() {
4094
4095 /* The GNU C library defines this for functions which it implements
4096     to always fail with ENOSYS.  Some functions are actually named
4097     something starting with __ and the normal name is an alias.  */
4098 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4099 choke me
4100 #else
4101 $ac_func();
4102 #endif
4103
4104 ; return 0; }
4105 EOF
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4107   rm -rf conftest*
4108   eval "ac_cv_func_$ac_func=yes"
4109 else
4110   echo "configure: failed program was:" >&5
4111   cat conftest.$ac_ext >&5
4112   rm -rf conftest*
4113   eval "ac_cv_func_$ac_func=no"
4114 fi
4115 rm -f conftest*
4116 fi
4117
4118 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4119   echo "$ac_t""yes" 1>&6
4120     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4121   cat >> confdefs.h <<EOF
4122 #define $ac_tr_func 1
4123 EOF
4124  
4125 else
4126   echo "$ac_t""no" 1>&6
4127 fi
4128 done
4129
4130
4131 if test "$ac_cv_func_ctime_r" = no ; then
4132         ol_cv_func_ctime_r_nargs=0
4133 else
4134         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4135 echo "configure:4136: checking number of arguments of ctime_r" >&5
4136 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <time.h>
4143 int main() {
4144 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4145 ; return 0; }
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4148   rm -rf conftest*
4149   ol_cv_func_ctime_r_nargs=3
4150 else
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 #include <time.h>
4158 int main() {
4159 time_t ti; char *buffer; ctime_r(&ti,buffer);
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4163   rm -rf conftest*
4164   ol_cv_func_ctime_r_nargs=2
4165 else
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168   rm -rf conftest*
4169   ol_cv_func_ctime_r_nargs=0
4170 fi
4171 rm -f conftest*
4172 fi
4173 rm -f conftest*
4174 fi
4175
4176 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4177   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4178     cat >> confdefs.h <<EOF
4179 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4180 EOF
4181
4182   fi
4183
4184 fi
4185
4186 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4187         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4188 echo "configure:4189: checking number of arguments of gethostbyname_r" >&5
4189 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <sys/types.h>
4196 #include <sys/socket.h>
4197 #include <netinet/in.h>
4198 #include <netdb.h>
4199 #define BUFSIZE (sizeof(struct hostent)+10)
4200 int main() {
4201 struct hostent hent; char buffer[BUFSIZE];
4202                 int bufsize=BUFSIZE;int h_errno;
4203                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4204                         buffer, bufsize, &h_errno);
4205 ; return 0; }
4206 EOF
4207 if { (eval echo configure:4208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4208   rm -rf conftest*
4209   ol_cv_func_gethostbyname_r_nargs=5
4210 else
4211   echo "configure: failed program was:" >&5
4212   cat conftest.$ac_ext >&5
4213   rm -rf conftest*
4214   cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <sys/types.h>
4218 #include <sys/socket.h>
4219 #include <netinet/in.h>
4220 #include <netdb.h>
4221 #define BUFSIZE (sizeof(struct hostent)+10)
4222 int main() {
4223 struct hostent hent;struct hostent *rhent;
4224                         char buffer[BUFSIZE];
4225                         int bufsize=BUFSIZE;int h_errno;
4226                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4227                                 &rhent, &h_errno);
4228 ; return 0; }
4229 EOF
4230 if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4231   rm -rf conftest*
4232   ol_cv_func_gethostbyname_r_nargs=6
4233 else
4234   echo "configure: failed program was:" >&5
4235   cat conftest.$ac_ext >&5
4236   rm -rf conftest*
4237   ol_cv_func_gethostbyname_r_nargs=0
4238 fi
4239 rm -f conftest*
4240 fi
4241 rm -f conftest*
4242 fi
4243
4244 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4245   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4246         cat >> confdefs.h <<EOF
4247 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4248 EOF
4249
4250   fi
4251
4252 else
4253         ol_cv_func_gethostbyname_r_nargs=0
4254 fi
4255  
4256 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4257         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4258 echo "configure:4259: checking number of arguments of gethostbyaddr_r" >&5
4259 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 #include <sys/types.h>
4266 #include <sys/socket.h>
4267 #include <netinet/in.h>
4268 #include <netdb.h>
4269 #define BUFSIZE (sizeof(struct hostent)+10)
4270 int main() {
4271 struct hostent hent; char buffer[BUFSIZE]; 
4272             struct in_addr add;
4273             size_t alen=sizeof(struct in_addr);
4274             int bufsize=BUFSIZE;int h_errno;
4275                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4276                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4277 ; return 0; }
4278 EOF
4279 if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4280   rm -rf conftest*
4281   ol_cv_func_gethostbyaddr_r_nargs=7
4282 else
4283   echo "configure: failed program was:" >&5
4284   cat conftest.$ac_ext >&5
4285   rm -rf conftest*
4286   cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <sys/types.h>
4290 #include <sys/socket.h>
4291 #include <netinet/in.h>
4292 #include <netdb.h>
4293 #define BUFSIZE (sizeof(struct hostent)+10)
4294 int main() {
4295 struct hostent hent;
4296                         struct hostent *rhent; char buffer[BUFSIZE]; 
4297                         struct in_addr add;
4298                         size_t alen=sizeof(struct in_addr);
4299                         int bufsize=BUFSIZE;int h_errno;
4300                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4301                                 alen, AF_INET, &hent, buffer, bufsize, 
4302                                 &rhent, &h_errno);
4303 ; return 0; }
4304 EOF
4305 if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4306   rm -rf conftest*
4307   ol_cv_func_gethostbyaddr_r_nargs=8
4308 else
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   ol_cv_func_gethostbyaddr_r_nargs=0
4313 fi
4314 rm -f conftest*
4315 fi
4316 rm -f conftest*
4317 fi
4318
4319 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4320   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4321     cat >> confdefs.h <<EOF
4322 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4323 EOF
4324
4325   fi
4326
4327 else
4328         ol_cv_func_gethostbyaddr_r_nargs=0
4329 fi
4330
4331 if test "$ac_cv_func_ctime_r" = yes \
4332         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4333         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4334         -a "$ac_cv_func_gethostbyname_r" = yes \
4335         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4336         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4337         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4338         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4339         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4340         ; then
4341  
4342         cat >> confdefs.h <<\EOF
4343 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4344 EOF
4345
4346 fi
4347
4348 ol_link_threads=no
4349 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4350         -o $ol_with_threads = posix ; then
4351
4352         for ac_hdr in pthread.h sched.h
4353 do
4354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4356 echo "configure:4357: checking for $ac_hdr" >&5
4357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <$ac_hdr>
4364 EOF
4365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4366 { (eval echo configure:4367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4368 if test -z "$ac_err"; then
4369   rm -rf conftest*
4370   eval "ac_cv_header_$ac_safe=yes"
4371 else
4372   echo "$ac_err" >&5
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   eval "ac_cv_header_$ac_safe=no"
4377 fi
4378 rm -f conftest*
4379 fi
4380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4381   echo "$ac_t""yes" 1>&6
4382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4383   cat >> confdefs.h <<EOF
4384 #define $ac_tr_hdr 1
4385 EOF
4386  
4387 else
4388   echo "$ac_t""no" 1>&6
4389 fi
4390 done
4391
4392
4393         if test $ac_cv_header_pthread_h = yes ; then
4394                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4395 echo "configure:4396: checking POSIX thread version" >&5
4396 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4397   echo $ac_n "(cached) $ac_c" 1>&6
4398 else
4399   
4400         cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403
4404 #               include <pthread.h>
4405                 /* this check could be improved */
4406 #               ifdef PTHREAD_ONCE_INIT
4407                         pthread_version_final
4408 #               endif
4409         
4410 EOF
4411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4412   egrep "pthread_version_final" >/dev/null 2>&1; then
4413   rm -rf conftest*
4414   ol_pthread_final=yes
4415 else
4416   rm -rf conftest*
4417   ol_pthread_final=no
4418 fi
4419 rm -f conftest*
4420
4421
4422         cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425
4426 #               include <pthread.h>
4427                 /* this check could be improved */
4428 #               ifdef pthread_once_init
4429                         pthread_version_draft4
4430 #               endif
4431         
4432 EOF
4433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4434   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4435   rm -rf conftest*
4436   ol_pthread_draft4=yes
4437 else
4438   rm -rf conftest*
4439   ol_pthread_draft4=no
4440 fi
4441 rm -f conftest*
4442
4443
4444         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4445                 ol_cv_pthread_version=final
4446         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4447                 ol_cv_pthread_version=draft4
4448         else
4449                 ol_cv_pthread_version=unknown
4450         fi
4451
4452 fi
4453
4454 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4455
4456
4457                 if test $ol_cv_pthread_version = final ; then
4458                         cat >> confdefs.h <<\EOF
4459 #define HAVE_PTHREADS_FINAL 1
4460 EOF
4461
4462                 elif test $ol_cv_pthread_version = draft4 ; then
4463                         cat >> confdefs.h <<\EOF
4464 #define HAVE_PTHREADS_D4 1
4465 EOF
4466
4467                 else
4468                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4469                 fi
4470
4471                 # consider threads found
4472                 ol_with_threads=found
4473
4474                 
4475 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
4476 echo "configure:4477: checking for LinuxThreads" >&5
4477 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   
4481         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
4482         if test "$res" -gt 0 ; then
4483                 ol_cv_linux_threads=yes
4484         else
4485                 ol_cv_linux_threads=no
4486         fi
4487
4488 fi
4489
4490 echo "$ac_t""$ol_cv_linux_threads" 1>&6
4491
4492
4493                 if test $ol_cv_linux_threads = yes ; then
4494                         cat >> confdefs.h <<\EOF
4495 #define HAVE_LINUX_THREADS 1
4496 EOF
4497
4498                 fi
4499
4500                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4501                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
4502 echo "configure:4503: checking for pthread_create" >&5
4503 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 /* System header to define __stub macros and hopefully few prototypes,
4510     which can conflict with char pthread_create(); below.  */
4511 #include <assert.h>
4512 /* Override any gcc2 internal prototype to avoid an error.  */
4513 /* We use char because int might match the return type of a gcc2
4514     builtin and then its argument prototype would still apply.  */
4515 char pthread_create();
4516
4517 int main() {
4518
4519 /* The GNU C library defines this for functions which it implements
4520     to always fail with ENOSYS.  Some functions are actually named
4521     something starting with __ and the normal name is an alias.  */
4522 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
4523 choke me
4524 #else
4525 pthread_create();
4526 #endif
4527
4528 ; return 0; }
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4531   rm -rf conftest*
4532   eval "ac_cv_func_pthread_create=yes"
4533 else
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -rf conftest*
4537   eval "ac_cv_func_pthread_create=no"
4538 fi
4539 rm -f conftest*
4540 fi
4541
4542 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
4543   echo "$ac_t""yes" 1>&6
4544   ol_link_threads=yes
4545 else
4546   echo "$ac_t""no" 1>&6
4547 fi
4548
4549
4550                 if test $ol_link_threads = no ; then
4551                                                 echo $ac_n "checking for pthread_create with -mt""... $ac_c" 1>&6
4552 echo "configure:4553: checking for pthread_create with -mt" >&5
4553 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   
4557                                                                 save_LIBS="$LIBS"
4558                                 LIBS="-mt $LIBS"
4559                                 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 char pthread_create();
4563 int main() {
4564 pthread_create();
4565 ; return 0; }
4566 EOF
4567 if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4568   rm -rf conftest*
4569   ol_cv_thread_flag=yes
4570 else
4571   echo "configure: failed program was:" >&5
4572   cat conftest.$ac_ext >&5
4573   rm -rf conftest*
4574   ol_cv_thread_flag=no
4575 fi
4576 rm -f conftest*
4577                                                                 LIBS="$save_LIBS"
4578                         
4579 fi
4580
4581 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4582
4583                         if test $ol_cv_thread_flag = yes ; then
4584                                 LTHREAD_LIBS="$LTHREAD_LIBS -mt"
4585                                 ol_link_threads=posix
4586                         fi
4587                 fi
4588
4589                 if test $ol_link_threads = no ; then
4590                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
4591 echo "configure:4592: checking for pthread_create with -kthread" >&5
4592 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
4593   echo $ac_n "(cached) $ac_c" 1>&6
4594 else
4595   
4596                                                                 save_LIBS="$LIBS"
4597                                 LIBS="-kthread $LIBS"
4598                                 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 #include <pthread.h>
4602 int main() {
4603
4604 #if HAVE_PTHREADS_D4
4605         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4606 #else
4607         pthread_create(NULL,NULL,NULL,NULL);
4608 #endif
4609
4610 ; return 0; }
4611 EOF
4612 if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4613   rm -rf conftest*
4614   ol_cv_kthread_flag=yes
4615 else
4616   echo "configure: failed program was:" >&5
4617   cat conftest.$ac_ext >&5
4618   rm -rf conftest*
4619   ol_cv_kthread_flag=no
4620 fi
4621 rm -f conftest*
4622                                                                 LIBS="$save_LIBS"
4623                         
4624 fi
4625
4626 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
4627
4628                         if test $ol_cv_kthread_flag = yes ; then
4629                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
4630                                 ol_link_threads=posix
4631                         fi
4632                 fi
4633
4634                 if test $ol_link_threads = no ; then
4635                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
4636 echo "configure:4637: checking for pthread_create with -pthread" >&5
4637 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   
4641                                                                 save_LIBS="$LIBS"
4642                                 LIBS="-pthread $LIBS"
4643                                 cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646 #include <pthread.h>
4647 int main() {
4648
4649 #if HAVE_PTHREADS_D4
4650         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4651 #else
4652         pthread_create(NULL,NULL,NULL,NULL);
4653 #endif
4654
4655 ; return 0; }
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4658   rm -rf conftest*
4659   ol_cv_pthread_flag=yes
4660 else
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -rf conftest*
4664   ol_cv_pthread_flag=no
4665 fi
4666 rm -f conftest*
4667                                                                 LIBS="$save_LIBS"
4668                         
4669 fi
4670
4671 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
4672
4673                         if test $ol_cv_pthread_flag = yes ; then
4674                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
4675                                 ol_link_threads=posix
4676                         fi
4677                 fi
4678
4679                 if test $ol_link_threads = no ; then
4680                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4681 echo "configure:4682: checking for pthread_create with -pthreads" >&5
4682 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   
4686                                                                 save_LIBS="$LIBS"
4687                                 LIBS="-pthreads $LIBS"
4688                                 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 #include <pthread.h>
4692 int main() {
4693
4694 #if HAVE_PTHREADS_D4
4695         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4696 #else
4697         pthread_create(NULL,NULL,NULL,NULL);
4698 #endif
4699
4700 ; return 0; }
4701 EOF
4702 if { (eval echo configure:4703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4703   rm -rf conftest*
4704   ol_cv_pthreads_flag=yes
4705 else
4706   echo "configure: failed program was:" >&5
4707   cat conftest.$ac_ext >&5
4708   rm -rf conftest*
4709   ol_cv_pthreads_flag=no
4710 fi
4711 rm -f conftest*
4712                                                                 LIBS="$save_LIBS"
4713                         
4714 fi
4715
4716 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4717
4718                         if test $ol_cv_pthreads_flag = yes ; then
4719                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4720                                 ol_link_threads=posix
4721                         fi
4722                 fi
4723
4724                 if test $ol_link_threads = no ; then
4725                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4726 echo "configure:4727: checking for pthread_create with -thread" >&5
4727 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4728   echo $ac_n "(cached) $ac_c" 1>&6
4729 else
4730   
4731                                                                 save_LIBS="$LIBS"
4732                                 LIBS="-thread $LIBS"
4733                                 cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 char pthread_create();
4737 int main() {
4738 pthread_create();
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   ol_cv_thread_flag=yes
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   ol_cv_thread_flag=no
4749 fi
4750 rm -f conftest*
4751                                                                 LIBS="$save_LIBS"
4752                         
4753 fi
4754
4755 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4756
4757                         if test $ol_cv_thread_flag = yes ; then
4758                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4759                                 ol_link_threads=posix
4760                         fi
4761                 fi
4762
4763                 if test $ol_link_threads = no ; then
4764                                                 save_LIBS="$LIBS"
4765                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4766 echo "configure:4767: checking for pthread_mutex_unlock in -lpthread" >&5
4767 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4768 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   ac_save_LIBS="$LIBS"
4772 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4773 cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 /* Override any gcc2 internal prototype to avoid an error.  */
4777 /* We use char because int might match the return type of a gcc2
4778     builtin and then its argument prototype would still apply.  */
4779 char pthread_mutex_unlock();
4780
4781 int main() {
4782 pthread_mutex_unlock()
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786   rm -rf conftest*
4787   eval "ac_cv_lib_$ac_lib_var=yes"
4788 else
4789   echo "configure: failed program was:" >&5
4790   cat conftest.$ac_ext >&5
4791   rm -rf conftest*
4792   eval "ac_cv_lib_$ac_lib_var=no"
4793 fi
4794 rm -f conftest*
4795 LIBS="$ac_save_LIBS"
4796
4797 fi
4798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4799   echo "$ac_t""yes" 1>&6
4800   
4801                                 ol_link_threads=posix
4802                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4803                                 if test $ol_with_yielding_select = auto ; then
4804                                         ol_with_yielding_select=yes
4805                                 fi
4806                                 
4807 else
4808   echo "$ac_t""no" 1>&6
4809 :
4810 fi
4811
4812                         LIBS="$save_LIBS"
4813                 fi
4814
4815                 if test $ol_link_threads = no ; then
4816                                                 save_LIBS="$LIBS"
4817                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4818 echo "configure:4819: checking for pthread_mutex_lock in -lpthread" >&5
4819 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4820 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   ac_save_LIBS="$LIBS"
4824 LIBS="-lpthread -lmach -lexc $LIBS"
4825 cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 /* Override any gcc2 internal prototype to avoid an error.  */
4829 /* We use char because int might match the return type of a gcc2
4830     builtin and then its argument prototype would still apply.  */
4831 char pthread_mutex_lock();
4832
4833 int main() {
4834 pthread_mutex_lock()
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838   rm -rf conftest*
4839   eval "ac_cv_lib_$ac_lib_var=yes"
4840 else
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843   rm -rf conftest*
4844   eval "ac_cv_lib_$ac_lib_var=no"
4845 fi
4846 rm -f conftest*
4847 LIBS="$ac_save_LIBS"
4848
4849 fi
4850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4851   echo "$ac_t""yes" 1>&6
4852   
4853                                 ol_link_threads=posix
4854                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
4855                                 if test $ol_with_yielding_select = auto ; then
4856                                         ol_with_yielding_select=yes
4857                                 fi
4858                                 
4859 else
4860   echo "$ac_t""no" 1>&6
4861 :
4862 fi
4863
4864                         LIBS="$save_LIBS"
4865                 fi
4866
4867                 if test $ol_link_threads = no ; then
4868                                                 save_LIBS="$LIBS"
4869                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
4870 echo "configure:4871: checking for pthread_mutex_trylock in -lpthread" >&5
4871 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4872 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4873   echo $ac_n "(cached) $ac_c" 1>&6
4874 else
4875   ac_save_LIBS="$LIBS"
4876 LIBS="-lpthread -lexc $LIBS"
4877 cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 /* Override any gcc2 internal prototype to avoid an error.  */
4881 /* We use char because int might match the return type of a gcc2
4882     builtin and then its argument prototype would still apply.  */
4883 char pthread_mutex_trylock();
4884
4885 int main() {
4886 pthread_mutex_trylock()
4887 ; return 0; }
4888 EOF
4889 if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4890   rm -rf conftest*
4891   eval "ac_cv_lib_$ac_lib_var=yes"
4892 else
4893   echo "configure: failed program was:" >&5
4894   cat conftest.$ac_ext >&5
4895   rm -rf conftest*
4896   eval "ac_cv_lib_$ac_lib_var=no"
4897 fi
4898 rm -f conftest*
4899 LIBS="$ac_save_LIBS"
4900
4901 fi
4902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4903   echo "$ac_t""yes" 1>&6
4904   
4905                                 ol_link_threads=posix
4906                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4907                                 if test $ol_with_yielding_select = auto ; then
4908                                         ol_with_yielding_select=yes
4909                                 fi
4910                                 
4911 else
4912   echo "$ac_t""no" 1>&6
4913 :
4914 fi
4915
4916                         LIBS="$save_LIBS"
4917                 fi
4918
4919                 if test $ol_link_threads = no ; then
4920                                                 save_LIBS="$LIBS"
4921                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4922 echo "configure:4923: checking for pthread_create in -lpthread" >&5
4923 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4925   echo $ac_n "(cached) $ac_c" 1>&6
4926 else
4927   ac_save_LIBS="$LIBS"
4928 LIBS="-lpthread  $LIBS"
4929 cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932 /* Override any gcc2 internal prototype to avoid an error.  */
4933 /* We use char because int might match the return type of a gcc2
4934     builtin and then its argument prototype would still apply.  */
4935 char pthread_create();
4936
4937 int main() {
4938 pthread_create()
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=yes"
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=no"
4949 fi
4950 rm -f conftest*
4951 LIBS="$ac_save_LIBS"
4952
4953 fi
4954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4955   echo "$ac_t""yes" 1>&6
4956   
4957                                 ol_link_threads=posix
4958                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4959 else
4960   echo "$ac_t""no" 1>&6
4961 :
4962 fi
4963
4964                         LIBS="$save_LIBS"
4965                 fi
4966
4967                 if test $ol_link_threads = no ; then
4968                                                 save_LIBS="$LIBS"
4969                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
4970 echo "configure:4971: checking for pthread_create in -lc_r" >&5
4971 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4972 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4973   echo $ac_n "(cached) $ac_c" 1>&6
4974 else
4975   ac_save_LIBS="$LIBS"
4976 LIBS="-lc_r  $LIBS"
4977 cat > conftest.$ac_ext <<EOF
4978 #line 4979 "configure"
4979 #include "confdefs.h"
4980 /* Override any gcc2 internal prototype to avoid an error.  */
4981 /* We use char because int might match the return type of a gcc2
4982     builtin and then its argument prototype would still apply.  */
4983 char pthread_create();
4984
4985 int main() {
4986 pthread_create()
4987 ; return 0; }
4988 EOF
4989 if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4990   rm -rf conftest*
4991   eval "ac_cv_lib_$ac_lib_var=yes"
4992 else
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -rf conftest*
4996   eval "ac_cv_lib_$ac_lib_var=no"
4997 fi
4998 rm -f conftest*
4999 LIBS="$ac_save_LIBS"
5000
5001 fi
5002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5003   echo "$ac_t""yes" 1>&6
5004   
5005                                 ol_link_threads=posix
5006                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
5007 else
5008   echo "$ac_t""no" 1>&6
5009 :
5010 fi
5011
5012                         LIBS="$save_LIBS"
5013                 fi
5014
5015                 if test $ol_link_threads = no ; then
5016                                                 save_LIBS="$LIBS"
5017                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5018 echo "configure:5019: checking for pthread_create in -lpthreads" >&5
5019 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
5020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5021   echo $ac_n "(cached) $ac_c" 1>&6
5022 else
5023   ac_save_LIBS="$LIBS"
5024 LIBS="-lpthreads  $LIBS"
5025 cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028 /* Override any gcc2 internal prototype to avoid an error.  */
5029 /* We use char because int might match the return type of a gcc2
5030     builtin and then its argument prototype would still apply.  */
5031 char pthread_create();
5032
5033 int main() {
5034 pthread_create()
5035 ; return 0; }
5036 EOF
5037 if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5038   rm -rf conftest*
5039   eval "ac_cv_lib_$ac_lib_var=yes"
5040 else
5041   echo "configure: failed program was:" >&5
5042   cat conftest.$ac_ext >&5
5043   rm -rf conftest*
5044   eval "ac_cv_lib_$ac_lib_var=no"
5045 fi
5046 rm -f conftest*
5047 LIBS="$ac_save_LIBS"
5048
5049 fi
5050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5051   echo "$ac_t""yes" 1>&6
5052   
5053                                 ol_link_threads=posix
5054                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5055 else
5056   echo "$ac_t""no" 1>&6
5057 :
5058 fi
5059
5060                         LIBS="$save_LIBS"
5061                 fi
5062
5063                                 if test $ol_link_threads = no ; then
5064                                                 save_LIBS="$LIBS"
5065                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
5066 echo "configure:5067: checking for pthread_join in -lpthreads" >&5
5067 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
5068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071   ac_save_LIBS="$LIBS"
5072 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076 /* Override any gcc2 internal prototype to avoid an error.  */
5077 /* We use char because int might match the return type of a gcc2
5078     builtin and then its argument prototype would still apply.  */
5079 char pthread_join();
5080
5081 int main() {
5082 pthread_join()
5083 ; return 0; }
5084 EOF
5085 if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5086   rm -rf conftest*
5087   eval "ac_cv_lib_$ac_lib_var=yes"
5088 else
5089   echo "configure: failed program was:" >&5
5090   cat conftest.$ac_ext >&5
5091   rm -rf conftest*
5092   eval "ac_cv_lib_$ac_lib_var=no"
5093 fi
5094 rm -f conftest*
5095 LIBS="$ac_save_LIBS"
5096
5097 fi
5098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5099   echo "$ac_t""yes" 1>&6
5100   
5101                                 ol_link_threads=posix
5102                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5103                                 
5104 else
5105   echo "$ac_t""no" 1>&6
5106 :
5107 fi
5108
5109                         LIBS="$save_LIBS"
5110                 fi
5111
5112                 if test $ol_link_threads = no ; then
5113                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
5114 echo "configure:5115: checking for pthread_create with -threads" >&5
5115 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
5116   echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118   
5119                                                                 save_LIBS="$LIBS"
5120                                 LIBS="-threads $LIBS"
5121                                 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 char pthread_create();
5125 int main() {
5126
5127                                         pthread_create();
5128                                         
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5132   rm -rf conftest*
5133   ol_cv_thread_flag=yes
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   ol_cv_thread_flag=no
5139 fi
5140 rm -f conftest*
5141                                                                 LIBS="$save_LIBS"
5142                         
5143 fi
5144
5145 echo "$ac_t""$ol_cv_thread_flag" 1>&6
5146
5147                         if test $ol_cv_thread_flag = yes ; then
5148                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
5149                                 ol_link_threads=posix
5150                         fi
5151                 fi
5152
5153                 if test $ol_link_threads = no ; then
5154                                                 save_LIBS="$LIBS"
5155                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
5156 echo "configure:5157: checking for pthread_mutex_unlock in -lpthreads" >&5
5157 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
5158 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5159   echo $ac_n "(cached) $ac_c" 1>&6
5160 else
5161   ac_save_LIBS="$LIBS"
5162 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5163 cat > conftest.$ac_ext <<EOF
5164 #line 5165 "configure"
5165 #include "confdefs.h"
5166 /* Override any gcc2 internal prototype to avoid an error.  */
5167 /* We use char because int might match the return type of a gcc2
5168     builtin and then its argument prototype would still apply.  */
5169 char pthread_mutex_unlock();
5170
5171 int main() {
5172 pthread_mutex_unlock()
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=yes"
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181   rm -rf conftest*
5182   eval "ac_cv_lib_$ac_lib_var=no"
5183 fi
5184 rm -f conftest*
5185 LIBS="$ac_save_LIBS"
5186
5187 fi
5188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5189   echo "$ac_t""yes" 1>&6
5190   
5191                                 ol_link_threads=posix
5192                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
5193                                 if test $ol_with_yielding_select = auto ; then
5194                                         ol_with_yielding_select=yes
5195                                 fi
5196                                 
5197 else
5198   echo "$ac_t""no" 1>&6
5199 :
5200 fi
5201
5202                         LIBS="$save_LIBS"
5203                 fi
5204
5205                 if test $ol_link_threads = no ; then
5206                                                 save_LIBS="$LIBS"
5207                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
5208 echo "configure:5209: checking for pthread_mutex_lock in -lpthreads" >&5
5209 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
5210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213   ac_save_LIBS="$LIBS"
5214 LIBS="-lpthreads -lmach -lexc $LIBS"
5215 cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 /* Override any gcc2 internal prototype to avoid an error.  */
5219 /* We use char because int might match the return type of a gcc2
5220     builtin and then its argument prototype would still apply.  */
5221 char pthread_mutex_lock();
5222
5223 int main() {
5224 pthread_mutex_lock()
5225 ; return 0; }
5226 EOF
5227 if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=yes"
5230 else
5231   echo "configure: failed program was:" >&5
5232   cat conftest.$ac_ext >&5
5233   rm -rf conftest*
5234   eval "ac_cv_lib_$ac_lib_var=no"
5235 fi
5236 rm -f conftest*
5237 LIBS="$ac_save_LIBS"
5238
5239 fi
5240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5241   echo "$ac_t""yes" 1>&6
5242   
5243                                 ol_link_threads=posix
5244                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
5245                                 if test $ol_with_yielding_select = auto ; then
5246                                         ol_with_yielding_select=yes
5247                                 fi
5248                                 
5249 else
5250   echo "$ac_t""no" 1>&6
5251 :
5252 fi
5253
5254                         LIBS="$save_LIBS"
5255                 fi
5256
5257                 if test $ol_link_threads = no ; then
5258                                                 save_LIBS="$LIBS"
5259                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
5260 echo "configure:5261: checking for pthread_mutex_trylock in -lpthreads" >&5
5261 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5262 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5263   echo $ac_n "(cached) $ac_c" 1>&6
5264 else
5265   ac_save_LIBS="$LIBS"
5266 LIBS="-lpthreads -lexc $LIBS"
5267 cat > conftest.$ac_ext <<EOF
5268 #line 5269 "configure"
5269 #include "confdefs.h"
5270 /* Override any gcc2 internal prototype to avoid an error.  */
5271 /* We use char because int might match the return type of a gcc2
5272     builtin and then its argument prototype would still apply.  */
5273 char pthread_mutex_trylock();
5274
5275 int main() {
5276 pthread_mutex_trylock()
5277 ; return 0; }
5278 EOF
5279 if { (eval echo configure:5280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5280   rm -rf conftest*
5281   eval "ac_cv_lib_$ac_lib_var=yes"
5282 else
5283   echo "configure: failed program was:" >&5
5284   cat conftest.$ac_ext >&5
5285   rm -rf conftest*
5286   eval "ac_cv_lib_$ac_lib_var=no"
5287 fi
5288 rm -f conftest*
5289 LIBS="$ac_save_LIBS"
5290
5291 fi
5292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5293   echo "$ac_t""yes" 1>&6
5294   
5295                                 ol_link_threads=posix
5296                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
5297                                 if test $ol_with_yielding_select = auto ; then
5298                                         ol_with_yielding_select=yes
5299                                 fi
5300                                 
5301 else
5302   echo "$ac_t""no" 1>&6
5303 :
5304 fi
5305
5306                         LIBS="$save_LIBS"
5307                 fi
5308
5309                 if test $ol_link_threads != no ; then
5310                         cat >> confdefs.h <<\EOF
5311 #define HAVE_PTHREADS 1
5312 EOF
5313
5314
5315                                                 save_CPPFLAGS="$CPPFLAGS"
5316                         save_LIBS="$LIBS"
5317                         LIBS="$LTHREAD_LIBS $LIBS"
5318
5319                                                                                                 for ac_func in sched_yield pthread_yield
5320 do
5321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5322 echo "configure:5323: checking for $ac_func" >&5
5323 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5324   echo $ac_n "(cached) $ac_c" 1>&6
5325 else
5326   cat > conftest.$ac_ext <<EOF
5327 #line 5328 "configure"
5328 #include "confdefs.h"
5329 /* System header to define __stub macros and hopefully few prototypes,
5330     which can conflict with char $ac_func(); below.  */
5331 #include <assert.h>
5332 /* Override any gcc2 internal prototype to avoid an error.  */
5333 /* We use char because int might match the return type of a gcc2
5334     builtin and then its argument prototype would still apply.  */
5335 char $ac_func();
5336
5337 int main() {
5338
5339 /* The GNU C library defines this for functions which it implements
5340     to always fail with ENOSYS.  Some functions are actually named
5341     something starting with __ and the normal name is an alias.  */
5342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5343 choke me
5344 #else
5345 $ac_func();
5346 #endif
5347
5348 ; return 0; }
5349 EOF
5350 if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351   rm -rf conftest*
5352   eval "ac_cv_func_$ac_func=yes"
5353 else
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_func_$ac_func=no"
5358 fi
5359 rm -f conftest*
5360 fi
5361
5362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5363   echo "$ac_t""yes" 1>&6
5364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5365   cat >> confdefs.h <<EOF
5366 #define $ac_tr_func 1
5367 EOF
5368  
5369 else
5370   echo "$ac_t""no" 1>&6
5371 fi
5372 done
5373
5374
5375                         if test $ac_cv_func_sched_yield = no -a \
5376                                 $ac_cv_func_pthread_yield = no ; then
5377                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5378 echo "configure:5379: checking for sched_yield in -lrt" >&5
5379 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5380 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5381   echo $ac_n "(cached) $ac_c" 1>&6
5382 else
5383   ac_save_LIBS="$LIBS"
5384 LIBS="-lrt  $LIBS"
5385 cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* Override any gcc2 internal prototype to avoid an error.  */
5389 /* We use char because int might match the return type of a gcc2
5390     builtin and then its argument prototype would still apply.  */
5391 char sched_yield();
5392
5393 int main() {
5394 sched_yield()
5395 ; return 0; }
5396 EOF
5397 if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5398   rm -rf conftest*
5399   eval "ac_cv_lib_$ac_lib_var=yes"
5400 else
5401   echo "configure: failed program was:" >&5
5402   cat conftest.$ac_ext >&5
5403   rm -rf conftest*
5404   eval "ac_cv_lib_$ac_lib_var=no"
5405 fi
5406 rm -f conftest*
5407 LIBS="$ac_save_LIBS"
5408
5409 fi
5410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5411   echo "$ac_t""yes" 1>&6
5412   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5413                                         cat >> confdefs.h <<\EOF
5414 #define HAVE_SCHED_YIELD 1
5415 EOF
5416
5417                                         ac_cv_func_sched_yield=yes
5418 else
5419   echo "$ac_t""no" 1>&6
5420 ac_cv_func_sched_yield=no
5421 fi
5422
5423                         fi
5424                         if test $ac_cv_func_sched_yield = no -a \
5425                                 $ac_cv_func_pthread_yield = no ; then
5426                                                                                                 for ac_func in thr_yield
5427 do
5428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5429 echo "configure:5430: checking for $ac_func" >&5
5430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5431   echo $ac_n "(cached) $ac_c" 1>&6
5432 else
5433   cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* System header to define __stub macros and hopefully few prototypes,
5437     which can conflict with char $ac_func(); below.  */
5438 #include <assert.h>
5439 /* Override any gcc2 internal prototype to avoid an error.  */
5440 /* We use char because int might match the return type of a gcc2
5441     builtin and then its argument prototype would still apply.  */
5442 char $ac_func();
5443
5444 int main() {
5445
5446 /* The GNU C library defines this for functions which it implements
5447     to always fail with ENOSYS.  Some functions are actually named
5448     something starting with __ and the normal name is an alias.  */
5449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5450 choke me
5451 #else
5452 $ac_func();
5453 #endif
5454
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5458   rm -rf conftest*
5459   eval "ac_cv_func_$ac_func=yes"
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=no"
5465 fi
5466 rm -f conftest*
5467 fi
5468
5469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5470   echo "$ac_t""yes" 1>&6
5471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5472   cat >> confdefs.h <<EOF
5473 #define $ac_tr_func 1
5474 EOF
5475  
5476 else
5477   echo "$ac_t""no" 1>&6
5478 fi
5479 done
5480
5481                         fi
5482                         if test $ac_cv_func_sched_yield = no -a \
5483                                 $ac_cv_func_pthread_yield = no -a \
5484                                 "$ac_cv_func_thr_yield" = no ; then
5485                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5486                         fi
5487
5488                                                 for ac_func in pthread_kill
5489 do
5490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5491 echo "configure:5492: checking for $ac_func" >&5
5492 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5493   echo $ac_n "(cached) $ac_c" 1>&6
5494 else
5495   cat > conftest.$ac_ext <<EOF
5496 #line 5497 "configure"
5497 #include "confdefs.h"
5498 /* System header to define __stub macros and hopefully few prototypes,
5499     which can conflict with char $ac_func(); below.  */
5500 #include <assert.h>
5501 /* Override any gcc2 internal prototype to avoid an error.  */
5502 /* We use char because int might match the return type of a gcc2
5503     builtin and then its argument prototype would still apply.  */
5504 char $ac_func();
5505
5506 int main() {
5507
5508 /* The GNU C library defines this for functions which it implements
5509     to always fail with ENOSYS.  Some functions are actually named
5510     something starting with __ and the normal name is an alias.  */
5511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5512 choke me
5513 #else
5514 $ac_func();
5515 #endif
5516
5517 ; return 0; }
5518 EOF
5519 if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5520   rm -rf conftest*
5521   eval "ac_cv_func_$ac_func=yes"
5522 else
5523   echo "configure: failed program was:" >&5
5524   cat conftest.$ac_ext >&5
5525   rm -rf conftest*
5526   eval "ac_cv_func_$ac_func=no"
5527 fi
5528 rm -f conftest*
5529 fi
5530
5531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5532   echo "$ac_t""yes" 1>&6
5533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5534   cat >> confdefs.h <<EOF
5535 #define $ac_tr_func 1
5536 EOF
5537  
5538 else
5539   echo "$ac_t""no" 1>&6
5540 fi
5541 done
5542
5543
5544                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5545 echo "configure:5546: checking for pthread_detach with <pthread.h>" >&5
5546 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5547   echo $ac_n "(cached) $ac_c" 1>&6
5548 else
5549   
5550                                                                 cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553 #include <pthread.h>
5554 int main() {
5555 pthread_detach(NULL);
5556 ; return 0; }
5557 EOF
5558 if { (eval echo configure:5559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5559   rm -rf conftest*
5560   ol_cv_func_pthread_detach=yes
5561 else
5562   echo "configure: failed program was:" >&5
5563   cat conftest.$ac_ext >&5
5564   rm -rf conftest*
5565   ol_cv_func_pthread_detach=no
5566 fi
5567 rm -f conftest*
5568                         
5569 fi
5570
5571 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5572
5573                         if test $ol_cv_func_pthread_detach = no ; then
5574                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5575                         fi
5576
5577                         cat >> confdefs.h <<\EOF
5578 #define HAVE_PTHREAD_DETACH 1
5579 EOF
5580
5581
5582                                                 for ac_func in \
5583                                 pthread_setconcurrency \
5584                                 pthread_getconcurrency \
5585                                 thr_setconcurrency \
5586                                 thr_getconcurrency \
5587                         
5588 do
5589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5590 echo "configure:5591: checking for $ac_func" >&5
5591 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594   cat > conftest.$ac_ext <<EOF
5595 #line 5596 "configure"
5596 #include "confdefs.h"
5597 /* System header to define __stub macros and hopefully few prototypes,
5598     which can conflict with char $ac_func(); below.  */
5599 #include <assert.h>
5600 /* Override any gcc2 internal prototype to avoid an error.  */
5601 /* We use char because int might match the return type of a gcc2
5602     builtin and then its argument prototype would still apply.  */
5603 char $ac_func();
5604
5605 int main() {
5606
5607 /* The GNU C library defines this for functions which it implements
5608     to always fail with ENOSYS.  Some functions are actually named
5609     something starting with __ and the normal name is an alias.  */
5610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5611 choke me
5612 #else
5613 $ac_func();
5614 #endif
5615
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   eval "ac_cv_func_$ac_func=yes"
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   eval "ac_cv_func_$ac_func=no"
5626 fi
5627 rm -f conftest*
5628 fi
5629
5630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5633   cat >> confdefs.h <<EOF
5634 #define $ac_tr_func 1
5635 EOF
5636  
5637 else
5638   echo "$ac_t""no" 1>&6
5639 fi
5640 done
5641
5642
5643                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5644 echo "configure:5645: checking if pthread_create() works" >&5
5645                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   
5649                         if test "$cross_compiling" = yes; then
5650                                 ol_cv_pthread_create_works=yes
5651 else
5652   cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655
5656 #include <pthread.h>
5657 #ifndef NULL
5658 #define NULL (void*)0
5659 #endif
5660
5661 static void *task(p)
5662         void *p;
5663 {
5664         return (void *) (p == NULL);
5665 }
5666
5667 int main(argc, argv)
5668         int argc;
5669         char **argv;
5670 {
5671         pthread_t t;
5672 #if HAVE_PTHREADS_D4
5673         exit(pthread_create(&t, pthread_attr_default, task, NULL));
5674 #else
5675         exit(pthread_create(&t, NULL, task, NULL));
5676 #endif
5677 }
5678
5679 EOF
5680 if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5681 then
5682   ol_cv_pthread_create_works=yes
5683 else
5684   echo "configure: failed program was:" >&5
5685   cat conftest.$ac_ext >&5
5686   rm -fr conftest*
5687   ol_cv_pthread_create_works=no
5688 fi
5689 rm -fr conftest*
5690 fi
5691
5692 fi
5693
5694                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5695
5696                         if test $ol_cv_pthread_create_works = no ; then
5697                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
5698                         fi
5699
5700                                                 if test $ol_with_yielding_select = auto ; then
5701                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5702 echo "configure:5703: checking if select yields when using pthreads" >&5
5703                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5704   echo $ac_n "(cached) $ac_c" 1>&6
5705 else
5706   
5707                                 if test "$cross_compiling" = yes; then
5708   
5709                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5710 else
5711   cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714
5715 #include <sys/types.h>
5716 #include <sys/time.h>
5717 #include <unistd.h>
5718 #include <pthread.h>
5719 #ifndef NULL
5720 #define NULL (void*) 0
5721 #endif
5722
5723 static int fildes[2];
5724
5725 static void *task(p)
5726         void *p;
5727 {
5728         int i;
5729         struct timeval tv;
5730
5731         fd_set rfds;
5732
5733         tv.tv_sec=10;
5734         tv.tv_usec=0;
5735
5736         FD_ZERO(&rfds);
5737         FD_SET(fildes[0], &rfds);
5738
5739         /* we're not interested in any fds */
5740         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5741
5742         if(i < 0) {
5743                 perror("select");
5744                 exit(10);
5745         }
5746
5747         exit(0); /* if we exit here, the select blocked the whole process */
5748 }
5749
5750 int main(argc, argv)
5751         int argc;
5752         char **argv;
5753 {
5754         pthread_t t;
5755
5756         /* create a pipe to select */
5757         if(pipe(&fildes[0])) {
5758                 perror("select");
5759                 exit(1);
5760         }
5761
5762 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5763         (void) pthread_setconcurrency(2);
5764 #else
5765 #ifdef HAVE_THR_SETCONCURRENCY
5766         /* Set Solaris LWP concurrency to 2 */
5767         thr_setconcurrency(2);
5768 #endif
5769 #endif
5770
5771 #if HAVE_PTHREADS_D4
5772         pthread_create(&t, pthread_attr_default, task, NULL);
5773 #else
5774         pthread_create(&t, NULL, task, NULL);
5775 #endif
5776
5777 #if HAVE_SCHED_YIELD
5778         sched_yield();  /* make sure task runs first */
5779 #else
5780 #ifdef HAVE_PTHREAD_YIELD
5781         pthread_yield();        /* make sure task runs first */
5782 #endif
5783 #endif
5784
5785         exit(2);
5786 }
5787 EOF
5788 if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5789 then
5790   ol_cv_pthread_select_yields=no
5791 else
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -fr conftest*
5795   ol_cv_pthread_select_yields=yes
5796 fi
5797 rm -fr conftest*
5798 fi
5799
5800 fi
5801
5802                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5803
5804                                 if test $ol_cv_pthread_select_yields = yes ; then
5805                                         ol_with_yielding_select=yes
5806                                 fi
5807                         fi
5808
5809                                                 CPPFLAGS="$save_CPPFLAGS"
5810                         LIBS="$save_LIBS"
5811                 else
5812                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5813                 fi
5814         fi
5815
5816         if test $ol_with_threads = posix ; then
5817                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5818         fi
5819 fi
5820
5821 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5822         -o $ol_with_threads = mach ; then
5823
5824                 for ac_hdr in mach/cthreads.h
5825 do
5826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5828 echo "configure:5829: checking for $ac_hdr" >&5
5829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5830   echo $ac_n "(cached) $ac_c" 1>&6
5831 else
5832   cat > conftest.$ac_ext <<EOF
5833 #line 5834 "configure"
5834 #include "confdefs.h"
5835 #include <$ac_hdr>
5836 EOF
5837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5838 { (eval echo configure:5839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5840 if test -z "$ac_err"; then
5841   rm -rf conftest*
5842   eval "ac_cv_header_$ac_safe=yes"
5843 else
5844   echo "$ac_err" >&5
5845   echo "configure: failed program was:" >&5
5846   cat conftest.$ac_ext >&5
5847   rm -rf conftest*
5848   eval "ac_cv_header_$ac_safe=no"
5849 fi
5850 rm -f conftest*
5851 fi
5852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5853   echo "$ac_t""yes" 1>&6
5854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5855   cat >> confdefs.h <<EOF
5856 #define $ac_tr_hdr 1
5857 EOF
5858  
5859 else
5860   echo "$ac_t""no" 1>&6
5861 fi
5862 done
5863
5864         if test $ac_cv_header_mach_cthreads_h = yes ; then
5865                 ol_with_threads=found
5866
5867                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5868 echo "configure:5869: checking for cthread_fork" >&5
5869 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5870   echo $ac_n "(cached) $ac_c" 1>&6
5871 else
5872   cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 /* System header to define __stub macros and hopefully few prototypes,
5876     which can conflict with char cthread_fork(); below.  */
5877 #include <assert.h>
5878 /* Override any gcc2 internal prototype to avoid an error.  */
5879 /* We use char because int might match the return type of a gcc2
5880     builtin and then its argument prototype would still apply.  */
5881 char cthread_fork();
5882
5883 int main() {
5884
5885 /* The GNU C library defines this for functions which it implements
5886     to always fail with ENOSYS.  Some functions are actually named
5887     something starting with __ and the normal name is an alias.  */
5888 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5889 choke me
5890 #else
5891 cthread_fork();
5892 #endif
5893
5894 ; return 0; }
5895 EOF
5896 if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5897   rm -rf conftest*
5898   eval "ac_cv_func_cthread_fork=yes"
5899 else
5900   echo "configure: failed program was:" >&5
5901   cat conftest.$ac_ext >&5
5902   rm -rf conftest*
5903   eval "ac_cv_func_cthread_fork=no"
5904 fi
5905 rm -f conftest*
5906 fi
5907
5908 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5909   echo "$ac_t""yes" 1>&6
5910   ol_link_threads=yes
5911 else
5912   echo "$ac_t""no" 1>&6
5913 fi
5914
5915
5916                 if test $ol_link_threads = no ; then
5917                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5918 echo "configure:5919: checking for cthread_fork with -all_load" >&5
5919 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5920   echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922   
5923                                                                 save_LIBS="$LIBS"
5924                                 LIBS="-all_load $LIBS"
5925                                 cat > conftest.$ac_ext <<EOF
5926 #line 5927 "configure"
5927 #include "confdefs.h"
5928 #include <mach/cthreads.h>
5929 int main() {
5930
5931                                         cthread_fork((void *)0, (void *)0);
5932                                         
5933 ; return 0; }
5934 EOF
5935 if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5936   rm -rf conftest*
5937   ol_cv_cthread_all_load=yes
5938 else
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   ol_cv_cthread_all_load=no
5943 fi
5944 rm -f conftest*
5945                                                                 LIBS="$save_LIBS"
5946                         
5947 fi
5948
5949 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5950
5951                         if test $ol_cv_cthread_all_load = yes ; then
5952                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5953                                 ol_link_threads=mach
5954                         fi
5955                 fi
5956
5957                 if test $ol_link_threads != no ; then
5958                         : check for cthread specific functionality here
5959                         cat >> confdefs.h <<\EOF
5960 #define HAVE_MACH_CTHREADS 1
5961 EOF
5962
5963                 else
5964                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
5965                 fi
5966         fi
5967
5968         if test $ol_with_threads = mach ; then
5969                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
5970         fi
5971 fi
5972
5973 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5974         -o $ol_with_threads = lwp ; then
5975
5976                 for ac_hdr in thread.h synch.h
5977 do
5978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5980 echo "configure:5981: checking for $ac_hdr" >&5
5981 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5982   echo $ac_n "(cached) $ac_c" 1>&6
5983 else
5984   cat > conftest.$ac_ext <<EOF
5985 #line 5986 "configure"
5986 #include "confdefs.h"
5987 #include <$ac_hdr>
5988 EOF
5989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5990 { (eval echo configure:5991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5992 if test -z "$ac_err"; then
5993   rm -rf conftest*
5994   eval "ac_cv_header_$ac_safe=yes"
5995 else
5996   echo "$ac_err" >&5
5997   echo "configure: failed program was:" >&5
5998   cat conftest.$ac_ext >&5
5999   rm -rf conftest*
6000   eval "ac_cv_header_$ac_safe=no"
6001 fi
6002 rm -f conftest*
6003 fi
6004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6005   echo "$ac_t""yes" 1>&6
6006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6007   cat >> confdefs.h <<EOF
6008 #define $ac_tr_hdr 1
6009 EOF
6010  
6011 else
6012   echo "$ac_t""no" 1>&6
6013 fi
6014 done
6015
6016         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6017                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6018 echo "configure:6019: checking for thr_create in -lthread" >&5
6019 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6021   echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023   ac_save_LIBS="$LIBS"
6024 LIBS="-lthread  $LIBS"
6025 cat > conftest.$ac_ext <<EOF
6026 #line 6027 "configure"
6027 #include "confdefs.h"
6028 /* Override any gcc2 internal prototype to avoid an error.  */
6029 /* We use char because int might match the return type of a gcc2
6030     builtin and then its argument prototype would still apply.  */
6031 char thr_create();
6032
6033 int main() {
6034 thr_create()
6035 ; return 0; }
6036 EOF
6037 if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6038   rm -rf conftest*
6039   eval "ac_cv_lib_$ac_lib_var=yes"
6040 else
6041   echo "configure: failed program was:" >&5
6042   cat conftest.$ac_ext >&5
6043   rm -rf conftest*
6044   eval "ac_cv_lib_$ac_lib_var=no"
6045 fi
6046 rm -f conftest*
6047 LIBS="$ac_save_LIBS"
6048
6049 fi
6050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6051   echo "$ac_t""yes" 1>&6
6052   have_thr=yes
6053 else
6054   echo "$ac_t""no" 1>&6
6055 have_thr=no
6056 fi
6057
6058
6059                 if test $have_thr = yes ; then
6060                         cat >> confdefs.h <<\EOF
6061 #define HAVE_THR 1
6062 EOF
6063
6064                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6065                         ol_link_threads=thr
6066
6067                         if test $ol_with_yielding_select = auto ; then
6068                                 ol_with_yielding_select=yes
6069                         fi
6070
6071                                                 for ac_func in \
6072                                 thr_setconcurrency \
6073                                 thr_getconcurrency \
6074                         
6075 do
6076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6077 echo "configure:6078: checking for $ac_func" >&5
6078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6079   echo $ac_n "(cached) $ac_c" 1>&6
6080 else
6081   cat > conftest.$ac_ext <<EOF
6082 #line 6083 "configure"
6083 #include "confdefs.h"
6084 /* System header to define __stub macros and hopefully few prototypes,
6085     which can conflict with char $ac_func(); below.  */
6086 #include <assert.h>
6087 /* Override any gcc2 internal prototype to avoid an error.  */
6088 /* We use char because int might match the return type of a gcc2
6089     builtin and then its argument prototype would still apply.  */
6090 char $ac_func();
6091
6092 int main() {
6093
6094 /* The GNU C library defines this for functions which it implements
6095     to always fail with ENOSYS.  Some functions are actually named
6096     something starting with __ and the normal name is an alias.  */
6097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6098 choke me
6099 #else
6100 $ac_func();
6101 #endif
6102
6103 ; return 0; }
6104 EOF
6105 if { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6106   rm -rf conftest*
6107   eval "ac_cv_func_$ac_func=yes"
6108 else
6109   echo "configure: failed program was:" >&5
6110   cat conftest.$ac_ext >&5
6111   rm -rf conftest*
6112   eval "ac_cv_func_$ac_func=no"
6113 fi
6114 rm -f conftest*
6115 fi
6116
6117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6118   echo "$ac_t""yes" 1>&6
6119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6120   cat >> confdefs.h <<EOF
6121 #define $ac_tr_func 1
6122 EOF
6123  
6124 else
6125   echo "$ac_t""no" 1>&6
6126 fi
6127 done
6128
6129                 fi
6130         fi
6131
6132                 for ac_hdr in lwp/lwp.h
6133 do
6134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6136 echo "configure:6137: checking for $ac_hdr" >&5
6137 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6138   echo $ac_n "(cached) $ac_c" 1>&6
6139 else
6140   cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143 #include <$ac_hdr>
6144 EOF
6145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6146 { (eval echo configure:6147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6148 if test -z "$ac_err"; then
6149   rm -rf conftest*
6150   eval "ac_cv_header_$ac_safe=yes"
6151 else
6152   echo "$ac_err" >&5
6153   echo "configure: failed program was:" >&5
6154   cat conftest.$ac_ext >&5
6155   rm -rf conftest*
6156   eval "ac_cv_header_$ac_safe=no"
6157 fi
6158 rm -f conftest*
6159 fi
6160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6161   echo "$ac_t""yes" 1>&6
6162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6163   cat >> confdefs.h <<EOF
6164 #define $ac_tr_hdr 1
6165 EOF
6166  
6167 else
6168   echo "$ac_t""no" 1>&6
6169 fi
6170 done
6171
6172         if test $ac_cv_header_lwp_lwp_h = yes ; then
6173                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6174 echo "configure:6175: checking for lwp_create in -llwp" >&5
6175 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6176 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   ac_save_LIBS="$LIBS"
6180 LIBS="-llwp  $LIBS"
6181 cat > conftest.$ac_ext <<EOF
6182 #line 6183 "configure"
6183 #include "confdefs.h"
6184 /* Override any gcc2 internal prototype to avoid an error.  */
6185 /* We use char because int might match the return type of a gcc2
6186     builtin and then its argument prototype would still apply.  */
6187 char lwp_create();
6188
6189 int main() {
6190 lwp_create()
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   eval "ac_cv_lib_$ac_lib_var=yes"
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=no"
6201 fi
6202 rm -f conftest*
6203 LIBS="$ac_save_LIBS"
6204
6205 fi
6206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6207   echo "$ac_t""yes" 1>&6
6208   have_lwp=yes
6209 else
6210   echo "$ac_t""no" 1>&6
6211 have_lwp=no
6212 fi
6213
6214
6215                 if test $have_lwp = yes ; then
6216                         cat >> confdefs.h <<\EOF
6217 #define HAVE_LWP 1
6218 EOF
6219
6220                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6221                         ol_link_threads=lwp
6222
6223                         if test $ol_with_yielding_select = auto ; then
6224                                 ol_with_yielding_select=no
6225                         fi
6226                 fi
6227         fi
6228 fi
6229
6230 if test $ol_with_yielding_select = yes ; then
6231         cat >> confdefs.h <<\EOF
6232 #define HAVE_YIELDING_SELECT 1
6233 EOF
6234
6235 fi
6236
6237 if test $ol_with_threads = manual ; then
6238                 ol_link_threads=yes
6239
6240         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6241
6242         for ac_hdr in pthread.h sched.h
6243 do
6244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6246 echo "configure:6247: checking for $ac_hdr" >&5
6247 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6248   echo $ac_n "(cached) $ac_c" 1>&6
6249 else
6250   cat > conftest.$ac_ext <<EOF
6251 #line 6252 "configure"
6252 #include "confdefs.h"
6253 #include <$ac_hdr>
6254 EOF
6255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6256 { (eval echo configure:6257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6258 if test -z "$ac_err"; then
6259   rm -rf conftest*
6260   eval "ac_cv_header_$ac_safe=yes"
6261 else
6262   echo "$ac_err" >&5
6263   echo "configure: failed program was:" >&5
6264   cat conftest.$ac_ext >&5
6265   rm -rf conftest*
6266   eval "ac_cv_header_$ac_safe=no"
6267 fi
6268 rm -f conftest*
6269 fi
6270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6271   echo "$ac_t""yes" 1>&6
6272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6273   cat >> confdefs.h <<EOF
6274 #define $ac_tr_hdr 1
6275 EOF
6276  
6277 else
6278   echo "$ac_t""no" 1>&6
6279 fi
6280 done
6281
6282         for ac_func in sched_yield pthread_yield
6283 do
6284 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6285 echo "configure:6286: checking for $ac_func" >&5
6286 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6287   echo $ac_n "(cached) $ac_c" 1>&6
6288 else
6289   cat > conftest.$ac_ext <<EOF
6290 #line 6291 "configure"
6291 #include "confdefs.h"
6292 /* System header to define __stub macros and hopefully few prototypes,
6293     which can conflict with char $ac_func(); below.  */
6294 #include <assert.h>
6295 /* Override any gcc2 internal prototype to avoid an error.  */
6296 /* We use char because int might match the return type of a gcc2
6297     builtin and then its argument prototype would still apply.  */
6298 char $ac_func();
6299
6300 int main() {
6301
6302 /* The GNU C library defines this for functions which it implements
6303     to always fail with ENOSYS.  Some functions are actually named
6304     something starting with __ and the normal name is an alias.  */
6305 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6306 choke me
6307 #else
6308 $ac_func();
6309 #endif
6310
6311 ; return 0; }
6312 EOF
6313 if { (eval echo configure:6314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6314   rm -rf conftest*
6315   eval "ac_cv_func_$ac_func=yes"
6316 else
6317   echo "configure: failed program was:" >&5
6318   cat conftest.$ac_ext >&5
6319   rm -rf conftest*
6320   eval "ac_cv_func_$ac_func=no"
6321 fi
6322 rm -f conftest*
6323 fi
6324
6325 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6326   echo "$ac_t""yes" 1>&6
6327     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6328   cat >> confdefs.h <<EOF
6329 #define $ac_tr_func 1
6330 EOF
6331  
6332 else
6333   echo "$ac_t""no" 1>&6
6334 fi
6335 done
6336
6337         
6338 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
6339 echo "configure:6340: checking for LinuxThreads" >&5
6340 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6341   echo $ac_n "(cached) $ac_c" 1>&6
6342 else
6343   
6344         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
6345         if test "$res" -gt 0 ; then
6346                 ol_cv_linux_threads=yes
6347         else
6348                 ol_cv_linux_threads=no
6349         fi
6350
6351 fi
6352
6353 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6354
6355
6356         for ac_hdr in mach/cthreads.h
6357 do
6358 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6359 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6360 echo "configure:6361: checking for $ac_hdr" >&5
6361 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6362   echo $ac_n "(cached) $ac_c" 1>&6
6363 else
6364   cat > conftest.$ac_ext <<EOF
6365 #line 6366 "configure"
6366 #include "confdefs.h"
6367 #include <$ac_hdr>
6368 EOF
6369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6370 { (eval echo configure:6371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6372 if test -z "$ac_err"; then
6373   rm -rf conftest*
6374   eval "ac_cv_header_$ac_safe=yes"
6375 else
6376   echo "$ac_err" >&5
6377   echo "configure: failed program was:" >&5
6378   cat conftest.$ac_ext >&5
6379   rm -rf conftest*
6380   eval "ac_cv_header_$ac_safe=no"
6381 fi
6382 rm -f conftest*
6383 fi
6384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6385   echo "$ac_t""yes" 1>&6
6386     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6387   cat >> confdefs.h <<EOF
6388 #define $ac_tr_hdr 1
6389 EOF
6390  
6391 else
6392   echo "$ac_t""no" 1>&6
6393 fi
6394 done
6395
6396         for ac_hdr in lwp/lwp.h
6397 do
6398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6400 echo "configure:6401: checking for $ac_hdr" >&5
6401 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6402   echo $ac_n "(cached) $ac_c" 1>&6
6403 else
6404   cat > conftest.$ac_ext <<EOF
6405 #line 6406 "configure"
6406 #include "confdefs.h"
6407 #include <$ac_hdr>
6408 EOF
6409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6410 { (eval echo configure:6411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6412 if test -z "$ac_err"; then
6413   rm -rf conftest*
6414   eval "ac_cv_header_$ac_safe=yes"
6415 else
6416   echo "$ac_err" >&5
6417   echo "configure: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   rm -rf conftest*
6420   eval "ac_cv_header_$ac_safe=no"
6421 fi
6422 rm -f conftest*
6423 fi
6424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6425   echo "$ac_t""yes" 1>&6
6426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6427   cat >> confdefs.h <<EOF
6428 #define $ac_tr_hdr 1
6429 EOF
6430  
6431 else
6432   echo "$ac_t""no" 1>&6
6433 fi
6434 done
6435
6436         for ac_hdr in thread.h synch.h
6437 do
6438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6440 echo "configure:6441: checking for $ac_hdr" >&5
6441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 #include <$ac_hdr>
6448 EOF
6449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6450 { (eval echo configure:6451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6452 if test -z "$ac_err"; then
6453   rm -rf conftest*
6454   eval "ac_cv_header_$ac_safe=yes"
6455 else
6456   echo "$ac_err" >&5
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -rf conftest*
6460   eval "ac_cv_header_$ac_safe=no"
6461 fi
6462 rm -f conftest*
6463 fi
6464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6465   echo "$ac_t""yes" 1>&6
6466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6467   cat >> confdefs.h <<EOF
6468 #define $ac_tr_hdr 1
6469 EOF
6470  
6471 else
6472   echo "$ac_t""no" 1>&6
6473 fi
6474 done
6475
6476 fi
6477
6478 if test $ol_link_threads != no ; then  
6479                         cat >> confdefs.h <<\EOF
6480 #define REENTRANT 1
6481 EOF
6482
6483         cat >> confdefs.h <<\EOF
6484 #define _REENTRANT 1
6485 EOF
6486
6487         cat >> confdefs.h <<\EOF
6488 #define THREAD_SAFE 1
6489 EOF
6490
6491         cat >> confdefs.h <<\EOF
6492 #define _THREAD_SAFE 1
6493 EOF
6494
6495         cat >> confdefs.h <<\EOF
6496 #define THREADSAFE 1
6497 EOF
6498
6499         cat >> confdefs.h <<\EOF
6500 #define _THREADSAFE 1
6501 EOF
6502
6503
6504                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6505 echo "configure:6506: checking for thread specific errno" >&5
6506 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6507   echo $ac_n "(cached) $ac_c" 1>&6
6508 else
6509   
6510                 cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513 #include <errno.h>
6514 int main() {
6515 int x = errno;
6516 ; return 0; }
6517 EOF
6518 if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6519   rm -rf conftest*
6520   ol_cv_errno_thread_specific=yes
6521 else
6522   echo "configure: failed program was:" >&5
6523   cat conftest.$ac_ext >&5
6524   rm -rf conftest*
6525   ol_cv_errno_thread_specific=no
6526 fi
6527 rm -f conftest*
6528         
6529 fi
6530
6531 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
6532
6533         if test $ol_cv_errno_thread_specific != yes ; then
6534                 LIBS="$LTHREAD_LIBS $LIBS"
6535                 LTHREAD_LIBS=""
6536         fi
6537
6538 fi  
6539
6540 if test $ol_link_threads = no ; then
6541         if test $ol_with_threads = yes ; then
6542                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
6543         fi
6544
6545         if test $ol_with_threads = auto ; then
6546                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
6547                 ol_with_threads=no
6548         fi
6549
6550         cat >> confdefs.h <<\EOF
6551 #define NO_THREADS 1
6552 EOF
6553
6554         LTHREAD_LIBS=""
6555 fi
6556
6557 if test $ol_link_threads != no ; then
6558         cat >> confdefs.h <<\EOF
6559 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
6560 EOF
6561
6562 fi
6563
6564
6565 ol_link_ldbm=no 
6566 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
6567         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
6568 echo "configure:6569: checking for DB2 library" >&5
6569 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
6570   echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572         ol_LIBS="$LIBS"
6573         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
6574 echo "configure:6575: checking for db_open in -ldb" >&5
6575 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
6576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6577   echo $ac_n "(cached) $ac_c" 1>&6
6578 else
6579   ac_save_LIBS="$LIBS"
6580 LIBS="-ldb  $LIBS"
6581 cat > conftest.$ac_ext <<EOF
6582 #line 6583 "configure"
6583 #include "confdefs.h"
6584 /* Override any gcc2 internal prototype to avoid an error.  */
6585 /* We use char because int might match the return type of a gcc2
6586     builtin and then its argument prototype would still apply.  */
6587 char db_open();
6588
6589 int main() {
6590 db_open()
6591 ; return 0; }
6592 EOF
6593 if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6594   rm -rf conftest*
6595   eval "ac_cv_lib_$ac_lib_var=yes"
6596 else
6597   echo "configure: failed program was:" >&5
6598   cat conftest.$ac_ext >&5
6599   rm -rf conftest*
6600   eval "ac_cv_lib_$ac_lib_var=no"
6601 fi
6602 rm -f conftest*
6603 LIBS="$ac_save_LIBS"
6604
6605 fi
6606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6607   echo "$ac_t""yes" 1>&6
6608   ol_cv_lib_db2=-ldb
6609 else
6610   echo "$ac_t""no" 1>&6
6611 ol_cv_lib_db2=no
6612 fi
6613
6614         LIBS="$ol_LIBS"
6615
6616 fi
6617
6618 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6619
6620 for ac_hdr in db.h
6621 do
6622 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6623 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6624 echo "configure:6625: checking for $ac_hdr" >&5
6625 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6626   echo $ac_n "(cached) $ac_c" 1>&6
6627 else
6628   cat > conftest.$ac_ext <<EOF
6629 #line 6630 "configure"
6630 #include "confdefs.h"
6631 #include <$ac_hdr>
6632 EOF
6633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6634 { (eval echo configure:6635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6636 if test -z "$ac_err"; then
6637   rm -rf conftest*
6638   eval "ac_cv_header_$ac_safe=yes"
6639 else
6640   echo "$ac_err" >&5
6641   echo "configure: failed program was:" >&5
6642   cat conftest.$ac_ext >&5
6643   rm -rf conftest*
6644   eval "ac_cv_header_$ac_safe=no"
6645 fi
6646 rm -f conftest*
6647 fi
6648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6649   echo "$ac_t""yes" 1>&6
6650     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6651   cat >> confdefs.h <<EOF
6652 #define $ac_tr_hdr 1
6653 EOF
6654  
6655 else
6656   echo "$ac_t""no" 1>&6
6657 fi
6658 done
6659
6660 if test $ac_cv_header_db_h = yes ; then
6661         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6662 echo "configure:6663: checking if db.h is DB2" >&5
6663 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6664   echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666   
6667                 cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670
6671 #                       include <db.h>
6672                         /* this check could be improved */
6673 #                       ifdef DB_VERSION_MAJOR
6674 #                               if DB_VERSION_MAJOR == 2
6675                                         __db_version_2
6676 #                               endif
6677 #                       endif
6678                 
6679 EOF
6680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6681   egrep "__db_version_2" >/dev/null 2>&1; then
6682   rm -rf conftest*
6683   ol_cv_header_db2=yes
6684 else
6685   rm -rf conftest*
6686   ol_cv_header_db2=no
6687 fi
6688 rm -f conftest*
6689
6690 fi
6691
6692 echo "$ac_t""$ol_cv_header_db2" 1>&6
6693 else
6694         ol_cv_header_db2=no
6695 fi
6696
6697
6698  
6699  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6700 echo "configure:6701: checking for Berkeley DB2" >&5
6701 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   
6705         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6706                 ol_cv_berkeley_db2=no
6707         else
6708                 ol_cv_berkeley_db2=yes
6709         fi
6710
6711 fi
6712
6713 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6714  if test $ol_cv_berkeley_db2 = yes ; then
6715         cat >> confdefs.h <<\EOF
6716 #define HAVE_BERKELEY_DB2 1
6717 EOF
6718
6719  fi
6720
6721
6722         if test $ol_cv_berkeley_db2 = yes ; then
6723                 ol_link_ldbm=db2
6724                 ol_with_ldbm_api=db2
6725
6726                 if test $ol_with_ldbm_type = hash ; then
6727                         cat >> confdefs.h <<\EOF
6728 #define LDBM_USE_DBHASH 1
6729 EOF
6730
6731                 else
6732                         cat >> confdefs.h <<\EOF
6733 #define LDBM_USE_DBBTREE 1
6734 EOF
6735
6736                 fi
6737
6738                                                 if test $ol_cv_lib_db2 != yes ; then
6739                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6740                 fi
6741         fi
6742 fi
6743
6744 ol_link_bdb2=no
6745 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6746         ol_link_bdb2=yes
6747 fi
6748
6749 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6750         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6751 echo "configure:6752: checking for Berkeley DB library" >&5
6752 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755         ol_LIBS="$LIBS"
6756         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6757 echo "configure:6758: checking for dbopen" >&5
6758 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6759   echo $ac_n "(cached) $ac_c" 1>&6
6760 else
6761   cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 /* System header to define __stub macros and hopefully few prototypes,
6765     which can conflict with char dbopen(); below.  */
6766 #include <assert.h>
6767 /* Override any gcc2 internal prototype to avoid an error.  */
6768 /* We use char because int might match the return type of a gcc2
6769     builtin and then its argument prototype would still apply.  */
6770 char dbopen();
6771
6772 int main() {
6773
6774 /* The GNU C library defines this for functions which it implements
6775     to always fail with ENOSYS.  Some functions are actually named
6776     something starting with __ and the normal name is an alias.  */
6777 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6778 choke me
6779 #else
6780 dbopen();
6781 #endif
6782
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6786   rm -rf conftest*
6787   eval "ac_cv_func_dbopen=yes"
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -rf conftest*
6792   eval "ac_cv_func_dbopen=no"
6793 fi
6794 rm -f conftest*
6795 fi
6796
6797 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6798   echo "$ac_t""yes" 1>&6
6799   ol_cv_lib_db=yes
6800 else
6801   echo "$ac_t""no" 1>&6
6802
6803                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6804 echo "configure:6805: checking for dbopen in -ldb" >&5
6805 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   ac_save_LIBS="$LIBS"
6810 LIBS="-ldb  $LIBS"
6811 cat > conftest.$ac_ext <<EOF
6812 #line 6813 "configure"
6813 #include "confdefs.h"
6814 /* Override any gcc2 internal prototype to avoid an error.  */
6815 /* We use char because int might match the return type of a gcc2
6816     builtin and then its argument prototype would still apply.  */
6817 char dbopen();
6818
6819 int main() {
6820 dbopen()
6821 ; return 0; }
6822 EOF
6823 if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6824   rm -rf conftest*
6825   eval "ac_cv_lib_$ac_lib_var=yes"
6826 else
6827   echo "configure: failed program was:" >&5
6828   cat conftest.$ac_ext >&5
6829   rm -rf conftest*
6830   eval "ac_cv_lib_$ac_lib_var=no"
6831 fi
6832 rm -f conftest*
6833 LIBS="$ac_save_LIBS"
6834
6835 fi
6836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6837   echo "$ac_t""yes" 1>&6
6838   ol_cv_lib_db=-ldb
6839 else
6840   echo "$ac_t""no" 1>&6
6841 ol_cv_lib_db=no
6842 fi
6843
6844         
6845 fi
6846
6847         LIBS="$ol_LIBS"
6848
6849 fi
6850
6851 echo "$ac_t""$ol_cv_lib_db" 1>&6
6852
6853
6854 for ac_hdr in db_185.h
6855 do
6856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6858 echo "configure:6859: checking for $ac_hdr" >&5
6859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6860   echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862   cat > conftest.$ac_ext <<EOF
6863 #line 6864 "configure"
6864 #include "confdefs.h"
6865 #include <$ac_hdr>
6866 EOF
6867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6868 { (eval echo configure:6869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6870 if test -z "$ac_err"; then
6871   rm -rf conftest*
6872   eval "ac_cv_header_$ac_safe=yes"
6873 else
6874   echo "$ac_err" >&5
6875   echo "configure: failed program was:" >&5
6876   cat conftest.$ac_ext >&5
6877   rm -rf conftest*
6878   eval "ac_cv_header_$ac_safe=no"
6879 fi
6880 rm -f conftest*
6881 fi
6882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6883   echo "$ac_t""yes" 1>&6
6884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6885   cat >> confdefs.h <<EOF
6886 #define $ac_tr_hdr 1
6887 EOF
6888  
6889 else
6890   echo "$ac_t""no" 1>&6
6891 fi
6892 done
6893
6894 if test "$ol_cv_header_db2" = yes ; then
6895         
6896         ol_cv_header_db=$ac_cv_header_db_185_h
6897 else
6898         ol_cv_header_db=$ac_cv_header_db_h
6899 fi
6900
6901
6902  
6903  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6904 echo "configure:6905: checking for Berkeley DB" >&5
6905 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6906   echo $ac_n "(cached) $ac_c" 1>&6
6907 else
6908   
6909         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6910                 ol_cv_berkeley_db=no
6911         else
6912                 ol_cv_berkeley_db=yes
6913         fi
6914
6915 fi
6916
6917 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6918  if test $ol_cv_berkeley_db = yes ; then
6919         cat >> confdefs.h <<\EOF
6920 #define HAVE_BERKELEY_DB 1
6921 EOF
6922
6923  fi
6924
6925
6926         if test $ol_cv_berkeley_db = yes ; then
6927                 ol_link_ldbm=db
6928                 ol_with_ldbm_api=db
6929
6930                 if test $ol_with_ldbm_type = hash ; then
6931                         cat >> confdefs.h <<\EOF
6932 #define LDBM_USE_DBHASH 1
6933 EOF
6934
6935                 else
6936                         cat >> confdefs.h <<\EOF
6937 #define LDBM_USE_DBBTREE 1
6938 EOF
6939
6940                 fi
6941
6942                                                 if test $ol_cv_lib_db != yes ; then
6943                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6944                 fi
6945         fi
6946 fi
6947
6948 if test $ol_with_ldbm_api = manual ; then
6949                 ol_link_ldbm=yes
6950
6951         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6952
6953         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6954 do
6955 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6956 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6957 echo "configure:6958: checking for $ac_hdr" >&5
6958 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6959   echo $ac_n "(cached) $ac_c" 1>&6
6960 else
6961   cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 #include <$ac_hdr>
6965 EOF
6966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6967 { (eval echo configure:6968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6969 if test -z "$ac_err"; then
6970   rm -rf conftest*
6971   eval "ac_cv_header_$ac_safe=yes"
6972 else
6973   echo "$ac_err" >&5
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -rf conftest*
6977   eval "ac_cv_header_$ac_safe=no"
6978 fi
6979 rm -f conftest*
6980 fi
6981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6982   echo "$ac_t""yes" 1>&6
6983     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6984   cat >> confdefs.h <<EOF
6985 #define $ac_tr_hdr 1
6986 EOF
6987  
6988 else
6989   echo "$ac_t""no" 1>&6
6990 fi
6991 done
6992
6993 fi
6994
6995 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
6996         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
6997         ol_with_ldbm_api=none
6998 fi
6999
7000 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7001         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7002 echo "configure:7003: checking for GDBM library" >&5
7003 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7004   echo $ac_n "(cached) $ac_c" 1>&6
7005 else
7006         ol_LIBS="$LIBS"
7007         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7008 echo "configure:7009: checking for gdbm_open" >&5
7009 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7010   echo $ac_n "(cached) $ac_c" 1>&6
7011 else
7012   cat > conftest.$ac_ext <<EOF
7013 #line 7014 "configure"
7014 #include "confdefs.h"
7015 /* System header to define __stub macros and hopefully few prototypes,
7016     which can conflict with char gdbm_open(); below.  */
7017 #include <assert.h>
7018 /* Override any gcc2 internal prototype to avoid an error.  */
7019 /* We use char because int might match the return type of a gcc2
7020     builtin and then its argument prototype would still apply.  */
7021 char gdbm_open();
7022
7023 int main() {
7024
7025 /* The GNU C library defines this for functions which it implements
7026     to always fail with ENOSYS.  Some functions are actually named
7027     something starting with __ and the normal name is an alias.  */
7028 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7029 choke me
7030 #else
7031 gdbm_open();
7032 #endif
7033
7034 ; return 0; }
7035 EOF
7036 if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7037   rm -rf conftest*
7038   eval "ac_cv_func_gdbm_open=yes"
7039 else
7040   echo "configure: failed program was:" >&5
7041   cat conftest.$ac_ext >&5
7042   rm -rf conftest*
7043   eval "ac_cv_func_gdbm_open=no"
7044 fi
7045 rm -f conftest*
7046 fi
7047
7048 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7049   echo "$ac_t""yes" 1>&6
7050   ol_cv_lib_gdbm=yes
7051 else
7052   echo "$ac_t""no" 1>&6
7053
7054                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7055 echo "configure:7056: checking for gdbm_open in -lgdbm" >&5
7056 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7057 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7058   echo $ac_n "(cached) $ac_c" 1>&6
7059 else
7060   ac_save_LIBS="$LIBS"
7061 LIBS="-lgdbm  $LIBS"
7062 cat > conftest.$ac_ext <<EOF
7063 #line 7064 "configure"
7064 #include "confdefs.h"
7065 /* Override any gcc2 internal prototype to avoid an error.  */
7066 /* We use char because int might match the return type of a gcc2
7067     builtin and then its argument prototype would still apply.  */
7068 char gdbm_open();
7069
7070 int main() {
7071 gdbm_open()
7072 ; return 0; }
7073 EOF
7074 if { (eval echo configure:7075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7075   rm -rf conftest*
7076   eval "ac_cv_lib_$ac_lib_var=yes"
7077 else
7078   echo "configure: failed program was:" >&5
7079   cat conftest.$ac_ext >&5
7080   rm -rf conftest*
7081   eval "ac_cv_lib_$ac_lib_var=no"
7082 fi
7083 rm -f conftest*
7084 LIBS="$ac_save_LIBS"
7085
7086 fi
7087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7088   echo "$ac_t""yes" 1>&6
7089   ol_cv_lib_gdbm=-lgdbm
7090 else
7091   echo "$ac_t""no" 1>&6
7092 ol_cv_lib_gdbm=no
7093 fi
7094
7095         
7096 fi
7097
7098         LIBS="$ol_LIBS"
7099
7100 fi
7101
7102 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7103
7104
7105  for ac_hdr in gdbm.h
7106 do
7107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7109 echo "configure:7110: checking for $ac_hdr" >&5
7110 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7111   echo $ac_n "(cached) $ac_c" 1>&6
7112 else
7113   cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 #include <$ac_hdr>
7117 EOF
7118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7119 { (eval echo configure:7120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7121 if test -z "$ac_err"; then
7122   rm -rf conftest*
7123   eval "ac_cv_header_$ac_safe=yes"
7124 else
7125   echo "$ac_err" >&5
7126   echo "configure: failed program was:" >&5
7127   cat conftest.$ac_ext >&5
7128   rm -rf conftest*
7129   eval "ac_cv_header_$ac_safe=no"
7130 fi
7131 rm -f conftest*
7132 fi
7133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7134   echo "$ac_t""yes" 1>&6
7135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7136   cat >> confdefs.h <<EOF
7137 #define $ac_tr_hdr 1
7138 EOF
7139  
7140 else
7141   echo "$ac_t""no" 1>&6
7142 fi
7143 done
7144
7145  echo $ac_n "checking for db""... $ac_c" 1>&6
7146 echo "configure:7147: checking for db" >&5
7147 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7148   echo $ac_n "(cached) $ac_c" 1>&6
7149 else
7150   
7151         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7152                 ol_cv_gdbm=no
7153         else
7154                 ol_cv_gdbm=yes
7155         fi
7156
7157 fi
7158
7159 echo "$ac_t""$ol_cv_gdbm" 1>&6
7160  if test $ol_cv_gdbm = yes ; then
7161         cat >> confdefs.h <<\EOF
7162 #define HAVE_GDBM 1
7163 EOF
7164
7165  fi
7166
7167
7168         if test $ol_cv_gdbm = yes ; then
7169                 ol_link_ldbm=gdbm
7170                 ol_with_ldbm_api=gdbm
7171
7172                 if test $ol_cv_lib_gdbm != yes ; then
7173                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7174                 fi
7175         fi
7176 fi
7177
7178 if test $ol_with_ldbm_api = auto ; then
7179         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7180 elif test $ol_with_ldbm_api = ndbm ; then
7181         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7182 echo "configure:7183: checking for NDBM library" >&5
7183 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7184   echo $ac_n "(cached) $ac_c" 1>&6
7185 else
7186         ol_LIBS="$LIBS"
7187         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7188 echo "configure:7189: checking for dbm_open" >&5
7189 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7190   echo $ac_n "(cached) $ac_c" 1>&6
7191 else
7192   cat > conftest.$ac_ext <<EOF
7193 #line 7194 "configure"
7194 #include "confdefs.h"
7195 /* System header to define __stub macros and hopefully few prototypes,
7196     which can conflict with char dbm_open(); below.  */
7197 #include <assert.h>
7198 /* Override any gcc2 internal prototype to avoid an error.  */
7199 /* We use char because int might match the return type of a gcc2
7200     builtin and then its argument prototype would still apply.  */
7201 char dbm_open();
7202
7203 int main() {
7204
7205 /* The GNU C library defines this for functions which it implements
7206     to always fail with ENOSYS.  Some functions are actually named
7207     something starting with __ and the normal name is an alias.  */
7208 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7209 choke me
7210 #else
7211 dbm_open();
7212 #endif
7213
7214 ; return 0; }
7215 EOF
7216 if { (eval echo configure:7217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7217   rm -rf conftest*
7218   eval "ac_cv_func_dbm_open=yes"
7219 else
7220   echo "configure: failed program was:" >&5
7221   cat conftest.$ac_ext >&5
7222   rm -rf conftest*
7223   eval "ac_cv_func_dbm_open=no"
7224 fi
7225 rm -f conftest*
7226 fi
7227
7228 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7229   echo "$ac_t""yes" 1>&6
7230   ol_cv_lib_ndbm=yes
7231 else
7232   echo "$ac_t""no" 1>&6
7233
7234                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7235 echo "configure:7236: checking for dbm_open in -lndbm" >&5
7236 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7238   echo $ac_n "(cached) $ac_c" 1>&6
7239 else
7240   ac_save_LIBS="$LIBS"
7241 LIBS="-lndbm  $LIBS"
7242 cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* Override any gcc2 internal prototype to avoid an error.  */
7246 /* We use char because int might match the return type of a gcc2
7247     builtin and then its argument prototype would still apply.  */
7248 char dbm_open();
7249
7250 int main() {
7251 dbm_open()
7252 ; return 0; }
7253 EOF
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255   rm -rf conftest*
7256   eval "ac_cv_lib_$ac_lib_var=yes"
7257 else
7258   echo "configure: failed program was:" >&5
7259   cat conftest.$ac_ext >&5
7260   rm -rf conftest*
7261   eval "ac_cv_lib_$ac_lib_var=no"
7262 fi
7263 rm -f conftest*
7264 LIBS="$ac_save_LIBS"
7265
7266 fi
7267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7268   echo "$ac_t""yes" 1>&6
7269   ol_cv_lib_ndbm=-lndbm
7270 else
7271   echo "$ac_t""no" 1>&6
7272
7273                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7274 echo "configure:7275: checking for dbm_open in -ldbm" >&5
7275 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7276 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7277   echo $ac_n "(cached) $ac_c" 1>&6
7278 else
7279   ac_save_LIBS="$LIBS"
7280 LIBS="-ldbm  $LIBS"
7281 cat > conftest.$ac_ext <<EOF
7282 #line 7283 "configure"
7283 #include "confdefs.h"
7284 /* Override any gcc2 internal prototype to avoid an error.  */
7285 /* We use char because int might match the return type of a gcc2
7286     builtin and then its argument prototype would still apply.  */
7287 char dbm_open();
7288
7289 int main() {
7290 dbm_open()
7291 ; return 0; }
7292 EOF
7293 if { (eval echo configure:7294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7294   rm -rf conftest*
7295   eval "ac_cv_lib_$ac_lib_var=yes"
7296 else
7297   echo "configure: failed program was:" >&5
7298   cat conftest.$ac_ext >&5
7299   rm -rf conftest*
7300   eval "ac_cv_lib_$ac_lib_var=no"
7301 fi
7302 rm -f conftest*
7303 LIBS="$ac_save_LIBS"
7304
7305 fi
7306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7307   echo "$ac_t""yes" 1>&6
7308   ol_cv_lib_ndbm=-ldbm
7309 else
7310   echo "$ac_t""no" 1>&6
7311 ol_cv_lib_ndbm=no
7312 fi
7313                 
7314 fi
7315
7316         
7317 fi
7318
7319         LIBS="$ol_LIBS"
7320
7321 fi
7322
7323 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7324
7325
7326  for ac_hdr in ndbm.h
7327 do
7328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7330 echo "configure:7331: checking for $ac_hdr" >&5
7331 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7332   echo $ac_n "(cached) $ac_c" 1>&6
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 #include <$ac_hdr>
7338 EOF
7339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7340 { (eval echo configure:7341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7342 if test -z "$ac_err"; then
7343   rm -rf conftest*
7344   eval "ac_cv_header_$ac_safe=yes"
7345 else
7346   echo "$ac_err" >&5
7347   echo "configure: failed program was:" >&5
7348   cat conftest.$ac_ext >&5
7349   rm -rf conftest*
7350   eval "ac_cv_header_$ac_safe=no"
7351 fi
7352 rm -f conftest*
7353 fi
7354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7355   echo "$ac_t""yes" 1>&6
7356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7357   cat >> confdefs.h <<EOF
7358 #define $ac_tr_hdr 1
7359 EOF
7360  
7361 else
7362   echo "$ac_t""no" 1>&6
7363 fi
7364 done
7365
7366  echo $ac_n "checking for db""... $ac_c" 1>&6
7367 echo "configure:7368: checking for db" >&5
7368 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
7369   echo $ac_n "(cached) $ac_c" 1>&6
7370 else
7371   
7372         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
7373                 ol_cv_ndbm=no
7374         else
7375                 ol_cv_ndbm=yes
7376         fi
7377
7378 fi
7379
7380 echo "$ac_t""$ol_cv_ndbm" 1>&6
7381  if test $ol_cv_ndbm = yes ; then
7382         cat >> confdefs.h <<\EOF
7383 #define HAVE_NDBM 1
7384 EOF
7385
7386  fi
7387
7388
7389         if test $ol_cv_ndbm = yes ; then
7390                 ol_link_ldbm=ndbm
7391                 ol_with_ldbm_api=ndbm
7392
7393                 if test $ol_cv_lib_ndbm != yes ; then
7394                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
7395                 fi
7396         fi
7397 fi
7398
7399 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
7400         echo "configure: warning: could not find suitable LDBM backend" 1>&2
7401         if test $ol_enable_ldbm = yes ; then
7402                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
7403         fi
7404
7405         echo "configure: warning: disabling LDBM" 1>&2
7406         ol_enable_ldbm=no
7407 fi
7408
7409 if test $ol_enable_wrappers != no ; then
7410         for ac_hdr in tcpd.h
7411 do
7412 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7413 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7414 echo "configure:7415: checking for $ac_hdr" >&5
7415 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7416   echo $ac_n "(cached) $ac_c" 1>&6
7417 else
7418   cat > conftest.$ac_ext <<EOF
7419 #line 7420 "configure"
7420 #include "confdefs.h"
7421 #include <$ac_hdr>
7422 EOF
7423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7424 { (eval echo configure:7425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7426 if test -z "$ac_err"; then
7427   rm -rf conftest*
7428   eval "ac_cv_header_$ac_safe=yes"
7429 else
7430   echo "$ac_err" >&5
7431   echo "configure: failed program was:" >&5
7432   cat conftest.$ac_ext >&5
7433   rm -rf conftest*
7434   eval "ac_cv_header_$ac_safe=no"
7435 fi
7436 rm -f conftest*
7437 fi
7438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7439   echo "$ac_t""yes" 1>&6
7440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7441   cat >> confdefs.h <<EOF
7442 #define $ac_tr_hdr 1
7443 EOF
7444  
7445 else
7446   echo "$ac_t""no" 1>&6
7447 fi
7448 done
7449
7450
7451         if test $ac_cv_header_tcpd_h != yes ; then
7452                 have_wrappers=no
7453         else
7454                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
7455 echo "configure:7456: checking for main in -lwrap" >&5
7456 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
7457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7458   echo $ac_n "(cached) $ac_c" 1>&6
7459 else
7460   ac_save_LIBS="$LIBS"
7461 LIBS="-lwrap  $LIBS"
7462 cat > conftest.$ac_ext <<EOF
7463 #line 7464 "configure"
7464 #include "confdefs.h"
7465
7466 int main() {
7467 main()
7468 ; return 0; }
7469 EOF
7470 if { (eval echo configure:7471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7471   rm -rf conftest*
7472   eval "ac_cv_lib_$ac_lib_var=yes"
7473 else
7474   echo "configure: failed program was:" >&5
7475   cat conftest.$ac_ext >&5
7476   rm -rf conftest*
7477   eval "ac_cv_lib_$ac_lib_var=no"
7478 fi
7479 rm -f conftest*
7480 LIBS="$ac_save_LIBS"
7481
7482 fi
7483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7484   echo "$ac_t""yes" 1>&6
7485   have_wrappers=yes
7486 else
7487   echo "$ac_t""no" 1>&6
7488 have_wrappers=no
7489 fi
7490
7491         fi
7492
7493         if test $have_wrappers = yes ; then
7494                 cat >> confdefs.h <<\EOF
7495 #define HAVE_TCPD 1
7496 EOF
7497
7498                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
7499         else
7500                 echo "configure: warning: could not find -lwrap" 1>&2
7501                 if test $ol_enable_wrappers = yes ; then
7502                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
7503                 fi
7504
7505                 echo "configure: warning: disabling wrappers support" 1>&2
7506                 ol_enable_wrappers=no
7507         fi
7508 fi
7509
7510 if test $ol_enable_syslog != no ; then
7511         echo $ac_n "checking for openlog""... $ac_c" 1>&6
7512 echo "configure:7513: checking for openlog" >&5
7513 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
7514   echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7516   cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 /* System header to define __stub macros and hopefully few prototypes,
7520     which can conflict with char openlog(); below.  */
7521 #include <assert.h>
7522 /* Override any gcc2 internal prototype to avoid an error.  */
7523 /* We use char because int might match the return type of a gcc2
7524     builtin and then its argument prototype would still apply.  */
7525 char openlog();
7526
7527 int main() {
7528
7529 /* The GNU C library defines this for functions which it implements
7530     to always fail with ENOSYS.  Some functions are actually named
7531     something starting with __ and the normal name is an alias.  */
7532 #if defined (__stub_openlog) || defined (__stub___openlog)
7533 choke me
7534 #else
7535 openlog();
7536 #endif
7537
7538 ; return 0; }
7539 EOF
7540 if { (eval echo configure:7541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7541   rm -rf conftest*
7542   eval "ac_cv_func_openlog=yes"
7543 else
7544   echo "configure: failed program was:" >&5
7545   cat conftest.$ac_ext >&5
7546   rm -rf conftest*
7547   eval "ac_cv_func_openlog=no"
7548 fi
7549 rm -f conftest*
7550 fi
7551
7552 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
7553   echo "$ac_t""yes" 1>&6
7554   :
7555 else
7556   echo "$ac_t""no" 1>&6
7557 fi
7558
7559         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
7560                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
7561         fi
7562         ol_enable_syslog=$ac_cv_func_openlog
7563 fi
7564
7565 if test $ol_enable_dmalloc != no ; then
7566         for ac_hdr in dmalloc.h
7567 do
7568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7570 echo "configure:7571: checking for $ac_hdr" >&5
7571 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7572   echo $ac_n "(cached) $ac_c" 1>&6
7573 else
7574   cat > conftest.$ac_ext <<EOF
7575 #line 7576 "configure"
7576 #include "confdefs.h"
7577 #include <$ac_hdr>
7578 EOF
7579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7580 { (eval echo configure:7581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7582 if test -z "$ac_err"; then
7583   rm -rf conftest*
7584   eval "ac_cv_header_$ac_safe=yes"
7585 else
7586   echo "$ac_err" >&5
7587   echo "configure: failed program was:" >&5
7588   cat conftest.$ac_ext >&5
7589   rm -rf conftest*
7590   eval "ac_cv_header_$ac_safe=no"
7591 fi
7592 rm -f conftest*
7593 fi
7594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7597   cat >> confdefs.h <<EOF
7598 #define $ac_tr_hdr 1
7599 EOF
7600  
7601 else
7602   echo "$ac_t""no" 1>&6
7603 fi
7604 done
7605
7606         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7607 echo "configure:7608: checking for dmalloc_shutdown in -ldmalloc" >&5
7608 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7610   echo $ac_n "(cached) $ac_c" 1>&6
7611 else
7612   ac_save_LIBS="$LIBS"
7613 LIBS="-ldmalloc  $LIBS"
7614 cat > conftest.$ac_ext <<EOF
7615 #line 7616 "configure"
7616 #include "confdefs.h"
7617 /* Override any gcc2 internal prototype to avoid an error.  */
7618 /* We use char because int might match the return type of a gcc2
7619     builtin and then its argument prototype would still apply.  */
7620 char dmalloc_shutdown();
7621
7622 int main() {
7623 dmalloc_shutdown()
7624 ; return 0; }
7625 EOF
7626 if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7627   rm -rf conftest*
7628   eval "ac_cv_lib_$ac_lib_var=yes"
7629 else
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -rf conftest*
7633   eval "ac_cv_lib_$ac_lib_var=no"
7634 fi
7635 rm -f conftest*
7636 LIBS="$ac_save_LIBS"
7637
7638 fi
7639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7640   echo "$ac_t""yes" 1>&6
7641     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7643   cat >> confdefs.h <<EOF
7644 #define $ac_tr_lib 1
7645 EOF
7646
7647   LIBS="-ldmalloc $LIBS"
7648
7649 else
7650   echo "$ac_t""no" 1>&6
7651 fi
7652
7653 fi
7654
7655 if test $ol_enable_tcl != no ; then
7656         for ac_hdr in tcl.h
7657 do
7658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7660 echo "configure:7661: checking for $ac_hdr" >&5
7661 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7662   echo $ac_n "(cached) $ac_c" 1>&6
7663 else
7664   cat > conftest.$ac_ext <<EOF
7665 #line 7666 "configure"
7666 #include "confdefs.h"
7667 #include <$ac_hdr>
7668 EOF
7669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7670 { (eval echo configure:7671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7672 if test -z "$ac_err"; then
7673   rm -rf conftest*
7674   eval "ac_cv_header_$ac_safe=yes"
7675 else
7676   echo "$ac_err" >&5
7677   echo "configure: failed program was:" >&5
7678   cat conftest.$ac_ext >&5
7679   rm -rf conftest*
7680   eval "ac_cv_header_$ac_safe=no"
7681 fi
7682 rm -f conftest*
7683 fi
7684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7685   echo "$ac_t""yes" 1>&6
7686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7687   cat >> confdefs.h <<EOF
7688 #define $ac_tr_hdr 1
7689 EOF
7690  
7691 else
7692   echo "$ac_t""no" 1>&6
7693 fi
7694 done
7695
7696
7697         if test $ac_cv_header_tcl_h != yes ; then
7698                 have_tcl=no
7699         else
7700                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
7701 echo "configure:7702: checking for main in -ltcl" >&5
7702 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
7703 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7704   echo $ac_n "(cached) $ac_c" 1>&6
7705 else
7706   ac_save_LIBS="$LIBS"
7707 LIBS="-ltcl  $LIBS"
7708 cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711
7712 int main() {
7713 main()
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   eval "ac_cv_lib_$ac_lib_var=yes"
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   eval "ac_cv_lib_$ac_lib_var=no"
7724 fi
7725 rm -f conftest*
7726 LIBS="$ac_save_LIBS"
7727
7728 fi
7729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7730   echo "$ac_t""yes" 1>&6
7731   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
7732 else
7733   echo "$ac_t""no" 1>&6
7734 have_tcl=no
7735 fi
7736
7737
7738                 if test $have_tcl != yes; then
7739                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
7740 echo "configure:7741: checking for main in -ltcl7.6" >&5
7741 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
7742 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7743   echo $ac_n "(cached) $ac_c" 1>&6
7744 else
7745   ac_save_LIBS="$LIBS"
7746 LIBS="-ltcl7.6  $LIBS"
7747 cat > conftest.$ac_ext <<EOF
7748 #line 7749 "configure"
7749 #include "confdefs.h"
7750
7751 int main() {
7752 main()
7753 ; return 0; }
7754 EOF
7755 if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7756   rm -rf conftest*
7757   eval "ac_cv_lib_$ac_lib_var=yes"
7758 else
7759   echo "configure: failed program was:" >&5
7760   cat conftest.$ac_ext >&5
7761   rm -rf conftest*
7762   eval "ac_cv_lib_$ac_lib_var=no"
7763 fi
7764 rm -f conftest*
7765 LIBS="$ac_save_LIBS"
7766
7767 fi
7768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7769   echo "$ac_t""yes" 1>&6
7770   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
7771 else
7772   echo "$ac_t""no" 1>&6
7773 have_tcl=no
7774 fi
7775
7776                 fi
7777
7778                 if test $have_tcl != yes; then
7779                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
7780 echo "configure:7781: checking for main in -ltcl8.0" >&5
7781 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
7782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7783   echo $ac_n "(cached) $ac_c" 1>&6
7784 else
7785   ac_save_LIBS="$LIBS"
7786 LIBS="-ltcl8.0  $LIBS"
7787 cat > conftest.$ac_ext <<EOF
7788 #line 7789 "configure"
7789 #include "confdefs.h"
7790
7791 int main() {
7792 main()
7793 ; return 0; }
7794 EOF
7795 if { (eval echo configure:7796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7796   rm -rf conftest*
7797   eval "ac_cv_lib_$ac_lib_var=yes"
7798 else
7799   echo "configure: failed program was:" >&5
7800   cat conftest.$ac_ext >&5
7801   rm -rf conftest*
7802   eval "ac_cv_lib_$ac_lib_var=no"
7803 fi
7804 rm -f conftest*
7805 LIBS="$ac_save_LIBS"
7806
7807 fi
7808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7809   echo "$ac_t""yes" 1>&6
7810   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
7811 else
7812   echo "$ac_t""no" 1>&6
7813 have_tcl=no
7814 fi
7815
7816                 fi
7817         fi
7818
7819         if test $have_tcl != yes ; then
7820                 echo "configure: warning: could not find -ltcl" 1>&2
7821                 if test $ol_enable_tcl = yes ; then
7822                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
7823                 fi
7824
7825                 ol_enable_tcl=no
7826         fi
7827 fi
7828
7829 # ud needs termcap (should insert check here)
7830 ol_link_termcap=no
7831 for ac_hdr in termcap.h ncurses.h
7832 do
7833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7835 echo "configure:7836: checking for $ac_hdr" >&5
7836 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839   cat > conftest.$ac_ext <<EOF
7840 #line 7841 "configure"
7841 #include "confdefs.h"
7842 #include <$ac_hdr>
7843 EOF
7844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7845 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7847 if test -z "$ac_err"; then
7848   rm -rf conftest*
7849   eval "ac_cv_header_$ac_safe=yes"
7850 else
7851   echo "$ac_err" >&5
7852   echo "configure: failed program was:" >&5
7853   cat conftest.$ac_ext >&5
7854   rm -rf conftest*
7855   eval "ac_cv_header_$ac_safe=no"
7856 fi
7857 rm -f conftest*
7858 fi
7859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7860   echo "$ac_t""yes" 1>&6
7861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7862   cat >> confdefs.h <<EOF
7863 #define $ac_tr_hdr 1
7864 EOF
7865  
7866 else
7867   echo "$ac_t""no" 1>&6
7868 fi
7869 done
7870
7871
7872 if test $ol_link_termcap = no ; then
7873         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
7874 echo "configure:7875: checking for tputs in -ltermcap" >&5
7875 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
7876 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7877   echo $ac_n "(cached) $ac_c" 1>&6
7878 else
7879   ac_save_LIBS="$LIBS"
7880 LIBS="-ltermcap  $LIBS"
7881 cat > conftest.$ac_ext <<EOF
7882 #line 7883 "configure"
7883 #include "confdefs.h"
7884 /* Override any gcc2 internal prototype to avoid an error.  */
7885 /* We use char because int might match the return type of a gcc2
7886     builtin and then its argument prototype would still apply.  */
7887 char tputs();
7888
7889 int main() {
7890 tputs()
7891 ; return 0; }
7892 EOF
7893 if { (eval echo configure:7894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7894   rm -rf conftest*
7895   eval "ac_cv_lib_$ac_lib_var=yes"
7896 else
7897   echo "configure: failed program was:" >&5
7898   cat conftest.$ac_ext >&5
7899   rm -rf conftest*
7900   eval "ac_cv_lib_$ac_lib_var=no"
7901 fi
7902 rm -f conftest*
7903 LIBS="$ac_save_LIBS"
7904
7905 fi
7906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7907   echo "$ac_t""yes" 1>&6
7908   have_termcap=yes
7909 else
7910   echo "$ac_t""no" 1>&6
7911 have_termcap=no
7912 fi
7913
7914         if test $have_termcap = yes ; then
7915                 cat >> confdefs.h <<\EOF
7916 #define HAVE_TERMCAP 1
7917 EOF
7918
7919                 ol_link_termcap=yes
7920                 TERMCAP_LIBS=-ltermcap
7921         fi
7922 fi
7923
7924 if test $ol_link_termcap = no ; then
7925         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
7926 echo "configure:7927: checking for initscr in -lncurses" >&5
7927 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
7928 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7929   echo $ac_n "(cached) $ac_c" 1>&6
7930 else
7931   ac_save_LIBS="$LIBS"
7932 LIBS="-lncurses  $LIBS"
7933 cat > conftest.$ac_ext <<EOF
7934 #line 7935 "configure"
7935 #include "confdefs.h"
7936 /* Override any gcc2 internal prototype to avoid an error.  */
7937 /* We use char because int might match the return type of a gcc2
7938     builtin and then its argument prototype would still apply.  */
7939 char initscr();
7940
7941 int main() {
7942 initscr()
7943 ; return 0; }
7944 EOF
7945 if { (eval echo configure:7946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7946   rm -rf conftest*
7947   eval "ac_cv_lib_$ac_lib_var=yes"
7948 else
7949   echo "configure: failed program was:" >&5
7950   cat conftest.$ac_ext >&5
7951   rm -rf conftest*
7952   eval "ac_cv_lib_$ac_lib_var=no"
7953 fi
7954 rm -f conftest*
7955 LIBS="$ac_save_LIBS"
7956
7957 fi
7958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7959   echo "$ac_t""yes" 1>&6
7960   have_ncurses=yes
7961 else
7962   echo "$ac_t""no" 1>&6
7963 have_ncurses=no
7964 fi
7965
7966         if test $have_ncurses = yes ; then
7967                 cat >> confdefs.h <<\EOF
7968 #define HAVE_NCURSES 1
7969 EOF
7970
7971                 ol_link_termcap=yes
7972                 TERMCAP_LIBS=-lncurses
7973         fi
7974 fi
7975
7976 if test $ol_link_termcap = no ; then
7977         cat >> confdefs.h <<\EOF
7978 #define NO_TERMCAP 1
7979 EOF
7980
7981         TERMCAP_LIBS=
7982 fi
7983
7984 ol_link_readline=no
7985 if test $ol_with_readline != no ; then
7986         for ac_hdr in readline/readline.h readline/history.h
7987 do
7988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7990 echo "configure:7991: checking for $ac_hdr" >&5
7991 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   cat > conftest.$ac_ext <<EOF
7995 #line 7996 "configure"
7996 #include "confdefs.h"
7997 #include <$ac_hdr>
7998 EOF
7999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8000 { (eval echo configure:8001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8002 if test -z "$ac_err"; then
8003   rm -rf conftest*
8004   eval "ac_cv_header_$ac_safe=yes"
8005 else
8006   echo "$ac_err" >&5
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -rf conftest*
8010   eval "ac_cv_header_$ac_safe=no"
8011 fi
8012 rm -f conftest*
8013 fi
8014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8015   echo "$ac_t""yes" 1>&6
8016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8017   cat >> confdefs.h <<EOF
8018 #define $ac_tr_hdr 1
8019 EOF
8020  
8021 else
8022   echo "$ac_t""no" 1>&6
8023 fi
8024 done
8025
8026
8027         if test $ac_cv_header_readline_readline_h = yes ; then
8028                 save_LIBS="$LIBS"
8029                 LIBS="$TERMCAP_LIBS $LIBS"
8030                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8031 echo "configure:8032: checking for readline in -lreadline" >&5
8032 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8034   echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8036   ac_save_LIBS="$LIBS"
8037 LIBS="-lreadline  $LIBS"
8038 cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 /* Override any gcc2 internal prototype to avoid an error.  */
8042 /* We use char because int might match the return type of a gcc2
8043     builtin and then its argument prototype would still apply.  */
8044 char readline();
8045
8046 int main() {
8047 readline()
8048 ; return 0; }
8049 EOF
8050 if { (eval echo configure:8051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8051   rm -rf conftest*
8052   eval "ac_cv_lib_$ac_lib_var=yes"
8053 else
8054   echo "configure: failed program was:" >&5
8055   cat conftest.$ac_ext >&5
8056   rm -rf conftest*
8057   eval "ac_cv_lib_$ac_lib_var=no"
8058 fi
8059 rm -f conftest*
8060 LIBS="$ac_save_LIBS"
8061
8062 fi
8063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8064   echo "$ac_t""yes" 1>&6
8065   have_readline=yes
8066 else
8067   echo "$ac_t""no" 1>&6
8068 have_readline=no
8069 fi
8070
8071                 LIBS="$save_LIBS"
8072                         
8073                 if test $have_readline = yes ; then
8074                         ol_with_readline=found
8075                         ol_link_readline=yes
8076
8077                         READLINE_LIBS="-lreadline"
8078                 fi
8079         fi
8080 fi
8081
8082 if test $ol_link_readline = yes ; then
8083         cat >> confdefs.h <<\EOF
8084 #define HAVE_READLINE 1
8085 EOF
8086
8087 fi
8088
8089
8090 # FreeBSD (and others) have crypt(3) in -lcrypt
8091 if test $ol_enable_crypt != no ; then
8092         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8093 echo "configure:8094: checking for crypt" >&5
8094 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097   cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 /* System header to define __stub macros and hopefully few prototypes,
8101     which can conflict with char crypt(); below.  */
8102 #include <assert.h>
8103 /* Override any gcc2 internal prototype to avoid an error.  */
8104 /* We use char because int might match the return type of a gcc2
8105     builtin and then its argument prototype would still apply.  */
8106 char crypt();
8107
8108 int main() {
8109
8110 /* The GNU C library defines this for functions which it implements
8111     to always fail with ENOSYS.  Some functions are actually named
8112     something starting with __ and the normal name is an alias.  */
8113 #if defined (__stub_crypt) || defined (__stub___crypt)
8114 choke me
8115 #else
8116 crypt();
8117 #endif
8118
8119 ; return 0; }
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8122   rm -rf conftest*
8123   eval "ac_cv_func_crypt=yes"
8124 else
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -rf conftest*
8128   eval "ac_cv_func_crypt=no"
8129 fi
8130 rm -f conftest*
8131 fi
8132
8133 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8134   echo "$ac_t""yes" 1>&6
8135   have_crypt=yes
8136 else
8137   echo "$ac_t""no" 1>&6
8138
8139                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8140 echo "configure:8141: checking for crypt in -lcrypt" >&5
8141 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8143   echo $ac_n "(cached) $ac_c" 1>&6
8144 else
8145   ac_save_LIBS="$LIBS"
8146 LIBS="-lcrypt  $LIBS"
8147 cat > conftest.$ac_ext <<EOF
8148 #line 8149 "configure"
8149 #include "confdefs.h"
8150 /* Override any gcc2 internal prototype to avoid an error.  */
8151 /* We use char because int might match the return type of a gcc2
8152     builtin and then its argument prototype would still apply.  */
8153 char crypt();
8154
8155 int main() {
8156 crypt()
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   eval "ac_cv_lib_$ac_lib_var=yes"
8162 else
8163   echo "configure: failed program was:" >&5
8164   cat conftest.$ac_ext >&5
8165   rm -rf conftest*
8166   eval "ac_cv_lib_$ac_lib_var=no"
8167 fi
8168 rm -f conftest*
8169 LIBS="$ac_save_LIBS"
8170
8171 fi
8172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8173   echo "$ac_t""yes" 1>&6
8174   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8175                         have_crypt=yes
8176 else
8177   echo "$ac_t""no" 1>&6
8178 have_crypt=no
8179 fi
8180
8181 fi
8182
8183
8184         if test $have_crypt = yes ; then
8185                 cat >> confdefs.h <<\EOF
8186 #define HAVE_CRYPT 1
8187 EOF
8188
8189         else
8190                 echo "configure: warning: could not find crypt" 1>&2
8191                 if test $ol_enable_crypt = yes ; then
8192                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8193                 fi
8194
8195                 echo "configure: warning: disabling crypt support" 1>&2
8196                 ol_enable_crypt=no
8197         fi
8198 fi
8199
8200 # FreeBSD (and others) have setproctitle(3) in -lutil
8201 if test $ol_enable_proctitle != no ; then
8202         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8203 echo "configure:8204: checking for setproctitle" >&5
8204 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8205   echo $ac_n "(cached) $ac_c" 1>&6
8206 else
8207   cat > conftest.$ac_ext <<EOF
8208 #line 8209 "configure"
8209 #include "confdefs.h"
8210 /* System header to define __stub macros and hopefully few prototypes,
8211     which can conflict with char setproctitle(); below.  */
8212 #include <assert.h>
8213 /* Override any gcc2 internal prototype to avoid an error.  */
8214 /* We use char because int might match the return type of a gcc2
8215     builtin and then its argument prototype would still apply.  */
8216 char setproctitle();
8217
8218 int main() {
8219
8220 /* The GNU C library defines this for functions which it implements
8221     to always fail with ENOSYS.  Some functions are actually named
8222     something starting with __ and the normal name is an alias.  */
8223 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8224 choke me
8225 #else
8226 setproctitle();
8227 #endif
8228
8229 ; return 0; }
8230 EOF
8231 if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8232   rm -rf conftest*
8233   eval "ac_cv_func_setproctitle=yes"
8234 else
8235   echo "configure: failed program was:" >&5
8236   cat conftest.$ac_ext >&5
8237   rm -rf conftest*
8238   eval "ac_cv_func_setproctitle=no"
8239 fi
8240 rm -f conftest*
8241 fi
8242
8243 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8244   echo "$ac_t""yes" 1>&6
8245   have_setproctitle=yes
8246 else
8247   echo "$ac_t""no" 1>&6
8248
8249                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8250 echo "configure:8251: checking for setproctitle in -lutil" >&5
8251 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8252 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8253   echo $ac_n "(cached) $ac_c" 1>&6
8254 else
8255   ac_save_LIBS="$LIBS"
8256 LIBS="-lutil  $LIBS"
8257 cat > conftest.$ac_ext <<EOF
8258 #line 8259 "configure"
8259 #include "confdefs.h"
8260 /* Override any gcc2 internal prototype to avoid an error.  */
8261 /* We use char because int might match the return type of a gcc2
8262     builtin and then its argument prototype would still apply.  */
8263 char setproctitle();
8264
8265 int main() {
8266 setproctitle()
8267 ; return 0; }
8268 EOF
8269 if { (eval echo configure:8270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8270   rm -rf conftest*
8271   eval "ac_cv_lib_$ac_lib_var=yes"
8272 else
8273   echo "configure: failed program was:" >&5
8274   cat conftest.$ac_ext >&5
8275   rm -rf conftest*
8276   eval "ac_cv_lib_$ac_lib_var=no"
8277 fi
8278 rm -f conftest*
8279 LIBS="$ac_save_LIBS"
8280
8281 fi
8282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8283   echo "$ac_t""yes" 1>&6
8284   have_setproctitle=yes
8285                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8286 else
8287   echo "$ac_t""no" 1>&6
8288 have_setproctitle=no
8289                         LIBOBJS="$LIBOBJS setproctitle.o"
8290 fi
8291
8292 fi
8293
8294
8295         if test $have_setproctitle = yes ; then
8296                 cat >> confdefs.h <<\EOF
8297 #define HAVE_SETPROCTITLE 1
8298 EOF
8299
8300         fi
8301 fi
8302
8303 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8304 echo "configure:8305: checking for ANSI C header files" >&5
8305 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8306   echo $ac_n "(cached) $ac_c" 1>&6
8307 else
8308   cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <stdlib.h>
8312 #include <stdarg.h>
8313 #include <string.h>
8314 #include <float.h>
8315 EOF
8316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8317 { (eval echo configure:8318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8319 if test -z "$ac_err"; then
8320   rm -rf conftest*
8321   ac_cv_header_stdc=yes
8322 else
8323   echo "$ac_err" >&5
8324   echo "configure: failed program was:" >&5
8325   cat conftest.$ac_ext >&5
8326   rm -rf conftest*
8327   ac_cv_header_stdc=no
8328 fi
8329 rm -f conftest*
8330
8331 if test $ac_cv_header_stdc = yes; then
8332   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8333 cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 #include <string.h>
8337 EOF
8338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8339   egrep "memchr" >/dev/null 2>&1; then
8340   :
8341 else
8342   rm -rf conftest*
8343   ac_cv_header_stdc=no
8344 fi
8345 rm -f conftest*
8346
8347 fi
8348
8349 if test $ac_cv_header_stdc = yes; then
8350   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8351 cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 #include <stdlib.h>
8355 EOF
8356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8357   egrep "free" >/dev/null 2>&1; then
8358   :
8359 else
8360   rm -rf conftest*
8361   ac_cv_header_stdc=no
8362 fi
8363 rm -f conftest*
8364
8365 fi
8366
8367 if test $ac_cv_header_stdc = yes; then
8368   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8369 if test "$cross_compiling" = yes; then
8370   :
8371 else
8372   cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 #include <ctype.h>
8376 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8377 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8378 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8379 int main () { int i; for (i = 0; i < 256; i++)
8380 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8381 exit (0); }
8382
8383 EOF
8384 if { (eval echo configure:8385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8385 then
8386   :
8387 else
8388   echo "configure: failed program was:" >&5
8389   cat conftest.$ac_ext >&5
8390   rm -fr conftest*
8391   ac_cv_header_stdc=no
8392 fi
8393 rm -fr conftest*
8394 fi
8395
8396 fi
8397 fi
8398
8399 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8400 if test $ac_cv_header_stdc = yes; then
8401   cat >> confdefs.h <<\EOF
8402 #define STDC_HEADERS 1
8403 EOF
8404
8405 fi
8406
8407
8408 if test $ac_cv_header_stdc != yes; then
8409         echo "configure: warning: could not Standard C compliant headers" 1>&2
8410 fi
8411
8412 ac_header_dirent=no
8413 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8414 do
8415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8416 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8417 echo "configure:8418: checking for $ac_hdr that defines DIR" >&5
8418 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
8419   echo $ac_n "(cached) $ac_c" 1>&6
8420 else
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 #include <sys/types.h>
8425 #include <$ac_hdr>
8426 int main() {
8427 DIR *dirp = 0;
8428 ; return 0; }
8429 EOF
8430 if { (eval echo configure:8431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8431   rm -rf conftest*
8432   eval "ac_cv_header_dirent_$ac_safe=yes"
8433 else
8434   echo "configure: failed program was:" >&5
8435   cat conftest.$ac_ext >&5
8436   rm -rf conftest*
8437   eval "ac_cv_header_dirent_$ac_safe=no"
8438 fi
8439 rm -f conftest*
8440 fi
8441 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8442   echo "$ac_t""yes" 1>&6
8443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8444   cat >> confdefs.h <<EOF
8445 #define $ac_tr_hdr 1
8446 EOF
8447  ac_header_dirent=$ac_hdr; break
8448 else
8449   echo "$ac_t""no" 1>&6
8450 fi
8451 done
8452 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8453 if test $ac_header_dirent = dirent.h; then
8454 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8455 echo "configure:8456: checking for opendir in -ldir" >&5
8456 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
8457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8458   echo $ac_n "(cached) $ac_c" 1>&6
8459 else
8460   ac_save_LIBS="$LIBS"
8461 LIBS="-ldir  $LIBS"
8462 cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 /* Override any gcc2 internal prototype to avoid an error.  */
8466 /* We use char because int might match the return type of a gcc2
8467     builtin and then its argument prototype would still apply.  */
8468 char opendir();
8469
8470 int main() {
8471 opendir()
8472 ; return 0; }
8473 EOF
8474 if { (eval echo configure:8475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8475   rm -rf conftest*
8476   eval "ac_cv_lib_$ac_lib_var=yes"
8477 else
8478   echo "configure: failed program was:" >&5
8479   cat conftest.$ac_ext >&5
8480   rm -rf conftest*
8481   eval "ac_cv_lib_$ac_lib_var=no"
8482 fi
8483 rm -f conftest*
8484 LIBS="$ac_save_LIBS"
8485
8486 fi
8487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8488   echo "$ac_t""yes" 1>&6
8489   LIBS="$LIBS -ldir"
8490 else
8491   echo "$ac_t""no" 1>&6
8492 fi
8493
8494 else
8495 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8496 echo "configure:8497: checking for opendir in -lx" >&5
8497 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
8498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8499   echo $ac_n "(cached) $ac_c" 1>&6
8500 else
8501   ac_save_LIBS="$LIBS"
8502 LIBS="-lx  $LIBS"
8503 cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 /* Override any gcc2 internal prototype to avoid an error.  */
8507 /* We use char because int might match the return type of a gcc2
8508     builtin and then its argument prototype would still apply.  */
8509 char opendir();
8510
8511 int main() {
8512 opendir()
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   eval "ac_cv_lib_$ac_lib_var=yes"
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_lib_$ac_lib_var=no"
8523 fi
8524 rm -f conftest*
8525 LIBS="$ac_save_LIBS"
8526
8527 fi
8528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8529   echo "$ac_t""yes" 1>&6
8530   LIBS="$LIBS -lx"
8531 else
8532   echo "$ac_t""no" 1>&6
8533 fi
8534
8535 fi
8536
8537 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8538 echo "configure:8539: checking for sys/wait.h that is POSIX.1 compatible" >&5
8539 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
8540   echo $ac_n "(cached) $ac_c" 1>&6
8541 else
8542   cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545 #include <sys/types.h>
8546 #include <sys/wait.h>
8547 #ifndef WEXITSTATUS
8548 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8549 #endif
8550 #ifndef WIFEXITED
8551 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8552 #endif
8553 int main() {
8554 int s;
8555 wait (&s);
8556 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8560   rm -rf conftest*
8561   ac_cv_header_sys_wait_h=yes
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   ac_cv_header_sys_wait_h=no
8567 fi
8568 rm -f conftest*
8569 fi
8570
8571 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8572 if test $ac_cv_header_sys_wait_h = yes; then
8573   cat >> confdefs.h <<\EOF
8574 #define HAVE_SYS_WAIT_H 1
8575 EOF
8576
8577 fi
8578
8579 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8580 echo "configure:8581: checking POSIX termios" >&5
8581 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
8582   echo $ac_n "(cached) $ac_c" 1>&6
8583 else
8584   cat > conftest.$ac_ext <<EOF
8585 #line 8586 "configure"
8586 #include "confdefs.h"
8587 #include <sys/types.h>
8588 #include <unistd.h>
8589 #include <termios.h>
8590 int main() {
8591 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8592    tcgetattr(0, 0);
8593 ; return 0; }
8594 EOF
8595 if { (eval echo configure:8596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8596   rm -rf conftest*
8597   am_cv_sys_posix_termios=yes
8598 else
8599   echo "configure: failed program was:" >&5
8600   cat conftest.$ac_ext >&5
8601   rm -rf conftest*
8602   am_cv_sys_posix_termios=no
8603 fi
8604 rm -f conftest*
8605 fi
8606
8607 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8608
8609
8610  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8611 echo "configure:8612: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8612 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
8613   echo $ac_n "(cached) $ac_c" 1>&6
8614 else
8615   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8616
8617   gwinsz_in_termios_h=no
8618   if test $am_cv_sys_posix_termios = yes; then
8619     cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 #include <sys/types.h>
8623 #     include <termios.h>
8624 #     ifdef TIOCGWINSZ
8625         yes
8626 #     endif
8627     
8628 EOF
8629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8630   egrep "yes" >/dev/null 2>&1; then
8631   rm -rf conftest*
8632   gwinsz_in_termios_h=yes
8633 fi
8634 rm -f conftest*
8635
8636   fi
8637
8638   if test $gwinsz_in_termios_h = no; then
8639     cat > conftest.$ac_ext <<EOF
8640 #line 8641 "configure"
8641 #include "confdefs.h"
8642 #include <sys/types.h>
8643 #     include <sys/ioctl.h>
8644 #     ifdef TIOCGWINSZ
8645         yes
8646 #     endif
8647     
8648 EOF
8649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8650   egrep "yes" >/dev/null 2>&1; then
8651   rm -rf conftest*
8652   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8653 fi
8654 rm -f conftest*
8655
8656   fi
8657   
8658 fi
8659
8660 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8661   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8662     cat >> confdefs.h <<\EOF
8663 #define GWINSZ_IN_SYS_IOCTL 1
8664 EOF
8665
8666   fi
8667
8668 if test $am_cv_sys_posix_termios = yes ; then
8669         cat >> confdefs.h <<\EOF
8670 #define HAVE_POSIX_TERMIOS 1
8671 EOF
8672
8673 fi
8674
8675 for ac_hdr in \
8676         arpa/inet.h             \
8677         arpa/nameser.h          \
8678         crypt.h                 \
8679         errno.h                 \
8680         fcntl.h                 \
8681         filio.h                 \
8682         getopt.h                \
8683         libutil.h               \
8684         limits.h                \
8685         locale.h                \
8686         malloc.h                \
8687         memory.h                \
8688         regex.h                 \
8689         psap.h                  \
8690         pwd.h                   \
8691         resolv.h                \
8692         sgtty.h                 \
8693         stdarg.h                \
8694         stddef.h                \
8695         string.h                \
8696         strings.h               \
8697         sysexits.h              \
8698         sys/file.h              \
8699         sys/filio.h             \
8700         sys/errno.h             \
8701         sys/ioctl.h             \
8702         sys/param.h             \
8703         sys/resource.h          \
8704         sys/socket.h            \
8705         sys/syslog.h            \
8706         sys/time.h              \
8707         sys/types.h             \
8708         syslog.h                \
8709         termios.h               \
8710         unistd.h                \
8711
8712 do
8713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8715 echo "configure:8716: checking for $ac_hdr" >&5
8716 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8717   echo $ac_n "(cached) $ac_c" 1>&6
8718 else
8719   cat > conftest.$ac_ext <<EOF
8720 #line 8721 "configure"
8721 #include "confdefs.h"
8722 #include <$ac_hdr>
8723 EOF
8724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8725 { (eval echo configure:8726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8727 if test -z "$ac_err"; then
8728   rm -rf conftest*
8729   eval "ac_cv_header_$ac_safe=yes"
8730 else
8731   echo "$ac_err" >&5
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   eval "ac_cv_header_$ac_safe=no"
8736 fi
8737 rm -f conftest*
8738 fi
8739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8740   echo "$ac_t""yes" 1>&6
8741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8742   cat >> confdefs.h <<EOF
8743 #define $ac_tr_hdr 1
8744 EOF
8745  
8746 else
8747   echo "$ac_t""no" 1>&6
8748 fi
8749 done
8750
8751
8752 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
8753 echo "configure:8754: checking for uid_t in sys/types.h" >&5
8754 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
8755   echo $ac_n "(cached) $ac_c" 1>&6
8756 else
8757   cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760 #include <sys/types.h>
8761 EOF
8762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8763   egrep "uid_t" >/dev/null 2>&1; then
8764   rm -rf conftest*
8765   ac_cv_type_uid_t=yes
8766 else
8767   rm -rf conftest*
8768   ac_cv_type_uid_t=no
8769 fi
8770 rm -f conftest*
8771
8772 fi
8773
8774 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
8775 if test $ac_cv_type_uid_t = no; then
8776   cat >> confdefs.h <<\EOF
8777 #define uid_t int
8778 EOF
8779
8780   cat >> confdefs.h <<\EOF
8781 #define gid_t int
8782 EOF
8783
8784 fi
8785
8786 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
8787 echo "configure:8788: checking type of array argument to getgroups" >&5
8788 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
8789   echo $ac_n "(cached) $ac_c" 1>&6
8790 else
8791   if test "$cross_compiling" = yes; then
8792   ac_cv_type_getgroups=cross
8793 else
8794   cat > conftest.$ac_ext <<EOF
8795 #line 8796 "configure"
8796 #include "confdefs.h"
8797
8798 /* Thanks to Mike Rendell for this test.  */
8799 #include <sys/types.h>
8800 #define NGID 256
8801 #undef MAX
8802 #define MAX(x, y) ((x) > (y) ? (x) : (y))
8803 main()
8804 {
8805   gid_t gidset[NGID];
8806   int i, n;
8807   union { gid_t gval; long lval; }  val;
8808
8809   val.lval = -1;
8810   for (i = 0; i < NGID; i++)
8811     gidset[i] = val.gval;
8812   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
8813                  gidset);
8814   /* Exit non-zero if getgroups seems to require an array of ints.  This
8815      happens when gid_t is short but getgroups modifies an array of ints.  */
8816   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
8817 }
8818
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8821 then
8822     ac_cv_type_getgroups=gid_t
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -fr conftest*
8827   ac_cv_type_getgroups=int
8828 fi
8829 rm -fr conftest*
8830 fi
8831
8832 if test $ac_cv_type_getgroups = cross; then
8833         cat > conftest.$ac_ext <<EOF
8834 #line 8835 "configure"
8835 #include "confdefs.h"
8836 #include <unistd.h>
8837 EOF
8838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8839   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
8840   rm -rf conftest*
8841   ac_cv_type_getgroups=gid_t
8842 else
8843   rm -rf conftest*
8844   ac_cv_type_getgroups=int
8845 fi
8846 rm -f conftest*
8847
8848 fi
8849 fi
8850
8851 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
8852 cat >> confdefs.h <<EOF
8853 #define GETGROUPS_T $ac_cv_type_getgroups
8854 EOF
8855
8856  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
8857 echo "configure:8858: checking for mode_t" >&5
8858 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 #include <sys/types.h>
8865 #if STDC_HEADERS
8866 #include <stdlib.h>
8867 #include <stddef.h>
8868 #endif
8869 EOF
8870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8871   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8872   rm -rf conftest*
8873   ac_cv_type_mode_t=yes
8874 else
8875   rm -rf conftest*
8876   ac_cv_type_mode_t=no
8877 fi
8878 rm -f conftest*
8879
8880 fi
8881 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
8882 if test $ac_cv_type_mode_t = no; then
8883   cat >> confdefs.h <<\EOF
8884 #define mode_t int
8885 EOF
8886
8887 fi
8888
8889 echo $ac_n "checking for off_t""... $ac_c" 1>&6
8890 echo "configure:8891: checking for off_t" >&5
8891 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
8892   echo $ac_n "(cached) $ac_c" 1>&6
8893 else
8894   cat > conftest.$ac_ext <<EOF
8895 #line 8896 "configure"
8896 #include "confdefs.h"
8897 #include <sys/types.h>
8898 #if STDC_HEADERS
8899 #include <stdlib.h>
8900 #include <stddef.h>
8901 #endif
8902 EOF
8903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8904   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8905   rm -rf conftest*
8906   ac_cv_type_off_t=yes
8907 else
8908   rm -rf conftest*
8909   ac_cv_type_off_t=no
8910 fi
8911 rm -f conftest*
8912
8913 fi
8914 echo "$ac_t""$ac_cv_type_off_t" 1>&6
8915 if test $ac_cv_type_off_t = no; then
8916   cat >> confdefs.h <<\EOF
8917 #define off_t long
8918 EOF
8919
8920 fi
8921
8922 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8923 echo "configure:8924: checking for pid_t" >&5
8924 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 #include <sys/types.h>
8931 #if STDC_HEADERS
8932 #include <stdlib.h>
8933 #include <stddef.h>
8934 #endif
8935 EOF
8936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8937   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8938   rm -rf conftest*
8939   ac_cv_type_pid_t=yes
8940 else
8941   rm -rf conftest*
8942   ac_cv_type_pid_t=no
8943 fi
8944 rm -f conftest*
8945
8946 fi
8947 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8948 if test $ac_cv_type_pid_t = no; then
8949   cat >> confdefs.h <<\EOF
8950 #define pid_t int
8951 EOF
8952
8953 fi
8954
8955 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
8956 echo "configure:8957: checking for ptrdiff_t" >&5
8957 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 #include <stddef.h>
8964 int main() {
8965 ptrdiff_t p
8966 ; return 0; }
8967 EOF
8968 if { (eval echo configure:8969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8969   rm -rf conftest*
8970   am_cv_type_ptrdiff_t=yes
8971 else
8972   echo "configure: failed program was:" >&5
8973   cat conftest.$ac_ext >&5
8974   rm -rf conftest*
8975   am_cv_type_ptrdiff_t=no
8976 fi
8977 rm -f conftest*
8978 fi
8979
8980 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
8981    if test $am_cv_type_ptrdiff_t = yes; then
8982      cat >> confdefs.h <<\EOF
8983 #define HAVE_PTRDIFF_T 1
8984 EOF
8985
8986    fi
8987
8988 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
8989 echo "configure:8990: checking return type of signal handlers" >&5
8990 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
8991   echo $ac_n "(cached) $ac_c" 1>&6
8992 else
8993   cat > conftest.$ac_ext <<EOF
8994 #line 8995 "configure"
8995 #include "confdefs.h"
8996 #include <sys/types.h>
8997 #include <signal.h>
8998 #ifdef signal
8999 #undef signal
9000 #endif
9001 #ifdef __cplusplus
9002 extern "C" void (*signal (int, void (*)(int)))(int);
9003 #else
9004 void (*signal ()) ();
9005 #endif
9006
9007 int main() {
9008 int i;
9009 ; return 0; }
9010 EOF
9011 if { (eval echo configure:9012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9012   rm -rf conftest*
9013   ac_cv_type_signal=void
9014 else
9015   echo "configure: failed program was:" >&5
9016   cat conftest.$ac_ext >&5
9017   rm -rf conftest*
9018   ac_cv_type_signal=int
9019 fi
9020 rm -f conftest*
9021 fi
9022
9023 echo "$ac_t""$ac_cv_type_signal" 1>&6
9024 cat >> confdefs.h <<EOF
9025 #define RETSIGTYPE $ac_cv_type_signal
9026 EOF
9027
9028
9029 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9030 echo "configure:9031: checking for sig_atomic_t" >&5
9031 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9032   echo $ac_n "(cached) $ac_c" 1>&6
9033 else
9034   cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037 #include <signal.h>
9038 int main() {
9039 sig_atomic_t atomic;
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9043   rm -rf conftest*
9044   ol_cv_type_sig_atomic_t=yes
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -rf conftest*
9049   ol_cv_type_sig_atomic_t=no
9050 fi
9051 rm -f conftest*
9052 fi
9053
9054 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9055   if test $ol_cv_type_sig_atomic_t = no; then
9056     cat >> confdefs.h <<\EOF
9057 #define sig_atomic_t int
9058 EOF
9059
9060   fi
9061  
9062 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9063 echo "configure:9064: checking for size_t" >&5
9064 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9065   echo $ac_n "(cached) $ac_c" 1>&6
9066 else
9067   cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070 #include <sys/types.h>
9071 #if STDC_HEADERS
9072 #include <stdlib.h>
9073 #include <stddef.h>
9074 #endif
9075 EOF
9076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9077   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9078   rm -rf conftest*
9079   ac_cv_type_size_t=yes
9080 else
9081   rm -rf conftest*
9082   ac_cv_type_size_t=no
9083 fi
9084 rm -f conftest*
9085
9086 fi
9087 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9088 if test $ac_cv_type_size_t = no; then
9089   cat >> confdefs.h <<\EOF
9090 #define size_t unsigned
9091 EOF
9092
9093 fi
9094
9095 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9096 echo "configure:9097: checking for st_blksize in struct stat" >&5
9097 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9098   echo $ac_n "(cached) $ac_c" 1>&6
9099 else
9100   cat > conftest.$ac_ext <<EOF
9101 #line 9102 "configure"
9102 #include "confdefs.h"
9103 #include <sys/types.h>
9104 #include <sys/stat.h>
9105 int main() {
9106 struct stat s; s.st_blksize;
9107 ; return 0; }
9108 EOF
9109 if { (eval echo configure:9110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9110   rm -rf conftest*
9111   ac_cv_struct_st_blksize=yes
9112 else
9113   echo "configure: failed program was:" >&5
9114   cat conftest.$ac_ext >&5
9115   rm -rf conftest*
9116   ac_cv_struct_st_blksize=no
9117 fi
9118 rm -f conftest*
9119 fi
9120
9121 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9122 if test $ac_cv_struct_st_blksize = yes; then
9123   cat >> confdefs.h <<\EOF
9124 #define HAVE_ST_BLKSIZE 1
9125 EOF
9126
9127 fi
9128
9129 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9130 echo "configure:9131: checking whether time.h and sys/time.h may both be included" >&5
9131 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9132   echo $ac_n "(cached) $ac_c" 1>&6
9133 else
9134   cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 #include <sys/types.h>
9138 #include <sys/time.h>
9139 #include <time.h>
9140 int main() {
9141 struct tm *tp;
9142 ; return 0; }
9143 EOF
9144 if { (eval echo configure:9145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9145   rm -rf conftest*
9146   ac_cv_header_time=yes
9147 else
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -rf conftest*
9151   ac_cv_header_time=no
9152 fi
9153 rm -f conftest*
9154 fi
9155
9156 echo "$ac_t""$ac_cv_header_time" 1>&6
9157 if test $ac_cv_header_time = yes; then
9158   cat >> confdefs.h <<\EOF
9159 #define TIME_WITH_SYS_TIME 1
9160 EOF
9161
9162 fi
9163
9164 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9165 echo "configure:9166: checking whether struct tm is in sys/time.h or time.h" >&5
9166 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9167   echo $ac_n "(cached) $ac_c" 1>&6
9168 else
9169   cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172 #include <sys/types.h>
9173 #include <time.h>
9174 int main() {
9175 struct tm *tp; tp->tm_sec;
9176 ; return 0; }
9177 EOF
9178 if { (eval echo configure:9179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9179   rm -rf conftest*
9180   ac_cv_struct_tm=time.h
9181 else
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   ac_cv_struct_tm=sys/time.h
9186 fi
9187 rm -f conftest*
9188 fi
9189
9190 echo "$ac_t""$ac_cv_struct_tm" 1>&6
9191 if test $ac_cv_struct_tm = sys/time.h; then
9192   cat >> confdefs.h <<\EOF
9193 #define TM_IN_SYS_TIME 1
9194 EOF
9195
9196 fi
9197
9198
9199
9200 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
9201 echo "configure:9202: checking if toupper() requires islower()" >&5
9202 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
9203   echo $ac_n "(cached) $ac_c" 1>&6
9204 else
9205   
9206         if test "$cross_compiling" = yes; then
9207   ol_cv_c_upper_lower=safe
9208 else
9209   cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212
9213 #include <ctype.h>
9214 main()
9215 {
9216         if ('C' == toupper('C'))
9217                 exit(0);
9218         else
9219                 exit(1);
9220 }
9221 EOF
9222 if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9223 then
9224   ol_cv_c_upper_lower=no
9225 else
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -fr conftest*
9229   ol_cv_c_upper_lower=yes
9230 fi
9231 rm -fr conftest*
9232 fi
9233
9234 fi
9235
9236 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
9237 if test $ol_cv_c_upper_lower != no ; then
9238         cat >> confdefs.h <<\EOF
9239 #define C_UPPER_LOWER 1
9240 EOF
9241
9242 fi
9243
9244 echo $ac_n "checking for working const""... $ac_c" 1>&6
9245 echo "configure:9246: checking for working const" >&5
9246 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
9247   echo $ac_n "(cached) $ac_c" 1>&6
9248 else
9249   cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252
9253 int main() {
9254
9255 /* Ultrix mips cc rejects this.  */
9256 typedef int charset[2]; const charset x;
9257 /* SunOS 4.1.1 cc rejects this.  */
9258 char const *const *ccp;
9259 char **p;
9260 /* NEC SVR4.0.2 mips cc rejects this.  */
9261 struct point {int x, y;};
9262 static struct point const zero = {0,0};
9263 /* AIX XL C 1.02.0.0 rejects this.
9264    It does not let you subtract one const X* pointer from another in an arm
9265    of an if-expression whose if-part is not a constant expression */
9266 const char *g = "string";
9267 ccp = &g + (g ? g-g : 0);
9268 /* HPUX 7.0 cc rejects these. */
9269 ++ccp;
9270 p = (char**) ccp;
9271 ccp = (char const *const *) p;
9272 { /* SCO 3.2v4 cc rejects this.  */
9273   char *t;
9274   char const *s = 0 ? (char *) 0 : (char const *) 0;
9275
9276   *t++ = 0;
9277 }
9278 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9279   int x[] = {25, 17};
9280   const int *foo = &x[0];
9281   ++foo;
9282 }
9283 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9284   typedef const int *iptr;
9285   iptr p = 0;
9286   ++p;
9287 }
9288 { /* AIX XL C 1.02.0.0 rejects this saying
9289      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9290   struct s { int j; const int *ap[3]; };
9291   struct s *b; b->j = 5;
9292 }
9293 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9294   const int foo = 10;
9295 }
9296
9297 ; return 0; }
9298 EOF
9299 if { (eval echo configure:9300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9300   rm -rf conftest*
9301   ac_cv_c_const=yes
9302 else
9303   echo "configure: failed program was:" >&5
9304   cat conftest.$ac_ext >&5
9305   rm -rf conftest*
9306   ac_cv_c_const=no
9307 fi
9308 rm -f conftest*
9309 fi
9310
9311 echo "$ac_t""$ac_cv_c_const" 1>&6
9312 if test $ac_cv_c_const = no; then
9313   cat >> confdefs.h <<\EOF
9314 #define const 
9315 EOF
9316
9317 fi
9318
9319 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
9320 echo "configure:9321: checking if compiler understands volatile" >&5
9321 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
9322   echo $ac_n "(cached) $ac_c" 1>&6
9323 else
9324   cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 int x, y, z;
9328 int main() {
9329 volatile int a; int * volatile b = x ? &y : &z;
9330       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
9331       *b = 0;
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9335   rm -rf conftest*
9336   ol_cv_c_volatile=yes
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   ol_cv_c_volatile=no
9342 fi
9343 rm -f conftest*
9344 fi
9345
9346 echo "$ac_t""$ol_cv_c_volatile" 1>&6
9347   if test $ol_cv_c_volatile = yes; then
9348     : 
9349   else
9350     cat >> confdefs.h <<\EOF
9351 #define volatile 
9352 EOF
9353
9354   fi
9355  
9356
9357 if test $cross_compiling = yes ; then
9358         cat >> confdefs.h <<\EOF
9359 #define CROSS_COMPILING 1
9360 EOF
9361
9362 else
9363         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
9364 echo "configure:9365: checking whether byte ordering is bigendian" >&5
9365 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
9366   echo $ac_n "(cached) $ac_c" 1>&6
9367 else
9368   ac_cv_c_bigendian=unknown
9369 # See if sys/param.h defines the BYTE_ORDER macro.
9370 cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 #include <sys/types.h>
9374 #include <sys/param.h>
9375 int main() {
9376
9377 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9378  bogus endian macros
9379 #endif
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9383   rm -rf conftest*
9384   # It does; now see whether it defined to BIG_ENDIAN or not.
9385 cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 #include <sys/types.h>
9389 #include <sys/param.h>
9390 int main() {
9391
9392 #if BYTE_ORDER != BIG_ENDIAN
9393  not big endian
9394 #endif
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9398   rm -rf conftest*
9399   ac_cv_c_bigendian=yes
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   ac_cv_c_bigendian=no
9405 fi
9406 rm -f conftest*
9407 else
9408   echo "configure: failed program was:" >&5
9409   cat conftest.$ac_ext >&5
9410 fi
9411 rm -f conftest*
9412 if test $ac_cv_c_bigendian = unknown; then
9413 if test "$cross_compiling" = yes; then
9414     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9415 else
9416   cat > conftest.$ac_ext <<EOF
9417 #line 9418 "configure"
9418 #include "confdefs.h"
9419 main () {
9420   /* Are we little or big endian?  From Harbison&Steele.  */
9421   union
9422   {
9423     long l;
9424     char c[sizeof (long)];
9425   } u;
9426   u.l = 1;
9427   exit (u.c[sizeof (long) - 1] == 1);
9428 }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9431 then
9432   ac_cv_c_bigendian=no
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -fr conftest*
9437   ac_cv_c_bigendian=yes
9438 fi
9439 rm -fr conftest*
9440 fi
9441
9442 fi
9443 fi
9444
9445 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
9446 if test $ac_cv_c_bigendian = yes; then
9447   cat >> confdefs.h <<\EOF
9448 #define WORDS_BIGENDIAN 1
9449 EOF
9450
9451 fi
9452
9453         echo $ac_n "checking size of short""... $ac_c" 1>&6
9454 echo "configure:9455: checking size of short" >&5
9455 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   if test "$cross_compiling" = yes; then
9459     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9460 else
9461   cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464 #include <stdio.h>
9465 main()
9466 {
9467   FILE *f=fopen("conftestval", "w");
9468   if (!f) exit(1);
9469   fprintf(f, "%d\n", sizeof(short));
9470   exit(0);
9471 }
9472 EOF
9473 if { (eval echo configure:9474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9474 then
9475   ac_cv_sizeof_short=`cat conftestval`
9476 else
9477   echo "configure: failed program was:" >&5
9478   cat conftest.$ac_ext >&5
9479   rm -fr conftest*
9480   ac_cv_sizeof_short=0
9481 fi
9482 rm -fr conftest*
9483 fi
9484
9485 fi
9486 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
9487 cat >> confdefs.h <<EOF
9488 #define SIZEOF_SHORT $ac_cv_sizeof_short
9489 EOF
9490
9491  
9492         echo $ac_n "checking size of int""... $ac_c" 1>&6
9493 echo "configure:9494: checking size of int" >&5
9494 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497   if test "$cross_compiling" = yes; then
9498     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 #include <stdio.h>
9504 main()
9505 {
9506   FILE *f=fopen("conftestval", "w");
9507   if (!f) exit(1);
9508   fprintf(f, "%d\n", sizeof(int));
9509   exit(0);
9510 }
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9513 then
9514   ac_cv_sizeof_int=`cat conftestval`
9515 else
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -fr conftest*
9519   ac_cv_sizeof_int=0
9520 fi
9521 rm -fr conftest*
9522 fi
9523
9524 fi
9525 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
9526 cat >> confdefs.h <<EOF
9527 #define SIZEOF_INT $ac_cv_sizeof_int
9528 EOF
9529
9530  
9531         echo $ac_n "checking size of long""... $ac_c" 1>&6
9532 echo "configure:9533: checking size of long" >&5
9533 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536   if test "$cross_compiling" = yes; then
9537     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9538 else
9539   cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 #include <stdio.h>
9543 main()
9544 {
9545   FILE *f=fopen("conftestval", "w");
9546   if (!f) exit(1);
9547   fprintf(f, "%d\n", sizeof(long));
9548   exit(0);
9549 }
9550 EOF
9551 if { (eval echo configure:9552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9552 then
9553   ac_cv_sizeof_long=`cat conftestval`
9554 else
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557   rm -fr conftest*
9558   ac_cv_sizeof_long=0
9559 fi
9560 rm -fr conftest*
9561 fi
9562
9563 fi
9564 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
9565 cat >> confdefs.h <<EOF
9566 #define SIZEOF_LONG $ac_cv_sizeof_long
9567 EOF
9568
9569
9570 fi
9571
9572 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
9573 echo "configure:9574: checking for 8-bit clean memcmp" >&5
9574 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
9575   echo $ac_n "(cached) $ac_c" 1>&6
9576 else
9577   if test "$cross_compiling" = yes; then
9578   ac_cv_func_memcmp_clean=no
9579 else
9580   cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583
9584 main()
9585 {
9586   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
9587   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
9588 }
9589
9590 EOF
9591 if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9592 then
9593   ac_cv_func_memcmp_clean=yes
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -fr conftest*
9598   ac_cv_func_memcmp_clean=no
9599 fi
9600 rm -fr conftest*
9601 fi
9602
9603 fi
9604
9605 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
9606 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
9607
9608 echo $ac_n "checking for strftime""... $ac_c" 1>&6
9609 echo "configure:9610: checking for strftime" >&5
9610 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
9611   echo $ac_n "(cached) $ac_c" 1>&6
9612 else
9613   cat > conftest.$ac_ext <<EOF
9614 #line 9615 "configure"
9615 #include "confdefs.h"
9616 /* System header to define __stub macros and hopefully few prototypes,
9617     which can conflict with char strftime(); below.  */
9618 #include <assert.h>
9619 /* Override any gcc2 internal prototype to avoid an error.  */
9620 /* We use char because int might match the return type of a gcc2
9621     builtin and then its argument prototype would still apply.  */
9622 char strftime();
9623
9624 int main() {
9625
9626 /* The GNU C library defines this for functions which it implements
9627     to always fail with ENOSYS.  Some functions are actually named
9628     something starting with __ and the normal name is an alias.  */
9629 #if defined (__stub_strftime) || defined (__stub___strftime)
9630 choke me
9631 #else
9632 strftime();
9633 #endif
9634
9635 ; return 0; }
9636 EOF
9637 if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9638   rm -rf conftest*
9639   eval "ac_cv_func_strftime=yes"
9640 else
9641   echo "configure: failed program was:" >&5
9642   cat conftest.$ac_ext >&5
9643   rm -rf conftest*
9644   eval "ac_cv_func_strftime=no"
9645 fi
9646 rm -f conftest*
9647 fi
9648
9649 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
9650   echo "$ac_t""yes" 1>&6
9651   cat >> confdefs.h <<\EOF
9652 #define HAVE_STRFTIME 1
9653 EOF
9654
9655 else
9656   echo "$ac_t""no" 1>&6
9657 # strftime is in -lintl on SCO UNIX.
9658 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
9659 echo "configure:9660: checking for strftime in -lintl" >&5
9660 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
9661 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   ac_save_LIBS="$LIBS"
9665 LIBS="-lintl  $LIBS"
9666 cat > conftest.$ac_ext <<EOF
9667 #line 9668 "configure"
9668 #include "confdefs.h"
9669 /* Override any gcc2 internal prototype to avoid an error.  */
9670 /* We use char because int might match the return type of a gcc2
9671     builtin and then its argument prototype would still apply.  */
9672 char strftime();
9673
9674 int main() {
9675 strftime()
9676 ; return 0; }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9679   rm -rf conftest*
9680   eval "ac_cv_lib_$ac_lib_var=yes"
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -rf conftest*
9685   eval "ac_cv_lib_$ac_lib_var=no"
9686 fi
9687 rm -f conftest*
9688 LIBS="$ac_save_LIBS"
9689
9690 fi
9691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9692   echo "$ac_t""yes" 1>&6
9693   cat >> confdefs.h <<\EOF
9694 #define HAVE_STRFTIME 1
9695 EOF
9696
9697 LIBS="-lintl $LIBS"
9698 else
9699   echo "$ac_t""no" 1>&6
9700 fi
9701
9702 fi
9703
9704 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
9705 echo "configure:9706: checking for vprintf" >&5
9706 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
9707   echo $ac_n "(cached) $ac_c" 1>&6
9708 else
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* System header to define __stub macros and hopefully few prototypes,
9713     which can conflict with char vprintf(); below.  */
9714 #include <assert.h>
9715 /* Override any gcc2 internal prototype to avoid an error.  */
9716 /* We use char because int might match the return type of a gcc2
9717     builtin and then its argument prototype would still apply.  */
9718 char vprintf();
9719
9720 int main() {
9721
9722 /* The GNU C library defines this for functions which it implements
9723     to always fail with ENOSYS.  Some functions are actually named
9724     something starting with __ and the normal name is an alias.  */
9725 #if defined (__stub_vprintf) || defined (__stub___vprintf)
9726 choke me
9727 #else
9728 vprintf();
9729 #endif
9730
9731 ; return 0; }
9732 EOF
9733 if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9734   rm -rf conftest*
9735   eval "ac_cv_func_vprintf=yes"
9736 else
9737   echo "configure: failed program was:" >&5
9738   cat conftest.$ac_ext >&5
9739   rm -rf conftest*
9740   eval "ac_cv_func_vprintf=no"
9741 fi
9742 rm -f conftest*
9743 fi
9744
9745 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
9746   echo "$ac_t""yes" 1>&6
9747   cat >> confdefs.h <<\EOF
9748 #define HAVE_VPRINTF 1
9749 EOF
9750
9751 else
9752   echo "$ac_t""no" 1>&6
9753 fi
9754
9755 if test "$ac_cv_func_vprintf" != yes; then
9756 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
9757 echo "configure:9758: checking for _doprnt" >&5
9758 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
9759   echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761   cat > conftest.$ac_ext <<EOF
9762 #line 9763 "configure"
9763 #include "confdefs.h"
9764 /* System header to define __stub macros and hopefully few prototypes,
9765     which can conflict with char _doprnt(); below.  */
9766 #include <assert.h>
9767 /* Override any gcc2 internal prototype to avoid an error.  */
9768 /* We use char because int might match the return type of a gcc2
9769     builtin and then its argument prototype would still apply.  */
9770 char _doprnt();
9771
9772 int main() {
9773
9774 /* The GNU C library defines this for functions which it implements
9775     to always fail with ENOSYS.  Some functions are actually named
9776     something starting with __ and the normal name is an alias.  */
9777 #if defined (__stub__doprnt) || defined (__stub____doprnt)
9778 choke me
9779 #else
9780 _doprnt();
9781 #endif
9782
9783 ; return 0; }
9784 EOF
9785 if { (eval echo configure:9786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9786   rm -rf conftest*
9787   eval "ac_cv_func__doprnt=yes"
9788 else
9789   echo "configure: failed program was:" >&5
9790   cat conftest.$ac_ext >&5
9791   rm -rf conftest*
9792   eval "ac_cv_func__doprnt=no"
9793 fi
9794 rm -f conftest*
9795 fi
9796
9797 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
9798   echo "$ac_t""yes" 1>&6
9799   cat >> confdefs.h <<\EOF
9800 #define HAVE_DOPRNT 1
9801 EOF
9802
9803 else
9804   echo "$ac_t""no" 1>&6
9805 fi
9806
9807 fi
9808
9809
9810 if test $ac_cv_func_vprintf = yes ; then
9811                 for ac_func in vsnprintf vsprintf
9812 do
9813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9814 echo "configure:9815: checking for $ac_func" >&5
9815 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9816   echo $ac_n "(cached) $ac_c" 1>&6
9817 else
9818   cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 /* System header to define __stub macros and hopefully few prototypes,
9822     which can conflict with char $ac_func(); below.  */
9823 #include <assert.h>
9824 /* Override any gcc2 internal prototype to avoid an error.  */
9825 /* We use char because int might match the return type of a gcc2
9826     builtin and then its argument prototype would still apply.  */
9827 char $ac_func();
9828
9829 int main() {
9830
9831 /* The GNU C library defines this for functions which it implements
9832     to always fail with ENOSYS.  Some functions are actually named
9833     something starting with __ and the normal name is an alias.  */
9834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9835 choke me
9836 #else
9837 $ac_func();
9838 #endif
9839
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9843   rm -rf conftest*
9844   eval "ac_cv_func_$ac_func=yes"
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   eval "ac_cv_func_$ac_func=no"
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9855   echo "$ac_t""yes" 1>&6
9856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9857   cat >> confdefs.h <<EOF
9858 #define $ac_tr_func 1
9859 EOF
9860  
9861 else
9862   echo "$ac_t""no" 1>&6
9863 fi
9864 done
9865
9866 fi
9867
9868 for ac_func in \
9869         bcopy                   \
9870         flock                   \
9871         getdtablesize           \
9872         gethostname             \
9873         getpass                 \
9874         getpwuid                \
9875         gettimeofday            \
9876         lockf                   \
9877         memcpy                  \
9878         memmove                 \
9879         mkstemp                 \
9880         select                  \
9881         setpwfile               \
9882         setsid                  \
9883         signal                  \
9884         sigset                  \
9885         snprintf                \
9886         socket                  \
9887         strdup                  \
9888         strerror                \
9889         strpbrk                 \
9890         strrchr                 \
9891         strsep                  \
9892         strstr                  \
9893         strtol                  \
9894         strtoul                 \
9895         strspn                  \
9896         sysconf                 \
9897         waitpid                 \
9898
9899 do
9900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9901 echo "configure:9902: checking for $ac_func" >&5
9902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908 /* System header to define __stub macros and hopefully few prototypes,
9909     which can conflict with char $ac_func(); below.  */
9910 #include <assert.h>
9911 /* Override any gcc2 internal prototype to avoid an error.  */
9912 /* We use char because int might match the return type of a gcc2
9913     builtin and then its argument prototype would still apply.  */
9914 char $ac_func();
9915
9916 int main() {
9917
9918 /* The GNU C library defines this for functions which it implements
9919     to always fail with ENOSYS.  Some functions are actually named
9920     something starting with __ and the normal name is an alias.  */
9921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9922 choke me
9923 #else
9924 $ac_func();
9925 #endif
9926
9927 ; return 0; }
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9930   rm -rf conftest*
9931   eval "ac_cv_func_$ac_func=yes"
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   eval "ac_cv_func_$ac_func=no"
9937 fi
9938 rm -f conftest*
9939 fi
9940
9941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9944   cat >> confdefs.h <<EOF
9945 #define $ac_tr_func 1
9946 EOF
9947  
9948 else
9949   echo "$ac_t""no" 1>&6
9950 fi
9951 done
9952
9953
9954 for ac_func in getopt tempnam
9955 do
9956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9957 echo "configure:9958: checking for $ac_func" >&5
9958 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9959   echo $ac_n "(cached) $ac_c" 1>&6
9960 else
9961   cat > conftest.$ac_ext <<EOF
9962 #line 9963 "configure"
9963 #include "confdefs.h"
9964 /* System header to define __stub macros and hopefully few prototypes,
9965     which can conflict with char $ac_func(); below.  */
9966 #include <assert.h>
9967 /* Override any gcc2 internal prototype to avoid an error.  */
9968 /* We use char because int might match the return type of a gcc2
9969     builtin and then its argument prototype would still apply.  */
9970 char $ac_func();
9971
9972 int main() {
9973
9974 /* The GNU C library defines this for functions which it implements
9975     to always fail with ENOSYS.  Some functions are actually named
9976     something starting with __ and the normal name is an alias.  */
9977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9978 choke me
9979 #else
9980 $ac_func();
9981 #endif
9982
9983 ; return 0; }
9984 EOF
9985 if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9986   rm -rf conftest*
9987   eval "ac_cv_func_$ac_func=yes"
9988 else
9989   echo "configure: failed program was:" >&5
9990   cat conftest.$ac_ext >&5
9991   rm -rf conftest*
9992   eval "ac_cv_func_$ac_func=no"
9993 fi
9994 rm -f conftest*
9995 fi
9996
9997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9998   echo "$ac_t""yes" 1>&6
9999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10000   cat >> confdefs.h <<EOF
10001 #define $ac_tr_func 1
10002 EOF
10003  
10004 else
10005   echo "$ac_t""no" 1>&6
10006 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10007 fi
10008 done
10009
10010
10011
10012 # Check Configuration
10013
10014 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10015 echo "configure:10016: checking declaration of sys_errlist" >&5
10016 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10017   echo $ac_n "(cached) $ac_c" 1>&6
10018 else
10019   
10020         cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023
10024 #include <stdio.h>
10025 #include <sys/types.h>
10026 #include <errno.h> 
10027 int main() {
10028 char *c = (char *) *sys_errlist
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10032   rm -rf conftest*
10033   ol_cv_dcl_sys_errlist=yes
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   ol_cv_dcl_sys_errlist=no
10039 fi
10040 rm -f conftest*
10041 fi
10042
10043 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10044 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10045 if test $ol_cv_dcl_sys_errlist = no ; then
10046         cat >> confdefs.h <<\EOF
10047 #define DECL_SYS_ERRLIST 1
10048 EOF
10049
10050         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10051 echo "configure:10052: checking existence of sys_errlist" >&5
10052         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10053   echo $ac_n "(cached) $ac_c" 1>&6
10054 else
10055   
10056                 cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 #include <errno.h>
10060 int main() {
10061 char *c = (char *) *sys_errlist
10062 ; return 0; }
10063 EOF
10064 if { (eval echo configure:10065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10065   rm -rf conftest*
10066   ol_cv_have_sys_errlist=yes
10067 else
10068   echo "configure: failed program was:" >&5
10069   cat conftest.$ac_ext >&5
10070   rm -rf conftest*
10071   ol_cv_have_sys_errlist=no
10072 fi
10073 rm -f conftest*
10074 fi
10075
10076         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10077         if test $ol_cv_have_sys_errlist = yes ; then
10078                 cat >> confdefs.h <<\EOF
10079 #define HAVE_SYS_ERRLIST 1
10080 EOF
10081
10082         fi
10083 fi
10084
10085
10086
10087 if test "$ol_enable_debug" != no ; then
10088         cat >> confdefs.h <<\EOF
10089 #define LDAP_DEBUG 1
10090 EOF
10091
10092 fi
10093 if test "$ol_enable_syslog" = yes ; then
10094         cat >> confdefs.h <<\EOF
10095 #define LDAP_SYSLOG 1
10096 EOF
10097
10098 fi
10099 if test "$ol_enable_libui" = yes ; then
10100         cat >> confdefs.h <<\EOF
10101 #define LDAP_LIBUI 1
10102 EOF
10103
10104 fi
10105 if test "$ol_enable_cache" = no ; then
10106         cat >> confdefs.h <<\EOF
10107 #define LDAP_NOCACHE 1
10108 EOF
10109
10110 fi
10111 if test "$ol_enable_dns" != no ; then
10112         cat >> confdefs.h <<\EOF
10113 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
10114 EOF
10115
10116 fi
10117 if test "$ol_enable_proctitle" != no ; then
10118         cat >> confdefs.h <<\EOF
10119 #define LDAP_PROCTITLE 1
10120 EOF
10121
10122 fi
10123 if test "$ol_enable_referrals" != no ; then
10124         cat >> confdefs.h <<\EOF
10125 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
10126 EOF
10127
10128 fi
10129 if test "$ol_enable_cldap" != no ; then
10130         cat >> confdefs.h <<\EOF
10131 #define LDAP_CONNECTIONLESS 1
10132 EOF
10133
10134 fi
10135
10136 if test "$ol_enable_aclgroups" != no ; then
10137         cat >> confdefs.h <<\EOF
10138 #define SLAPD_ACLGROUPS 1
10139 EOF
10140
10141 fi
10142 if test "$ol_enable_crypt" != no ; then
10143         cat >> confdefs.h <<\EOF
10144 #define SLAPD_CRYPT 1
10145 EOF
10146
10147 fi
10148 if test "$ol_enable_cleartext" != no ; then
10149         cat >> confdefs.h <<\EOF
10150 #define SLAPD_CLEARTEXT 1
10151 EOF
10152
10153 fi
10154 if test "$ol_enable_phonetic" != no ; then
10155         cat >> confdefs.h <<\EOF
10156 #define SLAPD_PHONETIC 1
10157 EOF
10158
10159 fi
10160 if test "$ol_enable_rlookups" != no ; then
10161         cat >> confdefs.h <<\EOF
10162 #define SLAPD_RLOOKUPS 1
10163 EOF
10164
10165 fi
10166
10167 if test "$ol_link_bdb2" != no ; then
10168         cat >> confdefs.h <<\EOF
10169 #define SLAPD_BDB2 1
10170 EOF
10171
10172         BUILD_SLAPD=yes
10173         BUILD_BDB2=yes
10174 fi
10175
10176 if test "$ol_link_ldbm" != no ; then
10177         cat >> confdefs.h <<\EOF
10178 #define SLAPD_LDBM 1
10179 EOF
10180
10181         BUILD_SLAPD=yes
10182         BUILD_LDBM=yes
10183 fi
10184
10185 if test "$ol_enable_passwd" != no ; then
10186         cat >> confdefs.h <<\EOF
10187 #define SLAPD_PASSWD 1
10188 EOF
10189
10190         BUILD_SLAPD=yes
10191         BUILD_PASSWD=yes
10192 fi
10193
10194 if test "$ol_enable_perl" != no ; then
10195         cat >> confdefs.h <<\EOF
10196 #define SLAPD_PERL 1
10197 EOF
10198
10199         BUILD_SLAPD=yes
10200         BUILD_PERL=yes
10201 fi
10202
10203 if test "$ol_enable_shell" != no ; then
10204         cat >> confdefs.h <<\EOF
10205 #define SLAPD_SHELL 1
10206 EOF
10207
10208         BUILD_SLAPD=yes
10209         BUILD_SHELL=yes
10210 fi
10211
10212 if test "$ol_enable_tcl" != no ; then
10213         cat >> confdefs.h <<\EOF
10214 #define SLAPD_TCL 1
10215 EOF
10216
10217         BUILD_SLAPD=yes
10218         BUILD_TCL=yes
10219 fi
10220
10221 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
10222         $BUILD_SLAPD = yes ; then
10223         BUILD_SLURPD=yes
10224 fi
10225
10226 if test "$ol_link_isode" != no ; then
10227         BUILD_LDAPD=yes
10228 fi
10229
10230
10231
10232
10233   
10234   
10235   
10236   
10237   
10238   
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258 trap '' 1 2 15
10259 cat > confcache <<\EOF
10260 # This file is a shell script that caches the results of configure
10261 # tests run on this system so they can be shared between configure
10262 # scripts and configure runs.  It is not useful on other systems.
10263 # If it contains results you don't want to keep, you may remove or edit it.
10264 #
10265 # By default, configure uses ./config.cache as the cache file,
10266 # creating it if it does not exist already.  You can give configure
10267 # the --cache-file=FILE option to use a different cache file; that is
10268 # what configure does when it calls configure scripts in
10269 # subdirectories, so they share the cache.
10270 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10271 # config.status only pays attention to the cache file if you give it the
10272 # --recheck option to rerun configure.
10273 #
10274 EOF
10275 # The following way of writing the cache mishandles newlines in values,
10276 # but we know of no workaround that is simple, portable, and efficient.
10277 # So, don't put newlines in cache variables' values.
10278 # Ultrix sh set writes to stderr and can't be redirected directly,
10279 # and sets the high bit in the cache file unless we assign to the vars.
10280 (set) 2>&1 |
10281   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10282   *ac_space=\ *)
10283     # `set' does not quote correctly, so add quotes (double-quote substitution
10284     # turns \\\\ into \\, and sed turns \\ into \).
10285     sed -n \
10286       -e "s/'/'\\\\''/g" \
10287       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10288     ;;
10289   *)
10290     # `set' quotes correctly as required by POSIX, so do not add quotes.
10291     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10292     ;;
10293   esac >> confcache
10294 if cmp -s $cache_file confcache; then
10295   :
10296 else
10297   if test -w $cache_file; then
10298     echo "updating cache $cache_file"
10299     cat confcache > $cache_file
10300   else
10301     echo "not updating unwritable cache $cache_file"
10302   fi
10303 fi
10304 rm -f confcache
10305
10306 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10307
10308 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10309 # Let make expand exec_prefix.
10310 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10311
10312 # Any assignment to VPATH causes Sun make to only execute
10313 # the first set of double-colon rules, so remove it if not needed.
10314 # If there is a colon in the path, we need to keep it.
10315 if test "x$srcdir" = x.; then
10316   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10317 fi
10318
10319 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10320
10321 DEFS=-DHAVE_CONFIG_H
10322
10323 # Without the "./", some shells look in PATH for config.status.
10324 : ${CONFIG_STATUS=./config.status}
10325
10326 echo creating $CONFIG_STATUS
10327 rm -f $CONFIG_STATUS
10328 cat > $CONFIG_STATUS <<EOF
10329 #! /bin/sh
10330 # Generated automatically by configure.
10331 # Run this file to recreate the current configuration.
10332 # This directory was configured as follows,
10333 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10334 #
10335 # $0 $ac_configure_args
10336 #
10337 # Compiler output produced by configure, useful for debugging
10338 # configure, is in ./config.log if it exists.
10339
10340 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10341 for ac_option
10342 do
10343   case "\$ac_option" in
10344   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10345     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10346     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10347   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10348     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10349     exit 0 ;;
10350   -help | --help | --hel | --he | --h)
10351     echo "\$ac_cs_usage"; exit 0 ;;
10352   *) echo "\$ac_cs_usage"; exit 1 ;;
10353   esac
10354 done
10355
10356 ac_given_srcdir=$srcdir
10357 ac_given_INSTALL="$INSTALL"
10358
10359 trap 'rm -fr `echo "\
10360 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10361 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10362 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10363 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10364 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10365 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10366 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10367 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10368 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10369 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10370 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10371 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10372 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10373 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10374 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10375 include/Makefile:build/top.mk:include/Makefile.in \
10376 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10377 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10378 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10379 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10380 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10381 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10382 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10383 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10384 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10385 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10386 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10387 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10388 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10389 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10390 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10391 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10392 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10393 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10394 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10395 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10396 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10397 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10398 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10399 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10400  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10401 EOF
10402 cat >> $CONFIG_STATUS <<EOF
10403
10404 # Protect against being on the right side of a sed subst in config.status.
10405 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10406  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10407 $ac_vpsub
10408 $extrasub
10409 s%@SHELL@%$SHELL%g
10410 s%@CFLAGS@%$CFLAGS%g
10411 s%@CPPFLAGS@%$CPPFLAGS%g
10412 s%@CXXFLAGS@%$CXXFLAGS%g
10413 s%@FFLAGS@%$FFLAGS%g
10414 s%@DEFS@%$DEFS%g
10415 s%@LDFLAGS@%$LDFLAGS%g
10416 s%@LIBS@%$LIBS%g
10417 s%@exec_prefix@%$exec_prefix%g
10418 s%@prefix@%$prefix%g
10419 s%@program_transform_name@%$program_transform_name%g
10420 s%@bindir@%$bindir%g
10421 s%@sbindir@%$sbindir%g
10422 s%@libexecdir@%$libexecdir%g
10423 s%@datadir@%$datadir%g
10424 s%@sysconfdir@%$sysconfdir%g
10425 s%@sharedstatedir@%$sharedstatedir%g
10426 s%@localstatedir@%$localstatedir%g
10427 s%@libdir@%$libdir%g
10428 s%@includedir@%$includedir%g
10429 s%@oldincludedir@%$oldincludedir%g
10430 s%@infodir@%$infodir%g
10431 s%@mandir@%$mandir%g
10432 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10433 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10434 s%@INSTALL_DATA@%$INSTALL_DATA%g
10435 s%@PACKAGE@%$PACKAGE%g
10436 s%@VERSION@%$VERSION%g
10437 s%@ACLOCAL@%$ACLOCAL%g
10438 s%@AUTOCONF@%$AUTOCONF%g
10439 s%@AUTOMAKE@%$AUTOMAKE%g
10440 s%@AUTOHEADER@%$AUTOHEADER%g
10441 s%@MAKEINFO@%$MAKEINFO%g
10442 s%@SET_MAKE@%$SET_MAKE%g
10443 s%@top_builddir@%$top_builddir%g
10444 s%@ldap_subdir@%$ldap_subdir%g
10445 s%@host@%$host%g
10446 s%@host_alias@%$host_alias%g
10447 s%@host_cpu@%$host_cpu%g
10448 s%@host_vendor@%$host_vendor%g
10449 s%@host_os@%$host_os%g
10450 s%@RANLIB@%$RANLIB%g
10451 s%@CC@%$CC%g
10452 s%@LD@%$LD%g
10453 s%@NM@%$NM%g
10454 s%@LN_S@%$LN_S%g
10455 s%@LIBTOOL@%$LIBTOOL%g
10456 s%@AWK@%$AWK%g
10457 s%@LN_H@%$LN_H%g
10458 s%@SENDMAIL@%$SENDMAIL%g
10459 s%@EDITOR@%$EDITOR%g
10460 s%@FINGER@%$FINGER%g
10461 s%@PERLBIN@%$PERLBIN%g
10462 s%@CPP@%$CPP%g
10463 s%@EXEEXT@%$EXEEXT%g
10464 s%@OBJEXT@%$OBJEXT%g
10465 s%@PEPSY@%$PEPSY%g
10466 s%@LIBOBJS@%$LIBOBJS%g
10467 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
10468 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
10469 s%@BUILD_BDB2@%$BUILD_BDB2%g
10470 s%@BUILD_LDBM@%$BUILD_LDBM%g
10471 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
10472 s%@BUILD_PERL@%$BUILD_PERL%g
10473 s%@BUILD_SHELL@%$BUILD_SHELL%g
10474 s%@BUILD_TCL@%$BUILD_TCL%g
10475 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
10476 s%@LDAP_LIBS@%$LDAP_LIBS%g
10477 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
10478 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
10479 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
10480 s%@LDBM_LIBS@%$LDBM_LIBS%g
10481 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
10482 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
10483 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
10484 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
10485 s%@KRB_LIBS@%$KRB_LIBS%g
10486 s%@READLINE_LIBS@%$READLINE_LIBS%g
10487 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
10488 s%@TLS_LIBS@%$TLS_LIBS%g
10489
10490 CEOF
10491 EOF
10492
10493 cat >> $CONFIG_STATUS <<\EOF
10494
10495 # Split the substitutions into bite-sized pieces for seds with
10496 # small command number limits, like on Digital OSF/1 and HP-UX.
10497 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10498 ac_file=1 # Number of current file.
10499 ac_beg=1 # First line for current file.
10500 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10501 ac_more_lines=:
10502 ac_sed_cmds=""
10503 while $ac_more_lines; do
10504   if test $ac_beg -gt 1; then
10505     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10506   else
10507     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10508   fi
10509   if test ! -s conftest.s$ac_file; then
10510     ac_more_lines=false
10511     rm -f conftest.s$ac_file
10512   else
10513     if test -z "$ac_sed_cmds"; then
10514       ac_sed_cmds="sed -f conftest.s$ac_file"
10515     else
10516       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10517     fi
10518     ac_file=`expr $ac_file + 1`
10519     ac_beg=$ac_end
10520     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10521   fi
10522 done
10523 if test -z "$ac_sed_cmds"; then
10524   ac_sed_cmds=cat
10525 fi
10526 EOF
10527
10528 cat >> $CONFIG_STATUS <<EOF
10529
10530 CONFIG_FILES=\${CONFIG_FILES-"\
10531 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10532 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10533 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10534 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10535 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10536 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10537 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10538 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10539 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10540 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10541 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10542 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10543 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10544 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10545 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10546 include/Makefile:build/top.mk:include/Makefile.in \
10547 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10548 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10549 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10550 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10551 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10552 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10553 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10554 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10555 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10556 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10557 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10558 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10559 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10560 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10561 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10562 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10563 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10564 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10565 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10566 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10567 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10568 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10569 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10570 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10571 "}
10572 EOF
10573 cat >> $CONFIG_STATUS <<\EOF
10574 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10575   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10576   case "$ac_file" in
10577   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10578        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10579   *) ac_file_in="${ac_file}.in" ;;
10580   esac
10581
10582   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10583
10584   # Remove last slash and all that follows it.  Not all systems have dirname.
10585   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10586   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10587     # The file is in a subdirectory.
10588     test ! -d "$ac_dir" && mkdir "$ac_dir"
10589     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10590     # A "../" for each directory in $ac_dir_suffix.
10591     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10592   else
10593     ac_dir_suffix= ac_dots=
10594   fi
10595
10596   case "$ac_given_srcdir" in
10597   .)  srcdir=.
10598       if test -z "$ac_dots"; then top_srcdir=.
10599       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10600   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10601   *) # Relative path.
10602     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10603     top_srcdir="$ac_dots$ac_given_srcdir" ;;
10604   esac
10605
10606   case "$ac_given_INSTALL" in
10607   [/$]*) INSTALL="$ac_given_INSTALL" ;;
10608   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10609   esac
10610
10611   echo creating "$ac_file"
10612   rm -f "$ac_file"
10613   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10614   case "$ac_file" in
10615   *Makefile*) ac_comsub="1i\\
10616 # $configure_input" ;;
10617   *) ac_comsub= ;;
10618   esac
10619
10620   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10621   sed -e "$ac_comsub
10622 s%@configure_input@%$configure_input%g
10623 s%@srcdir@%$srcdir%g
10624 s%@top_srcdir@%$top_srcdir%g
10625 s%@INSTALL@%$INSTALL%g
10626 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10627 fi; done
10628 rm -f conftest.s*
10629
10630 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10631 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10632 #
10633 # ac_d sets the value in "#define NAME VALUE" lines.
10634 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
10635 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
10636 ac_dC='\3'
10637 ac_dD='%g'
10638 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10639 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10640 ac_uB='\([      ]\)%\1#\2define\3'
10641 ac_uC=' '
10642 ac_uD='\4%g'
10643 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10644 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10645 ac_eB='$%\1#\2define\3'
10646 ac_eC=' '
10647 ac_eD='%g'
10648
10649 if test "${CONFIG_HEADERS+set}" != set; then
10650 EOF
10651 cat >> $CONFIG_STATUS <<EOF
10652   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
10653 EOF
10654 cat >> $CONFIG_STATUS <<\EOF
10655 fi
10656 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10657   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10658   case "$ac_file" in
10659   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10660        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10661   *) ac_file_in="${ac_file}.in" ;;
10662   esac
10663
10664   echo creating $ac_file
10665
10666   rm -f conftest.frag conftest.in conftest.out
10667   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10668   cat $ac_file_inputs > conftest.in
10669
10670 EOF
10671
10672 # Transform confdefs.h into a sed script conftest.vals that substitutes
10673 # the proper values into config.h.in to produce config.h.  And first:
10674 # Protect against being on the right side of a sed subst in config.status.
10675 # Protect against being in an unquoted here document in config.status.
10676 rm -f conftest.vals
10677 cat > conftest.hdr <<\EOF
10678 s/[\\&%]/\\&/g
10679 s%[\\$`]%\\&%g
10680 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10681 s%ac_d%ac_u%gp
10682 s%ac_u%ac_e%gp
10683 EOF
10684 sed -n -f conftest.hdr confdefs.h > conftest.vals
10685 rm -f conftest.hdr
10686
10687 # This sed command replaces #undef with comments.  This is necessary, for
10688 # example, in the case of _POSIX_SOURCE, which is predefined and required
10689 # on some systems where configure will not decide to define it.
10690 cat >> conftest.vals <<\EOF
10691 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10692 EOF
10693
10694 # Break up conftest.vals because some shells have a limit on
10695 # the size of here documents, and old seds have small limits too.
10696
10697 rm -f conftest.tail
10698 while :
10699 do
10700   ac_lines=`grep -c . conftest.vals`
10701   # grep -c gives empty output for an empty file on some AIX systems.
10702   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10703   # Write a limited-size here document to conftest.frag.
10704   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10705   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10706   echo 'CEOF
10707   sed -f conftest.frag conftest.in > conftest.out
10708   rm -f conftest.in
10709   mv conftest.out conftest.in
10710 ' >> $CONFIG_STATUS
10711   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10712   rm -f conftest.vals
10713   mv conftest.tail conftest.vals
10714 done
10715 rm -f conftest.vals
10716
10717 cat >> $CONFIG_STATUS <<\EOF
10718   rm -f conftest.frag conftest.h
10719   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
10720   cat conftest.in >> conftest.h
10721   rm -f conftest.in
10722   if cmp -s $ac_file conftest.h 2>/dev/null; then
10723     echo "$ac_file is unchanged"
10724     rm -f conftest.h
10725   else
10726     # Remove last slash and all that follows it.  Not all systems have dirname.
10727       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10728       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10729       # The file is in a subdirectory.
10730       test ! -d "$ac_dir" && mkdir "$ac_dir"
10731     fi
10732     rm -f $ac_file
10733     mv conftest.h $ac_file
10734   fi
10735 fi; done
10736
10737 EOF
10738 cat >> $CONFIG_STATUS <<EOF
10739
10740 EOF
10741 cat >> $CONFIG_STATUS <<\EOF
10742
10743 date > stamp-h
10744 echo Please \"make depend\" to build dependencies
10745
10746 exit 0
10747 EOF
10748 chmod +x $CONFIG_STATUS
10749 rm -fr confdefs* $ac_clean_files
10750 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10751