]> git.sur5r.net Git - openldap/blob - configure
Share unlock and return between true and false paths.
[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 mdbm 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 = mdbm -a \
1674                 $ol_with_ldbm_type = btree ; then
1675                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1676         fi
1677         if test $ol_with_ldbm_api = ndbm -a \
1678                 $ol_with_ldbm_type = btree ; then
1679                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1680         fi
1681 fi
1682
1683 if test $ol_enable_slurpd = yes ; then
1684                 if test $ol_with_threads = no ; then
1685                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1686         fi
1687 fi
1688
1689 echo "$ac_t""done" 1>&6
1690
1691 ## Initialize vars
1692 LDAP_LIBS=
1693 LDBM_LIBS=
1694 LTHREAD_LIBS=
1695 LUTIL_LIBS=
1696
1697 LDAPD_LIBS=
1698 SLAPD_LIBS=
1699 SLURPD_LIBS=
1700
1701 BUILD_LDAPD=no
1702 BUILD_SLAPD=no
1703 BUILD_SLURPD=no
1704
1705 BUILD_BDB2=no
1706 BUILD_LDBM=no
1707 BUILD_PASSWD=no
1708 BUILD_PERL=no
1709 BUILD_SHELL=no
1710 BUILD_TCL=no
1711 BUILD_THREAD=no
1712
1713 SLAPD_PERL_LDFLAGS=
1714 SLAPD_PERL_CPPFLAGS=
1715
1716 KRB_LIBS=
1717 READLINE_LIBS=
1718 TERMCAP_LIBS=
1719 TLS_LIBS=
1720
1721
1722 # Find a good install program.  We prefer a C program (faster),
1723 # so one script is as good as another.  But avoid the broken or
1724 # incompatible versions:
1725 # SysV /etc/install, /usr/sbin/install
1726 # SunOS /usr/etc/install
1727 # IRIX /sbin/install
1728 # AIX /bin/install
1729 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1730 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1731 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1732 # ./install, which can be erroneously created by make from ./install.sh.
1733 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1734 echo "configure:1735: checking for a BSD compatible install" >&5
1735 if test -z "$INSTALL"; then
1736 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1737   echo $ac_n "(cached) $ac_c" 1>&6
1738 else
1739     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1740   for ac_dir in $PATH; do
1741     # Account for people who put trailing slashes in PATH elements.
1742     case "$ac_dir/" in
1743     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1744     *)
1745       # OSF1 and SCO ODT 3.0 have their own names for install.
1746       # Don't use installbsd from OSF since it installs stuff as root
1747       # by default.
1748       for ac_prog in ginstall scoinst install; do
1749         if test -f $ac_dir/$ac_prog; then
1750           if test $ac_prog = install &&
1751             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1752             # AIX install.  It has an incompatible calling convention.
1753             :
1754           else
1755             ac_cv_path_install="$ac_dir/$ac_prog -c"
1756             break 2
1757           fi
1758         fi
1759       done
1760       ;;
1761     esac
1762   done
1763   IFS="$ac_save_IFS"
1764
1765 fi
1766   if test "${ac_cv_path_install+set}" = set; then
1767     INSTALL="$ac_cv_path_install"
1768   else
1769     # As a last resort, use the slow shell script.  We don't cache a
1770     # path for INSTALL within a source directory, because that will
1771     # break other packages using the cache if that directory is
1772     # removed, or if the path is relative.
1773     INSTALL="$ac_install_sh"
1774   fi
1775 fi
1776 echo "$ac_t""$INSTALL" 1>&6
1777
1778 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1779 # It thinks the first close brace ends the variable substitution.
1780 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1781
1782 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1783
1784 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1785
1786
1787 CC=${CC-"cc"}
1788
1789
1790 # Make sure we can run config.sub.
1791 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1792 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1793 fi
1794
1795 echo $ac_n "checking host system type""... $ac_c" 1>&6
1796 echo "configure:1797: checking host system type" >&5
1797
1798 host_alias=$host
1799 case "$host_alias" in
1800 NONE)
1801   case $nonopt in
1802   NONE)
1803     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1804     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1805     fi ;;
1806   *) host_alias=$nonopt ;;
1807   esac ;;
1808 esac
1809
1810 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1811 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1812 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1813 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1814 echo "$ac_t""$host" 1>&6
1815
1816 # Extract the first word of "ranlib", so it can be a program name with args.
1817 set dummy ranlib; ac_word=$2
1818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1819 echo "configure:1820: checking for $ac_word" >&5
1820 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1821   echo $ac_n "(cached) $ac_c" 1>&6
1822 else
1823   if test -n "$RANLIB"; then
1824   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1825 else
1826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1827   ac_dummy="$PATH"
1828   for ac_dir in $ac_dummy; do
1829     test -z "$ac_dir" && ac_dir=.
1830     if test -f $ac_dir/$ac_word; then
1831       ac_cv_prog_RANLIB="ranlib"
1832       break
1833     fi
1834   done
1835   IFS="$ac_save_ifs"
1836   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1837 fi
1838 fi
1839 RANLIB="$ac_cv_prog_RANLIB"
1840 if test -n "$RANLIB"; then
1841   echo "$ac_t""$RANLIB" 1>&6
1842 else
1843   echo "$ac_t""no" 1>&6
1844 fi
1845
1846 # Extract the first word of "gcc", so it can be a program name with args.
1847 set dummy gcc; ac_word=$2
1848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_word" >&5
1850 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1857   ac_dummy="$PATH"
1858   for ac_dir in $ac_dummy; do
1859     test -z "$ac_dir" && ac_dir=.
1860     if test -f $ac_dir/$ac_word; then
1861       ac_cv_prog_CC="gcc"
1862       break
1863     fi
1864   done
1865   IFS="$ac_save_ifs"
1866 fi
1867 fi
1868 CC="$ac_cv_prog_CC"
1869 if test -n "$CC"; then
1870   echo "$ac_t""$CC" 1>&6
1871 else
1872   echo "$ac_t""no" 1>&6
1873 fi
1874
1875 if test -z "$CC"; then
1876   # Extract the first word of "cc", so it can be a program name with args.
1877 set dummy cc; ac_word=$2
1878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1879 echo "configure:1880: checking for $ac_word" >&5
1880 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   if test -n "$CC"; then
1884   ac_cv_prog_CC="$CC" # Let the user override the test.
1885 else
1886   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1887   ac_prog_rejected=no
1888   ac_dummy="$PATH"
1889   for ac_dir in $ac_dummy; do
1890     test -z "$ac_dir" && ac_dir=.
1891     if test -f $ac_dir/$ac_word; then
1892       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1893         ac_prog_rejected=yes
1894         continue
1895       fi
1896       ac_cv_prog_CC="cc"
1897       break
1898     fi
1899   done
1900   IFS="$ac_save_ifs"
1901 if test $ac_prog_rejected = yes; then
1902   # We found a bogon in the path, so make sure we never use it.
1903   set dummy $ac_cv_prog_CC
1904   shift
1905   if test $# -gt 0; then
1906     # We chose a different compiler from the bogus one.
1907     # However, it has the same basename, so the bogon will be chosen
1908     # first if we set CC to just the basename; use the full file name.
1909     shift
1910     set dummy "$ac_dir/$ac_word" "$@"
1911     shift
1912     ac_cv_prog_CC="$@"
1913   fi
1914 fi
1915 fi
1916 fi
1917 CC="$ac_cv_prog_CC"
1918 if test -n "$CC"; then
1919   echo "$ac_t""$CC" 1>&6
1920 else
1921   echo "$ac_t""no" 1>&6
1922 fi
1923
1924   if test -z "$CC"; then
1925     case "`uname -s`" in
1926     *win32* | *WIN32*)
1927       # Extract the first word of "cl", so it can be a program name with args.
1928 set dummy cl; ac_word=$2
1929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1930 echo "configure:1931: checking for $ac_word" >&5
1931 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1932   echo $ac_n "(cached) $ac_c" 1>&6
1933 else
1934   if test -n "$CC"; then
1935   ac_cv_prog_CC="$CC" # Let the user override the test.
1936 else
1937   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1938   ac_dummy="$PATH"
1939   for ac_dir in $ac_dummy; do
1940     test -z "$ac_dir" && ac_dir=.
1941     if test -f $ac_dir/$ac_word; then
1942       ac_cv_prog_CC="cl"
1943       break
1944     fi
1945   done
1946   IFS="$ac_save_ifs"
1947 fi
1948 fi
1949 CC="$ac_cv_prog_CC"
1950 if test -n "$CC"; then
1951   echo "$ac_t""$CC" 1>&6
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955  ;;
1956     esac
1957   fi
1958   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1959 fi
1960
1961 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1962 echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1963
1964 ac_ext=c
1965 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1966 ac_cpp='$CPP $CPPFLAGS'
1967 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1968 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1969 cross_compiling=$ac_cv_prog_cc_cross
1970
1971 cat > conftest.$ac_ext << EOF
1972
1973 #line 1974 "configure"
1974 #include "confdefs.h"
1975
1976 main(){return(0);}
1977 EOF
1978 if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1979   ac_cv_prog_cc_works=yes
1980   # If we can't run a trivial program, we are probably using a cross compiler.
1981   if (./conftest; exit) 2>/dev/null; then
1982     ac_cv_prog_cc_cross=no
1983   else
1984     ac_cv_prog_cc_cross=yes
1985   fi
1986 else
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   ac_cv_prog_cc_works=no
1990 fi
1991 rm -fr conftest*
1992 ac_ext=c
1993 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1994 ac_cpp='$CPP $CPPFLAGS'
1995 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1996 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1997 cross_compiling=$ac_cv_prog_cc_cross
1998
1999 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2000 if test $ac_cv_prog_cc_works = no; then
2001   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2002 fi
2003 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2004 echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2005 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2006 cross_compiling=$ac_cv_prog_cc_cross
2007
2008 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2009 echo "configure:2010: checking whether we are using GNU C" >&5
2010 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2011   echo $ac_n "(cached) $ac_c" 1>&6
2012 else
2013   cat > conftest.c <<EOF
2014 #ifdef __GNUC__
2015   yes;
2016 #endif
2017 EOF
2018 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2019   ac_cv_prog_gcc=yes
2020 else
2021   ac_cv_prog_gcc=no
2022 fi
2023 fi
2024
2025 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2026
2027 if test $ac_cv_prog_gcc = yes; then
2028   GCC=yes
2029 else
2030   GCC=
2031 fi
2032
2033 ac_test_CFLAGS="${CFLAGS+set}"
2034 ac_save_CFLAGS="$CFLAGS"
2035 CFLAGS=
2036 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5
2038 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2039   echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041   echo 'void f(){}' > conftest.c
2042 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2043   ac_cv_prog_cc_g=yes
2044 else
2045   ac_cv_prog_cc_g=no
2046 fi
2047 rm -f conftest*
2048
2049 fi
2050
2051 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2052 if test "$ac_test_CFLAGS" = set; then
2053   CFLAGS="$ac_save_CFLAGS"
2054 elif test $ac_cv_prog_cc_g = yes; then
2055   if test "$GCC" = yes; then
2056     CFLAGS="-g -O2"
2057   else
2058     CFLAGS="-g"
2059   fi
2060 else
2061   if test "$GCC" = yes; then
2062     CFLAGS="-O2"
2063   else
2064     CFLAGS=
2065   fi
2066 fi
2067
2068 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2069 if test "${with_gnu_ld+set}" = set; then
2070   withval="$with_gnu_ld"
2071   test "$withval" = no || with_gnu_ld=yes
2072 else
2073   with_gnu_ld=no
2074 fi
2075
2076
2077 ac_prog=ld
2078 if test "$ac_cv_prog_gcc" = yes; then
2079   # Check if gcc -print-prog-name=ld gives a path.
2080   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2081 echo "configure:2082: checking for ld used by GCC" >&5
2082   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2083   case "$ac_prog" in
2084   # Accept absolute paths.
2085   /* | A-Za-z:\\*)
2086     test -z "$LD" && LD="$ac_prog"
2087     ;;
2088   "")
2089     # If it fails, then pretend we aren't using GCC.
2090     ac_prog=ld
2091     ;;
2092   *)
2093     # If it is relative, then search for the first ld in PATH.
2094     with_gnu_ld=unknown
2095     ;;
2096   esac
2097 elif test "$with_gnu_ld" = yes; then
2098   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2099 echo "configure:2100: checking for GNU ld" >&5
2100 else
2101   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2102 echo "configure:2103: checking for non-GNU ld" >&5
2103 fi
2104 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   if test -z "$LD"; then
2108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2109   for ac_dir in $PATH; do
2110     test -z "$ac_dir" && ac_dir=.
2111     if test -f "$ac_dir/$ac_prog"; then
2112       ac_cv_path_LD="$ac_dir/$ac_prog"
2113       # Check to see if the program is GNU ld.  I'd rather use --version,
2114       # but apparently some GNU ld's only accept -v.
2115       # Break only if it was the GNU/non-GNU ld that we prefer.
2116       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2117         test "$with_gnu_ld" != no && break
2118       else
2119         test "$with_gnu_ld" != yes && break
2120       fi
2121     fi
2122   done
2123   IFS="$ac_save_ifs"
2124 else
2125   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2126 fi
2127 fi
2128
2129 LD="$ac_cv_path_LD"
2130 if test -n "$LD"; then
2131   echo "$ac_t""$LD" 1>&6
2132 else
2133   echo "$ac_t""no" 1>&6
2134 fi
2135 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2136
2137 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2138 echo "configure:2139: checking if the linker ($LD) is GNU ld" >&5
2139 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2140   echo $ac_n "(cached) $ac_c" 1>&6
2141 else
2142   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2143 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2144   ac_cv_prog_gnu_ld=yes
2145 else
2146   ac_cv_prog_gnu_ld=no
2147 fi
2148 fi
2149
2150 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2151
2152
2153 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2154 echo "configure:2155: checking for BSD-compatible nm" >&5
2155 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2156   echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158   case "$NM" in
2159 /* | A-Za-z:\\*)
2160   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2161   ;;
2162 *)
2163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2164   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2165     test -z "$ac_dir" && ac_dir=.
2166     if test -f $ac_dir/nm; then
2167       # Check to see if the nm accepts a BSD-compat flag.
2168       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2169       #   nm: unknown option "B" ignored
2170       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2171         ac_cv_path_NM="$ac_dir/nm -B"
2172       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2173         ac_cv_path_NM="$ac_dir/nm -p"
2174       else
2175         ac_cv_path_NM="$ac_dir/nm"
2176       fi
2177       break
2178     fi
2179   done
2180   IFS="$ac_save_ifs"
2181   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2182   ;;
2183 esac
2184 fi
2185
2186 NM="$ac_cv_path_NM"
2187 echo "$ac_t""$NM" 1>&6
2188
2189
2190 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2191 echo "configure:2192: checking whether ln -s works" >&5
2192 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   rm -f conftestdata
2196 if ln -s X conftestdata 2>/dev/null
2197 then
2198   rm -f conftestdata
2199   ac_cv_prog_LN_S="ln -s"
2200 else
2201   ac_cv_prog_LN_S=ln
2202 fi
2203 fi
2204 LN_S="$ac_cv_prog_LN_S"
2205 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2206   echo "$ac_t""yes" 1>&6
2207 else
2208   echo "$ac_t""no" 1>&6
2209 fi
2210
2211 # Always use our own libtool.
2212 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2213
2214 # Check for any special flags to pass to ltconfig.
2215 libtool_flags=
2216 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2217 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2218 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2219 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2220 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2221
2222 # Some flags need to be propagated to the compiler or linker for good
2223 # libtool support.
2224 case "$host" in
2225 *-*-irix6*)
2226   # Find out which ABI we are using.
2227   echo '#line 2228 "configure"' > conftest.$ac_ext
2228   if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2229     case "`/usr/bin/file conftest.o`" in
2230     *32-bit*)
2231       LD="${LD-ld} -32"
2232       ;;
2233     *N32*)
2234       LD="${LD-ld} -n32"
2235       ;;
2236     *64-bit*)
2237       LD="${LD-ld} -64"
2238       ;;
2239     esac
2240   fi
2241   rm -rf conftest*
2242   ;;
2243
2244 *-*-sco3.2v5*)
2245   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2246   CFLAGS="$CFLAGS -belf"
2247   ;;
2248 esac
2249
2250 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2251 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2252 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2253 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2254 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2255 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2256
2257
2258 for ac_prog in mawk gawk nawk awk
2259 do
2260 # Extract the first word of "$ac_prog", so it can be a program name with args.
2261 set dummy $ac_prog; ac_word=$2
2262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2263 echo "configure:2264: checking for $ac_word" >&5
2264 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2265   echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267   if test -n "$AWK"; then
2268   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2269 else
2270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2271   ac_dummy="$PATH"
2272   for ac_dir in $ac_dummy; do
2273     test -z "$ac_dir" && ac_dir=.
2274     if test -f $ac_dir/$ac_word; then
2275       ac_cv_prog_AWK="$ac_prog"
2276       break
2277     fi
2278   done
2279   IFS="$ac_save_ifs"
2280 fi
2281 fi
2282 AWK="$ac_cv_prog_AWK"
2283 if test -n "$AWK"; then
2284   echo "$ac_t""$AWK" 1>&6
2285 else
2286   echo "$ac_t""no" 1>&6
2287 fi
2288
2289 test -n "$AWK" && break
2290 done
2291
2292 # test for ln hardlink support
2293 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2294 echo "configure:2295: checking whether ln works" >&5
2295 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2296   echo $ac_n "(cached) $ac_c" 1>&6
2297 else
2298   rm -f conftest.src conftest.dst
2299 echo "conftest" > conftest.src
2300 if ln conftest.src conftest.dst 2>/dev/null
2301 then
2302   ol_cv_prog_LN_H="ln"
2303 else
2304   ol_cv_prog_LN_H="cp"
2305 fi
2306 rm -f conftest.src conftest.dst
2307
2308 fi
2309 LN_H="$ol_cv_prog_LN_H"
2310 if test "$ol_cv_prog_LN_H" = "ln"; then
2311         echo "$ac_t""yes" 1>&6
2312 else
2313         echo "$ac_t""no" 1>&6
2314 fi
2315
2316 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2317 echo "configure:2318: checking whether ln -s works" >&5
2318 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2319   echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321   rm -f conftestdata
2322 if ln -s X conftestdata 2>/dev/null
2323 then
2324   rm -f conftestdata
2325   ac_cv_prog_LN_S="ln -s"
2326 else
2327   ac_cv_prog_LN_S=ln
2328 fi
2329 fi
2330 LN_S="$ac_cv_prog_LN_S"
2331 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2332   echo "$ac_t""yes" 1>&6
2333 else
2334   echo "$ac_t""no" 1>&6
2335 fi
2336
2337
2338 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2339         LN_S="$LN_H"
2340 fi
2341
2342 # Extract the first word of "sendmail", so it can be a program name with args.
2343 set dummy sendmail; ac_word=$2
2344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2345 echo "configure:2346: checking for $ac_word" >&5
2346 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2347   echo $ac_n "(cached) $ac_c" 1>&6
2348 else
2349   case "$SENDMAIL" in
2350   /*)
2351   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2352   ;;
2353   ?:/*)                  
2354   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2355   ;;
2356   *)
2357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2358   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2359   for ac_dir in $ac_dummy; do 
2360     test -z "$ac_dir" && ac_dir=.
2361     if test -f $ac_dir/$ac_word; then
2362       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2363       break
2364     fi
2365   done
2366   IFS="$ac_save_ifs"
2367   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2368   ;;
2369 esac
2370 fi
2371 SENDMAIL="$ac_cv_path_SENDMAIL"
2372 if test -n "$SENDMAIL"; then
2373   echo "$ac_t""$SENDMAIL" 1>&6
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377
2378 # Extract the first word of "vi", so it can be a program name with args.
2379 set dummy vi; ac_word=$2
2380 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2381 echo "configure:2382: checking for $ac_word" >&5
2382 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   case "$EDITOR" in
2386   /*)
2387   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2388   ;;
2389   ?:/*)                  
2390   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2391   ;;
2392   *)
2393   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2394   ac_dummy="$PATH:/usr/ucb"
2395   for ac_dir in $ac_dummy; do 
2396     test -z "$ac_dir" && ac_dir=.
2397     if test -f $ac_dir/$ac_word; then
2398       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2399       break
2400     fi
2401   done
2402   IFS="$ac_save_ifs"
2403   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2404   ;;
2405 esac
2406 fi
2407 EDITOR="$ac_cv_path_EDITOR"
2408 if test -n "$EDITOR"; then
2409   echo "$ac_t""$EDITOR" 1>&6
2410 else
2411   echo "$ac_t""no" 1>&6
2412 fi
2413
2414 # Extract the first word of "finger", so it can be a program name with args.
2415 set dummy finger; ac_word=$2
2416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2417 echo "configure:2418: checking for $ac_word" >&5
2418 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2419   echo $ac_n "(cached) $ac_c" 1>&6
2420 else
2421   case "$FINGER" in
2422   /*)
2423   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2424   ;;
2425   ?:/*)                  
2426   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2427   ;;
2428   *)
2429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2430   ac_dummy="$PATH:/usr/ucb"
2431   for ac_dir in $ac_dummy; do 
2432     test -z "$ac_dir" && ac_dir=.
2433     if test -f $ac_dir/$ac_word; then
2434       ac_cv_path_FINGER="$ac_dir/$ac_word"
2435       break
2436     fi
2437   done
2438   IFS="$ac_save_ifs"
2439   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2440   ;;
2441 esac
2442 fi
2443 FINGER="$ac_cv_path_FINGER"
2444 if test -n "$FINGER"; then
2445   echo "$ac_t""$FINGER" 1>&6
2446 else
2447   echo "$ac_t""no" 1>&6
2448 fi
2449
2450
2451 if test $ol_enable_perl = yes ; then
2452         # Extract the first word of "perl", so it can be a program name with args.
2453 set dummy perl; ac_word=$2
2454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2455 echo "configure:2456: checking for $ac_word" >&5
2456 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2457   echo $ac_n "(cached) $ac_c" 1>&6
2458 else
2459   case "$PERLBIN" in
2460   /*)
2461   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2462   ;;
2463   ?:/*)                  
2464   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2465   ;;
2466   *)
2467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2468   ac_dummy="$PATH"
2469   for ac_dir in $ac_dummy; do 
2470     test -z "$ac_dir" && ac_dir=.
2471     if test -f $ac_dir/$ac_word; then
2472       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2473       break
2474     fi
2475   done
2476   IFS="$ac_save_ifs"
2477   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2478   ;;
2479 esac
2480 fi
2481 PERLBIN="$ac_cv_path_PERLBIN"
2482 if test -n "$PERLBIN"; then
2483   echo "$ac_t""$PERLBIN" 1>&6
2484 else
2485   echo "$ac_t""no" 1>&6
2486 fi
2487
2488
2489         if test "no$PERLBIN" = "no" ; then
2490                 ol_enable_perl=no
2491         fi
2492
2493         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2494         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2495 fi
2496
2497 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2498 echo "configure:2499: checking how to run the C preprocessor" >&5
2499 # On Suns, sometimes $CPP names a directory.
2500 if test -n "$CPP" && test -d "$CPP"; then
2501   CPP=
2502 fi
2503 if test -z "$CPP"; then
2504 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2505   echo $ac_n "(cached) $ac_c" 1>&6
2506 else
2507     # This must be in double quotes, not single quotes, because CPP may get
2508   # substituted into the Makefile and "${CC-cc}" will confuse make.
2509   CPP="${CC-cc} -E"
2510   # On the NeXT, cc -E runs the code through the compiler's parser,
2511   # not just through cpp.
2512   cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 #include <assert.h>
2516 Syntax Error
2517 EOF
2518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2519 { (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2521 if test -z "$ac_err"; then
2522   :
2523 else
2524   echo "$ac_err" >&5
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   CPP="${CC-cc} -E -traditional-cpp"
2529   cat > conftest.$ac_ext <<EOF
2530 #line 2531 "configure"
2531 #include "confdefs.h"
2532 #include <assert.h>
2533 Syntax Error
2534 EOF
2535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2536 { (eval echo configure:2537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2538 if test -z "$ac_err"; then
2539   :
2540 else
2541   echo "$ac_err" >&5
2542   echo "configure: failed program was:" >&5
2543   cat conftest.$ac_ext >&5
2544   rm -rf conftest*
2545   CPP="${CC-cc} -nologo -E"
2546   cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2549 #include <assert.h>
2550 Syntax Error
2551 EOF
2552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2553 { (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2555 if test -z "$ac_err"; then
2556   :
2557 else
2558   echo "$ac_err" >&5
2559   echo "configure: failed program was:" >&5
2560   cat conftest.$ac_ext >&5
2561   rm -rf conftest*
2562   CPP=/lib/cpp
2563 fi
2564 rm -f conftest*
2565 fi
2566 rm -f conftest*
2567 fi
2568 rm -f conftest*
2569   ac_cv_prog_CPP="$CPP"
2570 fi
2571   CPP="$ac_cv_prog_CPP"
2572 else
2573   ac_cv_prog_CPP="$CPP"
2574 fi
2575 echo "$ac_t""$CPP" 1>&6
2576
2577
2578 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2579         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2580
2581 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2582         echo "configure: warning: programs compiled here do run here..." 1>&2
2583         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2584
2585 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2586         echo "configure: warning: programs compiled here do not run here..." 1>&2
2587         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2588 fi
2589
2590 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2591 echo "configure:2592: checking for AIX" >&5
2592 cat > conftest.$ac_ext <<EOF
2593 #line 2594 "configure"
2594 #include "confdefs.h"
2595 #ifdef _AIX
2596   yes
2597 #endif
2598
2599 EOF
2600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2601   egrep "yes" >/dev/null 2>&1; then
2602   rm -rf conftest*
2603   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2604 #define _ALL_SOURCE 1
2605 EOF
2606
2607 else
2608   rm -rf conftest*
2609   echo "$ac_t""no" 1>&6
2610 fi
2611 rm -f conftest*
2612
2613
2614 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2615 echo "configure:2616: checking for POSIXized ISC" >&5
2616 if test -d /etc/conf/kconfig.d &&
2617   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2618 then
2619   echo "$ac_t""yes" 1>&6
2620   ISC=yes # If later tests want to check for ISC.
2621   cat >> confdefs.h <<\EOF
2622 #define _POSIX_SOURCE 1
2623 EOF
2624
2625   if test "$GCC" = yes; then
2626     CC="$CC -posix"
2627   else
2628     CC="$CC -Xp"
2629   fi
2630 else
2631   echo "$ac_t""no" 1>&6
2632   ISC=
2633 fi
2634
2635 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2636 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2637 echo "configure:2638: checking for minix/config.h" >&5
2638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2639   echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <minix/config.h>
2645 EOF
2646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2647 { (eval echo configure:2648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2649 if test -z "$ac_err"; then
2650   rm -rf conftest*
2651   eval "ac_cv_header_$ac_safe=yes"
2652 else
2653   echo "$ac_err" >&5
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   rm -rf conftest*
2657   eval "ac_cv_header_$ac_safe=no"
2658 fi
2659 rm -f conftest*
2660 fi
2661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2662   echo "$ac_t""yes" 1>&6
2663   MINIX=yes
2664 else
2665   echo "$ac_t""no" 1>&6
2666 MINIX=
2667 fi
2668
2669 if test "$MINIX" = yes; then
2670   cat >> confdefs.h <<\EOF
2671 #define _POSIX_SOURCE 1
2672 EOF
2673
2674   cat >> confdefs.h <<\EOF
2675 #define _POSIX_1_SOURCE 2
2676 EOF
2677
2678   cat >> confdefs.h <<\EOF
2679 #define _MINIX 1
2680 EOF
2681
2682 fi
2683
2684
2685 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2686 echo "configure:2687: checking for be_app in -lbe" >&5
2687 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2689   echo $ac_n "(cached) $ac_c" 1>&6
2690 else
2691   ac_save_LIBS="$LIBS"
2692 LIBS="-lbe -lroot $LIBS"
2693 cat > conftest.$ac_ext <<EOF
2694 #line 2695 "configure"
2695 #include "confdefs.h"
2696 /* Override any gcc2 internal prototype to avoid an error.  */
2697 /* We use char because int might match the return type of a gcc2
2698     builtin and then its argument prototype would still apply.  */
2699 char be_app();
2700
2701 int main() {
2702 be_app()
2703 ; return 0; }
2704 EOF
2705 if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2706   rm -rf conftest*
2707   eval "ac_cv_lib_$ac_lib_var=yes"
2708 else
2709   echo "configure: failed program was:" >&5
2710   cat conftest.$ac_ext >&5
2711   rm -rf conftest*
2712   eval "ac_cv_lib_$ac_lib_var=no"
2713 fi
2714 rm -f conftest*
2715 LIBS="$ac_save_LIBS"
2716
2717 fi
2718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2719   echo "$ac_t""yes" 1>&6
2720   LIBS="$LIBS -lbe -lroot"
2721 else
2722   echo "$ac_t""no" 1>&6
2723 :
2724 fi
2725
2726
2727 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2728 echo "configure:2729: checking for Cygwin environment" >&5
2729 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2730   echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732   cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735
2736 int main() {
2737
2738 #ifndef __CYGWIN__
2739 #define __CYGWIN__ __CYGWIN32__
2740 #endif
2741 return __CYGWIN__;
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2745   rm -rf conftest*
2746   ac_cv_cygwin=yes
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -rf conftest*
2751   ac_cv_cygwin=no
2752 fi
2753 rm -f conftest*
2754 rm -f conftest*
2755 fi
2756
2757 echo "$ac_t""$ac_cv_cygwin" 1>&6
2758 CYGWIN=
2759 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2760 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2761 echo "configure:2762: checking for mingw32 environment" >&5
2762 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768
2769 int main() {
2770 return __MINGW32__;
2771 ; return 0; }
2772 EOF
2773 if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2774   rm -rf conftest*
2775   ac_cv_mingw32=yes
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779   rm -rf conftest*
2780   ac_cv_mingw32=no
2781 fi
2782 rm -f conftest*
2783 rm -f conftest*
2784 fi
2785
2786 echo "$ac_t""$ac_cv_mingw32" 1>&6
2787 MINGW32=
2788 test "$ac_cv_mingw32" = yes && MINGW32=yes
2789
2790
2791 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2792 echo "configure:2793: checking for executable suffix" >&5
2793 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2797   ac_cv_exeext=.exe
2798 else
2799   rm -f conftest*
2800   echo 'int main () { return 0; }' > conftest.$ac_ext
2801   ac_cv_exeext=
2802   if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2803     for file in conftest.*; do
2804       case $file in
2805       *.c | *.o | *.obj) ;;
2806       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2807       esac
2808     done
2809   else
2810     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2811   fi
2812   rm -f conftest*
2813   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2814 fi
2815 fi
2816
2817 EXEEXT=""
2818 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2819 echo "$ac_t""${ac_cv_exeext}" 1>&6
2820 ac_exeext=$EXEEXT
2821
2822 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2823 echo "configure:2824: checking for object suffix" >&5
2824 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2825   echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827   rm -f conftest*
2828 echo 'int i = 1;' > conftest.$ac_ext
2829 if { (eval echo configure:2830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2830   for ac_file in conftest.*; do
2831     case $ac_file in
2832     *.c) ;;
2833     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2834     esac
2835   done
2836 else
2837   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2838 fi
2839 rm -f conftest*
2840 fi
2841
2842 echo "$ac_t""$ac_cv_objext" 1>&6
2843 OBJEXT=$ac_cv_objext
2844 ac_objext=$ac_cv_objext
2845
2846
2847
2848
2849
2850 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2851 echo "configure:2852: checking for ${CC-cc} option to accept ANSI C" >&5
2852 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2853   echo $ac_n "(cached) $ac_c" 1>&6
2854 else
2855   am_cv_prog_cc_stdc=no
2856 ac_save_CC="$CC"
2857 # Don't try gcc -ansi; that turns off useful extensions and
2858 # breaks some systems' header files.
2859 # AIX                   -qlanglvl=ansi
2860 # Ultrix and OSF/1      -std1
2861 # HP-UX                 -Aa -D_HPUX_SOURCE
2862 # SVR4                  -Xc -D__EXTENSIONS__
2863 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2864 do
2865   CC="$ac_save_CC $ac_arg"
2866   cat > conftest.$ac_ext <<EOF
2867 #line 2868 "configure"
2868 #include "confdefs.h"
2869 #include <stdarg.h>
2870 #include <stdio.h>
2871 #include <sys/types.h>
2872 #include <sys/stat.h>
2873 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2874 struct buf { int x; };
2875 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2876 static char *e (p, i)
2877      char **p;
2878      int i;
2879 {
2880   return p[i];
2881 }
2882 static char *f (char * (*g) (char **, int), char **p, ...)
2883 {
2884   char *s;
2885   va_list v;
2886   va_start (v,p);
2887   s = g (p, va_arg (v,int));
2888   va_end (v);
2889   return s;
2890 }
2891 int test (int i, double x);
2892 struct s1 {int (*f) (int a);};
2893 struct s2 {int (*f) (double a);};
2894 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2895 int argc;
2896 char **argv;
2897
2898 int main() {
2899
2900 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2901
2902 ; return 0; }
2903 EOF
2904 if { (eval echo configure:2905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2905   rm -rf conftest*
2906   am_cv_prog_cc_stdc="$ac_arg"; break
2907 else
2908   echo "configure: failed program was:" >&5
2909   cat conftest.$ac_ext >&5
2910 fi
2911 rm -f conftest*
2912 done
2913 CC="$ac_save_CC"
2914
2915 fi
2916
2917 if test -z "$am_cv_prog_cc_stdc"; then
2918   echo "$ac_t""none needed" 1>&6
2919 else
2920   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2921 fi
2922 case "x$am_cv_prog_cc_stdc" in
2923   x|xno) ;;
2924   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2925 esac
2926
2927 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2928         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2929 fi
2930
2931
2932
2933
2934 echo $ac_n "checking for socket""... $ac_c" 1>&6
2935 echo "configure:2936: checking for socket" >&5
2936 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 /* System header to define __stub macros and hopefully few prototypes,
2943     which can conflict with char socket(); below.  */
2944 #include <assert.h>
2945 /* Override any gcc2 internal prototype to avoid an error.  */
2946 /* We use char because int might match the return type of a gcc2
2947     builtin and then its argument prototype would still apply.  */
2948 char socket();
2949
2950 int main() {
2951
2952 /* The GNU C library defines this for functions which it implements
2953     to always fail with ENOSYS.  Some functions are actually named
2954     something starting with __ and the normal name is an alias.  */
2955 #if defined (__stub_socket) || defined (__stub___socket)
2956 choke me
2957 #else
2958 socket();
2959 #endif
2960
2961 ; return 0; }
2962 EOF
2963 if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2964   rm -rf conftest*
2965   eval "ac_cv_func_socket=yes"
2966 else
2967   echo "configure: failed program was:" >&5
2968   cat conftest.$ac_ext >&5
2969   rm -rf conftest*
2970   eval "ac_cv_func_socket=no"
2971 fi
2972 rm -f conftest*
2973 fi
2974
2975 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2976   echo "$ac_t""yes" 1>&6
2977   :
2978 else
2979   echo "$ac_t""no" 1>&6
2980         
2981         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2982 echo "configure:2983: checking for main in -lsocket" >&5
2983 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   ac_save_LIBS="$LIBS"
2988 LIBS="-lsocket  $LIBS"
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992
2993 int main() {
2994 main()
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2998   rm -rf conftest*
2999   eval "ac_cv_lib_$ac_lib_var=yes"
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   eval "ac_cv_lib_$ac_lib_var=no"
3005 fi
3006 rm -f conftest*
3007 LIBS="$ac_save_LIBS"
3008
3009 fi
3010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3011   echo "$ac_t""yes" 1>&6
3012     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3014   cat >> confdefs.h <<EOF
3015 #define $ac_tr_lib 1
3016 EOF
3017
3018   LIBS="-lsocket $LIBS"
3019
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3025 echo "configure:3026: checking for main in -lnet" >&5
3026 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   ac_save_LIBS="$LIBS"
3031 LIBS="-lnet  $LIBS"
3032 cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035
3036 int main() {
3037 main()
3038 ; return 0; }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3041   rm -rf conftest*
3042   eval "ac_cv_lib_$ac_lib_var=yes"
3043 else
3044   echo "configure: failed program was:" >&5
3045   cat conftest.$ac_ext >&5
3046   rm -rf conftest*
3047   eval "ac_cv_lib_$ac_lib_var=no"
3048 fi
3049 rm -f conftest*
3050 LIBS="$ac_save_LIBS"
3051
3052 fi
3053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3054   echo "$ac_t""yes" 1>&6
3055     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3056     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3057   cat >> confdefs.h <<EOF
3058 #define $ac_tr_lib 1
3059 EOF
3060
3061   LIBS="-lnet $LIBS"
3062
3063 else
3064   echo "$ac_t""no" 1>&6
3065 fi
3066
3067         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3068 echo "configure:3069: checking for main in -lnsl_s" >&5
3069 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   ac_save_LIBS="$LIBS"
3074 LIBS="-lnsl_s  $LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078
3079 int main() {
3080 main()
3081 ; return 0; }
3082 EOF
3083 if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3084   rm -rf conftest*
3085   eval "ac_cv_lib_$ac_lib_var=yes"
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   rm -rf conftest*
3090   eval "ac_cv_lib_$ac_lib_var=no"
3091 fi
3092 rm -f conftest*
3093 LIBS="$ac_save_LIBS"
3094
3095 fi
3096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3097   echo "$ac_t""yes" 1>&6
3098     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3100   cat >> confdefs.h <<EOF
3101 #define $ac_tr_lib 1
3102 EOF
3103
3104   LIBS="-lnsl_s $LIBS"
3105
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109
3110         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3111 echo "configure:3112: checking for main in -lnsl" >&5
3112 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3113 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116   ac_save_LIBS="$LIBS"
3117 LIBS="-lnsl  $LIBS"
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121
3122 int main() {
3123 main()
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3127   rm -rf conftest*
3128   eval "ac_cv_lib_$ac_lib_var=yes"
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   eval "ac_cv_lib_$ac_lib_var=no"
3134 fi
3135 rm -f conftest*
3136 LIBS="$ac_save_LIBS"
3137
3138 fi
3139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3140   echo "$ac_t""yes" 1>&6
3141     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3143   cat >> confdefs.h <<EOF
3144 #define $ac_tr_lib 1
3145 EOF
3146
3147   LIBS="-lnsl $LIBS"
3148
3149 else
3150   echo "$ac_t""no" 1>&6
3151 fi
3152
3153         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3154 echo "configure:3155: checking for socket in -linet" >&5
3155 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   ac_save_LIBS="$LIBS"
3160 LIBS="-linet  $LIBS"
3161 cat > conftest.$ac_ext <<EOF
3162 #line 3163 "configure"
3163 #include "confdefs.h"
3164 /* Override any gcc2 internal prototype to avoid an error.  */
3165 /* We use char because int might match the return type of a gcc2
3166     builtin and then its argument prototype would still apply.  */
3167 char socket();
3168
3169 int main() {
3170 socket()
3171 ; return 0; }
3172 EOF
3173 if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3174   rm -rf conftest*
3175   eval "ac_cv_lib_$ac_lib_var=yes"
3176 else
3177   echo "configure: failed program was:" >&5
3178   cat conftest.$ac_ext >&5
3179   rm -rf conftest*
3180   eval "ac_cv_lib_$ac_lib_var=no"
3181 fi
3182 rm -f conftest*
3183 LIBS="$ac_save_LIBS"
3184
3185 fi
3186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3187   echo "$ac_t""yes" 1>&6
3188     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3189     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3190   cat >> confdefs.h <<EOF
3191 #define $ac_tr_lib 1
3192 EOF
3193
3194   LIBS="-linet $LIBS"
3195
3196 else
3197   echo "$ac_t""no" 1>&6
3198 fi
3199
3200         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3201 echo "configure:3202: checking for main in -lgen" >&5
3202 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3204   echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3206   ac_save_LIBS="$LIBS"
3207 LIBS="-lgen  $LIBS"
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 main()
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3217   rm -rf conftest*
3218   eval "ac_cv_lib_$ac_lib_var=yes"
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   eval "ac_cv_lib_$ac_lib_var=no"
3224 fi
3225 rm -f conftest*
3226 LIBS="$ac_save_LIBS"
3227
3228 fi
3229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3230   echo "$ac_t""yes" 1>&6
3231     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3232     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3233   cat >> confdefs.h <<EOF
3234 #define $ac_tr_lib 1
3235 EOF
3236
3237   LIBS="-lgen $LIBS"
3238
3239 else
3240   echo "$ac_t""no" 1>&6
3241 fi
3242
3243
3244 fi
3245
3246
3247 for ac_func in res_search
3248 do
3249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_func" >&5
3251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 /* System header to define __stub macros and hopefully few prototypes,
3258     which can conflict with char $ac_func(); below.  */
3259 #include <assert.h>
3260 /* Override any gcc2 internal prototype to avoid an error.  */
3261 /* We use char because int might match the return type of a gcc2
3262     builtin and then its argument prototype would still apply.  */
3263 char $ac_func();
3264
3265 int main() {
3266
3267 /* The GNU C library defines this for functions which it implements
3268     to always fail with ENOSYS.  Some functions are actually named
3269     something starting with __ and the normal name is an alias.  */
3270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3271 choke me
3272 #else
3273 $ac_func();
3274 #endif
3275
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279   rm -rf conftest*
3280   eval "ac_cv_func_$ac_func=yes"
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   eval "ac_cv_func_$ac_func=no"
3286 fi
3287 rm -f conftest*
3288 fi
3289
3290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3291   echo "$ac_t""yes" 1>&6
3292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3293   cat >> confdefs.h <<EOF
3294 #define $ac_tr_func 1
3295 EOF
3296  
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300 done
3301
3302 if test $ac_cv_func_res_search = "no" ; then 
3303         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3304 echo "configure:3305: checking for res_search in -lbind" >&5
3305 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3307   echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309   ac_save_LIBS="$LIBS"
3310 LIBS="-lbind  $LIBS"
3311 cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 /* Override any gcc2 internal prototype to avoid an error.  */
3315 /* We use char because int might match the return type of a gcc2
3316     builtin and then its argument prototype would still apply.  */
3317 char res_search();
3318
3319 int main() {
3320 res_search()
3321 ; return 0; }
3322 EOF
3323 if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3324   rm -rf conftest*
3325   eval "ac_cv_lib_$ac_lib_var=yes"
3326 else
3327   echo "configure: failed program was:" >&5
3328   cat conftest.$ac_ext >&5
3329   rm -rf conftest*
3330   eval "ac_cv_lib_$ac_lib_var=no"
3331 fi
3332 rm -f conftest*
3333 LIBS="$ac_save_LIBS"
3334
3335 fi
3336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3337   echo "$ac_t""yes" 1>&6
3338     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3339     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3340   cat >> confdefs.h <<EOF
3341 #define $ac_tr_lib 1
3342 EOF
3343
3344   LIBS="-lbind $LIBS"
3345
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3351                 cat >> confdefs.h <<\EOF
3352 #define HAVE_RES_SEARCH 1
3353 EOF
3354
3355         else
3356                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3357 echo "configure:3358: checking for res_search in -lresolv" >&5
3358 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   ac_save_LIBS="$LIBS"
3363 LIBS="-lresolv  $LIBS"
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 /* Override any gcc2 internal prototype to avoid an error.  */
3368 /* We use char because int might match the return type of a gcc2
3369     builtin and then its argument prototype would still apply.  */
3370 char res_search();
3371
3372 int main() {
3373 res_search()
3374 ; return 0; }
3375 EOF
3376 if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=yes"
3379 else
3380   echo "configure: failed program was:" >&5
3381   cat conftest.$ac_ext >&5
3382   rm -rf conftest*
3383   eval "ac_cv_lib_$ac_lib_var=no"
3384 fi
3385 rm -f conftest*
3386 LIBS="$ac_save_LIBS"
3387
3388 fi
3389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3390   echo "$ac_t""yes" 1>&6
3391     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3393   cat >> confdefs.h <<EOF
3394 #define $ac_tr_lib 1
3395 EOF
3396
3397   LIBS="-lresolv $LIBS"
3398
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402
3403                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3404                         cat >> confdefs.h <<\EOF
3405 #define HAVE_RES_SEARCH 1
3406 EOF
3407
3408                 fi
3409         fi
3410 fi
3411
3412 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3413 echo "configure:3414: checking for sigset in -lV3" >&5
3414 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   ac_save_LIBS="$LIBS"
3419 LIBS="-lV3  $LIBS"
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 /* Override any gcc2 internal prototype to avoid an error.  */
3424 /* We use char because int might match the return type of a gcc2
3425     builtin and then its argument prototype would still apply.  */
3426 char sigset();
3427
3428 int main() {
3429 sigset()
3430 ; return 0; }
3431 EOF
3432 if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3433   rm -rf conftest*
3434   eval "ac_cv_lib_$ac_lib_var=yes"
3435 else
3436   echo "configure: failed program was:" >&5
3437   cat conftest.$ac_ext >&5
3438   rm -rf conftest*
3439   eval "ac_cv_lib_$ac_lib_var=no"
3440 fi
3441 rm -f conftest*
3442 LIBS="$ac_save_LIBS"
3443
3444 fi
3445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3446   echo "$ac_t""yes" 1>&6
3447     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3449   cat >> confdefs.h <<EOF
3450 #define $ac_tr_lib 1
3451 EOF
3452
3453   LIBS="-lV3 $LIBS"
3454
3455 else
3456   echo "$ac_t""no" 1>&6
3457 fi
3458
3459
3460 echo $ac_n "checking for select""... $ac_c" 1>&6
3461 echo "configure:3462: checking for select" >&5
3462 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 /* System header to define __stub macros and hopefully few prototypes,
3469     which can conflict with char select(); below.  */
3470 #include <assert.h>
3471 /* Override any gcc2 internal prototype to avoid an error.  */
3472 /* We use char because int might match the return type of a gcc2
3473     builtin and then its argument prototype would still apply.  */
3474 char select();
3475
3476 int main() {
3477
3478 /* The GNU C library defines this for functions which it implements
3479     to always fail with ENOSYS.  Some functions are actually named
3480     something starting with __ and the normal name is an alias.  */
3481 #if defined (__stub_select) || defined (__stub___select)
3482 choke me
3483 #else
3484 select();
3485 #endif
3486
3487 ; return 0; }
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3490   rm -rf conftest*
3491   eval "ac_cv_func_select=yes"
3492 else
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_func_select=no"
3497 fi
3498 rm -f conftest*
3499 fi
3500
3501 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3502   echo "$ac_t""yes" 1>&6
3503   :
3504 else
3505   echo "$ac_t""no" 1>&6
3506 { echo "configure: error: select() required." 1>&2; exit 1; }
3507 fi
3508
3509
3510 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3511 echo "configure:3512: checking types of arguments for select()" >&5
3512  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3516   echo $ac_n "(cached) $ac_c" 1>&6
3517 else
3518     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3519   echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3522      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3523       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3524        cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527 #ifdef HAVE_SYS_TYPES_H
3528 #include <sys/types.h>
3529 #endif
3530 #ifdef HAVE_SYS_TIME_H
3531 #include <sys/time.h>
3532 #endif
3533 #ifdef HAVE_SYS_SELECT_H
3534 #include <sys/select.h>
3535 #endif
3536 #ifdef HAVE_SYS_SOCKET_H
3537 #include <sys/socket.h>
3538 #endif
3539 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
3540 int main() {
3541
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3545   rm -rf conftest*
3546           ac_not_found=no ; break 3
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   ac_not_found=yes
3552 fi
3553 rm -f conftest*
3554       done
3555      done
3556     done
3557    
3558 fi
3559   
3560 fi
3561  
3562 fi
3563  if test "$ac_not_found" = yes; then
3564   ac_cv_func_select_arg1=int 
3565   ac_cv_func_select_arg234='int *' 
3566   ac_cv_func_select_arg5='struct timeval *'
3567  fi
3568  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3569  cat >> confdefs.h <<EOF
3570 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3571 EOF
3572
3573  cat >> confdefs.h <<EOF
3574 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3575 EOF
3576
3577  cat >> confdefs.h <<EOF
3578 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3579 EOF
3580
3581
3582
3583 # ISODE tests
3584 ol_link_isode=no
3585 if test $ol_enable_ldapd != no ; then
3586                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3587 echo "configure:3588: checking for main in -lxtpp" >&5
3588 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   ac_save_LIBS="$LIBS"
3593 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597
3598 int main() {
3599 main()
3600 ; return 0; }
3601 EOF
3602 if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3603   rm -rf conftest*
3604   eval "ac_cv_lib_$ac_lib_var=yes"
3605 else
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -rf conftest*
3609   eval "ac_cv_lib_$ac_lib_var=no"
3610 fi
3611 rm -f conftest*
3612 LIBS="$ac_save_LIBS"
3613
3614 fi
3615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3616   echo "$ac_t""yes" 1>&6
3617   
3618                 ol_link_isode=yes
3619                 cat >> confdefs.h <<\EOF
3620 #define HAVE_XTPP 1
3621 EOF
3622
3623                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3624                 
3625 else
3626   echo "$ac_t""no" 1>&6
3627 :
3628 fi
3629
3630         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3631 echo "configure:3632: checking for main in -ldsap" >&5
3632 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   ac_save_LIBS="$LIBS"
3637 LIBS="-ldsap -lisode $LIBS"
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641
3642 int main() {
3643 main()
3644 ; return 0; }
3645 EOF
3646 if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3647   rm -rf conftest*
3648   eval "ac_cv_lib_$ac_lib_var=yes"
3649 else
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -rf conftest*
3653   eval "ac_cv_lib_$ac_lib_var=no"
3654 fi
3655 rm -f conftest*
3656 LIBS="$ac_save_LIBS"
3657
3658 fi
3659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3660   echo "$ac_t""yes" 1>&6
3661   
3662                 ol_link_isode=yes
3663                 cat >> confdefs.h <<\EOF
3664 #define HAVE_DSAP 1
3665 EOF
3666
3667                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3668                 
3669 else
3670   echo "$ac_t""no" 1>&6
3671 :
3672 fi
3673
3674         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3675 echo "configure:3676: checking for main in -lisode" >&5
3676 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   ac_save_LIBS="$LIBS"
3681 LIBS="-lisode  $LIBS"
3682 cat > conftest.$ac_ext <<EOF
3683 #line 3684 "configure"
3684 #include "confdefs.h"
3685
3686 int main() {
3687 main()
3688 ; return 0; }
3689 EOF
3690 if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3691   rm -rf conftest*
3692   eval "ac_cv_lib_$ac_lib_var=yes"
3693 else
3694   echo "configure: failed program was:" >&5
3695   cat conftest.$ac_ext >&5
3696   rm -rf conftest*
3697   eval "ac_cv_lib_$ac_lib_var=no"
3698 fi
3699 rm -f conftest*
3700 LIBS="$ac_save_LIBS"
3701
3702 fi
3703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3704   echo "$ac_t""yes" 1>&6
3705   
3706                 ol_link_isode=yes
3707                 cat >> confdefs.h <<\EOF
3708 #define HAVE_ISODE 1
3709 EOF
3710
3711                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3712                 
3713 else
3714   echo "$ac_t""no" 1>&6
3715 :
3716 fi
3717
3718 fi
3719
3720 if test $ol_link_isode != no; then
3721         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3722 echo "configure:3723: checking for main in -lpp" >&5
3723 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3725   echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727   ac_save_LIBS="$LIBS"
3728 LIBS="-lpp  $LIBS"
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732
3733 int main() {
3734 main()
3735 ; return 0; }
3736 EOF
3737 if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3738   rm -rf conftest*
3739   eval "ac_cv_lib_$ac_lib_var=yes"
3740 else
3741   echo "configure: failed program was:" >&5
3742   cat conftest.$ac_ext >&5
3743   rm -rf conftest*
3744   eval "ac_cv_lib_$ac_lib_var=no"
3745 fi
3746 rm -f conftest*
3747 LIBS="$ac_save_LIBS"
3748
3749 fi
3750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751   echo "$ac_t""yes" 1>&6
3752   
3753                 cat >> confdefs.h <<\EOF
3754 #define HAVE_PP 1
3755 EOF
3756
3757                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3758                 
3759 else
3760   echo "$ac_t""no" 1>&6
3761 :
3762 fi
3763
3764
3765         # Extract the first word of "pepsy", so it can be a program name with args.
3766 set dummy pepsy; ac_word=$2
3767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3768 echo "configure:3769: checking for $ac_word" >&5
3769 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   case "$PEPSY" in
3773   /*)
3774   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3775   ;;
3776   ?:/*)                  
3777   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3778   ;;
3779   *)
3780   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3781   ac_dummy="$PATH"
3782   for ac_dir in $ac_dummy; do 
3783     test -z "$ac_dir" && ac_dir=.
3784     if test -f $ac_dir/$ac_word; then
3785       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3786       break
3787     fi
3788   done
3789   IFS="$ac_save_ifs"
3790   ;;
3791 esac
3792 fi
3793 PEPSY="$ac_cv_path_PEPSY"
3794 if test -n "$PEPSY"; then
3795   echo "$ac_t""$PEPSY" 1>&6
3796 else
3797   echo "$ac_t""no" 1>&6
3798 fi
3799
3800 fi
3801
3802 ol_link_kerberos=no
3803
3804 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3805         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3806 do
3807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3809 echo "configure:3810: checking for $ac_hdr" >&5
3810 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816 #include <$ac_hdr>
3817 EOF
3818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3819 { (eval echo configure:3820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3821 if test -z "$ac_err"; then
3822   rm -rf conftest*
3823   eval "ac_cv_header_$ac_safe=yes"
3824 else
3825   echo "$ac_err" >&5
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   eval "ac_cv_header_$ac_safe=no"
3830 fi
3831 rm -f conftest*
3832 fi
3833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3834   echo "$ac_t""yes" 1>&6
3835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3836   cat >> confdefs.h <<EOF
3837 #define $ac_tr_hdr 1
3838 EOF
3839  
3840 else
3841   echo "$ac_t""no" 1>&6
3842 fi
3843 done
3844
3845
3846         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3847                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3848 echo "configure:3849: checking for main in -lkrb4" >&5
3849 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3851   echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853   ac_save_LIBS="$LIBS"
3854 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3855 cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858
3859 int main() {
3860 main()
3861 ; return 0; }
3862 EOF
3863 if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3864   rm -rf conftest*
3865   eval "ac_cv_lib_$ac_lib_var=yes"
3866 else
3867   echo "configure: failed program was:" >&5
3868   cat conftest.$ac_ext >&5
3869   rm -rf conftest*
3870   eval "ac_cv_lib_$ac_lib_var=no"
3871 fi
3872 rm -f conftest*
3873 LIBS="$ac_save_LIBS"
3874
3875 fi
3876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3877   echo "$ac_t""yes" 1>&6
3878   have_k5=yes
3879 else
3880   echo "$ac_t""no" 1>&6
3881 have_k5=no
3882 fi
3883
3884
3885                 if test $have_k5 = yes ; then
3886                         ol_with_kerberos=found
3887                         ol_link_kerberos=yes
3888
3889                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3890
3891                         LIBS="$KRB_LIBS $LIBS"
3892
3893                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3894 echo "configure:3895: checking for des_debug in Kerberos libraries" >&5
3895 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3896   echo $ac_n "(cached) $ac_c" 1>&6
3897 else
3898   
3899                                                                 save_LIBS="$LIBS"
3900                                 LIBS="$KRB_LIBS $LIBS"
3901                                 cat > conftest.$ac_ext <<EOF
3902 #line 3903 "configure"
3903 #include "confdefs.h"
3904
3905 #include <kerberosIV/krb.h>
3906 #include <kerberosIV/des.h>
3907 extern int des_debug;
3908
3909 int main() {
3910
3911 des_debug = 1;
3912
3913 ; return 0; }
3914 EOF
3915 if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3916   rm -rf conftest*
3917   ol_cv_var_des_debug=yes
3918 else
3919   echo "configure: failed program was:" >&5
3920   cat conftest.$ac_ext >&5
3921   rm -rf conftest*
3922   ol_cv_var_des_debug=no
3923 fi
3924 rm -f conftest*
3925                                                                 LIBS="$save_LIBS"
3926                         
3927 fi
3928
3929 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3930
3931                         if test $ol_cv_var_des_debug = yes ; then
3932                                 cat >> confdefs.h <<\EOF
3933 #define HAVE_DES_DEBUG 1
3934 EOF
3935
3936                         fi
3937
3938                         LIBS="$save_LIBS"
3939                 fi
3940         fi
3941 fi
3942
3943 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3944         for ac_hdr in krb.h des.h
3945 do
3946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3948 echo "configure:3949: checking for $ac_hdr" >&5
3949 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include <$ac_hdr>
3956 EOF
3957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3958 { (eval echo configure:3959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3960 if test -z "$ac_err"; then
3961   rm -rf conftest*
3962   eval "ac_cv_header_$ac_safe=yes"
3963 else
3964   echo "$ac_err" >&5
3965   echo "configure: failed program was:" >&5
3966   cat conftest.$ac_ext >&5
3967   rm -rf conftest*
3968   eval "ac_cv_header_$ac_safe=no"
3969 fi
3970 rm -f conftest*
3971 fi
3972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3973   echo "$ac_t""yes" 1>&6
3974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3975   cat >> confdefs.h <<EOF
3976 #define $ac_tr_hdr 1
3977 EOF
3978  
3979 else
3980   echo "$ac_t""no" 1>&6
3981 fi
3982 done
3983
3984
3985         if test $ac_cv_header_krb_h = yes ; then
3986                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3987 echo "configure:3988: checking for main in -lkrb" >&5
3988 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3990   echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992   ac_save_LIBS="$LIBS"
3993 LIBS="-lkrb -ldes $LIBS"
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997
3998 int main() {
3999 main()
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4003   rm -rf conftest*
4004   eval "ac_cv_lib_$ac_lib_var=yes"
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   eval "ac_cv_lib_$ac_lib_var=no"
4010 fi
4011 rm -f conftest*
4012 LIBS="$ac_save_LIBS"
4013
4014 fi
4015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4016   echo "$ac_t""yes" 1>&6
4017   have_k4=yes
4018 else
4019   echo "$ac_t""no" 1>&6
4020 have_k4=no
4021 fi
4022
4023
4024                 if test $have_k4 = yes ; then
4025                         ol_with_kerberos=found
4026                         ol_link_kerberos=yes
4027
4028                         KRB_LIBS="-lkrb -ldes"
4029                 fi
4030         fi
4031 fi
4032
4033 if test $ol_link_kerberos = yes ; then
4034         cat >> confdefs.h <<\EOF
4035 #define HAVE_KERBEROS 1
4036 EOF
4037
4038 fi
4039
4040 ol_link_tls=no
4041 if test $ol_with_tls != no ; then
4042         
4043         for ac_hdr in ssl.h
4044 do
4045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4047 echo "configure:4048: checking for $ac_hdr" >&5
4048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 #include <$ac_hdr>
4055 EOF
4056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4057 { (eval echo configure:4058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4059 if test -z "$ac_err"; then
4060   rm -rf conftest*
4061   eval "ac_cv_header_$ac_safe=yes"
4062 else
4063   echo "$ac_err" >&5
4064   echo "configure: failed program was:" >&5
4065   cat conftest.$ac_ext >&5
4066   rm -rf conftest*
4067   eval "ac_cv_header_$ac_safe=no"
4068 fi
4069 rm -f conftest*
4070 fi
4071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4072   echo "$ac_t""yes" 1>&6
4073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4074   cat >> confdefs.h <<EOF
4075 #define $ac_tr_hdr 1
4076 EOF
4077  
4078 else
4079   echo "$ac_t""no" 1>&6
4080 fi
4081 done
4082
4083         
4084         if test $ac_cv_header_ssl_h = yes ; then
4085                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4086 echo "configure:4087: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4087 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4089   echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091   ac_save_LIBS="$LIBS"
4092 LIBS="-lssl -lcrypto $LIBS"
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 /* Override any gcc2 internal prototype to avoid an error.  */
4097 /* We use char because int might match the return type of a gcc2
4098     builtin and then its argument prototype would still apply.  */
4099 char SSLeay_add_ssl_algorithms();
4100
4101 int main() {
4102 SSLeay_add_ssl_algorithms()
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106   rm -rf conftest*
4107   eval "ac_cv_lib_$ac_lib_var=yes"
4108 else
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111   rm -rf conftest*
4112   eval "ac_cv_lib_$ac_lib_var=no"
4113 fi
4114 rm -f conftest*
4115 LIBS="$ac_save_LIBS"
4116
4117 fi
4118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4119   echo "$ac_t""yes" 1>&6
4120   have_ssleay=yes
4121                         need_rsaref=no
4122 else
4123   echo "$ac_t""no" 1>&6
4124 have_ssleay=no
4125 fi
4126
4127                         
4128                 if test $have_ssleay = no ; then
4129                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4130 echo "configure:4131: checking for ssl3_accept in -lssl" >&5
4131 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4133   echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135   ac_save_LIBS="$LIBS"
4136 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 /* Override any gcc2 internal prototype to avoid an error.  */
4141 /* We use char because int might match the return type of a gcc2
4142     builtin and then its argument prototype would still apply.  */
4143 char ssl3_accept();
4144
4145 int main() {
4146 ssl3_accept()
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4150   rm -rf conftest*
4151   eval "ac_cv_lib_$ac_lib_var=yes"
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   eval "ac_cv_lib_$ac_lib_var=no"
4157 fi
4158 rm -f conftest*
4159 LIBS="$ac_save_LIBS"
4160
4161 fi
4162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4163   echo "$ac_t""yes" 1>&6
4164   have_ssleay=yes
4165                                 need_rsaref=yes
4166 else
4167   echo "$ac_t""no" 1>&6
4168 have_ssleay=no
4169 fi
4170
4171                 fi
4172
4173                 if test $have_ssleay = yes ; then
4174                         ol_with_tls=found
4175                         ol_link_tls=yes
4176
4177                         cat >> confdefs.h <<\EOF
4178 #define HAVE_SSLEAY 1
4179 EOF
4180
4181
4182                         if test $need_rsaref = yes; then
4183                                 cat >> confdefs.h <<\EOF
4184 #define HAVE_RSAREF 1
4185 EOF
4186
4187
4188                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4189                         else
4190                                 TLS_LIBS="-lssl -lcrypto"
4191                         fi
4192                 fi
4193         fi
4194 fi
4195
4196 if test $ol_link_tls = yes ; then
4197         cat >> confdefs.h <<\EOF
4198 #define HAVE_TLS 1
4199 EOF
4200
4201 fi      
4202
4203 for ac_func in \
4204         ctime_r                 \
4205         gethostbyname_r gethostbyaddr_r \
4206
4207 do
4208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4209 echo "configure:4210: checking for $ac_func" >&5
4210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 /* System header to define __stub macros and hopefully few prototypes,
4217     which can conflict with char $ac_func(); below.  */
4218 #include <assert.h>
4219 /* Override any gcc2 internal prototype to avoid an error.  */
4220 /* We use char because int might match the return type of a gcc2
4221     builtin and then its argument prototype would still apply.  */
4222 char $ac_func();
4223
4224 int main() {
4225
4226 /* The GNU C library defines this for functions which it implements
4227     to always fail with ENOSYS.  Some functions are actually named
4228     something starting with __ and the normal name is an alias.  */
4229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4230 choke me
4231 #else
4232 $ac_func();
4233 #endif
4234
4235 ; return 0; }
4236 EOF
4237 if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4238   rm -rf conftest*
4239   eval "ac_cv_func_$ac_func=yes"
4240 else
4241   echo "configure: failed program was:" >&5
4242   cat conftest.$ac_ext >&5
4243   rm -rf conftest*
4244   eval "ac_cv_func_$ac_func=no"
4245 fi
4246 rm -f conftest*
4247 fi
4248
4249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4250   echo "$ac_t""yes" 1>&6
4251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4252   cat >> confdefs.h <<EOF
4253 #define $ac_tr_func 1
4254 EOF
4255  
4256 else
4257   echo "$ac_t""no" 1>&6
4258 fi
4259 done
4260
4261
4262 if test "$ac_cv_func_ctime_r" = no ; then
4263         ol_cv_func_ctime_r_nargs=0
4264 else
4265         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4266 echo "configure:4267: checking number of arguments of ctime_r" >&5
4267 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4268   echo $ac_n "(cached) $ac_c" 1>&6
4269 else
4270   cat > conftest.$ac_ext <<EOF
4271 #line 4272 "configure"
4272 #include "confdefs.h"
4273 #include <time.h>
4274 int main() {
4275 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4276 ; return 0; }
4277 EOF
4278 if { (eval echo configure:4279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4279   rm -rf conftest*
4280   ol_cv_func_ctime_r_nargs=3
4281 else
4282   echo "configure: failed program was:" >&5
4283   cat conftest.$ac_ext >&5
4284   rm -rf conftest*
4285   cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include <time.h>
4289 int main() {
4290 time_t ti; char *buffer; ctime_r(&ti,buffer);
4291 ; return 0; }
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4294   rm -rf conftest*
4295   ol_cv_func_ctime_r_nargs=2
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   ol_cv_func_ctime_r_nargs=0
4301 fi
4302 rm -f conftest*
4303 fi
4304 rm -f conftest*
4305 fi
4306
4307 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4308   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4309     cat >> confdefs.h <<EOF
4310 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4311 EOF
4312
4313   fi
4314
4315 fi
4316
4317 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4318         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4319 echo "configure:4320: checking number of arguments of gethostbyname_r" >&5
4320 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <sys/types.h>
4327 #include <sys/socket.h>
4328 #include <netinet/in.h>
4329 #include <netdb.h>
4330 #define BUFSIZE (sizeof(struct hostent)+10)
4331 int main() {
4332 struct hostent hent; char buffer[BUFSIZE];
4333                 int bufsize=BUFSIZE;int h_errno;
4334                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4335                         buffer, bufsize, &h_errno);
4336 ; return 0; }
4337 EOF
4338 if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4339   rm -rf conftest*
4340   ol_cv_func_gethostbyname_r_nargs=5
4341 else
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <sys/types.h>
4349 #include <sys/socket.h>
4350 #include <netinet/in.h>
4351 #include <netdb.h>
4352 #define BUFSIZE (sizeof(struct hostent)+10)
4353 int main() {
4354 struct hostent hent;struct hostent *rhent;
4355                         char buffer[BUFSIZE];
4356                         int bufsize=BUFSIZE;int h_errno;
4357                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4358                                 &rhent, &h_errno);
4359 ; return 0; }
4360 EOF
4361 if { (eval echo configure:4362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4362   rm -rf conftest*
4363   ol_cv_func_gethostbyname_r_nargs=6
4364 else
4365   echo "configure: failed program was:" >&5
4366   cat conftest.$ac_ext >&5
4367   rm -rf conftest*
4368   ol_cv_func_gethostbyname_r_nargs=0
4369 fi
4370 rm -f conftest*
4371 fi
4372 rm -f conftest*
4373 fi
4374
4375 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4376   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4377         cat >> confdefs.h <<EOF
4378 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4379 EOF
4380
4381   fi
4382
4383 else
4384         ol_cv_func_gethostbyname_r_nargs=0
4385 fi
4386  
4387 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4388         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4389 echo "configure:4390: checking number of arguments of gethostbyaddr_r" >&5
4390 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   cat > conftest.$ac_ext <<EOF
4394 #line 4395 "configure"
4395 #include "confdefs.h"
4396 #include <sys/types.h>
4397 #include <sys/socket.h>
4398 #include <netinet/in.h>
4399 #include <netdb.h>
4400 #define BUFSIZE (sizeof(struct hostent)+10)
4401 int main() {
4402 struct hostent hent; char buffer[BUFSIZE]; 
4403             struct in_addr add;
4404             size_t alen=sizeof(struct in_addr);
4405             int bufsize=BUFSIZE;int h_errno;
4406                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4407                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4408 ; return 0; }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4411   rm -rf conftest*
4412   ol_cv_func_gethostbyaddr_r_nargs=7
4413 else
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <sys/types.h>
4421 #include <sys/socket.h>
4422 #include <netinet/in.h>
4423 #include <netdb.h>
4424 #define BUFSIZE (sizeof(struct hostent)+10)
4425 int main() {
4426 struct hostent hent;
4427                         struct hostent *rhent; char buffer[BUFSIZE]; 
4428                         struct in_addr add;
4429                         size_t alen=sizeof(struct in_addr);
4430                         int bufsize=BUFSIZE;int h_errno;
4431                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4432                                 alen, AF_INET, &hent, buffer, bufsize, 
4433                                 &rhent, &h_errno);
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437   rm -rf conftest*
4438   ol_cv_func_gethostbyaddr_r_nargs=8
4439 else
4440   echo "configure: failed program was:" >&5
4441   cat conftest.$ac_ext >&5
4442   rm -rf conftest*
4443   ol_cv_func_gethostbyaddr_r_nargs=0
4444 fi
4445 rm -f conftest*
4446 fi
4447 rm -f conftest*
4448 fi
4449
4450 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4451   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4452     cat >> confdefs.h <<EOF
4453 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4454 EOF
4455
4456   fi
4457
4458 else
4459         ol_cv_func_gethostbyaddr_r_nargs=0
4460 fi
4461
4462 if test "$ac_cv_func_ctime_r" = yes \
4463         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4464         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4465         -a "$ac_cv_func_gethostbyname_r" = yes \
4466         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4467         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4468         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4469         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4470         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4471         ; then
4472  
4473         cat >> confdefs.h <<\EOF
4474 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4475 EOF
4476
4477 fi
4478
4479 ol_link_threads=no
4480 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4481         -o $ol_with_threads = posix ; then
4482
4483         for ac_hdr in pthread.h sched.h
4484 do
4485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4487 echo "configure:4488: checking for $ac_hdr" >&5
4488 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494 #include <$ac_hdr>
4495 EOF
4496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4497 { (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4499 if test -z "$ac_err"; then
4500   rm -rf conftest*
4501   eval "ac_cv_header_$ac_safe=yes"
4502 else
4503   echo "$ac_err" >&5
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   eval "ac_cv_header_$ac_safe=no"
4508 fi
4509 rm -f conftest*
4510 fi
4511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4512   echo "$ac_t""yes" 1>&6
4513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4514   cat >> confdefs.h <<EOF
4515 #define $ac_tr_hdr 1
4516 EOF
4517  
4518 else
4519   echo "$ac_t""no" 1>&6
4520 fi
4521 done
4522
4523
4524         if test $ac_cv_header_pthread_h = yes ; then
4525                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4526 echo "configure:4527: checking POSIX thread version" >&5
4527 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   
4531         cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534
4535 #               include <pthread.h>
4536                 /* this check could be improved */
4537 #               ifdef PTHREAD_ONCE_INIT
4538                         pthread_version_final
4539 #               endif
4540         
4541 EOF
4542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4543   egrep "pthread_version_final" >/dev/null 2>&1; then
4544   rm -rf conftest*
4545   ol_pthread_final=yes
4546 else
4547   rm -rf conftest*
4548   ol_pthread_final=no
4549 fi
4550 rm -f conftest*
4551
4552
4553         cat > conftest.$ac_ext <<EOF
4554 #line 4555 "configure"
4555 #include "confdefs.h"
4556
4557 #               include <pthread.h>
4558                 /* this check could be improved */
4559 #               ifdef pthread_once_init
4560                         pthread_version_draft4
4561 #               endif
4562         
4563 EOF
4564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4565   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4566   rm -rf conftest*
4567   ol_pthread_draft4=yes
4568 else
4569   rm -rf conftest*
4570   ol_pthread_draft4=no
4571 fi
4572 rm -f conftest*
4573
4574
4575         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4576                 ol_cv_pthread_version=final
4577         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4578                 ol_cv_pthread_version=draft4
4579         else
4580                 ol_cv_pthread_version=unknown
4581         fi
4582
4583 fi
4584
4585 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4586
4587
4588                 if test $ol_cv_pthread_version = final ; then
4589                         cat >> confdefs.h <<\EOF
4590 #define HAVE_PTHREADS_FINAL 1
4591 EOF
4592
4593                 elif test $ol_cv_pthread_version = draft4 ; then
4594                         cat >> confdefs.h <<\EOF
4595 #define HAVE_PTHREADS_D4 1
4596 EOF
4597
4598                 else
4599                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4600                 fi
4601
4602                 # consider threads found
4603                 ol_with_threads=found
4604
4605                 
4606 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
4607 echo "configure:4608: checking for LinuxThreads" >&5
4608 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
4609   echo $ac_n "(cached) $ac_c" 1>&6
4610 else
4611   
4612         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
4613         if test "$res" -gt 0 ; then
4614                 ol_cv_linux_threads=yes
4615         else
4616                 ol_cv_linux_threads=no
4617         fi
4618
4619 fi
4620
4621 echo "$ac_t""$ol_cv_linux_threads" 1>&6
4622
4623
4624                 if test $ol_cv_linux_threads = yes ; then
4625                         cat >> confdefs.h <<\EOF
4626 #define HAVE_LINUX_THREADS 1
4627 EOF
4628
4629                 fi
4630
4631                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4632                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4633 echo "configure:4634: checking for pthread_create in default libraries" >&5
4634                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   
4638                 if test "$cross_compiling" = yes; then
4639                         ol_cv_pthread_create=yes
4640 else
4641   cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644
4645 #include <pthread.h>
4646 #ifndef NULL
4647 #define NULL (void*)0
4648 #endif
4649
4650 static void *task(p)
4651         void *p;
4652 {
4653         return (void *) (p == NULL);
4654 }
4655
4656 int main(argc, argv)
4657         int argc;
4658         char **argv;
4659 {
4660         pthread_t t;
4661         int status;
4662
4663         /* make sure pthread_create() isn't just a stub */
4664 #if HAVE_PTHREADS_D4
4665         status = pthread_create(&t, pthread_attr_default, task, NULL));
4666 #else
4667         status = pthread_create(&t, NULL, task, NULL);
4668 #endif
4669
4670         if( status ) return status;
4671
4672         /* make sure pthread_detach() isn't just a stub */
4673 #if HAVE_PTHREADS_D4
4674         status = pthread_detach( &t );
4675 #else
4676         status = pthread_detach( t );
4677 #endif
4678
4679         if( status ) return status;
4680
4681         return status;
4682 }
4683
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4686 then
4687   ol_cv_pthread_create=yes
4688 else
4689   echo "configure: failed program was:" >&5
4690   cat conftest.$ac_ext >&5
4691   rm -fr conftest*
4692   ol_cv_pthread_create=no
4693 fi
4694 rm -fr conftest*
4695 fi
4696
4697 fi
4698
4699                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4700
4701                 if test $ol_cv_pthread_create != no ; then
4702                         ol_link_threads=posix
4703                 fi
4704
4705                 if test $ol_link_threads = no ; then
4706                                                 echo $ac_n "checking for pthread_create with -mt""... $ac_c" 1>&6
4707 echo "configure:4708: checking for pthread_create with -mt" >&5
4708 if eval "test \"`echo '$''{'ol_cv_pthread_mt_flag'+set}'`\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   
4712                                                                 save_LIBS="$LIBS"
4713                                 LIBS="-mt $LIBS"
4714                                 cat > conftest.$ac_ext <<EOF
4715 #line 4716 "configure"
4716 #include "confdefs.h"
4717 char pthread_create();
4718 int main() {
4719 pthread_create();
4720 ; return 0; }
4721 EOF
4722 if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4723   rm -rf conftest*
4724   ol_cv_pthread_mt_flag=yes
4725 else
4726   echo "configure: failed program was:" >&5
4727   cat conftest.$ac_ext >&5
4728   rm -rf conftest*
4729   ol_cv_pthread_mt_flag=no
4730 fi
4731 rm -f conftest*
4732                                                                 LIBS="$save_LIBS"
4733                         
4734 fi
4735
4736 echo "$ac_t""$ol_cv_pthread_mt_flag" 1>&6
4737
4738                         if test $ol_cv_pthread_mt_flag = yes ; then
4739                                 LTHREAD_LIBS="$LTHREAD_LIBS -mt"
4740                                 ol_link_threads=posix
4741                         fi
4742                 fi
4743
4744                 if test $ol_link_threads = no ; then
4745                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
4746 echo "configure:4747: checking for pthread_create with -kthread" >&5
4747 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   
4751                                                                 save_LIBS="$LIBS"
4752                                 LIBS="-kthread $LIBS"
4753                                 cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756 #include <pthread.h>
4757 int main() {
4758
4759 #if HAVE_PTHREADS_D4
4760         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4761 #else
4762         pthread_t t;
4763         pthread_create(&t,NULL,NULL,NULL);
4764         pthread_detach(t);
4765 #endif
4766
4767 ; return 0; }
4768 EOF
4769 if { (eval echo configure:4770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4770   rm -rf conftest*
4771   ol_cv_kthread_flag=yes
4772 else
4773   echo "configure: failed program was:" >&5
4774   cat conftest.$ac_ext >&5
4775   rm -rf conftest*
4776   ol_cv_kthread_flag=no
4777 fi
4778 rm -f conftest*
4779                                                                 LIBS="$save_LIBS"
4780                         
4781 fi
4782
4783 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
4784
4785                         if test $ol_cv_kthread_flag = yes ; then
4786                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
4787                                 ol_link_threads=posix
4788                         fi
4789                 fi
4790
4791                 if test $ol_link_threads = no ; then
4792                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
4793 echo "configure:4794: checking for pthread_create with -pthread" >&5
4794 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   
4798                                                                 save_LIBS="$LIBS"
4799                                 LIBS="-pthread $LIBS"
4800                                 cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803 #include <pthread.h>
4804 int main() {
4805
4806 #if HAVE_PTHREADS_D4
4807         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4808 #else
4809         pthread_create(NULL,NULL,NULL,NULL);
4810 #endif
4811
4812 ; return 0; }
4813 EOF
4814 if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4815   rm -rf conftest*
4816   ol_cv_pthread_flag=yes
4817 else
4818   echo "configure: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   rm -rf conftest*
4821   ol_cv_pthread_flag=no
4822 fi
4823 rm -f conftest*
4824                                                                 LIBS="$save_LIBS"
4825                         
4826 fi
4827
4828 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
4829
4830                         if test $ol_cv_pthread_flag = yes ; then
4831                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
4832                                 ol_link_threads=posix
4833                         fi
4834                 fi
4835
4836                 if test $ol_link_threads = no ; then
4837                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4838 echo "configure:4839: checking for pthread_create with -pthreads" >&5
4839 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4840   echo $ac_n "(cached) $ac_c" 1>&6
4841 else
4842   
4843                                                                 save_LIBS="$LIBS"
4844                                 LIBS="-pthreads $LIBS"
4845                                 cat > conftest.$ac_ext <<EOF
4846 #line 4847 "configure"
4847 #include "confdefs.h"
4848 #include <pthread.h>
4849 int main() {
4850
4851 #if HAVE_PTHREADS_D4
4852         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4853 #else
4854         pthread_create(NULL,NULL,NULL,NULL);
4855 #endif
4856
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4860   rm -rf conftest*
4861   ol_cv_pthreads_flag=yes
4862 else
4863   echo "configure: failed program was:" >&5
4864   cat conftest.$ac_ext >&5
4865   rm -rf conftest*
4866   ol_cv_pthreads_flag=no
4867 fi
4868 rm -f conftest*
4869                                                                 LIBS="$save_LIBS"
4870                         
4871 fi
4872
4873 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4874
4875                         if test $ol_cv_pthreads_flag = yes ; then
4876                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4877                                 ol_link_threads=posix
4878                         fi
4879                 fi
4880
4881                 if test $ol_link_threads = no ; then
4882                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4883 echo "configure:4884: checking for pthread_create with -thread" >&5
4884 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4885   echo $ac_n "(cached) $ac_c" 1>&6
4886 else
4887   
4888                                                                 save_LIBS="$LIBS"
4889                                 LIBS="-thread $LIBS"
4890                                 cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893 char pthread_create();
4894 int main() {
4895 pthread_create();
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899   rm -rf conftest*
4900   ol_cv_thread_flag=yes
4901 else
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   ol_cv_thread_flag=no
4906 fi
4907 rm -f conftest*
4908                                                                 LIBS="$save_LIBS"
4909                         
4910 fi
4911
4912 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4913
4914                         if test $ol_cv_thread_flag = yes ; then
4915                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4916                                 ol_link_threads=posix
4917                         fi
4918                 fi
4919
4920                 if test $ol_link_threads = no ; then
4921                                                 save_LIBS="$LIBS"
4922                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4923 echo "configure:4924: checking for pthread_mutex_unlock in -lpthread" >&5
4924 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4925 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   ac_save_LIBS="$LIBS"
4929 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4930 cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933 /* Override any gcc2 internal prototype to avoid an error.  */
4934 /* We use char because int might match the return type of a gcc2
4935     builtin and then its argument prototype would still apply.  */
4936 char pthread_mutex_unlock();
4937
4938 int main() {
4939 pthread_mutex_unlock()
4940 ; return 0; }
4941 EOF
4942 if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4943   rm -rf conftest*
4944   eval "ac_cv_lib_$ac_lib_var=yes"
4945 else
4946   echo "configure: failed program was:" >&5
4947   cat conftest.$ac_ext >&5
4948   rm -rf conftest*
4949   eval "ac_cv_lib_$ac_lib_var=no"
4950 fi
4951 rm -f conftest*
4952 LIBS="$ac_save_LIBS"
4953
4954 fi
4955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4956   echo "$ac_t""yes" 1>&6
4957   
4958                                 ol_link_threads=posix
4959                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4960                                 
4961 else
4962   echo "$ac_t""no" 1>&6
4963 :
4964 fi
4965
4966                         LIBS="$save_LIBS"
4967                 fi
4968
4969                 if test $ol_link_threads = no ; then
4970                                                 save_LIBS="$LIBS"
4971                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4972 echo "configure:4973: checking for pthread_mutex_lock in -lpthread" >&5
4973 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4975   echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977   ac_save_LIBS="$LIBS"
4978 LIBS="-lpthread -lmach -lexc $LIBS"
4979 cat > conftest.$ac_ext <<EOF
4980 #line 4981 "configure"
4981 #include "confdefs.h"
4982 /* Override any gcc2 internal prototype to avoid an error.  */
4983 /* We use char because int might match the return type of a gcc2
4984     builtin and then its argument prototype would still apply.  */
4985 char pthread_mutex_lock();
4986
4987 int main() {
4988 pthread_mutex_lock()
4989 ; return 0; }
4990 EOF
4991 if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4992   rm -rf conftest*
4993   eval "ac_cv_lib_$ac_lib_var=yes"
4994 else
4995   echo "configure: failed program was:" >&5
4996   cat conftest.$ac_ext >&5
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=no"
4999 fi
5000 rm -f conftest*
5001 LIBS="$ac_save_LIBS"
5002
5003 fi
5004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5005   echo "$ac_t""yes" 1>&6
5006   
5007                                 ol_link_threads=posix
5008                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
5009                                 
5010 else
5011   echo "$ac_t""no" 1>&6
5012 :
5013 fi
5014
5015                         LIBS="$save_LIBS"
5016                 fi
5017
5018                 if test $ol_link_threads = no ; then
5019                                                 save_LIBS="$LIBS"
5020                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
5021 echo "configure:5022: checking for pthread_mutex_trylock in -lpthread" >&5
5022 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5023 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5024   echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026   ac_save_LIBS="$LIBS"
5027 LIBS="-lpthread -lexc $LIBS"
5028 cat > conftest.$ac_ext <<EOF
5029 #line 5030 "configure"
5030 #include "confdefs.h"
5031 /* Override any gcc2 internal prototype to avoid an error.  */
5032 /* We use char because int might match the return type of a gcc2
5033     builtin and then its argument prototype would still apply.  */
5034 char pthread_mutex_trylock();
5035
5036 int main() {
5037 pthread_mutex_trylock()
5038 ; return 0; }
5039 EOF
5040 if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5041   rm -rf conftest*
5042   eval "ac_cv_lib_$ac_lib_var=yes"
5043 else
5044   echo "configure: failed program was:" >&5
5045   cat conftest.$ac_ext >&5
5046   rm -rf conftest*
5047   eval "ac_cv_lib_$ac_lib_var=no"
5048 fi
5049 rm -f conftest*
5050 LIBS="$ac_save_LIBS"
5051
5052 fi
5053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5054   echo "$ac_t""yes" 1>&6
5055   
5056                                 ol_link_threads=posix
5057                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
5058                                 
5059 else
5060   echo "$ac_t""no" 1>&6
5061 :
5062 fi
5063
5064                         LIBS="$save_LIBS"
5065                 fi
5066
5067                                 if test $ol_link_threads = no ; then
5068                                                 save_LIBS="$LIBS"
5069                         echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
5070 echo "configure:5071: checking for pthread_join in -lpthread" >&5
5071 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
5072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5073   echo $ac_n "(cached) $ac_c" 1>&6
5074 else
5075   ac_save_LIBS="$LIBS"
5076 LIBS="-lpthread -Wl,-woff,85 $LIBS"
5077 cat > conftest.$ac_ext <<EOF
5078 #line 5079 "configure"
5079 #include "confdefs.h"
5080 /* Override any gcc2 internal prototype to avoid an error.  */
5081 /* We use char because int might match the return type of a gcc2
5082     builtin and then its argument prototype would still apply.  */
5083 char pthread_join();
5084
5085 int main() {
5086 pthread_join()
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=yes"
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   eval "ac_cv_lib_$ac_lib_var=no"
5097 fi
5098 rm -f conftest*
5099 LIBS="$ac_save_LIBS"
5100
5101 fi
5102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104   
5105                                 ol_link_threads=posix
5106                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
5107                                 
5108 else
5109   echo "$ac_t""no" 1>&6
5110 :
5111 fi
5112
5113                         LIBS="$save_LIBS"
5114                 fi
5115
5116                 if test $ol_link_threads = no ; then
5117                                                 save_LIBS="$LIBS"
5118                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5119 echo "configure:5120: checking for pthread_create in -lpthread" >&5
5120 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
5121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5122   echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124   ac_save_LIBS="$LIBS"
5125 LIBS="-lpthread  $LIBS"
5126 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* Override any gcc2 internal prototype to avoid an error.  */
5130 /* We use char because int might match the return type of a gcc2
5131     builtin and then its argument prototype would still apply.  */
5132 char pthread_create();
5133
5134 int main() {
5135 pthread_create()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 LIBS="$ac_save_LIBS"
5149
5150 fi
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5152   echo "$ac_t""yes" 1>&6
5153   
5154                                 ol_link_threads=posix
5155                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
5156 else
5157   echo "$ac_t""no" 1>&6
5158 :
5159 fi
5160
5161                         LIBS="$save_LIBS"
5162                 fi
5163
5164                 if test $ol_link_threads = no ; then
5165                                                 save_LIBS="$LIBS"
5166                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5167 echo "configure:5168: checking for pthread_create in -lc_r" >&5
5168 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
5169 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5170   echo $ac_n "(cached) $ac_c" 1>&6
5171 else
5172   ac_save_LIBS="$LIBS"
5173 LIBS="-lc_r  $LIBS"
5174 cat > conftest.$ac_ext <<EOF
5175 #line 5176 "configure"
5176 #include "confdefs.h"
5177 /* Override any gcc2 internal prototype to avoid an error.  */
5178 /* We use char because int might match the return type of a gcc2
5179     builtin and then its argument prototype would still apply.  */
5180 char pthread_create();
5181
5182 int main() {
5183 pthread_create()
5184 ; return 0; }
5185 EOF
5186 if { (eval echo configure:5187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5187   rm -rf conftest*
5188   eval "ac_cv_lib_$ac_lib_var=yes"
5189 else
5190   echo "configure: failed program was:" >&5
5191   cat conftest.$ac_ext >&5
5192   rm -rf conftest*
5193   eval "ac_cv_lib_$ac_lib_var=no"
5194 fi
5195 rm -f conftest*
5196 LIBS="$ac_save_LIBS"
5197
5198 fi
5199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5200   echo "$ac_t""yes" 1>&6
5201   
5202                                 ol_link_threads=posix
5203                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
5204 else
5205   echo "$ac_t""no" 1>&6
5206 :
5207 fi
5208
5209                         LIBS="$save_LIBS"
5210                 fi
5211
5212                 if test $ol_link_threads = no ; then
5213                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
5214 echo "configure:5215: checking for pthread_create with -threads" >&5
5215 if eval "test \"`echo '$''{'ol_cv_threads_flag'+set}'`\" = set"; then
5216   echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218   
5219                                                                 save_LIBS="$LIBS"
5220                                 LIBS="-threads $LIBS"
5221                                 cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224 char pthread_create();
5225 int main() {
5226
5227                                         pthread_create();
5228                                         
5229 ; return 0; }
5230 EOF
5231 if { (eval echo configure:5232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5232   rm -rf conftest*
5233   ol_cv_threads_flag=yes
5234 else
5235   echo "configure: failed program was:" >&5
5236   cat conftest.$ac_ext >&5
5237   rm -rf conftest*
5238   ol_cv_threads_flag=no
5239 fi
5240 rm -f conftest*
5241                                                                 LIBS="$save_LIBS"
5242                         
5243 fi
5244
5245 echo "$ac_t""$ol_cv_threads_flag" 1>&6
5246
5247                         if test $ol_cv_threads_flag = yes ; then
5248                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
5249                                 ol_link_threads=posix
5250                         fi
5251                 fi
5252
5253                 if test $ol_link_threads = no ; then
5254                                                 save_LIBS="$LIBS"
5255                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
5256 echo "configure:5257: checking for pthread_mutex_unlock in -lpthreads" >&5
5257 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
5258 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5259   echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261   ac_save_LIBS="$LIBS"
5262 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5263 cat > conftest.$ac_ext <<EOF
5264 #line 5265 "configure"
5265 #include "confdefs.h"
5266 /* Override any gcc2 internal prototype to avoid an error.  */
5267 /* We use char because int might match the return type of a gcc2
5268     builtin and then its argument prototype would still apply.  */
5269 char pthread_mutex_unlock();
5270
5271 int main() {
5272 pthread_mutex_unlock()
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5276   rm -rf conftest*
5277   eval "ac_cv_lib_$ac_lib_var=yes"
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   eval "ac_cv_lib_$ac_lib_var=no"
5283 fi
5284 rm -f conftest*
5285 LIBS="$ac_save_LIBS"
5286
5287 fi
5288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5289   echo "$ac_t""yes" 1>&6
5290   
5291                                 ol_link_threads=posix
5292                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
5293                                 
5294 else
5295   echo "$ac_t""no" 1>&6
5296 :
5297 fi
5298
5299                         LIBS="$save_LIBS"
5300                 fi
5301
5302                 if test $ol_link_threads = no ; then
5303                                                 save_LIBS="$LIBS"
5304                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
5305 echo "configure:5306: checking for pthread_mutex_lock in -lpthreads" >&5
5306 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
5307 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5308   echo $ac_n "(cached) $ac_c" 1>&6
5309 else
5310   ac_save_LIBS="$LIBS"
5311 LIBS="-lpthreads -lmach -lexc $LIBS"
5312 cat > conftest.$ac_ext <<EOF
5313 #line 5314 "configure"
5314 #include "confdefs.h"
5315 /* Override any gcc2 internal prototype to avoid an error.  */
5316 /* We use char because int might match the return type of a gcc2
5317     builtin and then its argument prototype would still apply.  */
5318 char pthread_mutex_lock();
5319
5320 int main() {
5321 pthread_mutex_lock()
5322 ; return 0; }
5323 EOF
5324 if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5325   rm -rf conftest*
5326   eval "ac_cv_lib_$ac_lib_var=yes"
5327 else
5328   echo "configure: failed program was:" >&5
5329   cat conftest.$ac_ext >&5
5330   rm -rf conftest*
5331   eval "ac_cv_lib_$ac_lib_var=no"
5332 fi
5333 rm -f conftest*
5334 LIBS="$ac_save_LIBS"
5335
5336 fi
5337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5338   echo "$ac_t""yes" 1>&6
5339   
5340                                 ol_link_threads=posix
5341                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
5342                                 
5343 else
5344   echo "$ac_t""no" 1>&6
5345 :
5346 fi
5347
5348                         LIBS="$save_LIBS"
5349                 fi
5350
5351                 if test $ol_link_threads = no ; then
5352                                                 save_LIBS="$LIBS"
5353                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
5354 echo "configure:5355: checking for pthread_mutex_trylock in -lpthreads" >&5
5355 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5356 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5357   echo $ac_n "(cached) $ac_c" 1>&6
5358 else
5359   ac_save_LIBS="$LIBS"
5360 LIBS="-lpthreads -lexc $LIBS"
5361 cat > conftest.$ac_ext <<EOF
5362 #line 5363 "configure"
5363 #include "confdefs.h"
5364 /* Override any gcc2 internal prototype to avoid an error.  */
5365 /* We use char because int might match the return type of a gcc2
5366     builtin and then its argument prototype would still apply.  */
5367 char pthread_mutex_trylock();
5368
5369 int main() {
5370 pthread_mutex_trylock()
5371 ; return 0; }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374   rm -rf conftest*
5375   eval "ac_cv_lib_$ac_lib_var=yes"
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379   rm -rf conftest*
5380   eval "ac_cv_lib_$ac_lib_var=no"
5381 fi
5382 rm -f conftest*
5383 LIBS="$ac_save_LIBS"
5384
5385 fi
5386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5387   echo "$ac_t""yes" 1>&6
5388   
5389                                 ol_link_threads=posix
5390                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
5391                                 
5392 else
5393   echo "$ac_t""no" 1>&6
5394 :
5395 fi
5396
5397                         LIBS="$save_LIBS"
5398                 fi
5399
5400                 if test $ol_link_threads = no ; then
5401                                                 save_LIBS="$LIBS"
5402                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5403 echo "configure:5404: checking for pthread_create in -lpthreads" >&5
5404 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
5405 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5406   echo $ac_n "(cached) $ac_c" 1>&6
5407 else
5408   ac_save_LIBS="$LIBS"
5409 LIBS="-lpthreads  $LIBS"
5410 cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413 /* Override any gcc2 internal prototype to avoid an error.  */
5414 /* We use char because int might match the return type of a gcc2
5415     builtin and then its argument prototype would still apply.  */
5416 char pthread_create();
5417
5418 int main() {
5419 pthread_create()
5420 ; return 0; }
5421 EOF
5422 if { (eval echo configure:5423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5423   rm -rf conftest*
5424   eval "ac_cv_lib_$ac_lib_var=yes"
5425 else
5426   echo "configure: failed program was:" >&5
5427   cat conftest.$ac_ext >&5
5428   rm -rf conftest*
5429   eval "ac_cv_lib_$ac_lib_var=no"
5430 fi
5431 rm -f conftest*
5432 LIBS="$ac_save_LIBS"
5433
5434 fi
5435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436   echo "$ac_t""yes" 1>&6
5437   
5438                                 ol_link_threads=posix
5439                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5440 else
5441   echo "$ac_t""no" 1>&6
5442 :
5443 fi
5444
5445                         LIBS="$save_LIBS"
5446                 fi
5447
5448                 if test $ol_link_threads != no ; then
5449                         cat >> confdefs.h <<\EOF
5450 #define HAVE_PTHREADS 1
5451 EOF
5452
5453
5454                                                 save_CPPFLAGS="$CPPFLAGS"
5455                         save_LIBS="$LIBS"
5456                         LIBS="$LTHREAD_LIBS $LIBS"
5457
5458                                                                                                 for ac_func in sched_yield pthread_yield
5459 do
5460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5461 echo "configure:5462: checking for $ac_func" >&5
5462 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 /* System header to define __stub macros and hopefully few prototypes,
5469     which can conflict with char $ac_func(); below.  */
5470 #include <assert.h>
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char $ac_func();
5475
5476 int main() {
5477
5478 /* The GNU C library defines this for functions which it implements
5479     to always fail with ENOSYS.  Some functions are actually named
5480     something starting with __ and the normal name is an alias.  */
5481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5482 choke me
5483 #else
5484 $ac_func();
5485 #endif
5486
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_func_$ac_func=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_func_$ac_func=no"
5497 fi
5498 rm -f conftest*
5499 fi
5500
5501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5502   echo "$ac_t""yes" 1>&6
5503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5504   cat >> confdefs.h <<EOF
5505 #define $ac_tr_func 1
5506 EOF
5507  
5508 else
5509   echo "$ac_t""no" 1>&6
5510 fi
5511 done
5512
5513
5514                         if test $ac_cv_func_sched_yield = no -a \
5515                                 $ac_cv_func_pthread_yield = no ; then
5516                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5517 echo "configure:5518: checking for sched_yield in -lrt" >&5
5518 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5519 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5520   echo $ac_n "(cached) $ac_c" 1>&6
5521 else
5522   ac_save_LIBS="$LIBS"
5523 LIBS="-lrt  $LIBS"
5524 cat > conftest.$ac_ext <<EOF
5525 #line 5526 "configure"
5526 #include "confdefs.h"
5527 /* Override any gcc2 internal prototype to avoid an error.  */
5528 /* We use char because int might match the return type of a gcc2
5529     builtin and then its argument prototype would still apply.  */
5530 char sched_yield();
5531
5532 int main() {
5533 sched_yield()
5534 ; return 0; }
5535 EOF
5536 if { (eval echo configure:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5537   rm -rf conftest*
5538   eval "ac_cv_lib_$ac_lib_var=yes"
5539 else
5540   echo "configure: failed program was:" >&5
5541   cat conftest.$ac_ext >&5
5542   rm -rf conftest*
5543   eval "ac_cv_lib_$ac_lib_var=no"
5544 fi
5545 rm -f conftest*
5546 LIBS="$ac_save_LIBS"
5547
5548 fi
5549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5550   echo "$ac_t""yes" 1>&6
5551   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5552                                         cat >> confdefs.h <<\EOF
5553 #define HAVE_SCHED_YIELD 1
5554 EOF
5555
5556                                         ac_cv_func_sched_yield=yes
5557 else
5558   echo "$ac_t""no" 1>&6
5559 ac_cv_func_sched_yield=no
5560 fi
5561
5562                         fi
5563                         if test $ac_cv_func_sched_yield = no -a \
5564                                 $ac_cv_func_pthread_yield = no ; then
5565                                                                                                 for ac_func in thr_yield
5566 do
5567 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5568 echo "configure:5569: checking for $ac_func" >&5
5569 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5570   echo $ac_n "(cached) $ac_c" 1>&6
5571 else
5572   cat > conftest.$ac_ext <<EOF
5573 #line 5574 "configure"
5574 #include "confdefs.h"
5575 /* System header to define __stub macros and hopefully few prototypes,
5576     which can conflict with char $ac_func(); below.  */
5577 #include <assert.h>
5578 /* Override any gcc2 internal prototype to avoid an error.  */
5579 /* We use char because int might match the return type of a gcc2
5580     builtin and then its argument prototype would still apply.  */
5581 char $ac_func();
5582
5583 int main() {
5584
5585 /* The GNU C library defines this for functions which it implements
5586     to always fail with ENOSYS.  Some functions are actually named
5587     something starting with __ and the normal name is an alias.  */
5588 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5589 choke me
5590 #else
5591 $ac_func();
5592 #endif
5593
5594 ; return 0; }
5595 EOF
5596 if { (eval echo configure:5597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5597   rm -rf conftest*
5598   eval "ac_cv_func_$ac_func=yes"
5599 else
5600   echo "configure: failed program was:" >&5
5601   cat conftest.$ac_ext >&5
5602   rm -rf conftest*
5603   eval "ac_cv_func_$ac_func=no"
5604 fi
5605 rm -f conftest*
5606 fi
5607
5608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5609   echo "$ac_t""yes" 1>&6
5610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5611   cat >> confdefs.h <<EOF
5612 #define $ac_tr_func 1
5613 EOF
5614  
5615 else
5616   echo "$ac_t""no" 1>&6
5617 fi
5618 done
5619
5620                         fi
5621                         if test $ac_cv_func_sched_yield = no -a \
5622                                 $ac_cv_func_pthread_yield = no -a \
5623                                 "$ac_cv_func_thr_yield" = no ; then
5624                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5625                         fi
5626
5627                                                 for ac_func in pthread_kill
5628 do
5629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5630 echo "configure:5631: checking for $ac_func" >&5
5631 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5632   echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634   cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 /* System header to define __stub macros and hopefully few prototypes,
5638     which can conflict with char $ac_func(); below.  */
5639 #include <assert.h>
5640 /* Override any gcc2 internal prototype to avoid an error.  */
5641 /* We use char because int might match the return type of a gcc2
5642     builtin and then its argument prototype would still apply.  */
5643 char $ac_func();
5644
5645 int main() {
5646
5647 /* The GNU C library defines this for functions which it implements
5648     to always fail with ENOSYS.  Some functions are actually named
5649     something starting with __ and the normal name is an alias.  */
5650 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5651 choke me
5652 #else
5653 $ac_func();
5654 #endif
5655
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_func_$ac_func=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_func_$ac_func=no"
5666 fi
5667 rm -f conftest*
5668 fi
5669
5670 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5671   echo "$ac_t""yes" 1>&6
5672     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5673   cat >> confdefs.h <<EOF
5674 #define $ac_tr_func 1
5675 EOF
5676  
5677 else
5678   echo "$ac_t""no" 1>&6
5679 fi
5680 done
5681
5682
5683                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5684 echo "configure:5685: checking for pthread_detach with <pthread.h>" >&5
5685 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5686   echo $ac_n "(cached) $ac_c" 1>&6
5687 else
5688   
5689                                                                 cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692
5693 #include <pthread.h>
5694 #ifndef NULL
5695 #define NULL (void*)0
5696 #endif
5697
5698 int main() {
5699 pthread_detach(NULL);
5700 ; return 0; }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703   rm -rf conftest*
5704   ol_cv_func_pthread_detach=yes
5705 else
5706   echo "configure: failed program was:" >&5
5707   cat conftest.$ac_ext >&5
5708   rm -rf conftest*
5709   ol_cv_func_pthread_detach=no
5710 fi
5711 rm -f conftest*
5712                         
5713 fi
5714
5715 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5716
5717                         if test $ol_cv_func_pthread_detach = no ; then
5718                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5719                         fi
5720
5721                         cat >> confdefs.h <<\EOF
5722 #define HAVE_PTHREAD_DETACH 1
5723 EOF
5724
5725
5726                                                 for ac_func in \
5727                                 pthread_setconcurrency \
5728                                 pthread_getconcurrency \
5729                                 thr_setconcurrency \
5730                                 thr_getconcurrency \
5731                         
5732 do
5733 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5734 echo "configure:5735: checking for $ac_func" >&5
5735 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5736   echo $ac_n "(cached) $ac_c" 1>&6
5737 else
5738   cat > conftest.$ac_ext <<EOF
5739 #line 5740 "configure"
5740 #include "confdefs.h"
5741 /* System header to define __stub macros and hopefully few prototypes,
5742     which can conflict with char $ac_func(); below.  */
5743 #include <assert.h>
5744 /* Override any gcc2 internal prototype to avoid an error.  */
5745 /* We use char because int might match the return type of a gcc2
5746     builtin and then its argument prototype would still apply.  */
5747 char $ac_func();
5748
5749 int main() {
5750
5751 /* The GNU C library defines this for functions which it implements
5752     to always fail with ENOSYS.  Some functions are actually named
5753     something starting with __ and the normal name is an alias.  */
5754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5755 choke me
5756 #else
5757 $ac_func();
5758 #endif
5759
5760 ; return 0; }
5761 EOF
5762 if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5763   rm -rf conftest*
5764   eval "ac_cv_func_$ac_func=yes"
5765 else
5766   echo "configure: failed program was:" >&5
5767   cat conftest.$ac_ext >&5
5768   rm -rf conftest*
5769   eval "ac_cv_func_$ac_func=no"
5770 fi
5771 rm -f conftest*
5772 fi
5773
5774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5775   echo "$ac_t""yes" 1>&6
5776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5777   cat >> confdefs.h <<EOF
5778 #define $ac_tr_func 1
5779 EOF
5780  
5781 else
5782   echo "$ac_t""no" 1>&6
5783 fi
5784 done
5785
5786
5787                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5788 echo "configure:5789: checking if pthread_create() works" >&5
5789                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5790   echo $ac_n "(cached) $ac_c" 1>&6
5791 else
5792   
5793                         if test "$cross_compiling" = yes; then
5794                                 ol_cv_pthread_create_works=yes
5795 else
5796   cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799
5800 #include <pthread.h>
5801 #ifndef NULL
5802 #define NULL (void*)0
5803 #endif
5804
5805 static void *task(p)
5806         void *p;
5807 {
5808         return (void *) (p == NULL);
5809 }
5810
5811 int main(argc, argv)
5812         int argc;
5813         char **argv;
5814 {
5815         pthread_t t;
5816 #if HAVE_PTHREADS_D4
5817         exit(pthread_create(&t, pthread_attr_default, task, NULL));
5818 #else
5819         exit(pthread_create(&t, NULL, task, NULL));
5820 #endif
5821 }
5822
5823 EOF
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5825 then
5826   ol_cv_pthread_create_works=yes
5827 else
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -fr conftest*
5831   ol_cv_pthread_create_works=no
5832 fi
5833 rm -fr conftest*
5834 fi
5835
5836 fi
5837
5838                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5839
5840                         if test $ol_cv_pthread_create_works = no ; then
5841                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
5842                         fi
5843
5844                                                 if test $ol_with_yielding_select = auto ; then
5845                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5846 echo "configure:5847: checking if select yields when using pthreads" >&5
5847                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   
5851                                 if test "$cross_compiling" = yes; then
5852   
5853                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5854 else
5855   cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858
5859 #include <sys/types.h>
5860 #include <sys/time.h>
5861 #include <unistd.h>
5862 #include <pthread.h>
5863 #ifndef NULL
5864 #define NULL (void*) 0
5865 #endif
5866
5867 static int fildes[2];
5868
5869 static void *task(p)
5870         void *p;
5871 {
5872         int i;
5873         struct timeval tv;
5874
5875         fd_set rfds;
5876
5877         tv.tv_sec=10;
5878         tv.tv_usec=0;
5879
5880         FD_ZERO(&rfds);
5881         FD_SET(fildes[0], &rfds);
5882
5883         /* we're not interested in any fds */
5884         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5885
5886         if(i < 0) {
5887                 perror("select");
5888                 exit(10);
5889         }
5890
5891         exit(0); /* if we exit here, the select blocked the whole process */
5892 }
5893
5894 int main(argc, argv)
5895         int argc;
5896         char **argv;
5897 {
5898         pthread_t t;
5899
5900         /* create a pipe to select */
5901         if(pipe(&fildes[0])) {
5902                 perror("select");
5903                 exit(1);
5904         }
5905
5906 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5907         (void) pthread_setconcurrency(2);
5908 #else
5909 #ifdef HAVE_THR_SETCONCURRENCY
5910         /* Set Solaris LWP concurrency to 2 */
5911         thr_setconcurrency(2);
5912 #endif
5913 #endif
5914
5915 #if HAVE_PTHREADS_D4
5916         pthread_create(&t, pthread_attr_default, task, NULL);
5917 #else
5918         pthread_create(&t, NULL, task, NULL);
5919 #endif
5920
5921 #if HAVE_SCHED_YIELD
5922         sched_yield();  /* make sure task runs first */
5923 #else
5924 #ifdef HAVE_PTHREAD_YIELD
5925         pthread_yield();        /* make sure task runs first */
5926 #endif
5927 #endif
5928
5929         exit(2);
5930 }
5931 EOF
5932 if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5933 then
5934   ol_cv_pthread_select_yields=no
5935 else
5936   echo "configure: failed program was:" >&5
5937   cat conftest.$ac_ext >&5
5938   rm -fr conftest*
5939   ol_cv_pthread_select_yields=yes
5940 fi
5941 rm -fr conftest*
5942 fi
5943
5944 fi
5945
5946                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5947
5948                                 if test $ol_cv_pthread_select_yields = yes ; then
5949                                         ol_with_yielding_select=yes
5950                                 fi
5951                         fi
5952
5953                                                 CPPFLAGS="$save_CPPFLAGS"
5954                         LIBS="$save_LIBS"
5955                 else
5956                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5957                 fi
5958         fi
5959
5960         if test $ol_with_threads = posix ; then
5961                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5962         fi
5963 fi
5964
5965 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5966         -o $ol_with_threads = mach ; then
5967
5968                 for ac_hdr in mach/cthreads.h
5969 do
5970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5972 echo "configure:5973: checking for $ac_hdr" >&5
5973 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5974   echo $ac_n "(cached) $ac_c" 1>&6
5975 else
5976   cat > conftest.$ac_ext <<EOF
5977 #line 5978 "configure"
5978 #include "confdefs.h"
5979 #include <$ac_hdr>
5980 EOF
5981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5982 { (eval echo configure:5983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5984 if test -z "$ac_err"; then
5985   rm -rf conftest*
5986   eval "ac_cv_header_$ac_safe=yes"
5987 else
5988   echo "$ac_err" >&5
5989   echo "configure: failed program was:" >&5
5990   cat conftest.$ac_ext >&5
5991   rm -rf conftest*
5992   eval "ac_cv_header_$ac_safe=no"
5993 fi
5994 rm -f conftest*
5995 fi
5996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5997   echo "$ac_t""yes" 1>&6
5998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5999   cat >> confdefs.h <<EOF
6000 #define $ac_tr_hdr 1
6001 EOF
6002  
6003 else
6004   echo "$ac_t""no" 1>&6
6005 fi
6006 done
6007
6008         if test $ac_cv_header_mach_cthreads_h = yes ; then
6009                 ol_with_threads=found
6010
6011                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6012 echo "configure:6013: checking for cthread_fork" >&5
6013 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6014   echo $ac_n "(cached) $ac_c" 1>&6
6015 else
6016   cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019 /* System header to define __stub macros and hopefully few prototypes,
6020     which can conflict with char cthread_fork(); below.  */
6021 #include <assert.h>
6022 /* Override any gcc2 internal prototype to avoid an error.  */
6023 /* We use char because int might match the return type of a gcc2
6024     builtin and then its argument prototype would still apply.  */
6025 char cthread_fork();
6026
6027 int main() {
6028
6029 /* The GNU C library defines this for functions which it implements
6030     to always fail with ENOSYS.  Some functions are actually named
6031     something starting with __ and the normal name is an alias.  */
6032 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6033 choke me
6034 #else
6035 cthread_fork();
6036 #endif
6037
6038 ; return 0; }
6039 EOF
6040 if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6041   rm -rf conftest*
6042   eval "ac_cv_func_cthread_fork=yes"
6043 else
6044   echo "configure: failed program was:" >&5
6045   cat conftest.$ac_ext >&5
6046   rm -rf conftest*
6047   eval "ac_cv_func_cthread_fork=no"
6048 fi
6049 rm -f conftest*
6050 fi
6051
6052 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6053   echo "$ac_t""yes" 1>&6
6054   ol_link_threads=yes
6055 else
6056   echo "$ac_t""no" 1>&6
6057 fi
6058
6059
6060                 if test $ol_link_threads = no ; then
6061                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6062 echo "configure:6063: checking for cthread_fork with -all_load" >&5
6063 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6064   echo $ac_n "(cached) $ac_c" 1>&6
6065 else
6066   
6067                                                                 save_LIBS="$LIBS"
6068                                 LIBS="-all_load $LIBS"
6069                                 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072 #include <mach/cthreads.h>
6073 int main() {
6074
6075                                         cthread_fork((void *)0, (void *)0);
6076                                         
6077 ; return 0; }
6078 EOF
6079 if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6080   rm -rf conftest*
6081   ol_cv_cthread_all_load=yes
6082 else
6083   echo "configure: failed program was:" >&5
6084   cat conftest.$ac_ext >&5
6085   rm -rf conftest*
6086   ol_cv_cthread_all_load=no
6087 fi
6088 rm -f conftest*
6089                                                                 LIBS="$save_LIBS"
6090                         
6091 fi
6092
6093 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6094
6095                         if test $ol_cv_cthread_all_load = yes ; then
6096                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6097                                 ol_link_threads=mach
6098                         fi
6099                 fi
6100
6101                 if test $ol_link_threads != no ; then
6102                         : check for cthread specific functionality here
6103                         cat >> confdefs.h <<\EOF
6104 #define HAVE_MACH_CTHREADS 1
6105 EOF
6106
6107                 else
6108                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6109                 fi
6110         fi
6111
6112         if test $ol_with_threads = mach ; then
6113                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6114         fi
6115 fi
6116
6117 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6118         -o $ol_with_threads = lwp ; then
6119
6120                 for ac_hdr in thread.h synch.h
6121 do
6122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6124 echo "configure:6125: checking for $ac_hdr" >&5
6125 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6126   echo $ac_n "(cached) $ac_c" 1>&6
6127 else
6128   cat > conftest.$ac_ext <<EOF
6129 #line 6130 "configure"
6130 #include "confdefs.h"
6131 #include <$ac_hdr>
6132 EOF
6133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6134 { (eval echo configure:6135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6136 if test -z "$ac_err"; then
6137   rm -rf conftest*
6138   eval "ac_cv_header_$ac_safe=yes"
6139 else
6140   echo "$ac_err" >&5
6141   echo "configure: failed program was:" >&5
6142   cat conftest.$ac_ext >&5
6143   rm -rf conftest*
6144   eval "ac_cv_header_$ac_safe=no"
6145 fi
6146 rm -f conftest*
6147 fi
6148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6149   echo "$ac_t""yes" 1>&6
6150     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6151   cat >> confdefs.h <<EOF
6152 #define $ac_tr_hdr 1
6153 EOF
6154  
6155 else
6156   echo "$ac_t""no" 1>&6
6157 fi
6158 done
6159
6160         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6161                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6162 echo "configure:6163: checking for thr_create in -lthread" >&5
6163 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6164 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6165   echo $ac_n "(cached) $ac_c" 1>&6
6166 else
6167   ac_save_LIBS="$LIBS"
6168 LIBS="-lthread  $LIBS"
6169 cat > conftest.$ac_ext <<EOF
6170 #line 6171 "configure"
6171 #include "confdefs.h"
6172 /* Override any gcc2 internal prototype to avoid an error.  */
6173 /* We use char because int might match the return type of a gcc2
6174     builtin and then its argument prototype would still apply.  */
6175 char thr_create();
6176
6177 int main() {
6178 thr_create()
6179 ; return 0; }
6180 EOF
6181 if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6182   rm -rf conftest*
6183   eval "ac_cv_lib_$ac_lib_var=yes"
6184 else
6185   echo "configure: failed program was:" >&5
6186   cat conftest.$ac_ext >&5
6187   rm -rf conftest*
6188   eval "ac_cv_lib_$ac_lib_var=no"
6189 fi
6190 rm -f conftest*
6191 LIBS="$ac_save_LIBS"
6192
6193 fi
6194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6195   echo "$ac_t""yes" 1>&6
6196   have_thr=yes
6197 else
6198   echo "$ac_t""no" 1>&6
6199 have_thr=no
6200 fi
6201
6202
6203                 if test $have_thr = yes ; then
6204                         cat >> confdefs.h <<\EOF
6205 #define HAVE_THR 1
6206 EOF
6207
6208                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6209                         ol_link_threads=thr
6210
6211                         if test $ol_with_yielding_select = auto ; then
6212                                 ol_with_yielding_select=yes
6213                         fi
6214
6215                                                 for ac_func in \
6216                                 thr_setconcurrency \
6217                                 thr_getconcurrency \
6218                         
6219 do
6220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6221 echo "configure:6222: checking for $ac_func" >&5
6222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6223   echo $ac_n "(cached) $ac_c" 1>&6
6224 else
6225   cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* System header to define __stub macros and hopefully few prototypes,
6229     which can conflict with char $ac_func(); below.  */
6230 #include <assert.h>
6231 /* Override any gcc2 internal prototype to avoid an error.  */
6232 /* We use char because int might match the return type of a gcc2
6233     builtin and then its argument prototype would still apply.  */
6234 char $ac_func();
6235
6236 int main() {
6237
6238 /* The GNU C library defines this for functions which it implements
6239     to always fail with ENOSYS.  Some functions are actually named
6240     something starting with __ and the normal name is an alias.  */
6241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6242 choke me
6243 #else
6244 $ac_func();
6245 #endif
6246
6247 ; return 0; }
6248 EOF
6249 if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6250   rm -rf conftest*
6251   eval "ac_cv_func_$ac_func=yes"
6252 else
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_func_$ac_func=no"
6257 fi
6258 rm -f conftest*
6259 fi
6260
6261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6264   cat >> confdefs.h <<EOF
6265 #define $ac_tr_func 1
6266 EOF
6267  
6268 else
6269   echo "$ac_t""no" 1>&6
6270 fi
6271 done
6272
6273                 fi
6274         fi
6275
6276                 for ac_hdr in lwp/lwp.h
6277 do
6278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6280 echo "configure:6281: checking for $ac_hdr" >&5
6281 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6282   echo $ac_n "(cached) $ac_c" 1>&6
6283 else
6284   cat > conftest.$ac_ext <<EOF
6285 #line 6286 "configure"
6286 #include "confdefs.h"
6287 #include <$ac_hdr>
6288 EOF
6289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6290 { (eval echo configure:6291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6292 if test -z "$ac_err"; then
6293   rm -rf conftest*
6294   eval "ac_cv_header_$ac_safe=yes"
6295 else
6296   echo "$ac_err" >&5
6297   echo "configure: failed program was:" >&5
6298   cat conftest.$ac_ext >&5
6299   rm -rf conftest*
6300   eval "ac_cv_header_$ac_safe=no"
6301 fi
6302 rm -f conftest*
6303 fi
6304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6305   echo "$ac_t""yes" 1>&6
6306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6307   cat >> confdefs.h <<EOF
6308 #define $ac_tr_hdr 1
6309 EOF
6310  
6311 else
6312   echo "$ac_t""no" 1>&6
6313 fi
6314 done
6315
6316         if test $ac_cv_header_lwp_lwp_h = yes ; then
6317                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6318 echo "configure:6319: checking for lwp_create in -llwp" >&5
6319 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6320 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6321   echo $ac_n "(cached) $ac_c" 1>&6
6322 else
6323   ac_save_LIBS="$LIBS"
6324 LIBS="-llwp  $LIBS"
6325 cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 /* Override any gcc2 internal prototype to avoid an error.  */
6329 /* We use char because int might match the return type of a gcc2
6330     builtin and then its argument prototype would still apply.  */
6331 char lwp_create();
6332
6333 int main() {
6334 lwp_create()
6335 ; return 0; }
6336 EOF
6337 if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6338   rm -rf conftest*
6339   eval "ac_cv_lib_$ac_lib_var=yes"
6340 else
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_lib_$ac_lib_var=no"
6345 fi
6346 rm -f conftest*
6347 LIBS="$ac_save_LIBS"
6348
6349 fi
6350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6351   echo "$ac_t""yes" 1>&6
6352   have_lwp=yes
6353 else
6354   echo "$ac_t""no" 1>&6
6355 have_lwp=no
6356 fi
6357
6358
6359                 if test $have_lwp = yes ; then
6360                         cat >> confdefs.h <<\EOF
6361 #define HAVE_LWP 1
6362 EOF
6363
6364                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6365                         ol_link_threads=lwp
6366
6367                         if test $ol_with_yielding_select = auto ; then
6368                                 ol_with_yielding_select=no
6369                         fi
6370                 fi
6371         fi
6372 fi
6373
6374 if test $ol_with_yielding_select = yes ; then
6375         cat >> confdefs.h <<\EOF
6376 #define HAVE_YIELDING_SELECT 1
6377 EOF
6378
6379 fi
6380
6381 if test $ol_with_threads = manual ; then
6382                 ol_link_threads=yes
6383
6384         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6385
6386         for ac_hdr in pthread.h sched.h
6387 do
6388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6390 echo "configure:6391: checking for $ac_hdr" >&5
6391 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6392   echo $ac_n "(cached) $ac_c" 1>&6
6393 else
6394   cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 #include <$ac_hdr>
6398 EOF
6399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6400 { (eval echo configure:6401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6402 if test -z "$ac_err"; then
6403   rm -rf conftest*
6404   eval "ac_cv_header_$ac_safe=yes"
6405 else
6406   echo "$ac_err" >&5
6407   echo "configure: failed program was:" >&5
6408   cat conftest.$ac_ext >&5
6409   rm -rf conftest*
6410   eval "ac_cv_header_$ac_safe=no"
6411 fi
6412 rm -f conftest*
6413 fi
6414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6415   echo "$ac_t""yes" 1>&6
6416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6417   cat >> confdefs.h <<EOF
6418 #define $ac_tr_hdr 1
6419 EOF
6420  
6421 else
6422   echo "$ac_t""no" 1>&6
6423 fi
6424 done
6425
6426         for ac_func in sched_yield pthread_yield
6427 do
6428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6429 echo "configure:6430: checking for $ac_func" >&5
6430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6431   echo $ac_n "(cached) $ac_c" 1>&6
6432 else
6433   cat > conftest.$ac_ext <<EOF
6434 #line 6435 "configure"
6435 #include "confdefs.h"
6436 /* System header to define __stub macros and hopefully few prototypes,
6437     which can conflict with char $ac_func(); below.  */
6438 #include <assert.h>
6439 /* Override any gcc2 internal prototype to avoid an error.  */
6440 /* We use char because int might match the return type of a gcc2
6441     builtin and then its argument prototype would still apply.  */
6442 char $ac_func();
6443
6444 int main() {
6445
6446 /* The GNU C library defines this for functions which it implements
6447     to always fail with ENOSYS.  Some functions are actually named
6448     something starting with __ and the normal name is an alias.  */
6449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6450 choke me
6451 #else
6452 $ac_func();
6453 #endif
6454
6455 ; return 0; }
6456 EOF
6457 if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6458   rm -rf conftest*
6459   eval "ac_cv_func_$ac_func=yes"
6460 else
6461   echo "configure: failed program was:" >&5
6462   cat conftest.$ac_ext >&5
6463   rm -rf conftest*
6464   eval "ac_cv_func_$ac_func=no"
6465 fi
6466 rm -f conftest*
6467 fi
6468
6469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6470   echo "$ac_t""yes" 1>&6
6471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6472   cat >> confdefs.h <<EOF
6473 #define $ac_tr_func 1
6474 EOF
6475  
6476 else
6477   echo "$ac_t""no" 1>&6
6478 fi
6479 done
6480
6481         
6482 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
6483 echo "configure:6484: checking for LinuxThreads" >&5
6484 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6485   echo $ac_n "(cached) $ac_c" 1>&6
6486 else
6487   
6488         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
6489         if test "$res" -gt 0 ; then
6490                 ol_cv_linux_threads=yes
6491         else
6492                 ol_cv_linux_threads=no
6493         fi
6494
6495 fi
6496
6497 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6498
6499
6500         for ac_hdr in mach/cthreads.h
6501 do
6502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6504 echo "configure:6505: checking for $ac_hdr" >&5
6505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6506   echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508   cat > conftest.$ac_ext <<EOF
6509 #line 6510 "configure"
6510 #include "confdefs.h"
6511 #include <$ac_hdr>
6512 EOF
6513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6514 { (eval echo configure:6515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6516 if test -z "$ac_err"; then
6517   rm -rf conftest*
6518   eval "ac_cv_header_$ac_safe=yes"
6519 else
6520   echo "$ac_err" >&5
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523   rm -rf conftest*
6524   eval "ac_cv_header_$ac_safe=no"
6525 fi
6526 rm -f conftest*
6527 fi
6528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6529   echo "$ac_t""yes" 1>&6
6530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6531   cat >> confdefs.h <<EOF
6532 #define $ac_tr_hdr 1
6533 EOF
6534  
6535 else
6536   echo "$ac_t""no" 1>&6
6537 fi
6538 done
6539
6540         for ac_hdr in lwp/lwp.h
6541 do
6542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6543 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6544 echo "configure:6545: checking for $ac_hdr" >&5
6545 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 #include <$ac_hdr>
6552 EOF
6553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6554 { (eval echo configure:6555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6556 if test -z "$ac_err"; then
6557   rm -rf conftest*
6558   eval "ac_cv_header_$ac_safe=yes"
6559 else
6560   echo "$ac_err" >&5
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   eval "ac_cv_header_$ac_safe=no"
6565 fi
6566 rm -f conftest*
6567 fi
6568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6569   echo "$ac_t""yes" 1>&6
6570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6571   cat >> confdefs.h <<EOF
6572 #define $ac_tr_hdr 1
6573 EOF
6574  
6575 else
6576   echo "$ac_t""no" 1>&6
6577 fi
6578 done
6579
6580         for ac_hdr in thread.h synch.h
6581 do
6582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6584 echo "configure:6585: checking for $ac_hdr" >&5
6585 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6586   echo $ac_n "(cached) $ac_c" 1>&6
6587 else
6588   cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 #include <$ac_hdr>
6592 EOF
6593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6594 { (eval echo configure:6595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6596 if test -z "$ac_err"; then
6597   rm -rf conftest*
6598   eval "ac_cv_header_$ac_safe=yes"
6599 else
6600   echo "$ac_err" >&5
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_header_$ac_safe=no"
6605 fi
6606 rm -f conftest*
6607 fi
6608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6609   echo "$ac_t""yes" 1>&6
6610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6611   cat >> confdefs.h <<EOF
6612 #define $ac_tr_hdr 1
6613 EOF
6614  
6615 else
6616   echo "$ac_t""no" 1>&6
6617 fi
6618 done
6619
6620 fi
6621
6622 if test $ol_link_threads != no ; then  
6623                         cat >> confdefs.h <<\EOF
6624 #define REENTRANT 1
6625 EOF
6626
6627         cat >> confdefs.h <<\EOF
6628 #define _REENTRANT 1
6629 EOF
6630
6631         cat >> confdefs.h <<\EOF
6632 #define THREAD_SAFE 1
6633 EOF
6634
6635         cat >> confdefs.h <<\EOF
6636 #define _THREAD_SAFE 1
6637 EOF
6638
6639         cat >> confdefs.h <<\EOF
6640 #define THREADSAFE 1
6641 EOF
6642
6643         cat >> confdefs.h <<\EOF
6644 #define _THREADSAFE 1
6645 EOF
6646
6647
6648                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6649 echo "configure:6650: checking for thread specific errno" >&5
6650 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6651   echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653   
6654                 cat > conftest.$ac_ext <<EOF
6655 #line 6656 "configure"
6656 #include "confdefs.h"
6657 #include <errno.h>
6658 int main() {
6659 errno = 0;
6660 ; return 0; }
6661 EOF
6662 if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6663   rm -rf conftest*
6664   ol_cv_errno_thread_specific=yes
6665 else
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   ol_cv_errno_thread_specific=no
6670 fi
6671 rm -f conftest*
6672         
6673 fi
6674
6675 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
6676
6677         if test $ol_cv_errno_thread_specific != yes ; then
6678                 LIBS="$LTHREAD_LIBS $LIBS"
6679                 LTHREAD_LIBS=""
6680         fi
6681
6682 fi  
6683
6684 if test $ol_link_threads = no ; then
6685         if test $ol_with_threads = yes ; then
6686                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
6687         fi
6688
6689         if test $ol_with_threads = auto ; then
6690                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
6691                 ol_with_threads=no
6692         fi
6693
6694         cat >> confdefs.h <<\EOF
6695 #define NO_THREADS 1
6696 EOF
6697
6698         LTHREAD_LIBS=""
6699 fi
6700
6701 if test $ol_link_threads != no ; then
6702         cat >> confdefs.h <<\EOF
6703 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
6704 EOF
6705
6706 fi
6707
6708
6709 ol_link_ldbm=no 
6710 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
6711         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
6712 echo "configure:6713: checking for DB2 library" >&5
6713 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716         ol_LIBS="$LIBS"
6717         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
6718 echo "configure:6719: checking for db_open in -ldb" >&5
6719 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
6720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6721   echo $ac_n "(cached) $ac_c" 1>&6
6722 else
6723   ac_save_LIBS="$LIBS"
6724 LIBS="-ldb  $LIBS"
6725 cat > conftest.$ac_ext <<EOF
6726 #line 6727 "configure"
6727 #include "confdefs.h"
6728 /* Override any gcc2 internal prototype to avoid an error.  */
6729 /* We use char because int might match the return type of a gcc2
6730     builtin and then its argument prototype would still apply.  */
6731 char db_open();
6732
6733 int main() {
6734 db_open()
6735 ; return 0; }
6736 EOF
6737 if { (eval echo configure:6738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6738   rm -rf conftest*
6739   eval "ac_cv_lib_$ac_lib_var=yes"
6740 else
6741   echo "configure: failed program was:" >&5
6742   cat conftest.$ac_ext >&5
6743   rm -rf conftest*
6744   eval "ac_cv_lib_$ac_lib_var=no"
6745 fi
6746 rm -f conftest*
6747 LIBS="$ac_save_LIBS"
6748
6749 fi
6750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6751   echo "$ac_t""yes" 1>&6
6752   ol_cv_lib_db2=-ldb
6753 else
6754   echo "$ac_t""no" 1>&6
6755 ol_cv_lib_db2=no
6756 fi
6757
6758         LIBS="$ol_LIBS"
6759
6760 fi
6761
6762 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6763
6764 for ac_hdr in db.h
6765 do
6766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6768 echo "configure:6769: checking for $ac_hdr" >&5
6769 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6770   echo $ac_n "(cached) $ac_c" 1>&6
6771 else
6772   cat > conftest.$ac_ext <<EOF
6773 #line 6774 "configure"
6774 #include "confdefs.h"
6775 #include <$ac_hdr>
6776 EOF
6777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6778 { (eval echo configure:6779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6780 if test -z "$ac_err"; then
6781   rm -rf conftest*
6782   eval "ac_cv_header_$ac_safe=yes"
6783 else
6784   echo "$ac_err" >&5
6785   echo "configure: failed program was:" >&5
6786   cat conftest.$ac_ext >&5
6787   rm -rf conftest*
6788   eval "ac_cv_header_$ac_safe=no"
6789 fi
6790 rm -f conftest*
6791 fi
6792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6793   echo "$ac_t""yes" 1>&6
6794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6795   cat >> confdefs.h <<EOF
6796 #define $ac_tr_hdr 1
6797 EOF
6798  
6799 else
6800   echo "$ac_t""no" 1>&6
6801 fi
6802 done
6803
6804 if test $ac_cv_header_db_h = yes ; then
6805         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6806 echo "configure:6807: checking if db.h is DB2" >&5
6807 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6808   echo $ac_n "(cached) $ac_c" 1>&6
6809 else
6810   
6811                 cat > conftest.$ac_ext <<EOF
6812 #line 6813 "configure"
6813 #include "confdefs.h"
6814
6815 #                       include <db.h>
6816                         /* this check could be improved */
6817 #                       ifdef DB_VERSION_MAJOR
6818 #                               if DB_VERSION_MAJOR == 2
6819                                         __db_version_2
6820 #                               endif
6821 #                       endif
6822                 
6823 EOF
6824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6825   egrep "__db_version_2" >/dev/null 2>&1; then
6826   rm -rf conftest*
6827   ol_cv_header_db2=yes
6828 else
6829   rm -rf conftest*
6830   ol_cv_header_db2=no
6831 fi
6832 rm -f conftest*
6833
6834 fi
6835
6836 echo "$ac_t""$ol_cv_header_db2" 1>&6
6837 else
6838         ol_cv_header_db2=no
6839 fi
6840
6841
6842  
6843  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6844 echo "configure:6845: checking for Berkeley DB2" >&5
6845 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6846   echo $ac_n "(cached) $ac_c" 1>&6
6847 else
6848   
6849         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6850                 ol_cv_berkeley_db2=no
6851         else
6852                 ol_cv_berkeley_db2=yes
6853         fi
6854
6855 fi
6856
6857 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6858  if test $ol_cv_berkeley_db2 = yes ; then
6859         cat >> confdefs.h <<\EOF
6860 #define HAVE_BERKELEY_DB2 1
6861 EOF
6862
6863  fi
6864
6865
6866         if test $ol_cv_berkeley_db2 = yes ; then
6867                 ol_link_ldbm=db2
6868                 ol_with_ldbm_api=db2
6869
6870                 if test $ol_with_ldbm_type = hash ; then
6871                         cat >> confdefs.h <<\EOF
6872 #define LDBM_USE_DBHASH 1
6873 EOF
6874
6875                 else
6876                         cat >> confdefs.h <<\EOF
6877 #define LDBM_USE_DBBTREE 1
6878 EOF
6879
6880                 fi
6881
6882                                                 if test $ol_cv_lib_db2 != yes ; then
6883                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6884                 fi
6885         fi
6886 fi
6887
6888 ol_link_bdb2=no
6889 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6890         ol_link_bdb2=yes
6891 fi
6892
6893 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6894         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6895 echo "configure:6896: checking for Berkeley DB library" >&5
6896 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6897   echo $ac_n "(cached) $ac_c" 1>&6
6898 else
6899         ol_LIBS="$LIBS"
6900         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6901 echo "configure:6902: checking for dbopen" >&5
6902 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905   cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908 /* System header to define __stub macros and hopefully few prototypes,
6909     which can conflict with char dbopen(); below.  */
6910 #include <assert.h>
6911 /* Override any gcc2 internal prototype to avoid an error.  */
6912 /* We use char because int might match the return type of a gcc2
6913     builtin and then its argument prototype would still apply.  */
6914 char dbopen();
6915
6916 int main() {
6917
6918 /* The GNU C library defines this for functions which it implements
6919     to always fail with ENOSYS.  Some functions are actually named
6920     something starting with __ and the normal name is an alias.  */
6921 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6922 choke me
6923 #else
6924 dbopen();
6925 #endif
6926
6927 ; return 0; }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6930   rm -rf conftest*
6931   eval "ac_cv_func_dbopen=yes"
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -rf conftest*
6936   eval "ac_cv_func_dbopen=no"
6937 fi
6938 rm -f conftest*
6939 fi
6940
6941 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6942   echo "$ac_t""yes" 1>&6
6943   ol_cv_lib_db=yes
6944 else
6945   echo "$ac_t""no" 1>&6
6946
6947                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6948 echo "configure:6949: checking for dbopen in -ldb" >&5
6949 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6951   echo $ac_n "(cached) $ac_c" 1>&6
6952 else
6953   ac_save_LIBS="$LIBS"
6954 LIBS="-ldb  $LIBS"
6955 cat > conftest.$ac_ext <<EOF
6956 #line 6957 "configure"
6957 #include "confdefs.h"
6958 /* Override any gcc2 internal prototype to avoid an error.  */
6959 /* We use char because int might match the return type of a gcc2
6960     builtin and then its argument prototype would still apply.  */
6961 char dbopen();
6962
6963 int main() {
6964 dbopen()
6965 ; return 0; }
6966 EOF
6967 if { (eval echo configure:6968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6968   rm -rf conftest*
6969   eval "ac_cv_lib_$ac_lib_var=yes"
6970 else
6971   echo "configure: failed program was:" >&5
6972   cat conftest.$ac_ext >&5
6973   rm -rf conftest*
6974   eval "ac_cv_lib_$ac_lib_var=no"
6975 fi
6976 rm -f conftest*
6977 LIBS="$ac_save_LIBS"
6978
6979 fi
6980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6981   echo "$ac_t""yes" 1>&6
6982   ol_cv_lib_db=-ldb
6983 else
6984   echo "$ac_t""no" 1>&6
6985 ol_cv_lib_db=no
6986 fi
6987
6988         
6989 fi
6990
6991         LIBS="$ol_LIBS"
6992
6993 fi
6994
6995 echo "$ac_t""$ol_cv_lib_db" 1>&6
6996
6997
6998 for ac_hdr in db_185.h
6999 do
7000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7002 echo "configure:7003: checking for $ac_hdr" >&5
7003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7004   echo $ac_n "(cached) $ac_c" 1>&6
7005 else
7006   cat > conftest.$ac_ext <<EOF
7007 #line 7008 "configure"
7008 #include "confdefs.h"
7009 #include <$ac_hdr>
7010 EOF
7011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7012 { (eval echo configure:7013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7014 if test -z "$ac_err"; then
7015   rm -rf conftest*
7016   eval "ac_cv_header_$ac_safe=yes"
7017 else
7018   echo "$ac_err" >&5
7019   echo "configure: failed program was:" >&5
7020   cat conftest.$ac_ext >&5
7021   rm -rf conftest*
7022   eval "ac_cv_header_$ac_safe=no"
7023 fi
7024 rm -f conftest*
7025 fi
7026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7027   echo "$ac_t""yes" 1>&6
7028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7029   cat >> confdefs.h <<EOF
7030 #define $ac_tr_hdr 1
7031 EOF
7032  
7033 else
7034   echo "$ac_t""no" 1>&6
7035 fi
7036 done
7037
7038 if test "$ol_cv_header_db2" = yes ; then
7039         
7040         ol_cv_header_db=$ac_cv_header_db_185_h
7041 else
7042         ol_cv_header_db=$ac_cv_header_db_h
7043 fi
7044
7045
7046  
7047  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7048 echo "configure:7049: checking for Berkeley DB" >&5
7049 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7050   echo $ac_n "(cached) $ac_c" 1>&6
7051 else
7052   
7053         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7054                 ol_cv_berkeley_db=no
7055         else
7056                 ol_cv_berkeley_db=yes
7057         fi
7058
7059 fi
7060
7061 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7062  if test $ol_cv_berkeley_db = yes ; then
7063         cat >> confdefs.h <<\EOF
7064 #define HAVE_BERKELEY_DB 1
7065 EOF
7066
7067  fi
7068
7069
7070         if test $ol_cv_berkeley_db = yes ; then
7071                 ol_link_ldbm=db
7072                 ol_with_ldbm_api=db
7073
7074                 if test $ol_with_ldbm_type = hash ; then
7075                         cat >> confdefs.h <<\EOF
7076 #define LDBM_USE_DBHASH 1
7077 EOF
7078
7079                 else
7080                         cat >> confdefs.h <<\EOF
7081 #define LDBM_USE_DBBTREE 1
7082 EOF
7083
7084                 fi
7085
7086                                                 if test $ol_cv_lib_db != yes ; then
7087                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7088                 fi
7089         fi
7090 fi
7091
7092 if test $ol_with_ldbm_api = manual ; then
7093                 ol_link_ldbm=yes
7094
7095         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7096
7097         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7098 do
7099 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7100 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7101 echo "configure:7102: checking for $ac_hdr" >&5
7102 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7103   echo $ac_n "(cached) $ac_c" 1>&6
7104 else
7105   cat > conftest.$ac_ext <<EOF
7106 #line 7107 "configure"
7107 #include "confdefs.h"
7108 #include <$ac_hdr>
7109 EOF
7110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7111 { (eval echo configure:7112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7113 if test -z "$ac_err"; then
7114   rm -rf conftest*
7115   eval "ac_cv_header_$ac_safe=yes"
7116 else
7117   echo "$ac_err" >&5
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   eval "ac_cv_header_$ac_safe=no"
7122 fi
7123 rm -f conftest*
7124 fi
7125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7126   echo "$ac_t""yes" 1>&6
7127     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7128   cat >> confdefs.h <<EOF
7129 #define $ac_tr_hdr 1
7130 EOF
7131  
7132 else
7133   echo "$ac_t""no" 1>&6
7134 fi
7135 done
7136
7137 fi
7138
7139 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7140         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7141         ol_with_ldbm_api=none
7142 fi
7143
7144 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7145         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7146 echo "configure:7147: checking for MDBM library" >&5
7147 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7148   echo $ac_n "(cached) $ac_c" 1>&6
7149 else
7150         ol_LIBS="$LIBS"
7151         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7152 echo "configure:7153: checking for mdbm_set_chain" >&5
7153 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7154   echo $ac_n "(cached) $ac_c" 1>&6
7155 else
7156   cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159 /* System header to define __stub macros and hopefully few prototypes,
7160     which can conflict with char mdbm_set_chain(); below.  */
7161 #include <assert.h>
7162 /* Override any gcc2 internal prototype to avoid an error.  */
7163 /* We use char because int might match the return type of a gcc2
7164     builtin and then its argument prototype would still apply.  */
7165 char mdbm_set_chain();
7166
7167 int main() {
7168
7169 /* The GNU C library defines this for functions which it implements
7170     to always fail with ENOSYS.  Some functions are actually named
7171     something starting with __ and the normal name is an alias.  */
7172 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7173 choke me
7174 #else
7175 mdbm_set_chain();
7176 #endif
7177
7178 ; return 0; }
7179 EOF
7180 if { (eval echo configure:7181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7181   rm -rf conftest*
7182   eval "ac_cv_func_mdbm_set_chain=yes"
7183 else
7184   echo "configure: failed program was:" >&5
7185   cat conftest.$ac_ext >&5
7186   rm -rf conftest*
7187   eval "ac_cv_func_mdbm_set_chain=no"
7188 fi
7189 rm -f conftest*
7190 fi
7191
7192 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7193   echo "$ac_t""yes" 1>&6
7194   ol_cv_lib_mdbm=yes
7195 else
7196   echo "$ac_t""no" 1>&6
7197
7198                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7199 echo "configure:7200: checking for mdbm_set_chain in -lmdbm" >&5
7200 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7201 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7202   echo $ac_n "(cached) $ac_c" 1>&6
7203 else
7204   ac_save_LIBS="$LIBS"
7205 LIBS="-lmdbm  $LIBS"
7206 cat > conftest.$ac_ext <<EOF
7207 #line 7208 "configure"
7208 #include "confdefs.h"
7209 /* Override any gcc2 internal prototype to avoid an error.  */
7210 /* We use char because int might match the return type of a gcc2
7211     builtin and then its argument prototype would still apply.  */
7212 char mdbm_set_chain();
7213
7214 int main() {
7215 mdbm_set_chain()
7216 ; return 0; }
7217 EOF
7218 if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7219   rm -rf conftest*
7220   eval "ac_cv_lib_$ac_lib_var=yes"
7221 else
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   eval "ac_cv_lib_$ac_lib_var=no"
7226 fi
7227 rm -f conftest*
7228 LIBS="$ac_save_LIBS"
7229
7230 fi
7231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7232   echo "$ac_t""yes" 1>&6
7233   ol_cv_lib_mdbm=-lmdbm
7234 else
7235   echo "$ac_t""no" 1>&6
7236 ol_cv_lib_mdbm=no
7237 fi
7238
7239         
7240 fi
7241
7242         LIBS="$ol_LIBS"
7243
7244 fi
7245
7246 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7247
7248
7249  for ac_hdr in mdbm.h
7250 do
7251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7253 echo "configure:7254: checking for $ac_hdr" >&5
7254 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <$ac_hdr>
7261 EOF
7262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7263 { (eval echo configure:7264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7265 if test -z "$ac_err"; then
7266   rm -rf conftest*
7267   eval "ac_cv_header_$ac_safe=yes"
7268 else
7269   echo "$ac_err" >&5
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -rf conftest*
7273   eval "ac_cv_header_$ac_safe=no"
7274 fi
7275 rm -f conftest*
7276 fi
7277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7278   echo "$ac_t""yes" 1>&6
7279     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7280   cat >> confdefs.h <<EOF
7281 #define $ac_tr_hdr 1
7282 EOF
7283  
7284 else
7285   echo "$ac_t""no" 1>&6
7286 fi
7287 done
7288
7289  echo $ac_n "checking for db""... $ac_c" 1>&6
7290 echo "configure:7291: checking for db" >&5
7291 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7292   echo $ac_n "(cached) $ac_c" 1>&6
7293 else
7294   
7295         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7296                 ol_cv_mdbm=no
7297         else
7298                 ol_cv_mdbm=yes
7299         fi
7300
7301 fi
7302
7303 echo "$ac_t""$ol_cv_mdbm" 1>&6
7304  if test $ol_cv_mdbm = yes ; then
7305         cat >> confdefs.h <<\EOF
7306 #define HAVE_MDBM 1
7307 EOF
7308
7309  fi
7310
7311
7312         if test $ol_cv_mdbm = yes ; then
7313                 ol_link_ldbm=mdbm
7314                 ol_with_ldbm_api=mdbm
7315                 if test $ol_cv_lib_mdbm != yes ; then
7316                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7317                 fi
7318         fi
7319 fi
7320
7321 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7322         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7323 echo "configure:7324: checking for GDBM library" >&5
7324 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7325   echo $ac_n "(cached) $ac_c" 1>&6
7326 else
7327         ol_LIBS="$LIBS"
7328         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7329 echo "configure:7330: checking for gdbm_open" >&5
7330 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7331   echo $ac_n "(cached) $ac_c" 1>&6
7332 else
7333   cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7336 /* System header to define __stub macros and hopefully few prototypes,
7337     which can conflict with char gdbm_open(); below.  */
7338 #include <assert.h>
7339 /* Override any gcc2 internal prototype to avoid an error.  */
7340 /* We use char because int might match the return type of a gcc2
7341     builtin and then its argument prototype would still apply.  */
7342 char gdbm_open();
7343
7344 int main() {
7345
7346 /* The GNU C library defines this for functions which it implements
7347     to always fail with ENOSYS.  Some functions are actually named
7348     something starting with __ and the normal name is an alias.  */
7349 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7350 choke me
7351 #else
7352 gdbm_open();
7353 #endif
7354
7355 ; return 0; }
7356 EOF
7357 if { (eval echo configure:7358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7358   rm -rf conftest*
7359   eval "ac_cv_func_gdbm_open=yes"
7360 else
7361   echo "configure: failed program was:" >&5
7362   cat conftest.$ac_ext >&5
7363   rm -rf conftest*
7364   eval "ac_cv_func_gdbm_open=no"
7365 fi
7366 rm -f conftest*
7367 fi
7368
7369 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7370   echo "$ac_t""yes" 1>&6
7371   ol_cv_lib_gdbm=yes
7372 else
7373   echo "$ac_t""no" 1>&6
7374
7375                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7376 echo "configure:7377: checking for gdbm_open in -lgdbm" >&5
7377 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7379   echo $ac_n "(cached) $ac_c" 1>&6
7380 else
7381   ac_save_LIBS="$LIBS"
7382 LIBS="-lgdbm  $LIBS"
7383 cat > conftest.$ac_ext <<EOF
7384 #line 7385 "configure"
7385 #include "confdefs.h"
7386 /* Override any gcc2 internal prototype to avoid an error.  */
7387 /* We use char because int might match the return type of a gcc2
7388     builtin and then its argument prototype would still apply.  */
7389 char gdbm_open();
7390
7391 int main() {
7392 gdbm_open()
7393 ; return 0; }
7394 EOF
7395 if { (eval echo configure:7396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7396   rm -rf conftest*
7397   eval "ac_cv_lib_$ac_lib_var=yes"
7398 else
7399   echo "configure: failed program was:" >&5
7400   cat conftest.$ac_ext >&5
7401   rm -rf conftest*
7402   eval "ac_cv_lib_$ac_lib_var=no"
7403 fi
7404 rm -f conftest*
7405 LIBS="$ac_save_LIBS"
7406
7407 fi
7408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7409   echo "$ac_t""yes" 1>&6
7410   ol_cv_lib_gdbm=-lgdbm
7411 else
7412   echo "$ac_t""no" 1>&6
7413 ol_cv_lib_gdbm=no
7414 fi
7415
7416         
7417 fi
7418
7419         LIBS="$ol_LIBS"
7420
7421 fi
7422
7423 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7424
7425
7426  for ac_hdr in gdbm.h
7427 do
7428 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7429 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7430 echo "configure:7431: checking for $ac_hdr" >&5
7431 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7432   echo $ac_n "(cached) $ac_c" 1>&6
7433 else
7434   cat > conftest.$ac_ext <<EOF
7435 #line 7436 "configure"
7436 #include "confdefs.h"
7437 #include <$ac_hdr>
7438 EOF
7439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7440 { (eval echo configure:7441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7442 if test -z "$ac_err"; then
7443   rm -rf conftest*
7444   eval "ac_cv_header_$ac_safe=yes"
7445 else
7446   echo "$ac_err" >&5
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   eval "ac_cv_header_$ac_safe=no"
7451 fi
7452 rm -f conftest*
7453 fi
7454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7455   echo "$ac_t""yes" 1>&6
7456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7457   cat >> confdefs.h <<EOF
7458 #define $ac_tr_hdr 1
7459 EOF
7460  
7461 else
7462   echo "$ac_t""no" 1>&6
7463 fi
7464 done
7465
7466  echo $ac_n "checking for db""... $ac_c" 1>&6
7467 echo "configure:7468: checking for db" >&5
7468 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7469   echo $ac_n "(cached) $ac_c" 1>&6
7470 else
7471   
7472         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7473                 ol_cv_gdbm=no
7474         else
7475                 ol_cv_gdbm=yes
7476         fi
7477
7478 fi
7479
7480 echo "$ac_t""$ol_cv_gdbm" 1>&6
7481  if test $ol_cv_gdbm = yes ; then
7482         cat >> confdefs.h <<\EOF
7483 #define HAVE_GDBM 1
7484 EOF
7485
7486  fi
7487
7488
7489         if test $ol_cv_gdbm = yes ; then
7490                 ol_link_ldbm=gdbm
7491                 ol_with_ldbm_api=gdbm
7492
7493                 if test $ol_cv_lib_gdbm != yes ; then
7494                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7495                 fi
7496         fi
7497 fi
7498
7499 if test $ol_with_ldbm_api = auto ; then
7500         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7501 elif test $ol_with_ldbm_api = ndbm ; then
7502         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7503 echo "configure:7504: checking for NDBM library" >&5
7504 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7505   echo $ac_n "(cached) $ac_c" 1>&6
7506 else
7507         ol_LIBS="$LIBS"
7508         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7509 echo "configure:7510: checking for dbm_open" >&5
7510 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7511   echo $ac_n "(cached) $ac_c" 1>&6
7512 else
7513   cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516 /* System header to define __stub macros and hopefully few prototypes,
7517     which can conflict with char dbm_open(); below.  */
7518 #include <assert.h>
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 /* We use char because int might match the return type of a gcc2
7521     builtin and then its argument prototype would still apply.  */
7522 char dbm_open();
7523
7524 int main() {
7525
7526 /* The GNU C library defines this for functions which it implements
7527     to always fail with ENOSYS.  Some functions are actually named
7528     something starting with __ and the normal name is an alias.  */
7529 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7530 choke me
7531 #else
7532 dbm_open();
7533 #endif
7534
7535 ; return 0; }
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7538   rm -rf conftest*
7539   eval "ac_cv_func_dbm_open=yes"
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -rf conftest*
7544   eval "ac_cv_func_dbm_open=no"
7545 fi
7546 rm -f conftest*
7547 fi
7548
7549 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7550   echo "$ac_t""yes" 1>&6
7551   ol_cv_lib_ndbm=yes
7552 else
7553   echo "$ac_t""no" 1>&6
7554
7555                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7556 echo "configure:7557: checking for dbm_open in -lndbm" >&5
7557 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7559   echo $ac_n "(cached) $ac_c" 1>&6
7560 else
7561   ac_save_LIBS="$LIBS"
7562 LIBS="-lndbm  $LIBS"
7563 cat > conftest.$ac_ext <<EOF
7564 #line 7565 "configure"
7565 #include "confdefs.h"
7566 /* Override any gcc2 internal prototype to avoid an error.  */
7567 /* We use char because int might match the return type of a gcc2
7568     builtin and then its argument prototype would still apply.  */
7569 char dbm_open();
7570
7571 int main() {
7572 dbm_open()
7573 ; return 0; }
7574 EOF
7575 if { (eval echo configure:7576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7576   rm -rf conftest*
7577   eval "ac_cv_lib_$ac_lib_var=yes"
7578 else
7579   echo "configure: failed program was:" >&5
7580   cat conftest.$ac_ext >&5
7581   rm -rf conftest*
7582   eval "ac_cv_lib_$ac_lib_var=no"
7583 fi
7584 rm -f conftest*
7585 LIBS="$ac_save_LIBS"
7586
7587 fi
7588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7589   echo "$ac_t""yes" 1>&6
7590   ol_cv_lib_ndbm=-lndbm
7591 else
7592   echo "$ac_t""no" 1>&6
7593
7594                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7595 echo "configure:7596: checking for dbm_open in -ldbm" >&5
7596 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7598   echo $ac_n "(cached) $ac_c" 1>&6
7599 else
7600   ac_save_LIBS="$LIBS"
7601 LIBS="-ldbm  $LIBS"
7602 cat > conftest.$ac_ext <<EOF
7603 #line 7604 "configure"
7604 #include "confdefs.h"
7605 /* Override any gcc2 internal prototype to avoid an error.  */
7606 /* We use char because int might match the return type of a gcc2
7607     builtin and then its argument prototype would still apply.  */
7608 char dbm_open();
7609
7610 int main() {
7611 dbm_open()
7612 ; return 0; }
7613 EOF
7614 if { (eval echo configure:7615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7615   rm -rf conftest*
7616   eval "ac_cv_lib_$ac_lib_var=yes"
7617 else
7618   echo "configure: failed program was:" >&5
7619   cat conftest.$ac_ext >&5
7620   rm -rf conftest*
7621   eval "ac_cv_lib_$ac_lib_var=no"
7622 fi
7623 rm -f conftest*
7624 LIBS="$ac_save_LIBS"
7625
7626 fi
7627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7628   echo "$ac_t""yes" 1>&6
7629   ol_cv_lib_ndbm=-ldbm
7630 else
7631   echo "$ac_t""no" 1>&6
7632 ol_cv_lib_ndbm=no
7633 fi
7634                 
7635 fi
7636
7637         
7638 fi
7639
7640         LIBS="$ol_LIBS"
7641
7642 fi
7643
7644 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7645
7646
7647  for ac_hdr in ndbm.h
7648 do
7649 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7650 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7651 echo "configure:7652: checking for $ac_hdr" >&5
7652 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7653   echo $ac_n "(cached) $ac_c" 1>&6
7654 else
7655   cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 #include <$ac_hdr>
7659 EOF
7660 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7661 { (eval echo configure:7662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7662 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7663 if test -z "$ac_err"; then
7664   rm -rf conftest*
7665   eval "ac_cv_header_$ac_safe=yes"
7666 else
7667   echo "$ac_err" >&5
7668   echo "configure: failed program was:" >&5
7669   cat conftest.$ac_ext >&5
7670   rm -rf conftest*
7671   eval "ac_cv_header_$ac_safe=no"
7672 fi
7673 rm -f conftest*
7674 fi
7675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7676   echo "$ac_t""yes" 1>&6
7677     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7678   cat >> confdefs.h <<EOF
7679 #define $ac_tr_hdr 1
7680 EOF
7681  
7682 else
7683   echo "$ac_t""no" 1>&6
7684 fi
7685 done
7686
7687  echo $ac_n "checking for db""... $ac_c" 1>&6
7688 echo "configure:7689: checking for db" >&5
7689 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
7690   echo $ac_n "(cached) $ac_c" 1>&6
7691 else
7692   
7693         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
7694                 ol_cv_ndbm=no
7695         else
7696                 ol_cv_ndbm=yes
7697         fi
7698
7699 fi
7700
7701 echo "$ac_t""$ol_cv_ndbm" 1>&6
7702  if test $ol_cv_ndbm = yes ; then
7703         cat >> confdefs.h <<\EOF
7704 #define HAVE_NDBM 1
7705 EOF
7706
7707  fi
7708
7709
7710         if test $ol_cv_ndbm = yes ; then
7711                 ol_link_ldbm=ndbm
7712                 ol_with_ldbm_api=ndbm
7713
7714                 if test $ol_cv_lib_ndbm != yes ; then
7715                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
7716                 fi
7717         fi
7718 fi
7719
7720 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
7721         echo "configure: warning: could not find suitable LDBM backend" 1>&2
7722         if test $ol_enable_ldbm = yes ; then
7723                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
7724         fi
7725
7726         echo "configure: warning: disabling LDBM" 1>&2
7727         ol_enable_ldbm=no
7728 fi
7729
7730 if test $ol_enable_wrappers != no ; then
7731         for ac_hdr in tcpd.h
7732 do
7733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7735 echo "configure:7736: checking for $ac_hdr" >&5
7736 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7737   echo $ac_n "(cached) $ac_c" 1>&6
7738 else
7739   cat > conftest.$ac_ext <<EOF
7740 #line 7741 "configure"
7741 #include "confdefs.h"
7742 #include <$ac_hdr>
7743 EOF
7744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7745 { (eval echo configure:7746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7747 if test -z "$ac_err"; then
7748   rm -rf conftest*
7749   eval "ac_cv_header_$ac_safe=yes"
7750 else
7751   echo "$ac_err" >&5
7752   echo "configure: failed program was:" >&5
7753   cat conftest.$ac_ext >&5
7754   rm -rf conftest*
7755   eval "ac_cv_header_$ac_safe=no"
7756 fi
7757 rm -f conftest*
7758 fi
7759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7760   echo "$ac_t""yes" 1>&6
7761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7762   cat >> confdefs.h <<EOF
7763 #define $ac_tr_hdr 1
7764 EOF
7765  
7766 else
7767   echo "$ac_t""no" 1>&6
7768 fi
7769 done
7770
7771
7772         if test $ac_cv_header_tcpd_h != yes ; then
7773                 have_wrappers=no
7774         else
7775                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
7776 echo "configure:7777: checking for main in -lwrap" >&5
7777 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
7778 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7779   echo $ac_n "(cached) $ac_c" 1>&6
7780 else
7781   ac_save_LIBS="$LIBS"
7782 LIBS="-lwrap  $LIBS"
7783 cat > conftest.$ac_ext <<EOF
7784 #line 7785 "configure"
7785 #include "confdefs.h"
7786
7787 int main() {
7788 main()
7789 ; return 0; }
7790 EOF
7791 if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7792   rm -rf conftest*
7793   eval "ac_cv_lib_$ac_lib_var=yes"
7794 else
7795   echo "configure: failed program was:" >&5
7796   cat conftest.$ac_ext >&5
7797   rm -rf conftest*
7798   eval "ac_cv_lib_$ac_lib_var=no"
7799 fi
7800 rm -f conftest*
7801 LIBS="$ac_save_LIBS"
7802
7803 fi
7804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7805   echo "$ac_t""yes" 1>&6
7806   have_wrappers=yes
7807 else
7808   echo "$ac_t""no" 1>&6
7809 have_wrappers=no
7810 fi
7811
7812         fi
7813
7814         if test $have_wrappers = yes ; then
7815                 cat >> confdefs.h <<\EOF
7816 #define HAVE_TCPD 1
7817 EOF
7818
7819                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
7820         else
7821                 echo "configure: warning: could not find -lwrap" 1>&2
7822                 if test $ol_enable_wrappers = yes ; then
7823                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
7824                 fi
7825
7826                 echo "configure: warning: disabling wrappers support" 1>&2
7827                 ol_enable_wrappers=no
7828         fi
7829 fi
7830
7831 if test $ol_enable_syslog != no ; then
7832         echo $ac_n "checking for openlog""... $ac_c" 1>&6
7833 echo "configure:7834: checking for openlog" >&5
7834 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
7835   echo $ac_n "(cached) $ac_c" 1>&6
7836 else
7837   cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 /* System header to define __stub macros and hopefully few prototypes,
7841     which can conflict with char openlog(); below.  */
7842 #include <assert.h>
7843 /* Override any gcc2 internal prototype to avoid an error.  */
7844 /* We use char because int might match the return type of a gcc2
7845     builtin and then its argument prototype would still apply.  */
7846 char openlog();
7847
7848 int main() {
7849
7850 /* The GNU C library defines this for functions which it implements
7851     to always fail with ENOSYS.  Some functions are actually named
7852     something starting with __ and the normal name is an alias.  */
7853 #if defined (__stub_openlog) || defined (__stub___openlog)
7854 choke me
7855 #else
7856 openlog();
7857 #endif
7858
7859 ; return 0; }
7860 EOF
7861 if { (eval echo configure:7862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7862   rm -rf conftest*
7863   eval "ac_cv_func_openlog=yes"
7864 else
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   eval "ac_cv_func_openlog=no"
7869 fi
7870 rm -f conftest*
7871 fi
7872
7873 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
7874   echo "$ac_t""yes" 1>&6
7875   :
7876 else
7877   echo "$ac_t""no" 1>&6
7878 fi
7879
7880         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
7881                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
7882         fi
7883         ol_enable_syslog=$ac_cv_func_openlog
7884 fi
7885
7886 if test $ol_enable_dmalloc != no ; then
7887         for ac_hdr in dmalloc.h
7888 do
7889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7891 echo "configure:7892: checking for $ac_hdr" >&5
7892 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7893   echo $ac_n "(cached) $ac_c" 1>&6
7894 else
7895   cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 #include <$ac_hdr>
7899 EOF
7900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7901 { (eval echo configure:7902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7903 if test -z "$ac_err"; then
7904   rm -rf conftest*
7905   eval "ac_cv_header_$ac_safe=yes"
7906 else
7907   echo "$ac_err" >&5
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   eval "ac_cv_header_$ac_safe=no"
7912 fi
7913 rm -f conftest*
7914 fi
7915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7916   echo "$ac_t""yes" 1>&6
7917     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7918   cat >> confdefs.h <<EOF
7919 #define $ac_tr_hdr 1
7920 EOF
7921  
7922 else
7923   echo "$ac_t""no" 1>&6
7924 fi
7925 done
7926
7927         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7928 echo "configure:7929: checking for dmalloc_shutdown in -ldmalloc" >&5
7929 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7930 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7931   echo $ac_n "(cached) $ac_c" 1>&6
7932 else
7933   ac_save_LIBS="$LIBS"
7934 LIBS="-ldmalloc  $LIBS"
7935 cat > conftest.$ac_ext <<EOF
7936 #line 7937 "configure"
7937 #include "confdefs.h"
7938 /* Override any gcc2 internal prototype to avoid an error.  */
7939 /* We use char because int might match the return type of a gcc2
7940     builtin and then its argument prototype would still apply.  */
7941 char dmalloc_shutdown();
7942
7943 int main() {
7944 dmalloc_shutdown()
7945 ; return 0; }
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7948   rm -rf conftest*
7949   eval "ac_cv_lib_$ac_lib_var=yes"
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -rf conftest*
7954   eval "ac_cv_lib_$ac_lib_var=no"
7955 fi
7956 rm -f conftest*
7957 LIBS="$ac_save_LIBS"
7958
7959 fi
7960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7961   echo "$ac_t""yes" 1>&6
7962     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7964   cat >> confdefs.h <<EOF
7965 #define $ac_tr_lib 1
7966 EOF
7967
7968   LIBS="-ldmalloc $LIBS"
7969
7970 else
7971   echo "$ac_t""no" 1>&6
7972 fi
7973
7974 fi
7975
7976 if test $ol_enable_tcl != no ; then
7977         for ac_hdr in tcl.h
7978 do
7979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7981 echo "configure:7982: checking for $ac_hdr" >&5
7982 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7983   echo $ac_n "(cached) $ac_c" 1>&6
7984 else
7985   cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988 #include <$ac_hdr>
7989 EOF
7990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7991 { (eval echo configure:7992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7993 if test -z "$ac_err"; then
7994   rm -rf conftest*
7995   eval "ac_cv_header_$ac_safe=yes"
7996 else
7997   echo "$ac_err" >&5
7998   echo "configure: failed program was:" >&5
7999   cat conftest.$ac_ext >&5
8000   rm -rf conftest*
8001   eval "ac_cv_header_$ac_safe=no"
8002 fi
8003 rm -f conftest*
8004 fi
8005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8006   echo "$ac_t""yes" 1>&6
8007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8008   cat >> confdefs.h <<EOF
8009 #define $ac_tr_hdr 1
8010 EOF
8011  
8012 else
8013   echo "$ac_t""no" 1>&6
8014 fi
8015 done
8016
8017
8018         if test $ac_cv_header_tcl_h != yes ; then
8019                 have_tcl=no
8020         else
8021                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8022 echo "configure:8023: checking for main in -ltcl" >&5
8023 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8025   echo $ac_n "(cached) $ac_c" 1>&6
8026 else
8027   ac_save_LIBS="$LIBS"
8028 LIBS="-ltcl  $LIBS"
8029 cat > conftest.$ac_ext <<EOF
8030 #line 8031 "configure"
8031 #include "confdefs.h"
8032
8033 int main() {
8034 main()
8035 ; return 0; }
8036 EOF
8037 if { (eval echo configure:8038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8038   rm -rf conftest*
8039   eval "ac_cv_lib_$ac_lib_var=yes"
8040 else
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -rf conftest*
8044   eval "ac_cv_lib_$ac_lib_var=no"
8045 fi
8046 rm -f conftest*
8047 LIBS="$ac_save_LIBS"
8048
8049 fi
8050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8051   echo "$ac_t""yes" 1>&6
8052   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8053 else
8054   echo "$ac_t""no" 1>&6
8055 have_tcl=no
8056 fi
8057
8058
8059                 if test $have_tcl != yes; then
8060                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8061 echo "configure:8062: checking for main in -ltcl7.6" >&5
8062 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8063 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   ac_save_LIBS="$LIBS"
8067 LIBS="-ltcl7.6  $LIBS"
8068 cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071
8072 int main() {
8073 main()
8074 ; return 0; }
8075 EOF
8076 if { (eval echo configure:8077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8077   rm -rf conftest*
8078   eval "ac_cv_lib_$ac_lib_var=yes"
8079 else
8080   echo "configure: failed program was:" >&5
8081   cat conftest.$ac_ext >&5
8082   rm -rf conftest*
8083   eval "ac_cv_lib_$ac_lib_var=no"
8084 fi
8085 rm -f conftest*
8086 LIBS="$ac_save_LIBS"
8087
8088 fi
8089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8090   echo "$ac_t""yes" 1>&6
8091   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8092 else
8093   echo "$ac_t""no" 1>&6
8094 have_tcl=no
8095 fi
8096
8097                 fi
8098
8099                 if test $have_tcl != yes; then
8100                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8101 echo "configure:8102: checking for main in -ltcl8.0" >&5
8102 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8104   echo $ac_n "(cached) $ac_c" 1>&6
8105 else
8106   ac_save_LIBS="$LIBS"
8107 LIBS="-ltcl8.0  $LIBS"
8108 cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111
8112 int main() {
8113 main()
8114 ; return 0; }
8115 EOF
8116 if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8117   rm -rf conftest*
8118   eval "ac_cv_lib_$ac_lib_var=yes"
8119 else
8120   echo "configure: failed program was:" >&5
8121   cat conftest.$ac_ext >&5
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=no"
8124 fi
8125 rm -f conftest*
8126 LIBS="$ac_save_LIBS"
8127
8128 fi
8129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8130   echo "$ac_t""yes" 1>&6
8131   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8132 else
8133   echo "$ac_t""no" 1>&6
8134 have_tcl=no
8135 fi
8136
8137                 fi
8138         fi
8139
8140         if test $have_tcl != yes ; then
8141                 echo "configure: warning: could not find -ltcl" 1>&2
8142                 if test $ol_enable_tcl = yes ; then
8143                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8144                 fi
8145
8146                 ol_enable_tcl=no
8147         fi
8148 fi
8149
8150 # ud needs termcap (should insert check here)
8151 ol_link_termcap=no
8152 for ac_hdr in termcap.h ncurses.h
8153 do
8154 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8155 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8156 echo "configure:8157: checking for $ac_hdr" >&5
8157 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8158   echo $ac_n "(cached) $ac_c" 1>&6
8159 else
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 #include <$ac_hdr>
8164 EOF
8165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8166 { (eval echo configure:8167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8168 if test -z "$ac_err"; then
8169   rm -rf conftest*
8170   eval "ac_cv_header_$ac_safe=yes"
8171 else
8172   echo "$ac_err" >&5
8173   echo "configure: failed program was:" >&5
8174   cat conftest.$ac_ext >&5
8175   rm -rf conftest*
8176   eval "ac_cv_header_$ac_safe=no"
8177 fi
8178 rm -f conftest*
8179 fi
8180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8181   echo "$ac_t""yes" 1>&6
8182     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8183   cat >> confdefs.h <<EOF
8184 #define $ac_tr_hdr 1
8185 EOF
8186  
8187 else
8188   echo "$ac_t""no" 1>&6
8189 fi
8190 done
8191
8192
8193 if test $ol_link_termcap = no ; then
8194         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8195 echo "configure:8196: checking for tputs in -ltermcap" >&5
8196 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8198   echo $ac_n "(cached) $ac_c" 1>&6
8199 else
8200   ac_save_LIBS="$LIBS"
8201 LIBS="-ltermcap  $LIBS"
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char tputs();
8209
8210 int main() {
8211 tputs()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 LIBS="$ac_save_LIBS"
8225
8226 fi
8227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8228   echo "$ac_t""yes" 1>&6
8229   have_termcap=yes
8230 else
8231   echo "$ac_t""no" 1>&6
8232 have_termcap=no
8233 fi
8234
8235         if test $have_termcap = yes ; then
8236                 cat >> confdefs.h <<\EOF
8237 #define HAVE_TERMCAP 1
8238 EOF
8239
8240                 ol_link_termcap=yes
8241                 TERMCAP_LIBS=-ltermcap
8242         fi
8243 fi
8244
8245 if test $ol_link_termcap = no ; then
8246         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8247 echo "configure:8248: checking for initscr in -lncurses" >&5
8248 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8249 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   ac_save_LIBS="$LIBS"
8253 LIBS="-lncurses  $LIBS"
8254 cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* Override any gcc2 internal prototype to avoid an error.  */
8258 /* We use char because int might match the return type of a gcc2
8259     builtin and then its argument prototype would still apply.  */
8260 char initscr();
8261
8262 int main() {
8263 initscr()
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=no"
8274 fi
8275 rm -f conftest*
8276 LIBS="$ac_save_LIBS"
8277
8278 fi
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8280   echo "$ac_t""yes" 1>&6
8281   have_ncurses=yes
8282 else
8283   echo "$ac_t""no" 1>&6
8284 have_ncurses=no
8285 fi
8286
8287         if test $have_ncurses = yes ; then
8288                 cat >> confdefs.h <<\EOF
8289 #define HAVE_NCURSES 1
8290 EOF
8291
8292                 ol_link_termcap=yes
8293                 TERMCAP_LIBS=-lncurses
8294         fi
8295 fi
8296
8297 if test $ol_link_termcap = no ; then
8298         cat >> confdefs.h <<\EOF
8299 #define NO_TERMCAP 1
8300 EOF
8301
8302         TERMCAP_LIBS=
8303 fi
8304
8305 ol_link_readline=no
8306 if test $ol_with_readline != no ; then
8307         for ac_hdr in readline/readline.h readline/history.h
8308 do
8309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8311 echo "configure:8312: checking for $ac_hdr" >&5
8312 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   cat > conftest.$ac_ext <<EOF
8316 #line 8317 "configure"
8317 #include "confdefs.h"
8318 #include <$ac_hdr>
8319 EOF
8320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8321 { (eval echo configure:8322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8323 if test -z "$ac_err"; then
8324   rm -rf conftest*
8325   eval "ac_cv_header_$ac_safe=yes"
8326 else
8327   echo "$ac_err" >&5
8328   echo "configure: failed program was:" >&5
8329   cat conftest.$ac_ext >&5
8330   rm -rf conftest*
8331   eval "ac_cv_header_$ac_safe=no"
8332 fi
8333 rm -f conftest*
8334 fi
8335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8336   echo "$ac_t""yes" 1>&6
8337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8338   cat >> confdefs.h <<EOF
8339 #define $ac_tr_hdr 1
8340 EOF
8341  
8342 else
8343   echo "$ac_t""no" 1>&6
8344 fi
8345 done
8346
8347
8348         if test $ac_cv_header_readline_readline_h = yes ; then
8349                 save_LIBS="$LIBS"
8350                 LIBS="$TERMCAP_LIBS $LIBS"
8351                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8352 echo "configure:8353: checking for readline in -lreadline" >&5
8353 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8355   echo $ac_n "(cached) $ac_c" 1>&6
8356 else
8357   ac_save_LIBS="$LIBS"
8358 LIBS="-lreadline  $LIBS"
8359 cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 /* Override any gcc2 internal prototype to avoid an error.  */
8363 /* We use char because int might match the return type of a gcc2
8364     builtin and then its argument prototype would still apply.  */
8365 char readline();
8366
8367 int main() {
8368 readline()
8369 ; return 0; }
8370 EOF
8371 if { (eval echo configure:8372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8372   rm -rf conftest*
8373   eval "ac_cv_lib_$ac_lib_var=yes"
8374 else
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   eval "ac_cv_lib_$ac_lib_var=no"
8379 fi
8380 rm -f conftest*
8381 LIBS="$ac_save_LIBS"
8382
8383 fi
8384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8385   echo "$ac_t""yes" 1>&6
8386   have_readline=yes
8387 else
8388   echo "$ac_t""no" 1>&6
8389 have_readline=no
8390 fi
8391
8392                 LIBS="$save_LIBS"
8393                         
8394                 if test $have_readline = yes ; then
8395                         ol_with_readline=found
8396                         ol_link_readline=yes
8397
8398                         READLINE_LIBS="-lreadline"
8399                 fi
8400         fi
8401 fi
8402
8403 if test $ol_link_readline = yes ; then
8404         cat >> confdefs.h <<\EOF
8405 #define HAVE_READLINE 1
8406 EOF
8407
8408 fi
8409
8410
8411 # FreeBSD (and others) have crypt(3) in -lcrypt
8412 if test $ol_enable_crypt != no ; then
8413         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8414 echo "configure:8415: checking for crypt" >&5
8415 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8416   echo $ac_n "(cached) $ac_c" 1>&6
8417 else
8418   cat > conftest.$ac_ext <<EOF
8419 #line 8420 "configure"
8420 #include "confdefs.h"
8421 /* System header to define __stub macros and hopefully few prototypes,
8422     which can conflict with char crypt(); below.  */
8423 #include <assert.h>
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char crypt();
8428
8429 int main() {
8430
8431 /* The GNU C library defines this for functions which it implements
8432     to always fail with ENOSYS.  Some functions are actually named
8433     something starting with __ and the normal name is an alias.  */
8434 #if defined (__stub_crypt) || defined (__stub___crypt)
8435 choke me
8436 #else
8437 crypt();
8438 #endif
8439
8440 ; return 0; }
8441 EOF
8442 if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8443   rm -rf conftest*
8444   eval "ac_cv_func_crypt=yes"
8445 else
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   eval "ac_cv_func_crypt=no"
8450 fi
8451 rm -f conftest*
8452 fi
8453
8454 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8455   echo "$ac_t""yes" 1>&6
8456   have_crypt=yes
8457 else
8458   echo "$ac_t""no" 1>&6
8459
8460                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8461 echo "configure:8462: checking for crypt in -lcrypt" >&5
8462 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8463 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8464   echo $ac_n "(cached) $ac_c" 1>&6
8465 else
8466   ac_save_LIBS="$LIBS"
8467 LIBS="-lcrypt  $LIBS"
8468 cat > conftest.$ac_ext <<EOF
8469 #line 8470 "configure"
8470 #include "confdefs.h"
8471 /* Override any gcc2 internal prototype to avoid an error.  */
8472 /* We use char because int might match the return type of a gcc2
8473     builtin and then its argument prototype would still apply.  */
8474 char crypt();
8475
8476 int main() {
8477 crypt()
8478 ; return 0; }
8479 EOF
8480 if { (eval echo configure:8481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8481   rm -rf conftest*
8482   eval "ac_cv_lib_$ac_lib_var=yes"
8483 else
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -rf conftest*
8487   eval "ac_cv_lib_$ac_lib_var=no"
8488 fi
8489 rm -f conftest*
8490 LIBS="$ac_save_LIBS"
8491
8492 fi
8493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8494   echo "$ac_t""yes" 1>&6
8495   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8496                         have_crypt=yes
8497 else
8498   echo "$ac_t""no" 1>&6
8499 have_crypt=no
8500 fi
8501
8502 fi
8503
8504
8505         if test $have_crypt = yes ; then
8506                 cat >> confdefs.h <<\EOF
8507 #define HAVE_CRYPT 1
8508 EOF
8509
8510         else
8511                 echo "configure: warning: could not find crypt" 1>&2
8512                 if test $ol_enable_crypt = yes ; then
8513                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8514                 fi
8515
8516                 echo "configure: warning: disabling crypt support" 1>&2
8517                 ol_enable_crypt=no
8518         fi
8519 fi
8520
8521 # FreeBSD (and others) have setproctitle(3) in -lutil
8522 if test $ol_enable_proctitle != no ; then
8523         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8524 echo "configure:8525: checking for setproctitle" >&5
8525 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8526   echo $ac_n "(cached) $ac_c" 1>&6
8527 else
8528   cat > conftest.$ac_ext <<EOF
8529 #line 8530 "configure"
8530 #include "confdefs.h"
8531 /* System header to define __stub macros and hopefully few prototypes,
8532     which can conflict with char setproctitle(); below.  */
8533 #include <assert.h>
8534 /* Override any gcc2 internal prototype to avoid an error.  */
8535 /* We use char because int might match the return type of a gcc2
8536     builtin and then its argument prototype would still apply.  */
8537 char setproctitle();
8538
8539 int main() {
8540
8541 /* The GNU C library defines this for functions which it implements
8542     to always fail with ENOSYS.  Some functions are actually named
8543     something starting with __ and the normal name is an alias.  */
8544 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8545 choke me
8546 #else
8547 setproctitle();
8548 #endif
8549
8550 ; return 0; }
8551 EOF
8552 if { (eval echo configure:8553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8553   rm -rf conftest*
8554   eval "ac_cv_func_setproctitle=yes"
8555 else
8556   echo "configure: failed program was:" >&5
8557   cat conftest.$ac_ext >&5
8558   rm -rf conftest*
8559   eval "ac_cv_func_setproctitle=no"
8560 fi
8561 rm -f conftest*
8562 fi
8563
8564 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8565   echo "$ac_t""yes" 1>&6
8566   have_setproctitle=yes
8567 else
8568   echo "$ac_t""no" 1>&6
8569
8570                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8571 echo "configure:8572: checking for setproctitle in -lutil" >&5
8572 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   ac_save_LIBS="$LIBS"
8577 LIBS="-lutil  $LIBS"
8578 cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 /* Override any gcc2 internal prototype to avoid an error.  */
8582 /* We use char because int might match the return type of a gcc2
8583     builtin and then its argument prototype would still apply.  */
8584 char setproctitle();
8585
8586 int main() {
8587 setproctitle()
8588 ; return 0; }
8589 EOF
8590 if { (eval echo configure:8591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8591   rm -rf conftest*
8592   eval "ac_cv_lib_$ac_lib_var=yes"
8593 else
8594   echo "configure: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   rm -rf conftest*
8597   eval "ac_cv_lib_$ac_lib_var=no"
8598 fi
8599 rm -f conftest*
8600 LIBS="$ac_save_LIBS"
8601
8602 fi
8603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8604   echo "$ac_t""yes" 1>&6
8605   have_setproctitle=yes
8606                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8607 else
8608   echo "$ac_t""no" 1>&6
8609 have_setproctitle=no
8610                         LIBOBJS="$LIBOBJS setproctitle.o"
8611 fi
8612
8613 fi
8614
8615
8616         if test $have_setproctitle = yes ; then
8617                 cat >> confdefs.h <<\EOF
8618 #define HAVE_SETPROCTITLE 1
8619 EOF
8620
8621         fi
8622 fi
8623
8624 # test for EBCDIC
8625 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8626 echo "configure:8627: checking for EBCDIC" >&5
8627 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   
8631         cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634
8635 #if !('M' == 0xd4)
8636 #include <__ASCII__/generate_error.h>
8637 #endif
8638
8639 EOF
8640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8641 { (eval echo configure:8642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8643 if test -z "$ac_err"; then
8644   rm -rf conftest*
8645   ol_cv_cpp_ebcdic=yes
8646 else
8647   echo "$ac_err" >&5
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   ol_cv_cpp_ebcdic=no
8652 fi
8653 rm -f conftest*
8654 fi
8655
8656 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8657 if test $ol_cv_cpp_ebcdic = yes ; then
8658         cat >> confdefs.h <<\EOF
8659 #define HAVE_EBCDIC 1
8660 EOF
8661
8662 fi
8663
8664 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8665 echo "configure:8666: checking for ANSI C header files" >&5
8666 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   cat > conftest.$ac_ext <<EOF
8670 #line 8671 "configure"
8671 #include "confdefs.h"
8672 #include <stdlib.h>
8673 #include <stdarg.h>
8674 #include <string.h>
8675 #include <float.h>
8676 EOF
8677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8678 { (eval echo configure:8679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8680 if test -z "$ac_err"; then
8681   rm -rf conftest*
8682   ol_cv_header_stdc=yes
8683 else
8684   echo "$ac_err" >&5
8685   echo "configure: failed program was:" >&5
8686   cat conftest.$ac_ext >&5
8687   rm -rf conftest*
8688   ol_cv_header_stdc=no
8689 fi
8690 rm -f conftest*
8691
8692 if test $ol_cv_header_stdc = yes; then
8693   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8694 cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697 #include <string.h>
8698 EOF
8699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8700   egrep "memchr" >/dev/null 2>&1; then
8701   :
8702 else
8703   rm -rf conftest*
8704   ol_cv_header_stdc=no
8705 fi
8706 rm -f conftest*
8707
8708 fi
8709
8710 if test $ol_cv_header_stdc = yes; then
8711   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8712 cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <stdlib.h>
8716 EOF
8717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8718   egrep "free" >/dev/null 2>&1; then
8719   :
8720 else
8721   rm -rf conftest*
8722   ol_cv_header_stdc=no
8723 fi
8724 rm -f conftest*
8725
8726 fi
8727
8728 if test $ol_cv_header_stdc = yes; then
8729   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8730 if test "$cross_compiling" = yes; then
8731   :
8732 else
8733   cat > conftest.$ac_ext <<EOF
8734 #line 8735 "configure"
8735 #include "confdefs.h"
8736 #include <ctype.h>
8737 #ifndef HAVE_EBCDIC
8738 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8739 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8740 #else
8741 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8742                 || ('j' <= (c) && (c) <= 'r') \
8743                 || ('s' <= (c) && (c) <= 'z'))
8744 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8745 #endif
8746 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8747 int main () { int i; for (i = 0; i < 256; i++)
8748 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8749 exit (0); }
8750
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8753 then
8754   :
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -fr conftest*
8759   ol_cv_header_stdc=no
8760 fi
8761 rm -fr conftest*
8762 fi
8763
8764 fi
8765 fi
8766
8767 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8768 if test $ol_cv_header_stdc = yes; then
8769   cat >> confdefs.h <<\EOF
8770 #define STDC_HEADERS 1
8771 EOF
8772
8773 fi
8774 ac_cv_header_stdc=disable
8775
8776
8777 if test $ol_cv_header_stdc != yes; then
8778         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8779 fi
8780
8781 ac_header_dirent=no
8782 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8783 do
8784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8785 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8786 echo "configure:8787: checking for $ac_hdr that defines DIR" >&5
8787 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
8788   echo $ac_n "(cached) $ac_c" 1>&6
8789 else
8790   cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 #include <$ac_hdr>
8795 int main() {
8796 DIR *dirp = 0;
8797 ; return 0; }
8798 EOF
8799 if { (eval echo configure:8800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8800   rm -rf conftest*
8801   eval "ac_cv_header_dirent_$ac_safe=yes"
8802 else
8803   echo "configure: failed program was:" >&5
8804   cat conftest.$ac_ext >&5
8805   rm -rf conftest*
8806   eval "ac_cv_header_dirent_$ac_safe=no"
8807 fi
8808 rm -f conftest*
8809 fi
8810 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8811   echo "$ac_t""yes" 1>&6
8812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8813   cat >> confdefs.h <<EOF
8814 #define $ac_tr_hdr 1
8815 EOF
8816  ac_header_dirent=$ac_hdr; break
8817 else
8818   echo "$ac_t""no" 1>&6
8819 fi
8820 done
8821 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8822 if test $ac_header_dirent = dirent.h; then
8823 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8824 echo "configure:8825: checking for opendir in -ldir" >&5
8825 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
8826 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   ac_save_LIBS="$LIBS"
8830 LIBS="-ldir  $LIBS"
8831 cat > conftest.$ac_ext <<EOF
8832 #line 8833 "configure"
8833 #include "confdefs.h"
8834 /* Override any gcc2 internal prototype to avoid an error.  */
8835 /* We use char because int might match the return type of a gcc2
8836     builtin and then its argument prototype would still apply.  */
8837 char opendir();
8838
8839 int main() {
8840 opendir()
8841 ; return 0; }
8842 EOF
8843 if { (eval echo configure:8844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8844   rm -rf conftest*
8845   eval "ac_cv_lib_$ac_lib_var=yes"
8846 else
8847   echo "configure: failed program was:" >&5
8848   cat conftest.$ac_ext >&5
8849   rm -rf conftest*
8850   eval "ac_cv_lib_$ac_lib_var=no"
8851 fi
8852 rm -f conftest*
8853 LIBS="$ac_save_LIBS"
8854
8855 fi
8856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8857   echo "$ac_t""yes" 1>&6
8858   LIBS="$LIBS -ldir"
8859 else
8860   echo "$ac_t""no" 1>&6
8861 fi
8862
8863 else
8864 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8865 echo "configure:8866: checking for opendir in -lx" >&5
8866 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
8867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8868   echo $ac_n "(cached) $ac_c" 1>&6
8869 else
8870   ac_save_LIBS="$LIBS"
8871 LIBS="-lx  $LIBS"
8872 cat > conftest.$ac_ext <<EOF
8873 #line 8874 "configure"
8874 #include "confdefs.h"
8875 /* Override any gcc2 internal prototype to avoid an error.  */
8876 /* We use char because int might match the return type of a gcc2
8877     builtin and then its argument prototype would still apply.  */
8878 char opendir();
8879
8880 int main() {
8881 opendir()
8882 ; return 0; }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8885   rm -rf conftest*
8886   eval "ac_cv_lib_$ac_lib_var=yes"
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -rf conftest*
8891   eval "ac_cv_lib_$ac_lib_var=no"
8892 fi
8893 rm -f conftest*
8894 LIBS="$ac_save_LIBS"
8895
8896 fi
8897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8898   echo "$ac_t""yes" 1>&6
8899   LIBS="$LIBS -lx"
8900 else
8901   echo "$ac_t""no" 1>&6
8902 fi
8903
8904 fi
8905
8906 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8907 echo "configure:8908: checking for sys/wait.h that is POSIX.1 compatible" >&5
8908 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
8909   echo $ac_n "(cached) $ac_c" 1>&6
8910 else
8911   cat > conftest.$ac_ext <<EOF
8912 #line 8913 "configure"
8913 #include "confdefs.h"
8914 #include <sys/types.h>
8915 #include <sys/wait.h>
8916 #ifndef WEXITSTATUS
8917 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8918 #endif
8919 #ifndef WIFEXITED
8920 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8921 #endif
8922 int main() {
8923 int s;
8924 wait (&s);
8925 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8929   rm -rf conftest*
8930   ac_cv_header_sys_wait_h=yes
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   ac_cv_header_sys_wait_h=no
8936 fi
8937 rm -f conftest*
8938 fi
8939
8940 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8941 if test $ac_cv_header_sys_wait_h = yes; then
8942   cat >> confdefs.h <<\EOF
8943 #define HAVE_SYS_WAIT_H 1
8944 EOF
8945
8946 fi
8947
8948 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8949 echo "configure:8950: checking POSIX termios" >&5
8950 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
8951   echo $ac_n "(cached) $ac_c" 1>&6
8952 else
8953   cat > conftest.$ac_ext <<EOF
8954 #line 8955 "configure"
8955 #include "confdefs.h"
8956 #include <sys/types.h>
8957 #include <unistd.h>
8958 #include <termios.h>
8959 int main() {
8960 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8961    tcgetattr(0, 0);
8962 ; return 0; }
8963 EOF
8964 if { (eval echo configure:8965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8965   rm -rf conftest*
8966   am_cv_sys_posix_termios=yes
8967 else
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -rf conftest*
8971   am_cv_sys_posix_termios=no
8972 fi
8973 rm -f conftest*
8974 fi
8975
8976 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8977
8978
8979  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8980 echo "configure:8981: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8981 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8985
8986   gwinsz_in_termios_h=no
8987   if test $am_cv_sys_posix_termios = yes; then
8988     cat > conftest.$ac_ext <<EOF
8989 #line 8990 "configure"
8990 #include "confdefs.h"
8991 #include <sys/types.h>
8992 #     include <termios.h>
8993 #     ifdef TIOCGWINSZ
8994         yes
8995 #     endif
8996     
8997 EOF
8998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8999   egrep "yes" >/dev/null 2>&1; then
9000   rm -rf conftest*
9001   gwinsz_in_termios_h=yes
9002 fi
9003 rm -f conftest*
9004
9005   fi
9006
9007   if test $gwinsz_in_termios_h = no; then
9008     cat > conftest.$ac_ext <<EOF
9009 #line 9010 "configure"
9010 #include "confdefs.h"
9011 #include <sys/types.h>
9012 #     include <sys/ioctl.h>
9013 #     ifdef TIOCGWINSZ
9014         yes
9015 #     endif
9016     
9017 EOF
9018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9019   egrep "yes" >/dev/null 2>&1; then
9020   rm -rf conftest*
9021   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9022 fi
9023 rm -f conftest*
9024
9025   fi
9026   
9027 fi
9028
9029 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9030   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9031     cat >> confdefs.h <<\EOF
9032 #define GWINSZ_IN_SYS_IOCTL 1
9033 EOF
9034
9035   fi
9036
9037 if test $am_cv_sys_posix_termios = yes ; then
9038         cat >> confdefs.h <<\EOF
9039 #define HAVE_POSIX_TERMIOS 1
9040 EOF
9041
9042 fi
9043
9044 for ac_hdr in \
9045         arpa/inet.h             \
9046         arpa/nameser.h  \
9047         assert.h                \
9048         crypt.h                 \
9049         errno.h                 \
9050         fcntl.h                 \
9051         filio.h                 \
9052         getopt.h                \
9053         grp.h                   \
9054         libutil.h               \
9055         limits.h                \
9056         locale.h                \
9057         malloc.h                \
9058         memory.h                \
9059         regex.h                 \
9060         psap.h                  \
9061         pwd.h                   \
9062         resolv.h                \
9063         sgtty.h                 \
9064         stdarg.h                \
9065         stddef.h                \
9066         string.h                \
9067         strings.h               \
9068         sysexits.h              \
9069         sys/file.h              \
9070         sys/filio.h             \
9071         sys/errno.h             \
9072         sys/ioctl.h             \
9073         sys/param.h             \
9074         sys/resource.h  \
9075         sys/socket.h    \
9076         sys/syslog.h    \
9077         sys/time.h              \
9078         sys/types.h             \
9079         syslog.h                \
9080         termios.h               \
9081         unistd.h                \
9082
9083 do
9084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9086 echo "configure:9087: checking for $ac_hdr" >&5
9087 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9088   echo $ac_n "(cached) $ac_c" 1>&6
9089 else
9090   cat > conftest.$ac_ext <<EOF
9091 #line 9092 "configure"
9092 #include "confdefs.h"
9093 #include <$ac_hdr>
9094 EOF
9095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9096 { (eval echo configure:9097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9098 if test -z "$ac_err"; then
9099   rm -rf conftest*
9100   eval "ac_cv_header_$ac_safe=yes"
9101 else
9102   echo "$ac_err" >&5
9103   echo "configure: failed program was:" >&5
9104   cat conftest.$ac_ext >&5
9105   rm -rf conftest*
9106   eval "ac_cv_header_$ac_safe=no"
9107 fi
9108 rm -f conftest*
9109 fi
9110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9111   echo "$ac_t""yes" 1>&6
9112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9113   cat >> confdefs.h <<EOF
9114 #define $ac_tr_hdr 1
9115 EOF
9116  
9117 else
9118   echo "$ac_t""no" 1>&6
9119 fi
9120 done
9121
9122
9123 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9124 echo "configure:9125: checking for uid_t in sys/types.h" >&5
9125 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9126   echo $ac_n "(cached) $ac_c" 1>&6
9127 else
9128   cat > conftest.$ac_ext <<EOF
9129 #line 9130 "configure"
9130 #include "confdefs.h"
9131 #include <sys/types.h>
9132 EOF
9133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9134   egrep "uid_t" >/dev/null 2>&1; then
9135   rm -rf conftest*
9136   ac_cv_type_uid_t=yes
9137 else
9138   rm -rf conftest*
9139   ac_cv_type_uid_t=no
9140 fi
9141 rm -f conftest*
9142
9143 fi
9144
9145 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9146 if test $ac_cv_type_uid_t = no; then
9147   cat >> confdefs.h <<\EOF
9148 #define uid_t int
9149 EOF
9150
9151   cat >> confdefs.h <<\EOF
9152 #define gid_t int
9153 EOF
9154
9155 fi
9156
9157 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9158 echo "configure:9159: checking type of array argument to getgroups" >&5
9159 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   if test "$cross_compiling" = yes; then
9163   ac_cv_type_getgroups=cross
9164 else
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168
9169 /* Thanks to Mike Rendell for this test.  */
9170 #include <sys/types.h>
9171 #define NGID 256
9172 #undef MAX
9173 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9174 main()
9175 {
9176   gid_t gidset[NGID];
9177   int i, n;
9178   union { gid_t gval; long lval; }  val;
9179
9180   val.lval = -1;
9181   for (i = 0; i < NGID; i++)
9182     gidset[i] = val.gval;
9183   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9184                  gidset);
9185   /* Exit non-zero if getgroups seems to require an array of ints.  This
9186      happens when gid_t is short but getgroups modifies an array of ints.  */
9187   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9188 }
9189
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9192 then
9193     ac_cv_type_getgroups=gid_t
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -fr conftest*
9198   ac_cv_type_getgroups=int
9199 fi
9200 rm -fr conftest*
9201 fi
9202
9203 if test $ac_cv_type_getgroups = cross; then
9204         cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207 #include <unistd.h>
9208 EOF
9209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9210   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9211   rm -rf conftest*
9212   ac_cv_type_getgroups=gid_t
9213 else
9214   rm -rf conftest*
9215   ac_cv_type_getgroups=int
9216 fi
9217 rm -f conftest*
9218
9219 fi
9220 fi
9221
9222 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9223 cat >> confdefs.h <<EOF
9224 #define GETGROUPS_T $ac_cv_type_getgroups
9225 EOF
9226
9227  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9228 echo "configure:9229: checking for ANSI C header files" >&5
9229 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235 #include <stdlib.h>
9236 #include <stdarg.h>
9237 #include <string.h>
9238 #include <float.h>
9239 EOF
9240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9241 { (eval echo configure:9242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9243 if test -z "$ac_err"; then
9244   rm -rf conftest*
9245   ac_cv_header_stdc=yes
9246 else
9247   echo "$ac_err" >&5
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   ac_cv_header_stdc=no
9252 fi
9253 rm -f conftest*
9254
9255 if test $ac_cv_header_stdc = yes; then
9256   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9257 cat > conftest.$ac_ext <<EOF
9258 #line 9259 "configure"
9259 #include "confdefs.h"
9260 #include <string.h>
9261 EOF
9262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9263   egrep "memchr" >/dev/null 2>&1; then
9264   :
9265 else
9266   rm -rf conftest*
9267   ac_cv_header_stdc=no
9268 fi
9269 rm -f conftest*
9270
9271 fi
9272
9273 if test $ac_cv_header_stdc = yes; then
9274   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9275 cat > conftest.$ac_ext <<EOF
9276 #line 9277 "configure"
9277 #include "confdefs.h"
9278 #include <stdlib.h>
9279 EOF
9280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9281   egrep "free" >/dev/null 2>&1; then
9282   :
9283 else
9284   rm -rf conftest*
9285   ac_cv_header_stdc=no
9286 fi
9287 rm -f conftest*
9288
9289 fi
9290
9291 if test $ac_cv_header_stdc = yes; then
9292   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9293 if test "$cross_compiling" = yes; then
9294   :
9295 else
9296   cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <ctype.h>
9300 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9301 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9302 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9303 int main () { int i; for (i = 0; i < 256; i++)
9304 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9305 exit (0); }
9306
9307 EOF
9308 if { (eval echo configure:9309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9309 then
9310   :
9311 else
9312   echo "configure: failed program was:" >&5
9313   cat conftest.$ac_ext >&5
9314   rm -fr conftest*
9315   ac_cv_header_stdc=no
9316 fi
9317 rm -fr conftest*
9318 fi
9319
9320 fi
9321 fi
9322
9323 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9324 if test $ac_cv_header_stdc = yes; then
9325   cat >> confdefs.h <<\EOF
9326 #define STDC_HEADERS 1
9327 EOF
9328
9329 fi
9330
9331 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9332 echo "configure:9333: checking for mode_t" >&5
9333 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 #include <sys/types.h>
9340 #if STDC_HEADERS
9341 #include <stdlib.h>
9342 #include <stddef.h>
9343 #endif
9344 EOF
9345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9346   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9347   rm -rf conftest*
9348   ac_cv_type_mode_t=yes
9349 else
9350   rm -rf conftest*
9351   ac_cv_type_mode_t=no
9352 fi
9353 rm -f conftest*
9354
9355 fi
9356 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9357 if test $ac_cv_type_mode_t = no; then
9358   cat >> confdefs.h <<\EOF
9359 #define mode_t int
9360 EOF
9361
9362 fi
9363
9364 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9365 echo "configure:9366: checking for off_t" >&5
9366 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369   cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372 #include <sys/types.h>
9373 #if STDC_HEADERS
9374 #include <stdlib.h>
9375 #include <stddef.h>
9376 #endif
9377 EOF
9378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9379   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9380   rm -rf conftest*
9381   ac_cv_type_off_t=yes
9382 else
9383   rm -rf conftest*
9384   ac_cv_type_off_t=no
9385 fi
9386 rm -f conftest*
9387
9388 fi
9389 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9390 if test $ac_cv_type_off_t = no; then
9391   cat >> confdefs.h <<\EOF
9392 #define off_t long
9393 EOF
9394
9395 fi
9396
9397 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9398 echo "configure:9399: checking for pid_t" >&5
9399 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9400   echo $ac_n "(cached) $ac_c" 1>&6
9401 else
9402   cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 #include <sys/types.h>
9406 #if STDC_HEADERS
9407 #include <stdlib.h>
9408 #include <stddef.h>
9409 #endif
9410 EOF
9411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9412   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9413   rm -rf conftest*
9414   ac_cv_type_pid_t=yes
9415 else
9416   rm -rf conftest*
9417   ac_cv_type_pid_t=no
9418 fi
9419 rm -f conftest*
9420
9421 fi
9422 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9423 if test $ac_cv_type_pid_t = no; then
9424   cat >> confdefs.h <<\EOF
9425 #define pid_t int
9426 EOF
9427
9428 fi
9429
9430 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9431 echo "configure:9432: checking for ptrdiff_t" >&5
9432 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9433   echo $ac_n "(cached) $ac_c" 1>&6
9434 else
9435   cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438 #include <stddef.h>
9439 int main() {
9440 ptrdiff_t p
9441 ; return 0; }
9442 EOF
9443 if { (eval echo configure:9444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9444   rm -rf conftest*
9445   am_cv_type_ptrdiff_t=yes
9446 else
9447   echo "configure: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   rm -rf conftest*
9450   am_cv_type_ptrdiff_t=no
9451 fi
9452 rm -f conftest*
9453 fi
9454
9455 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9456    if test $am_cv_type_ptrdiff_t = yes; then
9457      cat >> confdefs.h <<\EOF
9458 #define HAVE_PTRDIFF_T 1
9459 EOF
9460
9461    fi
9462
9463 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9464 echo "configure:9465: checking return type of signal handlers" >&5
9465 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9466   echo $ac_n "(cached) $ac_c" 1>&6
9467 else
9468   cat > conftest.$ac_ext <<EOF
9469 #line 9470 "configure"
9470 #include "confdefs.h"
9471 #include <sys/types.h>
9472 #include <signal.h>
9473 #ifdef signal
9474 #undef signal
9475 #endif
9476 #ifdef __cplusplus
9477 extern "C" void (*signal (int, void (*)(int)))(int);
9478 #else
9479 void (*signal ()) ();
9480 #endif
9481
9482 int main() {
9483 int i;
9484 ; return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9487   rm -rf conftest*
9488   ac_cv_type_signal=void
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -rf conftest*
9493   ac_cv_type_signal=int
9494 fi
9495 rm -f conftest*
9496 fi
9497
9498 echo "$ac_t""$ac_cv_type_signal" 1>&6
9499 cat >> confdefs.h <<EOF
9500 #define RETSIGTYPE $ac_cv_type_signal
9501 EOF
9502
9503
9504 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9505 echo "configure:9506: checking for sig_atomic_t" >&5
9506 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509   cat > conftest.$ac_ext <<EOF
9510 #line 9511 "configure"
9511 #include "confdefs.h"
9512 #include <signal.h>
9513 int main() {
9514 sig_atomic_t atomic;
9515 ; return 0; }
9516 EOF
9517 if { (eval echo configure:9518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9518   rm -rf conftest*
9519   ol_cv_type_sig_atomic_t=yes
9520 else
9521   echo "configure: failed program was:" >&5
9522   cat conftest.$ac_ext >&5
9523   rm -rf conftest*
9524   ol_cv_type_sig_atomic_t=no
9525 fi
9526 rm -f conftest*
9527 fi
9528
9529 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9530   if test $ol_cv_type_sig_atomic_t = no; then
9531     cat >> confdefs.h <<\EOF
9532 #define sig_atomic_t int
9533 EOF
9534
9535   fi
9536  
9537 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9538 echo "configure:9539: checking for size_t" >&5
9539 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542   cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 #include <sys/types.h>
9546 #if STDC_HEADERS
9547 #include <stdlib.h>
9548 #include <stddef.h>
9549 #endif
9550 EOF
9551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9552   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9553   rm -rf conftest*
9554   ac_cv_type_size_t=yes
9555 else
9556   rm -rf conftest*
9557   ac_cv_type_size_t=no
9558 fi
9559 rm -f conftest*
9560
9561 fi
9562 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9563 if test $ac_cv_type_size_t = no; then
9564   cat >> confdefs.h <<\EOF
9565 #define size_t unsigned
9566 EOF
9567
9568 fi
9569
9570 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9571 echo "configure:9572: checking for st_blksize in struct stat" >&5
9572 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9573   echo $ac_n "(cached) $ac_c" 1>&6
9574 else
9575   cat > conftest.$ac_ext <<EOF
9576 #line 9577 "configure"
9577 #include "confdefs.h"
9578 #include <sys/types.h>
9579 #include <sys/stat.h>
9580 int main() {
9581 struct stat s; s.st_blksize;
9582 ; return 0; }
9583 EOF
9584 if { (eval echo configure:9585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9585   rm -rf conftest*
9586   ac_cv_struct_st_blksize=yes
9587 else
9588   echo "configure: failed program was:" >&5
9589   cat conftest.$ac_ext >&5
9590   rm -rf conftest*
9591   ac_cv_struct_st_blksize=no
9592 fi
9593 rm -f conftest*
9594 fi
9595
9596 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9597 if test $ac_cv_struct_st_blksize = yes; then
9598   cat >> confdefs.h <<\EOF
9599 #define HAVE_ST_BLKSIZE 1
9600 EOF
9601
9602 fi
9603
9604 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9605 echo "configure:9606: checking whether time.h and sys/time.h may both be included" >&5
9606 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9607   echo $ac_n "(cached) $ac_c" 1>&6
9608 else
9609   cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 #include <sys/types.h>
9613 #include <sys/time.h>
9614 #include <time.h>
9615 int main() {
9616 struct tm *tp;
9617 ; return 0; }
9618 EOF
9619 if { (eval echo configure:9620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9620   rm -rf conftest*
9621   ac_cv_header_time=yes
9622 else
9623   echo "configure: failed program was:" >&5
9624   cat conftest.$ac_ext >&5
9625   rm -rf conftest*
9626   ac_cv_header_time=no
9627 fi
9628 rm -f conftest*
9629 fi
9630
9631 echo "$ac_t""$ac_cv_header_time" 1>&6
9632 if test $ac_cv_header_time = yes; then
9633   cat >> confdefs.h <<\EOF
9634 #define TIME_WITH_SYS_TIME 1
9635 EOF
9636
9637 fi
9638
9639 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9640 echo "configure:9641: checking whether struct tm is in sys/time.h or time.h" >&5
9641 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9642   echo $ac_n "(cached) $ac_c" 1>&6
9643 else
9644   cat > conftest.$ac_ext <<EOF
9645 #line 9646 "configure"
9646 #include "confdefs.h"
9647 #include <sys/types.h>
9648 #include <time.h>
9649 int main() {
9650 struct tm *tp; tp->tm_sec;
9651 ; return 0; }
9652 EOF
9653 if { (eval echo configure:9654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9654   rm -rf conftest*
9655   ac_cv_struct_tm=time.h
9656 else
9657   echo "configure: failed program was:" >&5
9658   cat conftest.$ac_ext >&5
9659   rm -rf conftest*
9660   ac_cv_struct_tm=sys/time.h
9661 fi
9662 rm -f conftest*
9663 fi
9664
9665 echo "$ac_t""$ac_cv_struct_tm" 1>&6
9666 if test $ac_cv_struct_tm = sys/time.h; then
9667   cat >> confdefs.h <<\EOF
9668 #define TM_IN_SYS_TIME 1
9669 EOF
9670
9671 fi
9672
9673 # test for pw_gecos in struct passwd
9674 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
9675 echo "configure:9676: checking struct passwd for pw_gecos" >&5
9676 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
9677   echo $ac_n "(cached) $ac_c" 1>&6
9678 else
9679   
9680         cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683 #include <pwd.h>
9684 int main() {
9685
9686         struct passwd pwd;
9687         pwd.pw_gecos = pwd.pw_name;
9688
9689 ; return 0; }
9690 EOF
9691 if { (eval echo configure:9692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9692   rm -rf conftest*
9693   ol_cv_struct_passwd_pw_gecos=yes
9694 else
9695   echo "configure: failed program was:" >&5
9696   cat conftest.$ac_ext >&5
9697   rm -rf conftest*
9698   ol_cv_struct_passwd_pw_gecos=no
9699 fi
9700 rm -f conftest*
9701 fi
9702
9703 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
9704 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
9705         cat >> confdefs.h <<\EOF
9706 #define HAVE_PW_GECOS 1
9707 EOF
9708
9709 fi
9710
9711
9712
9713 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
9714 echo "configure:9715: checking if toupper() requires islower()" >&5
9715 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   
9719         if test "$cross_compiling" = yes; then
9720   ol_cv_c_upper_lower=safe
9721 else
9722   cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725
9726 #include <ctype.h>
9727 main()
9728 {
9729         if ('C' == toupper('C'))
9730                 exit(0);
9731         else
9732                 exit(1);
9733 }
9734 EOF
9735 if { (eval echo configure:9736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9736 then
9737   ol_cv_c_upper_lower=no
9738 else
9739   echo "configure: failed program was:" >&5
9740   cat conftest.$ac_ext >&5
9741   rm -fr conftest*
9742   ol_cv_c_upper_lower=yes
9743 fi
9744 rm -fr conftest*
9745 fi
9746
9747 fi
9748
9749 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
9750 if test $ol_cv_c_upper_lower != no ; then
9751         cat >> confdefs.h <<\EOF
9752 #define C_UPPER_LOWER 1
9753 EOF
9754
9755 fi
9756
9757 echo $ac_n "checking for working const""... $ac_c" 1>&6
9758 echo "configure:9759: checking for working const" >&5
9759 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
9760   echo $ac_n "(cached) $ac_c" 1>&6
9761 else
9762   cat > conftest.$ac_ext <<EOF
9763 #line 9764 "configure"
9764 #include "confdefs.h"
9765
9766 int main() {
9767
9768 /* Ultrix mips cc rejects this.  */
9769 typedef int charset[2]; const charset x;
9770 /* SunOS 4.1.1 cc rejects this.  */
9771 char const *const *ccp;
9772 char **p;
9773 /* NEC SVR4.0.2 mips cc rejects this.  */
9774 struct point {int x, y;};
9775 static struct point const zero = {0,0};
9776 /* AIX XL C 1.02.0.0 rejects this.
9777    It does not let you subtract one const X* pointer from another in an arm
9778    of an if-expression whose if-part is not a constant expression */
9779 const char *g = "string";
9780 ccp = &g + (g ? g-g : 0);
9781 /* HPUX 7.0 cc rejects these. */
9782 ++ccp;
9783 p = (char**) ccp;
9784 ccp = (char const *const *) p;
9785 { /* SCO 3.2v4 cc rejects this.  */
9786   char *t;
9787   char const *s = 0 ? (char *) 0 : (char const *) 0;
9788
9789   *t++ = 0;
9790 }
9791 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9792   int x[] = {25, 17};
9793   const int *foo = &x[0];
9794   ++foo;
9795 }
9796 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9797   typedef const int *iptr;
9798   iptr p = 0;
9799   ++p;
9800 }
9801 { /* AIX XL C 1.02.0.0 rejects this saying
9802      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9803   struct s { int j; const int *ap[3]; };
9804   struct s *b; b->j = 5;
9805 }
9806 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9807   const int foo = 10;
9808 }
9809
9810 ; return 0; }
9811 EOF
9812 if { (eval echo configure:9813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9813   rm -rf conftest*
9814   ac_cv_c_const=yes
9815 else
9816   echo "configure: failed program was:" >&5
9817   cat conftest.$ac_ext >&5
9818   rm -rf conftest*
9819   ac_cv_c_const=no
9820 fi
9821 rm -f conftest*
9822 fi
9823
9824 echo "$ac_t""$ac_cv_c_const" 1>&6
9825 if test $ac_cv_c_const = no; then
9826   cat >> confdefs.h <<\EOF
9827 #define const 
9828 EOF
9829
9830 fi
9831
9832 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
9833 echo "configure:9834: checking if compiler understands volatile" >&5
9834 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
9835   echo $ac_n "(cached) $ac_c" 1>&6
9836 else
9837   cat > conftest.$ac_ext <<EOF
9838 #line 9839 "configure"
9839 #include "confdefs.h"
9840 int x, y, z;
9841 int main() {
9842 volatile int a; int * volatile b = x ? &y : &z;
9843       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
9844       *b = 0;
9845 ; return 0; }
9846 EOF
9847 if { (eval echo configure:9848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9848   rm -rf conftest*
9849   ol_cv_c_volatile=yes
9850 else
9851   echo "configure: failed program was:" >&5
9852   cat conftest.$ac_ext >&5
9853   rm -rf conftest*
9854   ol_cv_c_volatile=no
9855 fi
9856 rm -f conftest*
9857 fi
9858
9859 echo "$ac_t""$ol_cv_c_volatile" 1>&6
9860   if test $ol_cv_c_volatile = yes; then
9861     : 
9862   else
9863     cat >> confdefs.h <<\EOF
9864 #define volatile 
9865 EOF
9866
9867   fi
9868  
9869
9870 if test $cross_compiling = yes ; then
9871         cat >> confdefs.h <<\EOF
9872 #define CROSS_COMPILING 1
9873 EOF
9874
9875 else
9876         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
9877 echo "configure:9878: checking whether byte ordering is bigendian" >&5
9878 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
9879   echo $ac_n "(cached) $ac_c" 1>&6
9880 else
9881   ac_cv_c_bigendian=unknown
9882 # See if sys/param.h defines the BYTE_ORDER macro.
9883 cat > conftest.$ac_ext <<EOF
9884 #line 9885 "configure"
9885 #include "confdefs.h"
9886 #include <sys/types.h>
9887 #include <sys/param.h>
9888 int main() {
9889
9890 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9891  bogus endian macros
9892 #endif
9893 ; return 0; }
9894 EOF
9895 if { (eval echo configure:9896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9896   rm -rf conftest*
9897   # It does; now see whether it defined to BIG_ENDIAN or not.
9898 cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 #include <sys/types.h>
9902 #include <sys/param.h>
9903 int main() {
9904
9905 #if BYTE_ORDER != BIG_ENDIAN
9906  not big endian
9907 #endif
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9911   rm -rf conftest*
9912   ac_cv_c_bigendian=yes
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   ac_cv_c_bigendian=no
9918 fi
9919 rm -f conftest*
9920 else
9921   echo "configure: failed program was:" >&5
9922   cat conftest.$ac_ext >&5
9923 fi
9924 rm -f conftest*
9925 if test $ac_cv_c_bigendian = unknown; then
9926 if test "$cross_compiling" = yes; then
9927     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9928 else
9929   cat > conftest.$ac_ext <<EOF
9930 #line 9931 "configure"
9931 #include "confdefs.h"
9932 main () {
9933   /* Are we little or big endian?  From Harbison&Steele.  */
9934   union
9935   {
9936     long l;
9937     char c[sizeof (long)];
9938   } u;
9939   u.l = 1;
9940   exit (u.c[sizeof (long) - 1] == 1);
9941 }
9942 EOF
9943 if { (eval echo configure:9944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9944 then
9945   ac_cv_c_bigendian=no
9946 else
9947   echo "configure: failed program was:" >&5
9948   cat conftest.$ac_ext >&5
9949   rm -fr conftest*
9950   ac_cv_c_bigendian=yes
9951 fi
9952 rm -fr conftest*
9953 fi
9954
9955 fi
9956 fi
9957
9958 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
9959 if test $ac_cv_c_bigendian = yes; then
9960   cat >> confdefs.h <<\EOF
9961 #define WORDS_BIGENDIAN 1
9962 EOF
9963
9964 fi
9965
9966         echo $ac_n "checking size of short""... $ac_c" 1>&6
9967 echo "configure:9968: checking size of short" >&5
9968 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
9969   echo $ac_n "(cached) $ac_c" 1>&6
9970 else
9971   if test "$cross_compiling" = yes; then
9972     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 #include <stdio.h>
9978 main()
9979 {
9980   FILE *f=fopen("conftestval", "w");
9981   if (!f) exit(1);
9982   fprintf(f, "%d\n", sizeof(short));
9983   exit(0);
9984 }
9985 EOF
9986 if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9987 then
9988   ac_cv_sizeof_short=`cat conftestval`
9989 else
9990   echo "configure: failed program was:" >&5
9991   cat conftest.$ac_ext >&5
9992   rm -fr conftest*
9993   ac_cv_sizeof_short=0
9994 fi
9995 rm -fr conftest*
9996 fi
9997
9998 fi
9999 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10000 cat >> confdefs.h <<EOF
10001 #define SIZEOF_SHORT $ac_cv_sizeof_short
10002 EOF
10003
10004  
10005         echo $ac_n "checking size of int""... $ac_c" 1>&6
10006 echo "configure:10007: checking size of int" >&5
10007 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10008   echo $ac_n "(cached) $ac_c" 1>&6
10009 else
10010   if test "$cross_compiling" = yes; then
10011     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10012 else
10013   cat > conftest.$ac_ext <<EOF
10014 #line 10015 "configure"
10015 #include "confdefs.h"
10016 #include <stdio.h>
10017 main()
10018 {
10019   FILE *f=fopen("conftestval", "w");
10020   if (!f) exit(1);
10021   fprintf(f, "%d\n", sizeof(int));
10022   exit(0);
10023 }
10024 EOF
10025 if { (eval echo configure:10026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10026 then
10027   ac_cv_sizeof_int=`cat conftestval`
10028 else
10029   echo "configure: failed program was:" >&5
10030   cat conftest.$ac_ext >&5
10031   rm -fr conftest*
10032   ac_cv_sizeof_int=0
10033 fi
10034 rm -fr conftest*
10035 fi
10036
10037 fi
10038 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10039 cat >> confdefs.h <<EOF
10040 #define SIZEOF_INT $ac_cv_sizeof_int
10041 EOF
10042
10043  
10044         echo $ac_n "checking size of long""... $ac_c" 1>&6
10045 echo "configure:10046: checking size of long" >&5
10046 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10047   echo $ac_n "(cached) $ac_c" 1>&6
10048 else
10049   if test "$cross_compiling" = yes; then
10050     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10051 else
10052   cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 #include <stdio.h>
10056 main()
10057 {
10058   FILE *f=fopen("conftestval", "w");
10059   if (!f) exit(1);
10060   fprintf(f, "%d\n", sizeof(long));
10061   exit(0);
10062 }
10063 EOF
10064 if { (eval echo configure:10065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10065 then
10066   ac_cv_sizeof_long=`cat conftestval`
10067 else
10068   echo "configure: failed program was:" >&5
10069   cat conftest.$ac_ext >&5
10070   rm -fr conftest*
10071   ac_cv_sizeof_long=0
10072 fi
10073 rm -fr conftest*
10074 fi
10075
10076 fi
10077 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10078 cat >> confdefs.h <<EOF
10079 #define SIZEOF_LONG $ac_cv_sizeof_long
10080 EOF
10081
10082
10083 fi
10084
10085 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10086 echo "configure:10087: checking for 8-bit clean memcmp" >&5
10087 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10088   echo $ac_n "(cached) $ac_c" 1>&6
10089 else
10090   if test "$cross_compiling" = yes; then
10091   ac_cv_func_memcmp_clean=no
10092 else
10093   cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096
10097 main()
10098 {
10099   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10100   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10101 }
10102
10103 EOF
10104 if { (eval echo configure:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10105 then
10106   ac_cv_func_memcmp_clean=yes
10107 else
10108   echo "configure: failed program was:" >&5
10109   cat conftest.$ac_ext >&5
10110   rm -fr conftest*
10111   ac_cv_func_memcmp_clean=no
10112 fi
10113 rm -fr conftest*
10114 fi
10115
10116 fi
10117
10118 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10119 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10120
10121 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10122 echo "configure:10123: checking for strftime" >&5
10123 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   cat > conftest.$ac_ext <<EOF
10127 #line 10128 "configure"
10128 #include "confdefs.h"
10129 /* System header to define __stub macros and hopefully few prototypes,
10130     which can conflict with char strftime(); below.  */
10131 #include <assert.h>
10132 /* Override any gcc2 internal prototype to avoid an error.  */
10133 /* We use char because int might match the return type of a gcc2
10134     builtin and then its argument prototype would still apply.  */
10135 char strftime();
10136
10137 int main() {
10138
10139 /* The GNU C library defines this for functions which it implements
10140     to always fail with ENOSYS.  Some functions are actually named
10141     something starting with __ and the normal name is an alias.  */
10142 #if defined (__stub_strftime) || defined (__stub___strftime)
10143 choke me
10144 #else
10145 strftime();
10146 #endif
10147
10148 ; return 0; }
10149 EOF
10150 if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10151   rm -rf conftest*
10152   eval "ac_cv_func_strftime=yes"
10153 else
10154   echo "configure: failed program was:" >&5
10155   cat conftest.$ac_ext >&5
10156   rm -rf conftest*
10157   eval "ac_cv_func_strftime=no"
10158 fi
10159 rm -f conftest*
10160 fi
10161
10162 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10163   echo "$ac_t""yes" 1>&6
10164   cat >> confdefs.h <<\EOF
10165 #define HAVE_STRFTIME 1
10166 EOF
10167
10168 else
10169   echo "$ac_t""no" 1>&6
10170 # strftime is in -lintl on SCO UNIX.
10171 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10172 echo "configure:10173: checking for strftime in -lintl" >&5
10173 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10175   echo $ac_n "(cached) $ac_c" 1>&6
10176 else
10177   ac_save_LIBS="$LIBS"
10178 LIBS="-lintl  $LIBS"
10179 cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182 /* Override any gcc2 internal prototype to avoid an error.  */
10183 /* We use char because int might match the return type of a gcc2
10184     builtin and then its argument prototype would still apply.  */
10185 char strftime();
10186
10187 int main() {
10188 strftime()
10189 ; return 0; }
10190 EOF
10191 if { (eval echo configure:10192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10192   rm -rf conftest*
10193   eval "ac_cv_lib_$ac_lib_var=yes"
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -rf conftest*
10198   eval "ac_cv_lib_$ac_lib_var=no"
10199 fi
10200 rm -f conftest*
10201 LIBS="$ac_save_LIBS"
10202
10203 fi
10204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10205   echo "$ac_t""yes" 1>&6
10206   cat >> confdefs.h <<\EOF
10207 #define HAVE_STRFTIME 1
10208 EOF
10209
10210 LIBS="-lintl $LIBS"
10211 else
10212   echo "$ac_t""no" 1>&6
10213 fi
10214
10215 fi
10216
10217 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10218 echo "configure:10219: checking for vprintf" >&5
10219 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10220   echo $ac_n "(cached) $ac_c" 1>&6
10221 else
10222   cat > conftest.$ac_ext <<EOF
10223 #line 10224 "configure"
10224 #include "confdefs.h"
10225 /* System header to define __stub macros and hopefully few prototypes,
10226     which can conflict with char vprintf(); below.  */
10227 #include <assert.h>
10228 /* Override any gcc2 internal prototype to avoid an error.  */
10229 /* We use char because int might match the return type of a gcc2
10230     builtin and then its argument prototype would still apply.  */
10231 char vprintf();
10232
10233 int main() {
10234
10235 /* The GNU C library defines this for functions which it implements
10236     to always fail with ENOSYS.  Some functions are actually named
10237     something starting with __ and the normal name is an alias.  */
10238 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10239 choke me
10240 #else
10241 vprintf();
10242 #endif
10243
10244 ; return 0; }
10245 EOF
10246 if { (eval echo configure:10247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10247   rm -rf conftest*
10248   eval "ac_cv_func_vprintf=yes"
10249 else
10250   echo "configure: failed program was:" >&5
10251   cat conftest.$ac_ext >&5
10252   rm -rf conftest*
10253   eval "ac_cv_func_vprintf=no"
10254 fi
10255 rm -f conftest*
10256 fi
10257
10258 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10259   echo "$ac_t""yes" 1>&6
10260   cat >> confdefs.h <<\EOF
10261 #define HAVE_VPRINTF 1
10262 EOF
10263
10264 else
10265   echo "$ac_t""no" 1>&6
10266 fi
10267
10268 if test "$ac_cv_func_vprintf" != yes; then
10269 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10270 echo "configure:10271: checking for _doprnt" >&5
10271 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10272   echo $ac_n "(cached) $ac_c" 1>&6
10273 else
10274   cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277 /* System header to define __stub macros and hopefully few prototypes,
10278     which can conflict with char _doprnt(); below.  */
10279 #include <assert.h>
10280 /* Override any gcc2 internal prototype to avoid an error.  */
10281 /* We use char because int might match the return type of a gcc2
10282     builtin and then its argument prototype would still apply.  */
10283 char _doprnt();
10284
10285 int main() {
10286
10287 /* The GNU C library defines this for functions which it implements
10288     to always fail with ENOSYS.  Some functions are actually named
10289     something starting with __ and the normal name is an alias.  */
10290 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10291 choke me
10292 #else
10293 _doprnt();
10294 #endif
10295
10296 ; return 0; }
10297 EOF
10298 if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10299   rm -rf conftest*
10300   eval "ac_cv_func__doprnt=yes"
10301 else
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   eval "ac_cv_func__doprnt=no"
10306 fi
10307 rm -f conftest*
10308 fi
10309
10310 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10311   echo "$ac_t""yes" 1>&6
10312   cat >> confdefs.h <<\EOF
10313 #define HAVE_DOPRNT 1
10314 EOF
10315
10316 else
10317   echo "$ac_t""no" 1>&6
10318 fi
10319
10320 fi
10321
10322
10323 if test $ac_cv_func_vprintf = yes ; then
10324                 for ac_func in vsnprintf vsprintf
10325 do
10326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10327 echo "configure:10328: checking for $ac_func" >&5
10328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10329   echo $ac_n "(cached) $ac_c" 1>&6
10330 else
10331   cat > conftest.$ac_ext <<EOF
10332 #line 10333 "configure"
10333 #include "confdefs.h"
10334 /* System header to define __stub macros and hopefully few prototypes,
10335     which can conflict with char $ac_func(); below.  */
10336 #include <assert.h>
10337 /* Override any gcc2 internal prototype to avoid an error.  */
10338 /* We use char because int might match the return type of a gcc2
10339     builtin and then its argument prototype would still apply.  */
10340 char $ac_func();
10341
10342 int main() {
10343
10344 /* The GNU C library defines this for functions which it implements
10345     to always fail with ENOSYS.  Some functions are actually named
10346     something starting with __ and the normal name is an alias.  */
10347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10348 choke me
10349 #else
10350 $ac_func();
10351 #endif
10352
10353 ; return 0; }
10354 EOF
10355 if { (eval echo configure:10356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10356   rm -rf conftest*
10357   eval "ac_cv_func_$ac_func=yes"
10358 else
10359   echo "configure: failed program was:" >&5
10360   cat conftest.$ac_ext >&5
10361   rm -rf conftest*
10362   eval "ac_cv_func_$ac_func=no"
10363 fi
10364 rm -f conftest*
10365 fi
10366
10367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10368   echo "$ac_t""yes" 1>&6
10369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10370   cat >> confdefs.h <<EOF
10371 #define $ac_tr_func 1
10372 EOF
10373  
10374 else
10375   echo "$ac_t""no" 1>&6
10376 fi
10377 done
10378
10379 fi
10380
10381 for ac_func in \
10382         bcopy                   \
10383         endgrent                \
10384         endpwent                \
10385         flock                   \
10386         getdtablesize           \
10387         getgrgid                \
10388         gethostname             \
10389         getpass                 \
10390         getpwuid                \
10391         gettimeofday            \
10392         lockf                   \
10393         memcpy                  \
10394         memmove                 \
10395         mkstemp                 \
10396         recv                    \
10397         recvfrom                \
10398         setpwfile               \
10399         setsid                  \
10400         signal                  \
10401         sigset                  \
10402         snprintf                \
10403         socket                  \
10404         strdup                  \
10405         strerror                \
10406         strpbrk                 \
10407         strrchr                 \
10408         strsep                  \
10409         strstr                  \
10410         strtol                  \
10411         strtoul                 \
10412         strspn                  \
10413         sysconf                 \
10414         waitpid                 \
10415         wait4                   \
10416
10417 do
10418 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10419 echo "configure:10420: checking for $ac_func" >&5
10420 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 /* System header to define __stub macros and hopefully few prototypes,
10427     which can conflict with char $ac_func(); below.  */
10428 #include <assert.h>
10429 /* Override any gcc2 internal prototype to avoid an error.  */
10430 /* We use char because int might match the return type of a gcc2
10431     builtin and then its argument prototype would still apply.  */
10432 char $ac_func();
10433
10434 int main() {
10435
10436 /* The GNU C library defines this for functions which it implements
10437     to always fail with ENOSYS.  Some functions are actually named
10438     something starting with __ and the normal name is an alias.  */
10439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10440 choke me
10441 #else
10442 $ac_func();
10443 #endif
10444
10445 ; return 0; }
10446 EOF
10447 if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10448   rm -rf conftest*
10449   eval "ac_cv_func_$ac_func=yes"
10450 else
10451   echo "configure: failed program was:" >&5
10452   cat conftest.$ac_ext >&5
10453   rm -rf conftest*
10454   eval "ac_cv_func_$ac_func=no"
10455 fi
10456 rm -f conftest*
10457 fi
10458
10459 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10460   echo "$ac_t""yes" 1>&6
10461     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10462   cat >> confdefs.h <<EOF
10463 #define $ac_tr_func 1
10464 EOF
10465  
10466 else
10467   echo "$ac_t""no" 1>&6
10468 fi
10469 done
10470
10471
10472 for ac_func in getopt tempnam
10473 do
10474 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10475 echo "configure:10476: checking for $ac_func" >&5
10476 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10477   echo $ac_n "(cached) $ac_c" 1>&6
10478 else
10479   cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482 /* System header to define __stub macros and hopefully few prototypes,
10483     which can conflict with char $ac_func(); below.  */
10484 #include <assert.h>
10485 /* Override any gcc2 internal prototype to avoid an error.  */
10486 /* We use char because int might match the return type of a gcc2
10487     builtin and then its argument prototype would still apply.  */
10488 char $ac_func();
10489
10490 int main() {
10491
10492 /* The GNU C library defines this for functions which it implements
10493     to always fail with ENOSYS.  Some functions are actually named
10494     something starting with __ and the normal name is an alias.  */
10495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10496 choke me
10497 #else
10498 $ac_func();
10499 #endif
10500
10501 ; return 0; }
10502 EOF
10503 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10504   rm -rf conftest*
10505   eval "ac_cv_func_$ac_func=yes"
10506 else
10507   echo "configure: failed program was:" >&5
10508   cat conftest.$ac_ext >&5
10509   rm -rf conftest*
10510   eval "ac_cv_func_$ac_func=no"
10511 fi
10512 rm -f conftest*
10513 fi
10514
10515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10516   echo "$ac_t""yes" 1>&6
10517     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10518   cat >> confdefs.h <<EOF
10519 #define $ac_tr_func 1
10520 EOF
10521  
10522 else
10523   echo "$ac_t""no" 1>&6
10524 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10525 fi
10526 done
10527
10528
10529
10530 # Check Configuration
10531
10532 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10533 echo "configure:10534: checking declaration of sys_errlist" >&5
10534 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10535   echo $ac_n "(cached) $ac_c" 1>&6
10536 else
10537   
10538         cat > conftest.$ac_ext <<EOF
10539 #line 10540 "configure"
10540 #include "confdefs.h"
10541
10542 #include <stdio.h>
10543 #include <sys/types.h>
10544 #include <errno.h> 
10545 int main() {
10546 char *c = (char *) *sys_errlist
10547 ; return 0; }
10548 EOF
10549 if { (eval echo configure:10550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10550   rm -rf conftest*
10551   ol_cv_dcl_sys_errlist=yes
10552 else
10553   echo "configure: failed program was:" >&5
10554   cat conftest.$ac_ext >&5
10555   rm -rf conftest*
10556   ol_cv_dcl_sys_errlist=no
10557 fi
10558 rm -f conftest*
10559 fi
10560
10561 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10562 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10563 if test $ol_cv_dcl_sys_errlist = no ; then
10564         cat >> confdefs.h <<\EOF
10565 #define DECL_SYS_ERRLIST 1
10566 EOF
10567
10568         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10569 echo "configure:10570: checking existence of sys_errlist" >&5
10570         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10571   echo $ac_n "(cached) $ac_c" 1>&6
10572 else
10573   
10574                 cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577 #include <errno.h>
10578 int main() {
10579 char *c = (char *) *sys_errlist
10580 ; return 0; }
10581 EOF
10582 if { (eval echo configure:10583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10583   rm -rf conftest*
10584   ol_cv_have_sys_errlist=yes
10585 else
10586   echo "configure: failed program was:" >&5
10587   cat conftest.$ac_ext >&5
10588   rm -rf conftest*
10589   ol_cv_have_sys_errlist=no
10590 fi
10591 rm -f conftest*
10592 fi
10593
10594         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10595         if test $ol_cv_have_sys_errlist = yes ; then
10596                 cat >> confdefs.h <<\EOF
10597 #define HAVE_SYS_ERRLIST 1
10598 EOF
10599
10600         fi
10601 fi
10602
10603
10604
10605 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10606 echo "configure:10607: checking strdup declaration" >&5
10607 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   
10611         cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614
10615 #include <string.h> 
10616 int main() {
10617 extern char *strdup();
10618 ; return 0; }
10619 EOF
10620 if { (eval echo configure:10621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10621   rm -rf conftest*
10622   ol_cv_dcl_strdup=yes
10623 else
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   ol_cv_dcl_strdup=no
10628 fi
10629 rm -f conftest*
10630 fi
10631
10632 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
10633 if test $ol_cv_dcl_strdup = yes ; then
10634         cat >> confdefs.h <<\EOF
10635 #define DECL_STRDUP 1
10636 EOF
10637
10638 fi
10639
10640
10641
10642 if test "$ol_enable_debug" != no ; then
10643         cat >> confdefs.h <<\EOF
10644 #define LDAP_DEBUG 1
10645 EOF
10646
10647 fi
10648 if test "$ol_enable_syslog" = yes ; then
10649         cat >> confdefs.h <<\EOF
10650 #define LDAP_SYSLOG 1
10651 EOF
10652
10653 fi
10654 if test "$ol_enable_libui" = yes ; then
10655         cat >> confdefs.h <<\EOF
10656 #define LDAP_LIBUI 1
10657 EOF
10658
10659 fi
10660 if test "$ol_enable_cache" = no ; then
10661         cat >> confdefs.h <<\EOF
10662 #define LDAP_NOCACHE 1
10663 EOF
10664
10665 fi
10666 if test "$ol_enable_dns" != no ; then
10667         cat >> confdefs.h <<\EOF
10668 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
10669 EOF
10670
10671 fi
10672 if test "$ol_enable_proctitle" != no ; then
10673         cat >> confdefs.h <<\EOF
10674 #define LDAP_PROCTITLE 1
10675 EOF
10676
10677 fi
10678 if test "$ol_enable_referrals" != no ; then
10679         cat >> confdefs.h <<\EOF
10680 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
10681 EOF
10682
10683 fi
10684 if test "$ol_enable_cldap" != no ; then
10685         cat >> confdefs.h <<\EOF
10686 #define LDAP_CONNECTIONLESS 1
10687 EOF
10688
10689 fi
10690
10691 if test "$ol_enable_aclgroups" != no ; then
10692         cat >> confdefs.h <<\EOF
10693 #define SLAPD_ACLGROUPS 1
10694 EOF
10695
10696 fi
10697 if test "$ol_enable_crypt" != no ; then
10698         cat >> confdefs.h <<\EOF
10699 #define SLAPD_CRYPT 1
10700 EOF
10701
10702 fi
10703 if test "$ol_enable_cleartext" != no ; then
10704         cat >> confdefs.h <<\EOF
10705 #define SLAPD_CLEARTEXT 1
10706 EOF
10707
10708 fi
10709 if test "$ol_enable_phonetic" != no ; then
10710         cat >> confdefs.h <<\EOF
10711 #define SLAPD_PHONETIC 1
10712 EOF
10713
10714 fi
10715 if test "$ol_enable_rlookups" != no ; then
10716         cat >> confdefs.h <<\EOF
10717 #define SLAPD_RLOOKUPS 1
10718 EOF
10719
10720 fi
10721
10722 if test "$ol_link_bdb2" != no ; then
10723         cat >> confdefs.h <<\EOF
10724 #define SLAPD_BDB2 1
10725 EOF
10726
10727         BUILD_SLAPD=yes
10728         BUILD_BDB2=yes
10729 fi
10730
10731 if test "$ol_link_ldbm" != no ; then
10732         cat >> confdefs.h <<\EOF
10733 #define SLAPD_LDBM 1
10734 EOF
10735
10736         BUILD_SLAPD=yes
10737         BUILD_LDBM=yes
10738 fi
10739
10740 if test "$ol_enable_passwd" != no ; then
10741         cat >> confdefs.h <<\EOF
10742 #define SLAPD_PASSWD 1
10743 EOF
10744
10745         BUILD_SLAPD=yes
10746         BUILD_PASSWD=yes
10747 fi
10748
10749 if test "$ol_enable_perl" != no ; then
10750         cat >> confdefs.h <<\EOF
10751 #define SLAPD_PERL 1
10752 EOF
10753
10754         BUILD_SLAPD=yes
10755         BUILD_PERL=yes
10756 fi
10757
10758 if test "$ol_enable_shell" != no ; then
10759         cat >> confdefs.h <<\EOF
10760 #define SLAPD_SHELL 1
10761 EOF
10762
10763         BUILD_SLAPD=yes
10764         BUILD_SHELL=yes
10765 fi
10766
10767 if test "$ol_enable_tcl" != no ; then
10768         cat >> confdefs.h <<\EOF
10769 #define SLAPD_TCL 1
10770 EOF
10771
10772         BUILD_SLAPD=yes
10773         BUILD_TCL=yes
10774 fi
10775
10776 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
10777         $BUILD_SLAPD = yes ; then
10778         BUILD_SLURPD=yes
10779 fi
10780
10781 if test "$ol_link_isode" != no ; then
10782         BUILD_LDAPD=yes
10783 fi
10784
10785
10786
10787
10788   
10789   
10790   
10791   
10792   
10793   
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813 trap '' 1 2 15
10814 cat > confcache <<\EOF
10815 # This file is a shell script that caches the results of configure
10816 # tests run on this system so they can be shared between configure
10817 # scripts and configure runs.  It is not useful on other systems.
10818 # If it contains results you don't want to keep, you may remove or edit it.
10819 #
10820 # By default, configure uses ./config.cache as the cache file,
10821 # creating it if it does not exist already.  You can give configure
10822 # the --cache-file=FILE option to use a different cache file; that is
10823 # what configure does when it calls configure scripts in
10824 # subdirectories, so they share the cache.
10825 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10826 # config.status only pays attention to the cache file if you give it the
10827 # --recheck option to rerun configure.
10828 #
10829 EOF
10830 # The following way of writing the cache mishandles newlines in values,
10831 # but we know of no workaround that is simple, portable, and efficient.
10832 # So, don't put newlines in cache variables' values.
10833 # Ultrix sh set writes to stderr and can't be redirected directly,
10834 # and sets the high bit in the cache file unless we assign to the vars.
10835 (set) 2>&1 |
10836   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10837   *ac_space=\ *)
10838     # `set' does not quote correctly, so add quotes (double-quote substitution
10839     # turns \\\\ into \\, and sed turns \\ into \).
10840     sed -n \
10841       -e "s/'/'\\\\''/g" \
10842       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10843     ;;
10844   *)
10845     # `set' quotes correctly as required by POSIX, so do not add quotes.
10846     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10847     ;;
10848   esac >> confcache
10849 if cmp -s $cache_file confcache; then
10850   :
10851 else
10852   if test -w $cache_file; then
10853     echo "updating cache $cache_file"
10854     cat confcache > $cache_file
10855   else
10856     echo "not updating unwritable cache $cache_file"
10857   fi
10858 fi
10859 rm -f confcache
10860
10861 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10862
10863 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10864 # Let make expand exec_prefix.
10865 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10866
10867 # Any assignment to VPATH causes Sun make to only execute
10868 # the first set of double-colon rules, so remove it if not needed.
10869 # If there is a colon in the path, we need to keep it.
10870 if test "x$srcdir" = x.; then
10871   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10872 fi
10873
10874 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10875
10876 DEFS=-DHAVE_CONFIG_H
10877
10878 # Without the "./", some shells look in PATH for config.status.
10879 : ${CONFIG_STATUS=./config.status}
10880
10881 echo creating $CONFIG_STATUS
10882 rm -f $CONFIG_STATUS
10883 cat > $CONFIG_STATUS <<EOF
10884 #! /bin/sh
10885 # Generated automatically by configure.
10886 # Run this file to recreate the current configuration.
10887 # This directory was configured as follows,
10888 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10889 #
10890 # $0 $ac_configure_args
10891 #
10892 # Compiler output produced by configure, useful for debugging
10893 # configure, is in ./config.log if it exists.
10894
10895 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10896 for ac_option
10897 do
10898   case "\$ac_option" in
10899   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10900     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10901     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10902   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10903     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10904     exit 0 ;;
10905   -help | --help | --hel | --he | --h)
10906     echo "\$ac_cs_usage"; exit 0 ;;
10907   *) echo "\$ac_cs_usage"; exit 1 ;;
10908   esac
10909 done
10910
10911 ac_given_srcdir=$srcdir
10912 ac_given_INSTALL="$INSTALL"
10913
10914 trap 'rm -fr `echo "\
10915 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10916 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10917 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10918 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10919 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10920 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10921 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10922 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10923 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10924 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10925 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10926 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10927 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10928 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10929 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10930 include/Makefile:build/top.mk:include/Makefile.in \
10931 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10932 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10933 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10934 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10935 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10936 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10937 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10938 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10939 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10940 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10941 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10942 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10943 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10944 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10945 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10946 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10947 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10948 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10949 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10950 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10951 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10952 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10953 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10954 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10955 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
10956  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10957 EOF
10958 cat >> $CONFIG_STATUS <<EOF
10959
10960 # Protect against being on the right side of a sed subst in config.status.
10961 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10962  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10963 $ac_vpsub
10964 $extrasub
10965 s%@SHELL@%$SHELL%g
10966 s%@CFLAGS@%$CFLAGS%g
10967 s%@CPPFLAGS@%$CPPFLAGS%g
10968 s%@CXXFLAGS@%$CXXFLAGS%g
10969 s%@FFLAGS@%$FFLAGS%g
10970 s%@DEFS@%$DEFS%g
10971 s%@LDFLAGS@%$LDFLAGS%g
10972 s%@LIBS@%$LIBS%g
10973 s%@exec_prefix@%$exec_prefix%g
10974 s%@prefix@%$prefix%g
10975 s%@program_transform_name@%$program_transform_name%g
10976 s%@bindir@%$bindir%g
10977 s%@sbindir@%$sbindir%g
10978 s%@libexecdir@%$libexecdir%g
10979 s%@datadir@%$datadir%g
10980 s%@sysconfdir@%$sysconfdir%g
10981 s%@sharedstatedir@%$sharedstatedir%g
10982 s%@localstatedir@%$localstatedir%g
10983 s%@libdir@%$libdir%g
10984 s%@includedir@%$includedir%g
10985 s%@oldincludedir@%$oldincludedir%g
10986 s%@infodir@%$infodir%g
10987 s%@mandir@%$mandir%g
10988 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10989 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10990 s%@INSTALL_DATA@%$INSTALL_DATA%g
10991 s%@PACKAGE@%$PACKAGE%g
10992 s%@VERSION@%$VERSION%g
10993 s%@ACLOCAL@%$ACLOCAL%g
10994 s%@AUTOCONF@%$AUTOCONF%g
10995 s%@AUTOMAKE@%$AUTOMAKE%g
10996 s%@AUTOHEADER@%$AUTOHEADER%g
10997 s%@MAKEINFO@%$MAKEINFO%g
10998 s%@SET_MAKE@%$SET_MAKE%g
10999 s%@top_builddir@%$top_builddir%g
11000 s%@ldap_subdir@%$ldap_subdir%g
11001 s%@host@%$host%g
11002 s%@host_alias@%$host_alias%g
11003 s%@host_cpu@%$host_cpu%g
11004 s%@host_vendor@%$host_vendor%g
11005 s%@host_os@%$host_os%g
11006 s%@RANLIB@%$RANLIB%g
11007 s%@CC@%$CC%g
11008 s%@LD@%$LD%g
11009 s%@NM@%$NM%g
11010 s%@LN_S@%$LN_S%g
11011 s%@LIBTOOL@%$LIBTOOL%g
11012 s%@AWK@%$AWK%g
11013 s%@LN_H@%$LN_H%g
11014 s%@SENDMAIL@%$SENDMAIL%g
11015 s%@EDITOR@%$EDITOR%g
11016 s%@FINGER@%$FINGER%g
11017 s%@PERLBIN@%$PERLBIN%g
11018 s%@CPP@%$CPP%g
11019 s%@EXEEXT@%$EXEEXT%g
11020 s%@OBJEXT@%$OBJEXT%g
11021 s%@PEPSY@%$PEPSY%g
11022 s%@LIBOBJS@%$LIBOBJS%g
11023 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11024 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11025 s%@BUILD_BDB2@%$BUILD_BDB2%g
11026 s%@BUILD_LDBM@%$BUILD_LDBM%g
11027 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11028 s%@BUILD_PERL@%$BUILD_PERL%g
11029 s%@BUILD_SHELL@%$BUILD_SHELL%g
11030 s%@BUILD_TCL@%$BUILD_TCL%g
11031 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11032 s%@LDAP_LIBS@%$LDAP_LIBS%g
11033 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11034 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11035 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11036 s%@LDBM_LIBS@%$LDBM_LIBS%g
11037 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11038 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11039 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11040 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11041 s%@KRB_LIBS@%$KRB_LIBS%g
11042 s%@READLINE_LIBS@%$READLINE_LIBS%g
11043 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11044 s%@TLS_LIBS@%$TLS_LIBS%g
11045
11046 CEOF
11047 EOF
11048
11049 cat >> $CONFIG_STATUS <<\EOF
11050
11051 # Split the substitutions into bite-sized pieces for seds with
11052 # small command number limits, like on Digital OSF/1 and HP-UX.
11053 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11054 ac_file=1 # Number of current file.
11055 ac_beg=1 # First line for current file.
11056 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11057 ac_more_lines=:
11058 ac_sed_cmds=""
11059 while $ac_more_lines; do
11060   if test $ac_beg -gt 1; then
11061     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11062   else
11063     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11064   fi
11065   if test ! -s conftest.s$ac_file; then
11066     ac_more_lines=false
11067     rm -f conftest.s$ac_file
11068   else
11069     if test -z "$ac_sed_cmds"; then
11070       ac_sed_cmds="sed -f conftest.s$ac_file"
11071     else
11072       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11073     fi
11074     ac_file=`expr $ac_file + 1`
11075     ac_beg=$ac_end
11076     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11077   fi
11078 done
11079 if test -z "$ac_sed_cmds"; then
11080   ac_sed_cmds=cat
11081 fi
11082 EOF
11083
11084 cat >> $CONFIG_STATUS <<EOF
11085
11086 CONFIG_FILES=\${CONFIG_FILES-"\
11087 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11088 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11089 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11090 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11091 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11092 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11093 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11094 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11095 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11096 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11097 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11098 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11099 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11100 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11101 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11102 include/Makefile:build/top.mk:include/Makefile.in \
11103 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11104 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11105 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11106 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11107 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11108 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11109 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11110 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11111 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11112 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11113 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11114 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11115 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11116 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11117 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11118 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11119 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11120 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11121 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11122 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11123 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11124 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11125 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11126 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11127 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11128 "}
11129 EOF
11130 cat >> $CONFIG_STATUS <<\EOF
11131 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11132   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11133   case "$ac_file" in
11134   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11135        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11136   *) ac_file_in="${ac_file}.in" ;;
11137   esac
11138
11139   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11140
11141   # Remove last slash and all that follows it.  Not all systems have dirname.
11142   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11143   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11144     # The file is in a subdirectory.
11145     test ! -d "$ac_dir" && mkdir "$ac_dir"
11146     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11147     # A "../" for each directory in $ac_dir_suffix.
11148     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11149   else
11150     ac_dir_suffix= ac_dots=
11151   fi
11152
11153   case "$ac_given_srcdir" in
11154   .)  srcdir=.
11155       if test -z "$ac_dots"; then top_srcdir=.
11156       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11157   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11158   *) # Relative path.
11159     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11160     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11161   esac
11162
11163   case "$ac_given_INSTALL" in
11164   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11165   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11166   esac
11167
11168   echo creating "$ac_file"
11169   rm -f "$ac_file"
11170   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11171   case "$ac_file" in
11172   *Makefile*) ac_comsub="1i\\
11173 # $configure_input" ;;
11174   *) ac_comsub= ;;
11175   esac
11176
11177   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11178   sed -e "$ac_comsub
11179 s%@configure_input@%$configure_input%g
11180 s%@srcdir@%$srcdir%g
11181 s%@top_srcdir@%$top_srcdir%g
11182 s%@INSTALL@%$INSTALL%g
11183 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11184 fi; done
11185 rm -f conftest.s*
11186
11187 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11188 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11189 #
11190 # ac_d sets the value in "#define NAME VALUE" lines.
11191 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11192 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11193 ac_dC='\3'
11194 ac_dD='%g'
11195 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11196 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11197 ac_uB='\([      ]\)%\1#\2define\3'
11198 ac_uC=' '
11199 ac_uD='\4%g'
11200 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11201 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11202 ac_eB='$%\1#\2define\3'
11203 ac_eC=' '
11204 ac_eD='%g'
11205
11206 if test "${CONFIG_HEADERS+set}" != set; then
11207 EOF
11208 cat >> $CONFIG_STATUS <<EOF
11209   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11210 EOF
11211 cat >> $CONFIG_STATUS <<\EOF
11212 fi
11213 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11214   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11215   case "$ac_file" in
11216   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11217        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11218   *) ac_file_in="${ac_file}.in" ;;
11219   esac
11220
11221   echo creating $ac_file
11222
11223   rm -f conftest.frag conftest.in conftest.out
11224   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11225   cat $ac_file_inputs > conftest.in
11226
11227 EOF
11228
11229 # Transform confdefs.h into a sed script conftest.vals that substitutes
11230 # the proper values into config.h.in to produce config.h.  And first:
11231 # Protect against being on the right side of a sed subst in config.status.
11232 # Protect against being in an unquoted here document in config.status.
11233 rm -f conftest.vals
11234 cat > conftest.hdr <<\EOF
11235 s/[\\&%]/\\&/g
11236 s%[\\$`]%\\&%g
11237 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11238 s%ac_d%ac_u%gp
11239 s%ac_u%ac_e%gp
11240 EOF
11241 sed -n -f conftest.hdr confdefs.h > conftest.vals
11242 rm -f conftest.hdr
11243
11244 # This sed command replaces #undef with comments.  This is necessary, for
11245 # example, in the case of _POSIX_SOURCE, which is predefined and required
11246 # on some systems where configure will not decide to define it.
11247 cat >> conftest.vals <<\EOF
11248 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11249 EOF
11250
11251 # Break up conftest.vals because some shells have a limit on
11252 # the size of here documents, and old seds have small limits too.
11253
11254 rm -f conftest.tail
11255 while :
11256 do
11257   ac_lines=`grep -c . conftest.vals`
11258   # grep -c gives empty output for an empty file on some AIX systems.
11259   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11260   # Write a limited-size here document to conftest.frag.
11261   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11262   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11263   echo 'CEOF
11264   sed -f conftest.frag conftest.in > conftest.out
11265   rm -f conftest.in
11266   mv conftest.out conftest.in
11267 ' >> $CONFIG_STATUS
11268   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11269   rm -f conftest.vals
11270   mv conftest.tail conftest.vals
11271 done
11272 rm -f conftest.vals
11273
11274 cat >> $CONFIG_STATUS <<\EOF
11275   rm -f conftest.frag conftest.h
11276   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11277   cat conftest.in >> conftest.h
11278   rm -f conftest.in
11279   if cmp -s $ac_file conftest.h 2>/dev/null; then
11280     echo "$ac_file is unchanged"
11281     rm -f conftest.h
11282   else
11283     # Remove last slash and all that follows it.  Not all systems have dirname.
11284       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11285       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11286       # The file is in a subdirectory.
11287       test ! -d "$ac_dir" && mkdir "$ac_dir"
11288     fi
11289     rm -f $ac_file
11290     mv conftest.h $ac_file
11291   fi
11292 fi; done
11293
11294 EOF
11295 cat >> $CONFIG_STATUS <<EOF
11296
11297 EOF
11298 cat >> $CONFIG_STATUS <<\EOF
11299
11300 date > stamp-h
11301 echo Please \"make depend\" to build dependencies
11302
11303 exit 0
11304 EOF
11305 chmod +x $CONFIG_STATUS
11306 rm -fr confdefs* $ac_clean_files
11307 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11308