]> git.sur5r.net Git - openldap/blob - configure
openldap guide sdf files and gifs
[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
776
777
778 missing_dir=`cd $ac_aux_dir && pwd`
779 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
780 echo "configure:781: checking for working aclocal" >&5
781 # Run test in a subshell; some versions of sh will print an error if
782 # an executable is not found, even if stderr is redirected.
783 # Redirect stdin to placate older versions of autoconf.  Sigh.
784 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
785    ACLOCAL=aclocal
786    echo "$ac_t""found" 1>&6
787 else
788    ACLOCAL="$missing_dir/missing aclocal"
789    echo "$ac_t""missing" 1>&6
790 fi
791
792 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
793 echo "configure:794: checking for working autoconf" >&5
794 # Run test in a subshell; some versions of sh will print an error if
795 # an executable is not found, even if stderr is redirected.
796 # Redirect stdin to placate older versions of autoconf.  Sigh.
797 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
798    AUTOCONF=autoconf
799    echo "$ac_t""found" 1>&6
800 else
801    AUTOCONF="$missing_dir/missing autoconf"
802    echo "$ac_t""missing" 1>&6
803 fi
804
805 echo $ac_n "checking for working automake""... $ac_c" 1>&6
806 echo "configure:807: checking for working automake" >&5
807 # Run test in a subshell; some versions of sh will print an error if
808 # an executable is not found, even if stderr is redirected.
809 # Redirect stdin to placate older versions of autoconf.  Sigh.
810 if (automake --version) < /dev/null > /dev/null 2>&1; then
811    AUTOMAKE=automake
812    echo "$ac_t""found" 1>&6
813 else
814    AUTOMAKE="$missing_dir/missing automake"
815    echo "$ac_t""missing" 1>&6
816 fi
817
818 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
819 echo "configure:820: checking for working autoheader" >&5
820 # Run test in a subshell; some versions of sh will print an error if
821 # an executable is not found, even if stderr is redirected.
822 # Redirect stdin to placate older versions of autoconf.  Sigh.
823 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
824    AUTOHEADER=autoheader
825    echo "$ac_t""found" 1>&6
826 else
827    AUTOHEADER="$missing_dir/missing autoheader"
828    echo "$ac_t""missing" 1>&6
829 fi
830
831 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
832 echo "configure:833: checking for working makeinfo" >&5
833 # Run test in a subshell; some versions of sh will print an error if
834 # an executable is not found, even if stderr is redirected.
835 # Redirect stdin to placate older versions of autoconf.  Sigh.
836 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
837    MAKEINFO=makeinfo
838    echo "$ac_t""found" 1>&6
839 else
840    MAKEINFO="$missing_dir/missing makeinfo"
841    echo "$ac_t""missing" 1>&6
842 fi
843
844
845
846
847 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
848 echo "configure:849: checking configure arguments" >&5
849
850
851 top_builddir=`pwd`
852
853 ldap_subdir="openldap"
854
855 # Check whether --with-subdir or --without-subdir was given.
856 if test "${with_subdir+set}" = set; then
857   withval="$with_subdir"
858   
859         if test "$withval" = "no"; then
860                 ldap_subdir=""
861         elif test "$withval" != "yes"; then
862                 ldap_subdir="$withval"
863         fi
864
865 fi
866
867
868 # OpenLDAP --enable-debug
869         # Check whether --enable-debug or --disable-debug was given.
870 if test "${enable_debug+set}" = set; then
871   enableval="$enable_debug"
872   
873         ol_arg=invalid
874         for ol_val in auto yes no ; do
875                 if test "$enableval" = "$ol_val" ; then
876                         ol_arg="$ol_val"
877                 fi
878         done
879         if test "$ol_arg" = "invalid" ; then
880                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
881         fi
882         ol_enable_debug="$ol_arg"
883
884 else
885         ol_enable_debug="yes"
886 fi
887 # end --enable-debug
888 # OpenLDAP --enable-syslog
889         # Check whether --enable-syslog or --disable-syslog was given.
890 if test "${enable_syslog+set}" = set; then
891   enableval="$enable_syslog"
892   
893         ol_arg=invalid
894         for ol_val in auto yes no ; do
895                 if test "$enableval" = "$ol_val" ; then
896                         ol_arg="$ol_val"
897                 fi
898         done
899         if test "$ol_arg" = "invalid" ; then
900                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
901         fi
902         ol_enable_syslog="$ol_arg"
903
904 else
905         ol_enable_syslog="auto"
906 fi
907 # end --enable-syslog
908 # OpenLDAP --enable-proctitle
909         # Check whether --enable-proctitle or --disable-proctitle was given.
910 if test "${enable_proctitle+set}" = set; then
911   enableval="$enable_proctitle"
912   
913         ol_arg=invalid
914         for ol_val in auto yes no ; do
915                 if test "$enableval" = "$ol_val" ; then
916                         ol_arg="$ol_val"
917                 fi
918         done
919         if test "$ol_arg" = "invalid" ; then
920                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
921         fi
922         ol_enable_proctitle="$ol_arg"
923
924 else
925         ol_enable_proctitle="yes"
926 fi
927 # end --enable-proctitle
928 # OpenLDAP --enable-cache
929         # Check whether --enable-cache or --disable-cache was given.
930 if test "${enable_cache+set}" = set; then
931   enableval="$enable_cache"
932   
933         ol_arg=invalid
934         for ol_val in auto yes no ; do
935                 if test "$enableval" = "$ol_val" ; then
936                         ol_arg="$ol_val"
937                 fi
938         done
939         if test "$ol_arg" = "invalid" ; then
940                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
941         fi
942         ol_enable_cache="$ol_arg"
943
944 else
945         ol_enable_cache="yes"
946 fi
947 # end --enable-cache
948 # OpenLDAP --enable-dns
949         # Check whether --enable-dns or --disable-dns was given.
950 if test "${enable_dns+set}" = set; then
951   enableval="$enable_dns"
952   
953         ol_arg=invalid
954         for ol_val in auto yes no ; do
955                 if test "$enableval" = "$ol_val" ; then
956                         ol_arg="$ol_val"
957                 fi
958         done
959         if test "$ol_arg" = "invalid" ; then
960                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
961         fi
962         ol_enable_dns="$ol_arg"
963
964 else
965         ol_enable_dns="no"
966 fi
967 # end --enable-dns
968 # OpenLDAP --enable-referrals
969         # Check whether --enable-referrals or --disable-referrals was given.
970 if test "${enable_referrals+set}" = set; then
971   enableval="$enable_referrals"
972   
973         ol_arg=invalid
974         for ol_val in auto yes no ; do
975                 if test "$enableval" = "$ol_val" ; then
976                         ol_arg="$ol_val"
977                 fi
978         done
979         if test "$ol_arg" = "invalid" ; then
980                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
981         fi
982         ol_enable_referrals="$ol_arg"
983
984 else
985         ol_enable_referrals="yes"
986 fi
987 # end --enable-referrals
988 # OpenLDAP --enable-cldap
989         # Check whether --enable-cldap or --disable-cldap was given.
990 if test "${enable_cldap+set}" = set; then
991   enableval="$enable_cldap"
992   
993         ol_arg=invalid
994         for ol_val in auto yes no ; do
995                 if test "$enableval" = "$ol_val" ; then
996                         ol_arg="$ol_val"
997                 fi
998         done
999         if test "$ol_arg" = "invalid" ; then
1000                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1001         fi
1002         ol_enable_cldap="$ol_arg"
1003
1004 else
1005         ol_enable_cldap="no"
1006 fi
1007 # end --enable-cldap
1008 # OpenLDAP --enable-x_compile
1009         # Check whether --enable-x_compile or --disable-x_compile was given.
1010 if test "${enable_x_compile+set}" = set; then
1011   enableval="$enable_x_compile"
1012   
1013         ol_arg=invalid
1014         for ol_val in yes no ; do
1015                 if test "$enableval" = "$ol_val" ; then
1016                         ol_arg="$ol_val"
1017                 fi
1018         done
1019         if test "$ol_arg" = "invalid" ; then
1020                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1021         fi
1022         ol_enable_x_compile="$ol_arg"
1023
1024 else
1025         ol_enable_x_compile="no"
1026 fi
1027 # end --enable-x_compile
1028
1029 # OpenLDAP --enable-dmalloc
1030         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1031 if test "${enable_dmalloc+set}" = set; then
1032   enableval="$enable_dmalloc"
1033   
1034         ol_arg=invalid
1035         for ol_val in auto yes no ; do
1036                 if test "$enableval" = "$ol_val" ; then
1037                         ol_arg="$ol_val"
1038                 fi
1039         done
1040         if test "$ol_arg" = "invalid" ; then
1041                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1042         fi
1043         ol_enable_dmalloc="$ol_arg"
1044
1045 else
1046         ol_enable_dmalloc="no"
1047 fi
1048 # end --enable-dmalloc
1049
1050 # OpenLDAP --with-kerberos
1051         # Check whether --with-kerberos or --without-kerberos was given.
1052 if test "${with_kerberos+set}" = set; then
1053   withval="$with_kerberos"
1054   
1055         ol_arg=invalid
1056         for ol_val in auto k5 k4 afs yes no ; do
1057                 if test "$withval" = "$ol_val" ; then
1058                         ol_arg="$ol_val"
1059                 fi
1060         done
1061         if test "$ol_arg" = "invalid" ; then
1062                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1063         fi
1064         ol_with_kerberos="$ol_arg"
1065
1066 else
1067         ol_with_kerberos="auto"
1068 fi
1069 # end --with-kerberos
1070
1071 # OpenLDAP --with-readline
1072         # Check whether --with-readline or --without-readline was given.
1073 if test "${with_readline+set}" = set; then
1074   withval="$with_readline"
1075   
1076         ol_arg=invalid
1077         for ol_val in auto yes no  ; do
1078                 if test "$withval" = "$ol_val" ; then
1079                         ol_arg="$ol_val"
1080                 fi
1081         done
1082         if test "$ol_arg" = "invalid" ; then
1083                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1084         fi
1085         ol_with_readline="$ol_arg"
1086
1087 else
1088         ol_with_readline="auto"
1089 fi
1090 # end --with-readline
1091
1092 # OpenLDAP --with-threads
1093         # Check whether --with-threads or --without-threads was given.
1094 if test "${with_threads+set}" = set; then
1095   withval="$with_threads"
1096   
1097         ol_arg=invalid
1098         for ol_val in auto posix mach lwp yes no manual  ; do
1099                 if test "$withval" = "$ol_val" ; then
1100                         ol_arg="$ol_val"
1101                 fi
1102         done
1103         if test "$ol_arg" = "invalid" ; then
1104                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1105         fi
1106         ol_with_threads="$ol_arg"
1107
1108 else
1109         ol_with_threads="auto"
1110 fi
1111 # end --with-threads
1112
1113 # OpenLDAP --with-tls
1114         # Check whether --with-tls or --without-tls was given.
1115 if test "${with_tls+set}" = set; then
1116   withval="$with_tls"
1117   
1118         ol_arg=invalid
1119         for ol_val in auto ssleay openssl yes no  ; do
1120                 if test "$withval" = "$ol_val" ; then
1121                         ol_arg="$ol_val"
1122                 fi
1123         done
1124         if test "$ol_arg" = "invalid" ; then
1125                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1126         fi
1127         ol_with_tls="$ol_arg"
1128
1129 else
1130         ol_with_tls="auto"
1131 fi
1132 # end --with-tls
1133
1134 # OpenLDAP --with-yielding_select
1135         # Check whether --with-yielding_select or --without-yielding_select was given.
1136 if test "${with_yielding_select+set}" = set; then
1137   withval="$with_yielding_select"
1138   
1139         ol_arg=invalid
1140         for ol_val in auto yes no manual  ; do
1141                 if test "$withval" = "$ol_val" ; then
1142                         ol_arg="$ol_val"
1143                 fi
1144         done
1145         if test "$ol_arg" = "invalid" ; then
1146                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1147         fi
1148         ol_with_yielding_select="$ol_arg"
1149
1150 else
1151         ol_with_yielding_select="auto"
1152 fi
1153 # end --with-yielding_select
1154
1155
1156
1157 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1158 if test "${with_xxldapdoptions+set}" = set; then
1159   withval="$with_xxldapdoptions"
1160   :
1161 fi
1162
1163 # OpenLDAP --enable-ldapd
1164         # Check whether --enable-ldapd or --disable-ldapd was given.
1165 if test "${enable_ldapd+set}" = set; then
1166   enableval="$enable_ldapd"
1167   
1168         ol_arg=invalid
1169         for ol_val in auto yes no ; do
1170                 if test "$enableval" = "$ol_val" ; then
1171                         ol_arg="$ol_val"
1172                 fi
1173         done
1174         if test "$ol_arg" = "invalid" ; then
1175                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1176         fi
1177         ol_enable_ldapd="$ol_arg"
1178
1179 else
1180         ol_enable_ldapd="no"
1181 fi
1182 # end --enable-ldapd
1183
1184 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1185 if test "${with_xxslapdoptions+set}" = set; then
1186   withval="$with_xxslapdoptions"
1187   :
1188 fi
1189
1190 # OpenLDAP --enable-slapd
1191         # Check whether --enable-slapd or --disable-slapd was given.
1192 if test "${enable_slapd+set}" = set; then
1193   enableval="$enable_slapd"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1203         fi
1204         ol_enable_slapd="$ol_arg"
1205
1206 else
1207         ol_enable_slapd="yes"
1208 fi
1209 # end --enable-slapd
1210 # OpenLDAP --enable-aclgroups
1211         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1212 if test "${enable_aclgroups+set}" = set; then
1213   enableval="$enable_aclgroups"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1223         fi
1224         ol_enable_aclgroups="$ol_arg"
1225
1226 else
1227         ol_enable_aclgroups="auto"
1228 fi
1229 # end --enable-aclgroups
1230 # OpenLDAP --enable-cleartext
1231         # Check whether --enable-cleartext or --disable-cleartext was given.
1232 if test "${enable_cleartext+set}" = set; then
1233   enableval="$enable_cleartext"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1243         fi
1244         ol_enable_cleartext="$ol_arg"
1245
1246 else
1247         ol_enable_cleartext="yes"
1248 fi
1249 # end --enable-cleartext
1250 # OpenLDAP --enable-crypt
1251         # Check whether --enable-crypt or --disable-crypt was given.
1252 if test "${enable_crypt+set}" = set; then
1253   enableval="$enable_crypt"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1263         fi
1264         ol_enable_crypt="$ol_arg"
1265
1266 else
1267         ol_enable_crypt="auto"
1268 fi
1269 # end --enable-crypt
1270 # OpenLDAP --enable-modules
1271         # Check whether --enable-modules or --disable-modules was given.
1272 if test "${enable_modules+set}" = set; then
1273   enableval="$enable_modules"
1274   
1275         ol_arg=invalid
1276         for ol_val in auto yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1283         fi
1284         ol_enable_modules="$ol_arg"
1285
1286 else
1287         ol_enable_modules="no"
1288 fi
1289 # end --enable-modules
1290 # OpenLDAP --enable-phonetic
1291         # Check whether --enable-phonetic or --disable-phonetic was given.
1292 if test "${enable_phonetic+set}" = set; then
1293   enableval="$enable_phonetic"
1294   
1295         ol_arg=invalid
1296         for ol_val in auto yes no ; do
1297                 if test "$enableval" = "$ol_val" ; then
1298                         ol_arg="$ol_val"
1299                 fi
1300         done
1301         if test "$ol_arg" = "invalid" ; then
1302                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1303         fi
1304         ol_enable_phonetic="$ol_arg"
1305
1306 else
1307         ol_enable_phonetic="no"
1308 fi
1309 # end --enable-phonetic
1310 # OpenLDAP --enable-rlookups
1311         # Check whether --enable-rlookups or --disable-rlookups was given.
1312 if test "${enable_rlookups+set}" = set; then
1313   enableval="$enable_rlookups"
1314   
1315         ol_arg=invalid
1316         for ol_val in auto yes no ; do
1317                 if test "$enableval" = "$ol_val" ; then
1318                         ol_arg="$ol_val"
1319                 fi
1320         done
1321         if test "$ol_arg" = "invalid" ; then
1322                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1323         fi
1324         ol_enable_rlookups="$ol_arg"
1325
1326 else
1327         ol_enable_rlookups="auto"
1328 fi
1329 # end --enable-rlookups
1330 # OpenLDAP --enable-wrappers
1331         # Check whether --enable-wrappers or --disable-wrappers was given.
1332 if test "${enable_wrappers+set}" = set; then
1333   enableval="$enable_wrappers"
1334   
1335         ol_arg=invalid
1336         for ol_val in auto yes no ; do
1337                 if test "$enableval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1343         fi
1344         ol_enable_wrappers="$ol_arg"
1345
1346 else
1347         ol_enable_wrappers="no"
1348 fi
1349 # end --enable-wrappers
1350
1351 # OpenLDAP --enable-bdb2
1352         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1353 if test "${enable_bdb2+set}" = set; then
1354   enableval="$enable_bdb2"
1355   
1356         ol_arg=invalid
1357         for ol_val in auto yes no ; do
1358                 if test "$enableval" = "$ol_val" ; then
1359                         ol_arg="$ol_val"
1360                 fi
1361         done
1362         if test "$ol_arg" = "invalid" ; then
1363                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1364         fi
1365         ol_enable_bdb2="$ol_arg"
1366
1367 else
1368         ol_enable_bdb2="no"
1369 fi
1370 # end --enable-bdb2
1371 # OpenLDAP --enable-ldbm
1372         # Check whether --enable-ldbm or --disable-ldbm was given.
1373 if test "${enable_ldbm+set}" = set; then
1374   enableval="$enable_ldbm"
1375   
1376         ol_arg=invalid
1377         for ol_val in auto yes no ; do
1378                 if test "$enableval" = "$ol_val" ; then
1379                         ol_arg="$ol_val"
1380                 fi
1381         done
1382         if test "$ol_arg" = "invalid" ; then
1383                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1384         fi
1385         ol_enable_ldbm="$ol_arg"
1386
1387 else
1388         ol_enable_ldbm="yes"
1389 fi
1390 # end --enable-ldbm
1391 # OpenLDAP --with-ldbm_api
1392         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1393 if test "${with_ldbm_api+set}" = set; then
1394   withval="$with_ldbm_api"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1398                 if test "$withval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1404         fi
1405         ol_with_ldbm_api="$ol_arg"
1406
1407 else
1408         ol_with_ldbm_api="auto"
1409 fi
1410 # end --with-ldbm_api
1411
1412 # OpenLDAP --with-ldbm_type
1413         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1414 if test "${with_ldbm_type+set}" = set; then
1415   withval="$with_ldbm_type"
1416   
1417         ol_arg=invalid
1418         for ol_val in auto btree hash ; do
1419                 if test "$withval" = "$ol_val" ; then
1420                         ol_arg="$ol_val"
1421                 fi
1422         done
1423         if test "$ol_arg" = "invalid" ; then
1424                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1425         fi
1426         ol_with_ldbm_type="$ol_arg"
1427
1428 else
1429         ol_with_ldbm_type="auto"
1430 fi
1431 # end --with-ldbm_type
1432
1433
1434 # OpenLDAP --enable-passwd
1435         # Check whether --enable-passwd or --disable-passwd was given.
1436 if test "${enable_passwd+set}" = set; then
1437   enableval="$enable_passwd"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1447         fi
1448         ol_enable_passwd="$ol_arg"
1449
1450 else
1451         ol_enable_passwd="no"
1452 fi
1453 # end --enable-passwd
1454 # OpenLDAP --enable-perl
1455         # Check whether --enable-perl or --disable-perl was given.
1456 if test "${enable_perl+set}" = set; then
1457   enableval="$enable_perl"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1467         fi
1468         ol_enable_perl="$ol_arg"
1469
1470 else
1471         ol_enable_perl="no"
1472 fi
1473 # end --enable-perl
1474 # OpenLDAP --enable-shell
1475         # Check whether --enable-shell or --disable-shell was given.
1476 if test "${enable_shell+set}" = set; then
1477   enableval="$enable_shell"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1487         fi
1488         ol_enable_shell="$ol_arg"
1489
1490 else
1491         ol_enable_shell="no"
1492 fi
1493 # end --enable-shell
1494 # OpenLDAP --enable-tcl
1495         # Check whether --enable-tcl or --disable-tcl was given.
1496 if test "${enable_tcl+set}" = set; then
1497   enableval="$enable_tcl"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1507         fi
1508         ol_enable_tcl="$ol_arg"
1509
1510 else
1511         ol_enable_tcl="no"
1512 fi
1513 # end --enable-tcl
1514
1515 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1516 if test "${with_xxslurpdoptions+set}" = set; then
1517   withval="$with_xxslurpdoptions"
1518   :
1519 fi
1520
1521 # OpenLDAP --enable-slurpd
1522         # Check whether --enable-slurpd or --disable-slurpd was given.
1523 if test "${enable_slurpd+set}" = set; then
1524   enableval="$enable_slurpd"
1525   
1526         ol_arg=invalid
1527         for ol_val in auto yes no ; do
1528                 if test "$enableval" = "$ol_val" ; then
1529                         ol_arg="$ol_val"
1530                 fi
1531         done
1532         if test "$ol_arg" = "invalid" ; then
1533                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1534         fi
1535         ol_enable_slurpd="$ol_arg"
1536
1537 else
1538         ol_enable_slurpd="auto"
1539 fi
1540 # end --enable-slurpd
1541
1542 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1543 if test "${with_xxliboptions+set}" = set; then
1544   withval="$with_xxliboptions"
1545   :
1546 fi
1547
1548 # Check whether --enable-static or --disable-static was given.
1549 if test "${enable_static+set}" = set; then
1550   enableval="$enable_static"
1551   p=${PACKAGE-default}
1552 case "$enableval" in
1553 yes) enable_static=yes ;;
1554 no) enable_static=no ;;
1555 *)
1556   enable_static=no
1557   # Look at the argument we got.  We use all the common list separators.
1558   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1559   for pkg in $enableval; do
1560     if test "X$pkg" = "X$p"; then
1561       enable_static=yes
1562     fi
1563   done
1564   IFS="$ac_save_ifs"
1565   ;;
1566 esac
1567 else
1568   enable_static=yes
1569 fi
1570
1571 # Check whether --enable-shared or --disable-shared was given.
1572 if test "${enable_shared+set}" = set; then
1573   enableval="$enable_shared"
1574   p=${PACKAGE-default}
1575 case "$enableval" in
1576 yes) enable_shared=yes ;;
1577 no) enable_shared=no ;;
1578 *)
1579   enable_shared=no
1580   # Look at the argument we got.  We use all the common list separators.
1581   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1582   for pkg in $enableval; do
1583     if test "X$pkg" = "X$p"; then
1584       enable_shared=yes
1585     fi
1586   done
1587   IFS="$ac_save_ifs"
1588   ;;
1589 esac
1590 else
1591   enable_shared=yes
1592 fi
1593
1594
1595 # validate options
1596 if test $ol_enable_dns = yes ; then
1597         if test $ol_enable_referrals = no ; then
1598                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1599         fi
1600         if test $ol_enable_referrals = auto ; then
1601                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1602                 ol_enable_referrals=yes
1603         fi
1604 fi
1605
1606 if test $ol_enable_slapd = no ; then
1607                 if test $ol_enable_bdb2 = yes ; then
1608                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1609         fi
1610         if test $ol_enable_ldbm = yes ; then
1611                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1612         fi
1613         if test $ol_enable_passwd = yes ; then
1614                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1615         fi
1616         if test $ol_enable_perl = yes ; then
1617                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1618         fi
1619         if test $ol_enable_shell = yes ; then
1620                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1621         fi
1622         if test $ol_enable_tcl = yes ; then
1623                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1624         fi
1625         if test $ol_enable_aclgroups = yes ; then
1626                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1627         fi
1628         if test $ol_enable_modules = yes ; then
1629                 echo "configure: warning: slapd disabled, ignoring --enable_modules argument" 1>&2
1630         fi
1631         if test $ol_enable_wrappers = yes ; then
1632                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1633         fi
1634         if test $ol_enable_phonetic = yes ; then
1635                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1636         fi
1637         if test $ol_enable_rlookups = yes ; then
1638                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1639         fi
1640         if test $ol_with_ldbm_api != auto ; then
1641                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1642         fi
1643         if test $ol_with_ldbm_type != auto ; then
1644                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1645         fi
1646         if test $ol_enable_slurpd = yes ; then
1647                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1648         fi
1649
1650         # force settings to no
1651         ol_enable_bdb2=no
1652         ol_enable_ldbm=no
1653         ol_enable_passwd=no
1654         ol_enable_perl=no
1655         ol_enable_shell=no
1656         ol_enable_tcl=no
1657
1658         ol_enable_aclgroups=no
1659         ol_enable_modules=no
1660         ol_enable_phonetic=no
1661         ol_enable_rlookups=no
1662         ol_enable_wrappers=no
1663
1664         ol_with_ldbm_api=no
1665         ol_with_ldbm_type=no
1666
1667         ol_enable_slurpd=no
1668
1669 elif test $ol_enable_ldbm = no ; then
1670         
1671         if test $ol_with_ldbm_api != auto ; then
1672                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1673         fi
1674
1675         if test $ol_with_ldbm_type != auto ; then
1676                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1677         fi
1678
1679         if test $ol_enable_bdb2 = yes ; then
1680                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1681         fi
1682
1683         if test $ol_enable_modules != yes -a \
1684                 $ol_enable_passwd = no -a \
1685                 $ol_enable_perl = no -a \
1686                 $ol_enable_shell = no -a \
1687                 $ol_enable_tcl = no ; then
1688                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1689         fi
1690
1691         ol_with_ldbm_api=no
1692         ol_with_ldbm_type=no
1693
1694 elif test $ol_enable_bdb2 = yes ; then
1695         
1696         if test $ol_with_ldbm_api != auto -a \
1697                 $ol_with_ldbm_api != db2 ; then
1698                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1699         fi
1700
1701         ol_with_ldbm_api=db2
1702
1703 else
1704         
1705         if test $ol_enable_bdb2 != no ; then
1706                 if test $ol_with_ldbm_api != auto -a \
1707                         $ol_with_ldbm_api != db2 ; then
1708                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1709                         ol_enable_bdb2=no
1710                 fi
1711         fi
1712
1713         if test $ol_with_ldbm_api = gdbm -a \
1714                 $ol_with_ldbm_type = btree ; then
1715                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1716         fi
1717         if test $ol_with_ldbm_api = mdbm -a \
1718                 $ol_with_ldbm_type = btree ; then
1719                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1720         fi
1721         if test $ol_with_ldbm_api = ndbm -a \
1722                 $ol_with_ldbm_type = btree ; then
1723                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1724         fi
1725 fi
1726
1727 if test $ol_enable_slurpd = yes ; then
1728                 if test $ol_with_threads = no ; then
1729                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1730         fi
1731 fi
1732
1733 echo "$ac_t""done" 1>&6
1734
1735 ## Initialize vars
1736 LDAP_LIBS=
1737 LDBM_LIBS=
1738 LTHREAD_LIBS=
1739 LUTIL_LIBS=
1740
1741 LDAPD_LIBS=
1742 SLAPD_LIBS=
1743 SLURPD_LIBS=
1744
1745 BUILD_LDAPD=no
1746 BUILD_SLAPD=no
1747 BUILD_SLURPD=no
1748
1749 BUILD_BDB2=no
1750 BUILD_LDBM=no
1751 BUILD_PASSWD=no
1752 BUILD_PERL=no
1753 BUILD_SHELL=no
1754 BUILD_TCL=no
1755 BUILD_THREAD=no
1756
1757 SLAPD_MODULES_LDFLAGS=
1758 SLAPD_MODULES_CPPFLAGS=
1759
1760 SLAPD_PERL_LDFLAGS=
1761 SLAPD_PERL_CPPFLAGS=
1762
1763 KRB_LIBS=
1764 READLINE_LIBS=
1765 TERMCAP_LIBS=
1766 TLS_LIBS=
1767
1768
1769 # Find a good install program.  We prefer a C program (faster),
1770 # so one script is as good as another.  But avoid the broken or
1771 # incompatible versions:
1772 # SysV /etc/install, /usr/sbin/install
1773 # SunOS /usr/etc/install
1774 # IRIX /sbin/install
1775 # AIX /bin/install
1776 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1777 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1778 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1779 # ./install, which can be erroneously created by make from ./install.sh.
1780 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1781 echo "configure:1782: checking for a BSD compatible install" >&5
1782 if test -z "$INSTALL"; then
1783 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1784   echo $ac_n "(cached) $ac_c" 1>&6
1785 else
1786     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1787   for ac_dir in $PATH; do
1788     # Account for people who put trailing slashes in PATH elements.
1789     case "$ac_dir/" in
1790     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1791     *)
1792       # OSF1 and SCO ODT 3.0 have their own names for install.
1793       # Don't use installbsd from OSF since it installs stuff as root
1794       # by default.
1795       for ac_prog in ginstall scoinst install; do
1796         if test -f $ac_dir/$ac_prog; then
1797           if test $ac_prog = install &&
1798             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1799             # AIX install.  It has an incompatible calling convention.
1800             :
1801           else
1802             ac_cv_path_install="$ac_dir/$ac_prog -c"
1803             break 2
1804           fi
1805         fi
1806       done
1807       ;;
1808     esac
1809   done
1810   IFS="$ac_save_IFS"
1811
1812 fi
1813   if test "${ac_cv_path_install+set}" = set; then
1814     INSTALL="$ac_cv_path_install"
1815   else
1816     # As a last resort, use the slow shell script.  We don't cache a
1817     # path for INSTALL within a source directory, because that will
1818     # break other packages using the cache if that directory is
1819     # removed, or if the path is relative.
1820     INSTALL="$ac_install_sh"
1821   fi
1822 fi
1823 echo "$ac_t""$INSTALL" 1>&6
1824
1825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1826 # It thinks the first close brace ends the variable substitution.
1827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1828
1829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1830
1831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1832
1833
1834 CC=${CC-"cc"}
1835
1836
1837 # Make sure we can run config.sub.
1838 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1839 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1840 fi
1841
1842 echo $ac_n "checking host system type""... $ac_c" 1>&6
1843 echo "configure:1844: checking host system type" >&5
1844
1845 host_alias=$host
1846 case "$host_alias" in
1847 NONE)
1848   case $nonopt in
1849   NONE)
1850     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1851     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1852     fi ;;
1853   *) host_alias=$nonopt ;;
1854   esac ;;
1855 esac
1856
1857 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1858 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1859 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1860 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1861 echo "$ac_t""$host" 1>&6
1862
1863 # Extract the first word of "ranlib", so it can be a program name with args.
1864 set dummy ranlib; ac_word=$2
1865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1866 echo "configure:1867: checking for $ac_word" >&5
1867 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1868   echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870   if test -n "$RANLIB"; then
1871   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1872 else
1873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1874   ac_dummy="$PATH"
1875   for ac_dir in $ac_dummy; do
1876     test -z "$ac_dir" && ac_dir=.
1877     if test -f $ac_dir/$ac_word; then
1878       ac_cv_prog_RANLIB="ranlib"
1879       break
1880     fi
1881   done
1882   IFS="$ac_save_ifs"
1883   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1884 fi
1885 fi
1886 RANLIB="$ac_cv_prog_RANLIB"
1887 if test -n "$RANLIB"; then
1888   echo "$ac_t""$RANLIB" 1>&6
1889 else
1890   echo "$ac_t""no" 1>&6
1891 fi
1892
1893 # Extract the first word of "gcc", so it can be a program name with args.
1894 set dummy gcc; ac_word=$2
1895 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1896 echo "configure:1897: checking for $ac_word" >&5
1897 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1898   echo $ac_n "(cached) $ac_c" 1>&6
1899 else
1900   if test -n "$CC"; then
1901   ac_cv_prog_CC="$CC" # Let the user override the test.
1902 else
1903   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1904   ac_dummy="$PATH"
1905   for ac_dir in $ac_dummy; do
1906     test -z "$ac_dir" && ac_dir=.
1907     if test -f $ac_dir/$ac_word; then
1908       ac_cv_prog_CC="gcc"
1909       break
1910     fi
1911   done
1912   IFS="$ac_save_ifs"
1913 fi
1914 fi
1915 CC="$ac_cv_prog_CC"
1916 if test -n "$CC"; then
1917   echo "$ac_t""$CC" 1>&6
1918 else
1919   echo "$ac_t""no" 1>&6
1920 fi
1921
1922 if test -z "$CC"; then
1923   # Extract the first word of "cc", so it can be a program name with args.
1924 set dummy cc; ac_word=$2
1925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1926 echo "configure:1927: checking for $ac_word" >&5
1927 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1928   echo $ac_n "(cached) $ac_c" 1>&6
1929 else
1930   if test -n "$CC"; then
1931   ac_cv_prog_CC="$CC" # Let the user override the test.
1932 else
1933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1934   ac_prog_rejected=no
1935   ac_dummy="$PATH"
1936   for ac_dir in $ac_dummy; do
1937     test -z "$ac_dir" && ac_dir=.
1938     if test -f $ac_dir/$ac_word; then
1939       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1940         ac_prog_rejected=yes
1941         continue
1942       fi
1943       ac_cv_prog_CC="cc"
1944       break
1945     fi
1946   done
1947   IFS="$ac_save_ifs"
1948 if test $ac_prog_rejected = yes; then
1949   # We found a bogon in the path, so make sure we never use it.
1950   set dummy $ac_cv_prog_CC
1951   shift
1952   if test $# -gt 0; then
1953     # We chose a different compiler from the bogus one.
1954     # However, it has the same basename, so the bogon will be chosen
1955     # first if we set CC to just the basename; use the full file name.
1956     shift
1957     set dummy "$ac_dir/$ac_word" "$@"
1958     shift
1959     ac_cv_prog_CC="$@"
1960   fi
1961 fi
1962 fi
1963 fi
1964 CC="$ac_cv_prog_CC"
1965 if test -n "$CC"; then
1966   echo "$ac_t""$CC" 1>&6
1967 else
1968   echo "$ac_t""no" 1>&6
1969 fi
1970
1971   if test -z "$CC"; then
1972     case "`uname -s`" in
1973     *win32* | *WIN32*)
1974       # Extract the first word of "cl", so it can be a program name with args.
1975 set dummy cl; ac_word=$2
1976 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1977 echo "configure:1978: checking for $ac_word" >&5
1978 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1979   echo $ac_n "(cached) $ac_c" 1>&6
1980 else
1981   if test -n "$CC"; then
1982   ac_cv_prog_CC="$CC" # Let the user override the test.
1983 else
1984   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1985   ac_dummy="$PATH"
1986   for ac_dir in $ac_dummy; do
1987     test -z "$ac_dir" && ac_dir=.
1988     if test -f $ac_dir/$ac_word; then
1989       ac_cv_prog_CC="cl"
1990       break
1991     fi
1992   done
1993   IFS="$ac_save_ifs"
1994 fi
1995 fi
1996 CC="$ac_cv_prog_CC"
1997 if test -n "$CC"; then
1998   echo "$ac_t""$CC" 1>&6
1999 else
2000   echo "$ac_t""no" 1>&6
2001 fi
2002  ;;
2003     esac
2004   fi
2005   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2006 fi
2007
2008 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2009 echo "configure:2010: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2010
2011 ac_ext=c
2012 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2013 ac_cpp='$CPP $CPPFLAGS'
2014 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2015 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2016 cross_compiling=$ac_cv_prog_cc_cross
2017
2018 cat > conftest.$ac_ext << EOF
2019
2020 #line 2021 "configure"
2021 #include "confdefs.h"
2022
2023 main(){return(0);}
2024 EOF
2025 if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2026   ac_cv_prog_cc_works=yes
2027   # If we can't run a trivial program, we are probably using a cross compiler.
2028   if (./conftest; exit) 2>/dev/null; then
2029     ac_cv_prog_cc_cross=no
2030   else
2031     ac_cv_prog_cc_cross=yes
2032   fi
2033 else
2034   echo "configure: failed program was:" >&5
2035   cat conftest.$ac_ext >&5
2036   ac_cv_prog_cc_works=no
2037 fi
2038 rm -fr conftest*
2039 ac_ext=c
2040 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2041 ac_cpp='$CPP $CPPFLAGS'
2042 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2043 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2044 cross_compiling=$ac_cv_prog_cc_cross
2045
2046 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2047 if test $ac_cv_prog_cc_works = no; then
2048   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2049 fi
2050 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2051 echo "configure:2052: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2052 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2053 cross_compiling=$ac_cv_prog_cc_cross
2054
2055 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2056 echo "configure:2057: checking whether we are using GNU C" >&5
2057 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2058   echo $ac_n "(cached) $ac_c" 1>&6
2059 else
2060   cat > conftest.c <<EOF
2061 #ifdef __GNUC__
2062   yes;
2063 #endif
2064 EOF
2065 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2066   ac_cv_prog_gcc=yes
2067 else
2068   ac_cv_prog_gcc=no
2069 fi
2070 fi
2071
2072 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2073
2074 if test $ac_cv_prog_gcc = yes; then
2075   GCC=yes
2076 else
2077   GCC=
2078 fi
2079
2080 ac_test_CFLAGS="${CFLAGS+set}"
2081 ac_save_CFLAGS="$CFLAGS"
2082 CFLAGS=
2083 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2084 echo "configure:2085: checking whether ${CC-cc} accepts -g" >&5
2085 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2086   echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088   echo 'void f(){}' > conftest.c
2089 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2090   ac_cv_prog_cc_g=yes
2091 else
2092   ac_cv_prog_cc_g=no
2093 fi
2094 rm -f conftest*
2095
2096 fi
2097
2098 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2099 if test "$ac_test_CFLAGS" = set; then
2100   CFLAGS="$ac_save_CFLAGS"
2101 elif test $ac_cv_prog_cc_g = yes; then
2102   if test "$GCC" = yes; then
2103     CFLAGS="-g -O2"
2104   else
2105     CFLAGS="-g"
2106   fi
2107 else
2108   if test "$GCC" = yes; then
2109     CFLAGS="-O2"
2110   else
2111     CFLAGS=
2112   fi
2113 fi
2114
2115 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2116 if test "${with_gnu_ld+set}" = set; then
2117   withval="$with_gnu_ld"
2118   test "$withval" = no || with_gnu_ld=yes
2119 else
2120   with_gnu_ld=no
2121 fi
2122
2123
2124 ac_prog=ld
2125 if test "$ac_cv_prog_gcc" = yes; then
2126   # Check if gcc -print-prog-name=ld gives a path.
2127   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2128 echo "configure:2129: checking for ld used by GCC" >&5
2129   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2130   case "$ac_prog" in
2131   # Accept absolute paths.
2132   /* | A-Za-z:\\*)
2133     test -z "$LD" && LD="$ac_prog"
2134     ;;
2135   "")
2136     # If it fails, then pretend we aren't using GCC.
2137     ac_prog=ld
2138     ;;
2139   *)
2140     # If it is relative, then search for the first ld in PATH.
2141     with_gnu_ld=unknown
2142     ;;
2143   esac
2144 elif test "$with_gnu_ld" = yes; then
2145   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2146 echo "configure:2147: checking for GNU ld" >&5
2147 else
2148   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2149 echo "configure:2150: checking for non-GNU ld" >&5
2150 fi
2151 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2152   echo $ac_n "(cached) $ac_c" 1>&6
2153 else
2154   if test -z "$LD"; then
2155   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2156   for ac_dir in $PATH; do
2157     test -z "$ac_dir" && ac_dir=.
2158     if test -f "$ac_dir/$ac_prog"; then
2159       ac_cv_path_LD="$ac_dir/$ac_prog"
2160       # Check to see if the program is GNU ld.  I'd rather use --version,
2161       # but apparently some GNU ld's only accept -v.
2162       # Break only if it was the GNU/non-GNU ld that we prefer.
2163       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2164         test "$with_gnu_ld" != no && break
2165       else
2166         test "$with_gnu_ld" != yes && break
2167       fi
2168     fi
2169   done
2170   IFS="$ac_save_ifs"
2171 else
2172   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2173 fi
2174 fi
2175
2176 LD="$ac_cv_path_LD"
2177 if test -n "$LD"; then
2178   echo "$ac_t""$LD" 1>&6
2179 else
2180   echo "$ac_t""no" 1>&6
2181 fi
2182 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2183
2184 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2185 echo "configure:2186: checking if the linker ($LD) is GNU ld" >&5
2186 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2187   echo $ac_n "(cached) $ac_c" 1>&6
2188 else
2189   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2190 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2191   ac_cv_prog_gnu_ld=yes
2192 else
2193   ac_cv_prog_gnu_ld=no
2194 fi
2195 fi
2196
2197 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2198
2199
2200 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2201 echo "configure:2202: checking for BSD-compatible nm" >&5
2202 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2203   echo $ac_n "(cached) $ac_c" 1>&6
2204 else
2205   case "$NM" in
2206 /* | A-Za-z:\\*)
2207   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2208   ;;
2209 *)
2210   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2211   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2212     test -z "$ac_dir" && ac_dir=.
2213     if test -f $ac_dir/nm; then
2214       # Check to see if the nm accepts a BSD-compat flag.
2215       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2216       #   nm: unknown option "B" ignored
2217       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2218         ac_cv_path_NM="$ac_dir/nm -B"
2219       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2220         ac_cv_path_NM="$ac_dir/nm -p"
2221       else
2222         ac_cv_path_NM="$ac_dir/nm"
2223       fi
2224       break
2225     fi
2226   done
2227   IFS="$ac_save_ifs"
2228   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2229   ;;
2230 esac
2231 fi
2232
2233 NM="$ac_cv_path_NM"
2234 echo "$ac_t""$NM" 1>&6
2235
2236
2237 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2238 echo "configure:2239: checking whether ln -s works" >&5
2239 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2240   echo $ac_n "(cached) $ac_c" 1>&6
2241 else
2242   rm -f conftestdata
2243 if ln -s X conftestdata 2>/dev/null
2244 then
2245   rm -f conftestdata
2246   ac_cv_prog_LN_S="ln -s"
2247 else
2248   ac_cv_prog_LN_S=ln
2249 fi
2250 fi
2251 LN_S="$ac_cv_prog_LN_S"
2252 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2253   echo "$ac_t""yes" 1>&6
2254 else
2255   echo "$ac_t""no" 1>&6
2256 fi
2257
2258 # Always use our own libtool.
2259 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2260
2261 # Check for any special flags to pass to ltconfig.
2262 libtool_flags=
2263 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2264 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2265 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2266 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2267 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2268
2269 # Some flags need to be propagated to the compiler or linker for good
2270 # libtool support.
2271 case "$host" in
2272 *-*-irix6*)
2273   # Find out which ABI we are using.
2274   echo '#line 2275 "configure"' > conftest.$ac_ext
2275   if { (eval echo configure:2276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2276     case "`/usr/bin/file conftest.o`" in
2277     *32-bit*)
2278       LD="${LD-ld} -32"
2279       ;;
2280     *N32*)
2281       LD="${LD-ld} -n32"
2282       ;;
2283     *64-bit*)
2284       LD="${LD-ld} -64"
2285       ;;
2286     esac
2287   fi
2288   rm -rf conftest*
2289   ;;
2290
2291 *-*-sco3.2v5*)
2292   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2293   CFLAGS="$CFLAGS -belf"
2294   ;;
2295 esac
2296
2297 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2298 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2299 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2300 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2301 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2302 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2303
2304
2305 for ac_prog in mawk gawk nawk awk
2306 do
2307 # Extract the first word of "$ac_prog", so it can be a program name with args.
2308 set dummy $ac_prog; ac_word=$2
2309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2310 echo "configure:2311: checking for $ac_word" >&5
2311 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2312   echo $ac_n "(cached) $ac_c" 1>&6
2313 else
2314   if test -n "$AWK"; then
2315   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2316 else
2317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2318   ac_dummy="$PATH"
2319   for ac_dir in $ac_dummy; do
2320     test -z "$ac_dir" && ac_dir=.
2321     if test -f $ac_dir/$ac_word; then
2322       ac_cv_prog_AWK="$ac_prog"
2323       break
2324     fi
2325   done
2326   IFS="$ac_save_ifs"
2327 fi
2328 fi
2329 AWK="$ac_cv_prog_AWK"
2330 if test -n "$AWK"; then
2331   echo "$ac_t""$AWK" 1>&6
2332 else
2333   echo "$ac_t""no" 1>&6
2334 fi
2335
2336 test -n "$AWK" && break
2337 done
2338
2339 # test for ln hardlink support
2340 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2341 echo "configure:2342: checking whether ln works" >&5
2342 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2343   echo $ac_n "(cached) $ac_c" 1>&6
2344 else
2345   rm -f conftest.src conftest.dst
2346 echo "conftest" > conftest.src
2347 if ln conftest.src conftest.dst 2>/dev/null
2348 then
2349   ol_cv_prog_LN_H="ln"
2350 else
2351   ol_cv_prog_LN_H="cp"
2352 fi
2353 rm -f conftest.src conftest.dst
2354
2355 fi
2356 LN_H="$ol_cv_prog_LN_H"
2357 if test "$ol_cv_prog_LN_H" = "ln"; then
2358         echo "$ac_t""yes" 1>&6
2359 else
2360         echo "$ac_t""no" 1>&6
2361 fi
2362
2363 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2364 echo "configure:2365: checking whether ln -s works" >&5
2365 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2366   echo $ac_n "(cached) $ac_c" 1>&6
2367 else
2368   rm -f conftestdata
2369 if ln -s X conftestdata 2>/dev/null
2370 then
2371   rm -f conftestdata
2372   ac_cv_prog_LN_S="ln -s"
2373 else
2374   ac_cv_prog_LN_S=ln
2375 fi
2376 fi
2377 LN_S="$ac_cv_prog_LN_S"
2378 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2379   echo "$ac_t""yes" 1>&6
2380 else
2381   echo "$ac_t""no" 1>&6
2382 fi
2383
2384
2385 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2386         LN_S="$LN_H"
2387 fi
2388
2389 # Extract the first word of "sendmail", so it can be a program name with args.
2390 set dummy sendmail; ac_word=$2
2391 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2392 echo "configure:2393: checking for $ac_word" >&5
2393 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2394   echo $ac_n "(cached) $ac_c" 1>&6
2395 else
2396   case "$SENDMAIL" in
2397   /*)
2398   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2399   ;;
2400   ?:/*)                  
2401   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2402   ;;
2403   *)
2404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2405   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2406   for ac_dir in $ac_dummy; do 
2407     test -z "$ac_dir" && ac_dir=.
2408     if test -f $ac_dir/$ac_word; then
2409       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2410       break
2411     fi
2412   done
2413   IFS="$ac_save_ifs"
2414   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2415   ;;
2416 esac
2417 fi
2418 SENDMAIL="$ac_cv_path_SENDMAIL"
2419 if test -n "$SENDMAIL"; then
2420   echo "$ac_t""$SENDMAIL" 1>&6
2421 else
2422   echo "$ac_t""no" 1>&6
2423 fi
2424
2425 # Extract the first word of "vi", so it can be a program name with args.
2426 set dummy vi; ac_word=$2
2427 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2428 echo "configure:2429: checking for $ac_word" >&5
2429 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2430   echo $ac_n "(cached) $ac_c" 1>&6
2431 else
2432   case "$EDITOR" in
2433   /*)
2434   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2435   ;;
2436   ?:/*)                  
2437   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2438   ;;
2439   *)
2440   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2441   ac_dummy="$PATH:/usr/ucb"
2442   for ac_dir in $ac_dummy; do 
2443     test -z "$ac_dir" && ac_dir=.
2444     if test -f $ac_dir/$ac_word; then
2445       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2446       break
2447     fi
2448   done
2449   IFS="$ac_save_ifs"
2450   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2451   ;;
2452 esac
2453 fi
2454 EDITOR="$ac_cv_path_EDITOR"
2455 if test -n "$EDITOR"; then
2456   echo "$ac_t""$EDITOR" 1>&6
2457 else
2458   echo "$ac_t""no" 1>&6
2459 fi
2460
2461 # Extract the first word of "finger", so it can be a program name with args.
2462 set dummy finger; ac_word=$2
2463 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2464 echo "configure:2465: checking for $ac_word" >&5
2465 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2466   echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468   case "$FINGER" in
2469   /*)
2470   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2471   ;;
2472   ?:/*)                  
2473   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2474   ;;
2475   *)
2476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2477   ac_dummy="$PATH:/usr/ucb"
2478   for ac_dir in $ac_dummy; do 
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       ac_cv_path_FINGER="$ac_dir/$ac_word"
2482       break
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2487   ;;
2488 esac
2489 fi
2490 FINGER="$ac_cv_path_FINGER"
2491 if test -n "$FINGER"; then
2492   echo "$ac_t""$FINGER" 1>&6
2493 else
2494   echo "$ac_t""no" 1>&6
2495 fi
2496
2497
2498 ol_link_modules=no
2499 if test $ol_enable_modules != no ; then
2500         # Extract the first word of "glib-config", so it can be a program name with args.
2501 set dummy glib-config; ac_word=$2
2502 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2503 echo "configure:2504: checking for $ac_word" >&5
2504 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2505   echo $ac_n "(cached) $ac_c" 1>&6
2506 else
2507   case "$GLIBCONFIG" in
2508   /*)
2509   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2510   ;;
2511   ?:/*)                  
2512   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2513   ;;
2514   *)
2515   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2516   ac_dummy="$PATH"
2517   for ac_dir in $ac_dummy; do 
2518     test -z "$ac_dir" && ac_dir=.
2519     if test -f $ac_dir/$ac_word; then
2520       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2521       break
2522     fi
2523   done
2524   IFS="$ac_save_ifs"
2525   ;;
2526 esac
2527 fi
2528 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2529 if test -n "$GLIBCONFIG"; then
2530   echo "$ac_t""$GLIBCONFIG" 1>&6
2531 else
2532   echo "$ac_t""no" 1>&6
2533 fi
2534
2535
2536         if test "no$GLIBCONFIG" = "no" ; then
2537                 if test $ol_enable_modules = yes ; then
2538                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2539                 fi
2540
2541         else
2542                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2543                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2544                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2545
2546                                 ol_link_modules=yes
2547         fi
2548 fi
2549
2550 ol_link_perl=no
2551 if test $ol_enable_perl != no ; then
2552         # Extract the first word of "perl", so it can be a program name with args.
2553 set dummy perl; ac_word=$2
2554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2555 echo "configure:2556: checking for $ac_word" >&5
2556 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2557   echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559   case "$PERLBIN" in
2560   /*)
2561   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2562   ;;
2563   ?:/*)                  
2564   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2565   ;;
2566   *)
2567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2568   ac_dummy="$PATH"
2569   for ac_dir in $ac_dummy; do 
2570     test -z "$ac_dir" && ac_dir=.
2571     if test -f $ac_dir/$ac_word; then
2572       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2573       break
2574     fi
2575   done
2576   IFS="$ac_save_ifs"
2577   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2578   ;;
2579 esac
2580 fi
2581 PERLBIN="$ac_cv_path_PERLBIN"
2582 if test -n "$PERLBIN"; then
2583   echo "$ac_t""$PERLBIN" 1>&6
2584 else
2585   echo "$ac_t""no" 1>&6
2586 fi
2587
2588
2589         if test "no$PERLBIN" = "no" ; then
2590                 if test $ol_enable_perl = yes ; then
2591                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2592                 fi
2593
2594         else
2595                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2596                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2597
2598                                 ol_link_perl=yes
2599         fi
2600 fi
2601
2602 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2603 echo "configure:2604: checking how to run the C preprocessor" >&5
2604 # On Suns, sometimes $CPP names a directory.
2605 if test -n "$CPP" && test -d "$CPP"; then
2606   CPP=
2607 fi
2608 if test -z "$CPP"; then
2609 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2610   echo $ac_n "(cached) $ac_c" 1>&6
2611 else
2612     # This must be in double quotes, not single quotes, because CPP may get
2613   # substituted into the Makefile and "${CC-cc}" will confuse make.
2614   CPP="${CC-cc} -E"
2615   # On the NeXT, cc -E runs the code through the compiler's parser,
2616   # not just through cpp.
2617   cat > conftest.$ac_ext <<EOF
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620 #include <assert.h>
2621 Syntax Error
2622 EOF
2623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2624 { (eval echo configure:2625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2626 if test -z "$ac_err"; then
2627   :
2628 else
2629   echo "$ac_err" >&5
2630   echo "configure: failed program was:" >&5
2631   cat conftest.$ac_ext >&5
2632   rm -rf conftest*
2633   CPP="${CC-cc} -E -traditional-cpp"
2634   cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 #include <assert.h>
2638 Syntax Error
2639 EOF
2640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2641 { (eval echo configure:2642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2643 if test -z "$ac_err"; then
2644   :
2645 else
2646   echo "$ac_err" >&5
2647   echo "configure: failed program was:" >&5
2648   cat conftest.$ac_ext >&5
2649   rm -rf conftest*
2650   CPP="${CC-cc} -nologo -E"
2651   cat > conftest.$ac_ext <<EOF
2652 #line 2653 "configure"
2653 #include "confdefs.h"
2654 #include <assert.h>
2655 Syntax Error
2656 EOF
2657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2658 { (eval echo configure:2659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2660 if test -z "$ac_err"; then
2661   :
2662 else
2663   echo "$ac_err" >&5
2664   echo "configure: failed program was:" >&5
2665   cat conftest.$ac_ext >&5
2666   rm -rf conftest*
2667   CPP=/lib/cpp
2668 fi
2669 rm -f conftest*
2670 fi
2671 rm -f conftest*
2672 fi
2673 rm -f conftest*
2674   ac_cv_prog_CPP="$CPP"
2675 fi
2676   CPP="$ac_cv_prog_CPP"
2677 else
2678   ac_cv_prog_CPP="$CPP"
2679 fi
2680 echo "$ac_t""$CPP" 1>&6
2681
2682
2683 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2684         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2685
2686 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2687         echo "configure: warning: programs compiled here do run here..." 1>&2
2688         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2689
2690 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2691         echo "configure: warning: programs compiled here do not run here..." 1>&2
2692         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2693 fi
2694
2695 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2696 echo "configure:2697: checking for AIX" >&5
2697 cat > conftest.$ac_ext <<EOF
2698 #line 2699 "configure"
2699 #include "confdefs.h"
2700 #ifdef _AIX
2701   yes
2702 #endif
2703
2704 EOF
2705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2706   egrep "yes" >/dev/null 2>&1; then
2707   rm -rf conftest*
2708   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2709 #define _ALL_SOURCE 1
2710 EOF
2711
2712 else
2713   rm -rf conftest*
2714   echo "$ac_t""no" 1>&6
2715 fi
2716 rm -f conftest*
2717
2718
2719 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2720 echo "configure:2721: checking for POSIXized ISC" >&5
2721 if test -d /etc/conf/kconfig.d &&
2722   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2723 then
2724   echo "$ac_t""yes" 1>&6
2725   ISC=yes # If later tests want to check for ISC.
2726   cat >> confdefs.h <<\EOF
2727 #define _POSIX_SOURCE 1
2728 EOF
2729
2730   if test "$GCC" = yes; then
2731     CC="$CC -posix"
2732   else
2733     CC="$CC -Xp"
2734   fi
2735 else
2736   echo "$ac_t""no" 1>&6
2737   ISC=
2738 fi
2739
2740 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2741 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2742 echo "configure:2743: checking for minix/config.h" >&5
2743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2744   echo $ac_n "(cached) $ac_c" 1>&6
2745 else
2746   cat > conftest.$ac_ext <<EOF
2747 #line 2748 "configure"
2748 #include "confdefs.h"
2749 #include <minix/config.h>
2750 EOF
2751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2752 { (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2754 if test -z "$ac_err"; then
2755   rm -rf conftest*
2756   eval "ac_cv_header_$ac_safe=yes"
2757 else
2758   echo "$ac_err" >&5
2759   echo "configure: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761   rm -rf conftest*
2762   eval "ac_cv_header_$ac_safe=no"
2763 fi
2764 rm -f conftest*
2765 fi
2766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2767   echo "$ac_t""yes" 1>&6
2768   MINIX=yes
2769 else
2770   echo "$ac_t""no" 1>&6
2771 MINIX=
2772 fi
2773
2774 if test "$MINIX" = yes; then
2775   cat >> confdefs.h <<\EOF
2776 #define _POSIX_SOURCE 1
2777 EOF
2778
2779   cat >> confdefs.h <<\EOF
2780 #define _POSIX_1_SOURCE 2
2781 EOF
2782
2783   cat >> confdefs.h <<\EOF
2784 #define _MINIX 1
2785 EOF
2786
2787 fi
2788
2789
2790 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2791 echo "configure:2792: checking for be_app in -lbe" >&5
2792 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   ac_save_LIBS="$LIBS"
2797 LIBS="-lbe -lroot $LIBS"
2798 cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801 /* Override any gcc2 internal prototype to avoid an error.  */
2802 /* We use char because int might match the return type of a gcc2
2803     builtin and then its argument prototype would still apply.  */
2804 char be_app();
2805
2806 int main() {
2807 be_app()
2808 ; return 0; }
2809 EOF
2810 if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2811   rm -rf conftest*
2812   eval "ac_cv_lib_$ac_lib_var=yes"
2813 else
2814   echo "configure: failed program was:" >&5
2815   cat conftest.$ac_ext >&5
2816   rm -rf conftest*
2817   eval "ac_cv_lib_$ac_lib_var=no"
2818 fi
2819 rm -f conftest*
2820 LIBS="$ac_save_LIBS"
2821
2822 fi
2823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2824   echo "$ac_t""yes" 1>&6
2825   LIBS="$LIBS -lbe -lroot"
2826 else
2827   echo "$ac_t""no" 1>&6
2828 :
2829 fi
2830
2831
2832 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2833 echo "configure:2834: checking for Cygwin environment" >&5
2834 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2835   echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837   cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840
2841 int main() {
2842
2843 #ifndef __CYGWIN__
2844 #define __CYGWIN__ __CYGWIN32__
2845 #endif
2846 return __CYGWIN__;
2847 ; return 0; }
2848 EOF
2849 if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2850   rm -rf conftest*
2851   ac_cv_cygwin=yes
2852 else
2853   echo "configure: failed program was:" >&5
2854   cat conftest.$ac_ext >&5
2855   rm -rf conftest*
2856   ac_cv_cygwin=no
2857 fi
2858 rm -f conftest*
2859 rm -f conftest*
2860 fi
2861
2862 echo "$ac_t""$ac_cv_cygwin" 1>&6
2863 CYGWIN=
2864 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2865 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2866 echo "configure:2867: checking for mingw32 environment" >&5
2867 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873
2874 int main() {
2875 return __MINGW32__;
2876 ; return 0; }
2877 EOF
2878 if { (eval echo configure:2879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2879   rm -rf conftest*
2880   ac_cv_mingw32=yes
2881 else
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -rf conftest*
2885   ac_cv_mingw32=no
2886 fi
2887 rm -f conftest*
2888 rm -f conftest*
2889 fi
2890
2891 echo "$ac_t""$ac_cv_mingw32" 1>&6
2892 MINGW32=
2893 test "$ac_cv_mingw32" = yes && MINGW32=yes
2894
2895
2896 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2897 echo "configure:2898: checking for executable suffix" >&5
2898 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2899   echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2902   ac_cv_exeext=.exe
2903 else
2904   rm -f conftest*
2905   echo 'int main () { return 0; }' > conftest.$ac_ext
2906   ac_cv_exeext=
2907   if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2908     for file in conftest.*; do
2909       case $file in
2910       *.c | *.o | *.obj) ;;
2911       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2912       esac
2913     done
2914   else
2915     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2916   fi
2917   rm -f conftest*
2918   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2919 fi
2920 fi
2921
2922 EXEEXT=""
2923 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2924 echo "$ac_t""${ac_cv_exeext}" 1>&6
2925 ac_exeext=$EXEEXT
2926
2927 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2928 echo "configure:2929: checking for object suffix" >&5
2929 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2930   echo $ac_n "(cached) $ac_c" 1>&6
2931 else
2932   rm -f conftest*
2933 echo 'int i = 1;' > conftest.$ac_ext
2934 if { (eval echo configure:2935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2935   for ac_file in conftest.*; do
2936     case $ac_file in
2937     *.c) ;;
2938     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2939     esac
2940   done
2941 else
2942   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2943 fi
2944 rm -f conftest*
2945 fi
2946
2947 echo "$ac_t""$ac_cv_objext" 1>&6
2948 OBJEXT=$ac_cv_objext
2949 ac_objext=$ac_cv_objext
2950
2951
2952
2953
2954
2955 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2956 echo "configure:2957: checking for ${CC-cc} option to accept ANSI C" >&5
2957 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   am_cv_prog_cc_stdc=no
2961 ac_save_CC="$CC"
2962 # Don't try gcc -ansi; that turns off useful extensions and
2963 # breaks some systems' header files.
2964 # AIX                   -qlanglvl=ansi
2965 # Ultrix and OSF/1      -std1
2966 # HP-UX                 -Aa -D_HPUX_SOURCE
2967 # SVR4                  -Xc -D__EXTENSIONS__
2968 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2969 do
2970   CC="$ac_save_CC $ac_arg"
2971   cat > conftest.$ac_ext <<EOF
2972 #line 2973 "configure"
2973 #include "confdefs.h"
2974 #include <stdarg.h>
2975 #include <stdio.h>
2976 #include <sys/types.h>
2977 #include <sys/stat.h>
2978 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2979 struct buf { int x; };
2980 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2981 static char *e (p, i)
2982      char **p;
2983      int i;
2984 {
2985   return p[i];
2986 }
2987 static char *f (char * (*g) (char **, int), char **p, ...)
2988 {
2989   char *s;
2990   va_list v;
2991   va_start (v,p);
2992   s = g (p, va_arg (v,int));
2993   va_end (v);
2994   return s;
2995 }
2996 int test (int i, double x);
2997 struct s1 {int (*f) (int a);};
2998 struct s2 {int (*f) (double a);};
2999 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3000 int argc;
3001 char **argv;
3002
3003 int main() {
3004
3005 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3006
3007 ; return 0; }
3008 EOF
3009 if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3010   rm -rf conftest*
3011   am_cv_prog_cc_stdc="$ac_arg"; break
3012 else
3013   echo "configure: failed program was:" >&5
3014   cat conftest.$ac_ext >&5
3015 fi
3016 rm -f conftest*
3017 done
3018 CC="$ac_save_CC"
3019
3020 fi
3021
3022 if test -z "$am_cv_prog_cc_stdc"; then
3023   echo "$ac_t""none needed" 1>&6
3024 else
3025   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3026 fi
3027 case "x$am_cv_prog_cc_stdc" in
3028   x|xno) ;;
3029   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3030 esac
3031
3032 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3033         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
3034 fi
3035
3036
3037
3038
3039 echo $ac_n "checking for socket""... $ac_c" 1>&6
3040 echo "configure:3041: checking for socket" >&5
3041 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   cat > conftest.$ac_ext <<EOF
3045 #line 3046 "configure"
3046 #include "confdefs.h"
3047 /* System header to define __stub macros and hopefully few prototypes,
3048     which can conflict with char socket(); below.  */
3049 #include <assert.h>
3050 /* Override any gcc2 internal prototype to avoid an error.  */
3051 /* We use char because int might match the return type of a gcc2
3052     builtin and then its argument prototype would still apply.  */
3053 char socket();
3054
3055 int main() {
3056
3057 /* The GNU C library defines this for functions which it implements
3058     to always fail with ENOSYS.  Some functions are actually named
3059     something starting with __ and the normal name is an alias.  */
3060 #if defined (__stub_socket) || defined (__stub___socket)
3061 choke me
3062 #else
3063 socket();
3064 #endif
3065
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3069   rm -rf conftest*
3070   eval "ac_cv_func_socket=yes"
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074   rm -rf conftest*
3075   eval "ac_cv_func_socket=no"
3076 fi
3077 rm -f conftest*
3078 fi
3079
3080 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3081   echo "$ac_t""yes" 1>&6
3082   :
3083 else
3084   echo "$ac_t""no" 1>&6
3085         
3086         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3087 echo "configure:3088: checking for main in -lsocket" >&5
3088 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3090   echo $ac_n "(cached) $ac_c" 1>&6
3091 else
3092   ac_save_LIBS="$LIBS"
3093 LIBS="-lsocket  $LIBS"
3094 cat > conftest.$ac_ext <<EOF
3095 #line 3096 "configure"
3096 #include "confdefs.h"
3097
3098 int main() {
3099 main()
3100 ; return 0; }
3101 EOF
3102 if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3103   rm -rf conftest*
3104   eval "ac_cv_lib_$ac_lib_var=yes"
3105 else
3106   echo "configure: failed program was:" >&5
3107   cat conftest.$ac_ext >&5
3108   rm -rf conftest*
3109   eval "ac_cv_lib_$ac_lib_var=no"
3110 fi
3111 rm -f conftest*
3112 LIBS="$ac_save_LIBS"
3113
3114 fi
3115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3116   echo "$ac_t""yes" 1>&6
3117     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3119   cat >> confdefs.h <<EOF
3120 #define $ac_tr_lib 1
3121 EOF
3122
3123   LIBS="-lsocket $LIBS"
3124
3125 else
3126   echo "$ac_t""no" 1>&6
3127 fi
3128
3129         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3130 echo "configure:3131: checking for main in -lnet" >&5
3131 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   ac_save_LIBS="$LIBS"
3136 LIBS="-lnet  $LIBS"
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140
3141 int main() {
3142 main()
3143 ; return 0; }
3144 EOF
3145 if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3146   rm -rf conftest*
3147   eval "ac_cv_lib_$ac_lib_var=yes"
3148 else
3149   echo "configure: failed program was:" >&5
3150   cat conftest.$ac_ext >&5
3151   rm -rf conftest*
3152   eval "ac_cv_lib_$ac_lib_var=no"
3153 fi
3154 rm -f conftest*
3155 LIBS="$ac_save_LIBS"
3156
3157 fi
3158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3159   echo "$ac_t""yes" 1>&6
3160     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3162   cat >> confdefs.h <<EOF
3163 #define $ac_tr_lib 1
3164 EOF
3165
3166   LIBS="-lnet $LIBS"
3167
3168 else
3169   echo "$ac_t""no" 1>&6
3170 fi
3171
3172         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3173 echo "configure:3174: checking for main in -lnsl_s" >&5
3174 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   ac_save_LIBS="$LIBS"
3179 LIBS="-lnsl_s  $LIBS"
3180 cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185 main()
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3189   rm -rf conftest*
3190   eval "ac_cv_lib_$ac_lib_var=yes"
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   eval "ac_cv_lib_$ac_lib_var=no"
3196 fi
3197 rm -f conftest*
3198 LIBS="$ac_save_LIBS"
3199
3200 fi
3201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3202   echo "$ac_t""yes" 1>&6
3203     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3204     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3205   cat >> confdefs.h <<EOF
3206 #define $ac_tr_lib 1
3207 EOF
3208
3209   LIBS="-lnsl_s $LIBS"
3210
3211 else
3212   echo "$ac_t""no" 1>&6
3213 fi
3214
3215         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3216 echo "configure:3217: checking for main in -lnsl" >&5
3217 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3218 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221   ac_save_LIBS="$LIBS"
3222 LIBS="-lnsl  $LIBS"
3223 cat > conftest.$ac_ext <<EOF
3224 #line 3225 "configure"
3225 #include "confdefs.h"
3226
3227 int main() {
3228 main()
3229 ; return 0; }
3230 EOF
3231 if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3232   rm -rf conftest*
3233   eval "ac_cv_lib_$ac_lib_var=yes"
3234 else
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   eval "ac_cv_lib_$ac_lib_var=no"
3239 fi
3240 rm -f conftest*
3241 LIBS="$ac_save_LIBS"
3242
3243 fi
3244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3245   echo "$ac_t""yes" 1>&6
3246     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3247     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3248   cat >> confdefs.h <<EOF
3249 #define $ac_tr_lib 1
3250 EOF
3251
3252   LIBS="-lnsl $LIBS"
3253
3254 else
3255   echo "$ac_t""no" 1>&6
3256 fi
3257
3258         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3259 echo "configure:3260: checking for socket in -linet" >&5
3260 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   ac_save_LIBS="$LIBS"
3265 LIBS="-linet  $LIBS"
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 /* Override any gcc2 internal prototype to avoid an error.  */
3270 /* We use char because int might match the return type of a gcc2
3271     builtin and then its argument prototype would still apply.  */
3272 char socket();
3273
3274 int main() {
3275 socket()
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279   rm -rf conftest*
3280   eval "ac_cv_lib_$ac_lib_var=yes"
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   eval "ac_cv_lib_$ac_lib_var=no"
3286 fi
3287 rm -f conftest*
3288 LIBS="$ac_save_LIBS"
3289
3290 fi
3291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3292   echo "$ac_t""yes" 1>&6
3293     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3294     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3295   cat >> confdefs.h <<EOF
3296 #define $ac_tr_lib 1
3297 EOF
3298
3299   LIBS="-linet $LIBS"
3300
3301 else
3302   echo "$ac_t""no" 1>&6
3303 fi
3304
3305         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3306 echo "configure:3307: checking for main in -lgen" >&5
3307 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   ac_save_LIBS="$LIBS"
3312 LIBS="-lgen  $LIBS"
3313 cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316
3317 int main() {
3318 main()
3319 ; return 0; }
3320 EOF
3321 if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3322   rm -rf conftest*
3323   eval "ac_cv_lib_$ac_lib_var=yes"
3324 else
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   eval "ac_cv_lib_$ac_lib_var=no"
3329 fi
3330 rm -f conftest*
3331 LIBS="$ac_save_LIBS"
3332
3333 fi
3334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3335   echo "$ac_t""yes" 1>&6
3336     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3338   cat >> confdefs.h <<EOF
3339 #define $ac_tr_lib 1
3340 EOF
3341
3342   LIBS="-lgen $LIBS"
3343
3344 else
3345   echo "$ac_t""no" 1>&6
3346 fi
3347
3348
3349 fi
3350
3351
3352 for ac_func in res_search
3353 do
3354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3355 echo "configure:3356: checking for $ac_func" >&5
3356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* System header to define __stub macros and hopefully few prototypes,
3363     which can conflict with char $ac_func(); below.  */
3364 #include <assert.h>
3365 /* Override any gcc2 internal prototype to avoid an error.  */
3366 /* We use char because int might match the return type of a gcc2
3367     builtin and then its argument prototype would still apply.  */
3368 char $ac_func();
3369
3370 int main() {
3371
3372 /* The GNU C library defines this for functions which it implements
3373     to always fail with ENOSYS.  Some functions are actually named
3374     something starting with __ and the normal name is an alias.  */
3375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3376 choke me
3377 #else
3378 $ac_func();
3379 #endif
3380
3381 ; return 0; }
3382 EOF
3383 if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3384   rm -rf conftest*
3385   eval "ac_cv_func_$ac_func=yes"
3386 else
3387   echo "configure: failed program was:" >&5
3388   cat conftest.$ac_ext >&5
3389   rm -rf conftest*
3390   eval "ac_cv_func_$ac_func=no"
3391 fi
3392 rm -f conftest*
3393 fi
3394
3395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3396   echo "$ac_t""yes" 1>&6
3397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3398   cat >> confdefs.h <<EOF
3399 #define $ac_tr_func 1
3400 EOF
3401  
3402 else
3403   echo "$ac_t""no" 1>&6
3404 fi
3405 done
3406
3407 if test $ac_cv_func_res_search = "no" ; then 
3408         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3409 echo "configure:3410: checking for res_search in -lbind" >&5
3410 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3411 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3412   echo $ac_n "(cached) $ac_c" 1>&6
3413 else
3414   ac_save_LIBS="$LIBS"
3415 LIBS="-lbind  $LIBS"
3416 cat > conftest.$ac_ext <<EOF
3417 #line 3418 "configure"
3418 #include "confdefs.h"
3419 /* Override any gcc2 internal prototype to avoid an error.  */
3420 /* We use char because int might match the return type of a gcc2
3421     builtin and then its argument prototype would still apply.  */
3422 char res_search();
3423
3424 int main() {
3425 res_search()
3426 ; return 0; }
3427 EOF
3428 if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429   rm -rf conftest*
3430   eval "ac_cv_lib_$ac_lib_var=yes"
3431 else
3432   echo "configure: failed program was:" >&5
3433   cat conftest.$ac_ext >&5
3434   rm -rf conftest*
3435   eval "ac_cv_lib_$ac_lib_var=no"
3436 fi
3437 rm -f conftest*
3438 LIBS="$ac_save_LIBS"
3439
3440 fi
3441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3442   echo "$ac_t""yes" 1>&6
3443     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3444     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3445   cat >> confdefs.h <<EOF
3446 #define $ac_tr_lib 1
3447 EOF
3448
3449   LIBS="-lbind $LIBS"
3450
3451 else
3452   echo "$ac_t""no" 1>&6
3453 fi
3454
3455         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3456                 cat >> confdefs.h <<\EOF
3457 #define HAVE_RES_SEARCH 1
3458 EOF
3459
3460         else
3461                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3462 echo "configure:3463: checking for res_search in -lresolv" >&5
3463 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3464 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   ac_save_LIBS="$LIBS"
3468 LIBS="-lresolv  $LIBS"
3469 cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3472 /* Override any gcc2 internal prototype to avoid an error.  */
3473 /* We use char because int might match the return type of a gcc2
3474     builtin and then its argument prototype would still apply.  */
3475 char res_search();
3476
3477 int main() {
3478 res_search()
3479 ; return 0; }
3480 EOF
3481 if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3482   rm -rf conftest*
3483   eval "ac_cv_lib_$ac_lib_var=yes"
3484 else
3485   echo "configure: failed program was:" >&5
3486   cat conftest.$ac_ext >&5
3487   rm -rf conftest*
3488   eval "ac_cv_lib_$ac_lib_var=no"
3489 fi
3490 rm -f conftest*
3491 LIBS="$ac_save_LIBS"
3492
3493 fi
3494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3495   echo "$ac_t""yes" 1>&6
3496     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3497     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3498   cat >> confdefs.h <<EOF
3499 #define $ac_tr_lib 1
3500 EOF
3501
3502   LIBS="-lresolv $LIBS"
3503
3504 else
3505   echo "$ac_t""no" 1>&6
3506 fi
3507
3508                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3509                         cat >> confdefs.h <<\EOF
3510 #define HAVE_RES_SEARCH 1
3511 EOF
3512
3513                 fi
3514         fi
3515 fi
3516
3517 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3518 echo "configure:3519: checking for sigset in -lV3" >&5
3519 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3520 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3521   echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523   ac_save_LIBS="$LIBS"
3524 LIBS="-lV3  $LIBS"
3525 cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 /* Override any gcc2 internal prototype to avoid an error.  */
3529 /* We use char because int might match the return type of a gcc2
3530     builtin and then its argument prototype would still apply.  */
3531 char sigset();
3532
3533 int main() {
3534 sigset()
3535 ; return 0; }
3536 EOF
3537 if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3538   rm -rf conftest*
3539   eval "ac_cv_lib_$ac_lib_var=yes"
3540 else
3541   echo "configure: failed program was:" >&5
3542   cat conftest.$ac_ext >&5
3543   rm -rf conftest*
3544   eval "ac_cv_lib_$ac_lib_var=no"
3545 fi
3546 rm -f conftest*
3547 LIBS="$ac_save_LIBS"
3548
3549 fi
3550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3551   echo "$ac_t""yes" 1>&6
3552     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3553     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3554   cat >> confdefs.h <<EOF
3555 #define $ac_tr_lib 1
3556 EOF
3557
3558   LIBS="-lV3 $LIBS"
3559
3560 else
3561   echo "$ac_t""no" 1>&6
3562 fi
3563
3564
3565 echo $ac_n "checking for select""... $ac_c" 1>&6
3566 echo "configure:3567: checking for select" >&5
3567 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573 /* System header to define __stub macros and hopefully few prototypes,
3574     which can conflict with char select(); below.  */
3575 #include <assert.h>
3576 /* Override any gcc2 internal prototype to avoid an error.  */
3577 /* We use char because int might match the return type of a gcc2
3578     builtin and then its argument prototype would still apply.  */
3579 char select();
3580
3581 int main() {
3582
3583 /* The GNU C library defines this for functions which it implements
3584     to always fail with ENOSYS.  Some functions are actually named
3585     something starting with __ and the normal name is an alias.  */
3586 #if defined (__stub_select) || defined (__stub___select)
3587 choke me
3588 #else
3589 select();
3590 #endif
3591
3592 ; return 0; }
3593 EOF
3594 if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3595   rm -rf conftest*
3596   eval "ac_cv_func_select=yes"
3597 else
3598   echo "configure: failed program was:" >&5
3599   cat conftest.$ac_ext >&5
3600   rm -rf conftest*
3601   eval "ac_cv_func_select=no"
3602 fi
3603 rm -f conftest*
3604 fi
3605
3606 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3607   echo "$ac_t""yes" 1>&6
3608   :
3609 else
3610   echo "$ac_t""no" 1>&6
3611 { echo "configure: error: select() required." 1>&2; exit 1; }
3612 fi
3613
3614
3615 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3616 echo "configure:3617: checking types of arguments for select()" >&5
3617  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3618   echo $ac_n "(cached) $ac_c" 1>&6
3619 else
3620    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3621   echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3627      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3628       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3629        cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #ifdef HAVE_SYS_TYPES_H
3633 #include <sys/types.h>
3634 #endif
3635 #ifdef HAVE_SYS_TIME_H
3636 #include <sys/time.h>
3637 #endif
3638 #ifdef HAVE_SYS_SELECT_H
3639 #include <sys/select.h>
3640 #endif
3641 #ifdef HAVE_SYS_SOCKET_H
3642 #include <sys/socket.h>
3643 #endif
3644 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);
3645 int main() {
3646
3647 ; return 0; }
3648 EOF
3649 if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3650   rm -rf conftest*
3651           ac_not_found=no ; break 3
3652 else
3653   echo "configure: failed program was:" >&5
3654   cat conftest.$ac_ext >&5
3655   rm -rf conftest*
3656   ac_not_found=yes
3657 fi
3658 rm -f conftest*
3659       done
3660      done
3661     done
3662    
3663 fi
3664   
3665 fi
3666  
3667 fi
3668  if test "$ac_not_found" = yes; then
3669   ac_cv_func_select_arg1=int 
3670   ac_cv_func_select_arg234='int *' 
3671   ac_cv_func_select_arg5='struct timeval *'
3672  fi
3673  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3674  cat >> confdefs.h <<EOF
3675 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3676 EOF
3677
3678  cat >> confdefs.h <<EOF
3679 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3680 EOF
3681
3682  cat >> confdefs.h <<EOF
3683 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3684 EOF
3685
3686
3687
3688 # ISODE tests
3689 ol_link_isode=no
3690 if test $ol_enable_ldapd != no ; then
3691                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3692 echo "configure:3693: checking for main in -lxtpp" >&5
3693 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3694 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   ac_save_LIBS="$LIBS"
3698 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702
3703 int main() {
3704 main()
3705 ; return 0; }
3706 EOF
3707 if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3708   rm -rf conftest*
3709   eval "ac_cv_lib_$ac_lib_var=yes"
3710 else
3711   echo "configure: failed program was:" >&5
3712   cat conftest.$ac_ext >&5
3713   rm -rf conftest*
3714   eval "ac_cv_lib_$ac_lib_var=no"
3715 fi
3716 rm -f conftest*
3717 LIBS="$ac_save_LIBS"
3718
3719 fi
3720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3721   echo "$ac_t""yes" 1>&6
3722   
3723                 ol_link_isode=yes
3724                 cat >> confdefs.h <<\EOF
3725 #define HAVE_XTPP 1
3726 EOF
3727
3728                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3729                 
3730 else
3731   echo "$ac_t""no" 1>&6
3732 :
3733 fi
3734
3735         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3736 echo "configure:3737: checking for main in -ldsap" >&5
3737 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   ac_save_LIBS="$LIBS"
3742 LIBS="-ldsap -lisode $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746
3747 int main() {
3748 main()
3749 ; return 0; }
3750 EOF
3751 if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3752   rm -rf conftest*
3753   eval "ac_cv_lib_$ac_lib_var=yes"
3754 else
3755   echo "configure: failed program was:" >&5
3756   cat conftest.$ac_ext >&5
3757   rm -rf conftest*
3758   eval "ac_cv_lib_$ac_lib_var=no"
3759 fi
3760 rm -f conftest*
3761 LIBS="$ac_save_LIBS"
3762
3763 fi
3764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3765   echo "$ac_t""yes" 1>&6
3766   
3767                 ol_link_isode=yes
3768                 cat >> confdefs.h <<\EOF
3769 #define HAVE_DSAP 1
3770 EOF
3771
3772                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3773                 
3774 else
3775   echo "$ac_t""no" 1>&6
3776 :
3777 fi
3778
3779         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3780 echo "configure:3781: checking for main in -lisode" >&5
3781 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   ac_save_LIBS="$LIBS"
3786 LIBS="-lisode  $LIBS"
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3790
3791 int main() {
3792 main()
3793 ; return 0; }
3794 EOF
3795 if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3796   rm -rf conftest*
3797   eval "ac_cv_lib_$ac_lib_var=yes"
3798 else
3799   echo "configure: failed program was:" >&5
3800   cat conftest.$ac_ext >&5
3801   rm -rf conftest*
3802   eval "ac_cv_lib_$ac_lib_var=no"
3803 fi
3804 rm -f conftest*
3805 LIBS="$ac_save_LIBS"
3806
3807 fi
3808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3809   echo "$ac_t""yes" 1>&6
3810   
3811                 ol_link_isode=yes
3812                 cat >> confdefs.h <<\EOF
3813 #define HAVE_ISODE 1
3814 EOF
3815
3816                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3817                 
3818 else
3819   echo "$ac_t""no" 1>&6
3820 :
3821 fi
3822
3823 fi
3824
3825 if test $ol_link_isode != no; then
3826         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3827 echo "configure:3828: checking for main in -lpp" >&5
3828 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3829 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3830   echo $ac_n "(cached) $ac_c" 1>&6
3831 else
3832   ac_save_LIBS="$LIBS"
3833 LIBS="-lpp  $LIBS"
3834 cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837
3838 int main() {
3839 main()
3840 ; return 0; }
3841 EOF
3842 if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3843   rm -rf conftest*
3844   eval "ac_cv_lib_$ac_lib_var=yes"
3845 else
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   eval "ac_cv_lib_$ac_lib_var=no"
3850 fi
3851 rm -f conftest*
3852 LIBS="$ac_save_LIBS"
3853
3854 fi
3855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3856   echo "$ac_t""yes" 1>&6
3857   
3858                 cat >> confdefs.h <<\EOF
3859 #define HAVE_PP 1
3860 EOF
3861
3862                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3863                 
3864 else
3865   echo "$ac_t""no" 1>&6
3866 :
3867 fi
3868
3869
3870         # Extract the first word of "pepsy", so it can be a program name with args.
3871 set dummy pepsy; ac_word=$2
3872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3873 echo "configure:3874: checking for $ac_word" >&5
3874 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   case "$PEPSY" in
3878   /*)
3879   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3880   ;;
3881   ?:/*)                  
3882   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3883   ;;
3884   *)
3885   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3886   ac_dummy="$PATH"
3887   for ac_dir in $ac_dummy; do 
3888     test -z "$ac_dir" && ac_dir=.
3889     if test -f $ac_dir/$ac_word; then
3890       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3891       break
3892     fi
3893   done
3894   IFS="$ac_save_ifs"
3895   ;;
3896 esac
3897 fi
3898 PEPSY="$ac_cv_path_PEPSY"
3899 if test -n "$PEPSY"; then
3900   echo "$ac_t""$PEPSY" 1>&6
3901 else
3902   echo "$ac_t""no" 1>&6
3903 fi
3904
3905 fi
3906
3907 ol_link_kerberos=no
3908
3909 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3910         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3911 do
3912 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3913 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3914 echo "configure:3915: checking for $ac_hdr" >&5
3915 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3916   echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918   cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 #include <$ac_hdr>
3922 EOF
3923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3924 { (eval echo configure:3925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3926 if test -z "$ac_err"; then
3927   rm -rf conftest*
3928   eval "ac_cv_header_$ac_safe=yes"
3929 else
3930   echo "$ac_err" >&5
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   eval "ac_cv_header_$ac_safe=no"
3935 fi
3936 rm -f conftest*
3937 fi
3938 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3939   echo "$ac_t""yes" 1>&6
3940     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3941   cat >> confdefs.h <<EOF
3942 #define $ac_tr_hdr 1
3943 EOF
3944  
3945 else
3946   echo "$ac_t""no" 1>&6
3947 fi
3948 done
3949
3950
3951         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3952                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3953 echo "configure:3954: checking for main in -lkrb4" >&5
3954 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3955 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   ac_save_LIBS="$LIBS"
3959 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3960 cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963
3964 int main() {
3965 main()
3966 ; return 0; }
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3969   rm -rf conftest*
3970   eval "ac_cv_lib_$ac_lib_var=yes"
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -rf conftest*
3975   eval "ac_cv_lib_$ac_lib_var=no"
3976 fi
3977 rm -f conftest*
3978 LIBS="$ac_save_LIBS"
3979
3980 fi
3981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3982   echo "$ac_t""yes" 1>&6
3983   have_k5=yes
3984 else
3985   echo "$ac_t""no" 1>&6
3986 have_k5=no
3987 fi
3988
3989
3990                 if test $have_k5 = yes ; then
3991                         ol_with_kerberos=found
3992                         ol_link_kerberos=yes
3993
3994                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3995
3996                         LIBS="$KRB_LIBS $LIBS"
3997
3998                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3999 echo "configure:4000: checking for des_debug in Kerberos libraries" >&5
4000 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4001   echo $ac_n "(cached) $ac_c" 1>&6
4002 else
4003   
4004                                                                 save_LIBS="$LIBS"
4005                                 LIBS="$KRB_LIBS $LIBS"
4006                                 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009
4010 #include <kerberosIV/krb.h>
4011 #include <kerberosIV/des.h>
4012 extern int des_debug;
4013
4014 int main() {
4015
4016 des_debug = 1;
4017
4018 ; return 0; }
4019 EOF
4020 if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4021   rm -rf conftest*
4022   ol_cv_var_des_debug=yes
4023 else
4024   echo "configure: failed program was:" >&5
4025   cat conftest.$ac_ext >&5
4026   rm -rf conftest*
4027   ol_cv_var_des_debug=no
4028 fi
4029 rm -f conftest*
4030                                                                 LIBS="$save_LIBS"
4031                         
4032 fi
4033
4034 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4035
4036                         if test $ol_cv_var_des_debug = yes ; then
4037                                 cat >> confdefs.h <<\EOF
4038 #define HAVE_DES_DEBUG 1
4039 EOF
4040
4041                         fi
4042
4043                         LIBS="$save_LIBS"
4044                 fi
4045         fi
4046 fi
4047
4048 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4049         for ac_hdr in krb.h des.h
4050 do
4051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4053 echo "configure:4054: checking for $ac_hdr" >&5
4054 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4055   echo $ac_n "(cached) $ac_c" 1>&6
4056 else
4057   cat > conftest.$ac_ext <<EOF
4058 #line 4059 "configure"
4059 #include "confdefs.h"
4060 #include <$ac_hdr>
4061 EOF
4062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4063 { (eval echo configure:4064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4065 if test -z "$ac_err"; then
4066   rm -rf conftest*
4067   eval "ac_cv_header_$ac_safe=yes"
4068 else
4069   echo "$ac_err" >&5
4070   echo "configure: failed program was:" >&5
4071   cat conftest.$ac_ext >&5
4072   rm -rf conftest*
4073   eval "ac_cv_header_$ac_safe=no"
4074 fi
4075 rm -f conftest*
4076 fi
4077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4078   echo "$ac_t""yes" 1>&6
4079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4080   cat >> confdefs.h <<EOF
4081 #define $ac_tr_hdr 1
4082 EOF
4083  
4084 else
4085   echo "$ac_t""no" 1>&6
4086 fi
4087 done
4088
4089
4090         if test $ac_cv_header_krb_h = yes ; then
4091                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4092 echo "configure:4093: checking for main in -lkrb" >&5
4093 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4094 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4095   echo $ac_n "(cached) $ac_c" 1>&6
4096 else
4097   ac_save_LIBS="$LIBS"
4098 LIBS="-lkrb -ldes $LIBS"
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4102
4103 int main() {
4104 main()
4105 ; return 0; }
4106 EOF
4107 if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=yes"
4110 else
4111   echo "configure: failed program was:" >&5
4112   cat conftest.$ac_ext >&5
4113   rm -rf conftest*
4114   eval "ac_cv_lib_$ac_lib_var=no"
4115 fi
4116 rm -f conftest*
4117 LIBS="$ac_save_LIBS"
4118
4119 fi
4120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4121   echo "$ac_t""yes" 1>&6
4122   have_k4=yes
4123 else
4124   echo "$ac_t""no" 1>&6
4125 have_k4=no
4126 fi
4127
4128
4129                 if test $have_k4 = yes ; then
4130                         ol_with_kerberos=found
4131                         ol_link_kerberos=yes
4132
4133                         KRB_LIBS="-lkrb -ldes"
4134                 fi
4135         fi
4136 fi
4137
4138 if test $ol_link_kerberos = yes ; then
4139         cat >> confdefs.h <<\EOF
4140 #define HAVE_KERBEROS 1
4141 EOF
4142
4143 fi
4144
4145 ol_link_tls=no
4146 if test $ol_with_tls != no ; then
4147         
4148         for ac_hdr in ssl.h
4149 do
4150 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4151 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4152 echo "configure:4153: checking for $ac_hdr" >&5
4153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4154   echo $ac_n "(cached) $ac_c" 1>&6
4155 else
4156   cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 #include <$ac_hdr>
4160 EOF
4161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4162 { (eval echo configure:4163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4164 if test -z "$ac_err"; then
4165   rm -rf conftest*
4166   eval "ac_cv_header_$ac_safe=yes"
4167 else
4168   echo "$ac_err" >&5
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -rf conftest*
4172   eval "ac_cv_header_$ac_safe=no"
4173 fi
4174 rm -f conftest*
4175 fi
4176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4177   echo "$ac_t""yes" 1>&6
4178     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4179   cat >> confdefs.h <<EOF
4180 #define $ac_tr_hdr 1
4181 EOF
4182  
4183 else
4184   echo "$ac_t""no" 1>&6
4185 fi
4186 done
4187
4188         
4189         if test $ac_cv_header_ssl_h = yes ; then
4190                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4191 echo "configure:4192: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4192 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4193 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   ac_save_LIBS="$LIBS"
4197 LIBS="-lssl -lcrypto $LIBS"
4198 cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201 /* Override any gcc2 internal prototype to avoid an error.  */
4202 /* We use char because int might match the return type of a gcc2
4203     builtin and then its argument prototype would still apply.  */
4204 char SSLeay_add_ssl_algorithms();
4205
4206 int main() {
4207 SSLeay_add_ssl_algorithms()
4208 ; return 0; }
4209 EOF
4210 if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4211   rm -rf conftest*
4212   eval "ac_cv_lib_$ac_lib_var=yes"
4213 else
4214   echo "configure: failed program was:" >&5
4215   cat conftest.$ac_ext >&5
4216   rm -rf conftest*
4217   eval "ac_cv_lib_$ac_lib_var=no"
4218 fi
4219 rm -f conftest*
4220 LIBS="$ac_save_LIBS"
4221
4222 fi
4223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4224   echo "$ac_t""yes" 1>&6
4225   have_ssleay=yes
4226                         need_rsaref=no
4227 else
4228   echo "$ac_t""no" 1>&6
4229 have_ssleay=no
4230 fi
4231
4232                         
4233                 if test $have_ssleay = no ; then
4234                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4235 echo "configure:4236: checking for ssl3_accept in -lssl" >&5
4236 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   ac_save_LIBS="$LIBS"
4241 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4242 cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 /* Override any gcc2 internal prototype to avoid an error.  */
4246 /* We use char because int might match the return type of a gcc2
4247     builtin and then its argument prototype would still apply.  */
4248 char ssl3_accept();
4249
4250 int main() {
4251 ssl3_accept()
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4255   rm -rf conftest*
4256   eval "ac_cv_lib_$ac_lib_var=yes"
4257 else
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260   rm -rf conftest*
4261   eval "ac_cv_lib_$ac_lib_var=no"
4262 fi
4263 rm -f conftest*
4264 LIBS="$ac_save_LIBS"
4265
4266 fi
4267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4268   echo "$ac_t""yes" 1>&6
4269   have_ssleay=yes
4270                                 need_rsaref=yes
4271 else
4272   echo "$ac_t""no" 1>&6
4273 have_ssleay=no
4274 fi
4275
4276                 fi
4277
4278                 if test $have_ssleay = yes ; then
4279                         ol_with_tls=found
4280                         ol_link_tls=yes
4281
4282                         cat >> confdefs.h <<\EOF
4283 #define HAVE_SSLEAY 1
4284 EOF
4285
4286
4287                         if test $need_rsaref = yes; then
4288                                 cat >> confdefs.h <<\EOF
4289 #define HAVE_RSAREF 1
4290 EOF
4291
4292
4293                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4294                         else
4295                                 TLS_LIBS="-lssl -lcrypto"
4296                         fi
4297                 fi
4298         fi
4299 fi
4300
4301 if test $ol_link_tls = yes ; then
4302         cat >> confdefs.h <<\EOF
4303 #define HAVE_TLS 1
4304 EOF
4305
4306 fi      
4307
4308 for ac_func in \
4309         ctime_r                 \
4310         gethostbyname_r gethostbyaddr_r \
4311
4312 do
4313 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4314 echo "configure:4315: checking for $ac_func" >&5
4315 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4316   echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318   cat > conftest.$ac_ext <<EOF
4319 #line 4320 "configure"
4320 #include "confdefs.h"
4321 /* System header to define __stub macros and hopefully few prototypes,
4322     which can conflict with char $ac_func(); below.  */
4323 #include <assert.h>
4324 /* Override any gcc2 internal prototype to avoid an error.  */
4325 /* We use char because int might match the return type of a gcc2
4326     builtin and then its argument prototype would still apply.  */
4327 char $ac_func();
4328
4329 int main() {
4330
4331 /* The GNU C library defines this for functions which it implements
4332     to always fail with ENOSYS.  Some functions are actually named
4333     something starting with __ and the normal name is an alias.  */
4334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4335 choke me
4336 #else
4337 $ac_func();
4338 #endif
4339
4340 ; return 0; }
4341 EOF
4342 if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4343   rm -rf conftest*
4344   eval "ac_cv_func_$ac_func=yes"
4345 else
4346   echo "configure: failed program was:" >&5
4347   cat conftest.$ac_ext >&5
4348   rm -rf conftest*
4349   eval "ac_cv_func_$ac_func=no"
4350 fi
4351 rm -f conftest*
4352 fi
4353
4354 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4355   echo "$ac_t""yes" 1>&6
4356     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4357   cat >> confdefs.h <<EOF
4358 #define $ac_tr_func 1
4359 EOF
4360  
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364 done
4365
4366
4367 if test "$ac_cv_func_ctime_r" = no ; then
4368         ol_cv_func_ctime_r_nargs=0
4369 else
4370         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4371 echo "configure:4372: checking number of arguments of ctime_r" >&5
4372 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4373   echo $ac_n "(cached) $ac_c" 1>&6
4374 else
4375   cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 #include <time.h>
4379 int main() {
4380 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4381 ; return 0; }
4382 EOF
4383 if { (eval echo configure:4384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4384   rm -rf conftest*
4385   ol_cv_func_ctime_r_nargs=3
4386 else
4387   echo "configure: failed program was:" >&5
4388   cat conftest.$ac_ext >&5
4389   rm -rf conftest*
4390   cat > conftest.$ac_ext <<EOF
4391 #line 4392 "configure"
4392 #include "confdefs.h"
4393 #include <time.h>
4394 int main() {
4395 time_t ti; char *buffer; ctime_r(&ti,buffer);
4396 ; return 0; }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4399   rm -rf conftest*
4400   ol_cv_func_ctime_r_nargs=2
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   ol_cv_func_ctime_r_nargs=0
4406 fi
4407 rm -f conftest*
4408 fi
4409 rm -f conftest*
4410 fi
4411
4412 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4413   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4414     cat >> confdefs.h <<EOF
4415 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4416 EOF
4417
4418   fi
4419
4420 fi
4421
4422 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4423         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4424 echo "configure:4425: checking number of arguments of gethostbyname_r" >&5
4425 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4426   echo $ac_n "(cached) $ac_c" 1>&6
4427 else
4428   cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 #include <sys/types.h>
4432 #include <sys/socket.h>
4433 #include <netinet/in.h>
4434 #include <netdb.h>
4435 #define BUFSIZE (sizeof(struct hostent)+10)
4436 int main() {
4437 struct hostent hent; char buffer[BUFSIZE];
4438                 int bufsize=BUFSIZE;int h_errno;
4439                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4440                         buffer, bufsize, &h_errno);
4441 ; return 0; }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4444   rm -rf conftest*
4445   ol_cv_func_gethostbyname_r_nargs=5
4446 else
4447   echo "configure: failed program was:" >&5
4448   cat conftest.$ac_ext >&5
4449   rm -rf conftest*
4450   cat > conftest.$ac_ext <<EOF
4451 #line 4452 "configure"
4452 #include "confdefs.h"
4453 #include <sys/types.h>
4454 #include <sys/socket.h>
4455 #include <netinet/in.h>
4456 #include <netdb.h>
4457 #define BUFSIZE (sizeof(struct hostent)+10)
4458 int main() {
4459 struct hostent hent;struct hostent *rhent;
4460                         char buffer[BUFSIZE];
4461                         int bufsize=BUFSIZE;int h_errno;
4462                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4463                                 &rhent, &h_errno);
4464 ; return 0; }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4467   rm -rf conftest*
4468   ol_cv_func_gethostbyname_r_nargs=6
4469 else
4470   echo "configure: failed program was:" >&5
4471   cat conftest.$ac_ext >&5
4472   rm -rf conftest*
4473   ol_cv_func_gethostbyname_r_nargs=0
4474 fi
4475 rm -f conftest*
4476 fi
4477 rm -f conftest*
4478 fi
4479
4480 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4481   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4482         cat >> confdefs.h <<EOF
4483 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4484 EOF
4485
4486   fi
4487
4488 else
4489         ol_cv_func_gethostbyname_r_nargs=0
4490 fi
4491  
4492 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4493         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4494 echo "configure:4495: checking number of arguments of gethostbyaddr_r" >&5
4495 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4496   echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498   cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 #include <sys/types.h>
4502 #include <sys/socket.h>
4503 #include <netinet/in.h>
4504 #include <netdb.h>
4505 #define BUFSIZE (sizeof(struct hostent)+10)
4506 int main() {
4507 struct hostent hent; char buffer[BUFSIZE]; 
4508             struct in_addr add;
4509             size_t alen=sizeof(struct in_addr);
4510             int bufsize=BUFSIZE;int h_errno;
4511                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4512                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4513 ; return 0; }
4514 EOF
4515 if { (eval echo configure:4516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4516   rm -rf conftest*
4517   ol_cv_func_gethostbyaddr_r_nargs=7
4518 else
4519   echo "configure: failed program was:" >&5
4520   cat conftest.$ac_ext >&5
4521   rm -rf conftest*
4522   cat > conftest.$ac_ext <<EOF
4523 #line 4524 "configure"
4524 #include "confdefs.h"
4525 #include <sys/types.h>
4526 #include <sys/socket.h>
4527 #include <netinet/in.h>
4528 #include <netdb.h>
4529 #define BUFSIZE (sizeof(struct hostent)+10)
4530 int main() {
4531 struct hostent hent;
4532                         struct hostent *rhent; char buffer[BUFSIZE]; 
4533                         struct in_addr add;
4534                         size_t alen=sizeof(struct in_addr);
4535                         int bufsize=BUFSIZE;int h_errno;
4536                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4537                                 alen, AF_INET, &hent, buffer, bufsize, 
4538                                 &rhent, &h_errno);
4539 ; return 0; }
4540 EOF
4541 if { (eval echo configure:4542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4542   rm -rf conftest*
4543   ol_cv_func_gethostbyaddr_r_nargs=8
4544 else
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -rf conftest*
4548   ol_cv_func_gethostbyaddr_r_nargs=0
4549 fi
4550 rm -f conftest*
4551 fi
4552 rm -f conftest*
4553 fi
4554
4555 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4556   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4557     cat >> confdefs.h <<EOF
4558 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4559 EOF
4560
4561   fi
4562
4563 else
4564         ol_cv_func_gethostbyaddr_r_nargs=0
4565 fi
4566
4567 if test "$ac_cv_func_ctime_r" = yes \
4568         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4569         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4570         -a "$ac_cv_func_gethostbyname_r" = yes \
4571         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4572         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4573         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4574         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4575         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4576         ; then
4577  
4578         cat >> confdefs.h <<\EOF
4579 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4580 EOF
4581
4582 fi
4583
4584 ol_link_threads=no
4585 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4586         -o $ol_with_threads = posix ; then
4587
4588         for ac_hdr in pthread.h sched.h
4589 do
4590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4592 echo "configure:4593: checking for $ac_hdr" >&5
4593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 #include <$ac_hdr>
4600 EOF
4601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4602 { (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4604 if test -z "$ac_err"; then
4605   rm -rf conftest*
4606   eval "ac_cv_header_$ac_safe=yes"
4607 else
4608   echo "$ac_err" >&5
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_header_$ac_safe=no"
4613 fi
4614 rm -f conftest*
4615 fi
4616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4617   echo "$ac_t""yes" 1>&6
4618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4619   cat >> confdefs.h <<EOF
4620 #define $ac_tr_hdr 1
4621 EOF
4622  
4623 else
4624   echo "$ac_t""no" 1>&6
4625 fi
4626 done
4627
4628
4629         if test $ac_cv_header_pthread_h = yes ; then
4630                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4631 echo "configure:4632: checking POSIX thread version" >&5
4632 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4633   echo $ac_n "(cached) $ac_c" 1>&6
4634 else
4635   
4636         cat > conftest.$ac_ext <<EOF
4637 #line 4638 "configure"
4638 #include "confdefs.h"
4639
4640 #               include <pthread.h>
4641                 /* this check could be improved */
4642 #               ifdef PTHREAD_ONCE_INIT
4643                         pthread_version_final
4644 #               endif
4645         
4646 EOF
4647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4648   egrep "pthread_version_final" >/dev/null 2>&1; then
4649   rm -rf conftest*
4650   ol_pthread_final=yes
4651 else
4652   rm -rf conftest*
4653   ol_pthread_final=no
4654 fi
4655 rm -f conftest*
4656
4657
4658         cat > conftest.$ac_ext <<EOF
4659 #line 4660 "configure"
4660 #include "confdefs.h"
4661
4662 #               include <pthread.h>
4663                 /* this check could be improved */
4664 #               ifdef pthread_once_init
4665                         pthread_version_draft4
4666 #               endif
4667         
4668 EOF
4669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4670   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4671   rm -rf conftest*
4672   ol_pthread_draft4=yes
4673 else
4674   rm -rf conftest*
4675   ol_pthread_draft4=no
4676 fi
4677 rm -f conftest*
4678
4679
4680         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4681                 ol_cv_pthread_version=final
4682         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4683                 ol_cv_pthread_version=draft4
4684         else
4685                 ol_cv_pthread_version=unknown
4686         fi
4687
4688 fi
4689
4690 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4691
4692
4693                 if test $ol_cv_pthread_version = final ; then
4694                         cat >> confdefs.h <<\EOF
4695 #define HAVE_PTHREADS_FINAL 1
4696 EOF
4697
4698                 elif test $ol_cv_pthread_version = draft4 ; then
4699                         cat >> confdefs.h <<\EOF
4700 #define HAVE_PTHREADS_D4 1
4701 EOF
4702
4703                 else
4704                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4705                 fi
4706
4707                 # consider threads found
4708                 ol_with_threads=found
4709
4710                 
4711         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
4712 echo "configure:4713: checking for LinuxThreads pthread.h" >&5
4713 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719 #include <pthread.h>
4720 EOF
4721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4722   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
4723   rm -rf conftest*
4724   ol_cv_header_linux_threads=yes
4725 else
4726   rm -rf conftest*
4727   ol_cv_header_linux_threads=no
4728 fi
4729 rm -f conftest*
4730
4731                 
4732 fi
4733
4734 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
4735         if test $ol_cv_header_linux_threads = yes; then
4736                 cat >> confdefs.h <<\EOF
4737 #define HAVE_LINUX_THREADS 1
4738 EOF
4739
4740         fi
4741
4742
4743                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4744                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4745 echo "configure:4746: checking for pthread_create in default libraries" >&5
4746                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   
4750                 if test "$cross_compiling" = yes; then
4751                         ol_cv_pthread_create=yes
4752 else
4753   cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756
4757 #include <pthread.h>
4758 #ifndef NULL
4759 #define NULL (void*)0
4760 #endif
4761
4762 static void *task(p)
4763         void *p;
4764 {
4765         return (void *) (p == NULL);
4766 }
4767
4768 int main(argc, argv)
4769         int argc;
4770         char **argv;
4771 {
4772         pthread_t t;
4773         int status;
4774
4775         /* make sure pthread_create() isn't just a stub */
4776 #if HAVE_PTHREADS_D4
4777         status = pthread_create(&t, pthread_attr_default, task, NULL);
4778 #else
4779         status = pthread_create(&t, NULL, task, NULL);
4780 #endif
4781
4782         if( status ) return status;
4783
4784         /* make sure pthread_detach() isn't just a stub */
4785 #if HAVE_PTHREADS_D4
4786         status = pthread_detach( &t );
4787 #else
4788         status = pthread_detach( t );
4789 #endif
4790
4791         if( status ) return status;
4792
4793         return status;
4794 }
4795
4796 EOF
4797 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4798 then
4799   ol_cv_pthread_create=yes
4800 else
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -fr conftest*
4804   ol_cv_pthread_create=no
4805 fi
4806 rm -fr conftest*
4807 fi
4808
4809 fi
4810
4811                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4812
4813                 if test $ol_cv_pthread_create != no ; then
4814                         ol_link_threads=posix
4815                         ol_link_pthreads=""
4816                 fi
4817                 
4818                 # Pthread try link: -mt (ol_cv_pthread_mt)
4819         if test "$ol_link_threads" = no ; then
4820                 # try -mt
4821                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
4822 echo "configure:4823: checking for pthread link with -mt" >&5
4823 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826   
4827                         # save the flags
4828                         ol_LIBS="$LIBS"
4829                         LIBS="-mt $LIBS"
4830
4831                         cat > conftest.$ac_ext <<EOF
4832 #line 4833 "configure"
4833 #include "confdefs.h"
4834
4835 #include <pthread.h>
4836 #ifndef NULL
4837 #define NULL (void*)0
4838 #endif
4839
4840 int main() {
4841
4842         pthread_t t;
4843
4844 #if HAVE_PTHREADS_D4
4845         pthread_create(&t, pthread_attr_default, NULL, NULL);
4846         pthread_detach( &t );
4847 #else
4848         pthread_create(&t, NULL, NULL, NULL);
4849         pthread_detach( t );
4850 #endif
4851 #ifdef HAVE_LINUX_THREADS
4852         pthread_kill_other_threads_np();
4853 #endif
4854
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   ol_cv_pthread_mt=yes
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   ol_cv_pthread_mt=no
4865 fi
4866 rm -f conftest*
4867
4868                 # restore the LIBS
4869                 LIBS="$ol_LIBS"
4870                 
4871 fi
4872
4873 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
4874
4875                 if test $ol_cv_pthread_mt = yes ; then
4876                         ol_link_pthreads="-mt"
4877                         ol_link_threads=posix
4878                 fi
4879         fi
4880
4881                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
4882         if test "$ol_link_threads" = no ; then
4883                 # try -kthread
4884                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
4885 echo "configure:4886: checking for pthread link with -kthread" >&5
4886 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   
4890                         # save the flags
4891                         ol_LIBS="$LIBS"
4892                         LIBS="-kthread $LIBS"
4893
4894                         cat > conftest.$ac_ext <<EOF
4895 #line 4896 "configure"
4896 #include "confdefs.h"
4897
4898 #include <pthread.h>
4899 #ifndef NULL
4900 #define NULL (void*)0
4901 #endif
4902
4903 int main() {
4904
4905         pthread_t t;
4906
4907 #if HAVE_PTHREADS_D4
4908         pthread_create(&t, pthread_attr_default, NULL, NULL);
4909         pthread_detach( &t );
4910 #else
4911         pthread_create(&t, NULL, NULL, NULL);
4912         pthread_detach( t );
4913 #endif
4914 #ifdef HAVE_LINUX_THREADS
4915         pthread_kill_other_threads_np();
4916 #endif
4917
4918 ; return 0; }
4919 EOF
4920 if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4921   rm -rf conftest*
4922   ol_cv_pthread_kthread=yes
4923 else
4924   echo "configure: failed program was:" >&5
4925   cat conftest.$ac_ext >&5
4926   rm -rf conftest*
4927   ol_cv_pthread_kthread=no
4928 fi
4929 rm -f conftest*
4930
4931                 # restore the LIBS
4932                 LIBS="$ol_LIBS"
4933                 
4934 fi
4935
4936 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
4937
4938                 if test $ol_cv_pthread_kthread = yes ; then
4939                         ol_link_pthreads="-kthread"
4940                         ol_link_threads=posix
4941                 fi
4942         fi
4943
4944                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
4945         if test "$ol_link_threads" = no ; then
4946                 # try -pthread
4947                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
4948 echo "configure:4949: checking for pthread link with -pthread" >&5
4949 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
4950   echo $ac_n "(cached) $ac_c" 1>&6
4951 else
4952   
4953                         # save the flags
4954                         ol_LIBS="$LIBS"
4955                         LIBS="-pthread $LIBS"
4956
4957                         cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960
4961 #include <pthread.h>
4962 #ifndef NULL
4963 #define NULL (void*)0
4964 #endif
4965
4966 int main() {
4967
4968         pthread_t t;
4969
4970 #if HAVE_PTHREADS_D4
4971         pthread_create(&t, pthread_attr_default, NULL, NULL);
4972         pthread_detach( &t );
4973 #else
4974         pthread_create(&t, NULL, NULL, NULL);
4975         pthread_detach( t );
4976 #endif
4977 #ifdef HAVE_LINUX_THREADS
4978         pthread_kill_other_threads_np();
4979 #endif
4980
4981 ; return 0; }
4982 EOF
4983 if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4984   rm -rf conftest*
4985   ol_cv_pthread_pthread=yes
4986 else
4987   echo "configure: failed program was:" >&5
4988   cat conftest.$ac_ext >&5
4989   rm -rf conftest*
4990   ol_cv_pthread_pthread=no
4991 fi
4992 rm -f conftest*
4993
4994                 # restore the LIBS
4995                 LIBS="$ol_LIBS"
4996                 
4997 fi
4998
4999 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5000
5001                 if test $ol_cv_pthread_pthread = yes ; then
5002                         ol_link_pthreads="-pthread"
5003                         ol_link_threads=posix
5004                 fi
5005         fi
5006
5007                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5008         if test "$ol_link_threads" = no ; then
5009                 # try -pthreads
5010                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5011 echo "configure:5012: checking for pthread link with -pthreads" >&5
5012 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5013   echo $ac_n "(cached) $ac_c" 1>&6
5014 else
5015   
5016                         # save the flags
5017                         ol_LIBS="$LIBS"
5018                         LIBS="-pthreads $LIBS"
5019
5020                         cat > conftest.$ac_ext <<EOF
5021 #line 5022 "configure"
5022 #include "confdefs.h"
5023
5024 #include <pthread.h>
5025 #ifndef NULL
5026 #define NULL (void*)0
5027 #endif
5028
5029 int main() {
5030
5031         pthread_t t;
5032
5033 #if HAVE_PTHREADS_D4
5034         pthread_create(&t, pthread_attr_default, NULL, NULL);
5035         pthread_detach( &t );
5036 #else
5037         pthread_create(&t, NULL, NULL, NULL);
5038         pthread_detach( t );
5039 #endif
5040 #ifdef HAVE_LINUX_THREADS
5041         pthread_kill_other_threads_np();
5042 #endif
5043
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   ol_cv_pthread_pthreads=yes
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   ol_cv_pthread_pthreads=no
5054 fi
5055 rm -f conftest*
5056
5057                 # restore the LIBS
5058                 LIBS="$ol_LIBS"
5059                 
5060 fi
5061
5062 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5063
5064                 if test $ol_cv_pthread_pthreads = yes ; then
5065                         ol_link_pthreads="-pthreads"
5066                         ol_link_threads=posix
5067                 fi
5068         fi
5069
5070                 # Pthread try link: -thread (ol_cv_pthread_thread)
5071         if test "$ol_link_threads" = no ; then
5072                 # try -thread
5073                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5074 echo "configure:5075: checking for pthread link with -thread" >&5
5075 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5076   echo $ac_n "(cached) $ac_c" 1>&6
5077 else
5078   
5079                         # save the flags
5080                         ol_LIBS="$LIBS"
5081                         LIBS="-thread $LIBS"
5082
5083                         cat > conftest.$ac_ext <<EOF
5084 #line 5085 "configure"
5085 #include "confdefs.h"
5086
5087 #include <pthread.h>
5088 #ifndef NULL
5089 #define NULL (void*)0
5090 #endif
5091
5092 int main() {
5093
5094         pthread_t t;
5095
5096 #if HAVE_PTHREADS_D4
5097         pthread_create(&t, pthread_attr_default, NULL, NULL);
5098         pthread_detach( &t );
5099 #else
5100         pthread_create(&t, NULL, NULL, NULL);
5101         pthread_detach( t );
5102 #endif
5103 #ifdef HAVE_LINUX_THREADS
5104         pthread_kill_other_threads_np();
5105 #endif
5106
5107 ; return 0; }
5108 EOF
5109 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5110   rm -rf conftest*
5111   ol_cv_pthread_thread=yes
5112 else
5113   echo "configure: failed program was:" >&5
5114   cat conftest.$ac_ext >&5
5115   rm -rf conftest*
5116   ol_cv_pthread_thread=no
5117 fi
5118 rm -f conftest*
5119
5120                 # restore the LIBS
5121                 LIBS="$ol_LIBS"
5122                 
5123 fi
5124
5125 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5126
5127                 if test $ol_cv_pthread_thread = yes ; then
5128                         ol_link_pthreads="-thread"
5129                         ol_link_threads=posix
5130                 fi
5131         fi
5132
5133
5134                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5135         if test "$ol_link_threads" = no ; then
5136                 # try -lpthread -lmach -lexc -lc_r
5137                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5138 echo "configure:5139: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5139 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5140   echo $ac_n "(cached) $ac_c" 1>&6
5141 else
5142   
5143                         # save the flags
5144                         ol_LIBS="$LIBS"
5145                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5146
5147                         cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150
5151 #include <pthread.h>
5152 #ifndef NULL
5153 #define NULL (void*)0
5154 #endif
5155
5156 int main() {
5157
5158         pthread_t t;
5159
5160 #if HAVE_PTHREADS_D4
5161         pthread_create(&t, pthread_attr_default, NULL, NULL);
5162         pthread_detach( &t );
5163 #else
5164         pthread_create(&t, NULL, NULL, NULL);
5165         pthread_detach( t );
5166 #endif
5167 #ifdef HAVE_LINUX_THREADS
5168         pthread_kill_other_threads_np();
5169 #endif
5170
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5181 fi
5182 rm -f conftest*
5183
5184                 # restore the LIBS
5185                 LIBS="$ol_LIBS"
5186                 
5187 fi
5188
5189 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5190
5191                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5192                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5193                         ol_link_threads=posix
5194                 fi
5195         fi
5196
5197                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5198         if test "$ol_link_threads" = no ; then
5199                 # try -lpthread -lmach -lexc
5200                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5201 echo "configure:5202: checking for pthread link with -lpthread -lmach -lexc" >&5
5202 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205   
5206                         # save the flags
5207                         ol_LIBS="$LIBS"
5208                         LIBS="-lpthread -lmach -lexc $LIBS"
5209
5210                         cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213
5214 #include <pthread.h>
5215 #ifndef NULL
5216 #define NULL (void*)0
5217 #endif
5218
5219 int main() {
5220
5221         pthread_t t;
5222
5223 #if HAVE_PTHREADS_D4
5224         pthread_create(&t, pthread_attr_default, NULL, NULL);
5225         pthread_detach( &t );
5226 #else
5227         pthread_create(&t, NULL, NULL, NULL);
5228         pthread_detach( t );
5229 #endif
5230 #ifdef HAVE_LINUX_THREADS
5231         pthread_kill_other_threads_np();
5232 #endif
5233
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5237   rm -rf conftest*
5238   ol_cv_pthread_lpthread_lmach_lexc=yes
5239 else
5240   echo "configure: failed program was:" >&5
5241   cat conftest.$ac_ext >&5
5242   rm -rf conftest*
5243   ol_cv_pthread_lpthread_lmach_lexc=no
5244 fi
5245 rm -f conftest*
5246
5247                 # restore the LIBS
5248                 LIBS="$ol_LIBS"
5249                 
5250 fi
5251
5252 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5253
5254                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5255                         ol_link_pthreads="-lpthread -lmach -lexc"
5256                         ol_link_threads=posix
5257                 fi
5258         fi
5259
5260
5261                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5262         if test "$ol_link_threads" = no ; then
5263                 # try -lpthread -Wl,-woff,85
5264                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5265 echo "configure:5266: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5266 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   
5270                         # save the flags
5271                         ol_LIBS="$LIBS"
5272                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5273
5274                         cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277
5278 #include <pthread.h>
5279 #ifndef NULL
5280 #define NULL (void*)0
5281 #endif
5282
5283 int main() {
5284
5285         pthread_t t;
5286
5287 #if HAVE_PTHREADS_D4
5288         pthread_create(&t, pthread_attr_default, NULL, NULL);
5289         pthread_detach( &t );
5290 #else
5291         pthread_create(&t, NULL, NULL, NULL);
5292         pthread_detach( t );
5293 #endif
5294 #ifdef HAVE_LINUX_THREADS
5295         pthread_kill_other_threads_np();
5296 #endif
5297
5298 ; return 0; }
5299 EOF
5300 if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5301   rm -rf conftest*
5302   ol_cv_pthread_lib_lpthread_woff=yes
5303 else
5304   echo "configure: failed program was:" >&5
5305   cat conftest.$ac_ext >&5
5306   rm -rf conftest*
5307   ol_cv_pthread_lib_lpthread_woff=no
5308 fi
5309 rm -f conftest*
5310
5311                 # restore the LIBS
5312                 LIBS="$ol_LIBS"
5313                 
5314 fi
5315
5316 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5317
5318                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5319                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5320                         ol_link_threads=posix
5321                 fi
5322         fi
5323
5324
5325                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5326         if test "$ol_link_threads" = no ; then
5327                 # try -lpthread
5328                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5329 echo "configure:5330: checking for pthread link with -lpthread" >&5
5330 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5331   echo $ac_n "(cached) $ac_c" 1>&6
5332 else
5333   
5334                         # save the flags
5335                         ol_LIBS="$LIBS"
5336                         LIBS="-lpthread $LIBS"
5337
5338                         cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341
5342 #include <pthread.h>
5343 #ifndef NULL
5344 #define NULL (void*)0
5345 #endif
5346
5347 int main() {
5348
5349         pthread_t t;
5350
5351 #if HAVE_PTHREADS_D4
5352         pthread_create(&t, pthread_attr_default, NULL, NULL);
5353         pthread_detach( &t );
5354 #else
5355         pthread_create(&t, NULL, NULL, NULL);
5356         pthread_detach( t );
5357 #endif
5358 #ifdef HAVE_LINUX_THREADS
5359         pthread_kill_other_threads_np();
5360 #endif
5361
5362 ; return 0; }
5363 EOF
5364 if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5365   rm -rf conftest*
5366   ol_cv_pthread_lpthread=yes
5367 else
5368   echo "configure: failed program was:" >&5
5369   cat conftest.$ac_ext >&5
5370   rm -rf conftest*
5371   ol_cv_pthread_lpthread=no
5372 fi
5373 rm -f conftest*
5374
5375                 # restore the LIBS
5376                 LIBS="$ol_LIBS"
5377                 
5378 fi
5379
5380 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5381
5382                 if test $ol_cv_pthread_lpthread = yes ; then
5383                         ol_link_pthreads="-lpthread"
5384                         ol_link_threads=posix
5385                 fi
5386         fi
5387
5388                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5389         if test "$ol_link_threads" = no ; then
5390                 # try -lc_r
5391                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5392 echo "configure:5393: checking for pthread link with -lc_r" >&5
5393 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5394   echo $ac_n "(cached) $ac_c" 1>&6
5395 else
5396   
5397                         # save the flags
5398                         ol_LIBS="$LIBS"
5399                         LIBS="-lc_r $LIBS"
5400
5401                         cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404
5405 #include <pthread.h>
5406 #ifndef NULL
5407 #define NULL (void*)0
5408 #endif
5409
5410 int main() {
5411
5412         pthread_t t;
5413
5414 #if HAVE_PTHREADS_D4
5415         pthread_create(&t, pthread_attr_default, NULL, NULL);
5416         pthread_detach( &t );
5417 #else
5418         pthread_create(&t, NULL, NULL, NULL);
5419         pthread_detach( t );
5420 #endif
5421 #ifdef HAVE_LINUX_THREADS
5422         pthread_kill_other_threads_np();
5423 #endif
5424
5425 ; return 0; }
5426 EOF
5427 if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5428   rm -rf conftest*
5429   ol_cv_pthread_lc_r=yes
5430 else
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   ol_cv_pthread_lc_r=no
5435 fi
5436 rm -f conftest*
5437
5438                 # restore the LIBS
5439                 LIBS="$ol_LIBS"
5440                 
5441 fi
5442
5443 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5444
5445                 if test $ol_cv_pthread_lc_r = yes ; then
5446                         ol_link_pthreads="-lc_r"
5447                         ol_link_threads=posix
5448                 fi
5449         fi
5450
5451
5452                 # Pthread try link: -threads (ol_cv_pthread_threads)
5453         if test "$ol_link_threads" = no ; then
5454                 # try -threads
5455                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5456 echo "configure:5457: checking for pthread link with -threads" >&5
5457 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5458   echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460   
5461                         # save the flags
5462                         ol_LIBS="$LIBS"
5463                         LIBS="-threads $LIBS"
5464
5465                         cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468
5469 #include <pthread.h>
5470 #ifndef NULL
5471 #define NULL (void*)0
5472 #endif
5473
5474 int main() {
5475
5476         pthread_t t;
5477
5478 #if HAVE_PTHREADS_D4
5479         pthread_create(&t, pthread_attr_default, NULL, NULL);
5480         pthread_detach( &t );
5481 #else
5482         pthread_create(&t, NULL, NULL, NULL);
5483         pthread_detach( t );
5484 #endif
5485 #ifdef HAVE_LINUX_THREADS
5486         pthread_kill_other_threads_np();
5487 #endif
5488
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5492   rm -rf conftest*
5493   ol_cv_pthread_threads=yes
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   ol_cv_pthread_threads=no
5499 fi
5500 rm -f conftest*
5501
5502                 # restore the LIBS
5503                 LIBS="$ol_LIBS"
5504                 
5505 fi
5506
5507 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5508
5509                 if test $ol_cv_pthread_threads = yes ; then
5510                         ol_link_pthreads="-threads"
5511                         ol_link_threads=posix
5512                 fi
5513         fi
5514
5515
5516                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5517         if test "$ol_link_threads" = no ; then
5518                 # try -lpthreads -lmach -lexc -lc_r
5519                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5520 echo "configure:5521: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5521 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5522   echo $ac_n "(cached) $ac_c" 1>&6
5523 else
5524   
5525                         # save the flags
5526                         ol_LIBS="$LIBS"
5527                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5528
5529                         cat > conftest.$ac_ext <<EOF
5530 #line 5531 "configure"
5531 #include "confdefs.h"
5532
5533 #include <pthread.h>
5534 #ifndef NULL
5535 #define NULL (void*)0
5536 #endif
5537
5538 int main() {
5539
5540         pthread_t t;
5541
5542 #if HAVE_PTHREADS_D4
5543         pthread_create(&t, pthread_attr_default, NULL, NULL);
5544         pthread_detach( &t );
5545 #else
5546         pthread_create(&t, NULL, NULL, NULL);
5547         pthread_detach( t );
5548 #endif
5549 #ifdef HAVE_LINUX_THREADS
5550         pthread_kill_other_threads_np();
5551 #endif
5552
5553 ; return 0; }
5554 EOF
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556   rm -rf conftest*
5557   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5558 else
5559   echo "configure: failed program was:" >&5
5560   cat conftest.$ac_ext >&5
5561   rm -rf conftest*
5562   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5563 fi
5564 rm -f conftest*
5565
5566                 # restore the LIBS
5567                 LIBS="$ol_LIBS"
5568                 
5569 fi
5570
5571 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5572
5573                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5574                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5575                         ol_link_threads=posix
5576                 fi
5577         fi
5578
5579                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5580         if test "$ol_link_threads" = no ; then
5581                 # try -lpthreads -lmach -lexc
5582                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5583 echo "configure:5584: checking for pthread link with -lpthreads -lmach -lexc" >&5
5584 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5585   echo $ac_n "(cached) $ac_c" 1>&6
5586 else
5587   
5588                         # save the flags
5589                         ol_LIBS="$LIBS"
5590                         LIBS="-lpthreads -lmach -lexc $LIBS"
5591
5592                         cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595
5596 #include <pthread.h>
5597 #ifndef NULL
5598 #define NULL (void*)0
5599 #endif
5600
5601 int main() {
5602
5603         pthread_t t;
5604
5605 #if HAVE_PTHREADS_D4
5606         pthread_create(&t, pthread_attr_default, NULL, NULL);
5607         pthread_detach( &t );
5608 #else
5609         pthread_create(&t, NULL, NULL, NULL);
5610         pthread_detach( t );
5611 #endif
5612 #ifdef HAVE_LINUX_THREADS
5613         pthread_kill_other_threads_np();
5614 #endif
5615
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   ol_cv_pthread_lpthreads_lmach_lexc=yes
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   ol_cv_pthread_lpthreads_lmach_lexc=no
5626 fi
5627 rm -f conftest*
5628
5629                 # restore the LIBS
5630                 LIBS="$ol_LIBS"
5631                 
5632 fi
5633
5634 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
5635
5636                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
5637                         ol_link_pthreads="-lpthreads -lmach -lexc"
5638                         ol_link_threads=posix
5639                 fi
5640         fi
5641
5642                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
5643         if test "$ol_link_threads" = no ; then
5644                 # try -lpthreads -lexc
5645                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
5646 echo "configure:5647: checking for pthread link with -lpthreads -lexc" >&5
5647 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
5648   echo $ac_n "(cached) $ac_c" 1>&6
5649 else
5650   
5651                         # save the flags
5652                         ol_LIBS="$LIBS"
5653                         LIBS="-lpthreads -lexc $LIBS"
5654
5655                         cat > conftest.$ac_ext <<EOF
5656 #line 5657 "configure"
5657 #include "confdefs.h"
5658
5659 #include <pthread.h>
5660 #ifndef NULL
5661 #define NULL (void*)0
5662 #endif
5663
5664 int main() {
5665
5666         pthread_t t;
5667
5668 #if HAVE_PTHREADS_D4
5669         pthread_create(&t, pthread_attr_default, NULL, NULL);
5670         pthread_detach( &t );
5671 #else
5672         pthread_create(&t, NULL, NULL, NULL);
5673         pthread_detach( t );
5674 #endif
5675 #ifdef HAVE_LINUX_THREADS
5676         pthread_kill_other_threads_np();
5677 #endif
5678
5679 ; return 0; }
5680 EOF
5681 if { (eval echo configure:5682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5682   rm -rf conftest*
5683   ol_cv_pthread_lpthreads_lexc=yes
5684 else
5685   echo "configure: failed program was:" >&5
5686   cat conftest.$ac_ext >&5
5687   rm -rf conftest*
5688   ol_cv_pthread_lpthreads_lexc=no
5689 fi
5690 rm -f conftest*
5691
5692                 # restore the LIBS
5693                 LIBS="$ol_LIBS"
5694                 
5695 fi
5696
5697 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
5698
5699                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
5700                         ol_link_pthreads="-lpthreads -lexc"
5701                         ol_link_threads=posix
5702                 fi
5703         fi
5704
5705
5706                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
5707         if test "$ol_link_threads" = no ; then
5708                 # try -lpthreads
5709                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
5710 echo "configure:5711: checking for pthread link with -lpthreads" >&5
5711 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
5712   echo $ac_n "(cached) $ac_c" 1>&6
5713 else
5714   
5715                         # save the flags
5716                         ol_LIBS="$LIBS"
5717                         LIBS="-lpthreads $LIBS"
5718
5719                         cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5722
5723 #include <pthread.h>
5724 #ifndef NULL
5725 #define NULL (void*)0
5726 #endif
5727
5728 int main() {
5729
5730         pthread_t t;
5731
5732 #if HAVE_PTHREADS_D4
5733         pthread_create(&t, pthread_attr_default, NULL, NULL);
5734         pthread_detach( &t );
5735 #else
5736         pthread_create(&t, NULL, NULL, NULL);
5737         pthread_detach( t );
5738 #endif
5739 #ifdef HAVE_LINUX_THREADS
5740         pthread_kill_other_threads_np();
5741 #endif
5742
5743 ; return 0; }
5744 EOF
5745 if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746   rm -rf conftest*
5747   ol_cv_pthread_lib_lpthreads=yes
5748 else
5749   echo "configure: failed program was:" >&5
5750   cat conftest.$ac_ext >&5
5751   rm -rf conftest*
5752   ol_cv_pthread_lib_lpthreads=no
5753 fi
5754 rm -f conftest*
5755
5756                 # restore the LIBS
5757                 LIBS="$ol_LIBS"
5758                 
5759 fi
5760
5761 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
5762
5763                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
5764                         ol_link_pthreads="-lpthreads"
5765                         ol_link_threads=posix
5766                 fi
5767         fi
5768
5769
5770                 if test $ol_link_threads != no ; then
5771                         cat >> confdefs.h <<\EOF
5772 #define HAVE_PTHREADS 1
5773 EOF
5774
5775
5776                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
5777
5778                                                 save_CPPFLAGS="$CPPFLAGS"
5779                         save_LIBS="$LIBS"
5780                         LIBS="$LTHREAD_LIBS $LIBS"
5781
5782                                                                                                 for ac_func in sched_yield pthread_yield
5783 do
5784 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5785 echo "configure:5786: checking for $ac_func" >&5
5786 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5787   echo $ac_n "(cached) $ac_c" 1>&6
5788 else
5789   cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792 /* System header to define __stub macros and hopefully few prototypes,
5793     which can conflict with char $ac_func(); below.  */
5794 #include <assert.h>
5795 /* Override any gcc2 internal prototype to avoid an error.  */
5796 /* We use char because int might match the return type of a gcc2
5797     builtin and then its argument prototype would still apply.  */
5798 char $ac_func();
5799
5800 int main() {
5801
5802 /* The GNU C library defines this for functions which it implements
5803     to always fail with ENOSYS.  Some functions are actually named
5804     something starting with __ and the normal name is an alias.  */
5805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5806 choke me
5807 #else
5808 $ac_func();
5809 #endif
5810
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5814   rm -rf conftest*
5815   eval "ac_cv_func_$ac_func=yes"
5816 else
5817   echo "configure: failed program was:" >&5
5818   cat conftest.$ac_ext >&5
5819   rm -rf conftest*
5820   eval "ac_cv_func_$ac_func=no"
5821 fi
5822 rm -f conftest*
5823 fi
5824
5825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5826   echo "$ac_t""yes" 1>&6
5827     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5828   cat >> confdefs.h <<EOF
5829 #define $ac_tr_func 1
5830 EOF
5831  
5832 else
5833   echo "$ac_t""no" 1>&6
5834 fi
5835 done
5836
5837
5838                         if test $ac_cv_func_sched_yield = no -a \
5839                                 $ac_cv_func_pthread_yield = no ; then
5840                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5841 echo "configure:5842: checking for sched_yield in -lrt" >&5
5842 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   ac_save_LIBS="$LIBS"
5847 LIBS="-lrt  $LIBS"
5848 cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851 /* Override any gcc2 internal prototype to avoid an error.  */
5852 /* We use char because int might match the return type of a gcc2
5853     builtin and then its argument prototype would still apply.  */
5854 char sched_yield();
5855
5856 int main() {
5857 sched_yield()
5858 ; return 0; }
5859 EOF
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5861   rm -rf conftest*
5862   eval "ac_cv_lib_$ac_lib_var=yes"
5863 else
5864   echo "configure: failed program was:" >&5
5865   cat conftest.$ac_ext >&5
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=no"
5868 fi
5869 rm -f conftest*
5870 LIBS="$ac_save_LIBS"
5871
5872 fi
5873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5876                                         cat >> confdefs.h <<\EOF
5877 #define HAVE_SCHED_YIELD 1
5878 EOF
5879
5880                                         ac_cv_func_sched_yield=yes
5881 else
5882   echo "$ac_t""no" 1>&6
5883 ac_cv_func_sched_yield=no
5884 fi
5885
5886                         fi
5887                         if test $ac_cv_func_sched_yield = no -a \
5888                                 $ac_cv_func_pthread_yield = no ; then
5889                                                                                                 for ac_func in thr_yield
5890 do
5891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5892 echo "configure:5893: checking for $ac_func" >&5
5893 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5894   echo $ac_n "(cached) $ac_c" 1>&6
5895 else
5896   cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899 /* System header to define __stub macros and hopefully few prototypes,
5900     which can conflict with char $ac_func(); below.  */
5901 #include <assert.h>
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char $ac_func();
5906
5907 int main() {
5908
5909 /* The GNU C library defines this for functions which it implements
5910     to always fail with ENOSYS.  Some functions are actually named
5911     something starting with __ and the normal name is an alias.  */
5912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5913 choke me
5914 #else
5915 $ac_func();
5916 #endif
5917
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   eval "ac_cv_func_$ac_func=yes"
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   eval "ac_cv_func_$ac_func=no"
5928 fi
5929 rm -f conftest*
5930 fi
5931
5932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5933   echo "$ac_t""yes" 1>&6
5934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5935   cat >> confdefs.h <<EOF
5936 #define $ac_tr_func 1
5937 EOF
5938  
5939 else
5940   echo "$ac_t""no" 1>&6
5941 fi
5942 done
5943
5944                         fi
5945                         if test $ac_cv_func_sched_yield = no -a \
5946                                 $ac_cv_func_pthread_yield = no -a \
5947                                 "$ac_cv_func_thr_yield" = no ; then
5948                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5949                         fi
5950
5951                                                 for ac_func in pthread_kill
5952 do
5953 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5954 echo "configure:5955: checking for $ac_func" >&5
5955 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5956   echo $ac_n "(cached) $ac_c" 1>&6
5957 else
5958   cat > conftest.$ac_ext <<EOF
5959 #line 5960 "configure"
5960 #include "confdefs.h"
5961 /* System header to define __stub macros and hopefully few prototypes,
5962     which can conflict with char $ac_func(); below.  */
5963 #include <assert.h>
5964 /* Override any gcc2 internal prototype to avoid an error.  */
5965 /* We use char because int might match the return type of a gcc2
5966     builtin and then its argument prototype would still apply.  */
5967 char $ac_func();
5968
5969 int main() {
5970
5971 /* The GNU C library defines this for functions which it implements
5972     to always fail with ENOSYS.  Some functions are actually named
5973     something starting with __ and the normal name is an alias.  */
5974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5975 choke me
5976 #else
5977 $ac_func();
5978 #endif
5979
5980 ; return 0; }
5981 EOF
5982 if { (eval echo configure:5983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5983   rm -rf conftest*
5984   eval "ac_cv_func_$ac_func=yes"
5985 else
5986   echo "configure: failed program was:" >&5
5987   cat conftest.$ac_ext >&5
5988   rm -rf conftest*
5989   eval "ac_cv_func_$ac_func=no"
5990 fi
5991 rm -f conftest*
5992 fi
5993
5994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5995   echo "$ac_t""yes" 1>&6
5996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5997   cat >> confdefs.h <<EOF
5998 #define $ac_tr_func 1
5999 EOF
6000  
6001 else
6002   echo "$ac_t""no" 1>&6
6003 fi
6004 done
6005
6006
6007                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6008 echo "configure:6009: checking for pthread_detach with <pthread.h>" >&5
6009 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6010   echo $ac_n "(cached) $ac_c" 1>&6
6011 else
6012   
6013                                                                 cat > conftest.$ac_ext <<EOF
6014 #line 6015 "configure"
6015 #include "confdefs.h"
6016
6017 #include <pthread.h>
6018 #ifndef NULL
6019 #define NULL (void*)0
6020 #endif
6021
6022 int main() {
6023 pthread_detach(NULL);
6024 ; return 0; }
6025 EOF
6026 if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6027   rm -rf conftest*
6028   ol_cv_func_pthread_detach=yes
6029 else
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   ol_cv_func_pthread_detach=no
6034 fi
6035 rm -f conftest*
6036                         
6037 fi
6038
6039 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6040
6041                         if test $ol_cv_func_pthread_detach = no ; then
6042                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6043                         fi
6044
6045                         cat >> confdefs.h <<\EOF
6046 #define HAVE_PTHREAD_DETACH 1
6047 EOF
6048
6049
6050                                                 for ac_func in \
6051                                 pthread_setconcurrency \
6052                                 pthread_getconcurrency \
6053                                 thr_setconcurrency \
6054                                 thr_getconcurrency \
6055                         
6056 do
6057 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6058 echo "configure:6059: checking for $ac_func" >&5
6059 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6060   echo $ac_n "(cached) $ac_c" 1>&6
6061 else
6062   cat > conftest.$ac_ext <<EOF
6063 #line 6064 "configure"
6064 #include "confdefs.h"
6065 /* System header to define __stub macros and hopefully few prototypes,
6066     which can conflict with char $ac_func(); below.  */
6067 #include <assert.h>
6068 /* Override any gcc2 internal prototype to avoid an error.  */
6069 /* We use char because int might match the return type of a gcc2
6070     builtin and then its argument prototype would still apply.  */
6071 char $ac_func();
6072
6073 int main() {
6074
6075 /* The GNU C library defines this for functions which it implements
6076     to always fail with ENOSYS.  Some functions are actually named
6077     something starting with __ and the normal name is an alias.  */
6078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6079 choke me
6080 #else
6081 $ac_func();
6082 #endif
6083
6084 ; return 0; }
6085 EOF
6086 if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6087   rm -rf conftest*
6088   eval "ac_cv_func_$ac_func=yes"
6089 else
6090   echo "configure: failed program was:" >&5
6091   cat conftest.$ac_ext >&5
6092   rm -rf conftest*
6093   eval "ac_cv_func_$ac_func=no"
6094 fi
6095 rm -f conftest*
6096 fi
6097
6098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6099   echo "$ac_t""yes" 1>&6
6100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6101   cat >> confdefs.h <<EOF
6102 #define $ac_tr_func 1
6103 EOF
6104  
6105 else
6106   echo "$ac_t""no" 1>&6
6107 fi
6108 done
6109
6110
6111                         
6112         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6113 echo "configure:6114: checking for pthread_kill_other_threads_np" >&5
6114 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6115   echo $ac_n "(cached) $ac_c" 1>&6
6116 else
6117   cat > conftest.$ac_ext <<EOF
6118 #line 6119 "configure"
6119 #include "confdefs.h"
6120 /* System header to define __stub macros and hopefully few prototypes,
6121     which can conflict with char pthread_kill_other_threads_np(); below.  */
6122 #include <assert.h>
6123 /* Override any gcc2 internal prototype to avoid an error.  */
6124 /* We use char because int might match the return type of a gcc2
6125     builtin and then its argument prototype would still apply.  */
6126 char pthread_kill_other_threads_np();
6127
6128 int main() {
6129
6130 /* The GNU C library defines this for functions which it implements
6131     to always fail with ENOSYS.  Some functions are actually named
6132     something starting with __ and the normal name is an alias.  */
6133 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6134 choke me
6135 #else
6136 pthread_kill_other_threads_np();
6137 #endif
6138
6139 ; return 0; }
6140 EOF
6141 if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142   rm -rf conftest*
6143   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6144 else
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6149 fi
6150 rm -f conftest*
6151 fi
6152
6153 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155   :
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159
6160         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6161 echo "configure:6162: checking for LinuxThreads implementation" >&5
6162 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6166 fi
6167
6168 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6169
6170                         
6171         
6172         
6173         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6174 echo "configure:6175: checking for LinuxThreads consistency" >&5
6175 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6176   echo $ac_n "(cached) $ac_c" 1>&6
6177 else
6178   
6179                 if test $ol_cv_header_linux_threads = yes -a \
6180                         $ol_cv_sys_linux_threads = yes; then
6181                         ol_cv_linux_threads=yes
6182                 elif test $ol_cv_header_linux_threads = no -a \
6183                         $ol_cv_sys_linux_threads = no; then
6184                         ol_cv_linux_threads=no
6185                 else
6186                         ol_cv_linux_threads=error
6187                 fi
6188         
6189 fi
6190
6191 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6192
6193
6194                         if test $ol_cv_linux_threads = error; then
6195                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6196                         fi
6197
6198                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6199 echo "configure:6200: checking if pthread_create() works" >&5
6200                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6201   echo $ac_n "(cached) $ac_c" 1>&6
6202 else
6203   
6204                         if test "$cross_compiling" = yes; then
6205                                 ol_cv_pthread_create_works=yes
6206 else
6207   cat > conftest.$ac_ext <<EOF
6208 #line 6209 "configure"
6209 #include "confdefs.h"
6210
6211 #include <pthread.h>
6212 #ifndef NULL
6213 #define NULL (void*)0
6214 #endif
6215
6216 static void *task(p)
6217         void *p;
6218 {
6219         return (void *) (p == NULL);
6220 }
6221
6222 int main(argc, argv)
6223         int argc;
6224         char **argv;
6225 {
6226         pthread_t t;
6227 #if HAVE_PTHREADS_D4
6228         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6229 #else
6230         exit(pthread_create(&t, NULL, task, NULL));
6231 #endif
6232 }
6233
6234 EOF
6235 if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6236 then
6237   ol_cv_pthread_create_works=yes
6238 else
6239   echo "configure: failed program was:" >&5
6240   cat conftest.$ac_ext >&5
6241   rm -fr conftest*
6242   ol_cv_pthread_create_works=no
6243 fi
6244 rm -fr conftest*
6245 fi
6246
6247 fi
6248
6249                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6250
6251                         if test $ol_cv_pthread_create_works = no ; then
6252                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6253                         fi
6254
6255                                                 if test $ol_with_yielding_select = auto ; then
6256                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6257 echo "configure:6258: checking if select yields when using pthreads" >&5
6258                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6259   echo $ac_n "(cached) $ac_c" 1>&6
6260 else
6261   
6262                                 if test "$cross_compiling" = yes; then
6263   
6264                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6265 else
6266   cat > conftest.$ac_ext <<EOF
6267 #line 6268 "configure"
6268 #include "confdefs.h"
6269
6270 #include <sys/types.h>
6271 #include <sys/time.h>
6272 #include <unistd.h>
6273 #include <pthread.h>
6274 #ifndef NULL
6275 #define NULL (void*) 0
6276 #endif
6277
6278 static int fildes[2];
6279
6280 static void *task(p)
6281         void *p;
6282 {
6283         int i;
6284         struct timeval tv;
6285
6286         fd_set rfds;
6287
6288         tv.tv_sec=10;
6289         tv.tv_usec=0;
6290
6291         FD_ZERO(&rfds);
6292         FD_SET(fildes[0], &rfds);
6293
6294         /* we're not interested in any fds */
6295         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6296
6297         if(i < 0) {
6298                 perror("select");
6299                 exit(10);
6300         }
6301
6302         exit(0); /* if we exit here, the select blocked the whole process */
6303 }
6304
6305 int main(argc, argv)
6306         int argc;
6307         char **argv;
6308 {
6309         pthread_t t;
6310
6311         /* create a pipe to select */
6312         if(pipe(&fildes[0])) {
6313                 perror("select");
6314                 exit(1);
6315         }
6316
6317 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6318         (void) pthread_setconcurrency(2);
6319 #else
6320 #ifdef HAVE_THR_SETCONCURRENCY
6321         /* Set Solaris LWP concurrency to 2 */
6322         thr_setconcurrency(2);
6323 #endif
6324 #endif
6325
6326 #if HAVE_PTHREADS_D4
6327         pthread_create(&t, pthread_attr_default, task, NULL);
6328 #else
6329         pthread_create(&t, NULL, task, NULL);
6330 #endif
6331
6332 #if HAVE_SCHED_YIELD
6333         sched_yield();  /* make sure task runs first */
6334 #else
6335 #ifdef HAVE_PTHREAD_YIELD
6336         pthread_yield();        /* make sure task runs first */
6337 #endif
6338 #endif
6339
6340         exit(2);
6341 }
6342 EOF
6343 if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6344 then
6345   ol_cv_pthread_select_yields=no
6346 else
6347   echo "configure: failed program was:" >&5
6348   cat conftest.$ac_ext >&5
6349   rm -fr conftest*
6350   ol_cv_pthread_select_yields=yes
6351 fi
6352 rm -fr conftest*
6353 fi
6354
6355 fi
6356
6357                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6358
6359                                 if test $ol_cv_pthread_select_yields = yes ; then
6360                                         ol_with_yielding_select=yes
6361                                 fi
6362                         fi
6363
6364                                                 CPPFLAGS="$save_CPPFLAGS"
6365                         LIBS="$save_LIBS"
6366                 else
6367                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6368                 fi
6369         fi
6370
6371         if test $ol_with_threads = posix ; then
6372                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6373         fi
6374 fi
6375
6376 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6377         -o $ol_with_threads = mach ; then
6378
6379                 for ac_hdr in mach/cthreads.h
6380 do
6381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6383 echo "configure:6384: checking for $ac_hdr" >&5
6384 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6385   echo $ac_n "(cached) $ac_c" 1>&6
6386 else
6387   cat > conftest.$ac_ext <<EOF
6388 #line 6389 "configure"
6389 #include "confdefs.h"
6390 #include <$ac_hdr>
6391 EOF
6392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6393 { (eval echo configure:6394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6395 if test -z "$ac_err"; then
6396   rm -rf conftest*
6397   eval "ac_cv_header_$ac_safe=yes"
6398 else
6399   echo "$ac_err" >&5
6400   echo "configure: failed program was:" >&5
6401   cat conftest.$ac_ext >&5
6402   rm -rf conftest*
6403   eval "ac_cv_header_$ac_safe=no"
6404 fi
6405 rm -f conftest*
6406 fi
6407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6408   echo "$ac_t""yes" 1>&6
6409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6410   cat >> confdefs.h <<EOF
6411 #define $ac_tr_hdr 1
6412 EOF
6413  
6414 else
6415   echo "$ac_t""no" 1>&6
6416 fi
6417 done
6418
6419         if test $ac_cv_header_mach_cthreads_h = yes ; then
6420                 ol_with_threads=found
6421
6422                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6423 echo "configure:6424: checking for cthread_fork" >&5
6424 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6425   echo $ac_n "(cached) $ac_c" 1>&6
6426 else
6427   cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 /* System header to define __stub macros and hopefully few prototypes,
6431     which can conflict with char cthread_fork(); below.  */
6432 #include <assert.h>
6433 /* Override any gcc2 internal prototype to avoid an error.  */
6434 /* We use char because int might match the return type of a gcc2
6435     builtin and then its argument prototype would still apply.  */
6436 char cthread_fork();
6437
6438 int main() {
6439
6440 /* The GNU C library defines this for functions which it implements
6441     to always fail with ENOSYS.  Some functions are actually named
6442     something starting with __ and the normal name is an alias.  */
6443 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6444 choke me
6445 #else
6446 cthread_fork();
6447 #endif
6448
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452   rm -rf conftest*
6453   eval "ac_cv_func_cthread_fork=yes"
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457   rm -rf conftest*
6458   eval "ac_cv_func_cthread_fork=no"
6459 fi
6460 rm -f conftest*
6461 fi
6462
6463 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6464   echo "$ac_t""yes" 1>&6
6465   ol_link_threads=yes
6466 else
6467   echo "$ac_t""no" 1>&6
6468 fi
6469
6470
6471                 if test $ol_link_threads = no ; then
6472                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6473 echo "configure:6474: checking for cthread_fork with -all_load" >&5
6474 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6475   echo $ac_n "(cached) $ac_c" 1>&6
6476 else
6477   
6478                                                                 save_LIBS="$LIBS"
6479                                 LIBS="-all_load $LIBS"
6480                                 cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483 #include <mach/cthreads.h>
6484 int main() {
6485
6486                                         cthread_fork((void *)0, (void *)0);
6487                                         
6488 ; return 0; }
6489 EOF
6490 if { (eval echo configure:6491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6491   rm -rf conftest*
6492   ol_cv_cthread_all_load=yes
6493 else
6494   echo "configure: failed program was:" >&5
6495   cat conftest.$ac_ext >&5
6496   rm -rf conftest*
6497   ol_cv_cthread_all_load=no
6498 fi
6499 rm -f conftest*
6500                                                                 LIBS="$save_LIBS"
6501                         
6502 fi
6503
6504 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6505
6506                         if test $ol_cv_cthread_all_load = yes ; then
6507                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6508                                 ol_link_threads=mach
6509                         fi
6510                 fi
6511
6512                 if test $ol_link_threads != no ; then
6513                         : check for cthread specific functionality here
6514                         cat >> confdefs.h <<\EOF
6515 #define HAVE_MACH_CTHREADS 1
6516 EOF
6517
6518                 else
6519                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6520                 fi
6521         fi
6522
6523         if test $ol_with_threads = mach ; then
6524                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6525         fi
6526 fi
6527
6528 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6529         -o $ol_with_threads = lwp ; then
6530
6531                 for ac_hdr in thread.h synch.h
6532 do
6533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6535 echo "configure:6536: checking for $ac_hdr" >&5
6536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   cat > conftest.$ac_ext <<EOF
6540 #line 6541 "configure"
6541 #include "confdefs.h"
6542 #include <$ac_hdr>
6543 EOF
6544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6545 { (eval echo configure:6546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6547 if test -z "$ac_err"; then
6548   rm -rf conftest*
6549   eval "ac_cv_header_$ac_safe=yes"
6550 else
6551   echo "$ac_err" >&5
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554   rm -rf conftest*
6555   eval "ac_cv_header_$ac_safe=no"
6556 fi
6557 rm -f conftest*
6558 fi
6559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6560   echo "$ac_t""yes" 1>&6
6561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6562   cat >> confdefs.h <<EOF
6563 #define $ac_tr_hdr 1
6564 EOF
6565  
6566 else
6567   echo "$ac_t""no" 1>&6
6568 fi
6569 done
6570
6571         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6572                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6573 echo "configure:6574: checking for thr_create in -lthread" >&5
6574 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6575 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6576   echo $ac_n "(cached) $ac_c" 1>&6
6577 else
6578   ac_save_LIBS="$LIBS"
6579 LIBS="-lthread  $LIBS"
6580 cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* Override any gcc2 internal prototype to avoid an error.  */
6584 /* We use char because int might match the return type of a gcc2
6585     builtin and then its argument prototype would still apply.  */
6586 char thr_create();
6587
6588 int main() {
6589 thr_create()
6590 ; return 0; }
6591 EOF
6592 if { (eval echo configure:6593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6593   rm -rf conftest*
6594   eval "ac_cv_lib_$ac_lib_var=yes"
6595 else
6596   echo "configure: failed program was:" >&5
6597   cat conftest.$ac_ext >&5
6598   rm -rf conftest*
6599   eval "ac_cv_lib_$ac_lib_var=no"
6600 fi
6601 rm -f conftest*
6602 LIBS="$ac_save_LIBS"
6603
6604 fi
6605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6606   echo "$ac_t""yes" 1>&6
6607   have_thr=yes
6608 else
6609   echo "$ac_t""no" 1>&6
6610 have_thr=no
6611 fi
6612
6613
6614                 if test $have_thr = yes ; then
6615                         cat >> confdefs.h <<\EOF
6616 #define HAVE_THR 1
6617 EOF
6618
6619                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6620                         ol_link_threads=thr
6621
6622                         if test $ol_with_yielding_select = auto ; then
6623                                 ol_with_yielding_select=yes
6624                         fi
6625
6626                                                 for ac_func in \
6627                                 thr_setconcurrency \
6628                                 thr_getconcurrency \
6629                         
6630 do
6631 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6632 echo "configure:6633: checking for $ac_func" >&5
6633 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 /* System header to define __stub macros and hopefully few prototypes,
6640     which can conflict with char $ac_func(); below.  */
6641 #include <assert.h>
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char $ac_func();
6646
6647 int main() {
6648
6649 /* The GNU C library defines this for functions which it implements
6650     to always fail with ENOSYS.  Some functions are actually named
6651     something starting with __ and the normal name is an alias.  */
6652 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6653 choke me
6654 #else
6655 $ac_func();
6656 #endif
6657
6658 ; return 0; }
6659 EOF
6660 if { (eval echo configure:6661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6661   rm -rf conftest*
6662   eval "ac_cv_func_$ac_func=yes"
6663 else
6664   echo "configure: failed program was:" >&5
6665   cat conftest.$ac_ext >&5
6666   rm -rf conftest*
6667   eval "ac_cv_func_$ac_func=no"
6668 fi
6669 rm -f conftest*
6670 fi
6671
6672 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6673   echo "$ac_t""yes" 1>&6
6674     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6675   cat >> confdefs.h <<EOF
6676 #define $ac_tr_func 1
6677 EOF
6678  
6679 else
6680   echo "$ac_t""no" 1>&6
6681 fi
6682 done
6683
6684                 fi
6685         fi
6686
6687                 for ac_hdr in lwp/lwp.h
6688 do
6689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6691 echo "configure:6692: checking for $ac_hdr" >&5
6692 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6693   echo $ac_n "(cached) $ac_c" 1>&6
6694 else
6695   cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 #include <$ac_hdr>
6699 EOF
6700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6701 { (eval echo configure:6702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6703 if test -z "$ac_err"; then
6704   rm -rf conftest*
6705   eval "ac_cv_header_$ac_safe=yes"
6706 else
6707   echo "$ac_err" >&5
6708   echo "configure: failed program was:" >&5
6709   cat conftest.$ac_ext >&5
6710   rm -rf conftest*
6711   eval "ac_cv_header_$ac_safe=no"
6712 fi
6713 rm -f conftest*
6714 fi
6715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6716   echo "$ac_t""yes" 1>&6
6717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6718   cat >> confdefs.h <<EOF
6719 #define $ac_tr_hdr 1
6720 EOF
6721  
6722 else
6723   echo "$ac_t""no" 1>&6
6724 fi
6725 done
6726
6727         if test $ac_cv_header_lwp_lwp_h = yes ; then
6728                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6729 echo "configure:6730: checking for lwp_create in -llwp" >&5
6730 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6732   echo $ac_n "(cached) $ac_c" 1>&6
6733 else
6734   ac_save_LIBS="$LIBS"
6735 LIBS="-llwp  $LIBS"
6736 cat > conftest.$ac_ext <<EOF
6737 #line 6738 "configure"
6738 #include "confdefs.h"
6739 /* Override any gcc2 internal prototype to avoid an error.  */
6740 /* We use char because int might match the return type of a gcc2
6741     builtin and then its argument prototype would still apply.  */
6742 char lwp_create();
6743
6744 int main() {
6745 lwp_create()
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6749   rm -rf conftest*
6750   eval "ac_cv_lib_$ac_lib_var=yes"
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=no"
6756 fi
6757 rm -f conftest*
6758 LIBS="$ac_save_LIBS"
6759
6760 fi
6761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763   have_lwp=yes
6764 else
6765   echo "$ac_t""no" 1>&6
6766 have_lwp=no
6767 fi
6768
6769
6770                 if test $have_lwp = yes ; then
6771                         cat >> confdefs.h <<\EOF
6772 #define HAVE_LWP 1
6773 EOF
6774
6775                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6776                         ol_link_threads=lwp
6777
6778                         if test $ol_with_yielding_select = auto ; then
6779                                 ol_with_yielding_select=no
6780                         fi
6781                 fi
6782         fi
6783 fi
6784
6785 if test $ol_with_yielding_select = yes ; then
6786         cat >> confdefs.h <<\EOF
6787 #define HAVE_YIELDING_SELECT 1
6788 EOF
6789
6790 fi
6791
6792 if test $ol_with_threads = manual ; then
6793                 ol_link_threads=yes
6794
6795         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6796
6797         for ac_hdr in pthread.h sched.h
6798 do
6799 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6800 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6801 echo "configure:6802: checking for $ac_hdr" >&5
6802 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6803   echo $ac_n "(cached) $ac_c" 1>&6
6804 else
6805   cat > conftest.$ac_ext <<EOF
6806 #line 6807 "configure"
6807 #include "confdefs.h"
6808 #include <$ac_hdr>
6809 EOF
6810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6811 { (eval echo configure:6812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6813 if test -z "$ac_err"; then
6814   rm -rf conftest*
6815   eval "ac_cv_header_$ac_safe=yes"
6816 else
6817   echo "$ac_err" >&5
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   eval "ac_cv_header_$ac_safe=no"
6822 fi
6823 rm -f conftest*
6824 fi
6825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6826   echo "$ac_t""yes" 1>&6
6827     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6828   cat >> confdefs.h <<EOF
6829 #define $ac_tr_hdr 1
6830 EOF
6831  
6832 else
6833   echo "$ac_t""no" 1>&6
6834 fi
6835 done
6836
6837         for ac_func in sched_yield pthread_yield
6838 do
6839 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6840 echo "configure:6841: checking for $ac_func" >&5
6841 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847 /* System header to define __stub macros and hopefully few prototypes,
6848     which can conflict with char $ac_func(); below.  */
6849 #include <assert.h>
6850 /* Override any gcc2 internal prototype to avoid an error.  */
6851 /* We use char because int might match the return type of a gcc2
6852     builtin and then its argument prototype would still apply.  */
6853 char $ac_func();
6854
6855 int main() {
6856
6857 /* The GNU C library defines this for functions which it implements
6858     to always fail with ENOSYS.  Some functions are actually named
6859     something starting with __ and the normal name is an alias.  */
6860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6861 choke me
6862 #else
6863 $ac_func();
6864 #endif
6865
6866 ; return 0; }
6867 EOF
6868 if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6869   rm -rf conftest*
6870   eval "ac_cv_func_$ac_func=yes"
6871 else
6872   echo "configure: failed program was:" >&5
6873   cat conftest.$ac_ext >&5
6874   rm -rf conftest*
6875   eval "ac_cv_func_$ac_func=no"
6876 fi
6877 rm -f conftest*
6878 fi
6879
6880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6881   echo "$ac_t""yes" 1>&6
6882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6883   cat >> confdefs.h <<EOF
6884 #define $ac_tr_func 1
6885 EOF
6886  
6887 else
6888   echo "$ac_t""no" 1>&6
6889 fi
6890 done
6891
6892         
6893         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6894 echo "configure:6895: checking for LinuxThreads pthread.h" >&5
6895 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6896   echo $ac_n "(cached) $ac_c" 1>&6
6897 else
6898   cat > conftest.$ac_ext <<EOF
6899 #line 6900 "configure"
6900 #include "confdefs.h"
6901 #include <pthread.h>
6902 EOF
6903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6904   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6905   rm -rf conftest*
6906   ol_cv_header_linux_threads=yes
6907 else
6908   rm -rf conftest*
6909   ol_cv_header_linux_threads=no
6910 fi
6911 rm -f conftest*
6912
6913                 
6914 fi
6915
6916 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6917         if test $ol_cv_header_linux_threads = yes; then
6918                 cat >> confdefs.h <<\EOF
6919 #define HAVE_LINUX_THREADS 1
6920 EOF
6921
6922         fi
6923
6924
6925         for ac_hdr in mach/cthreads.h
6926 do
6927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6929 echo "configure:6930: checking for $ac_hdr" >&5
6930 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6931   echo $ac_n "(cached) $ac_c" 1>&6
6932 else
6933   cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936 #include <$ac_hdr>
6937 EOF
6938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6939 { (eval echo configure:6940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6941 if test -z "$ac_err"; then
6942   rm -rf conftest*
6943   eval "ac_cv_header_$ac_safe=yes"
6944 else
6945   echo "$ac_err" >&5
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948   rm -rf conftest*
6949   eval "ac_cv_header_$ac_safe=no"
6950 fi
6951 rm -f conftest*
6952 fi
6953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6954   echo "$ac_t""yes" 1>&6
6955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6956   cat >> confdefs.h <<EOF
6957 #define $ac_tr_hdr 1
6958 EOF
6959  
6960 else
6961   echo "$ac_t""no" 1>&6
6962 fi
6963 done
6964
6965         for ac_hdr in lwp/lwp.h
6966 do
6967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6969 echo "configure:6970: checking for $ac_hdr" >&5
6970 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6971   echo $ac_n "(cached) $ac_c" 1>&6
6972 else
6973   cat > conftest.$ac_ext <<EOF
6974 #line 6975 "configure"
6975 #include "confdefs.h"
6976 #include <$ac_hdr>
6977 EOF
6978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6979 { (eval echo configure:6980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6981 if test -z "$ac_err"; then
6982   rm -rf conftest*
6983   eval "ac_cv_header_$ac_safe=yes"
6984 else
6985   echo "$ac_err" >&5
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_header_$ac_safe=no"
6990 fi
6991 rm -f conftest*
6992 fi
6993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6994   echo "$ac_t""yes" 1>&6
6995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6996   cat >> confdefs.h <<EOF
6997 #define $ac_tr_hdr 1
6998 EOF
6999  
7000 else
7001   echo "$ac_t""no" 1>&6
7002 fi
7003 done
7004
7005         for ac_hdr in thread.h synch.h
7006 do
7007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7008 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7009 echo "configure:7010: checking for $ac_hdr" >&5
7010 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7011   echo $ac_n "(cached) $ac_c" 1>&6
7012 else
7013   cat > conftest.$ac_ext <<EOF
7014 #line 7015 "configure"
7015 #include "confdefs.h"
7016 #include <$ac_hdr>
7017 EOF
7018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7019 { (eval echo configure:7020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7021 if test -z "$ac_err"; then
7022   rm -rf conftest*
7023   eval "ac_cv_header_$ac_safe=yes"
7024 else
7025   echo "$ac_err" >&5
7026   echo "configure: failed program was:" >&5
7027   cat conftest.$ac_ext >&5
7028   rm -rf conftest*
7029   eval "ac_cv_header_$ac_safe=no"
7030 fi
7031 rm -f conftest*
7032 fi
7033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7034   echo "$ac_t""yes" 1>&6
7035     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7036   cat >> confdefs.h <<EOF
7037 #define $ac_tr_hdr 1
7038 EOF
7039  
7040 else
7041   echo "$ac_t""no" 1>&6
7042 fi
7043 done
7044
7045 fi
7046
7047 if test $ol_link_threads != no ; then  
7048                         cat >> confdefs.h <<\EOF
7049 #define REENTRANT 1
7050 EOF
7051
7052         cat >> confdefs.h <<\EOF
7053 #define _REENTRANT 1
7054 EOF
7055
7056         cat >> confdefs.h <<\EOF
7057 #define THREAD_SAFE 1
7058 EOF
7059
7060         cat >> confdefs.h <<\EOF
7061 #define _THREAD_SAFE 1
7062 EOF
7063
7064         cat >> confdefs.h <<\EOF
7065 #define THREADSAFE 1
7066 EOF
7067
7068         cat >> confdefs.h <<\EOF
7069 #define _THREADSAFE 1
7070 EOF
7071
7072
7073                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7074 echo "configure:7075: checking for thread specific errno" >&5
7075 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7076   echo $ac_n "(cached) $ac_c" 1>&6
7077 else
7078   
7079                 cat > conftest.$ac_ext <<EOF
7080 #line 7081 "configure"
7081 #include "confdefs.h"
7082 #include <errno.h>
7083 int main() {
7084 errno = 0;
7085 ; return 0; }
7086 EOF
7087 if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7088   rm -rf conftest*
7089   ol_cv_errno_thread_specific=yes
7090 else
7091   echo "configure: failed program was:" >&5
7092   cat conftest.$ac_ext >&5
7093   rm -rf conftest*
7094   ol_cv_errno_thread_specific=no
7095 fi
7096 rm -f conftest*
7097         
7098 fi
7099
7100 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7101
7102         if test $ol_cv_errno_thread_specific != yes ; then
7103                 LIBS="$LTHREAD_LIBS $LIBS"
7104                 LTHREAD_LIBS=""
7105         fi
7106
7107 fi  
7108
7109 if test $ol_link_threads = no ; then
7110         if test $ol_with_threads = yes ; then
7111                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7112         fi
7113
7114         if test $ol_with_threads = auto ; then
7115                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7116                 ol_with_threads=no
7117         fi
7118
7119         cat >> confdefs.h <<\EOF
7120 #define NO_THREADS 1
7121 EOF
7122
7123         LTHREAD_LIBS=""
7124 fi
7125
7126 if test $ol_link_threads != no ; then
7127         cat >> confdefs.h <<\EOF
7128 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7129 EOF
7130
7131 fi
7132
7133
7134 ol_link_ldbm=no 
7135 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7136         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7137 echo "configure:7138: checking for DB2 library" >&5
7138 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7139   echo $ac_n "(cached) $ac_c" 1>&6
7140 else
7141         ol_LIBS="$LIBS"
7142         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7143 echo "configure:7144: checking for db_open in -ldb" >&5
7144 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7146   echo $ac_n "(cached) $ac_c" 1>&6
7147 else
7148   ac_save_LIBS="$LIBS"
7149 LIBS="-ldb  $LIBS"
7150 cat > conftest.$ac_ext <<EOF
7151 #line 7152 "configure"
7152 #include "confdefs.h"
7153 /* Override any gcc2 internal prototype to avoid an error.  */
7154 /* We use char because int might match the return type of a gcc2
7155     builtin and then its argument prototype would still apply.  */
7156 char db_open();
7157
7158 int main() {
7159 db_open()
7160 ; return 0; }
7161 EOF
7162 if { (eval echo configure:7163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7163   rm -rf conftest*
7164   eval "ac_cv_lib_$ac_lib_var=yes"
7165 else
7166   echo "configure: failed program was:" >&5
7167   cat conftest.$ac_ext >&5
7168   rm -rf conftest*
7169   eval "ac_cv_lib_$ac_lib_var=no"
7170 fi
7171 rm -f conftest*
7172 LIBS="$ac_save_LIBS"
7173
7174 fi
7175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177   ol_cv_lib_db2=-ldb
7178 else
7179   echo "$ac_t""no" 1>&6
7180 ol_cv_lib_db2=no
7181 fi
7182
7183         LIBS="$ol_LIBS"
7184
7185 fi
7186
7187 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7188
7189 for ac_hdr in db.h
7190 do
7191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7193 echo "configure:7194: checking for $ac_hdr" >&5
7194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 #include <$ac_hdr>
7201 EOF
7202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7203 { (eval echo configure:7204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7205 if test -z "$ac_err"; then
7206   rm -rf conftest*
7207   eval "ac_cv_header_$ac_safe=yes"
7208 else
7209   echo "$ac_err" >&5
7210   echo "configure: failed program was:" >&5
7211   cat conftest.$ac_ext >&5
7212   rm -rf conftest*
7213   eval "ac_cv_header_$ac_safe=no"
7214 fi
7215 rm -f conftest*
7216 fi
7217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7218   echo "$ac_t""yes" 1>&6
7219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7220   cat >> confdefs.h <<EOF
7221 #define $ac_tr_hdr 1
7222 EOF
7223  
7224 else
7225   echo "$ac_t""no" 1>&6
7226 fi
7227 done
7228
7229 if test $ac_cv_header_db_h = yes ; then
7230         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7231 echo "configure:7232: checking if db.h is DB2" >&5
7232 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7233   echo $ac_n "(cached) $ac_c" 1>&6
7234 else
7235   
7236                 cat > conftest.$ac_ext <<EOF
7237 #line 7238 "configure"
7238 #include "confdefs.h"
7239
7240 #                       include <db.h>
7241                         /* this check could be improved */
7242 #                       ifdef DB_VERSION_MAJOR
7243 #                               if DB_VERSION_MAJOR == 2
7244                                         __db_version_2
7245 #                               endif
7246 #                       endif
7247                 
7248 EOF
7249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7250   egrep "__db_version_2" >/dev/null 2>&1; then
7251   rm -rf conftest*
7252   ol_cv_header_db2=yes
7253 else
7254   rm -rf conftest*
7255   ol_cv_header_db2=no
7256 fi
7257 rm -f conftest*
7258
7259 fi
7260
7261 echo "$ac_t""$ol_cv_header_db2" 1>&6
7262 else
7263         ol_cv_header_db2=no
7264 fi
7265
7266
7267  
7268  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7269 echo "configure:7270: checking for Berkeley DB2" >&5
7270 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7271   echo $ac_n "(cached) $ac_c" 1>&6
7272 else
7273   
7274         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7275                 ol_cv_berkeley_db2=no
7276         else
7277                 ol_cv_berkeley_db2=yes
7278         fi
7279
7280 fi
7281
7282 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7283  if test $ol_cv_berkeley_db2 = yes ; then
7284         cat >> confdefs.h <<\EOF
7285 #define HAVE_BERKELEY_DB2 1
7286 EOF
7287
7288  fi
7289
7290
7291         if test $ol_cv_berkeley_db2 = yes ; then
7292                 ol_link_ldbm=db2
7293                 ol_with_ldbm_api=db2
7294
7295                 if test $ol_with_ldbm_type = hash ; then
7296                         cat >> confdefs.h <<\EOF
7297 #define LDBM_USE_DBHASH 1
7298 EOF
7299
7300                 else
7301                         cat >> confdefs.h <<\EOF
7302 #define LDBM_USE_DBBTREE 1
7303 EOF
7304
7305                 fi
7306
7307                                                 if test $ol_cv_lib_db2 != yes ; then
7308                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7309                 fi
7310         fi
7311 fi
7312
7313 ol_link_bdb2=no
7314 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7315         ol_link_bdb2=yes
7316 fi
7317
7318 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7319         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7320 echo "configure:7321: checking for Berkeley DB library" >&5
7321 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7322   echo $ac_n "(cached) $ac_c" 1>&6
7323 else
7324         ol_LIBS="$LIBS"
7325         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7326 echo "configure:7327: checking for dbopen" >&5
7327 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7328   echo $ac_n "(cached) $ac_c" 1>&6
7329 else
7330   cat > conftest.$ac_ext <<EOF
7331 #line 7332 "configure"
7332 #include "confdefs.h"
7333 /* System header to define __stub macros and hopefully few prototypes,
7334     which can conflict with char dbopen(); below.  */
7335 #include <assert.h>
7336 /* Override any gcc2 internal prototype to avoid an error.  */
7337 /* We use char because int might match the return type of a gcc2
7338     builtin and then its argument prototype would still apply.  */
7339 char dbopen();
7340
7341 int main() {
7342
7343 /* The GNU C library defines this for functions which it implements
7344     to always fail with ENOSYS.  Some functions are actually named
7345     something starting with __ and the normal name is an alias.  */
7346 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7347 choke me
7348 #else
7349 dbopen();
7350 #endif
7351
7352 ; return 0; }
7353 EOF
7354 if { (eval echo configure:7355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7355   rm -rf conftest*
7356   eval "ac_cv_func_dbopen=yes"
7357 else
7358   echo "configure: failed program was:" >&5
7359   cat conftest.$ac_ext >&5
7360   rm -rf conftest*
7361   eval "ac_cv_func_dbopen=no"
7362 fi
7363 rm -f conftest*
7364 fi
7365
7366 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7367   echo "$ac_t""yes" 1>&6
7368   ol_cv_lib_db=yes
7369 else
7370   echo "$ac_t""no" 1>&6
7371
7372                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7373 echo "configure:7374: checking for dbopen in -ldb" >&5
7374 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7376   echo $ac_n "(cached) $ac_c" 1>&6
7377 else
7378   ac_save_LIBS="$LIBS"
7379 LIBS="-ldb  $LIBS"
7380 cat > conftest.$ac_ext <<EOF
7381 #line 7382 "configure"
7382 #include "confdefs.h"
7383 /* Override any gcc2 internal prototype to avoid an error.  */
7384 /* We use char because int might match the return type of a gcc2
7385     builtin and then its argument prototype would still apply.  */
7386 char dbopen();
7387
7388 int main() {
7389 dbopen()
7390 ; return 0; }
7391 EOF
7392 if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7393   rm -rf conftest*
7394   eval "ac_cv_lib_$ac_lib_var=yes"
7395 else
7396   echo "configure: failed program was:" >&5
7397   cat conftest.$ac_ext >&5
7398   rm -rf conftest*
7399   eval "ac_cv_lib_$ac_lib_var=no"
7400 fi
7401 rm -f conftest*
7402 LIBS="$ac_save_LIBS"
7403
7404 fi
7405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7406   echo "$ac_t""yes" 1>&6
7407   ol_cv_lib_db=-ldb
7408 else
7409   echo "$ac_t""no" 1>&6
7410 ol_cv_lib_db=no
7411 fi
7412
7413         
7414 fi
7415
7416         LIBS="$ol_LIBS"
7417
7418 fi
7419
7420 echo "$ac_t""$ol_cv_lib_db" 1>&6
7421
7422
7423 for ac_hdr in db_185.h
7424 do
7425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7427 echo "configure:7428: checking for $ac_hdr" >&5
7428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7429   echo $ac_n "(cached) $ac_c" 1>&6
7430 else
7431   cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 #include <$ac_hdr>
7435 EOF
7436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7437 { (eval echo configure:7438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7439 if test -z "$ac_err"; then
7440   rm -rf conftest*
7441   eval "ac_cv_header_$ac_safe=yes"
7442 else
7443   echo "$ac_err" >&5
7444   echo "configure: failed program was:" >&5
7445   cat conftest.$ac_ext >&5
7446   rm -rf conftest*
7447   eval "ac_cv_header_$ac_safe=no"
7448 fi
7449 rm -f conftest*
7450 fi
7451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7452   echo "$ac_t""yes" 1>&6
7453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7454   cat >> confdefs.h <<EOF
7455 #define $ac_tr_hdr 1
7456 EOF
7457  
7458 else
7459   echo "$ac_t""no" 1>&6
7460 fi
7461 done
7462
7463 if test "$ol_cv_header_db2" = yes ; then
7464         
7465         ol_cv_header_db=$ac_cv_header_db_185_h
7466 else
7467         ol_cv_header_db=$ac_cv_header_db_h
7468 fi
7469
7470
7471  
7472  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7473 echo "configure:7474: checking for Berkeley DB" >&5
7474 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7475   echo $ac_n "(cached) $ac_c" 1>&6
7476 else
7477   
7478         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7479                 ol_cv_berkeley_db=no
7480         else
7481                 ol_cv_berkeley_db=yes
7482         fi
7483
7484 fi
7485
7486 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7487  if test $ol_cv_berkeley_db = yes ; then
7488         cat >> confdefs.h <<\EOF
7489 #define HAVE_BERKELEY_DB 1
7490 EOF
7491
7492  fi
7493
7494
7495         if test $ol_cv_berkeley_db = yes ; then
7496                 ol_link_ldbm=db
7497                 ol_with_ldbm_api=db
7498
7499                 if test $ol_with_ldbm_type = hash ; then
7500                         cat >> confdefs.h <<\EOF
7501 #define LDBM_USE_DBHASH 1
7502 EOF
7503
7504                 else
7505                         cat >> confdefs.h <<\EOF
7506 #define LDBM_USE_DBBTREE 1
7507 EOF
7508
7509                 fi
7510
7511                                                 if test $ol_cv_lib_db != yes ; then
7512                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7513                 fi
7514         fi
7515 fi
7516
7517 if test $ol_with_ldbm_api = manual ; then
7518                 ol_link_ldbm=yes
7519
7520         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7521
7522         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7523 do
7524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7526 echo "configure:7527: checking for $ac_hdr" >&5
7527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7528   echo $ac_n "(cached) $ac_c" 1>&6
7529 else
7530   cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 #include <$ac_hdr>
7534 EOF
7535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7536 { (eval echo configure:7537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7538 if test -z "$ac_err"; then
7539   rm -rf conftest*
7540   eval "ac_cv_header_$ac_safe=yes"
7541 else
7542   echo "$ac_err" >&5
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -rf conftest*
7546   eval "ac_cv_header_$ac_safe=no"
7547 fi
7548 rm -f conftest*
7549 fi
7550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7551   echo "$ac_t""yes" 1>&6
7552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7553   cat >> confdefs.h <<EOF
7554 #define $ac_tr_hdr 1
7555 EOF
7556  
7557 else
7558   echo "$ac_t""no" 1>&6
7559 fi
7560 done
7561
7562 fi
7563
7564 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7565         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7566         ol_with_ldbm_api=none
7567 fi
7568
7569 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7570         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7571 echo "configure:7572: checking for MDBM library" >&5
7572 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7573   echo $ac_n "(cached) $ac_c" 1>&6
7574 else
7575         ol_LIBS="$LIBS"
7576         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7577 echo "configure:7578: checking for mdbm_set_chain" >&5
7578 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7579   echo $ac_n "(cached) $ac_c" 1>&6
7580 else
7581   cat > conftest.$ac_ext <<EOF
7582 #line 7583 "configure"
7583 #include "confdefs.h"
7584 /* System header to define __stub macros and hopefully few prototypes,
7585     which can conflict with char mdbm_set_chain(); below.  */
7586 #include <assert.h>
7587 /* Override any gcc2 internal prototype to avoid an error.  */
7588 /* We use char because int might match the return type of a gcc2
7589     builtin and then its argument prototype would still apply.  */
7590 char mdbm_set_chain();
7591
7592 int main() {
7593
7594 /* The GNU C library defines this for functions which it implements
7595     to always fail with ENOSYS.  Some functions are actually named
7596     something starting with __ and the normal name is an alias.  */
7597 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7598 choke me
7599 #else
7600 mdbm_set_chain();
7601 #endif
7602
7603 ; return 0; }
7604 EOF
7605 if { (eval echo configure:7606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7606   rm -rf conftest*
7607   eval "ac_cv_func_mdbm_set_chain=yes"
7608 else
7609   echo "configure: failed program was:" >&5
7610   cat conftest.$ac_ext >&5
7611   rm -rf conftest*
7612   eval "ac_cv_func_mdbm_set_chain=no"
7613 fi
7614 rm -f conftest*
7615 fi
7616
7617 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7618   echo "$ac_t""yes" 1>&6
7619   ol_cv_lib_mdbm=yes
7620 else
7621   echo "$ac_t""no" 1>&6
7622
7623                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7624 echo "configure:7625: checking for mdbm_set_chain in -lmdbm" >&5
7625 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7626 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   ac_save_LIBS="$LIBS"
7630 LIBS="-lmdbm  $LIBS"
7631 cat > conftest.$ac_ext <<EOF
7632 #line 7633 "configure"
7633 #include "confdefs.h"
7634 /* Override any gcc2 internal prototype to avoid an error.  */
7635 /* We use char because int might match the return type of a gcc2
7636     builtin and then its argument prototype would still apply.  */
7637 char mdbm_set_chain();
7638
7639 int main() {
7640 mdbm_set_chain()
7641 ; return 0; }
7642 EOF
7643 if { (eval echo configure:7644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7644   rm -rf conftest*
7645   eval "ac_cv_lib_$ac_lib_var=yes"
7646 else
7647   echo "configure: failed program was:" >&5
7648   cat conftest.$ac_ext >&5
7649   rm -rf conftest*
7650   eval "ac_cv_lib_$ac_lib_var=no"
7651 fi
7652 rm -f conftest*
7653 LIBS="$ac_save_LIBS"
7654
7655 fi
7656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7657   echo "$ac_t""yes" 1>&6
7658   ol_cv_lib_mdbm=-lmdbm
7659 else
7660   echo "$ac_t""no" 1>&6
7661 ol_cv_lib_mdbm=no
7662 fi
7663
7664         
7665 fi
7666
7667         LIBS="$ol_LIBS"
7668
7669 fi
7670
7671 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7672
7673
7674  for ac_hdr in mdbm.h
7675 do
7676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7678 echo "configure:7679: checking for $ac_hdr" >&5
7679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7680   echo $ac_n "(cached) $ac_c" 1>&6
7681 else
7682   cat > conftest.$ac_ext <<EOF
7683 #line 7684 "configure"
7684 #include "confdefs.h"
7685 #include <$ac_hdr>
7686 EOF
7687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7688 { (eval echo configure:7689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7690 if test -z "$ac_err"; then
7691   rm -rf conftest*
7692   eval "ac_cv_header_$ac_safe=yes"
7693 else
7694   echo "$ac_err" >&5
7695   echo "configure: failed program was:" >&5
7696   cat conftest.$ac_ext >&5
7697   rm -rf conftest*
7698   eval "ac_cv_header_$ac_safe=no"
7699 fi
7700 rm -f conftest*
7701 fi
7702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7703   echo "$ac_t""yes" 1>&6
7704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7705   cat >> confdefs.h <<EOF
7706 #define $ac_tr_hdr 1
7707 EOF
7708  
7709 else
7710   echo "$ac_t""no" 1>&6
7711 fi
7712 done
7713
7714  echo $ac_n "checking for db""... $ac_c" 1>&6
7715 echo "configure:7716: checking for db" >&5
7716 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719   
7720         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7721                 ol_cv_mdbm=no
7722         else
7723                 ol_cv_mdbm=yes
7724         fi
7725
7726 fi
7727
7728 echo "$ac_t""$ol_cv_mdbm" 1>&6
7729  if test $ol_cv_mdbm = yes ; then
7730         cat >> confdefs.h <<\EOF
7731 #define HAVE_MDBM 1
7732 EOF
7733
7734  fi
7735
7736
7737         if test $ol_cv_mdbm = yes ; then
7738                 ol_link_ldbm=mdbm
7739                 ol_with_ldbm_api=mdbm
7740                 if test $ol_cv_lib_mdbm != yes ; then
7741                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7742                 fi
7743         fi
7744 fi
7745
7746 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7747         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7748 echo "configure:7749: checking for GDBM library" >&5
7749 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7750   echo $ac_n "(cached) $ac_c" 1>&6
7751 else
7752         ol_LIBS="$LIBS"
7753         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7754 echo "configure:7755: checking for gdbm_open" >&5
7755 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7756   echo $ac_n "(cached) $ac_c" 1>&6
7757 else
7758   cat > conftest.$ac_ext <<EOF
7759 #line 7760 "configure"
7760 #include "confdefs.h"
7761 /* System header to define __stub macros and hopefully few prototypes,
7762     which can conflict with char gdbm_open(); below.  */
7763 #include <assert.h>
7764 /* Override any gcc2 internal prototype to avoid an error.  */
7765 /* We use char because int might match the return type of a gcc2
7766     builtin and then its argument prototype would still apply.  */
7767 char gdbm_open();
7768
7769 int main() {
7770
7771 /* The GNU C library defines this for functions which it implements
7772     to always fail with ENOSYS.  Some functions are actually named
7773     something starting with __ and the normal name is an alias.  */
7774 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7775 choke me
7776 #else
7777 gdbm_open();
7778 #endif
7779
7780 ; return 0; }
7781 EOF
7782 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783   rm -rf conftest*
7784   eval "ac_cv_func_gdbm_open=yes"
7785 else
7786   echo "configure: failed program was:" >&5
7787   cat conftest.$ac_ext >&5
7788   rm -rf conftest*
7789   eval "ac_cv_func_gdbm_open=no"
7790 fi
7791 rm -f conftest*
7792 fi
7793
7794 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7795   echo "$ac_t""yes" 1>&6
7796   ol_cv_lib_gdbm=yes
7797 else
7798   echo "$ac_t""no" 1>&6
7799
7800                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7801 echo "configure:7802: checking for gdbm_open in -lgdbm" >&5
7802 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7803 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7804   echo $ac_n "(cached) $ac_c" 1>&6
7805 else
7806   ac_save_LIBS="$LIBS"
7807 LIBS="-lgdbm  $LIBS"
7808 cat > conftest.$ac_ext <<EOF
7809 #line 7810 "configure"
7810 #include "confdefs.h"
7811 /* Override any gcc2 internal prototype to avoid an error.  */
7812 /* We use char because int might match the return type of a gcc2
7813     builtin and then its argument prototype would still apply.  */
7814 char gdbm_open();
7815
7816 int main() {
7817 gdbm_open()
7818 ; return 0; }
7819 EOF
7820 if { (eval echo configure:7821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7821   rm -rf conftest*
7822   eval "ac_cv_lib_$ac_lib_var=yes"
7823 else
7824   echo "configure: failed program was:" >&5
7825   cat conftest.$ac_ext >&5
7826   rm -rf conftest*
7827   eval "ac_cv_lib_$ac_lib_var=no"
7828 fi
7829 rm -f conftest*
7830 LIBS="$ac_save_LIBS"
7831
7832 fi
7833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7834   echo "$ac_t""yes" 1>&6
7835   ol_cv_lib_gdbm=-lgdbm
7836 else
7837   echo "$ac_t""no" 1>&6
7838 ol_cv_lib_gdbm=no
7839 fi
7840
7841         
7842 fi
7843
7844         LIBS="$ol_LIBS"
7845
7846 fi
7847
7848 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7849
7850
7851  for ac_hdr in gdbm.h
7852 do
7853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7855 echo "configure:7856: checking for $ac_hdr" >&5
7856 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7857   echo $ac_n "(cached) $ac_c" 1>&6
7858 else
7859   cat > conftest.$ac_ext <<EOF
7860 #line 7861 "configure"
7861 #include "confdefs.h"
7862 #include <$ac_hdr>
7863 EOF
7864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7865 { (eval echo configure:7866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7867 if test -z "$ac_err"; then
7868   rm -rf conftest*
7869   eval "ac_cv_header_$ac_safe=yes"
7870 else
7871   echo "$ac_err" >&5
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   eval "ac_cv_header_$ac_safe=no"
7876 fi
7877 rm -f conftest*
7878 fi
7879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7880   echo "$ac_t""yes" 1>&6
7881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7882   cat >> confdefs.h <<EOF
7883 #define $ac_tr_hdr 1
7884 EOF
7885  
7886 else
7887   echo "$ac_t""no" 1>&6
7888 fi
7889 done
7890
7891  echo $ac_n "checking for db""... $ac_c" 1>&6
7892 echo "configure:7893: checking for db" >&5
7893 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   
7897         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7898                 ol_cv_gdbm=no
7899         else
7900                 ol_cv_gdbm=yes
7901         fi
7902
7903 fi
7904
7905 echo "$ac_t""$ol_cv_gdbm" 1>&6
7906  if test $ol_cv_gdbm = yes ; then
7907         cat >> confdefs.h <<\EOF
7908 #define HAVE_GDBM 1
7909 EOF
7910
7911  fi
7912
7913
7914         if test $ol_cv_gdbm = yes ; then
7915                 ol_link_ldbm=gdbm
7916                 ol_with_ldbm_api=gdbm
7917
7918                 if test $ol_cv_lib_gdbm != yes ; then
7919                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7920                 fi
7921         fi
7922 fi
7923
7924 if test $ol_with_ldbm_api = auto ; then
7925         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7926 elif test $ol_with_ldbm_api = ndbm ; then
7927         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7928 echo "configure:7929: checking for NDBM library" >&5
7929 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7930   echo $ac_n "(cached) $ac_c" 1>&6
7931 else
7932         ol_LIBS="$LIBS"
7933         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7934 echo "configure:7935: checking for dbm_open" >&5
7935 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938   cat > conftest.$ac_ext <<EOF
7939 #line 7940 "configure"
7940 #include "confdefs.h"
7941 /* System header to define __stub macros and hopefully few prototypes,
7942     which can conflict with char dbm_open(); below.  */
7943 #include <assert.h>
7944 /* Override any gcc2 internal prototype to avoid an error.  */
7945 /* We use char because int might match the return type of a gcc2
7946     builtin and then its argument prototype would still apply.  */
7947 char dbm_open();
7948
7949 int main() {
7950
7951 /* The GNU C library defines this for functions which it implements
7952     to always fail with ENOSYS.  Some functions are actually named
7953     something starting with __ and the normal name is an alias.  */
7954 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7955 choke me
7956 #else
7957 dbm_open();
7958 #endif
7959
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_func_dbm_open=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_func_dbm_open=no"
7970 fi
7971 rm -f conftest*
7972 fi
7973
7974 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7975   echo "$ac_t""yes" 1>&6
7976   ol_cv_lib_ndbm=yes
7977 else
7978   echo "$ac_t""no" 1>&6
7979
7980                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7981 echo "configure:7982: checking for dbm_open in -lndbm" >&5
7982 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7983 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7984   echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986   ac_save_LIBS="$LIBS"
7987 LIBS="-lndbm  $LIBS"
7988 cat > conftest.$ac_ext <<EOF
7989 #line 7990 "configure"
7990 #include "confdefs.h"
7991 /* Override any gcc2 internal prototype to avoid an error.  */
7992 /* We use char because int might match the return type of a gcc2
7993     builtin and then its argument prototype would still apply.  */
7994 char dbm_open();
7995
7996 int main() {
7997 dbm_open()
7998 ; return 0; }
7999 EOF
8000 if { (eval echo configure:8001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8001   rm -rf conftest*
8002   eval "ac_cv_lib_$ac_lib_var=yes"
8003 else
8004   echo "configure: failed program was:" >&5
8005   cat conftest.$ac_ext >&5
8006   rm -rf conftest*
8007   eval "ac_cv_lib_$ac_lib_var=no"
8008 fi
8009 rm -f conftest*
8010 LIBS="$ac_save_LIBS"
8011
8012 fi
8013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8014   echo "$ac_t""yes" 1>&6
8015   ol_cv_lib_ndbm=-lndbm
8016 else
8017   echo "$ac_t""no" 1>&6
8018
8019                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8020 echo "configure:8021: checking for dbm_open in -ldbm" >&5
8021 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8022 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8023   echo $ac_n "(cached) $ac_c" 1>&6
8024 else
8025   ac_save_LIBS="$LIBS"
8026 LIBS="-ldbm  $LIBS"
8027 cat > conftest.$ac_ext <<EOF
8028 #line 8029 "configure"
8029 #include "confdefs.h"
8030 /* Override any gcc2 internal prototype to avoid an error.  */
8031 /* We use char because int might match the return type of a gcc2
8032     builtin and then its argument prototype would still apply.  */
8033 char dbm_open();
8034
8035 int main() {
8036 dbm_open()
8037 ; return 0; }
8038 EOF
8039 if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8040   rm -rf conftest*
8041   eval "ac_cv_lib_$ac_lib_var=yes"
8042 else
8043   echo "configure: failed program was:" >&5
8044   cat conftest.$ac_ext >&5
8045   rm -rf conftest*
8046   eval "ac_cv_lib_$ac_lib_var=no"
8047 fi
8048 rm -f conftest*
8049 LIBS="$ac_save_LIBS"
8050
8051 fi
8052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8053   echo "$ac_t""yes" 1>&6
8054   ol_cv_lib_ndbm=-ldbm
8055 else
8056   echo "$ac_t""no" 1>&6
8057 ol_cv_lib_ndbm=no
8058 fi
8059                 
8060 fi
8061
8062         
8063 fi
8064
8065         LIBS="$ol_LIBS"
8066
8067 fi
8068
8069 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8070
8071
8072  for ac_hdr in ndbm.h
8073 do
8074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8076 echo "configure:8077: checking for $ac_hdr" >&5
8077 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8078   echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080   cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <$ac_hdr>
8084 EOF
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089   rm -rf conftest*
8090   eval "ac_cv_header_$ac_safe=yes"
8091 else
8092   echo "$ac_err" >&5
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   eval "ac_cv_header_$ac_safe=no"
8097 fi
8098 rm -f conftest*
8099 fi
8100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8101   echo "$ac_t""yes" 1>&6
8102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8103   cat >> confdefs.h <<EOF
8104 #define $ac_tr_hdr 1
8105 EOF
8106  
8107 else
8108   echo "$ac_t""no" 1>&6
8109 fi
8110 done
8111
8112  echo $ac_n "checking for db""... $ac_c" 1>&6
8113 echo "configure:8114: checking for db" >&5
8114 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8115   echo $ac_n "(cached) $ac_c" 1>&6
8116 else
8117   
8118         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8119                 ol_cv_ndbm=no
8120         else
8121                 ol_cv_ndbm=yes
8122         fi
8123
8124 fi
8125
8126 echo "$ac_t""$ol_cv_ndbm" 1>&6
8127  if test $ol_cv_ndbm = yes ; then
8128         cat >> confdefs.h <<\EOF
8129 #define HAVE_NDBM 1
8130 EOF
8131
8132  fi
8133
8134
8135         if test $ol_cv_ndbm = yes ; then
8136                 ol_link_ldbm=ndbm
8137                 ol_with_ldbm_api=ndbm
8138
8139                 if test $ol_cv_lib_ndbm != yes ; then
8140                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8141                 fi
8142         fi
8143 fi
8144
8145 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8146         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8147         if test $ol_enable_ldbm = yes ; then
8148                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8149         fi
8150
8151         echo "configure: warning: disabling LDBM" 1>&2
8152         ol_enable_ldbm=no
8153 fi
8154
8155 if test $ol_enable_wrappers != no ; then
8156         for ac_hdr in tcpd.h
8157 do
8158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8160 echo "configure:8161: checking for $ac_hdr" >&5
8161 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8162   echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164   cat > conftest.$ac_ext <<EOF
8165 #line 8166 "configure"
8166 #include "confdefs.h"
8167 #include <$ac_hdr>
8168 EOF
8169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8170 { (eval echo configure:8171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8172 if test -z "$ac_err"; then
8173   rm -rf conftest*
8174   eval "ac_cv_header_$ac_safe=yes"
8175 else
8176   echo "$ac_err" >&5
8177   echo "configure: failed program was:" >&5
8178   cat conftest.$ac_ext >&5
8179   rm -rf conftest*
8180   eval "ac_cv_header_$ac_safe=no"
8181 fi
8182 rm -f conftest*
8183 fi
8184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8185   echo "$ac_t""yes" 1>&6
8186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8187   cat >> confdefs.h <<EOF
8188 #define $ac_tr_hdr 1
8189 EOF
8190  
8191 else
8192   echo "$ac_t""no" 1>&6
8193 fi
8194 done
8195
8196
8197         if test $ac_cv_header_tcpd_h != yes ; then
8198                 have_wrappers=no
8199         else
8200                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8201 echo "configure:8202: checking for main in -lwrap" >&5
8202 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8204   echo $ac_n "(cached) $ac_c" 1>&6
8205 else
8206   ac_save_LIBS="$LIBS"
8207 LIBS="-lwrap  $LIBS"
8208 cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211
8212 int main() {
8213 main()
8214 ; return 0; }
8215 EOF
8216 if { (eval echo configure:8217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8217   rm -rf conftest*
8218   eval "ac_cv_lib_$ac_lib_var=yes"
8219 else
8220   echo "configure: failed program was:" >&5
8221   cat conftest.$ac_ext >&5
8222   rm -rf conftest*
8223   eval "ac_cv_lib_$ac_lib_var=no"
8224 fi
8225 rm -f conftest*
8226 LIBS="$ac_save_LIBS"
8227
8228 fi
8229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8230   echo "$ac_t""yes" 1>&6
8231   have_wrappers=yes
8232 else
8233   echo "$ac_t""no" 1>&6
8234 have_wrappers=no
8235 fi
8236
8237         fi
8238
8239         if test $have_wrappers = yes ; then
8240                 cat >> confdefs.h <<\EOF
8241 #define HAVE_TCPD 1
8242 EOF
8243
8244                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8245         else
8246                 echo "configure: warning: could not find -lwrap" 1>&2
8247                 if test $ol_enable_wrappers = yes ; then
8248                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8249                 fi
8250
8251                 echo "configure: warning: disabling wrappers support" 1>&2
8252                 ol_enable_wrappers=no
8253         fi
8254 fi
8255
8256 if test $ol_enable_syslog != no ; then
8257         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8258 echo "configure:8259: checking for openlog" >&5
8259 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8260   echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262   cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265 /* System header to define __stub macros and hopefully few prototypes,
8266     which can conflict with char openlog(); below.  */
8267 #include <assert.h>
8268 /* Override any gcc2 internal prototype to avoid an error.  */
8269 /* We use char because int might match the return type of a gcc2
8270     builtin and then its argument prototype would still apply.  */
8271 char openlog();
8272
8273 int main() {
8274
8275 /* The GNU C library defines this for functions which it implements
8276     to always fail with ENOSYS.  Some functions are actually named
8277     something starting with __ and the normal name is an alias.  */
8278 #if defined (__stub_openlog) || defined (__stub___openlog)
8279 choke me
8280 #else
8281 openlog();
8282 #endif
8283
8284 ; return 0; }
8285 EOF
8286 if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8287   rm -rf conftest*
8288   eval "ac_cv_func_openlog=yes"
8289 else
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   eval "ac_cv_func_openlog=no"
8294 fi
8295 rm -f conftest*
8296 fi
8297
8298 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8299   echo "$ac_t""yes" 1>&6
8300   :
8301 else
8302   echo "$ac_t""no" 1>&6
8303 fi
8304
8305         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8306                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8307         fi
8308         ol_enable_syslog=$ac_cv_func_openlog
8309 fi
8310
8311 if test $ol_enable_dmalloc != no ; then
8312         for ac_hdr in dmalloc.h
8313 do
8314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8316 echo "configure:8317: checking for $ac_hdr" >&5
8317 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8318   echo $ac_n "(cached) $ac_c" 1>&6
8319 else
8320   cat > conftest.$ac_ext <<EOF
8321 #line 8322 "configure"
8322 #include "confdefs.h"
8323 #include <$ac_hdr>
8324 EOF
8325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8326 { (eval echo configure:8327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8328 if test -z "$ac_err"; then
8329   rm -rf conftest*
8330   eval "ac_cv_header_$ac_safe=yes"
8331 else
8332   echo "$ac_err" >&5
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_header_$ac_safe=no"
8337 fi
8338 rm -f conftest*
8339 fi
8340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8341   echo "$ac_t""yes" 1>&6
8342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8343   cat >> confdefs.h <<EOF
8344 #define $ac_tr_hdr 1
8345 EOF
8346  
8347 else
8348   echo "$ac_t""no" 1>&6
8349 fi
8350 done
8351
8352         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8353 echo "configure:8354: checking for dmalloc_shutdown in -ldmalloc" >&5
8354 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8355 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8356   echo $ac_n "(cached) $ac_c" 1>&6
8357 else
8358   ac_save_LIBS="$LIBS"
8359 LIBS="-ldmalloc  $LIBS"
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* Override any gcc2 internal prototype to avoid an error.  */
8364 /* We use char because int might match the return type of a gcc2
8365     builtin and then its argument prototype would still apply.  */
8366 char dmalloc_shutdown();
8367
8368 int main() {
8369 dmalloc_shutdown()
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   eval "ac_cv_lib_$ac_lib_var=yes"
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   eval "ac_cv_lib_$ac_lib_var=no"
8380 fi
8381 rm -f conftest*
8382 LIBS="$ac_save_LIBS"
8383
8384 fi
8385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8386   echo "$ac_t""yes" 1>&6
8387     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8388     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8389   cat >> confdefs.h <<EOF
8390 #define $ac_tr_lib 1
8391 EOF
8392
8393   LIBS="-ldmalloc $LIBS"
8394
8395 else
8396   echo "$ac_t""no" 1>&6
8397 fi
8398
8399 fi
8400
8401 if test $ol_enable_tcl != no ; then
8402         for ac_hdr in tcl.h
8403 do
8404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8406 echo "configure:8407: checking for $ac_hdr" >&5
8407 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8408   echo $ac_n "(cached) $ac_c" 1>&6
8409 else
8410   cat > conftest.$ac_ext <<EOF
8411 #line 8412 "configure"
8412 #include "confdefs.h"
8413 #include <$ac_hdr>
8414 EOF
8415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8416 { (eval echo configure:8417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8418 if test -z "$ac_err"; then
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=yes"
8421 else
8422   echo "$ac_err" >&5
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   eval "ac_cv_header_$ac_safe=no"
8427 fi
8428 rm -f conftest*
8429 fi
8430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8431   echo "$ac_t""yes" 1>&6
8432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8433   cat >> confdefs.h <<EOF
8434 #define $ac_tr_hdr 1
8435 EOF
8436  
8437 else
8438   echo "$ac_t""no" 1>&6
8439 fi
8440 done
8441
8442
8443         if test $ac_cv_header_tcl_h != yes ; then
8444                 have_tcl=no
8445         else
8446                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8447 echo "configure:8448: checking for main in -ltcl" >&5
8448 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8450   echo $ac_n "(cached) $ac_c" 1>&6
8451 else
8452   ac_save_LIBS="$LIBS"
8453 LIBS="-ltcl  $LIBS"
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457
8458 int main() {
8459 main()
8460 ; return 0; }
8461 EOF
8462 if { (eval echo configure:8463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8463   rm -rf conftest*
8464   eval "ac_cv_lib_$ac_lib_var=yes"
8465 else
8466   echo "configure: failed program was:" >&5
8467   cat conftest.$ac_ext >&5
8468   rm -rf conftest*
8469   eval "ac_cv_lib_$ac_lib_var=no"
8470 fi
8471 rm -f conftest*
8472 LIBS="$ac_save_LIBS"
8473
8474 fi
8475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8478 else
8479   echo "$ac_t""no" 1>&6
8480 have_tcl=no
8481 fi
8482
8483
8484                 if test $have_tcl != yes; then
8485                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8486 echo "configure:8487: checking for main in -ltcl7.6" >&5
8487 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8489   echo $ac_n "(cached) $ac_c" 1>&6
8490 else
8491   ac_save_LIBS="$LIBS"
8492 LIBS="-ltcl7.6  $LIBS"
8493 cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496
8497 int main() {
8498 main()
8499 ; return 0; }
8500 EOF
8501 if { (eval echo configure:8502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8502   rm -rf conftest*
8503   eval "ac_cv_lib_$ac_lib_var=yes"
8504 else
8505   echo "configure: failed program was:" >&5
8506   cat conftest.$ac_ext >&5
8507   rm -rf conftest*
8508   eval "ac_cv_lib_$ac_lib_var=no"
8509 fi
8510 rm -f conftest*
8511 LIBS="$ac_save_LIBS"
8512
8513 fi
8514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8515   echo "$ac_t""yes" 1>&6
8516   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8517 else
8518   echo "$ac_t""no" 1>&6
8519 have_tcl=no
8520 fi
8521
8522                 fi
8523
8524                 if test $have_tcl != yes; then
8525                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8526 echo "configure:8527: checking for main in -ltcl8.0" >&5
8527 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8528 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8529   echo $ac_n "(cached) $ac_c" 1>&6
8530 else
8531   ac_save_LIBS="$LIBS"
8532 LIBS="-ltcl8.0  $LIBS"
8533 cat > conftest.$ac_ext <<EOF
8534 #line 8535 "configure"
8535 #include "confdefs.h"
8536
8537 int main() {
8538 main()
8539 ; return 0; }
8540 EOF
8541 if { (eval echo configure:8542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8542   rm -rf conftest*
8543   eval "ac_cv_lib_$ac_lib_var=yes"
8544 else
8545   echo "configure: failed program was:" >&5
8546   cat conftest.$ac_ext >&5
8547   rm -rf conftest*
8548   eval "ac_cv_lib_$ac_lib_var=no"
8549 fi
8550 rm -f conftest*
8551 LIBS="$ac_save_LIBS"
8552
8553 fi
8554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8555   echo "$ac_t""yes" 1>&6
8556   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8557 else
8558   echo "$ac_t""no" 1>&6
8559 have_tcl=no
8560 fi
8561
8562                 fi
8563         fi
8564
8565         if test $have_tcl != yes ; then
8566                 echo "configure: warning: could not find -ltcl" 1>&2
8567                 if test $ol_enable_tcl = yes ; then
8568                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8569                 fi
8570
8571                 ol_enable_tcl=no
8572         fi
8573 fi
8574
8575 # ud needs termcap (should insert check here)
8576 ol_link_termcap=no
8577 for ac_hdr in termcap.h ncurses.h
8578 do
8579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8581 echo "configure:8582: checking for $ac_hdr" >&5
8582 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8583   echo $ac_n "(cached) $ac_c" 1>&6
8584 else
8585   cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 #include <$ac_hdr>
8589 EOF
8590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8591 { (eval echo configure:8592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8593 if test -z "$ac_err"; then
8594   rm -rf conftest*
8595   eval "ac_cv_header_$ac_safe=yes"
8596 else
8597   echo "$ac_err" >&5
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -rf conftest*
8601   eval "ac_cv_header_$ac_safe=no"
8602 fi
8603 rm -f conftest*
8604 fi
8605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8606   echo "$ac_t""yes" 1>&6
8607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8608   cat >> confdefs.h <<EOF
8609 #define $ac_tr_hdr 1
8610 EOF
8611  
8612 else
8613   echo "$ac_t""no" 1>&6
8614 fi
8615 done
8616
8617
8618 if test $ol_link_termcap = no ; then
8619         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8620 echo "configure:8621: checking for tputs in -ltermcap" >&5
8621 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8623   echo $ac_n "(cached) $ac_c" 1>&6
8624 else
8625   ac_save_LIBS="$LIBS"
8626 LIBS="-ltermcap  $LIBS"
8627 cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 /* Override any gcc2 internal prototype to avoid an error.  */
8631 /* We use char because int might match the return type of a gcc2
8632     builtin and then its argument prototype would still apply.  */
8633 char tputs();
8634
8635 int main() {
8636 tputs()
8637 ; return 0; }
8638 EOF
8639 if { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8640   rm -rf conftest*
8641   eval "ac_cv_lib_$ac_lib_var=yes"
8642 else
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=no"
8647 fi
8648 rm -f conftest*
8649 LIBS="$ac_save_LIBS"
8650
8651 fi
8652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8653   echo "$ac_t""yes" 1>&6
8654   have_termcap=yes
8655 else
8656   echo "$ac_t""no" 1>&6
8657 have_termcap=no
8658 fi
8659
8660         if test $have_termcap = yes ; then
8661                 cat >> confdefs.h <<\EOF
8662 #define HAVE_TERMCAP 1
8663 EOF
8664
8665                 ol_link_termcap=yes
8666                 TERMCAP_LIBS=-ltermcap
8667         fi
8668 fi
8669
8670 if test $ol_link_termcap = no ; then
8671         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8672 echo "configure:8673: checking for initscr in -lncurses" >&5
8673 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8675   echo $ac_n "(cached) $ac_c" 1>&6
8676 else
8677   ac_save_LIBS="$LIBS"
8678 LIBS="-lncurses  $LIBS"
8679 cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682 /* Override any gcc2 internal prototype to avoid an error.  */
8683 /* We use char because int might match the return type of a gcc2
8684     builtin and then its argument prototype would still apply.  */
8685 char initscr();
8686
8687 int main() {
8688 initscr()
8689 ; return 0; }
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8692   rm -rf conftest*
8693   eval "ac_cv_lib_$ac_lib_var=yes"
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   eval "ac_cv_lib_$ac_lib_var=no"
8699 fi
8700 rm -f conftest*
8701 LIBS="$ac_save_LIBS"
8702
8703 fi
8704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8705   echo "$ac_t""yes" 1>&6
8706   have_ncurses=yes
8707 else
8708   echo "$ac_t""no" 1>&6
8709 have_ncurses=no
8710 fi
8711
8712         if test $have_ncurses = yes ; then
8713                 cat >> confdefs.h <<\EOF
8714 #define HAVE_NCURSES 1
8715 EOF
8716
8717                 ol_link_termcap=yes
8718                 TERMCAP_LIBS=-lncurses
8719         fi
8720 fi
8721
8722 if test $ol_link_termcap = no ; then
8723         cat >> confdefs.h <<\EOF
8724 #define NO_TERMCAP 1
8725 EOF
8726
8727         TERMCAP_LIBS=
8728 fi
8729
8730 ol_link_readline=no
8731 if test $ol_with_readline != no ; then
8732         for ac_hdr in readline/readline.h readline/history.h
8733 do
8734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8736 echo "configure:8737: checking for $ac_hdr" >&5
8737 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 #include <$ac_hdr>
8744 EOF
8745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8746 { (eval echo configure:8747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8748 if test -z "$ac_err"; then
8749   rm -rf conftest*
8750   eval "ac_cv_header_$ac_safe=yes"
8751 else
8752   echo "$ac_err" >&5
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -rf conftest*
8756   eval "ac_cv_header_$ac_safe=no"
8757 fi
8758 rm -f conftest*
8759 fi
8760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8761   echo "$ac_t""yes" 1>&6
8762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8763   cat >> confdefs.h <<EOF
8764 #define $ac_tr_hdr 1
8765 EOF
8766  
8767 else
8768   echo "$ac_t""no" 1>&6
8769 fi
8770 done
8771
8772
8773         if test $ac_cv_header_readline_readline_h = yes ; then
8774                 save_LIBS="$LIBS"
8775                 LIBS="$TERMCAP_LIBS $LIBS"
8776                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8777 echo "configure:8778: checking for readline in -lreadline" >&5
8778 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   ac_save_LIBS="$LIBS"
8783 LIBS="-lreadline  $LIBS"
8784 cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8787 /* Override any gcc2 internal prototype to avoid an error.  */
8788 /* We use char because int might match the return type of a gcc2
8789     builtin and then its argument prototype would still apply.  */
8790 char readline();
8791
8792 int main() {
8793 readline()
8794 ; return 0; }
8795 EOF
8796 if { (eval echo configure:8797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8797   rm -rf conftest*
8798   eval "ac_cv_lib_$ac_lib_var=yes"
8799 else
8800   echo "configure: failed program was:" >&5
8801   cat conftest.$ac_ext >&5
8802   rm -rf conftest*
8803   eval "ac_cv_lib_$ac_lib_var=no"
8804 fi
8805 rm -f conftest*
8806 LIBS="$ac_save_LIBS"
8807
8808 fi
8809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8810   echo "$ac_t""yes" 1>&6
8811   have_readline=yes
8812 else
8813   echo "$ac_t""no" 1>&6
8814 have_readline=no
8815 fi
8816
8817                 LIBS="$save_LIBS"
8818                         
8819                 if test $have_readline = yes ; then
8820                         ol_with_readline=found
8821                         ol_link_readline=yes
8822
8823                         READLINE_LIBS="-lreadline"
8824                 fi
8825         fi
8826 fi
8827
8828 if test $ol_link_readline = yes ; then
8829         cat >> confdefs.h <<\EOF
8830 #define HAVE_READLINE 1
8831 EOF
8832
8833 fi
8834
8835
8836 # FreeBSD (and others) have crypt(3) in -lcrypt
8837 if test $ol_enable_crypt != no ; then
8838         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8839 echo "configure:8840: checking for crypt" >&5
8840 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8841   echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843   cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 /* System header to define __stub macros and hopefully few prototypes,
8847     which can conflict with char crypt(); below.  */
8848 #include <assert.h>
8849 /* Override any gcc2 internal prototype to avoid an error.  */
8850 /* We use char because int might match the return type of a gcc2
8851     builtin and then its argument prototype would still apply.  */
8852 char crypt();
8853
8854 int main() {
8855
8856 /* The GNU C library defines this for functions which it implements
8857     to always fail with ENOSYS.  Some functions are actually named
8858     something starting with __ and the normal name is an alias.  */
8859 #if defined (__stub_crypt) || defined (__stub___crypt)
8860 choke me
8861 #else
8862 crypt();
8863 #endif
8864
8865 ; return 0; }
8866 EOF
8867 if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8868   rm -rf conftest*
8869   eval "ac_cv_func_crypt=yes"
8870 else
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_func_crypt=no"
8875 fi
8876 rm -f conftest*
8877 fi
8878
8879 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8880   echo "$ac_t""yes" 1>&6
8881   have_crypt=yes
8882 else
8883   echo "$ac_t""no" 1>&6
8884
8885                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8886 echo "configure:8887: checking for crypt in -lcrypt" >&5
8887 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8889   echo $ac_n "(cached) $ac_c" 1>&6
8890 else
8891   ac_save_LIBS="$LIBS"
8892 LIBS="-lcrypt  $LIBS"
8893 cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* Override any gcc2 internal prototype to avoid an error.  */
8897 /* We use char because int might match the return type of a gcc2
8898     builtin and then its argument prototype would still apply.  */
8899 char crypt();
8900
8901 int main() {
8902 crypt()
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=yes"
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=no"
8913 fi
8914 rm -f conftest*
8915 LIBS="$ac_save_LIBS"
8916
8917 fi
8918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8919   echo "$ac_t""yes" 1>&6
8920   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8921                         have_crypt=yes
8922 else
8923   echo "$ac_t""no" 1>&6
8924 have_crypt=no
8925 fi
8926
8927 fi
8928
8929
8930         if test $have_crypt = yes ; then
8931                 cat >> confdefs.h <<\EOF
8932 #define HAVE_CRYPT 1
8933 EOF
8934
8935         else
8936                 echo "configure: warning: could not find crypt" 1>&2
8937                 if test $ol_enable_crypt = yes ; then
8938                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8939                 fi
8940
8941                 echo "configure: warning: disabling crypt support" 1>&2
8942                 ol_enable_crypt=no
8943         fi
8944 fi
8945
8946 # FreeBSD (and others) have setproctitle(3) in -lutil
8947 if test $ol_enable_proctitle != no ; then
8948         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8949 echo "configure:8950: checking for setproctitle" >&5
8950 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8951   echo $ac_n "(cached) $ac_c" 1>&6
8952 else
8953   cat > conftest.$ac_ext <<EOF
8954 #line 8955 "configure"
8955 #include "confdefs.h"
8956 /* System header to define __stub macros and hopefully few prototypes,
8957     which can conflict with char setproctitle(); below.  */
8958 #include <assert.h>
8959 /* Override any gcc2 internal prototype to avoid an error.  */
8960 /* We use char because int might match the return type of a gcc2
8961     builtin and then its argument prototype would still apply.  */
8962 char setproctitle();
8963
8964 int main() {
8965
8966 /* The GNU C library defines this for functions which it implements
8967     to always fail with ENOSYS.  Some functions are actually named
8968     something starting with __ and the normal name is an alias.  */
8969 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8970 choke me
8971 #else
8972 setproctitle();
8973 #endif
8974
8975 ; return 0; }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8978   rm -rf conftest*
8979   eval "ac_cv_func_setproctitle=yes"
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -rf conftest*
8984   eval "ac_cv_func_setproctitle=no"
8985 fi
8986 rm -f conftest*
8987 fi
8988
8989 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8990   echo "$ac_t""yes" 1>&6
8991   have_setproctitle=yes
8992 else
8993   echo "$ac_t""no" 1>&6
8994
8995                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8996 echo "configure:8997: checking for setproctitle in -lutil" >&5
8997 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8999   echo $ac_n "(cached) $ac_c" 1>&6
9000 else
9001   ac_save_LIBS="$LIBS"
9002 LIBS="-lutil  $LIBS"
9003 cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* Override any gcc2 internal prototype to avoid an error.  */
9007 /* We use char because int might match the return type of a gcc2
9008     builtin and then its argument prototype would still apply.  */
9009 char setproctitle();
9010
9011 int main() {
9012 setproctitle()
9013 ; return 0; }
9014 EOF
9015 if { (eval echo configure:9016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9016   rm -rf conftest*
9017   eval "ac_cv_lib_$ac_lib_var=yes"
9018 else
9019   echo "configure: failed program was:" >&5
9020   cat conftest.$ac_ext >&5
9021   rm -rf conftest*
9022   eval "ac_cv_lib_$ac_lib_var=no"
9023 fi
9024 rm -f conftest*
9025 LIBS="$ac_save_LIBS"
9026
9027 fi
9028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9029   echo "$ac_t""yes" 1>&6
9030   have_setproctitle=yes
9031                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9032 else
9033   echo "$ac_t""no" 1>&6
9034 have_setproctitle=no
9035                         LIBOBJS="$LIBOBJS setproctitle.o"
9036 fi
9037
9038 fi
9039
9040
9041         if test $have_setproctitle = yes ; then
9042                 cat >> confdefs.h <<\EOF
9043 #define HAVE_SETPROCTITLE 1
9044 EOF
9045
9046         fi
9047 fi
9048
9049 # test for EBCDIC
9050 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9051 echo "configure:9052: checking for EBCDIC" >&5
9052 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9053   echo $ac_n "(cached) $ac_c" 1>&6
9054 else
9055   
9056         cat > conftest.$ac_ext <<EOF
9057 #line 9058 "configure"
9058 #include "confdefs.h"
9059
9060 #if !('M' == 0xd4)
9061 #include <__ASCII__/generate_error.h>
9062 #endif
9063
9064 EOF
9065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9066 { (eval echo configure:9067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9068 if test -z "$ac_err"; then
9069   rm -rf conftest*
9070   ol_cv_cpp_ebcdic=yes
9071 else
9072   echo "$ac_err" >&5
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   ol_cv_cpp_ebcdic=no
9077 fi
9078 rm -f conftest*
9079 fi
9080
9081 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9082 if test $ol_cv_cpp_ebcdic = yes ; then
9083         cat >> confdefs.h <<\EOF
9084 #define HAVE_EBCDIC 1
9085 EOF
9086
9087 fi
9088
9089 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9090 echo "configure:9091: checking for ANSI C header files" >&5
9091 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9092   echo $ac_n "(cached) $ac_c" 1>&6
9093 else
9094   cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097 #include <stdlib.h>
9098 #include <stdarg.h>
9099 #include <string.h>
9100 #include <float.h>
9101 EOF
9102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9103 { (eval echo configure:9104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9105 if test -z "$ac_err"; then
9106   rm -rf conftest*
9107   ol_cv_header_stdc=yes
9108 else
9109   echo "$ac_err" >&5
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -rf conftest*
9113   ol_cv_header_stdc=no
9114 fi
9115 rm -f conftest*
9116
9117 if test $ol_cv_header_stdc = yes; then
9118   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9119 cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122 #include <string.h>
9123 EOF
9124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9125   egrep "memchr" >/dev/null 2>&1; then
9126   :
9127 else
9128   rm -rf conftest*
9129   ol_cv_header_stdc=no
9130 fi
9131 rm -f conftest*
9132
9133 fi
9134
9135 if test $ol_cv_header_stdc = yes; then
9136   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 #include <stdlib.h>
9141 EOF
9142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9143   egrep "free" >/dev/null 2>&1; then
9144   :
9145 else
9146   rm -rf conftest*
9147   ol_cv_header_stdc=no
9148 fi
9149 rm -f conftest*
9150
9151 fi
9152
9153 if test $ol_cv_header_stdc = yes; then
9154   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9155 if test "$cross_compiling" = yes; then
9156   :
9157 else
9158   cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161 #include <ctype.h>
9162 #ifndef HAVE_EBCDIC
9163 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9164 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9165 #else
9166 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9167                 || ('j' <= (c) && (c) <= 'r') \
9168                 || ('s' <= (c) && (c) <= 'z'))
9169 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9170 #endif
9171 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9172 int main () { int i; for (i = 0; i < 256; i++)
9173 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9174 exit (0); }
9175
9176 EOF
9177 if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9178 then
9179   :
9180 else
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -fr conftest*
9184   ol_cv_header_stdc=no
9185 fi
9186 rm -fr conftest*
9187 fi
9188
9189 fi
9190 fi
9191
9192 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9193 if test $ol_cv_header_stdc = yes; then
9194   cat >> confdefs.h <<\EOF
9195 #define STDC_HEADERS 1
9196 EOF
9197
9198 fi
9199 ac_cv_header_stdc=disable
9200
9201
9202 if test $ol_cv_header_stdc != yes; then
9203         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9204 fi
9205
9206 ac_header_dirent=no
9207 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9208 do
9209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9210 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9211 echo "configure:9212: checking for $ac_hdr that defines DIR" >&5
9212 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9213   echo $ac_n "(cached) $ac_c" 1>&6
9214 else
9215   cat > conftest.$ac_ext <<EOF
9216 #line 9217 "configure"
9217 #include "confdefs.h"
9218 #include <sys/types.h>
9219 #include <$ac_hdr>
9220 int main() {
9221 DIR *dirp = 0;
9222 ; return 0; }
9223 EOF
9224 if { (eval echo configure:9225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9225   rm -rf conftest*
9226   eval "ac_cv_header_dirent_$ac_safe=yes"
9227 else
9228   echo "configure: failed program was:" >&5
9229   cat conftest.$ac_ext >&5
9230   rm -rf conftest*
9231   eval "ac_cv_header_dirent_$ac_safe=no"
9232 fi
9233 rm -f conftest*
9234 fi
9235 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9236   echo "$ac_t""yes" 1>&6
9237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9238   cat >> confdefs.h <<EOF
9239 #define $ac_tr_hdr 1
9240 EOF
9241  ac_header_dirent=$ac_hdr; break
9242 else
9243   echo "$ac_t""no" 1>&6
9244 fi
9245 done
9246 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9247 if test $ac_header_dirent = dirent.h; then
9248 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9249 echo "configure:9250: checking for opendir in -ldir" >&5
9250 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9251 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9252   echo $ac_n "(cached) $ac_c" 1>&6
9253 else
9254   ac_save_LIBS="$LIBS"
9255 LIBS="-ldir  $LIBS"
9256 cat > conftest.$ac_ext <<EOF
9257 #line 9258 "configure"
9258 #include "confdefs.h"
9259 /* Override any gcc2 internal prototype to avoid an error.  */
9260 /* We use char because int might match the return type of a gcc2
9261     builtin and then its argument prototype would still apply.  */
9262 char opendir();
9263
9264 int main() {
9265 opendir()
9266 ; return 0; }
9267 EOF
9268 if { (eval echo configure:9269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9269   rm -rf conftest*
9270   eval "ac_cv_lib_$ac_lib_var=yes"
9271 else
9272   echo "configure: failed program was:" >&5
9273   cat conftest.$ac_ext >&5
9274   rm -rf conftest*
9275   eval "ac_cv_lib_$ac_lib_var=no"
9276 fi
9277 rm -f conftest*
9278 LIBS="$ac_save_LIBS"
9279
9280 fi
9281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9282   echo "$ac_t""yes" 1>&6
9283   LIBS="$LIBS -ldir"
9284 else
9285   echo "$ac_t""no" 1>&6
9286 fi
9287
9288 else
9289 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9290 echo "configure:9291: checking for opendir in -lx" >&5
9291 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9292 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9293   echo $ac_n "(cached) $ac_c" 1>&6
9294 else
9295   ac_save_LIBS="$LIBS"
9296 LIBS="-lx  $LIBS"
9297 cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 /* Override any gcc2 internal prototype to avoid an error.  */
9301 /* We use char because int might match the return type of a gcc2
9302     builtin and then its argument prototype would still apply.  */
9303 char opendir();
9304
9305 int main() {
9306 opendir()
9307 ; return 0; }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9310   rm -rf conftest*
9311   eval "ac_cv_lib_$ac_lib_var=yes"
9312 else
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -rf conftest*
9316   eval "ac_cv_lib_$ac_lib_var=no"
9317 fi
9318 rm -f conftest*
9319 LIBS="$ac_save_LIBS"
9320
9321 fi
9322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9323   echo "$ac_t""yes" 1>&6
9324   LIBS="$LIBS -lx"
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328
9329 fi
9330
9331 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9332 echo "configure:9333: checking for sys/wait.h that is POSIX.1 compatible" >&5
9333 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 #include <sys/types.h>
9340 #include <sys/wait.h>
9341 #ifndef WEXITSTATUS
9342 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9343 #endif
9344 #ifndef WIFEXITED
9345 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9346 #endif
9347 int main() {
9348 int s;
9349 wait (&s);
9350 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9351 ; return 0; }
9352 EOF
9353 if { (eval echo configure:9354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9354   rm -rf conftest*
9355   ac_cv_header_sys_wait_h=yes
9356 else
9357   echo "configure: failed program was:" >&5
9358   cat conftest.$ac_ext >&5
9359   rm -rf conftest*
9360   ac_cv_header_sys_wait_h=no
9361 fi
9362 rm -f conftest*
9363 fi
9364
9365 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9366 if test $ac_cv_header_sys_wait_h = yes; then
9367   cat >> confdefs.h <<\EOF
9368 #define HAVE_SYS_WAIT_H 1
9369 EOF
9370
9371 fi
9372
9373 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9374 echo "configure:9375: checking POSIX termios" >&5
9375 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9376   echo $ac_n "(cached) $ac_c" 1>&6
9377 else
9378   cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #include <sys/types.h>
9382 #include <unistd.h>
9383 #include <termios.h>
9384 int main() {
9385 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9386    tcgetattr(0, 0);
9387 ; return 0; }
9388 EOF
9389 if { (eval echo configure:9390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9390   rm -rf conftest*
9391   am_cv_sys_posix_termios=yes
9392 else
9393   echo "configure: failed program was:" >&5
9394   cat conftest.$ac_ext >&5
9395   rm -rf conftest*
9396   am_cv_sys_posix_termios=no
9397 fi
9398 rm -f conftest*
9399 fi
9400
9401 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9402
9403
9404  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9405 echo "configure:9406: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9406 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9410
9411   gwinsz_in_termios_h=no
9412   if test $am_cv_sys_posix_termios = yes; then
9413     cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416 #include <sys/types.h>
9417 #     include <termios.h>
9418 #     ifdef TIOCGWINSZ
9419         yes
9420 #     endif
9421     
9422 EOF
9423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9424   egrep "yes" >/dev/null 2>&1; then
9425   rm -rf conftest*
9426   gwinsz_in_termios_h=yes
9427 fi
9428 rm -f conftest*
9429
9430   fi
9431
9432   if test $gwinsz_in_termios_h = no; then
9433     cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 #include <sys/types.h>
9437 #     include <sys/ioctl.h>
9438 #     ifdef TIOCGWINSZ
9439         yes
9440 #     endif
9441     
9442 EOF
9443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9444   egrep "yes" >/dev/null 2>&1; then
9445   rm -rf conftest*
9446   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9447 fi
9448 rm -f conftest*
9449
9450   fi
9451   
9452 fi
9453
9454 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9455   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9456     cat >> confdefs.h <<\EOF
9457 #define GWINSZ_IN_SYS_IOCTL 1
9458 EOF
9459
9460   fi
9461
9462 if test $am_cv_sys_posix_termios = yes ; then
9463         cat >> confdefs.h <<\EOF
9464 #define HAVE_POSIX_TERMIOS 1
9465 EOF
9466
9467 fi
9468
9469 for ac_hdr in \
9470         arpa/inet.h             \
9471         arpa/nameser.h  \
9472         assert.h                \
9473         crypt.h                 \
9474         errno.h                 \
9475         fcntl.h                 \
9476         filio.h                 \
9477         getopt.h                \
9478         grp.h                   \
9479         libutil.h               \
9480         limits.h                \
9481         locale.h                \
9482         malloc.h                \
9483         memory.h                \
9484         regex.h                 \
9485         psap.h                  \
9486         pwd.h                   \
9487         resolv.h                \
9488         sgtty.h                 \
9489         stdarg.h                \
9490         stddef.h                \
9491         string.h                \
9492         strings.h               \
9493         sysexits.h              \
9494         sys/file.h              \
9495         sys/filio.h             \
9496         sys/errno.h             \
9497         sys/ioctl.h             \
9498         sys/param.h             \
9499         sys/resource.h  \
9500         sys/socket.h    \
9501         sys/syslog.h    \
9502         sys/time.h              \
9503         sys/types.h             \
9504         syslog.h                \
9505         termios.h               \
9506         unistd.h                \
9507
9508 do
9509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9511 echo "configure:9512: checking for $ac_hdr" >&5
9512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9513   echo $ac_n "(cached) $ac_c" 1>&6
9514 else
9515   cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 #include <$ac_hdr>
9519 EOF
9520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9521 { (eval echo configure:9522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9523 if test -z "$ac_err"; then
9524   rm -rf conftest*
9525   eval "ac_cv_header_$ac_safe=yes"
9526 else
9527   echo "$ac_err" >&5
9528   echo "configure: failed program was:" >&5
9529   cat conftest.$ac_ext >&5
9530   rm -rf conftest*
9531   eval "ac_cv_header_$ac_safe=no"
9532 fi
9533 rm -f conftest*
9534 fi
9535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9536   echo "$ac_t""yes" 1>&6
9537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9538   cat >> confdefs.h <<EOF
9539 #define $ac_tr_hdr 1
9540 EOF
9541  
9542 else
9543   echo "$ac_t""no" 1>&6
9544 fi
9545 done
9546
9547
9548 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9549 echo "configure:9550: checking for uid_t in sys/types.h" >&5
9550 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9551   echo $ac_n "(cached) $ac_c" 1>&6
9552 else
9553   cat > conftest.$ac_ext <<EOF
9554 #line 9555 "configure"
9555 #include "confdefs.h"
9556 #include <sys/types.h>
9557 EOF
9558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9559   egrep "uid_t" >/dev/null 2>&1; then
9560   rm -rf conftest*
9561   ac_cv_type_uid_t=yes
9562 else
9563   rm -rf conftest*
9564   ac_cv_type_uid_t=no
9565 fi
9566 rm -f conftest*
9567
9568 fi
9569
9570 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9571 if test $ac_cv_type_uid_t = no; then
9572   cat >> confdefs.h <<\EOF
9573 #define uid_t int
9574 EOF
9575
9576   cat >> confdefs.h <<\EOF
9577 #define gid_t int
9578 EOF
9579
9580 fi
9581
9582 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9583 echo "configure:9584: checking type of array argument to getgroups" >&5
9584 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9585   echo $ac_n "(cached) $ac_c" 1>&6
9586 else
9587   if test "$cross_compiling" = yes; then
9588   ac_cv_type_getgroups=cross
9589 else
9590   cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593
9594 /* Thanks to Mike Rendell for this test.  */
9595 #include <sys/types.h>
9596 #define NGID 256
9597 #undef MAX
9598 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9599 main()
9600 {
9601   gid_t gidset[NGID];
9602   int i, n;
9603   union { gid_t gval; long lval; }  val;
9604
9605   val.lval = -1;
9606   for (i = 0; i < NGID; i++)
9607     gidset[i] = val.gval;
9608   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9609                  gidset);
9610   /* Exit non-zero if getgroups seems to require an array of ints.  This
9611      happens when gid_t is short but getgroups modifies an array of ints.  */
9612   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9613 }
9614
9615 EOF
9616 if { (eval echo configure:9617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9617 then
9618     ac_cv_type_getgroups=gid_t
9619 else
9620   echo "configure: failed program was:" >&5
9621   cat conftest.$ac_ext >&5
9622   rm -fr conftest*
9623   ac_cv_type_getgroups=int
9624 fi
9625 rm -fr conftest*
9626 fi
9627
9628 if test $ac_cv_type_getgroups = cross; then
9629         cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 #include <unistd.h>
9633 EOF
9634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9635   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9636   rm -rf conftest*
9637   ac_cv_type_getgroups=gid_t
9638 else
9639   rm -rf conftest*
9640   ac_cv_type_getgroups=int
9641 fi
9642 rm -f conftest*
9643
9644 fi
9645 fi
9646
9647 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9648 cat >> confdefs.h <<EOF
9649 #define GETGROUPS_T $ac_cv_type_getgroups
9650 EOF
9651
9652  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9653 echo "configure:9654: checking for ANSI C header files" >&5
9654 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9655   echo $ac_n "(cached) $ac_c" 1>&6
9656 else
9657   cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660 #include <stdlib.h>
9661 #include <stdarg.h>
9662 #include <string.h>
9663 #include <float.h>
9664 EOF
9665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9666 { (eval echo configure:9667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9668 if test -z "$ac_err"; then
9669   rm -rf conftest*
9670   ac_cv_header_stdc=yes
9671 else
9672   echo "$ac_err" >&5
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675   rm -rf conftest*
9676   ac_cv_header_stdc=no
9677 fi
9678 rm -f conftest*
9679
9680 if test $ac_cv_header_stdc = yes; then
9681   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9682 cat > conftest.$ac_ext <<EOF
9683 #line 9684 "configure"
9684 #include "confdefs.h"
9685 #include <string.h>
9686 EOF
9687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9688   egrep "memchr" >/dev/null 2>&1; then
9689   :
9690 else
9691   rm -rf conftest*
9692   ac_cv_header_stdc=no
9693 fi
9694 rm -f conftest*
9695
9696 fi
9697
9698 if test $ac_cv_header_stdc = yes; then
9699   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9700 cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 #include <stdlib.h>
9704 EOF
9705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9706   egrep "free" >/dev/null 2>&1; then
9707   :
9708 else
9709   rm -rf conftest*
9710   ac_cv_header_stdc=no
9711 fi
9712 rm -f conftest*
9713
9714 fi
9715
9716 if test $ac_cv_header_stdc = yes; then
9717   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9718 if test "$cross_compiling" = yes; then
9719   :
9720 else
9721   cat > conftest.$ac_ext <<EOF
9722 #line 9723 "configure"
9723 #include "confdefs.h"
9724 #include <ctype.h>
9725 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9726 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9727 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9728 int main () { int i; for (i = 0; i < 256; i++)
9729 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9730 exit (0); }
9731
9732 EOF
9733 if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9734 then
9735   :
9736 else
9737   echo "configure: failed program was:" >&5
9738   cat conftest.$ac_ext >&5
9739   rm -fr conftest*
9740   ac_cv_header_stdc=no
9741 fi
9742 rm -fr conftest*
9743 fi
9744
9745 fi
9746 fi
9747
9748 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9749 if test $ac_cv_header_stdc = yes; then
9750   cat >> confdefs.h <<\EOF
9751 #define STDC_HEADERS 1
9752 EOF
9753
9754 fi
9755
9756 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9757 echo "configure:9758: checking for mode_t" >&5
9758 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9759   echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761   cat > conftest.$ac_ext <<EOF
9762 #line 9763 "configure"
9763 #include "confdefs.h"
9764 #include <sys/types.h>
9765 #if STDC_HEADERS
9766 #include <stdlib.h>
9767 #include <stddef.h>
9768 #endif
9769 EOF
9770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9771   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9772   rm -rf conftest*
9773   ac_cv_type_mode_t=yes
9774 else
9775   rm -rf conftest*
9776   ac_cv_type_mode_t=no
9777 fi
9778 rm -f conftest*
9779
9780 fi
9781 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9782 if test $ac_cv_type_mode_t = no; then
9783   cat >> confdefs.h <<\EOF
9784 #define mode_t int
9785 EOF
9786
9787 fi
9788
9789 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9790 echo "configure:9791: checking for off_t" >&5
9791 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9792   echo $ac_n "(cached) $ac_c" 1>&6
9793 else
9794   cat > conftest.$ac_ext <<EOF
9795 #line 9796 "configure"
9796 #include "confdefs.h"
9797 #include <sys/types.h>
9798 #if STDC_HEADERS
9799 #include <stdlib.h>
9800 #include <stddef.h>
9801 #endif
9802 EOF
9803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9804   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9805   rm -rf conftest*
9806   ac_cv_type_off_t=yes
9807 else
9808   rm -rf conftest*
9809   ac_cv_type_off_t=no
9810 fi
9811 rm -f conftest*
9812
9813 fi
9814 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9815 if test $ac_cv_type_off_t = no; then
9816   cat >> confdefs.h <<\EOF
9817 #define off_t long
9818 EOF
9819
9820 fi
9821
9822 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9823 echo "configure:9824: checking for pid_t" >&5
9824 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9825   echo $ac_n "(cached) $ac_c" 1>&6
9826 else
9827   cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830 #include <sys/types.h>
9831 #if STDC_HEADERS
9832 #include <stdlib.h>
9833 #include <stddef.h>
9834 #endif
9835 EOF
9836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9837   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9838   rm -rf conftest*
9839   ac_cv_type_pid_t=yes
9840 else
9841   rm -rf conftest*
9842   ac_cv_type_pid_t=no
9843 fi
9844 rm -f conftest*
9845
9846 fi
9847 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9848 if test $ac_cv_type_pid_t = no; then
9849   cat >> confdefs.h <<\EOF
9850 #define pid_t int
9851 EOF
9852
9853 fi
9854
9855 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9856 echo "configure:9857: checking for ptrdiff_t" >&5
9857 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9858   echo $ac_n "(cached) $ac_c" 1>&6
9859 else
9860   cat > conftest.$ac_ext <<EOF
9861 #line 9862 "configure"
9862 #include "confdefs.h"
9863 #include <stddef.h>
9864 int main() {
9865 ptrdiff_t p
9866 ; return 0; }
9867 EOF
9868 if { (eval echo configure:9869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9869   rm -rf conftest*
9870   am_cv_type_ptrdiff_t=yes
9871 else
9872   echo "configure: failed program was:" >&5
9873   cat conftest.$ac_ext >&5
9874   rm -rf conftest*
9875   am_cv_type_ptrdiff_t=no
9876 fi
9877 rm -f conftest*
9878 fi
9879
9880 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9881    if test $am_cv_type_ptrdiff_t = yes; then
9882      cat >> confdefs.h <<\EOF
9883 #define HAVE_PTRDIFF_T 1
9884 EOF
9885
9886    fi
9887
9888 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9889 echo "configure:9890: checking return type of signal handlers" >&5
9890 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9891   echo $ac_n "(cached) $ac_c" 1>&6
9892 else
9893   cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896 #include <sys/types.h>
9897 #include <signal.h>
9898 #ifdef signal
9899 #undef signal
9900 #endif
9901 #ifdef __cplusplus
9902 extern "C" void (*signal (int, void (*)(int)))(int);
9903 #else
9904 void (*signal ()) ();
9905 #endif
9906
9907 int main() {
9908 int i;
9909 ; return 0; }
9910 EOF
9911 if { (eval echo configure:9912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9912   rm -rf conftest*
9913   ac_cv_type_signal=void
9914 else
9915   echo "configure: failed program was:" >&5
9916   cat conftest.$ac_ext >&5
9917   rm -rf conftest*
9918   ac_cv_type_signal=int
9919 fi
9920 rm -f conftest*
9921 fi
9922
9923 echo "$ac_t""$ac_cv_type_signal" 1>&6
9924 cat >> confdefs.h <<EOF
9925 #define RETSIGTYPE $ac_cv_type_signal
9926 EOF
9927
9928
9929 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9930 echo "configure:9931: checking for sig_atomic_t" >&5
9931 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9932   echo $ac_n "(cached) $ac_c" 1>&6
9933 else
9934   cat > conftest.$ac_ext <<EOF
9935 #line 9936 "configure"
9936 #include "confdefs.h"
9937 #include <signal.h>
9938 int main() {
9939 sig_atomic_t atomic;
9940 ; return 0; }
9941 EOF
9942 if { (eval echo configure:9943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9943   rm -rf conftest*
9944   ol_cv_type_sig_atomic_t=yes
9945 else
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   ol_cv_type_sig_atomic_t=no
9950 fi
9951 rm -f conftest*
9952 fi
9953
9954 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9955   if test $ol_cv_type_sig_atomic_t = no; then
9956     cat >> confdefs.h <<\EOF
9957 #define sig_atomic_t int
9958 EOF
9959
9960   fi
9961  
9962 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9963 echo "configure:9964: checking for size_t" >&5
9964 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9965   echo $ac_n "(cached) $ac_c" 1>&6
9966 else
9967   cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 #include <sys/types.h>
9971 #if STDC_HEADERS
9972 #include <stdlib.h>
9973 #include <stddef.h>
9974 #endif
9975 EOF
9976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9977   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9978   rm -rf conftest*
9979   ac_cv_type_size_t=yes
9980 else
9981   rm -rf conftest*
9982   ac_cv_type_size_t=no
9983 fi
9984 rm -f conftest*
9985
9986 fi
9987 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9988 if test $ac_cv_type_size_t = no; then
9989   cat >> confdefs.h <<\EOF
9990 #define size_t unsigned
9991 EOF
9992
9993 fi
9994
9995 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9996 echo "configure:9997: checking for st_blksize in struct stat" >&5
9997 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9998   echo $ac_n "(cached) $ac_c" 1>&6
9999 else
10000   cat > conftest.$ac_ext <<EOF
10001 #line 10002 "configure"
10002 #include "confdefs.h"
10003 #include <sys/types.h>
10004 #include <sys/stat.h>
10005 int main() {
10006 struct stat s; s.st_blksize;
10007 ; return 0; }
10008 EOF
10009 if { (eval echo configure:10010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10010   rm -rf conftest*
10011   ac_cv_struct_st_blksize=yes
10012 else
10013   echo "configure: failed program was:" >&5
10014   cat conftest.$ac_ext >&5
10015   rm -rf conftest*
10016   ac_cv_struct_st_blksize=no
10017 fi
10018 rm -f conftest*
10019 fi
10020
10021 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10022 if test $ac_cv_struct_st_blksize = yes; then
10023   cat >> confdefs.h <<\EOF
10024 #define HAVE_ST_BLKSIZE 1
10025 EOF
10026
10027 fi
10028
10029 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10030 echo "configure:10031: checking whether time.h and sys/time.h may both be included" >&5
10031 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10032   echo $ac_n "(cached) $ac_c" 1>&6
10033 else
10034   cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037 #include <sys/types.h>
10038 #include <sys/time.h>
10039 #include <time.h>
10040 int main() {
10041 struct tm *tp;
10042 ; return 0; }
10043 EOF
10044 if { (eval echo configure:10045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10045   rm -rf conftest*
10046   ac_cv_header_time=yes
10047 else
10048   echo "configure: failed program was:" >&5
10049   cat conftest.$ac_ext >&5
10050   rm -rf conftest*
10051   ac_cv_header_time=no
10052 fi
10053 rm -f conftest*
10054 fi
10055
10056 echo "$ac_t""$ac_cv_header_time" 1>&6
10057 if test $ac_cv_header_time = yes; then
10058   cat >> confdefs.h <<\EOF
10059 #define TIME_WITH_SYS_TIME 1
10060 EOF
10061
10062 fi
10063
10064 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10065 echo "configure:10066: checking whether struct tm is in sys/time.h or time.h" >&5
10066 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10067   echo $ac_n "(cached) $ac_c" 1>&6
10068 else
10069   cat > conftest.$ac_ext <<EOF
10070 #line 10071 "configure"
10071 #include "confdefs.h"
10072 #include <sys/types.h>
10073 #include <time.h>
10074 int main() {
10075 struct tm *tp; tp->tm_sec;
10076 ; return 0; }
10077 EOF
10078 if { (eval echo configure:10079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10079   rm -rf conftest*
10080   ac_cv_struct_tm=time.h
10081 else
10082   echo "configure: failed program was:" >&5
10083   cat conftest.$ac_ext >&5
10084   rm -rf conftest*
10085   ac_cv_struct_tm=sys/time.h
10086 fi
10087 rm -f conftest*
10088 fi
10089
10090 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10091 if test $ac_cv_struct_tm = sys/time.h; then
10092   cat >> confdefs.h <<\EOF
10093 #define TM_IN_SYS_TIME 1
10094 EOF
10095
10096 fi
10097
10098 # test for pw_gecos in struct passwd
10099 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10100 echo "configure:10101: checking struct passwd for pw_gecos" >&5
10101 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10102   echo $ac_n "(cached) $ac_c" 1>&6
10103 else
10104   
10105         cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108 #include <pwd.h>
10109 int main() {
10110
10111         struct passwd pwd;
10112         pwd.pw_gecos = pwd.pw_name;
10113
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10117   rm -rf conftest*
10118   ol_cv_struct_passwd_pw_gecos=yes
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   ol_cv_struct_passwd_pw_gecos=no
10124 fi
10125 rm -f conftest*
10126 fi
10127
10128 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10129 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10130         cat >> confdefs.h <<\EOF
10131 #define HAVE_PW_GECOS 1
10132 EOF
10133
10134 fi
10135
10136
10137
10138 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10139 echo "configure:10140: checking if toupper() requires islower()" >&5
10140 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10141   echo $ac_n "(cached) $ac_c" 1>&6
10142 else
10143   
10144         if test "$cross_compiling" = yes; then
10145   ol_cv_c_upper_lower=safe
10146 else
10147   cat > conftest.$ac_ext <<EOF
10148 #line 10149 "configure"
10149 #include "confdefs.h"
10150
10151 #include <ctype.h>
10152 main()
10153 {
10154         if ('C' == toupper('C'))
10155                 exit(0);
10156         else
10157                 exit(1);
10158 }
10159 EOF
10160 if { (eval echo configure:10161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10161 then
10162   ol_cv_c_upper_lower=no
10163 else
10164   echo "configure: failed program was:" >&5
10165   cat conftest.$ac_ext >&5
10166   rm -fr conftest*
10167   ol_cv_c_upper_lower=yes
10168 fi
10169 rm -fr conftest*
10170 fi
10171
10172 fi
10173
10174 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10175 if test $ol_cv_c_upper_lower != no ; then
10176         cat >> confdefs.h <<\EOF
10177 #define C_UPPER_LOWER 1
10178 EOF
10179
10180 fi
10181
10182 echo $ac_n "checking for working const""... $ac_c" 1>&6
10183 echo "configure:10184: checking for working const" >&5
10184 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10185   echo $ac_n "(cached) $ac_c" 1>&6
10186 else
10187   cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190
10191 int main() {
10192
10193 /* Ultrix mips cc rejects this.  */
10194 typedef int charset[2]; const charset x;
10195 /* SunOS 4.1.1 cc rejects this.  */
10196 char const *const *ccp;
10197 char **p;
10198 /* NEC SVR4.0.2 mips cc rejects this.  */
10199 struct point {int x, y;};
10200 static struct point const zero = {0,0};
10201 /* AIX XL C 1.02.0.0 rejects this.
10202    It does not let you subtract one const X* pointer from another in an arm
10203    of an if-expression whose if-part is not a constant expression */
10204 const char *g = "string";
10205 ccp = &g + (g ? g-g : 0);
10206 /* HPUX 7.0 cc rejects these. */
10207 ++ccp;
10208 p = (char**) ccp;
10209 ccp = (char const *const *) p;
10210 { /* SCO 3.2v4 cc rejects this.  */
10211   char *t;
10212   char const *s = 0 ? (char *) 0 : (char const *) 0;
10213
10214   *t++ = 0;
10215 }
10216 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10217   int x[] = {25, 17};
10218   const int *foo = &x[0];
10219   ++foo;
10220 }
10221 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10222   typedef const int *iptr;
10223   iptr p = 0;
10224   ++p;
10225 }
10226 { /* AIX XL C 1.02.0.0 rejects this saying
10227      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10228   struct s { int j; const int *ap[3]; };
10229   struct s *b; b->j = 5;
10230 }
10231 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10232   const int foo = 10;
10233 }
10234
10235 ; return 0; }
10236 EOF
10237 if { (eval echo configure:10238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10238   rm -rf conftest*
10239   ac_cv_c_const=yes
10240 else
10241   echo "configure: failed program was:" >&5
10242   cat conftest.$ac_ext >&5
10243   rm -rf conftest*
10244   ac_cv_c_const=no
10245 fi
10246 rm -f conftest*
10247 fi
10248
10249 echo "$ac_t""$ac_cv_c_const" 1>&6
10250 if test $ac_cv_c_const = no; then
10251   cat >> confdefs.h <<\EOF
10252 #define const 
10253 EOF
10254
10255 fi
10256
10257 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10258 echo "configure:10259: checking if compiler understands volatile" >&5
10259 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10260   echo $ac_n "(cached) $ac_c" 1>&6
10261 else
10262   cat > conftest.$ac_ext <<EOF
10263 #line 10264 "configure"
10264 #include "confdefs.h"
10265 int x, y, z;
10266 int main() {
10267 volatile int a; int * volatile b = x ? &y : &z;
10268       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10269       *b = 0;
10270 ; return 0; }
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10273   rm -rf conftest*
10274   ol_cv_c_volatile=yes
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   ol_cv_c_volatile=no
10280 fi
10281 rm -f conftest*
10282 fi
10283
10284 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10285   if test $ol_cv_c_volatile = yes; then
10286     : 
10287   else
10288     cat >> confdefs.h <<\EOF
10289 #define volatile 
10290 EOF
10291
10292   fi
10293  
10294
10295 if test $cross_compiling = yes ; then
10296         cat >> confdefs.h <<\EOF
10297 #define CROSS_COMPILING 1
10298 EOF
10299
10300 else
10301         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10302 echo "configure:10303: checking whether byte ordering is bigendian" >&5
10303 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10304   echo $ac_n "(cached) $ac_c" 1>&6
10305 else
10306   ac_cv_c_bigendian=unknown
10307 # See if sys/param.h defines the BYTE_ORDER macro.
10308 cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311 #include <sys/types.h>
10312 #include <sys/param.h>
10313 int main() {
10314
10315 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10316  bogus endian macros
10317 #endif
10318 ; return 0; }
10319 EOF
10320 if { (eval echo configure:10321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10321   rm -rf conftest*
10322   # It does; now see whether it defined to BIG_ENDIAN or not.
10323 cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326 #include <sys/types.h>
10327 #include <sys/param.h>
10328 int main() {
10329
10330 #if BYTE_ORDER != BIG_ENDIAN
10331  not big endian
10332 #endif
10333 ; return 0; }
10334 EOF
10335 if { (eval echo configure:10336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10336   rm -rf conftest*
10337   ac_cv_c_bigendian=yes
10338 else
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -rf conftest*
10342   ac_cv_c_bigendian=no
10343 fi
10344 rm -f conftest*
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348 fi
10349 rm -f conftest*
10350 if test $ac_cv_c_bigendian = unknown; then
10351 if test "$cross_compiling" = yes; then
10352     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10353 else
10354   cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 main () {
10358   /* Are we little or big endian?  From Harbison&Steele.  */
10359   union
10360   {
10361     long l;
10362     char c[sizeof (long)];
10363   } u;
10364   u.l = 1;
10365   exit (u.c[sizeof (long) - 1] == 1);
10366 }
10367 EOF
10368 if { (eval echo configure:10369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10369 then
10370   ac_cv_c_bigendian=no
10371 else
10372   echo "configure: failed program was:" >&5
10373   cat conftest.$ac_ext >&5
10374   rm -fr conftest*
10375   ac_cv_c_bigendian=yes
10376 fi
10377 rm -fr conftest*
10378 fi
10379
10380 fi
10381 fi
10382
10383 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10384 if test $ac_cv_c_bigendian = yes; then
10385   cat >> confdefs.h <<\EOF
10386 #define WORDS_BIGENDIAN 1
10387 EOF
10388
10389 fi
10390
10391         echo $ac_n "checking size of short""... $ac_c" 1>&6
10392 echo "configure:10393: checking size of short" >&5
10393 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10394   echo $ac_n "(cached) $ac_c" 1>&6
10395 else
10396   if test "$cross_compiling" = yes; then
10397     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10398 else
10399   cat > conftest.$ac_ext <<EOF
10400 #line 10401 "configure"
10401 #include "confdefs.h"
10402 #include <stdio.h>
10403 main()
10404 {
10405   FILE *f=fopen("conftestval", "w");
10406   if (!f) exit(1);
10407   fprintf(f, "%d\n", sizeof(short));
10408   exit(0);
10409 }
10410 EOF
10411 if { (eval echo configure:10412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10412 then
10413   ac_cv_sizeof_short=`cat conftestval`
10414 else
10415   echo "configure: failed program was:" >&5
10416   cat conftest.$ac_ext >&5
10417   rm -fr conftest*
10418   ac_cv_sizeof_short=0
10419 fi
10420 rm -fr conftest*
10421 fi
10422
10423 fi
10424 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10425 cat >> confdefs.h <<EOF
10426 #define SIZEOF_SHORT $ac_cv_sizeof_short
10427 EOF
10428
10429  
10430         echo $ac_n "checking size of int""... $ac_c" 1>&6
10431 echo "configure:10432: checking size of int" >&5
10432 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10433   echo $ac_n "(cached) $ac_c" 1>&6
10434 else
10435   if test "$cross_compiling" = yes; then
10436     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10437 else
10438   cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441 #include <stdio.h>
10442 main()
10443 {
10444   FILE *f=fopen("conftestval", "w");
10445   if (!f) exit(1);
10446   fprintf(f, "%d\n", sizeof(int));
10447   exit(0);
10448 }
10449 EOF
10450 if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10451 then
10452   ac_cv_sizeof_int=`cat conftestval`
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -fr conftest*
10457   ac_cv_sizeof_int=0
10458 fi
10459 rm -fr conftest*
10460 fi
10461
10462 fi
10463 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10464 cat >> confdefs.h <<EOF
10465 #define SIZEOF_INT $ac_cv_sizeof_int
10466 EOF
10467
10468  
10469         echo $ac_n "checking size of long""... $ac_c" 1>&6
10470 echo "configure:10471: checking size of long" >&5
10471 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10472   echo $ac_n "(cached) $ac_c" 1>&6
10473 else
10474   if test "$cross_compiling" = yes; then
10475     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10476 else
10477   cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480 #include <stdio.h>
10481 main()
10482 {
10483   FILE *f=fopen("conftestval", "w");
10484   if (!f) exit(1);
10485   fprintf(f, "%d\n", sizeof(long));
10486   exit(0);
10487 }
10488 EOF
10489 if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10490 then
10491   ac_cv_sizeof_long=`cat conftestval`
10492 else
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -fr conftest*
10496   ac_cv_sizeof_long=0
10497 fi
10498 rm -fr conftest*
10499 fi
10500
10501 fi
10502 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10503 cat >> confdefs.h <<EOF
10504 #define SIZEOF_LONG $ac_cv_sizeof_long
10505 EOF
10506
10507
10508 fi
10509
10510 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10511 echo "configure:10512: checking for 8-bit clean memcmp" >&5
10512 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10513   echo $ac_n "(cached) $ac_c" 1>&6
10514 else
10515   if test "$cross_compiling" = yes; then
10516   ac_cv_func_memcmp_clean=no
10517 else
10518   cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521
10522 main()
10523 {
10524   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10525   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10526 }
10527
10528 EOF
10529 if { (eval echo configure:10530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10530 then
10531   ac_cv_func_memcmp_clean=yes
10532 else
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -fr conftest*
10536   ac_cv_func_memcmp_clean=no
10537 fi
10538 rm -fr conftest*
10539 fi
10540
10541 fi
10542
10543 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10544 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10545
10546 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10547 echo "configure:10548: checking for strftime" >&5
10548 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10549   echo $ac_n "(cached) $ac_c" 1>&6
10550 else
10551   cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554 /* System header to define __stub macros and hopefully few prototypes,
10555     which can conflict with char strftime(); below.  */
10556 #include <assert.h>
10557 /* Override any gcc2 internal prototype to avoid an error.  */
10558 /* We use char because int might match the return type of a gcc2
10559     builtin and then its argument prototype would still apply.  */
10560 char strftime();
10561
10562 int main() {
10563
10564 /* The GNU C library defines this for functions which it implements
10565     to always fail with ENOSYS.  Some functions are actually named
10566     something starting with __ and the normal name is an alias.  */
10567 #if defined (__stub_strftime) || defined (__stub___strftime)
10568 choke me
10569 #else
10570 strftime();
10571 #endif
10572
10573 ; return 0; }
10574 EOF
10575 if { (eval echo configure:10576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10576   rm -rf conftest*
10577   eval "ac_cv_func_strftime=yes"
10578 else
10579   echo "configure: failed program was:" >&5
10580   cat conftest.$ac_ext >&5
10581   rm -rf conftest*
10582   eval "ac_cv_func_strftime=no"
10583 fi
10584 rm -f conftest*
10585 fi
10586
10587 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589   cat >> confdefs.h <<\EOF
10590 #define HAVE_STRFTIME 1
10591 EOF
10592
10593 else
10594   echo "$ac_t""no" 1>&6
10595 # strftime is in -lintl on SCO UNIX.
10596 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10597 echo "configure:10598: checking for strftime in -lintl" >&5
10598 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10599 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   ac_save_LIBS="$LIBS"
10603 LIBS="-lintl  $LIBS"
10604 cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607 /* Override any gcc2 internal prototype to avoid an error.  */
10608 /* We use char because int might match the return type of a gcc2
10609     builtin and then its argument prototype would still apply.  */
10610 char strftime();
10611
10612 int main() {
10613 strftime()
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10617   rm -rf conftest*
10618   eval "ac_cv_lib_$ac_lib_var=yes"
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   eval "ac_cv_lib_$ac_lib_var=no"
10624 fi
10625 rm -f conftest*
10626 LIBS="$ac_save_LIBS"
10627
10628 fi
10629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10630   echo "$ac_t""yes" 1>&6
10631   cat >> confdefs.h <<\EOF
10632 #define HAVE_STRFTIME 1
10633 EOF
10634
10635 LIBS="-lintl $LIBS"
10636 else
10637   echo "$ac_t""no" 1>&6
10638 fi
10639
10640 fi
10641
10642 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10643 echo "configure:10644: checking for vprintf" >&5
10644 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10645   echo $ac_n "(cached) $ac_c" 1>&6
10646 else
10647   cat > conftest.$ac_ext <<EOF
10648 #line 10649 "configure"
10649 #include "confdefs.h"
10650 /* System header to define __stub macros and hopefully few prototypes,
10651     which can conflict with char vprintf(); below.  */
10652 #include <assert.h>
10653 /* Override any gcc2 internal prototype to avoid an error.  */
10654 /* We use char because int might match the return type of a gcc2
10655     builtin and then its argument prototype would still apply.  */
10656 char vprintf();
10657
10658 int main() {
10659
10660 /* The GNU C library defines this for functions which it implements
10661     to always fail with ENOSYS.  Some functions are actually named
10662     something starting with __ and the normal name is an alias.  */
10663 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10664 choke me
10665 #else
10666 vprintf();
10667 #endif
10668
10669 ; return 0; }
10670 EOF
10671 if { (eval echo configure:10672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10672   rm -rf conftest*
10673   eval "ac_cv_func_vprintf=yes"
10674 else
10675   echo "configure: failed program was:" >&5
10676   cat conftest.$ac_ext >&5
10677   rm -rf conftest*
10678   eval "ac_cv_func_vprintf=no"
10679 fi
10680 rm -f conftest*
10681 fi
10682
10683 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10684   echo "$ac_t""yes" 1>&6
10685   cat >> confdefs.h <<\EOF
10686 #define HAVE_VPRINTF 1
10687 EOF
10688
10689 else
10690   echo "$ac_t""no" 1>&6
10691 fi
10692
10693 if test "$ac_cv_func_vprintf" != yes; then
10694 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10695 echo "configure:10696: checking for _doprnt" >&5
10696 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10697   echo $ac_n "(cached) $ac_c" 1>&6
10698 else
10699   cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702 /* System header to define __stub macros and hopefully few prototypes,
10703     which can conflict with char _doprnt(); below.  */
10704 #include <assert.h>
10705 /* Override any gcc2 internal prototype to avoid an error.  */
10706 /* We use char because int might match the return type of a gcc2
10707     builtin and then its argument prototype would still apply.  */
10708 char _doprnt();
10709
10710 int main() {
10711
10712 /* The GNU C library defines this for functions which it implements
10713     to always fail with ENOSYS.  Some functions are actually named
10714     something starting with __ and the normal name is an alias.  */
10715 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10716 choke me
10717 #else
10718 _doprnt();
10719 #endif
10720
10721 ; return 0; }
10722 EOF
10723 if { (eval echo configure:10724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10724   rm -rf conftest*
10725   eval "ac_cv_func__doprnt=yes"
10726 else
10727   echo "configure: failed program was:" >&5
10728   cat conftest.$ac_ext >&5
10729   rm -rf conftest*
10730   eval "ac_cv_func__doprnt=no"
10731 fi
10732 rm -f conftest*
10733 fi
10734
10735 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10736   echo "$ac_t""yes" 1>&6
10737   cat >> confdefs.h <<\EOF
10738 #define HAVE_DOPRNT 1
10739 EOF
10740
10741 else
10742   echo "$ac_t""no" 1>&6
10743 fi
10744
10745 fi
10746
10747
10748 if test $ac_cv_func_vprintf = yes ; then
10749                 for ac_func in vsnprintf vsprintf
10750 do
10751 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10752 echo "configure:10753: checking for $ac_func" >&5
10753 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10754   echo $ac_n "(cached) $ac_c" 1>&6
10755 else
10756   cat > conftest.$ac_ext <<EOF
10757 #line 10758 "configure"
10758 #include "confdefs.h"
10759 /* System header to define __stub macros and hopefully few prototypes,
10760     which can conflict with char $ac_func(); below.  */
10761 #include <assert.h>
10762 /* Override any gcc2 internal prototype to avoid an error.  */
10763 /* We use char because int might match the return type of a gcc2
10764     builtin and then its argument prototype would still apply.  */
10765 char $ac_func();
10766
10767 int main() {
10768
10769 /* The GNU C library defines this for functions which it implements
10770     to always fail with ENOSYS.  Some functions are actually named
10771     something starting with __ and the normal name is an alias.  */
10772 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10773 choke me
10774 #else
10775 $ac_func();
10776 #endif
10777
10778 ; return 0; }
10779 EOF
10780 if { (eval echo configure:10781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10781   rm -rf conftest*
10782   eval "ac_cv_func_$ac_func=yes"
10783 else
10784   echo "configure: failed program was:" >&5
10785   cat conftest.$ac_ext >&5
10786   rm -rf conftest*
10787   eval "ac_cv_func_$ac_func=no"
10788 fi
10789 rm -f conftest*
10790 fi
10791
10792 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10793   echo "$ac_t""yes" 1>&6
10794     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10795   cat >> confdefs.h <<EOF
10796 #define $ac_tr_func 1
10797 EOF
10798  
10799 else
10800   echo "$ac_t""no" 1>&6
10801 fi
10802 done
10803
10804 fi
10805
10806 for ac_func in \
10807         bcopy                   \
10808         endgrent                \
10809         endpwent                \
10810         flock                   \
10811         getdtablesize   \
10812         getgrgid                \
10813         gethostname             \
10814         getpass                 \
10815         getpwuid                \
10816         gettimeofday    \
10817         initgroups              \
10818         lockf                   \
10819         memcpy                  \
10820         memmove                 \
10821         mkstemp                 \
10822         recv                    \
10823         recvfrom                \
10824         setpwfile               \
10825         setgid                  \
10826         setegid                 \
10827         setsid                  \
10828         setuid                  \
10829         seteuid                 \
10830         signal                  \
10831         sigset                  \
10832         snprintf                \
10833         strdup                  \
10834         strerror                \
10835         strpbrk                 \
10836         strrchr                 \
10837         strsep                  \
10838         strstr                  \
10839         strtol                  \
10840         strtoul                 \
10841         strspn                  \
10842         sysconf                 \
10843         waitpid                 \
10844         wait4                   \
10845
10846 do
10847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10848 echo "configure:10849: checking for $ac_func" >&5
10849 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10850   echo $ac_n "(cached) $ac_c" 1>&6
10851 else
10852   cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 /* System header to define __stub macros and hopefully few prototypes,
10856     which can conflict with char $ac_func(); below.  */
10857 #include <assert.h>
10858 /* Override any gcc2 internal prototype to avoid an error.  */
10859 /* We use char because int might match the return type of a gcc2
10860     builtin and then its argument prototype would still apply.  */
10861 char $ac_func();
10862
10863 int main() {
10864
10865 /* The GNU C library defines this for functions which it implements
10866     to always fail with ENOSYS.  Some functions are actually named
10867     something starting with __ and the normal name is an alias.  */
10868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10869 choke me
10870 #else
10871 $ac_func();
10872 #endif
10873
10874 ; return 0; }
10875 EOF
10876 if { (eval echo configure:10877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10877   rm -rf conftest*
10878   eval "ac_cv_func_$ac_func=yes"
10879 else
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   eval "ac_cv_func_$ac_func=no"
10884 fi
10885 rm -f conftest*
10886 fi
10887
10888 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10889   echo "$ac_t""yes" 1>&6
10890     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10891   cat >> confdefs.h <<EOF
10892 #define $ac_tr_func 1
10893 EOF
10894  
10895 else
10896   echo "$ac_t""no" 1>&6
10897 fi
10898 done
10899
10900
10901 for ac_func in getopt tempnam
10902 do
10903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10904 echo "configure:10905: checking for $ac_func" >&5
10905 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10906   echo $ac_n "(cached) $ac_c" 1>&6
10907 else
10908   cat > conftest.$ac_ext <<EOF
10909 #line 10910 "configure"
10910 #include "confdefs.h"
10911 /* System header to define __stub macros and hopefully few prototypes,
10912     which can conflict with char $ac_func(); below.  */
10913 #include <assert.h>
10914 /* Override any gcc2 internal prototype to avoid an error.  */
10915 /* We use char because int might match the return type of a gcc2
10916     builtin and then its argument prototype would still apply.  */
10917 char $ac_func();
10918
10919 int main() {
10920
10921 /* The GNU C library defines this for functions which it implements
10922     to always fail with ENOSYS.  Some functions are actually named
10923     something starting with __ and the normal name is an alias.  */
10924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10925 choke me
10926 #else
10927 $ac_func();
10928 #endif
10929
10930 ; return 0; }
10931 EOF
10932 if { (eval echo configure:10933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10933   rm -rf conftest*
10934   eval "ac_cv_func_$ac_func=yes"
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_func_$ac_func=no"
10940 fi
10941 rm -f conftest*
10942 fi
10943
10944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10945   echo "$ac_t""yes" 1>&6
10946     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10947   cat >> confdefs.h <<EOF
10948 #define $ac_tr_func 1
10949 EOF
10950  
10951 else
10952   echo "$ac_t""no" 1>&6
10953 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10954 fi
10955 done
10956
10957
10958
10959 # Check Configuration
10960
10961 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10962 echo "configure:10963: checking declaration of sys_errlist" >&5
10963 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10964   echo $ac_n "(cached) $ac_c" 1>&6
10965 else
10966   
10967         cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970
10971 #include <stdio.h>
10972 #include <sys/types.h>
10973 #include <errno.h> 
10974 int main() {
10975 char *c = (char *) *sys_errlist
10976 ; return 0; }
10977 EOF
10978 if { (eval echo configure:10979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10979   rm -rf conftest*
10980   ol_cv_dcl_sys_errlist=yes
10981 else
10982   echo "configure: failed program was:" >&5
10983   cat conftest.$ac_ext >&5
10984   rm -rf conftest*
10985   ol_cv_dcl_sys_errlist=no
10986 fi
10987 rm -f conftest*
10988 fi
10989
10990 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10991 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10992 if test $ol_cv_dcl_sys_errlist = no ; then
10993         cat >> confdefs.h <<\EOF
10994 #define DECL_SYS_ERRLIST 1
10995 EOF
10996
10997         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10998 echo "configure:10999: checking existence of sys_errlist" >&5
10999         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11000   echo $ac_n "(cached) $ac_c" 1>&6
11001 else
11002   
11003                 cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006 #include <errno.h>
11007 int main() {
11008 char *c = (char *) *sys_errlist
11009 ; return 0; }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11012   rm -rf conftest*
11013   ol_cv_have_sys_errlist=yes
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -rf conftest*
11018   ol_cv_have_sys_errlist=no
11019 fi
11020 rm -f conftest*
11021 fi
11022
11023         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11024         if test $ol_cv_have_sys_errlist = yes ; then
11025                 cat >> confdefs.h <<\EOF
11026 #define HAVE_SYS_ERRLIST 1
11027 EOF
11028
11029         fi
11030 fi
11031
11032
11033
11034 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
11035 echo "configure:11036: checking strdup declaration" >&5
11036 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
11037   echo $ac_n "(cached) $ac_c" 1>&6
11038 else
11039   
11040         cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043
11044 #include <string.h> 
11045 int main() {
11046 extern char *strdup();
11047 ; return 0; }
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11050   rm -rf conftest*
11051   ol_cv_dcl_strdup=yes
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -rf conftest*
11056   ol_cv_dcl_strdup=no
11057 fi
11058 rm -f conftest*
11059 fi
11060
11061 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
11062 if test $ol_cv_dcl_strdup = yes ; then
11063         cat >> confdefs.h <<\EOF
11064 #define DECL_STRDUP 1
11065 EOF
11066
11067 fi
11068
11069
11070
11071 if test "$ol_enable_debug" != no ; then
11072         cat >> confdefs.h <<\EOF
11073 #define LDAP_DEBUG 1
11074 EOF
11075
11076 fi
11077 if test "$ol_enable_syslog" = yes ; then
11078         cat >> confdefs.h <<\EOF
11079 #define LDAP_SYSLOG 1
11080 EOF
11081
11082 fi
11083 if test "$ol_enable_libui" = yes ; then
11084         cat >> confdefs.h <<\EOF
11085 #define LDAP_LIBUI 1
11086 EOF
11087
11088 fi
11089 if test "$ol_enable_cache" = no ; then
11090         cat >> confdefs.h <<\EOF
11091 #define LDAP_NOCACHE 1
11092 EOF
11093
11094 fi
11095 if test "$ol_enable_dns" != no ; then
11096         cat >> confdefs.h <<\EOF
11097 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11098 EOF
11099
11100 fi
11101 if test "$ol_enable_proctitle" != no ; then
11102         cat >> confdefs.h <<\EOF
11103 #define LDAP_PROCTITLE 1
11104 EOF
11105
11106 fi
11107 if test "$ol_enable_referrals" != no ; then
11108         cat >> confdefs.h <<\EOF
11109 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11110 EOF
11111
11112 fi
11113 if test "$ol_enable_cldap" != no ; then
11114         cat >> confdefs.h <<\EOF
11115 #define LDAP_CONNECTIONLESS 1
11116 EOF
11117
11118 fi
11119
11120 if test "$ol_enable_aclgroups" != no ; then
11121         cat >> confdefs.h <<\EOF
11122 #define SLAPD_ACLGROUPS 1
11123 EOF
11124
11125 fi
11126 if test "$ol_enable_crypt" != no ; then
11127         cat >> confdefs.h <<\EOF
11128 #define SLAPD_CRYPT 1
11129 EOF
11130
11131 fi
11132 if test "$ol_enable_cleartext" != no ; then
11133         cat >> confdefs.h <<\EOF
11134 #define SLAPD_CLEARTEXT 1
11135 EOF
11136
11137 fi
11138 if test "$ol_enable_phonetic" != no ; then
11139         cat >> confdefs.h <<\EOF
11140 #define SLAPD_PHONETIC 1
11141 EOF
11142
11143 fi
11144 if test "$ol_enable_rlookups" != no ; then
11145         cat >> confdefs.h <<\EOF
11146 #define SLAPD_RLOOKUPS 1
11147 EOF
11148
11149 fi
11150
11151 if test "$ol_link_modules" != no ; then
11152         cat >> confdefs.h <<\EOF
11153 #define SLAPD_MODULES 1
11154 EOF
11155
11156         BUILD_SLAPD=yes
11157 fi
11158
11159 if test "$ol_link_bdb2" != no ; then
11160         cat >> confdefs.h <<\EOF
11161 #define SLAPD_BDB2 1
11162 EOF
11163
11164         BUILD_SLAPD=yes
11165         BUILD_BDB2=yes
11166 fi
11167
11168 if test "$ol_link_ldbm" != no ; then
11169         cat >> confdefs.h <<\EOF
11170 #define SLAPD_LDBM 1
11171 EOF
11172
11173         BUILD_SLAPD=yes
11174         BUILD_LDBM=yes
11175 fi
11176
11177 if test "$ol_enable_passwd" != no ; then
11178         cat >> confdefs.h <<\EOF
11179 #define SLAPD_PASSWD 1
11180 EOF
11181
11182         BUILD_SLAPD=yes
11183         BUILD_PASSWD=yes
11184 fi
11185
11186 if test "$ol_link_perl" != no ; then
11187         cat >> confdefs.h <<\EOF
11188 #define SLAPD_PERL 1
11189 EOF
11190
11191         BUILD_SLAPD=yes
11192         BUILD_PERL=yes
11193 fi
11194
11195 if test "$ol_enable_shell" != no ; then
11196         cat >> confdefs.h <<\EOF
11197 #define SLAPD_SHELL 1
11198 EOF
11199
11200         BUILD_SLAPD=yes
11201         BUILD_SHELL=yes
11202 fi
11203
11204 if test "$ol_enable_tcl" != no ; then
11205         cat >> confdefs.h <<\EOF
11206 #define SLAPD_TCL 1
11207 EOF
11208
11209         BUILD_SLAPD=yes
11210         BUILD_TCL=yes
11211 fi
11212
11213 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11214         $BUILD_SLAPD = yes ; then
11215         BUILD_SLURPD=yes
11216 fi
11217
11218 if test "$ol_link_isode" != no ; then
11219         BUILD_LDAPD=yes
11220 fi
11221
11222
11223
11224
11225   
11226   
11227   
11228   
11229   
11230   
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253 trap '' 1 2 15
11254
11255 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11256
11257 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11258 # Let make expand exec_prefix.
11259 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11260
11261 # Any assignment to VPATH causes Sun make to only execute
11262 # the first set of double-colon rules, so remove it if not needed.
11263 # If there is a colon in the path, we need to keep it.
11264 if test "x$srcdir" = x.; then
11265   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11266 fi
11267
11268 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11269
11270 DEFS=-DHAVE_CONFIG_H
11271
11272 # Without the "./", some shells look in PATH for config.status.
11273 : ${CONFIG_STATUS=./config.status}
11274
11275 echo creating $CONFIG_STATUS
11276 rm -f $CONFIG_STATUS
11277 cat > $CONFIG_STATUS <<EOF
11278 #! /bin/sh
11279 # Generated automatically by configure.
11280 # Run this file to recreate the current configuration.
11281 # This directory was configured as follows,
11282 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11283 #
11284 # $0 $ac_configure_args
11285 #
11286 # Compiler output produced by configure, useful for debugging
11287 # configure, is in ./config.log if it exists.
11288
11289 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11290 for ac_option
11291 do
11292   case "\$ac_option" in
11293   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11294     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11295     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11296   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11297     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11298     exit 0 ;;
11299   -help | --help | --hel | --he | --h)
11300     echo "\$ac_cs_usage"; exit 0 ;;
11301   *) echo "\$ac_cs_usage"; exit 1 ;;
11302   esac
11303 done
11304
11305 ac_given_srcdir=$srcdir
11306 ac_given_INSTALL="$INSTALL"
11307
11308 trap 'rm -fr `echo "\
11309 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11310 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11311 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11312 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11313 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11314 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11315 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11316 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11317 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11318 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11319 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11320 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11321 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11322 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11323 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11324 include/Makefile:build/top.mk:include/Makefile.in \
11325 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11326 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11327 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11328 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11329 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11330 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11331 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11332 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11333 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11334 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11335 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11336 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11337 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11338 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11339 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11340 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11341 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11342 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11343 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11344 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11345 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11346 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11347 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11348 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11349 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11350  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11351 EOF
11352 cat >> $CONFIG_STATUS <<EOF
11353
11354 # Protect against being on the right side of a sed subst in config.status.
11355 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11356  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11357 $ac_vpsub
11358 $extrasub
11359 s%@SHELL@%$SHELL%g
11360 s%@CFLAGS@%$CFLAGS%g
11361 s%@CPPFLAGS@%$CPPFLAGS%g
11362 s%@CXXFLAGS@%$CXXFLAGS%g
11363 s%@FFLAGS@%$FFLAGS%g
11364 s%@DEFS@%$DEFS%g
11365 s%@LDFLAGS@%$LDFLAGS%g
11366 s%@LIBS@%$LIBS%g
11367 s%@exec_prefix@%$exec_prefix%g
11368 s%@prefix@%$prefix%g
11369 s%@program_transform_name@%$program_transform_name%g
11370 s%@bindir@%$bindir%g
11371 s%@sbindir@%$sbindir%g
11372 s%@libexecdir@%$libexecdir%g
11373 s%@datadir@%$datadir%g
11374 s%@sysconfdir@%$sysconfdir%g
11375 s%@sharedstatedir@%$sharedstatedir%g
11376 s%@localstatedir@%$localstatedir%g
11377 s%@libdir@%$libdir%g
11378 s%@includedir@%$includedir%g
11379 s%@oldincludedir@%$oldincludedir%g
11380 s%@infodir@%$infodir%g
11381 s%@mandir@%$mandir%g
11382 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11383 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11384 s%@INSTALL_DATA@%$INSTALL_DATA%g
11385 s%@PACKAGE@%$PACKAGE%g
11386 s%@VERSION@%$VERSION%g
11387 s%@ACLOCAL@%$ACLOCAL%g
11388 s%@AUTOCONF@%$AUTOCONF%g
11389 s%@AUTOMAKE@%$AUTOMAKE%g
11390 s%@AUTOHEADER@%$AUTOHEADER%g
11391 s%@MAKEINFO@%$MAKEINFO%g
11392 s%@SET_MAKE@%$SET_MAKE%g
11393 s%@top_builddir@%$top_builddir%g
11394 s%@ldap_subdir@%$ldap_subdir%g
11395 s%@host@%$host%g
11396 s%@host_alias@%$host_alias%g
11397 s%@host_cpu@%$host_cpu%g
11398 s%@host_vendor@%$host_vendor%g
11399 s%@host_os@%$host_os%g
11400 s%@RANLIB@%$RANLIB%g
11401 s%@CC@%$CC%g
11402 s%@LD@%$LD%g
11403 s%@NM@%$NM%g
11404 s%@LN_S@%$LN_S%g
11405 s%@LIBTOOL@%$LIBTOOL%g
11406 s%@AWK@%$AWK%g
11407 s%@LN_H@%$LN_H%g
11408 s%@SENDMAIL@%$SENDMAIL%g
11409 s%@EDITOR@%$EDITOR%g
11410 s%@FINGER@%$FINGER%g
11411 s%@GLIBCONFIG@%$GLIBCONFIG%g
11412 s%@PERLBIN@%$PERLBIN%g
11413 s%@CPP@%$CPP%g
11414 s%@EXEEXT@%$EXEEXT%g
11415 s%@OBJEXT@%$OBJEXT%g
11416 s%@PEPSY@%$PEPSY%g
11417 s%@LIBOBJS@%$LIBOBJS%g
11418 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11419 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11420 s%@BUILD_BDB2@%$BUILD_BDB2%g
11421 s%@BUILD_LDBM@%$BUILD_LDBM%g
11422 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11423 s%@BUILD_PERL@%$BUILD_PERL%g
11424 s%@BUILD_SHELL@%$BUILD_SHELL%g
11425 s%@BUILD_TCL@%$BUILD_TCL%g
11426 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11427 s%@LDAP_LIBS@%$LDAP_LIBS%g
11428 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11429 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11430 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11431 s%@LDBM_LIBS@%$LDBM_LIBS%g
11432 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11433 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11434 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
11435 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
11436 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11437 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11438 s%@KRB_LIBS@%$KRB_LIBS%g
11439 s%@READLINE_LIBS@%$READLINE_LIBS%g
11440 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11441 s%@TLS_LIBS@%$TLS_LIBS%g
11442
11443 CEOF
11444 EOF
11445
11446 cat >> $CONFIG_STATUS <<\EOF
11447
11448 # Split the substitutions into bite-sized pieces for seds with
11449 # small command number limits, like on Digital OSF/1 and HP-UX.
11450 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11451 ac_file=1 # Number of current file.
11452 ac_beg=1 # First line for current file.
11453 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11454 ac_more_lines=:
11455 ac_sed_cmds=""
11456 while $ac_more_lines; do
11457   if test $ac_beg -gt 1; then
11458     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11459   else
11460     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11461   fi
11462   if test ! -s conftest.s$ac_file; then
11463     ac_more_lines=false
11464     rm -f conftest.s$ac_file
11465   else
11466     if test -z "$ac_sed_cmds"; then
11467       ac_sed_cmds="sed -f conftest.s$ac_file"
11468     else
11469       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11470     fi
11471     ac_file=`expr $ac_file + 1`
11472     ac_beg=$ac_end
11473     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11474   fi
11475 done
11476 if test -z "$ac_sed_cmds"; then
11477   ac_sed_cmds=cat
11478 fi
11479 EOF
11480
11481 cat >> $CONFIG_STATUS <<EOF
11482
11483 CONFIG_FILES=\${CONFIG_FILES-"\
11484 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11485 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11486 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11487 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11488 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11489 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11490 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11491 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11492 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11493 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11494 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11495 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11496 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11497 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11498 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11499 include/Makefile:build/top.mk:include/Makefile.in \
11500 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11501 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11502 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11503 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11504 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11505 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11506 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11507 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11508 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11509 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11510 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11511 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11512 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11513 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11514 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11515 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11516 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11517 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11518 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11519 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11520 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11521 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11522 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11523 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11524 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11525 "}
11526 EOF
11527 cat >> $CONFIG_STATUS <<\EOF
11528 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11529   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11530   case "$ac_file" in
11531   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11532        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11533   *) ac_file_in="${ac_file}.in" ;;
11534   esac
11535
11536   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11537
11538   # Remove last slash and all that follows it.  Not all systems have dirname.
11539   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11540   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11541     # The file is in a subdirectory.
11542     test ! -d "$ac_dir" && mkdir "$ac_dir"
11543     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11544     # A "../" for each directory in $ac_dir_suffix.
11545     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11546   else
11547     ac_dir_suffix= ac_dots=
11548   fi
11549
11550   case "$ac_given_srcdir" in
11551   .)  srcdir=.
11552       if test -z "$ac_dots"; then top_srcdir=.
11553       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11554   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11555   *) # Relative path.
11556     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11557     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11558   esac
11559
11560   case "$ac_given_INSTALL" in
11561   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11562   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11563   esac
11564
11565   echo creating "$ac_file"
11566   rm -f "$ac_file"
11567   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11568   case "$ac_file" in
11569   *Makefile*) ac_comsub="1i\\
11570 # $configure_input" ;;
11571   *) ac_comsub= ;;
11572   esac
11573
11574   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11575   sed -e "$ac_comsub
11576 s%@configure_input@%$configure_input%g
11577 s%@srcdir@%$srcdir%g
11578 s%@top_srcdir@%$top_srcdir%g
11579 s%@INSTALL@%$INSTALL%g
11580 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11581 fi; done
11582 rm -f conftest.s*
11583
11584 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11585 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11586 #
11587 # ac_d sets the value in "#define NAME VALUE" lines.
11588 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11589 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11590 ac_dC='\3'
11591 ac_dD='%g'
11592 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11593 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11594 ac_uB='\([      ]\)%\1#\2define\3'
11595 ac_uC=' '
11596 ac_uD='\4%g'
11597 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11598 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11599 ac_eB='$%\1#\2define\3'
11600 ac_eC=' '
11601 ac_eD='%g'
11602
11603 if test "${CONFIG_HEADERS+set}" != set; then
11604 EOF
11605 cat >> $CONFIG_STATUS <<EOF
11606   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11607 EOF
11608 cat >> $CONFIG_STATUS <<\EOF
11609 fi
11610 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11611   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11612   case "$ac_file" in
11613   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11614        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11615   *) ac_file_in="${ac_file}.in" ;;
11616   esac
11617
11618   echo creating $ac_file
11619
11620   rm -f conftest.frag conftest.in conftest.out
11621   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11622   cat $ac_file_inputs > conftest.in
11623
11624 EOF
11625
11626 # Transform confdefs.h into a sed script conftest.vals that substitutes
11627 # the proper values into config.h.in to produce config.h.  And first:
11628 # Protect against being on the right side of a sed subst in config.status.
11629 # Protect against being in an unquoted here document in config.status.
11630 rm -f conftest.vals
11631 cat > conftest.hdr <<\EOF
11632 s/[\\&%]/\\&/g
11633 s%[\\$`]%\\&%g
11634 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11635 s%ac_d%ac_u%gp
11636 s%ac_u%ac_e%gp
11637 EOF
11638 sed -n -f conftest.hdr confdefs.h > conftest.vals
11639 rm -f conftest.hdr
11640
11641 # This sed command replaces #undef with comments.  This is necessary, for
11642 # example, in the case of _POSIX_SOURCE, which is predefined and required
11643 # on some systems where configure will not decide to define it.
11644 cat >> conftest.vals <<\EOF
11645 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11646 EOF
11647
11648 # Break up conftest.vals because some shells have a limit on
11649 # the size of here documents, and old seds have small limits too.
11650
11651 rm -f conftest.tail
11652 while :
11653 do
11654   ac_lines=`grep -c . conftest.vals`
11655   # grep -c gives empty output for an empty file on some AIX systems.
11656   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11657   # Write a limited-size here document to conftest.frag.
11658   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11659   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11660   echo 'CEOF
11661   sed -f conftest.frag conftest.in > conftest.out
11662   rm -f conftest.in
11663   mv conftest.out conftest.in
11664 ' >> $CONFIG_STATUS
11665   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11666   rm -f conftest.vals
11667   mv conftest.tail conftest.vals
11668 done
11669 rm -f conftest.vals
11670
11671 cat >> $CONFIG_STATUS <<\EOF
11672   rm -f conftest.frag conftest.h
11673   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11674   cat conftest.in >> conftest.h
11675   rm -f conftest.in
11676   if cmp -s $ac_file conftest.h 2>/dev/null; then
11677     echo "$ac_file is unchanged"
11678     rm -f conftest.h
11679   else
11680     # Remove last slash and all that follows it.  Not all systems have dirname.
11681       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11682       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11683       # The file is in a subdirectory.
11684       test ! -d "$ac_dir" && mkdir "$ac_dir"
11685     fi
11686     rm -f $ac_file
11687     mv conftest.h $ac_file
11688   fi
11689 fi; done
11690
11691 EOF
11692 cat >> $CONFIG_STATUS <<EOF
11693
11694 EOF
11695 cat >> $CONFIG_STATUS <<\EOF
11696
11697 date > stamp-h
11698 echo Please \"make depend\" to build dependencies
11699
11700 exit 0
11701 EOF
11702 chmod +x $CONFIG_STATUS
11703 rm -fr confdefs* $ac_clean_files
11704 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11705