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