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