]> git.sur5r.net Git - openldap/blob - configure
147683bd73bf2b0cec79ead4a2f65d97b0d847c2
[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_bdb2 = 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
3617                         LIBS="$KRB_LIBS $LIBS"
3618
3619                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3620 echo "configure:3621: checking for des_debug in Kerberos libraries" >&5
3621 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3622   echo $ac_n "(cached) $ac_c" 1>&6
3623 else
3624   
3625                                                                 save_LIBS="$LIBS"
3626                                 LIBS="$KRB_LIBS $LIBS"
3627                                 cat > conftest.$ac_ext <<EOF
3628 #line 3629 "configure"
3629 #include "confdefs.h"
3630
3631 #include <kerberosIV/krb.h>
3632 #include <kerberosIV/des.h>
3633 extern int des_debug;
3634
3635 int main() {
3636
3637 des_debug = 1;
3638
3639 ; return 0; }
3640 EOF
3641 if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3642   rm -rf conftest*
3643   ol_cv_var_des_debug=yes
3644 else
3645   echo "configure: failed program was:" >&5
3646   cat conftest.$ac_ext >&5
3647   rm -rf conftest*
3648   ol_cv_var_des_debug=no
3649 fi
3650 rm -f conftest*
3651                                                                 LIBS="$save_LIBS"
3652                         
3653 fi
3654
3655 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3656
3657                         if test $ol_cv_var_des_debug= yes ; then
3658                                 cat >> confdefs.h <<\EOF
3659 #define HAVE_DES_DEBUG 1
3660 EOF
3661
3662                         fi
3663
3664                         LIBS="$save_LIBS"
3665                 fi
3666         fi
3667 fi
3668
3669 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3670         for ac_hdr in krb.h des.h
3671 do
3672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3674 echo "configure:3675: checking for $ac_hdr" >&5
3675 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3676   echo $ac_n "(cached) $ac_c" 1>&6
3677 else
3678   cat > conftest.$ac_ext <<EOF
3679 #line 3680 "configure"
3680 #include "confdefs.h"
3681 #include <$ac_hdr>
3682 EOF
3683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3684 { (eval echo configure:3685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3686 if test -z "$ac_err"; then
3687   rm -rf conftest*
3688   eval "ac_cv_header_$ac_safe=yes"
3689 else
3690   echo "$ac_err" >&5
3691   echo "configure: failed program was:" >&5
3692   cat conftest.$ac_ext >&5
3693   rm -rf conftest*
3694   eval "ac_cv_header_$ac_safe=no"
3695 fi
3696 rm -f conftest*
3697 fi
3698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3699   echo "$ac_t""yes" 1>&6
3700     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3701   cat >> confdefs.h <<EOF
3702 #define $ac_tr_hdr 1
3703 EOF
3704  
3705 else
3706   echo "$ac_t""no" 1>&6
3707 fi
3708 done
3709
3710
3711         if test $ac_cv_header_krb_h = yes ; then
3712                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3713 echo "configure:3714: checking for main in -lkrb" >&5
3714 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3715 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   ac_save_LIBS="$LIBS"
3719 LIBS="-lkrb -ldes $LIBS"
3720 cat > conftest.$ac_ext <<EOF
3721 #line 3722 "configure"
3722 #include "confdefs.h"
3723
3724 int main() {
3725 main()
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3729   rm -rf conftest*
3730   eval "ac_cv_lib_$ac_lib_var=yes"
3731 else
3732   echo "configure: failed program was:" >&5
3733   cat conftest.$ac_ext >&5
3734   rm -rf conftest*
3735   eval "ac_cv_lib_$ac_lib_var=no"
3736 fi
3737 rm -f conftest*
3738 LIBS="$ac_save_LIBS"
3739
3740 fi
3741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3742   echo "$ac_t""yes" 1>&6
3743   have_k4=yes
3744 else
3745   echo "$ac_t""no" 1>&6
3746 have_k4=no
3747 fi
3748
3749
3750                 if test $have_k4 = yes ; then
3751                         ol_with_kerberos=found
3752                         ol_link_kerberos=yes
3753
3754                         KRB_LIBS="-lkrb -ldes"
3755                 fi
3756         fi
3757 fi
3758
3759 if test $ol_link_kerberos = yes ; then
3760         cat >> confdefs.h <<\EOF
3761 #define HAVE_KERBEROS 1
3762 EOF
3763
3764 fi
3765
3766 ol_link_threads=no
3767 if test $ol_with_threads = auto -o $ol_with_threads = yes \
3768         -o $ol_with_threads = posix ; then
3769
3770         for ac_hdr in pthread.h sched.h
3771 do
3772 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3773 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3774 echo "configure:3775: checking for $ac_hdr" >&5
3775 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3776   echo $ac_n "(cached) $ac_c" 1>&6
3777 else
3778   cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3781 #include <$ac_hdr>
3782 EOF
3783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3784 { (eval echo configure:3785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3786 if test -z "$ac_err"; then
3787   rm -rf conftest*
3788   eval "ac_cv_header_$ac_safe=yes"
3789 else
3790   echo "$ac_err" >&5
3791   echo "configure: failed program was:" >&5
3792   cat conftest.$ac_ext >&5
3793   rm -rf conftest*
3794   eval "ac_cv_header_$ac_safe=no"
3795 fi
3796 rm -f conftest*
3797 fi
3798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3799   echo "$ac_t""yes" 1>&6
3800     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3801   cat >> confdefs.h <<EOF
3802 #define $ac_tr_hdr 1
3803 EOF
3804  
3805 else
3806   echo "$ac_t""no" 1>&6
3807 fi
3808 done
3809
3810
3811         if test $ac_cv_header_pthread_h = yes ; then
3812                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
3813 echo "configure:3814: checking POSIX thread version" >&5
3814 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
3815   echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817   
3818         cat > conftest.$ac_ext <<EOF
3819 #line 3820 "configure"
3820 #include "confdefs.h"
3821
3822 #               include <pthread.h>
3823                 /* this check could be improved */
3824 #               ifdef PTHREAD_ONCE_INIT
3825                         pthread_version_final
3826 #               endif
3827         
3828 EOF
3829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3830   egrep "pthread_version_final" >/dev/null 2>&1; then
3831   rm -rf conftest*
3832   ol_pthread_final=yes
3833 else
3834   rm -rf conftest*
3835   ol_pthread_final=no
3836 fi
3837 rm -f conftest*
3838
3839
3840         cat > conftest.$ac_ext <<EOF
3841 #line 3842 "configure"
3842 #include "confdefs.h"
3843
3844 #               include <pthread.h>
3845                 /* this check could be improved */
3846 #               ifdef pthread_once_init
3847                         pthread_version_draft4
3848 #               endif
3849         
3850 EOF
3851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3852   egrep "pthread_version_draft4" >/dev/null 2>&1; then
3853   rm -rf conftest*
3854   ol_pthread_draft4=yes
3855 else
3856   rm -rf conftest*
3857   ol_pthread_draft4=no
3858 fi
3859 rm -f conftest*
3860
3861
3862         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
3863                 ol_cv_pthread_version=final
3864         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
3865                 ol_cv_pthread_version=draft4
3866         else
3867                 ol_cv_pthread_version=unknown
3868         fi
3869
3870 fi
3871
3872 echo "$ac_t""$ol_cv_pthread_version" 1>&6
3873
3874
3875                 if test $ol_cv_pthread_version = final ; then
3876                         cat >> confdefs.h <<\EOF
3877 #define HAVE_PTHREADS_FINAL 1
3878 EOF
3879
3880                 elif test $ol_cv_pthread_version = draft4 ; then
3881                         cat >> confdefs.h <<\EOF
3882 #define HAVE_PTHREADS_D4 1
3883 EOF
3884
3885                 else
3886                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
3887                 fi
3888
3889                 # consider threads found
3890                 ol_with_threads=found
3891
3892                 
3893 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
3894 echo "configure:3895: checking for LinuxThreads" >&5
3895 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
3896   echo $ac_n "(cached) $ac_c" 1>&6
3897 else
3898   
3899         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
3900         if test "$res" -gt 0 ; then
3901                 ol_cv_linux_threads=yes
3902         else
3903                 ol_cv_linux_threads=no
3904         fi
3905
3906 fi
3907
3908 echo "$ac_t""$ol_cv_linux_threads" 1>&6
3909
3910
3911                 if test $ol_cv_linux_threads = yes ; then
3912                         cat >> confdefs.h <<\EOF
3913 #define HAVE_LINUX_THREADS 1
3914 EOF
3915
3916                 fi
3917
3918                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
3919                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
3920 echo "configure:3921: checking for pthread_create" >&5
3921 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
3922   echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924   cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 /* System header to define __stub macros and hopefully few prototypes,
3928     which can conflict with char pthread_create(); below.  */
3929 #include <assert.h>
3930 /* Override any gcc2 internal prototype to avoid an error.  */
3931 /* We use char because int might match the return type of a gcc2
3932     builtin and then its argument prototype would still apply.  */
3933 char pthread_create();
3934
3935 int main() {
3936
3937 /* The GNU C library defines this for functions which it implements
3938     to always fail with ENOSYS.  Some functions are actually named
3939     something starting with __ and the normal name is an alias.  */
3940 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
3941 choke me
3942 #else
3943 pthread_create();
3944 #endif
3945
3946 ; return 0; }
3947 EOF
3948 if { (eval echo configure:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3949   rm -rf conftest*
3950   eval "ac_cv_func_pthread_create=yes"
3951 else
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   eval "ac_cv_func_pthread_create=no"
3956 fi
3957 rm -f conftest*
3958 fi
3959
3960 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
3961   echo "$ac_t""yes" 1>&6
3962   ol_link_threads=yes
3963 else
3964   echo "$ac_t""no" 1>&6
3965 fi
3966
3967
3968                 if test $ol_link_threads = no ; then
3969                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
3970 echo "configure:3971: checking for pthread_create with -kthread" >&5
3971 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
3972   echo $ac_n "(cached) $ac_c" 1>&6
3973 else
3974   
3975                                                                 save_LIBS="$LIBS"
3976                                 LIBS="-kthread $LIBS"
3977                                 cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 #include <pthread.h>
3981 int main() {
3982 pthread_create(NULL,NULL,NULL,NULL);
3983 ; return 0; }
3984 EOF
3985 if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3986   rm -rf conftest*
3987   ol_cv_kthread_flag=yes
3988 else
3989   echo "configure: failed program was:" >&5
3990   cat conftest.$ac_ext >&5
3991   rm -rf conftest*
3992   ol_cv_kthread_flag=no
3993 fi
3994 rm -f conftest*
3995                                                                 LIBS="$save_LIBS"
3996                         
3997 fi
3998
3999 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
4000
4001                         if test $ol_cv_kthread_flag = yes ; then
4002                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
4003                                 ol_link_threads=posix
4004                         fi
4005                 fi
4006
4007                 if test $ol_link_threads = no ; then
4008                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
4009 echo "configure:4010: checking for pthread_create with -pthread" >&5
4010 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
4011   echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013   
4014                                                                 save_LIBS="$LIBS"
4015                                 LIBS="-pthread $LIBS"
4016                                 cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 #include <pthread.h>
4020 int main() {
4021 pthread_create(NULL,NULL,NULL,NULL);
4022 ; return 0; }
4023 EOF
4024 if { (eval echo configure:4025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4025   rm -rf conftest*
4026   ol_cv_pthread_flag=yes
4027 else
4028   echo "configure: failed program was:" >&5
4029   cat conftest.$ac_ext >&5
4030   rm -rf conftest*
4031   ol_cv_pthread_flag=no
4032 fi
4033 rm -f conftest*
4034                                                                 LIBS="$save_LIBS"
4035                         
4036 fi
4037
4038 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
4039
4040                         if test $ol_cv_pthread_flag = yes ; then
4041                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
4042                                 ol_link_threads=posix
4043                         fi
4044                 fi
4045
4046                 if test $ol_link_threads = no ; then
4047                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4048 echo "configure:4049: checking for pthread_create with -pthreads" >&5
4049 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   
4053                                                                 save_LIBS="$LIBS"
4054                                 LIBS="-pthreads $LIBS"
4055                                 cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #include <pthread.h>
4059 int main() {
4060 pthread_create(NULL,NULL,NULL,NULL);
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4064   rm -rf conftest*
4065   ol_cv_pthreads_flag=yes
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   ol_cv_pthreads_flag=no
4071 fi
4072 rm -f conftest*
4073                                                                 LIBS="$save_LIBS"
4074                         
4075 fi
4076
4077 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4078
4079                         if test $ol_cv_pthreads_flag = yes ; then
4080                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4081                                 ol_link_threads=posix
4082                         fi
4083                 fi
4084
4085                 if test $ol_link_threads = no ; then
4086                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4087 echo "configure:4088: checking for pthread_create with -thread" >&5
4088 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4089   echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091   
4092                                                                 save_LIBS="$LIBS"
4093                                 LIBS="-thread $LIBS"
4094                                 cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 char pthread_create();
4098 int main() {
4099 pthread_create();
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   ol_cv_thread_flag=yes
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   ol_cv_thread_flag=no
4110 fi
4111 rm -f conftest*
4112                                                                 LIBS="$save_LIBS"
4113                         
4114 fi
4115
4116 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4117
4118                         if test $ol_cv_thread_flag = yes ; then
4119                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4120                                 ol_link_threads=posix
4121                         fi
4122                 fi
4123
4124                 if test $ol_link_threads = no ; then
4125                                                 save_LIBS="$LIBS"
4126                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4127 echo "configure:4128: checking for pthread_mutex_unlock in -lpthread" >&5
4128 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4130   echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132   ac_save_LIBS="$LIBS"
4133 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4134 cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 /* Override any gcc2 internal prototype to avoid an error.  */
4138 /* We use char because int might match the return type of a gcc2
4139     builtin and then its argument prototype would still apply.  */
4140 char pthread_mutex_unlock();
4141
4142 int main() {
4143 pthread_mutex_unlock()
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4147   rm -rf conftest*
4148   eval "ac_cv_lib_$ac_lib_var=yes"
4149 else
4150   echo "configure: failed program was:" >&5
4151   cat conftest.$ac_ext >&5
4152   rm -rf conftest*
4153   eval "ac_cv_lib_$ac_lib_var=no"
4154 fi
4155 rm -f conftest*
4156 LIBS="$ac_save_LIBS"
4157
4158 fi
4159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4160   echo "$ac_t""yes" 1>&6
4161   
4162                                 ol_link_threads=posix
4163                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4164                                 if test $ol_with_yielding_select = auto ; then
4165                                         ol_with_yielding_select=yes
4166                                 fi
4167                                 
4168 else
4169   echo "$ac_t""no" 1>&6
4170 :
4171 fi
4172
4173                         LIBS="$save_LIBS"
4174                 fi
4175
4176                 if test $ol_link_threads = no ; then
4177                                                 save_LIBS="$LIBS"
4178                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4179 echo "configure:4180: checking for pthread_mutex_lock in -lpthread" >&5
4180 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   ac_save_LIBS="$LIBS"
4185 LIBS="-lpthread -lmach -lexc $LIBS"
4186 cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 /* Override any gcc2 internal prototype to avoid an error.  */
4190 /* We use char because int might match the return type of a gcc2
4191     builtin and then its argument prototype would still apply.  */
4192 char pthread_mutex_lock();
4193
4194 int main() {
4195 pthread_mutex_lock()
4196 ; return 0; }
4197 EOF
4198 if { (eval echo configure:4199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4199   rm -rf conftest*
4200   eval "ac_cv_lib_$ac_lib_var=yes"
4201 else
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204   rm -rf conftest*
4205   eval "ac_cv_lib_$ac_lib_var=no"
4206 fi
4207 rm -f conftest*
4208 LIBS="$ac_save_LIBS"
4209
4210 fi
4211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4212   echo "$ac_t""yes" 1>&6
4213   
4214                                 ol_link_threads=posix
4215                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
4216                                 if test $ol_with_yielding_select = auto ; then
4217                                         ol_with_yielding_select=yes
4218                                 fi
4219                                 
4220 else
4221   echo "$ac_t""no" 1>&6
4222 :
4223 fi
4224
4225                         LIBS="$save_LIBS"
4226                 fi
4227
4228                 if test $ol_link_threads = no ; then
4229                                                 save_LIBS="$LIBS"
4230                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
4231 echo "configure:4232: checking for pthread_mutex_trylock in -lpthread" >&5
4232 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4233 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   ac_save_LIBS="$LIBS"
4237 LIBS="-lpthread -lexc $LIBS"
4238 cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241 /* Override any gcc2 internal prototype to avoid an error.  */
4242 /* We use char because int might match the return type of a gcc2
4243     builtin and then its argument prototype would still apply.  */
4244 char pthread_mutex_trylock();
4245
4246 int main() {
4247 pthread_mutex_trylock()
4248 ; return 0; }
4249 EOF
4250 if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4251   rm -rf conftest*
4252   eval "ac_cv_lib_$ac_lib_var=yes"
4253 else
4254   echo "configure: failed program was:" >&5
4255   cat conftest.$ac_ext >&5
4256   rm -rf conftest*
4257   eval "ac_cv_lib_$ac_lib_var=no"
4258 fi
4259 rm -f conftest*
4260 LIBS="$ac_save_LIBS"
4261
4262 fi
4263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4264   echo "$ac_t""yes" 1>&6
4265   
4266                                 ol_link_threads=posix
4267                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4268                                 if test $ol_with_yielding_select = auto ; then
4269                                         ol_with_yielding_select=yes
4270                                 fi
4271                                 
4272 else
4273   echo "$ac_t""no" 1>&6
4274 :
4275 fi
4276
4277                         LIBS="$save_LIBS"
4278                 fi
4279
4280                 if test $ol_link_threads = no ; then
4281                                                 save_LIBS="$LIBS"
4282                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4283 echo "configure:4284: checking for pthread_create in -lpthread" >&5
4284 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   ac_save_LIBS="$LIBS"
4289 LIBS="-lpthread  $LIBS"
4290 cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 /* Override any gcc2 internal prototype to avoid an error.  */
4294 /* We use char because int might match the return type of a gcc2
4295     builtin and then its argument prototype would still apply.  */
4296 char pthread_create();
4297
4298 int main() {
4299 pthread_create()
4300 ; return 0; }
4301 EOF
4302 if { (eval echo configure:4303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4303   rm -rf conftest*
4304   eval "ac_cv_lib_$ac_lib_var=yes"
4305 else
4306   echo "configure: failed program was:" >&5
4307   cat conftest.$ac_ext >&5
4308   rm -rf conftest*
4309   eval "ac_cv_lib_$ac_lib_var=no"
4310 fi
4311 rm -f conftest*
4312 LIBS="$ac_save_LIBS"
4313
4314 fi
4315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4316   echo "$ac_t""yes" 1>&6
4317   
4318                                 ol_link_threads=posix
4319                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4320 else
4321   echo "$ac_t""no" 1>&6
4322 :
4323 fi
4324
4325                         LIBS="$save_LIBS"
4326                 fi
4327
4328                 if test $ol_link_threads = no ; then
4329                                                 save_LIBS="$LIBS"
4330                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
4331 echo "configure:4332: checking for pthread_create in -lc_r" >&5
4332 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4333 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   ac_save_LIBS="$LIBS"
4337 LIBS="-lc_r  $LIBS"
4338 cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341 /* Override any gcc2 internal prototype to avoid an error.  */
4342 /* We use char because int might match the return type of a gcc2
4343     builtin and then its argument prototype would still apply.  */
4344 char pthread_create();
4345
4346 int main() {
4347 pthread_create()
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4351   rm -rf conftest*
4352   eval "ac_cv_lib_$ac_lib_var=yes"
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=no"
4358 fi
4359 rm -f conftest*
4360 LIBS="$ac_save_LIBS"
4361
4362 fi
4363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4364   echo "$ac_t""yes" 1>&6
4365   
4366                                 ol_link_threads=posix
4367                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
4368 else
4369   echo "$ac_t""no" 1>&6
4370 :
4371 fi
4372
4373                         LIBS="$save_LIBS"
4374                 fi
4375
4376                 if test $ol_link_threads = no ; then
4377                                                 save_LIBS="$LIBS"
4378                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
4379 echo "configure:4380: checking for pthread_create in -lpthreads" >&5
4380 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
4381 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   ac_save_LIBS="$LIBS"
4385 LIBS="-lpthreads  $LIBS"
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 /* Override any gcc2 internal prototype to avoid an error.  */
4390 /* We use char because int might match the return type of a gcc2
4391     builtin and then its argument prototype would still apply.  */
4392 char pthread_create();
4393
4394 int main() {
4395 pthread_create()
4396 ; return 0; }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=yes"
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=no"
4406 fi
4407 rm -f conftest*
4408 LIBS="$ac_save_LIBS"
4409
4410 fi
4411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4412   echo "$ac_t""yes" 1>&6
4413   
4414                                 ol_link_threads=posix
4415                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
4416 else
4417   echo "$ac_t""no" 1>&6
4418 :
4419 fi
4420
4421                         LIBS="$save_LIBS"
4422                 fi
4423
4424                                 if test $ol_link_threads = no ; then
4425                                                 save_LIBS="$LIBS"
4426                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
4427 echo "configure:4428: checking for pthread_join in -lpthreads" >&5
4428 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
4429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4430   echo $ac_n "(cached) $ac_c" 1>&6
4431 else
4432   ac_save_LIBS="$LIBS"
4433 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
4434 cat > conftest.$ac_ext <<EOF
4435 #line 4436 "configure"
4436 #include "confdefs.h"
4437 /* Override any gcc2 internal prototype to avoid an error.  */
4438 /* We use char because int might match the return type of a gcc2
4439     builtin and then its argument prototype would still apply.  */
4440 char pthread_join();
4441
4442 int main() {
4443 pthread_join()
4444 ; return 0; }
4445 EOF
4446 if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4447   rm -rf conftest*
4448   eval "ac_cv_lib_$ac_lib_var=yes"
4449 else
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452   rm -rf conftest*
4453   eval "ac_cv_lib_$ac_lib_var=no"
4454 fi
4455 rm -f conftest*
4456 LIBS="$ac_save_LIBS"
4457
4458 fi
4459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4460   echo "$ac_t""yes" 1>&6
4461   
4462                                 ol_link_threads=posix
4463                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
4464                                 
4465 else
4466   echo "$ac_t""no" 1>&6
4467 :
4468 fi
4469
4470                         LIBS="$save_LIBS"
4471                 fi
4472
4473                                 if test $ol_link_threads = no; then
4474                         save_LIBS="$LIBS"
4475                         LIBS="$LIBS -lpthread"
4476                         echo $ac_n "checking for pthread_create() in HP-UX -lpthread""... $ac_c" 1>&6
4477 echo "configure:4478: checking for pthread_create() in HP-UX -lpthread" >&5
4478                         ol_try_pthread_hpux_11=no
4479                         if eval "test \"`echo '$''{'ol_cv_pthread_hpux_11'+set}'`\" = set"; then
4480   echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482   
4483                                 cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4486
4487 #include <pthread.h>
4488 #include <elf.h>
4489 #ifndef ELFABI_HPUX_REL11
4490         die horribly
4491 #endif
4492                                 
4493 int main() {
4494 pthread_create(NULL, NULL, NULL, NULL);
4495 ; return 0; }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4498   rm -rf conftest*
4499   ol_try_pthread_hpux_11=yes
4500                                         ol_cv_pthread_hpux_11=yes
4501 else
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   ol_cv_pthread_hpux_11=no
4506 fi
4507 rm -f conftest*
4508 fi
4509
4510                         echo "$ac_t""yes" 1>&6
4511                         LIBS="$save_LIBS"
4512
4513                         if test $ol_cv_pthread_hpux_11=yes ; then
4514                                 ol_link_threads=posix
4515                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4516                                 if test $ol_try_pthread_hpux_11=yes ; then
4517                                                                                                                         ac_cv_func_pthread_attr_init=yes
4518                                 fi
4519                         fi
4520                 fi
4521
4522                 if test $ol_link_threads = no ; then
4523                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
4524 echo "configure:4525: checking for pthread_create with -threads" >&5
4525 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4526   echo $ac_n "(cached) $ac_c" 1>&6
4527 else
4528   
4529                                                                 save_LIBS="$LIBS"
4530                                 LIBS="-threads $LIBS"
4531                                 cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 char pthread_create();
4535 int main() {
4536
4537                                         pthread_create();
4538                                         
4539 ; return 0; }
4540 EOF
4541 if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4542   rm -rf conftest*
4543   ol_cv_thread_flag=yes
4544 else
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -rf conftest*
4548   ol_cv_thread_flag=no
4549 fi
4550 rm -f conftest*
4551                                                                 LIBS="$save_LIBS"
4552                         
4553 fi
4554
4555 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4556
4557                         if test $ol_cv_thread_flag = yes ; then
4558                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
4559                                 ol_link_threads=posix
4560                         fi
4561                 fi
4562
4563                 if test $ol_link_threads = no ; then
4564                                                 save_LIBS="$LIBS"
4565                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
4566 echo "configure:4567: checking for pthread_mutex_unlock in -lpthreads" >&5
4567 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4568 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4569   echo $ac_n "(cached) $ac_c" 1>&6
4570 else
4571   ac_save_LIBS="$LIBS"
4572 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
4573 cat > conftest.$ac_ext <<EOF
4574 #line 4575 "configure"
4575 #include "confdefs.h"
4576 /* Override any gcc2 internal prototype to avoid an error.  */
4577 /* We use char because int might match the return type of a gcc2
4578     builtin and then its argument prototype would still apply.  */
4579 char pthread_mutex_unlock();
4580
4581 int main() {
4582 pthread_mutex_unlock()
4583 ; return 0; }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4586   rm -rf conftest*
4587   eval "ac_cv_lib_$ac_lib_var=yes"
4588 else
4589   echo "configure: failed program was:" >&5
4590   cat conftest.$ac_ext >&5
4591   rm -rf conftest*
4592   eval "ac_cv_lib_$ac_lib_var=no"
4593 fi
4594 rm -f conftest*
4595 LIBS="$ac_save_LIBS"
4596
4597 fi
4598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4599   echo "$ac_t""yes" 1>&6
4600   
4601                                 ol_link_threads=posix
4602                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
4603                                 if test $ol_with_yielding_select = auto ; then
4604                                         ol_with_yielding_select=yes
4605                                 fi
4606                                 
4607 else
4608   echo "$ac_t""no" 1>&6
4609 :
4610 fi
4611
4612                         LIBS="$save_LIBS"
4613                 fi
4614
4615                 if test $ol_link_threads = no ; then
4616                                                 save_LIBS="$LIBS"
4617                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
4618 echo "configure:4619: checking for pthread_mutex_lock in -lpthreads" >&5
4619 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   ac_save_LIBS="$LIBS"
4624 LIBS="-lpthreads -lmach -lexc $LIBS"
4625 cat > conftest.$ac_ext <<EOF
4626 #line 4627 "configure"
4627 #include "confdefs.h"
4628 /* Override any gcc2 internal prototype to avoid an error.  */
4629 /* We use char because int might match the return type of a gcc2
4630     builtin and then its argument prototype would still apply.  */
4631 char pthread_mutex_lock();
4632
4633 int main() {
4634 pthread_mutex_lock()
4635 ; return 0; }
4636 EOF
4637 if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4638   rm -rf conftest*
4639   eval "ac_cv_lib_$ac_lib_var=yes"
4640 else
4641   echo "configure: failed program was:" >&5
4642   cat conftest.$ac_ext >&5
4643   rm -rf conftest*
4644   eval "ac_cv_lib_$ac_lib_var=no"
4645 fi
4646 rm -f conftest*
4647 LIBS="$ac_save_LIBS"
4648
4649 fi
4650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4651   echo "$ac_t""yes" 1>&6
4652   
4653                                 ol_link_threads=posix
4654                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
4655                                 if test $ol_with_yielding_select = auto ; then
4656                                         ol_with_yielding_select=yes
4657                                 fi
4658                                 
4659 else
4660   echo "$ac_t""no" 1>&6
4661 :
4662 fi
4663
4664                         LIBS="$save_LIBS"
4665                 fi
4666
4667                 if test $ol_link_threads = no ; then
4668                                                 save_LIBS="$LIBS"
4669                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
4670 echo "configure:4671: checking for pthread_mutex_trylock in -lpthreads" >&5
4671 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   ac_save_LIBS="$LIBS"
4676 LIBS="-lpthreads -lexc $LIBS"
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 /* Override any gcc2 internal prototype to avoid an error.  */
4681 /* We use char because int might match the return type of a gcc2
4682     builtin and then its argument prototype would still apply.  */
4683 char pthread_mutex_trylock();
4684
4685 int main() {
4686 pthread_mutex_trylock()
4687 ; return 0; }
4688 EOF
4689 if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=yes"
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695   rm -rf conftest*
4696   eval "ac_cv_lib_$ac_lib_var=no"
4697 fi
4698 rm -f conftest*
4699 LIBS="$ac_save_LIBS"
4700
4701 fi
4702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4703   echo "$ac_t""yes" 1>&6
4704   
4705                                 ol_link_threads=posix
4706                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
4707                                 if test $ol_with_yielding_select = auto ; then
4708                                         ol_with_yielding_select=yes
4709                                 fi
4710                                 
4711 else
4712   echo "$ac_t""no" 1>&6
4713 :
4714 fi
4715
4716                         LIBS="$save_LIBS"
4717                 fi
4718
4719                 if test $ol_link_threads != no ; then
4720                         cat >> confdefs.h <<\EOF
4721 #define HAVE_PTHREADS 1
4722 EOF
4723
4724
4725                                                 save_CPPFLAGS="$CPPFLAGS"
4726                         save_LIBS="$LIBS"
4727                         LIBS="$LTHREAD_LIBS $LIBS"
4728
4729                                                                                                 for ac_func in sched_yield pthread_yield
4730 do
4731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4732 echo "configure:4733: checking for $ac_func" >&5
4733 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739 /* System header to define __stub macros and hopefully few prototypes,
4740     which can conflict with char $ac_func(); below.  */
4741 #include <assert.h>
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 /* We use char because int might match the return type of a gcc2
4744     builtin and then its argument prototype would still apply.  */
4745 char $ac_func();
4746
4747 int main() {
4748
4749 /* The GNU C library defines this for functions which it implements
4750     to always fail with ENOSYS.  Some functions are actually named
4751     something starting with __ and the normal name is an alias.  */
4752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4753 choke me
4754 #else
4755 $ac_func();
4756 #endif
4757
4758 ; return 0; }
4759 EOF
4760 if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4761   rm -rf conftest*
4762   eval "ac_cv_func_$ac_func=yes"
4763 else
4764   echo "configure: failed program was:" >&5
4765   cat conftest.$ac_ext >&5
4766   rm -rf conftest*
4767   eval "ac_cv_func_$ac_func=no"
4768 fi
4769 rm -f conftest*
4770 fi
4771
4772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4773   echo "$ac_t""yes" 1>&6
4774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4775   cat >> confdefs.h <<EOF
4776 #define $ac_tr_func 1
4777 EOF
4778  
4779 else
4780   echo "$ac_t""no" 1>&6
4781 fi
4782 done
4783
4784
4785                         if test $ac_cv_func_sched_yield = no -a \
4786                                 $ac_cv_func_pthread_yield = no ; then
4787                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4788 echo "configure:4789: checking for sched_yield in -lrt" >&5
4789 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4791   echo $ac_n "(cached) $ac_c" 1>&6
4792 else
4793   ac_save_LIBS="$LIBS"
4794 LIBS="-lrt  $LIBS"
4795 cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798 /* Override any gcc2 internal prototype to avoid an error.  */
4799 /* We use char because int might match the return type of a gcc2
4800     builtin and then its argument prototype would still apply.  */
4801 char sched_yield();
4802
4803 int main() {
4804 sched_yield()
4805 ; return 0; }
4806 EOF
4807 if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4808   rm -rf conftest*
4809   eval "ac_cv_lib_$ac_lib_var=yes"
4810 else
4811   echo "configure: failed program was:" >&5
4812   cat conftest.$ac_ext >&5
4813   rm -rf conftest*
4814   eval "ac_cv_lib_$ac_lib_var=no"
4815 fi
4816 rm -f conftest*
4817 LIBS="$ac_save_LIBS"
4818
4819 fi
4820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4821   echo "$ac_t""yes" 1>&6
4822   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
4823                                         cat >> confdefs.h <<\EOF
4824 #define HAVE_SCHED_YIELD 1
4825 EOF
4826
4827                                         ac_cv_func_sched_yield=yes
4828 else
4829   echo "$ac_t""no" 1>&6
4830 ac_cv_func_sched_yield=no
4831 fi
4832
4833                         fi
4834                         if test $ac_cv_func_sched_yield = no -a \
4835                                 $ac_cv_func_pthread_yield = no ; then
4836                                                                                                 for ac_func in thr_yield
4837 do
4838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4839 echo "configure:4840: checking for $ac_func" >&5
4840 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4841   echo $ac_n "(cached) $ac_c" 1>&6
4842 else
4843   cat > conftest.$ac_ext <<EOF
4844 #line 4845 "configure"
4845 #include "confdefs.h"
4846 /* System header to define __stub macros and hopefully few prototypes,
4847     which can conflict with char $ac_func(); below.  */
4848 #include <assert.h>
4849 /* Override any gcc2 internal prototype to avoid an error.  */
4850 /* We use char because int might match the return type of a gcc2
4851     builtin and then its argument prototype would still apply.  */
4852 char $ac_func();
4853
4854 int main() {
4855
4856 /* The GNU C library defines this for functions which it implements
4857     to always fail with ENOSYS.  Some functions are actually named
4858     something starting with __ and the normal name is an alias.  */
4859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4860 choke me
4861 #else
4862 $ac_func();
4863 #endif
4864
4865 ; return 0; }
4866 EOF
4867 if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4868   rm -rf conftest*
4869   eval "ac_cv_func_$ac_func=yes"
4870 else
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   eval "ac_cv_func_$ac_func=no"
4875 fi
4876 rm -f conftest*
4877 fi
4878
4879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4880   echo "$ac_t""yes" 1>&6
4881     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4882   cat >> confdefs.h <<EOF
4883 #define $ac_tr_func 1
4884 EOF
4885  
4886 else
4887   echo "$ac_t""no" 1>&6
4888 fi
4889 done
4890
4891                         fi
4892                         if test $ac_cv_func_sched_yield = no -a \
4893                                 $ac_cv_func_pthread_yield = no -a \
4894                                 "$ac_cv_func_thr_yield" = no ; then
4895                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
4896                         fi
4897
4898                                                 for ac_func in pthread_kill
4899 do
4900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4901 echo "configure:4902: checking for $ac_func" >&5
4902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4903   echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905   cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 /* System header to define __stub macros and hopefully few prototypes,
4909     which can conflict with char $ac_func(); below.  */
4910 #include <assert.h>
4911 /* Override any gcc2 internal prototype to avoid an error.  */
4912 /* We use char because int might match the return type of a gcc2
4913     builtin and then its argument prototype would still apply.  */
4914 char $ac_func();
4915
4916 int main() {
4917
4918 /* The GNU C library defines this for functions which it implements
4919     to always fail with ENOSYS.  Some functions are actually named
4920     something starting with __ and the normal name is an alias.  */
4921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4922 choke me
4923 #else
4924 $ac_func();
4925 #endif
4926
4927 ; return 0; }
4928 EOF
4929 if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4930   rm -rf conftest*
4931   eval "ac_cv_func_$ac_func=yes"
4932 else
4933   echo "configure: failed program was:" >&5
4934   cat conftest.$ac_ext >&5
4935   rm -rf conftest*
4936   eval "ac_cv_func_$ac_func=no"
4937 fi
4938 rm -f conftest*
4939 fi
4940
4941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4942   echo "$ac_t""yes" 1>&6
4943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4944   cat >> confdefs.h <<EOF
4945 #define $ac_tr_func 1
4946 EOF
4947  
4948 else
4949   echo "$ac_t""no" 1>&6
4950 fi
4951 done
4952
4953
4954                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
4955 echo "configure:4956: checking for pthread_detach with <pthread.h>" >&5
4956 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   
4960                                                                 cat > conftest.$ac_ext <<EOF
4961 #line 4962 "configure"
4962 #include "confdefs.h"
4963 #include <pthread.h>
4964 int main() {
4965 pthread_detach(NULL);
4966 ; return 0; }
4967 EOF
4968 if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4969   rm -rf conftest*
4970   ol_cv_func_pthread_detach=yes
4971 else
4972   echo "configure: failed program was:" >&5
4973   cat conftest.$ac_ext >&5
4974   rm -rf conftest*
4975   ol_cv_func_pthread_detach=no
4976 fi
4977 rm -f conftest*
4978                         
4979 fi
4980
4981 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
4982
4983                         if test $ol_cv_func_pthread_detach = no ; then
4984                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
4985                         fi
4986
4987                         cat >> confdefs.h <<\EOF
4988 #define HAVE_PTHREAD_DETACH 1
4989 EOF
4990
4991
4992                                                 for ac_func in \
4993                                 pthread_setconcurrency \
4994                                 pthread_getconcurrency \
4995                                 thr_setconcurrency \
4996                                 thr_getconcurrency \
4997                         
4998 do
4999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5000 echo "configure:5001: checking for $ac_func" >&5
5001 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* System header to define __stub macros and hopefully few prototypes,
5008     which can conflict with char $ac_func(); below.  */
5009 #include <assert.h>
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 /* We use char because int might match the return type of a gcc2
5012     builtin and then its argument prototype would still apply.  */
5013 char $ac_func();
5014
5015 int main() {
5016
5017 /* The GNU C library defines this for functions which it implements
5018     to always fail with ENOSYS.  Some functions are actually named
5019     something starting with __ and the normal name is an alias.  */
5020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5021 choke me
5022 #else
5023 $ac_func();
5024 #endif
5025
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5029   rm -rf conftest*
5030   eval "ac_cv_func_$ac_func=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_func_$ac_func=no"
5036 fi
5037 rm -f conftest*
5038 fi
5039
5040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5041   echo "$ac_t""yes" 1>&6
5042     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5043   cat >> confdefs.h <<EOF
5044 #define $ac_tr_func 1
5045 EOF
5046  
5047 else
5048   echo "$ac_t""no" 1>&6
5049 fi
5050 done
5051
5052
5053                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5054 echo "configure:5055: checking if pthread_create() works" >&5
5055                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5056   echo $ac_n "(cached) $ac_c" 1>&6
5057 else
5058   
5059                         if test "$cross_compiling" = yes; then
5060                                 ol_cv_pthread_create_works=yes
5061 else
5062   cat > conftest.$ac_ext <<EOF
5063 #line 5064 "configure"
5064 #include "confdefs.h"
5065
5066 #include <pthread.h>
5067 #ifndef NULL
5068 #define NULL (void*)0
5069 #endif
5070
5071 static void *task(p)
5072         void *p;
5073 {
5074         return (void *) (p == NULL);
5075 }
5076
5077 int main(argc, argv)
5078         int argc;
5079         char **argv;
5080 {
5081         pthread_t t;
5082         exit(pthread_create(&t, NULL, task, NULL));
5083 }
5084
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5087 then
5088   ol_cv_pthread_create_works=yes
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -fr conftest*
5093   ol_cv_pthread_create_works=no
5094 fi
5095 rm -fr conftest*
5096 fi
5097
5098 fi
5099
5100                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5101
5102                         if test $ol_cv_pthread_create_works = no ; then
5103                                 { echo "configure: error: pthread.h and pthread_create are not compatible" 1>&2; exit 1; }
5104                         fi
5105
5106                                                 if test $ol_with_yielding_select = auto ; then
5107                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5108 echo "configure:5109: checking if select yields when using pthreads" >&5
5109                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5110   echo $ac_n "(cached) $ac_c" 1>&6
5111 else
5112   
5113                                 if test "$cross_compiling" = yes; then
5114   
5115                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5116 else
5117   cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120
5121 #include <sys/types.h>
5122 #include <sys/time.h>
5123 #include <unistd.h>
5124 #include <pthread.h>
5125 #ifndef NULL
5126 #define NULL (void*) 0
5127 #endif
5128
5129 static int fildes[2];
5130
5131 static void *task(p)
5132         void *p;
5133 {
5134         int i;
5135         struct timeval tv;
5136
5137         fd_set rfds;
5138
5139         tv.tv_sec=10;
5140         tv.tv_usec=0;
5141
5142         FD_ZERO(&rfds);
5143         FD_SET(fildes[0], &rfds);
5144
5145         /* we're not interested in any fds */
5146         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5147
5148         if(i < 0) {
5149                 perror("select");
5150                 exit(10);
5151         }
5152
5153         exit(0); /* if we exit here, the select blocked the whole process */
5154 }
5155
5156 int main(argc, argv)
5157         int argc;
5158         char **argv;
5159 {
5160         pthread_t t;
5161
5162         /* create a pipe to select */
5163         if(pipe(&fildes[0])) {
5164                 perror("select");
5165                 exit(1);
5166         }
5167
5168 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5169         (void) pthread_setconcurrency(2);
5170 #else
5171 #ifdef HAVE_THR_SETCONCURRENCY
5172         /* Set Solaris LWP concurrency to 2 */
5173         thr_setconcurrency(2);
5174 #endif
5175 #endif
5176
5177         pthread_create(&t, NULL, task, NULL);
5178
5179 #if HAVE_SCHED_YIELD
5180         sched_yield();  /* make sure task runs first */
5181 #else
5182 #ifdef HAVE_PTHREAD_YIELD
5183         pthread_yield();        /* make sure task runs first */
5184 #endif
5185 #endif
5186
5187         exit(2);
5188 }
5189 EOF
5190 if { (eval echo configure:5191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5191 then
5192   ol_cv_pthread_select_yields=no
5193 else
5194   echo "configure: failed program was:" >&5
5195   cat conftest.$ac_ext >&5
5196   rm -fr conftest*
5197   ol_cv_pthread_select_yields=yes
5198 fi
5199 rm -fr conftest*
5200 fi
5201
5202 fi
5203
5204                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5205
5206                                 if test $ol_cv_pthread_select_yields = yes ; then
5207                                         ol_with_yielding_select=yes
5208                                 fi
5209                         fi
5210
5211                                                 CPPFLAGS="$save_CPPFLAGS"
5212                         LIBS="$save_LIBS"
5213                 else
5214                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5215                 fi
5216         fi
5217
5218         if test $ol_with_threads = posix ; then
5219                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5220         fi
5221 fi
5222
5223 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5224         -o $ol_with_threads = mach ; then
5225
5226                 for ac_hdr in mach/cthreads.h
5227 do
5228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5230 echo "configure:5231: checking for $ac_hdr" >&5
5231 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5232   echo $ac_n "(cached) $ac_c" 1>&6
5233 else
5234   cat > conftest.$ac_ext <<EOF
5235 #line 5236 "configure"
5236 #include "confdefs.h"
5237 #include <$ac_hdr>
5238 EOF
5239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5240 { (eval echo configure:5241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5242 if test -z "$ac_err"; then
5243   rm -rf conftest*
5244   eval "ac_cv_header_$ac_safe=yes"
5245 else
5246   echo "$ac_err" >&5
5247   echo "configure: failed program was:" >&5
5248   cat conftest.$ac_ext >&5
5249   rm -rf conftest*
5250   eval "ac_cv_header_$ac_safe=no"
5251 fi
5252 rm -f conftest*
5253 fi
5254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5255   echo "$ac_t""yes" 1>&6
5256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5257   cat >> confdefs.h <<EOF
5258 #define $ac_tr_hdr 1
5259 EOF
5260  
5261 else
5262   echo "$ac_t""no" 1>&6
5263 fi
5264 done
5265
5266         if test $ac_cv_header_mach_cthreads_h = yes ; then
5267                 ol_with_threads=found
5268
5269                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5270 echo "configure:5271: checking for cthread_fork" >&5
5271 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5272   echo $ac_n "(cached) $ac_c" 1>&6
5273 else
5274   cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277 /* System header to define __stub macros and hopefully few prototypes,
5278     which can conflict with char cthread_fork(); below.  */
5279 #include <assert.h>
5280 /* Override any gcc2 internal prototype to avoid an error.  */
5281 /* We use char because int might match the return type of a gcc2
5282     builtin and then its argument prototype would still apply.  */
5283 char cthread_fork();
5284
5285 int main() {
5286
5287 /* The GNU C library defines this for functions which it implements
5288     to always fail with ENOSYS.  Some functions are actually named
5289     something starting with __ and the normal name is an alias.  */
5290 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5291 choke me
5292 #else
5293 cthread_fork();
5294 #endif
5295
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299   rm -rf conftest*
5300   eval "ac_cv_func_cthread_fork=yes"
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304   rm -rf conftest*
5305   eval "ac_cv_func_cthread_fork=no"
5306 fi
5307 rm -f conftest*
5308 fi
5309
5310 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5311   echo "$ac_t""yes" 1>&6
5312   ol_link_threads=yes
5313 else
5314   echo "$ac_t""no" 1>&6
5315 fi
5316
5317
5318                 if test $ol_link_threads = no ; then
5319                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5320 echo "configure:5321: checking for cthread_fork with -all_load" >&5
5321 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5322   echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5324   
5325                                                                 save_LIBS="$LIBS"
5326                                 LIBS="-all_load $LIBS"
5327                                 cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330 #include <mach/cthreads.h>
5331 int main() {
5332
5333                                         cthread_fork((void *)0, (void *)0);
5334                                         
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5338   rm -rf conftest*
5339   ol_cv_cthread_all_load=yes
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   ol_cv_cthread_all_load=no
5345 fi
5346 rm -f conftest*
5347                                                                 LIBS="$save_LIBS"
5348                         
5349 fi
5350
5351 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5352
5353                         if test $ol_cv_cthread_all_load = yes ; then
5354                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5355                                 ol_link_threads=mach
5356                         fi
5357                 fi
5358
5359                 if test $ol_link_threads != no ; then
5360                         : check for cthread specific functionality here
5361                         cat >> confdefs.h <<\EOF
5362 #define HAVE_MACH_CTHREADS 1
5363 EOF
5364
5365                 else
5366                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
5367                 fi
5368         fi
5369
5370         if test $ol_with_threads = mach ; then
5371                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
5372         fi
5373 fi
5374
5375 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5376         -o $ol_with_threads = lwp ; then
5377
5378                 for ac_hdr in thread.h synch.h
5379 do
5380 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5381 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5382 echo "configure:5383: checking for $ac_hdr" >&5
5383 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5384   echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386   cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 #include <$ac_hdr>
5390 EOF
5391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5392 { (eval echo configure:5393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5394 if test -z "$ac_err"; then
5395   rm -rf conftest*
5396   eval "ac_cv_header_$ac_safe=yes"
5397 else
5398   echo "$ac_err" >&5
5399   echo "configure: failed program was:" >&5
5400   cat conftest.$ac_ext >&5
5401   rm -rf conftest*
5402   eval "ac_cv_header_$ac_safe=no"
5403 fi
5404 rm -f conftest*
5405 fi
5406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5407   echo "$ac_t""yes" 1>&6
5408     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5409   cat >> confdefs.h <<EOF
5410 #define $ac_tr_hdr 1
5411 EOF
5412  
5413 else
5414   echo "$ac_t""no" 1>&6
5415 fi
5416 done
5417
5418         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
5419                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
5420 echo "configure:5421: checking for thr_create in -lthread" >&5
5421 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
5422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5423   echo $ac_n "(cached) $ac_c" 1>&6
5424 else
5425   ac_save_LIBS="$LIBS"
5426 LIBS="-lthread  $LIBS"
5427 cat > conftest.$ac_ext <<EOF
5428 #line 5429 "configure"
5429 #include "confdefs.h"
5430 /* Override any gcc2 internal prototype to avoid an error.  */
5431 /* We use char because int might match the return type of a gcc2
5432     builtin and then its argument prototype would still apply.  */
5433 char thr_create();
5434
5435 int main() {
5436 thr_create()
5437 ; return 0; }
5438 EOF
5439 if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5440   rm -rf conftest*
5441   eval "ac_cv_lib_$ac_lib_var=yes"
5442 else
5443   echo "configure: failed program was:" >&5
5444   cat conftest.$ac_ext >&5
5445   rm -rf conftest*
5446   eval "ac_cv_lib_$ac_lib_var=no"
5447 fi
5448 rm -f conftest*
5449 LIBS="$ac_save_LIBS"
5450
5451 fi
5452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5453   echo "$ac_t""yes" 1>&6
5454   have_thr=yes
5455 else
5456   echo "$ac_t""no" 1>&6
5457 have_thr=no
5458 fi
5459
5460
5461                 if test $have_thr = yes ; then
5462                         cat >> confdefs.h <<\EOF
5463 #define HAVE_THR 1
5464 EOF
5465
5466                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
5467                         ol_link_threads=thr
5468
5469                         if test $ol_with_yielding_select = auto ; then
5470                                 ol_with_yielding_select=yes
5471                         fi
5472
5473                                                 for ac_func in \
5474                                 thr_setconcurrency \
5475                                 thr_getconcurrency \
5476                         
5477 do
5478 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5479 echo "configure:5480: checking for $ac_func" >&5
5480 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5481   echo $ac_n "(cached) $ac_c" 1>&6
5482 else
5483   cat > conftest.$ac_ext <<EOF
5484 #line 5485 "configure"
5485 #include "confdefs.h"
5486 /* System header to define __stub macros and hopefully few prototypes,
5487     which can conflict with char $ac_func(); below.  */
5488 #include <assert.h>
5489 /* Override any gcc2 internal prototype to avoid an error.  */
5490 /* We use char because int might match the return type of a gcc2
5491     builtin and then its argument prototype would still apply.  */
5492 char $ac_func();
5493
5494 int main() {
5495
5496 /* The GNU C library defines this for functions which it implements
5497     to always fail with ENOSYS.  Some functions are actually named
5498     something starting with __ and the normal name is an alias.  */
5499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5500 choke me
5501 #else
5502 $ac_func();
5503 #endif
5504
5505 ; return 0; }
5506 EOF
5507 if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5508   rm -rf conftest*
5509   eval "ac_cv_func_$ac_func=yes"
5510 else
5511   echo "configure: failed program was:" >&5
5512   cat conftest.$ac_ext >&5
5513   rm -rf conftest*
5514   eval "ac_cv_func_$ac_func=no"
5515 fi
5516 rm -f conftest*
5517 fi
5518
5519 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5520   echo "$ac_t""yes" 1>&6
5521     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5522   cat >> confdefs.h <<EOF
5523 #define $ac_tr_func 1
5524 EOF
5525  
5526 else
5527   echo "$ac_t""no" 1>&6
5528 fi
5529 done
5530
5531                 fi
5532         fi
5533
5534                 for ac_hdr in lwp/lwp.h
5535 do
5536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5538 echo "configure:5539: checking for $ac_hdr" >&5
5539 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5540   echo $ac_n "(cached) $ac_c" 1>&6
5541 else
5542   cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 #include <$ac_hdr>
5546 EOF
5547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5548 { (eval echo configure:5549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5550 if test -z "$ac_err"; then
5551   rm -rf conftest*
5552   eval "ac_cv_header_$ac_safe=yes"
5553 else
5554   echo "$ac_err" >&5
5555   echo "configure: failed program was:" >&5
5556   cat conftest.$ac_ext >&5
5557   rm -rf conftest*
5558   eval "ac_cv_header_$ac_safe=no"
5559 fi
5560 rm -f conftest*
5561 fi
5562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5563   echo "$ac_t""yes" 1>&6
5564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5565   cat >> confdefs.h <<EOF
5566 #define $ac_tr_hdr 1
5567 EOF
5568  
5569 else
5570   echo "$ac_t""no" 1>&6
5571 fi
5572 done
5573
5574         if test $ac_cv_header_lwp_lwp_h = yes ; then
5575                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
5576 echo "configure:5577: checking for lwp_create in -llwp" >&5
5577 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
5578 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5579   echo $ac_n "(cached) $ac_c" 1>&6
5580 else
5581   ac_save_LIBS="$LIBS"
5582 LIBS="-llwp  $LIBS"
5583 cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586 /* Override any gcc2 internal prototype to avoid an error.  */
5587 /* We use char because int might match the return type of a gcc2
5588     builtin and then its argument prototype would still apply.  */
5589 char lwp_create();
5590
5591 int main() {
5592 lwp_create()
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   eval "ac_cv_lib_$ac_lib_var=yes"
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_lib_$ac_lib_var=no"
5603 fi
5604 rm -f conftest*
5605 LIBS="$ac_save_LIBS"
5606
5607 fi
5608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5609   echo "$ac_t""yes" 1>&6
5610   have_lwp=yes
5611 else
5612   echo "$ac_t""no" 1>&6
5613 have_lwp=no
5614 fi
5615
5616
5617                 if test $have_lwp = yes ; then
5618                         cat >> confdefs.h <<\EOF
5619 #define HAVE_LWP 1
5620 EOF
5621
5622                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
5623                         ol_link_threads=lwp
5624
5625                         if test $ol_with_yielding_select = auto ; then
5626                                 ol_with_yielding_select=no
5627                         fi
5628                 fi
5629         fi
5630 fi
5631
5632 if test $ol_with_yielding_select = yes ; then
5633         cat >> confdefs.h <<\EOF
5634 #define HAVE_YIELDING_SELECT 1
5635 EOF
5636
5637 fi
5638
5639 if test $ol_with_threads = manual ; then
5640                 ol_link_threads=yes
5641
5642         echo "configure: warning: thread defines and link options must be set manually" 1>&2
5643
5644         for ac_hdr in pthread.h sched.h
5645 do
5646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5648 echo "configure:5649: checking for $ac_hdr" >&5
5649 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5650   echo $ac_n "(cached) $ac_c" 1>&6
5651 else
5652   cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655 #include <$ac_hdr>
5656 EOF
5657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5658 { (eval echo configure:5659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5660 if test -z "$ac_err"; then
5661   rm -rf conftest*
5662   eval "ac_cv_header_$ac_safe=yes"
5663 else
5664   echo "$ac_err" >&5
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_header_$ac_safe=no"
5669 fi
5670 rm -f conftest*
5671 fi
5672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5673   echo "$ac_t""yes" 1>&6
5674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5675   cat >> confdefs.h <<EOF
5676 #define $ac_tr_hdr 1
5677 EOF
5678  
5679 else
5680   echo "$ac_t""no" 1>&6
5681 fi
5682 done
5683
5684         for ac_func in sched_yield pthread_yield
5685 do
5686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5687 echo "configure:5688: checking for $ac_func" >&5
5688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 /* System header to define __stub macros and hopefully few prototypes,
5695     which can conflict with char $ac_func(); below.  */
5696 #include <assert.h>
5697 /* Override any gcc2 internal prototype to avoid an error.  */
5698 /* We use char because int might match the return type of a gcc2
5699     builtin and then its argument prototype would still apply.  */
5700 char $ac_func();
5701
5702 int main() {
5703
5704 /* The GNU C library defines this for functions which it implements
5705     to always fail with ENOSYS.  Some functions are actually named
5706     something starting with __ and the normal name is an alias.  */
5707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5708 choke me
5709 #else
5710 $ac_func();
5711 #endif
5712
5713 ; return 0; }
5714 EOF
5715 if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5716   rm -rf conftest*
5717   eval "ac_cv_func_$ac_func=yes"
5718 else
5719   echo "configure: failed program was:" >&5
5720   cat conftest.$ac_ext >&5
5721   rm -rf conftest*
5722   eval "ac_cv_func_$ac_func=no"
5723 fi
5724 rm -f conftest*
5725 fi
5726
5727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5728   echo "$ac_t""yes" 1>&6
5729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5730   cat >> confdefs.h <<EOF
5731 #define $ac_tr_func 1
5732 EOF
5733  
5734 else
5735   echo "$ac_t""no" 1>&6
5736 fi
5737 done
5738
5739         
5740 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
5741 echo "configure:5742: checking for LinuxThreads" >&5
5742 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
5743   echo $ac_n "(cached) $ac_c" 1>&6
5744 else
5745   
5746         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
5747         if test "$res" -gt 0 ; then
5748                 ol_cv_linux_threads=yes
5749         else
5750                 ol_cv_linux_threads=no
5751         fi
5752
5753 fi
5754
5755 echo "$ac_t""$ol_cv_linux_threads" 1>&6
5756
5757
5758         for ac_hdr in mach/cthreads.h
5759 do
5760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5762 echo "configure:5763: checking for $ac_hdr" >&5
5763 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5764   echo $ac_n "(cached) $ac_c" 1>&6
5765 else
5766   cat > conftest.$ac_ext <<EOF
5767 #line 5768 "configure"
5768 #include "confdefs.h"
5769 #include <$ac_hdr>
5770 EOF
5771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5772 { (eval echo configure:5773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5774 if test -z "$ac_err"; then
5775   rm -rf conftest*
5776   eval "ac_cv_header_$ac_safe=yes"
5777 else
5778   echo "$ac_err" >&5
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_header_$ac_safe=no"
5783 fi
5784 rm -f conftest*
5785 fi
5786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5787   echo "$ac_t""yes" 1>&6
5788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5789   cat >> confdefs.h <<EOF
5790 #define $ac_tr_hdr 1
5791 EOF
5792  
5793 else
5794   echo "$ac_t""no" 1>&6
5795 fi
5796 done
5797
5798         for ac_hdr in lwp/lwp.h
5799 do
5800 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5801 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5802 echo "configure:5803: checking for $ac_hdr" >&5
5803 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 #include <$ac_hdr>
5810 EOF
5811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5812 { (eval echo configure:5813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5814 if test -z "$ac_err"; then
5815   rm -rf conftest*
5816   eval "ac_cv_header_$ac_safe=yes"
5817 else
5818   echo "$ac_err" >&5
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   eval "ac_cv_header_$ac_safe=no"
5823 fi
5824 rm -f conftest*
5825 fi
5826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5827   echo "$ac_t""yes" 1>&6
5828     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5829   cat >> confdefs.h <<EOF
5830 #define $ac_tr_hdr 1
5831 EOF
5832  
5833 else
5834   echo "$ac_t""no" 1>&6
5835 fi
5836 done
5837
5838         for ac_hdr in thread.h synch.h
5839 do
5840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5842 echo "configure:5843: checking for $ac_hdr" >&5
5843 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 #include <$ac_hdr>
5850 EOF
5851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5852 { (eval echo configure:5853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5854 if test -z "$ac_err"; then
5855   rm -rf conftest*
5856   eval "ac_cv_header_$ac_safe=yes"
5857 else
5858   echo "$ac_err" >&5
5859   echo "configure: failed program was:" >&5
5860   cat conftest.$ac_ext >&5
5861   rm -rf conftest*
5862   eval "ac_cv_header_$ac_safe=no"
5863 fi
5864 rm -f conftest*
5865 fi
5866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5867   echo "$ac_t""yes" 1>&6
5868     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5869   cat >> confdefs.h <<EOF
5870 #define $ac_tr_hdr 1
5871 EOF
5872  
5873 else
5874   echo "$ac_t""no" 1>&6
5875 fi
5876 done
5877
5878 fi
5879
5880 if test $ol_link_threads != no ; then  
5881                         cat >> confdefs.h <<\EOF
5882 #define REENTRANT 1
5883 EOF
5884
5885         cat >> confdefs.h <<\EOF
5886 #define _REENTRANT 1
5887 EOF
5888
5889         cat >> confdefs.h <<\EOF
5890 #define THREAD_SAFE 1
5891 EOF
5892
5893         cat >> confdefs.h <<\EOF
5894 #define _THREAD_SAFE 1
5895 EOF
5896
5897         cat >> confdefs.h <<\EOF
5898 #define THREADSAFE 1
5899 EOF
5900
5901         cat >> confdefs.h <<\EOF
5902 #define _THREADSAFE 1
5903 EOF
5904
5905
5906                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
5907 echo "configure:5908: checking for thread specific errno" >&5
5908 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
5909   echo $ac_n "(cached) $ac_c" 1>&6
5910 else
5911   
5912                 cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915 #include <errno.h>
5916 int main() {
5917 int x = errno;
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   ol_cv_errno_thread_specific=yes
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   ol_cv_errno_thread_specific=no
5928 fi
5929 rm -f conftest*
5930         
5931 fi
5932
5933 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
5934
5935         if test $ol_cv_errno_thread_specific != yes ; then
5936                 LIBS="$LTHREAD_LIBS $LIBS"
5937                 LTHREAD_LIBS=""
5938         fi
5939
5940 fi  
5941
5942
5943 if test $ol_link_threads = no ; then
5944         if test $ol_with_threads = yes ; then
5945                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
5946         fi
5947
5948         if test $ol_with_threads = auto ; then
5949                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
5950                 ol_with_threads=no
5951         fi
5952
5953         cat >> confdefs.h <<\EOF
5954 #define NO_THREADS 1
5955 EOF
5956
5957         LTHREAD_LIBS=""
5958 fi
5959
5960 ol_link_ldbm=no 
5961 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
5962         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
5963 echo "configure:5964: checking for DB2 library" >&5
5964 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
5965   echo $ac_n "(cached) $ac_c" 1>&6
5966 else
5967         ol_LIBS="$LIBS"
5968         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
5969 echo "configure:5970: checking for db_open in -ldb" >&5
5970 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
5971 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5972   echo $ac_n "(cached) $ac_c" 1>&6
5973 else
5974   ac_save_LIBS="$LIBS"
5975 LIBS="-ldb  $LIBS"
5976 cat > conftest.$ac_ext <<EOF
5977 #line 5978 "configure"
5978 #include "confdefs.h"
5979 /* Override any gcc2 internal prototype to avoid an error.  */
5980 /* We use char because int might match the return type of a gcc2
5981     builtin and then its argument prototype would still apply.  */
5982 char db_open();
5983
5984 int main() {
5985 db_open()
5986 ; return 0; }
5987 EOF
5988 if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5989   rm -rf conftest*
5990   eval "ac_cv_lib_$ac_lib_var=yes"
5991 else
5992   echo "configure: failed program was:" >&5
5993   cat conftest.$ac_ext >&5
5994   rm -rf conftest*
5995   eval "ac_cv_lib_$ac_lib_var=no"
5996 fi
5997 rm -f conftest*
5998 LIBS="$ac_save_LIBS"
5999
6000 fi
6001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6002   echo "$ac_t""yes" 1>&6
6003   ol_cv_lib_db2=-ldb
6004 else
6005   echo "$ac_t""no" 1>&6
6006 ol_cv_lib_db2=no
6007 fi
6008
6009         LIBS="$ol_LIBS"
6010
6011 fi
6012
6013 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6014
6015 for ac_hdr in db.h
6016 do
6017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6019 echo "configure:6020: checking for $ac_hdr" >&5
6020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6021   echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023   cat > conftest.$ac_ext <<EOF
6024 #line 6025 "configure"
6025 #include "confdefs.h"
6026 #include <$ac_hdr>
6027 EOF
6028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6029 { (eval echo configure:6030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6031 if test -z "$ac_err"; then
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=yes"
6034 else
6035   echo "$ac_err" >&5
6036   echo "configure: failed program was:" >&5
6037   cat conftest.$ac_ext >&5
6038   rm -rf conftest*
6039   eval "ac_cv_header_$ac_safe=no"
6040 fi
6041 rm -f conftest*
6042 fi
6043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6044   echo "$ac_t""yes" 1>&6
6045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6046   cat >> confdefs.h <<EOF
6047 #define $ac_tr_hdr 1
6048 EOF
6049  
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053 done
6054
6055 if test $ac_cv_header_db_h = yes ; then
6056         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6057 echo "configure:6058: checking if db.h is DB2" >&5
6058 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6059   echo $ac_n "(cached) $ac_c" 1>&6
6060 else
6061   
6062                 cat > conftest.$ac_ext <<EOF
6063 #line 6064 "configure"
6064 #include "confdefs.h"
6065
6066 #                       include <db.h>
6067                         /* this check could be improved */
6068 #                       ifdef DB_VERSION_MAJOR
6069 #                               if DB_VERSION_MAJOR == 2
6070                                         __db_version_2
6071 #                               endif
6072 #                       endif
6073                 
6074 EOF
6075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6076   egrep "__db_version_2" >/dev/null 2>&1; then
6077   rm -rf conftest*
6078   ol_cv_header_db2=yes
6079 else
6080   rm -rf conftest*
6081   ol_cv_header_db2=no
6082 fi
6083 rm -f conftest*
6084
6085 fi
6086
6087 echo "$ac_t""$ol_cv_header_db2" 1>&6
6088 else
6089         ol_cv_header_db2=no
6090 fi
6091
6092
6093  
6094  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6095 echo "configure:6096: checking for Berkeley DB2" >&5
6096 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6097   echo $ac_n "(cached) $ac_c" 1>&6
6098 else
6099   
6100         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6101                 ol_cv_berkeley_db2=no
6102         else
6103                 ol_cv_berkeley_db2=yes
6104         fi
6105
6106 fi
6107
6108 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6109  if test $ol_cv_berkeley_db2 = yes ; then
6110         cat >> confdefs.h <<\EOF
6111 #define HAVE_BERKELEY_DB2 1
6112 EOF
6113
6114  fi
6115
6116
6117         if test $ol_cv_berkeley_db2 = yes ; then
6118                 ol_link_ldbm=db2
6119                 ol_with_ldbm_api=db2
6120
6121                 if test $ol_with_ldbm_type = hash ; then
6122                         cat >> confdefs.h <<\EOF
6123 #define LDBM_USE_DBHASH 1
6124 EOF
6125
6126                 else
6127                         cat >> confdefs.h <<\EOF
6128 #define LDBM_USE_DBBTREE 1
6129 EOF
6130
6131                 fi
6132
6133                                                 if test $ol_cv_lib_db2 != yes ; then
6134                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6135                 fi
6136         fi
6137 fi
6138
6139 ol_link_bdb2=no
6140 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6141         ol_link_bdb2=yes
6142 fi
6143
6144 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6145         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6146 echo "configure:6147: checking for Berkeley DB library" >&5
6147 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6148   echo $ac_n "(cached) $ac_c" 1>&6
6149 else
6150         ol_LIBS="$LIBS"
6151         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6152 echo "configure:6153: checking for dbopen" >&5
6153 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6154   echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156   cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 /* System header to define __stub macros and hopefully few prototypes,
6160     which can conflict with char dbopen(); below.  */
6161 #include <assert.h>
6162 /* Override any gcc2 internal prototype to avoid an error.  */
6163 /* We use char because int might match the return type of a gcc2
6164     builtin and then its argument prototype would still apply.  */
6165 char dbopen();
6166
6167 int main() {
6168
6169 /* The GNU C library defines this for functions which it implements
6170     to always fail with ENOSYS.  Some functions are actually named
6171     something starting with __ and the normal name is an alias.  */
6172 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6173 choke me
6174 #else
6175 dbopen();
6176 #endif
6177
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_func_dbopen=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_func_dbopen=no"
6188 fi
6189 rm -f conftest*
6190 fi
6191
6192 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6193   echo "$ac_t""yes" 1>&6
6194   ol_cv_lib_db=yes
6195 else
6196   echo "$ac_t""no" 1>&6
6197
6198                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6199 echo "configure:6200: checking for dbopen in -ldb" >&5
6200 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6201 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6202   echo $ac_n "(cached) $ac_c" 1>&6
6203 else
6204   ac_save_LIBS="$LIBS"
6205 LIBS="-ldb  $LIBS"
6206 cat > conftest.$ac_ext <<EOF
6207 #line 6208 "configure"
6208 #include "confdefs.h"
6209 /* Override any gcc2 internal prototype to avoid an error.  */
6210 /* We use char because int might match the return type of a gcc2
6211     builtin and then its argument prototype would still apply.  */
6212 char dbopen();
6213
6214 int main() {
6215 dbopen()
6216 ; return 0; }
6217 EOF
6218 if { (eval echo configure:6219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6219   rm -rf conftest*
6220   eval "ac_cv_lib_$ac_lib_var=yes"
6221 else
6222   echo "configure: failed program was:" >&5
6223   cat conftest.$ac_ext >&5
6224   rm -rf conftest*
6225   eval "ac_cv_lib_$ac_lib_var=no"
6226 fi
6227 rm -f conftest*
6228 LIBS="$ac_save_LIBS"
6229
6230 fi
6231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6232   echo "$ac_t""yes" 1>&6
6233   ol_cv_lib_db=-ldb
6234 else
6235   echo "$ac_t""no" 1>&6
6236 ol_cv_lib_db=no
6237 fi
6238
6239         
6240 fi
6241
6242         LIBS="$ol_LIBS"
6243
6244 fi
6245
6246 echo "$ac_t""$ol_cv_lib_db" 1>&6
6247
6248
6249 for ac_hdr in db_185.h
6250 do
6251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6253 echo "configure:6254: checking for $ac_hdr" >&5
6254 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6255   echo $ac_n "(cached) $ac_c" 1>&6
6256 else
6257   cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 #include <$ac_hdr>
6261 EOF
6262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6263 { (eval echo configure:6264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6265 if test -z "$ac_err"; then
6266   rm -rf conftest*
6267   eval "ac_cv_header_$ac_safe=yes"
6268 else
6269   echo "$ac_err" >&5
6270   echo "configure: failed program was:" >&5
6271   cat conftest.$ac_ext >&5
6272   rm -rf conftest*
6273   eval "ac_cv_header_$ac_safe=no"
6274 fi
6275 rm -f conftest*
6276 fi
6277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6278   echo "$ac_t""yes" 1>&6
6279     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6280   cat >> confdefs.h <<EOF
6281 #define $ac_tr_hdr 1
6282 EOF
6283  
6284 else
6285   echo "$ac_t""no" 1>&6
6286 fi
6287 done
6288
6289 if test "$ol_cv_header_db2" = yes ; then
6290         
6291         ol_cv_header_db=$ac_cv_header_db_185_h
6292 else
6293         ol_cv_header_db=$ac_cv_header_db_h
6294 fi
6295
6296
6297  
6298  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6299 echo "configure:6300: checking for Berkeley DB" >&5
6300 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   
6304         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6305                 ol_cv_berkeley_db=no
6306         else
6307                 ol_cv_berkeley_db=yes
6308         fi
6309
6310 fi
6311
6312 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6313  if test $ol_cv_berkeley_db = yes ; then
6314         cat >> confdefs.h <<\EOF
6315 #define HAVE_BERKELEY_DB 1
6316 EOF
6317
6318  fi
6319
6320
6321         if test $ol_cv_berkeley_db = yes ; then
6322                 ol_link_ldbm=db
6323                 ol_with_ldbm_api=db
6324
6325                 if test $ol_with_ldbm_type = hash ; then
6326                         cat >> confdefs.h <<\EOF
6327 #define LDBM_USE_DBHASH 1
6328 EOF
6329
6330                 else
6331                         cat >> confdefs.h <<\EOF
6332 #define LDBM_USE_DBBTREE 1
6333 EOF
6334
6335                 fi
6336
6337                                                 if test $ol_cv_lib_db != yes ; then
6338                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6339                 fi
6340         fi
6341 fi
6342
6343 if test $ol_with_ldbm_api = manual ; then
6344                 ol_link_ldbm=yes
6345
6346         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6347
6348         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6349 do
6350 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6351 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6352 echo "configure:6353: checking for $ac_hdr" >&5
6353 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359 #include <$ac_hdr>
6360 EOF
6361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6362 { (eval echo configure:6363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6364 if test -z "$ac_err"; then
6365   rm -rf conftest*
6366   eval "ac_cv_header_$ac_safe=yes"
6367 else
6368   echo "$ac_err" >&5
6369   echo "configure: failed program was:" >&5
6370   cat conftest.$ac_ext >&5
6371   rm -rf conftest*
6372   eval "ac_cv_header_$ac_safe=no"
6373 fi
6374 rm -f conftest*
6375 fi
6376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6377   echo "$ac_t""yes" 1>&6
6378     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6379   cat >> confdefs.h <<EOF
6380 #define $ac_tr_hdr 1
6381 EOF
6382  
6383 else
6384   echo "$ac_t""no" 1>&6
6385 fi
6386 done
6387
6388 fi
6389
6390 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
6391         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
6392         ol_with_ldbm_api=none
6393 fi
6394
6395 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
6396         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
6397 echo "configure:6398: checking for GDBM library" >&5
6398 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
6399   echo $ac_n "(cached) $ac_c" 1>&6
6400 else
6401         ol_LIBS="$LIBS"
6402         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
6403 echo "configure:6404: checking for gdbm_open" >&5
6404 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
6405   echo $ac_n "(cached) $ac_c" 1>&6
6406 else
6407   cat > conftest.$ac_ext <<EOF
6408 #line 6409 "configure"
6409 #include "confdefs.h"
6410 /* System header to define __stub macros and hopefully few prototypes,
6411     which can conflict with char gdbm_open(); below.  */
6412 #include <assert.h>
6413 /* Override any gcc2 internal prototype to avoid an error.  */
6414 /* We use char because int might match the return type of a gcc2
6415     builtin and then its argument prototype would still apply.  */
6416 char gdbm_open();
6417
6418 int main() {
6419
6420 /* The GNU C library defines this for functions which it implements
6421     to always fail with ENOSYS.  Some functions are actually named
6422     something starting with __ and the normal name is an alias.  */
6423 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
6424 choke me
6425 #else
6426 gdbm_open();
6427 #endif
6428
6429 ; return 0; }
6430 EOF
6431 if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6432   rm -rf conftest*
6433   eval "ac_cv_func_gdbm_open=yes"
6434 else
6435   echo "configure: failed program was:" >&5
6436   cat conftest.$ac_ext >&5
6437   rm -rf conftest*
6438   eval "ac_cv_func_gdbm_open=no"
6439 fi
6440 rm -f conftest*
6441 fi
6442
6443 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
6444   echo "$ac_t""yes" 1>&6
6445   ol_cv_lib_gdbm=yes
6446 else
6447   echo "$ac_t""no" 1>&6
6448
6449                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
6450 echo "configure:6451: checking for gdbm_open in -lgdbm" >&5
6451 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
6452 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6453   echo $ac_n "(cached) $ac_c" 1>&6
6454 else
6455   ac_save_LIBS="$LIBS"
6456 LIBS="-lgdbm  $LIBS"
6457 cat > conftest.$ac_ext <<EOF
6458 #line 6459 "configure"
6459 #include "confdefs.h"
6460 /* Override any gcc2 internal prototype to avoid an error.  */
6461 /* We use char because int might match the return type of a gcc2
6462     builtin and then its argument prototype would still apply.  */
6463 char gdbm_open();
6464
6465 int main() {
6466 gdbm_open()
6467 ; return 0; }
6468 EOF
6469 if { (eval echo configure:6470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6470   rm -rf conftest*
6471   eval "ac_cv_lib_$ac_lib_var=yes"
6472 else
6473   echo "configure: failed program was:" >&5
6474   cat conftest.$ac_ext >&5
6475   rm -rf conftest*
6476   eval "ac_cv_lib_$ac_lib_var=no"
6477 fi
6478 rm -f conftest*
6479 LIBS="$ac_save_LIBS"
6480
6481 fi
6482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6483   echo "$ac_t""yes" 1>&6
6484   ol_cv_lib_gdbm=-lgdbm
6485 else
6486   echo "$ac_t""no" 1>&6
6487 ol_cv_lib_gdbm=no
6488 fi
6489
6490         
6491 fi
6492
6493         LIBS="$ol_LIBS"
6494
6495 fi
6496
6497 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
6498
6499
6500  for ac_hdr in gdbm.h
6501 do
6502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6504 echo "configure:6505: checking for $ac_hdr" >&5
6505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6506   echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508   cat > conftest.$ac_ext <<EOF
6509 #line 6510 "configure"
6510 #include "confdefs.h"
6511 #include <$ac_hdr>
6512 EOF
6513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6514 { (eval echo configure:6515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6516 if test -z "$ac_err"; then
6517   rm -rf conftest*
6518   eval "ac_cv_header_$ac_safe=yes"
6519 else
6520   echo "$ac_err" >&5
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523   rm -rf conftest*
6524   eval "ac_cv_header_$ac_safe=no"
6525 fi
6526 rm -f conftest*
6527 fi
6528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6529   echo "$ac_t""yes" 1>&6
6530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6531   cat >> confdefs.h <<EOF
6532 #define $ac_tr_hdr 1
6533 EOF
6534  
6535 else
6536   echo "$ac_t""no" 1>&6
6537 fi
6538 done
6539
6540  echo $ac_n "checking for db""... $ac_c" 1>&6
6541 echo "configure:6542: checking for db" >&5
6542 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
6543   echo $ac_n "(cached) $ac_c" 1>&6
6544 else
6545   
6546         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
6547                 ol_cv_gdbm=no
6548         else
6549                 ol_cv_gdbm=yes
6550         fi
6551
6552 fi
6553
6554 echo "$ac_t""$ol_cv_gdbm" 1>&6
6555  if test $ol_cv_gdbm = yes ; then
6556         cat >> confdefs.h <<\EOF
6557 #define HAVE_GDBM 1
6558 EOF
6559
6560  fi
6561
6562
6563         if test $ol_cv_gdbm = yes ; then
6564                 ol_link_ldbm=gdbm
6565                 ol_with_ldbm_api=gdbm
6566
6567                 if test $ol_cv_lib_gdbm != yes ; then
6568                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
6569                 fi
6570         fi
6571 fi
6572
6573 if test $ol_with_ldbm_api = auto ; then
6574         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
6575 elif test $ol_with_ldbm_api = ndbm ; then
6576         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
6577 echo "configure:6578: checking for NDBM library" >&5
6578 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
6579   echo $ac_n "(cached) $ac_c" 1>&6
6580 else
6581         ol_LIBS="$LIBS"
6582         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
6583 echo "configure:6584: checking for dbm_open" >&5
6584 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
6585   echo $ac_n "(cached) $ac_c" 1>&6
6586 else
6587   cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590 /* System header to define __stub macros and hopefully few prototypes,
6591     which can conflict with char dbm_open(); below.  */
6592 #include <assert.h>
6593 /* Override any gcc2 internal prototype to avoid an error.  */
6594 /* We use char because int might match the return type of a gcc2
6595     builtin and then its argument prototype would still apply.  */
6596 char dbm_open();
6597
6598 int main() {
6599
6600 /* The GNU C library defines this for functions which it implements
6601     to always fail with ENOSYS.  Some functions are actually named
6602     something starting with __ and the normal name is an alias.  */
6603 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
6604 choke me
6605 #else
6606 dbm_open();
6607 #endif
6608
6609 ; return 0; }
6610 EOF
6611 if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6612   rm -rf conftest*
6613   eval "ac_cv_func_dbm_open=yes"
6614 else
6615   echo "configure: failed program was:" >&5
6616   cat conftest.$ac_ext >&5
6617   rm -rf conftest*
6618   eval "ac_cv_func_dbm_open=no"
6619 fi
6620 rm -f conftest*
6621 fi
6622
6623 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
6624   echo "$ac_t""yes" 1>&6
6625   ol_cv_lib_ndbm=yes
6626 else
6627   echo "$ac_t""no" 1>&6
6628
6629                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
6630 echo "configure:6631: checking for dbm_open in -lndbm" >&5
6631 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
6632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   ac_save_LIBS="$LIBS"
6636 LIBS="-lndbm  $LIBS"
6637 cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6640 /* Override any gcc2 internal prototype to avoid an error.  */
6641 /* We use char because int might match the return type of a gcc2
6642     builtin and then its argument prototype would still apply.  */
6643 char dbm_open();
6644
6645 int main() {
6646 dbm_open()
6647 ; return 0; }
6648 EOF
6649 if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6650   rm -rf conftest*
6651   eval "ac_cv_lib_$ac_lib_var=yes"
6652 else
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -rf conftest*
6656   eval "ac_cv_lib_$ac_lib_var=no"
6657 fi
6658 rm -f conftest*
6659 LIBS="$ac_save_LIBS"
6660
6661 fi
6662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6663   echo "$ac_t""yes" 1>&6
6664   ol_cv_lib_ndbm=-lndbm
6665 else
6666   echo "$ac_t""no" 1>&6
6667
6668                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
6669 echo "configure:6670: checking for dbm_open in -ldbm" >&5
6670 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
6671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6672   echo $ac_n "(cached) $ac_c" 1>&6
6673 else
6674   ac_save_LIBS="$LIBS"
6675 LIBS="-ldbm  $LIBS"
6676 cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679 /* Override any gcc2 internal prototype to avoid an error.  */
6680 /* We use char because int might match the return type of a gcc2
6681     builtin and then its argument prototype would still apply.  */
6682 char dbm_open();
6683
6684 int main() {
6685 dbm_open()
6686 ; return 0; }
6687 EOF
6688 if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6689   rm -rf conftest*
6690   eval "ac_cv_lib_$ac_lib_var=yes"
6691 else
6692   echo "configure: failed program was:" >&5
6693   cat conftest.$ac_ext >&5
6694   rm -rf conftest*
6695   eval "ac_cv_lib_$ac_lib_var=no"
6696 fi
6697 rm -f conftest*
6698 LIBS="$ac_save_LIBS"
6699
6700 fi
6701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6702   echo "$ac_t""yes" 1>&6
6703   ol_cv_lib_ndbm=-ldbm
6704 else
6705   echo "$ac_t""no" 1>&6
6706 ol_cv_lib_ndbm=no
6707 fi
6708                 
6709 fi
6710
6711         
6712 fi
6713
6714         LIBS="$ol_LIBS"
6715
6716 fi
6717
6718 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
6719
6720
6721  for ac_hdr in ndbm.h
6722 do
6723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6724 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6725 echo "configure:6726: checking for $ac_hdr" >&5
6726 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6727   echo $ac_n "(cached) $ac_c" 1>&6
6728 else
6729   cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732 #include <$ac_hdr>
6733 EOF
6734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6735 { (eval echo configure:6736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6737 if test -z "$ac_err"; then
6738   rm -rf conftest*
6739   eval "ac_cv_header_$ac_safe=yes"
6740 else
6741   echo "$ac_err" >&5
6742   echo "configure: failed program was:" >&5
6743   cat conftest.$ac_ext >&5
6744   rm -rf conftest*
6745   eval "ac_cv_header_$ac_safe=no"
6746 fi
6747 rm -f conftest*
6748 fi
6749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6752   cat >> confdefs.h <<EOF
6753 #define $ac_tr_hdr 1
6754 EOF
6755  
6756 else
6757   echo "$ac_t""no" 1>&6
6758 fi
6759 done
6760
6761  echo $ac_n "checking for db""... $ac_c" 1>&6
6762 echo "configure:6763: checking for db" >&5
6763 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
6764   echo $ac_n "(cached) $ac_c" 1>&6
6765 else
6766   
6767         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
6768                 ol_cv_ndbm=no
6769         else
6770                 ol_cv_ndbm=yes
6771         fi
6772
6773 fi
6774
6775 echo "$ac_t""$ol_cv_ndbm" 1>&6
6776  if test $ol_cv_ndbm = yes ; then
6777         cat >> confdefs.h <<\EOF
6778 #define HAVE_NDBM 1
6779 EOF
6780
6781  fi
6782
6783
6784         if test $ol_cv_ndbm = yes ; then
6785                 ol_link_ldbm=ndbm
6786                 ol_with_ldbm_api=ndbm
6787
6788                 if test $ol_cv_lib_ndbm != yes ; then
6789                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
6790                 fi
6791         fi
6792 fi
6793
6794 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
6795         echo "configure: warning: could not find suitable LDBM backend" 1>&2
6796         if test $ol_enable_ldbm = yes ; then
6797                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
6798         fi
6799
6800         echo "configure: warning: disabling LDBM" 1>&2
6801         ol_enable_ldbm=no
6802 fi
6803
6804 if test $ol_enable_wrappers != no ; then
6805         for ac_hdr in tcpd.h
6806 do
6807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6809 echo "configure:6810: checking for $ac_hdr" >&5
6810 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6811   echo $ac_n "(cached) $ac_c" 1>&6
6812 else
6813   cat > conftest.$ac_ext <<EOF
6814 #line 6815 "configure"
6815 #include "confdefs.h"
6816 #include <$ac_hdr>
6817 EOF
6818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6819 { (eval echo configure:6820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6821 if test -z "$ac_err"; then
6822   rm -rf conftest*
6823   eval "ac_cv_header_$ac_safe=yes"
6824 else
6825   echo "$ac_err" >&5
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   eval "ac_cv_header_$ac_safe=no"
6830 fi
6831 rm -f conftest*
6832 fi
6833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6834   echo "$ac_t""yes" 1>&6
6835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6836   cat >> confdefs.h <<EOF
6837 #define $ac_tr_hdr 1
6838 EOF
6839  
6840 else
6841   echo "$ac_t""no" 1>&6
6842 fi
6843 done
6844
6845
6846         if test $ac_cv_header_tcpd_h != yes ; then
6847                 have_wrappers=no
6848         else
6849                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
6850 echo "configure:6851: checking for main in -lwrap" >&5
6851 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
6852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   ac_save_LIBS="$LIBS"
6856 LIBS="-lwrap  $LIBS"
6857 cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860
6861 int main() {
6862 main()
6863 ; return 0; }
6864 EOF
6865 if { (eval echo configure:6866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6866   rm -rf conftest*
6867   eval "ac_cv_lib_$ac_lib_var=yes"
6868 else
6869   echo "configure: failed program was:" >&5
6870   cat conftest.$ac_ext >&5
6871   rm -rf conftest*
6872   eval "ac_cv_lib_$ac_lib_var=no"
6873 fi
6874 rm -f conftest*
6875 LIBS="$ac_save_LIBS"
6876
6877 fi
6878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6879   echo "$ac_t""yes" 1>&6
6880   have_wrappers=yes
6881 else
6882   echo "$ac_t""no" 1>&6
6883 have_wrappers=no
6884 fi
6885
6886         fi
6887
6888         if test $have_wrappers = yes ; then
6889                 cat >> confdefs.h <<\EOF
6890 #define HAVE_TCPD 1
6891 EOF
6892
6893                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
6894         else
6895                 echo "configure: warning: could not find -lwrap" 1>&2
6896                 if test $ol_enable_wrappers = yes ; then
6897                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
6898                 fi
6899
6900                 echo "configure: warning: disabling wrappers support" 1>&2
6901                 ol_enable_wrappers=no
6902         fi
6903 fi
6904
6905 if test $ol_enable_syslog != no ; then
6906         echo $ac_n "checking for openlog""... $ac_c" 1>&6
6907 echo "configure:6908: checking for openlog" >&5
6908 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
6909   echo $ac_n "(cached) $ac_c" 1>&6
6910 else
6911   cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914 /* System header to define __stub macros and hopefully few prototypes,
6915     which can conflict with char openlog(); below.  */
6916 #include <assert.h>
6917 /* Override any gcc2 internal prototype to avoid an error.  */
6918 /* We use char because int might match the return type of a gcc2
6919     builtin and then its argument prototype would still apply.  */
6920 char openlog();
6921
6922 int main() {
6923
6924 /* The GNU C library defines this for functions which it implements
6925     to always fail with ENOSYS.  Some functions are actually named
6926     something starting with __ and the normal name is an alias.  */
6927 #if defined (__stub_openlog) || defined (__stub___openlog)
6928 choke me
6929 #else
6930 openlog();
6931 #endif
6932
6933 ; return 0; }
6934 EOF
6935 if { (eval echo configure:6936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6936   rm -rf conftest*
6937   eval "ac_cv_func_openlog=yes"
6938 else
6939   echo "configure: failed program was:" >&5
6940   cat conftest.$ac_ext >&5
6941   rm -rf conftest*
6942   eval "ac_cv_func_openlog=no"
6943 fi
6944 rm -f conftest*
6945 fi
6946
6947 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
6948   echo "$ac_t""yes" 1>&6
6949   :
6950 else
6951   echo "$ac_t""no" 1>&6
6952 fi
6953
6954         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
6955                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
6956         fi
6957         ol_enable_syslog=$ac_cv_func_openlog
6958 fi
6959
6960 if test $ol_enable_dmalloc != no ; then
6961         for ac_hdr in dmalloc.h
6962 do
6963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6965 echo "configure:6966: checking for $ac_hdr" >&5
6966 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6967   echo $ac_n "(cached) $ac_c" 1>&6
6968 else
6969   cat > conftest.$ac_ext <<EOF
6970 #line 6971 "configure"
6971 #include "confdefs.h"
6972 #include <$ac_hdr>
6973 EOF
6974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6975 { (eval echo configure:6976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6977 if test -z "$ac_err"; then
6978   rm -rf conftest*
6979   eval "ac_cv_header_$ac_safe=yes"
6980 else
6981   echo "$ac_err" >&5
6982   echo "configure: failed program was:" >&5
6983   cat conftest.$ac_ext >&5
6984   rm -rf conftest*
6985   eval "ac_cv_header_$ac_safe=no"
6986 fi
6987 rm -f conftest*
6988 fi
6989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6990   echo "$ac_t""yes" 1>&6
6991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6992   cat >> confdefs.h <<EOF
6993 #define $ac_tr_hdr 1
6994 EOF
6995  
6996 else
6997   echo "$ac_t""no" 1>&6
6998 fi
6999 done
7000
7001         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7002 echo "configure:7003: checking for dmalloc_shutdown in -ldmalloc" >&5
7003 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7004 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7005   echo $ac_n "(cached) $ac_c" 1>&6
7006 else
7007   ac_save_LIBS="$LIBS"
7008 LIBS="-ldmalloc  $LIBS"
7009 cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012 /* Override any gcc2 internal prototype to avoid an error.  */
7013 /* We use char because int might match the return type of a gcc2
7014     builtin and then its argument prototype would still apply.  */
7015 char dmalloc_shutdown();
7016
7017 int main() {
7018 dmalloc_shutdown()
7019 ; return 0; }
7020 EOF
7021 if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7022   rm -rf conftest*
7023   eval "ac_cv_lib_$ac_lib_var=yes"
7024 else
7025   echo "configure: failed program was:" >&5
7026   cat conftest.$ac_ext >&5
7027   rm -rf conftest*
7028   eval "ac_cv_lib_$ac_lib_var=no"
7029 fi
7030 rm -f conftest*
7031 LIBS="$ac_save_LIBS"
7032
7033 fi
7034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7035   echo "$ac_t""yes" 1>&6
7036     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7037     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7038   cat >> confdefs.h <<EOF
7039 #define $ac_tr_lib 1
7040 EOF
7041
7042   LIBS="-ldmalloc $LIBS"
7043
7044 else
7045   echo "$ac_t""no" 1>&6
7046 fi
7047
7048 fi
7049
7050 # ud needs termcap (should insert check here)
7051 ol_link_termcap=no
7052 for ac_hdr in termcap.h ncurses.h
7053 do
7054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7056 echo "configure:7057: checking for $ac_hdr" >&5
7057 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7058   echo $ac_n "(cached) $ac_c" 1>&6
7059 else
7060   cat > conftest.$ac_ext <<EOF
7061 #line 7062 "configure"
7062 #include "confdefs.h"
7063 #include <$ac_hdr>
7064 EOF
7065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7066 { (eval echo configure:7067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7068 if test -z "$ac_err"; then
7069   rm -rf conftest*
7070   eval "ac_cv_header_$ac_safe=yes"
7071 else
7072   echo "$ac_err" >&5
7073   echo "configure: failed program was:" >&5
7074   cat conftest.$ac_ext >&5
7075   rm -rf conftest*
7076   eval "ac_cv_header_$ac_safe=no"
7077 fi
7078 rm -f conftest*
7079 fi
7080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7081   echo "$ac_t""yes" 1>&6
7082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7083   cat >> confdefs.h <<EOF
7084 #define $ac_tr_hdr 1
7085 EOF
7086  
7087 else
7088   echo "$ac_t""no" 1>&6
7089 fi
7090 done
7091
7092
7093 if test $ol_link_termcap = no ; then
7094         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
7095 echo "configure:7096: checking for tputs in -ltermcap" >&5
7096 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
7097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7098   echo $ac_n "(cached) $ac_c" 1>&6
7099 else
7100   ac_save_LIBS="$LIBS"
7101 LIBS="-ltermcap  $LIBS"
7102 cat > conftest.$ac_ext <<EOF
7103 #line 7104 "configure"
7104 #include "confdefs.h"
7105 /* Override any gcc2 internal prototype to avoid an error.  */
7106 /* We use char because int might match the return type of a gcc2
7107     builtin and then its argument prototype would still apply.  */
7108 char tputs();
7109
7110 int main() {
7111 tputs()
7112 ; return 0; }
7113 EOF
7114 if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7115   rm -rf conftest*
7116   eval "ac_cv_lib_$ac_lib_var=yes"
7117 else
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   eval "ac_cv_lib_$ac_lib_var=no"
7122 fi
7123 rm -f conftest*
7124 LIBS="$ac_save_LIBS"
7125
7126 fi
7127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7128   echo "$ac_t""yes" 1>&6
7129   have_termcap=yes
7130 else
7131   echo "$ac_t""no" 1>&6
7132 have_termcap=no
7133 fi
7134
7135         if test $have_termcap = yes ; then
7136                 cat >> confdefs.h <<\EOF
7137 #define HAVE_TERMCAP 1
7138 EOF
7139
7140                 ol_link_termcap=yes
7141                 TERMCAP_LIBS=-ltermcap
7142         fi
7143 fi
7144
7145 if test $ol_link_termcap = no ; then
7146         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
7147 echo "configure:7148: checking for initscr in -lncurses" >&5
7148 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
7149 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7150   echo $ac_n "(cached) $ac_c" 1>&6
7151 else
7152   ac_save_LIBS="$LIBS"
7153 LIBS="-lncurses  $LIBS"
7154 cat > conftest.$ac_ext <<EOF
7155 #line 7156 "configure"
7156 #include "confdefs.h"
7157 /* Override any gcc2 internal prototype to avoid an error.  */
7158 /* We use char because int might match the return type of a gcc2
7159     builtin and then its argument prototype would still apply.  */
7160 char initscr();
7161
7162 int main() {
7163 initscr()
7164 ; return 0; }
7165 EOF
7166 if { (eval echo configure:7167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7167   rm -rf conftest*
7168   eval "ac_cv_lib_$ac_lib_var=yes"
7169 else
7170   echo "configure: failed program was:" >&5
7171   cat conftest.$ac_ext >&5
7172   rm -rf conftest*
7173   eval "ac_cv_lib_$ac_lib_var=no"
7174 fi
7175 rm -f conftest*
7176 LIBS="$ac_save_LIBS"
7177
7178 fi
7179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7180   echo "$ac_t""yes" 1>&6
7181   have_ncurses=yes
7182 else
7183   echo "$ac_t""no" 1>&6
7184 have_ncurses=no
7185 fi
7186
7187         if test $have_ncurses = yes ; then
7188                 cat >> confdefs.h <<\EOF
7189 #define HAVE_NCURSES 1
7190 EOF
7191
7192                 ol_link_termcap=yes
7193                 TERMCAP_LIBS=-lncurses
7194         fi
7195 fi
7196
7197 if test $ol_link_termcap = no ; then
7198         cat >> confdefs.h <<\EOF
7199 #define NO_TERMCAP 1
7200 EOF
7201
7202         TERMCAP_LIBS=
7203 fi
7204
7205 # FreeBSD (and others) have crypt(3) in -lcrypt
7206 if test $ol_enable_crypt != no ; then
7207         echo $ac_n "checking for crypt""... $ac_c" 1>&6
7208 echo "configure:7209: checking for crypt" >&5
7209 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
7210   echo $ac_n "(cached) $ac_c" 1>&6
7211 else
7212   cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 /* System header to define __stub macros and hopefully few prototypes,
7216     which can conflict with char crypt(); below.  */
7217 #include <assert.h>
7218 /* Override any gcc2 internal prototype to avoid an error.  */
7219 /* We use char because int might match the return type of a gcc2
7220     builtin and then its argument prototype would still apply.  */
7221 char crypt();
7222
7223 int main() {
7224
7225 /* The GNU C library defines this for functions which it implements
7226     to always fail with ENOSYS.  Some functions are actually named
7227     something starting with __ and the normal name is an alias.  */
7228 #if defined (__stub_crypt) || defined (__stub___crypt)
7229 choke me
7230 #else
7231 crypt();
7232 #endif
7233
7234 ; return 0; }
7235 EOF
7236 if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7237   rm -rf conftest*
7238   eval "ac_cv_func_crypt=yes"
7239 else
7240   echo "configure: failed program was:" >&5
7241   cat conftest.$ac_ext >&5
7242   rm -rf conftest*
7243   eval "ac_cv_func_crypt=no"
7244 fi
7245 rm -f conftest*
7246 fi
7247
7248 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
7249   echo "$ac_t""yes" 1>&6
7250   have_crypt=yes
7251 else
7252   echo "$ac_t""no" 1>&6
7253
7254                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7255 echo "configure:7256: checking for crypt in -lcrypt" >&5
7256 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7257 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7258   echo $ac_n "(cached) $ac_c" 1>&6
7259 else
7260   ac_save_LIBS="$LIBS"
7261 LIBS="-lcrypt  $LIBS"
7262 cat > conftest.$ac_ext <<EOF
7263 #line 7264 "configure"
7264 #include "confdefs.h"
7265 /* Override any gcc2 internal prototype to avoid an error.  */
7266 /* We use char because int might match the return type of a gcc2
7267     builtin and then its argument prototype would still apply.  */
7268 char crypt();
7269
7270 int main() {
7271 crypt()
7272 ; return 0; }
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7275   rm -rf conftest*
7276   eval "ac_cv_lib_$ac_lib_var=yes"
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   eval "ac_cv_lib_$ac_lib_var=no"
7282 fi
7283 rm -f conftest*
7284 LIBS="$ac_save_LIBS"
7285
7286 fi
7287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7288   echo "$ac_t""yes" 1>&6
7289   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
7290                         have_crypt=yes
7291 else
7292   echo "$ac_t""no" 1>&6
7293 have_crypt=no
7294 fi
7295
7296 fi
7297
7298
7299         if test $have_crypt = yes ; then
7300                 cat >> confdefs.h <<\EOF
7301 #define HAVE_CRYPT 1
7302 EOF
7303
7304         else
7305                 echo "configure: warning: could not find crypt" 1>&2
7306                 if test $ol_enable_crypt = yes ; then
7307                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
7308                 fi
7309
7310                 echo "configure: warning: disabling crypt support" 1>&2
7311                 ol_enable_crypt=no
7312         fi
7313 fi
7314
7315 # FreeBSD (and others) have setproctitle(3) in -lutil
7316 if test $ol_enable_proctitle != no ; then
7317         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
7318 echo "configure:7319: checking for setproctitle" >&5
7319 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
7320   echo $ac_n "(cached) $ac_c" 1>&6
7321 else
7322   cat > conftest.$ac_ext <<EOF
7323 #line 7324 "configure"
7324 #include "confdefs.h"
7325 /* System header to define __stub macros and hopefully few prototypes,
7326     which can conflict with char setproctitle(); below.  */
7327 #include <assert.h>
7328 /* Override any gcc2 internal prototype to avoid an error.  */
7329 /* We use char because int might match the return type of a gcc2
7330     builtin and then its argument prototype would still apply.  */
7331 char setproctitle();
7332
7333 int main() {
7334
7335 /* The GNU C library defines this for functions which it implements
7336     to always fail with ENOSYS.  Some functions are actually named
7337     something starting with __ and the normal name is an alias.  */
7338 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
7339 choke me
7340 #else
7341 setproctitle();
7342 #endif
7343
7344 ; return 0; }
7345 EOF
7346 if { (eval echo configure:7347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7347   rm -rf conftest*
7348   eval "ac_cv_func_setproctitle=yes"
7349 else
7350   echo "configure: failed program was:" >&5
7351   cat conftest.$ac_ext >&5
7352   rm -rf conftest*
7353   eval "ac_cv_func_setproctitle=no"
7354 fi
7355 rm -f conftest*
7356 fi
7357
7358 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
7359   echo "$ac_t""yes" 1>&6
7360   have_setproctitle=yes
7361 else
7362   echo "$ac_t""no" 1>&6
7363
7364                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
7365 echo "configure:7366: checking for setproctitle in -lutil" >&5
7366 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
7367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7368   echo $ac_n "(cached) $ac_c" 1>&6
7369 else
7370   ac_save_LIBS="$LIBS"
7371 LIBS="-lutil  $LIBS"
7372 cat > conftest.$ac_ext <<EOF
7373 #line 7374 "configure"
7374 #include "confdefs.h"
7375 /* Override any gcc2 internal prototype to avoid an error.  */
7376 /* We use char because int might match the return type of a gcc2
7377     builtin and then its argument prototype would still apply.  */
7378 char setproctitle();
7379
7380 int main() {
7381 setproctitle()
7382 ; return 0; }
7383 EOF
7384 if { (eval echo configure:7385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7385   rm -rf conftest*
7386   eval "ac_cv_lib_$ac_lib_var=yes"
7387 else
7388   echo "configure: failed program was:" >&5
7389   cat conftest.$ac_ext >&5
7390   rm -rf conftest*
7391   eval "ac_cv_lib_$ac_lib_var=no"
7392 fi
7393 rm -f conftest*
7394 LIBS="$ac_save_LIBS"
7395
7396 fi
7397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7398   echo "$ac_t""yes" 1>&6
7399   have_setproctitle=yes
7400                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
7401 else
7402   echo "$ac_t""no" 1>&6
7403 have_setproctitle=no
7404                         LIBOBJS="$LIBOBJS setproctitle.o"
7405 fi
7406
7407 fi
7408
7409
7410         if test $have_setproctitle = yes ; then
7411                 cat >> confdefs.h <<\EOF
7412 #define HAVE_SETPROCTITLE 1
7413 EOF
7414
7415         fi
7416 fi
7417
7418 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7419 echo "configure:7420: checking for ANSI C header files" >&5
7420 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7421   echo $ac_n "(cached) $ac_c" 1>&6
7422 else
7423   cat > conftest.$ac_ext <<EOF
7424 #line 7425 "configure"
7425 #include "confdefs.h"
7426 #include <stdlib.h>
7427 #include <stdarg.h>
7428 #include <string.h>
7429 #include <float.h>
7430 EOF
7431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7432 { (eval echo configure:7433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7434 if test -z "$ac_err"; then
7435   rm -rf conftest*
7436   ac_cv_header_stdc=yes
7437 else
7438   echo "$ac_err" >&5
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442   ac_cv_header_stdc=no
7443 fi
7444 rm -f conftest*
7445
7446 if test $ac_cv_header_stdc = yes; then
7447   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7448 cat > conftest.$ac_ext <<EOF
7449 #line 7450 "configure"
7450 #include "confdefs.h"
7451 #include <string.h>
7452 EOF
7453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7454   egrep "memchr" >/dev/null 2>&1; then
7455   :
7456 else
7457   rm -rf conftest*
7458   ac_cv_header_stdc=no
7459 fi
7460 rm -f conftest*
7461
7462 fi
7463
7464 if test $ac_cv_header_stdc = yes; then
7465   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7466 cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 #include <stdlib.h>
7470 EOF
7471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7472   egrep "free" >/dev/null 2>&1; then
7473   :
7474 else
7475   rm -rf conftest*
7476   ac_cv_header_stdc=no
7477 fi
7478 rm -f conftest*
7479
7480 fi
7481
7482 if test $ac_cv_header_stdc = yes; then
7483   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7484 if test "$cross_compiling" = yes; then
7485   :
7486 else
7487   cat > conftest.$ac_ext <<EOF
7488 #line 7489 "configure"
7489 #include "confdefs.h"
7490 #include <ctype.h>
7491 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7492 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7493 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7494 int main () { int i; for (i = 0; i < 256; i++)
7495 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7496 exit (0); }
7497
7498 EOF
7499 if { (eval echo configure:7500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7500 then
7501   :
7502 else
7503   echo "configure: failed program was:" >&5
7504   cat conftest.$ac_ext >&5
7505   rm -fr conftest*
7506   ac_cv_header_stdc=no
7507 fi
7508 rm -fr conftest*
7509 fi
7510
7511 fi
7512 fi
7513
7514 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7515 if test $ac_cv_header_stdc = yes; then
7516   cat >> confdefs.h <<\EOF
7517 #define STDC_HEADERS 1
7518 EOF
7519
7520 fi
7521
7522
7523 if test $ac_cv_header_stdc != yes; then
7524         echo "configure: warning: could not Standard C compliant headers" 1>&2
7525 fi
7526
7527 ac_header_dirent=no
7528 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
7529 do
7530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7531 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
7532 echo "configure:7533: checking for $ac_hdr that defines DIR" >&5
7533 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
7534   echo $ac_n "(cached) $ac_c" 1>&6
7535 else
7536   cat > conftest.$ac_ext <<EOF
7537 #line 7538 "configure"
7538 #include "confdefs.h"
7539 #include <sys/types.h>
7540 #include <$ac_hdr>
7541 int main() {
7542 DIR *dirp = 0;
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7546   rm -rf conftest*
7547   eval "ac_cv_header_dirent_$ac_safe=yes"
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   eval "ac_cv_header_dirent_$ac_safe=no"
7553 fi
7554 rm -f conftest*
7555 fi
7556 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
7557   echo "$ac_t""yes" 1>&6
7558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7559   cat >> confdefs.h <<EOF
7560 #define $ac_tr_hdr 1
7561 EOF
7562  ac_header_dirent=$ac_hdr; break
7563 else
7564   echo "$ac_t""no" 1>&6
7565 fi
7566 done
7567 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7568 if test $ac_header_dirent = dirent.h; then
7569 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
7570 echo "configure:7571: checking for opendir in -ldir" >&5
7571 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
7572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7573   echo $ac_n "(cached) $ac_c" 1>&6
7574 else
7575   ac_save_LIBS="$LIBS"
7576 LIBS="-ldir  $LIBS"
7577 cat > conftest.$ac_ext <<EOF
7578 #line 7579 "configure"
7579 #include "confdefs.h"
7580 /* Override any gcc2 internal prototype to avoid an error.  */
7581 /* We use char because int might match the return type of a gcc2
7582     builtin and then its argument prototype would still apply.  */
7583 char opendir();
7584
7585 int main() {
7586 opendir()
7587 ; return 0; }
7588 EOF
7589 if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7590   rm -rf conftest*
7591   eval "ac_cv_lib_$ac_lib_var=yes"
7592 else
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=no"
7597 fi
7598 rm -f conftest*
7599 LIBS="$ac_save_LIBS"
7600
7601 fi
7602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7603   echo "$ac_t""yes" 1>&6
7604   LIBS="$LIBS -ldir"
7605 else
7606   echo "$ac_t""no" 1>&6
7607 fi
7608
7609 else
7610 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
7611 echo "configure:7612: checking for opendir in -lx" >&5
7612 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
7613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   ac_save_LIBS="$LIBS"
7617 LIBS="-lx  $LIBS"
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* Override any gcc2 internal prototype to avoid an error.  */
7622 /* We use char because int might match the return type of a gcc2
7623     builtin and then its argument prototype would still apply.  */
7624 char opendir();
7625
7626 int main() {
7627 opendir()
7628 ; return 0; }
7629 EOF
7630 if { (eval echo configure:7631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7631   rm -rf conftest*
7632   eval "ac_cv_lib_$ac_lib_var=yes"
7633 else
7634   echo "configure: failed program was:" >&5
7635   cat conftest.$ac_ext >&5
7636   rm -rf conftest*
7637   eval "ac_cv_lib_$ac_lib_var=no"
7638 fi
7639 rm -f conftest*
7640 LIBS="$ac_save_LIBS"
7641
7642 fi
7643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7644   echo "$ac_t""yes" 1>&6
7645   LIBS="$LIBS -lx"
7646 else
7647   echo "$ac_t""no" 1>&6
7648 fi
7649
7650 fi
7651
7652 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7653 echo "configure:7654: checking for sys/wait.h that is POSIX.1 compatible" >&5
7654 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7655   echo $ac_n "(cached) $ac_c" 1>&6
7656 else
7657   cat > conftest.$ac_ext <<EOF
7658 #line 7659 "configure"
7659 #include "confdefs.h"
7660 #include <sys/types.h>
7661 #include <sys/wait.h>
7662 #ifndef WEXITSTATUS
7663 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7664 #endif
7665 #ifndef WIFEXITED
7666 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7667 #endif
7668 int main() {
7669 int s;
7670 wait (&s);
7671 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7672 ; return 0; }
7673 EOF
7674 if { (eval echo configure:7675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7675   rm -rf conftest*
7676   ac_cv_header_sys_wait_h=yes
7677 else
7678   echo "configure: failed program was:" >&5
7679   cat conftest.$ac_ext >&5
7680   rm -rf conftest*
7681   ac_cv_header_sys_wait_h=no
7682 fi
7683 rm -f conftest*
7684 fi
7685
7686 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7687 if test $ac_cv_header_sys_wait_h = yes; then
7688   cat >> confdefs.h <<\EOF
7689 #define HAVE_SYS_WAIT_H 1
7690 EOF
7691
7692 fi
7693
7694 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
7695 echo "configure:7696: checking POSIX termios" >&5
7696 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
7697   echo $ac_n "(cached) $ac_c" 1>&6
7698 else
7699   cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7702 #include <sys/types.h>
7703 #include <unistd.h>
7704 #include <termios.h>
7705 int main() {
7706 /* SunOS 4.0.3 has termios.h but not the library calls.  */
7707    tcgetattr(0, 0);
7708 ; return 0; }
7709 EOF
7710 if { (eval echo configure:7711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7711   rm -rf conftest*
7712   am_cv_sys_posix_termios=yes
7713 else
7714   echo "configure: failed program was:" >&5
7715   cat conftest.$ac_ext >&5
7716   rm -rf conftest*
7717   am_cv_sys_posix_termios=no
7718 fi
7719 rm -f conftest*
7720 fi
7721
7722 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
7723
7724
7725  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
7726 echo "configure:7727: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
7727 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
7728   echo $ac_n "(cached) $ac_c" 1>&6
7729 else
7730   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
7731
7732   gwinsz_in_termios_h=no
7733   if test $am_cv_sys_posix_termios = yes; then
7734     cat > conftest.$ac_ext <<EOF
7735 #line 7736 "configure"
7736 #include "confdefs.h"
7737 #include <sys/types.h>
7738 #     include <termios.h>
7739 #     ifdef TIOCGWINSZ
7740         yes
7741 #     endif
7742     
7743 EOF
7744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7745   egrep "yes" >/dev/null 2>&1; then
7746   rm -rf conftest*
7747   gwinsz_in_termios_h=yes
7748 fi
7749 rm -f conftest*
7750
7751   fi
7752
7753   if test $gwinsz_in_termios_h = no; then
7754     cat > conftest.$ac_ext <<EOF
7755 #line 7756 "configure"
7756 #include "confdefs.h"
7757 #include <sys/types.h>
7758 #     include <sys/ioctl.h>
7759 #     ifdef TIOCGWINSZ
7760         yes
7761 #     endif
7762     
7763 EOF
7764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7765   egrep "yes" >/dev/null 2>&1; then
7766   rm -rf conftest*
7767   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
7768 fi
7769 rm -f conftest*
7770
7771   fi
7772   
7773 fi
7774
7775 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
7776   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
7777     cat >> confdefs.h <<\EOF
7778 #define GWINSZ_IN_SYS_IOCTL 1
7779 EOF
7780
7781   fi
7782
7783 if test $am_cv_sys_posix_termios = yes ; then
7784         cat >> confdefs.h <<\EOF
7785 #define HAVE_POSIX_TERMIOS 1
7786 EOF
7787
7788 fi
7789
7790 for ac_hdr in \
7791         arpa/nameser.h  \
7792         crypt.h                 \
7793         errno.h                 \
7794         fcntl.h                 \
7795         filio.h                 \
7796         getopt.h                \
7797         libutil.h               \
7798         limits.h                \
7799         malloc.h                \
7800         memory.h                \
7801         regex.h                 \
7802         psap.h                  \
7803         pwd.h                   \
7804         resolv.h                \
7805         sgtty.h                 \
7806         stdarg.h                \
7807         stddef.h                \
7808         string.h                \
7809         strings.h               \
7810         sysexits.h              \
7811         sys/file.h              \
7812         sys/filio.h             \
7813         sys/errno.h             \
7814         sys/ioctl.h             \
7815         sys/param.h             \
7816         sys/resource.h  \
7817         sys/socket.h    \
7818         sys/syslog.h    \
7819         sys/time.h              \
7820         sys/types.h             \
7821         syslog.h                \
7822         termios.h               \
7823         unistd.h                \
7824
7825 do
7826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7828 echo "configure:7829: checking for $ac_hdr" >&5
7829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7830   echo $ac_n "(cached) $ac_c" 1>&6
7831 else
7832   cat > conftest.$ac_ext <<EOF
7833 #line 7834 "configure"
7834 #include "confdefs.h"
7835 #include <$ac_hdr>
7836 EOF
7837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7838 { (eval echo configure:7839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7840 if test -z "$ac_err"; then
7841   rm -rf conftest*
7842   eval "ac_cv_header_$ac_safe=yes"
7843 else
7844   echo "$ac_err" >&5
7845   echo "configure: failed program was:" >&5
7846   cat conftest.$ac_ext >&5
7847   rm -rf conftest*
7848   eval "ac_cv_header_$ac_safe=no"
7849 fi
7850 rm -f conftest*
7851 fi
7852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7853   echo "$ac_t""yes" 1>&6
7854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7855   cat >> confdefs.h <<EOF
7856 #define $ac_tr_hdr 1
7857 EOF
7858  
7859 else
7860   echo "$ac_t""no" 1>&6
7861 fi
7862 done
7863
7864
7865 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
7866 echo "configure:7867: checking for uid_t in sys/types.h" >&5
7867 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
7868   echo $ac_n "(cached) $ac_c" 1>&6
7869 else
7870   cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 #include <sys/types.h>
7874 EOF
7875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7876   egrep "uid_t" >/dev/null 2>&1; then
7877   rm -rf conftest*
7878   ac_cv_type_uid_t=yes
7879 else
7880   rm -rf conftest*
7881   ac_cv_type_uid_t=no
7882 fi
7883 rm -f conftest*
7884
7885 fi
7886
7887 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
7888 if test $ac_cv_type_uid_t = no; then
7889   cat >> confdefs.h <<\EOF
7890 #define uid_t int
7891 EOF
7892
7893   cat >> confdefs.h <<\EOF
7894 #define gid_t int
7895 EOF
7896
7897 fi
7898
7899 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
7900 echo "configure:7901: checking type of array argument to getgroups" >&5
7901 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
7902   echo $ac_n "(cached) $ac_c" 1>&6
7903 else
7904   if test "$cross_compiling" = yes; then
7905   ac_cv_type_getgroups=cross
7906 else
7907   cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910
7911 /* Thanks to Mike Rendell for this test.  */
7912 #include <sys/types.h>
7913 #define NGID 256
7914 #undef MAX
7915 #define MAX(x, y) ((x) > (y) ? (x) : (y))
7916 main()
7917 {
7918   gid_t gidset[NGID];
7919   int i, n;
7920   union { gid_t gval; long lval; }  val;
7921
7922   val.lval = -1;
7923   for (i = 0; i < NGID; i++)
7924     gidset[i] = val.gval;
7925   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
7926                  gidset);
7927   /* Exit non-zero if getgroups seems to require an array of ints.  This
7928      happens when gid_t is short but getgroups modifies an array of ints.  */
7929   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
7930 }
7931
7932 EOF
7933 if { (eval echo configure:7934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7934 then
7935     ac_cv_type_getgroups=gid_t
7936 else
7937   echo "configure: failed program was:" >&5
7938   cat conftest.$ac_ext >&5
7939   rm -fr conftest*
7940   ac_cv_type_getgroups=int
7941 fi
7942 rm -fr conftest*
7943 fi
7944
7945 if test $ac_cv_type_getgroups = cross; then
7946         cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949 #include <unistd.h>
7950 EOF
7951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7952   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
7953   rm -rf conftest*
7954   ac_cv_type_getgroups=gid_t
7955 else
7956   rm -rf conftest*
7957   ac_cv_type_getgroups=int
7958 fi
7959 rm -f conftest*
7960
7961 fi
7962 fi
7963
7964 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
7965 cat >> confdefs.h <<EOF
7966 #define GETGROUPS_T $ac_cv_type_getgroups
7967 EOF
7968
7969  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
7970 echo "configure:7971: checking for mode_t" >&5
7971 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
7972   echo $ac_n "(cached) $ac_c" 1>&6
7973 else
7974   cat > conftest.$ac_ext <<EOF
7975 #line 7976 "configure"
7976 #include "confdefs.h"
7977 #include <sys/types.h>
7978 #if STDC_HEADERS
7979 #include <stdlib.h>
7980 #include <stddef.h>
7981 #endif
7982 EOF
7983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7984   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7985   rm -rf conftest*
7986   ac_cv_type_mode_t=yes
7987 else
7988   rm -rf conftest*
7989   ac_cv_type_mode_t=no
7990 fi
7991 rm -f conftest*
7992
7993 fi
7994 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
7995 if test $ac_cv_type_mode_t = no; then
7996   cat >> confdefs.h <<\EOF
7997 #define mode_t int
7998 EOF
7999
8000 fi
8001
8002 echo $ac_n "checking for off_t""... $ac_c" 1>&6
8003 echo "configure:8004: checking for off_t" >&5
8004 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
8005   echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 #include <sys/types.h>
8011 #if STDC_HEADERS
8012 #include <stdlib.h>
8013 #include <stddef.h>
8014 #endif
8015 EOF
8016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8017   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8018   rm -rf conftest*
8019   ac_cv_type_off_t=yes
8020 else
8021   rm -rf conftest*
8022   ac_cv_type_off_t=no
8023 fi
8024 rm -f conftest*
8025
8026 fi
8027 echo "$ac_t""$ac_cv_type_off_t" 1>&6
8028 if test $ac_cv_type_off_t = no; then
8029   cat >> confdefs.h <<\EOF
8030 #define off_t long
8031 EOF
8032
8033 fi
8034
8035 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8036 echo "configure:8037: checking for pid_t" >&5
8037 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8038   echo $ac_n "(cached) $ac_c" 1>&6
8039 else
8040   cat > conftest.$ac_ext <<EOF
8041 #line 8042 "configure"
8042 #include "confdefs.h"
8043 #include <sys/types.h>
8044 #if STDC_HEADERS
8045 #include <stdlib.h>
8046 #include <stddef.h>
8047 #endif
8048 EOF
8049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8050   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8051   rm -rf conftest*
8052   ac_cv_type_pid_t=yes
8053 else
8054   rm -rf conftest*
8055   ac_cv_type_pid_t=no
8056 fi
8057 rm -f conftest*
8058
8059 fi
8060 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8061 if test $ac_cv_type_pid_t = no; then
8062   cat >> confdefs.h <<\EOF
8063 #define pid_t int
8064 EOF
8065
8066 fi
8067
8068 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
8069 echo "configure:8070: checking for ptrdiff_t" >&5
8070 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
8071   echo $ac_n "(cached) $ac_c" 1>&6
8072 else
8073   cat > conftest.$ac_ext <<EOF
8074 #line 8075 "configure"
8075 #include "confdefs.h"
8076 #include <stddef.h>
8077 int main() {
8078 ptrdiff_t p
8079 ; return 0; }
8080 EOF
8081 if { (eval echo configure:8082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8082   rm -rf conftest*
8083   am_cv_type_ptrdiff_t=yes
8084 else
8085   echo "configure: failed program was:" >&5
8086   cat conftest.$ac_ext >&5
8087   rm -rf conftest*
8088   am_cv_type_ptrdiff_t=no
8089 fi
8090 rm -f conftest*
8091 fi
8092
8093 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
8094    if test $am_cv_type_ptrdiff_t = yes; then
8095      cat >> confdefs.h <<\EOF
8096 #define HAVE_PTRDIFF_T 1
8097 EOF
8098
8099    fi
8100
8101 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
8102 echo "configure:8103: checking return type of signal handlers" >&5
8103 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
8104   echo $ac_n "(cached) $ac_c" 1>&6
8105 else
8106   cat > conftest.$ac_ext <<EOF
8107 #line 8108 "configure"
8108 #include "confdefs.h"
8109 #include <sys/types.h>
8110 #include <signal.h>
8111 #ifdef signal
8112 #undef signal
8113 #endif
8114 #ifdef __cplusplus
8115 extern "C" void (*signal (int, void (*)(int)))(int);
8116 #else
8117 void (*signal ()) ();
8118 #endif
8119
8120 int main() {
8121 int i;
8122 ; return 0; }
8123 EOF
8124 if { (eval echo configure:8125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8125   rm -rf conftest*
8126   ac_cv_type_signal=void
8127 else
8128   echo "configure: failed program was:" >&5
8129   cat conftest.$ac_ext >&5
8130   rm -rf conftest*
8131   ac_cv_type_signal=int
8132 fi
8133 rm -f conftest*
8134 fi
8135
8136 echo "$ac_t""$ac_cv_type_signal" 1>&6
8137 cat >> confdefs.h <<EOF
8138 #define RETSIGTYPE $ac_cv_type_signal
8139 EOF
8140
8141
8142 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
8143 echo "configure:8144: checking for sig_atomic_t" >&5
8144 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   cat > conftest.$ac_ext <<EOF
8148 #line 8149 "configure"
8149 #include "confdefs.h"
8150 #include <signal.h>
8151 int main() {
8152 sig_atomic_t atomic;
8153 ; return 0; }
8154 EOF
8155 if { (eval echo configure:8156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8156   rm -rf conftest*
8157   ol_cv_type_sig_atomic_t=yes
8158 else
8159   echo "configure: failed program was:" >&5
8160   cat conftest.$ac_ext >&5
8161   rm -rf conftest*
8162   ol_cv_type_sig_atomic_t=no
8163 fi
8164 rm -f conftest*
8165 fi
8166
8167 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
8168   if test $ol_cv_type_sig_atomic_t = no; then
8169     cat >> confdefs.h <<\EOF
8170 #define sig_atomic_t int
8171 EOF
8172
8173   fi
8174  
8175 echo $ac_n "checking for size_t""... $ac_c" 1>&6
8176 echo "configure:8177: checking for size_t" >&5
8177 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
8178   echo $ac_n "(cached) $ac_c" 1>&6
8179 else
8180   cat > conftest.$ac_ext <<EOF
8181 #line 8182 "configure"
8182 #include "confdefs.h"
8183 #include <sys/types.h>
8184 #if STDC_HEADERS
8185 #include <stdlib.h>
8186 #include <stddef.h>
8187 #endif
8188 EOF
8189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8190   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8191   rm -rf conftest*
8192   ac_cv_type_size_t=yes
8193 else
8194   rm -rf conftest*
8195   ac_cv_type_size_t=no
8196 fi
8197 rm -f conftest*
8198
8199 fi
8200 echo "$ac_t""$ac_cv_type_size_t" 1>&6
8201 if test $ac_cv_type_size_t = no; then
8202   cat >> confdefs.h <<\EOF
8203 #define size_t unsigned
8204 EOF
8205
8206 fi
8207
8208 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
8209 echo "configure:8210: checking for st_blksize in struct stat" >&5
8210 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
8211   echo $ac_n "(cached) $ac_c" 1>&6
8212 else
8213   cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 #include <sys/types.h>
8217 #include <sys/stat.h>
8218 int main() {
8219 struct stat s; s.st_blksize;
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8223   rm -rf conftest*
8224   ac_cv_struct_st_blksize=yes
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   ac_cv_struct_st_blksize=no
8230 fi
8231 rm -f conftest*
8232 fi
8233
8234 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
8235 if test $ac_cv_struct_st_blksize = yes; then
8236   cat >> confdefs.h <<\EOF
8237 #define HAVE_ST_BLKSIZE 1
8238 EOF
8239
8240 fi
8241
8242 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
8243 echo "configure:8244: checking whether time.h and sys/time.h may both be included" >&5
8244 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   cat > conftest.$ac_ext <<EOF
8248 #line 8249 "configure"
8249 #include "confdefs.h"
8250 #include <sys/types.h>
8251 #include <sys/time.h>
8252 #include <time.h>
8253 int main() {
8254 struct tm *tp;
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8258   rm -rf conftest*
8259   ac_cv_header_time=yes
8260 else
8261   echo "configure: failed program was:" >&5
8262   cat conftest.$ac_ext >&5
8263   rm -rf conftest*
8264   ac_cv_header_time=no
8265 fi
8266 rm -f conftest*
8267 fi
8268
8269 echo "$ac_t""$ac_cv_header_time" 1>&6
8270 if test $ac_cv_header_time = yes; then
8271   cat >> confdefs.h <<\EOF
8272 #define TIME_WITH_SYS_TIME 1
8273 EOF
8274
8275 fi
8276
8277 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
8278 echo "configure:8279: checking whether struct tm is in sys/time.h or time.h" >&5
8279 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   cat > conftest.$ac_ext <<EOF
8283 #line 8284 "configure"
8284 #include "confdefs.h"
8285 #include <sys/types.h>
8286 #include <time.h>
8287 int main() {
8288 struct tm *tp; tp->tm_sec;
8289 ; return 0; }
8290 EOF
8291 if { (eval echo configure:8292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8292   rm -rf conftest*
8293   ac_cv_struct_tm=time.h
8294 else
8295   echo "configure: failed program was:" >&5
8296   cat conftest.$ac_ext >&5
8297   rm -rf conftest*
8298   ac_cv_struct_tm=sys/time.h
8299 fi
8300 rm -f conftest*
8301 fi
8302
8303 echo "$ac_t""$ac_cv_struct_tm" 1>&6
8304 if test $ac_cv_struct_tm = sys/time.h; then
8305   cat >> confdefs.h <<\EOF
8306 #define TM_IN_SYS_TIME 1
8307 EOF
8308
8309 fi
8310
8311
8312
8313 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
8314 echo "configure:8315: checking if toupper() requires islower()" >&5
8315 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
8316   echo $ac_n "(cached) $ac_c" 1>&6
8317 else
8318   
8319         if test "$cross_compiling" = yes; then
8320   ol_cv_c_upper_lower=safe
8321 else
8322   cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325
8326 #include <ctype.h>
8327 main()
8328 {
8329         if ('C' == toupper('C'))
8330                 exit(0);
8331         else
8332                 exit(1);
8333 }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8336 then
8337   ol_cv_c_upper_lower=no
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -fr conftest*
8342   ol_cv_c_upper_lower=yes
8343 fi
8344 rm -fr conftest*
8345 fi
8346
8347 fi
8348
8349 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
8350 if test $ol_cv_c_upper_lower != no ; then
8351         cat >> confdefs.h <<\EOF
8352 #define C_UPPER_LOWER 1
8353 EOF
8354
8355 fi
8356
8357 echo $ac_n "checking for working const""... $ac_c" 1>&6
8358 echo "configure:8359: checking for working const" >&5
8359 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
8360   echo $ac_n "(cached) $ac_c" 1>&6
8361 else
8362   cat > conftest.$ac_ext <<EOF
8363 #line 8364 "configure"
8364 #include "confdefs.h"
8365
8366 int main() {
8367
8368 /* Ultrix mips cc rejects this.  */
8369 typedef int charset[2]; const charset x;
8370 /* SunOS 4.1.1 cc rejects this.  */
8371 char const *const *ccp;
8372 char **p;
8373 /* NEC SVR4.0.2 mips cc rejects this.  */
8374 struct point {int x, y;};
8375 static struct point const zero = {0,0};
8376 /* AIX XL C 1.02.0.0 rejects this.
8377    It does not let you subtract one const X* pointer from another in an arm
8378    of an if-expression whose if-part is not a constant expression */
8379 const char *g = "string";
8380 ccp = &g + (g ? g-g : 0);
8381 /* HPUX 7.0 cc rejects these. */
8382 ++ccp;
8383 p = (char**) ccp;
8384 ccp = (char const *const *) p;
8385 { /* SCO 3.2v4 cc rejects this.  */
8386   char *t;
8387   char const *s = 0 ? (char *) 0 : (char const *) 0;
8388
8389   *t++ = 0;
8390 }
8391 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8392   int x[] = {25, 17};
8393   const int *foo = &x[0];
8394   ++foo;
8395 }
8396 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8397   typedef const int *iptr;
8398   iptr p = 0;
8399   ++p;
8400 }
8401 { /* AIX XL C 1.02.0.0 rejects this saying
8402      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8403   struct s { int j; const int *ap[3]; };
8404   struct s *b; b->j = 5;
8405 }
8406 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8407   const int foo = 10;
8408 }
8409
8410 ; return 0; }
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8413   rm -rf conftest*
8414   ac_cv_c_const=yes
8415 else
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -rf conftest*
8419   ac_cv_c_const=no
8420 fi
8421 rm -f conftest*
8422 fi
8423
8424 echo "$ac_t""$ac_cv_c_const" 1>&6
8425 if test $ac_cv_c_const = no; then
8426   cat >> confdefs.h <<\EOF
8427 #define const 
8428 EOF
8429
8430 fi
8431
8432 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
8433 echo "configure:8434: checking if compiler understands volatile" >&5
8434 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
8435   echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437   cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 int x, y, z;
8441 int main() {
8442 volatile int a; int * volatile b = x ? &y : &z;
8443       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
8444       *b = 0;
8445 ; return 0; }
8446 EOF
8447 if { (eval echo configure:8448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8448   rm -rf conftest*
8449   ol_cv_c_volatile=yes
8450 else
8451   echo "configure: failed program was:" >&5
8452   cat conftest.$ac_ext >&5
8453   rm -rf conftest*
8454   ol_cv_c_volatile=no
8455 fi
8456 rm -f conftest*
8457 fi
8458
8459 echo "$ac_t""$ol_cv_c_volatile" 1>&6
8460   if test $ol_cv_c_volatile = yes; then
8461     : 
8462   else
8463     cat >> confdefs.h <<\EOF
8464 #define volatile 
8465 EOF
8466
8467   fi
8468  
8469
8470 if test $cross_compiling = yes ; then
8471         cat >> confdefs.h <<\EOF
8472 #define CROSS_COMPILING 1
8473 EOF
8474
8475 else
8476         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
8477 echo "configure:8478: checking whether byte ordering is bigendian" >&5
8478 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
8479   echo $ac_n "(cached) $ac_c" 1>&6
8480 else
8481   ac_cv_c_bigendian=unknown
8482 # See if sys/param.h defines the BYTE_ORDER macro.
8483 cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 #include <sys/types.h>
8487 #include <sys/param.h>
8488 int main() {
8489
8490 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8491  bogus endian macros
8492 #endif
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8496   rm -rf conftest*
8497   # It does; now see whether it defined to BIG_ENDIAN or not.
8498 cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 #include <sys/types.h>
8502 #include <sys/param.h>
8503 int main() {
8504
8505 #if BYTE_ORDER != BIG_ENDIAN
8506  not big endian
8507 #endif
8508 ; return 0; }
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8511   rm -rf conftest*
8512   ac_cv_c_bigendian=yes
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   ac_cv_c_bigendian=no
8518 fi
8519 rm -f conftest*
8520 else
8521   echo "configure: failed program was:" >&5
8522   cat conftest.$ac_ext >&5
8523 fi
8524 rm -f conftest*
8525 if test $ac_cv_c_bigendian = unknown; then
8526 if test "$cross_compiling" = yes; then
8527     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8528 else
8529   cat > conftest.$ac_ext <<EOF
8530 #line 8531 "configure"
8531 #include "confdefs.h"
8532 main () {
8533   /* Are we little or big endian?  From Harbison&Steele.  */
8534   union
8535   {
8536     long l;
8537     char c[sizeof (long)];
8538   } u;
8539   u.l = 1;
8540   exit (u.c[sizeof (long) - 1] == 1);
8541 }
8542 EOF
8543 if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8544 then
8545   ac_cv_c_bigendian=no
8546 else
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -fr conftest*
8550   ac_cv_c_bigendian=yes
8551 fi
8552 rm -fr conftest*
8553 fi
8554
8555 fi
8556 fi
8557
8558 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8559 if test $ac_cv_c_bigendian = yes; then
8560   cat >> confdefs.h <<\EOF
8561 #define WORDS_BIGENDIAN 1
8562 EOF
8563
8564 fi
8565
8566         echo $ac_n "checking size of short""... $ac_c" 1>&6
8567 echo "configure:8568: checking size of short" >&5
8568 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
8569   echo $ac_n "(cached) $ac_c" 1>&6
8570 else
8571   if test "$cross_compiling" = yes; then
8572     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8573 else
8574   cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 #include <stdio.h>
8578 main()
8579 {
8580   FILE *f=fopen("conftestval", "w");
8581   if (!f) exit(1);
8582   fprintf(f, "%d\n", sizeof(short));
8583   exit(0);
8584 }
8585 EOF
8586 if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8587 then
8588   ac_cv_sizeof_short=`cat conftestval`
8589 else
8590   echo "configure: failed program was:" >&5
8591   cat conftest.$ac_ext >&5
8592   rm -fr conftest*
8593   ac_cv_sizeof_short=0
8594 fi
8595 rm -fr conftest*
8596 fi
8597
8598 fi
8599 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
8600 cat >> confdefs.h <<EOF
8601 #define SIZEOF_SHORT $ac_cv_sizeof_short
8602 EOF
8603
8604  
8605         echo $ac_n "checking size of int""... $ac_c" 1>&6
8606 echo "configure:8607: checking size of int" >&5
8607 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8608   echo $ac_n "(cached) $ac_c" 1>&6
8609 else
8610   if test "$cross_compiling" = yes; then
8611     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8612 else
8613   cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 #include <stdio.h>
8617 main()
8618 {
8619   FILE *f=fopen("conftestval", "w");
8620   if (!f) exit(1);
8621   fprintf(f, "%d\n", sizeof(int));
8622   exit(0);
8623 }
8624 EOF
8625 if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8626 then
8627   ac_cv_sizeof_int=`cat conftestval`
8628 else
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -fr conftest*
8632   ac_cv_sizeof_int=0
8633 fi
8634 rm -fr conftest*
8635 fi
8636
8637 fi
8638 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
8639 cat >> confdefs.h <<EOF
8640 #define SIZEOF_INT $ac_cv_sizeof_int
8641 EOF
8642
8643  
8644         echo $ac_n "checking size of long""... $ac_c" 1>&6
8645 echo "configure:8646: checking size of long" >&5
8646 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
8647   echo $ac_n "(cached) $ac_c" 1>&6
8648 else
8649   if test "$cross_compiling" = yes; then
8650     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8651 else
8652   cat > conftest.$ac_ext <<EOF
8653 #line 8654 "configure"
8654 #include "confdefs.h"
8655 #include <stdio.h>
8656 main()
8657 {
8658   FILE *f=fopen("conftestval", "w");
8659   if (!f) exit(1);
8660   fprintf(f, "%d\n", sizeof(long));
8661   exit(0);
8662 }
8663 EOF
8664 if { (eval echo configure:8665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8665 then
8666   ac_cv_sizeof_long=`cat conftestval`
8667 else
8668   echo "configure: failed program was:" >&5
8669   cat conftest.$ac_ext >&5
8670   rm -fr conftest*
8671   ac_cv_sizeof_long=0
8672 fi
8673 rm -fr conftest*
8674 fi
8675
8676 fi
8677 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
8678 cat >> confdefs.h <<EOF
8679 #define SIZEOF_LONG $ac_cv_sizeof_long
8680 EOF
8681
8682
8683 fi
8684
8685 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
8686 echo "configure:8687: checking for 8-bit clean memcmp" >&5
8687 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
8688   echo $ac_n "(cached) $ac_c" 1>&6
8689 else
8690   if test "$cross_compiling" = yes; then
8691   ac_cv_func_memcmp_clean=no
8692 else
8693   cat > conftest.$ac_ext <<EOF
8694 #line 8695 "configure"
8695 #include "confdefs.h"
8696
8697 main()
8698 {
8699   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
8700   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
8701 }
8702
8703 EOF
8704 if { (eval echo configure:8705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8705 then
8706   ac_cv_func_memcmp_clean=yes
8707 else
8708   echo "configure: failed program was:" >&5
8709   cat conftest.$ac_ext >&5
8710   rm -fr conftest*
8711   ac_cv_func_memcmp_clean=no
8712 fi
8713 rm -fr conftest*
8714 fi
8715
8716 fi
8717
8718 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
8719 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
8720
8721 echo $ac_n "checking for strftime""... $ac_c" 1>&6
8722 echo "configure:8723: checking for strftime" >&5
8723 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
8724   echo $ac_n "(cached) $ac_c" 1>&6
8725 else
8726   cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 /* System header to define __stub macros and hopefully few prototypes,
8730     which can conflict with char strftime(); below.  */
8731 #include <assert.h>
8732 /* Override any gcc2 internal prototype to avoid an error.  */
8733 /* We use char because int might match the return type of a gcc2
8734     builtin and then its argument prototype would still apply.  */
8735 char strftime();
8736
8737 int main() {
8738
8739 /* The GNU C library defines this for functions which it implements
8740     to always fail with ENOSYS.  Some functions are actually named
8741     something starting with __ and the normal name is an alias.  */
8742 #if defined (__stub_strftime) || defined (__stub___strftime)
8743 choke me
8744 #else
8745 strftime();
8746 #endif
8747
8748 ; return 0; }
8749 EOF
8750 if { (eval echo configure:8751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8751   rm -rf conftest*
8752   eval "ac_cv_func_strftime=yes"
8753 else
8754   echo "configure: failed program was:" >&5
8755   cat conftest.$ac_ext >&5
8756   rm -rf conftest*
8757   eval "ac_cv_func_strftime=no"
8758 fi
8759 rm -f conftest*
8760 fi
8761
8762 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
8763   echo "$ac_t""yes" 1>&6
8764   cat >> confdefs.h <<\EOF
8765 #define HAVE_STRFTIME 1
8766 EOF
8767
8768 else
8769   echo "$ac_t""no" 1>&6
8770 # strftime is in -lintl on SCO UNIX.
8771 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
8772 echo "configure:8773: checking for strftime in -lintl" >&5
8773 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
8774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8775   echo $ac_n "(cached) $ac_c" 1>&6
8776 else
8777   ac_save_LIBS="$LIBS"
8778 LIBS="-lintl  $LIBS"
8779 cat > conftest.$ac_ext <<EOF
8780 #line 8781 "configure"
8781 #include "confdefs.h"
8782 /* Override any gcc2 internal prototype to avoid an error.  */
8783 /* We use char because int might match the return type of a gcc2
8784     builtin and then its argument prototype would still apply.  */
8785 char strftime();
8786
8787 int main() {
8788 strftime()
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8792   rm -rf conftest*
8793   eval "ac_cv_lib_$ac_lib_var=yes"
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   eval "ac_cv_lib_$ac_lib_var=no"
8799 fi
8800 rm -f conftest*
8801 LIBS="$ac_save_LIBS"
8802
8803 fi
8804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8805   echo "$ac_t""yes" 1>&6
8806   cat >> confdefs.h <<\EOF
8807 #define HAVE_STRFTIME 1
8808 EOF
8809
8810 LIBS="-lintl $LIBS"
8811 else
8812   echo "$ac_t""no" 1>&6
8813 fi
8814
8815 fi
8816
8817 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
8818 echo "configure:8819: checking for vprintf" >&5
8819 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
8820   echo $ac_n "(cached) $ac_c" 1>&6
8821 else
8822   cat > conftest.$ac_ext <<EOF
8823 #line 8824 "configure"
8824 #include "confdefs.h"
8825 /* System header to define __stub macros and hopefully few prototypes,
8826     which can conflict with char vprintf(); below.  */
8827 #include <assert.h>
8828 /* Override any gcc2 internal prototype to avoid an error.  */
8829 /* We use char because int might match the return type of a gcc2
8830     builtin and then its argument prototype would still apply.  */
8831 char vprintf();
8832
8833 int main() {
8834
8835 /* The GNU C library defines this for functions which it implements
8836     to always fail with ENOSYS.  Some functions are actually named
8837     something starting with __ and the normal name is an alias.  */
8838 #if defined (__stub_vprintf) || defined (__stub___vprintf)
8839 choke me
8840 #else
8841 vprintf();
8842 #endif
8843
8844 ; return 0; }
8845 EOF
8846 if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8847   rm -rf conftest*
8848   eval "ac_cv_func_vprintf=yes"
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   eval "ac_cv_func_vprintf=no"
8854 fi
8855 rm -f conftest*
8856 fi
8857
8858 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
8859   echo "$ac_t""yes" 1>&6
8860   cat >> confdefs.h <<\EOF
8861 #define HAVE_VPRINTF 1
8862 EOF
8863
8864 else
8865   echo "$ac_t""no" 1>&6
8866 fi
8867
8868 if test "$ac_cv_func_vprintf" != yes; then
8869 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
8870 echo "configure:8871: checking for _doprnt" >&5
8871 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
8872   echo $ac_n "(cached) $ac_c" 1>&6
8873 else
8874   cat > conftest.$ac_ext <<EOF
8875 #line 8876 "configure"
8876 #include "confdefs.h"
8877 /* System header to define __stub macros and hopefully few prototypes,
8878     which can conflict with char _doprnt(); below.  */
8879 #include <assert.h>
8880 /* Override any gcc2 internal prototype to avoid an error.  */
8881 /* We use char because int might match the return type of a gcc2
8882     builtin and then its argument prototype would still apply.  */
8883 char _doprnt();
8884
8885 int main() {
8886
8887 /* The GNU C library defines this for functions which it implements
8888     to always fail with ENOSYS.  Some functions are actually named
8889     something starting with __ and the normal name is an alias.  */
8890 #if defined (__stub__doprnt) || defined (__stub____doprnt)
8891 choke me
8892 #else
8893 _doprnt();
8894 #endif
8895
8896 ; return 0; }
8897 EOF
8898 if { (eval echo configure:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8899   rm -rf conftest*
8900   eval "ac_cv_func__doprnt=yes"
8901 else
8902   echo "configure: failed program was:" >&5
8903   cat conftest.$ac_ext >&5
8904   rm -rf conftest*
8905   eval "ac_cv_func__doprnt=no"
8906 fi
8907 rm -f conftest*
8908 fi
8909
8910 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
8911   echo "$ac_t""yes" 1>&6
8912   cat >> confdefs.h <<\EOF
8913 #define HAVE_DOPRNT 1
8914 EOF
8915
8916 else
8917   echo "$ac_t""no" 1>&6
8918 fi
8919
8920 fi
8921
8922
8923 if test $ac_cv_func_vprintf = yes ; then
8924                 for ac_func in vsnprintf vsprintf
8925 do
8926 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8927 echo "configure:8928: checking for $ac_func" >&5
8928 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8929   echo $ac_n "(cached) $ac_c" 1>&6
8930 else
8931   cat > conftest.$ac_ext <<EOF
8932 #line 8933 "configure"
8933 #include "confdefs.h"
8934 /* System header to define __stub macros and hopefully few prototypes,
8935     which can conflict with char $ac_func(); below.  */
8936 #include <assert.h>
8937 /* Override any gcc2 internal prototype to avoid an error.  */
8938 /* We use char because int might match the return type of a gcc2
8939     builtin and then its argument prototype would still apply.  */
8940 char $ac_func();
8941
8942 int main() {
8943
8944 /* The GNU C library defines this for functions which it implements
8945     to always fail with ENOSYS.  Some functions are actually named
8946     something starting with __ and the normal name is an alias.  */
8947 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8948 choke me
8949 #else
8950 $ac_func();
8951 #endif
8952
8953 ; return 0; }
8954 EOF
8955 if { (eval echo configure:8956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8956   rm -rf conftest*
8957   eval "ac_cv_func_$ac_func=yes"
8958 else
8959   echo "configure: failed program was:" >&5
8960   cat conftest.$ac_ext >&5
8961   rm -rf conftest*
8962   eval "ac_cv_func_$ac_func=no"
8963 fi
8964 rm -f conftest*
8965 fi
8966
8967 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8968   echo "$ac_t""yes" 1>&6
8969     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8970   cat >> confdefs.h <<EOF
8971 #define $ac_tr_func 1
8972 EOF
8973  
8974 else
8975   echo "$ac_t""no" 1>&6
8976 fi
8977 done
8978
8979 fi
8980
8981 for ac_func in \
8982         bcopy                   \
8983         flock                   \
8984         getdtablesize   \
8985         gethostname             \
8986         getpwuid                \
8987         gettimeofday    \
8988         lockf                   \
8989         memcpy                  \
8990         memmove                 \
8991         mkstemp                 \
8992         select                  \
8993         setpwfile               \
8994         setsid                  \
8995         signal                  \
8996         sigset                  \
8997         snprintf                \
8998         socket                  \
8999         strdup                  \
9000         strerror                \
9001         strpbrk                 \
9002         strrchr                 \
9003         strsep                  \
9004         strstr                  \
9005         strtok                  \
9006         strtol                  \
9007         strtoul                 \
9008         strspn                  \
9009         sysconf                 \
9010         waitpid                 \
9011
9012 do
9013 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9014 echo "configure:9015: checking for $ac_func" >&5
9015 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018   cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 /* System header to define __stub macros and hopefully few prototypes,
9022     which can conflict with char $ac_func(); below.  */
9023 #include <assert.h>
9024 /* Override any gcc2 internal prototype to avoid an error.  */
9025 /* We use char because int might match the return type of a gcc2
9026     builtin and then its argument prototype would still apply.  */
9027 char $ac_func();
9028
9029 int main() {
9030
9031 /* The GNU C library defines this for functions which it implements
9032     to always fail with ENOSYS.  Some functions are actually named
9033     something starting with __ and the normal name is an alias.  */
9034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9035 choke me
9036 #else
9037 $ac_func();
9038 #endif
9039
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043   rm -rf conftest*
9044   eval "ac_cv_func_$ac_func=yes"
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -rf conftest*
9049   eval "ac_cv_func_$ac_func=no"
9050 fi
9051 rm -f conftest*
9052 fi
9053
9054 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9055   echo "$ac_t""yes" 1>&6
9056     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9057   cat >> confdefs.h <<EOF
9058 #define $ac_tr_func 1
9059 EOF
9060  
9061 else
9062   echo "$ac_t""no" 1>&6
9063 fi
9064 done
9065
9066
9067 # these functions are required to build a thread_safe -lldap
9068 for ac_func in \
9069         strtok_r                \
9070         ctime_r                 \
9071         gethostbyaddr_r \
9072         gethostbyname_r \
9073
9074 do
9075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9076 echo "configure:9077: checking for $ac_func" >&5
9077 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9078   echo $ac_n "(cached) $ac_c" 1>&6
9079 else
9080   cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9083 /* System header to define __stub macros and hopefully few prototypes,
9084     which can conflict with char $ac_func(); below.  */
9085 #include <assert.h>
9086 /* Override any gcc2 internal prototype to avoid an error.  */
9087 /* We use char because int might match the return type of a gcc2
9088     builtin and then its argument prototype would still apply.  */
9089 char $ac_func();
9090
9091 int main() {
9092
9093 /* The GNU C library defines this for functions which it implements
9094     to always fail with ENOSYS.  Some functions are actually named
9095     something starting with __ and the normal name is an alias.  */
9096 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9097 choke me
9098 #else
9099 $ac_func();
9100 #endif
9101
9102 ; return 0; }
9103 EOF
9104 if { (eval echo configure:9105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9105   rm -rf conftest*
9106   eval "ac_cv_func_$ac_func=yes"
9107 else
9108   echo "configure: failed program was:" >&5
9109   cat conftest.$ac_ext >&5
9110   rm -rf conftest*
9111   eval "ac_cv_func_$ac_func=no"
9112 fi
9113 rm -f conftest*
9114 fi
9115
9116 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9117   echo "$ac_t""yes" 1>&6
9118     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9119   cat >> confdefs.h <<EOF
9120 #define $ac_tr_func 1
9121 EOF
9122  
9123 else
9124   echo "$ac_t""no" 1>&6
9125 fi
9126 done
9127
9128
9129 if test "$ac_cv_func_ctime_r" = yes ; then
9130         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
9131 echo "configure:9132: checking number of arguments of ctime_r" >&5
9132 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 #include <time.h>
9139 int main() {
9140 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
9141 ; return 0; }
9142 EOF
9143 if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9144   rm -rf conftest*
9145   ol_cv_func_ctime_r_nargs=3
9146 else
9147   echo "configure: failed program was:" >&5
9148   cat conftest.$ac_ext >&5
9149   rm -rf conftest*
9150   ol_cv_func_ctime_r_nargs=0
9151 fi
9152 rm -f conftest*
9153                 if test $ol_cv_func_ctime_r_nargs = 0 ; then
9154                         cat > conftest.$ac_ext <<EOF
9155 #line 9156 "configure"
9156 #include "confdefs.h"
9157 #include <time.h>
9158 int main() {
9159 time_t ti; char *buffer;
9160                                         ctime_r(&ti,buffer);
9161 ; return 0; }
9162 EOF
9163 if { (eval echo configure:9164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9164   rm -rf conftest*
9165   ol_cv_func_ctime_r_nargs=2
9166 else
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -rf conftest*
9170   ol_cv_func_ctime_r_nargs=0
9171 fi
9172 rm -f conftest*
9173                 fi
9174         
9175 fi
9176
9177 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
9178   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
9179     cat >> confdefs.h <<EOF
9180 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
9181 EOF
9182
9183   fi
9184
9185 else
9186         ol_cv_func_ctime_r=0
9187 fi
9188
9189 if test "$ac_cv_func_strtok_r" = yes \
9190         -a "$ac_cv_func_ctime_r" = yes \
9191         -a "$ol_cv_func_ctime_r_nargs" -ge 2 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
9192         -a "$ac_cv_func_gethostbyaddr_r" = yes \
9193         -a "$ac_cv_func_gethostbyname_r" = yes \
9194         ; then
9195
9196         cat >> confdefs.h <<\EOF
9197 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
9198 EOF
9199
9200 fi
9201
9202 if test $ol_link_threads != no ; then
9203         cat >> confdefs.h <<\EOF
9204 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
9205 EOF
9206
9207 fi
9208
9209 for ac_func in getopt tempnam
9210 do
9211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9212 echo "configure:9213: checking for $ac_func" >&5
9213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219 /* System header to define __stub macros and hopefully few prototypes,
9220     which can conflict with char $ac_func(); below.  */
9221 #include <assert.h>
9222 /* Override any gcc2 internal prototype to avoid an error.  */
9223 /* We use char because int might match the return type of a gcc2
9224     builtin and then its argument prototype would still apply.  */
9225 char $ac_func();
9226
9227 int main() {
9228
9229 /* The GNU C library defines this for functions which it implements
9230     to always fail with ENOSYS.  Some functions are actually named
9231     something starting with __ and the normal name is an alias.  */
9232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9233 choke me
9234 #else
9235 $ac_func();
9236 #endif
9237
9238 ; return 0; }
9239 EOF
9240 if { (eval echo configure:9241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9241   rm -rf conftest*
9242   eval "ac_cv_func_$ac_func=yes"
9243 else
9244   echo "configure: failed program was:" >&5
9245   cat conftest.$ac_ext >&5
9246   rm -rf conftest*
9247   eval "ac_cv_func_$ac_func=no"
9248 fi
9249 rm -f conftest*
9250 fi
9251
9252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9253   echo "$ac_t""yes" 1>&6
9254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9255   cat >> confdefs.h <<EOF
9256 #define $ac_tr_func 1
9257 EOF
9258  
9259 else
9260   echo "$ac_t""no" 1>&6
9261 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
9262 fi
9263 done
9264
9265
9266
9267 # Check Configuration
9268
9269 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9270 echo "configure:9271: checking declaration of sys_errlist" >&5
9271 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
9272   echo $ac_n "(cached) $ac_c" 1>&6
9273 else
9274   
9275         cat > conftest.$ac_ext <<EOF
9276 #line 9277 "configure"
9277 #include "confdefs.h"
9278
9279 #include <stdio.h>
9280 #include <sys/types.h>
9281 #include <errno.h> 
9282 int main() {
9283 char *c = (char *) *sys_errlist
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9287   rm -rf conftest*
9288   ol_cv_dcl_sys_errlist=yes
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   ol_cv_dcl_sys_errlist=no
9294 fi
9295 rm -f conftest*
9296 fi
9297
9298 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9299
9300 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9301 if test $ol_cv_dcl_sys_errlist = no ; then
9302         cat >> confdefs.h <<\EOF
9303 #define DECL_SYS_ERRLIST 1
9304 EOF
9305
9306         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9307 echo "configure:9308: checking existence of sys_errlist" >&5
9308         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311   
9312                 cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 #include <errno.h>
9316 int main() {
9317 char *c = (char *) *sys_errlist
9318 ; return 0; }
9319 EOF
9320 if { (eval echo configure:9321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9321   rm -rf conftest*
9322   ol_cv_have_sys_errlist=yes
9323 else
9324   echo "configure: failed program was:" >&5
9325   cat conftest.$ac_ext >&5
9326   rm -rf conftest*
9327   ol_cv_have_sys_errlist=no
9328 fi
9329 rm -f conftest*
9330 fi
9331
9332         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9333 fi
9334
9335
9336
9337 if test "$ol_enable_debug" != no ; then
9338         cat >> confdefs.h <<\EOF
9339 #define LDAP_DEBUG 1
9340 EOF
9341
9342 fi
9343 if test "$ol_enable_syslog" = yes ; then
9344         cat >> confdefs.h <<\EOF
9345 #define LDAP_SYSLOG 1
9346 EOF
9347
9348 fi
9349 if test "$ol_enable_libui" = yes ; then
9350         cat >> confdefs.h <<\EOF
9351 #define LDAP_LIBUI 1
9352 EOF
9353
9354 fi
9355 if test "$ol_enable_cache" = no ; then
9356         cat >> confdefs.h <<\EOF
9357 #define LDAP_NOCACHE 1
9358 EOF
9359
9360 fi
9361 if test "$ol_enable_dns" != no ; then
9362         cat >> confdefs.h <<\EOF
9363 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
9364 EOF
9365
9366 fi
9367 if test "$ol_enable_proctitle" != no ; then
9368         cat >> confdefs.h <<\EOF
9369 #define LDAP_PROCTITLE 1
9370 EOF
9371
9372 fi
9373 if test "$ol_enable_referrals" != no ; then
9374         cat >> confdefs.h <<\EOF
9375 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
9376 EOF
9377
9378 fi
9379 if test "$ol_enable_cldap" != no ; then
9380         cat >> confdefs.h <<\EOF
9381 #define LDAP_CONNECTIONLESS 1
9382 EOF
9383
9384 fi
9385
9386 if test "$ol_enable_aclgroups" != no ; then
9387         cat >> confdefs.h <<\EOF
9388 #define SLAPD_ACLGROUPS 1
9389 EOF
9390
9391 fi
9392 if test "$ol_enable_crypt" != no ; then
9393         cat >> confdefs.h <<\EOF
9394 #define SLAPD_CRYPT 1
9395 EOF
9396
9397 fi
9398 if test "$ol_enable_cleartext" != no ; then
9399         cat >> confdefs.h <<\EOF
9400 #define SLAPD_CLEARTEXT 1
9401 EOF
9402
9403 fi
9404 if test "$ol_enable_phonetic" != no ; then
9405         cat >> confdefs.h <<\EOF
9406 #define SLAPD_PHONETIC 1
9407 EOF
9408
9409 fi
9410 if test "$ol_enable_rlookups" != no ; then
9411         cat >> confdefs.h <<\EOF
9412 #define SLAPD_RLOOKUPS 1
9413 EOF
9414
9415 fi
9416
9417 if test "$ol_link_bdb2" != no ; then
9418         cat >> confdefs.h <<\EOF
9419 #define SLAPD_BDB2 1
9420 EOF
9421
9422         BUILD_SLAPD=yes
9423         BUILD_BDB2=yes
9424 fi
9425
9426 if test "$ol_link_ldbm" != no ; then
9427         cat >> confdefs.h <<\EOF
9428 #define SLAPD_LDBM 1
9429 EOF
9430
9431         BUILD_SLAPD=yes
9432         BUILD_LDBM=yes
9433 fi
9434
9435 if test "$ol_enable_passwd" != no ; then
9436         cat >> confdefs.h <<\EOF
9437 #define SLAPD_PASSWD 1
9438 EOF
9439
9440         BUILD_SLAPD=yes
9441         BUILD_PASSWD=yes
9442 fi
9443
9444 if test "$ol_enable_perl" != no ; then
9445         cat >> confdefs.h <<\EOF
9446 #define SLAPD_PERL 1
9447 EOF
9448
9449         BUILD_SLAPD=yes
9450         BUILD_PERL=yes
9451 fi
9452
9453 if test "$ol_enable_shell" != no ; then
9454         cat >> confdefs.h <<\EOF
9455 #define SLAPD_SHELL 1
9456 EOF
9457
9458         BUILD_SLAPD=yes
9459         BUILD_SHELL=yes
9460 fi
9461
9462 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
9463         $BUILD_SLAPD = yes ; then
9464         BUILD_SLURPD=yes
9465 fi
9466
9467 if test "$ol_link_isode" != no ; then
9468         BUILD_LDAPD=yes
9469 fi
9470
9471
9472
9473
9474   
9475   
9476   
9477   
9478   
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496 trap '' 1 2 15
9497 cat > confcache <<\EOF
9498 # This file is a shell script that caches the results of configure
9499 # tests run on this system so they can be shared between configure
9500 # scripts and configure runs.  It is not useful on other systems.
9501 # If it contains results you don't want to keep, you may remove or edit it.
9502 #
9503 # By default, configure uses ./config.cache as the cache file,
9504 # creating it if it does not exist already.  You can give configure
9505 # the --cache-file=FILE option to use a different cache file; that is
9506 # what configure does when it calls configure scripts in
9507 # subdirectories, so they share the cache.
9508 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9509 # config.status only pays attention to the cache file if you give it the
9510 # --recheck option to rerun configure.
9511 #
9512 EOF
9513 # The following way of writing the cache mishandles newlines in values,
9514 # but we know of no workaround that is simple, portable, and efficient.
9515 # So, don't put newlines in cache variables' values.
9516 # Ultrix sh set writes to stderr and can't be redirected directly,
9517 # and sets the high bit in the cache file unless we assign to the vars.
9518 (set) 2>&1 |
9519   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9520   *ac_space=\ *)
9521     # `set' does not quote correctly, so add quotes (double-quote substitution
9522     # turns \\\\ into \\, and sed turns \\ into \).
9523     sed -n \
9524       -e "s/'/'\\\\''/g" \
9525       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9526     ;;
9527   *)
9528     # `set' quotes correctly as required by POSIX, so do not add quotes.
9529     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9530     ;;
9531   esac >> confcache
9532 if cmp -s $cache_file confcache; then
9533   :
9534 else
9535   if test -w $cache_file; then
9536     echo "updating cache $cache_file"
9537     cat confcache > $cache_file
9538   else
9539     echo "not updating unwritable cache $cache_file"
9540   fi
9541 fi
9542 rm -f confcache
9543
9544 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9545
9546 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9547 # Let make expand exec_prefix.
9548 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9549
9550 # Any assignment to VPATH causes Sun make to only execute
9551 # the first set of double-colon rules, so remove it if not needed.
9552 # If there is a colon in the path, we need to keep it.
9553 if test "x$srcdir" = x.; then
9554   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9555 fi
9556
9557 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9558
9559 DEFS=-DHAVE_CONFIG_H
9560
9561 # Without the "./", some shells look in PATH for config.status.
9562 : ${CONFIG_STATUS=./config.status}
9563
9564 echo creating $CONFIG_STATUS
9565 rm -f $CONFIG_STATUS
9566 cat > $CONFIG_STATUS <<EOF
9567 #! /bin/sh
9568 # Generated automatically by configure.
9569 # Run this file to recreate the current configuration.
9570 # This directory was configured as follows,
9571 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9572 #
9573 # $0 $ac_configure_args
9574 #
9575 # Compiler output produced by configure, useful for debugging
9576 # configure, is in ./config.log if it exists.
9577
9578 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9579 for ac_option
9580 do
9581   case "\$ac_option" in
9582   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9583     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9584     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9585   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9586     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9587     exit 0 ;;
9588   -help | --help | --hel | --he | --h)
9589     echo "\$ac_cs_usage"; exit 0 ;;
9590   *) echo "\$ac_cs_usage"; exit 1 ;;
9591   esac
9592 done
9593
9594 ac_given_srcdir=$srcdir
9595 ac_given_INSTALL="$INSTALL"
9596
9597 trap 'rm -fr `echo "\
9598 Makefile:build/top.mk:Makefile.in:build/dir.mk \
9599 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
9600 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
9601 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
9602 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
9603 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
9604 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
9605 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
9606 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
9607 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
9608 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
9609 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
9610 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
9611 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
9612 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
9613 include/Makefile:build/top.mk:include/Makefile.in \
9614 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
9615 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
9616 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9617 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9618 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
9619 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
9620 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
9621 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
9622 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
9623 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
9624 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
9625 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
9626 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
9627 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
9628 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
9629 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
9630 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
9631 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
9632 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
9633 tests/Makefile:build/top.mk:tests/Makefile.in \
9634  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9635 EOF
9636 cat >> $CONFIG_STATUS <<EOF
9637
9638 # Protect against being on the right side of a sed subst in config.status.
9639 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9640  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9641 $ac_vpsub
9642 $extrasub
9643 s%@SHELL@%$SHELL%g
9644 s%@CFLAGS@%$CFLAGS%g
9645 s%@CPPFLAGS@%$CPPFLAGS%g
9646 s%@CXXFLAGS@%$CXXFLAGS%g
9647 s%@FFLAGS@%$FFLAGS%g
9648 s%@DEFS@%$DEFS%g
9649 s%@LDFLAGS@%$LDFLAGS%g
9650 s%@LIBS@%$LIBS%g
9651 s%@exec_prefix@%$exec_prefix%g
9652 s%@prefix@%$prefix%g
9653 s%@program_transform_name@%$program_transform_name%g
9654 s%@bindir@%$bindir%g
9655 s%@sbindir@%$sbindir%g
9656 s%@libexecdir@%$libexecdir%g
9657 s%@datadir@%$datadir%g
9658 s%@sysconfdir@%$sysconfdir%g
9659 s%@sharedstatedir@%$sharedstatedir%g
9660 s%@localstatedir@%$localstatedir%g
9661 s%@libdir@%$libdir%g
9662 s%@includedir@%$includedir%g
9663 s%@oldincludedir@%$oldincludedir%g
9664 s%@infodir@%$infodir%g
9665 s%@mandir@%$mandir%g
9666 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9667 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9668 s%@INSTALL_DATA@%$INSTALL_DATA%g
9669 s%@PACKAGE@%$PACKAGE%g
9670 s%@VERSION@%$VERSION%g
9671 s%@ACLOCAL@%$ACLOCAL%g
9672 s%@AUTOCONF@%$AUTOCONF%g
9673 s%@AUTOMAKE@%$AUTOMAKE%g
9674 s%@AUTOHEADER@%$AUTOHEADER%g
9675 s%@MAKEINFO@%$MAKEINFO%g
9676 s%@SET_MAKE@%$SET_MAKE%g
9677 s%@top_builddir@%$top_builddir%g
9678 s%@ldap_subdir@%$ldap_subdir%g
9679 s%@host@%$host%g
9680 s%@host_alias@%$host_alias%g
9681 s%@host_cpu@%$host_cpu%g
9682 s%@host_vendor@%$host_vendor%g
9683 s%@host_os@%$host_os%g
9684 s%@RANLIB@%$RANLIB%g
9685 s%@CC@%$CC%g
9686 s%@LD@%$LD%g
9687 s%@NM@%$NM%g
9688 s%@LN_S@%$LN_S%g
9689 s%@LIBTOOL@%$LIBTOOL%g
9690 s%@AWK@%$AWK%g
9691 s%@SENDMAIL@%$SENDMAIL%g
9692 s%@EDITOR@%$EDITOR%g
9693 s%@FINGER@%$FINGER%g
9694 s%@PERLBIN@%$PERLBIN%g
9695 s%@CPP@%$CPP%g
9696 s%@EXEEXT@%$EXEEXT%g
9697 s%@OBJEXT@%$OBJEXT%g
9698 s%@PEPSY@%$PEPSY%g
9699 s%@LIBOBJS@%$LIBOBJS%g
9700 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
9701 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
9702 s%@BUILD_BDB2@%$BUILD_BDB2%g
9703 s%@BUILD_LDBM@%$BUILD_LDBM%g
9704 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
9705 s%@BUILD_PERL@%$BUILD_PERL%g
9706 s%@BUILD_SHELL@%$BUILD_SHELL%g
9707 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
9708 s%@LDAP_LIBS@%$LDAP_LIBS%g
9709 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
9710 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
9711 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
9712 s%@LDBM_LIBS@%$LDBM_LIBS%g
9713 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
9714 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
9715 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
9716 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
9717 s%@KRB_LIBS@%$KRB_LIBS%g
9718 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
9719
9720 CEOF
9721 EOF
9722
9723 cat >> $CONFIG_STATUS <<\EOF
9724
9725 # Split the substitutions into bite-sized pieces for seds with
9726 # small command number limits, like on Digital OSF/1 and HP-UX.
9727 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9728 ac_file=1 # Number of current file.
9729 ac_beg=1 # First line for current file.
9730 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9731 ac_more_lines=:
9732 ac_sed_cmds=""
9733 while $ac_more_lines; do
9734   if test $ac_beg -gt 1; then
9735     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9736   else
9737     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9738   fi
9739   if test ! -s conftest.s$ac_file; then
9740     ac_more_lines=false
9741     rm -f conftest.s$ac_file
9742   else
9743     if test -z "$ac_sed_cmds"; then
9744       ac_sed_cmds="sed -f conftest.s$ac_file"
9745     else
9746       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9747     fi
9748     ac_file=`expr $ac_file + 1`
9749     ac_beg=$ac_end
9750     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9751   fi
9752 done
9753 if test -z "$ac_sed_cmds"; then
9754   ac_sed_cmds=cat
9755 fi
9756 EOF
9757
9758 cat >> $CONFIG_STATUS <<EOF
9759
9760 CONFIG_FILES=\${CONFIG_FILES-"\
9761 Makefile:build/top.mk:Makefile.in:build/dir.mk \
9762 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
9763 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
9764 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
9765 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
9766 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
9767 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
9768 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
9769 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
9770 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
9771 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
9772 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
9773 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
9774 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
9775 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
9776 include/Makefile:build/top.mk:include/Makefile.in \
9777 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
9778 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
9779 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9780 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9781 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
9782 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
9783 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
9784 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
9785 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
9786 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
9787 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
9788 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
9789 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
9790 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
9791 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
9792 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
9793 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
9794 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
9795 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
9796 tests/Makefile:build/top.mk:tests/Makefile.in \
9797 "}
9798 EOF
9799 cat >> $CONFIG_STATUS <<\EOF
9800 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9801   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9802   case "$ac_file" in
9803   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9804        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9805   *) ac_file_in="${ac_file}.in" ;;
9806   esac
9807
9808   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9809
9810   # Remove last slash and all that follows it.  Not all systems have dirname.
9811   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9812   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9813     # The file is in a subdirectory.
9814     test ! -d "$ac_dir" && mkdir "$ac_dir"
9815     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9816     # A "../" for each directory in $ac_dir_suffix.
9817     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9818   else
9819     ac_dir_suffix= ac_dots=
9820   fi
9821
9822   case "$ac_given_srcdir" in
9823   .)  srcdir=.
9824       if test -z "$ac_dots"; then top_srcdir=.
9825       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9826   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9827   *) # Relative path.
9828     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9829     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9830   esac
9831
9832   case "$ac_given_INSTALL" in
9833   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9834   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9835   esac
9836
9837   echo creating "$ac_file"
9838   rm -f "$ac_file"
9839   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9840   case "$ac_file" in
9841   *Makefile*) ac_comsub="1i\\
9842 # $configure_input" ;;
9843   *) ac_comsub= ;;
9844   esac
9845
9846   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9847   sed -e "$ac_comsub
9848 s%@configure_input@%$configure_input%g
9849 s%@srcdir@%$srcdir%g
9850 s%@top_srcdir@%$top_srcdir%g
9851 s%@INSTALL@%$INSTALL%g
9852 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9853 fi; done
9854 rm -f conftest.s*
9855
9856 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9857 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9858 #
9859 # ac_d sets the value in "#define NAME VALUE" lines.
9860 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9861 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9862 ac_dC='\3'
9863 ac_dD='%g'
9864 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9865 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9866 ac_uB='\([      ]\)%\1#\2define\3'
9867 ac_uC=' '
9868 ac_uD='\4%g'
9869 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9870 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9871 ac_eB='$%\1#\2define\3'
9872 ac_eC=' '
9873 ac_eD='%g'
9874
9875 if test "${CONFIG_HEADERS+set}" != set; then
9876 EOF
9877 cat >> $CONFIG_STATUS <<EOF
9878   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
9879 EOF
9880 cat >> $CONFIG_STATUS <<\EOF
9881 fi
9882 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9883   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9884   case "$ac_file" in
9885   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9886        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9887   *) ac_file_in="${ac_file}.in" ;;
9888   esac
9889
9890   echo creating $ac_file
9891
9892   rm -f conftest.frag conftest.in conftest.out
9893   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9894   cat $ac_file_inputs > conftest.in
9895
9896 EOF
9897
9898 # Transform confdefs.h into a sed script conftest.vals that substitutes
9899 # the proper values into config.h.in to produce config.h.  And first:
9900 # Protect against being on the right side of a sed subst in config.status.
9901 # Protect against being in an unquoted here document in config.status.
9902 rm -f conftest.vals
9903 cat > conftest.hdr <<\EOF
9904 s/[\\&%]/\\&/g
9905 s%[\\$`]%\\&%g
9906 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9907 s%ac_d%ac_u%gp
9908 s%ac_u%ac_e%gp
9909 EOF
9910 sed -n -f conftest.hdr confdefs.h > conftest.vals
9911 rm -f conftest.hdr
9912
9913 # This sed command replaces #undef with comments.  This is necessary, for
9914 # example, in the case of _POSIX_SOURCE, which is predefined and required
9915 # on some systems where configure will not decide to define it.
9916 cat >> conftest.vals <<\EOF
9917 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9918 EOF
9919
9920 # Break up conftest.vals because some shells have a limit on
9921 # the size of here documents, and old seds have small limits too.
9922
9923 rm -f conftest.tail
9924 while :
9925 do
9926   ac_lines=`grep -c . conftest.vals`
9927   # grep -c gives empty output for an empty file on some AIX systems.
9928   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9929   # Write a limited-size here document to conftest.frag.
9930   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9931   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9932   echo 'CEOF
9933   sed -f conftest.frag conftest.in > conftest.out
9934   rm -f conftest.in
9935   mv conftest.out conftest.in
9936 ' >> $CONFIG_STATUS
9937   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9938   rm -f conftest.vals
9939   mv conftest.tail conftest.vals
9940 done
9941 rm -f conftest.vals
9942
9943 cat >> $CONFIG_STATUS <<\EOF
9944   rm -f conftest.frag conftest.h
9945   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9946   cat conftest.in >> conftest.h
9947   rm -f conftest.in
9948   if cmp -s $ac_file conftest.h 2>/dev/null; then
9949     echo "$ac_file is unchanged"
9950     rm -f conftest.h
9951   else
9952     # Remove last slash and all that follows it.  Not all systems have dirname.
9953       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9954       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9955       # The file is in a subdirectory.
9956       test ! -d "$ac_dir" && mkdir "$ac_dir"
9957     fi
9958     rm -f $ac_file
9959     mv conftest.h $ac_file
9960   fi
9961 fi; done
9962
9963 EOF
9964 cat >> $CONFIG_STATUS <<EOF
9965
9966 EOF
9967 cat >> $CONFIG_STATUS <<\EOF
9968
9969 date > stamp-h
9970 echo Please \"make depend\" to build dependencies
9971
9972 exit 0
9973 EOF
9974 chmod +x $CONFIG_STATUS
9975 rm -fr confdefs* $ac_clean_files
9976 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9977