]> git.sur5r.net Git - openldap/blob - configure
da0bc17d19723f9d167b01a580d516ab619fcb88
[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
1182 # Extract the first word of "gcc", so it can be a program name with args.
1183 set dummy gcc; ac_word=$2
1184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1185 echo "configure:1186: checking for $ac_word" >&5
1186 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1187   echo $ac_n "(cached) $ac_c" 1>&6
1188 else
1189   if test -n "$CC"; then
1190   ac_cv_prog_CC="$CC" # Let the user override the test.
1191 else
1192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1193   for ac_dir in $PATH; do
1194     test -z "$ac_dir" && ac_dir=.
1195     if test -f $ac_dir/$ac_word; then
1196       ac_cv_prog_CC="gcc"
1197       break
1198     fi
1199   done
1200   IFS="$ac_save_ifs"
1201 fi
1202 fi
1203 CC="$ac_cv_prog_CC"
1204 if test -n "$CC"; then
1205   echo "$ac_t""$CC" 1>&6
1206 else
1207   echo "$ac_t""no" 1>&6
1208 fi
1209
1210 if test -z "$CC"; then
1211   # Extract the first word of "cc", so it can be a program name with args.
1212 set dummy cc; ac_word=$2
1213 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1214 echo "configure:1215: checking for $ac_word" >&5
1215 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1216   echo $ac_n "(cached) $ac_c" 1>&6
1217 else
1218   if test -n "$CC"; then
1219   ac_cv_prog_CC="$CC" # Let the user override the test.
1220 else
1221   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1222   ac_prog_rejected=no
1223   for ac_dir in $PATH; do
1224     test -z "$ac_dir" && ac_dir=.
1225     if test -f $ac_dir/$ac_word; then
1226       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1227         ac_prog_rejected=yes
1228         continue
1229       fi
1230       ac_cv_prog_CC="cc"
1231       break
1232     fi
1233   done
1234   IFS="$ac_save_ifs"
1235 if test $ac_prog_rejected = yes; then
1236   # We found a bogon in the path, so make sure we never use it.
1237   set dummy $ac_cv_prog_CC
1238   shift
1239   if test $# -gt 0; then
1240     # We chose a different compiler from the bogus one.
1241     # However, it has the same basename, so the bogon will be chosen
1242     # first if we set CC to just the basename; use the full file name.
1243     shift
1244     set dummy "$ac_dir/$ac_word" "$@"
1245     shift
1246     ac_cv_prog_CC="$@"
1247   fi
1248 fi
1249 fi
1250 fi
1251 CC="$ac_cv_prog_CC"
1252 if test -n "$CC"; then
1253   echo "$ac_t""$CC" 1>&6
1254 else
1255   echo "$ac_t""no" 1>&6
1256 fi
1257
1258   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1259 fi
1260
1261 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1262 echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1263
1264 ac_ext=c
1265 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1266 ac_cpp='$CPP $CPPFLAGS'
1267 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1268 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1269 cross_compiling=$ac_cv_prog_cc_cross
1270
1271 cat > conftest.$ac_ext <<EOF
1272 #line 1273 "configure"
1273 #include "confdefs.h"
1274 main(){return(0);}
1275 EOF
1276 if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1277   ac_cv_prog_cc_works=yes
1278   # If we can't run a trivial program, we are probably using a cross compiler.
1279   if (./conftest; exit) 2>/dev/null; then
1280     ac_cv_prog_cc_cross=no
1281   else
1282     ac_cv_prog_cc_cross=yes
1283   fi
1284 else
1285   echo "configure: failed program was:" >&5
1286   cat conftest.$ac_ext >&5
1287   ac_cv_prog_cc_works=no
1288 fi
1289 rm -fr conftest*
1290
1291 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1292 if test $ac_cv_prog_cc_works = no; then
1293   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1294 fi
1295 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1296 echo "configure:1297: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1297 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1298 cross_compiling=$ac_cv_prog_cc_cross
1299
1300 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1301 echo "configure:1302: checking whether we are using GNU C" >&5
1302 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1303   echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305   cat > conftest.c <<EOF
1306 #ifdef __GNUC__
1307   yes;
1308 #endif
1309 EOF
1310 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1311   ac_cv_prog_gcc=yes
1312 else
1313   ac_cv_prog_gcc=no
1314 fi
1315 fi
1316
1317 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1318
1319 if test $ac_cv_prog_gcc = yes; then
1320   GCC=yes
1321   ac_test_CFLAGS="${CFLAGS+set}"
1322   ac_save_CFLAGS="$CFLAGS"
1323   CFLAGS=
1324   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1325 echo "configure:1326: checking whether ${CC-cc} accepts -g" >&5
1326 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1327   echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329   echo 'void f(){}' > conftest.c
1330 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1331   ac_cv_prog_cc_g=yes
1332 else
1333   ac_cv_prog_cc_g=no
1334 fi
1335 rm -f conftest*
1336
1337 fi
1338
1339 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1340   if test "$ac_test_CFLAGS" = set; then
1341     CFLAGS="$ac_save_CFLAGS"
1342   elif test $ac_cv_prog_cc_g = yes; then
1343     CFLAGS="-g -O2"
1344   else
1345     CFLAGS="-O2"
1346   fi
1347 else
1348   GCC=
1349   test "${CFLAGS+set}" = set || CFLAGS="-g"
1350 fi
1351
1352 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1353 echo "configure:1354: checking how to run the C preprocessor" >&5
1354 # On Suns, sometimes $CPP names a directory.
1355 if test -n "$CPP" && test -d "$CPP"; then
1356   CPP=
1357 fi
1358 if test -z "$CPP"; then
1359 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1360   echo $ac_n "(cached) $ac_c" 1>&6
1361 else
1362     # This must be in double quotes, not single quotes, because CPP may get
1363   # substituted into the Makefile and "${CC-cc}" will confuse make.
1364   CPP="${CC-cc} -E"
1365   # On the NeXT, cc -E runs the code through the compiler's parser,
1366   # not just through cpp.
1367   cat > conftest.$ac_ext <<EOF
1368 #line 1369 "configure"
1369 #include "confdefs.h"
1370 #include <assert.h>
1371 Syntax Error
1372 EOF
1373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1374 { (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1375 ac_err=`grep -v '^ *+' conftest.out`
1376 if test -z "$ac_err"; then
1377   :
1378 else
1379   echo "$ac_err" >&5
1380   echo "configure: failed program was:" >&5
1381   cat conftest.$ac_ext >&5
1382   rm -rf conftest*
1383   CPP="${CC-cc} -E -traditional-cpp"
1384   cat > conftest.$ac_ext <<EOF
1385 #line 1386 "configure"
1386 #include "confdefs.h"
1387 #include <assert.h>
1388 Syntax Error
1389 EOF
1390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1391 { (eval echo configure:1392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1392 ac_err=`grep -v '^ *+' conftest.out`
1393 if test -z "$ac_err"; then
1394   :
1395 else
1396   echo "$ac_err" >&5
1397   echo "configure: failed program was:" >&5
1398   cat conftest.$ac_ext >&5
1399   rm -rf conftest*
1400   CPP=/lib/cpp
1401 fi
1402 rm -f conftest*
1403 fi
1404 rm -f conftest*
1405   ac_cv_prog_CPP="$CPP"
1406 fi
1407   CPP="$ac_cv_prog_CPP"
1408 else
1409   ac_cv_prog_CPP="$CPP"
1410 fi
1411 echo "$ac_t""$CPP" 1>&6
1412
1413 if test $ac_cv_prog_gcc = yes; then
1414     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1415 echo "configure:1416: checking whether ${CC-cc} needs -traditional" >&5
1416 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1417   echo $ac_n "(cached) $ac_c" 1>&6
1418 else
1419     ac_pattern="Autoconf.*'x'"
1420   cat > conftest.$ac_ext <<EOF
1421 #line 1422 "configure"
1422 #include "confdefs.h"
1423 #include <sgtty.h>
1424 Autoconf TIOCGETP
1425 EOF
1426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1427   egrep "$ac_pattern" >/dev/null 2>&1; then
1428   rm -rf conftest*
1429   ac_cv_prog_gcc_traditional=yes
1430 else
1431   rm -rf conftest*
1432   ac_cv_prog_gcc_traditional=no
1433 fi
1434 rm -f conftest*
1435
1436
1437   if test $ac_cv_prog_gcc_traditional = no; then
1438     cat > conftest.$ac_ext <<EOF
1439 #line 1440 "configure"
1440 #include "confdefs.h"
1441 #include <termio.h>
1442 Autoconf TCGETA
1443 EOF
1444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1445   egrep "$ac_pattern" >/dev/null 2>&1; then
1446   rm -rf conftest*
1447   ac_cv_prog_gcc_traditional=yes
1448 fi
1449 rm -f conftest*
1450
1451   fi
1452 fi
1453
1454 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1455   if test $ac_cv_prog_gcc_traditional = yes; then
1456     CC="$CC -traditional"
1457   fi
1458 fi
1459
1460
1461 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1462 echo "configure:1463: checking whether ln -s works" >&5
1463 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1464   echo $ac_n "(cached) $ac_c" 1>&6
1465 else
1466   rm -f conftestdata
1467 if ln -s X conftestdata 2>/dev/null
1468 then
1469   rm -f conftestdata
1470   ac_cv_prog_LN_S="ln -s"
1471 else
1472   ac_cv_prog_LN_S=ln
1473 fi
1474 fi
1475 LN_S="$ac_cv_prog_LN_S"
1476 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1477   echo "$ac_t""yes" 1>&6
1478 else
1479   echo "$ac_t""no" 1>&6
1480 fi
1481
1482 # Find a good install program.  We prefer a C program (faster),
1483 # so one script is as good as another.  But avoid the broken or
1484 # incompatible versions:
1485 # SysV /etc/install, /usr/sbin/install
1486 # SunOS /usr/etc/install
1487 # IRIX /sbin/install
1488 # AIX /bin/install
1489 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1490 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1491 # ./install, which can be erroneously created by make from ./install.sh.
1492 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1493 echo "configure:1494: checking for a BSD compatible install" >&5
1494 if test -z "$INSTALL"; then
1495 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1496   echo $ac_n "(cached) $ac_c" 1>&6
1497 else
1498     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1499   for ac_dir in $PATH; do
1500     # Account for people who put trailing slashes in PATH elements.
1501     case "$ac_dir/" in
1502     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1503     *)
1504       # OSF1 and SCO ODT 3.0 have their own names for install.
1505       for ac_prog in ginstall installbsd scoinst install; do
1506         if test -f $ac_dir/$ac_prog; then
1507           if test $ac_prog = install &&
1508             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1509             # AIX install.  It has an incompatible calling convention.
1510             # OSF/1 installbsd also uses dspmsg, but is usable.
1511             :
1512           else
1513             ac_cv_path_install="$ac_dir/$ac_prog -c"
1514             break 2
1515           fi
1516         fi
1517       done
1518       ;;
1519     esac
1520   done
1521   IFS="$ac_save_IFS"
1522
1523 fi
1524   if test "${ac_cv_path_install+set}" = set; then
1525     INSTALL="$ac_cv_path_install"
1526   else
1527     # As a last resort, use the slow shell script.  We don't cache a
1528     # path for INSTALL within a source directory, because that will
1529     # break other packages using the cache if that directory is
1530     # removed, or if the path is relative.
1531     INSTALL="$ac_install_sh"
1532   fi
1533 fi
1534 echo "$ac_t""$INSTALL" 1>&6
1535
1536 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1537 # It thinks the first close brace ends the variable substitution.
1538 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1539
1540 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1541
1542 # Extract the first word of "ranlib", so it can be a program name with args.
1543 set dummy ranlib; ac_word=$2
1544 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1545 echo "configure:1546: checking for $ac_word" >&5
1546 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1547   echo $ac_n "(cached) $ac_c" 1>&6
1548 else
1549   if test -n "$RANLIB"; then
1550   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1551 else
1552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1553   for ac_dir in $PATH; do
1554     test -z "$ac_dir" && ac_dir=.
1555     if test -f $ac_dir/$ac_word; then
1556       ac_cv_prog_RANLIB="ranlib"
1557       break
1558     fi
1559   done
1560   IFS="$ac_save_ifs"
1561   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1562 fi
1563 fi
1564 RANLIB="$ac_cv_prog_RANLIB"
1565 if test -n "$RANLIB"; then
1566   echo "$ac_t""$RANLIB" 1>&6
1567 else
1568   echo "$ac_t""no" 1>&6
1569 fi
1570
1571 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1572 echo "configure:1573: checking whether ${MAKE-make} sets \${MAKE}" >&5
1573 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1574 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1575   echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577   cat > conftestmake <<\EOF
1578 all:
1579         @echo 'ac_maketemp="${MAKE}"'
1580 EOF
1581 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1582 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1583 if test -n "$ac_maketemp"; then
1584   eval ac_cv_prog_make_${ac_make}_set=yes
1585 else
1586   eval ac_cv_prog_make_${ac_make}_set=no
1587 fi
1588 rm -f conftestmake
1589 fi
1590 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1591   echo "$ac_t""yes" 1>&6
1592   SET_MAKE=
1593 else
1594   echo "$ac_t""no" 1>&6
1595   SET_MAKE="MAKE=${MAKE-make}"
1596 fi
1597
1598
1599 # Extract the first word of "sendmail", so it can be a program name with args.
1600 set dummy sendmail; ac_word=$2
1601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1602 echo "configure:1603: checking for $ac_word" >&5
1603 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1604   echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606   case "$SENDMAIL" in
1607   /*)
1608   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1609   ;;
1610   *)
1611   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1612   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
1613     test -z "$ac_dir" && ac_dir=.
1614     if test -f $ac_dir/$ac_word; then
1615       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1616       break
1617     fi
1618   done
1619   IFS="$ac_save_ifs"
1620   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1621   ;;
1622 esac
1623 fi
1624 SENDMAIL="$ac_cv_path_SENDMAIL"
1625 if test -n "$SENDMAIL"; then
1626   echo "$ac_t""$SENDMAIL" 1>&6
1627 else
1628   echo "$ac_t""no" 1>&6
1629 fi
1630
1631 # Extract the first word of "vi", so it can be a program name with args.
1632 set dummy vi; ac_word=$2
1633 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1634 echo "configure:1635: checking for $ac_word" >&5
1635 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1636   echo $ac_n "(cached) $ac_c" 1>&6
1637 else
1638   case "$EDITOR" in
1639   /*)
1640   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1641   ;;
1642   *)
1643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1644   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1645     test -z "$ac_dir" && ac_dir=.
1646     if test -f $ac_dir/$ac_word; then
1647       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1648       break
1649     fi
1650   done
1651   IFS="$ac_save_ifs"
1652   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1653   ;;
1654 esac
1655 fi
1656 EDITOR="$ac_cv_path_EDITOR"
1657 if test -n "$EDITOR"; then
1658   echo "$ac_t""$EDITOR" 1>&6
1659 else
1660   echo "$ac_t""no" 1>&6
1661 fi
1662
1663 # Extract the first word of "finger", so it can be a program name with args.
1664 set dummy finger; ac_word=$2
1665 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1666 echo "configure:1667: checking for $ac_word" >&5
1667 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1668   echo $ac_n "(cached) $ac_c" 1>&6
1669 else
1670   case "$FINGER" in
1671   /*)
1672   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1673   ;;
1674   *)
1675   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1676   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1677     test -z "$ac_dir" && ac_dir=.
1678     if test -f $ac_dir/$ac_word; then
1679       ac_cv_path_FINGER="$ac_dir/$ac_word"
1680       break
1681     fi
1682   done
1683   IFS="$ac_save_ifs"
1684   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1685   ;;
1686 esac
1687 fi
1688 FINGER="$ac_cv_path_FINGER"
1689 if test -n "$FINGER"; then
1690   echo "$ac_t""$FINGER" 1>&6
1691 else
1692   echo "$ac_t""no" 1>&6
1693 fi
1694
1695
1696
1697 ol_link_threads=no
1698 if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
1699         for ac_hdr in pthread.h sched.h
1700 do
1701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1703 echo "configure:1704: checking for $ac_hdr" >&5
1704 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 #include <$ac_hdr>
1711 EOF
1712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1713 { (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1714 ac_err=`grep -v '^ *+' conftest.out`
1715 if test -z "$ac_err"; then
1716   rm -rf conftest*
1717   eval "ac_cv_header_$ac_safe=yes"
1718 else
1719   echo "$ac_err" >&5
1720   echo "configure: failed program was:" >&5
1721   cat conftest.$ac_ext >&5
1722   rm -rf conftest*
1723   eval "ac_cv_header_$ac_safe=no"
1724 fi
1725 rm -f conftest*
1726 fi
1727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1728   echo "$ac_t""yes" 1>&6
1729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1730   cat >> confdefs.h <<EOF
1731 #define $ac_tr_hdr 1
1732 EOF
1733  
1734 else
1735   echo "$ac_t""no" 1>&6
1736 fi
1737 done
1738
1739
1740         if test "$ac_cv_header_pthread_h" = yes ; then
1741                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
1742 echo "configure:1743: checking POSIX thread version" >&5
1743 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
1744   echo $ac_n "(cached) $ac_c" 1>&6
1745 else
1746   
1747         cat > conftest.$ac_ext <<EOF
1748 #line 1749 "configure"
1749 #include "confdefs.h"
1750
1751 #               include <pthread.h>
1752                 /* this check could be improved */
1753 #               ifdef PTHREAD_ONCE_INIT
1754                         final
1755 #               endif
1756         
1757 EOF
1758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1759   egrep "final" >/dev/null 2>&1; then
1760   rm -rf conftest*
1761   ol_pthread_final=yes
1762 else
1763   rm -rf conftest*
1764   ol_pthread_final=no
1765 fi
1766 rm -f conftest*
1767
1768
1769         cat > conftest.$ac_ext <<EOF
1770 #line 1771 "configure"
1771 #include "confdefs.h"
1772
1773 #               include <pthread.h>
1774                 /* this check could be improved */
1775 #               ifdef pthread_once_init
1776                         draft4
1777 #               endif
1778         
1779 EOF
1780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1781   egrep "draft4" >/dev/null 2>&1; then
1782   rm -rf conftest*
1783   ol_pthread_draft4=yes
1784 else
1785   rm -rf conftest*
1786   ol_pthread_draft4=no
1787 fi
1788 rm -f conftest*
1789
1790
1791         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
1792                 ol_cv_pthread_version=final
1793         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
1794                 ol_cv_pthread_version=draft4
1795         else
1796                 ol_cv_pthread_version=unknown
1797         fi
1798
1799 fi
1800
1801 echo "$ac_t""$ol_cv_pthread_version" 1>&6
1802
1803
1804                 if test $ol_cv_pthread_version = final ; then
1805                         LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS"
1806                 elif test $ol_cv_pthread_version = draft4 ; then
1807                         LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS"
1808                 else
1809                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
1810                 fi
1811
1812                 # consider threads found
1813                 ol_with_threads=found
1814
1815                 
1816 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
1817 echo "configure:1818: checking for LinuxThreads" >&5
1818 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
1819   echo $ac_n "(cached) $ac_c" 1>&6
1820 else
1821   
1822         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
1823         if test "$res" -gt 0 ; then
1824                 ol_cv_linux_threads=yes
1825         else
1826                 ol_cv_linux_threads=no
1827         fi
1828
1829 fi
1830
1831 echo "$ac_t""$ol_cv_linux_threads" 1>&6
1832
1833
1834                 if test $ol_cv_linux_threads = yes ; then
1835                         LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS"
1836                 fi
1837
1838                 
1839                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
1840 echo "configure:1841: checking for pthread_create" >&5
1841 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
1842   echo $ac_n "(cached) $ac_c" 1>&6
1843 else
1844   cat > conftest.$ac_ext <<EOF
1845 #line 1846 "configure"
1846 #include "confdefs.h"
1847 /* System header to define __stub macros and hopefully few prototypes,
1848     which can conflict with char pthread_create(); below.  */
1849 #include <assert.h>
1850 /* Override any gcc2 internal prototype to avoid an error.  */
1851 /* We use char because int might match the return type of a gcc2
1852     builtin and then its argument prototype would still apply.  */
1853 char pthread_create();
1854
1855 int main() {
1856
1857 /* The GNU C library defines this for functions which it implements
1858     to always fail with ENOSYS.  Some functions are actually named
1859     something starting with __ and the normal name is an alias.  */
1860 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
1861 choke me
1862 #else
1863 pthread_create();
1864 #endif
1865
1866 ; return 0; }
1867 EOF
1868 if { (eval echo configure:1869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1869   rm -rf conftest*
1870   eval "ac_cv_func_pthread_create=yes"
1871 else
1872   echo "configure: failed program was:" >&5
1873   cat conftest.$ac_ext >&5
1874   rm -rf conftest*
1875   eval "ac_cv_func_pthread_create=no"
1876 fi
1877 rm -f conftest*
1878 fi
1879
1880 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
1881   echo "$ac_t""yes" 1>&6
1882   ol_link_threads=yes
1883 else
1884   echo "$ac_t""no" 1>&6
1885 fi
1886
1887
1888                 if test $ol_link_threads = no ; then
1889                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
1890 echo "configure:1891: checking for pthread_create with -pthread" >&5
1891 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
1892   echo $ac_n "(cached) $ac_c" 1>&6
1893 else
1894   
1895                                                                 save_LIBS="$LIBS"
1896                                 LIBS="-pthread $LIBS"
1897                                 cat > conftest.$ac_ext <<EOF
1898 #line 1899 "configure"
1899 #include "confdefs.h"
1900 #include <pthread.h>
1901 int main() {
1902
1903                                         pthread_create((pthread_t*) 0,
1904                                                 (pthread_attr_t*) 0, 0, 0);
1905                                         
1906 ; return 0; }
1907 EOF
1908 if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1909   rm -rf conftest*
1910   ol_cv_pthread_flag=yes
1911 else
1912   echo "configure: failed program was:" >&5
1913   cat conftest.$ac_ext >&5
1914   rm -rf conftest*
1915   ol_cv_pthread_flag=no
1916 fi
1917 rm -f conftest*
1918                                                                 LIBS="$save_LIBS"
1919                         
1920 fi
1921
1922 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
1923
1924                         if test $ol_cv_pthread_flag = yes ; then
1925                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
1926                                 ol_link_threads=posix
1927                         fi
1928                 fi
1929
1930                 if test $ol_link_threads = no ; then
1931                                                 save_LIBS="$LIBS"
1932                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
1933 echo "configure:1934: checking for pthread_create in -lpthread" >&5
1934 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
1935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1936   echo $ac_n "(cached) $ac_c" 1>&6
1937 else
1938   ac_save_LIBS="$LIBS"
1939 LIBS="-lpthread  $LIBS"
1940 cat > conftest.$ac_ext <<EOF
1941 #line 1942 "configure"
1942 #include "confdefs.h"
1943 /* Override any gcc2 internal prototype to avoid an error.  */
1944 /* We use char because int might match the return type of a gcc2
1945     builtin and then its argument prototype would still apply.  */
1946 char pthread_create();
1947
1948 int main() {
1949 pthread_create()
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   
1968                                 ol_link_threads=posix
1969                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
1970 else
1971   echo "$ac_t""no" 1>&6
1972 fi
1973
1974                         LIBS="$save_LIBS"
1975                 fi
1976
1977                 if test $ol_link_threads = no ; then
1978                                                 save_LIBS="$LIBS"
1979                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
1980 echo "configure:1981: checking for pthread_create in -lc_r" >&5
1981 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
1982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1983   echo $ac_n "(cached) $ac_c" 1>&6
1984 else
1985   ac_save_LIBS="$LIBS"
1986 LIBS="-lc_r  $LIBS"
1987 cat > conftest.$ac_ext <<EOF
1988 #line 1989 "configure"
1989 #include "confdefs.h"
1990 /* Override any gcc2 internal prototype to avoid an error.  */
1991 /* We use char because int might match the return type of a gcc2
1992     builtin and then its argument prototype would still apply.  */
1993 char pthread_create();
1994
1995 int main() {
1996 pthread_create()
1997 ; return 0; }
1998 EOF
1999 if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2000   rm -rf conftest*
2001   eval "ac_cv_lib_$ac_lib_var=yes"
2002 else
2003   echo "configure: failed program was:" >&5
2004   cat conftest.$ac_ext >&5
2005   rm -rf conftest*
2006   eval "ac_cv_lib_$ac_lib_var=no"
2007 fi
2008 rm -f conftest*
2009 LIBS="$ac_save_LIBS"
2010
2011 fi
2012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2013   echo "$ac_t""yes" 1>&6
2014   
2015                                 ol_link_threads=posix
2016                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
2017 else
2018   echo "$ac_t""no" 1>&6
2019 fi
2020
2021                         LIBS="$save_LIBS"
2022                 fi
2023
2024                 if test $ol_link_threads = no ; then
2025                                                 save_LIBS="$LIBS"
2026                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2027 echo "configure:2028: checking for pthread_create in -lpthread" >&5
2028 ac_lib_var=`echo pthread'_'pthread_create | 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="-lpthread -lmach -lexc -lc $LIBS"
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 /* Override any gcc2 internal prototype to avoid an error.  */
2038 /* We use char because int might match the return type of a gcc2
2039     builtin and then its argument prototype would still apply.  */
2040 char pthread_create();
2041
2042 int main() {
2043 pthread_create()
2044 ; return 0; }
2045 EOF
2046 if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2047   rm -rf conftest*
2048   eval "ac_cv_lib_$ac_lib_var=yes"
2049 else
2050   echo "configure: failed program was:" >&5
2051   cat conftest.$ac_ext >&5
2052   rm -rf conftest*
2053   eval "ac_cv_lib_$ac_lib_var=no"
2054 fi
2055 rm -f conftest*
2056 LIBS="$ac_save_LIBS"
2057
2058 fi
2059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2060   echo "$ac_t""yes" 1>&6
2061   
2062                                 ol_link_threads=posix
2063                                 LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS"
2064                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"
2065 else
2066   echo "$ac_t""no" 1>&6
2067 fi
2068
2069                         LIBS="$save_LIBS"
2070                 fi
2071
2072                 if test $ol_link_threads != no ; then
2073                                                 echo $ac_n "checking for sched_yield""... $ac_c" 1>&6
2074 echo "configure:2075: checking for sched_yield" >&5
2075 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then
2076   echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078   cat > conftest.$ac_ext <<EOF
2079 #line 2080 "configure"
2080 #include "confdefs.h"
2081 /* System header to define __stub macros and hopefully few prototypes,
2082     which can conflict with char sched_yield(); below.  */
2083 #include <assert.h>
2084 /* Override any gcc2 internal prototype to avoid an error.  */
2085 /* We use char because int might match the return type of a gcc2
2086     builtin and then its argument prototype would still apply.  */
2087 char sched_yield();
2088
2089 int main() {
2090
2091 /* The GNU C library defines this for functions which it implements
2092     to always fail with ENOSYS.  Some functions are actually named
2093     something starting with __ and the normal name is an alias.  */
2094 #if defined (__stub_sched_yield) || defined (__stub___sched_yield)
2095 choke me
2096 #else
2097 sched_yield();
2098 #endif
2099
2100 ; return 0; }
2101 EOF
2102 if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2103   rm -rf conftest*
2104   eval "ac_cv_func_sched_yield=yes"
2105 else
2106   echo "configure: failed program was:" >&5
2107   cat conftest.$ac_ext >&5
2108   rm -rf conftest*
2109   eval "ac_cv_func_sched_yield=no"
2110 fi
2111 rm -f conftest*
2112 fi
2113
2114 if eval "test \"`echo '$ac_cv_func_'sched_yield`\" = yes"; then
2115   echo "$ac_t""yes" 1>&6
2116   :
2117 else
2118   echo "$ac_t""no" 1>&6
2119 fi
2120
2121                 else
2122                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
2123                 fi
2124         fi
2125
2126         if test $ol_with_threads = posix ; then
2127                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
2128         fi
2129 fi
2130
2131 if test $ol_with_threads = manual ; then
2132                 $ol_link_threads=yes
2133
2134         echo "configure: warning: thread defines and link options must be set manually" 1>&2
2135
2136         for ac_hdr in pthread.h sched.h
2137 do
2138 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2139 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2140 echo "configure:2141: checking for $ac_hdr" >&5
2141 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2142   echo $ac_n "(cached) $ac_c" 1>&6
2143 else
2144   cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147 #include <$ac_hdr>
2148 EOF
2149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2150 { (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2151 ac_err=`grep -v '^ *+' conftest.out`
2152 if test -z "$ac_err"; then
2153   rm -rf conftest*
2154   eval "ac_cv_header_$ac_safe=yes"
2155 else
2156   echo "$ac_err" >&5
2157   echo "configure: failed program was:" >&5
2158   cat conftest.$ac_ext >&5
2159   rm -rf conftest*
2160   eval "ac_cv_header_$ac_safe=no"
2161 fi
2162 rm -f conftest*
2163 fi
2164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2165   echo "$ac_t""yes" 1>&6
2166     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2167   cat >> confdefs.h <<EOF
2168 #define $ac_tr_hdr 1
2169 EOF
2170  
2171 else
2172   echo "$ac_t""no" 1>&6
2173 fi
2174 done
2175
2176         echo $ac_n "checking for sched_yield""... $ac_c" 1>&6
2177 echo "configure:2178: checking for sched_yield" >&5
2178 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then
2179   echo $ac_n "(cached) $ac_c" 1>&6
2180 else
2181   cat > conftest.$ac_ext <<EOF
2182 #line 2183 "configure"
2183 #include "confdefs.h"
2184 /* System header to define __stub macros and hopefully few prototypes,
2185     which can conflict with char sched_yield(); below.  */
2186 #include <assert.h>
2187 /* Override any gcc2 internal prototype to avoid an error.  */
2188 /* We use char because int might match the return type of a gcc2
2189     builtin and then its argument prototype would still apply.  */
2190 char sched_yield();
2191
2192 int main() {
2193
2194 /* The GNU C library defines this for functions which it implements
2195     to always fail with ENOSYS.  Some functions are actually named
2196     something starting with __ and the normal name is an alias.  */
2197 #if defined (__stub_sched_yield) || defined (__stub___sched_yield)
2198 choke me
2199 #else
2200 sched_yield();
2201 #endif
2202
2203 ; return 0; }
2204 EOF
2205 if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2206   rm -rf conftest*
2207   eval "ac_cv_func_sched_yield=yes"
2208 else
2209   echo "configure: failed program was:" >&5
2210   cat conftest.$ac_ext >&5
2211   rm -rf conftest*
2212   eval "ac_cv_func_sched_yield=no"
2213 fi
2214 rm -f conftest*
2215 fi
2216
2217 if eval "test \"`echo '$ac_cv_func_'sched_yield`\" = yes"; then
2218   echo "$ac_t""yes" 1>&6
2219   :
2220 else
2221   echo "$ac_t""no" 1>&6
2222 fi
2223
2224         
2225 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
2226 echo "configure:2227: checking for LinuxThreads" >&5
2227 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
2228   echo $ac_n "(cached) $ac_c" 1>&6
2229 else
2230   
2231         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
2232         if test "$res" -gt 0 ; then
2233                 ol_cv_linux_threads=yes
2234         else
2235                 ol_cv_linux_threads=no
2236         fi
2237
2238 fi
2239
2240 echo "$ac_t""$ol_cv_linux_threads" 1>&6
2241
2242 fi
2243
2244 if test $ol_link_threads = no ; then
2245         if test $ol_with_threads = yes ; then
2246                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
2247         fi
2248
2249         if test $ol_with_threads = auto ; then
2250                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
2251                 $ol_with_threads = no
2252         fi
2253
2254         LTHREAD_DEFS="-DNO_THREADS"
2255         LTHREAD_LIBS=""
2256 fi
2257
2258 ol_link_ldbm=no 
2259 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
2260         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
2261 echo "configure:2262: checking for DB2 library" >&5
2262 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
2263   echo $ac_n "(cached) $ac_c" 1>&6
2264 else
2265         ol_LIBS="$LIBS"
2266         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
2267 echo "configure:2268: checking for db_open in -ldb" >&5
2268 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
2269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2270   echo $ac_n "(cached) $ac_c" 1>&6
2271 else
2272   ac_save_LIBS="$LIBS"
2273 LIBS="-ldb  $LIBS"
2274 cat > conftest.$ac_ext <<EOF
2275 #line 2276 "configure"
2276 #include "confdefs.h"
2277 /* Override any gcc2 internal prototype to avoid an error.  */
2278 /* We use char because int might match the return type of a gcc2
2279     builtin and then its argument prototype would still apply.  */
2280 char db_open();
2281
2282 int main() {
2283 db_open()
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   eval "ac_cv_lib_$ac_lib_var=yes"
2289 else
2290   echo "configure: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   rm -rf conftest*
2293   eval "ac_cv_lib_$ac_lib_var=no"
2294 fi
2295 rm -f conftest*
2296 LIBS="$ac_save_LIBS"
2297
2298 fi
2299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301   ol_cv_lib_db2=-ldb
2302 else
2303   echo "$ac_t""no" 1>&6
2304 ol_cv_lib_db2=no
2305 fi
2306
2307         LIBS="$ol_LIBS"
2308
2309 fi
2310
2311 echo "$ac_t""$ol_cv_lib_db2" 1>&6
2312
2313 for ac_hdr in db.h
2314 do
2315 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2316 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2317 echo "configure:2318: checking for $ac_hdr" >&5
2318 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2319   echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321   cat > conftest.$ac_ext <<EOF
2322 #line 2323 "configure"
2323 #include "confdefs.h"
2324 #include <$ac_hdr>
2325 EOF
2326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2327 { (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2328 ac_err=`grep -v '^ *+' conftest.out`
2329 if test -z "$ac_err"; then
2330   rm -rf conftest*
2331   eval "ac_cv_header_$ac_safe=yes"
2332 else
2333   echo "$ac_err" >&5
2334   echo "configure: failed program was:" >&5
2335   cat conftest.$ac_ext >&5
2336   rm -rf conftest*
2337   eval "ac_cv_header_$ac_safe=no"
2338 fi
2339 rm -f conftest*
2340 fi
2341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2342   echo "$ac_t""yes" 1>&6
2343     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2344   cat >> confdefs.h <<EOF
2345 #define $ac_tr_hdr 1
2346 EOF
2347  
2348 else
2349   echo "$ac_t""no" 1>&6
2350 fi
2351 done
2352
2353 if test $ac_cv_header_db_h = yes ; then
2354         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
2355 echo "configure:2356: checking if db.h is DB2" >&5
2356 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   
2360                 cat > conftest.$ac_ext <<EOF
2361 #line 2362 "configure"
2362 #include "confdefs.h"
2363
2364 #                       include <db.h>
2365                         /* this check could be improved */
2366 #                       ifdef DB_VERSION_MAJOR
2367 #                               if DB_VERSION_MAJOR == 2
2368                                         __db_version_2
2369 #                               endif
2370 #                       endif
2371                 
2372 EOF
2373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2374   egrep "__db_version_2" >/dev/null 2>&1; then
2375   rm -rf conftest*
2376   ol_cv_header_db2=yes
2377 else
2378   rm -rf conftest*
2379   ol_cv_header_db2=no
2380 fi
2381 rm -f conftest*
2382
2383 fi
2384
2385 echo "$ac_t""$ol_cv_header_db2" 1>&6
2386 else
2387         ol_cv_header_db2=no
2388 fi
2389
2390
2391  
2392  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
2393 echo "configure:2394: checking for Berkeley DB2" >&5
2394 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
2395   echo $ac_n "(cached) $ac_c" 1>&6
2396 else
2397   
2398         if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then
2399                 ol_cv_berkeley_db2=no
2400         else
2401                 ol_cv_berkeley_db2=yes
2402         fi
2403
2404 fi
2405
2406 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
2407
2408
2409         if test $ol_cv_berkeley_db2 = yes ; then
2410                 ol_link_ldbm=db2
2411                 ol_with_ldbm_api=db2
2412
2413                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
2414
2415                 if test $ol_with_ldbm_type = hash ; then
2416                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
2417                 else
2418                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
2419                 fi
2420
2421                                                 if test $ol_cv_lib_db2 != yes ; then
2422                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
2423                 fi
2424         fi
2425 fi
2426
2427 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
2428         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
2429 echo "configure:2430: checking for Berkeley DB library" >&5
2430 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
2431   echo $ac_n "(cached) $ac_c" 1>&6
2432 else
2433         ol_LIBS="$LIBS"
2434         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
2435 echo "configure:2436: checking for dbopen" >&5
2436 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.$ac_ext <<EOF
2440 #line 2441 "configure"
2441 #include "confdefs.h"
2442 /* System header to define __stub macros and hopefully few prototypes,
2443     which can conflict with char dbopen(); below.  */
2444 #include <assert.h>
2445 /* Override any gcc2 internal prototype to avoid an error.  */
2446 /* We use char because int might match the return type of a gcc2
2447     builtin and then its argument prototype would still apply.  */
2448 char dbopen();
2449
2450 int main() {
2451
2452 /* The GNU C library defines this for functions which it implements
2453     to always fail with ENOSYS.  Some functions are actually named
2454     something starting with __ and the normal name is an alias.  */
2455 #if defined (__stub_dbopen) || defined (__stub___dbopen)
2456 choke me
2457 #else
2458 dbopen();
2459 #endif
2460
2461 ; return 0; }
2462 EOF
2463 if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2464   rm -rf conftest*
2465   eval "ac_cv_func_dbopen=yes"
2466 else
2467   echo "configure: failed program was:" >&5
2468   cat conftest.$ac_ext >&5
2469   rm -rf conftest*
2470   eval "ac_cv_func_dbopen=no"
2471 fi
2472 rm -f conftest*
2473 fi
2474
2475 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
2476   echo "$ac_t""yes" 1>&6
2477   ol_cv_lib_db=yes
2478 else
2479   echo "$ac_t""no" 1>&6
2480
2481                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
2482 echo "configure:2483: checking for dbopen in -ldb" >&5
2483 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
2484 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2485   echo $ac_n "(cached) $ac_c" 1>&6
2486 else
2487   ac_save_LIBS="$LIBS"
2488 LIBS="-ldb  $LIBS"
2489 cat > conftest.$ac_ext <<EOF
2490 #line 2491 "configure"
2491 #include "confdefs.h"
2492 /* Override any gcc2 internal prototype to avoid an error.  */
2493 /* We use char because int might match the return type of a gcc2
2494     builtin and then its argument prototype would still apply.  */
2495 char dbopen();
2496
2497 int main() {
2498 dbopen()
2499 ; return 0; }
2500 EOF
2501 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2502   rm -rf conftest*
2503   eval "ac_cv_lib_$ac_lib_var=yes"
2504 else
2505   echo "configure: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   rm -rf conftest*
2508   eval "ac_cv_lib_$ac_lib_var=no"
2509 fi
2510 rm -f conftest*
2511 LIBS="$ac_save_LIBS"
2512
2513 fi
2514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2515   echo "$ac_t""yes" 1>&6
2516   ol_cv_lib_db=-ldb
2517 else
2518   echo "$ac_t""no" 1>&6
2519 ol_cv_lib_db=no
2520 fi
2521
2522         
2523 fi
2524
2525         LIBS="$ol_LIBS"
2526
2527 fi
2528
2529 echo "$ac_t""$ol_cv_lib_db" 1>&6
2530
2531
2532 for ac_hdr in db_185.h
2533 do
2534 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2535 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2536 echo "configure:2537: checking for $ac_hdr" >&5
2537 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2538   echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540   cat > conftest.$ac_ext <<EOF
2541 #line 2542 "configure"
2542 #include "confdefs.h"
2543 #include <$ac_hdr>
2544 EOF
2545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2546 { (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2547 ac_err=`grep -v '^ *+' conftest.out`
2548 if test -z "$ac_err"; then
2549   rm -rf conftest*
2550   eval "ac_cv_header_$ac_safe=yes"
2551 else
2552   echo "$ac_err" >&5
2553   echo "configure: failed program was:" >&5
2554   cat conftest.$ac_ext >&5
2555   rm -rf conftest*
2556   eval "ac_cv_header_$ac_safe=no"
2557 fi
2558 rm -f conftest*
2559 fi
2560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2561   echo "$ac_t""yes" 1>&6
2562     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2563   cat >> confdefs.h <<EOF
2564 #define $ac_tr_hdr 1
2565 EOF
2566  
2567 else
2568   echo "$ac_t""no" 1>&6
2569 fi
2570 done
2571
2572 if test $ol_cv_header_db2 = yes ; then
2573         
2574         ol_cv_header_db=$ac_cv_header_db_185_h
2575 else
2576         ol_cv_header_db=$ac_cv_header_db_h
2577 fi
2578
2579
2580  
2581  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
2582 echo "configure:2583: checking for Berkeley DB" >&5
2583 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
2584   echo $ac_n "(cached) $ac_c" 1>&6
2585 else
2586   
2587         if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then
2588                 ol_cv_berkeley_db=no
2589         else
2590                 ol_cv_berkeley_db=yes
2591         fi
2592
2593 fi
2594
2595 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
2596
2597
2598         if test $ol_cv_berkeley_db = yes ; then
2599                 ol_link_ldbm=db
2600                 ol_with_ldbm_api=db
2601
2602                 if test $ac_cv_header_db_185_h = yes ; then
2603                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185"
2604                 fi
2605
2606                 if test $ol_with_ldbm_type = hash ; then
2607                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
2608                 else
2609                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
2610                 fi
2611
2612                                                 if test $ol_cv_lib_db != yes ; then
2613                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
2614                 fi
2615         fi
2616 fi
2617
2618 if test $ol_with_ldbm_api = manual ; then
2619                 $ol_link_ldbm=yes
2620
2621         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
2622
2623         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
2624 do
2625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2627 echo "configure:2628: checking for $ac_hdr" >&5
2628 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 #include <$ac_hdr>
2635 EOF
2636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2637 { (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2638 ac_err=`grep -v '^ *+' conftest.out`
2639 if test -z "$ac_err"; then
2640   rm -rf conftest*
2641   eval "ac_cv_header_$ac_safe=yes"
2642 else
2643   echo "$ac_err" >&5
2644   echo "configure: failed program was:" >&5
2645   cat conftest.$ac_ext >&5
2646   rm -rf conftest*
2647   eval "ac_cv_header_$ac_safe=no"
2648 fi
2649 rm -f conftest*
2650 fi
2651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2652   echo "$ac_t""yes" 1>&6
2653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2654   cat >> confdefs.h <<EOF
2655 #define $ac_tr_hdr 1
2656 EOF
2657  
2658 else
2659   echo "$ac_t""no" 1>&6
2660 fi
2661 done
2662
2663 fi
2664
2665 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
2666         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2;
2667         $ol_with_ldbm_api=none
2668 fi
2669
2670 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
2671         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
2672 echo "configure:2673: checking for GDBM library" >&5
2673 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
2674   echo $ac_n "(cached) $ac_c" 1>&6
2675 else
2676         ol_LIBS="$LIBS"
2677         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
2678 echo "configure:2679: checking for gdbm_open" >&5
2679 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
2680   echo $ac_n "(cached) $ac_c" 1>&6
2681 else
2682   cat > conftest.$ac_ext <<EOF
2683 #line 2684 "configure"
2684 #include "confdefs.h"
2685 /* System header to define __stub macros and hopefully few prototypes,
2686     which can conflict with char gdbm_open(); below.  */
2687 #include <assert.h>
2688 /* Override any gcc2 internal prototype to avoid an error.  */
2689 /* We use char because int might match the return type of a gcc2
2690     builtin and then its argument prototype would still apply.  */
2691 char gdbm_open();
2692
2693 int main() {
2694
2695 /* The GNU C library defines this for functions which it implements
2696     to always fail with ENOSYS.  Some functions are actually named
2697     something starting with __ and the normal name is an alias.  */
2698 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
2699 choke me
2700 #else
2701 gdbm_open();
2702 #endif
2703
2704 ; return 0; }
2705 EOF
2706 if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2707   rm -rf conftest*
2708   eval "ac_cv_func_gdbm_open=yes"
2709 else
2710   echo "configure: failed program was:" >&5
2711   cat conftest.$ac_ext >&5
2712   rm -rf conftest*
2713   eval "ac_cv_func_gdbm_open=no"
2714 fi
2715 rm -f conftest*
2716 fi
2717
2718 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
2719   echo "$ac_t""yes" 1>&6
2720   ol_cv_lib_gdbm=yes
2721 else
2722   echo "$ac_t""no" 1>&6
2723
2724                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
2725 echo "configure:2726: checking for gdbm_open in -lgdbm" >&5
2726 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
2727 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   ac_save_LIBS="$LIBS"
2731 LIBS="-lgdbm  $LIBS"
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 /* Override any gcc2 internal prototype to avoid an error.  */
2736 /* We use char because int might match the return type of a gcc2
2737     builtin and then its argument prototype would still apply.  */
2738 char gdbm_open();
2739
2740 int main() {
2741 gdbm_open()
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2745   rm -rf conftest*
2746   eval "ac_cv_lib_$ac_lib_var=yes"
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -rf conftest*
2751   eval "ac_cv_lib_$ac_lib_var=no"
2752 fi
2753 rm -f conftest*
2754 LIBS="$ac_save_LIBS"
2755
2756 fi
2757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2758   echo "$ac_t""yes" 1>&6
2759   ol_cv_lib_gdbm=-lgdbm
2760 else
2761   echo "$ac_t""no" 1>&6
2762 ol_cv_lib_gdbm=no
2763 fi
2764
2765         
2766 fi
2767
2768         LIBS="$ol_LIBS"
2769
2770 fi
2771
2772 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
2773
2774
2775  for ac_hdr in gdbm.h
2776 do
2777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2779 echo "configure:2780: checking for $ac_hdr" >&5
2780 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 #include <$ac_hdr>
2787 EOF
2788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2789 { (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2790 ac_err=`grep -v '^ *+' conftest.out`
2791 if test -z "$ac_err"; then
2792   rm -rf conftest*
2793   eval "ac_cv_header_$ac_safe=yes"
2794 else
2795   echo "$ac_err" >&5
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   rm -rf conftest*
2799   eval "ac_cv_header_$ac_safe=no"
2800 fi
2801 rm -f conftest*
2802 fi
2803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2804   echo "$ac_t""yes" 1>&6
2805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2806   cat >> confdefs.h <<EOF
2807 #define $ac_tr_hdr 1
2808 EOF
2809  
2810 else
2811   echo "$ac_t""no" 1>&6
2812 fi
2813 done
2814
2815  echo $ac_n "checking for db""... $ac_c" 1>&6
2816 echo "configure:2817: checking for db" >&5
2817 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
2818   echo $ac_n "(cached) $ac_c" 1>&6
2819 else
2820   
2821         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
2822                 ol_cv_gdbm=no
2823         else
2824                 ol_cv_gdbm=yes
2825         fi
2826
2827 fi
2828
2829 echo "$ac_t""$ol_cv_gdbm" 1>&6
2830
2831
2832         if test $ol_cv_gdbm = yes ; then
2833                 ol_link_ldbm=gdbm
2834                 ol_with_ldbm_api=gdbm
2835
2836                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
2837
2838                 if test $ol_cv_lib_gdbm != yes ; then
2839                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
2840                 fi
2841         fi
2842 fi
2843
2844 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
2845         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
2846 echo "configure:2847: checking for NDBM library" >&5
2847 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
2848   echo $ac_n "(cached) $ac_c" 1>&6
2849 else
2850         ol_LIBS="$LIBS"
2851         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
2852 echo "configure:2853: checking for dbm_open" >&5
2853 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
2854   echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856   cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859 /* System header to define __stub macros and hopefully few prototypes,
2860     which can conflict with char dbm_open(); below.  */
2861 #include <assert.h>
2862 /* Override any gcc2 internal prototype to avoid an error.  */
2863 /* We use char because int might match the return type of a gcc2
2864     builtin and then its argument prototype would still apply.  */
2865 char dbm_open();
2866
2867 int main() {
2868
2869 /* The GNU C library defines this for functions which it implements
2870     to always fail with ENOSYS.  Some functions are actually named
2871     something starting with __ and the normal name is an alias.  */
2872 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
2873 choke me
2874 #else
2875 dbm_open();
2876 #endif
2877
2878 ; return 0; }
2879 EOF
2880 if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2881   rm -rf conftest*
2882   eval "ac_cv_func_dbm_open=yes"
2883 else
2884   echo "configure: failed program was:" >&5
2885   cat conftest.$ac_ext >&5
2886   rm -rf conftest*
2887   eval "ac_cv_func_dbm_open=no"
2888 fi
2889 rm -f conftest*
2890 fi
2891
2892 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
2893   echo "$ac_t""yes" 1>&6
2894   ol_cv_lib_ndbm=yes
2895 else
2896   echo "$ac_t""no" 1>&6
2897
2898                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
2899 echo "configure:2900: checking for dbm_open in -lndbm" >&5
2900 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
2901 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2902   echo $ac_n "(cached) $ac_c" 1>&6
2903 else
2904   ac_save_LIBS="$LIBS"
2905 LIBS="-lndbm  $LIBS"
2906 cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909 /* Override any gcc2 internal prototype to avoid an error.  */
2910 /* We use char because int might match the return type of a gcc2
2911     builtin and then its argument prototype would still apply.  */
2912 char dbm_open();
2913
2914 int main() {
2915 dbm_open()
2916 ; return 0; }
2917 EOF
2918 if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2919   rm -rf conftest*
2920   eval "ac_cv_lib_$ac_lib_var=yes"
2921 else
2922   echo "configure: failed program was:" >&5
2923   cat conftest.$ac_ext >&5
2924   rm -rf conftest*
2925   eval "ac_cv_lib_$ac_lib_var=no"
2926 fi
2927 rm -f conftest*
2928 LIBS="$ac_save_LIBS"
2929
2930 fi
2931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2932   echo "$ac_t""yes" 1>&6
2933   ol_cv_lib_ndbm=-lndbm
2934 else
2935   echo "$ac_t""no" 1>&6
2936
2937                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
2938 echo "configure:2939: checking for dbm_open in -ldbm" >&5
2939 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
2940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   ac_save_LIBS="$LIBS"
2944 LIBS="-ldbm  $LIBS"
2945 cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 /* Override any gcc2 internal prototype to avoid an error.  */
2949 /* We use char because int might match the return type of a gcc2
2950     builtin and then its argument prototype would still apply.  */
2951 char dbm_open();
2952
2953 int main() {
2954 dbm_open()
2955 ; return 0; }
2956 EOF
2957 if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2958   rm -rf conftest*
2959   eval "ac_cv_lib_$ac_lib_var=yes"
2960 else
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -rf conftest*
2964   eval "ac_cv_lib_$ac_lib_var=no"
2965 fi
2966 rm -f conftest*
2967 LIBS="$ac_save_LIBS"
2968
2969 fi
2970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2971   echo "$ac_t""yes" 1>&6
2972   ol_cv_lib_ndbm=-ldbm
2973 else
2974   echo "$ac_t""no" 1>&6
2975 ol_cv_lib_ndbm=no
2976 fi
2977                 
2978 fi
2979
2980         
2981 fi
2982
2983         LIBS="$ol_LIBS"
2984
2985 fi
2986
2987 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
2988
2989
2990  for ac_hdr in ndbm.h
2991 do
2992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2993 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2994 echo "configure:2995: checking for $ac_hdr" >&5
2995 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2996   echo $ac_n "(cached) $ac_c" 1>&6
2997 else
2998   cat > conftest.$ac_ext <<EOF
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001 #include <$ac_hdr>
3002 EOF
3003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3004 { (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3005 ac_err=`grep -v '^ *+' conftest.out`
3006 if test -z "$ac_err"; then
3007   rm -rf conftest*
3008   eval "ac_cv_header_$ac_safe=yes"
3009 else
3010   echo "$ac_err" >&5
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -rf conftest*
3014   eval "ac_cv_header_$ac_safe=no"
3015 fi
3016 rm -f conftest*
3017 fi
3018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3019   echo "$ac_t""yes" 1>&6
3020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3021   cat >> confdefs.h <<EOF
3022 #define $ac_tr_hdr 1
3023 EOF
3024  
3025 else
3026   echo "$ac_t""no" 1>&6
3027 fi
3028 done
3029
3030  echo $ac_n "checking for db""... $ac_c" 1>&6
3031 echo "configure:3032: checking for db" >&5
3032 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   
3036         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
3037                 ol_cv_ndbm=no
3038         else
3039                 ol_cv_ndbm=yes
3040         fi
3041
3042 fi
3043
3044 echo "$ac_t""$ol_cv_ndbm" 1>&6
3045
3046
3047         if test $ol_cv_ndbm = yes ; then
3048                 ol_link_ldbm=ndbm
3049                 ol_with_ldbm_api=ndbm
3050
3051                 if test $ol_with_ldbm_api = ndbm ; then
3052                         echo "configure: warning: Attempting to use NDBM.  Functionality will be limited." 1>&2
3053                 fi
3054
3055                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
3056
3057                 if test $ol_cv_lib_ndbm != yes ; then
3058                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
3059                 fi
3060         fi
3061 fi
3062
3063 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
3064         echo "configure: warning: could not find suitable LDBM backend" 1>&2
3065         if test $ol_enable_ldbm = yes ; then
3066                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
3067         fi
3068
3069         echo "configure: warning: disabling LDBM" 1>&2
3070         $ol_enable_ldbm=no
3071 fi
3072
3073 if test $ol_enable_wrappers = yes ; then
3074         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
3075 echo "configure:3076: checking for hosts_access in -lwrap" >&5
3076 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
3077 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   ac_save_LIBS="$LIBS"
3081 LIBS="-lwrap  $LIBS"
3082 cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085 /* Override any gcc2 internal prototype to avoid an error.  */
3086 /* We use char because int might match the return type of a gcc2
3087     builtin and then its argument prototype would still apply.  */
3088 char hosts_access();
3089
3090 int main() {
3091 hosts_access()
3092 ; return 0; }
3093 EOF
3094 if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3095   rm -rf conftest*
3096   eval "ac_cv_lib_$ac_lib_var=yes"
3097 else
3098   echo "configure: failed program was:" >&5
3099   cat conftest.$ac_ext >&5
3100   rm -rf conftest*
3101   eval "ac_cv_lib_$ac_lib_var=no"
3102 fi
3103 rm -f conftest*
3104 LIBS="$ac_save_LIBS"
3105
3106 fi
3107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3108   echo "$ac_t""yes" 1>&6
3109   have_wrappers=yes
3110 else
3111   echo "$ac_t""no" 1>&6
3112 have_wrappers=no
3113 fi
3114
3115
3116         if test $have_wrappers = yes ; then
3117                 SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
3118                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
3119         else
3120                 echo "configure: warning: could not find -lwrap" 1>&2
3121                 if test $ol_enable_wrappers = yes ; then
3122                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
3123                 fi
3124
3125                 echo "configure: warning: disabling wrappers support" 1>&2
3126                 ol_enable_wrappers=no
3127         fi
3128
3129 fi
3130
3131 # ud needs termcap (should insert check here)
3132 ol_link_termcap=no
3133
3134 TERMCAP_DEFS=
3135 TERMCAP_LIBS=
3136
3137 for ac_hdr in termcap.h ncurses.h
3138 do
3139 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3140 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3141 echo "configure:3142: checking for $ac_hdr" >&5
3142 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3143   echo $ac_n "(cached) $ac_c" 1>&6
3144 else
3145   cat > conftest.$ac_ext <<EOF
3146 #line 3147 "configure"
3147 #include "confdefs.h"
3148 #include <$ac_hdr>
3149 EOF
3150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3151 { (eval echo configure:3152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3152 ac_err=`grep -v '^ *+' conftest.out`
3153 if test -z "$ac_err"; then
3154   rm -rf conftest*
3155   eval "ac_cv_header_$ac_safe=yes"
3156 else
3157   echo "$ac_err" >&5
3158   echo "configure: failed program was:" >&5
3159   cat conftest.$ac_ext >&5
3160   rm -rf conftest*
3161   eval "ac_cv_header_$ac_safe=no"
3162 fi
3163 rm -f conftest*
3164 fi
3165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3166   echo "$ac_t""yes" 1>&6
3167     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3168   cat >> confdefs.h <<EOF
3169 #define $ac_tr_hdr 1
3170 EOF
3171  
3172 else
3173   echo "$ac_t""no" 1>&6
3174 fi
3175 done
3176
3177
3178 if test $ol_link_termcap = no ; then
3179         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
3180 echo "configure:3181: checking for tputs in -ltermcap" >&5
3181 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
3182 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3183   echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185   ac_save_LIBS="$LIBS"
3186 LIBS="-ltermcap  $LIBS"
3187 cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 /* Override any gcc2 internal prototype to avoid an error.  */
3191 /* We use char because int might match the return type of a gcc2
3192     builtin and then its argument prototype would still apply.  */
3193 char tputs();
3194
3195 int main() {
3196 tputs()
3197 ; return 0; }
3198 EOF
3199 if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3200   rm -rf conftest*
3201   eval "ac_cv_lib_$ac_lib_var=yes"
3202 else
3203   echo "configure: failed program was:" >&5
3204   cat conftest.$ac_ext >&5
3205   rm -rf conftest*
3206   eval "ac_cv_lib_$ac_lib_var=no"
3207 fi
3208 rm -f conftest*
3209 LIBS="$ac_save_LIBS"
3210
3211 fi
3212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3213   echo "$ac_t""yes" 1>&6
3214   have_termcap=yes
3215 else
3216   echo "$ac_t""no" 1>&6
3217 have_termcap=no
3218 fi
3219
3220         if test $have_termcap = yes ; then
3221                 ol_link_termcap=yes
3222                 TERMCAP_LIBS=-ltermcap
3223         fi
3224 fi
3225
3226 if test $ol_link_termcap = no ; then
3227         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
3228 echo "configure:3229: checking for initscr in -lncurses" >&5
3229 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
3230 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3231   echo $ac_n "(cached) $ac_c" 1>&6
3232 else
3233   ac_save_LIBS="$LIBS"
3234 LIBS="-lncurses  $LIBS"
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 /* Override any gcc2 internal prototype to avoid an error.  */
3239 /* We use char because int might match the return type of a gcc2
3240     builtin and then its argument prototype would still apply.  */
3241 char initscr();
3242
3243 int main() {
3244 initscr()
3245 ; return 0; }
3246 EOF
3247 if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3248   rm -rf conftest*
3249   eval "ac_cv_lib_$ac_lib_var=yes"
3250 else
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   eval "ac_cv_lib_$ac_lib_var=no"
3255 fi
3256 rm -f conftest*
3257 LIBS="$ac_save_LIBS"
3258
3259 fi
3260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3261   echo "$ac_t""yes" 1>&6
3262   have_ncurses=yes
3263 else
3264   echo "$ac_t""no" 1>&6
3265 have_ncurses=no
3266 fi
3267
3268         if test $have_ncurses = yes ; then
3269                 ol_link_termcap=yes
3270                 TERMCAP_LIBS=-lncurses
3271         fi
3272 fi
3273
3274 if test $ol_link_termcap = no ; then
3275         TERMCAP_DEFS="-DNOTERMCAP"
3276         TERMCAP_LIBS=
3277 fi
3278
3279
3280
3281
3282 # FreeBSD (and others) have crypt(3) in -lcrypt
3283 if test $ol_enable_crypt != no ; then
3284         echo $ac_n "checking for crypt""... $ac_c" 1>&6
3285 echo "configure:3286: checking for crypt" >&5
3286 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 /* System header to define __stub macros and hopefully few prototypes,
3293     which can conflict with char crypt(); below.  */
3294 #include <assert.h>
3295 /* Override any gcc2 internal prototype to avoid an error.  */
3296 /* We use char because int might match the return type of a gcc2
3297     builtin and then its argument prototype would still apply.  */
3298 char crypt();
3299
3300 int main() {
3301
3302 /* The GNU C library defines this for functions which it implements
3303     to always fail with ENOSYS.  Some functions are actually named
3304     something starting with __ and the normal name is an alias.  */
3305 #if defined (__stub_crypt) || defined (__stub___crypt)
3306 choke me
3307 #else
3308 crypt();
3309 #endif
3310
3311 ; return 0; }
3312 EOF
3313 if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3314   rm -rf conftest*
3315   eval "ac_cv_func_crypt=yes"
3316 else
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   eval "ac_cv_func_crypt=no"
3321 fi
3322 rm -f conftest*
3323 fi
3324
3325 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
3326   echo "$ac_t""yes" 1>&6
3327   have_crypt=yes
3328 else
3329   echo "$ac_t""no" 1>&6
3330
3331                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3332 echo "configure:3333: checking for crypt in -lcrypt" >&5
3333 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   ac_save_LIBS="$LIBS"
3338 LIBS="-lcrypt  $LIBS"
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 /* Override any gcc2 internal prototype to avoid an error.  */
3343 /* We use char because int might match the return type of a gcc2
3344     builtin and then its argument prototype would still apply.  */
3345 char crypt();
3346
3347 int main() {
3348 crypt()
3349 ; return 0; }
3350 EOF
3351 if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3352   rm -rf conftest*
3353   eval "ac_cv_lib_$ac_lib_var=yes"
3354 else
3355   echo "configure: failed program was:" >&5
3356   cat conftest.$ac_ext >&5
3357   rm -rf conftest*
3358   eval "ac_cv_lib_$ac_lib_var=no"
3359 fi
3360 rm -f conftest*
3361 LIBS="$ac_save_LIBS"
3362
3363 fi
3364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3365   echo "$ac_t""yes" 1>&6
3366   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
3367                         have_crypt=yes
3368 else
3369   echo "$ac_t""no" 1>&6
3370 have_crypt=no
3371 fi
3372
3373 fi
3374
3375
3376         if test $have_crypt = yes ; then
3377                 LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
3378         else
3379                 echo "configure: warning: could not find crypt" 1>&2
3380                 if test $ol_enable_crypt = yes ; then
3381                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
3382                 fi
3383
3384                 echo "configure: warning: disabling crypt support" 1>&2
3385                 ol_enable_crypt=no
3386         fi
3387 fi
3388
3389 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3390 echo "configure:3391: checking for ANSI C header files" >&5
3391 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   cat > conftest.$ac_ext <<EOF
3395 #line 3396 "configure"
3396 #include "confdefs.h"
3397 #include <stdlib.h>
3398 #include <stdarg.h>
3399 #include <string.h>
3400 #include <float.h>
3401 EOF
3402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3403 { (eval echo configure:3404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3404 ac_err=`grep -v '^ *+' conftest.out`
3405 if test -z "$ac_err"; then
3406   rm -rf conftest*
3407   ac_cv_header_stdc=yes
3408 else
3409   echo "$ac_err" >&5
3410   echo "configure: failed program was:" >&5
3411   cat conftest.$ac_ext >&5
3412   rm -rf conftest*
3413   ac_cv_header_stdc=no
3414 fi
3415 rm -f conftest*
3416
3417 if test $ac_cv_header_stdc = yes; then
3418   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 #include <string.h>
3423 EOF
3424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3425   egrep "memchr" >/dev/null 2>&1; then
3426   :
3427 else
3428   rm -rf conftest*
3429   ac_cv_header_stdc=no
3430 fi
3431 rm -f conftest*
3432
3433 fi
3434
3435 if test $ac_cv_header_stdc = yes; then
3436   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3437 cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440 #include <stdlib.h>
3441 EOF
3442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3443   egrep "free" >/dev/null 2>&1; then
3444   :
3445 else
3446   rm -rf conftest*
3447   ac_cv_header_stdc=no
3448 fi
3449 rm -f conftest*
3450
3451 fi
3452
3453 if test $ac_cv_header_stdc = yes; then
3454   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3455 if test "$cross_compiling" = yes; then
3456   :
3457 else
3458   cat > conftest.$ac_ext <<EOF
3459 #line 3460 "configure"
3460 #include "confdefs.h"
3461 #include <ctype.h>
3462 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3463 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3464 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3465 int main () { int i; for (i = 0; i < 256; i++)
3466 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3467 exit (0); }
3468
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3471 then
3472   :
3473 else
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   rm -fr conftest*
3477   ac_cv_header_stdc=no
3478 fi
3479 rm -fr conftest*
3480 fi
3481
3482 fi
3483 fi
3484
3485 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3486 if test $ac_cv_header_stdc = yes; then
3487   cat >> confdefs.h <<\EOF
3488 #define STDC_HEADERS 1
3489 EOF
3490
3491 fi
3492
3493 ac_header_dirent=no
3494 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3495 do
3496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3497 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3498 echo "configure:3499: checking for $ac_hdr that defines DIR" >&5
3499 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 #include <sys/types.h>
3506 #include <$ac_hdr>
3507 int main() {
3508 DIR *dirp = 0;
3509 ; return 0; }
3510 EOF
3511 if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3512   rm -rf conftest*
3513   eval "ac_cv_header_dirent_$ac_safe=yes"
3514 else
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517   rm -rf conftest*
3518   eval "ac_cv_header_dirent_$ac_safe=no"
3519 fi
3520 rm -f conftest*
3521 fi
3522 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3523   echo "$ac_t""yes" 1>&6
3524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3525   cat >> confdefs.h <<EOF
3526 #define $ac_tr_hdr 1
3527 EOF
3528  ac_header_dirent=$ac_hdr; break
3529 else
3530   echo "$ac_t""no" 1>&6
3531 fi
3532 done
3533 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3534 if test $ac_header_dirent = dirent.h; then
3535 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3536 echo "configure:3537: checking for opendir in -ldir" >&5
3537 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3538 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3539   echo $ac_n "(cached) $ac_c" 1>&6
3540 else
3541   ac_save_LIBS="$LIBS"
3542 LIBS="-ldir  $LIBS"
3543 cat > conftest.$ac_ext <<EOF
3544 #line 3545 "configure"
3545 #include "confdefs.h"
3546 /* Override any gcc2 internal prototype to avoid an error.  */
3547 /* We use char because int might match the return type of a gcc2
3548     builtin and then its argument prototype would still apply.  */
3549 char opendir();
3550
3551 int main() {
3552 opendir()
3553 ; return 0; }
3554 EOF
3555 if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3556   rm -rf conftest*
3557   eval "ac_cv_lib_$ac_lib_var=yes"
3558 else
3559   echo "configure: failed program was:" >&5
3560   cat conftest.$ac_ext >&5
3561   rm -rf conftest*
3562   eval "ac_cv_lib_$ac_lib_var=no"
3563 fi
3564 rm -f conftest*
3565 LIBS="$ac_save_LIBS"
3566
3567 fi
3568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3569   echo "$ac_t""yes" 1>&6
3570   LIBS="$LIBS -ldir"
3571 else
3572   echo "$ac_t""no" 1>&6
3573 fi
3574
3575 else
3576 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3577 echo "configure:3578: checking for opendir in -lx" >&5
3578 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   ac_save_LIBS="$LIBS"
3583 LIBS="-lx  $LIBS"
3584 cat > conftest.$ac_ext <<EOF
3585 #line 3586 "configure"
3586 #include "confdefs.h"
3587 /* Override any gcc2 internal prototype to avoid an error.  */
3588 /* We use char because int might match the return type of a gcc2
3589     builtin and then its argument prototype would still apply.  */
3590 char opendir();
3591
3592 int main() {
3593 opendir()
3594 ; return 0; }
3595 EOF
3596 if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3597   rm -rf conftest*
3598   eval "ac_cv_lib_$ac_lib_var=yes"
3599 else
3600   echo "configure: failed program was:" >&5
3601   cat conftest.$ac_ext >&5
3602   rm -rf conftest*
3603   eval "ac_cv_lib_$ac_lib_var=no"
3604 fi
3605 rm -f conftest*
3606 LIBS="$ac_save_LIBS"
3607
3608 fi
3609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3610   echo "$ac_t""yes" 1>&6
3611   LIBS="$LIBS -lx"
3612 else
3613   echo "$ac_t""no" 1>&6
3614 fi
3615
3616 fi
3617
3618 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3619 echo "configure:3620: checking for sys/wait.h that is POSIX.1 compatible" >&5
3620 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3621   echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623   cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <sys/types.h>
3627 #include <sys/wait.h>
3628 #ifndef WEXITSTATUS
3629 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3630 #endif
3631 #ifndef WIFEXITED
3632 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3633 #endif
3634 int main() {
3635 int s;
3636 wait (&s);
3637 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3638 ; return 0; }
3639 EOF
3640 if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3641   rm -rf conftest*
3642   ac_cv_header_sys_wait_h=yes
3643 else
3644   echo "configure: failed program was:" >&5
3645   cat conftest.$ac_ext >&5
3646   rm -rf conftest*
3647   ac_cv_header_sys_wait_h=no
3648 fi
3649 rm -f conftest*
3650 fi
3651
3652 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3653 if test $ac_cv_header_sys_wait_h = yes; then
3654   cat >> confdefs.h <<\EOF
3655 #define HAVE_SYS_WAIT_H 1
3656 EOF
3657
3658 fi
3659
3660 for ac_hdr in \
3661         stddef.h        \
3662         fcntl.h         \
3663         limits.h        \
3664         malloc.h        \
3665         sgtty.h         \
3666         sys/file.h      \
3667         sys/ioctl.h     \
3668         sys/time.h      \
3669         syslog.h        \
3670         termio.h        \
3671         unistd.h        \
3672
3673 do
3674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3676 echo "configure:3677: checking for $ac_hdr" >&5
3677 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683 #include <$ac_hdr>
3684 EOF
3685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3686 { (eval echo configure:3687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3687 ac_err=`grep -v '^ *+' conftest.out`
3688 if test -z "$ac_err"; then
3689   rm -rf conftest*
3690   eval "ac_cv_header_$ac_safe=yes"
3691 else
3692   echo "$ac_err" >&5
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   eval "ac_cv_header_$ac_safe=no"
3697 fi
3698 rm -f conftest*
3699 fi
3700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3701   echo "$ac_t""yes" 1>&6
3702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3703   cat >> confdefs.h <<EOF
3704 #define $ac_tr_hdr 1
3705 EOF
3706  
3707 else
3708   echo "$ac_t""no" 1>&6
3709 fi
3710 done
3711
3712
3713 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3714 echo "configure:3715: checking for uid_t in sys/types.h" >&5
3715 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 #include <sys/types.h>
3722 EOF
3723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3724   egrep "uid_t" >/dev/null 2>&1; then
3725   rm -rf conftest*
3726   ac_cv_type_uid_t=yes
3727 else
3728   rm -rf conftest*
3729   ac_cv_type_uid_t=no
3730 fi
3731 rm -f conftest*
3732
3733 fi
3734
3735 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3736 if test $ac_cv_type_uid_t = no; then
3737   cat >> confdefs.h <<\EOF
3738 #define uid_t int
3739 EOF
3740
3741   cat >> confdefs.h <<\EOF
3742 #define gid_t int
3743 EOF
3744
3745 fi
3746
3747 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3748 echo "configure:3749: checking type of array argument to getgroups" >&5
3749 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   if test "$cross_compiling" = yes; then
3753   ac_cv_type_getgroups=cross
3754 else
3755   cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758
3759 /* Thanks to Mike Rendell for this test.  */
3760 #include <sys/types.h>
3761 #define NGID 256
3762 #undef MAX
3763 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3764 main()
3765 {
3766   gid_t gidset[NGID];
3767   int i, n;
3768   union { gid_t gval; long lval; }  val;
3769
3770   val.lval = -1;
3771   for (i = 0; i < NGID; i++)
3772     gidset[i] = val.gval;
3773   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3774                  gidset);
3775   /* Exit non-zero if getgroups seems to require an array of ints.  This
3776      happens when gid_t is short but getgroups modifies an array of ints.  */
3777   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3778 }
3779
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3782 then
3783     ac_cv_type_getgroups=gid_t
3784 else
3785   echo "configure: failed program was:" >&5
3786   cat conftest.$ac_ext >&5
3787   rm -fr conftest*
3788   ac_cv_type_getgroups=int
3789 fi
3790 rm -fr conftest*
3791 fi
3792
3793 if test $ac_cv_type_getgroups = cross; then
3794         cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #include <unistd.h>
3798 EOF
3799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3800   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3801   rm -rf conftest*
3802   ac_cv_type_getgroups=gid_t
3803 else
3804   rm -rf conftest*
3805   ac_cv_type_getgroups=int
3806 fi
3807 rm -f conftest*
3808
3809 fi
3810 fi
3811
3812 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3813 cat >> confdefs.h <<EOF
3814 #define GETGROUPS_T $ac_cv_type_getgroups
3815 EOF
3816
3817
3818 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3819 echo "configure:3820: checking for mode_t" >&5
3820 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3821   echo $ac_n "(cached) $ac_c" 1>&6
3822 else
3823   cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826 #include <sys/types.h>
3827 #if STDC_HEADERS
3828 #include <stdlib.h>
3829 #include <stddef.h>
3830 #endif
3831 EOF
3832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3833   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3834   rm -rf conftest*
3835   ac_cv_type_mode_t=yes
3836 else
3837   rm -rf conftest*
3838   ac_cv_type_mode_t=no
3839 fi
3840 rm -f conftest*
3841
3842 fi
3843 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3844 if test $ac_cv_type_mode_t = no; then
3845   cat >> confdefs.h <<\EOF
3846 #define mode_t int
3847 EOF
3848
3849 fi
3850
3851 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3852 echo "configure:3853: checking for off_t" >&5
3853 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3854   echo $ac_n "(cached) $ac_c" 1>&6
3855 else
3856   cat > conftest.$ac_ext <<EOF
3857 #line 3858 "configure"
3858 #include "confdefs.h"
3859 #include <sys/types.h>
3860 #if STDC_HEADERS
3861 #include <stdlib.h>
3862 #include <stddef.h>
3863 #endif
3864 EOF
3865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3866   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3867   rm -rf conftest*
3868   ac_cv_type_off_t=yes
3869 else
3870   rm -rf conftest*
3871   ac_cv_type_off_t=no
3872 fi
3873 rm -f conftest*
3874
3875 fi
3876 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3877 if test $ac_cv_type_off_t = no; then
3878   cat >> confdefs.h <<\EOF
3879 #define off_t long
3880 EOF
3881
3882 fi
3883
3884 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3885 echo "configure:3886: checking for pid_t" >&5
3886 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   cat > conftest.$ac_ext <<EOF
3890 #line 3891 "configure"
3891 #include "confdefs.h"
3892 #include <sys/types.h>
3893 #if STDC_HEADERS
3894 #include <stdlib.h>
3895 #include <stddef.h>
3896 #endif
3897 EOF
3898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3899   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3900   rm -rf conftest*
3901   ac_cv_type_pid_t=yes
3902 else
3903   rm -rf conftest*
3904   ac_cv_type_pid_t=no
3905 fi
3906 rm -f conftest*
3907
3908 fi
3909 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3910 if test $ac_cv_type_pid_t = no; then
3911   cat >> confdefs.h <<\EOF
3912 #define pid_t int
3913 EOF
3914
3915 fi
3916
3917 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3918 echo "configure:3919: checking return type of signal handlers" >&5
3919 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3920   echo $ac_n "(cached) $ac_c" 1>&6
3921 else
3922   cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <sys/types.h>
3926 #include <signal.h>
3927 #ifdef signal
3928 #undef signal
3929 #endif
3930 #ifdef __cplusplus
3931 extern "C" void (*signal (int, void (*)(int)))(int);
3932 #else
3933 void (*signal ()) ();
3934 #endif
3935
3936 int main() {
3937 int i;
3938 ; return 0; }
3939 EOF
3940 if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3941   rm -rf conftest*
3942   ac_cv_type_signal=void
3943 else
3944   echo "configure: failed program was:" >&5
3945   cat conftest.$ac_ext >&5
3946   rm -rf conftest*
3947   ac_cv_type_signal=int
3948 fi
3949 rm -f conftest*
3950 fi
3951
3952 echo "$ac_t""$ac_cv_type_signal" 1>&6
3953 cat >> confdefs.h <<EOF
3954 #define RETSIGTYPE $ac_cv_type_signal
3955 EOF
3956
3957
3958 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3959 echo "configure:3960: checking for size_t" >&5
3960 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3961   echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963   cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 #include <sys/types.h>
3967 #if STDC_HEADERS
3968 #include <stdlib.h>
3969 #include <stddef.h>
3970 #endif
3971 EOF
3972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3973   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3974   rm -rf conftest*
3975   ac_cv_type_size_t=yes
3976 else
3977   rm -rf conftest*
3978   ac_cv_type_size_t=no
3979 fi
3980 rm -f conftest*
3981
3982 fi
3983 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3984 if test $ac_cv_type_size_t = no; then
3985   cat >> confdefs.h <<\EOF
3986 #define size_t unsigned
3987 EOF
3988
3989 fi
3990
3991 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3992 echo "configure:3993: checking for uid_t in sys/types.h" >&5
3993 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999 #include <sys/types.h>
4000 EOF
4001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4002   egrep "uid_t" >/dev/null 2>&1; then
4003   rm -rf conftest*
4004   ac_cv_type_uid_t=yes
4005 else
4006   rm -rf conftest*
4007   ac_cv_type_uid_t=no
4008 fi
4009 rm -f conftest*
4010
4011 fi
4012
4013 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4014 if test $ac_cv_type_uid_t = no; then
4015   cat >> confdefs.h <<\EOF
4016 #define uid_t int
4017 EOF
4018
4019   cat >> confdefs.h <<\EOF
4020 #define gid_t int
4021 EOF
4022
4023 fi
4024
4025 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
4026 echo "configure:4027: checking for st_blksize in struct stat" >&5
4027 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   cat > conftest.$ac_ext <<EOF
4031 #line 4032 "configure"
4032 #include "confdefs.h"
4033 #include <sys/types.h>
4034 #include <sys/stat.h>
4035 int main() {
4036 struct stat s; s.st_blksize;
4037 ; return 0; }
4038 EOF
4039 if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4040   rm -rf conftest*
4041   ac_cv_struct_st_blksize=yes
4042 else
4043   echo "configure: failed program was:" >&5
4044   cat conftest.$ac_ext >&5
4045   rm -rf conftest*
4046   ac_cv_struct_st_blksize=no
4047 fi
4048 rm -f conftest*
4049 fi
4050
4051 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
4052 if test $ac_cv_struct_st_blksize = yes; then
4053   cat >> confdefs.h <<\EOF
4054 #define HAVE_ST_BLKSIZE 1
4055 EOF
4056
4057 fi
4058
4059 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4060 echo "configure:4061: checking whether time.h and sys/time.h may both be included" >&5
4061 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4062   echo $ac_n "(cached) $ac_c" 1>&6
4063 else
4064   cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067 #include <sys/types.h>
4068 #include <sys/time.h>
4069 #include <time.h>
4070 int main() {
4071 struct tm *tp;
4072 ; return 0; }
4073 EOF
4074 if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4075   rm -rf conftest*
4076   ac_cv_header_time=yes
4077 else
4078   echo "configure: failed program was:" >&5
4079   cat conftest.$ac_ext >&5
4080   rm -rf conftest*
4081   ac_cv_header_time=no
4082 fi
4083 rm -f conftest*
4084 fi
4085
4086 echo "$ac_t""$ac_cv_header_time" 1>&6
4087 if test $ac_cv_header_time = yes; then
4088   cat >> confdefs.h <<\EOF
4089 #define TIME_WITH_SYS_TIME 1
4090 EOF
4091
4092 fi
4093
4094 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4095 echo "configure:4096: checking whether struct tm is in sys/time.h or time.h" >&5
4096 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
4097   echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099   cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4102 #include <sys/types.h>
4103 #include <time.h>
4104 int main() {
4105 struct tm *tp; tp->tm_sec;
4106 ; return 0; }
4107 EOF
4108 if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4109   rm -rf conftest*
4110   ac_cv_struct_tm=time.h
4111 else
4112   echo "configure: failed program was:" >&5
4113   cat conftest.$ac_ext >&5
4114   rm -rf conftest*
4115   ac_cv_struct_tm=sys/time.h
4116 fi
4117 rm -f conftest*
4118 fi
4119
4120 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4121 if test $ac_cv_struct_tm = sys/time.h; then
4122   cat >> confdefs.h <<\EOF
4123 #define TM_IN_SYS_TIME 1
4124 EOF
4125
4126 fi
4127
4128
4129 echo $ac_n "checking for working const""... $ac_c" 1>&6
4130 echo "configure:4131: checking for working const" >&5
4131 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4132   echo $ac_n "(cached) $ac_c" 1>&6
4133 else
4134   cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137
4138 int main() {
4139
4140 /* Ultrix mips cc rejects this.  */
4141 typedef int charset[2]; const charset x;
4142 /* SunOS 4.1.1 cc rejects this.  */
4143 char const *const *ccp;
4144 char **p;
4145 /* NEC SVR4.0.2 mips cc rejects this.  */
4146 struct point {int x, y;};
4147 static struct point const zero = {0,0};
4148 /* AIX XL C 1.02.0.0 rejects this.
4149    It does not let you subtract one const X* pointer from another in an arm
4150    of an if-expression whose if-part is not a constant expression */
4151 const char *g = "string";
4152 ccp = &g + (g ? g-g : 0);
4153 /* HPUX 7.0 cc rejects these. */
4154 ++ccp;
4155 p = (char**) ccp;
4156 ccp = (char const *const *) p;
4157 { /* SCO 3.2v4 cc rejects this.  */
4158   char *t;
4159   char const *s = 0 ? (char *) 0 : (char const *) 0;
4160
4161   *t++ = 0;
4162 }
4163 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4164   int x[] = {25, 17};
4165   const int *foo = &x[0];
4166   ++foo;
4167 }
4168 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4169   typedef const int *iptr;
4170   iptr p = 0;
4171   ++p;
4172 }
4173 { /* AIX XL C 1.02.0.0 rejects this saying
4174      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4175   struct s { int j; const int *ap[3]; };
4176   struct s *b; b->j = 5;
4177 }
4178 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4179   const int foo = 10;
4180 }
4181
4182 ; return 0; }
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4185   rm -rf conftest*
4186   ac_cv_c_const=yes
4187 else
4188   echo "configure: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   rm -rf conftest*
4191   ac_cv_c_const=no
4192 fi
4193 rm -f conftest*
4194 fi
4195
4196 echo "$ac_t""$ac_cv_c_const" 1>&6
4197 if test $ac_cv_c_const = no; then
4198   cat >> confdefs.h <<\EOF
4199 #define const 
4200 EOF
4201
4202 fi
4203
4204
4205 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4206 echo "configure:4207: checking for 8-bit clean memcmp" >&5
4207 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4208   echo $ac_n "(cached) $ac_c" 1>&6
4209 else
4210   if test "$cross_compiling" = yes; then
4211   ac_cv_func_memcmp_clean=no
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216
4217 main()
4218 {
4219   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4220   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4221 }
4222
4223 EOF
4224 if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4225 then
4226   ac_cv_func_memcmp_clean=yes
4227 else
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -fr conftest*
4231   ac_cv_func_memcmp_clean=no
4232 fi
4233 rm -fr conftest*
4234 fi
4235
4236 fi
4237
4238 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4239 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
4240
4241 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4242 echo "configure:4243: checking return type of signal handlers" >&5
4243 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   cat > conftest.$ac_ext <<EOF
4247 #line 4248 "configure"
4248 #include "confdefs.h"
4249 #include <sys/types.h>
4250 #include <signal.h>
4251 #ifdef signal
4252 #undef signal
4253 #endif
4254 #ifdef __cplusplus
4255 extern "C" void (*signal (int, void (*)(int)))(int);
4256 #else
4257 void (*signal ()) ();
4258 #endif
4259
4260 int main() {
4261 int i;
4262 ; return 0; }
4263 EOF
4264 if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4265   rm -rf conftest*
4266   ac_cv_type_signal=void
4267 else
4268   echo "configure: failed program was:" >&5
4269   cat conftest.$ac_ext >&5
4270   rm -rf conftest*
4271   ac_cv_type_signal=int
4272 fi
4273 rm -f conftest*
4274 fi
4275
4276 echo "$ac_t""$ac_cv_type_signal" 1>&6
4277 cat >> confdefs.h <<EOF
4278 #define RETSIGTYPE $ac_cv_type_signal
4279 EOF
4280
4281
4282 echo $ac_n "checking for strftime""... $ac_c" 1>&6
4283 echo "configure:4284: checking for strftime" >&5
4284 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
4285   echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287   cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 /* System header to define __stub macros and hopefully few prototypes,
4291     which can conflict with char strftime(); below.  */
4292 #include <assert.h>
4293 /* Override any gcc2 internal prototype to avoid an error.  */
4294 /* We use char because int might match the return type of a gcc2
4295     builtin and then its argument prototype would still apply.  */
4296 char strftime();
4297
4298 int main() {
4299
4300 /* The GNU C library defines this for functions which it implements
4301     to always fail with ENOSYS.  Some functions are actually named
4302     something starting with __ and the normal name is an alias.  */
4303 #if defined (__stub_strftime) || defined (__stub___strftime)
4304 choke me
4305 #else
4306 strftime();
4307 #endif
4308
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4312   rm -rf conftest*
4313   eval "ac_cv_func_strftime=yes"
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -rf conftest*
4318   eval "ac_cv_func_strftime=no"
4319 fi
4320 rm -f conftest*
4321 fi
4322
4323 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
4324   echo "$ac_t""yes" 1>&6
4325   cat >> confdefs.h <<\EOF
4326 #define HAVE_STRFTIME 1
4327 EOF
4328
4329 else
4330   echo "$ac_t""no" 1>&6
4331 # strftime is in -lintl on SCO UNIX.
4332 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
4333 echo "configure:4334: checking for strftime in -lintl" >&5
4334 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
4335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4336   echo $ac_n "(cached) $ac_c" 1>&6
4337 else
4338   ac_save_LIBS="$LIBS"
4339 LIBS="-lintl  $LIBS"
4340 cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 /* Override any gcc2 internal prototype to avoid an error.  */
4344 /* We use char because int might match the return type of a gcc2
4345     builtin and then its argument prototype would still apply.  */
4346 char strftime();
4347
4348 int main() {
4349 strftime()
4350 ; return 0; }
4351 EOF
4352 if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4353   rm -rf conftest*
4354   eval "ac_cv_lib_$ac_lib_var=yes"
4355 else
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   eval "ac_cv_lib_$ac_lib_var=no"
4360 fi
4361 rm -f conftest*
4362 LIBS="$ac_save_LIBS"
4363
4364 fi
4365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4366   echo "$ac_t""yes" 1>&6
4367   cat >> confdefs.h <<\EOF
4368 #define HAVE_STRFTIME 1
4369 EOF
4370
4371 LIBS="-lintl $LIBS"
4372 else
4373   echo "$ac_t""no" 1>&6
4374 fi
4375
4376 fi
4377
4378 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
4379 echo "configure:4380: checking for vprintf" >&5
4380 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 /* System header to define __stub macros and hopefully few prototypes,
4387     which can conflict with char vprintf(); below.  */
4388 #include <assert.h>
4389 /* Override any gcc2 internal prototype to avoid an error.  */
4390 /* We use char because int might match the return type of a gcc2
4391     builtin and then its argument prototype would still apply.  */
4392 char vprintf();
4393
4394 int main() {
4395
4396 /* The GNU C library defines this for functions which it implements
4397     to always fail with ENOSYS.  Some functions are actually named
4398     something starting with __ and the normal name is an alias.  */
4399 #if defined (__stub_vprintf) || defined (__stub___vprintf)
4400 choke me
4401 #else
4402 vprintf();
4403 #endif
4404
4405 ; return 0; }
4406 EOF
4407 if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4408   rm -rf conftest*
4409   eval "ac_cv_func_vprintf=yes"
4410 else
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -rf conftest*
4414   eval "ac_cv_func_vprintf=no"
4415 fi
4416 rm -f conftest*
4417 fi
4418
4419 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
4420   echo "$ac_t""yes" 1>&6
4421   cat >> confdefs.h <<\EOF
4422 #define HAVE_VPRINTF 1
4423 EOF
4424
4425 else
4426   echo "$ac_t""no" 1>&6
4427 fi
4428
4429 if test "$ac_cv_func_vprintf" != yes; then
4430 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
4431 echo "configure:4432: checking for _doprnt" >&5
4432 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   cat > conftest.$ac_ext <<EOF
4436 #line 4437 "configure"
4437 #include "confdefs.h"
4438 /* System header to define __stub macros and hopefully few prototypes,
4439     which can conflict with char _doprnt(); below.  */
4440 #include <assert.h>
4441 /* Override any gcc2 internal prototype to avoid an error.  */
4442 /* We use char because int might match the return type of a gcc2
4443     builtin and then its argument prototype would still apply.  */
4444 char _doprnt();
4445
4446 int main() {
4447
4448 /* The GNU C library defines this for functions which it implements
4449     to always fail with ENOSYS.  Some functions are actually named
4450     something starting with __ and the normal name is an alias.  */
4451 #if defined (__stub__doprnt) || defined (__stub____doprnt)
4452 choke me
4453 #else
4454 _doprnt();
4455 #endif
4456
4457 ; return 0; }
4458 EOF
4459 if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4460   rm -rf conftest*
4461   eval "ac_cv_func__doprnt=yes"
4462 else
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -rf conftest*
4466   eval "ac_cv_func__doprnt=no"
4467 fi
4468 rm -f conftest*
4469 fi
4470
4471 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
4472   echo "$ac_t""yes" 1>&6
4473   cat >> confdefs.h <<\EOF
4474 #define HAVE_DOPRNT 1
4475 EOF
4476
4477 else
4478   echo "$ac_t""no" 1>&6
4479 fi
4480
4481 fi
4482
4483 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
4484 echo "configure:4485: checking for wait3 that fills in rusage" >&5
4485 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   if test "$cross_compiling" = yes; then
4489   ac_cv_func_wait3_rusage=no
4490 else
4491   cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494 #include <sys/types.h>
4495 #include <sys/time.h>
4496 #include <sys/resource.h>
4497 #include <stdio.h>
4498 /* HP-UX has wait3 but does not fill in rusage at all.  */
4499 main() {
4500   struct rusage r;
4501   int i;
4502   /* Use a field that we can force nonzero --
4503      voluntary context switches.
4504      For systems like NeXT and OSF/1 that don't set it,
4505      also use the system CPU time.  And page faults (I/O) for Linux.  */
4506   r.ru_nvcsw = 0;
4507   r.ru_stime.tv_sec = 0;
4508   r.ru_stime.tv_usec = 0;
4509   r.ru_majflt = r.ru_minflt = 0;
4510   switch (fork()) {
4511   case 0: /* Child.  */
4512     sleep(1); /* Give up the CPU.  */
4513     _exit(0);
4514   case -1: _exit(0); /* What can we do?  */
4515   default: /* Parent.  */
4516     wait3(&i, 0, &r);
4517     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
4518     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
4519          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
4520   }
4521 }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4524 then
4525   ac_cv_func_wait3_rusage=yes
4526 else
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -fr conftest*
4530   ac_cv_func_wait3_rusage=no
4531 fi
4532 rm -fr conftest*
4533 fi
4534
4535 fi
4536
4537 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
4538 if test $ac_cv_func_wait3_rusage = yes; then
4539   cat >> confdefs.h <<\EOF
4540 #define HAVE_WAIT3 1
4541 EOF
4542
4543 fi
4544
4545
4546 for ac_func in \
4547         gethostname             \
4548         gettimeofday    \
4549         mktime                  \
4550         select                  \
4551         socket                  \
4552         strdup                  \
4553         strerror                \
4554         strstr                  \
4555         strrchr                 \
4556         strtod                  \
4557         strtol                  \
4558         strtoul                 \
4559         strsep                  \
4560         memcpy                  \
4561
4562 do
4563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4564 echo "configure:4565: checking for $ac_func" >&5
4565 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4566   echo $ac_n "(cached) $ac_c" 1>&6
4567 else
4568   cat > conftest.$ac_ext <<EOF
4569 #line 4570 "configure"
4570 #include "confdefs.h"
4571 /* System header to define __stub macros and hopefully few prototypes,
4572     which can conflict with char $ac_func(); below.  */
4573 #include <assert.h>
4574 /* Override any gcc2 internal prototype to avoid an error.  */
4575 /* We use char because int might match the return type of a gcc2
4576     builtin and then its argument prototype would still apply.  */
4577 char $ac_func();
4578
4579 int main() {
4580
4581 /* The GNU C library defines this for functions which it implements
4582     to always fail with ENOSYS.  Some functions are actually named
4583     something starting with __ and the normal name is an alias.  */
4584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4585 choke me
4586 #else
4587 $ac_func();
4588 #endif
4589
4590 ; return 0; }
4591 EOF
4592 if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4593   rm -rf conftest*
4594   eval "ac_cv_func_$ac_func=yes"
4595 else
4596   echo "configure: failed program was:" >&5
4597   cat conftest.$ac_ext >&5
4598   rm -rf conftest*
4599   eval "ac_cv_func_$ac_func=no"
4600 fi
4601 rm -f conftest*
4602 fi
4603
4604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4605   echo "$ac_t""yes" 1>&6
4606     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4607   cat >> confdefs.h <<EOF
4608 #define $ac_tr_func 1
4609 EOF
4610  
4611 else
4612   echo "$ac_t""no" 1>&6
4613 fi
4614 done
4615
4616
4617 for ac_func in strdup
4618 do
4619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_func" >&5
4621 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 /* System header to define __stub macros and hopefully few prototypes,
4628     which can conflict with char $ac_func(); below.  */
4629 #include <assert.h>
4630 /* Override any gcc2 internal prototype to avoid an error.  */
4631 /* We use char because int might match the return type of a gcc2
4632     builtin and then its argument prototype would still apply.  */
4633 char $ac_func();
4634
4635 int main() {
4636
4637 /* The GNU C library defines this for functions which it implements
4638     to always fail with ENOSYS.  Some functions are actually named
4639     something starting with __ and the normal name is an alias.  */
4640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4641 choke me
4642 #else
4643 $ac_func();
4644 #endif
4645
4646 ; return 0; }
4647 EOF
4648 if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4649   rm -rf conftest*
4650   eval "ac_cv_func_$ac_func=yes"
4651 else
4652   echo "configure: failed program was:" >&5
4653   cat conftest.$ac_ext >&5
4654   rm -rf conftest*
4655   eval "ac_cv_func_$ac_func=no"
4656 fi
4657 rm -f conftest*
4658 fi
4659
4660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4661   echo "$ac_t""yes" 1>&6
4662     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4663   cat >> confdefs.h <<EOF
4664 #define $ac_tr_func 1
4665 EOF
4666  
4667 else
4668   echo "$ac_t""no" 1>&6
4669 LIBOBJS="$LIBOBJS ${ac_func}.o"
4670 fi
4671 done
4672
4673
4674
4675 # Check Configuration
4676
4677 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
4678 echo "configure:4679: checking declaration of sys_errlist" >&5
4679 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   
4683         cat > conftest.$ac_ext <<EOF
4684 #line 4685 "configure"
4685 #include "confdefs.h"
4686
4687 #include <stdio.h>
4688 #include <sys/types.h>
4689 #include <errno.h> 
4690 int main() {
4691 char *c = (char *) *sys_errlist
4692 ; return 0; }
4693 EOF
4694 if { (eval echo configure:4695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4695   rm -rf conftest*
4696   ol_cv_dcl_sys_errlist=yes
4697 else
4698   echo "configure: failed program was:" >&5
4699   cat conftest.$ac_ext >&5
4700   rm -rf conftest*
4701   ol_cv_dcl_sys_errlist=no
4702 fi
4703 rm -f conftest*
4704 fi
4705
4706 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
4707
4708 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
4709 if test $ol_cv_dcl_sys_errlist = no ; then
4710         cat >> confdefs.h <<\EOF
4711 #define DECL_SYS_ERRLIST 1
4712 EOF
4713
4714         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
4715 echo "configure:4716: checking existence of sys_errlist" >&5
4716         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   
4720                 cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4723 #include <errno.h>
4724 int main() {
4725 char *c = (char *) *sys_errlist
4726 ; return 0; }
4727 EOF
4728 if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4729   rm -rf conftest*
4730   ol_cv_have_sys_errlist=yes
4731 else
4732   echo "configure: failed program was:" >&5
4733   cat conftest.$ac_ext >&5
4734   rm -rf conftest*
4735   ol_cv_have_sys_errlist=no
4736 fi
4737 rm -f conftest*
4738 fi
4739
4740         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
4741 fi
4742
4743
4744
4745 if test $ol_enable_debug != no ; then
4746         LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
4747 fi
4748 if test $ol_enable_libui = no ; then
4749         LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE"
4750 fi
4751 if test $ol_enable_cache = no ; then
4752         LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
4753 fi
4754 if test $ol_enable_dns != no ; then
4755         LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS"
4756 fi
4757 if test $ol_enable_referrals != no ; then
4758         LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
4759 fi
4760 if test $ol_enable_cldap != no ; then
4761         LDAP_DEFS="$LDAP_DEFS -DCLDAP"
4762 fi
4763
4764 if test $ol_enable_aclgroup != no ; then
4765         cat >> confdefs.h <<\EOF
4766 #define SLAPD_ACLGROUP 1
4767 EOF
4768
4769         SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP"
4770 fi
4771
4772 if test $ol_enable_md5 != no ; then
4773         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
4774 fi
4775
4776 if test $ol_enable_sha1 != no ; then
4777         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
4778 fi
4779
4780 if test $ol_enable_phonetic != no ; then
4781         cat >> confdefs.h <<\EOF
4782 #define SLAPD_PHONETIC 1
4783 EOF
4784
4785         SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
4786 fi
4787
4788 if test $ol_enable_rlookups != no ; then
4789         cat >> confdefs.h <<\EOF
4790 #define SLAPD_RLOOKUPS 1
4791 EOF
4792
4793         SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS"
4794 fi
4795
4796 if test $ol_link_ldbm != no ; then
4797         BUILD_SLAPD=yes
4798         BUILD_LDBM=yes
4799         LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS"
4800 fi
4801
4802 if test $ol_enable_passwd != no ; then
4803         BUILD_SLAPD=yes
4804         BUILD_PASSWD=yes
4805         SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS"
4806 fi
4807
4808 if test $ol_enable_shell != no ; then
4809         BUILD_SLAPD=yes
4810         BUILD_SHELL=yes
4811         SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS"
4812 fi
4813
4814 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
4815         $BUILD_SLAPD = yes ; then
4816         BUILD_SLURPD=yes
4817 fi
4818
4819
4820
4821
4822   
4823   
4824   
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845 trap '' 1 2 15
4846 cat > confcache <<\EOF
4847 # This file is a shell script that caches the results of configure
4848 # tests run on this system so they can be shared between configure
4849 # scripts and configure runs.  It is not useful on other systems.
4850 # If it contains results you don't want to keep, you may remove or edit it.
4851 #
4852 # By default, configure uses ./config.cache as the cache file,
4853 # creating it if it does not exist already.  You can give configure
4854 # the --cache-file=FILE option to use a different cache file; that is
4855 # what configure does when it calls configure scripts in
4856 # subdirectories, so they share the cache.
4857 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4858 # config.status only pays attention to the cache file if you give it the
4859 # --recheck option to rerun configure.
4860 #
4861 EOF
4862 # The following way of writing the cache mishandles newlines in values,
4863 # but we know of no workaround that is simple, portable, and efficient.
4864 # So, don't put newlines in cache variables' values.
4865 # Ultrix sh set writes to stderr and can't be redirected directly,
4866 # and sets the high bit in the cache file unless we assign to the vars.
4867 (set) 2>&1 |
4868   case `(ac_space=' '; set) 2>&1` in
4869   *ac_space=\ *)
4870     # `set' does not quote correctly, so add quotes (double-quote substitution
4871     # turns \\\\ into \\, and sed turns \\ into \).
4872     sed -n \
4873       -e "s/'/'\\\\''/g" \
4874       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4875     ;;
4876   *)
4877     # `set' quotes correctly as required by POSIX, so do not add quotes.
4878     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4879     ;;
4880   esac >> confcache
4881 if cmp -s $cache_file confcache; then
4882   :
4883 else
4884   if test -w $cache_file; then
4885     echo "updating cache $cache_file"
4886     cat confcache > $cache_file
4887   else
4888     echo "not updating unwritable cache $cache_file"
4889   fi
4890 fi
4891 rm -f confcache
4892
4893 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4894
4895 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4896 # Let make expand exec_prefix.
4897 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4898
4899 # Any assignment to VPATH causes Sun make to only execute
4900 # the first set of double-colon rules, so remove it if not needed.
4901 # If there is a colon in the path, we need to keep it.
4902 if test "x$srcdir" = x.; then
4903   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4904 fi
4905
4906 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4907
4908 DEFS=-DHAVE_CONFIG_H
4909
4910 # Without the "./", some shells look in PATH for config.status.
4911 : ${CONFIG_STATUS=./config.status}
4912
4913 echo creating $CONFIG_STATUS
4914 rm -f $CONFIG_STATUS
4915 cat > $CONFIG_STATUS <<EOF
4916 #! /bin/sh
4917 # Generated automatically by configure.
4918 # Run this file to recreate the current configuration.
4919 # This directory was configured as follows,
4920 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4921 #
4922 # $0 $ac_configure_args
4923 #
4924 # Compiler output produced by configure, useful for debugging
4925 # configure, is in ./config.log if it exists.
4926
4927 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4928 for ac_option
4929 do
4930   case "\$ac_option" in
4931   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4932     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4933     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4934   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4935     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4936     exit 0 ;;
4937   -help | --help | --hel | --he | --h)
4938     echo "\$ac_cs_usage"; exit 0 ;;
4939   *) echo "\$ac_cs_usage"; exit 1 ;;
4940   esac
4941 done
4942
4943 ac_given_srcdir=$srcdir
4944 ac_given_INSTALL="$INSTALL"
4945
4946 trap 'rm -fr `echo "\
4947 Makefile:build/top.mk:Makefile.in:build/dir.mk \
4948 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
4949 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
4950 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
4951 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
4952 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
4953 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
4954 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
4955 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
4956 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
4957 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
4958 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
4959 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
4960 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
4961 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
4962 include/Makefile:build/top.mk:include/Makefile.in \
4963 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
4964 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
4965 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
4966 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
4967 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
4968 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
4969 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
4970 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
4971 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
4972 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
4973 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
4974 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
4975 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
4976 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
4977 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
4978 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
4979 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
4980 tests/Makefile:build/top.mk:tests/Makefile.in \
4981  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4982 EOF
4983 cat >> $CONFIG_STATUS <<EOF
4984
4985 # Protect against being on the right side of a sed subst in config.status.
4986 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4987  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4988 $ac_vpsub
4989 $extrasub
4990 s%@CFLAGS@%$CFLAGS%g
4991 s%@CPPFLAGS@%$CPPFLAGS%g
4992 s%@CXXFLAGS@%$CXXFLAGS%g
4993 s%@DEFS@%$DEFS%g
4994 s%@LDFLAGS@%$LDFLAGS%g
4995 s%@LIBS@%$LIBS%g
4996 s%@exec_prefix@%$exec_prefix%g
4997 s%@prefix@%$prefix%g
4998 s%@program_transform_name@%$program_transform_name%g
4999 s%@bindir@%$bindir%g
5000 s%@sbindir@%$sbindir%g
5001 s%@libexecdir@%$libexecdir%g
5002 s%@datadir@%$datadir%g
5003 s%@sysconfdir@%$sysconfdir%g
5004 s%@sharedstatedir@%$sharedstatedir%g
5005 s%@localstatedir@%$localstatedir%g
5006 s%@libdir@%$libdir%g
5007 s%@includedir@%$includedir%g
5008 s%@oldincludedir@%$oldincludedir%g
5009 s%@infodir@%$infodir%g
5010 s%@mandir@%$mandir%g
5011 s%@CC@%$CC%g
5012 s%@CPP@%$CPP%g
5013 s%@LN_S@%$LN_S%g
5014 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5015 s%@INSTALL_DATA@%$INSTALL_DATA%g
5016 s%@RANLIB@%$RANLIB%g
5017 s%@SET_MAKE@%$SET_MAKE%g
5018 s%@SENDMAIL@%$SENDMAIL%g
5019 s%@EDITOR@%$EDITOR%g
5020 s%@FINGER@%$FINGER%g
5021 s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g
5022 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
5023 s%@LIBOBJS@%$LIBOBJS%g
5024 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
5025 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
5026 s%@BUILD_LDBM@%$BUILD_LDBM%g
5027 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
5028 s%@BUILD_SHELL@%$BUILD_SHELL%g
5029 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
5030 s%@LDAP_DEFS@%$LDAP_DEFS%g
5031 s%@LDAP_LIBS@%$LDAP_LIBS%g
5032 s%@LDAPD_DEFS@%$LDAPD_DEFS%g
5033 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
5034 s%@SLAPD_DEFS@%$SLAPD_DEFS%g
5035 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
5036 s%@SLURPD_DEFS@%$SLURPD_DEFS%g
5037 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
5038 s%@LDBM_DEFS@%$LDBM_DEFS%g
5039 s%@LDBM_LIBS@%$LDBM_LIBS%g
5040 s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g
5041 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
5042 s%@LUTIL_DEFS@%$LUTIL_DEFS%g
5043 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
5044
5045 CEOF
5046 EOF
5047
5048 cat >> $CONFIG_STATUS <<\EOF
5049
5050 # Split the substitutions into bite-sized pieces for seds with
5051 # small command number limits, like on Digital OSF/1 and HP-UX.
5052 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5053 ac_file=1 # Number of current file.
5054 ac_beg=1 # First line for current file.
5055 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5056 ac_more_lines=:
5057 ac_sed_cmds=""
5058 while $ac_more_lines; do
5059   if test $ac_beg -gt 1; then
5060     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5061   else
5062     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5063   fi
5064   if test ! -s conftest.s$ac_file; then
5065     ac_more_lines=false
5066     rm -f conftest.s$ac_file
5067   else
5068     if test -z "$ac_sed_cmds"; then
5069       ac_sed_cmds="sed -f conftest.s$ac_file"
5070     else
5071       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5072     fi
5073     ac_file=`expr $ac_file + 1`
5074     ac_beg=$ac_end
5075     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5076   fi
5077 done
5078 if test -z "$ac_sed_cmds"; then
5079   ac_sed_cmds=cat
5080 fi
5081 EOF
5082
5083 cat >> $CONFIG_STATUS <<EOF
5084
5085 CONFIG_FILES=\${CONFIG_FILES-"\
5086 Makefile:build/top.mk:Makefile.in:build/dir.mk \
5087 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
5088 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
5089 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
5090 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
5091 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
5092 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
5093 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
5094 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
5095 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
5096 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
5097 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
5098 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
5099 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
5100 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
5101 include/Makefile:build/top.mk:include/Makefile.in \
5102 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
5103 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
5104 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
5105 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
5106 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
5107 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
5108 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
5109 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
5110 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
5111 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
5112 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
5113 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
5114 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
5115 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
5116 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
5117 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
5118 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
5119 tests/Makefile:build/top.mk:tests/Makefile.in \
5120 "}
5121 EOF
5122 cat >> $CONFIG_STATUS <<\EOF
5123 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5124   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5125   case "$ac_file" in
5126   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5127        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5128   *) ac_file_in="${ac_file}.in" ;;
5129   esac
5130
5131   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5132
5133   # Remove last slash and all that follows it.  Not all systems have dirname.
5134   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5135   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5136     # The file is in a subdirectory.
5137     test ! -d "$ac_dir" && mkdir "$ac_dir"
5138     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5139     # A "../" for each directory in $ac_dir_suffix.
5140     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5141   else
5142     ac_dir_suffix= ac_dots=
5143   fi
5144
5145   case "$ac_given_srcdir" in
5146   .)  srcdir=.
5147       if test -z "$ac_dots"; then top_srcdir=.
5148       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5149   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5150   *) # Relative path.
5151     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5152     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5153   esac
5154
5155   case "$ac_given_INSTALL" in
5156   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5157   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5158   esac
5159
5160   echo creating "$ac_file"
5161   rm -f "$ac_file"
5162   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5163   case "$ac_file" in
5164   *Makefile*) ac_comsub="1i\\
5165 # $configure_input" ;;
5166   *) ac_comsub= ;;
5167   esac
5168
5169   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5170   sed -e "$ac_comsub
5171 s%@configure_input@%$configure_input%g
5172 s%@srcdir@%$srcdir%g
5173 s%@top_srcdir@%$top_srcdir%g
5174 s%@INSTALL@%$INSTALL%g
5175 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5176 fi; done
5177 rm -f conftest.s*
5178
5179 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5180 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5181 #
5182 # ac_d sets the value in "#define NAME VALUE" lines.
5183 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5184 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5185 ac_dC='\3'
5186 ac_dD='%g'
5187 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5188 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5189 ac_uB='\([      ]\)%\1#\2define\3'
5190 ac_uC=' '
5191 ac_uD='\4%g'
5192 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5193 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5194 ac_eB='$%\1#\2define\3'
5195 ac_eC=' '
5196 ac_eD='%g'
5197
5198 if test "${CONFIG_HEADERS+set}" != set; then
5199 EOF
5200 cat >> $CONFIG_STATUS <<EOF
5201   CONFIG_HEADERS="include/portable.h"
5202 EOF
5203 cat >> $CONFIG_STATUS <<\EOF
5204 fi
5205 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5206   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5207   case "$ac_file" in
5208   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5209        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5210   *) ac_file_in="${ac_file}.in" ;;
5211   esac
5212
5213   echo creating $ac_file
5214
5215   rm -f conftest.frag conftest.in conftest.out
5216   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5217   cat $ac_file_inputs > conftest.in
5218
5219 EOF
5220
5221 # Transform confdefs.h into a sed script conftest.vals that substitutes
5222 # the proper values into config.h.in to produce config.h.  And first:
5223 # Protect against being on the right side of a sed subst in config.status.
5224 # Protect against being in an unquoted here document in config.status.
5225 rm -f conftest.vals
5226 cat > conftest.hdr <<\EOF
5227 s/[\\&%]/\\&/g
5228 s%[\\$`]%\\&%g
5229 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5230 s%ac_d%ac_u%gp
5231 s%ac_u%ac_e%gp
5232 EOF
5233 sed -n -f conftest.hdr confdefs.h > conftest.vals
5234 rm -f conftest.hdr
5235
5236 # This sed command replaces #undef with comments.  This is necessary, for
5237 # example, in the case of _POSIX_SOURCE, which is predefined and required
5238 # on some systems where configure will not decide to define it.
5239 cat >> conftest.vals <<\EOF
5240 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5241 EOF
5242
5243 # Break up conftest.vals because some shells have a limit on
5244 # the size of here documents, and old seds have small limits too.
5245
5246 rm -f conftest.tail
5247 while :
5248 do
5249   ac_lines=`grep -c . conftest.vals`
5250   # grep -c gives empty output for an empty file on some AIX systems.
5251   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5252   # Write a limited-size here document to conftest.frag.
5253   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5254   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5255   echo 'CEOF
5256   sed -f conftest.frag conftest.in > conftest.out
5257   rm -f conftest.in
5258   mv conftest.out conftest.in
5259 ' >> $CONFIG_STATUS
5260   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5261   rm -f conftest.vals
5262   mv conftest.tail conftest.vals
5263 done
5264 rm -f conftest.vals
5265
5266 cat >> $CONFIG_STATUS <<\EOF
5267   rm -f conftest.frag conftest.h
5268   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5269   cat conftest.in >> conftest.h
5270   rm -f conftest.in
5271   if cmp -s $ac_file conftest.h 2>/dev/null; then
5272     echo "$ac_file is unchanged"
5273     rm -f conftest.h
5274   else
5275     # Remove last slash and all that follows it.  Not all systems have dirname.
5276       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5277       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5278       # The file is in a subdirectory.
5279       test ! -d "$ac_dir" && mkdir "$ac_dir"
5280     fi
5281     rm -f $ac_file
5282     mv conftest.h $ac_file
5283   fi
5284 fi; done
5285
5286 EOF
5287 cat >> $CONFIG_STATUS <<EOF
5288
5289 EOF
5290 cat >> $CONFIG_STATUS <<\EOF
5291 date > stamp-h
5292 exit 0
5293 EOF
5294 chmod +x $CONFIG_STATUS
5295 rm -fr confdefs* $ac_clean_files
5296 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5297