]> git.sur5r.net Git - openldap/blob - configure
74d1b37859855cb4cb86047af402df7d2938542b
[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-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-kerberos       with Kerberos support (auto)"
37 ac_help="$ac_help
38   --with-readline  with readline support (auto)"
39 ac_help="$ac_help
40   --with-threads        use threads (auto)"
41 ac_help="$ac_help
42   --with-tls  with TLS/SSL support (auto)"
43 ac_help="$ac_help
44   --with-yielding-select        with implicitly yielding select (auto)"
45 ac_help="$ac_help
46 LDAPD Options:"
47 ac_help="$ac_help
48   --enable-ldapd        enable building ldapd (no)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-aclgroups  enable ACL group support (auto)"
55 ac_help="$ac_help
56     --enable-cleartext  enable cleartext passwords (yes)"
57 ac_help="$ac_help
58     --enable-crypt      enable crypt(3) passwords (auto)"
59 ac_help="$ac_help
60     --enable-modules    enable dynamic module support (no)"
61 ac_help="$ac_help
62     --enable-phonetic   enable phonetic/soundex (no)"
63 ac_help="$ac_help
64     --enable-rlookups   enable reverse lookups (auto)"
65 ac_help="$ac_help
66     --enable-wrappers   enable tcp wrapper support (no)"
67 ac_help="$ac_help
68     --enable-bdb2       enable bdb2 backend (no)"
69 ac_help="$ac_help
70     --enable-ldbm       enable ldbm backend (yes)"
71 ac_help="$ac_help
72       --with-ldbm-api   use LDBM API (auto)"
73 ac_help="$ac_help
74       --with-ldbm-type  use LDBM type (auto)"
75 ac_help="$ac_help
76     --enable-passwd     enable passwd backend (no)"
77 ac_help="$ac_help
78     --enable-perl       enable perl backend (no)"
79 ac_help="$ac_help
80     --enable-shell      enable shell backend (no)"
81 ac_help="$ac_help
82     --enable-tcl        enable tcl backend (no)"
83 ac_help="$ac_help
84 SLURPD Options:"
85 ac_help="$ac_help
86   --enable-slurpd       enable building slurpd (auto)"
87 ac_help="$ac_help
88 Library Generation & Linking Options"
89 ac_help="$ac_help
90   --enable-static         build static libraries [default=yes]
91   --enable-static=PKGS    only build shared libraries if the current package
92                           appears as an element in the PKGS list"
93 ac_help="$ac_help
94   --enable-shared         build shared libraries [default=yes]
95   --enable-shared=PKGS    only build shared libraries if the current package
96                           appears as an element in the PKGS list"
97 ac_help="$ac_help
98   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
99
100 # Initialize some variables set by options.
101 # The variables have the same names as the options, with
102 # dashes changed to underlines.
103 build=NONE
104 cache_file=./config.cache
105 exec_prefix=NONE
106 host=NONE
107 no_create=
108 nonopt=NONE
109 no_recursion=
110 prefix=NONE
111 program_prefix=NONE
112 program_suffix=NONE
113 program_transform_name=s,x,x,
114 silent=
115 site=
116 srcdir=
117 target=NONE
118 verbose=
119 x_includes=NONE
120 x_libraries=NONE
121 bindir='${exec_prefix}/bin'
122 sbindir='${exec_prefix}/sbin'
123 libexecdir='${exec_prefix}/libexec'
124 datadir='${prefix}/share'
125 sysconfdir='${prefix}/etc'
126 sharedstatedir='${prefix}/com'
127 localstatedir='${prefix}/var'
128 libdir='${exec_prefix}/lib'
129 includedir='${prefix}/include'
130 oldincludedir='/usr/include'
131 infodir='${prefix}/info'
132 mandir='${prefix}/man'
133
134 # Initialize some other variables.
135 subdirs=
136 MFLAGS= MAKEFLAGS=
137 SHELL=${CONFIG_SHELL-/bin/sh}
138 # Maximum number of lines to put in a shell here document.
139 ac_max_here_lines=12
140
141 ac_prev=
142 for ac_option
143 do
144
145   # If the previous option needs an argument, assign it.
146   if test -n "$ac_prev"; then
147     eval "$ac_prev=\$ac_option"
148     ac_prev=
149     continue
150   fi
151
152   case "$ac_option" in
153   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
154   *) ac_optarg= ;;
155   esac
156
157   # Accept the important Cygnus configure options, so we can diagnose typos.
158
159   case "$ac_option" in
160
161   -bindir | --bindir | --bindi | --bind | --bin | --bi)
162     ac_prev=bindir ;;
163   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
164     bindir="$ac_optarg" ;;
165
166   -build | --build | --buil | --bui | --bu)
167     ac_prev=build ;;
168   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
169     build="$ac_optarg" ;;
170
171   -cache-file | --cache-file | --cache-fil | --cache-fi \
172   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
173     ac_prev=cache_file ;;
174   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
175   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
176     cache_file="$ac_optarg" ;;
177
178   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
179     ac_prev=datadir ;;
180   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
181   | --da=*)
182     datadir="$ac_optarg" ;;
183
184   -disable-* | --disable-*)
185     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
186     # Reject names that are not valid shell variable names.
187     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
188       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
189     fi
190     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
191     eval "enable_${ac_feature}=no" ;;
192
193   -enable-* | --enable-*)
194     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
195     # Reject names that are not valid shell variable names.
196     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
197       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
198     fi
199     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200     case "$ac_option" in
201       *=*) ;;
202       *) ac_optarg=yes ;;
203     esac
204     eval "enable_${ac_feature}='$ac_optarg'" ;;
205
206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
208   | --exec | --exe | --ex)
209     ac_prev=exec_prefix ;;
210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
212   | --exec=* | --exe=* | --ex=*)
213     exec_prefix="$ac_optarg" ;;
214
215   -gas | --gas | --ga | --g)
216     # Obsolete; use --with-gas.
217     with_gas=yes ;;
218
219   -help | --help | --hel | --he)
220     # Omit some internal or obsolete options to make the list less imposing.
221     # This message is too long to be a string in the A/UX 3.1 sh.
222     cat << EOF
223 Usage: configure [options] [host]
224 Options: [defaults in brackets after descriptions]
225 Configuration:
226   --cache-file=FILE       cache test results in FILE
227   --help                  print this message
228   --no-create             do not create output files
229   --quiet, --silent       do not print \`checking...' messages
230   --version               print the version of autoconf that created configure
231 Directory and file names:
232   --prefix=PREFIX         install architecture-independent files in PREFIX
233                           [$ac_default_prefix]
234   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
235                           [same as prefix]
236   --bindir=DIR            user executables in DIR [EPREFIX/bin]
237   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
238   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
239   --datadir=DIR           read-only architecture-independent data in DIR
240                           [PREFIX/share]
241   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
242   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
243                           [PREFIX/com]
244   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
245   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
246   --includedir=DIR        C header files in DIR [PREFIX/include]
247   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
248   --infodir=DIR           info documentation in DIR [PREFIX/info]
249   --mandir=DIR            man documentation in DIR [PREFIX/man]
250   --srcdir=DIR            find the sources in DIR [configure dir or ..]
251   --program-prefix=PREFIX prepend PREFIX to installed program names
252   --program-suffix=SUFFIX append SUFFIX to installed program names
253   --program-transform-name=PROGRAM
254                           run sed PROGRAM on installed program names
255 EOF
256     cat << EOF
257 Host type:
258   --build=BUILD           configure for building on BUILD [BUILD=HOST]
259   --host=HOST             configure for HOST [guessed]
260   --target=TARGET         configure for TARGET [TARGET=HOST]
261 Features and packages:
262   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
263   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
264   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
265   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
266   --x-includes=DIR        X include files are in DIR
267   --x-libraries=DIR       X library files are in DIR
268 EOF
269     if test -n "$ac_help"; then
270       echo "--enable and --with options recognized:$ac_help"
271     fi
272     exit 0 ;;
273
274   -host | --host | --hos | --ho)
275     ac_prev=host ;;
276   -host=* | --host=* | --hos=* | --ho=*)
277     host="$ac_optarg" ;;
278
279   -includedir | --includedir | --includedi | --included | --include \
280   | --includ | --inclu | --incl | --inc)
281     ac_prev=includedir ;;
282   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283   | --includ=* | --inclu=* | --incl=* | --inc=*)
284     includedir="$ac_optarg" ;;
285
286   -infodir | --infodir | --infodi | --infod | --info | --inf)
287     ac_prev=infodir ;;
288   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289     infodir="$ac_optarg" ;;
290
291   -libdir | --libdir | --libdi | --libd)
292     ac_prev=libdir ;;
293   -libdir=* | --libdir=* | --libdi=* | --libd=*)
294     libdir="$ac_optarg" ;;
295
296   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297   | --libexe | --libex | --libe)
298     ac_prev=libexecdir ;;
299   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300   | --libexe=* | --libex=* | --libe=*)
301     libexecdir="$ac_optarg" ;;
302
303   -localstatedir | --localstatedir | --localstatedi | --localstated \
304   | --localstate | --localstat | --localsta | --localst \
305   | --locals | --local | --loca | --loc | --lo)
306     ac_prev=localstatedir ;;
307   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310     localstatedir="$ac_optarg" ;;
311
312   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313     ac_prev=mandir ;;
314   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315     mandir="$ac_optarg" ;;
316
317   -nfp | --nfp | --nf)
318     # Obsolete; use --without-fp.
319     with_fp=no ;;
320
321   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322   | --no-cr | --no-c)
323     no_create=yes ;;
324
325   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327     no_recursion=yes ;;
328
329   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331   | --oldin | --oldi | --old | --ol | --o)
332     ac_prev=oldincludedir ;;
333   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336     oldincludedir="$ac_optarg" ;;
337
338   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339     ac_prev=prefix ;;
340   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341     prefix="$ac_optarg" ;;
342
343   -program-prefix | --program-prefix | --program-prefi | --program-pref \
344   | --program-pre | --program-pr | --program-p)
345     ac_prev=program_prefix ;;
346   -program-prefix=* | --program-prefix=* | --program-prefi=* \
347   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348     program_prefix="$ac_optarg" ;;
349
350   -program-suffix | --program-suffix | --program-suffi | --program-suff \
351   | --program-suf | --program-su | --program-s)
352     ac_prev=program_suffix ;;
353   -program-suffix=* | --program-suffix=* | --program-suffi=* \
354   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355     program_suffix="$ac_optarg" ;;
356
357   -program-transform-name | --program-transform-name \
358   | --program-transform-nam | --program-transform-na \
359   | --program-transform-n | --program-transform- \
360   | --program-transform | --program-transfor \
361   | --program-transfo | --program-transf \
362   | --program-trans | --program-tran \
363   | --progr-tra | --program-tr | --program-t)
364     ac_prev=program_transform_name ;;
365   -program-transform-name=* | --program-transform-name=* \
366   | --program-transform-nam=* | --program-transform-na=* \
367   | --program-transform-n=* | --program-transform-=* \
368   | --program-transform=* | --program-transfor=* \
369   | --program-transfo=* | --program-transf=* \
370   | --program-trans=* | --program-tran=* \
371   | --progr-tra=* | --program-tr=* | --program-t=*)
372     program_transform_name="$ac_optarg" ;;
373
374   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375   | -silent | --silent | --silen | --sile | --sil)
376     silent=yes ;;
377
378   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379     ac_prev=sbindir ;;
380   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381   | --sbi=* | --sb=*)
382     sbindir="$ac_optarg" ;;
383
384   -sharedstatedir | --sharedstatedir | --sharedstatedi \
385   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386   | --sharedst | --shareds | --shared | --share | --shar \
387   | --sha | --sh)
388     ac_prev=sharedstatedir ;;
389   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392   | --sha=* | --sh=*)
393     sharedstatedir="$ac_optarg" ;;
394
395   -site | --site | --sit)
396     ac_prev=site ;;
397   -site=* | --site=* | --sit=*)
398     site="$ac_optarg" ;;
399
400   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401     ac_prev=srcdir ;;
402   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403     srcdir="$ac_optarg" ;;
404
405   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406   | --syscon | --sysco | --sysc | --sys | --sy)
407     ac_prev=sysconfdir ;;
408   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410     sysconfdir="$ac_optarg" ;;
411
412   -target | --target | --targe | --targ | --tar | --ta | --t)
413     ac_prev=target ;;
414   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415     target="$ac_optarg" ;;
416
417   -v | -verbose | --verbose | --verbos | --verbo | --verb)
418     verbose=yes ;;
419
420   -version | --version | --versio | --versi | --vers)
421     echo "configure generated by autoconf version 2.13"
422     exit 0 ;;
423
424   -with-* | --with-*)
425     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
426     # Reject names that are not valid shell variable names.
427     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
428       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
429     fi
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case "$ac_option" in
432       *=*) ;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_${ac_package}='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
439     # Reject names that are not valid shell variable names.
440     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
441       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
442     fi
443     ac_package=`echo $ac_package| sed 's/-/_/g'`
444     eval "with_${ac_package}=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes="$ac_optarg" ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries="$ac_optarg" ;;
463
464   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
465     ;;
466
467   *)
468     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
469       echo "configure: warning: $ac_option: invalid host type" 1>&2
470     fi
471     if test "x$nonopt" != xNONE; then
472       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
473     fi
474     nonopt="$ac_option"
475     ;;
476
477   esac
478 done
479
480 if test -n "$ac_prev"; then
481   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
482 fi
483
484 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
485
486 # File descriptor usage:
487 # 0 standard input
488 # 1 file creation
489 # 2 errors and warnings
490 # 3 some systems may open it to /dev/tty
491 # 4 used on the Kubota Titan
492 # 6 checking for... messages and results
493 # 5 compiler messages saved in config.log
494 if test "$silent" = yes; then
495   exec 6>/dev/null
496 else
497   exec 6>&1
498 fi
499 exec 5>./config.log
500
501 echo "\
502 This file contains any messages produced by compilers while
503 running configure, to aid debugging if configure makes a mistake.
504 " 1>&5
505
506 # Strip out --no-create and --no-recursion so they do not pile up.
507 # Also quote any args containing shell metacharacters.
508 ac_configure_args=
509 for ac_arg
510 do
511   case "$ac_arg" in
512   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
513   | --no-cr | --no-c) ;;
514   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
515   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
516   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
517   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
518   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
519   esac
520 done
521
522 # NLS nuisances.
523 # Only set these to C if already set.  These must not be set unconditionally
524 # because not all systems understand e.g. LANG=C (notably SCO).
525 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
526 # Non-C LC_CTYPE values break the ctype check.
527 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
528 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
529 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
530 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
531
532 # confdefs.h avoids OS command line length limits that DEFS can exceed.
533 rm -rf conftest* confdefs.h
534 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
535 echo > confdefs.h
536
537 # A filename unique to this package, relative to the directory that
538 # configure is in, which we can look for to find out if srcdir is correct.
539 ac_unique_file=include/ldap.h
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
558   else
559     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
560   fi
561 fi
562 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
563
564 # Prefer explicitly selected file to automatically selected ones.
565 if test -z "$CONFIG_SITE"; then
566   if test "x$prefix" != xNONE; then
567     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
568   else
569     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
570   fi
571 fi
572 for ac_site_file in $CONFIG_SITE; do
573   if test -r "$ac_site_file"; then
574     echo "loading site script $ac_site_file"
575     . "$ac_site_file"
576   fi
577 done
578
579
580 ac_ext=c
581 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
582 ac_cpp='$CPP $CPPFLAGS'
583 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
584 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
585 cross_compiling=$ac_cv_prog_cc_cross
586
587 ac_exeext=
588 ac_objext=o
589 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
590   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
591   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
592     ac_n= ac_c='
593 ' ac_t='        '
594   else
595     ac_n=-n ac_c= ac_t=
596   fi
597 else
598   ac_n= ac_c='\c' ac_t=
599 fi
600
601 ac_aux_dir=
602 for ac_dir in build $srcdir/build; do
603   if test -f $ac_dir/install-sh; then
604     ac_aux_dir=$ac_dir
605     ac_install_sh="$ac_aux_dir/install-sh -c"
606     break
607   elif test -f $ac_dir/install.sh; then
608     ac_aux_dir=$ac_dir
609     ac_install_sh="$ac_aux_dir/install.sh -c"
610     break
611   fi
612 done
613 if test -z "$ac_aux_dir"; then
614   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
615 fi
616 ac_config_guess=$ac_aux_dir/config.guess
617 ac_config_sub=$ac_aux_dir/config.sub
618 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
619 # Find a good install program.  We prefer a C program (faster),
620 # so one script is as good as another.  But avoid the broken or
621 # incompatible versions:
622 # SysV /etc/install, /usr/sbin/install
623 # SunOS /usr/etc/install
624 # IRIX /sbin/install
625 # AIX /bin/install
626 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
627 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
628 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
629 # ./install, which can be erroneously created by make from ./install.sh.
630 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
631 echo "configure:632: checking for a BSD compatible install" >&5
632 if test -z "$INSTALL"; then
633 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
634   echo $ac_n "(cached) $ac_c" 1>&6
635 else
636     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
637   for ac_dir in $PATH; do
638     # Account for people who put trailing slashes in PATH elements.
639     case "$ac_dir/" in
640     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
641     *)
642       # OSF1 and SCO ODT 3.0 have their own names for install.
643       # Don't use installbsd from OSF since it installs stuff as root
644       # by default.
645       for ac_prog in ginstall scoinst install; do
646         if test -f $ac_dir/$ac_prog; then
647           if test $ac_prog = install &&
648             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
649             # AIX install.  It has an incompatible calling convention.
650             :
651           else
652             ac_cv_path_install="$ac_dir/$ac_prog -c"
653             break 2
654           fi
655         fi
656       done
657       ;;
658     esac
659   done
660   IFS="$ac_save_IFS"
661
662 fi
663   if test "${ac_cv_path_install+set}" = set; then
664     INSTALL="$ac_cv_path_install"
665   else
666     # As a last resort, use the slow shell script.  We don't cache a
667     # path for INSTALL within a source directory, because that will
668     # break other packages using the cache if that directory is
669     # removed, or if the path is relative.
670     INSTALL="$ac_install_sh"
671   fi
672 fi
673 echo "$ac_t""$INSTALL" 1>&6
674
675 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
676 # It thinks the first close brace ends the variable substitution.
677 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
678
679 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
680
681 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
682
683 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
684 echo "configure:685: checking whether build environment is sane" >&5
685 # Just in case
686 sleep 1
687 echo timestamp > conftestfile
688 # Do `set' in a subshell so we don't clobber the current shell's
689 # arguments.  Must try -L first in case configure is actually a
690 # symlink; some systems play weird games with the mod time of symlinks
691 # (eg FreeBSD returns the mod time of the symlink's containing
692 # directory).
693 if (
694    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
695    if test "$*" = "X"; then
696       # -L didn't work.
697       set X `ls -t $srcdir/configure conftestfile`
698    fi
699    if test "$*" != "X $srcdir/configure conftestfile" \
700       && test "$*" != "X conftestfile $srcdir/configure"; then
701
702       # If neither matched, then we have a broken ls.  This can happen
703       # if, for instance, CONFIG_SHELL is bash and it inherits a
704       # broken ls alias from the environment.  This has actually
705       # happened.  Such a system could not be considered "sane".
706       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
707 alias in your environment" 1>&2; exit 1; }
708    fi
709
710    test "$2" = conftestfile
711    )
712 then
713    # Ok.
714    :
715 else
716    { echo "configure: error: newly created file is older than distributed files!
717 Check your system clock" 1>&2; exit 1; }
718 fi
719 rm -f conftest*
720 echo "$ac_t""yes" 1>&6
721 if test "$program_transform_name" = s,x,x,; then
722   program_transform_name=
723 else
724   # Double any \ or $.  echo might interpret backslashes.
725   cat <<\EOF_SED > conftestsed
726 s,\\,\\\\,g; s,\$,$$,g
727 EOF_SED
728   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
729   rm -f conftestsed
730 fi
731 test "$program_prefix" != NONE &&
732   program_transform_name="s,^,${program_prefix},; $program_transform_name"
733 # Use a double $ so make ignores it.
734 test "$program_suffix" != NONE &&
735   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
736
737 # sed with no file args requires a program.
738 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
739
740 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
741 echo "configure:742: checking whether ${MAKE-make} sets \${MAKE}" >&5
742 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
743 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746   cat > conftestmake <<\EOF
747 all:
748         @echo 'ac_maketemp="${MAKE}"'
749 EOF
750 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
751 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
752 if test -n "$ac_maketemp"; then
753   eval ac_cv_prog_make_${ac_make}_set=yes
754 else
755   eval ac_cv_prog_make_${ac_make}_set=no
756 fi
757 rm -f conftestmake
758 fi
759 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
760   echo "$ac_t""yes" 1>&6
761   SET_MAKE=
762 else
763   echo "$ac_t""no" 1>&6
764   SET_MAKE="MAKE=${MAKE-make}"
765 fi
766
767
768 PACKAGE=OpenLDAP
769
770 VERSION=2.0-devel
771
772 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
773   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
774 fi
775 cat >> confdefs.h <<EOF
776 #define PACKAGE "$PACKAGE"
777 EOF
778
779 cat >> confdefs.h <<EOF
780 #define VERSION "$VERSION"
781 EOF
782
783
784
785 missing_dir=`cd $ac_aux_dir && pwd`
786 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
787 echo "configure:788: checking for working aclocal" >&5
788 # Run test in a subshell; some versions of sh will print an error if
789 # an executable is not found, even if stderr is redirected.
790 # Redirect stdin to placate older versions of autoconf.  Sigh.
791 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
792    ACLOCAL=aclocal
793    echo "$ac_t""found" 1>&6
794 else
795    ACLOCAL="$missing_dir/missing aclocal"
796    echo "$ac_t""missing" 1>&6
797 fi
798
799 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
800 echo "configure:801: checking for working autoconf" >&5
801 # Run test in a subshell; some versions of sh will print an error if
802 # an executable is not found, even if stderr is redirected.
803 # Redirect stdin to placate older versions of autoconf.  Sigh.
804 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
805    AUTOCONF=autoconf
806    echo "$ac_t""found" 1>&6
807 else
808    AUTOCONF="$missing_dir/missing autoconf"
809    echo "$ac_t""missing" 1>&6
810 fi
811
812 echo $ac_n "checking for working automake""... $ac_c" 1>&6
813 echo "configure:814: checking for working automake" >&5
814 # Run test in a subshell; some versions of sh will print an error if
815 # an executable is not found, even if stderr is redirected.
816 # Redirect stdin to placate older versions of autoconf.  Sigh.
817 if (automake --version) < /dev/null > /dev/null 2>&1; then
818    AUTOMAKE=automake
819    echo "$ac_t""found" 1>&6
820 else
821    AUTOMAKE="$missing_dir/missing automake"
822    echo "$ac_t""missing" 1>&6
823 fi
824
825 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
826 echo "configure:827: checking for working autoheader" >&5
827 # Run test in a subshell; some versions of sh will print an error if
828 # an executable is not found, even if stderr is redirected.
829 # Redirect stdin to placate older versions of autoconf.  Sigh.
830 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
831    AUTOHEADER=autoheader
832    echo "$ac_t""found" 1>&6
833 else
834    AUTOHEADER="$missing_dir/missing autoheader"
835    echo "$ac_t""missing" 1>&6
836 fi
837
838 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
839 echo "configure:840: checking for working makeinfo" >&5
840 # Run test in a subshell; some versions of sh will print an error if
841 # an executable is not found, even if stderr is redirected.
842 # Redirect stdin to placate older versions of autoconf.  Sigh.
843 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
844    MAKEINFO=makeinfo
845    echo "$ac_t""found" 1>&6
846 else
847    MAKEINFO="$missing_dir/missing makeinfo"
848    echo "$ac_t""missing" 1>&6
849 fi
850
851
852
853
854
855
856 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
857 echo "configure:858: checking configure arguments" >&5
858
859
860 top_builddir=`pwd`
861
862 ldap_subdir="openldap"
863
864 # Check whether --with-subdir or --without-subdir was given.
865 if test "${with_subdir+set}" = set; then
866   withval="$with_subdir"
867   
868         if test "$withval" = "no"; then
869                 ldap_subdir=""
870         elif test "$withval" != "yes"; then
871                 ldap_subdir="$withval"
872         fi
873
874 fi
875
876
877 # OpenLDAP --enable-debug
878         # Check whether --enable-debug or --disable-debug was given.
879 if test "${enable_debug+set}" = set; then
880   enableval="$enable_debug"
881   
882         ol_arg=invalid
883         for ol_val in auto yes no ; do
884                 if test "$enableval" = "$ol_val" ; then
885                         ol_arg="$ol_val"
886                 fi
887         done
888         if test "$ol_arg" = "invalid" ; then
889                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
890         fi
891         ol_enable_debug="$ol_arg"
892
893 else
894         ol_enable_debug="yes"
895 fi
896 # end --enable-debug
897 # OpenLDAP --enable-syslog
898         # Check whether --enable-syslog or --disable-syslog was given.
899 if test "${enable_syslog+set}" = set; then
900   enableval="$enable_syslog"
901   
902         ol_arg=invalid
903         for ol_val in auto yes no ; do
904                 if test "$enableval" = "$ol_val" ; then
905                         ol_arg="$ol_val"
906                 fi
907         done
908         if test "$ol_arg" = "invalid" ; then
909                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
910         fi
911         ol_enable_syslog="$ol_arg"
912
913 else
914         ol_enable_syslog="auto"
915 fi
916 # end --enable-syslog
917 # OpenLDAP --enable-proctitle
918         # Check whether --enable-proctitle or --disable-proctitle was given.
919 if test "${enable_proctitle+set}" = set; then
920   enableval="$enable_proctitle"
921   
922         ol_arg=invalid
923         for ol_val in auto yes no ; do
924                 if test "$enableval" = "$ol_val" ; then
925                         ol_arg="$ol_val"
926                 fi
927         done
928         if test "$ol_arg" = "invalid" ; then
929                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
930         fi
931         ol_enable_proctitle="$ol_arg"
932
933 else
934         ol_enable_proctitle="yes"
935 fi
936 # end --enable-proctitle
937 # OpenLDAP --enable-cache
938         # Check whether --enable-cache or --disable-cache was given.
939 if test "${enable_cache+set}" = set; then
940   enableval="$enable_cache"
941   
942         ol_arg=invalid
943         for ol_val in auto yes no ; do
944                 if test "$enableval" = "$ol_val" ; then
945                         ol_arg="$ol_val"
946                 fi
947         done
948         if test "$ol_arg" = "invalid" ; then
949                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
950         fi
951         ol_enable_cache="$ol_arg"
952
953 else
954         ol_enable_cache="yes"
955 fi
956 # end --enable-cache
957 # OpenLDAP --enable-dns
958         # Check whether --enable-dns or --disable-dns was given.
959 if test "${enable_dns+set}" = set; then
960   enableval="$enable_dns"
961   
962         ol_arg=invalid
963         for ol_val in auto yes no ; do
964                 if test "$enableval" = "$ol_val" ; then
965                         ol_arg="$ol_val"
966                 fi
967         done
968         if test "$ol_arg" = "invalid" ; then
969                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
970         fi
971         ol_enable_dns="$ol_arg"
972
973 else
974         ol_enable_dns="no"
975 fi
976 # end --enable-dns
977 # OpenLDAP --enable-referrals
978         # Check whether --enable-referrals or --disable-referrals was given.
979 if test "${enable_referrals+set}" = set; then
980   enableval="$enable_referrals"
981   
982         ol_arg=invalid
983         for ol_val in auto yes no ; do
984                 if test "$enableval" = "$ol_val" ; then
985                         ol_arg="$ol_val"
986                 fi
987         done
988         if test "$ol_arg" = "invalid" ; then
989                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
990         fi
991         ol_enable_referrals="$ol_arg"
992
993 else
994         ol_enable_referrals="yes"
995 fi
996 # end --enable-referrals
997 # OpenLDAP --enable-cldap
998         # Check whether --enable-cldap or --disable-cldap was given.
999 if test "${enable_cldap+set}" = set; then
1000   enableval="$enable_cldap"
1001   
1002         ol_arg=invalid
1003         for ol_val in auto yes no ; do
1004                 if test "$enableval" = "$ol_val" ; then
1005                         ol_arg="$ol_val"
1006                 fi
1007         done
1008         if test "$ol_arg" = "invalid" ; then
1009                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1010         fi
1011         ol_enable_cldap="$ol_arg"
1012
1013 else
1014         ol_enable_cldap="no"
1015 fi
1016 # end --enable-cldap
1017 # OpenLDAP --enable-x_compile
1018         # Check whether --enable-x_compile or --disable-x_compile was given.
1019 if test "${enable_x_compile+set}" = set; then
1020   enableval="$enable_x_compile"
1021   
1022         ol_arg=invalid
1023         for ol_val in yes no ; do
1024                 if test "$enableval" = "$ol_val" ; then
1025                         ol_arg="$ol_val"
1026                 fi
1027         done
1028         if test "$ol_arg" = "invalid" ; then
1029                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1030         fi
1031         ol_enable_x_compile="$ol_arg"
1032
1033 else
1034         ol_enable_x_compile="no"
1035 fi
1036 # end --enable-x_compile
1037
1038 # OpenLDAP --enable-dmalloc
1039         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1040 if test "${enable_dmalloc+set}" = set; then
1041   enableval="$enable_dmalloc"
1042   
1043         ol_arg=invalid
1044         for ol_val in auto yes no ; do
1045                 if test "$enableval" = "$ol_val" ; then
1046                         ol_arg="$ol_val"
1047                 fi
1048         done
1049         if test "$ol_arg" = "invalid" ; then
1050                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1051         fi
1052         ol_enable_dmalloc="$ol_arg"
1053
1054 else
1055         ol_enable_dmalloc="no"
1056 fi
1057 # end --enable-dmalloc
1058
1059 # OpenLDAP --with-kerberos
1060         # Check whether --with-kerberos or --without-kerberos was given.
1061 if test "${with_kerberos+set}" = set; then
1062   withval="$with_kerberos"
1063   
1064         ol_arg=invalid
1065         for ol_val in auto k5 k4 afs yes no ; do
1066                 if test "$withval" = "$ol_val" ; then
1067                         ol_arg="$ol_val"
1068                 fi
1069         done
1070         if test "$ol_arg" = "invalid" ; then
1071                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1072         fi
1073         ol_with_kerberos="$ol_arg"
1074
1075 else
1076         ol_with_kerberos="auto"
1077 fi
1078 # end --with-kerberos
1079
1080 # OpenLDAP --with-readline
1081         # Check whether --with-readline or --without-readline was given.
1082 if test "${with_readline+set}" = set; then
1083   withval="$with_readline"
1084   
1085         ol_arg=invalid
1086         for ol_val in auto yes no  ; do
1087                 if test "$withval" = "$ol_val" ; then
1088                         ol_arg="$ol_val"
1089                 fi
1090         done
1091         if test "$ol_arg" = "invalid" ; then
1092                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1093         fi
1094         ol_with_readline="$ol_arg"
1095
1096 else
1097         ol_with_readline="auto"
1098 fi
1099 # end --with-readline
1100
1101 # OpenLDAP --with-threads
1102         # Check whether --with-threads or --without-threads was given.
1103 if test "${with_threads+set}" = set; then
1104   withval="$with_threads"
1105   
1106         ol_arg=invalid
1107         for ol_val in auto posix mach lwp yes no manual  ; do
1108                 if test "$withval" = "$ol_val" ; then
1109                         ol_arg="$ol_val"
1110                 fi
1111         done
1112         if test "$ol_arg" = "invalid" ; then
1113                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1114         fi
1115         ol_with_threads="$ol_arg"
1116
1117 else
1118         ol_with_threads="auto"
1119 fi
1120 # end --with-threads
1121
1122 # OpenLDAP --with-tls
1123         # Check whether --with-tls or --without-tls was given.
1124 if test "${with_tls+set}" = set; then
1125   withval="$with_tls"
1126   
1127         ol_arg=invalid
1128         for ol_val in auto ssleay openssl yes no  ; do
1129                 if test "$withval" = "$ol_val" ; then
1130                         ol_arg="$ol_val"
1131                 fi
1132         done
1133         if test "$ol_arg" = "invalid" ; then
1134                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1135         fi
1136         ol_with_tls="$ol_arg"
1137
1138 else
1139         ol_with_tls="auto"
1140 fi
1141 # end --with-tls
1142
1143 # OpenLDAP --with-yielding_select
1144         # Check whether --with-yielding_select or --without-yielding_select was given.
1145 if test "${with_yielding_select+set}" = set; then
1146   withval="$with_yielding_select"
1147   
1148         ol_arg=invalid
1149         for ol_val in auto yes no manual  ; do
1150                 if test "$withval" = "$ol_val" ; then
1151                         ol_arg="$ol_val"
1152                 fi
1153         done
1154         if test "$ol_arg" = "invalid" ; then
1155                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1156         fi
1157         ol_with_yielding_select="$ol_arg"
1158
1159 else
1160         ol_with_yielding_select="auto"
1161 fi
1162 # end --with-yielding_select
1163
1164
1165
1166 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1167 if test "${with_xxldapdoptions+set}" = set; then
1168   withval="$with_xxldapdoptions"
1169   :
1170 fi
1171
1172 # OpenLDAP --enable-ldapd
1173         # Check whether --enable-ldapd or --disable-ldapd was given.
1174 if test "${enable_ldapd+set}" = set; then
1175   enableval="$enable_ldapd"
1176   
1177         ol_arg=invalid
1178         for ol_val in auto yes no ; do
1179                 if test "$enableval" = "$ol_val" ; then
1180                         ol_arg="$ol_val"
1181                 fi
1182         done
1183         if test "$ol_arg" = "invalid" ; then
1184                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1185         fi
1186         ol_enable_ldapd="$ol_arg"
1187
1188 else
1189         ol_enable_ldapd="no"
1190 fi
1191 # end --enable-ldapd
1192
1193 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1194 if test "${with_xxslapdoptions+set}" = set; then
1195   withval="$with_xxslapdoptions"
1196   :
1197 fi
1198
1199 # OpenLDAP --enable-slapd
1200         # Check whether --enable-slapd or --disable-slapd was given.
1201 if test "${enable_slapd+set}" = set; then
1202   enableval="$enable_slapd"
1203   
1204         ol_arg=invalid
1205         for ol_val in auto yes no ; do
1206                 if test "$enableval" = "$ol_val" ; then
1207                         ol_arg="$ol_val"
1208                 fi
1209         done
1210         if test "$ol_arg" = "invalid" ; then
1211                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1212         fi
1213         ol_enable_slapd="$ol_arg"
1214
1215 else
1216         ol_enable_slapd="yes"
1217 fi
1218 # end --enable-slapd
1219 # OpenLDAP --enable-aclgroups
1220         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1221 if test "${enable_aclgroups+set}" = set; then
1222   enableval="$enable_aclgroups"
1223   
1224         ol_arg=invalid
1225         for ol_val in auto yes no ; do
1226                 if test "$enableval" = "$ol_val" ; then
1227                         ol_arg="$ol_val"
1228                 fi
1229         done
1230         if test "$ol_arg" = "invalid" ; then
1231                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1232         fi
1233         ol_enable_aclgroups="$ol_arg"
1234
1235 else
1236         ol_enable_aclgroups="auto"
1237 fi
1238 # end --enable-aclgroups
1239 # OpenLDAP --enable-cleartext
1240         # Check whether --enable-cleartext or --disable-cleartext was given.
1241 if test "${enable_cleartext+set}" = set; then
1242   enableval="$enable_cleartext"
1243   
1244         ol_arg=invalid
1245         for ol_val in auto yes no ; do
1246                 if test "$enableval" = "$ol_val" ; then
1247                         ol_arg="$ol_val"
1248                 fi
1249         done
1250         if test "$ol_arg" = "invalid" ; then
1251                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1252         fi
1253         ol_enable_cleartext="$ol_arg"
1254
1255 else
1256         ol_enable_cleartext="yes"
1257 fi
1258 # end --enable-cleartext
1259 # OpenLDAP --enable-crypt
1260         # Check whether --enable-crypt or --disable-crypt was given.
1261 if test "${enable_crypt+set}" = set; then
1262   enableval="$enable_crypt"
1263   
1264         ol_arg=invalid
1265         for ol_val in auto yes no ; do
1266                 if test "$enableval" = "$ol_val" ; then
1267                         ol_arg="$ol_val"
1268                 fi
1269         done
1270         if test "$ol_arg" = "invalid" ; then
1271                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1272         fi
1273         ol_enable_crypt="$ol_arg"
1274
1275 else
1276         ol_enable_crypt="auto"
1277 fi
1278 # end --enable-crypt
1279 # OpenLDAP --enable-modules
1280         # Check whether --enable-modules or --disable-modules was given.
1281 if test "${enable_modules+set}" = set; then
1282   enableval="$enable_modules"
1283   
1284         ol_arg=invalid
1285         for ol_val in auto yes no ; do
1286                 if test "$enableval" = "$ol_val" ; then
1287                         ol_arg="$ol_val"
1288                 fi
1289         done
1290         if test "$ol_arg" = "invalid" ; then
1291                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1292         fi
1293         ol_enable_modules="$ol_arg"
1294
1295 else
1296         ol_enable_modules="no"
1297 fi
1298 # end --enable-modules
1299 # OpenLDAP --enable-phonetic
1300         # Check whether --enable-phonetic or --disable-phonetic was given.
1301 if test "${enable_phonetic+set}" = set; then
1302   enableval="$enable_phonetic"
1303   
1304         ol_arg=invalid
1305         for ol_val in auto yes no ; do
1306                 if test "$enableval" = "$ol_val" ; then
1307                         ol_arg="$ol_val"
1308                 fi
1309         done
1310         if test "$ol_arg" = "invalid" ; then
1311                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1312         fi
1313         ol_enable_phonetic="$ol_arg"
1314
1315 else
1316         ol_enable_phonetic="no"
1317 fi
1318 # end --enable-phonetic
1319 # OpenLDAP --enable-rlookups
1320         # Check whether --enable-rlookups or --disable-rlookups was given.
1321 if test "${enable_rlookups+set}" = set; then
1322   enableval="$enable_rlookups"
1323   
1324         ol_arg=invalid
1325         for ol_val in auto yes no ; do
1326                 if test "$enableval" = "$ol_val" ; then
1327                         ol_arg="$ol_val"
1328                 fi
1329         done
1330         if test "$ol_arg" = "invalid" ; then
1331                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1332         fi
1333         ol_enable_rlookups="$ol_arg"
1334
1335 else
1336         ol_enable_rlookups="auto"
1337 fi
1338 # end --enable-rlookups
1339 # OpenLDAP --enable-wrappers
1340         # Check whether --enable-wrappers or --disable-wrappers was given.
1341 if test "${enable_wrappers+set}" = set; then
1342   enableval="$enable_wrappers"
1343   
1344         ol_arg=invalid
1345         for ol_val in auto yes no ; do
1346                 if test "$enableval" = "$ol_val" ; then
1347                         ol_arg="$ol_val"
1348                 fi
1349         done
1350         if test "$ol_arg" = "invalid" ; then
1351                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1352         fi
1353         ol_enable_wrappers="$ol_arg"
1354
1355 else
1356         ol_enable_wrappers="no"
1357 fi
1358 # end --enable-wrappers
1359
1360 # OpenLDAP --enable-bdb2
1361         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1362 if test "${enable_bdb2+set}" = set; then
1363   enableval="$enable_bdb2"
1364   
1365         ol_arg=invalid
1366         for ol_val in auto yes no ; do
1367                 if test "$enableval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1373         fi
1374         ol_enable_bdb2="$ol_arg"
1375
1376 else
1377         ol_enable_bdb2="no"
1378 fi
1379 # end --enable-bdb2
1380 # OpenLDAP --enable-ldbm
1381         # Check whether --enable-ldbm or --disable-ldbm was given.
1382 if test "${enable_ldbm+set}" = set; then
1383   enableval="$enable_ldbm"
1384   
1385         ol_arg=invalid
1386         for ol_val in auto yes no ; do
1387                 if test "$enableval" = "$ol_val" ; then
1388                         ol_arg="$ol_val"
1389                 fi
1390         done
1391         if test "$ol_arg" = "invalid" ; then
1392                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1393         fi
1394         ol_enable_ldbm="$ol_arg"
1395
1396 else
1397         ol_enable_ldbm="yes"
1398 fi
1399 # end --enable-ldbm
1400 # OpenLDAP --with-ldbm_api
1401         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1402 if test "${with_ldbm_api+set}" = set; then
1403   withval="$with_ldbm_api"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1407                 if test "$withval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1413         fi
1414         ol_with_ldbm_api="$ol_arg"
1415
1416 else
1417         ol_with_ldbm_api="auto"
1418 fi
1419 # end --with-ldbm_api
1420
1421 # OpenLDAP --with-ldbm_type
1422         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1423 if test "${with_ldbm_type+set}" = set; then
1424   withval="$with_ldbm_type"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto btree hash ; do
1428                 if test "$withval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1434         fi
1435         ol_with_ldbm_type="$ol_arg"
1436
1437 else
1438         ol_with_ldbm_type="auto"
1439 fi
1440 # end --with-ldbm_type
1441
1442
1443 # OpenLDAP --enable-passwd
1444         # Check whether --enable-passwd or --disable-passwd was given.
1445 if test "${enable_passwd+set}" = set; then
1446   enableval="$enable_passwd"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no ; do
1450                 if test "$enableval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1456         fi
1457         ol_enable_passwd="$ol_arg"
1458
1459 else
1460         ol_enable_passwd="no"
1461 fi
1462 # end --enable-passwd
1463 # OpenLDAP --enable-perl
1464         # Check whether --enable-perl or --disable-perl was given.
1465 if test "${enable_perl+set}" = set; then
1466   enableval="$enable_perl"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no ; do
1470                 if test "$enableval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1476         fi
1477         ol_enable_perl="$ol_arg"
1478
1479 else
1480         ol_enable_perl="no"
1481 fi
1482 # end --enable-perl
1483 # OpenLDAP --enable-shell
1484         # Check whether --enable-shell or --disable-shell was given.
1485 if test "${enable_shell+set}" = set; then
1486   enableval="$enable_shell"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto yes no ; do
1490                 if test "$enableval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1496         fi
1497         ol_enable_shell="$ol_arg"
1498
1499 else
1500         ol_enable_shell="no"
1501 fi
1502 # end --enable-shell
1503 # OpenLDAP --enable-tcl
1504         # Check whether --enable-tcl or --disable-tcl was given.
1505 if test "${enable_tcl+set}" = set; then
1506   enableval="$enable_tcl"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1516         fi
1517         ol_enable_tcl="$ol_arg"
1518
1519 else
1520         ol_enable_tcl="no"
1521 fi
1522 # end --enable-tcl
1523
1524 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1525 if test "${with_xxslurpdoptions+set}" = set; then
1526   withval="$with_xxslurpdoptions"
1527   :
1528 fi
1529
1530 # OpenLDAP --enable-slurpd
1531         # Check whether --enable-slurpd or --disable-slurpd was given.
1532 if test "${enable_slurpd+set}" = set; then
1533   enableval="$enable_slurpd"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no ; do
1537                 if test "$enableval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1543         fi
1544         ol_enable_slurpd="$ol_arg"
1545
1546 else
1547         ol_enable_slurpd="auto"
1548 fi
1549 # end --enable-slurpd
1550
1551 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1552 if test "${with_xxliboptions+set}" = set; then
1553   withval="$with_xxliboptions"
1554   :
1555 fi
1556
1557 # Check whether --enable-static or --disable-static was given.
1558 if test "${enable_static+set}" = set; then
1559   enableval="$enable_static"
1560   p=${PACKAGE-default}
1561 case "$enableval" in
1562 yes) enable_static=yes ;;
1563 no) enable_static=no ;;
1564 *)
1565   enable_static=no
1566   # Look at the argument we got.  We use all the common list separators.
1567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1568   for pkg in $enableval; do
1569     if test "X$pkg" = "X$p"; then
1570       enable_static=yes
1571     fi
1572   done
1573   IFS="$ac_save_ifs"
1574   ;;
1575 esac
1576 else
1577   enable_static=yes
1578 fi
1579
1580 # Check whether --enable-shared or --disable-shared was given.
1581 if test "${enable_shared+set}" = set; then
1582   enableval="$enable_shared"
1583   p=${PACKAGE-default}
1584 case "$enableval" in
1585 yes) enable_shared=yes ;;
1586 no) enable_shared=no ;;
1587 *)
1588   enable_shared=no
1589   # Look at the argument we got.  We use all the common list separators.
1590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1591   for pkg in $enableval; do
1592     if test "X$pkg" = "X$p"; then
1593       enable_shared=yes
1594     fi
1595   done
1596   IFS="$ac_save_ifs"
1597   ;;
1598 esac
1599 else
1600   enable_shared=yes
1601 fi
1602
1603
1604 # validate options
1605 if test $ol_enable_dns = yes ; then
1606         if test $ol_enable_referrals = no ; then
1607                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1608         fi
1609         if test $ol_enable_referrals = auto ; then
1610                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1611                 ol_enable_referrals=yes
1612         fi
1613 fi
1614
1615 if test $ol_enable_slapd = no ; then
1616                 if test $ol_enable_bdb2 = yes ; then
1617                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1618         fi
1619         if test $ol_enable_ldbm = yes ; then
1620                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1621         fi
1622         if test $ol_enable_passwd = yes ; then
1623                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1624         fi
1625         if test $ol_enable_perl = yes ; then
1626                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1627         fi
1628         if test $ol_enable_shell = yes ; then
1629                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1630         fi
1631         if test $ol_enable_tcl = yes ; then
1632                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1633         fi
1634         if test $ol_enable_aclgroups = yes ; then
1635                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1636         fi
1637         if test $ol_enable_modules = yes ; then
1638                 echo "configure: warning: slapd disabled, ignoring --enable_modules argument" 1>&2
1639         fi
1640         if test $ol_enable_wrappers = yes ; then
1641                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1642         fi
1643         if test $ol_enable_phonetic = yes ; then
1644                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1645         fi
1646         if test $ol_enable_rlookups = yes ; then
1647                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1648         fi
1649         if test $ol_with_ldbm_api != auto ; then
1650                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1651         fi
1652         if test $ol_with_ldbm_type != auto ; then
1653                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1654         fi
1655         if test $ol_enable_slurpd = yes ; then
1656                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1657         fi
1658
1659         # force settings to no
1660         ol_enable_bdb2=no
1661         ol_enable_ldbm=no
1662         ol_enable_passwd=no
1663         ol_enable_perl=no
1664         ol_enable_shell=no
1665         ol_enable_tcl=no
1666
1667         ol_enable_aclgroups=no
1668         ol_enable_modules=no
1669         ol_enable_phonetic=no
1670         ol_enable_rlookups=no
1671         ol_enable_wrappers=no
1672
1673         ol_with_ldbm_api=no
1674         ol_with_ldbm_type=no
1675
1676         ol_enable_slurpd=no
1677
1678 elif test $ol_enable_ldbm = no ; then
1679         
1680         if test $ol_with_ldbm_api != auto ; then
1681                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1682         fi
1683
1684         if test $ol_with_ldbm_type != auto ; then
1685                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1686         fi
1687
1688         if test $ol_enable_bdb2 = yes ; then
1689                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1690         fi
1691
1692         if test $ol_enable_modules != yes -a \
1693                 $ol_enable_passwd = no -a \
1694                 $ol_enable_perl = no -a \
1695                 $ol_enable_shell = no -a \
1696                 $ol_enable_tcl = no ; then
1697                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1698         fi
1699
1700         ol_with_ldbm_api=no
1701         ol_with_ldbm_type=no
1702
1703 elif test $ol_enable_bdb2 = yes ; then
1704         
1705         if test $ol_with_ldbm_api != auto -a \
1706                 $ol_with_ldbm_api != db2 ; then
1707                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1708         fi
1709
1710         ol_with_ldbm_api=db2
1711
1712 else
1713         
1714         if test $ol_enable_bdb2 != no ; then
1715                 if test $ol_with_ldbm_api != auto -a \
1716                         $ol_with_ldbm_api != db2 ; then
1717                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1718                         ol_enable_bdb2=no
1719                 fi
1720         fi
1721
1722         if test $ol_with_ldbm_api = gdbm -a \
1723                 $ol_with_ldbm_type = btree ; then
1724                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1725         fi
1726         if test $ol_with_ldbm_api = mdbm -a \
1727                 $ol_with_ldbm_type = btree ; then
1728                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1729         fi
1730         if test $ol_with_ldbm_api = ndbm -a \
1731                 $ol_with_ldbm_type = btree ; then
1732                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1733         fi
1734 fi
1735
1736 if test $ol_enable_slurpd = yes ; then
1737                 if test $ol_with_threads = no ; then
1738                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1739         fi
1740 fi
1741
1742 echo "$ac_t""done" 1>&6
1743
1744 ## Initialize vars
1745 LDAP_LIBS=
1746 LDBM_LIBS=
1747 LTHREAD_LIBS=
1748 LUTIL_LIBS=
1749
1750 LDAPD_LIBS=
1751 SLAPD_LIBS=
1752 SLURPD_LIBS=
1753
1754 BUILD_LDAPD=no
1755 BUILD_SLAPD=no
1756 BUILD_SLURPD=no
1757
1758 BUILD_BDB2=no
1759 BUILD_LDBM=no
1760 BUILD_PASSWD=no
1761 BUILD_PERL=no
1762 BUILD_SHELL=no
1763 BUILD_TCL=no
1764 BUILD_THREAD=no
1765
1766 SLAPD_MODULES_LDFLAGS=
1767 SLAPD_MODULES_CPPFLAGS=
1768
1769 SLAPD_PERL_LDFLAGS=
1770 SLAPD_PERL_CPPFLAGS=
1771
1772 KRB_LIBS=
1773 READLINE_LIBS=
1774 TERMCAP_LIBS=
1775 TLS_LIBS=
1776
1777
1778 # Find a good install program.  We prefer a C program (faster),
1779 # so one script is as good as another.  But avoid the broken or
1780 # incompatible versions:
1781 # SysV /etc/install, /usr/sbin/install
1782 # SunOS /usr/etc/install
1783 # IRIX /sbin/install
1784 # AIX /bin/install
1785 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1786 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1787 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1788 # ./install, which can be erroneously created by make from ./install.sh.
1789 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1790 echo "configure:1791: checking for a BSD compatible install" >&5
1791 if test -z "$INSTALL"; then
1792 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1793   echo $ac_n "(cached) $ac_c" 1>&6
1794 else
1795     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1796   for ac_dir in $PATH; do
1797     # Account for people who put trailing slashes in PATH elements.
1798     case "$ac_dir/" in
1799     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1800     *)
1801       # OSF1 and SCO ODT 3.0 have their own names for install.
1802       # Don't use installbsd from OSF since it installs stuff as root
1803       # by default.
1804       for ac_prog in ginstall scoinst install; do
1805         if test -f $ac_dir/$ac_prog; then
1806           if test $ac_prog = install &&
1807             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1808             # AIX install.  It has an incompatible calling convention.
1809             :
1810           else
1811             ac_cv_path_install="$ac_dir/$ac_prog -c"
1812             break 2
1813           fi
1814         fi
1815       done
1816       ;;
1817     esac
1818   done
1819   IFS="$ac_save_IFS"
1820
1821 fi
1822   if test "${ac_cv_path_install+set}" = set; then
1823     INSTALL="$ac_cv_path_install"
1824   else
1825     # As a last resort, use the slow shell script.  We don't cache a
1826     # path for INSTALL within a source directory, because that will
1827     # break other packages using the cache if that directory is
1828     # removed, or if the path is relative.
1829     INSTALL="$ac_install_sh"
1830   fi
1831 fi
1832 echo "$ac_t""$INSTALL" 1>&6
1833
1834 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1835 # It thinks the first close brace ends the variable substitution.
1836 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1837
1838 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1839
1840 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1841
1842
1843 CC=${CC-"cc"}
1844
1845
1846 # Make sure we can run config.sub.
1847 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1848 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1849 fi
1850
1851 echo $ac_n "checking host system type""... $ac_c" 1>&6
1852 echo "configure:1853: checking host system type" >&5
1853
1854 host_alias=$host
1855 case "$host_alias" in
1856 NONE)
1857   case $nonopt in
1858   NONE)
1859     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1860     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1861     fi ;;
1862   *) host_alias=$nonopt ;;
1863   esac ;;
1864 esac
1865
1866 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1867 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1868 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1869 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1870 echo "$ac_t""$host" 1>&6
1871
1872 # Extract the first word of "ranlib", so it can be a program name with args.
1873 set dummy ranlib; ac_word=$2
1874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1875 echo "configure:1876: checking for $ac_word" >&5
1876 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1877   echo $ac_n "(cached) $ac_c" 1>&6
1878 else
1879   if test -n "$RANLIB"; then
1880   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1881 else
1882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1883   ac_dummy="$PATH"
1884   for ac_dir in $ac_dummy; do
1885     test -z "$ac_dir" && ac_dir=.
1886     if test -f $ac_dir/$ac_word; then
1887       ac_cv_prog_RANLIB="ranlib"
1888       break
1889     fi
1890   done
1891   IFS="$ac_save_ifs"
1892   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1893 fi
1894 fi
1895 RANLIB="$ac_cv_prog_RANLIB"
1896 if test -n "$RANLIB"; then
1897   echo "$ac_t""$RANLIB" 1>&6
1898 else
1899   echo "$ac_t""no" 1>&6
1900 fi
1901
1902 # Extract the first word of "gcc", so it can be a program name with args.
1903 set dummy gcc; ac_word=$2
1904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1905 echo "configure:1906: checking for $ac_word" >&5
1906 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1907   echo $ac_n "(cached) $ac_c" 1>&6
1908 else
1909   if test -n "$CC"; then
1910   ac_cv_prog_CC="$CC" # Let the user override the test.
1911 else
1912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1913   ac_dummy="$PATH"
1914   for ac_dir in $ac_dummy; do
1915     test -z "$ac_dir" && ac_dir=.
1916     if test -f $ac_dir/$ac_word; then
1917       ac_cv_prog_CC="gcc"
1918       break
1919     fi
1920   done
1921   IFS="$ac_save_ifs"
1922 fi
1923 fi
1924 CC="$ac_cv_prog_CC"
1925 if test -n "$CC"; then
1926   echo "$ac_t""$CC" 1>&6
1927 else
1928   echo "$ac_t""no" 1>&6
1929 fi
1930
1931 if test -z "$CC"; then
1932   # Extract the first word of "cc", so it can be a program name with args.
1933 set dummy cc; ac_word=$2
1934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1935 echo "configure:1936: checking for $ac_word" >&5
1936 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1937   echo $ac_n "(cached) $ac_c" 1>&6
1938 else
1939   if test -n "$CC"; then
1940   ac_cv_prog_CC="$CC" # Let the user override the test.
1941 else
1942   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1943   ac_prog_rejected=no
1944   ac_dummy="$PATH"
1945   for ac_dir in $ac_dummy; do
1946     test -z "$ac_dir" && ac_dir=.
1947     if test -f $ac_dir/$ac_word; then
1948       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1949         ac_prog_rejected=yes
1950         continue
1951       fi
1952       ac_cv_prog_CC="cc"
1953       break
1954     fi
1955   done
1956   IFS="$ac_save_ifs"
1957 if test $ac_prog_rejected = yes; then
1958   # We found a bogon in the path, so make sure we never use it.
1959   set dummy $ac_cv_prog_CC
1960   shift
1961   if test $# -gt 0; then
1962     # We chose a different compiler from the bogus one.
1963     # However, it has the same basename, so the bogon will be chosen
1964     # first if we set CC to just the basename; use the full file name.
1965     shift
1966     set dummy "$ac_dir/$ac_word" "$@"
1967     shift
1968     ac_cv_prog_CC="$@"
1969   fi
1970 fi
1971 fi
1972 fi
1973 CC="$ac_cv_prog_CC"
1974 if test -n "$CC"; then
1975   echo "$ac_t""$CC" 1>&6
1976 else
1977   echo "$ac_t""no" 1>&6
1978 fi
1979
1980   if test -z "$CC"; then
1981     case "`uname -s`" in
1982     *win32* | *WIN32*)
1983       # Extract the first word of "cl", so it can be a program name with args.
1984 set dummy cl; ac_word=$2
1985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1986 echo "configure:1987: checking for $ac_word" >&5
1987 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1988   echo $ac_n "(cached) $ac_c" 1>&6
1989 else
1990   if test -n "$CC"; then
1991   ac_cv_prog_CC="$CC" # Let the user override the test.
1992 else
1993   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1994   ac_dummy="$PATH"
1995   for ac_dir in $ac_dummy; do
1996     test -z "$ac_dir" && ac_dir=.
1997     if test -f $ac_dir/$ac_word; then
1998       ac_cv_prog_CC="cl"
1999       break
2000     fi
2001   done
2002   IFS="$ac_save_ifs"
2003 fi
2004 fi
2005 CC="$ac_cv_prog_CC"
2006 if test -n "$CC"; then
2007   echo "$ac_t""$CC" 1>&6
2008 else
2009   echo "$ac_t""no" 1>&6
2010 fi
2011  ;;
2012     esac
2013   fi
2014   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2015 fi
2016
2017 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2018 echo "configure:2019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2019
2020 ac_ext=c
2021 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2022 ac_cpp='$CPP $CPPFLAGS'
2023 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2024 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2025 cross_compiling=$ac_cv_prog_cc_cross
2026
2027 cat > conftest.$ac_ext << EOF
2028
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031
2032 main(){return(0);}
2033 EOF
2034 if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2035   ac_cv_prog_cc_works=yes
2036   # If we can't run a trivial program, we are probably using a cross compiler.
2037   if (./conftest; exit) 2>/dev/null; then
2038     ac_cv_prog_cc_cross=no
2039   else
2040     ac_cv_prog_cc_cross=yes
2041   fi
2042 else
2043   echo "configure: failed program was:" >&5
2044   cat conftest.$ac_ext >&5
2045   ac_cv_prog_cc_works=no
2046 fi
2047 rm -fr conftest*
2048 ac_ext=c
2049 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2050 ac_cpp='$CPP $CPPFLAGS'
2051 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2052 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2053 cross_compiling=$ac_cv_prog_cc_cross
2054
2055 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2056 if test $ac_cv_prog_cc_works = no; then
2057   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2058 fi
2059 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2060 echo "configure:2061: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2061 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2062 cross_compiling=$ac_cv_prog_cc_cross
2063
2064 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2065 echo "configure:2066: checking whether we are using GNU C" >&5
2066 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2067   echo $ac_n "(cached) $ac_c" 1>&6
2068 else
2069   cat > conftest.c <<EOF
2070 #ifdef __GNUC__
2071   yes;
2072 #endif
2073 EOF
2074 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2075   ac_cv_prog_gcc=yes
2076 else
2077   ac_cv_prog_gcc=no
2078 fi
2079 fi
2080
2081 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2082
2083 if test $ac_cv_prog_gcc = yes; then
2084   GCC=yes
2085 else
2086   GCC=
2087 fi
2088
2089 ac_test_CFLAGS="${CFLAGS+set}"
2090 ac_save_CFLAGS="$CFLAGS"
2091 CFLAGS=
2092 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2093 echo "configure:2094: checking whether ${CC-cc} accepts -g" >&5
2094 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2095   echo $ac_n "(cached) $ac_c" 1>&6
2096 else
2097   echo 'void f(){}' > conftest.c
2098 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2099   ac_cv_prog_cc_g=yes
2100 else
2101   ac_cv_prog_cc_g=no
2102 fi
2103 rm -f conftest*
2104
2105 fi
2106
2107 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2108 if test "$ac_test_CFLAGS" = set; then
2109   CFLAGS="$ac_save_CFLAGS"
2110 elif test $ac_cv_prog_cc_g = yes; then
2111   if test "$GCC" = yes; then
2112     CFLAGS="-g -O2"
2113   else
2114     CFLAGS="-g"
2115   fi
2116 else
2117   if test "$GCC" = yes; then
2118     CFLAGS="-O2"
2119   else
2120     CFLAGS=
2121   fi
2122 fi
2123
2124 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2125 if test "${with_gnu_ld+set}" = set; then
2126   withval="$with_gnu_ld"
2127   test "$withval" = no || with_gnu_ld=yes
2128 else
2129   with_gnu_ld=no
2130 fi
2131
2132
2133 ac_prog=ld
2134 if test "$ac_cv_prog_gcc" = yes; then
2135   # Check if gcc -print-prog-name=ld gives a path.
2136   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2137 echo "configure:2138: checking for ld used by GCC" >&5
2138   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2139   case "$ac_prog" in
2140   # Accept absolute paths.
2141   /* | A-Za-z:\\*)
2142     test -z "$LD" && LD="$ac_prog"
2143     ;;
2144   "")
2145     # If it fails, then pretend we aren't using GCC.
2146     ac_prog=ld
2147     ;;
2148   *)
2149     # If it is relative, then search for the first ld in PATH.
2150     with_gnu_ld=unknown
2151     ;;
2152   esac
2153 elif test "$with_gnu_ld" = yes; then
2154   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2155 echo "configure:2156: checking for GNU ld" >&5
2156 else
2157   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2158 echo "configure:2159: checking for non-GNU ld" >&5
2159 fi
2160 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2161   echo $ac_n "(cached) $ac_c" 1>&6
2162 else
2163   if test -z "$LD"; then
2164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2165   for ac_dir in $PATH; do
2166     test -z "$ac_dir" && ac_dir=.
2167     if test -f "$ac_dir/$ac_prog"; then
2168       ac_cv_path_LD="$ac_dir/$ac_prog"
2169       # Check to see if the program is GNU ld.  I'd rather use --version,
2170       # but apparently some GNU ld's only accept -v.
2171       # Break only if it was the GNU/non-GNU ld that we prefer.
2172       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2173         test "$with_gnu_ld" != no && break
2174       else
2175         test "$with_gnu_ld" != yes && break
2176       fi
2177     fi
2178   done
2179   IFS="$ac_save_ifs"
2180 else
2181   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2182 fi
2183 fi
2184
2185 LD="$ac_cv_path_LD"
2186 if test -n "$LD"; then
2187   echo "$ac_t""$LD" 1>&6
2188 else
2189   echo "$ac_t""no" 1>&6
2190 fi
2191 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2192
2193 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2194 echo "configure:2195: checking if the linker ($LD) is GNU ld" >&5
2195 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2196   echo $ac_n "(cached) $ac_c" 1>&6
2197 else
2198   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2199 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2200   ac_cv_prog_gnu_ld=yes
2201 else
2202   ac_cv_prog_gnu_ld=no
2203 fi
2204 fi
2205
2206 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2207
2208
2209 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2210 echo "configure:2211: checking for BSD-compatible nm" >&5
2211 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2212   echo $ac_n "(cached) $ac_c" 1>&6
2213 else
2214   case "$NM" in
2215 /* | A-Za-z:\\*)
2216   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2217   ;;
2218 *)
2219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2220   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2221     test -z "$ac_dir" && ac_dir=.
2222     if test -f $ac_dir/nm; then
2223       # Check to see if the nm accepts a BSD-compat flag.
2224       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2225       #   nm: unknown option "B" ignored
2226       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2227         ac_cv_path_NM="$ac_dir/nm -B"
2228       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2229         ac_cv_path_NM="$ac_dir/nm -p"
2230       else
2231         ac_cv_path_NM="$ac_dir/nm"
2232       fi
2233       break
2234     fi
2235   done
2236   IFS="$ac_save_ifs"
2237   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2238   ;;
2239 esac
2240 fi
2241
2242 NM="$ac_cv_path_NM"
2243 echo "$ac_t""$NM" 1>&6
2244
2245
2246 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2247 echo "configure:2248: checking whether ln -s works" >&5
2248 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2249   echo $ac_n "(cached) $ac_c" 1>&6
2250 else
2251   rm -f conftestdata
2252 if ln -s X conftestdata 2>/dev/null
2253 then
2254   rm -f conftestdata
2255   ac_cv_prog_LN_S="ln -s"
2256 else
2257   ac_cv_prog_LN_S=ln
2258 fi
2259 fi
2260 LN_S="$ac_cv_prog_LN_S"
2261 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2262   echo "$ac_t""yes" 1>&6
2263 else
2264   echo "$ac_t""no" 1>&6
2265 fi
2266
2267 # Always use our own libtool.
2268 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2269
2270 # Check for any special flags to pass to ltconfig.
2271 libtool_flags=
2272 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2273 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2274 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2275 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2276 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2277
2278 # Some flags need to be propagated to the compiler or linker for good
2279 # libtool support.
2280 case "$host" in
2281 *-*-irix6*)
2282   # Find out which ABI we are using.
2283   echo '#line 2284 "configure"' > conftest.$ac_ext
2284   if { (eval echo configure:2285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2285     case "`/usr/bin/file conftest.o`" in
2286     *32-bit*)
2287       LD="${LD-ld} -32"
2288       ;;
2289     *N32*)
2290       LD="${LD-ld} -n32"
2291       ;;
2292     *64-bit*)
2293       LD="${LD-ld} -64"
2294       ;;
2295     esac
2296   fi
2297   rm -rf conftest*
2298   ;;
2299
2300 *-*-sco3.2v5*)
2301   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2302   CFLAGS="$CFLAGS -belf"
2303   ;;
2304 esac
2305
2306 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2307 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2308 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2309 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2310 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2311 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2312
2313
2314 for ac_prog in mawk gawk nawk awk
2315 do
2316 # Extract the first word of "$ac_prog", so it can be a program name with args.
2317 set dummy $ac_prog; ac_word=$2
2318 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2319 echo "configure:2320: checking for $ac_word" >&5
2320 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2321   echo $ac_n "(cached) $ac_c" 1>&6
2322 else
2323   if test -n "$AWK"; then
2324   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2325 else
2326   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2327   ac_dummy="$PATH"
2328   for ac_dir in $ac_dummy; do
2329     test -z "$ac_dir" && ac_dir=.
2330     if test -f $ac_dir/$ac_word; then
2331       ac_cv_prog_AWK="$ac_prog"
2332       break
2333     fi
2334   done
2335   IFS="$ac_save_ifs"
2336 fi
2337 fi
2338 AWK="$ac_cv_prog_AWK"
2339 if test -n "$AWK"; then
2340   echo "$ac_t""$AWK" 1>&6
2341 else
2342   echo "$ac_t""no" 1>&6
2343 fi
2344
2345 test -n "$AWK" && break
2346 done
2347
2348 # test for ln hardlink support
2349 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2350 echo "configure:2351: checking whether ln works" >&5
2351 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2352   echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354   rm -f conftest.src conftest.dst
2355 echo "conftest" > conftest.src
2356 if ln conftest.src conftest.dst 2>/dev/null
2357 then
2358   ol_cv_prog_LN_H="ln"
2359 else
2360   ol_cv_prog_LN_H="cp"
2361 fi
2362 rm -f conftest.src conftest.dst
2363
2364 fi
2365 LN_H="$ol_cv_prog_LN_H"
2366 if test "$ol_cv_prog_LN_H" = "ln"; then
2367         echo "$ac_t""yes" 1>&6
2368 else
2369         echo "$ac_t""no" 1>&6
2370 fi
2371
2372 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2373 echo "configure:2374: checking whether ln -s works" >&5
2374 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2375   echo $ac_n "(cached) $ac_c" 1>&6
2376 else
2377   rm -f conftestdata
2378 if ln -s X conftestdata 2>/dev/null
2379 then
2380   rm -f conftestdata
2381   ac_cv_prog_LN_S="ln -s"
2382 else
2383   ac_cv_prog_LN_S=ln
2384 fi
2385 fi
2386 LN_S="$ac_cv_prog_LN_S"
2387 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2388   echo "$ac_t""yes" 1>&6
2389 else
2390   echo "$ac_t""no" 1>&6
2391 fi
2392
2393
2394 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2395         LN_S="$LN_H"
2396 fi
2397
2398 # Extract the first word of "sendmail", so it can be a program name with args.
2399 set dummy sendmail; ac_word=$2
2400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2401 echo "configure:2402: checking for $ac_word" >&5
2402 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2403   echo $ac_n "(cached) $ac_c" 1>&6
2404 else
2405   case "$SENDMAIL" in
2406   /*)
2407   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2408   ;;
2409   ?:/*)                  
2410   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2411   ;;
2412   *)
2413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2414   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2415   for ac_dir in $ac_dummy; do 
2416     test -z "$ac_dir" && ac_dir=.
2417     if test -f $ac_dir/$ac_word; then
2418       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2419       break
2420     fi
2421   done
2422   IFS="$ac_save_ifs"
2423   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2424   ;;
2425 esac
2426 fi
2427 SENDMAIL="$ac_cv_path_SENDMAIL"
2428 if test -n "$SENDMAIL"; then
2429   echo "$ac_t""$SENDMAIL" 1>&6
2430 else
2431   echo "$ac_t""no" 1>&6
2432 fi
2433
2434 # Extract the first word of "vi", so it can be a program name with args.
2435 set dummy vi; ac_word=$2
2436 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2437 echo "configure:2438: checking for $ac_word" >&5
2438 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2439   echo $ac_n "(cached) $ac_c" 1>&6
2440 else
2441   case "$EDITOR" in
2442   /*)
2443   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2444   ;;
2445   ?:/*)                  
2446   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2447   ;;
2448   *)
2449   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2450   ac_dummy="$PATH:/usr/ucb"
2451   for ac_dir in $ac_dummy; do 
2452     test -z "$ac_dir" && ac_dir=.
2453     if test -f $ac_dir/$ac_word; then
2454       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2455       break
2456     fi
2457   done
2458   IFS="$ac_save_ifs"
2459   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2460   ;;
2461 esac
2462 fi
2463 EDITOR="$ac_cv_path_EDITOR"
2464 if test -n "$EDITOR"; then
2465   echo "$ac_t""$EDITOR" 1>&6
2466 else
2467   echo "$ac_t""no" 1>&6
2468 fi
2469
2470 # Extract the first word of "finger", so it can be a program name with args.
2471 set dummy finger; ac_word=$2
2472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2473 echo "configure:2474: checking for $ac_word" >&5
2474 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2475   echo $ac_n "(cached) $ac_c" 1>&6
2476 else
2477   case "$FINGER" in
2478   /*)
2479   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2480   ;;
2481   ?:/*)                  
2482   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2483   ;;
2484   *)
2485   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2486   ac_dummy="$PATH:/usr/ucb"
2487   for ac_dir in $ac_dummy; do 
2488     test -z "$ac_dir" && ac_dir=.
2489     if test -f $ac_dir/$ac_word; then
2490       ac_cv_path_FINGER="$ac_dir/$ac_word"
2491       break
2492     fi
2493   done
2494   IFS="$ac_save_ifs"
2495   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2496   ;;
2497 esac
2498 fi
2499 FINGER="$ac_cv_path_FINGER"
2500 if test -n "$FINGER"; then
2501   echo "$ac_t""$FINGER" 1>&6
2502 else
2503   echo "$ac_t""no" 1>&6
2504 fi
2505
2506
2507 ol_link_modules=no
2508 if test $ol_enable_modules != no ; then
2509         # Extract the first word of "glib-config", so it can be a program name with args.
2510 set dummy glib-config; ac_word=$2
2511 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2512 echo "configure:2513: checking for $ac_word" >&5
2513 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2514   echo $ac_n "(cached) $ac_c" 1>&6
2515 else
2516   case "$GLIBCONFIG" in
2517   /*)
2518   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2519   ;;
2520   ?:/*)                  
2521   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2522   ;;
2523   *)
2524   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2525   ac_dummy="$PATH"
2526   for ac_dir in $ac_dummy; do 
2527     test -z "$ac_dir" && ac_dir=.
2528     if test -f $ac_dir/$ac_word; then
2529       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2530       break
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 fi
2537 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2538 if test -n "$GLIBCONFIG"; then
2539   echo "$ac_t""$GLIBCONFIG" 1>&6
2540 else
2541   echo "$ac_t""no" 1>&6
2542 fi
2543
2544
2545         if test "no$GLIBCONFIG" = "no" ; then
2546                 if test $ol_enable_modules = yes ; then
2547                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2548                 fi
2549
2550         else
2551                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2552                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2553                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2554
2555                                 ol_link_modules=yes
2556         fi
2557 fi
2558
2559 ol_link_perl=no
2560 if test $ol_enable_perl != no ; then
2561         # Extract the first word of "perl", so it can be a program name with args.
2562 set dummy perl; ac_word=$2
2563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2564 echo "configure:2565: checking for $ac_word" >&5
2565 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2566   echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568   case "$PERLBIN" in
2569   /*)
2570   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2571   ;;
2572   ?:/*)                  
2573   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2574   ;;
2575   *)
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2577   ac_dummy="$PATH"
2578   for ac_dir in $ac_dummy; do 
2579     test -z "$ac_dir" && ac_dir=.
2580     if test -f $ac_dir/$ac_word; then
2581       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2582       break
2583     fi
2584   done
2585   IFS="$ac_save_ifs"
2586   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2587   ;;
2588 esac
2589 fi
2590 PERLBIN="$ac_cv_path_PERLBIN"
2591 if test -n "$PERLBIN"; then
2592   echo "$ac_t""$PERLBIN" 1>&6
2593 else
2594   echo "$ac_t""no" 1>&6
2595 fi
2596
2597
2598         if test "no$PERLBIN" = "no" ; then
2599                 if test $ol_enable_perl = yes ; then
2600                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2601                 fi
2602
2603         else
2604                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2605                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2606
2607                                 ol_link_perl=yes
2608         fi
2609 fi
2610
2611 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2612 echo "configure:2613: checking how to run the C preprocessor" >&5
2613 # On Suns, sometimes $CPP names a directory.
2614 if test -n "$CPP" && test -d "$CPP"; then
2615   CPP=
2616 fi
2617 if test -z "$CPP"; then
2618 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2619   echo $ac_n "(cached) $ac_c" 1>&6
2620 else
2621     # This must be in double quotes, not single quotes, because CPP may get
2622   # substituted into the Makefile and "${CC-cc}" will confuse make.
2623   CPP="${CC-cc} -E"
2624   # On the NeXT, cc -E runs the code through the compiler's parser,
2625   # not just through cpp.
2626   cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629 #include <assert.h>
2630 Syntax Error
2631 EOF
2632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2633 { (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2635 if test -z "$ac_err"; then
2636   :
2637 else
2638   echo "$ac_err" >&5
2639   echo "configure: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   rm -rf conftest*
2642   CPP="${CC-cc} -E -traditional-cpp"
2643   cat > conftest.$ac_ext <<EOF
2644 #line 2645 "configure"
2645 #include "confdefs.h"
2646 #include <assert.h>
2647 Syntax Error
2648 EOF
2649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2650 { (eval echo configure:2651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2652 if test -z "$ac_err"; then
2653   :
2654 else
2655   echo "$ac_err" >&5
2656   echo "configure: failed program was:" >&5
2657   cat conftest.$ac_ext >&5
2658   rm -rf conftest*
2659   CPP="${CC-cc} -nologo -E"
2660   cat > conftest.$ac_ext <<EOF
2661 #line 2662 "configure"
2662 #include "confdefs.h"
2663 #include <assert.h>
2664 Syntax Error
2665 EOF
2666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2667 { (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2669 if test -z "$ac_err"; then
2670   :
2671 else
2672   echo "$ac_err" >&5
2673   echo "configure: failed program was:" >&5
2674   cat conftest.$ac_ext >&5
2675   rm -rf conftest*
2676   CPP=/lib/cpp
2677 fi
2678 rm -f conftest*
2679 fi
2680 rm -f conftest*
2681 fi
2682 rm -f conftest*
2683   ac_cv_prog_CPP="$CPP"
2684 fi
2685   CPP="$ac_cv_prog_CPP"
2686 else
2687   ac_cv_prog_CPP="$CPP"
2688 fi
2689 echo "$ac_t""$CPP" 1>&6
2690
2691
2692 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2693         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2694
2695 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2696         echo "configure: warning: programs compiled here do run here..." 1>&2
2697         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2698
2699 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2700         echo "configure: warning: programs compiled here do not run here..." 1>&2
2701         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2702 fi
2703
2704 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2705 echo "configure:2706: checking for AIX" >&5
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 #ifdef _AIX
2710   yes
2711 #endif
2712
2713 EOF
2714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2715   egrep "yes" >/dev/null 2>&1; then
2716   rm -rf conftest*
2717   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2718 #define _ALL_SOURCE 1
2719 EOF
2720
2721 else
2722   rm -rf conftest*
2723   echo "$ac_t""no" 1>&6
2724 fi
2725 rm -f conftest*
2726
2727
2728 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2729 echo "configure:2730: checking for POSIXized ISC" >&5
2730 if test -d /etc/conf/kconfig.d &&
2731   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2732 then
2733   echo "$ac_t""yes" 1>&6
2734   ISC=yes # If later tests want to check for ISC.
2735   cat >> confdefs.h <<\EOF
2736 #define _POSIX_SOURCE 1
2737 EOF
2738
2739   if test "$GCC" = yes; then
2740     CC="$CC -posix"
2741   else
2742     CC="$CC -Xp"
2743   fi
2744 else
2745   echo "$ac_t""no" 1>&6
2746   ISC=
2747 fi
2748
2749 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2750 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2751 echo "configure:2752: checking for minix/config.h" >&5
2752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2753   echo $ac_n "(cached) $ac_c" 1>&6
2754 else
2755   cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758 #include <minix/config.h>
2759 EOF
2760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2761 { (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2763 if test -z "$ac_err"; then
2764   rm -rf conftest*
2765   eval "ac_cv_header_$ac_safe=yes"
2766 else
2767   echo "$ac_err" >&5
2768   echo "configure: failed program was:" >&5
2769   cat conftest.$ac_ext >&5
2770   rm -rf conftest*
2771   eval "ac_cv_header_$ac_safe=no"
2772 fi
2773 rm -f conftest*
2774 fi
2775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2776   echo "$ac_t""yes" 1>&6
2777   MINIX=yes
2778 else
2779   echo "$ac_t""no" 1>&6
2780 MINIX=
2781 fi
2782
2783 if test "$MINIX" = yes; then
2784   cat >> confdefs.h <<\EOF
2785 #define _POSIX_SOURCE 1
2786 EOF
2787
2788   cat >> confdefs.h <<\EOF
2789 #define _POSIX_1_SOURCE 2
2790 EOF
2791
2792   cat >> confdefs.h <<\EOF
2793 #define _MINIX 1
2794 EOF
2795
2796 fi
2797
2798
2799 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2800 echo "configure:2801: checking for be_app in -lbe" >&5
2801 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   ac_save_LIBS="$LIBS"
2806 LIBS="-lbe -lroot $LIBS"
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 /* Override any gcc2 internal prototype to avoid an error.  */
2811 /* We use char because int might match the return type of a gcc2
2812     builtin and then its argument prototype would still apply.  */
2813 char be_app();
2814
2815 int main() {
2816 be_app()
2817 ; return 0; }
2818 EOF
2819 if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2820   rm -rf conftest*
2821   eval "ac_cv_lib_$ac_lib_var=yes"
2822 else
2823   echo "configure: failed program was:" >&5
2824   cat conftest.$ac_ext >&5
2825   rm -rf conftest*
2826   eval "ac_cv_lib_$ac_lib_var=no"
2827 fi
2828 rm -f conftest*
2829 LIBS="$ac_save_LIBS"
2830
2831 fi
2832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2833   echo "$ac_t""yes" 1>&6
2834   LIBS="$LIBS -lbe -lroot"
2835 else
2836   echo "$ac_t""no" 1>&6
2837 :
2838 fi
2839
2840
2841 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2842 echo "configure:2843: checking for Cygwin environment" >&5
2843 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   cat > conftest.$ac_ext <<EOF
2847 #line 2848 "configure"
2848 #include "confdefs.h"
2849
2850 int main() {
2851
2852 #ifndef __CYGWIN__
2853 #define __CYGWIN__ __CYGWIN32__
2854 #endif
2855 return __CYGWIN__;
2856 ; return 0; }
2857 EOF
2858 if { (eval echo configure:2859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2859   rm -rf conftest*
2860   ac_cv_cygwin=yes
2861 else
2862   echo "configure: failed program was:" >&5
2863   cat conftest.$ac_ext >&5
2864   rm -rf conftest*
2865   ac_cv_cygwin=no
2866 fi
2867 rm -f conftest*
2868 rm -f conftest*
2869 fi
2870
2871 echo "$ac_t""$ac_cv_cygwin" 1>&6
2872 CYGWIN=
2873 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2874 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2875 echo "configure:2876: checking for mingw32 environment" >&5
2876 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882
2883 int main() {
2884 return __MINGW32__;
2885 ; return 0; }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2888   rm -rf conftest*
2889   ac_cv_mingw32=yes
2890 else
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -rf conftest*
2894   ac_cv_mingw32=no
2895 fi
2896 rm -f conftest*
2897 rm -f conftest*
2898 fi
2899
2900 echo "$ac_t""$ac_cv_mingw32" 1>&6
2901 MINGW32=
2902 test "$ac_cv_mingw32" = yes && MINGW32=yes
2903
2904
2905 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2906 echo "configure:2907: checking for executable suffix" >&5
2907 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2911   ac_cv_exeext=.exe
2912 else
2913   rm -f conftest*
2914   echo 'int main () { return 0; }' > conftest.$ac_ext
2915   ac_cv_exeext=
2916   if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2917     for file in conftest.*; do
2918       case $file in
2919       *.c | *.o | *.obj) ;;
2920       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2921       esac
2922     done
2923   else
2924     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2925   fi
2926   rm -f conftest*
2927   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2928 fi
2929 fi
2930
2931 EXEEXT=""
2932 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2933 echo "$ac_t""${ac_cv_exeext}" 1>&6
2934 ac_exeext=$EXEEXT
2935
2936 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2937 echo "configure:2938: checking for object suffix" >&5
2938 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   rm -f conftest*
2942 echo 'int i = 1;' > conftest.$ac_ext
2943 if { (eval echo configure:2944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2944   for ac_file in conftest.*; do
2945     case $ac_file in
2946     *.c) ;;
2947     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2948     esac
2949   done
2950 else
2951   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2952 fi
2953 rm -f conftest*
2954 fi
2955
2956 echo "$ac_t""$ac_cv_objext" 1>&6
2957 OBJEXT=$ac_cv_objext
2958 ac_objext=$ac_cv_objext
2959
2960
2961
2962
2963
2964 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2965 echo "configure:2966: checking for ${CC-cc} option to accept ANSI C" >&5
2966 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   am_cv_prog_cc_stdc=no
2970 ac_save_CC="$CC"
2971 # Don't try gcc -ansi; that turns off useful extensions and
2972 # breaks some systems' header files.
2973 # AIX                   -qlanglvl=ansi
2974 # Ultrix and OSF/1      -std1
2975 # HP-UX                 -Aa -D_HPUX_SOURCE
2976 # SVR4                  -Xc -D__EXTENSIONS__
2977 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2978 do
2979   CC="$ac_save_CC $ac_arg"
2980   cat > conftest.$ac_ext <<EOF
2981 #line 2982 "configure"
2982 #include "confdefs.h"
2983 #include <stdarg.h>
2984 #include <stdio.h>
2985 #include <sys/types.h>
2986 #include <sys/stat.h>
2987 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2988 struct buf { int x; };
2989 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2990 static char *e (p, i)
2991      char **p;
2992      int i;
2993 {
2994   return p[i];
2995 }
2996 static char *f (char * (*g) (char **, int), char **p, ...)
2997 {
2998   char *s;
2999   va_list v;
3000   va_start (v,p);
3001   s = g (p, va_arg (v,int));
3002   va_end (v);
3003   return s;
3004 }
3005 int test (int i, double x);
3006 struct s1 {int (*f) (int a);};
3007 struct s2 {int (*f) (double a);};
3008 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3009 int argc;
3010 char **argv;
3011
3012 int main() {
3013
3014 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3015
3016 ; return 0; }
3017 EOF
3018 if { (eval echo configure:3019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3019   rm -rf conftest*
3020   am_cv_prog_cc_stdc="$ac_arg"; break
3021 else
3022   echo "configure: failed program was:" >&5
3023   cat conftest.$ac_ext >&5
3024 fi
3025 rm -f conftest*
3026 done
3027 CC="$ac_save_CC"
3028
3029 fi
3030
3031 if test -z "$am_cv_prog_cc_stdc"; then
3032   echo "$ac_t""none needed" 1>&6
3033 else
3034   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3035 fi
3036 case "x$am_cv_prog_cc_stdc" in
3037   x|xno) ;;
3038   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3039 esac
3040
3041 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3042         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
3043 fi
3044
3045
3046
3047
3048 echo $ac_n "checking for socket""... $ac_c" 1>&6
3049 echo "configure:3050: checking for socket" >&5
3050 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3051   echo $ac_n "(cached) $ac_c" 1>&6
3052 else
3053   cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 /* System header to define __stub macros and hopefully few prototypes,
3057     which can conflict with char socket(); below.  */
3058 #include <assert.h>
3059 /* Override any gcc2 internal prototype to avoid an error.  */
3060 /* We use char because int might match the return type of a gcc2
3061     builtin and then its argument prototype would still apply.  */
3062 char socket();
3063
3064 int main() {
3065
3066 /* The GNU C library defines this for functions which it implements
3067     to always fail with ENOSYS.  Some functions are actually named
3068     something starting with __ and the normal name is an alias.  */
3069 #if defined (__stub_socket) || defined (__stub___socket)
3070 choke me
3071 #else
3072 socket();
3073 #endif
3074
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3078   rm -rf conftest*
3079   eval "ac_cv_func_socket=yes"
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   eval "ac_cv_func_socket=no"
3085 fi
3086 rm -f conftest*
3087 fi
3088
3089 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3090   echo "$ac_t""yes" 1>&6
3091   :
3092 else
3093   echo "$ac_t""no" 1>&6
3094         
3095         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3096 echo "configure:3097: checking for main in -lsocket" >&5
3097 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3098 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   ac_save_LIBS="$LIBS"
3102 LIBS="-lsocket  $LIBS"
3103 cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3106
3107 int main() {
3108 main()
3109 ; return 0; }
3110 EOF
3111 if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3112   rm -rf conftest*
3113   eval "ac_cv_lib_$ac_lib_var=yes"
3114 else
3115   echo "configure: failed program was:" >&5
3116   cat conftest.$ac_ext >&5
3117   rm -rf conftest*
3118   eval "ac_cv_lib_$ac_lib_var=no"
3119 fi
3120 rm -f conftest*
3121 LIBS="$ac_save_LIBS"
3122
3123 fi
3124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3125   echo "$ac_t""yes" 1>&6
3126     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3127     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3128   cat >> confdefs.h <<EOF
3129 #define $ac_tr_lib 1
3130 EOF
3131
3132   LIBS="-lsocket $LIBS"
3133
3134 else
3135   echo "$ac_t""no" 1>&6
3136 fi
3137
3138         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3139 echo "configure:3140: checking for main in -lnet" >&5
3140 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3142   echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144   ac_save_LIBS="$LIBS"
3145 LIBS="-lnet  $LIBS"
3146 cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149
3150 int main() {
3151 main()
3152 ; return 0; }
3153 EOF
3154 if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3155   rm -rf conftest*
3156   eval "ac_cv_lib_$ac_lib_var=yes"
3157 else
3158   echo "configure: failed program was:" >&5
3159   cat conftest.$ac_ext >&5
3160   rm -rf conftest*
3161   eval "ac_cv_lib_$ac_lib_var=no"
3162 fi
3163 rm -f conftest*
3164 LIBS="$ac_save_LIBS"
3165
3166 fi
3167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3168   echo "$ac_t""yes" 1>&6
3169     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3171   cat >> confdefs.h <<EOF
3172 #define $ac_tr_lib 1
3173 EOF
3174
3175   LIBS="-lnet $LIBS"
3176
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180
3181         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3182 echo "configure:3183: checking for main in -lnsl_s" >&5
3183 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3184 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   ac_save_LIBS="$LIBS"
3188 LIBS="-lnsl_s  $LIBS"
3189 cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192
3193 int main() {
3194 main()
3195 ; return 0; }
3196 EOF
3197 if { (eval echo configure:3198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3198   rm -rf conftest*
3199   eval "ac_cv_lib_$ac_lib_var=yes"
3200 else
3201   echo "configure: failed program was:" >&5
3202   cat conftest.$ac_ext >&5
3203   rm -rf conftest*
3204   eval "ac_cv_lib_$ac_lib_var=no"
3205 fi
3206 rm -f conftest*
3207 LIBS="$ac_save_LIBS"
3208
3209 fi
3210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3211   echo "$ac_t""yes" 1>&6
3212     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3213     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3214   cat >> confdefs.h <<EOF
3215 #define $ac_tr_lib 1
3216 EOF
3217
3218   LIBS="-lnsl_s $LIBS"
3219
3220 else
3221   echo "$ac_t""no" 1>&6
3222 fi
3223
3224         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3225 echo "configure:3226: checking for main in -lnsl" >&5
3226 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   ac_save_LIBS="$LIBS"
3231 LIBS="-lnsl  $LIBS"
3232 cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235
3236 int main() {
3237 main()
3238 ; return 0; }
3239 EOF
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3241   rm -rf conftest*
3242   eval "ac_cv_lib_$ac_lib_var=yes"
3243 else
3244   echo "configure: failed program was:" >&5
3245   cat conftest.$ac_ext >&5
3246   rm -rf conftest*
3247   eval "ac_cv_lib_$ac_lib_var=no"
3248 fi
3249 rm -f conftest*
3250 LIBS="$ac_save_LIBS"
3251
3252 fi
3253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3254   echo "$ac_t""yes" 1>&6
3255     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3256     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3257   cat >> confdefs.h <<EOF
3258 #define $ac_tr_lib 1
3259 EOF
3260
3261   LIBS="-lnsl $LIBS"
3262
3263 else
3264   echo "$ac_t""no" 1>&6
3265 fi
3266
3267         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3268 echo "configure:3269: checking for socket in -linet" >&5
3269 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273   ac_save_LIBS="$LIBS"
3274 LIBS="-linet  $LIBS"
3275 cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3278 /* Override any gcc2 internal prototype to avoid an error.  */
3279 /* We use char because int might match the return type of a gcc2
3280     builtin and then its argument prototype would still apply.  */
3281 char socket();
3282
3283 int main() {
3284 socket()
3285 ; return 0; }
3286 EOF
3287 if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3288   rm -rf conftest*
3289   eval "ac_cv_lib_$ac_lib_var=yes"
3290 else
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -rf conftest*
3294   eval "ac_cv_lib_$ac_lib_var=no"
3295 fi
3296 rm -f conftest*
3297 LIBS="$ac_save_LIBS"
3298
3299 fi
3300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3301   echo "$ac_t""yes" 1>&6
3302     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3304   cat >> confdefs.h <<EOF
3305 #define $ac_tr_lib 1
3306 EOF
3307
3308   LIBS="-linet $LIBS"
3309
3310 else
3311   echo "$ac_t""no" 1>&6
3312 fi
3313
3314         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3315 echo "configure:3316: checking for main in -lgen" >&5
3316 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3317 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3318   echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320   ac_save_LIBS="$LIBS"
3321 LIBS="-lgen  $LIBS"
3322 cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3325
3326 int main() {
3327 main()
3328 ; return 0; }
3329 EOF
3330 if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3331   rm -rf conftest*
3332   eval "ac_cv_lib_$ac_lib_var=yes"
3333 else
3334   echo "configure: failed program was:" >&5
3335   cat conftest.$ac_ext >&5
3336   rm -rf conftest*
3337   eval "ac_cv_lib_$ac_lib_var=no"
3338 fi
3339 rm -f conftest*
3340 LIBS="$ac_save_LIBS"
3341
3342 fi
3343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3344   echo "$ac_t""yes" 1>&6
3345     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3347   cat >> confdefs.h <<EOF
3348 #define $ac_tr_lib 1
3349 EOF
3350
3351   LIBS="-lgen $LIBS"
3352
3353 else
3354   echo "$ac_t""no" 1>&6
3355 fi
3356
3357
3358 fi
3359
3360
3361 for ac_func in res_search
3362 do
3363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3364 echo "configure:3365: checking for $ac_func" >&5
3365 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   cat > conftest.$ac_ext <<EOF
3369 #line 3370 "configure"
3370 #include "confdefs.h"
3371 /* System header to define __stub macros and hopefully few prototypes,
3372     which can conflict with char $ac_func(); below.  */
3373 #include <assert.h>
3374 /* Override any gcc2 internal prototype to avoid an error.  */
3375 /* We use char because int might match the return type of a gcc2
3376     builtin and then its argument prototype would still apply.  */
3377 char $ac_func();
3378
3379 int main() {
3380
3381 /* The GNU C library defines this for functions which it implements
3382     to always fail with ENOSYS.  Some functions are actually named
3383     something starting with __ and the normal name is an alias.  */
3384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3385 choke me
3386 #else
3387 $ac_func();
3388 #endif
3389
3390 ; return 0; }
3391 EOF
3392 if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3393   rm -rf conftest*
3394   eval "ac_cv_func_$ac_func=yes"
3395 else
3396   echo "configure: failed program was:" >&5
3397   cat conftest.$ac_ext >&5
3398   rm -rf conftest*
3399   eval "ac_cv_func_$ac_func=no"
3400 fi
3401 rm -f conftest*
3402 fi
3403
3404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3405   echo "$ac_t""yes" 1>&6
3406     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3407   cat >> confdefs.h <<EOF
3408 #define $ac_tr_func 1
3409 EOF
3410  
3411 else
3412   echo "$ac_t""no" 1>&6
3413 fi
3414 done
3415
3416 if test $ac_cv_func_res_search = "no" ; then 
3417         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3418 echo "configure:3419: checking for res_search in -lbind" >&5
3419 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3421   echo $ac_n "(cached) $ac_c" 1>&6
3422 else
3423   ac_save_LIBS="$LIBS"
3424 LIBS="-lbind  $LIBS"
3425 cat > conftest.$ac_ext <<EOF
3426 #line 3427 "configure"
3427 #include "confdefs.h"
3428 /* Override any gcc2 internal prototype to avoid an error.  */
3429 /* We use char because int might match the return type of a gcc2
3430     builtin and then its argument prototype would still apply.  */
3431 char res_search();
3432
3433 int main() {
3434 res_search()
3435 ; return 0; }
3436 EOF
3437 if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3438   rm -rf conftest*
3439   eval "ac_cv_lib_$ac_lib_var=yes"
3440 else
3441   echo "configure: failed program was:" >&5
3442   cat conftest.$ac_ext >&5
3443   rm -rf conftest*
3444   eval "ac_cv_lib_$ac_lib_var=no"
3445 fi
3446 rm -f conftest*
3447 LIBS="$ac_save_LIBS"
3448
3449 fi
3450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3451   echo "$ac_t""yes" 1>&6
3452     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3454   cat >> confdefs.h <<EOF
3455 #define $ac_tr_lib 1
3456 EOF
3457
3458   LIBS="-lbind $LIBS"
3459
3460 else
3461   echo "$ac_t""no" 1>&6
3462 fi
3463
3464         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3465                 cat >> confdefs.h <<\EOF
3466 #define HAVE_RES_SEARCH 1
3467 EOF
3468
3469         else
3470                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3471 echo "configure:3472: checking for res_search in -lresolv" >&5
3472 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   ac_save_LIBS="$LIBS"
3477 LIBS="-lresolv  $LIBS"
3478 cat > conftest.$ac_ext <<EOF
3479 #line 3480 "configure"
3480 #include "confdefs.h"
3481 /* Override any gcc2 internal prototype to avoid an error.  */
3482 /* We use char because int might match the return type of a gcc2
3483     builtin and then its argument prototype would still apply.  */
3484 char res_search();
3485
3486 int main() {
3487 res_search()
3488 ; return 0; }
3489 EOF
3490 if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3491   rm -rf conftest*
3492   eval "ac_cv_lib_$ac_lib_var=yes"
3493 else
3494   echo "configure: failed program was:" >&5
3495   cat conftest.$ac_ext >&5
3496   rm -rf conftest*
3497   eval "ac_cv_lib_$ac_lib_var=no"
3498 fi
3499 rm -f conftest*
3500 LIBS="$ac_save_LIBS"
3501
3502 fi
3503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3504   echo "$ac_t""yes" 1>&6
3505     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3506     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3507   cat >> confdefs.h <<EOF
3508 #define $ac_tr_lib 1
3509 EOF
3510
3511   LIBS="-lresolv $LIBS"
3512
3513 else
3514   echo "$ac_t""no" 1>&6
3515 fi
3516
3517                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3518                         cat >> confdefs.h <<\EOF
3519 #define HAVE_RES_SEARCH 1
3520 EOF
3521
3522                 fi
3523         fi
3524 fi
3525
3526 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3527 echo "configure:3528: checking for sigset in -lV3" >&5
3528 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   ac_save_LIBS="$LIBS"
3533 LIBS="-lV3  $LIBS"
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 /* Override any gcc2 internal prototype to avoid an error.  */
3538 /* We use char because int might match the return type of a gcc2
3539     builtin and then its argument prototype would still apply.  */
3540 char sigset();
3541
3542 int main() {
3543 sigset()
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3547   rm -rf conftest*
3548   eval "ac_cv_lib_$ac_lib_var=yes"
3549 else
3550   echo "configure: failed program was:" >&5
3551   cat conftest.$ac_ext >&5
3552   rm -rf conftest*
3553   eval "ac_cv_lib_$ac_lib_var=no"
3554 fi
3555 rm -f conftest*
3556 LIBS="$ac_save_LIBS"
3557
3558 fi
3559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3560   echo "$ac_t""yes" 1>&6
3561     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3562     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3563   cat >> confdefs.h <<EOF
3564 #define $ac_tr_lib 1
3565 EOF
3566
3567   LIBS="-lV3 $LIBS"
3568
3569 else
3570   echo "$ac_t""no" 1>&6
3571 fi
3572
3573
3574 echo $ac_n "checking for select""... $ac_c" 1>&6
3575 echo "configure:3576: checking for select" >&5
3576 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3577   echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579   cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 /* System header to define __stub macros and hopefully few prototypes,
3583     which can conflict with char select(); below.  */
3584 #include <assert.h>
3585 /* Override any gcc2 internal prototype to avoid an error.  */
3586 /* We use char because int might match the return type of a gcc2
3587     builtin and then its argument prototype would still apply.  */
3588 char select();
3589
3590 int main() {
3591
3592 /* The GNU C library defines this for functions which it implements
3593     to always fail with ENOSYS.  Some functions are actually named
3594     something starting with __ and the normal name is an alias.  */
3595 #if defined (__stub_select) || defined (__stub___select)
3596 choke me
3597 #else
3598 select();
3599 #endif
3600
3601 ; return 0; }
3602 EOF
3603 if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3604   rm -rf conftest*
3605   eval "ac_cv_func_select=yes"
3606 else
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   eval "ac_cv_func_select=no"
3611 fi
3612 rm -f conftest*
3613 fi
3614
3615 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3616   echo "$ac_t""yes" 1>&6
3617   :
3618 else
3619   echo "$ac_t""no" 1>&6
3620 { echo "configure: error: select() required." 1>&2; exit 1; }
3621 fi
3622
3623
3624 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3625 echo "configure:3626: checking types of arguments for select()" >&5
3626  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3633   echo $ac_n "(cached) $ac_c" 1>&6
3634 else
3635      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3636      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3637       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3638        cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #ifdef HAVE_SYS_TYPES_H
3642 #include <sys/types.h>
3643 #endif
3644 #ifdef HAVE_SYS_TIME_H
3645 #include <sys/time.h>
3646 #endif
3647 #ifdef HAVE_SYS_SELECT_H
3648 #include <sys/select.h>
3649 #endif
3650 #ifdef HAVE_SYS_SOCKET_H
3651 #include <sys/socket.h>
3652 #endif
3653 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
3654 int main() {
3655
3656 ; return 0; }
3657 EOF
3658 if { (eval echo configure:3659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3659   rm -rf conftest*
3660           ac_not_found=no ; break 3
3661 else
3662   echo "configure: failed program was:" >&5
3663   cat conftest.$ac_ext >&5
3664   rm -rf conftest*
3665   ac_not_found=yes
3666 fi
3667 rm -f conftest*
3668       done
3669      done
3670     done
3671    
3672 fi
3673   
3674 fi
3675  
3676 fi
3677  if test "$ac_not_found" = yes; then
3678   ac_cv_func_select_arg1=int 
3679   ac_cv_func_select_arg234='int *' 
3680   ac_cv_func_select_arg5='struct timeval *'
3681  fi
3682  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3683  cat >> confdefs.h <<EOF
3684 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3685 EOF
3686
3687  cat >> confdefs.h <<EOF
3688 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3689 EOF
3690
3691  cat >> confdefs.h <<EOF
3692 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3693 EOF
3694
3695
3696
3697 # ISODE tests
3698 ol_link_isode=no
3699 if test $ol_enable_ldapd != no ; then
3700                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3701 echo "configure:3702: checking for main in -lxtpp" >&5
3702 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3703 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   ac_save_LIBS="$LIBS"
3707 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711
3712 int main() {
3713 main()
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3717   rm -rf conftest*
3718   eval "ac_cv_lib_$ac_lib_var=yes"
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   eval "ac_cv_lib_$ac_lib_var=no"
3724 fi
3725 rm -f conftest*
3726 LIBS="$ac_save_LIBS"
3727
3728 fi
3729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3730   echo "$ac_t""yes" 1>&6
3731   
3732                 ol_link_isode=yes
3733                 cat >> confdefs.h <<\EOF
3734 #define HAVE_XTPP 1
3735 EOF
3736
3737                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3738                 
3739 else
3740   echo "$ac_t""no" 1>&6
3741 :
3742 fi
3743
3744         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3745 echo "configure:3746: checking for main in -ldsap" >&5
3746 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3747 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3748   echo $ac_n "(cached) $ac_c" 1>&6
3749 else
3750   ac_save_LIBS="$LIBS"
3751 LIBS="-ldsap -lisode $LIBS"
3752 cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755
3756 int main() {
3757 main()
3758 ; return 0; }
3759 EOF
3760 if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3761   rm -rf conftest*
3762   eval "ac_cv_lib_$ac_lib_var=yes"
3763 else
3764   echo "configure: failed program was:" >&5
3765   cat conftest.$ac_ext >&5
3766   rm -rf conftest*
3767   eval "ac_cv_lib_$ac_lib_var=no"
3768 fi
3769 rm -f conftest*
3770 LIBS="$ac_save_LIBS"
3771
3772 fi
3773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3774   echo "$ac_t""yes" 1>&6
3775   
3776                 ol_link_isode=yes
3777                 cat >> confdefs.h <<\EOF
3778 #define HAVE_DSAP 1
3779 EOF
3780
3781                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3782                 
3783 else
3784   echo "$ac_t""no" 1>&6
3785 :
3786 fi
3787
3788         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3789 echo "configure:3790: checking for main in -lisode" >&5
3790 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3792   echo $ac_n "(cached) $ac_c" 1>&6
3793 else
3794   ac_save_LIBS="$LIBS"
3795 LIBS="-lisode  $LIBS"
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3799
3800 int main() {
3801 main()
3802 ; return 0; }
3803 EOF
3804 if { (eval echo configure:3805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3805   rm -rf conftest*
3806   eval "ac_cv_lib_$ac_lib_var=yes"
3807 else
3808   echo "configure: failed program was:" >&5
3809   cat conftest.$ac_ext >&5
3810   rm -rf conftest*
3811   eval "ac_cv_lib_$ac_lib_var=no"
3812 fi
3813 rm -f conftest*
3814 LIBS="$ac_save_LIBS"
3815
3816 fi
3817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3818   echo "$ac_t""yes" 1>&6
3819   
3820                 ol_link_isode=yes
3821                 cat >> confdefs.h <<\EOF
3822 #define HAVE_ISODE 1
3823 EOF
3824
3825                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3826                 
3827 else
3828   echo "$ac_t""no" 1>&6
3829 :
3830 fi
3831
3832 fi
3833
3834 if test $ol_link_isode != no; then
3835         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3836 echo "configure:3837: checking for main in -lpp" >&5
3837 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3838 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3839   echo $ac_n "(cached) $ac_c" 1>&6
3840 else
3841   ac_save_LIBS="$LIBS"
3842 LIBS="-lpp  $LIBS"
3843 cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846
3847 int main() {
3848 main()
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3852   rm -rf conftest*
3853   eval "ac_cv_lib_$ac_lib_var=yes"
3854 else
3855   echo "configure: failed program was:" >&5
3856   cat conftest.$ac_ext >&5
3857   rm -rf conftest*
3858   eval "ac_cv_lib_$ac_lib_var=no"
3859 fi
3860 rm -f conftest*
3861 LIBS="$ac_save_LIBS"
3862
3863 fi
3864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3865   echo "$ac_t""yes" 1>&6
3866   
3867                 cat >> confdefs.h <<\EOF
3868 #define HAVE_PP 1
3869 EOF
3870
3871                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3872                 
3873 else
3874   echo "$ac_t""no" 1>&6
3875 :
3876 fi
3877
3878
3879         # Extract the first word of "pepsy", so it can be a program name with args.
3880 set dummy pepsy; ac_word=$2
3881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3882 echo "configure:3883: checking for $ac_word" >&5
3883 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3884   echo $ac_n "(cached) $ac_c" 1>&6
3885 else
3886   case "$PEPSY" in
3887   /*)
3888   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3889   ;;
3890   ?:/*)                  
3891   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3892   ;;
3893   *)
3894   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3895   ac_dummy="$PATH"
3896   for ac_dir in $ac_dummy; do 
3897     test -z "$ac_dir" && ac_dir=.
3898     if test -f $ac_dir/$ac_word; then
3899       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3900       break
3901     fi
3902   done
3903   IFS="$ac_save_ifs"
3904   ;;
3905 esac
3906 fi
3907 PEPSY="$ac_cv_path_PEPSY"
3908 if test -n "$PEPSY"; then
3909   echo "$ac_t""$PEPSY" 1>&6
3910 else
3911   echo "$ac_t""no" 1>&6
3912 fi
3913
3914 fi
3915
3916 ol_link_kerberos=no
3917
3918 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3919         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3920 do
3921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3923 echo "configure:3924: checking for $ac_hdr" >&5
3924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3925   echo $ac_n "(cached) $ac_c" 1>&6
3926 else
3927   cat > conftest.$ac_ext <<EOF
3928 #line 3929 "configure"
3929 #include "confdefs.h"
3930 #include <$ac_hdr>
3931 EOF
3932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3933 { (eval echo configure:3934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3935 if test -z "$ac_err"; then
3936   rm -rf conftest*
3937   eval "ac_cv_header_$ac_safe=yes"
3938 else
3939   echo "$ac_err" >&5
3940   echo "configure: failed program was:" >&5
3941   cat conftest.$ac_ext >&5
3942   rm -rf conftest*
3943   eval "ac_cv_header_$ac_safe=no"
3944 fi
3945 rm -f conftest*
3946 fi
3947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3948   echo "$ac_t""yes" 1>&6
3949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3950   cat >> confdefs.h <<EOF
3951 #define $ac_tr_hdr 1
3952 EOF
3953  
3954 else
3955   echo "$ac_t""no" 1>&6
3956 fi
3957 done
3958
3959
3960         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3961                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3962 echo "configure:3963: checking for main in -lkrb4" >&5
3963 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3964 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   ac_save_LIBS="$LIBS"
3968 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972
3973 int main() {
3974 main()
3975 ; return 0; }
3976 EOF
3977 if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3978   rm -rf conftest*
3979   eval "ac_cv_lib_$ac_lib_var=yes"
3980 else
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   eval "ac_cv_lib_$ac_lib_var=no"
3985 fi
3986 rm -f conftest*
3987 LIBS="$ac_save_LIBS"
3988
3989 fi
3990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3991   echo "$ac_t""yes" 1>&6
3992   have_k5=yes
3993 else
3994   echo "$ac_t""no" 1>&6
3995 have_k5=no
3996 fi
3997
3998
3999                 if test $have_k5 = yes ; then
4000                         ol_with_kerberos=found
4001                         ol_link_kerberos=yes
4002
4003                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4004
4005                         LIBS="$KRB_LIBS $LIBS"
4006
4007                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4008 echo "configure:4009: checking for des_debug in Kerberos libraries" >&5
4009 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   
4013                                                                 save_LIBS="$LIBS"
4014                                 LIBS="$KRB_LIBS $LIBS"
4015                                 cat > conftest.$ac_ext <<EOF
4016 #line 4017 "configure"
4017 #include "confdefs.h"
4018
4019 #include <kerberosIV/krb.h>
4020 #include <kerberosIV/des.h>
4021 extern int des_debug;
4022
4023 int main() {
4024
4025 des_debug = 1;
4026
4027 ; return 0; }
4028 EOF
4029 if { (eval echo configure:4030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4030   rm -rf conftest*
4031   ol_cv_var_des_debug=yes
4032 else
4033   echo "configure: failed program was:" >&5
4034   cat conftest.$ac_ext >&5
4035   rm -rf conftest*
4036   ol_cv_var_des_debug=no
4037 fi
4038 rm -f conftest*
4039                                                                 LIBS="$save_LIBS"
4040                         
4041 fi
4042
4043 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4044
4045                         if test $ol_cv_var_des_debug = yes ; then
4046                                 cat >> confdefs.h <<\EOF
4047 #define HAVE_DES_DEBUG 1
4048 EOF
4049
4050                         fi
4051
4052                         LIBS="$save_LIBS"
4053                 fi
4054         fi
4055 fi
4056
4057 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4058         for ac_hdr in krb.h des.h
4059 do
4060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4062 echo "configure:4063: checking for $ac_hdr" >&5
4063 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4064   echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066   cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069 #include <$ac_hdr>
4070 EOF
4071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4072 { (eval echo configure:4073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4074 if test -z "$ac_err"; then
4075   rm -rf conftest*
4076   eval "ac_cv_header_$ac_safe=yes"
4077 else
4078   echo "$ac_err" >&5
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   eval "ac_cv_header_$ac_safe=no"
4083 fi
4084 rm -f conftest*
4085 fi
4086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4087   echo "$ac_t""yes" 1>&6
4088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4089   cat >> confdefs.h <<EOF
4090 #define $ac_tr_hdr 1
4091 EOF
4092  
4093 else
4094   echo "$ac_t""no" 1>&6
4095 fi
4096 done
4097
4098
4099         if test $ac_cv_header_krb_h = yes ; then
4100                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4101 echo "configure:4102: checking for main in -lkrb" >&5
4102 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4104   echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106   ac_save_LIBS="$LIBS"
4107 LIBS="-lkrb -ldes $LIBS"
4108 cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4111
4112 int main() {
4113 main()
4114 ; return 0; }
4115 EOF
4116 if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4117   rm -rf conftest*
4118   eval "ac_cv_lib_$ac_lib_var=yes"
4119 else
4120   echo "configure: failed program was:" >&5
4121   cat conftest.$ac_ext >&5
4122   rm -rf conftest*
4123   eval "ac_cv_lib_$ac_lib_var=no"
4124 fi
4125 rm -f conftest*
4126 LIBS="$ac_save_LIBS"
4127
4128 fi
4129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4130   echo "$ac_t""yes" 1>&6
4131   have_k4=yes
4132 else
4133   echo "$ac_t""no" 1>&6
4134 have_k4=no
4135 fi
4136
4137
4138                 if test $have_k4 = yes ; then
4139                         ol_with_kerberos=found
4140                         ol_link_kerberos=yes
4141
4142                         KRB_LIBS="-lkrb -ldes"
4143                 fi
4144         fi
4145 fi
4146
4147 if test $ol_link_kerberos = yes ; then
4148         cat >> confdefs.h <<\EOF
4149 #define HAVE_KERBEROS 1
4150 EOF
4151
4152 fi
4153
4154 ol_link_tls=no
4155 if test $ol_with_tls != no ; then
4156         
4157         for ac_hdr in ssl.h ssl/ssl.h
4158 do
4159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4161 echo "configure:4162: checking for $ac_hdr" >&5
4162 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4163   echo $ac_n "(cached) $ac_c" 1>&6
4164 else
4165   cat > conftest.$ac_ext <<EOF
4166 #line 4167 "configure"
4167 #include "confdefs.h"
4168 #include <$ac_hdr>
4169 EOF
4170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4171 { (eval echo configure:4172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4173 if test -z "$ac_err"; then
4174   rm -rf conftest*
4175   eval "ac_cv_header_$ac_safe=yes"
4176 else
4177   echo "$ac_err" >&5
4178   echo "configure: failed program was:" >&5
4179   cat conftest.$ac_ext >&5
4180   rm -rf conftest*
4181   eval "ac_cv_header_$ac_safe=no"
4182 fi
4183 rm -f conftest*
4184 fi
4185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4186   echo "$ac_t""yes" 1>&6
4187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4188   cat >> confdefs.h <<EOF
4189 #define $ac_tr_hdr 1
4190 EOF
4191  
4192 else
4193   echo "$ac_t""no" 1>&6
4194 fi
4195 done
4196
4197         
4198         if test $ac_cv_header_ssl_h = yes -o $ac_cv_header_ssl_ssl_h = yes ; then
4199                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4200 echo "configure:4201: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4201 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4202 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   ac_save_LIBS="$LIBS"
4206 LIBS="-lssl -lcrypto $LIBS"
4207 cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210 /* Override any gcc2 internal prototype to avoid an error.  */
4211 /* We use char because int might match the return type of a gcc2
4212     builtin and then its argument prototype would still apply.  */
4213 char SSLeay_add_ssl_algorithms();
4214
4215 int main() {
4216 SSLeay_add_ssl_algorithms()
4217 ; return 0; }
4218 EOF
4219 if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4220   rm -rf conftest*
4221   eval "ac_cv_lib_$ac_lib_var=yes"
4222 else
4223   echo "configure: failed program was:" >&5
4224   cat conftest.$ac_ext >&5
4225   rm -rf conftest*
4226   eval "ac_cv_lib_$ac_lib_var=no"
4227 fi
4228 rm -f conftest*
4229 LIBS="$ac_save_LIBS"
4230
4231 fi
4232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4233   echo "$ac_t""yes" 1>&6
4234   have_ssleay=yes
4235                         need_rsaref=no
4236 else
4237   echo "$ac_t""no" 1>&6
4238 have_ssleay=no
4239 fi
4240
4241                         
4242                 if test $have_ssleay = no ; then
4243                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4244 echo "configure:4245: checking for ssl3_accept in -lssl" >&5
4245 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4246 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249   ac_save_LIBS="$LIBS"
4250 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 /* Override any gcc2 internal prototype to avoid an error.  */
4255 /* We use char because int might match the return type of a gcc2
4256     builtin and then its argument prototype would still apply.  */
4257 char ssl3_accept();
4258
4259 int main() {
4260 ssl3_accept()
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4264   rm -rf conftest*
4265   eval "ac_cv_lib_$ac_lib_var=yes"
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_lib_$ac_lib_var=no"
4271 fi
4272 rm -f conftest*
4273 LIBS="$ac_save_LIBS"
4274
4275 fi
4276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4277   echo "$ac_t""yes" 1>&6
4278   have_ssleay=yes
4279                                 need_rsaref=yes
4280 else
4281   echo "$ac_t""no" 1>&6
4282 have_ssleay=no
4283 fi
4284
4285                 fi
4286
4287                 if test $have_ssleay = yes ; then
4288                         ol_with_tls=found
4289                         ol_link_tls=yes
4290
4291                         cat >> confdefs.h <<\EOF
4292 #define HAVE_SSLEAY 1
4293 EOF
4294
4295
4296                         if test $need_rsaref = yes; then
4297                                 cat >> confdefs.h <<\EOF
4298 #define HAVE_RSAREF 1
4299 EOF
4300
4301
4302                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4303                         else
4304                                 TLS_LIBS="-lssl -lcrypto"
4305                         fi
4306                 fi
4307         fi
4308 fi
4309
4310 if test $ol_link_tls = yes ; then
4311         cat >> confdefs.h <<\EOF
4312 #define HAVE_TLS 1
4313 EOF
4314
4315 fi      
4316
4317 for ac_func in \
4318         ctime_r                 \
4319         gethostbyname_r gethostbyaddr_r \
4320
4321 do
4322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4323 echo "configure:4324: checking for $ac_func" >&5
4324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330 /* System header to define __stub macros and hopefully few prototypes,
4331     which can conflict with char $ac_func(); below.  */
4332 #include <assert.h>
4333 /* Override any gcc2 internal prototype to avoid an error.  */
4334 /* We use char because int might match the return type of a gcc2
4335     builtin and then its argument prototype would still apply.  */
4336 char $ac_func();
4337
4338 int main() {
4339
4340 /* The GNU C library defines this for functions which it implements
4341     to always fail with ENOSYS.  Some functions are actually named
4342     something starting with __ and the normal name is an alias.  */
4343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4344 choke me
4345 #else
4346 $ac_func();
4347 #endif
4348
4349 ; return 0; }
4350 EOF
4351 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4352   rm -rf conftest*
4353   eval "ac_cv_func_$ac_func=yes"
4354 else
4355   echo "configure: failed program was:" >&5
4356   cat conftest.$ac_ext >&5
4357   rm -rf conftest*
4358   eval "ac_cv_func_$ac_func=no"
4359 fi
4360 rm -f conftest*
4361 fi
4362
4363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4364   echo "$ac_t""yes" 1>&6
4365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4366   cat >> confdefs.h <<EOF
4367 #define $ac_tr_func 1
4368 EOF
4369  
4370 else
4371   echo "$ac_t""no" 1>&6
4372 fi
4373 done
4374
4375
4376 if test "$ac_cv_func_ctime_r" = no ; then
4377         ol_cv_func_ctime_r_nargs=0
4378 else
4379         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4380 echo "configure:4381: checking number of arguments of ctime_r" >&5
4381 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   cat > conftest.$ac_ext <<EOF
4385 #line 4386 "configure"
4386 #include "confdefs.h"
4387 #include <time.h>
4388 int main() {
4389 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4390 ; return 0; }
4391 EOF
4392 if { (eval echo configure:4393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4393   rm -rf conftest*
4394   ol_cv_func_ctime_r_nargs=3
4395 else
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398   rm -rf conftest*
4399   cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402 #include <time.h>
4403 int main() {
4404 time_t ti; char *buffer; ctime_r(&ti,buffer);
4405 ; return 0; }
4406 EOF
4407 if { (eval echo configure:4408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4408   rm -rf conftest*
4409   ol_cv_func_ctime_r_nargs=2
4410 else
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -rf conftest*
4414   ol_cv_func_ctime_r_nargs=0
4415 fi
4416 rm -f conftest*
4417 fi
4418 rm -f conftest*
4419 fi
4420
4421 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4422   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4423     cat >> confdefs.h <<EOF
4424 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4425 EOF
4426
4427   fi
4428
4429 fi
4430
4431 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4432         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4433 echo "configure:4434: checking number of arguments of gethostbyname_r" >&5
4434 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4435   echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437   cat > conftest.$ac_ext <<EOF
4438 #line 4439 "configure"
4439 #include "confdefs.h"
4440 #include <sys/types.h>
4441 #include <sys/socket.h>
4442 #include <netinet/in.h>
4443 #include <netdb.h>
4444 #define BUFSIZE (sizeof(struct hostent)+10)
4445 int main() {
4446 struct hostent hent; char buffer[BUFSIZE];
4447                 int bufsize=BUFSIZE;int h_errno;
4448                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4449                         buffer, bufsize, &h_errno);
4450 ; return 0; }
4451 EOF
4452 if { (eval echo configure:4453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4453   rm -rf conftest*
4454   ol_cv_func_gethostbyname_r_nargs=5
4455 else
4456   echo "configure: failed program was:" >&5
4457   cat conftest.$ac_ext >&5
4458   rm -rf conftest*
4459   cat > conftest.$ac_ext <<EOF
4460 #line 4461 "configure"
4461 #include "confdefs.h"
4462 #include <sys/types.h>
4463 #include <sys/socket.h>
4464 #include <netinet/in.h>
4465 #include <netdb.h>
4466 #define BUFSIZE (sizeof(struct hostent)+10)
4467 int main() {
4468 struct hostent hent;struct hostent *rhent;
4469                         char buffer[BUFSIZE];
4470                         int bufsize=BUFSIZE;int h_errno;
4471                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4472                                 &rhent, &h_errno);
4473 ; return 0; }
4474 EOF
4475 if { (eval echo configure:4476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4476   rm -rf conftest*
4477   ol_cv_func_gethostbyname_r_nargs=6
4478 else
4479   echo "configure: failed program was:" >&5
4480   cat conftest.$ac_ext >&5
4481   rm -rf conftest*
4482   ol_cv_func_gethostbyname_r_nargs=0
4483 fi
4484 rm -f conftest*
4485 fi
4486 rm -f conftest*
4487 fi
4488
4489 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4490   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4491         cat >> confdefs.h <<EOF
4492 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4493 EOF
4494
4495   fi
4496
4497 else
4498         ol_cv_func_gethostbyname_r_nargs=0
4499 fi
4500  
4501 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4502         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4503 echo "configure:4504: checking number of arguments of gethostbyaddr_r" >&5
4504 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4511 #include <sys/socket.h>
4512 #include <netinet/in.h>
4513 #include <netdb.h>
4514 #define BUFSIZE (sizeof(struct hostent)+10)
4515 int main() {
4516 struct hostent hent; char buffer[BUFSIZE]; 
4517             struct in_addr add;
4518             size_t alen=sizeof(struct in_addr);
4519             int bufsize=BUFSIZE;int h_errno;
4520                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4521                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4522 ; return 0; }
4523 EOF
4524 if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4525   rm -rf conftest*
4526   ol_cv_func_gethostbyaddr_r_nargs=7
4527 else
4528   echo "configure: failed program was:" >&5
4529   cat conftest.$ac_ext >&5
4530   rm -rf conftest*
4531   cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 #include <sys/types.h>
4535 #include <sys/socket.h>
4536 #include <netinet/in.h>
4537 #include <netdb.h>
4538 #define BUFSIZE (sizeof(struct hostent)+10)
4539 int main() {
4540 struct hostent hent;
4541                         struct hostent *rhent; char buffer[BUFSIZE]; 
4542                         struct in_addr add;
4543                         size_t alen=sizeof(struct in_addr);
4544                         int bufsize=BUFSIZE;int h_errno;
4545                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4546                                 alen, AF_INET, &hent, buffer, bufsize, 
4547                                 &rhent, &h_errno);
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4551   rm -rf conftest*
4552   ol_cv_func_gethostbyaddr_r_nargs=8
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   ol_cv_func_gethostbyaddr_r_nargs=0
4558 fi
4559 rm -f conftest*
4560 fi
4561 rm -f conftest*
4562 fi
4563
4564 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4565   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4566     cat >> confdefs.h <<EOF
4567 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4568 EOF
4569
4570   fi
4571
4572 else
4573         ol_cv_func_gethostbyaddr_r_nargs=0
4574 fi
4575
4576 if test "$ac_cv_func_ctime_r" = yes \
4577         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4578         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4579         -a "$ac_cv_func_gethostbyname_r" = yes \
4580         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4581         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4582         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4583         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4584         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4585         ; then
4586  
4587         cat >> confdefs.h <<\EOF
4588 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4589 EOF
4590
4591 fi
4592
4593 ol_link_threads=no
4594 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4595         -o $ol_with_threads = posix ; then
4596
4597         for ac_hdr in pthread.h sched.h
4598 do
4599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4601 echo "configure:4602: checking for $ac_hdr" >&5
4602 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <$ac_hdr>
4609 EOF
4610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4611 { (eval echo configure:4612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4613 if test -z "$ac_err"; then
4614   rm -rf conftest*
4615   eval "ac_cv_header_$ac_safe=yes"
4616 else
4617   echo "$ac_err" >&5
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   eval "ac_cv_header_$ac_safe=no"
4622 fi
4623 rm -f conftest*
4624 fi
4625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4626   echo "$ac_t""yes" 1>&6
4627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4628   cat >> confdefs.h <<EOF
4629 #define $ac_tr_hdr 1
4630 EOF
4631  
4632 else
4633   echo "$ac_t""no" 1>&6
4634 fi
4635 done
4636
4637
4638         if test $ac_cv_header_pthread_h = yes ; then
4639                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4640 echo "configure:4641: checking POSIX thread version" >&5
4641 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   
4645         cat > conftest.$ac_ext <<EOF
4646 #line 4647 "configure"
4647 #include "confdefs.h"
4648
4649 #               include <pthread.h>
4650                 /* this check could be improved */
4651 #               ifdef PTHREAD_ONCE_INIT
4652                         pthread_version_final
4653 #               endif
4654         
4655 EOF
4656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4657   egrep "pthread_version_final" >/dev/null 2>&1; then
4658   rm -rf conftest*
4659   ol_pthread_final=yes
4660 else
4661   rm -rf conftest*
4662   ol_pthread_final=no
4663 fi
4664 rm -f conftest*
4665
4666
4667         cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670
4671 #               include <pthread.h>
4672                 /* this check could be improved */
4673 #               ifdef pthread_once_init
4674                         pthread_version_draft4
4675 #               endif
4676         
4677 EOF
4678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4679   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4680   rm -rf conftest*
4681   ol_pthread_draft4=yes
4682 else
4683   rm -rf conftest*
4684   ol_pthread_draft4=no
4685 fi
4686 rm -f conftest*
4687
4688
4689         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4690                 ol_cv_pthread_version=final
4691         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4692                 ol_cv_pthread_version=draft4
4693         else
4694                 ol_cv_pthread_version=unknown
4695         fi
4696
4697 fi
4698
4699 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4700
4701
4702                 if test $ol_cv_pthread_version = final ; then
4703                         cat >> confdefs.h <<\EOF
4704 #define HAVE_PTHREADS_FINAL 1
4705 EOF
4706
4707                 elif test $ol_cv_pthread_version = draft4 ; then
4708                         cat >> confdefs.h <<\EOF
4709 #define HAVE_PTHREADS_D4 1
4710 EOF
4711
4712                 else
4713                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4714                 fi
4715
4716                 # consider threads found
4717                 ol_with_threads=found
4718
4719                 
4720         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
4721 echo "configure:4722: checking for LinuxThreads pthread.h" >&5
4722 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4728 #include <pthread.h>
4729 EOF
4730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4731   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
4732   rm -rf conftest*
4733   ol_cv_header_linux_threads=yes
4734 else
4735   rm -rf conftest*
4736   ol_cv_header_linux_threads=no
4737 fi
4738 rm -f conftest*
4739
4740                 
4741 fi
4742
4743 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
4744         if test $ol_cv_header_linux_threads = yes; then
4745                 cat >> confdefs.h <<\EOF
4746 #define HAVE_LINUX_THREADS 1
4747 EOF
4748
4749         fi
4750
4751
4752                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4753                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4754 echo "configure:4755: checking for pthread_create in default libraries" >&5
4755                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   
4759                 if test "$cross_compiling" = yes; then
4760                         ol_cv_pthread_create=yes
4761 else
4762   cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765
4766 #include <pthread.h>
4767 #ifndef NULL
4768 #define NULL (void*)0
4769 #endif
4770
4771 static void *task(p)
4772         void *p;
4773 {
4774         return (void *) (p == NULL);
4775 }
4776
4777 int main(argc, argv)
4778         int argc;
4779         char **argv;
4780 {
4781         pthread_t t;
4782         int status;
4783
4784         /* make sure pthread_create() isn't just a stub */
4785 #if HAVE_PTHREADS_D4
4786         status = pthread_create(&t, pthread_attr_default, task, NULL);
4787 #else
4788         status = pthread_create(&t, NULL, task, NULL);
4789 #endif
4790
4791         if( status ) return status;
4792
4793         /* make sure pthread_detach() isn't just a stub */
4794 #if HAVE_PTHREADS_D4
4795         status = pthread_detach( &t );
4796 #else
4797         status = pthread_detach( t );
4798 #endif
4799
4800         if( status ) return status;
4801
4802         return status;
4803 }
4804
4805 EOF
4806 if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4807 then
4808   ol_cv_pthread_create=yes
4809 else
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -fr conftest*
4813   ol_cv_pthread_create=no
4814 fi
4815 rm -fr conftest*
4816 fi
4817
4818 fi
4819
4820                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4821
4822                 if test $ol_cv_pthread_create != no ; then
4823                         ol_link_threads=posix
4824                         ol_link_pthreads=""
4825                 fi
4826                 
4827                 # Pthread try link: -mt (ol_cv_pthread_mt)
4828         if test "$ol_link_threads" = no ; then
4829                 # try -mt
4830                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
4831 echo "configure:4832: checking for pthread link with -mt" >&5
4832 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
4833   echo $ac_n "(cached) $ac_c" 1>&6
4834 else
4835   
4836                         # save the flags
4837                         ol_LIBS="$LIBS"
4838                         LIBS="-mt $LIBS"
4839
4840                         cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843
4844 #include <pthread.h>
4845 #ifndef NULL
4846 #define NULL (void*)0
4847 #endif
4848
4849 int main() {
4850
4851         pthread_t t;
4852
4853 #if HAVE_PTHREADS_D4
4854         pthread_create(&t, pthread_attr_default, NULL, NULL);
4855         pthread_detach( &t );
4856 #else
4857         pthread_create(&t, NULL, NULL, NULL);
4858         pthread_detach( t );
4859 #endif
4860 #ifdef HAVE_LINUX_THREADS
4861         pthread_kill_other_threads_np();
4862 #endif
4863
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   ol_cv_pthread_mt=yes
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   ol_cv_pthread_mt=no
4874 fi
4875 rm -f conftest*
4876
4877                 # restore the LIBS
4878                 LIBS="$ol_LIBS"
4879                 
4880 fi
4881
4882 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
4883
4884                 if test $ol_cv_pthread_mt = yes ; then
4885                         ol_link_pthreads="-mt"
4886                         ol_link_threads=posix
4887                 fi
4888         fi
4889
4890                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
4891         if test "$ol_link_threads" = no ; then
4892                 # try -kthread
4893                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
4894 echo "configure:4895: checking for pthread link with -kthread" >&5
4895 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   
4899                         # save the flags
4900                         ol_LIBS="$LIBS"
4901                         LIBS="-kthread $LIBS"
4902
4903                         cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906
4907 #include <pthread.h>
4908 #ifndef NULL
4909 #define NULL (void*)0
4910 #endif
4911
4912 int main() {
4913
4914         pthread_t t;
4915
4916 #if HAVE_PTHREADS_D4
4917         pthread_create(&t, pthread_attr_default, NULL, NULL);
4918         pthread_detach( &t );
4919 #else
4920         pthread_create(&t, NULL, NULL, NULL);
4921         pthread_detach( t );
4922 #endif
4923 #ifdef HAVE_LINUX_THREADS
4924         pthread_kill_other_threads_np();
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   ol_cv_pthread_kthread=yes
4932 else
4933   echo "configure: failed program was:" >&5
4934   cat conftest.$ac_ext >&5
4935   rm -rf conftest*
4936   ol_cv_pthread_kthread=no
4937 fi
4938 rm -f conftest*
4939
4940                 # restore the LIBS
4941                 LIBS="$ol_LIBS"
4942                 
4943 fi
4944
4945 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
4946
4947                 if test $ol_cv_pthread_kthread = yes ; then
4948                         ol_link_pthreads="-kthread"
4949                         ol_link_threads=posix
4950                 fi
4951         fi
4952
4953                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
4954         if test "$ol_link_threads" = no ; then
4955                 # try -pthread
4956                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
4957 echo "configure:4958: checking for pthread link with -pthread" >&5
4958 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
4959   echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961   
4962                         # save the flags
4963                         ol_LIBS="$LIBS"
4964                         LIBS="-pthread $LIBS"
4965
4966                         cat > conftest.$ac_ext <<EOF
4967 #line 4968 "configure"
4968 #include "confdefs.h"
4969
4970 #include <pthread.h>
4971 #ifndef NULL
4972 #define NULL (void*)0
4973 #endif
4974
4975 int main() {
4976
4977         pthread_t t;
4978
4979 #if HAVE_PTHREADS_D4
4980         pthread_create(&t, pthread_attr_default, NULL, NULL);
4981         pthread_detach( &t );
4982 #else
4983         pthread_create(&t, NULL, NULL, NULL);
4984         pthread_detach( t );
4985 #endif
4986 #ifdef HAVE_LINUX_THREADS
4987         pthread_kill_other_threads_np();
4988 #endif
4989
4990 ; return 0; }
4991 EOF
4992 if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4993   rm -rf conftest*
4994   ol_cv_pthread_pthread=yes
4995 else
4996   echo "configure: failed program was:" >&5
4997   cat conftest.$ac_ext >&5
4998   rm -rf conftest*
4999   ol_cv_pthread_pthread=no
5000 fi
5001 rm -f conftest*
5002
5003                 # restore the LIBS
5004                 LIBS="$ol_LIBS"
5005                 
5006 fi
5007
5008 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5009
5010                 if test $ol_cv_pthread_pthread = yes ; then
5011                         ol_link_pthreads="-pthread"
5012                         ol_link_threads=posix
5013                 fi
5014         fi
5015
5016                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5017         if test "$ol_link_threads" = no ; then
5018                 # try -pthreads
5019                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5020 echo "configure:5021: checking for pthread link with -pthreads" >&5
5021 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5022   echo $ac_n "(cached) $ac_c" 1>&6
5023 else
5024   
5025                         # save the flags
5026                         ol_LIBS="$LIBS"
5027                         LIBS="-pthreads $LIBS"
5028
5029                         cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032
5033 #include <pthread.h>
5034 #ifndef NULL
5035 #define NULL (void*)0
5036 #endif
5037
5038 int main() {
5039
5040         pthread_t t;
5041
5042 #if HAVE_PTHREADS_D4
5043         pthread_create(&t, pthread_attr_default, NULL, NULL);
5044         pthread_detach( &t );
5045 #else
5046         pthread_create(&t, NULL, NULL, NULL);
5047         pthread_detach( t );
5048 #endif
5049 #ifdef HAVE_LINUX_THREADS
5050         pthread_kill_other_threads_np();
5051 #endif
5052
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   ol_cv_pthread_pthreads=yes
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   ol_cv_pthread_pthreads=no
5063 fi
5064 rm -f conftest*
5065
5066                 # restore the LIBS
5067                 LIBS="$ol_LIBS"
5068                 
5069 fi
5070
5071 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5072
5073                 if test $ol_cv_pthread_pthreads = yes ; then
5074                         ol_link_pthreads="-pthreads"
5075                         ol_link_threads=posix
5076                 fi
5077         fi
5078
5079                 # Pthread try link: -thread (ol_cv_pthread_thread)
5080         if test "$ol_link_threads" = no ; then
5081                 # try -thread
5082                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5083 echo "configure:5084: checking for pthread link with -thread" >&5
5084 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5085   echo $ac_n "(cached) $ac_c" 1>&6
5086 else
5087   
5088                         # save the flags
5089                         ol_LIBS="$LIBS"
5090                         LIBS="-thread $LIBS"
5091
5092                         cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095
5096 #include <pthread.h>
5097 #ifndef NULL
5098 #define NULL (void*)0
5099 #endif
5100
5101 int main() {
5102
5103         pthread_t t;
5104
5105 #if HAVE_PTHREADS_D4
5106         pthread_create(&t, pthread_attr_default, NULL, NULL);
5107         pthread_detach( &t );
5108 #else
5109         pthread_create(&t, NULL, NULL, NULL);
5110         pthread_detach( t );
5111 #endif
5112 #ifdef HAVE_LINUX_THREADS
5113         pthread_kill_other_threads_np();
5114 #endif
5115
5116 ; return 0; }
5117 EOF
5118 if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5119   rm -rf conftest*
5120   ol_cv_pthread_thread=yes
5121 else
5122   echo "configure: failed program was:" >&5
5123   cat conftest.$ac_ext >&5
5124   rm -rf conftest*
5125   ol_cv_pthread_thread=no
5126 fi
5127 rm -f conftest*
5128
5129                 # restore the LIBS
5130                 LIBS="$ol_LIBS"
5131                 
5132 fi
5133
5134 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5135
5136                 if test $ol_cv_pthread_thread = yes ; then
5137                         ol_link_pthreads="-thread"
5138                         ol_link_threads=posix
5139                 fi
5140         fi
5141
5142
5143                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5144         if test "$ol_link_threads" = no ; then
5145                 # try -lpthread -lmach -lexc -lc_r
5146                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5147 echo "configure:5148: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5148 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5149   echo $ac_n "(cached) $ac_c" 1>&6
5150 else
5151   
5152                         # save the flags
5153                         ol_LIBS="$LIBS"
5154                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5155
5156                         cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159
5160 #include <pthread.h>
5161 #ifndef NULL
5162 #define NULL (void*)0
5163 #endif
5164
5165 int main() {
5166
5167         pthread_t t;
5168
5169 #if HAVE_PTHREADS_D4
5170         pthread_create(&t, pthread_attr_default, NULL, NULL);
5171         pthread_detach( &t );
5172 #else
5173         pthread_create(&t, NULL, NULL, NULL);
5174         pthread_detach( t );
5175 #endif
5176 #ifdef HAVE_LINUX_THREADS
5177         pthread_kill_other_threads_np();
5178 #endif
5179
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5190 fi
5191 rm -f conftest*
5192
5193                 # restore the LIBS
5194                 LIBS="$ol_LIBS"
5195                 
5196 fi
5197
5198 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5199
5200                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5201                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5202                         ol_link_threads=posix
5203                 fi
5204         fi
5205
5206                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5207         if test "$ol_link_threads" = no ; then
5208                 # try -lpthread -lmach -lexc
5209                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5210 echo "configure:5211: checking for pthread link with -lpthread -lmach -lexc" >&5
5211 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5212   echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5214   
5215                         # save the flags
5216                         ol_LIBS="$LIBS"
5217                         LIBS="-lpthread -lmach -lexc $LIBS"
5218
5219                         cat > conftest.$ac_ext <<EOF
5220 #line 5221 "configure"
5221 #include "confdefs.h"
5222
5223 #include <pthread.h>
5224 #ifndef NULL
5225 #define NULL (void*)0
5226 #endif
5227
5228 int main() {
5229
5230         pthread_t t;
5231
5232 #if HAVE_PTHREADS_D4
5233         pthread_create(&t, pthread_attr_default, NULL, NULL);
5234         pthread_detach( &t );
5235 #else
5236         pthread_create(&t, NULL, NULL, NULL);
5237         pthread_detach( t );
5238 #endif
5239 #ifdef HAVE_LINUX_THREADS
5240         pthread_kill_other_threads_np();
5241 #endif
5242
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   ol_cv_pthread_lpthread_lmach_lexc=yes
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   ol_cv_pthread_lpthread_lmach_lexc=no
5253 fi
5254 rm -f conftest*
5255
5256                 # restore the LIBS
5257                 LIBS="$ol_LIBS"
5258                 
5259 fi
5260
5261 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5262
5263                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5264                         ol_link_pthreads="-lpthread -lmach -lexc"
5265                         ol_link_threads=posix
5266                 fi
5267         fi
5268
5269
5270                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5271         if test "$ol_link_threads" = no ; then
5272                 # try -lpthread -Wl,-woff,85
5273                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5274 echo "configure:5275: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5275 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5276   echo $ac_n "(cached) $ac_c" 1>&6
5277 else
5278   
5279                         # save the flags
5280                         ol_LIBS="$LIBS"
5281                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5282
5283                         cat > conftest.$ac_ext <<EOF
5284 #line 5285 "configure"
5285 #include "confdefs.h"
5286
5287 #include <pthread.h>
5288 #ifndef NULL
5289 #define NULL (void*)0
5290 #endif
5291
5292 int main() {
5293
5294         pthread_t t;
5295
5296 #if HAVE_PTHREADS_D4
5297         pthread_create(&t, pthread_attr_default, NULL, NULL);
5298         pthread_detach( &t );
5299 #else
5300         pthread_create(&t, NULL, NULL, NULL);
5301         pthread_detach( t );
5302 #endif
5303 #ifdef HAVE_LINUX_THREADS
5304         pthread_kill_other_threads_np();
5305 #endif
5306
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5310   rm -rf conftest*
5311   ol_cv_pthread_lib_lpthread_woff=yes
5312 else
5313   echo "configure: failed program was:" >&5
5314   cat conftest.$ac_ext >&5
5315   rm -rf conftest*
5316   ol_cv_pthread_lib_lpthread_woff=no
5317 fi
5318 rm -f conftest*
5319
5320                 # restore the LIBS
5321                 LIBS="$ol_LIBS"
5322                 
5323 fi
5324
5325 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5326
5327                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5328                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5329                         ol_link_threads=posix
5330                 fi
5331         fi
5332
5333
5334                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5335         if test "$ol_link_threads" = no ; then
5336                 # try -lpthread
5337                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5338 echo "configure:5339: checking for pthread link with -lpthread" >&5
5339 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   
5343                         # save the flags
5344                         ol_LIBS="$LIBS"
5345                         LIBS="-lpthread $LIBS"
5346
5347                         cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350
5351 #include <pthread.h>
5352 #ifndef NULL
5353 #define NULL (void*)0
5354 #endif
5355
5356 int main() {
5357
5358         pthread_t t;
5359
5360 #if HAVE_PTHREADS_D4
5361         pthread_create(&t, pthread_attr_default, NULL, NULL);
5362         pthread_detach( &t );
5363 #else
5364         pthread_create(&t, NULL, NULL, NULL);
5365         pthread_detach( t );
5366 #endif
5367 #ifdef HAVE_LINUX_THREADS
5368         pthread_kill_other_threads_np();
5369 #endif
5370
5371 ; return 0; }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374   rm -rf conftest*
5375   ol_cv_pthread_lpthread=yes
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379   rm -rf conftest*
5380   ol_cv_pthread_lpthread=no
5381 fi
5382 rm -f conftest*
5383
5384                 # restore the LIBS
5385                 LIBS="$ol_LIBS"
5386                 
5387 fi
5388
5389 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5390
5391                 if test $ol_cv_pthread_lpthread = yes ; then
5392                         ol_link_pthreads="-lpthread"
5393                         ol_link_threads=posix
5394                 fi
5395         fi
5396
5397                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5398         if test "$ol_link_threads" = no ; then
5399                 # try -lc_r
5400                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5401 echo "configure:5402: checking for pthread link with -lc_r" >&5
5402 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5403   echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5405   
5406                         # save the flags
5407                         ol_LIBS="$LIBS"
5408                         LIBS="-lc_r $LIBS"
5409
5410                         cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413
5414 #include <pthread.h>
5415 #ifndef NULL
5416 #define NULL (void*)0
5417 #endif
5418
5419 int main() {
5420
5421         pthread_t t;
5422
5423 #if HAVE_PTHREADS_D4
5424         pthread_create(&t, pthread_attr_default, NULL, NULL);
5425         pthread_detach( &t );
5426 #else
5427         pthread_create(&t, NULL, NULL, NULL);
5428         pthread_detach( t );
5429 #endif
5430 #ifdef HAVE_LINUX_THREADS
5431         pthread_kill_other_threads_np();
5432 #endif
5433
5434 ; return 0; }
5435 EOF
5436 if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5437   rm -rf conftest*
5438   ol_cv_pthread_lc_r=yes
5439 else
5440   echo "configure: failed program was:" >&5
5441   cat conftest.$ac_ext >&5
5442   rm -rf conftest*
5443   ol_cv_pthread_lc_r=no
5444 fi
5445 rm -f conftest*
5446
5447                 # restore the LIBS
5448                 LIBS="$ol_LIBS"
5449                 
5450 fi
5451
5452 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5453
5454                 if test $ol_cv_pthread_lc_r = yes ; then
5455                         ol_link_pthreads="-lc_r"
5456                         ol_link_threads=posix
5457                 fi
5458         fi
5459
5460
5461                 # Pthread try link: -threads (ol_cv_pthread_threads)
5462         if test "$ol_link_threads" = no ; then
5463                 # try -threads
5464                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5465 echo "configure:5466: checking for pthread link with -threads" >&5
5466 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5467   echo $ac_n "(cached) $ac_c" 1>&6
5468 else
5469   
5470                         # save the flags
5471                         ol_LIBS="$LIBS"
5472                         LIBS="-threads $LIBS"
5473
5474                         cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5477
5478 #include <pthread.h>
5479 #ifndef NULL
5480 #define NULL (void*)0
5481 #endif
5482
5483 int main() {
5484
5485         pthread_t t;
5486
5487 #if HAVE_PTHREADS_D4
5488         pthread_create(&t, pthread_attr_default, NULL, NULL);
5489         pthread_detach( &t );
5490 #else
5491         pthread_create(&t, NULL, NULL, NULL);
5492         pthread_detach( t );
5493 #endif
5494 #ifdef HAVE_LINUX_THREADS
5495         pthread_kill_other_threads_np();
5496 #endif
5497
5498 ; return 0; }
5499 EOF
5500 if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5501   rm -rf conftest*
5502   ol_cv_pthread_threads=yes
5503 else
5504   echo "configure: failed program was:" >&5
5505   cat conftest.$ac_ext >&5
5506   rm -rf conftest*
5507   ol_cv_pthread_threads=no
5508 fi
5509 rm -f conftest*
5510
5511                 # restore the LIBS
5512                 LIBS="$ol_LIBS"
5513                 
5514 fi
5515
5516 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5517
5518                 if test $ol_cv_pthread_threads = yes ; then
5519                         ol_link_pthreads="-threads"
5520                         ol_link_threads=posix
5521                 fi
5522         fi
5523
5524
5525                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5526         if test "$ol_link_threads" = no ; then
5527                 # try -lpthreads -lmach -lexc -lc_r
5528                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5529 echo "configure:5530: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5530 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5531   echo $ac_n "(cached) $ac_c" 1>&6
5532 else
5533   
5534                         # save the flags
5535                         ol_LIBS="$LIBS"
5536                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5537
5538                         cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541
5542 #include <pthread.h>
5543 #ifndef NULL
5544 #define NULL (void*)0
5545 #endif
5546
5547 int main() {
5548
5549         pthread_t t;
5550
5551 #if HAVE_PTHREADS_D4
5552         pthread_create(&t, pthread_attr_default, NULL, NULL);
5553         pthread_detach( &t );
5554 #else
5555         pthread_create(&t, NULL, NULL, NULL);
5556         pthread_detach( t );
5557 #endif
5558 #ifdef HAVE_LINUX_THREADS
5559         pthread_kill_other_threads_np();
5560 #endif
5561
5562 ; return 0; }
5563 EOF
5564 if { (eval echo configure:5565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5565   rm -rf conftest*
5566   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5567 else
5568   echo "configure: failed program was:" >&5
5569   cat conftest.$ac_ext >&5
5570   rm -rf conftest*
5571   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5572 fi
5573 rm -f conftest*
5574
5575                 # restore the LIBS
5576                 LIBS="$ol_LIBS"
5577                 
5578 fi
5579
5580 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5581
5582                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5583                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5584                         ol_link_threads=posix
5585                 fi
5586         fi
5587
5588                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5589         if test "$ol_link_threads" = no ; then
5590                 # try -lpthreads -lmach -lexc
5591                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5592 echo "configure:5593: checking for pthread link with -lpthreads -lmach -lexc" >&5
5593 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   
5597                         # save the flags
5598                         ol_LIBS="$LIBS"
5599                         LIBS="-lpthreads -lmach -lexc $LIBS"
5600
5601                         cat > conftest.$ac_ext <<EOF
5602 #line 5603 "configure"
5603 #include "confdefs.h"
5604
5605 #include <pthread.h>
5606 #ifndef NULL
5607 #define NULL (void*)0
5608 #endif
5609
5610 int main() {
5611
5612         pthread_t t;
5613
5614 #if HAVE_PTHREADS_D4
5615         pthread_create(&t, pthread_attr_default, NULL, NULL);
5616         pthread_detach( &t );
5617 #else
5618         pthread_create(&t, NULL, NULL, NULL);
5619         pthread_detach( t );
5620 #endif
5621 #ifdef HAVE_LINUX_THREADS
5622         pthread_kill_other_threads_np();
5623 #endif
5624
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628   rm -rf conftest*
5629   ol_cv_pthread_lpthreads_lmach_lexc=yes
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   ol_cv_pthread_lpthreads_lmach_lexc=no
5635 fi
5636 rm -f conftest*
5637
5638                 # restore the LIBS
5639                 LIBS="$ol_LIBS"
5640                 
5641 fi
5642
5643 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
5644
5645                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
5646                         ol_link_pthreads="-lpthreads -lmach -lexc"
5647                         ol_link_threads=posix
5648                 fi
5649         fi
5650
5651                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
5652         if test "$ol_link_threads" = no ; then
5653                 # try -lpthreads -lexc
5654                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
5655 echo "configure:5656: checking for pthread link with -lpthreads -lexc" >&5
5656 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
5657   echo $ac_n "(cached) $ac_c" 1>&6
5658 else
5659   
5660                         # save the flags
5661                         ol_LIBS="$LIBS"
5662                         LIBS="-lpthreads -lexc $LIBS"
5663
5664                         cat > conftest.$ac_ext <<EOF
5665 #line 5666 "configure"
5666 #include "confdefs.h"
5667
5668 #include <pthread.h>
5669 #ifndef NULL
5670 #define NULL (void*)0
5671 #endif
5672
5673 int main() {
5674
5675         pthread_t t;
5676
5677 #if HAVE_PTHREADS_D4
5678         pthread_create(&t, pthread_attr_default, NULL, NULL);
5679         pthread_detach( &t );
5680 #else
5681         pthread_create(&t, NULL, NULL, NULL);
5682         pthread_detach( t );
5683 #endif
5684 #ifdef HAVE_LINUX_THREADS
5685         pthread_kill_other_threads_np();
5686 #endif
5687
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   ol_cv_pthread_lpthreads_lexc=yes
5693 else
5694   echo "configure: failed program was:" >&5
5695   cat conftest.$ac_ext >&5
5696   rm -rf conftest*
5697   ol_cv_pthread_lpthreads_lexc=no
5698 fi
5699 rm -f conftest*
5700
5701                 # restore the LIBS
5702                 LIBS="$ol_LIBS"
5703                 
5704 fi
5705
5706 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
5707
5708                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
5709                         ol_link_pthreads="-lpthreads -lexc"
5710                         ol_link_threads=posix
5711                 fi
5712         fi
5713
5714
5715                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
5716         if test "$ol_link_threads" = no ; then
5717                 # try -lpthreads
5718                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
5719 echo "configure:5720: checking for pthread link with -lpthreads" >&5
5720 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
5721   echo $ac_n "(cached) $ac_c" 1>&6
5722 else
5723   
5724                         # save the flags
5725                         ol_LIBS="$LIBS"
5726                         LIBS="-lpthreads $LIBS"
5727
5728                         cat > conftest.$ac_ext <<EOF
5729 #line 5730 "configure"
5730 #include "confdefs.h"
5731
5732 #include <pthread.h>
5733 #ifndef NULL
5734 #define NULL (void*)0
5735 #endif
5736
5737 int main() {
5738
5739         pthread_t t;
5740
5741 #if HAVE_PTHREADS_D4
5742         pthread_create(&t, pthread_attr_default, NULL, NULL);
5743         pthread_detach( &t );
5744 #else
5745         pthread_create(&t, NULL, NULL, NULL);
5746         pthread_detach( t );
5747 #endif
5748 #ifdef HAVE_LINUX_THREADS
5749         pthread_kill_other_threads_np();
5750 #endif
5751
5752 ; return 0; }
5753 EOF
5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5755   rm -rf conftest*
5756   ol_cv_pthread_lib_lpthreads=yes
5757 else
5758   echo "configure: failed program was:" >&5
5759   cat conftest.$ac_ext >&5
5760   rm -rf conftest*
5761   ol_cv_pthread_lib_lpthreads=no
5762 fi
5763 rm -f conftest*
5764
5765                 # restore the LIBS
5766                 LIBS="$ol_LIBS"
5767                 
5768 fi
5769
5770 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
5771
5772                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
5773                         ol_link_pthreads="-lpthreads"
5774                         ol_link_threads=posix
5775                 fi
5776         fi
5777
5778
5779                 if test $ol_link_threads != no ; then
5780                         cat >> confdefs.h <<\EOF
5781 #define HAVE_PTHREADS 1
5782 EOF
5783
5784
5785                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
5786
5787                                                 save_CPPFLAGS="$CPPFLAGS"
5788                         save_LIBS="$LIBS"
5789                         LIBS="$LTHREAD_LIBS $LIBS"
5790
5791                                                                                                 for ac_func in sched_yield pthread_yield
5792 do
5793 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5794 echo "configure:5795: checking for $ac_func" >&5
5795 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5796   echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798   cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801 /* System header to define __stub macros and hopefully few prototypes,
5802     which can conflict with char $ac_func(); below.  */
5803 #include <assert.h>
5804 /* Override any gcc2 internal prototype to avoid an error.  */
5805 /* We use char because int might match the return type of a gcc2
5806     builtin and then its argument prototype would still apply.  */
5807 char $ac_func();
5808
5809 int main() {
5810
5811 /* The GNU C library defines this for functions which it implements
5812     to always fail with ENOSYS.  Some functions are actually named
5813     something starting with __ and the normal name is an alias.  */
5814 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5815 choke me
5816 #else
5817 $ac_func();
5818 #endif
5819
5820 ; return 0; }
5821 EOF
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5823   rm -rf conftest*
5824   eval "ac_cv_func_$ac_func=yes"
5825 else
5826   echo "configure: failed program was:" >&5
5827   cat conftest.$ac_ext >&5
5828   rm -rf conftest*
5829   eval "ac_cv_func_$ac_func=no"
5830 fi
5831 rm -f conftest*
5832 fi
5833
5834 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5835   echo "$ac_t""yes" 1>&6
5836     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5837   cat >> confdefs.h <<EOF
5838 #define $ac_tr_func 1
5839 EOF
5840  
5841 else
5842   echo "$ac_t""no" 1>&6
5843 fi
5844 done
5845
5846
5847                         if test $ac_cv_func_sched_yield = no -a \
5848                                 $ac_cv_func_pthread_yield = no ; then
5849                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5850 echo "configure:5851: checking for sched_yield in -lrt" >&5
5851 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5853   echo $ac_n "(cached) $ac_c" 1>&6
5854 else
5855   ac_save_LIBS="$LIBS"
5856 LIBS="-lrt  $LIBS"
5857 cat > conftest.$ac_ext <<EOF
5858 #line 5859 "configure"
5859 #include "confdefs.h"
5860 /* Override any gcc2 internal prototype to avoid an error.  */
5861 /* We use char because int might match the return type of a gcc2
5862     builtin and then its argument prototype would still apply.  */
5863 char sched_yield();
5864
5865 int main() {
5866 sched_yield()
5867 ; return 0; }
5868 EOF
5869 if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5870   rm -rf conftest*
5871   eval "ac_cv_lib_$ac_lib_var=yes"
5872 else
5873   echo "configure: failed program was:" >&5
5874   cat conftest.$ac_ext >&5
5875   rm -rf conftest*
5876   eval "ac_cv_lib_$ac_lib_var=no"
5877 fi
5878 rm -f conftest*
5879 LIBS="$ac_save_LIBS"
5880
5881 fi
5882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5885                                         cat >> confdefs.h <<\EOF
5886 #define HAVE_SCHED_YIELD 1
5887 EOF
5888
5889                                         ac_cv_func_sched_yield=yes
5890 else
5891   echo "$ac_t""no" 1>&6
5892 ac_cv_func_sched_yield=no
5893 fi
5894
5895                         fi
5896                         if test $ac_cv_func_sched_yield = no -a \
5897                                 $ac_cv_func_pthread_yield = no ; then
5898                                                                                                 for ac_func in thr_yield
5899 do
5900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5901 echo "configure:5902: checking for $ac_func" >&5
5902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5903   echo $ac_n "(cached) $ac_c" 1>&6
5904 else
5905   cat > conftest.$ac_ext <<EOF
5906 #line 5907 "configure"
5907 #include "confdefs.h"
5908 /* System header to define __stub macros and hopefully few prototypes,
5909     which can conflict with char $ac_func(); below.  */
5910 #include <assert.h>
5911 /* Override any gcc2 internal prototype to avoid an error.  */
5912 /* We use char because int might match the return type of a gcc2
5913     builtin and then its argument prototype would still apply.  */
5914 char $ac_func();
5915
5916 int main() {
5917
5918 /* The GNU C library defines this for functions which it implements
5919     to always fail with ENOSYS.  Some functions are actually named
5920     something starting with __ and the normal name is an alias.  */
5921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5922 choke me
5923 #else
5924 $ac_func();
5925 #endif
5926
5927 ; return 0; }
5928 EOF
5929 if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5930   rm -rf conftest*
5931   eval "ac_cv_func_$ac_func=yes"
5932 else
5933   echo "configure: failed program was:" >&5
5934   cat conftest.$ac_ext >&5
5935   rm -rf conftest*
5936   eval "ac_cv_func_$ac_func=no"
5937 fi
5938 rm -f conftest*
5939 fi
5940
5941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5942   echo "$ac_t""yes" 1>&6
5943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5944   cat >> confdefs.h <<EOF
5945 #define $ac_tr_func 1
5946 EOF
5947  
5948 else
5949   echo "$ac_t""no" 1>&6
5950 fi
5951 done
5952
5953                         fi
5954                         if test $ac_cv_func_sched_yield = no -a \
5955                                 $ac_cv_func_pthread_yield = no -a \
5956                                 "$ac_cv_func_thr_yield" = no ; then
5957                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5958                         fi
5959
5960                                                 for ac_func in pthread_kill
5961 do
5962 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5963 echo "configure:5964: checking for $ac_func" >&5
5964 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5965   echo $ac_n "(cached) $ac_c" 1>&6
5966 else
5967   cat > conftest.$ac_ext <<EOF
5968 #line 5969 "configure"
5969 #include "confdefs.h"
5970 /* System header to define __stub macros and hopefully few prototypes,
5971     which can conflict with char $ac_func(); below.  */
5972 #include <assert.h>
5973 /* Override any gcc2 internal prototype to avoid an error.  */
5974 /* We use char because int might match the return type of a gcc2
5975     builtin and then its argument prototype would still apply.  */
5976 char $ac_func();
5977
5978 int main() {
5979
5980 /* The GNU C library defines this for functions which it implements
5981     to always fail with ENOSYS.  Some functions are actually named
5982     something starting with __ and the normal name is an alias.  */
5983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5984 choke me
5985 #else
5986 $ac_func();
5987 #endif
5988
5989 ; return 0; }
5990 EOF
5991 if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5992   rm -rf conftest*
5993   eval "ac_cv_func_$ac_func=yes"
5994 else
5995   echo "configure: failed program was:" >&5
5996   cat conftest.$ac_ext >&5
5997   rm -rf conftest*
5998   eval "ac_cv_func_$ac_func=no"
5999 fi
6000 rm -f conftest*
6001 fi
6002
6003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6006   cat >> confdefs.h <<EOF
6007 #define $ac_tr_func 1
6008 EOF
6009  
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013 done
6014
6015
6016                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6017 echo "configure:6018: checking for pthread_detach with <pthread.h>" >&5
6018 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6019   echo $ac_n "(cached) $ac_c" 1>&6
6020 else
6021   
6022                                                                 cat > conftest.$ac_ext <<EOF
6023 #line 6024 "configure"
6024 #include "confdefs.h"
6025
6026 #include <pthread.h>
6027 #ifndef NULL
6028 #define NULL (void*)0
6029 #endif
6030
6031 int main() {
6032 pthread_detach(NULL);
6033 ; return 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6036   rm -rf conftest*
6037   ol_cv_func_pthread_detach=yes
6038 else
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   ol_cv_func_pthread_detach=no
6043 fi
6044 rm -f conftest*
6045                         
6046 fi
6047
6048 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6049
6050                         if test $ol_cv_func_pthread_detach = no ; then
6051                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6052                         fi
6053
6054                         cat >> confdefs.h <<\EOF
6055 #define HAVE_PTHREAD_DETACH 1
6056 EOF
6057
6058
6059                                                 for ac_func in \
6060                                 pthread_setconcurrency \
6061                                 pthread_getconcurrency \
6062                                 thr_setconcurrency \
6063                                 thr_getconcurrency \
6064                         
6065 do
6066 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6067 echo "configure:6068: checking for $ac_func" >&5
6068 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6069   echo $ac_n "(cached) $ac_c" 1>&6
6070 else
6071   cat > conftest.$ac_ext <<EOF
6072 #line 6073 "configure"
6073 #include "confdefs.h"
6074 /* System header to define __stub macros and hopefully few prototypes,
6075     which can conflict with char $ac_func(); below.  */
6076 #include <assert.h>
6077 /* Override any gcc2 internal prototype to avoid an error.  */
6078 /* We use char because int might match the return type of a gcc2
6079     builtin and then its argument prototype would still apply.  */
6080 char $ac_func();
6081
6082 int main() {
6083
6084 /* The GNU C library defines this for functions which it implements
6085     to always fail with ENOSYS.  Some functions are actually named
6086     something starting with __ and the normal name is an alias.  */
6087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6088 choke me
6089 #else
6090 $ac_func();
6091 #endif
6092
6093 ; return 0; }
6094 EOF
6095 if { (eval echo configure:6096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6096   rm -rf conftest*
6097   eval "ac_cv_func_$ac_func=yes"
6098 else
6099   echo "configure: failed program was:" >&5
6100   cat conftest.$ac_ext >&5
6101   rm -rf conftest*
6102   eval "ac_cv_func_$ac_func=no"
6103 fi
6104 rm -f conftest*
6105 fi
6106
6107 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6108   echo "$ac_t""yes" 1>&6
6109     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6110   cat >> confdefs.h <<EOF
6111 #define $ac_tr_func 1
6112 EOF
6113  
6114 else
6115   echo "$ac_t""no" 1>&6
6116 fi
6117 done
6118
6119
6120                         
6121         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6122 echo "configure:6123: checking for pthread_kill_other_threads_np" >&5
6123 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6124   echo $ac_n "(cached) $ac_c" 1>&6
6125 else
6126   cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 /* System header to define __stub macros and hopefully few prototypes,
6130     which can conflict with char pthread_kill_other_threads_np(); below.  */
6131 #include <assert.h>
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char pthread_kill_other_threads_np();
6136
6137 int main() {
6138
6139 /* The GNU C library defines this for functions which it implements
6140     to always fail with ENOSYS.  Some functions are actually named
6141     something starting with __ and the normal name is an alias.  */
6142 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6143 choke me
6144 #else
6145 pthread_kill_other_threads_np();
6146 #endif
6147
6148 ; return 0; }
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151   rm -rf conftest*
6152   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6158 fi
6159 rm -f conftest*
6160 fi
6161
6162 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6163   echo "$ac_t""yes" 1>&6
6164   :
6165 else
6166   echo "$ac_t""no" 1>&6
6167 fi
6168
6169         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6170 echo "configure:6171: checking for LinuxThreads implementation" >&5
6171 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6172   echo $ac_n "(cached) $ac_c" 1>&6
6173 else
6174   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6175 fi
6176
6177 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6178
6179                         
6180         
6181         
6182         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6183 echo "configure:6184: checking for LinuxThreads consistency" >&5
6184 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6185   echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187   
6188                 if test $ol_cv_header_linux_threads = yes -a \
6189                         $ol_cv_sys_linux_threads = yes; then
6190                         ol_cv_linux_threads=yes
6191                 elif test $ol_cv_header_linux_threads = no -a \
6192                         $ol_cv_sys_linux_threads = no; then
6193                         ol_cv_linux_threads=no
6194                 else
6195                         ol_cv_linux_threads=error
6196                 fi
6197         
6198 fi
6199
6200 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6201
6202
6203                         if test $ol_cv_linux_threads = error; then
6204                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6205                         fi
6206
6207                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6208 echo "configure:6209: checking if pthread_create() works" >&5
6209                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6210   echo $ac_n "(cached) $ac_c" 1>&6
6211 else
6212   
6213                         if test "$cross_compiling" = yes; then
6214                                 ol_cv_pthread_create_works=yes
6215 else
6216   cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219
6220 #include <pthread.h>
6221 #ifndef NULL
6222 #define NULL (void*)0
6223 #endif
6224
6225 static void *task(p)
6226         void *p;
6227 {
6228         return (void *) (p == NULL);
6229 }
6230
6231 int main(argc, argv)
6232         int argc;
6233         char **argv;
6234 {
6235         pthread_t t;
6236 #if HAVE_PTHREADS_D4
6237         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6238 #else
6239         exit(pthread_create(&t, NULL, task, NULL));
6240 #endif
6241 }
6242
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6245 then
6246   ol_cv_pthread_create_works=yes
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -fr conftest*
6251   ol_cv_pthread_create_works=no
6252 fi
6253 rm -fr conftest*
6254 fi
6255
6256 fi
6257
6258                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6259
6260                         if test $ol_cv_pthread_create_works = no ; then
6261                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6262                         fi
6263
6264                                                 if test $ol_with_yielding_select = auto ; then
6265                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6266 echo "configure:6267: checking if select yields when using pthreads" >&5
6267                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6268   echo $ac_n "(cached) $ac_c" 1>&6
6269 else
6270   
6271                                 if test "$cross_compiling" = yes; then
6272   
6273                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6274 else
6275   cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278
6279 #include <sys/types.h>
6280 #include <sys/time.h>
6281 #include <unistd.h>
6282 #include <pthread.h>
6283 #ifndef NULL
6284 #define NULL (void*) 0
6285 #endif
6286
6287 static int fildes[2];
6288
6289 static void *task(p)
6290         void *p;
6291 {
6292         int i;
6293         struct timeval tv;
6294
6295         fd_set rfds;
6296
6297         tv.tv_sec=10;
6298         tv.tv_usec=0;
6299
6300         FD_ZERO(&rfds);
6301         FD_SET(fildes[0], &rfds);
6302
6303         /* we're not interested in any fds */
6304         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6305
6306         if(i < 0) {
6307                 perror("select");
6308                 exit(10);
6309         }
6310
6311         exit(0); /* if we exit here, the select blocked the whole process */
6312 }
6313
6314 int main(argc, argv)
6315         int argc;
6316         char **argv;
6317 {
6318         pthread_t t;
6319
6320         /* create a pipe to select */
6321         if(pipe(&fildes[0])) {
6322                 perror("select");
6323                 exit(1);
6324         }
6325
6326 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6327         (void) pthread_setconcurrency(2);
6328 #else
6329 #ifdef HAVE_THR_SETCONCURRENCY
6330         /* Set Solaris LWP concurrency to 2 */
6331         thr_setconcurrency(2);
6332 #endif
6333 #endif
6334
6335 #if HAVE_PTHREADS_D4
6336         pthread_create(&t, pthread_attr_default, task, NULL);
6337 #else
6338         pthread_create(&t, NULL, task, NULL);
6339 #endif
6340
6341 #if HAVE_SCHED_YIELD
6342         sched_yield();  /* make sure task runs first */
6343 #else
6344 #ifdef HAVE_PTHREAD_YIELD
6345         pthread_yield();        /* make sure task runs first */
6346 #endif
6347 #endif
6348
6349         exit(2);
6350 }
6351 EOF
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6353 then
6354   ol_cv_pthread_select_yields=no
6355 else
6356   echo "configure: failed program was:" >&5
6357   cat conftest.$ac_ext >&5
6358   rm -fr conftest*
6359   ol_cv_pthread_select_yields=yes
6360 fi
6361 rm -fr conftest*
6362 fi
6363
6364 fi
6365
6366                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6367
6368                                 if test $ol_cv_pthread_select_yields = yes ; then
6369                                         ol_with_yielding_select=yes
6370                                 fi
6371                         fi
6372
6373                                                 CPPFLAGS="$save_CPPFLAGS"
6374                         LIBS="$save_LIBS"
6375                 else
6376                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6377                 fi
6378         fi
6379
6380         if test $ol_with_threads = posix ; then
6381                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6382         fi
6383 fi
6384
6385 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6386         -o $ol_with_threads = mach ; then
6387
6388                 for ac_hdr in mach/cthreads.h
6389 do
6390 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6391 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6392 echo "configure:6393: checking for $ac_hdr" >&5
6393 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6394   echo $ac_n "(cached) $ac_c" 1>&6
6395 else
6396   cat > conftest.$ac_ext <<EOF
6397 #line 6398 "configure"
6398 #include "confdefs.h"
6399 #include <$ac_hdr>
6400 EOF
6401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6402 { (eval echo configure:6403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6404 if test -z "$ac_err"; then
6405   rm -rf conftest*
6406   eval "ac_cv_header_$ac_safe=yes"
6407 else
6408   echo "$ac_err" >&5
6409   echo "configure: failed program was:" >&5
6410   cat conftest.$ac_ext >&5
6411   rm -rf conftest*
6412   eval "ac_cv_header_$ac_safe=no"
6413 fi
6414 rm -f conftest*
6415 fi
6416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6417   echo "$ac_t""yes" 1>&6
6418     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6419   cat >> confdefs.h <<EOF
6420 #define $ac_tr_hdr 1
6421 EOF
6422  
6423 else
6424   echo "$ac_t""no" 1>&6
6425 fi
6426 done
6427
6428         if test $ac_cv_header_mach_cthreads_h = yes ; then
6429                 ol_with_threads=found
6430
6431                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6432 echo "configure:6433: checking for cthread_fork" >&5
6433 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6434   echo $ac_n "(cached) $ac_c" 1>&6
6435 else
6436   cat > conftest.$ac_ext <<EOF
6437 #line 6438 "configure"
6438 #include "confdefs.h"
6439 /* System header to define __stub macros and hopefully few prototypes,
6440     which can conflict with char cthread_fork(); below.  */
6441 #include <assert.h>
6442 /* Override any gcc2 internal prototype to avoid an error.  */
6443 /* We use char because int might match the return type of a gcc2
6444     builtin and then its argument prototype would still apply.  */
6445 char cthread_fork();
6446
6447 int main() {
6448
6449 /* The GNU C library defines this for functions which it implements
6450     to always fail with ENOSYS.  Some functions are actually named
6451     something starting with __ and the normal name is an alias.  */
6452 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6453 choke me
6454 #else
6455 cthread_fork();
6456 #endif
6457
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6461   rm -rf conftest*
6462   eval "ac_cv_func_cthread_fork=yes"
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   eval "ac_cv_func_cthread_fork=no"
6468 fi
6469 rm -f conftest*
6470 fi
6471
6472 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6473   echo "$ac_t""yes" 1>&6
6474   ol_link_threads=yes
6475 else
6476   echo "$ac_t""no" 1>&6
6477 fi
6478
6479
6480                 if test $ol_link_threads = no ; then
6481                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6482 echo "configure:6483: checking for cthread_fork with -all_load" >&5
6483 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6484   echo $ac_n "(cached) $ac_c" 1>&6
6485 else
6486   
6487                                                                 save_LIBS="$LIBS"
6488                                 LIBS="-all_load $LIBS"
6489                                 cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6492 #include <mach/cthreads.h>
6493 int main() {
6494
6495                                         cthread_fork((void *)0, (void *)0);
6496                                         
6497 ; return 0; }
6498 EOF
6499 if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6500   rm -rf conftest*
6501   ol_cv_cthread_all_load=yes
6502 else
6503   echo "configure: failed program was:" >&5
6504   cat conftest.$ac_ext >&5
6505   rm -rf conftest*
6506   ol_cv_cthread_all_load=no
6507 fi
6508 rm -f conftest*
6509                                                                 LIBS="$save_LIBS"
6510                         
6511 fi
6512
6513 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6514
6515                         if test $ol_cv_cthread_all_load = yes ; then
6516                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6517                                 ol_link_threads=mach
6518                         fi
6519                 fi
6520
6521                 if test $ol_link_threads != no ; then
6522                         : check for cthread specific functionality here
6523                         cat >> confdefs.h <<\EOF
6524 #define HAVE_MACH_CTHREADS 1
6525 EOF
6526
6527                 else
6528                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6529                 fi
6530         fi
6531
6532         if test $ol_with_threads = mach ; then
6533                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6534         fi
6535 fi
6536
6537 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6538         -o $ol_with_threads = lwp ; then
6539
6540                 for ac_hdr in thread.h synch.h
6541 do
6542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6543 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6544 echo "configure:6545: checking for $ac_hdr" >&5
6545 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 #include <$ac_hdr>
6552 EOF
6553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6554 { (eval echo configure:6555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6556 if test -z "$ac_err"; then
6557   rm -rf conftest*
6558   eval "ac_cv_header_$ac_safe=yes"
6559 else
6560   echo "$ac_err" >&5
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   eval "ac_cv_header_$ac_safe=no"
6565 fi
6566 rm -f conftest*
6567 fi
6568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6569   echo "$ac_t""yes" 1>&6
6570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6571   cat >> confdefs.h <<EOF
6572 #define $ac_tr_hdr 1
6573 EOF
6574  
6575 else
6576   echo "$ac_t""no" 1>&6
6577 fi
6578 done
6579
6580         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6581                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6582 echo "configure:6583: checking for thr_create in -lthread" >&5
6583 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6585   echo $ac_n "(cached) $ac_c" 1>&6
6586 else
6587   ac_save_LIBS="$LIBS"
6588 LIBS="-lthread  $LIBS"
6589 cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 /* Override any gcc2 internal prototype to avoid an error.  */
6593 /* We use char because int might match the return type of a gcc2
6594     builtin and then its argument prototype would still apply.  */
6595 char thr_create();
6596
6597 int main() {
6598 thr_create()
6599 ; return 0; }
6600 EOF
6601 if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=yes"
6604 else
6605   echo "configure: failed program was:" >&5
6606   cat conftest.$ac_ext >&5
6607   rm -rf conftest*
6608   eval "ac_cv_lib_$ac_lib_var=no"
6609 fi
6610 rm -f conftest*
6611 LIBS="$ac_save_LIBS"
6612
6613 fi
6614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6615   echo "$ac_t""yes" 1>&6
6616   have_thr=yes
6617 else
6618   echo "$ac_t""no" 1>&6
6619 have_thr=no
6620 fi
6621
6622
6623                 if test $have_thr = yes ; then
6624                         cat >> confdefs.h <<\EOF
6625 #define HAVE_THR 1
6626 EOF
6627
6628                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6629                         ol_link_threads=thr
6630
6631                         if test $ol_with_yielding_select = auto ; then
6632                                 ol_with_yielding_select=yes
6633                         fi
6634
6635                                                 for ac_func in \
6636                                 thr_setconcurrency \
6637                                 thr_getconcurrency \
6638                         
6639 do
6640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6641 echo "configure:6642: checking for $ac_func" >&5
6642 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* System header to define __stub macros and hopefully few prototypes,
6649     which can conflict with char $ac_func(); below.  */
6650 #include <assert.h>
6651 /* Override any gcc2 internal prototype to avoid an error.  */
6652 /* We use char because int might match the return type of a gcc2
6653     builtin and then its argument prototype would still apply.  */
6654 char $ac_func();
6655
6656 int main() {
6657
6658 /* The GNU C library defines this for functions which it implements
6659     to always fail with ENOSYS.  Some functions are actually named
6660     something starting with __ and the normal name is an alias.  */
6661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6662 choke me
6663 #else
6664 $ac_func();
6665 #endif
6666
6667 ; return 0; }
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6670   rm -rf conftest*
6671   eval "ac_cv_func_$ac_func=yes"
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   eval "ac_cv_func_$ac_func=no"
6677 fi
6678 rm -f conftest*
6679 fi
6680
6681 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6682   echo "$ac_t""yes" 1>&6
6683     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6684   cat >> confdefs.h <<EOF
6685 #define $ac_tr_func 1
6686 EOF
6687  
6688 else
6689   echo "$ac_t""no" 1>&6
6690 fi
6691 done
6692
6693                 fi
6694         fi
6695
6696                 for ac_hdr in lwp/lwp.h
6697 do
6698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_hdr" >&5
6701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 #include <$ac_hdr>
6708 EOF
6709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6710 { (eval echo configure:6711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6712 if test -z "$ac_err"; then
6713   rm -rf conftest*
6714   eval "ac_cv_header_$ac_safe=yes"
6715 else
6716   echo "$ac_err" >&5
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_header_$ac_safe=no"
6721 fi
6722 rm -f conftest*
6723 fi
6724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6727   cat >> confdefs.h <<EOF
6728 #define $ac_tr_hdr 1
6729 EOF
6730  
6731 else
6732   echo "$ac_t""no" 1>&6
6733 fi
6734 done
6735
6736         if test $ac_cv_header_lwp_lwp_h = yes ; then
6737                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6738 echo "configure:6739: checking for lwp_create in -llwp" >&5
6739 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   ac_save_LIBS="$LIBS"
6744 LIBS="-llwp  $LIBS"
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* Override any gcc2 internal prototype to avoid an error.  */
6749 /* We use char because int might match the return type of a gcc2
6750     builtin and then its argument prototype would still apply.  */
6751 char lwp_create();
6752
6753 int main() {
6754 lwp_create()
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6758   rm -rf conftest*
6759   eval "ac_cv_lib_$ac_lib_var=yes"
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=no"
6765 fi
6766 rm -f conftest*
6767 LIBS="$ac_save_LIBS"
6768
6769 fi
6770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6771   echo "$ac_t""yes" 1>&6
6772   have_lwp=yes
6773 else
6774   echo "$ac_t""no" 1>&6
6775 have_lwp=no
6776 fi
6777
6778
6779                 if test $have_lwp = yes ; then
6780                         cat >> confdefs.h <<\EOF
6781 #define HAVE_LWP 1
6782 EOF
6783
6784                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6785                         ol_link_threads=lwp
6786
6787                         if test $ol_with_yielding_select = auto ; then
6788                                 ol_with_yielding_select=no
6789                         fi
6790                 fi
6791         fi
6792 fi
6793
6794 if test $ol_with_yielding_select = yes ; then
6795         cat >> confdefs.h <<\EOF
6796 #define HAVE_YIELDING_SELECT 1
6797 EOF
6798
6799 fi
6800
6801 if test $ol_with_threads = manual ; then
6802                 ol_link_threads=yes
6803
6804         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6805
6806         for ac_hdr in pthread.h sched.h
6807 do
6808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6810 echo "configure:6811: checking for $ac_hdr" >&5
6811 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6812   echo $ac_n "(cached) $ac_c" 1>&6
6813 else
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817 #include <$ac_hdr>
6818 EOF
6819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6820 { (eval echo configure:6821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6822 if test -z "$ac_err"; then
6823   rm -rf conftest*
6824   eval "ac_cv_header_$ac_safe=yes"
6825 else
6826   echo "$ac_err" >&5
6827   echo "configure: failed program was:" >&5
6828   cat conftest.$ac_ext >&5
6829   rm -rf conftest*
6830   eval "ac_cv_header_$ac_safe=no"
6831 fi
6832 rm -f conftest*
6833 fi
6834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6835   echo "$ac_t""yes" 1>&6
6836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6837   cat >> confdefs.h <<EOF
6838 #define $ac_tr_hdr 1
6839 EOF
6840  
6841 else
6842   echo "$ac_t""no" 1>&6
6843 fi
6844 done
6845
6846         for ac_func in sched_yield pthread_yield
6847 do
6848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6849 echo "configure:6850: checking for $ac_func" >&5
6850 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6851   echo $ac_n "(cached) $ac_c" 1>&6
6852 else
6853   cat > conftest.$ac_ext <<EOF
6854 #line 6855 "configure"
6855 #include "confdefs.h"
6856 /* System header to define __stub macros and hopefully few prototypes,
6857     which can conflict with char $ac_func(); below.  */
6858 #include <assert.h>
6859 /* Override any gcc2 internal prototype to avoid an error.  */
6860 /* We use char because int might match the return type of a gcc2
6861     builtin and then its argument prototype would still apply.  */
6862 char $ac_func();
6863
6864 int main() {
6865
6866 /* The GNU C library defines this for functions which it implements
6867     to always fail with ENOSYS.  Some functions are actually named
6868     something starting with __ and the normal name is an alias.  */
6869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6870 choke me
6871 #else
6872 $ac_func();
6873 #endif
6874
6875 ; return 0; }
6876 EOF
6877 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6878   rm -rf conftest*
6879   eval "ac_cv_func_$ac_func=yes"
6880 else
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_func_$ac_func=no"
6885 fi
6886 rm -f conftest*
6887 fi
6888
6889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6890   echo "$ac_t""yes" 1>&6
6891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6892   cat >> confdefs.h <<EOF
6893 #define $ac_tr_func 1
6894 EOF
6895  
6896 else
6897   echo "$ac_t""no" 1>&6
6898 fi
6899 done
6900
6901         
6902         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6903 echo "configure:6904: checking for LinuxThreads pthread.h" >&5
6904 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6905   echo $ac_n "(cached) $ac_c" 1>&6
6906 else
6907   cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910 #include <pthread.h>
6911 EOF
6912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6913   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6914   rm -rf conftest*
6915   ol_cv_header_linux_threads=yes
6916 else
6917   rm -rf conftest*
6918   ol_cv_header_linux_threads=no
6919 fi
6920 rm -f conftest*
6921
6922                 
6923 fi
6924
6925 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6926         if test $ol_cv_header_linux_threads = yes; then
6927                 cat >> confdefs.h <<\EOF
6928 #define HAVE_LINUX_THREADS 1
6929 EOF
6930
6931         fi
6932
6933
6934         for ac_hdr in mach/cthreads.h
6935 do
6936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6938 echo "configure:6939: checking for $ac_hdr" >&5
6939 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6940   echo $ac_n "(cached) $ac_c" 1>&6
6941 else
6942   cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6945 #include <$ac_hdr>
6946 EOF
6947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6948 { (eval echo configure:6949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6950 if test -z "$ac_err"; then
6951   rm -rf conftest*
6952   eval "ac_cv_header_$ac_safe=yes"
6953 else
6954   echo "$ac_err" >&5
6955   echo "configure: failed program was:" >&5
6956   cat conftest.$ac_ext >&5
6957   rm -rf conftest*
6958   eval "ac_cv_header_$ac_safe=no"
6959 fi
6960 rm -f conftest*
6961 fi
6962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6963   echo "$ac_t""yes" 1>&6
6964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6965   cat >> confdefs.h <<EOF
6966 #define $ac_tr_hdr 1
6967 EOF
6968  
6969 else
6970   echo "$ac_t""no" 1>&6
6971 fi
6972 done
6973
6974         for ac_hdr in lwp/lwp.h
6975 do
6976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6978 echo "configure:6979: checking for $ac_hdr" >&5
6979 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985 #include <$ac_hdr>
6986 EOF
6987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6988 { (eval echo configure:6989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6990 if test -z "$ac_err"; then
6991   rm -rf conftest*
6992   eval "ac_cv_header_$ac_safe=yes"
6993 else
6994   echo "$ac_err" >&5
6995   echo "configure: failed program was:" >&5
6996   cat conftest.$ac_ext >&5
6997   rm -rf conftest*
6998   eval "ac_cv_header_$ac_safe=no"
6999 fi
7000 rm -f conftest*
7001 fi
7002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7003   echo "$ac_t""yes" 1>&6
7004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7005   cat >> confdefs.h <<EOF
7006 #define $ac_tr_hdr 1
7007 EOF
7008  
7009 else
7010   echo "$ac_t""no" 1>&6
7011 fi
7012 done
7013
7014         for ac_hdr in thread.h synch.h
7015 do
7016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7018 echo "configure:7019: checking for $ac_hdr" >&5
7019 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7020   echo $ac_n "(cached) $ac_c" 1>&6
7021 else
7022   cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 #include <$ac_hdr>
7026 EOF
7027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7028 { (eval echo configure:7029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7030 if test -z "$ac_err"; then
7031   rm -rf conftest*
7032   eval "ac_cv_header_$ac_safe=yes"
7033 else
7034   echo "$ac_err" >&5
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   eval "ac_cv_header_$ac_safe=no"
7039 fi
7040 rm -f conftest*
7041 fi
7042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7043   echo "$ac_t""yes" 1>&6
7044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7045   cat >> confdefs.h <<EOF
7046 #define $ac_tr_hdr 1
7047 EOF
7048  
7049 else
7050   echo "$ac_t""no" 1>&6
7051 fi
7052 done
7053
7054 fi
7055
7056 if test $ol_link_threads != no ; then  
7057                         cat >> confdefs.h <<\EOF
7058 #define REENTRANT 1
7059 EOF
7060
7061         cat >> confdefs.h <<\EOF
7062 #define _REENTRANT 1
7063 EOF
7064
7065         cat >> confdefs.h <<\EOF
7066 #define THREAD_SAFE 1
7067 EOF
7068
7069         cat >> confdefs.h <<\EOF
7070 #define _THREAD_SAFE 1
7071 EOF
7072
7073         cat >> confdefs.h <<\EOF
7074 #define THREADSAFE 1
7075 EOF
7076
7077         cat >> confdefs.h <<\EOF
7078 #define _THREADSAFE 1
7079 EOF
7080
7081
7082                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7083 echo "configure:7084: checking for thread specific errno" >&5
7084 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7085   echo $ac_n "(cached) $ac_c" 1>&6
7086 else
7087   
7088                 cat > conftest.$ac_ext <<EOF
7089 #line 7090 "configure"
7090 #include "confdefs.h"
7091 #include <errno.h>
7092 int main() {
7093 errno = 0;
7094 ; return 0; }
7095 EOF
7096 if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7097   rm -rf conftest*
7098   ol_cv_errno_thread_specific=yes
7099 else
7100   echo "configure: failed program was:" >&5
7101   cat conftest.$ac_ext >&5
7102   rm -rf conftest*
7103   ol_cv_errno_thread_specific=no
7104 fi
7105 rm -f conftest*
7106         
7107 fi
7108
7109 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7110
7111         if test $ol_cv_errno_thread_specific != yes ; then
7112                 LIBS="$LTHREAD_LIBS $LIBS"
7113                 LTHREAD_LIBS=""
7114         fi
7115
7116 fi  
7117
7118 if test $ol_link_threads = no ; then
7119         if test $ol_with_threads = yes ; then
7120                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7121         fi
7122
7123         if test $ol_with_threads = auto ; then
7124                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7125                 ol_with_threads=no
7126         fi
7127
7128         cat >> confdefs.h <<\EOF
7129 #define NO_THREADS 1
7130 EOF
7131
7132         LTHREAD_LIBS=""
7133 fi
7134
7135 if test $ol_link_threads != no ; then
7136         cat >> confdefs.h <<\EOF
7137 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7138 EOF
7139
7140 fi
7141
7142
7143 ol_link_ldbm=no 
7144 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7145         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7146 echo "configure:7147: checking for DB2 library" >&5
7147 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7148   echo $ac_n "(cached) $ac_c" 1>&6
7149 else
7150         ol_LIBS="$LIBS"
7151         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7152 echo "configure:7153: checking for db_open in -ldb" >&5
7153 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7154 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7155   echo $ac_n "(cached) $ac_c" 1>&6
7156 else
7157   ac_save_LIBS="$LIBS"
7158 LIBS="-ldb  $LIBS"
7159 cat > conftest.$ac_ext <<EOF
7160 #line 7161 "configure"
7161 #include "confdefs.h"
7162 /* Override any gcc2 internal prototype to avoid an error.  */
7163 /* We use char because int might match the return type of a gcc2
7164     builtin and then its argument prototype would still apply.  */
7165 char db_open();
7166
7167 int main() {
7168 db_open()
7169 ; return 0; }
7170 EOF
7171 if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7172   rm -rf conftest*
7173   eval "ac_cv_lib_$ac_lib_var=yes"
7174 else
7175   echo "configure: failed program was:" >&5
7176   cat conftest.$ac_ext >&5
7177   rm -rf conftest*
7178   eval "ac_cv_lib_$ac_lib_var=no"
7179 fi
7180 rm -f conftest*
7181 LIBS="$ac_save_LIBS"
7182
7183 fi
7184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7185   echo "$ac_t""yes" 1>&6
7186   ol_cv_lib_db2=-ldb
7187 else
7188   echo "$ac_t""no" 1>&6
7189 ol_cv_lib_db2=no
7190 fi
7191
7192         LIBS="$ol_LIBS"
7193
7194 fi
7195
7196 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7197
7198 for ac_hdr in db.h
7199 do
7200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7202 echo "configure:7203: checking for $ac_hdr" >&5
7203 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7204   echo $ac_n "(cached) $ac_c" 1>&6
7205 else
7206   cat > conftest.$ac_ext <<EOF
7207 #line 7208 "configure"
7208 #include "confdefs.h"
7209 #include <$ac_hdr>
7210 EOF
7211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7212 { (eval echo configure:7213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7214 if test -z "$ac_err"; then
7215   rm -rf conftest*
7216   eval "ac_cv_header_$ac_safe=yes"
7217 else
7218   echo "$ac_err" >&5
7219   echo "configure: failed program was:" >&5
7220   cat conftest.$ac_ext >&5
7221   rm -rf conftest*
7222   eval "ac_cv_header_$ac_safe=no"
7223 fi
7224 rm -f conftest*
7225 fi
7226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7227   echo "$ac_t""yes" 1>&6
7228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7229   cat >> confdefs.h <<EOF
7230 #define $ac_tr_hdr 1
7231 EOF
7232  
7233 else
7234   echo "$ac_t""no" 1>&6
7235 fi
7236 done
7237
7238 if test $ac_cv_header_db_h = yes ; then
7239         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7240 echo "configure:7241: checking if db.h is DB2" >&5
7241 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7242   echo $ac_n "(cached) $ac_c" 1>&6
7243 else
7244   
7245                 cat > conftest.$ac_ext <<EOF
7246 #line 7247 "configure"
7247 #include "confdefs.h"
7248
7249 #                       include <db.h>
7250                         /* this check could be improved */
7251 #                       ifdef DB_VERSION_MAJOR
7252 #                               if DB_VERSION_MAJOR == 2
7253                                         __db_version_2
7254 #                               endif
7255 #                       endif
7256                 
7257 EOF
7258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7259   egrep "__db_version_2" >/dev/null 2>&1; then
7260   rm -rf conftest*
7261   ol_cv_header_db2=yes
7262 else
7263   rm -rf conftest*
7264   ol_cv_header_db2=no
7265 fi
7266 rm -f conftest*
7267
7268 fi
7269
7270 echo "$ac_t""$ol_cv_header_db2" 1>&6
7271 else
7272         ol_cv_header_db2=no
7273 fi
7274
7275
7276  
7277  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7278 echo "configure:7279: checking for Berkeley DB2" >&5
7279 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7280   echo $ac_n "(cached) $ac_c" 1>&6
7281 else
7282   
7283         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7284                 ol_cv_berkeley_db2=no
7285         else
7286                 ol_cv_berkeley_db2=yes
7287         fi
7288
7289 fi
7290
7291 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7292  if test $ol_cv_berkeley_db2 = yes ; then
7293         cat >> confdefs.h <<\EOF
7294 #define HAVE_BERKELEY_DB2 1
7295 EOF
7296
7297  fi
7298
7299
7300         if test $ol_cv_berkeley_db2 = yes ; then
7301                 ol_link_ldbm=db2
7302                 ol_with_ldbm_api=db2
7303
7304                 if test $ol_with_ldbm_type = hash ; then
7305                         cat >> confdefs.h <<\EOF
7306 #define LDBM_USE_DBHASH 1
7307 EOF
7308
7309                 else
7310                         cat >> confdefs.h <<\EOF
7311 #define LDBM_USE_DBBTREE 1
7312 EOF
7313
7314                 fi
7315
7316                                                 if test $ol_cv_lib_db2 != yes ; then
7317                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7318                 fi
7319         fi
7320 fi
7321
7322 ol_link_bdb2=no
7323 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7324         ol_link_bdb2=yes
7325 fi
7326
7327 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7328         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7329 echo "configure:7330: checking for Berkeley DB library" >&5
7330 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7331   echo $ac_n "(cached) $ac_c" 1>&6
7332 else
7333         ol_LIBS="$LIBS"
7334         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7335 echo "configure:7336: checking for dbopen" >&5
7336 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7337   echo $ac_n "(cached) $ac_c" 1>&6
7338 else
7339   cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342 /* System header to define __stub macros and hopefully few prototypes,
7343     which can conflict with char dbopen(); below.  */
7344 #include <assert.h>
7345 /* Override any gcc2 internal prototype to avoid an error.  */
7346 /* We use char because int might match the return type of a gcc2
7347     builtin and then its argument prototype would still apply.  */
7348 char dbopen();
7349
7350 int main() {
7351
7352 /* The GNU C library defines this for functions which it implements
7353     to always fail with ENOSYS.  Some functions are actually named
7354     something starting with __ and the normal name is an alias.  */
7355 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7356 choke me
7357 #else
7358 dbopen();
7359 #endif
7360
7361 ; return 0; }
7362 EOF
7363 if { (eval echo configure:7364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7364   rm -rf conftest*
7365   eval "ac_cv_func_dbopen=yes"
7366 else
7367   echo "configure: failed program was:" >&5
7368   cat conftest.$ac_ext >&5
7369   rm -rf conftest*
7370   eval "ac_cv_func_dbopen=no"
7371 fi
7372 rm -f conftest*
7373 fi
7374
7375 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7376   echo "$ac_t""yes" 1>&6
7377   ol_cv_lib_db=yes
7378 else
7379   echo "$ac_t""no" 1>&6
7380
7381                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7382 echo "configure:7383: checking for dbopen in -ldb" >&5
7383 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7385   echo $ac_n "(cached) $ac_c" 1>&6
7386 else
7387   ac_save_LIBS="$LIBS"
7388 LIBS="-ldb  $LIBS"
7389 cat > conftest.$ac_ext <<EOF
7390 #line 7391 "configure"
7391 #include "confdefs.h"
7392 /* Override any gcc2 internal prototype to avoid an error.  */
7393 /* We use char because int might match the return type of a gcc2
7394     builtin and then its argument prototype would still apply.  */
7395 char dbopen();
7396
7397 int main() {
7398 dbopen()
7399 ; return 0; }
7400 EOF
7401 if { (eval echo configure:7402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7402   rm -rf conftest*
7403   eval "ac_cv_lib_$ac_lib_var=yes"
7404 else
7405   echo "configure: failed program was:" >&5
7406   cat conftest.$ac_ext >&5
7407   rm -rf conftest*
7408   eval "ac_cv_lib_$ac_lib_var=no"
7409 fi
7410 rm -f conftest*
7411 LIBS="$ac_save_LIBS"
7412
7413 fi
7414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7415   echo "$ac_t""yes" 1>&6
7416   ol_cv_lib_db=-ldb
7417 else
7418   echo "$ac_t""no" 1>&6
7419 ol_cv_lib_db=no
7420 fi
7421
7422         
7423 fi
7424
7425         LIBS="$ol_LIBS"
7426
7427 fi
7428
7429 echo "$ac_t""$ol_cv_lib_db" 1>&6
7430
7431
7432 for ac_hdr in db_185.h
7433 do
7434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7436 echo "configure:7437: checking for $ac_hdr" >&5
7437 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7438   echo $ac_n "(cached) $ac_c" 1>&6
7439 else
7440   cat > conftest.$ac_ext <<EOF
7441 #line 7442 "configure"
7442 #include "confdefs.h"
7443 #include <$ac_hdr>
7444 EOF
7445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7446 { (eval echo configure:7447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7448 if test -z "$ac_err"; then
7449   rm -rf conftest*
7450   eval "ac_cv_header_$ac_safe=yes"
7451 else
7452   echo "$ac_err" >&5
7453   echo "configure: failed program was:" >&5
7454   cat conftest.$ac_ext >&5
7455   rm -rf conftest*
7456   eval "ac_cv_header_$ac_safe=no"
7457 fi
7458 rm -f conftest*
7459 fi
7460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7461   echo "$ac_t""yes" 1>&6
7462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7463   cat >> confdefs.h <<EOF
7464 #define $ac_tr_hdr 1
7465 EOF
7466  
7467 else
7468   echo "$ac_t""no" 1>&6
7469 fi
7470 done
7471
7472 if test "$ol_cv_header_db2" = yes ; then
7473         
7474         ol_cv_header_db=$ac_cv_header_db_185_h
7475 else
7476         ol_cv_header_db=$ac_cv_header_db_h
7477 fi
7478
7479
7480  
7481  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7482 echo "configure:7483: checking for Berkeley DB" >&5
7483 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7484   echo $ac_n "(cached) $ac_c" 1>&6
7485 else
7486   
7487         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7488                 ol_cv_berkeley_db=no
7489         else
7490                 ol_cv_berkeley_db=yes
7491         fi
7492
7493 fi
7494
7495 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7496  if test $ol_cv_berkeley_db = yes ; then
7497         cat >> confdefs.h <<\EOF
7498 #define HAVE_BERKELEY_DB 1
7499 EOF
7500
7501  fi
7502
7503
7504         if test $ol_cv_berkeley_db = yes ; then
7505                 ol_link_ldbm=db
7506                 ol_with_ldbm_api=db
7507
7508                 if test $ol_with_ldbm_type = hash ; then
7509                         cat >> confdefs.h <<\EOF
7510 #define LDBM_USE_DBHASH 1
7511 EOF
7512
7513                 else
7514                         cat >> confdefs.h <<\EOF
7515 #define LDBM_USE_DBBTREE 1
7516 EOF
7517
7518                 fi
7519
7520                                                 if test $ol_cv_lib_db != yes ; then
7521                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7522                 fi
7523         fi
7524 fi
7525
7526 if test $ol_with_ldbm_api = manual ; then
7527                 ol_link_ldbm=yes
7528
7529         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7530
7531         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7532 do
7533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7535 echo "configure:7536: checking for $ac_hdr" >&5
7536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7537   echo $ac_n "(cached) $ac_c" 1>&6
7538 else
7539   cat > conftest.$ac_ext <<EOF
7540 #line 7541 "configure"
7541 #include "confdefs.h"
7542 #include <$ac_hdr>
7543 EOF
7544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7545 { (eval echo configure:7546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7547 if test -z "$ac_err"; then
7548   rm -rf conftest*
7549   eval "ac_cv_header_$ac_safe=yes"
7550 else
7551   echo "$ac_err" >&5
7552   echo "configure: failed program was:" >&5
7553   cat conftest.$ac_ext >&5
7554   rm -rf conftest*
7555   eval "ac_cv_header_$ac_safe=no"
7556 fi
7557 rm -f conftest*
7558 fi
7559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7560   echo "$ac_t""yes" 1>&6
7561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7562   cat >> confdefs.h <<EOF
7563 #define $ac_tr_hdr 1
7564 EOF
7565  
7566 else
7567   echo "$ac_t""no" 1>&6
7568 fi
7569 done
7570
7571 fi
7572
7573 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7574         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7575         ol_with_ldbm_api=none
7576 fi
7577
7578 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7579         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7580 echo "configure:7581: checking for MDBM library" >&5
7581 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7582   echo $ac_n "(cached) $ac_c" 1>&6
7583 else
7584         ol_LIBS="$LIBS"
7585         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7586 echo "configure:7587: checking for mdbm_set_chain" >&5
7587 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7588   echo $ac_n "(cached) $ac_c" 1>&6
7589 else
7590   cat > conftest.$ac_ext <<EOF
7591 #line 7592 "configure"
7592 #include "confdefs.h"
7593 /* System header to define __stub macros and hopefully few prototypes,
7594     which can conflict with char mdbm_set_chain(); below.  */
7595 #include <assert.h>
7596 /* Override any gcc2 internal prototype to avoid an error.  */
7597 /* We use char because int might match the return type of a gcc2
7598     builtin and then its argument prototype would still apply.  */
7599 char mdbm_set_chain();
7600
7601 int main() {
7602
7603 /* The GNU C library defines this for functions which it implements
7604     to always fail with ENOSYS.  Some functions are actually named
7605     something starting with __ and the normal name is an alias.  */
7606 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7607 choke me
7608 #else
7609 mdbm_set_chain();
7610 #endif
7611
7612 ; return 0; }
7613 EOF
7614 if { (eval echo configure:7615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7615   rm -rf conftest*
7616   eval "ac_cv_func_mdbm_set_chain=yes"
7617 else
7618   echo "configure: failed program was:" >&5
7619   cat conftest.$ac_ext >&5
7620   rm -rf conftest*
7621   eval "ac_cv_func_mdbm_set_chain=no"
7622 fi
7623 rm -f conftest*
7624 fi
7625
7626 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7627   echo "$ac_t""yes" 1>&6
7628   ol_cv_lib_mdbm=yes
7629 else
7630   echo "$ac_t""no" 1>&6
7631
7632                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7633 echo "configure:7634: checking for mdbm_set_chain in -lmdbm" >&5
7634 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7635 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7636   echo $ac_n "(cached) $ac_c" 1>&6
7637 else
7638   ac_save_LIBS="$LIBS"
7639 LIBS="-lmdbm  $LIBS"
7640 cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 /* Override any gcc2 internal prototype to avoid an error.  */
7644 /* We use char because int might match the return type of a gcc2
7645     builtin and then its argument prototype would still apply.  */
7646 char mdbm_set_chain();
7647
7648 int main() {
7649 mdbm_set_chain()
7650 ; return 0; }
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7653   rm -rf conftest*
7654   eval "ac_cv_lib_$ac_lib_var=yes"
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -rf conftest*
7659   eval "ac_cv_lib_$ac_lib_var=no"
7660 fi
7661 rm -f conftest*
7662 LIBS="$ac_save_LIBS"
7663
7664 fi
7665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7666   echo "$ac_t""yes" 1>&6
7667   ol_cv_lib_mdbm=-lmdbm
7668 else
7669   echo "$ac_t""no" 1>&6
7670 ol_cv_lib_mdbm=no
7671 fi
7672
7673         
7674 fi
7675
7676         LIBS="$ol_LIBS"
7677
7678 fi
7679
7680 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7681
7682
7683  for ac_hdr in mdbm.h
7684 do
7685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7687 echo "configure:7688: checking for $ac_hdr" >&5
7688 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7689   echo $ac_n "(cached) $ac_c" 1>&6
7690 else
7691   cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 #include <$ac_hdr>
7695 EOF
7696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7697 { (eval echo configure:7698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7699 if test -z "$ac_err"; then
7700   rm -rf conftest*
7701   eval "ac_cv_header_$ac_safe=yes"
7702 else
7703   echo "$ac_err" >&5
7704   echo "configure: failed program was:" >&5
7705   cat conftest.$ac_ext >&5
7706   rm -rf conftest*
7707   eval "ac_cv_header_$ac_safe=no"
7708 fi
7709 rm -f conftest*
7710 fi
7711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7712   echo "$ac_t""yes" 1>&6
7713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7714   cat >> confdefs.h <<EOF
7715 #define $ac_tr_hdr 1
7716 EOF
7717  
7718 else
7719   echo "$ac_t""no" 1>&6
7720 fi
7721 done
7722
7723  echo $ac_n "checking for db""... $ac_c" 1>&6
7724 echo "configure:7725: checking for db" >&5
7725 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7726   echo $ac_n "(cached) $ac_c" 1>&6
7727 else
7728   
7729         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7730                 ol_cv_mdbm=no
7731         else
7732                 ol_cv_mdbm=yes
7733         fi
7734
7735 fi
7736
7737 echo "$ac_t""$ol_cv_mdbm" 1>&6
7738  if test $ol_cv_mdbm = yes ; then
7739         cat >> confdefs.h <<\EOF
7740 #define HAVE_MDBM 1
7741 EOF
7742
7743  fi
7744
7745
7746         if test $ol_cv_mdbm = yes ; then
7747                 ol_link_ldbm=mdbm
7748                 ol_with_ldbm_api=mdbm
7749                 if test $ol_cv_lib_mdbm != yes ; then
7750                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7751                 fi
7752         fi
7753 fi
7754
7755 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7756         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7757 echo "configure:7758: checking for GDBM library" >&5
7758 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7759   echo $ac_n "(cached) $ac_c" 1>&6
7760 else
7761         ol_LIBS="$LIBS"
7762         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7763 echo "configure:7764: checking for gdbm_open" >&5
7764 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7765   echo $ac_n "(cached) $ac_c" 1>&6
7766 else
7767   cat > conftest.$ac_ext <<EOF
7768 #line 7769 "configure"
7769 #include "confdefs.h"
7770 /* System header to define __stub macros and hopefully few prototypes,
7771     which can conflict with char gdbm_open(); below.  */
7772 #include <assert.h>
7773 /* Override any gcc2 internal prototype to avoid an error.  */
7774 /* We use char because int might match the return type of a gcc2
7775     builtin and then its argument prototype would still apply.  */
7776 char gdbm_open();
7777
7778 int main() {
7779
7780 /* The GNU C library defines this for functions which it implements
7781     to always fail with ENOSYS.  Some functions are actually named
7782     something starting with __ and the normal name is an alias.  */
7783 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7784 choke me
7785 #else
7786 gdbm_open();
7787 #endif
7788
7789 ; return 0; }
7790 EOF
7791 if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7792   rm -rf conftest*
7793   eval "ac_cv_func_gdbm_open=yes"
7794 else
7795   echo "configure: failed program was:" >&5
7796   cat conftest.$ac_ext >&5
7797   rm -rf conftest*
7798   eval "ac_cv_func_gdbm_open=no"
7799 fi
7800 rm -f conftest*
7801 fi
7802
7803 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7804   echo "$ac_t""yes" 1>&6
7805   ol_cv_lib_gdbm=yes
7806 else
7807   echo "$ac_t""no" 1>&6
7808
7809                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7810 echo "configure:7811: checking for gdbm_open in -lgdbm" >&5
7811 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7813   echo $ac_n "(cached) $ac_c" 1>&6
7814 else
7815   ac_save_LIBS="$LIBS"
7816 LIBS="-lgdbm  $LIBS"
7817 cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 /* Override any gcc2 internal prototype to avoid an error.  */
7821 /* We use char because int might match the return type of a gcc2
7822     builtin and then its argument prototype would still apply.  */
7823 char gdbm_open();
7824
7825 int main() {
7826 gdbm_open()
7827 ; return 0; }
7828 EOF
7829 if { (eval echo configure:7830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7830   rm -rf conftest*
7831   eval "ac_cv_lib_$ac_lib_var=yes"
7832 else
7833   echo "configure: failed program was:" >&5
7834   cat conftest.$ac_ext >&5
7835   rm -rf conftest*
7836   eval "ac_cv_lib_$ac_lib_var=no"
7837 fi
7838 rm -f conftest*
7839 LIBS="$ac_save_LIBS"
7840
7841 fi
7842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7843   echo "$ac_t""yes" 1>&6
7844   ol_cv_lib_gdbm=-lgdbm
7845 else
7846   echo "$ac_t""no" 1>&6
7847 ol_cv_lib_gdbm=no
7848 fi
7849
7850         
7851 fi
7852
7853         LIBS="$ol_LIBS"
7854
7855 fi
7856
7857 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7858
7859
7860  for ac_hdr in gdbm.h
7861 do
7862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7864 echo "configure:7865: checking for $ac_hdr" >&5
7865 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7866   echo $ac_n "(cached) $ac_c" 1>&6
7867 else
7868   cat > conftest.$ac_ext <<EOF
7869 #line 7870 "configure"
7870 #include "confdefs.h"
7871 #include <$ac_hdr>
7872 EOF
7873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7874 { (eval echo configure:7875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7876 if test -z "$ac_err"; then
7877   rm -rf conftest*
7878   eval "ac_cv_header_$ac_safe=yes"
7879 else
7880   echo "$ac_err" >&5
7881   echo "configure: failed program was:" >&5
7882   cat conftest.$ac_ext >&5
7883   rm -rf conftest*
7884   eval "ac_cv_header_$ac_safe=no"
7885 fi
7886 rm -f conftest*
7887 fi
7888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7889   echo "$ac_t""yes" 1>&6
7890     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7891   cat >> confdefs.h <<EOF
7892 #define $ac_tr_hdr 1
7893 EOF
7894  
7895 else
7896   echo "$ac_t""no" 1>&6
7897 fi
7898 done
7899
7900  echo $ac_n "checking for db""... $ac_c" 1>&6
7901 echo "configure:7902: checking for db" >&5
7902 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   
7906         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7907                 ol_cv_gdbm=no
7908         else
7909                 ol_cv_gdbm=yes
7910         fi
7911
7912 fi
7913
7914 echo "$ac_t""$ol_cv_gdbm" 1>&6
7915  if test $ol_cv_gdbm = yes ; then
7916         cat >> confdefs.h <<\EOF
7917 #define HAVE_GDBM 1
7918 EOF
7919
7920  fi
7921
7922
7923         if test $ol_cv_gdbm = yes ; then
7924                 ol_link_ldbm=gdbm
7925                 ol_with_ldbm_api=gdbm
7926
7927                 if test $ol_cv_lib_gdbm != yes ; then
7928                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7929                 fi
7930         fi
7931 fi
7932
7933 if test $ol_with_ldbm_api = auto ; then
7934         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7935 elif test $ol_with_ldbm_api = ndbm ; then
7936         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7937 echo "configure:7938: checking for NDBM library" >&5
7938 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941         ol_LIBS="$LIBS"
7942         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7943 echo "configure:7944: checking for dbm_open" >&5
7944 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7945   echo $ac_n "(cached) $ac_c" 1>&6
7946 else
7947   cat > conftest.$ac_ext <<EOF
7948 #line 7949 "configure"
7949 #include "confdefs.h"
7950 /* System header to define __stub macros and hopefully few prototypes,
7951     which can conflict with char dbm_open(); below.  */
7952 #include <assert.h>
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char dbm_open();
7957
7958 int main() {
7959
7960 /* The GNU C library defines this for functions which it implements
7961     to always fail with ENOSYS.  Some functions are actually named
7962     something starting with __ and the normal name is an alias.  */
7963 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7964 choke me
7965 #else
7966 dbm_open();
7967 #endif
7968
7969 ; return 0; }
7970 EOF
7971 if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7972   rm -rf conftest*
7973   eval "ac_cv_func_dbm_open=yes"
7974 else
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -rf conftest*
7978   eval "ac_cv_func_dbm_open=no"
7979 fi
7980 rm -f conftest*
7981 fi
7982
7983 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7984   echo "$ac_t""yes" 1>&6
7985   ol_cv_lib_ndbm=yes
7986 else
7987   echo "$ac_t""no" 1>&6
7988
7989                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7990 echo "configure:7991: checking for dbm_open in -lndbm" >&5
7991 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7993   echo $ac_n "(cached) $ac_c" 1>&6
7994 else
7995   ac_save_LIBS="$LIBS"
7996 LIBS="-lndbm  $LIBS"
7997 cat > conftest.$ac_ext <<EOF
7998 #line 7999 "configure"
7999 #include "confdefs.h"
8000 /* Override any gcc2 internal prototype to avoid an error.  */
8001 /* We use char because int might match the return type of a gcc2
8002     builtin and then its argument prototype would still apply.  */
8003 char dbm_open();
8004
8005 int main() {
8006 dbm_open()
8007 ; return 0; }
8008 EOF
8009 if { (eval echo configure:8010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8010   rm -rf conftest*
8011   eval "ac_cv_lib_$ac_lib_var=yes"
8012 else
8013   echo "configure: failed program was:" >&5
8014   cat conftest.$ac_ext >&5
8015   rm -rf conftest*
8016   eval "ac_cv_lib_$ac_lib_var=no"
8017 fi
8018 rm -f conftest*
8019 LIBS="$ac_save_LIBS"
8020
8021 fi
8022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8023   echo "$ac_t""yes" 1>&6
8024   ol_cv_lib_ndbm=-lndbm
8025 else
8026   echo "$ac_t""no" 1>&6
8027
8028                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8029 echo "configure:8030: checking for dbm_open in -ldbm" >&5
8030 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8031 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8032   echo $ac_n "(cached) $ac_c" 1>&6
8033 else
8034   ac_save_LIBS="$LIBS"
8035 LIBS="-ldbm  $LIBS"
8036 cat > conftest.$ac_ext <<EOF
8037 #line 8038 "configure"
8038 #include "confdefs.h"
8039 /* Override any gcc2 internal prototype to avoid an error.  */
8040 /* We use char because int might match the return type of a gcc2
8041     builtin and then its argument prototype would still apply.  */
8042 char dbm_open();
8043
8044 int main() {
8045 dbm_open()
8046 ; return 0; }
8047 EOF
8048 if { (eval echo configure:8049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8049   rm -rf conftest*
8050   eval "ac_cv_lib_$ac_lib_var=yes"
8051 else
8052   echo "configure: failed program was:" >&5
8053   cat conftest.$ac_ext >&5
8054   rm -rf conftest*
8055   eval "ac_cv_lib_$ac_lib_var=no"
8056 fi
8057 rm -f conftest*
8058 LIBS="$ac_save_LIBS"
8059
8060 fi
8061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8062   echo "$ac_t""yes" 1>&6
8063   ol_cv_lib_ndbm=-ldbm
8064 else
8065   echo "$ac_t""no" 1>&6
8066 ol_cv_lib_ndbm=no
8067 fi
8068                 
8069 fi
8070
8071         
8072 fi
8073
8074         LIBS="$ol_LIBS"
8075
8076 fi
8077
8078 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8079
8080
8081  for ac_hdr in ndbm.h
8082 do
8083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8085 echo "configure:8086: checking for $ac_hdr" >&5
8086 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8087   echo $ac_n "(cached) $ac_c" 1>&6
8088 else
8089   cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 #include <$ac_hdr>
8093 EOF
8094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8095 { (eval echo configure:8096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8097 if test -z "$ac_err"; then
8098   rm -rf conftest*
8099   eval "ac_cv_header_$ac_safe=yes"
8100 else
8101   echo "$ac_err" >&5
8102   echo "configure: failed program was:" >&5
8103   cat conftest.$ac_ext >&5
8104   rm -rf conftest*
8105   eval "ac_cv_header_$ac_safe=no"
8106 fi
8107 rm -f conftest*
8108 fi
8109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8110   echo "$ac_t""yes" 1>&6
8111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8112   cat >> confdefs.h <<EOF
8113 #define $ac_tr_hdr 1
8114 EOF
8115  
8116 else
8117   echo "$ac_t""no" 1>&6
8118 fi
8119 done
8120
8121  echo $ac_n "checking for db""... $ac_c" 1>&6
8122 echo "configure:8123: checking for db" >&5
8123 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8124   echo $ac_n "(cached) $ac_c" 1>&6
8125 else
8126   
8127         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8128                 ol_cv_ndbm=no
8129         else
8130                 ol_cv_ndbm=yes
8131         fi
8132
8133 fi
8134
8135 echo "$ac_t""$ol_cv_ndbm" 1>&6
8136  if test $ol_cv_ndbm = yes ; then
8137         cat >> confdefs.h <<\EOF
8138 #define HAVE_NDBM 1
8139 EOF
8140
8141  fi
8142
8143
8144         if test $ol_cv_ndbm = yes ; then
8145                 ol_link_ldbm=ndbm
8146                 ol_with_ldbm_api=ndbm
8147
8148                 if test $ol_cv_lib_ndbm != yes ; then
8149                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8150                 fi
8151         fi
8152 fi
8153
8154 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8155         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8156         if test $ol_enable_ldbm = yes ; then
8157                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8158         fi
8159
8160         echo "configure: warning: disabling LDBM" 1>&2
8161         ol_enable_ldbm=no
8162 fi
8163
8164 if test $ol_enable_wrappers != no ; then
8165         for ac_hdr in tcpd.h
8166 do
8167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8169 echo "configure:8170: checking for $ac_hdr" >&5
8170 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8171   echo $ac_n "(cached) $ac_c" 1>&6
8172 else
8173   cat > conftest.$ac_ext <<EOF
8174 #line 8175 "configure"
8175 #include "confdefs.h"
8176 #include <$ac_hdr>
8177 EOF
8178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8179 { (eval echo configure:8180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8181 if test -z "$ac_err"; then
8182   rm -rf conftest*
8183   eval "ac_cv_header_$ac_safe=yes"
8184 else
8185   echo "$ac_err" >&5
8186   echo "configure: failed program was:" >&5
8187   cat conftest.$ac_ext >&5
8188   rm -rf conftest*
8189   eval "ac_cv_header_$ac_safe=no"
8190 fi
8191 rm -f conftest*
8192 fi
8193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8194   echo "$ac_t""yes" 1>&6
8195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8196   cat >> confdefs.h <<EOF
8197 #define $ac_tr_hdr 1
8198 EOF
8199  
8200 else
8201   echo "$ac_t""no" 1>&6
8202 fi
8203 done
8204
8205
8206         if test $ac_cv_header_tcpd_h != yes ; then
8207                 have_wrappers=no
8208         else
8209                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8210 echo "configure:8211: checking for main in -lwrap" >&5
8211 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8212 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8213   echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215   ac_save_LIBS="$LIBS"
8216 LIBS="-lwrap  $LIBS"
8217 cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220
8221 int main() {
8222 main()
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=yes"
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=no"
8233 fi
8234 rm -f conftest*
8235 LIBS="$ac_save_LIBS"
8236
8237 fi
8238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8239   echo "$ac_t""yes" 1>&6
8240   have_wrappers=yes
8241 else
8242   echo "$ac_t""no" 1>&6
8243 have_wrappers=no
8244 fi
8245
8246         fi
8247
8248         if test $have_wrappers = yes ; then
8249                 cat >> confdefs.h <<\EOF
8250 #define HAVE_TCPD 1
8251 EOF
8252
8253                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8254         else
8255                 echo "configure: warning: could not find -lwrap" 1>&2
8256                 if test $ol_enable_wrappers = yes ; then
8257                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8258                 fi
8259
8260                 echo "configure: warning: disabling wrappers support" 1>&2
8261                 ol_enable_wrappers=no
8262         fi
8263 fi
8264
8265 if test $ol_enable_syslog != no ; then
8266         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8267 echo "configure:8268: checking for openlog" >&5
8268 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8269   echo $ac_n "(cached) $ac_c" 1>&6
8270 else
8271   cat > conftest.$ac_ext <<EOF
8272 #line 8273 "configure"
8273 #include "confdefs.h"
8274 /* System header to define __stub macros and hopefully few prototypes,
8275     which can conflict with char openlog(); below.  */
8276 #include <assert.h>
8277 /* Override any gcc2 internal prototype to avoid an error.  */
8278 /* We use char because int might match the return type of a gcc2
8279     builtin and then its argument prototype would still apply.  */
8280 char openlog();
8281
8282 int main() {
8283
8284 /* The GNU C library defines this for functions which it implements
8285     to always fail with ENOSYS.  Some functions are actually named
8286     something starting with __ and the normal name is an alias.  */
8287 #if defined (__stub_openlog) || defined (__stub___openlog)
8288 choke me
8289 #else
8290 openlog();
8291 #endif
8292
8293 ; return 0; }
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296   rm -rf conftest*
8297   eval "ac_cv_func_openlog=yes"
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -rf conftest*
8302   eval "ac_cv_func_openlog=no"
8303 fi
8304 rm -f conftest*
8305 fi
8306
8307 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8308   echo "$ac_t""yes" 1>&6
8309   :
8310 else
8311   echo "$ac_t""no" 1>&6
8312 fi
8313
8314         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8315                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8316         fi
8317         ol_enable_syslog=$ac_cv_func_openlog
8318 fi
8319
8320 if test $ol_enable_dmalloc != no ; then
8321         for ac_hdr in dmalloc.h
8322 do
8323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8325 echo "configure:8326: checking for $ac_hdr" >&5
8326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8327   echo $ac_n "(cached) $ac_c" 1>&6
8328 else
8329   cat > conftest.$ac_ext <<EOF
8330 #line 8331 "configure"
8331 #include "confdefs.h"
8332 #include <$ac_hdr>
8333 EOF
8334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8335 { (eval echo configure:8336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8337 if test -z "$ac_err"; then
8338   rm -rf conftest*
8339   eval "ac_cv_header_$ac_safe=yes"
8340 else
8341   echo "$ac_err" >&5
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_header_$ac_safe=no"
8346 fi
8347 rm -f conftest*
8348 fi
8349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8350   echo "$ac_t""yes" 1>&6
8351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8352   cat >> confdefs.h <<EOF
8353 #define $ac_tr_hdr 1
8354 EOF
8355  
8356 else
8357   echo "$ac_t""no" 1>&6
8358 fi
8359 done
8360
8361         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8362 echo "configure:8363: checking for dmalloc_shutdown in -ldmalloc" >&5
8363 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8364 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   ac_save_LIBS="$LIBS"
8368 LIBS="-ldmalloc  $LIBS"
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char dmalloc_shutdown();
8376
8377 int main() {
8378 dmalloc_shutdown()
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=no"
8389 fi
8390 rm -f conftest*
8391 LIBS="$ac_save_LIBS"
8392
8393 fi
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8397     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8398   cat >> confdefs.h <<EOF
8399 #define $ac_tr_lib 1
8400 EOF
8401
8402   LIBS="-ldmalloc $LIBS"
8403
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407
8408 fi
8409
8410 if test $ol_enable_tcl != no ; then
8411         for ac_hdr in tcl.h
8412 do
8413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8415 echo "configure:8416: checking for $ac_hdr" >&5
8416 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 #include <$ac_hdr>
8423 EOF
8424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8425 { (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8427 if test -z "$ac_err"; then
8428   rm -rf conftest*
8429   eval "ac_cv_header_$ac_safe=yes"
8430 else
8431   echo "$ac_err" >&5
8432   echo "configure: failed program was:" >&5
8433   cat conftest.$ac_ext >&5
8434   rm -rf conftest*
8435   eval "ac_cv_header_$ac_safe=no"
8436 fi
8437 rm -f conftest*
8438 fi
8439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8440   echo "$ac_t""yes" 1>&6
8441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8442   cat >> confdefs.h <<EOF
8443 #define $ac_tr_hdr 1
8444 EOF
8445  
8446 else
8447   echo "$ac_t""no" 1>&6
8448 fi
8449 done
8450
8451
8452         if test $ac_cv_header_tcl_h != yes ; then
8453                 have_tcl=no
8454         else
8455                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8456 echo "configure:8457: checking for main in -ltcl" >&5
8457 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8458 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8459   echo $ac_n "(cached) $ac_c" 1>&6
8460 else
8461   ac_save_LIBS="$LIBS"
8462 LIBS="-ltcl  $LIBS"
8463 cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466
8467 int main() {
8468 main()
8469 ; return 0; }
8470 EOF
8471 if { (eval echo configure:8472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8472   rm -rf conftest*
8473   eval "ac_cv_lib_$ac_lib_var=yes"
8474 else
8475   echo "configure: failed program was:" >&5
8476   cat conftest.$ac_ext >&5
8477   rm -rf conftest*
8478   eval "ac_cv_lib_$ac_lib_var=no"
8479 fi
8480 rm -f conftest*
8481 LIBS="$ac_save_LIBS"
8482
8483 fi
8484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8485   echo "$ac_t""yes" 1>&6
8486   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8487 else
8488   echo "$ac_t""no" 1>&6
8489 have_tcl=no
8490 fi
8491
8492
8493                 if test $have_tcl != yes; then
8494                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8495 echo "configure:8496: checking for main in -ltcl7.6" >&5
8496 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8497 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8498   echo $ac_n "(cached) $ac_c" 1>&6
8499 else
8500   ac_save_LIBS="$LIBS"
8501 LIBS="-ltcl7.6  $LIBS"
8502 cat > conftest.$ac_ext <<EOF
8503 #line 8504 "configure"
8504 #include "confdefs.h"
8505
8506 int main() {
8507 main()
8508 ; return 0; }
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8511   rm -rf conftest*
8512   eval "ac_cv_lib_$ac_lib_var=yes"
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   eval "ac_cv_lib_$ac_lib_var=no"
8518 fi
8519 rm -f conftest*
8520 LIBS="$ac_save_LIBS"
8521
8522 fi
8523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8524   echo "$ac_t""yes" 1>&6
8525   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8526 else
8527   echo "$ac_t""no" 1>&6
8528 have_tcl=no
8529 fi
8530
8531                 fi
8532
8533                 if test $have_tcl != yes; then
8534                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8535 echo "configure:8536: checking for main in -ltcl8.0" >&5
8536 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8538   echo $ac_n "(cached) $ac_c" 1>&6
8539 else
8540   ac_save_LIBS="$LIBS"
8541 LIBS="-ltcl8.0  $LIBS"
8542 cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545
8546 int main() {
8547 main()
8548 ; return 0; }
8549 EOF
8550 if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8551   rm -rf conftest*
8552   eval "ac_cv_lib_$ac_lib_var=yes"
8553 else
8554   echo "configure: failed program was:" >&5
8555   cat conftest.$ac_ext >&5
8556   rm -rf conftest*
8557   eval "ac_cv_lib_$ac_lib_var=no"
8558 fi
8559 rm -f conftest*
8560 LIBS="$ac_save_LIBS"
8561
8562 fi
8563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8564   echo "$ac_t""yes" 1>&6
8565   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8566 else
8567   echo "$ac_t""no" 1>&6
8568 have_tcl=no
8569 fi
8570
8571                 fi
8572         fi
8573
8574         if test $have_tcl != yes ; then
8575                 echo "configure: warning: could not find -ltcl" 1>&2
8576                 if test $ol_enable_tcl = yes ; then
8577                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8578                 fi
8579
8580                 ol_enable_tcl=no
8581         fi
8582 fi
8583
8584 # ud needs termcap (should insert check here)
8585 ol_link_termcap=no
8586 for ac_hdr in termcap.h ncurses.h
8587 do
8588 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8589 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8590 echo "configure:8591: checking for $ac_hdr" >&5
8591 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   cat > conftest.$ac_ext <<EOF
8595 #line 8596 "configure"
8596 #include "confdefs.h"
8597 #include <$ac_hdr>
8598 EOF
8599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8600 { (eval echo configure:8601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8602 if test -z "$ac_err"; then
8603   rm -rf conftest*
8604   eval "ac_cv_header_$ac_safe=yes"
8605 else
8606   echo "$ac_err" >&5
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_header_$ac_safe=no"
8611 fi
8612 rm -f conftest*
8613 fi
8614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8615   echo "$ac_t""yes" 1>&6
8616     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8617   cat >> confdefs.h <<EOF
8618 #define $ac_tr_hdr 1
8619 EOF
8620  
8621 else
8622   echo "$ac_t""no" 1>&6
8623 fi
8624 done
8625
8626
8627 if test $ol_link_termcap = no ; then
8628         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8629 echo "configure:8630: checking for tputs in -ltermcap" >&5
8630 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8631 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8632   echo $ac_n "(cached) $ac_c" 1>&6
8633 else
8634   ac_save_LIBS="$LIBS"
8635 LIBS="-ltermcap  $LIBS"
8636 cat > conftest.$ac_ext <<EOF
8637 #line 8638 "configure"
8638 #include "confdefs.h"
8639 /* Override any gcc2 internal prototype to avoid an error.  */
8640 /* We use char because int might match the return type of a gcc2
8641     builtin and then its argument prototype would still apply.  */
8642 char tputs();
8643
8644 int main() {
8645 tputs()
8646 ; return 0; }
8647 EOF
8648 if { (eval echo configure:8649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8649   rm -rf conftest*
8650   eval "ac_cv_lib_$ac_lib_var=yes"
8651 else
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654   rm -rf conftest*
8655   eval "ac_cv_lib_$ac_lib_var=no"
8656 fi
8657 rm -f conftest*
8658 LIBS="$ac_save_LIBS"
8659
8660 fi
8661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8662   echo "$ac_t""yes" 1>&6
8663   have_termcap=yes
8664 else
8665   echo "$ac_t""no" 1>&6
8666 have_termcap=no
8667 fi
8668
8669         if test $have_termcap = yes ; then
8670                 cat >> confdefs.h <<\EOF
8671 #define HAVE_TERMCAP 1
8672 EOF
8673
8674                 ol_link_termcap=yes
8675                 TERMCAP_LIBS=-ltermcap
8676         fi
8677 fi
8678
8679 if test $ol_link_termcap = no ; then
8680         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8681 echo "configure:8682: checking for initscr in -lncurses" >&5
8682 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8684   echo $ac_n "(cached) $ac_c" 1>&6
8685 else
8686   ac_save_LIBS="$LIBS"
8687 LIBS="-lncurses  $LIBS"
8688 cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691 /* Override any gcc2 internal prototype to avoid an error.  */
8692 /* We use char because int might match the return type of a gcc2
8693     builtin and then its argument prototype would still apply.  */
8694 char initscr();
8695
8696 int main() {
8697 initscr()
8698 ; return 0; }
8699 EOF
8700 if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8701   rm -rf conftest*
8702   eval "ac_cv_lib_$ac_lib_var=yes"
8703 else
8704   echo "configure: failed program was:" >&5
8705   cat conftest.$ac_ext >&5
8706   rm -rf conftest*
8707   eval "ac_cv_lib_$ac_lib_var=no"
8708 fi
8709 rm -f conftest*
8710 LIBS="$ac_save_LIBS"
8711
8712 fi
8713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8714   echo "$ac_t""yes" 1>&6
8715   have_ncurses=yes
8716 else
8717   echo "$ac_t""no" 1>&6
8718 have_ncurses=no
8719 fi
8720
8721         if test $have_ncurses = yes ; then
8722                 cat >> confdefs.h <<\EOF
8723 #define HAVE_NCURSES 1
8724 EOF
8725
8726                 ol_link_termcap=yes
8727                 TERMCAP_LIBS=-lncurses
8728         fi
8729 fi
8730
8731 if test $ol_link_termcap = no ; then
8732         cat >> confdefs.h <<\EOF
8733 #define NO_TERMCAP 1
8734 EOF
8735
8736         TERMCAP_LIBS=
8737 fi
8738
8739 ol_link_readline=no
8740 if test $ol_with_readline != no ; then
8741         for ac_hdr in readline/readline.h readline/history.h
8742 do
8743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8745 echo "configure:8746: checking for $ac_hdr" >&5
8746 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8747   echo $ac_n "(cached) $ac_c" 1>&6
8748 else
8749   cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 #include <$ac_hdr>
8753 EOF
8754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8755 { (eval echo configure:8756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8757 if test -z "$ac_err"; then
8758   rm -rf conftest*
8759   eval "ac_cv_header_$ac_safe=yes"
8760 else
8761   echo "$ac_err" >&5
8762   echo "configure: failed program was:" >&5
8763   cat conftest.$ac_ext >&5
8764   rm -rf conftest*
8765   eval "ac_cv_header_$ac_safe=no"
8766 fi
8767 rm -f conftest*
8768 fi
8769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8770   echo "$ac_t""yes" 1>&6
8771     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8772   cat >> confdefs.h <<EOF
8773 #define $ac_tr_hdr 1
8774 EOF
8775  
8776 else
8777   echo "$ac_t""no" 1>&6
8778 fi
8779 done
8780
8781
8782         if test $ac_cv_header_readline_readline_h = yes ; then
8783                 save_LIBS="$LIBS"
8784                 LIBS="$TERMCAP_LIBS $LIBS"
8785                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8786 echo "configure:8787: checking for readline in -lreadline" >&5
8787 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8789   echo $ac_n "(cached) $ac_c" 1>&6
8790 else
8791   ac_save_LIBS="$LIBS"
8792 LIBS="-lreadline  $LIBS"
8793 cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 /* Override any gcc2 internal prototype to avoid an error.  */
8797 /* We use char because int might match the return type of a gcc2
8798     builtin and then its argument prototype would still apply.  */
8799 char readline();
8800
8801 int main() {
8802 readline()
8803 ; return 0; }
8804 EOF
8805 if { (eval echo configure:8806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8806   rm -rf conftest*
8807   eval "ac_cv_lib_$ac_lib_var=yes"
8808 else
8809   echo "configure: failed program was:" >&5
8810   cat conftest.$ac_ext >&5
8811   rm -rf conftest*
8812   eval "ac_cv_lib_$ac_lib_var=no"
8813 fi
8814 rm -f conftest*
8815 LIBS="$ac_save_LIBS"
8816
8817 fi
8818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8819   echo "$ac_t""yes" 1>&6
8820   have_readline=yes
8821 else
8822   echo "$ac_t""no" 1>&6
8823 have_readline=no
8824 fi
8825
8826                 LIBS="$save_LIBS"
8827                         
8828                 if test $have_readline = yes ; then
8829                         ol_with_readline=found
8830                         ol_link_readline=yes
8831
8832                         READLINE_LIBS="-lreadline"
8833                 fi
8834         fi
8835 fi
8836
8837 if test $ol_link_readline = yes ; then
8838         cat >> confdefs.h <<\EOF
8839 #define HAVE_READLINE 1
8840 EOF
8841
8842 fi
8843
8844
8845 # FreeBSD (and others) have crypt(3) in -lcrypt
8846 if test $ol_enable_crypt != no ; then
8847         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8848 echo "configure:8849: checking for crypt" >&5
8849 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8850   echo $ac_n "(cached) $ac_c" 1>&6
8851 else
8852   cat > conftest.$ac_ext <<EOF
8853 #line 8854 "configure"
8854 #include "confdefs.h"
8855 /* System header to define __stub macros and hopefully few prototypes,
8856     which can conflict with char crypt(); below.  */
8857 #include <assert.h>
8858 /* Override any gcc2 internal prototype to avoid an error.  */
8859 /* We use char because int might match the return type of a gcc2
8860     builtin and then its argument prototype would still apply.  */
8861 char crypt();
8862
8863 int main() {
8864
8865 /* The GNU C library defines this for functions which it implements
8866     to always fail with ENOSYS.  Some functions are actually named
8867     something starting with __ and the normal name is an alias.  */
8868 #if defined (__stub_crypt) || defined (__stub___crypt)
8869 choke me
8870 #else
8871 crypt();
8872 #endif
8873
8874 ; return 0; }
8875 EOF
8876 if { (eval echo configure:8877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8877   rm -rf conftest*
8878   eval "ac_cv_func_crypt=yes"
8879 else
8880   echo "configure: failed program was:" >&5
8881   cat conftest.$ac_ext >&5
8882   rm -rf conftest*
8883   eval "ac_cv_func_crypt=no"
8884 fi
8885 rm -f conftest*
8886 fi
8887
8888 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8889   echo "$ac_t""yes" 1>&6
8890   have_crypt=yes
8891 else
8892   echo "$ac_t""no" 1>&6
8893
8894                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8895 echo "configure:8896: checking for crypt in -lcrypt" >&5
8896 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8897 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8898   echo $ac_n "(cached) $ac_c" 1>&6
8899 else
8900   ac_save_LIBS="$LIBS"
8901 LIBS="-lcrypt  $LIBS"
8902 cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 /* Override any gcc2 internal prototype to avoid an error.  */
8906 /* We use char because int might match the return type of a gcc2
8907     builtin and then its argument prototype would still apply.  */
8908 char crypt();
8909
8910 int main() {
8911 crypt()
8912 ; return 0; }
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8915   rm -rf conftest*
8916   eval "ac_cv_lib_$ac_lib_var=yes"
8917 else
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -rf conftest*
8921   eval "ac_cv_lib_$ac_lib_var=no"
8922 fi
8923 rm -f conftest*
8924 LIBS="$ac_save_LIBS"
8925
8926 fi
8927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8928   echo "$ac_t""yes" 1>&6
8929   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8930                         have_crypt=yes
8931 else
8932   echo "$ac_t""no" 1>&6
8933 have_crypt=no
8934 fi
8935
8936 fi
8937
8938
8939         if test $have_crypt = yes ; then
8940                 cat >> confdefs.h <<\EOF
8941 #define HAVE_CRYPT 1
8942 EOF
8943
8944         else
8945                 echo "configure: warning: could not find crypt" 1>&2
8946                 if test $ol_enable_crypt = yes ; then
8947                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8948                 fi
8949
8950                 echo "configure: warning: disabling crypt support" 1>&2
8951                 ol_enable_crypt=no
8952         fi
8953 fi
8954
8955 # FreeBSD (and others) have setproctitle(3) in -lutil
8956 if test $ol_enable_proctitle != no ; then
8957         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8958 echo "configure:8959: checking for setproctitle" >&5
8959 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8960   echo $ac_n "(cached) $ac_c" 1>&6
8961 else
8962   cat > conftest.$ac_ext <<EOF
8963 #line 8964 "configure"
8964 #include "confdefs.h"
8965 /* System header to define __stub macros and hopefully few prototypes,
8966     which can conflict with char setproctitle(); below.  */
8967 #include <assert.h>
8968 /* Override any gcc2 internal prototype to avoid an error.  */
8969 /* We use char because int might match the return type of a gcc2
8970     builtin and then its argument prototype would still apply.  */
8971 char setproctitle();
8972
8973 int main() {
8974
8975 /* The GNU C library defines this for functions which it implements
8976     to always fail with ENOSYS.  Some functions are actually named
8977     something starting with __ and the normal name is an alias.  */
8978 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8979 choke me
8980 #else
8981 setproctitle();
8982 #endif
8983
8984 ; return 0; }
8985 EOF
8986 if { (eval echo configure:8987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8987   rm -rf conftest*
8988   eval "ac_cv_func_setproctitle=yes"
8989 else
8990   echo "configure: failed program was:" >&5
8991   cat conftest.$ac_ext >&5
8992   rm -rf conftest*
8993   eval "ac_cv_func_setproctitle=no"
8994 fi
8995 rm -f conftest*
8996 fi
8997
8998 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8999   echo "$ac_t""yes" 1>&6
9000   have_setproctitle=yes
9001 else
9002   echo "$ac_t""no" 1>&6
9003
9004                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9005 echo "configure:9006: checking for setproctitle in -lutil" >&5
9006 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9007 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   ac_save_LIBS="$LIBS"
9011 LIBS="-lutil  $LIBS"
9012 cat > conftest.$ac_ext <<EOF
9013 #line 9014 "configure"
9014 #include "confdefs.h"
9015 /* Override any gcc2 internal prototype to avoid an error.  */
9016 /* We use char because int might match the return type of a gcc2
9017     builtin and then its argument prototype would still apply.  */
9018 char setproctitle();
9019
9020 int main() {
9021 setproctitle()
9022 ; return 0; }
9023 EOF
9024 if { (eval echo configure:9025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=yes"
9027 else
9028   echo "configure: failed program was:" >&5
9029   cat conftest.$ac_ext >&5
9030   rm -rf conftest*
9031   eval "ac_cv_lib_$ac_lib_var=no"
9032 fi
9033 rm -f conftest*
9034 LIBS="$ac_save_LIBS"
9035
9036 fi
9037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039   have_setproctitle=yes
9040                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9041 else
9042   echo "$ac_t""no" 1>&6
9043 have_setproctitle=no
9044                         LIBOBJS="$LIBOBJS setproctitle.o"
9045 fi
9046
9047 fi
9048
9049
9050         if test $have_setproctitle = yes ; then
9051                 cat >> confdefs.h <<\EOF
9052 #define HAVE_SETPROCTITLE 1
9053 EOF
9054
9055         fi
9056 fi
9057
9058 # test for EBCDIC
9059 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9060 echo "configure:9061: checking for EBCDIC" >&5
9061 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9062   echo $ac_n "(cached) $ac_c" 1>&6
9063 else
9064   
9065         cat > conftest.$ac_ext <<EOF
9066 #line 9067 "configure"
9067 #include "confdefs.h"
9068
9069 #if !('M' == 0xd4)
9070 #include <__ASCII__/generate_error.h>
9071 #endif
9072
9073 EOF
9074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9075 { (eval echo configure:9076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9077 if test -z "$ac_err"; then
9078   rm -rf conftest*
9079   ol_cv_cpp_ebcdic=yes
9080 else
9081   echo "$ac_err" >&5
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   ol_cv_cpp_ebcdic=no
9086 fi
9087 rm -f conftest*
9088 fi
9089
9090 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9091 if test $ol_cv_cpp_ebcdic = yes ; then
9092         cat >> confdefs.h <<\EOF
9093 #define HAVE_EBCDIC 1
9094 EOF
9095
9096 fi
9097
9098 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9099 echo "configure:9100: checking for ANSI C header files" >&5
9100 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9101   echo $ac_n "(cached) $ac_c" 1>&6
9102 else
9103   cat > conftest.$ac_ext <<EOF
9104 #line 9105 "configure"
9105 #include "confdefs.h"
9106 #include <stdlib.h>
9107 #include <stdarg.h>
9108 #include <string.h>
9109 #include <float.h>
9110 EOF
9111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9112 { (eval echo configure:9113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9114 if test -z "$ac_err"; then
9115   rm -rf conftest*
9116   ol_cv_header_stdc=yes
9117 else
9118   echo "$ac_err" >&5
9119   echo "configure: failed program was:" >&5
9120   cat conftest.$ac_ext >&5
9121   rm -rf conftest*
9122   ol_cv_header_stdc=no
9123 fi
9124 rm -f conftest*
9125
9126 if test $ol_cv_header_stdc = yes; then
9127   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9128 cat > conftest.$ac_ext <<EOF
9129 #line 9130 "configure"
9130 #include "confdefs.h"
9131 #include <string.h>
9132 EOF
9133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9134   egrep "memchr" >/dev/null 2>&1; then
9135   :
9136 else
9137   rm -rf conftest*
9138   ol_cv_header_stdc=no
9139 fi
9140 rm -f conftest*
9141
9142 fi
9143
9144 if test $ol_cv_header_stdc = yes; then
9145   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9146 cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 #include <stdlib.h>
9150 EOF
9151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9152   egrep "free" >/dev/null 2>&1; then
9153   :
9154 else
9155   rm -rf conftest*
9156   ol_cv_header_stdc=no
9157 fi
9158 rm -f conftest*
9159
9160 fi
9161
9162 if test $ol_cv_header_stdc = yes; then
9163   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9164 if test "$cross_compiling" = yes; then
9165   :
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 #include <ctype.h>
9171 #ifndef HAVE_EBCDIC
9172 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9173 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9174 #else
9175 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9176                 || ('j' <= (c) && (c) <= 'r') \
9177                 || ('s' <= (c) && (c) <= 'z'))
9178 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9179 #endif
9180 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9181 int main () { int i; for (i = 0; i < 256; i++)
9182 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9183 exit (0); }
9184
9185 EOF
9186 if { (eval echo configure:9187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9187 then
9188   :
9189 else
9190   echo "configure: failed program was:" >&5
9191   cat conftest.$ac_ext >&5
9192   rm -fr conftest*
9193   ol_cv_header_stdc=no
9194 fi
9195 rm -fr conftest*
9196 fi
9197
9198 fi
9199 fi
9200
9201 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9202 if test $ol_cv_header_stdc = yes; then
9203   cat >> confdefs.h <<\EOF
9204 #define STDC_HEADERS 1
9205 EOF
9206
9207 fi
9208 ac_cv_header_stdc=disable
9209
9210
9211 if test $ol_cv_header_stdc != yes; then
9212         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9213 fi
9214
9215 ac_header_dirent=no
9216 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9217 do
9218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9219 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9220 echo "configure:9221: checking for $ac_hdr that defines DIR" >&5
9221 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9222   echo $ac_n "(cached) $ac_c" 1>&6
9223 else
9224   cat > conftest.$ac_ext <<EOF
9225 #line 9226 "configure"
9226 #include "confdefs.h"
9227 #include <sys/types.h>
9228 #include <$ac_hdr>
9229 int main() {
9230 DIR *dirp = 0;
9231 ; return 0; }
9232 EOF
9233 if { (eval echo configure:9234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9234   rm -rf conftest*
9235   eval "ac_cv_header_dirent_$ac_safe=yes"
9236 else
9237   echo "configure: failed program was:" >&5
9238   cat conftest.$ac_ext >&5
9239   rm -rf conftest*
9240   eval "ac_cv_header_dirent_$ac_safe=no"
9241 fi
9242 rm -f conftest*
9243 fi
9244 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9245   echo "$ac_t""yes" 1>&6
9246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9247   cat >> confdefs.h <<EOF
9248 #define $ac_tr_hdr 1
9249 EOF
9250  ac_header_dirent=$ac_hdr; break
9251 else
9252   echo "$ac_t""no" 1>&6
9253 fi
9254 done
9255 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9256 if test $ac_header_dirent = dirent.h; then
9257 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9258 echo "configure:9259: checking for opendir in -ldir" >&5
9259 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9261   echo $ac_n "(cached) $ac_c" 1>&6
9262 else
9263   ac_save_LIBS="$LIBS"
9264 LIBS="-ldir  $LIBS"
9265 cat > conftest.$ac_ext <<EOF
9266 #line 9267 "configure"
9267 #include "confdefs.h"
9268 /* Override any gcc2 internal prototype to avoid an error.  */
9269 /* We use char because int might match the return type of a gcc2
9270     builtin and then its argument prototype would still apply.  */
9271 char opendir();
9272
9273 int main() {
9274 opendir()
9275 ; return 0; }
9276 EOF
9277 if { (eval echo configure:9278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9278   rm -rf conftest*
9279   eval "ac_cv_lib_$ac_lib_var=yes"
9280 else
9281   echo "configure: failed program was:" >&5
9282   cat conftest.$ac_ext >&5
9283   rm -rf conftest*
9284   eval "ac_cv_lib_$ac_lib_var=no"
9285 fi
9286 rm -f conftest*
9287 LIBS="$ac_save_LIBS"
9288
9289 fi
9290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9291   echo "$ac_t""yes" 1>&6
9292   LIBS="$LIBS -ldir"
9293 else
9294   echo "$ac_t""no" 1>&6
9295 fi
9296
9297 else
9298 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9299 echo "configure:9300: checking for opendir in -lx" >&5
9300 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9302   echo $ac_n "(cached) $ac_c" 1>&6
9303 else
9304   ac_save_LIBS="$LIBS"
9305 LIBS="-lx  $LIBS"
9306 cat > conftest.$ac_ext <<EOF
9307 #line 9308 "configure"
9308 #include "confdefs.h"
9309 /* Override any gcc2 internal prototype to avoid an error.  */
9310 /* We use char because int might match the return type of a gcc2
9311     builtin and then its argument prototype would still apply.  */
9312 char opendir();
9313
9314 int main() {
9315 opendir()
9316 ; return 0; }
9317 EOF
9318 if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9319   rm -rf conftest*
9320   eval "ac_cv_lib_$ac_lib_var=yes"
9321 else
9322   echo "configure: failed program was:" >&5
9323   cat conftest.$ac_ext >&5
9324   rm -rf conftest*
9325   eval "ac_cv_lib_$ac_lib_var=no"
9326 fi
9327 rm -f conftest*
9328 LIBS="$ac_save_LIBS"
9329
9330 fi
9331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9332   echo "$ac_t""yes" 1>&6
9333   LIBS="$LIBS -lx"
9334 else
9335   echo "$ac_t""no" 1>&6
9336 fi
9337
9338 fi
9339
9340 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9341 echo "configure:9342: checking for sys/wait.h that is POSIX.1 compatible" >&5
9342 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9343   echo $ac_n "(cached) $ac_c" 1>&6
9344 else
9345   cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 #include <sys/types.h>
9349 #include <sys/wait.h>
9350 #ifndef WEXITSTATUS
9351 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9352 #endif
9353 #ifndef WIFEXITED
9354 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9355 #endif
9356 int main() {
9357 int s;
9358 wait (&s);
9359 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9360 ; return 0; }
9361 EOF
9362 if { (eval echo configure:9363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9363   rm -rf conftest*
9364   ac_cv_header_sys_wait_h=yes
9365 else
9366   echo "configure: failed program was:" >&5
9367   cat conftest.$ac_ext >&5
9368   rm -rf conftest*
9369   ac_cv_header_sys_wait_h=no
9370 fi
9371 rm -f conftest*
9372 fi
9373
9374 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9375 if test $ac_cv_header_sys_wait_h = yes; then
9376   cat >> confdefs.h <<\EOF
9377 #define HAVE_SYS_WAIT_H 1
9378 EOF
9379
9380 fi
9381
9382 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9383 echo "configure:9384: checking POSIX termios" >&5
9384 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9385   echo $ac_n "(cached) $ac_c" 1>&6
9386 else
9387   cat > conftest.$ac_ext <<EOF
9388 #line 9389 "configure"
9389 #include "confdefs.h"
9390 #include <sys/types.h>
9391 #include <unistd.h>
9392 #include <termios.h>
9393 int main() {
9394 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9395    tcgetattr(0, 0);
9396 ; return 0; }
9397 EOF
9398 if { (eval echo configure:9399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9399   rm -rf conftest*
9400   am_cv_sys_posix_termios=yes
9401 else
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -rf conftest*
9405   am_cv_sys_posix_termios=no
9406 fi
9407 rm -f conftest*
9408 fi
9409
9410 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9411
9412
9413  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9414 echo "configure:9415: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9415 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9416   echo $ac_n "(cached) $ac_c" 1>&6
9417 else
9418   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9419
9420   gwinsz_in_termios_h=no
9421   if test $am_cv_sys_posix_termios = yes; then
9422     cat > conftest.$ac_ext <<EOF
9423 #line 9424 "configure"
9424 #include "confdefs.h"
9425 #include <sys/types.h>
9426 #     include <termios.h>
9427 #     ifdef TIOCGWINSZ
9428         yes
9429 #     endif
9430     
9431 EOF
9432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9433   egrep "yes" >/dev/null 2>&1; then
9434   rm -rf conftest*
9435   gwinsz_in_termios_h=yes
9436 fi
9437 rm -f conftest*
9438
9439   fi
9440
9441   if test $gwinsz_in_termios_h = no; then
9442     cat > conftest.$ac_ext <<EOF
9443 #line 9444 "configure"
9444 #include "confdefs.h"
9445 #include <sys/types.h>
9446 #     include <sys/ioctl.h>
9447 #     ifdef TIOCGWINSZ
9448         yes
9449 #     endif
9450     
9451 EOF
9452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9453   egrep "yes" >/dev/null 2>&1; then
9454   rm -rf conftest*
9455   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9456 fi
9457 rm -f conftest*
9458
9459   fi
9460   
9461 fi
9462
9463 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9464   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9465     cat >> confdefs.h <<\EOF
9466 #define GWINSZ_IN_SYS_IOCTL 1
9467 EOF
9468
9469   fi
9470
9471 if test $am_cv_sys_posix_termios = yes ; then
9472         cat >> confdefs.h <<\EOF
9473 #define HAVE_POSIX_TERMIOS 1
9474 EOF
9475
9476 fi
9477
9478 for ac_hdr in \
9479         arpa/inet.h             \
9480         arpa/nameser.h  \
9481         assert.h                \
9482         crypt.h                 \
9483         errno.h                 \
9484         fcntl.h                 \
9485         filio.h                 \
9486         getopt.h                \
9487         grp.h                   \
9488         libutil.h               \
9489         limits.h                \
9490         locale.h                \
9491         malloc.h                \
9492         memory.h                \
9493         regex.h                 \
9494         psap.h                  \
9495         pwd.h                   \
9496         resolv.h                \
9497         sgtty.h                 \
9498         stdarg.h                \
9499         stddef.h                \
9500         string.h                \
9501         strings.h               \
9502         sysexits.h              \
9503         sys/file.h              \
9504         sys/filio.h             \
9505         sys/errno.h             \
9506         sys/ioctl.h             \
9507         sys/param.h             \
9508         sys/resource.h  \
9509         sys/socket.h    \
9510         sys/syslog.h    \
9511         sys/time.h              \
9512         sys/types.h             \
9513         syslog.h                \
9514         termios.h               \
9515         unistd.h                \
9516
9517 do
9518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9520 echo "configure:9521: checking for $ac_hdr" >&5
9521 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 #include <$ac_hdr>
9528 EOF
9529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9530 { (eval echo configure:9531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9532 if test -z "$ac_err"; then
9533   rm -rf conftest*
9534   eval "ac_cv_header_$ac_safe=yes"
9535 else
9536   echo "$ac_err" >&5
9537   echo "configure: failed program was:" >&5
9538   cat conftest.$ac_ext >&5
9539   rm -rf conftest*
9540   eval "ac_cv_header_$ac_safe=no"
9541 fi
9542 rm -f conftest*
9543 fi
9544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9545   echo "$ac_t""yes" 1>&6
9546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9547   cat >> confdefs.h <<EOF
9548 #define $ac_tr_hdr 1
9549 EOF
9550  
9551 else
9552   echo "$ac_t""no" 1>&6
9553 fi
9554 done
9555
9556
9557 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9558 echo "configure:9559: checking for uid_t in sys/types.h" >&5
9559 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562   cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 #include <sys/types.h>
9566 EOF
9567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9568   egrep "uid_t" >/dev/null 2>&1; then
9569   rm -rf conftest*
9570   ac_cv_type_uid_t=yes
9571 else
9572   rm -rf conftest*
9573   ac_cv_type_uid_t=no
9574 fi
9575 rm -f conftest*
9576
9577 fi
9578
9579 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9580 if test $ac_cv_type_uid_t = no; then
9581   cat >> confdefs.h <<\EOF
9582 #define uid_t int
9583 EOF
9584
9585   cat >> confdefs.h <<\EOF
9586 #define gid_t int
9587 EOF
9588
9589 fi
9590
9591 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9592 echo "configure:9593: checking type of array argument to getgroups" >&5
9593 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9594   echo $ac_n "(cached) $ac_c" 1>&6
9595 else
9596   if test "$cross_compiling" = yes; then
9597   ac_cv_type_getgroups=cross
9598 else
9599   cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602
9603 /* Thanks to Mike Rendell for this test.  */
9604 #include <sys/types.h>
9605 #define NGID 256
9606 #undef MAX
9607 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9608 main()
9609 {
9610   gid_t gidset[NGID];
9611   int i, n;
9612   union { gid_t gval; long lval; }  val;
9613
9614   val.lval = -1;
9615   for (i = 0; i < NGID; i++)
9616     gidset[i] = val.gval;
9617   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9618                  gidset);
9619   /* Exit non-zero if getgroups seems to require an array of ints.  This
9620      happens when gid_t is short but getgroups modifies an array of ints.  */
9621   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9622 }
9623
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9626 then
9627     ac_cv_type_getgroups=gid_t
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -fr conftest*
9632   ac_cv_type_getgroups=int
9633 fi
9634 rm -fr conftest*
9635 fi
9636
9637 if test $ac_cv_type_getgroups = cross; then
9638         cat > conftest.$ac_ext <<EOF
9639 #line 9640 "configure"
9640 #include "confdefs.h"
9641 #include <unistd.h>
9642 EOF
9643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9644   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9645   rm -rf conftest*
9646   ac_cv_type_getgroups=gid_t
9647 else
9648   rm -rf conftest*
9649   ac_cv_type_getgroups=int
9650 fi
9651 rm -f conftest*
9652
9653 fi
9654 fi
9655
9656 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9657 cat >> confdefs.h <<EOF
9658 #define GETGROUPS_T $ac_cv_type_getgroups
9659 EOF
9660
9661  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9662 echo "configure:9663: checking for ANSI C header files" >&5
9663 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666   cat > conftest.$ac_ext <<EOF
9667 #line 9668 "configure"
9668 #include "confdefs.h"
9669 #include <stdlib.h>
9670 #include <stdarg.h>
9671 #include <string.h>
9672 #include <float.h>
9673 EOF
9674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9675 { (eval echo configure:9676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9677 if test -z "$ac_err"; then
9678   rm -rf conftest*
9679   ac_cv_header_stdc=yes
9680 else
9681   echo "$ac_err" >&5
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -rf conftest*
9685   ac_cv_header_stdc=no
9686 fi
9687 rm -f conftest*
9688
9689 if test $ac_cv_header_stdc = yes; then
9690   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9691 cat > conftest.$ac_ext <<EOF
9692 #line 9693 "configure"
9693 #include "confdefs.h"
9694 #include <string.h>
9695 EOF
9696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9697   egrep "memchr" >/dev/null 2>&1; then
9698   :
9699 else
9700   rm -rf conftest*
9701   ac_cv_header_stdc=no
9702 fi
9703 rm -f conftest*
9704
9705 fi
9706
9707 if test $ac_cv_header_stdc = yes; then
9708   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 #include <stdlib.h>
9713 EOF
9714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9715   egrep "free" >/dev/null 2>&1; then
9716   :
9717 else
9718   rm -rf conftest*
9719   ac_cv_header_stdc=no
9720 fi
9721 rm -f conftest*
9722
9723 fi
9724
9725 if test $ac_cv_header_stdc = yes; then
9726   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9727 if test "$cross_compiling" = yes; then
9728   :
9729 else
9730   cat > conftest.$ac_ext <<EOF
9731 #line 9732 "configure"
9732 #include "confdefs.h"
9733 #include <ctype.h>
9734 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9735 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9736 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9737 int main () { int i; for (i = 0; i < 256; i++)
9738 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9739 exit (0); }
9740
9741 EOF
9742 if { (eval echo configure:9743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9743 then
9744   :
9745 else
9746   echo "configure: failed program was:" >&5
9747   cat conftest.$ac_ext >&5
9748   rm -fr conftest*
9749   ac_cv_header_stdc=no
9750 fi
9751 rm -fr conftest*
9752 fi
9753
9754 fi
9755 fi
9756
9757 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9758 if test $ac_cv_header_stdc = yes; then
9759   cat >> confdefs.h <<\EOF
9760 #define STDC_HEADERS 1
9761 EOF
9762
9763 fi
9764
9765 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9766 echo "configure:9767: checking for mode_t" >&5
9767 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9768   echo $ac_n "(cached) $ac_c" 1>&6
9769 else
9770   cat > conftest.$ac_ext <<EOF
9771 #line 9772 "configure"
9772 #include "confdefs.h"
9773 #include <sys/types.h>
9774 #if STDC_HEADERS
9775 #include <stdlib.h>
9776 #include <stddef.h>
9777 #endif
9778 EOF
9779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9780   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9781   rm -rf conftest*
9782   ac_cv_type_mode_t=yes
9783 else
9784   rm -rf conftest*
9785   ac_cv_type_mode_t=no
9786 fi
9787 rm -f conftest*
9788
9789 fi
9790 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9791 if test $ac_cv_type_mode_t = no; then
9792   cat >> confdefs.h <<\EOF
9793 #define mode_t int
9794 EOF
9795
9796 fi
9797
9798 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9799 echo "configure:9800: checking for off_t" >&5
9800 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9801   echo $ac_n "(cached) $ac_c" 1>&6
9802 else
9803   cat > conftest.$ac_ext <<EOF
9804 #line 9805 "configure"
9805 #include "confdefs.h"
9806 #include <sys/types.h>
9807 #if STDC_HEADERS
9808 #include <stdlib.h>
9809 #include <stddef.h>
9810 #endif
9811 EOF
9812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9813   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9814   rm -rf conftest*
9815   ac_cv_type_off_t=yes
9816 else
9817   rm -rf conftest*
9818   ac_cv_type_off_t=no
9819 fi
9820 rm -f conftest*
9821
9822 fi
9823 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9824 if test $ac_cv_type_off_t = no; then
9825   cat >> confdefs.h <<\EOF
9826 #define off_t long
9827 EOF
9828
9829 fi
9830
9831 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9832 echo "configure:9833: checking for pid_t" >&5
9833 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9834   echo $ac_n "(cached) $ac_c" 1>&6
9835 else
9836   cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839 #include <sys/types.h>
9840 #if STDC_HEADERS
9841 #include <stdlib.h>
9842 #include <stddef.h>
9843 #endif
9844 EOF
9845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9846   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9847   rm -rf conftest*
9848   ac_cv_type_pid_t=yes
9849 else
9850   rm -rf conftest*
9851   ac_cv_type_pid_t=no
9852 fi
9853 rm -f conftest*
9854
9855 fi
9856 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9857 if test $ac_cv_type_pid_t = no; then
9858   cat >> confdefs.h <<\EOF
9859 #define pid_t int
9860 EOF
9861
9862 fi
9863
9864 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9865 echo "configure:9866: checking for ptrdiff_t" >&5
9866 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9867   echo $ac_n "(cached) $ac_c" 1>&6
9868 else
9869   cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 #include <stddef.h>
9873 int main() {
9874 ptrdiff_t p
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9878   rm -rf conftest*
9879   am_cv_type_ptrdiff_t=yes
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883   rm -rf conftest*
9884   am_cv_type_ptrdiff_t=no
9885 fi
9886 rm -f conftest*
9887 fi
9888
9889 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9890    if test $am_cv_type_ptrdiff_t = yes; then
9891      cat >> confdefs.h <<\EOF
9892 #define HAVE_PTRDIFF_T 1
9893 EOF
9894
9895    fi
9896
9897 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9898 echo "configure:9899: checking return type of signal handlers" >&5
9899 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9900   echo $ac_n "(cached) $ac_c" 1>&6
9901 else
9902   cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905 #include <sys/types.h>
9906 #include <signal.h>
9907 #ifdef signal
9908 #undef signal
9909 #endif
9910 #ifdef __cplusplus
9911 extern "C" void (*signal (int, void (*)(int)))(int);
9912 #else
9913 void (*signal ()) ();
9914 #endif
9915
9916 int main() {
9917 int i;
9918 ; return 0; }
9919 EOF
9920 if { (eval echo configure:9921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9921   rm -rf conftest*
9922   ac_cv_type_signal=void
9923 else
9924   echo "configure: failed program was:" >&5
9925   cat conftest.$ac_ext >&5
9926   rm -rf conftest*
9927   ac_cv_type_signal=int
9928 fi
9929 rm -f conftest*
9930 fi
9931
9932 echo "$ac_t""$ac_cv_type_signal" 1>&6
9933 cat >> confdefs.h <<EOF
9934 #define RETSIGTYPE $ac_cv_type_signal
9935 EOF
9936
9937
9938 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9939 echo "configure:9940: checking for sig_atomic_t" >&5
9940 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   cat > conftest.$ac_ext <<EOF
9944 #line 9945 "configure"
9945 #include "confdefs.h"
9946 #include <signal.h>
9947 int main() {
9948 sig_atomic_t atomic;
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9952   rm -rf conftest*
9953   ol_cv_type_sig_atomic_t=yes
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   ol_cv_type_sig_atomic_t=no
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9964   if test $ol_cv_type_sig_atomic_t = no; then
9965     cat >> confdefs.h <<\EOF
9966 #define sig_atomic_t int
9967 EOF
9968
9969   fi
9970  
9971 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9972 echo "configure:9973: checking for size_t" >&5
9973 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9974   echo $ac_n "(cached) $ac_c" 1>&6
9975 else
9976   cat > conftest.$ac_ext <<EOF
9977 #line 9978 "configure"
9978 #include "confdefs.h"
9979 #include <sys/types.h>
9980 #if STDC_HEADERS
9981 #include <stdlib.h>
9982 #include <stddef.h>
9983 #endif
9984 EOF
9985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9986   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9987   rm -rf conftest*
9988   ac_cv_type_size_t=yes
9989 else
9990   rm -rf conftest*
9991   ac_cv_type_size_t=no
9992 fi
9993 rm -f conftest*
9994
9995 fi
9996 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9997 if test $ac_cv_type_size_t = no; then
9998   cat >> confdefs.h <<\EOF
9999 #define size_t unsigned
10000 EOF
10001
10002 fi
10003
10004 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10005 echo "configure:10006: checking for st_blksize in struct stat" >&5
10006 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   cat > conftest.$ac_ext <<EOF
10010 #line 10011 "configure"
10011 #include "confdefs.h"
10012 #include <sys/types.h>
10013 #include <sys/stat.h>
10014 int main() {
10015 struct stat s; s.st_blksize;
10016 ; return 0; }
10017 EOF
10018 if { (eval echo configure:10019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10019   rm -rf conftest*
10020   ac_cv_struct_st_blksize=yes
10021 else
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   ac_cv_struct_st_blksize=no
10026 fi
10027 rm -f conftest*
10028 fi
10029
10030 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10031 if test $ac_cv_struct_st_blksize = yes; then
10032   cat >> confdefs.h <<\EOF
10033 #define HAVE_ST_BLKSIZE 1
10034 EOF
10035
10036 fi
10037
10038 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10039 echo "configure:10040: checking whether time.h and sys/time.h may both be included" >&5
10040 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10041   echo $ac_n "(cached) $ac_c" 1>&6
10042 else
10043   cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 #include <sys/types.h>
10047 #include <sys/time.h>
10048 #include <time.h>
10049 int main() {
10050 struct tm *tp;
10051 ; return 0; }
10052 EOF
10053 if { (eval echo configure:10054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10054   rm -rf conftest*
10055   ac_cv_header_time=yes
10056 else
10057   echo "configure: failed program was:" >&5
10058   cat conftest.$ac_ext >&5
10059   rm -rf conftest*
10060   ac_cv_header_time=no
10061 fi
10062 rm -f conftest*
10063 fi
10064
10065 echo "$ac_t""$ac_cv_header_time" 1>&6
10066 if test $ac_cv_header_time = yes; then
10067   cat >> confdefs.h <<\EOF
10068 #define TIME_WITH_SYS_TIME 1
10069 EOF
10070
10071 fi
10072
10073 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10074 echo "configure:10075: checking whether struct tm is in sys/time.h or time.h" >&5
10075 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10076   echo $ac_n "(cached) $ac_c" 1>&6
10077 else
10078   cat > conftest.$ac_ext <<EOF
10079 #line 10080 "configure"
10080 #include "confdefs.h"
10081 #include <sys/types.h>
10082 #include <time.h>
10083 int main() {
10084 struct tm *tp; tp->tm_sec;
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10088   rm -rf conftest*
10089   ac_cv_struct_tm=time.h
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   ac_cv_struct_tm=sys/time.h
10095 fi
10096 rm -f conftest*
10097 fi
10098
10099 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10100 if test $ac_cv_struct_tm = sys/time.h; then
10101   cat >> confdefs.h <<\EOF
10102 #define TM_IN_SYS_TIME 1
10103 EOF
10104
10105 fi
10106
10107 # test for pw_gecos in struct passwd
10108 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10109 echo "configure:10110: checking struct passwd for pw_gecos" >&5
10110 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   
10114         cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 #include <pwd.h>
10118 int main() {
10119
10120         struct passwd pwd;
10121         pwd.pw_gecos = pwd.pw_name;
10122
10123 ; return 0; }
10124 EOF
10125 if { (eval echo configure:10126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10126   rm -rf conftest*
10127   ol_cv_struct_passwd_pw_gecos=yes
10128 else
10129   echo "configure: failed program was:" >&5
10130   cat conftest.$ac_ext >&5
10131   rm -rf conftest*
10132   ol_cv_struct_passwd_pw_gecos=no
10133 fi
10134 rm -f conftest*
10135 fi
10136
10137 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10138 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10139         cat >> confdefs.h <<\EOF
10140 #define HAVE_PW_GECOS 1
10141 EOF
10142
10143 fi
10144
10145
10146
10147 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10148 echo "configure:10149: checking if toupper() requires islower()" >&5
10149 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10150   echo $ac_n "(cached) $ac_c" 1>&6
10151 else
10152   
10153         if test "$cross_compiling" = yes; then
10154   ol_cv_c_upper_lower=safe
10155 else
10156   cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159
10160 #include <ctype.h>
10161 main()
10162 {
10163         if ('C' == toupper('C'))
10164                 exit(0);
10165         else
10166                 exit(1);
10167 }
10168 EOF
10169 if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10170 then
10171   ol_cv_c_upper_lower=no
10172 else
10173   echo "configure: failed program was:" >&5
10174   cat conftest.$ac_ext >&5
10175   rm -fr conftest*
10176   ol_cv_c_upper_lower=yes
10177 fi
10178 rm -fr conftest*
10179 fi
10180
10181 fi
10182
10183 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10184 if test $ol_cv_c_upper_lower != no ; then
10185         cat >> confdefs.h <<\EOF
10186 #define C_UPPER_LOWER 1
10187 EOF
10188
10189 fi
10190
10191 echo $ac_n "checking for working const""... $ac_c" 1>&6
10192 echo "configure:10193: checking for working const" >&5
10193 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10194   echo $ac_n "(cached) $ac_c" 1>&6
10195 else
10196   cat > conftest.$ac_ext <<EOF
10197 #line 10198 "configure"
10198 #include "confdefs.h"
10199
10200 int main() {
10201
10202 /* Ultrix mips cc rejects this.  */
10203 typedef int charset[2]; const charset x;
10204 /* SunOS 4.1.1 cc rejects this.  */
10205 char const *const *ccp;
10206 char **p;
10207 /* NEC SVR4.0.2 mips cc rejects this.  */
10208 struct point {int x, y;};
10209 static struct point const zero = {0,0};
10210 /* AIX XL C 1.02.0.0 rejects this.
10211    It does not let you subtract one const X* pointer from another in an arm
10212    of an if-expression whose if-part is not a constant expression */
10213 const char *g = "string";
10214 ccp = &g + (g ? g-g : 0);
10215 /* HPUX 7.0 cc rejects these. */
10216 ++ccp;
10217 p = (char**) ccp;
10218 ccp = (char const *const *) p;
10219 { /* SCO 3.2v4 cc rejects this.  */
10220   char *t;
10221   char const *s = 0 ? (char *) 0 : (char const *) 0;
10222
10223   *t++ = 0;
10224 }
10225 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10226   int x[] = {25, 17};
10227   const int *foo = &x[0];
10228   ++foo;
10229 }
10230 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10231   typedef const int *iptr;
10232   iptr p = 0;
10233   ++p;
10234 }
10235 { /* AIX XL C 1.02.0.0 rejects this saying
10236      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10237   struct s { int j; const int *ap[3]; };
10238   struct s *b; b->j = 5;
10239 }
10240 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10241   const int foo = 10;
10242 }
10243
10244 ; return 0; }
10245 EOF
10246 if { (eval echo configure:10247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10247   rm -rf conftest*
10248   ac_cv_c_const=yes
10249 else
10250   echo "configure: failed program was:" >&5
10251   cat conftest.$ac_ext >&5
10252   rm -rf conftest*
10253   ac_cv_c_const=no
10254 fi
10255 rm -f conftest*
10256 fi
10257
10258 echo "$ac_t""$ac_cv_c_const" 1>&6
10259 if test $ac_cv_c_const = no; then
10260   cat >> confdefs.h <<\EOF
10261 #define const 
10262 EOF
10263
10264 fi
10265
10266 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10267 echo "configure:10268: checking if compiler understands volatile" >&5
10268 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10269   echo $ac_n "(cached) $ac_c" 1>&6
10270 else
10271   cat > conftest.$ac_ext <<EOF
10272 #line 10273 "configure"
10273 #include "confdefs.h"
10274 int x, y, z;
10275 int main() {
10276 volatile int a; int * volatile b = x ? &y : &z;
10277       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10278       *b = 0;
10279 ; return 0; }
10280 EOF
10281 if { (eval echo configure:10282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10282   rm -rf conftest*
10283   ol_cv_c_volatile=yes
10284 else
10285   echo "configure: failed program was:" >&5
10286   cat conftest.$ac_ext >&5
10287   rm -rf conftest*
10288   ol_cv_c_volatile=no
10289 fi
10290 rm -f conftest*
10291 fi
10292
10293 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10294   if test $ol_cv_c_volatile = yes; then
10295     : 
10296   else
10297     cat >> confdefs.h <<\EOF
10298 #define volatile 
10299 EOF
10300
10301   fi
10302  
10303
10304 if test $cross_compiling = yes ; then
10305         cat >> confdefs.h <<\EOF
10306 #define CROSS_COMPILING 1
10307 EOF
10308
10309 else
10310         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10311 echo "configure:10312: checking whether byte ordering is bigendian" >&5
10312 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10313   echo $ac_n "(cached) $ac_c" 1>&6
10314 else
10315   ac_cv_c_bigendian=unknown
10316 # See if sys/param.h defines the BYTE_ORDER macro.
10317 cat > conftest.$ac_ext <<EOF
10318 #line 10319 "configure"
10319 #include "confdefs.h"
10320 #include <sys/types.h>
10321 #include <sys/param.h>
10322 int main() {
10323
10324 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10325  bogus endian macros
10326 #endif
10327 ; return 0; }
10328 EOF
10329 if { (eval echo configure:10330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10330   rm -rf conftest*
10331   # It does; now see whether it defined to BIG_ENDIAN or not.
10332 cat > conftest.$ac_ext <<EOF
10333 #line 10334 "configure"
10334 #include "confdefs.h"
10335 #include <sys/types.h>
10336 #include <sys/param.h>
10337 int main() {
10338
10339 #if BYTE_ORDER != BIG_ENDIAN
10340  not big endian
10341 #endif
10342 ; return 0; }
10343 EOF
10344 if { (eval echo configure:10345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10345   rm -rf conftest*
10346   ac_cv_c_bigendian=yes
10347 else
10348   echo "configure: failed program was:" >&5
10349   cat conftest.$ac_ext >&5
10350   rm -rf conftest*
10351   ac_cv_c_bigendian=no
10352 fi
10353 rm -f conftest*
10354 else
10355   echo "configure: failed program was:" >&5
10356   cat conftest.$ac_ext >&5
10357 fi
10358 rm -f conftest*
10359 if test $ac_cv_c_bigendian = unknown; then
10360 if test "$cross_compiling" = yes; then
10361     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10362 else
10363   cat > conftest.$ac_ext <<EOF
10364 #line 10365 "configure"
10365 #include "confdefs.h"
10366 main () {
10367   /* Are we little or big endian?  From Harbison&Steele.  */
10368   union
10369   {
10370     long l;
10371     char c[sizeof (long)];
10372   } u;
10373   u.l = 1;
10374   exit (u.c[sizeof (long) - 1] == 1);
10375 }
10376 EOF
10377 if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10378 then
10379   ac_cv_c_bigendian=no
10380 else
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -fr conftest*
10384   ac_cv_c_bigendian=yes
10385 fi
10386 rm -fr conftest*
10387 fi
10388
10389 fi
10390 fi
10391
10392 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10393 if test $ac_cv_c_bigendian = yes; then
10394   cat >> confdefs.h <<\EOF
10395 #define WORDS_BIGENDIAN 1
10396 EOF
10397
10398 fi
10399
10400         echo $ac_n "checking size of short""... $ac_c" 1>&6
10401 echo "configure:10402: checking size of short" >&5
10402 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   if test "$cross_compiling" = yes; then
10406     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10407 else
10408   cat > conftest.$ac_ext <<EOF
10409 #line 10410 "configure"
10410 #include "confdefs.h"
10411 #include <stdio.h>
10412 main()
10413 {
10414   FILE *f=fopen("conftestval", "w");
10415   if (!f) exit(1);
10416   fprintf(f, "%d\n", sizeof(short));
10417   exit(0);
10418 }
10419 EOF
10420 if { (eval echo configure:10421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10421 then
10422   ac_cv_sizeof_short=`cat conftestval`
10423 else
10424   echo "configure: failed program was:" >&5
10425   cat conftest.$ac_ext >&5
10426   rm -fr conftest*
10427   ac_cv_sizeof_short=0
10428 fi
10429 rm -fr conftest*
10430 fi
10431
10432 fi
10433 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10434 cat >> confdefs.h <<EOF
10435 #define SIZEOF_SHORT $ac_cv_sizeof_short
10436 EOF
10437
10438  
10439         echo $ac_n "checking size of int""... $ac_c" 1>&6
10440 echo "configure:10441: checking size of int" >&5
10441 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10442   echo $ac_n "(cached) $ac_c" 1>&6
10443 else
10444   if test "$cross_compiling" = yes; then
10445     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10446 else
10447   cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 #include <stdio.h>
10451 main()
10452 {
10453   FILE *f=fopen("conftestval", "w");
10454   if (!f) exit(1);
10455   fprintf(f, "%d\n", sizeof(int));
10456   exit(0);
10457 }
10458 EOF
10459 if { (eval echo configure:10460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10460 then
10461   ac_cv_sizeof_int=`cat conftestval`
10462 else
10463   echo "configure: failed program was:" >&5
10464   cat conftest.$ac_ext >&5
10465   rm -fr conftest*
10466   ac_cv_sizeof_int=0
10467 fi
10468 rm -fr conftest*
10469 fi
10470
10471 fi
10472 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10473 cat >> confdefs.h <<EOF
10474 #define SIZEOF_INT $ac_cv_sizeof_int
10475 EOF
10476
10477  
10478         echo $ac_n "checking size of long""... $ac_c" 1>&6
10479 echo "configure:10480: checking size of long" >&5
10480 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10481   echo $ac_n "(cached) $ac_c" 1>&6
10482 else
10483   if test "$cross_compiling" = yes; then
10484     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489 #include <stdio.h>
10490 main()
10491 {
10492   FILE *f=fopen("conftestval", "w");
10493   if (!f) exit(1);
10494   fprintf(f, "%d\n", sizeof(long));
10495   exit(0);
10496 }
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10499 then
10500   ac_cv_sizeof_long=`cat conftestval`
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -fr conftest*
10505   ac_cv_sizeof_long=0
10506 fi
10507 rm -fr conftest*
10508 fi
10509
10510 fi
10511 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10512 cat >> confdefs.h <<EOF
10513 #define SIZEOF_LONG $ac_cv_sizeof_long
10514 EOF
10515
10516
10517 fi
10518
10519 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10520 echo "configure:10521: checking for 8-bit clean memcmp" >&5
10521 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   if test "$cross_compiling" = yes; then
10525   ac_cv_func_memcmp_clean=no
10526 else
10527   cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530
10531 main()
10532 {
10533   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10534   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10535 }
10536
10537 EOF
10538 if { (eval echo configure:10539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10539 then
10540   ac_cv_func_memcmp_clean=yes
10541 else
10542   echo "configure: failed program was:" >&5
10543   cat conftest.$ac_ext >&5
10544   rm -fr conftest*
10545   ac_cv_func_memcmp_clean=no
10546 fi
10547 rm -fr conftest*
10548 fi
10549
10550 fi
10551
10552 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10553 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10554
10555 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10556 echo "configure:10557: checking for strftime" >&5
10557 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10558   echo $ac_n "(cached) $ac_c" 1>&6
10559 else
10560   cat > conftest.$ac_ext <<EOF
10561 #line 10562 "configure"
10562 #include "confdefs.h"
10563 /* System header to define __stub macros and hopefully few prototypes,
10564     which can conflict with char strftime(); below.  */
10565 #include <assert.h>
10566 /* Override any gcc2 internal prototype to avoid an error.  */
10567 /* We use char because int might match the return type of a gcc2
10568     builtin and then its argument prototype would still apply.  */
10569 char strftime();
10570
10571 int main() {
10572
10573 /* The GNU C library defines this for functions which it implements
10574     to always fail with ENOSYS.  Some functions are actually named
10575     something starting with __ and the normal name is an alias.  */
10576 #if defined (__stub_strftime) || defined (__stub___strftime)
10577 choke me
10578 #else
10579 strftime();
10580 #endif
10581
10582 ; return 0; }
10583 EOF
10584 if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10585   rm -rf conftest*
10586   eval "ac_cv_func_strftime=yes"
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_func_strftime=no"
10592 fi
10593 rm -f conftest*
10594 fi
10595
10596 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10597   echo "$ac_t""yes" 1>&6
10598   cat >> confdefs.h <<\EOF
10599 #define HAVE_STRFTIME 1
10600 EOF
10601
10602 else
10603   echo "$ac_t""no" 1>&6
10604 # strftime is in -lintl on SCO UNIX.
10605 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10606 echo "configure:10607: checking for strftime in -lintl" >&5
10607 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10608 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   ac_save_LIBS="$LIBS"
10612 LIBS="-lintl  $LIBS"
10613 cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616 /* Override any gcc2 internal prototype to avoid an error.  */
10617 /* We use char because int might match the return type of a gcc2
10618     builtin and then its argument prototype would still apply.  */
10619 char strftime();
10620
10621 int main() {
10622 strftime()
10623 ; return 0; }
10624 EOF
10625 if { (eval echo configure:10626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10626   rm -rf conftest*
10627   eval "ac_cv_lib_$ac_lib_var=yes"
10628 else
10629   echo "configure: failed program was:" >&5
10630   cat conftest.$ac_ext >&5
10631   rm -rf conftest*
10632   eval "ac_cv_lib_$ac_lib_var=no"
10633 fi
10634 rm -f conftest*
10635 LIBS="$ac_save_LIBS"
10636
10637 fi
10638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10639   echo "$ac_t""yes" 1>&6
10640   cat >> confdefs.h <<\EOF
10641 #define HAVE_STRFTIME 1
10642 EOF
10643
10644 LIBS="-lintl $LIBS"
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648
10649 fi
10650
10651
10652 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10653 echo "configure:10654: checking for vprintf" >&5
10654 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 /* System header to define __stub macros and hopefully few prototypes,
10661     which can conflict with char vprintf(); below.  */
10662 #include <assert.h>
10663 /* Override any gcc2 internal prototype to avoid an error.  */
10664 /* We use char because int might match the return type of a gcc2
10665     builtin and then its argument prototype would still apply.  */
10666 char vprintf();
10667
10668 int main() {
10669
10670 /* The GNU C library defines this for functions which it implements
10671     to always fail with ENOSYS.  Some functions are actually named
10672     something starting with __ and the normal name is an alias.  */
10673 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10674 choke me
10675 #else
10676 vprintf();
10677 #endif
10678
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_func_vprintf=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_func_vprintf=no"
10689 fi
10690 rm -f conftest*
10691 fi
10692
10693 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10694   echo "$ac_t""yes" 1>&6
10695   cat >> confdefs.h <<\EOF
10696 #define HAVE_VPRINTF 1
10697 EOF
10698
10699 else
10700   echo "$ac_t""no" 1>&6
10701 fi
10702
10703 if test "$ac_cv_func_vprintf" != yes; then
10704 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10705 echo "configure:10706: checking for _doprnt" >&5
10706 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10707   echo $ac_n "(cached) $ac_c" 1>&6
10708 else
10709   cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712 /* System header to define __stub macros and hopefully few prototypes,
10713     which can conflict with char _doprnt(); below.  */
10714 #include <assert.h>
10715 /* Override any gcc2 internal prototype to avoid an error.  */
10716 /* We use char because int might match the return type of a gcc2
10717     builtin and then its argument prototype would still apply.  */
10718 char _doprnt();
10719
10720 int main() {
10721
10722 /* The GNU C library defines this for functions which it implements
10723     to always fail with ENOSYS.  Some functions are actually named
10724     something starting with __ and the normal name is an alias.  */
10725 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10726 choke me
10727 #else
10728 _doprnt();
10729 #endif
10730
10731 ; return 0; }
10732 EOF
10733 if { (eval echo configure:10734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10734   rm -rf conftest*
10735   eval "ac_cv_func__doprnt=yes"
10736 else
10737   echo "configure: failed program was:" >&5
10738   cat conftest.$ac_ext >&5
10739   rm -rf conftest*
10740   eval "ac_cv_func__doprnt=no"
10741 fi
10742 rm -f conftest*
10743 fi
10744
10745 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10746   echo "$ac_t""yes" 1>&6
10747   cat >> confdefs.h <<\EOF
10748 #define HAVE_DOPRNT 1
10749 EOF
10750
10751 else
10752   echo "$ac_t""no" 1>&6
10753 fi
10754
10755 fi
10756
10757
10758 if test $ac_cv_func_vprintf = yes ; then
10759                 for ac_func in vsnprintf vsprintf
10760 do
10761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10762 echo "configure:10763: checking for $ac_func" >&5
10763 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   cat > conftest.$ac_ext <<EOF
10767 #line 10768 "configure"
10768 #include "confdefs.h"
10769 /* System header to define __stub macros and hopefully few prototypes,
10770     which can conflict with char $ac_func(); below.  */
10771 #include <assert.h>
10772 /* Override any gcc2 internal prototype to avoid an error.  */
10773 /* We use char because int might match the return type of a gcc2
10774     builtin and then its argument prototype would still apply.  */
10775 char $ac_func();
10776
10777 int main() {
10778
10779 /* The GNU C library defines this for functions which it implements
10780     to always fail with ENOSYS.  Some functions are actually named
10781     something starting with __ and the normal name is an alias.  */
10782 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10783 choke me
10784 #else
10785 $ac_func();
10786 #endif
10787
10788 ; return 0; }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10791   rm -rf conftest*
10792   eval "ac_cv_func_$ac_func=yes"
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_func_$ac_func=no"
10798 fi
10799 rm -f conftest*
10800 fi
10801
10802 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10803   echo "$ac_t""yes" 1>&6
10804     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10805   cat >> confdefs.h <<EOF
10806 #define $ac_tr_func 1
10807 EOF
10808  
10809 else
10810   echo "$ac_t""no" 1>&6
10811 fi
10812 done
10813
10814 fi
10815
10816 for ac_func in \
10817         bcopy                   \
10818         endgrent                \
10819         endpwent                \
10820         flock                   \
10821         getdtablesize   \
10822         getgrgid                \
10823         gethostname             \
10824         getpass                 \
10825         getpwuid                \
10826         gettimeofday    \
10827         initgroups              \
10828         lockf                   \
10829         memcpy                  \
10830         memmove                 \
10831         mkstemp                 \
10832         recv                    \
10833         recvfrom                \
10834         setpwfile               \
10835         setgid                  \
10836         setegid                 \
10837         setsid                  \
10838         setuid                  \
10839         seteuid                 \
10840         signal                  \
10841         sigset                  \
10842         snprintf                \
10843         strdup                  \
10844         strerror                \
10845         strpbrk                 \
10846         strrchr                 \
10847         strsep                  \
10848         strstr                  \
10849         strtol                  \
10850         strtoul                 \
10851         strspn                  \
10852         sysconf                 \
10853         waitpid                 \
10854         wait4                   \
10855
10856 do
10857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10858 echo "configure:10859: checking for $ac_func" >&5
10859 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10860   echo $ac_n "(cached) $ac_c" 1>&6
10861 else
10862   cat > conftest.$ac_ext <<EOF
10863 #line 10864 "configure"
10864 #include "confdefs.h"
10865 /* System header to define __stub macros and hopefully few prototypes,
10866     which can conflict with char $ac_func(); below.  */
10867 #include <assert.h>
10868 /* Override any gcc2 internal prototype to avoid an error.  */
10869 /* We use char because int might match the return type of a gcc2
10870     builtin and then its argument prototype would still apply.  */
10871 char $ac_func();
10872
10873 int main() {
10874
10875 /* The GNU C library defines this for functions which it implements
10876     to always fail with ENOSYS.  Some functions are actually named
10877     something starting with __ and the normal name is an alias.  */
10878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10879 choke me
10880 #else
10881 $ac_func();
10882 #endif
10883
10884 ; return 0; }
10885 EOF
10886 if { (eval echo configure:10887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10887   rm -rf conftest*
10888   eval "ac_cv_func_$ac_func=yes"
10889 else
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   eval "ac_cv_func_$ac_func=no"
10894 fi
10895 rm -f conftest*
10896 fi
10897
10898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10899   echo "$ac_t""yes" 1>&6
10900     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10901   cat >> confdefs.h <<EOF
10902 #define $ac_tr_func 1
10903 EOF
10904  
10905 else
10906   echo "$ac_t""no" 1>&6
10907 fi
10908 done
10909
10910
10911 for ac_func in getopt tempnam
10912 do
10913 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10914 echo "configure:10915: checking for $ac_func" >&5
10915 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10916   echo $ac_n "(cached) $ac_c" 1>&6
10917 else
10918   cat > conftest.$ac_ext <<EOF
10919 #line 10920 "configure"
10920 #include "confdefs.h"
10921 /* System header to define __stub macros and hopefully few prototypes,
10922     which can conflict with char $ac_func(); below.  */
10923 #include <assert.h>
10924 /* Override any gcc2 internal prototype to avoid an error.  */
10925 /* We use char because int might match the return type of a gcc2
10926     builtin and then its argument prototype would still apply.  */
10927 char $ac_func();
10928
10929 int main() {
10930
10931 /* The GNU C library defines this for functions which it implements
10932     to always fail with ENOSYS.  Some functions are actually named
10933     something starting with __ and the normal name is an alias.  */
10934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10935 choke me
10936 #else
10937 $ac_func();
10938 #endif
10939
10940 ; return 0; }
10941 EOF
10942 if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10943   rm -rf conftest*
10944   eval "ac_cv_func_$ac_func=yes"
10945 else
10946   echo "configure: failed program was:" >&5
10947   cat conftest.$ac_ext >&5
10948   rm -rf conftest*
10949   eval "ac_cv_func_$ac_func=no"
10950 fi
10951 rm -f conftest*
10952 fi
10953
10954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10955   echo "$ac_t""yes" 1>&6
10956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10957   cat >> confdefs.h <<EOF
10958 #define $ac_tr_func 1
10959 EOF
10960  
10961 else
10962   echo "$ac_t""no" 1>&6
10963 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10964 fi
10965 done
10966
10967
10968
10969 # Check Configuration
10970
10971 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10972 echo "configure:10973: checking declaration of sys_errlist" >&5
10973 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10974   echo $ac_n "(cached) $ac_c" 1>&6
10975 else
10976   
10977         cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980
10981 #include <stdio.h>
10982 #include <sys/types.h>
10983 #include <errno.h> 
10984 int main() {
10985 char *c = (char *) *sys_errlist
10986 ; return 0; }
10987 EOF
10988 if { (eval echo configure:10989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10989   rm -rf conftest*
10990   ol_cv_dcl_sys_errlist=yes
10991 else
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -rf conftest*
10995   ol_cv_dcl_sys_errlist=no
10996 fi
10997 rm -f conftest*
10998 fi
10999
11000 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11001 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11002 if test $ol_cv_dcl_sys_errlist = no ; then
11003         cat >> confdefs.h <<\EOF
11004 #define DECL_SYS_ERRLIST 1
11005 EOF
11006
11007         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11008 echo "configure:11009: checking existence of sys_errlist" >&5
11009         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11010   echo $ac_n "(cached) $ac_c" 1>&6
11011 else
11012   
11013                 cat > conftest.$ac_ext <<EOF
11014 #line 11015 "configure"
11015 #include "confdefs.h"
11016 #include <errno.h>
11017 int main() {
11018 char *c = (char *) *sys_errlist
11019 ; return 0; }
11020 EOF
11021 if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11022   rm -rf conftest*
11023   ol_cv_have_sys_errlist=yes
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   ol_cv_have_sys_errlist=no
11029 fi
11030 rm -f conftest*
11031 fi
11032
11033         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11034         if test $ol_cv_have_sys_errlist = yes ; then
11035                 cat >> confdefs.h <<\EOF
11036 #define HAVE_SYS_ERRLIST 1
11037 EOF
11038
11039         fi
11040 fi
11041
11042
11043
11044 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
11045 echo "configure:11046: checking strdup declaration" >&5
11046 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   
11050         cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053
11054 #include <string.h> 
11055 int main() {
11056 extern char *strdup();
11057 ; return 0; }
11058 EOF
11059 if { (eval echo configure:11060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11060   rm -rf conftest*
11061   ol_cv_dcl_strdup=yes
11062 else
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   ol_cv_dcl_strdup=no
11067 fi
11068 rm -f conftest*
11069 fi
11070
11071 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
11072 if test $ol_cv_dcl_strdup = yes ; then
11073         cat >> confdefs.h <<\EOF
11074 #define DECL_STRDUP 1
11075 EOF
11076
11077 fi
11078
11079
11080
11081 if test "$ol_enable_debug" != no ; then
11082         cat >> confdefs.h <<\EOF
11083 #define LDAP_DEBUG 1
11084 EOF
11085
11086 fi
11087 if test "$ol_enable_syslog" = yes ; then
11088         cat >> confdefs.h <<\EOF
11089 #define LDAP_SYSLOG 1
11090 EOF
11091
11092 fi
11093 if test "$ol_enable_libui" = yes ; then
11094         cat >> confdefs.h <<\EOF
11095 #define LDAP_LIBUI 1
11096 EOF
11097
11098 fi
11099 if test "$ol_enable_cache" = no ; then
11100         cat >> confdefs.h <<\EOF
11101 #define LDAP_NOCACHE 1
11102 EOF
11103
11104 fi
11105 if test "$ol_enable_dns" != no ; then
11106         cat >> confdefs.h <<\EOF
11107 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11108 EOF
11109
11110 fi
11111 if test "$ol_enable_proctitle" != no ; then
11112         cat >> confdefs.h <<\EOF
11113 #define LDAP_PROCTITLE 1
11114 EOF
11115
11116 fi
11117 if test "$ol_enable_referrals" != no ; then
11118         cat >> confdefs.h <<\EOF
11119 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11120 EOF
11121
11122 fi
11123 if test "$ol_enable_cldap" != no ; then
11124         cat >> confdefs.h <<\EOF
11125 #define LDAP_CONNECTIONLESS 1
11126 EOF
11127
11128 fi
11129
11130 if test "$ol_enable_aclgroups" != no ; then
11131         cat >> confdefs.h <<\EOF
11132 #define SLAPD_ACLGROUPS 1
11133 EOF
11134
11135 fi
11136 if test "$ol_enable_crypt" != no ; then
11137         cat >> confdefs.h <<\EOF
11138 #define SLAPD_CRYPT 1
11139 EOF
11140
11141 fi
11142 if test "$ol_enable_cleartext" != no ; then
11143         cat >> confdefs.h <<\EOF
11144 #define SLAPD_CLEARTEXT 1
11145 EOF
11146
11147 fi
11148 if test "$ol_enable_phonetic" != no ; then
11149         cat >> confdefs.h <<\EOF
11150 #define SLAPD_PHONETIC 1
11151 EOF
11152
11153 fi
11154 if test "$ol_enable_rlookups" != no ; then
11155         cat >> confdefs.h <<\EOF
11156 #define SLAPD_RLOOKUPS 1
11157 EOF
11158
11159 fi
11160
11161 if test "$ol_link_modules" != no ; then
11162         cat >> confdefs.h <<\EOF
11163 #define SLAPD_MODULES 1
11164 EOF
11165
11166         BUILD_SLAPD=yes
11167 fi
11168
11169 if test "$ol_link_bdb2" != no ; then
11170         cat >> confdefs.h <<\EOF
11171 #define SLAPD_BDB2 1
11172 EOF
11173
11174         BUILD_SLAPD=yes
11175         BUILD_BDB2=yes
11176 fi
11177
11178 if test "$ol_link_ldbm" != no ; then
11179         cat >> confdefs.h <<\EOF
11180 #define SLAPD_LDBM 1
11181 EOF
11182
11183         BUILD_SLAPD=yes
11184         BUILD_LDBM=yes
11185 fi
11186
11187 if test "$ol_enable_passwd" != no ; then
11188         cat >> confdefs.h <<\EOF
11189 #define SLAPD_PASSWD 1
11190 EOF
11191
11192         BUILD_SLAPD=yes
11193         BUILD_PASSWD=yes
11194 fi
11195
11196 if test "$ol_link_perl" != no ; then
11197         cat >> confdefs.h <<\EOF
11198 #define SLAPD_PERL 1
11199 EOF
11200
11201         BUILD_SLAPD=yes
11202         BUILD_PERL=yes
11203 fi
11204
11205 if test "$ol_enable_shell" != no ; then
11206         cat >> confdefs.h <<\EOF
11207 #define SLAPD_SHELL 1
11208 EOF
11209
11210         BUILD_SLAPD=yes
11211         BUILD_SHELL=yes
11212 fi
11213
11214 if test "$ol_enable_tcl" != no ; then
11215         cat >> confdefs.h <<\EOF
11216 #define SLAPD_TCL 1
11217 EOF
11218
11219         BUILD_SLAPD=yes
11220         BUILD_TCL=yes
11221 fi
11222
11223 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11224         $BUILD_SLAPD = yes ; then
11225         BUILD_SLURPD=yes
11226 fi
11227
11228 if test "$ol_link_isode" != no ; then
11229         BUILD_LDAPD=yes
11230 fi
11231
11232
11233
11234
11235   
11236   
11237   
11238   
11239   
11240   
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263 trap '' 1 2 15
11264
11265 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11266
11267 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11268 # Let make expand exec_prefix.
11269 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11270
11271 # Any assignment to VPATH causes Sun make to only execute
11272 # the first set of double-colon rules, so remove it if not needed.
11273 # If there is a colon in the path, we need to keep it.
11274 if test "x$srcdir" = x.; then
11275   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11276 fi
11277
11278 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11279
11280 DEFS=-DHAVE_CONFIG_H
11281
11282 # Without the "./", some shells look in PATH for config.status.
11283 : ${CONFIG_STATUS=./config.status}
11284
11285 echo creating $CONFIG_STATUS
11286 rm -f $CONFIG_STATUS
11287 cat > $CONFIG_STATUS <<EOF
11288 #! /bin/sh
11289 # Generated automatically by configure.
11290 # Run this file to recreate the current configuration.
11291 # This directory was configured as follows,
11292 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11293 #
11294 # $0 $ac_configure_args
11295 #
11296 # Compiler output produced by configure, useful for debugging
11297 # configure, is in ./config.log if it exists.
11298
11299 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11300 for ac_option
11301 do
11302   case "\$ac_option" in
11303   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11304     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11305     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11306   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11307     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11308     exit 0 ;;
11309   -help | --help | --hel | --he | --h)
11310     echo "\$ac_cs_usage"; exit 0 ;;
11311   *) echo "\$ac_cs_usage"; exit 1 ;;
11312   esac
11313 done
11314
11315 ac_given_srcdir=$srcdir
11316 ac_given_INSTALL="$INSTALL"
11317
11318 trap 'rm -fr `echo "\
11319 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11320 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11321 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11322 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11323 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11324 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11325 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11326 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11327 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11328 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11329 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11330 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11331 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11332 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11333 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11334 include/Makefile:build/top.mk:include/Makefile.in \
11335 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11336 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11337 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11338 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11339 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11340 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11341 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11342 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11343 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11344 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11345 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11346 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11347 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11348 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11349 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11350 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11351 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11352 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11353 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11354 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11355 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11356 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11357 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11358 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11359 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11360  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11361 EOF
11362 cat >> $CONFIG_STATUS <<EOF
11363
11364 # Protect against being on the right side of a sed subst in config.status.
11365 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11366  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11367 $ac_vpsub
11368 $extrasub
11369 s%@SHELL@%$SHELL%g
11370 s%@CFLAGS@%$CFLAGS%g
11371 s%@CPPFLAGS@%$CPPFLAGS%g
11372 s%@CXXFLAGS@%$CXXFLAGS%g
11373 s%@FFLAGS@%$FFLAGS%g
11374 s%@DEFS@%$DEFS%g
11375 s%@LDFLAGS@%$LDFLAGS%g
11376 s%@LIBS@%$LIBS%g
11377 s%@exec_prefix@%$exec_prefix%g
11378 s%@prefix@%$prefix%g
11379 s%@program_transform_name@%$program_transform_name%g
11380 s%@bindir@%$bindir%g
11381 s%@sbindir@%$sbindir%g
11382 s%@libexecdir@%$libexecdir%g
11383 s%@datadir@%$datadir%g
11384 s%@sysconfdir@%$sysconfdir%g
11385 s%@sharedstatedir@%$sharedstatedir%g
11386 s%@localstatedir@%$localstatedir%g
11387 s%@libdir@%$libdir%g
11388 s%@includedir@%$includedir%g
11389 s%@oldincludedir@%$oldincludedir%g
11390 s%@infodir@%$infodir%g
11391 s%@mandir@%$mandir%g
11392 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11393 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11394 s%@INSTALL_DATA@%$INSTALL_DATA%g
11395 s%@PACKAGE@%$PACKAGE%g
11396 s%@VERSION@%$VERSION%g
11397 s%@ACLOCAL@%$ACLOCAL%g
11398 s%@AUTOCONF@%$AUTOCONF%g
11399 s%@AUTOMAKE@%$AUTOMAKE%g
11400 s%@AUTOHEADER@%$AUTOHEADER%g
11401 s%@MAKEINFO@%$MAKEINFO%g
11402 s%@SET_MAKE@%$SET_MAKE%g
11403 s%@top_builddir@%$top_builddir%g
11404 s%@ldap_subdir@%$ldap_subdir%g
11405 s%@host@%$host%g
11406 s%@host_alias@%$host_alias%g
11407 s%@host_cpu@%$host_cpu%g
11408 s%@host_vendor@%$host_vendor%g
11409 s%@host_os@%$host_os%g
11410 s%@RANLIB@%$RANLIB%g
11411 s%@CC@%$CC%g
11412 s%@LD@%$LD%g
11413 s%@NM@%$NM%g
11414 s%@LN_S@%$LN_S%g
11415 s%@LIBTOOL@%$LIBTOOL%g
11416 s%@AWK@%$AWK%g
11417 s%@LN_H@%$LN_H%g
11418 s%@SENDMAIL@%$SENDMAIL%g
11419 s%@EDITOR@%$EDITOR%g
11420 s%@FINGER@%$FINGER%g
11421 s%@GLIBCONFIG@%$GLIBCONFIG%g
11422 s%@PERLBIN@%$PERLBIN%g
11423 s%@CPP@%$CPP%g
11424 s%@EXEEXT@%$EXEEXT%g
11425 s%@OBJEXT@%$OBJEXT%g
11426 s%@PEPSY@%$PEPSY%g
11427 s%@LIBOBJS@%$LIBOBJS%g
11428 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11429 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11430 s%@BUILD_BDB2@%$BUILD_BDB2%g
11431 s%@BUILD_LDBM@%$BUILD_LDBM%g
11432 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11433 s%@BUILD_PERL@%$BUILD_PERL%g
11434 s%@BUILD_SHELL@%$BUILD_SHELL%g
11435 s%@BUILD_TCL@%$BUILD_TCL%g
11436 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11437 s%@LDAP_LIBS@%$LDAP_LIBS%g
11438 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11439 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11440 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11441 s%@LDBM_LIBS@%$LDBM_LIBS%g
11442 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11443 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11444 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
11445 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
11446 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11447 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11448 s%@KRB_LIBS@%$KRB_LIBS%g
11449 s%@READLINE_LIBS@%$READLINE_LIBS%g
11450 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11451 s%@TLS_LIBS@%$TLS_LIBS%g
11452
11453 CEOF
11454 EOF
11455
11456 cat >> $CONFIG_STATUS <<\EOF
11457
11458 # Split the substitutions into bite-sized pieces for seds with
11459 # small command number limits, like on Digital OSF/1 and HP-UX.
11460 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11461 ac_file=1 # Number of current file.
11462 ac_beg=1 # First line for current file.
11463 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11464 ac_more_lines=:
11465 ac_sed_cmds=""
11466 while $ac_more_lines; do
11467   if test $ac_beg -gt 1; then
11468     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11469   else
11470     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11471   fi
11472   if test ! -s conftest.s$ac_file; then
11473     ac_more_lines=false
11474     rm -f conftest.s$ac_file
11475   else
11476     if test -z "$ac_sed_cmds"; then
11477       ac_sed_cmds="sed -f conftest.s$ac_file"
11478     else
11479       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11480     fi
11481     ac_file=`expr $ac_file + 1`
11482     ac_beg=$ac_end
11483     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11484   fi
11485 done
11486 if test -z "$ac_sed_cmds"; then
11487   ac_sed_cmds=cat
11488 fi
11489 EOF
11490
11491 cat >> $CONFIG_STATUS <<EOF
11492
11493 CONFIG_FILES=\${CONFIG_FILES-"\
11494 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11495 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11496 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11497 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11498 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11499 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11500 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11501 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11502 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11503 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11504 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11505 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11506 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11507 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11508 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11509 include/Makefile:build/top.mk:include/Makefile.in \
11510 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11511 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11512 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11513 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11514 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11515 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11516 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11517 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11518 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11519 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11520 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11521 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11522 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11523 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11524 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11525 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11526 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11527 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11528 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11529 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11530 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11531 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11532 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11533 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11534 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11535 "}
11536 EOF
11537 cat >> $CONFIG_STATUS <<\EOF
11538 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11539   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11540   case "$ac_file" in
11541   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11542        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11543   *) ac_file_in="${ac_file}.in" ;;
11544   esac
11545
11546   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11547
11548   # Remove last slash and all that follows it.  Not all systems have dirname.
11549   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11550   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11551     # The file is in a subdirectory.
11552     test ! -d "$ac_dir" && mkdir "$ac_dir"
11553     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11554     # A "../" for each directory in $ac_dir_suffix.
11555     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11556   else
11557     ac_dir_suffix= ac_dots=
11558   fi
11559
11560   case "$ac_given_srcdir" in
11561   .)  srcdir=.
11562       if test -z "$ac_dots"; then top_srcdir=.
11563       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11564   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11565   *) # Relative path.
11566     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11567     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11568   esac
11569
11570   case "$ac_given_INSTALL" in
11571   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11572   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11573   esac
11574
11575   echo creating "$ac_file"
11576   rm -f "$ac_file"
11577   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11578   case "$ac_file" in
11579   *Makefile*) ac_comsub="1i\\
11580 # $configure_input" ;;
11581   *) ac_comsub= ;;
11582   esac
11583
11584   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11585   sed -e "$ac_comsub
11586 s%@configure_input@%$configure_input%g
11587 s%@srcdir@%$srcdir%g
11588 s%@top_srcdir@%$top_srcdir%g
11589 s%@INSTALL@%$INSTALL%g
11590 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11591 fi; done
11592 rm -f conftest.s*
11593
11594 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11595 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11596 #
11597 # ac_d sets the value in "#define NAME VALUE" lines.
11598 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11599 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11600 ac_dC='\3'
11601 ac_dD='%g'
11602 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11603 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11604 ac_uB='\([      ]\)%\1#\2define\3'
11605 ac_uC=' '
11606 ac_uD='\4%g'
11607 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11608 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11609 ac_eB='$%\1#\2define\3'
11610 ac_eC=' '
11611 ac_eD='%g'
11612
11613 if test "${CONFIG_HEADERS+set}" != set; then
11614 EOF
11615 cat >> $CONFIG_STATUS <<EOF
11616   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11617 EOF
11618 cat >> $CONFIG_STATUS <<\EOF
11619 fi
11620 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11621   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11622   case "$ac_file" in
11623   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11624        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11625   *) ac_file_in="${ac_file}.in" ;;
11626   esac
11627
11628   echo creating $ac_file
11629
11630   rm -f conftest.frag conftest.in conftest.out
11631   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11632   cat $ac_file_inputs > conftest.in
11633
11634 EOF
11635
11636 # Transform confdefs.h into a sed script conftest.vals that substitutes
11637 # the proper values into config.h.in to produce config.h.  And first:
11638 # Protect against being on the right side of a sed subst in config.status.
11639 # Protect against being in an unquoted here document in config.status.
11640 rm -f conftest.vals
11641 cat > conftest.hdr <<\EOF
11642 s/[\\&%]/\\&/g
11643 s%[\\$`]%\\&%g
11644 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11645 s%ac_d%ac_u%gp
11646 s%ac_u%ac_e%gp
11647 EOF
11648 sed -n -f conftest.hdr confdefs.h > conftest.vals
11649 rm -f conftest.hdr
11650
11651 # This sed command replaces #undef with comments.  This is necessary, for
11652 # example, in the case of _POSIX_SOURCE, which is predefined and required
11653 # on some systems where configure will not decide to define it.
11654 cat >> conftest.vals <<\EOF
11655 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11656 EOF
11657
11658 # Break up conftest.vals because some shells have a limit on
11659 # the size of here documents, and old seds have small limits too.
11660
11661 rm -f conftest.tail
11662 while :
11663 do
11664   ac_lines=`grep -c . conftest.vals`
11665   # grep -c gives empty output for an empty file on some AIX systems.
11666   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11667   # Write a limited-size here document to conftest.frag.
11668   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11669   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11670   echo 'CEOF
11671   sed -f conftest.frag conftest.in > conftest.out
11672   rm -f conftest.in
11673   mv conftest.out conftest.in
11674 ' >> $CONFIG_STATUS
11675   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11676   rm -f conftest.vals
11677   mv conftest.tail conftest.vals
11678 done
11679 rm -f conftest.vals
11680
11681 cat >> $CONFIG_STATUS <<\EOF
11682   rm -f conftest.frag conftest.h
11683   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11684   cat conftest.in >> conftest.h
11685   rm -f conftest.in
11686   if cmp -s $ac_file conftest.h 2>/dev/null; then
11687     echo "$ac_file is unchanged"
11688     rm -f conftest.h
11689   else
11690     # Remove last slash and all that follows it.  Not all systems have dirname.
11691       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11692       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11693       # The file is in a subdirectory.
11694       test ! -d "$ac_dir" && mkdir "$ac_dir"
11695     fi
11696     rm -f $ac_file
11697     mv conftest.h $ac_file
11698   fi
11699 fi; done
11700
11701 EOF
11702 cat >> $CONFIG_STATUS <<EOF
11703
11704 EOF
11705 cat >> $CONFIG_STATUS <<\EOF
11706
11707 date > stamp-h
11708 echo Please \"make depend\" to build dependencies
11709
11710 exit 0
11711 EOF
11712 chmod +x $CONFIG_STATUS
11713 rm -fr confdefs* $ac_clean_files
11714 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11715