]> git.sur5r.net Git - openldap/blob - configure
0d62fb28f0ce8c3a6fc797a8f4786189a6948d94
[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-libui        enable library user interface (yes)"
19 ac_help="$ac_help
20   --enable-cache        enable caching (yes)"
21 ac_help="$ac_help
22   --enable-dns  enable dns support (no)"
23 ac_help="$ac_help
24   --enable-referrals    enable referrals (yes)"
25 ac_help="$ac_help
26   --enable-clapd        enable connectionless ldap (no)"
27 ac_help="$ac_help
28   --with-kerberos       use Kerberos (auto)"
29 ac_help="$ac_help
30   --with-threads        use threads (auto)"
31 ac_help="$ac_help
32   --enable-ldapd        enable building ldapd (no)"
33 ac_help="$ac_help
34   --enable-slapd        enable building slapd (yes)"
35 ac_help="$ac_help
36     --enable-aclgroup   enable ACL group support (auto)"
37 ac_help="$ac_help
38     --enable-crypt      enable crypt(3) passwords (auto)"
39 ac_help="$ac_help
40     --enable-md5        enable MD5 passwords (auto)"
41 ac_help="$ac_help
42     --enable-sha1       enable SHA1 passwords (auto)"
43 ac_help="$ac_help
44     --enable-wrappers   enable tcp wrapper support (no)"
45 ac_help="$ac_help
46     --enable-phonetic   enable phonetic/soundex (no)"
47 ac_help="$ac_help
48     --enable-rlookups   enable reverse lookups (auto)"
49 ac_help="$ac_help
50     --enable-ldbm       enable ldbm backend (yes)"
51 ac_help="$ac_help
52       --with-ldbm-api   use LDBM API (auto)"
53 ac_help="$ac_help
54       --with-ldbm-type  use LDBM type (auto)"
55 ac_help="$ac_help
56     --enable-passwd     enable passwd backend (no)"
57 ac_help="$ac_help
58     --enable-shell      enable shell backend (no)"
59 ac_help="$ac_help
60   --enable-slurpd       enable building slurpd (auto)"
61
62 # Initialize some variables set by options.
63 # The variables have the same names as the options, with
64 # dashes changed to underlines.
65 build=NONE
66 cache_file=./config.cache
67 exec_prefix=NONE
68 host=NONE
69 no_create=
70 nonopt=NONE
71 no_recursion=
72 prefix=NONE
73 program_prefix=NONE
74 program_suffix=NONE
75 program_transform_name=s,x,x,
76 silent=
77 site=
78 srcdir=
79 target=NONE
80 verbose=
81 x_includes=NONE
82 x_libraries=NONE
83 bindir='${exec_prefix}/bin'
84 sbindir='${exec_prefix}/sbin'
85 libexecdir='${exec_prefix}/libexec'
86 datadir='${prefix}/share'
87 sysconfdir='${prefix}/etc'
88 sharedstatedir='${prefix}/com'
89 localstatedir='${prefix}/var'
90 libdir='${exec_prefix}/lib'
91 includedir='${prefix}/include'
92 oldincludedir='/usr/include'
93 infodir='${prefix}/info'
94 mandir='${prefix}/man'
95
96 # Initialize some other variables.
97 subdirs=
98 MFLAGS= MAKEFLAGS=
99 # Maximum number of lines to put in a shell here document.
100 ac_max_here_lines=12
101
102 ac_prev=
103 for ac_option
104 do
105
106   # If the previous option needs an argument, assign it.
107   if test -n "$ac_prev"; then
108     eval "$ac_prev=\$ac_option"
109     ac_prev=
110     continue
111   fi
112
113   case "$ac_option" in
114   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
115   *) ac_optarg= ;;
116   esac
117
118   # Accept the important Cygnus configure options, so we can diagnose typos.
119
120   case "$ac_option" in
121
122   -bindir | --bindir | --bindi | --bind | --bin | --bi)
123     ac_prev=bindir ;;
124   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
125     bindir="$ac_optarg" ;;
126
127   -build | --build | --buil | --bui | --bu)
128     ac_prev=build ;;
129   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
130     build="$ac_optarg" ;;
131
132   -cache-file | --cache-file | --cache-fil | --cache-fi \
133   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
134     ac_prev=cache_file ;;
135   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
136   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
137     cache_file="$ac_optarg" ;;
138
139   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
140     ac_prev=datadir ;;
141   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
142   | --da=*)
143     datadir="$ac_optarg" ;;
144
145   -disable-* | --disable-*)
146     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
147     # Reject names that are not valid shell variable names.
148     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
149       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
150     fi
151     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
152     eval "enable_${ac_feature}=no" ;;
153
154   -enable-* | --enable-*)
155     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
156     # Reject names that are not valid shell variable names.
157     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
158       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
159     fi
160     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161     case "$ac_option" in
162       *=*) ;;
163       *) ac_optarg=yes ;;
164     esac
165     eval "enable_${ac_feature}='$ac_optarg'" ;;
166
167   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
168   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
169   | --exec | --exe | --ex)
170     ac_prev=exec_prefix ;;
171   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
172   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
173   | --exec=* | --exe=* | --ex=*)
174     exec_prefix="$ac_optarg" ;;
175
176   -gas | --gas | --ga | --g)
177     # Obsolete; use --with-gas.
178     with_gas=yes ;;
179
180   -help | --help | --hel | --he)
181     # Omit some internal or obsolete options to make the list less imposing.
182     # This message is too long to be a string in the A/UX 3.1 sh.
183     cat << EOF
184 Usage: configure [options] [host]
185 Options: [defaults in brackets after descriptions]
186 Configuration:
187   --cache-file=FILE       cache test results in FILE
188   --help                  print this message
189   --no-create             do not create output files
190   --quiet, --silent       do not print \`checking...' messages
191   --version               print the version of autoconf that created configure
192 Directory and file names:
193   --prefix=PREFIX         install architecture-independent files in PREFIX
194                           [$ac_default_prefix]
195   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
196                           [same as prefix]
197   --bindir=DIR            user executables in DIR [EPREFIX/bin]
198   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
199   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
200   --datadir=DIR           read-only architecture-independent data in DIR
201                           [PREFIX/share]
202   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
203   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
204                           [PREFIX/com]
205   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
206   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
207   --includedir=DIR        C header files in DIR [PREFIX/include]
208   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
209   --infodir=DIR           info documentation in DIR [PREFIX/info]
210   --mandir=DIR            man documentation in DIR [PREFIX/man]
211   --srcdir=DIR            find the sources in DIR [configure dir or ..]
212   --program-prefix=PREFIX prepend PREFIX to installed program names
213   --program-suffix=SUFFIX append SUFFIX to installed program names
214   --program-transform-name=PROGRAM
215                           run sed PROGRAM on installed program names
216 EOF
217     cat << EOF
218 Host type:
219   --build=BUILD           configure for building on BUILD [BUILD=HOST]
220   --host=HOST             configure for HOST [guessed]
221   --target=TARGET         configure for TARGET [TARGET=HOST]
222 Features and packages:
223   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
224   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
225   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
226   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
227   --x-includes=DIR        X include files are in DIR
228   --x-libraries=DIR       X library files are in DIR
229 EOF
230     if test -n "$ac_help"; then
231       echo "--enable and --with options recognized:$ac_help"
232     fi
233     exit 0 ;;
234
235   -host | --host | --hos | --ho)
236     ac_prev=host ;;
237   -host=* | --host=* | --hos=* | --ho=*)
238     host="$ac_optarg" ;;
239
240   -includedir | --includedir | --includedi | --included | --include \
241   | --includ | --inclu | --incl | --inc)
242     ac_prev=includedir ;;
243   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
244   | --includ=* | --inclu=* | --incl=* | --inc=*)
245     includedir="$ac_optarg" ;;
246
247   -infodir | --infodir | --infodi | --infod | --info | --inf)
248     ac_prev=infodir ;;
249   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
250     infodir="$ac_optarg" ;;
251
252   -libdir | --libdir | --libdi | --libd)
253     ac_prev=libdir ;;
254   -libdir=* | --libdir=* | --libdi=* | --libd=*)
255     libdir="$ac_optarg" ;;
256
257   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
258   | --libexe | --libex | --libe)
259     ac_prev=libexecdir ;;
260   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
261   | --libexe=* | --libex=* | --libe=*)
262     libexecdir="$ac_optarg" ;;
263
264   -localstatedir | --localstatedir | --localstatedi | --localstated \
265   | --localstate | --localstat | --localsta | --localst \
266   | --locals | --local | --loca | --loc | --lo)
267     ac_prev=localstatedir ;;
268   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
269   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
270   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
271     localstatedir="$ac_optarg" ;;
272
273   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
274     ac_prev=mandir ;;
275   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
276     mandir="$ac_optarg" ;;
277
278   -nfp | --nfp | --nf)
279     # Obsolete; use --without-fp.
280     with_fp=no ;;
281
282   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
283   | --no-cr | --no-c)
284     no_create=yes ;;
285
286   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
287   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
288     no_recursion=yes ;;
289
290   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
291   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
292   | --oldin | --oldi | --old | --ol | --o)
293     ac_prev=oldincludedir ;;
294   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
295   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
296   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
297     oldincludedir="$ac_optarg" ;;
298
299   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
300     ac_prev=prefix ;;
301   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
302     prefix="$ac_optarg" ;;
303
304   -program-prefix | --program-prefix | --program-prefi | --program-pref \
305   | --program-pre | --program-pr | --program-p)
306     ac_prev=program_prefix ;;
307   -program-prefix=* | --program-prefix=* | --program-prefi=* \
308   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
309     program_prefix="$ac_optarg" ;;
310
311   -program-suffix | --program-suffix | --program-suffi | --program-suff \
312   | --program-suf | --program-su | --program-s)
313     ac_prev=program_suffix ;;
314   -program-suffix=* | --program-suffix=* | --program-suffi=* \
315   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
316     program_suffix="$ac_optarg" ;;
317
318   -program-transform-name | --program-transform-name \
319   | --program-transform-nam | --program-transform-na \
320   | --program-transform-n | --program-transform- \
321   | --program-transform | --program-transfor \
322   | --program-transfo | --program-transf \
323   | --program-trans | --program-tran \
324   | --progr-tra | --program-tr | --program-t)
325     ac_prev=program_transform_name ;;
326   -program-transform-name=* | --program-transform-name=* \
327   | --program-transform-nam=* | --program-transform-na=* \
328   | --program-transform-n=* | --program-transform-=* \
329   | --program-transform=* | --program-transfor=* \
330   | --program-transfo=* | --program-transf=* \
331   | --program-trans=* | --program-tran=* \
332   | --progr-tra=* | --program-tr=* | --program-t=*)
333     program_transform_name="$ac_optarg" ;;
334
335   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
336   | -silent | --silent | --silen | --sile | --sil)
337     silent=yes ;;
338
339   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
340     ac_prev=sbindir ;;
341   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
342   | --sbi=* | --sb=*)
343     sbindir="$ac_optarg" ;;
344
345   -sharedstatedir | --sharedstatedir | --sharedstatedi \
346   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
347   | --sharedst | --shareds | --shared | --share | --shar \
348   | --sha | --sh)
349     ac_prev=sharedstatedir ;;
350   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
351   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
352   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
353   | --sha=* | --sh=*)
354     sharedstatedir="$ac_optarg" ;;
355
356   -site | --site | --sit)
357     ac_prev=site ;;
358   -site=* | --site=* | --sit=*)
359     site="$ac_optarg" ;;
360
361   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
362     ac_prev=srcdir ;;
363   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
364     srcdir="$ac_optarg" ;;
365
366   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
367   | --syscon | --sysco | --sysc | --sys | --sy)
368     ac_prev=sysconfdir ;;
369   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
370   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
371     sysconfdir="$ac_optarg" ;;
372
373   -target | --target | --targe | --targ | --tar | --ta | --t)
374     ac_prev=target ;;
375   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
376     target="$ac_optarg" ;;
377
378   -v | -verbose | --verbose | --verbos | --verbo | --verb)
379     verbose=yes ;;
380
381   -version | --version | --versio | --versi | --vers)
382     echo "configure generated by autoconf version 2.12"
383     exit 0 ;;
384
385   -with-* | --with-*)
386     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
387     # Reject names that are not valid shell variable names.
388     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
389       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
390     fi
391     ac_package=`echo $ac_package| sed 's/-/_/g'`
392     case "$ac_option" in
393       *=*) ;;
394       *) ac_optarg=yes ;;
395     esac
396     eval "with_${ac_package}='$ac_optarg'" ;;
397
398   -without-* | --without-*)
399     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
400     # Reject names that are not valid shell variable names.
401     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
402       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
403     fi
404     ac_package=`echo $ac_package| sed 's/-/_/g'`
405     eval "with_${ac_package}=no" ;;
406
407   --x)
408     # Obsolete; use --with-x.
409     with_x=yes ;;
410
411   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
412   | --x-incl | --x-inc | --x-in | --x-i)
413     ac_prev=x_includes ;;
414   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
415   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
416     x_includes="$ac_optarg" ;;
417
418   -x-libraries | --x-libraries | --x-librarie | --x-librari \
419   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
420     ac_prev=x_libraries ;;
421   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
422   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
423     x_libraries="$ac_optarg" ;;
424
425   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
426     ;;
427
428   *)
429     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
430       echo "configure: warning: $ac_option: invalid host type" 1>&2
431     fi
432     if test "x$nonopt" != xNONE; then
433       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
434     fi
435     nonopt="$ac_option"
436     ;;
437
438   esac
439 done
440
441 if test -n "$ac_prev"; then
442   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
443 fi
444
445 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
446
447 # File descriptor usage:
448 # 0 standard input
449 # 1 file creation
450 # 2 errors and warnings
451 # 3 some systems may open it to /dev/tty
452 # 4 used on the Kubota Titan
453 # 6 checking for... messages and results
454 # 5 compiler messages saved in config.log
455 if test "$silent" = yes; then
456   exec 6>/dev/null
457 else
458   exec 6>&1
459 fi
460 exec 5>./config.log
461
462 echo "\
463 This file contains any messages produced by compilers while
464 running configure, to aid debugging if configure makes a mistake.
465 " 1>&5
466
467 # Strip out --no-create and --no-recursion so they do not pile up.
468 # Also quote any args containing shell metacharacters.
469 ac_configure_args=
470 for ac_arg
471 do
472   case "$ac_arg" in
473   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
474   | --no-cr | --no-c) ;;
475   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
476   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
477   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
478   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
479   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
480   esac
481 done
482
483 # NLS nuisances.
484 # Only set these to C if already set.  These must not be set unconditionally
485 # because not all systems understand e.g. LANG=C (notably SCO).
486 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
487 # Non-C LC_CTYPE values break the ctype check.
488 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
489 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
490 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
491 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
492
493 # confdefs.h avoids OS command line length limits that DEFS can exceed.
494 rm -rf conftest* confdefs.h
495 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
496 echo > confdefs.h
497
498 # A filename unique to this package, relative to the directory that
499 # configure is in, which we can look for to find out if srcdir is correct.
500 ac_unique_file=include/ldap.h
501
502 # Find the source files, if location was not specified.
503 if test -z "$srcdir"; then
504   ac_srcdir_defaulted=yes
505   # Try the directory containing this script, then its parent.
506   ac_prog=$0
507   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
508   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
509   srcdir=$ac_confdir
510   if test ! -r $srcdir/$ac_unique_file; then
511     srcdir=..
512   fi
513 else
514   ac_srcdir_defaulted=no
515 fi
516 if test ! -r $srcdir/$ac_unique_file; then
517   if test "$ac_srcdir_defaulted" = yes; then
518     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
519   else
520     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
521   fi
522 fi
523 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
524
525 # Prefer explicitly selected file to automatically selected ones.
526 if test -z "$CONFIG_SITE"; then
527   if test "x$prefix" != xNONE; then
528     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
529   else
530     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
531   fi
532 fi
533 for ac_site_file in $CONFIG_SITE; do
534   if test -r "$ac_site_file"; then
535     echo "loading site script $ac_site_file"
536     . "$ac_site_file"
537   fi
538 done
539
540 if test -r "$cache_file"; then
541   echo "loading cache $cache_file"
542   . $cache_file
543 else
544   echo "creating cache $cache_file"
545   > $cache_file
546 fi
547
548 ac_ext=c
549 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
550 ac_cpp='$CPP $CPPFLAGS'
551 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
552 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
553 cross_compiling=$ac_cv_prog_cc_cross
554
555 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
556   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
557   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
558     ac_n= ac_c='
559 ' ac_t='        '
560   else
561     ac_n=-n ac_c= ac_t=
562   fi
563 else
564   ac_n= ac_c='\c' ac_t=
565 fi
566
567
568 ac_aux_dir=
569 for ac_dir in build $srcdir/build; do
570   if test -f $ac_dir/install-sh; then
571     ac_aux_dir=$ac_dir
572     ac_install_sh="$ac_aux_dir/install-sh -c"
573     break
574   elif test -f $ac_dir/install.sh; then
575     ac_aux_dir=$ac_dir
576     ac_install_sh="$ac_aux_dir/install.sh -c"
577     break
578   fi
579 done
580 if test -z "$ac_aux_dir"; then
581   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
582 fi
583 ac_config_guess=$ac_aux_dir/config.guess
584 ac_config_sub=$ac_aux_dir/config.sub
585 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
586
587 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
588 echo "configure:589: checking configure arguments" >&5
589
590
591 # OpenLDAP --enable-debug
592         # Check whether --enable-debug or --disable-debug was given.
593 if test "${enable_debug+set}" = set; then
594   enableval="$enable_debug"
595   
596         ol_arg=invalid
597         for ol_val in auto yes no ; do
598                 if test "$enableval" = "$ol_val" ; then
599                         ol_arg="$ol_val"
600                 fi
601         done
602         if test "$ol_arg" = "invalid" ; then
603                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
604         fi
605         ol_enable_debug="$ol_arg"
606
607 else
608         ol_enable_debug="yes"
609 fi
610 # end --enable-debug
611 # OpenLDAP --enable-libui
612         # Check whether --enable-libui or --disable-libui was given.
613 if test "${enable_libui+set}" = set; then
614   enableval="$enable_libui"
615   
616         ol_arg=invalid
617         for ol_val in auto yes no ; do
618                 if test "$enableval" = "$ol_val" ; then
619                         ol_arg="$ol_val"
620                 fi
621         done
622         if test "$ol_arg" = "invalid" ; then
623                 { echo "configure: error: bad value $enableval for --enable-libui" 1>&2; exit 1; }
624         fi
625         ol_enable_libui="$ol_arg"
626
627 else
628         ol_enable_libui="yes"
629 fi
630 # end --enable-libui
631 # OpenLDAP --enable-cache
632         # Check whether --enable-cache or --disable-cache was given.
633 if test "${enable_cache+set}" = set; then
634   enableval="$enable_cache"
635   
636         ol_arg=invalid
637         for ol_val in auto yes no ; do
638                 if test "$enableval" = "$ol_val" ; then
639                         ol_arg="$ol_val"
640                 fi
641         done
642         if test "$ol_arg" = "invalid" ; then
643                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
644         fi
645         ol_enable_cache="$ol_arg"
646
647 else
648         ol_enable_cache="yes"
649 fi
650 # end --enable-cache
651 # OpenLDAP --enable-dns
652         # Check whether --enable-dns or --disable-dns was given.
653 if test "${enable_dns+set}" = set; then
654   enableval="$enable_dns"
655   
656         ol_arg=invalid
657         for ol_val in auto yes no ; do
658                 if test "$enableval" = "$ol_val" ; then
659                         ol_arg="$ol_val"
660                 fi
661         done
662         if test "$ol_arg" = "invalid" ; then
663                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
664         fi
665         ol_enable_dns="$ol_arg"
666
667 else
668         ol_enable_dns="no"
669 fi
670 # end --enable-dns
671 # OpenLDAP --enable-referrals
672         # Check whether --enable-referrals or --disable-referrals was given.
673 if test "${enable_referrals+set}" = set; then
674   enableval="$enable_referrals"
675   
676         ol_arg=invalid
677         for ol_val in auto yes no ; do
678                 if test "$enableval" = "$ol_val" ; then
679                         ol_arg="$ol_val"
680                 fi
681         done
682         if test "$ol_arg" = "invalid" ; then
683                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
684         fi
685         ol_enable_referrals="$ol_arg"
686
687 else
688         ol_enable_referrals="yes"
689 fi
690 # end --enable-referrals
691 # OpenLDAP --enable-cldap
692         # Check whether --enable-cldap or --disable-cldap was given.
693 if test "${enable_cldap+set}" = set; then
694   enableval="$enable_cldap"
695   
696         ol_arg=invalid
697         for ol_val in auto yes no ; do
698                 if test "$enableval" = "$ol_val" ; then
699                         ol_arg="$ol_val"
700                 fi
701         done
702         if test "$ol_arg" = "invalid" ; then
703                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
704         fi
705         ol_enable_cldap="$ol_arg"
706
707 else
708         ol_enable_cldap="no"
709 fi
710 # end --enable-cldap
711
712 # OpenLDAP --with-kerberos
713         # Check whether --with-kerberos or --without-kerberos was given.
714 if test "${with_kerberos+set}" = set; then
715   withval="$with_kerberos"
716   
717         ol_arg=invalid
718         for ol_val in auto k5 k4 afs yes no ; do
719                 if test "$withval" = "$ol_val" ; then
720                         ol_arg="$ol_val"
721                 fi
722         done
723         if test "$ol_arg" = "invalid" ; then
724                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
725         fi
726         ol_with_kerberos="$ol_arg"
727
728 else
729         ol_with_kerberos="auto"
730 fi
731 # end --with-kerberos
732
733 # OpenLDAP --with-threads
734         # Check whether --with-threads or --without-threads was given.
735 if test "${with_threads+set}" = set; then
736   withval="$with_threads"
737   
738         ol_arg=invalid
739         for ol_val in auto posix dce mach yes no manual  ; do
740                 if test "$withval" = "$ol_val" ; then
741                         ol_arg="$ol_val"
742                 fi
743         done
744         if test "$ol_arg" = "invalid" ; then
745                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
746         fi
747         ol_with_threads="$ol_arg"
748
749 else
750         ol_with_threads="auto"
751 fi
752 # end --with-threads
753
754
755
756 # OpenLDAP --enable-ldapd
757         # Check whether --enable-ldapd or --disable-ldapd was given.
758 if test "${enable_ldapd+set}" = set; then
759   enableval="$enable_ldapd"
760   
761         ol_arg=invalid
762         for ol_val in auto yes no ; do
763                 if test "$enableval" = "$ol_val" ; then
764                         ol_arg="$ol_val"
765                 fi
766         done
767         if test "$ol_arg" = "invalid" ; then
768                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
769         fi
770         ol_enable_ldapd="$ol_arg"
771
772 else
773         ol_enable_ldapd="no"
774 fi
775 # end --enable-ldapd
776
777 # OpenLDAP --enable-slapd
778         # Check whether --enable-slapd or --disable-slapd was given.
779 if test "${enable_slapd+set}" = set; then
780   enableval="$enable_slapd"
781   
782         ol_arg=invalid
783         for ol_val in auto yes no ; do
784                 if test "$enableval" = "$ol_val" ; then
785                         ol_arg="$ol_val"
786                 fi
787         done
788         if test "$ol_arg" = "invalid" ; then
789                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
790         fi
791         ol_enable_slapd="$ol_arg"
792
793 else
794         ol_enable_slapd="yes"
795 fi
796 # end --enable-slapd
797 # OpenLDAP --enable-aclgroup
798         # Check whether --enable-aclgroup or --disable-aclgroup was given.
799 if test "${enable_aclgroup+set}" = set; then
800   enableval="$enable_aclgroup"
801   
802         ol_arg=invalid
803         for ol_val in auto yes no ; do
804                 if test "$enableval" = "$ol_val" ; then
805                         ol_arg="$ol_val"
806                 fi
807         done
808         if test "$ol_arg" = "invalid" ; then
809                 { echo "configure: error: bad value $enableval for --enable-aclgroup" 1>&2; exit 1; }
810         fi
811         ol_enable_aclgroup="$ol_arg"
812
813 else
814         ol_enable_aclgroup="auto"
815 fi
816 # end --enable-aclgroup
817 # OpenLDAP --enable-crypt
818         # Check whether --enable-crypt or --disable-crypt was given.
819 if test "${enable_crypt+set}" = set; then
820   enableval="$enable_crypt"
821   
822         ol_arg=invalid
823         for ol_val in auto yes no ; do
824                 if test "$enableval" = "$ol_val" ; then
825                         ol_arg="$ol_val"
826                 fi
827         done
828         if test "$ol_arg" = "invalid" ; then
829                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
830         fi
831         ol_enable_crypt="$ol_arg"
832
833 else
834         ol_enable_crypt="auto"
835 fi
836 # end --enable-crypt
837 # OpenLDAP --enable-md5
838         # Check whether --enable-md5 or --disable-md5 was given.
839 if test "${enable_md5+set}" = set; then
840   enableval="$enable_md5"
841   
842         ol_arg=invalid
843         for ol_val in auto yes no ; do
844                 if test "$enableval" = "$ol_val" ; then
845                         ol_arg="$ol_val"
846                 fi
847         done
848         if test "$ol_arg" = "invalid" ; then
849                 { echo "configure: error: bad value $enableval for --enable-md5" 1>&2; exit 1; }
850         fi
851         ol_enable_md5="$ol_arg"
852
853 else
854         ol_enable_md5="auto"
855 fi
856 # end --enable-md5
857 # OpenLDAP --enable-sha1
858         # Check whether --enable-sha1 or --disable-sha1 was given.
859 if test "${enable_sha1+set}" = set; then
860   enableval="$enable_sha1"
861   
862         ol_arg=invalid
863         for ol_val in auto yes no ; do
864                 if test "$enableval" = "$ol_val" ; then
865                         ol_arg="$ol_val"
866                 fi
867         done
868         if test "$ol_arg" = "invalid" ; then
869                 { echo "configure: error: bad value $enableval for --enable-sha1" 1>&2; exit 1; }
870         fi
871         ol_enable_sha1="$ol_arg"
872
873 else
874         ol_enable_sha1="auto"
875 fi
876 # end --enable-sha1
877 # OpenLDAP --enable-wrappers
878         # Check whether --enable-wrappers or --disable-wrappers was given.
879 if test "${enable_wrappers+set}" = set; then
880   enableval="$enable_wrappers"
881   
882         ol_arg=invalid
883         for ol_val in auto yes no ; do
884                 if test "$enableval" = "$ol_val" ; then
885                         ol_arg="$ol_val"
886                 fi
887         done
888         if test "$ol_arg" = "invalid" ; then
889                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
890         fi
891         ol_enable_wrappers="$ol_arg"
892
893 else
894         ol_enable_wrappers="no"
895 fi
896 # end --enable-wrappers
897 # OpenLDAP --enable-phonetic
898         # Check whether --enable-phonetic or --disable-phonetic was given.
899 if test "${enable_phonetic+set}" = set; then
900   enableval="$enable_phonetic"
901   
902         ol_arg=invalid
903         for ol_val in auto yes no ; do
904                 if test "$enableval" = "$ol_val" ; then
905                         ol_arg="$ol_val"
906                 fi
907         done
908         if test "$ol_arg" = "invalid" ; then
909                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
910         fi
911         ol_enable_phonetic="$ol_arg"
912
913 else
914         ol_enable_phonetic="no"
915 fi
916 # end --enable-phonetic
917 # OpenLDAP --enable-rlookups
918         # Check whether --enable-rlookups or --disable-rlookups was given.
919 if test "${enable_rlookups+set}" = set; then
920   enableval="$enable_rlookups"
921   
922         ol_arg=invalid
923         for ol_val in auto yes no ; do
924                 if test "$enableval" = "$ol_val" ; then
925                         ol_arg="$ol_val"
926                 fi
927         done
928         if test "$ol_arg" = "invalid" ; then
929                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
930         fi
931         ol_enable_rlookups="$ol_arg"
932
933 else
934         ol_enable_rlookups="auto"
935 fi
936 # end --enable-rlookups
937
938 # OpenLDAP --enable-ldbm
939         # Check whether --enable-ldbm or --disable-ldbm was given.
940 if test "${enable_ldbm+set}" = set; then
941   enableval="$enable_ldbm"
942   
943         ol_arg=invalid
944         for ol_val in auto yes no ; do
945                 if test "$enableval" = "$ol_val" ; then
946                         ol_arg="$ol_val"
947                 fi
948         done
949         if test "$ol_arg" = "invalid" ; then
950                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
951         fi
952         ol_enable_ldbm="$ol_arg"
953
954 else
955         ol_enable_ldbm="yes"
956 fi
957 # end --enable-ldbm
958 # OpenLDAP --with-ldbm_api
959         # Check whether --with-ldbm_api or --without-ldbm_api was given.
960 if test "${with_ldbm_api+set}" = set; then
961   withval="$with_ldbm_api"
962   
963         ol_arg=invalid
964         for ol_val in auto db2 db gdbm ndbm manual ; do
965                 if test "$withval" = "$ol_val" ; then
966                         ol_arg="$ol_val"
967                 fi
968         done
969         if test "$ol_arg" = "invalid" ; then
970                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
971         fi
972         ol_with_ldbm_api="$ol_arg"
973
974 else
975         ol_with_ldbm_api="auto"
976 fi
977 # end --with-ldbm_api
978
979 # OpenLDAP --with-ldbm_type
980         # Check whether --with-ldbm_type or --without-ldbm_type was given.
981 if test "${with_ldbm_type+set}" = set; then
982   withval="$with_ldbm_type"
983   
984         ol_arg=invalid
985         for ol_val in auto btree hash ; do
986                 if test "$withval" = "$ol_val" ; then
987                         ol_arg="$ol_val"
988                 fi
989         done
990         if test "$ol_arg" = "invalid" ; then
991                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
992         fi
993         ol_with_ldbm_type="$ol_arg"
994
995 else
996         ol_with_ldbm_type="auto"
997 fi
998 # end --with-ldbm_type
999
1000
1001 # OpenLDAP --enable-passwd
1002         # Check whether --enable-passwd or --disable-passwd was given.
1003 if test "${enable_passwd+set}" = set; then
1004   enableval="$enable_passwd"
1005   
1006         ol_arg=invalid
1007         for ol_val in auto yes no ; do
1008                 if test "$enableval" = "$ol_val" ; then
1009                         ol_arg="$ol_val"
1010                 fi
1011         done
1012         if test "$ol_arg" = "invalid" ; then
1013                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1014         fi
1015         ol_enable_passwd="$ol_arg"
1016
1017 else
1018         ol_enable_passwd="no"
1019 fi
1020 # end --enable-passwd
1021 # OpenLDAP --enable-shell
1022         # Check whether --enable-shell or --disable-shell was given.
1023 if test "${enable_shell+set}" = set; then
1024   enableval="$enable_shell"
1025   
1026         ol_arg=invalid
1027         for ol_val in auto yes no ; do
1028                 if test "$enableval" = "$ol_val" ; then
1029                         ol_arg="$ol_val"
1030                 fi
1031         done
1032         if test "$ol_arg" = "invalid" ; then
1033                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1034         fi
1035         ol_enable_shell="$ol_arg"
1036
1037 else
1038         ol_enable_shell="no"
1039 fi
1040 # end --enable-shell
1041
1042 # OpenLDAP --enable-slurpd
1043         # Check whether --enable-slurpd or --disable-slurpd was given.
1044 if test "${enable_slurpd+set}" = set; then
1045   enableval="$enable_slurpd"
1046   
1047         ol_arg=invalid
1048         for ol_val in auto yes no ; do
1049                 if test "$enableval" = "$ol_val" ; then
1050                         ol_arg="$ol_val"
1051                 fi
1052         done
1053         if test "$ol_arg" = "invalid" ; then
1054                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1055         fi
1056         ol_enable_slurpd="$ol_arg"
1057
1058 else
1059         ol_enable_slurpd="auto"
1060 fi
1061 # end --enable-slurpd
1062
1063 if test $ol_enable_slapd = no ; then
1064                 if test $ol_enable_ldbm = yes ; then
1065                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2;
1066         fi
1067         if test $ol_enable_passwd = yes ; then
1068                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2;
1069         fi
1070         if test $ol_enable_shell = yes ; then
1071                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2;
1072         fi
1073         if test $ol_enable_aclgroup = yes ; then
1074                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroup argument" 1>&2;
1075         fi
1076         if test $ol_enable_crypt = yes ; then
1077                 echo "configure: warning: slapd disabled, ignoring --enable_crypt argument" 1>&2;
1078         fi
1079         if test $ol_enable_md5 = yes ; then
1080                 echo "configure: warning: slapd disabled, ignoring --enable_md5 argument" 1>&2;
1081         fi
1082         if test $ol_enable_sha1 = yes ; then
1083                 echo "configure: warning: slapd disabled, ignoring --enable_sha1 argument" 1>&2;
1084         fi
1085         if test $ol_enable_wrappers = yes ; then
1086                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2;
1087         fi
1088         if test $ol_enable_phonetic = yes ; then
1089                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2;
1090         fi
1091         if test $ol_enable_rlookups = yes ; then
1092                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2;
1093         fi
1094         if test $ol_with_ldbm_api != auto ; then
1095                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2;
1096         fi
1097         if test $ol_with_ldbm_type != auto ; then
1098                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2;
1099         fi
1100         if test $ol_enable_slurpd = yes ; then
1101                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; };
1102         fi
1103
1104         # force settings to no
1105         ol_enable_ldbm=no
1106         ol_enable_shell=no
1107         ol_enable_passwd=no
1108         ol_enable_aclgroup=no
1109         ol_enable_crypt=no
1110         ol_enable_md5=no
1111         ol_enable_sha1=no
1112         ol_enable_wrappers=no
1113         ol_enable_phonetic=no
1114         ol_enable_rlookups=no
1115         ol_with_ldbm_api=no
1116         ol_with_ldbm_type=no
1117         ol_enable_slurpd=no
1118
1119 elif test $ol_enable_ldbm = no ; then
1120         
1121         if test $ol_with_ldbm_api != auto ; then
1122                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2;
1123         fi
1124
1125         if test $ol_with_ldbm_type != auto ; then
1126                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2;
1127         fi
1128
1129         if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then
1130                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; };
1131         fi
1132
1133         ol_with_ldbm_api=no
1134         ol_with_ldbm_type=no
1135
1136 else
1137         
1138         if test $ol_with_ldbm_api = gdbm -a \
1139                 $ol_with_ldbm_type = btree ; then
1140                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; };
1141         fi
1142         if test $ol_with_ldbm_api = ndbm -a \
1143                 $ol_with_ldbm_type = btree ; then
1144                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; };
1145         fi
1146 fi
1147
1148 if test $ol_enable_slurpd = yes ; then
1149                 if test $ol_with_threads = no ; then
1150                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; };
1151         fi
1152 fi
1153
1154 echo "$ac_t""done" 1>&6
1155
1156 ## Initialize vars
1157 LDAP_DEFS=
1158 LDAP_LIBS=
1159 LDBM_DEFS=
1160 LDBM_LIBS=
1161 LTHREAD_DEFS=
1162 LTHREAD_LIBS=
1163 LUTIL_DEFS=
1164 LUTIL_LIBS=
1165
1166 LDAPD_DEFS=
1167 LDAPD_LIBS=
1168 SLAPD_DEFS=
1169 SLAPD_LIBS=
1170 SLURPD_DEFS=
1171 SLURPD_LIBS=
1172
1173 BUILD_LDAPD=no
1174 BUILD_SLAPD=no
1175 BUILD_SLURPD=no
1176
1177 BUILD_LDBM=no
1178 BUILD_PASSWD=no
1179 BUILD_SHELL=no
1180
1181 KRB_DEFS=
1182 KRB_LIBS=
1183 TERMCAP_DEFS=
1184 TERMCAP_LIBS=
1185
1186
1187 # Extract the first word of "gcc", so it can be a program name with args.
1188 set dummy gcc; ac_word=$2
1189 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1190 echo "configure:1191: checking for $ac_word" >&5
1191 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1192   echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194   if test -n "$CC"; then
1195   ac_cv_prog_CC="$CC" # Let the user override the test.
1196 else
1197   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1198   for ac_dir in $PATH; do
1199     test -z "$ac_dir" && ac_dir=.
1200     if test -f $ac_dir/$ac_word; then
1201       ac_cv_prog_CC="gcc"
1202       break
1203     fi
1204   done
1205   IFS="$ac_save_ifs"
1206 fi
1207 fi
1208 CC="$ac_cv_prog_CC"
1209 if test -n "$CC"; then
1210   echo "$ac_t""$CC" 1>&6
1211 else
1212   echo "$ac_t""no" 1>&6
1213 fi
1214
1215 if test -z "$CC"; then
1216   # Extract the first word of "cc", so it can be a program name with args.
1217 set dummy cc; ac_word=$2
1218 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1219 echo "configure:1220: checking for $ac_word" >&5
1220 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1221   echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223   if test -n "$CC"; then
1224   ac_cv_prog_CC="$CC" # Let the user override the test.
1225 else
1226   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1227   ac_prog_rejected=no
1228   for ac_dir in $PATH; do
1229     test -z "$ac_dir" && ac_dir=.
1230     if test -f $ac_dir/$ac_word; then
1231       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1232         ac_prog_rejected=yes
1233         continue
1234       fi
1235       ac_cv_prog_CC="cc"
1236       break
1237     fi
1238   done
1239   IFS="$ac_save_ifs"
1240 if test $ac_prog_rejected = yes; then
1241   # We found a bogon in the path, so make sure we never use it.
1242   set dummy $ac_cv_prog_CC
1243   shift
1244   if test $# -gt 0; then
1245     # We chose a different compiler from the bogus one.
1246     # However, it has the same basename, so the bogon will be chosen
1247     # first if we set CC to just the basename; use the full file name.
1248     shift
1249     set dummy "$ac_dir/$ac_word" "$@"
1250     shift
1251     ac_cv_prog_CC="$@"
1252   fi
1253 fi
1254 fi
1255 fi
1256 CC="$ac_cv_prog_CC"
1257 if test -n "$CC"; then
1258   echo "$ac_t""$CC" 1>&6
1259 else
1260   echo "$ac_t""no" 1>&6
1261 fi
1262
1263   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1264 fi
1265
1266 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1267 echo "configure:1268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1268
1269 ac_ext=c
1270 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1271 ac_cpp='$CPP $CPPFLAGS'
1272 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1273 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1274 cross_compiling=$ac_cv_prog_cc_cross
1275
1276 cat > conftest.$ac_ext <<EOF
1277 #line 1278 "configure"
1278 #include "confdefs.h"
1279 main(){return(0);}
1280 EOF
1281 if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1282   ac_cv_prog_cc_works=yes
1283   # If we can't run a trivial program, we are probably using a cross compiler.
1284   if (./conftest; exit) 2>/dev/null; then
1285     ac_cv_prog_cc_cross=no
1286   else
1287     ac_cv_prog_cc_cross=yes
1288   fi
1289 else
1290   echo "configure: failed program was:" >&5
1291   cat conftest.$ac_ext >&5
1292   ac_cv_prog_cc_works=no
1293 fi
1294 rm -fr conftest*
1295
1296 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1297 if test $ac_cv_prog_cc_works = no; then
1298   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1299 fi
1300 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1301 echo "configure:1302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1302 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1303 cross_compiling=$ac_cv_prog_cc_cross
1304
1305 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1306 echo "configure:1307: checking whether we are using GNU C" >&5
1307 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1308   echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310   cat > conftest.c <<EOF
1311 #ifdef __GNUC__
1312   yes;
1313 #endif
1314 EOF
1315 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1316   ac_cv_prog_gcc=yes
1317 else
1318   ac_cv_prog_gcc=no
1319 fi
1320 fi
1321
1322 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1323
1324 if test $ac_cv_prog_gcc = yes; then
1325   GCC=yes
1326   ac_test_CFLAGS="${CFLAGS+set}"
1327   ac_save_CFLAGS="$CFLAGS"
1328   CFLAGS=
1329   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1330 echo "configure:1331: checking whether ${CC-cc} accepts -g" >&5
1331 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1332   echo $ac_n "(cached) $ac_c" 1>&6
1333 else
1334   echo 'void f(){}' > conftest.c
1335 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1336   ac_cv_prog_cc_g=yes
1337 else
1338   ac_cv_prog_cc_g=no
1339 fi
1340 rm -f conftest*
1341
1342 fi
1343
1344 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1345   if test "$ac_test_CFLAGS" = set; then
1346     CFLAGS="$ac_save_CFLAGS"
1347   elif test $ac_cv_prog_cc_g = yes; then
1348     CFLAGS="-g -O2"
1349   else
1350     CFLAGS="-O2"
1351   fi
1352 else
1353   GCC=
1354   test "${CFLAGS+set}" = set || CFLAGS="-g"
1355 fi
1356
1357 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1358 echo "configure:1359: checking how to run the C preprocessor" >&5
1359 # On Suns, sometimes $CPP names a directory.
1360 if test -n "$CPP" && test -d "$CPP"; then
1361   CPP=
1362 fi
1363 if test -z "$CPP"; then
1364 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1365   echo $ac_n "(cached) $ac_c" 1>&6
1366 else
1367     # This must be in double quotes, not single quotes, because CPP may get
1368   # substituted into the Makefile and "${CC-cc}" will confuse make.
1369   CPP="${CC-cc} -E"
1370   # On the NeXT, cc -E runs the code through the compiler's parser,
1371   # not just through cpp.
1372   cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 #include <assert.h>
1376 Syntax Error
1377 EOF
1378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1379 { (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1380 ac_err=`grep -v '^ *+' conftest.out`
1381 if test -z "$ac_err"; then
1382   :
1383 else
1384   echo "$ac_err" >&5
1385   echo "configure: failed program was:" >&5
1386   cat conftest.$ac_ext >&5
1387   rm -rf conftest*
1388   CPP="${CC-cc} -E -traditional-cpp"
1389   cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1392 #include <assert.h>
1393 Syntax Error
1394 EOF
1395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1396 { (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1397 ac_err=`grep -v '^ *+' conftest.out`
1398 if test -z "$ac_err"; then
1399   :
1400 else
1401   echo "$ac_err" >&5
1402   echo "configure: failed program was:" >&5
1403   cat conftest.$ac_ext >&5
1404   rm -rf conftest*
1405   CPP=/lib/cpp
1406 fi
1407 rm -f conftest*
1408 fi
1409 rm -f conftest*
1410   ac_cv_prog_CPP="$CPP"
1411 fi
1412   CPP="$ac_cv_prog_CPP"
1413 else
1414   ac_cv_prog_CPP="$CPP"
1415 fi
1416 echo "$ac_t""$CPP" 1>&6
1417
1418 if test $ac_cv_prog_gcc = yes; then
1419     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1420 echo "configure:1421: checking whether ${CC-cc} needs -traditional" >&5
1421 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1422   echo $ac_n "(cached) $ac_c" 1>&6
1423 else
1424     ac_pattern="Autoconf.*'x'"
1425   cat > conftest.$ac_ext <<EOF
1426 #line 1427 "configure"
1427 #include "confdefs.h"
1428 #include <sgtty.h>
1429 Autoconf TIOCGETP
1430 EOF
1431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1432   egrep "$ac_pattern" >/dev/null 2>&1; then
1433   rm -rf conftest*
1434   ac_cv_prog_gcc_traditional=yes
1435 else
1436   rm -rf conftest*
1437   ac_cv_prog_gcc_traditional=no
1438 fi
1439 rm -f conftest*
1440
1441
1442   if test $ac_cv_prog_gcc_traditional = no; then
1443     cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1446 #include <termio.h>
1447 Autoconf TCGETA
1448 EOF
1449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1450   egrep "$ac_pattern" >/dev/null 2>&1; then
1451   rm -rf conftest*
1452   ac_cv_prog_gcc_traditional=yes
1453 fi
1454 rm -f conftest*
1455
1456   fi
1457 fi
1458
1459 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1460   if test $ac_cv_prog_gcc_traditional = yes; then
1461     CC="$CC -traditional"
1462   fi
1463 fi
1464
1465
1466 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1467 echo "configure:1468: checking whether ln -s works" >&5
1468 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   rm -f conftestdata
1472 if ln -s X conftestdata 2>/dev/null
1473 then
1474   rm -f conftestdata
1475   ac_cv_prog_LN_S="ln -s"
1476 else
1477   ac_cv_prog_LN_S=ln
1478 fi
1479 fi
1480 LN_S="$ac_cv_prog_LN_S"
1481 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1482   echo "$ac_t""yes" 1>&6
1483 else
1484   echo "$ac_t""no" 1>&6
1485 fi
1486
1487 # Find a good install program.  We prefer a C program (faster),
1488 # so one script is as good as another.  But avoid the broken or
1489 # incompatible versions:
1490 # SysV /etc/install, /usr/sbin/install
1491 # SunOS /usr/etc/install
1492 # IRIX /sbin/install
1493 # AIX /bin/install
1494 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1495 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1496 # ./install, which can be erroneously created by make from ./install.sh.
1497 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1498 echo "configure:1499: checking for a BSD compatible install" >&5
1499 if test -z "$INSTALL"; then
1500 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1501   echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1504   for ac_dir in $PATH; do
1505     # Account for people who put trailing slashes in PATH elements.
1506     case "$ac_dir/" in
1507     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1508     *)
1509       # OSF1 and SCO ODT 3.0 have their own names for install.
1510       for ac_prog in ginstall installbsd scoinst install; do
1511         if test -f $ac_dir/$ac_prog; then
1512           if test $ac_prog = install &&
1513             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1514             # AIX install.  It has an incompatible calling convention.
1515             # OSF/1 installbsd also uses dspmsg, but is usable.
1516             :
1517           else
1518             ac_cv_path_install="$ac_dir/$ac_prog -c"
1519             break 2
1520           fi
1521         fi
1522       done
1523       ;;
1524     esac
1525   done
1526   IFS="$ac_save_IFS"
1527
1528 fi
1529   if test "${ac_cv_path_install+set}" = set; then
1530     INSTALL="$ac_cv_path_install"
1531   else
1532     # As a last resort, use the slow shell script.  We don't cache a
1533     # path for INSTALL within a source directory, because that will
1534     # break other packages using the cache if that directory is
1535     # removed, or if the path is relative.
1536     INSTALL="$ac_install_sh"
1537   fi
1538 fi
1539 echo "$ac_t""$INSTALL" 1>&6
1540
1541 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1542 # It thinks the first close brace ends the variable substitution.
1543 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1544
1545 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1546
1547 # Extract the first word of "ranlib", so it can be a program name with args.
1548 set dummy ranlib; ac_word=$2
1549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1550 echo "configure:1551: checking for $ac_word" >&5
1551 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1552   echo $ac_n "(cached) $ac_c" 1>&6
1553 else
1554   if test -n "$RANLIB"; then
1555   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1556 else
1557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1558   for ac_dir in $PATH; do
1559     test -z "$ac_dir" && ac_dir=.
1560     if test -f $ac_dir/$ac_word; then
1561       ac_cv_prog_RANLIB="ranlib"
1562       break
1563     fi
1564   done
1565   IFS="$ac_save_ifs"
1566   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1567 fi
1568 fi
1569 RANLIB="$ac_cv_prog_RANLIB"
1570 if test -n "$RANLIB"; then
1571   echo "$ac_t""$RANLIB" 1>&6
1572 else
1573   echo "$ac_t""no" 1>&6
1574 fi
1575
1576 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1577 echo "configure:1578: checking whether ${MAKE-make} sets \${MAKE}" >&5
1578 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1579 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1580   echo $ac_n "(cached) $ac_c" 1>&6
1581 else
1582   cat > conftestmake <<\EOF
1583 all:
1584         @echo 'ac_maketemp="${MAKE}"'
1585 EOF
1586 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1587 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1588 if test -n "$ac_maketemp"; then
1589   eval ac_cv_prog_make_${ac_make}_set=yes
1590 else
1591   eval ac_cv_prog_make_${ac_make}_set=no
1592 fi
1593 rm -f conftestmake
1594 fi
1595 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1596   echo "$ac_t""yes" 1>&6
1597   SET_MAKE=
1598 else
1599   echo "$ac_t""no" 1>&6
1600   SET_MAKE="MAKE=${MAKE-make}"
1601 fi
1602
1603
1604 # Extract the first word of "sendmail", so it can be a program name with args.
1605 set dummy sendmail; ac_word=$2
1606 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1607 echo "configure:1608: checking for $ac_word" >&5
1608 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1609   echo $ac_n "(cached) $ac_c" 1>&6
1610 else
1611   case "$SENDMAIL" in
1612   /*)
1613   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1614   ;;
1615   *)
1616   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1617   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
1618     test -z "$ac_dir" && ac_dir=.
1619     if test -f $ac_dir/$ac_word; then
1620       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1621       break
1622     fi
1623   done
1624   IFS="$ac_save_ifs"
1625   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1626   ;;
1627 esac
1628 fi
1629 SENDMAIL="$ac_cv_path_SENDMAIL"
1630 if test -n "$SENDMAIL"; then
1631   echo "$ac_t""$SENDMAIL" 1>&6
1632 else
1633   echo "$ac_t""no" 1>&6
1634 fi
1635
1636 # Extract the first word of "vi", so it can be a program name with args.
1637 set dummy vi; ac_word=$2
1638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1639 echo "configure:1640: checking for $ac_word" >&5
1640 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1641   echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643   case "$EDITOR" in
1644   /*)
1645   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1646   ;;
1647   *)
1648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1649   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1650     test -z "$ac_dir" && ac_dir=.
1651     if test -f $ac_dir/$ac_word; then
1652       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1653       break
1654     fi
1655   done
1656   IFS="$ac_save_ifs"
1657   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1658   ;;
1659 esac
1660 fi
1661 EDITOR="$ac_cv_path_EDITOR"
1662 if test -n "$EDITOR"; then
1663   echo "$ac_t""$EDITOR" 1>&6
1664 else
1665   echo "$ac_t""no" 1>&6
1666 fi
1667
1668 # Extract the first word of "finger", so it can be a program name with args.
1669 set dummy finger; ac_word=$2
1670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1671 echo "configure:1672: checking for $ac_word" >&5
1672 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1673   echo $ac_n "(cached) $ac_c" 1>&6
1674 else
1675   case "$FINGER" in
1676   /*)
1677   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1678   ;;
1679   *)
1680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1681   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1682     test -z "$ac_dir" && ac_dir=.
1683     if test -f $ac_dir/$ac_word; then
1684       ac_cv_path_FINGER="$ac_dir/$ac_word"
1685       break
1686     fi
1687   done
1688   IFS="$ac_save_ifs"
1689   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1690   ;;
1691 esac
1692 fi
1693 FINGER="$ac_cv_path_FINGER"
1694 if test -n "$FINGER"; then
1695   echo "$ac_t""$FINGER" 1>&6
1696 else
1697   echo "$ac_t""no" 1>&6
1698 fi
1699
1700
1701
1702 echo $ac_n "checking for socket""... $ac_c" 1>&6
1703 echo "configure:1704: checking for socket" >&5
1704 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1705   echo $ac_n "(cached) $ac_c" 1>&6
1706 else
1707   cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1710 /* System header to define __stub macros and hopefully few prototypes,
1711     which can conflict with char socket(); below.  */
1712 #include <assert.h>
1713 /* Override any gcc2 internal prototype to avoid an error.  */
1714 /* We use char because int might match the return type of a gcc2
1715     builtin and then its argument prototype would still apply.  */
1716 char socket();
1717
1718 int main() {
1719
1720 /* The GNU C library defines this for functions which it implements
1721     to always fail with ENOSYS.  Some functions are actually named
1722     something starting with __ and the normal name is an alias.  */
1723 #if defined (__stub_socket) || defined (__stub___socket)
1724 choke me
1725 #else
1726 socket();
1727 #endif
1728
1729 ; return 0; }
1730 EOF
1731 if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1732   rm -rf conftest*
1733   eval "ac_cv_func_socket=yes"
1734 else
1735   echo "configure: failed program was:" >&5
1736   cat conftest.$ac_ext >&5
1737   rm -rf conftest*
1738   eval "ac_cv_func_socket=no"
1739 fi
1740 rm -f conftest*
1741 fi
1742
1743 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
1744   echo "$ac_t""yes" 1>&6
1745   :
1746 else
1747   echo "$ac_t""no" 1>&6
1748         echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
1749 echo "configure:1750: checking for gethostname in -lnsl" >&5
1750 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
1751 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1752   echo $ac_n "(cached) $ac_c" 1>&6
1753 else
1754   ac_save_LIBS="$LIBS"
1755 LIBS="-lnsl  $LIBS"
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1758 "configure"
1758 #include "confdefs.h"
1759 /* Override any gcc2 internal prototype to avoid an error.  */
1760 /* We use char because int might match the return type of a gcc2
1761     builtin and then its argument prototype would still apply.  */
1762 char gethostname();
1763
1764 int main() {
1765 gethostname()
1766 ; return 0; }
1767 EOF
1768 if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1769   rm -rf conftest*
1770   eval "ac_cv_lib_$ac_lib_var=yes"
1771 else
1772   echo "configure: failed program was:" >&5
1773   cat conftest.$ac_ext >&5
1774   rm -rf conftest*
1775   eval "ac_cv_lib_$ac_lib_var=no"
1776 fi
1777 rm -f conftest*
1778 LIBS="$ac_save_LIBS"
1779
1780 fi
1781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1782   echo "$ac_t""yes" 1>&6
1783     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1784     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1785   cat >> confdefs.h <<EOF
1786 #define $ac_tr_lib 1
1787 EOF
1788
1789   LIBS="-lnsl $LIBS"
1790
1791 else
1792   echo "$ac_t""no" 1>&6
1793 fi
1794
1795         echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1796 echo "configure:1797: checking for socket in -lsocket" >&5
1797 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1798 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1799   echo $ac_n "(cached) $ac_c" 1>&6
1800 else
1801   ac_save_LIBS="$LIBS"
1802 LIBS="-lsocket  $LIBS"
1803 cat > conftest.$ac_ext <<EOF
1804 #line 1805 "configure"
1805 #include "confdefs.h"
1806 /* Override any gcc2 internal prototype to avoid an error.  */
1807 /* We use char because int might match the return type of a gcc2
1808     builtin and then its argument prototype would still apply.  */
1809 char socket();
1810
1811 int main() {
1812 socket()
1813 ; return 0; }
1814 EOF
1815 if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1816   rm -rf conftest*
1817   eval "ac_cv_lib_$ac_lib_var=yes"
1818 else
1819   echo "configure: failed program was:" >&5
1820   cat conftest.$ac_ext >&5
1821   rm -rf conftest*
1822   eval "ac_cv_lib_$ac_lib_var=no"
1823 fi
1824 rm -f conftest*
1825 LIBS="$ac_save_LIBS"
1826
1827 fi
1828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1829   echo "$ac_t""yes" 1>&6
1830     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1831     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1832   cat >> confdefs.h <<EOF
1833 #define $ac_tr_lib 1
1834 EOF
1835
1836   LIBS="-lsocket $LIBS"
1837
1838 else
1839   echo "$ac_t""no" 1>&6
1840 fi
1841
1842         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
1843 echo "configure:1844: checking for socket in -linet" >&5
1844 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
1845 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1846   echo $ac_n "(cached) $ac_c" 1>&6
1847 else
1848   ac_save_LIBS="$LIBS"
1849 LIBS="-linet  $LIBS"
1850 cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853 /* Override any gcc2 internal prototype to avoid an error.  */
1854 /* We use char because int might match the return type of a gcc2
1855     builtin and then its argument prototype would still apply.  */
1856 char socket();
1857
1858 int main() {
1859 socket()
1860 ; return 0; }
1861 EOF
1862 if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1863   rm -rf conftest*
1864   eval "ac_cv_lib_$ac_lib_var=yes"
1865 else
1866   echo "configure: failed program was:" >&5
1867   cat conftest.$ac_ext >&5
1868   rm -rf conftest*
1869   eval "ac_cv_lib_$ac_lib_var=no"
1870 fi
1871 rm -f conftest*
1872 LIBS="$ac_save_LIBS"
1873
1874 fi
1875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1876   echo "$ac_t""yes" 1>&6
1877     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1878     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1879   cat >> confdefs.h <<EOF
1880 #define $ac_tr_lib 1
1881 EOF
1882
1883   LIBS="-linet $LIBS"
1884
1885 else
1886   echo "$ac_t""no" 1>&6
1887 fi
1888
1889
1890 fi
1891
1892
1893 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
1894         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
1895 do
1896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1898 echo "configure:1899: checking for $ac_hdr" >&5
1899 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1900   echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902   cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <$ac_hdr>
1906 EOF
1907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1908 { (eval echo configure:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1909 ac_err=`grep -v '^ *+' conftest.out`
1910 if test -z "$ac_err"; then
1911   rm -rf conftest*
1912   eval "ac_cv_header_$ac_safe=yes"
1913 else
1914   echo "$ac_err" >&5
1915   echo "configure: failed program was:" >&5
1916   cat conftest.$ac_ext >&5
1917   rm -rf conftest*
1918   eval "ac_cv_header_$ac_safe=no"
1919 fi
1920 rm -f conftest*
1921 fi
1922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1923   echo "$ac_t""yes" 1>&6
1924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1925   cat >> confdefs.h <<EOF
1926 #define $ac_tr_hdr 1
1927 EOF
1928  
1929 else
1930   echo "$ac_t""no" 1>&6
1931 fi
1932 done
1933
1934
1935         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
1936                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
1937 echo "configure:1938: checking for main in -lkrb4" >&5
1938 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
1939 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1940   echo $ac_n "(cached) $ac_c" 1>&6
1941 else
1942   ac_save_LIBS="$LIBS"
1943 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
1944 cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947
1948 int main() {
1949 main()
1950 ; return 0; }
1951 EOF
1952 if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1953   rm -rf conftest*
1954   eval "ac_cv_lib_$ac_lib_var=yes"
1955 else
1956   echo "configure: failed program was:" >&5
1957   cat conftest.$ac_ext >&5
1958   rm -rf conftest*
1959   eval "ac_cv_lib_$ac_lib_var=no"
1960 fi
1961 rm -f conftest*
1962 LIBS="$ac_save_LIBS"
1963
1964 fi
1965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1966   echo "$ac_t""yes" 1>&6
1967   have_k5=yes
1968 else
1969   echo "$ac_t""no" 1>&6
1970 have_k5=no
1971 fi
1972
1973
1974                 if test $have_k5 = yes ; then
1975                         ol_with_kerberos=found
1976                         ol_link_kerberos=yes
1977
1978                         KRB_DEFS="-DKERBEROS"
1979                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
1980                 fi
1981         fi
1982 fi
1983 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
1984         for ac_hdr in krb.h des.h
1985 do
1986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1988 echo "configure:1989: checking for $ac_hdr" >&5
1989 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1990   echo $ac_n "(cached) $ac_c" 1>&6
1991 else
1992   cat > conftest.$ac_ext <<EOF
1993 #line 1994 "configure"
1994 #include "confdefs.h"
1995 #include <$ac_hdr>
1996 EOF
1997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1998 { (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1999 ac_err=`grep -v '^ *+' conftest.out`
2000 if test -z "$ac_err"; then
2001   rm -rf conftest*
2002   eval "ac_cv_header_$ac_safe=yes"
2003 else
2004   echo "$ac_err" >&5
2005   echo "configure: failed program was:" >&5
2006   cat conftest.$ac_ext >&5
2007   rm -rf conftest*
2008   eval "ac_cv_header_$ac_safe=no"
2009 fi
2010 rm -f conftest*
2011 fi
2012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2013   echo "$ac_t""yes" 1>&6
2014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2015   cat >> confdefs.h <<EOF
2016 #define $ac_tr_hdr 1
2017 EOF
2018  
2019 else
2020   echo "$ac_t""no" 1>&6
2021 fi
2022 done
2023
2024
2025         if test $ac_cv_header_krb_h = yes ; then
2026                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
2027 echo "configure:2028: checking for main in -lkrb" >&5
2028 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
2029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2030   echo $ac_n "(cached) $ac_c" 1>&6
2031 else
2032   ac_save_LIBS="$LIBS"
2033 LIBS="-lkrb -ldes $LIBS"
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037
2038 int main() {
2039 main()
2040 ; return 0; }
2041 EOF
2042 if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2043   rm -rf conftest*
2044   eval "ac_cv_lib_$ac_lib_var=yes"
2045 else
2046   echo "configure: failed program was:" >&5
2047   cat conftest.$ac_ext >&5
2048   rm -rf conftest*
2049   eval "ac_cv_lib_$ac_lib_var=no"
2050 fi
2051 rm -f conftest*
2052 LIBS="$ac_save_LIBS"
2053
2054 fi
2055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2056   echo "$ac_t""yes" 1>&6
2057   have_k4=yes
2058 else
2059   echo "$ac_t""no" 1>&6
2060 have_k4=no
2061 fi
2062
2063
2064                 if test $have_k4 = yes ; then
2065                         ol_with_kerberos=found
2066                         ol_link_kerberos=yes
2067
2068                         KRB_DEFS="-DKERBEROS"
2069                         KRB_LIBS="-lkrb -ldes"
2070                 fi
2071         fi
2072 fi
2073
2074
2075 ol_link_threads=no
2076 if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
2077         for ac_hdr in pthread.h sched.h
2078 do
2079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_hdr" >&5
2082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2083   echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085   cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <$ac_hdr>
2089 EOF
2090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2091 { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2092 ac_err=`grep -v '^ *+' conftest.out`
2093 if test -z "$ac_err"; then
2094   rm -rf conftest*
2095   eval "ac_cv_header_$ac_safe=yes"
2096 else
2097   echo "$ac_err" >&5
2098   echo "configure: failed program was:" >&5
2099   cat conftest.$ac_ext >&5
2100   rm -rf conftest*
2101   eval "ac_cv_header_$ac_safe=no"
2102 fi
2103 rm -f conftest*
2104 fi
2105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2106   echo "$ac_t""yes" 1>&6
2107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2108   cat >> confdefs.h <<EOF
2109 #define $ac_tr_hdr 1
2110 EOF
2111  
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115 done
2116
2117
2118         if test $ac_cv_header_pthread_h = yes ; then
2119                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
2120 echo "configure:2121: checking POSIX thread version" >&5
2121 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
2122   echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124   
2125         cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128
2129 #               include <pthread.h>
2130                 /* this check could be improved */
2131 #               ifdef PTHREAD_ONCE_INIT
2132                         final
2133 #               endif
2134         
2135 EOF
2136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2137   egrep "final" >/dev/null 2>&1; then
2138   rm -rf conftest*
2139   ol_pthread_final=yes
2140 else
2141   rm -rf conftest*
2142   ol_pthread_final=no
2143 fi
2144 rm -f conftest*
2145
2146
2147         cat > conftest.$ac_ext <<EOF
2148 #line 2149 "configure"
2149 #include "confdefs.h"
2150
2151 #               include <pthread.h>
2152                 /* this check could be improved */
2153 #               ifdef pthread_once_init
2154                         draft4
2155 #               endif
2156         
2157 EOF
2158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2159   egrep "draft4" >/dev/null 2>&1; then
2160   rm -rf conftest*
2161   ol_pthread_draft4=yes
2162 else
2163   rm -rf conftest*
2164   ol_pthread_draft4=no
2165 fi
2166 rm -f conftest*
2167
2168
2169         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
2170                 ol_cv_pthread_version=final
2171         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
2172                 ol_cv_pthread_version=draft4
2173         else
2174                 ol_cv_pthread_version=unknown
2175         fi
2176
2177 fi
2178
2179 echo "$ac_t""$ol_cv_pthread_version" 1>&6
2180
2181
2182                 if test $ol_cv_pthread_version = final ; then
2183                         LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS"
2184                 elif test $ol_cv_pthread_version = draft4 ; then
2185                         LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS"
2186                 else
2187                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
2188                 fi
2189
2190                 # consider threads found
2191                 ol_with_threads=found
2192
2193                 
2194 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
2195 echo "configure:2196: checking for LinuxThreads" >&5
2196 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
2197   echo $ac_n "(cached) $ac_c" 1>&6
2198 else
2199   
2200         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
2201         if test "$res" -gt 0 ; then
2202                 ol_cv_linux_threads=yes
2203         else
2204                 ol_cv_linux_threads=no
2205         fi
2206
2207 fi
2208
2209 echo "$ac_t""$ol_cv_linux_threads" 1>&6
2210
2211
2212                 if test $ol_cv_linux_threads = yes ; then
2213                         LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS"
2214                 fi
2215
2216                 
2217                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
2218 echo "configure:2219: checking for pthread_create" >&5
2219 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
2220   echo $ac_n "(cached) $ac_c" 1>&6
2221 else
2222   cat > conftest.$ac_ext <<EOF
2223 #line 2224 "configure"
2224 #include "confdefs.h"
2225 /* System header to define __stub macros and hopefully few prototypes,
2226     which can conflict with char pthread_create(); below.  */
2227 #include <assert.h>
2228 /* Override any gcc2 internal prototype to avoid an error.  */
2229 /* We use char because int might match the return type of a gcc2
2230     builtin and then its argument prototype would still apply.  */
2231 char pthread_create();
2232
2233 int main() {
2234
2235 /* The GNU C library defines this for functions which it implements
2236     to always fail with ENOSYS.  Some functions are actually named
2237     something starting with __ and the normal name is an alias.  */
2238 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
2239 choke me
2240 #else
2241 pthread_create();
2242 #endif
2243
2244 ; return 0; }
2245 EOF
2246 if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2247   rm -rf conftest*
2248   eval "ac_cv_func_pthread_create=yes"
2249 else
2250   echo "configure: failed program was:" >&5
2251   cat conftest.$ac_ext >&5
2252   rm -rf conftest*
2253   eval "ac_cv_func_pthread_create=no"
2254 fi
2255 rm -f conftest*
2256 fi
2257
2258 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
2259   echo "$ac_t""yes" 1>&6
2260   ol_link_threads=yes
2261 else
2262   echo "$ac_t""no" 1>&6
2263 fi
2264
2265
2266                 if test $ol_link_threads = no ; then
2267                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
2268 echo "configure:2269: checking for pthread_create with -pthread" >&5
2269 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
2270   echo $ac_n "(cached) $ac_c" 1>&6
2271 else
2272   
2273                                                                 save_LIBS="$LIBS"
2274                                 LIBS="-pthread $LIBS"
2275                                 cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278 #include <pthread.h>
2279 int main() {
2280
2281                                         pthread_create((pthread_t*) 0,
2282                                                 (pthread_attr_t*) 0, 0, 0);
2283                                         
2284 ; return 0; }
2285 EOF
2286 if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2287   rm -rf conftest*
2288   ol_cv_pthread_flag=yes
2289 else
2290   echo "configure: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   rm -rf conftest*
2293   ol_cv_pthread_flag=no
2294 fi
2295 rm -f conftest*
2296                                                                 LIBS="$save_LIBS"
2297                         
2298 fi
2299
2300 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
2301
2302                         if test $ol_cv_pthread_flag = yes ; then
2303                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
2304                                 ol_link_threads=posix
2305                         fi
2306                 fi
2307
2308                 if test $ol_link_threads = no ; then
2309                                                 save_LIBS="$LIBS"
2310                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2311 echo "configure:2312: checking for pthread_create in -lpthread" >&5
2312 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2313 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2314   echo $ac_n "(cached) $ac_c" 1>&6
2315 else
2316   ac_save_LIBS="$LIBS"
2317 LIBS="-lpthread  $LIBS"
2318 cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 /* Override any gcc2 internal prototype to avoid an error.  */
2322 /* We use char because int might match the return type of a gcc2
2323     builtin and then its argument prototype would still apply.  */
2324 char pthread_create();
2325
2326 int main() {
2327 pthread_create()
2328 ; return 0; }
2329 EOF
2330 if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2331   rm -rf conftest*
2332   eval "ac_cv_lib_$ac_lib_var=yes"
2333 else
2334   echo "configure: failed program was:" >&5
2335   cat conftest.$ac_ext >&5
2336   rm -rf conftest*
2337   eval "ac_cv_lib_$ac_lib_var=no"
2338 fi
2339 rm -f conftest*
2340 LIBS="$ac_save_LIBS"
2341
2342 fi
2343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2344   echo "$ac_t""yes" 1>&6
2345   
2346                                 ol_link_threads=posix
2347                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
2348 else
2349   echo "$ac_t""no" 1>&6
2350 fi
2351
2352                         LIBS="$save_LIBS"
2353                 fi
2354
2355                 if test $ol_link_threads = no ; then
2356                                                 save_LIBS="$LIBS"
2357                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
2358 echo "configure:2359: checking for pthread_create in -lc_r" >&5
2359 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2361   echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363   ac_save_LIBS="$LIBS"
2364 LIBS="-lc_r  $LIBS"
2365 cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 /* Override any gcc2 internal prototype to avoid an error.  */
2369 /* We use char because int might match the return type of a gcc2
2370     builtin and then its argument prototype would still apply.  */
2371 char pthread_create();
2372
2373 int main() {
2374 pthread_create()
2375 ; return 0; }
2376 EOF
2377 if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2378   rm -rf conftest*
2379   eval "ac_cv_lib_$ac_lib_var=yes"
2380 else
2381   echo "configure: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   rm -rf conftest*
2384   eval "ac_cv_lib_$ac_lib_var=no"
2385 fi
2386 rm -f conftest*
2387 LIBS="$ac_save_LIBS"
2388
2389 fi
2390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2391   echo "$ac_t""yes" 1>&6
2392   
2393                                 ol_link_threads=posix
2394                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
2395 else
2396   echo "$ac_t""no" 1>&6
2397 fi
2398
2399                         LIBS="$save_LIBS"
2400                 fi
2401
2402                 if test $ol_link_threads = no ; then
2403                                                 save_LIBS="$LIBS"
2404                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2405 echo "configure:2406: checking for pthread_create in -lpthread" >&5
2406 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2407 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2408   echo $ac_n "(cached) $ac_c" 1>&6
2409 else
2410   ac_save_LIBS="$LIBS"
2411 LIBS="-lpthread -lmach -lexc -lc $LIBS"
2412 cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.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 pthread_create();
2419
2420 int main() {
2421 pthread_create()
2422 ; return 0; }
2423 EOF
2424 if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2425   rm -rf conftest*
2426   eval "ac_cv_lib_$ac_lib_var=yes"
2427 else
2428   echo "configure: failed program was:" >&5
2429   cat conftest.$ac_ext >&5
2430   rm -rf conftest*
2431   eval "ac_cv_lib_$ac_lib_var=no"
2432 fi
2433 rm -f conftest*
2434 LIBS="$ac_save_LIBS"
2435
2436 fi
2437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2438   echo "$ac_t""yes" 1>&6
2439   
2440                                 ol_link_threads=posix
2441                                 LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS"
2442                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"
2443 else
2444   echo "$ac_t""no" 1>&6
2445 fi
2446
2447                         LIBS="$save_LIBS"
2448                 fi
2449
2450                 if test $ol_link_threads != no ; then
2451                                                                                                 save_LIBS="$LIBS"
2452                         LIBS="$LTHREAD_LIBS $LIBS"
2453                         for ac_func in sched_yield pthread_yield
2454 do
2455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2456 echo "configure:2457: checking for $ac_func" >&5
2457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2458   echo $ac_n "(cached) $ac_c" 1>&6
2459 else
2460   cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463 /* System header to define __stub macros and hopefully few prototypes,
2464     which can conflict with char $ac_func(); below.  */
2465 #include <assert.h>
2466 /* Override any gcc2 internal prototype to avoid an error.  */
2467 /* We use char because int might match the return type of a gcc2
2468     builtin and then its argument prototype would still apply.  */
2469 char $ac_func();
2470
2471 int main() {
2472
2473 /* The GNU C library defines this for functions which it implements
2474     to always fail with ENOSYS.  Some functions are actually named
2475     something starting with __ and the normal name is an alias.  */
2476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2477 choke me
2478 #else
2479 $ac_func();
2480 #endif
2481
2482 ; return 0; }
2483 EOF
2484 if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2485   rm -rf conftest*
2486   eval "ac_cv_func_$ac_func=yes"
2487 else
2488   echo "configure: failed program was:" >&5
2489   cat conftest.$ac_ext >&5
2490   rm -rf conftest*
2491   eval "ac_cv_func_$ac_func=no"
2492 fi
2493 rm -f conftest*
2494 fi
2495
2496 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2497   echo "$ac_t""yes" 1>&6
2498     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2499   cat >> confdefs.h <<EOF
2500 #define $ac_tr_func 1
2501 EOF
2502  
2503 else
2504   echo "$ac_t""no" 1>&6
2505 fi
2506 done
2507
2508                         LIBS="$save_LIBS"
2509
2510                         if test $ac_cv_func_sched_yield = no -a \
2511                                 $ac_cv_func_pthread_yield = no ; then
2512
2513                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
2514                                 { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; }
2515                         fi
2516                 else
2517                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
2518                 fi
2519         fi
2520
2521         if test $ol_with_threads = posix ; then
2522                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
2523         fi
2524 fi
2525
2526 if test $ol_with_threads = manual ; then
2527                 $ol_link_threads=yes
2528
2529         echo "configure: warning: thread defines and link options must be set manually" 1>&2
2530
2531         for ac_hdr in pthread.h sched.h
2532 do
2533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2535 echo "configure:2536: checking for $ac_hdr" >&5
2536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2537   echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539   cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542 #include <$ac_hdr>
2543 EOF
2544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2545 { (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2546 ac_err=`grep -v '^ *+' conftest.out`
2547 if test -z "$ac_err"; then
2548   rm -rf conftest*
2549   eval "ac_cv_header_$ac_safe=yes"
2550 else
2551   echo "$ac_err" >&5
2552   echo "configure: failed program was:" >&5
2553   cat conftest.$ac_ext >&5
2554   rm -rf conftest*
2555   eval "ac_cv_header_$ac_safe=no"
2556 fi
2557 rm -f conftest*
2558 fi
2559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2560   echo "$ac_t""yes" 1>&6
2561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2562   cat >> confdefs.h <<EOF
2563 #define $ac_tr_hdr 1
2564 EOF
2565  
2566 else
2567   echo "$ac_t""no" 1>&6
2568 fi
2569 done
2570
2571         for ac_func in sched_yield pthread_yield
2572 do
2573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2574 echo "configure:2575: checking for $ac_func" >&5
2575 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2576   echo $ac_n "(cached) $ac_c" 1>&6
2577 else
2578   cat > conftest.$ac_ext <<EOF
2579 #line 2580 "configure"
2580 #include "confdefs.h"
2581 /* System header to define __stub macros and hopefully few prototypes,
2582     which can conflict with char $ac_func(); below.  */
2583 #include <assert.h>
2584 /* Override any gcc2 internal prototype to avoid an error.  */
2585 /* We use char because int might match the return type of a gcc2
2586     builtin and then its argument prototype would still apply.  */
2587 char $ac_func();
2588
2589 int main() {
2590
2591 /* The GNU C library defines this for functions which it implements
2592     to always fail with ENOSYS.  Some functions are actually named
2593     something starting with __ and the normal name is an alias.  */
2594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2595 choke me
2596 #else
2597 $ac_func();
2598 #endif
2599
2600 ; return 0; }
2601 EOF
2602 if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2603   rm -rf conftest*
2604   eval "ac_cv_func_$ac_func=yes"
2605 else
2606   echo "configure: failed program was:" >&5
2607   cat conftest.$ac_ext >&5
2608   rm -rf conftest*
2609   eval "ac_cv_func_$ac_func=no"
2610 fi
2611 rm -f conftest*
2612 fi
2613
2614 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2615   echo "$ac_t""yes" 1>&6
2616     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2617   cat >> confdefs.h <<EOF
2618 #define $ac_tr_func 1
2619 EOF
2620  
2621 else
2622   echo "$ac_t""no" 1>&6
2623 fi
2624 done
2625
2626         
2627 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
2628 echo "configure:2629: checking for LinuxThreads" >&5
2629 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
2630   echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632   
2633         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
2634         if test "$res" -gt 0 ; then
2635                 ol_cv_linux_threads=yes
2636         else
2637                 ol_cv_linux_threads=no
2638         fi
2639
2640 fi
2641
2642 echo "$ac_t""$ol_cv_linux_threads" 1>&6
2643
2644 fi
2645
2646 if test $ol_link_threads = no ; then
2647         if test $ol_with_threads = yes ; then
2648                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
2649         fi
2650
2651         if test $ol_with_threads = auto ; then
2652                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
2653                 $ol_with_threads = no
2654         fi
2655
2656         LTHREAD_DEFS="-DNO_THREADS"
2657         LTHREAD_LIBS=""
2658 fi
2659
2660 ol_link_ldbm=no 
2661 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
2662         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
2663 echo "configure:2664: checking for DB2 library" >&5
2664 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667         ol_LIBS="$LIBS"
2668         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
2669 echo "configure:2670: checking for db_open in -ldb" >&5
2670 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
2671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2672   echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674   ac_save_LIBS="$LIBS"
2675 LIBS="-ldb  $LIBS"
2676 cat > conftest.$ac_ext <<EOF
2677 #line 2678 "configure"
2678 #include "confdefs.h"
2679 /* Override any gcc2 internal prototype to avoid an error.  */
2680 /* We use char because int might match the return type of a gcc2
2681     builtin and then its argument prototype would still apply.  */
2682 char db_open();
2683
2684 int main() {
2685 db_open()
2686 ; return 0; }
2687 EOF
2688 if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2689   rm -rf conftest*
2690   eval "ac_cv_lib_$ac_lib_var=yes"
2691 else
2692   echo "configure: failed program was:" >&5
2693   cat conftest.$ac_ext >&5
2694   rm -rf conftest*
2695   eval "ac_cv_lib_$ac_lib_var=no"
2696 fi
2697 rm -f conftest*
2698 LIBS="$ac_save_LIBS"
2699
2700 fi
2701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2702   echo "$ac_t""yes" 1>&6
2703   ol_cv_lib_db2=-ldb
2704 else
2705   echo "$ac_t""no" 1>&6
2706 ol_cv_lib_db2=no
2707 fi
2708
2709         LIBS="$ol_LIBS"
2710
2711 fi
2712
2713 echo "$ac_t""$ol_cv_lib_db2" 1>&6
2714
2715 for ac_hdr in db.h
2716 do
2717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2719 echo "configure:2720: checking for $ac_hdr" >&5
2720 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2721   echo $ac_n "(cached) $ac_c" 1>&6
2722 else
2723   cat > conftest.$ac_ext <<EOF
2724 #line 2725 "configure"
2725 #include "confdefs.h"
2726 #include <$ac_hdr>
2727 EOF
2728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2729 { (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2730 ac_err=`grep -v '^ *+' conftest.out`
2731 if test -z "$ac_err"; then
2732   rm -rf conftest*
2733   eval "ac_cv_header_$ac_safe=yes"
2734 else
2735   echo "$ac_err" >&5
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738   rm -rf conftest*
2739   eval "ac_cv_header_$ac_safe=no"
2740 fi
2741 rm -f conftest*
2742 fi
2743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2744   echo "$ac_t""yes" 1>&6
2745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2746   cat >> confdefs.h <<EOF
2747 #define $ac_tr_hdr 1
2748 EOF
2749  
2750 else
2751   echo "$ac_t""no" 1>&6
2752 fi
2753 done
2754
2755 if test $ac_cv_header_db_h = yes ; then
2756         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
2757 echo "configure:2758: checking if db.h is DB2" >&5
2758 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
2759   echo $ac_n "(cached) $ac_c" 1>&6
2760 else
2761   
2762                 cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765
2766 #                       include <db.h>
2767                         /* this check could be improved */
2768 #                       ifdef DB_VERSION_MAJOR
2769 #                               if DB_VERSION_MAJOR == 2
2770                                         __db_version_2
2771 #                               endif
2772 #                       endif
2773                 
2774 EOF
2775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2776   egrep "__db_version_2" >/dev/null 2>&1; then
2777   rm -rf conftest*
2778   ol_cv_header_db2=yes
2779 else
2780   rm -rf conftest*
2781   ol_cv_header_db2=no
2782 fi
2783 rm -f conftest*
2784
2785 fi
2786
2787 echo "$ac_t""$ol_cv_header_db2" 1>&6
2788 else
2789         ol_cv_header_db2=no
2790 fi
2791
2792
2793  
2794  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
2795 echo "configure:2796: checking for Berkeley DB2" >&5
2796 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
2797   echo $ac_n "(cached) $ac_c" 1>&6
2798 else
2799   
2800         if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then
2801                 ol_cv_berkeley_db2=no
2802         else
2803                 ol_cv_berkeley_db2=yes
2804         fi
2805
2806 fi
2807
2808 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
2809
2810
2811         if test $ol_cv_berkeley_db2 = yes ; then
2812                 ol_link_ldbm=db2
2813                 ol_with_ldbm_api=db2
2814
2815                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
2816
2817                 if test $ol_with_ldbm_type = hash ; then
2818                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
2819                 else
2820                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
2821                 fi
2822
2823                                                 if test $ol_cv_lib_db2 != yes ; then
2824                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
2825                 fi
2826         fi
2827 fi
2828
2829 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
2830         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
2831 echo "configure:2832: checking for Berkeley DB library" >&5
2832 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
2833   echo $ac_n "(cached) $ac_c" 1>&6
2834 else
2835         ol_LIBS="$LIBS"
2836         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
2837 echo "configure:2838: checking for dbopen" >&5
2838 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
2839   echo $ac_n "(cached) $ac_c" 1>&6
2840 else
2841   cat > conftest.$ac_ext <<EOF
2842 #line 2843 "configure"
2843 #include "confdefs.h"
2844 /* System header to define __stub macros and hopefully few prototypes,
2845     which can conflict with char dbopen(); below.  */
2846 #include <assert.h>
2847 /* Override any gcc2 internal prototype to avoid an error.  */
2848 /* We use char because int might match the return type of a gcc2
2849     builtin and then its argument prototype would still apply.  */
2850 char dbopen();
2851
2852 int main() {
2853
2854 /* The GNU C library defines this for functions which it implements
2855     to always fail with ENOSYS.  Some functions are actually named
2856     something starting with __ and the normal name is an alias.  */
2857 #if defined (__stub_dbopen) || defined (__stub___dbopen)
2858 choke me
2859 #else
2860 dbopen();
2861 #endif
2862
2863 ; return 0; }
2864 EOF
2865 if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2866   rm -rf conftest*
2867   eval "ac_cv_func_dbopen=yes"
2868 else
2869   echo "configure: failed program was:" >&5
2870   cat conftest.$ac_ext >&5
2871   rm -rf conftest*
2872   eval "ac_cv_func_dbopen=no"
2873 fi
2874 rm -f conftest*
2875 fi
2876
2877 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
2878   echo "$ac_t""yes" 1>&6
2879   ol_cv_lib_db=yes
2880 else
2881   echo "$ac_t""no" 1>&6
2882
2883                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
2884 echo "configure:2885: checking for dbopen in -ldb" >&5
2885 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
2886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2887   echo $ac_n "(cached) $ac_c" 1>&6
2888 else
2889   ac_save_LIBS="$LIBS"
2890 LIBS="-ldb  $LIBS"
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2893 "configure"
2893 #include "confdefs.h"
2894 /* Override any gcc2 internal prototype to avoid an error.  */
2895 /* We use char because int might match the return type of a gcc2
2896     builtin and then its argument prototype would still apply.  */
2897 char dbopen();
2898
2899 int main() {
2900 dbopen()
2901 ; return 0; }
2902 EOF
2903 if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2904   rm -rf conftest*
2905   eval "ac_cv_lib_$ac_lib_var=yes"
2906 else
2907   echo "configure: failed program was:" >&5
2908   cat conftest.$ac_ext >&5
2909   rm -rf conftest*
2910   eval "ac_cv_lib_$ac_lib_var=no"
2911 fi
2912 rm -f conftest*
2913 LIBS="$ac_save_LIBS"
2914
2915 fi
2916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2917   echo "$ac_t""yes" 1>&6
2918   ol_cv_lib_db=-ldb
2919 else
2920   echo "$ac_t""no" 1>&6
2921 ol_cv_lib_db=no
2922 fi
2923
2924         
2925 fi
2926
2927         LIBS="$ol_LIBS"
2928
2929 fi
2930
2931 echo "$ac_t""$ol_cv_lib_db" 1>&6
2932
2933
2934 for ac_hdr in db_185.h
2935 do
2936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2938 echo "configure:2939: checking for $ac_hdr" >&5
2939 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945 #include <$ac_hdr>
2946 EOF
2947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2948 { (eval echo configure:2949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2949 ac_err=`grep -v '^ *+' conftest.out`
2950 if test -z "$ac_err"; then
2951   rm -rf conftest*
2952   eval "ac_cv_header_$ac_safe=yes"
2953 else
2954   echo "$ac_err" >&5
2955   echo "configure: failed program was:" >&5
2956   cat conftest.$ac_ext >&5
2957   rm -rf conftest*
2958   eval "ac_cv_header_$ac_safe=no"
2959 fi
2960 rm -f conftest*
2961 fi
2962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2963   echo "$ac_t""yes" 1>&6
2964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2965   cat >> confdefs.h <<EOF
2966 #define $ac_tr_hdr 1
2967 EOF
2968  
2969 else
2970   echo "$ac_t""no" 1>&6
2971 fi
2972 done
2973
2974 if test $ol_cv_header_db2 = yes ; then
2975         
2976         ol_cv_header_db=$ac_cv_header_db_185_h
2977 else
2978         ol_cv_header_db=$ac_cv_header_db_h
2979 fi
2980
2981
2982  
2983  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
2984 echo "configure:2985: checking for Berkeley DB" >&5
2985 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   
2989         if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then
2990                 ol_cv_berkeley_db=no
2991         else
2992                 ol_cv_berkeley_db=yes
2993         fi
2994
2995 fi
2996
2997 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
2998
2999
3000         if test $ol_cv_berkeley_db = yes ; then
3001                 ol_link_ldbm=db
3002                 ol_with_ldbm_api=db
3003
3004                 if test $ac_cv_header_db_185_h = yes ; then
3005                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185"
3006                 fi
3007
3008                 if test $ol_with_ldbm_type = hash ; then
3009                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
3010                 else
3011                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
3012                 fi
3013
3014                                                 if test $ol_cv_lib_db != yes ; then
3015                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
3016                 fi
3017         fi
3018 fi
3019
3020 if test $ol_with_ldbm_api = manual ; then
3021                 $ol_link_ldbm=yes
3022
3023         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
3024
3025         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
3026 do
3027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3029 echo "configure:3030: checking for $ac_hdr" >&5
3030 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   cat > conftest.$ac_ext <<EOF
3034 #line 3035 "configure"
3035 #include "confdefs.h"
3036 #include <$ac_hdr>
3037 EOF
3038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3039 { (eval echo configure:3040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3040 ac_err=`grep -v '^ *+' conftest.out`
3041 if test -z "$ac_err"; then
3042   rm -rf conftest*
3043   eval "ac_cv_header_$ac_safe=yes"
3044 else
3045   echo "$ac_err" >&5
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -rf conftest*
3049   eval "ac_cv_header_$ac_safe=no"
3050 fi
3051 rm -f conftest*
3052 fi
3053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3054   echo "$ac_t""yes" 1>&6
3055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3056   cat >> confdefs.h <<EOF
3057 #define $ac_tr_hdr 1
3058 EOF
3059  
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063 done
3064
3065 fi
3066
3067 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
3068         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2;
3069         $ol_with_ldbm_api=none
3070 fi
3071
3072 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
3073         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
3074 echo "configure:3075: checking for GDBM library" >&5
3075 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078         ol_LIBS="$LIBS"
3079         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
3080 echo "configure:3081: checking for gdbm_open" >&5
3081 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 /* System header to define __stub macros and hopefully few prototypes,
3088     which can conflict with char gdbm_open(); below.  */
3089 #include <assert.h>
3090 /* Override any gcc2 internal prototype to avoid an error.  */
3091 /* We use char because int might match the return type of a gcc2
3092     builtin and then its argument prototype would still apply.  */
3093 char gdbm_open();
3094
3095 int main() {
3096
3097 /* The GNU C library defines this for functions which it implements
3098     to always fail with ENOSYS.  Some functions are actually named
3099     something starting with __ and the normal name is an alias.  */
3100 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
3101 choke me
3102 #else
3103 gdbm_open();
3104 #endif
3105
3106 ; return 0; }
3107 EOF
3108 if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3109   rm -rf conftest*
3110   eval "ac_cv_func_gdbm_open=yes"
3111 else
3112   echo "configure: failed program was:" >&5
3113   cat conftest.$ac_ext >&5
3114   rm -rf conftest*
3115   eval "ac_cv_func_gdbm_open=no"
3116 fi
3117 rm -f conftest*
3118 fi
3119
3120 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
3121   echo "$ac_t""yes" 1>&6
3122   ol_cv_lib_gdbm=yes
3123 else
3124   echo "$ac_t""no" 1>&6
3125
3126                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
3127 echo "configure:3128: checking for gdbm_open in -lgdbm" >&5
3128 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
3129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3130   echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132   ac_save_LIBS="$LIBS"
3133 LIBS="-lgdbm  $LIBS"
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 /* Override any gcc2 internal prototype to avoid an error.  */
3138 /* We use char because int might match the return type of a gcc2
3139     builtin and then its argument prototype would still apply.  */
3140 char gdbm_open();
3141
3142 int main() {
3143 gdbm_open()
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3147   rm -rf conftest*
3148   eval "ac_cv_lib_$ac_lib_var=yes"
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   eval "ac_cv_lib_$ac_lib_var=no"
3154 fi
3155 rm -f conftest*
3156 LIBS="$ac_save_LIBS"
3157
3158 fi
3159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3160   echo "$ac_t""yes" 1>&6
3161   ol_cv_lib_gdbm=-lgdbm
3162 else
3163   echo "$ac_t""no" 1>&6
3164 ol_cv_lib_gdbm=no
3165 fi
3166
3167         
3168 fi
3169
3170         LIBS="$ol_LIBS"
3171
3172 fi
3173
3174 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
3175
3176
3177  for ac_hdr in gdbm.h
3178 do
3179 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3180 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3181 echo "configure:3182: checking for $ac_hdr" >&5
3182 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3183   echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185   cat > conftest.$ac_ext <<EOF
3186 #line 3187 "configure"
3187 #include "confdefs.h"
3188 #include <$ac_hdr>
3189 EOF
3190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3191 { (eval echo configure:3192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3192 ac_err=`grep -v '^ *+' conftest.out`
3193 if test -z "$ac_err"; then
3194   rm -rf conftest*
3195   eval "ac_cv_header_$ac_safe=yes"
3196 else
3197   echo "$ac_err" >&5
3198   echo "configure: failed program was:" >&5
3199   cat conftest.$ac_ext >&5
3200   rm -rf conftest*
3201   eval "ac_cv_header_$ac_safe=no"
3202 fi
3203 rm -f conftest*
3204 fi
3205 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3206   echo "$ac_t""yes" 1>&6
3207     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3208   cat >> confdefs.h <<EOF
3209 #define $ac_tr_hdr 1
3210 EOF
3211  
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215 done
3216
3217  echo $ac_n "checking for db""... $ac_c" 1>&6
3218 echo "configure:3219: checking for db" >&5
3219 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
3220   echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222   
3223         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
3224                 ol_cv_gdbm=no
3225         else
3226                 ol_cv_gdbm=yes
3227         fi
3228
3229 fi
3230
3231 echo "$ac_t""$ol_cv_gdbm" 1>&6
3232
3233
3234         if test $ol_cv_gdbm = yes ; then
3235                 ol_link_ldbm=gdbm
3236                 ol_with_ldbm_api=gdbm
3237
3238                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
3239
3240                 if test $ol_cv_lib_gdbm != yes ; then
3241                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
3242                 fi
3243         fi
3244 fi
3245
3246 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
3247         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
3248 echo "configure:3249: checking for NDBM library" >&5
3249 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252         ol_LIBS="$LIBS"
3253         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
3254 echo "configure:3255: checking for dbm_open" >&5
3255 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
3256   echo $ac_n "(cached) $ac_c" 1>&6
3257 else
3258   cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261 /* System header to define __stub macros and hopefully few prototypes,
3262     which can conflict with char dbm_open(); below.  */
3263 #include <assert.h>
3264 /* Override any gcc2 internal prototype to avoid an error.  */
3265 /* We use char because int might match the return type of a gcc2
3266     builtin and then its argument prototype would still apply.  */
3267 char dbm_open();
3268
3269 int main() {
3270
3271 /* The GNU C library defines this for functions which it implements
3272     to always fail with ENOSYS.  Some functions are actually named
3273     something starting with __ and the normal name is an alias.  */
3274 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
3275 choke me
3276 #else
3277 dbm_open();
3278 #endif
3279
3280 ; return 0; }
3281 EOF
3282 if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3283   rm -rf conftest*
3284   eval "ac_cv_func_dbm_open=yes"
3285 else
3286   echo "configure: failed program was:" >&5
3287   cat conftest.$ac_ext >&5
3288   rm -rf conftest*
3289   eval "ac_cv_func_dbm_open=no"
3290 fi
3291 rm -f conftest*
3292 fi
3293
3294 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
3295   echo "$ac_t""yes" 1>&6
3296   ol_cv_lib_ndbm=yes
3297 else
3298   echo "$ac_t""no" 1>&6
3299
3300                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
3301 echo "configure:3302: checking for dbm_open in -lndbm" >&5
3302 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
3303 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   ac_save_LIBS="$LIBS"
3307 LIBS="-lndbm  $LIBS"
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 /* Override any gcc2 internal prototype to avoid an error.  */
3312 /* We use char because int might match the return type of a gcc2
3313     builtin and then its argument prototype would still apply.  */
3314 char dbm_open();
3315
3316 int main() {
3317 dbm_open()
3318 ; return 0; }
3319 EOF
3320 if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3321   rm -rf conftest*
3322   eval "ac_cv_lib_$ac_lib_var=yes"
3323 else
3324   echo "configure: failed program was:" >&5
3325   cat conftest.$ac_ext >&5
3326   rm -rf conftest*
3327   eval "ac_cv_lib_$ac_lib_var=no"
3328 fi
3329 rm -f conftest*
3330 LIBS="$ac_save_LIBS"
3331
3332 fi
3333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3334   echo "$ac_t""yes" 1>&6
3335   ol_cv_lib_ndbm=-lndbm
3336 else
3337   echo "$ac_t""no" 1>&6
3338
3339                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
3340 echo "configure:3341: checking for dbm_open in -ldbm" >&5
3341 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
3342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3343   echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345   ac_save_LIBS="$LIBS"
3346 LIBS="-ldbm  $LIBS"
3347 cat > conftest.$ac_ext <<EOF
3348 #line 3349 "configure"
3349 #include "confdefs.h"
3350 /* Override any gcc2 internal prototype to avoid an error.  */
3351 /* We use char because int might match the return type of a gcc2
3352     builtin and then its argument prototype would still apply.  */
3353 char dbm_open();
3354
3355 int main() {
3356 dbm_open()
3357 ; return 0; }
3358 EOF
3359 if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3360   rm -rf conftest*
3361   eval "ac_cv_lib_$ac_lib_var=yes"
3362 else
3363   echo "configure: failed program was:" >&5
3364   cat conftest.$ac_ext >&5
3365   rm -rf conftest*
3366   eval "ac_cv_lib_$ac_lib_var=no"
3367 fi
3368 rm -f conftest*
3369 LIBS="$ac_save_LIBS"
3370
3371 fi
3372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3373   echo "$ac_t""yes" 1>&6
3374   ol_cv_lib_ndbm=-ldbm
3375 else
3376   echo "$ac_t""no" 1>&6
3377 ol_cv_lib_ndbm=no
3378 fi
3379                 
3380 fi
3381
3382         
3383 fi
3384
3385         LIBS="$ol_LIBS"
3386
3387 fi
3388
3389 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
3390
3391
3392  for ac_hdr in ndbm.h
3393 do
3394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3396 echo "configure:3397: checking for $ac_hdr" >&5
3397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3398   echo $ac_n "(cached) $ac_c" 1>&6
3399 else
3400   cat > conftest.$ac_ext <<EOF
3401 #line 3402 "configure"
3402 #include "confdefs.h"
3403 #include <$ac_hdr>
3404 EOF
3405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3406 { (eval echo configure:3407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3407 ac_err=`grep -v '^ *+' conftest.out`
3408 if test -z "$ac_err"; then
3409   rm -rf conftest*
3410   eval "ac_cv_header_$ac_safe=yes"
3411 else
3412   echo "$ac_err" >&5
3413   echo "configure: failed program was:" >&5
3414   cat conftest.$ac_ext >&5
3415   rm -rf conftest*
3416   eval "ac_cv_header_$ac_safe=no"
3417 fi
3418 rm -f conftest*
3419 fi
3420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3421   echo "$ac_t""yes" 1>&6
3422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3423   cat >> confdefs.h <<EOF
3424 #define $ac_tr_hdr 1
3425 EOF
3426  
3427 else
3428   echo "$ac_t""no" 1>&6
3429 fi
3430 done
3431
3432  echo $ac_n "checking for db""... $ac_c" 1>&6
3433 echo "configure:3434: checking for db" >&5
3434 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   
3438         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
3439                 ol_cv_ndbm=no
3440         else
3441                 ol_cv_ndbm=yes
3442         fi
3443
3444 fi
3445
3446 echo "$ac_t""$ol_cv_ndbm" 1>&6
3447
3448
3449         if test $ol_cv_ndbm = yes ; then
3450                 ol_link_ldbm=ndbm
3451                 ol_with_ldbm_api=ndbm
3452
3453                 if test $ol_with_ldbm_api = ndbm ; then
3454                         echo "configure: warning: Attempting to use NDBM.  Functionality will be limited." 1>&2
3455                 fi
3456
3457                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
3458
3459                 if test $ol_cv_lib_ndbm != yes ; then
3460                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
3461                 fi
3462         fi
3463 fi
3464
3465 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
3466         echo "configure: warning: could not find suitable LDBM backend" 1>&2
3467         if test $ol_enable_ldbm = yes ; then
3468                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
3469         fi
3470
3471         echo "configure: warning: disabling LDBM" 1>&2
3472         $ol_enable_ldbm=no
3473 fi
3474
3475 if test $ol_enable_wrappers = yes ; then
3476         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
3477 echo "configure:3478: checking for hosts_access in -lwrap" >&5
3478 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
3479 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   ac_save_LIBS="$LIBS"
3483 LIBS="-lwrap  $LIBS"
3484 cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 /* Override any gcc2 internal prototype to avoid an error.  */
3488 /* We use char because int might match the return type of a gcc2
3489     builtin and then its argument prototype would still apply.  */
3490 char hosts_access();
3491
3492 int main() {
3493 hosts_access()
3494 ; return 0; }
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3497   rm -rf conftest*
3498   eval "ac_cv_lib_$ac_lib_var=yes"
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -rf conftest*
3503   eval "ac_cv_lib_$ac_lib_var=no"
3504 fi
3505 rm -f conftest*
3506 LIBS="$ac_save_LIBS"
3507
3508 fi
3509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3510   echo "$ac_t""yes" 1>&6
3511   have_wrappers=yes
3512 else
3513   echo "$ac_t""no" 1>&6
3514 have_wrappers=no
3515 fi
3516
3517
3518         if test $have_wrappers = yes ; then
3519                 SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
3520                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
3521         else
3522                 echo "configure: warning: could not find -lwrap" 1>&2
3523                 if test $ol_enable_wrappers = yes ; then
3524                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
3525                 fi
3526
3527                 echo "configure: warning: disabling wrappers support" 1>&2
3528                 ol_enable_wrappers=no
3529         fi
3530
3531 fi
3532
3533 # ud needs termcap (should insert check here)
3534 ol_link_termcap=no
3535
3536 for ac_hdr in termcap.h ncurses.h
3537 do
3538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3540 echo "configure:3541: checking for $ac_hdr" >&5
3541 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   cat > conftest.$ac_ext <<EOF
3545 #line 3546 "configure"
3546 #include "confdefs.h"
3547 #include <$ac_hdr>
3548 EOF
3549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3550 { (eval echo configure:3551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3551 ac_err=`grep -v '^ *+' conftest.out`
3552 if test -z "$ac_err"; then
3553   rm -rf conftest*
3554   eval "ac_cv_header_$ac_safe=yes"
3555 else
3556   echo "$ac_err" >&5
3557   echo "configure: failed program was:" >&5
3558   cat conftest.$ac_ext >&5
3559   rm -rf conftest*
3560   eval "ac_cv_header_$ac_safe=no"
3561 fi
3562 rm -f conftest*
3563 fi
3564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3565   echo "$ac_t""yes" 1>&6
3566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3567   cat >> confdefs.h <<EOF
3568 #define $ac_tr_hdr 1
3569 EOF
3570  
3571 else
3572   echo "$ac_t""no" 1>&6
3573 fi
3574 done
3575
3576
3577 if test $ol_link_termcap = no ; then
3578         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
3579 echo "configure:3580: checking for tputs in -ltermcap" >&5
3580 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
3581 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   ac_save_LIBS="$LIBS"
3585 LIBS="-ltermcap  $LIBS"
3586 cat > conftest.$ac_ext <<EOF
3587 #line 3588 "configure"
3588 #include "confdefs.h"
3589 /* Override any gcc2 internal prototype to avoid an error.  */
3590 /* We use char because int might match the return type of a gcc2
3591     builtin and then its argument prototype would still apply.  */
3592 char tputs();
3593
3594 int main() {
3595 tputs()
3596 ; return 0; }
3597 EOF
3598 if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3599   rm -rf conftest*
3600   eval "ac_cv_lib_$ac_lib_var=yes"
3601 else
3602   echo "configure: failed program was:" >&5
3603   cat conftest.$ac_ext >&5
3604   rm -rf conftest*
3605   eval "ac_cv_lib_$ac_lib_var=no"
3606 fi
3607 rm -f conftest*
3608 LIBS="$ac_save_LIBS"
3609
3610 fi
3611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3612   echo "$ac_t""yes" 1>&6
3613   have_termcap=yes
3614 else
3615   echo "$ac_t""no" 1>&6
3616 have_termcap=no
3617 fi
3618
3619         if test $have_termcap = yes ; then
3620                 ol_link_termcap=yes
3621                 TERMCAP_LIBS=-ltermcap
3622         fi
3623 fi
3624
3625 if test $ol_link_termcap = no ; then
3626         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
3627 echo "configure:3628: checking for initscr in -lncurses" >&5
3628 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
3629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   ac_save_LIBS="$LIBS"
3633 LIBS="-lncurses  $LIBS"
3634 cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 /* Override any gcc2 internal prototype to avoid an error.  */
3638 /* We use char because int might match the return type of a gcc2
3639     builtin and then its argument prototype would still apply.  */
3640 char initscr();
3641
3642 int main() {
3643 initscr()
3644 ; return 0; }
3645 EOF
3646 if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3647   rm -rf conftest*
3648   eval "ac_cv_lib_$ac_lib_var=yes"
3649 else
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -rf conftest*
3653   eval "ac_cv_lib_$ac_lib_var=no"
3654 fi
3655 rm -f conftest*
3656 LIBS="$ac_save_LIBS"
3657
3658 fi
3659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3660   echo "$ac_t""yes" 1>&6
3661   have_ncurses=yes
3662 else
3663   echo "$ac_t""no" 1>&6
3664 have_ncurses=no
3665 fi
3666
3667         if test $have_ncurses = yes ; then
3668                 ol_link_termcap=yes
3669                 TERMCAP_LIBS=-lncurses
3670         fi
3671 fi
3672
3673 if test $ol_link_termcap = no ; then
3674         TERMCAP_DEFS="-DNOTERMCAP"
3675         TERMCAP_LIBS=
3676 fi
3677
3678 # FreeBSD (and others) have crypt(3) in -lcrypt
3679 if test $ol_enable_crypt != no ; then
3680         echo $ac_n "checking for crypt""... $ac_c" 1>&6
3681 echo "configure:3682: checking for crypt" >&5
3682 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 /* System header to define __stub macros and hopefully few prototypes,
3689     which can conflict with char crypt(); below.  */
3690 #include <assert.h>
3691 /* Override any gcc2 internal prototype to avoid an error.  */
3692 /* We use char because int might match the return type of a gcc2
3693     builtin and then its argument prototype would still apply.  */
3694 char crypt();
3695
3696 int main() {
3697
3698 /* The GNU C library defines this for functions which it implements
3699     to always fail with ENOSYS.  Some functions are actually named
3700     something starting with __ and the normal name is an alias.  */
3701 #if defined (__stub_crypt) || defined (__stub___crypt)
3702 choke me
3703 #else
3704 crypt();
3705 #endif
3706
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3710   rm -rf conftest*
3711   eval "ac_cv_func_crypt=yes"
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   eval "ac_cv_func_crypt=no"
3717 fi
3718 rm -f conftest*
3719 fi
3720
3721 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
3722   echo "$ac_t""yes" 1>&6
3723   have_crypt=yes
3724 else
3725   echo "$ac_t""no" 1>&6
3726
3727                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3728 echo "configure:3729: checking for crypt in -lcrypt" >&5
3729 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3730 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3731   echo $ac_n "(cached) $ac_c" 1>&6
3732 else
3733   ac_save_LIBS="$LIBS"
3734 LIBS="-lcrypt  $LIBS"
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 /* Override any gcc2 internal prototype to avoid an error.  */
3739 /* We use char because int might match the return type of a gcc2
3740     builtin and then its argument prototype would still apply.  */
3741 char crypt();
3742
3743 int main() {
3744 crypt()
3745 ; return 0; }
3746 EOF
3747 if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3748   rm -rf conftest*
3749   eval "ac_cv_lib_$ac_lib_var=yes"
3750 else
3751   echo "configure: failed program was:" >&5
3752   cat conftest.$ac_ext >&5
3753   rm -rf conftest*
3754   eval "ac_cv_lib_$ac_lib_var=no"
3755 fi
3756 rm -f conftest*
3757 LIBS="$ac_save_LIBS"
3758
3759 fi
3760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3761   echo "$ac_t""yes" 1>&6
3762   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
3763                         have_crypt=yes
3764 else
3765   echo "$ac_t""no" 1>&6
3766 have_crypt=no
3767 fi
3768
3769 fi
3770
3771
3772         if test $have_crypt = yes ; then
3773                 LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
3774         else
3775                 echo "configure: warning: could not find crypt" 1>&2
3776                 if test $ol_enable_crypt = yes ; then
3777                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
3778                 fi
3779
3780                 echo "configure: warning: disabling crypt support" 1>&2
3781                 ol_enable_crypt=no
3782         fi
3783 fi
3784
3785 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3786 echo "configure:3787: checking for ANSI C header files" >&5
3787 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3788   echo $ac_n "(cached) $ac_c" 1>&6
3789 else
3790   cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793 #include <stdlib.h>
3794 #include <stdarg.h>
3795 #include <string.h>
3796 #include <float.h>
3797 EOF
3798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3799 { (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3800 ac_err=`grep -v '^ *+' conftest.out`
3801 if test -z "$ac_err"; then
3802   rm -rf conftest*
3803   ac_cv_header_stdc=yes
3804 else
3805   echo "$ac_err" >&5
3806   echo "configure: failed program was:" >&5
3807   cat conftest.$ac_ext >&5
3808   rm -rf conftest*
3809   ac_cv_header_stdc=no
3810 fi
3811 rm -f conftest*
3812
3813 if test $ac_cv_header_stdc = yes; then
3814   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3815 cat > conftest.$ac_ext <<EOF
3816 #line 3817 "configure"
3817 #include "confdefs.h"
3818 #include <string.h>
3819 EOF
3820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3821   egrep "memchr" >/dev/null 2>&1; then
3822   :
3823 else
3824   rm -rf conftest*
3825   ac_cv_header_stdc=no
3826 fi
3827 rm -f conftest*
3828
3829 fi
3830
3831 if test $ac_cv_header_stdc = yes; then
3832   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3833 cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <stdlib.h>
3837 EOF
3838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3839   egrep "free" >/dev/null 2>&1; then
3840   :
3841 else
3842   rm -rf conftest*
3843   ac_cv_header_stdc=no
3844 fi
3845 rm -f conftest*
3846
3847 fi
3848
3849 if test $ac_cv_header_stdc = yes; then
3850   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3851 if test "$cross_compiling" = yes; then
3852   :
3853 else
3854   cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 #include <ctype.h>
3858 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3859 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3860 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3861 int main () { int i; for (i = 0; i < 256; i++)
3862 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3863 exit (0); }
3864
3865 EOF
3866 if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3867 then
3868   :
3869 else
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -fr conftest*
3873   ac_cv_header_stdc=no
3874 fi
3875 rm -fr conftest*
3876 fi
3877
3878 fi
3879 fi
3880
3881 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3882 if test $ac_cv_header_stdc = yes; then
3883   cat >> confdefs.h <<\EOF
3884 #define STDC_HEADERS 1
3885 EOF
3886
3887 fi
3888
3889 ac_header_dirent=no
3890 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3891 do
3892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3893 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3894 echo "configure:3895: checking for $ac_hdr that defines DIR" >&5
3895 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3896   echo $ac_n "(cached) $ac_c" 1>&6
3897 else
3898   cat > conftest.$ac_ext <<EOF
3899 #line 3900 "configure"
3900 #include "confdefs.h"
3901 #include <sys/types.h>
3902 #include <$ac_hdr>
3903 int main() {
3904 DIR *dirp = 0;
3905 ; return 0; }
3906 EOF
3907 if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3908   rm -rf conftest*
3909   eval "ac_cv_header_dirent_$ac_safe=yes"
3910 else
3911   echo "configure: failed program was:" >&5
3912   cat conftest.$ac_ext >&5
3913   rm -rf conftest*
3914   eval "ac_cv_header_dirent_$ac_safe=no"
3915 fi
3916 rm -f conftest*
3917 fi
3918 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3919   echo "$ac_t""yes" 1>&6
3920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3921   cat >> confdefs.h <<EOF
3922 #define $ac_tr_hdr 1
3923 EOF
3924  ac_header_dirent=$ac_hdr; break
3925 else
3926   echo "$ac_t""no" 1>&6
3927 fi
3928 done
3929 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3930 if test $ac_header_dirent = dirent.h; then
3931 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3932 echo "configure:3933: checking for opendir in -ldir" >&5
3933 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3934 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3935   echo $ac_n "(cached) $ac_c" 1>&6
3936 else
3937   ac_save_LIBS="$LIBS"
3938 LIBS="-ldir  $LIBS"
3939 cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 /* Override any gcc2 internal prototype to avoid an error.  */
3943 /* We use char because int might match the return type of a gcc2
3944     builtin and then its argument prototype would still apply.  */
3945 char opendir();
3946
3947 int main() {
3948 opendir()
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_lib_$ac_lib_var=yes"
3954 else
3955   echo "configure: failed program was:" >&5
3956   cat conftest.$ac_ext >&5
3957   rm -rf conftest*
3958   eval "ac_cv_lib_$ac_lib_var=no"
3959 fi
3960 rm -f conftest*
3961 LIBS="$ac_save_LIBS"
3962
3963 fi
3964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3965   echo "$ac_t""yes" 1>&6
3966   LIBS="$LIBS -ldir"
3967 else
3968   echo "$ac_t""no" 1>&6
3969 fi
3970
3971 else
3972 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3973 echo "configure:3974: checking for opendir in -lx" >&5
3974 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3976   echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978   ac_save_LIBS="$LIBS"
3979 LIBS="-lx  $LIBS"
3980 cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 /* Override any gcc2 internal prototype to avoid an error.  */
3984 /* We use char because int might match the return type of a gcc2
3985     builtin and then its argument prototype would still apply.  */
3986 char opendir();
3987
3988 int main() {
3989 opendir()
3990 ; return 0; }
3991 EOF
3992 if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3993   rm -rf conftest*
3994   eval "ac_cv_lib_$ac_lib_var=yes"
3995 else
3996   echo "configure: failed program was:" >&5
3997   cat conftest.$ac_ext >&5
3998   rm -rf conftest*
3999   eval "ac_cv_lib_$ac_lib_var=no"
4000 fi
4001 rm -f conftest*
4002 LIBS="$ac_save_LIBS"
4003
4004 fi
4005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4006   echo "$ac_t""yes" 1>&6
4007   LIBS="$LIBS -lx"
4008 else
4009   echo "$ac_t""no" 1>&6
4010 fi
4011
4012 fi
4013
4014 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4015 echo "configure:4016: checking for sys/wait.h that is POSIX.1 compatible" >&5
4016 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4017   echo $ac_n "(cached) $ac_c" 1>&6
4018 else
4019   cat > conftest.$ac_ext <<EOF
4020 #line 4021 "configure"
4021 #include "confdefs.h"
4022 #include <sys/types.h>
4023 #include <sys/wait.h>
4024 #ifndef WEXITSTATUS
4025 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4026 #endif
4027 #ifndef WIFEXITED
4028 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4029 #endif
4030 int main() {
4031 int s;
4032 wait (&s);
4033 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4034 ; return 0; }
4035 EOF
4036 if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4037   rm -rf conftest*
4038   ac_cv_header_sys_wait_h=yes
4039 else
4040   echo "configure: failed program was:" >&5
4041   cat conftest.$ac_ext >&5
4042   rm -rf conftest*
4043   ac_cv_header_sys_wait_h=no
4044 fi
4045 rm -f conftest*
4046 fi
4047
4048 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4049 if test $ac_cv_header_sys_wait_h = yes; then
4050   cat >> confdefs.h <<\EOF
4051 #define HAVE_SYS_WAIT_H 1
4052 EOF
4053
4054 fi
4055
4056 for ac_hdr in \
4057         stddef.h        \
4058         fcntl.h         \
4059         filio.h         \
4060         limits.h        \
4061         malloc.h        \
4062         sgtty.h         \
4063         sys/file.h      \
4064         sys/ioctl.h     \
4065         sys/time.h      \
4066         syslog.h        \
4067         termio.h        \
4068         unistd.h        \
4069
4070 do
4071 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4072 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4073 echo "configure:4074: checking for $ac_hdr" >&5
4074 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4075   echo $ac_n "(cached) $ac_c" 1>&6
4076 else
4077   cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 #include <$ac_hdr>
4081 EOF
4082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4083 { (eval echo configure:4084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4084 ac_err=`grep -v '^ *+' conftest.out`
4085 if test -z "$ac_err"; then
4086   rm -rf conftest*
4087   eval "ac_cv_header_$ac_safe=yes"
4088 else
4089   echo "$ac_err" >&5
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   eval "ac_cv_header_$ac_safe=no"
4094 fi
4095 rm -f conftest*
4096 fi
4097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4098   echo "$ac_t""yes" 1>&6
4099     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4100   cat >> confdefs.h <<EOF
4101 #define $ac_tr_hdr 1
4102 EOF
4103  
4104 else
4105   echo "$ac_t""no" 1>&6
4106 fi
4107 done
4108
4109
4110 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
4111 echo "configure:4112: checking for uid_t in sys/types.h" >&5
4112 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 #include <sys/types.h>
4119 EOF
4120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4121   egrep "uid_t" >/dev/null 2>&1; then
4122   rm -rf conftest*
4123   ac_cv_type_uid_t=yes
4124 else
4125   rm -rf conftest*
4126   ac_cv_type_uid_t=no
4127 fi
4128 rm -f conftest*
4129
4130 fi
4131
4132 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4133 if test $ac_cv_type_uid_t = no; then
4134   cat >> confdefs.h <<\EOF
4135 #define uid_t int
4136 EOF
4137
4138   cat >> confdefs.h <<\EOF
4139 #define gid_t int
4140 EOF
4141
4142 fi
4143
4144 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
4145 echo "configure:4146: checking type of array argument to getgroups" >&5
4146 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
4147   echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149   if test "$cross_compiling" = yes; then
4150   ac_cv_type_getgroups=cross
4151 else
4152   cat > conftest.$ac_ext <<EOF
4153 #line 4154 "configure"
4154 #include "confdefs.h"
4155
4156 /* Thanks to Mike Rendell for this test.  */
4157 #include <sys/types.h>
4158 #define NGID 256
4159 #undef MAX
4160 #define MAX(x, y) ((x) > (y) ? (x) : (y))
4161 main()
4162 {
4163   gid_t gidset[NGID];
4164   int i, n;
4165   union { gid_t gval; long lval; }  val;
4166
4167   val.lval = -1;
4168   for (i = 0; i < NGID; i++)
4169     gidset[i] = val.gval;
4170   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
4171                  gidset);
4172   /* Exit non-zero if getgroups seems to require an array of ints.  This
4173      happens when gid_t is short but getgroups modifies an array of ints.  */
4174   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
4175 }
4176
4177 EOF
4178 if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4179 then
4180     ac_cv_type_getgroups=gid_t
4181 else
4182   echo "configure: failed program was:" >&5
4183   cat conftest.$ac_ext >&5
4184   rm -fr conftest*
4185   ac_cv_type_getgroups=int
4186 fi
4187 rm -fr conftest*
4188 fi
4189
4190 if test $ac_cv_type_getgroups = cross; then
4191         cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4194 #include <unistd.h>
4195 EOF
4196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4197   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
4198   rm -rf conftest*
4199   ac_cv_type_getgroups=gid_t
4200 else
4201   rm -rf conftest*
4202   ac_cv_type_getgroups=int
4203 fi
4204 rm -f conftest*
4205
4206 fi
4207 fi
4208
4209 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
4210 cat >> confdefs.h <<EOF
4211 #define GETGROUPS_T $ac_cv_type_getgroups
4212 EOF
4213
4214
4215 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4216 echo "configure:4217: checking for mode_t" >&5
4217 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
4218   echo $ac_n "(cached) $ac_c" 1>&6
4219 else
4220   cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223 #include <sys/types.h>
4224 #if STDC_HEADERS
4225 #include <stdlib.h>
4226 #include <stddef.h>
4227 #endif
4228 EOF
4229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4230   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4231   rm -rf conftest*
4232   ac_cv_type_mode_t=yes
4233 else
4234   rm -rf conftest*
4235   ac_cv_type_mode_t=no
4236 fi
4237 rm -f conftest*
4238
4239 fi
4240 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4241 if test $ac_cv_type_mode_t = no; then
4242   cat >> confdefs.h <<\EOF
4243 #define mode_t int
4244 EOF
4245
4246 fi
4247
4248 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4249 echo "configure:4250: checking for off_t" >&5
4250 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4251   echo $ac_n "(cached) $ac_c" 1>&6
4252 else
4253   cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <sys/types.h>
4257 #if STDC_HEADERS
4258 #include <stdlib.h>
4259 #include <stddef.h>
4260 #endif
4261 EOF
4262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4263   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4264   rm -rf conftest*
4265   ac_cv_type_off_t=yes
4266 else
4267   rm -rf conftest*
4268   ac_cv_type_off_t=no
4269 fi
4270 rm -f conftest*
4271
4272 fi
4273 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4274 if test $ac_cv_type_off_t = no; then
4275   cat >> confdefs.h <<\EOF
4276 #define off_t long
4277 EOF
4278
4279 fi
4280
4281 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4282 echo "configure:4283: checking for pid_t" >&5
4283 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4284   echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286   cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <sys/types.h>
4290 #if STDC_HEADERS
4291 #include <stdlib.h>
4292 #include <stddef.h>
4293 #endif
4294 EOF
4295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4296   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4297   rm -rf conftest*
4298   ac_cv_type_pid_t=yes
4299 else
4300   rm -rf conftest*
4301   ac_cv_type_pid_t=no
4302 fi
4303 rm -f conftest*
4304
4305 fi
4306 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4307 if test $ac_cv_type_pid_t = no; then
4308   cat >> confdefs.h <<\EOF
4309 #define pid_t int
4310 EOF
4311
4312 fi
4313
4314 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4315 echo "configure:4316: checking return type of signal handlers" >&5
4316 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   cat > conftest.$ac_ext <<EOF
4320 #line 4321 "configure"
4321 #include "confdefs.h"
4322 #include <sys/types.h>
4323 #include <signal.h>
4324 #ifdef signal
4325 #undef signal
4326 #endif
4327 #ifdef __cplusplus
4328 extern "C" void (*signal (int, void (*)(int)))(int);
4329 #else
4330 void (*signal ()) ();
4331 #endif
4332
4333 int main() {
4334 int i;
4335 ; return 0; }
4336 EOF
4337 if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4338   rm -rf conftest*
4339   ac_cv_type_signal=void
4340 else
4341   echo "configure: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   rm -rf conftest*
4344   ac_cv_type_signal=int
4345 fi
4346 rm -f conftest*
4347 fi
4348
4349 echo "$ac_t""$ac_cv_type_signal" 1>&6
4350 cat >> confdefs.h <<EOF
4351 #define RETSIGTYPE $ac_cv_type_signal
4352 EOF
4353
4354
4355 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4356 echo "configure:4357: checking for size_t" >&5
4357 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <sys/types.h>
4364 #if STDC_HEADERS
4365 #include <stdlib.h>
4366 #include <stddef.h>
4367 #endif
4368 EOF
4369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4370   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4371   rm -rf conftest*
4372   ac_cv_type_size_t=yes
4373 else
4374   rm -rf conftest*
4375   ac_cv_type_size_t=no
4376 fi
4377 rm -f conftest*
4378
4379 fi
4380 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4381 if test $ac_cv_type_size_t = no; then
4382   cat >> confdefs.h <<\EOF
4383 #define size_t unsigned
4384 EOF
4385
4386 fi
4387
4388 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
4389 echo "configure:4390: checking for uid_t in sys/types.h" >&5
4390 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   cat > conftest.$ac_ext <<EOF
4394 #line 4395 "configure"
4395 #include "confdefs.h"
4396 #include <sys/types.h>
4397 EOF
4398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4399   egrep "uid_t" >/dev/null 2>&1; then
4400   rm -rf conftest*
4401   ac_cv_type_uid_t=yes
4402 else
4403   rm -rf conftest*
4404   ac_cv_type_uid_t=no
4405 fi
4406 rm -f conftest*
4407
4408 fi
4409
4410 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4411 if test $ac_cv_type_uid_t = no; then
4412   cat >> confdefs.h <<\EOF
4413 #define uid_t int
4414 EOF
4415
4416   cat >> confdefs.h <<\EOF
4417 #define gid_t int
4418 EOF
4419
4420 fi
4421
4422 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
4423 echo "configure:4424: checking for st_blksize in struct stat" >&5
4424 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <sys/types.h>
4431 #include <sys/stat.h>
4432 int main() {
4433 struct stat s; s.st_blksize;
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437   rm -rf conftest*
4438   ac_cv_struct_st_blksize=yes
4439 else
4440   echo "configure: failed program was:" >&5
4441   cat conftest.$ac_ext >&5
4442   rm -rf conftest*
4443   ac_cv_struct_st_blksize=no
4444 fi
4445 rm -f conftest*
4446 fi
4447
4448 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
4449 if test $ac_cv_struct_st_blksize = yes; then
4450   cat >> confdefs.h <<\EOF
4451 #define HAVE_ST_BLKSIZE 1
4452 EOF
4453
4454 fi
4455
4456 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4457 echo "configure:4458: checking whether time.h and sys/time.h may both be included" >&5
4458 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <sys/types.h>
4465 #include <sys/time.h>
4466 #include <time.h>
4467 int main() {
4468 struct tm *tp;
4469 ; return 0; }
4470 EOF
4471 if { (eval echo configure:4472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4472   rm -rf conftest*
4473   ac_cv_header_time=yes
4474 else
4475   echo "configure: failed program was:" >&5
4476   cat conftest.$ac_ext >&5
4477   rm -rf conftest*
4478   ac_cv_header_time=no
4479 fi
4480 rm -f conftest*
4481 fi
4482
4483 echo "$ac_t""$ac_cv_header_time" 1>&6
4484 if test $ac_cv_header_time = yes; then
4485   cat >> confdefs.h <<\EOF
4486 #define TIME_WITH_SYS_TIME 1
4487 EOF
4488
4489 fi
4490
4491 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4492 echo "configure:4493: checking whether struct tm is in sys/time.h or time.h" >&5
4493 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499 #include <sys/types.h>
4500 #include <time.h>
4501 int main() {
4502 struct tm *tp; tp->tm_sec;
4503 ; return 0; }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4506   rm -rf conftest*
4507   ac_cv_struct_tm=time.h
4508 else
4509   echo "configure: failed program was:" >&5
4510   cat conftest.$ac_ext >&5
4511   rm -rf conftest*
4512   ac_cv_struct_tm=sys/time.h
4513 fi
4514 rm -f conftest*
4515 fi
4516
4517 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4518 if test $ac_cv_struct_tm = sys/time.h; then
4519   cat >> confdefs.h <<\EOF
4520 #define TM_IN_SYS_TIME 1
4521 EOF
4522
4523 fi
4524
4525
4526 echo $ac_n "checking for working const""... $ac_c" 1>&6
4527 echo "configure:4528: checking for working const" >&5
4528 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534
4535 int main() {
4536
4537 /* Ultrix mips cc rejects this.  */
4538 typedef int charset[2]; const charset x;
4539 /* SunOS 4.1.1 cc rejects this.  */
4540 char const *const *ccp;
4541 char **p;
4542 /* NEC SVR4.0.2 mips cc rejects this.  */
4543 struct point {int x, y;};
4544 static struct point const zero = {0,0};
4545 /* AIX XL C 1.02.0.0 rejects this.
4546    It does not let you subtract one const X* pointer from another in an arm
4547    of an if-expression whose if-part is not a constant expression */
4548 const char *g = "string";
4549 ccp = &g + (g ? g-g : 0);
4550 /* HPUX 7.0 cc rejects these. */
4551 ++ccp;
4552 p = (char**) ccp;
4553 ccp = (char const *const *) p;
4554 { /* SCO 3.2v4 cc rejects this.  */
4555   char *t;
4556   char const *s = 0 ? (char *) 0 : (char const *) 0;
4557
4558   *t++ = 0;
4559 }
4560 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4561   int x[] = {25, 17};
4562   const int *foo = &x[0];
4563   ++foo;
4564 }
4565 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4566   typedef const int *iptr;
4567   iptr p = 0;
4568   ++p;
4569 }
4570 { /* AIX XL C 1.02.0.0 rejects this saying
4571      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4572   struct s { int j; const int *ap[3]; };
4573   struct s *b; b->j = 5;
4574 }
4575 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4576   const int foo = 10;
4577 }
4578
4579 ; return 0; }
4580 EOF
4581 if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4582   rm -rf conftest*
4583   ac_cv_c_const=yes
4584 else
4585   echo "configure: failed program was:" >&5
4586   cat conftest.$ac_ext >&5
4587   rm -rf conftest*
4588   ac_cv_c_const=no
4589 fi
4590 rm -f conftest*
4591 fi
4592
4593 echo "$ac_t""$ac_cv_c_const" 1>&6
4594 if test $ac_cv_c_const = no; then
4595   cat >> confdefs.h <<\EOF
4596 #define const 
4597 EOF
4598
4599 fi
4600
4601
4602 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4603 echo "configure:4604: checking for 8-bit clean memcmp" >&5
4604 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   if test "$cross_compiling" = yes; then
4608   ac_cv_func_memcmp_clean=no
4609 else
4610   cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613
4614 main()
4615 {
4616   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4617   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4618 }
4619
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4622 then
4623   ac_cv_func_memcmp_clean=yes
4624 else
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -fr conftest*
4628   ac_cv_func_memcmp_clean=no
4629 fi
4630 rm -fr conftest*
4631 fi
4632
4633 fi
4634
4635 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4636 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
4637
4638 echo $ac_n "checking for strftime""... $ac_c" 1>&6
4639 echo "configure:4640: checking for strftime" >&5
4640 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
4641   echo $ac_n "(cached) $ac_c" 1>&6
4642 else
4643   cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646 /* System header to define __stub macros and hopefully few prototypes,
4647     which can conflict with char strftime(); below.  */
4648 #include <assert.h>
4649 /* Override any gcc2 internal prototype to avoid an error.  */
4650 /* We use char because int might match the return type of a gcc2
4651     builtin and then its argument prototype would still apply.  */
4652 char strftime();
4653
4654 int main() {
4655
4656 /* The GNU C library defines this for functions which it implements
4657     to always fail with ENOSYS.  Some functions are actually named
4658     something starting with __ and the normal name is an alias.  */
4659 #if defined (__stub_strftime) || defined (__stub___strftime)
4660 choke me
4661 #else
4662 strftime();
4663 #endif
4664
4665 ; return 0; }
4666 EOF
4667 if { (eval echo configure:4668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4668   rm -rf conftest*
4669   eval "ac_cv_func_strftime=yes"
4670 else
4671   echo "configure: failed program was:" >&5
4672   cat conftest.$ac_ext >&5
4673   rm -rf conftest*
4674   eval "ac_cv_func_strftime=no"
4675 fi
4676 rm -f conftest*
4677 fi
4678
4679 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
4680   echo "$ac_t""yes" 1>&6
4681   cat >> confdefs.h <<\EOF
4682 #define HAVE_STRFTIME 1
4683 EOF
4684
4685 else
4686   echo "$ac_t""no" 1>&6
4687 # strftime is in -lintl on SCO UNIX.
4688 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
4689 echo "configure:4690: checking for strftime in -lintl" >&5
4690 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
4691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4692   echo $ac_n "(cached) $ac_c" 1>&6
4693 else
4694   ac_save_LIBS="$LIBS"
4695 LIBS="-lintl  $LIBS"
4696 cat > conftest.$ac_ext <<EOF
4697 #line 4698 "configure"
4698 #include "confdefs.h"
4699 /* Override any gcc2 internal prototype to avoid an error.  */
4700 /* We use char because int might match the return type of a gcc2
4701     builtin and then its argument prototype would still apply.  */
4702 char strftime();
4703
4704 int main() {
4705 strftime()
4706 ; return 0; }
4707 EOF
4708 if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4709   rm -rf conftest*
4710   eval "ac_cv_lib_$ac_lib_var=yes"
4711 else
4712   echo "configure: failed program was:" >&5
4713   cat conftest.$ac_ext >&5
4714   rm -rf conftest*
4715   eval "ac_cv_lib_$ac_lib_var=no"
4716 fi
4717 rm -f conftest*
4718 LIBS="$ac_save_LIBS"
4719
4720 fi
4721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4722   echo "$ac_t""yes" 1>&6
4723   cat >> confdefs.h <<\EOF
4724 #define HAVE_STRFTIME 1
4725 EOF
4726
4727 LIBS="-lintl $LIBS"
4728 else
4729   echo "$ac_t""no" 1>&6
4730 fi
4731
4732 fi
4733
4734 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
4735 echo "configure:4736: checking for vprintf" >&5
4736 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
4737   echo $ac_n "(cached) $ac_c" 1>&6
4738 else
4739   cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742 /* System header to define __stub macros and hopefully few prototypes,
4743     which can conflict with char vprintf(); below.  */
4744 #include <assert.h>
4745 /* Override any gcc2 internal prototype to avoid an error.  */
4746 /* We use char because int might match the return type of a gcc2
4747     builtin and then its argument prototype would still apply.  */
4748 char vprintf();
4749
4750 int main() {
4751
4752 /* The GNU C library defines this for functions which it implements
4753     to always fail with ENOSYS.  Some functions are actually named
4754     something starting with __ and the normal name is an alias.  */
4755 #if defined (__stub_vprintf) || defined (__stub___vprintf)
4756 choke me
4757 #else
4758 vprintf();
4759 #endif
4760
4761 ; return 0; }
4762 EOF
4763 if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4764   rm -rf conftest*
4765   eval "ac_cv_func_vprintf=yes"
4766 else
4767   echo "configure: failed program was:" >&5
4768   cat conftest.$ac_ext >&5
4769   rm -rf conftest*
4770   eval "ac_cv_func_vprintf=no"
4771 fi
4772 rm -f conftest*
4773 fi
4774
4775 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
4776   echo "$ac_t""yes" 1>&6
4777   cat >> confdefs.h <<\EOF
4778 #define HAVE_VPRINTF 1
4779 EOF
4780
4781 else
4782   echo "$ac_t""no" 1>&6
4783 fi
4784
4785 if test "$ac_cv_func_vprintf" != yes; then
4786 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
4787 echo "configure:4788: checking for _doprnt" >&5
4788 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
4789   echo $ac_n "(cached) $ac_c" 1>&6
4790 else
4791   cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 /* System header to define __stub macros and hopefully few prototypes,
4795     which can conflict with char _doprnt(); below.  */
4796 #include <assert.h>
4797 /* Override any gcc2 internal prototype to avoid an error.  */
4798 /* We use char because int might match the return type of a gcc2
4799     builtin and then its argument prototype would still apply.  */
4800 char _doprnt();
4801
4802 int main() {
4803
4804 /* The GNU C library defines this for functions which it implements
4805     to always fail with ENOSYS.  Some functions are actually named
4806     something starting with __ and the normal name is an alias.  */
4807 #if defined (__stub__doprnt) || defined (__stub____doprnt)
4808 choke me
4809 #else
4810 _doprnt();
4811 #endif
4812
4813 ; return 0; }
4814 EOF
4815 if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4816   rm -rf conftest*
4817   eval "ac_cv_func__doprnt=yes"
4818 else
4819   echo "configure: failed program was:" >&5
4820   cat conftest.$ac_ext >&5
4821   rm -rf conftest*
4822   eval "ac_cv_func__doprnt=no"
4823 fi
4824 rm -f conftest*
4825 fi
4826
4827 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
4828   echo "$ac_t""yes" 1>&6
4829   cat >> confdefs.h <<\EOF
4830 #define HAVE_DOPRNT 1
4831 EOF
4832
4833 else
4834   echo "$ac_t""no" 1>&6
4835 fi
4836
4837 fi
4838
4839 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
4840 echo "configure:4841: checking for wait3 that fills in rusage" >&5
4841 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
4842   echo $ac_n "(cached) $ac_c" 1>&6
4843 else
4844   if test "$cross_compiling" = yes; then
4845   ac_cv_func_wait3_rusage=no
4846 else
4847   cat > conftest.$ac_ext <<EOF
4848 #line 4849 "configure"
4849 #include "confdefs.h"
4850 #include <sys/types.h>
4851 #include <sys/time.h>
4852 #include <sys/resource.h>
4853 #include <stdio.h>
4854 /* HP-UX has wait3 but does not fill in rusage at all.  */
4855 main() {
4856   struct rusage r;
4857   int i;
4858   /* Use a field that we can force nonzero --
4859      voluntary context switches.
4860      For systems like NeXT and OSF/1 that don't set it,
4861      also use the system CPU time.  And page faults (I/O) for Linux.  */
4862   r.ru_nvcsw = 0;
4863   r.ru_stime.tv_sec = 0;
4864   r.ru_stime.tv_usec = 0;
4865   r.ru_majflt = r.ru_minflt = 0;
4866   switch (fork()) {
4867   case 0: /* Child.  */
4868     sleep(1); /* Give up the CPU.  */
4869     _exit(0);
4870   case -1: _exit(0); /* What can we do?  */
4871   default: /* Parent.  */
4872     wait3(&i, 0, &r);
4873     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
4874     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
4875          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
4876   }
4877 }
4878 EOF
4879 if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4880 then
4881   ac_cv_func_wait3_rusage=yes
4882 else
4883   echo "configure: failed program was:" >&5
4884   cat conftest.$ac_ext >&5
4885   rm -fr conftest*
4886   ac_cv_func_wait3_rusage=no
4887 fi
4888 rm -fr conftest*
4889 fi
4890
4891 fi
4892
4893 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
4894 if test $ac_cv_func_wait3_rusage = yes; then
4895   cat >> confdefs.h <<\EOF
4896 #define HAVE_WAIT3 1
4897 EOF
4898
4899 fi
4900
4901
4902 for ac_func in \
4903         flock                   \
4904         gethostname             \
4905         gettimeofday    \
4906         getdtablesize   \
4907         lockf                   \
4908         memcpy                  \
4909         mktime                  \
4910         select                  \
4911         setpwfile               \
4912         setsid                  \
4913         signal                  \
4914         sigset                  \
4915         socket                  \
4916         strerror                \
4917         strstr                  \
4918         strrchr                 \
4919         strsep                  \
4920         strtod                  \
4921         strtol                  \
4922         strtoul                 \
4923         sysconf                 \
4924
4925 do
4926 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4927 echo "configure:4928: checking for $ac_func" >&5
4928 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934 /* System header to define __stub macros and hopefully few prototypes,
4935     which can conflict with char $ac_func(); below.  */
4936 #include <assert.h>
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 /* We use char because int might match the return type of a gcc2
4939     builtin and then its argument prototype would still apply.  */
4940 char $ac_func();
4941
4942 int main() {
4943
4944 /* The GNU C library defines this for functions which it implements
4945     to always fail with ENOSYS.  Some functions are actually named
4946     something starting with __ and the normal name is an alias.  */
4947 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4948 choke me
4949 #else
4950 $ac_func();
4951 #endif
4952
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4956   rm -rf conftest*
4957   eval "ac_cv_func_$ac_func=yes"
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   eval "ac_cv_func_$ac_func=no"
4963 fi
4964 rm -f conftest*
4965 fi
4966
4967 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4968   echo "$ac_t""yes" 1>&6
4969     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4970   cat >> confdefs.h <<EOF
4971 #define $ac_tr_func 1
4972 EOF
4973  
4974 else
4975   echo "$ac_t""no" 1>&6
4976 fi
4977 done
4978
4979
4980 for ac_func in strdup
4981 do
4982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4983 echo "configure:4984: checking for $ac_func" >&5
4984 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   cat > conftest.$ac_ext <<EOF
4988 #line 4989 "configure"
4989 #include "confdefs.h"
4990 /* System header to define __stub macros and hopefully few prototypes,
4991     which can conflict with char $ac_func(); below.  */
4992 #include <assert.h>
4993 /* Override any gcc2 internal prototype to avoid an error.  */
4994 /* We use char because int might match the return type of a gcc2
4995     builtin and then its argument prototype would still apply.  */
4996 char $ac_func();
4997
4998 int main() {
4999
5000 /* The GNU C library defines this for functions which it implements
5001     to always fail with ENOSYS.  Some functions are actually named
5002     something starting with __ and the normal name is an alias.  */
5003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5004 choke me
5005 #else
5006 $ac_func();
5007 #endif
5008
5009 ; return 0; }
5010 EOF
5011 if { (eval echo configure:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5012   rm -rf conftest*
5013   eval "ac_cv_func_$ac_func=yes"
5014 else
5015   echo "configure: failed program was:" >&5
5016   cat conftest.$ac_ext >&5
5017   rm -rf conftest*
5018   eval "ac_cv_func_$ac_func=no"
5019 fi
5020 rm -f conftest*
5021 fi
5022
5023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5024   echo "$ac_t""yes" 1>&6
5025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5026   cat >> confdefs.h <<EOF
5027 #define $ac_tr_func 1
5028 EOF
5029  
5030 else
5031   echo "$ac_t""no" 1>&6
5032 LIBOBJS="$LIBOBJS ${ac_func}.o"
5033 fi
5034 done
5035
5036
5037
5038 # Check Configuration
5039
5040 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
5041 echo "configure:5042: checking declaration of sys_errlist" >&5
5042 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
5043   echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045   
5046         cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049
5050 #include <stdio.h>
5051 #include <sys/types.h>
5052 #include <errno.h> 
5053 int main() {
5054 char *c = (char *) *sys_errlist
5055 ; return 0; }
5056 EOF
5057 if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5058   rm -rf conftest*
5059   ol_cv_dcl_sys_errlist=yes
5060 else
5061   echo "configure: failed program was:" >&5
5062   cat conftest.$ac_ext >&5
5063   rm -rf conftest*
5064   ol_cv_dcl_sys_errlist=no
5065 fi
5066 rm -f conftest*
5067 fi
5068
5069 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
5070
5071 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
5072 if test $ol_cv_dcl_sys_errlist = no ; then
5073         cat >> confdefs.h <<\EOF
5074 #define DECL_SYS_ERRLIST 1
5075 EOF
5076
5077         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
5078 echo "configure:5079: checking existence of sys_errlist" >&5
5079         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
5080   echo $ac_n "(cached) $ac_c" 1>&6
5081 else
5082   
5083                 cat > conftest.$ac_ext <<EOF
5084 #line 5085 "configure"
5085 #include "confdefs.h"
5086 #include <errno.h>
5087 int main() {
5088 char *c = (char *) *sys_errlist
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5092   rm -rf conftest*
5093   ol_cv_have_sys_errlist=yes
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   ol_cv_have_sys_errlist=no
5099 fi
5100 rm -f conftest*
5101 fi
5102
5103         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
5104 fi
5105
5106
5107
5108 if test $ol_enable_debug != no ; then
5109         LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
5110 fi
5111 if test $ol_enable_libui = no ; then
5112         LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE"
5113 fi
5114 if test $ol_enable_cache = no ; then
5115         LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
5116 fi
5117 if test $ol_enable_dns != no ; then
5118         LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS"
5119 fi
5120 if test $ol_enable_referrals != no ; then
5121         LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
5122 fi
5123 if test $ol_enable_cldap != no ; then
5124         LDAP_DEFS="$LDAP_DEFS -DCLDAP"
5125 fi
5126
5127 if test $ol_enable_aclgroup != no ; then
5128         cat >> confdefs.h <<\EOF
5129 #define SLAPD_ACLGROUP 1
5130 EOF
5131
5132         SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP"
5133 fi
5134
5135 if test $ol_enable_md5 != no ; then
5136         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
5137 fi
5138
5139 if test $ol_enable_sha1 != no ; then
5140         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
5141 fi
5142
5143 if test $ol_enable_phonetic != no ; then
5144         cat >> confdefs.h <<\EOF
5145 #define SLAPD_PHONETIC 1
5146 EOF
5147
5148         SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
5149 fi
5150
5151 if test $ol_enable_rlookups != no ; then
5152         cat >> confdefs.h <<\EOF
5153 #define SLAPD_RLOOKUPS 1
5154 EOF
5155
5156         SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS"
5157 fi
5158
5159 if test $ol_link_ldbm != no ; then
5160         BUILD_SLAPD=yes
5161         BUILD_LDBM=yes
5162         LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS"
5163 fi
5164
5165 if test $ol_enable_passwd != no ; then
5166         BUILD_SLAPD=yes
5167         BUILD_PASSWD=yes
5168         SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS"
5169 fi
5170
5171 if test $ol_enable_shell != no ; then
5172         BUILD_SLAPD=yes
5173         BUILD_SHELL=yes
5174         SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS"
5175 fi
5176
5177 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
5178         $BUILD_SLAPD = yes ; then
5179         BUILD_SLURPD=yes
5180 fi
5181
5182
5183
5184
5185   
5186   
5187   
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213 trap '' 1 2 15
5214 cat > confcache <<\EOF
5215 # This file is a shell script that caches the results of configure
5216 # tests run on this system so they can be shared between configure
5217 # scripts and configure runs.  It is not useful on other systems.
5218 # If it contains results you don't want to keep, you may remove or edit it.
5219 #
5220 # By default, configure uses ./config.cache as the cache file,
5221 # creating it if it does not exist already.  You can give configure
5222 # the --cache-file=FILE option to use a different cache file; that is
5223 # what configure does when it calls configure scripts in
5224 # subdirectories, so they share the cache.
5225 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5226 # config.status only pays attention to the cache file if you give it the
5227 # --recheck option to rerun configure.
5228 #
5229 EOF
5230 # The following way of writing the cache mishandles newlines in values,
5231 # but we know of no workaround that is simple, portable, and efficient.
5232 # So, don't put newlines in cache variables' values.
5233 # Ultrix sh set writes to stderr and can't be redirected directly,
5234 # and sets the high bit in the cache file unless we assign to the vars.
5235 (set) 2>&1 |
5236   case `(ac_space=' '; set) 2>&1` in
5237   *ac_space=\ *)
5238     # `set' does not quote correctly, so add quotes (double-quote substitution
5239     # turns \\\\ into \\, and sed turns \\ into \).
5240     sed -n \
5241       -e "s/'/'\\\\''/g" \
5242       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5243     ;;
5244   *)
5245     # `set' quotes correctly as required by POSIX, so do not add quotes.
5246     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5247     ;;
5248   esac >> confcache
5249 if cmp -s $cache_file confcache; then
5250   :
5251 else
5252   if test -w $cache_file; then
5253     echo "updating cache $cache_file"
5254     cat confcache > $cache_file
5255   else
5256     echo "not updating unwritable cache $cache_file"
5257   fi
5258 fi
5259 rm -f confcache
5260
5261 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5262
5263 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5264 # Let make expand exec_prefix.
5265 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5266
5267 # Any assignment to VPATH causes Sun make to only execute
5268 # the first set of double-colon rules, so remove it if not needed.
5269 # If there is a colon in the path, we need to keep it.
5270 if test "x$srcdir" = x.; then
5271   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5272 fi
5273
5274 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5275
5276 DEFS=-DHAVE_CONFIG_H
5277
5278 # Without the "./", some shells look in PATH for config.status.
5279 : ${CONFIG_STATUS=./config.status}
5280
5281 echo creating $CONFIG_STATUS
5282 rm -f $CONFIG_STATUS
5283 cat > $CONFIG_STATUS <<EOF
5284 #! /bin/sh
5285 # Generated automatically by configure.
5286 # Run this file to recreate the current configuration.
5287 # This directory was configured as follows,
5288 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5289 #
5290 # $0 $ac_configure_args
5291 #
5292 # Compiler output produced by configure, useful for debugging
5293 # configure, is in ./config.log if it exists.
5294
5295 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5296 for ac_option
5297 do
5298   case "\$ac_option" in
5299   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5300     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5301     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5302   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5303     echo "$CONFIG_STATUS generated by autoconf version 2.12"
5304     exit 0 ;;
5305   -help | --help | --hel | --he | --h)
5306     echo "\$ac_cs_usage"; exit 0 ;;
5307   *) echo "\$ac_cs_usage"; exit 1 ;;
5308   esac
5309 done
5310
5311 ac_given_srcdir=$srcdir
5312 ac_given_INSTALL="$INSTALL"
5313
5314 trap 'rm -fr `echo "\
5315 Makefile:build/top.mk:Makefile.in:build/dir.mk \
5316 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
5317 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
5318 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
5319 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
5320 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
5321 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
5322 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
5323 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
5324 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
5325 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
5326 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
5327 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
5328 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
5329 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
5330 include/Makefile:build/top.mk:include/Makefile.in \
5331 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
5332 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
5333 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
5334 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
5335 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
5336 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
5337 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
5338 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
5339 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
5340 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
5341 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
5342 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
5343 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
5344 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
5345 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
5346 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
5347 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
5348 tests/Makefile:build/top.mk:tests/Makefile.in \
5349  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5350 EOF
5351 cat >> $CONFIG_STATUS <<EOF
5352
5353 # Protect against being on the right side of a sed subst in config.status.
5354 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5355  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5356 $ac_vpsub
5357 $extrasub
5358 s%@CFLAGS@%$CFLAGS%g
5359 s%@CPPFLAGS@%$CPPFLAGS%g
5360 s%@CXXFLAGS@%$CXXFLAGS%g
5361 s%@DEFS@%$DEFS%g
5362 s%@LDFLAGS@%$LDFLAGS%g
5363 s%@LIBS@%$LIBS%g
5364 s%@exec_prefix@%$exec_prefix%g
5365 s%@prefix@%$prefix%g
5366 s%@program_transform_name@%$program_transform_name%g
5367 s%@bindir@%$bindir%g
5368 s%@sbindir@%$sbindir%g
5369 s%@libexecdir@%$libexecdir%g
5370 s%@datadir@%$datadir%g
5371 s%@sysconfdir@%$sysconfdir%g
5372 s%@sharedstatedir@%$sharedstatedir%g
5373 s%@localstatedir@%$localstatedir%g
5374 s%@libdir@%$libdir%g
5375 s%@includedir@%$includedir%g
5376 s%@oldincludedir@%$oldincludedir%g
5377 s%@infodir@%$infodir%g
5378 s%@mandir@%$mandir%g
5379 s%@CC@%$CC%g
5380 s%@CPP@%$CPP%g
5381 s%@LN_S@%$LN_S%g
5382 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5383 s%@INSTALL_DATA@%$INSTALL_DATA%g
5384 s%@RANLIB@%$RANLIB%g
5385 s%@SET_MAKE@%$SET_MAKE%g
5386 s%@SENDMAIL@%$SENDMAIL%g
5387 s%@EDITOR@%$EDITOR%g
5388 s%@FINGER@%$FINGER%g
5389 s%@LIBOBJS@%$LIBOBJS%g
5390 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
5391 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
5392 s%@BUILD_LDBM@%$BUILD_LDBM%g
5393 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
5394 s%@BUILD_SHELL@%$BUILD_SHELL%g
5395 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
5396 s%@LDAP_DEFS@%$LDAP_DEFS%g
5397 s%@LDAP_LIBS@%$LDAP_LIBS%g
5398 s%@LDAPD_DEFS@%$LDAPD_DEFS%g
5399 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
5400 s%@SLAPD_DEFS@%$SLAPD_DEFS%g
5401 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
5402 s%@SLURPD_DEFS@%$SLURPD_DEFS%g
5403 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
5404 s%@LDBM_DEFS@%$LDBM_DEFS%g
5405 s%@LDBM_LIBS@%$LDBM_LIBS%g
5406 s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g
5407 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
5408 s%@LUTIL_DEFS@%$LUTIL_DEFS%g
5409 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
5410 s%@KRB_DEFS@%$KRB_DEFS%g
5411 s%@KRB_LIBS@%$KRB_LIBS%g
5412 s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g
5413 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
5414
5415 CEOF
5416 EOF
5417
5418 cat >> $CONFIG_STATUS <<\EOF
5419
5420 # Split the substitutions into bite-sized pieces for seds with
5421 # small command number limits, like on Digital OSF/1 and HP-UX.
5422 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5423 ac_file=1 # Number of current file.
5424 ac_beg=1 # First line for current file.
5425 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5426 ac_more_lines=:
5427 ac_sed_cmds=""
5428 while $ac_more_lines; do
5429   if test $ac_beg -gt 1; then
5430     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5431   else
5432     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5433   fi
5434   if test ! -s conftest.s$ac_file; then
5435     ac_more_lines=false
5436     rm -f conftest.s$ac_file
5437   else
5438     if test -z "$ac_sed_cmds"; then
5439       ac_sed_cmds="sed -f conftest.s$ac_file"
5440     else
5441       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5442     fi
5443     ac_file=`expr $ac_file + 1`
5444     ac_beg=$ac_end
5445     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5446   fi
5447 done
5448 if test -z "$ac_sed_cmds"; then
5449   ac_sed_cmds=cat
5450 fi
5451 EOF
5452
5453 cat >> $CONFIG_STATUS <<EOF
5454
5455 CONFIG_FILES=\${CONFIG_FILES-"\
5456 Makefile:build/top.mk:Makefile.in:build/dir.mk \
5457 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
5458 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
5459 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
5460 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
5461 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
5462 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
5463 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
5464 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
5465 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
5466 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
5467 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
5468 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
5469 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
5470 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
5471 include/Makefile:build/top.mk:include/Makefile.in \
5472 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
5473 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
5474 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
5475 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
5476 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
5477 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
5478 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
5479 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
5480 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
5481 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
5482 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
5483 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
5484 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
5485 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
5486 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
5487 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
5488 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
5489 tests/Makefile:build/top.mk:tests/Makefile.in \
5490 "}
5491 EOF
5492 cat >> $CONFIG_STATUS <<\EOF
5493 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5494   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5495   case "$ac_file" in
5496   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5497        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5498   *) ac_file_in="${ac_file}.in" ;;
5499   esac
5500
5501   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5502
5503   # Remove last slash and all that follows it.  Not all systems have dirname.
5504   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5505   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5506     # The file is in a subdirectory.
5507     test ! -d "$ac_dir" && mkdir "$ac_dir"
5508     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5509     # A "../" for each directory in $ac_dir_suffix.
5510     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5511   else
5512     ac_dir_suffix= ac_dots=
5513   fi
5514
5515   case "$ac_given_srcdir" in
5516   .)  srcdir=.
5517       if test -z "$ac_dots"; then top_srcdir=.
5518       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5519   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5520   *) # Relative path.
5521     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5522     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5523   esac
5524
5525   case "$ac_given_INSTALL" in
5526   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5527   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5528   esac
5529
5530   echo creating "$ac_file"
5531   rm -f "$ac_file"
5532   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5533   case "$ac_file" in
5534   *Makefile*) ac_comsub="1i\\
5535 # $configure_input" ;;
5536   *) ac_comsub= ;;
5537   esac
5538
5539   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5540   sed -e "$ac_comsub
5541 s%@configure_input@%$configure_input%g
5542 s%@srcdir@%$srcdir%g
5543 s%@top_srcdir@%$top_srcdir%g
5544 s%@INSTALL@%$INSTALL%g
5545 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5546 fi; done
5547 rm -f conftest.s*
5548
5549 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5550 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5551 #
5552 # ac_d sets the value in "#define NAME VALUE" lines.
5553 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5554 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5555 ac_dC='\3'
5556 ac_dD='%g'
5557 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5558 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5559 ac_uB='\([      ]\)%\1#\2define\3'
5560 ac_uC=' '
5561 ac_uD='\4%g'
5562 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5563 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5564 ac_eB='$%\1#\2define\3'
5565 ac_eC=' '
5566 ac_eD='%g'
5567
5568 if test "${CONFIG_HEADERS+set}" != set; then
5569 EOF
5570 cat >> $CONFIG_STATUS <<EOF
5571   CONFIG_HEADERS="include/portable.h"
5572 EOF
5573 cat >> $CONFIG_STATUS <<\EOF
5574 fi
5575 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5576   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5577   case "$ac_file" in
5578   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5579        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5580   *) ac_file_in="${ac_file}.in" ;;
5581   esac
5582
5583   echo creating $ac_file
5584
5585   rm -f conftest.frag conftest.in conftest.out
5586   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5587   cat $ac_file_inputs > conftest.in
5588
5589 EOF
5590
5591 # Transform confdefs.h into a sed script conftest.vals that substitutes
5592 # the proper values into config.h.in to produce config.h.  And first:
5593 # Protect against being on the right side of a sed subst in config.status.
5594 # Protect against being in an unquoted here document in config.status.
5595 rm -f conftest.vals
5596 cat > conftest.hdr <<\EOF
5597 s/[\\&%]/\\&/g
5598 s%[\\$`]%\\&%g
5599 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5600 s%ac_d%ac_u%gp
5601 s%ac_u%ac_e%gp
5602 EOF
5603 sed -n -f conftest.hdr confdefs.h > conftest.vals
5604 rm -f conftest.hdr
5605
5606 # This sed command replaces #undef with comments.  This is necessary, for
5607 # example, in the case of _POSIX_SOURCE, which is predefined and required
5608 # on some systems where configure will not decide to define it.
5609 cat >> conftest.vals <<\EOF
5610 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5611 EOF
5612
5613 # Break up conftest.vals because some shells have a limit on
5614 # the size of here documents, and old seds have small limits too.
5615
5616 rm -f conftest.tail
5617 while :
5618 do
5619   ac_lines=`grep -c . conftest.vals`
5620   # grep -c gives empty output for an empty file on some AIX systems.
5621   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5622   # Write a limited-size here document to conftest.frag.
5623   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5624   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5625   echo 'CEOF
5626   sed -f conftest.frag conftest.in > conftest.out
5627   rm -f conftest.in
5628   mv conftest.out conftest.in
5629 ' >> $CONFIG_STATUS
5630   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5631   rm -f conftest.vals
5632   mv conftest.tail conftest.vals
5633 done
5634 rm -f conftest.vals
5635
5636 cat >> $CONFIG_STATUS <<\EOF
5637   rm -f conftest.frag conftest.h
5638   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5639   cat conftest.in >> conftest.h
5640   rm -f conftest.in
5641   if cmp -s $ac_file conftest.h 2>/dev/null; then
5642     echo "$ac_file is unchanged"
5643     rm -f conftest.h
5644   else
5645     # Remove last slash and all that follows it.  Not all systems have dirname.
5646       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5647       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5648       # The file is in a subdirectory.
5649       test ! -d "$ac_dir" && mkdir "$ac_dir"
5650     fi
5651     rm -f $ac_file
5652     mv conftest.h $ac_file
5653   fi
5654 fi; done
5655
5656 EOF
5657 cat >> $CONFIG_STATUS <<EOF
5658
5659 EOF
5660 cat >> $CONFIG_STATUS <<\EOF
5661 date > stamp-h
5662 exit 0
5663 EOF
5664 chmod +x $CONFIG_STATUS
5665 rm -fr confdefs* $ac_clean_files
5666 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5667