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