]> git.sur5r.net Git - openldap/blob - configure
2f302c272dac76b6b57728e26a99513571c2c5b6
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
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-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-modules    enable dynamic module support (no)"
59 ac_help="$ac_help
60     --enable-phonetic   enable phonetic/soundex (no)"
61 ac_help="$ac_help
62     --enable-rlookups   enable reverse lookups (auto)"
63 ac_help="$ac_help
64     --enable-wrappers   enable tcp wrapper support (no)"
65 ac_help="$ac_help
66     --enable-bdb2       enable bdb2 backend (no)"
67 ac_help="$ac_help
68       --with-bdb2-module        module type (static)"
69 ac_help="$ac_help
70     --enable-ldap       enable ldap backend (no)"
71 ac_help="$ac_help
72       --with-ldap-module        module type (static)"
73 ac_help="$ac_help
74     --enable-ldbm       enable ldbm backend (yes)"
75 ac_help="$ac_help
76       --with-ldbm-module        module type (static)"
77 ac_help="$ac_help
78       --with-ldbm-api   use LDBM API (auto)"
79 ac_help="$ac_help
80       --with-ldbm-type  use LDBM type (auto)"
81 ac_help="$ac_help
82     --enable-passwd     enable passwd backend (no)"
83 ac_help="$ac_help
84       --with-passwd-module      module type (static)"
85 ac_help="$ac_help
86     --enable-perl       enable perl backend (no)"
87 ac_help="$ac_help
88       --with-perl-module        module type (static)"
89 ac_help="$ac_help
90     --enable-shell      enable shell backend (no)"
91 ac_help="$ac_help
92       --with-shell-module       module type (static)"
93 ac_help="$ac_help
94     --enable-tcl        enable tcl backend (no)"
95 ac_help="$ac_help
96       --with-tcl-module module type (static)"
97 ac_help="$ac_help
98 SLURPD Options:"
99 ac_help="$ac_help
100   --enable-slurpd       enable building slurpd (auto)"
101 ac_help="$ac_help
102 Library Generation & Linking Options"
103 ac_help="$ac_help
104   --enable-static[=PKGS]  build static libraries [default=yes]"
105 ac_help="$ac_help
106   --enable-shared[=PKGS]  build shared libraries [default=yes]"
107 ac_help="$ac_help
108   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
109 ac_help="$ac_help
110   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
111 ac_help="$ac_help
112   --disable-libtool-lock  avoid locking (might break parallel builds)"
113
114 # Initialize some variables set by options.
115 # The variables have the same names as the options, with
116 # dashes changed to underlines.
117 build=NONE
118 cache_file=./config.cache
119 exec_prefix=NONE
120 host=NONE
121 no_create=
122 nonopt=NONE
123 no_recursion=
124 prefix=NONE
125 program_prefix=NONE
126 program_suffix=NONE
127 program_transform_name=s,x,x,
128 silent=
129 site=
130 srcdir=
131 target=NONE
132 verbose=
133 x_includes=NONE
134 x_libraries=NONE
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Initialize some other variables.
149 subdirs=
150 MFLAGS= MAKEFLAGS=
151 SHELL=${CONFIG_SHELL-/bin/sh}
152 # Maximum number of lines to put in a shell here document.
153 ac_max_here_lines=12
154
155 ac_prev=
156 for ac_option
157 do
158
159   # If the previous option needs an argument, assign it.
160   if test -n "$ac_prev"; then
161     eval "$ac_prev=\$ac_option"
162     ac_prev=
163     continue
164   fi
165
166   case "$ac_option" in
167   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
168   *) ac_optarg= ;;
169   esac
170
171   # Accept the important Cygnus configure options, so we can diagnose typos.
172
173   case "$ac_option" in
174
175   -bindir | --bindir | --bindi | --bind | --bin | --bi)
176     ac_prev=bindir ;;
177   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
178     bindir="$ac_optarg" ;;
179
180   -build | --build | --buil | --bui | --bu)
181     ac_prev=build ;;
182   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
183     build="$ac_optarg" ;;
184
185   -cache-file | --cache-file | --cache-fil | --cache-fi \
186   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
187     ac_prev=cache_file ;;
188   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
189   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
190     cache_file="$ac_optarg" ;;
191
192   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193     ac_prev=datadir ;;
194   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195   | --da=*)
196     datadir="$ac_optarg" ;;
197
198   -disable-* | --disable-*)
199     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
200     # Reject names that are not valid shell variable names.
201     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
202       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
203     fi
204     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
205     eval "enable_${ac_feature}=no" ;;
206
207   -enable-* | --enable-*)
208     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
209     # Reject names that are not valid shell variable names.
210     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
211       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
212     fi
213     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
214     case "$ac_option" in
215       *=*) ;;
216       *) ac_optarg=yes ;;
217     esac
218     eval "enable_${ac_feature}='$ac_optarg'" ;;
219
220   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
221   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
222   | --exec | --exe | --ex)
223     ac_prev=exec_prefix ;;
224   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
225   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
226   | --exec=* | --exe=* | --ex=*)
227     exec_prefix="$ac_optarg" ;;
228
229   -gas | --gas | --ga | --g)
230     # Obsolete; use --with-gas.
231     with_gas=yes ;;
232
233   -help | --help | --hel | --he)
234     # Omit some internal or obsolete options to make the list less imposing.
235     # This message is too long to be a string in the A/UX 3.1 sh.
236     cat << EOF
237 Usage: configure [options] [host]
238 Options: [defaults in brackets after descriptions]
239 Configuration:
240   --cache-file=FILE       cache test results in FILE
241   --help                  print this message
242   --no-create             do not create output files
243   --quiet, --silent       do not print \`checking...' messages
244   --version               print the version of autoconf that created configure
245 Directory and file names:
246   --prefix=PREFIX         install architecture-independent files in PREFIX
247                           [$ac_default_prefix]
248   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
249                           [same as prefix]
250   --bindir=DIR            user executables in DIR [EPREFIX/bin]
251   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
252   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
253   --datadir=DIR           read-only architecture-independent data in DIR
254                           [PREFIX/share]
255   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
256   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
257                           [PREFIX/com]
258   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
259   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
260   --includedir=DIR        C header files in DIR [PREFIX/include]
261   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
262   --infodir=DIR           info documentation in DIR [PREFIX/info]
263   --mandir=DIR            man documentation in DIR [PREFIX/man]
264   --srcdir=DIR            find the sources in DIR [configure dir or ..]
265   --program-prefix=PREFIX prepend PREFIX to installed program names
266   --program-suffix=SUFFIX append SUFFIX to installed program names
267   --program-transform-name=PROGRAM
268                           run sed PROGRAM on installed program names
269 EOF
270     cat << EOF
271 Host type:
272   --build=BUILD           configure for building on BUILD [BUILD=HOST]
273   --host=HOST             configure for HOST [guessed]
274   --target=TARGET         configure for TARGET [TARGET=HOST]
275 Features and packages:
276   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
277   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
278   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
279   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
280   --x-includes=DIR        X include files are in DIR
281   --x-libraries=DIR       X library files are in DIR
282 EOF
283     if test -n "$ac_help"; then
284       echo "--enable and --with options recognized:$ac_help"
285     fi
286     exit 0 ;;
287
288   -host | --host | --hos | --ho)
289     ac_prev=host ;;
290   -host=* | --host=* | --hos=* | --ho=*)
291     host="$ac_optarg" ;;
292
293   -includedir | --includedir | --includedi | --included | --include \
294   | --includ | --inclu | --incl | --inc)
295     ac_prev=includedir ;;
296   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
297   | --includ=* | --inclu=* | --incl=* | --inc=*)
298     includedir="$ac_optarg" ;;
299
300   -infodir | --infodir | --infodi | --infod | --info | --inf)
301     ac_prev=infodir ;;
302   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
303     infodir="$ac_optarg" ;;
304
305   -libdir | --libdir | --libdi | --libd)
306     ac_prev=libdir ;;
307   -libdir=* | --libdir=* | --libdi=* | --libd=*)
308     libdir="$ac_optarg" ;;
309
310   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
311   | --libexe | --libex | --libe)
312     ac_prev=libexecdir ;;
313   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
314   | --libexe=* | --libex=* | --libe=*)
315     libexecdir="$ac_optarg" ;;
316
317   -localstatedir | --localstatedir | --localstatedi | --localstated \
318   | --localstate | --localstat | --localsta | --localst \
319   | --locals | --local | --loca | --loc | --lo)
320     ac_prev=localstatedir ;;
321   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
322   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
323   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
324     localstatedir="$ac_optarg" ;;
325
326   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
327     ac_prev=mandir ;;
328   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
329     mandir="$ac_optarg" ;;
330
331   -nfp | --nfp | --nf)
332     # Obsolete; use --without-fp.
333     with_fp=no ;;
334
335   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
336   | --no-cr | --no-c)
337     no_create=yes ;;
338
339   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
340   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
341     no_recursion=yes ;;
342
343   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
344   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
345   | --oldin | --oldi | --old | --ol | --o)
346     ac_prev=oldincludedir ;;
347   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
348   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
349   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
350     oldincludedir="$ac_optarg" ;;
351
352   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
353     ac_prev=prefix ;;
354   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
355     prefix="$ac_optarg" ;;
356
357   -program-prefix | --program-prefix | --program-prefi | --program-pref \
358   | --program-pre | --program-pr | --program-p)
359     ac_prev=program_prefix ;;
360   -program-prefix=* | --program-prefix=* | --program-prefi=* \
361   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
362     program_prefix="$ac_optarg" ;;
363
364   -program-suffix | --program-suffix | --program-suffi | --program-suff \
365   | --program-suf | --program-su | --program-s)
366     ac_prev=program_suffix ;;
367   -program-suffix=* | --program-suffix=* | --program-suffi=* \
368   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
369     program_suffix="$ac_optarg" ;;
370
371   -program-transform-name | --program-transform-name \
372   | --program-transform-nam | --program-transform-na \
373   | --program-transform-n | --program-transform- \
374   | --program-transform | --program-transfor \
375   | --program-transfo | --program-transf \
376   | --program-trans | --program-tran \
377   | --progr-tra | --program-tr | --program-t)
378     ac_prev=program_transform_name ;;
379   -program-transform-name=* | --program-transform-name=* \
380   | --program-transform-nam=* | --program-transform-na=* \
381   | --program-transform-n=* | --program-transform-=* \
382   | --program-transform=* | --program-transfor=* \
383   | --program-transfo=* | --program-transf=* \
384   | --program-trans=* | --program-tran=* \
385   | --progr-tra=* | --program-tr=* | --program-t=*)
386     program_transform_name="$ac_optarg" ;;
387
388   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
389   | -silent | --silent | --silen | --sile | --sil)
390     silent=yes ;;
391
392   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
393     ac_prev=sbindir ;;
394   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
395   | --sbi=* | --sb=*)
396     sbindir="$ac_optarg" ;;
397
398   -sharedstatedir | --sharedstatedir | --sharedstatedi \
399   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
400   | --sharedst | --shareds | --shared | --share | --shar \
401   | --sha | --sh)
402     ac_prev=sharedstatedir ;;
403   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
404   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
405   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
406   | --sha=* | --sh=*)
407     sharedstatedir="$ac_optarg" ;;
408
409   -site | --site | --sit)
410     ac_prev=site ;;
411   -site=* | --site=* | --sit=*)
412     site="$ac_optarg" ;;
413
414   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
415     ac_prev=srcdir ;;
416   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
417     srcdir="$ac_optarg" ;;
418
419   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
420   | --syscon | --sysco | --sysc | --sys | --sy)
421     ac_prev=sysconfdir ;;
422   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
423   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
424     sysconfdir="$ac_optarg" ;;
425
426   -target | --target | --targe | --targ | --tar | --ta | --t)
427     ac_prev=target ;;
428   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
429     target="$ac_optarg" ;;
430
431   -v | -verbose | --verbose | --verbos | --verbo | --verb)
432     verbose=yes ;;
433
434   -version | --version | --versio | --versi | --vers)
435     echo "configure generated by autoconf version 2.13.1"
436     exit 0 ;;
437
438   -with-* | --with-*)
439     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
440     # Reject names that are not valid shell variable names.
441     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
442       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
443     fi
444     ac_package=`echo $ac_package| sed 's/-/_/g'`
445     case "$ac_option" in
446       *=*) ;;
447       *) ac_optarg=yes ;;
448     esac
449     eval "with_${ac_package}='$ac_optarg'" ;;
450
451   -without-* | --without-*)
452     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
453     # Reject names that are not valid shell variable names.
454     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
455       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
456     fi
457     ac_package=`echo $ac_package| sed 's/-/_/g'`
458     eval "with_${ac_package}=no" ;;
459
460   --x)
461     # Obsolete; use --with-x.
462     with_x=yes ;;
463
464   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
465   | --x-incl | --x-inc | --x-in | --x-i)
466     ac_prev=x_includes ;;
467   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
468   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
469     x_includes="$ac_optarg" ;;
470
471   -x-libraries | --x-libraries | --x-librarie | --x-librari \
472   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
473     ac_prev=x_libraries ;;
474   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
475   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
476     x_libraries="$ac_optarg" ;;
477
478   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
479     ;;
480
481   *)
482     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
483       echo "configure: warning: $ac_option: invalid host type" 1>&2
484     fi
485     if test "x$nonopt" != xNONE; then
486       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
487     fi
488     nonopt="$ac_option"
489     ;;
490
491   esac
492 done
493
494 if test -n "$ac_prev"; then
495   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
496 fi
497
498 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
499
500 # File descriptor usage:
501 # 0 standard input
502 # 1 file creation
503 # 2 errors and warnings
504 # 3 some systems may open it to /dev/tty
505 # 4 used on the Kubota Titan
506 # 6 checking for... messages and results
507 # 5 compiler messages saved in config.log
508 if test "$silent" = yes; then
509   exec 6>/dev/null
510 else
511   exec 6>&1
512 fi
513 exec 5>./config.log
514
515 echo "\
516 This file contains any messages produced by compilers while
517 running configure, to aid debugging if configure makes a mistake.
518 " 1>&5
519
520 # Strip out --no-create and --no-recursion so they do not pile up.
521 # Also quote any args containing shell metacharacters.
522 ac_configure_args=
523 for ac_arg
524 do
525   case "$ac_arg" in
526   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
527   | --no-cr | --no-c) ;;
528   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
529   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
530   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
531   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
532   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
533   esac
534 done
535
536 # NLS nuisances.
537 # Only set these to C if already set.  These must not be set unconditionally
538 # because not all systems understand e.g. LANG=C (notably SCO).
539 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
540 # Non-C LC_CTYPE values break the ctype check.
541 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
542 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
543 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
544 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
545
546 # confdefs.h avoids OS command line length limits that DEFS can exceed.
547 rm -rf conftest* confdefs.h
548 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
549 echo > confdefs.h
550
551 # A filename unique to this package, relative to the directory that
552 # configure is in, which we can look for to find out if srcdir is correct.
553 ac_unique_file=build/version
554
555 # Find the source files, if location was not specified.
556 if test -z "$srcdir"; then
557   ac_srcdir_defaulted=yes
558   # Try the directory containing this script, then its parent.
559   ac_prog=$0
560   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
561   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
562   srcdir=$ac_confdir
563   if test ! -r $srcdir/$ac_unique_file; then
564     srcdir=..
565   fi
566 else
567   ac_srcdir_defaulted=no
568 fi
569 if test ! -r $srcdir/$ac_unique_file; then
570   if test "$ac_srcdir_defaulted" = yes; then
571     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
572   else
573     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
574   fi
575 fi
576 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
577
578 # Prefer explicitly selected file to automatically selected ones.
579 if test -z "$CONFIG_SITE"; then
580   if test "x$prefix" != xNONE; then
581     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
582   else
583     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
584   fi
585 fi
586 for ac_site_file in $CONFIG_SITE; do
587   if test -r "$ac_site_file"; then
588     echo "loading site script $ac_site_file"
589     . "$ac_site_file"
590   fi
591 done
592
593
594 ac_ext=c
595 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
596 ac_cpp='$CPP $CPPFLAGS'
597 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
598 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
599 cross_compiling=$ac_cv_prog_cc_cross
600
601 ac_exeext=
602 ac_objext=o
603 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
604   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
605   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
606     ac_n= ac_c='
607 ' ac_t='        '
608   else
609     ac_n=-n ac_c= ac_t=
610   fi
611 else
612   ac_n= ac_c='\c' ac_t=
613 fi
614
615 ac_aux_dir=
616 for ac_dir in build $srcdir/build; do
617   if test -f $ac_dir/install-sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install-sh -c"
620     break
621   elif test -f $ac_dir/install.sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install.sh -c"
624     break
625   fi
626 done
627 if test -z "$ac_aux_dir"; then
628   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
629 fi
630 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
631 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
632 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
633
634 OL_VERSION=`cat $ac_aux_dir/version`
635 if test -z "$OL_VERSION"; then
636         { echo "configure: error: could not determine version" 1>&2; exit 1; }
637 fi
638
639
640 echo $ac_n "checking host system type""... $ac_c" 1>&6
641 echo "configure:642: checking host system type" >&5
642 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
643
644 # Make sure we can run config.sub.
645   if $ac_config_sub sun4 >/dev/null 2>&1; then :
646     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
647   fi
648
649   ac_cv_host_alias=$host
650   case "$ac_cv_host_alias" in
651   NONE)
652     case $nonopt in
653     NONE)
654       if ac_cv_host_alias=`$ac_config_guess`; then :
655       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
656       fi ;;
657     *) ac_cv_host_alias=$nonopt ;;
658     esac ;;
659   esac
660
661   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
662   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
663   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
664   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
665 else
666   echo $ac_n "(cached) $ac_c" 1>&6
667 fi
668
669 echo "$ac_t""$ac_cv_host" 1>&6
670
671 host=$ac_cv_host
672 host_alias=$ac_cv_host_alias
673 host_cpu=$ac_cv_host_cpu
674 host_vendor=$ac_cv_host_vendor
675 host_os=$ac_cv_host_os
676
677
678
679
680
681 echo $ac_n "checking target system type""... $ac_c" 1>&6
682 echo "configure:683: checking target system type" >&5
683 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
684
685 # Make sure we can run config.sub.
686   if $ac_config_sub sun4 >/dev/null 2>&1; then :
687     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
688   fi
689
690   ac_cv_target_alias=$target
691   case "$ac_cv_target_alias" in
692   NONE)
693     case $nonopt in
694     NONE)
695       ac_cv_target_alias=$host_alias ;;
696
697     *) ac_cv_target_alias=$nonopt ;;
698     esac ;;
699   esac
700
701   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
702   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
703   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
704   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
705 else
706   echo $ac_n "(cached) $ac_c" 1>&6
707 fi
708
709 echo "$ac_t""$ac_cv_target" 1>&6
710
711 target=$ac_cv_target
712 target_alias=$ac_cv_target_alias
713 target_cpu=$ac_cv_target_cpu
714 target_vendor=$ac_cv_target_vendor
715 target_os=$ac_cv_target_os
716
717
718
719
720
721 echo $ac_n "checking build system type""... $ac_c" 1>&6
722 echo "configure:723: checking build system type" >&5
723 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
724
725 # Make sure we can run config.sub.
726   if $ac_config_sub sun4 >/dev/null 2>&1; then :
727     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
728   fi
729
730   ac_cv_build_alias=$build
731   case "$ac_cv_build_alias" in
732   NONE)
733     case $nonopt in
734     NONE)
735       ac_cv_build_alias=$host_alias ;;
736
737     *) ac_cv_build_alias=$nonopt ;;
738     esac ;;
739   esac
740
741   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
742   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
743   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
744   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
745 else
746   echo $ac_n "(cached) $ac_c" 1>&6
747 fi
748
749 echo "$ac_t""$ac_cv_build" 1>&6
750
751 build=$ac_cv_build
752 build_alias=$ac_cv_build_alias
753 build_cpu=$ac_cv_build_cpu
754 build_vendor=$ac_cv_build_vendor
755 build_os=$ac_cv_build_os
756
757
758
759
760
761 # Do some error checking and defaulting for the host and target type.
762 # The inputs are:
763 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
764 #
765 # The rules are:
766 # 1. You are not allowed to specify --host, --target, and nonopt at the
767 #    same time.
768 # 2. Host defaults to nonopt.
769 # 3. If nonopt is not specified, then host defaults to the current host,
770 #    as determined by config.guess.
771 # 4. Target and build default to nonopt.
772 # 5. If nonopt is not specified, then target and build default to host.
773
774 # The aliases save the names the user supplied, while $host etc.
775 # will get canonicalized.
776 case $host---$target---$nonopt in
777 NONE---*---* | *---NONE---* | *---*---NONE) ;;
778 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
779 esac
780
781 test "$host_alias" != "$target_alias" &&
782   test "$program_prefix$program_suffix$program_transform_name" = \
783     NONENONEs,x,x, &&
784   program_prefix=${target_alias}-
785
786
787 # Find a good install program.  We prefer a C program (faster),
788 # so one script is as good as another.  But avoid the broken or
789 # incompatible versions:
790 # SysV /etc/install, /usr/sbin/install
791 # SunOS /usr/etc/install
792 # IRIX /sbin/install
793 # AIX /bin/install
794 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
795 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
796 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
797 # ./install, which can be erroneously created by make from ./install.sh.
798 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
799 echo "configure:800: checking for a BSD compatible install" >&5
800 if test -z "$INSTALL"; then
801 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
802   echo $ac_n "(cached) $ac_c" 1>&6
803 else
804     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
805   for ac_dir in $PATH; do
806     # Account for people who put trailing slashes in PATH elements.
807     case "$ac_dir/" in
808     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
809     *)
810       # OSF1 and SCO ODT 3.0 have their own names for install.
811       # Don't use installbsd from OSF since it installs stuff as root
812       # by default.
813       for ac_prog in ginstall scoinst install; do
814         if test -f $ac_dir/$ac_prog; then
815           if test $ac_prog = install &&
816             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
817             # AIX install.  It has an incompatible calling convention.
818             :
819           elif test $ac_prog = install &&
820             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
821             # program-specific install script used by HP pwplus--don't use.
822             :
823           else
824             ac_cv_path_install="$ac_dir/$ac_prog -c"
825             break 2
826           fi
827         fi
828       done
829       ;;
830     esac
831   done
832   IFS="$ac_save_IFS"
833
834 fi
835   if test "${ac_cv_path_install+set}" = set; then
836     INSTALL="$ac_cv_path_install"
837   else
838     # As a last resort, use the slow shell script.  We don't cache a
839     # path for INSTALL within a source directory, because that will
840     # break other packages using the cache if that directory is
841     # removed, or if the path is relative.
842     INSTALL="$ac_install_sh"
843   fi
844 fi
845 echo "$ac_t""$INSTALL" 1>&6
846
847 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
848 # It thinks the first close brace ends the variable substitution.
849 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
850
851 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
852
853 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
854
855 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
856 echo "configure:857: checking whether build environment is sane" >&5
857 # Just in case
858 sleep 1
859 echo timestamp > conftestfile
860 # Do `set' in a subshell so we don't clobber the current shell's
861 # arguments.  Must try -L first in case configure is actually a
862 # symlink; some systems play weird games with the mod time of symlinks
863 # (eg FreeBSD returns the mod time of the symlink's containing
864 # directory).
865 if (
866    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
867    if test "$*" = "X"; then
868       # -L didn't work.
869       set X `ls -t $srcdir/configure conftestfile`
870    fi
871    if test "$*" != "X $srcdir/configure conftestfile" \
872       && test "$*" != "X conftestfile $srcdir/configure"; then
873
874       # If neither matched, then we have a broken ls.  This can happen
875       # if, for instance, CONFIG_SHELL is bash and it inherits a
876       # broken ls alias from the environment.  This has actually
877       # happened.  Such a system could not be considered "sane".
878       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
879 alias in your environment" 1>&2; exit 1; }
880    fi
881
882    test "$2" = conftestfile
883    )
884 then
885    # Ok.
886    :
887 else
888    { echo "configure: error: newly created file is older than distributed files!
889 Check your system clock" 1>&2; exit 1; }
890 fi
891 rm -f conftest*
892 echo "$ac_t""yes" 1>&6
893 if test "$program_transform_name" = s,x,x,; then
894   program_transform_name=
895 else
896   # Double any \ or $.  echo might interpret backslashes.
897   cat <<\EOF_SED > conftestsed
898 s,\\,\\\\,g; s,\$,$$,g
899 EOF_SED
900   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
901   rm -f conftestsed
902 fi
903 test "$program_prefix" != NONE &&
904   program_transform_name="s,^,${program_prefix},;$program_transform_name"
905 # Use a double $ so make ignores it.
906 test "$program_suffix" != NONE &&
907   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
908
909 # sed with no file args requires a program.
910 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
911
912 for ac_prog in mawk gawk nawk awk
913 do
914 # Extract the first word of "$ac_prog", so it can be a program name with args.
915 set dummy $ac_prog; ac_word=$2
916 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
917 echo "configure:918: checking for $ac_word" >&5
918 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
919   echo $ac_n "(cached) $ac_c" 1>&6
920 else
921   if test -n "$AWK"; then
922   ac_cv_prog_AWK="$AWK" # Let the user override the test.
923 else
924   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
925   ac_dummy="$PATH"
926   for ac_dir in $ac_dummy; do
927     test -z "$ac_dir" && ac_dir=.
928     if test -f $ac_dir/$ac_word; then
929       ac_cv_prog_AWK="$ac_prog"
930       break
931     fi
932   done
933   IFS="$ac_save_ifs"
934 fi
935 fi
936 AWK="$ac_cv_prog_AWK"
937 if test -n "$AWK"; then
938   echo "$ac_t""$AWK" 1>&6
939 else
940   echo "$ac_t""no" 1>&6
941 fi
942
943 test -n "$AWK" && break
944 done
945
946 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
947 echo "configure:948: checking whether ${MAKE-make} sets \${MAKE}" >&5
948 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
949 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
950   echo $ac_n "(cached) $ac_c" 1>&6
951 else
952   cat > conftestmake <<\EOF
953 all:
954         @echo 'ac_maketemp="${MAKE}"'
955 EOF
956 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
957 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
958 if test -n "$ac_maketemp"; then
959   eval ac_cv_prog_make_${ac_make}_set=yes
960 else
961   eval ac_cv_prog_make_${ac_make}_set=no
962 fi
963 rm -f conftestmake
964 fi
965 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
966   echo "$ac_t""yes" 1>&6
967   SET_MAKE=
968 else
969   echo "$ac_t""no" 1>&6
970   SET_MAKE="MAKE=${MAKE-make}"
971 fi
972
973
974
975 PACKAGE=OpenLDAP
976
977 VERSION=$OL_VERSION
978
979 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
980   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
981 fi
982
983
984
985 missing_dir=`cd $ac_aux_dir && pwd`
986 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
987 echo "configure:988: checking for working aclocal" >&5
988 # Run test in a subshell; some versions of sh will print an error if
989 # an executable is not found, even if stderr is redirected.
990 # Redirect stdin to placate older versions of autoconf.  Sigh.
991 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
992    ACLOCAL=aclocal
993    echo "$ac_t""found" 1>&6
994 else
995    ACLOCAL="$missing_dir/missing aclocal"
996    echo "$ac_t""missing" 1>&6
997 fi
998
999 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1000 echo "configure:1001: checking for working autoconf" >&5
1001 # Run test in a subshell; some versions of sh will print an error if
1002 # an executable is not found, even if stderr is redirected.
1003 # Redirect stdin to placate older versions of autoconf.  Sigh.
1004 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1005    AUTOCONF=autoconf
1006    echo "$ac_t""found" 1>&6
1007 else
1008    AUTOCONF="$missing_dir/missing autoconf"
1009    echo "$ac_t""missing" 1>&6
1010 fi
1011
1012 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1013 echo "configure:1014: checking for working automake" >&5
1014 # Run test in a subshell; some versions of sh will print an error if
1015 # an executable is not found, even if stderr is redirected.
1016 # Redirect stdin to placate older versions of autoconf.  Sigh.
1017 if (automake --version) < /dev/null > /dev/null 2>&1; then
1018    AUTOMAKE=automake
1019    echo "$ac_t""found" 1>&6
1020 else
1021    AUTOMAKE="$missing_dir/missing automake"
1022    echo "$ac_t""missing" 1>&6
1023 fi
1024
1025 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1026 echo "configure:1027: checking for working autoheader" >&5
1027 # Run test in a subshell; some versions of sh will print an error if
1028 # an executable is not found, even if stderr is redirected.
1029 # Redirect stdin to placate older versions of autoconf.  Sigh.
1030 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1031    AUTOHEADER=autoheader
1032    echo "$ac_t""found" 1>&6
1033 else
1034    AUTOHEADER="$missing_dir/missing autoheader"
1035    echo "$ac_t""missing" 1>&6
1036 fi
1037
1038 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1039 echo "configure:1040: checking for working makeinfo" >&5
1040 # Run test in a subshell; some versions of sh will print an error if
1041 # an executable is not found, even if stderr is redirected.
1042 # Redirect stdin to placate older versions of autoconf.  Sigh.
1043 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1044    MAKEINFO=makeinfo
1045    echo "$ac_t""found" 1>&6
1046 else
1047    MAKEINFO="$missing_dir/missing makeinfo"
1048    echo "$ac_t""missing" 1>&6
1049 fi
1050
1051 install_sh="$missing_dir/install-sh"
1052 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1053
1054 for ac_prog in gnutar gtar tar
1055 do
1056 # Extract the first word of "$ac_prog", so it can be a program name with args.
1057 set dummy $ac_prog; ac_word=$2
1058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1059 echo "configure:1060: checking for $ac_word" >&5
1060 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063   if test -n "$AMTAR"; then
1064   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1065 else
1066   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1067   ac_dummy="$PATH"
1068   for ac_dir in $ac_dummy; do
1069     test -z "$ac_dir" && ac_dir=.
1070     if test -f $ac_dir/$ac_word; then
1071       ac_cv_prog_AMTAR="$ac_prog"
1072       break
1073     fi
1074   done
1075   IFS="$ac_save_ifs"
1076 fi
1077 fi
1078 AMTAR="$ac_cv_prog_AMTAR"
1079 if test -n "$AMTAR"; then
1080   echo "$ac_t""$AMTAR" 1>&6
1081 else
1082   echo "$ac_t""no" 1>&6
1083 fi
1084
1085 test -n "$AMTAR" && break
1086 done
1087
1088
1089 AMTARFLAGS=
1090 if test -n "$AMTAR"; then
1091   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1092         AMTARFLAGS=o
1093   fi
1094 fi
1095
1096
1097
1098 cat >> confdefs.h <<EOF
1099 #define OPENLDAP_PACKAGE "$PACKAGE"
1100 EOF
1101
1102 cat >> confdefs.h <<EOF
1103 #define OPENLDAP_VERSION "$VERSION"
1104 EOF
1105
1106
1107
1108
1109 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1110 echo "configure:1111: checking configure arguments" >&5
1111
1112
1113 top_builddir=`pwd`
1114
1115 cat >> confdefs.h <<\EOF
1116 #define HAVE_MKVERSION 1
1117 EOF
1118
1119
1120 ldap_subdir="openldap"
1121
1122 # Check whether --with-subdir or --without-subdir was given.
1123 if test "${with_subdir+set}" = set; then
1124   withval="$with_subdir"
1125   
1126         if test "$withval" = "no"; then
1127                 ldap_subdir=""
1128         elif test "$withval" != "yes"; then
1129                 ldap_subdir="$withval"
1130         fi
1131
1132 fi
1133
1134
1135 # OpenLDAP --enable-debug
1136         # Check whether --enable-debug or --disable-debug was given.
1137 if test "${enable_debug+set}" = set; then
1138   enableval="$enable_debug"
1139   
1140         ol_arg=invalid
1141         for ol_val in auto yes no ; do
1142                 if test "$enableval" = "$ol_val" ; then
1143                         ol_arg="$ol_val"
1144                 fi
1145         done
1146         if test "$ol_arg" = "invalid" ; then
1147                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1148         fi
1149         ol_enable_debug="$ol_arg"
1150
1151 else
1152         ol_enable_debug="yes"
1153 fi
1154 # end --enable-debug
1155 # OpenLDAP --enable-syslog
1156         # Check whether --enable-syslog or --disable-syslog was given.
1157 if test "${enable_syslog+set}" = set; then
1158   enableval="$enable_syslog"
1159   
1160         ol_arg=invalid
1161         for ol_val in auto yes no ; do
1162                 if test "$enableval" = "$ol_val" ; then
1163                         ol_arg="$ol_val"
1164                 fi
1165         done
1166         if test "$ol_arg" = "invalid" ; then
1167                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1168         fi
1169         ol_enable_syslog="$ol_arg"
1170
1171 else
1172         ol_enable_syslog="auto"
1173 fi
1174 # end --enable-syslog
1175 # OpenLDAP --enable-proctitle
1176         # Check whether --enable-proctitle or --disable-proctitle was given.
1177 if test "${enable_proctitle+set}" = set; then
1178   enableval="$enable_proctitle"
1179   
1180         ol_arg=invalid
1181         for ol_val in auto yes no ; do
1182                 if test "$enableval" = "$ol_val" ; then
1183                         ol_arg="$ol_val"
1184                 fi
1185         done
1186         if test "$ol_arg" = "invalid" ; then
1187                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1188         fi
1189         ol_enable_proctitle="$ol_arg"
1190
1191 else
1192         ol_enable_proctitle="yes"
1193 fi
1194 # end --enable-proctitle
1195 # OpenLDAP --enable-cache
1196         # Check whether --enable-cache or --disable-cache was given.
1197 if test "${enable_cache+set}" = set; then
1198   enableval="$enable_cache"
1199   
1200         ol_arg=invalid
1201         for ol_val in auto yes no ; do
1202                 if test "$enableval" = "$ol_val" ; then
1203                         ol_arg="$ol_val"
1204                 fi
1205         done
1206         if test "$ol_arg" = "invalid" ; then
1207                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1208         fi
1209         ol_enable_cache="$ol_arg"
1210
1211 else
1212         ol_enable_cache="yes"
1213 fi
1214 # end --enable-cache
1215 # OpenLDAP --enable-dns
1216         # Check whether --enable-dns or --disable-dns was given.
1217 if test "${enable_dns+set}" = set; then
1218   enableval="$enable_dns"
1219   
1220         ol_arg=invalid
1221         for ol_val in auto yes no ; do
1222                 if test "$enableval" = "$ol_val" ; then
1223                         ol_arg="$ol_val"
1224                 fi
1225         done
1226         if test "$ol_arg" = "invalid" ; then
1227                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1228         fi
1229         ol_enable_dns="$ol_arg"
1230
1231 else
1232         ol_enable_dns="no"
1233 fi
1234 # end --enable-dns
1235 # OpenLDAP --enable-referrals
1236         # Check whether --enable-referrals or --disable-referrals was given.
1237 if test "${enable_referrals+set}" = set; then
1238   enableval="$enable_referrals"
1239   
1240         ol_arg=invalid
1241         for ol_val in auto yes no ; do
1242                 if test "$enableval" = "$ol_val" ; then
1243                         ol_arg="$ol_val"
1244                 fi
1245         done
1246         if test "$ol_arg" = "invalid" ; then
1247                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1248         fi
1249         ol_enable_referrals="$ol_arg"
1250
1251 else
1252         ol_enable_referrals="yes"
1253 fi
1254 # end --enable-referrals
1255 # OpenLDAP --enable-cldap
1256         # Check whether --enable-cldap or --disable-cldap was given.
1257 if test "${enable_cldap+set}" = set; then
1258   enableval="$enable_cldap"
1259   
1260         ol_arg=invalid
1261         for ol_val in auto yes no ; do
1262                 if test "$enableval" = "$ol_val" ; then
1263                         ol_arg="$ol_val"
1264                 fi
1265         done
1266         if test "$ol_arg" = "invalid" ; then
1267                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1268         fi
1269         ol_enable_cldap="$ol_arg"
1270
1271 else
1272         ol_enable_cldap="no"
1273 fi
1274 # end --enable-cldap
1275 # OpenLDAP --enable-x_compile
1276         # Check whether --enable-x_compile or --disable-x_compile was given.
1277 if test "${enable_x_compile+set}" = set; then
1278   enableval="$enable_x_compile"
1279   
1280         ol_arg=invalid
1281         for ol_val in yes no ; do
1282                 if test "$enableval" = "$ol_val" ; then
1283                         ol_arg="$ol_val"
1284                 fi
1285         done
1286         if test "$ol_arg" = "invalid" ; then
1287                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1288         fi
1289         ol_enable_x_compile="$ol_arg"
1290
1291 else
1292         ol_enable_x_compile="no"
1293 fi
1294 # end --enable-x_compile
1295
1296 # OpenLDAP --enable-dmalloc
1297         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1298 if test "${enable_dmalloc+set}" = set; then
1299   enableval="$enable_dmalloc"
1300   
1301         ol_arg=invalid
1302         for ol_val in auto yes no ; do
1303                 if test "$enableval" = "$ol_val" ; then
1304                         ol_arg="$ol_val"
1305                 fi
1306         done
1307         if test "$ol_arg" = "invalid" ; then
1308                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1309         fi
1310         ol_enable_dmalloc="$ol_arg"
1311
1312 else
1313         ol_enable_dmalloc="no"
1314 fi
1315 # end --enable-dmalloc
1316
1317 # OpenLDAP --with-kerberos
1318         # Check whether --with-kerberos or --without-kerberos was given.
1319 if test "${with_kerberos+set}" = set; then
1320   withval="$with_kerberos"
1321   
1322         ol_arg=invalid
1323         for ol_val in auto k5 k4 afs yes no ; do
1324                 if test "$withval" = "$ol_val" ; then
1325                         ol_arg="$ol_val"
1326                 fi
1327         done
1328         if test "$ol_arg" = "invalid" ; then
1329                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1330         fi
1331         ol_with_kerberos="$ol_arg"
1332
1333 else
1334         ol_with_kerberos="auto"
1335 fi
1336 # end --with-kerberos
1337
1338 # OpenLDAP --with-readline
1339         # Check whether --with-readline or --without-readline was given.
1340 if test "${with_readline+set}" = set; then
1341   withval="$with_readline"
1342   
1343         ol_arg=invalid
1344         for ol_val in auto yes no  ; do
1345                 if test "$withval" = "$ol_val" ; then
1346                         ol_arg="$ol_val"
1347                 fi
1348         done
1349         if test "$ol_arg" = "invalid" ; then
1350                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1351         fi
1352         ol_with_readline="$ol_arg"
1353
1354 else
1355         ol_with_readline="auto"
1356 fi
1357 # end --with-readline
1358
1359 # OpenLDAP --with-threads
1360         # Check whether --with-threads or --without-threads was given.
1361 if test "${with_threads+set}" = set; then
1362   withval="$with_threads"
1363   
1364         ol_arg=invalid
1365         for ol_val in auto posix mach lwp yes no manual  ; do
1366                 if test "$withval" = "$ol_val" ; then
1367                         ol_arg="$ol_val"
1368                 fi
1369         done
1370         if test "$ol_arg" = "invalid" ; then
1371                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1372         fi
1373         ol_with_threads="$ol_arg"
1374
1375 else
1376         ol_with_threads="auto"
1377 fi
1378 # end --with-threads
1379
1380 # OpenLDAP --with-tls
1381         # Check whether --with-tls or --without-tls was given.
1382 if test "${with_tls+set}" = set; then
1383   withval="$with_tls"
1384   
1385         ol_arg=invalid
1386         for ol_val in auto ssleay openssl yes no  ; do
1387                 if test "$withval" = "$ol_val" ; then
1388                         ol_arg="$ol_val"
1389                 fi
1390         done
1391         if test "$ol_arg" = "invalid" ; then
1392                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1393         fi
1394         ol_with_tls="$ol_arg"
1395
1396 else
1397         ol_with_tls="auto"
1398 fi
1399 # end --with-tls
1400
1401 # OpenLDAP --with-yielding_select
1402         # Check whether --with-yielding_select or --without-yielding_select was given.
1403 if test "${with_yielding_select+set}" = set; then
1404   withval="$with_yielding_select"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no manual  ; do
1408                 if test "$withval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1414         fi
1415         ol_with_yielding_select="$ol_arg"
1416
1417 else
1418         ol_with_yielding_select="auto"
1419 fi
1420 # end --with-yielding_select
1421
1422
1423
1424 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1425 if test "${with_xxldapdoptions+set}" = set; then
1426   withval="$with_xxldapdoptions"
1427   :
1428 fi
1429
1430 # OpenLDAP --enable-ldapd
1431         # Check whether --enable-ldapd or --disable-ldapd was given.
1432 if test "${enable_ldapd+set}" = set; then
1433   enableval="$enable_ldapd"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no ; do
1437                 if test "$enableval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1443         fi
1444         ol_enable_ldapd="$ol_arg"
1445
1446 else
1447         ol_enable_ldapd="no"
1448 fi
1449 # end --enable-ldapd
1450
1451 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1452 if test "${with_xxslapdoptions+set}" = set; then
1453   withval="$with_xxslapdoptions"
1454   :
1455 fi
1456
1457 # OpenLDAP --enable-slapd
1458         # Check whether --enable-slapd or --disable-slapd was given.
1459 if test "${enable_slapd+set}" = set; then
1460   enableval="$enable_slapd"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto yes no ; do
1464                 if test "$enableval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1470         fi
1471         ol_enable_slapd="$ol_arg"
1472
1473 else
1474         ol_enable_slapd="yes"
1475 fi
1476 # end --enable-slapd
1477 # OpenLDAP --enable-cleartext
1478         # Check whether --enable-cleartext or --disable-cleartext was given.
1479 if test "${enable_cleartext+set}" = set; then
1480   enableval="$enable_cleartext"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto yes no ; do
1484                 if test "$enableval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1490         fi
1491         ol_enable_cleartext="$ol_arg"
1492
1493 else
1494         ol_enable_cleartext="yes"
1495 fi
1496 # end --enable-cleartext
1497 # OpenLDAP --enable-crypt
1498         # Check whether --enable-crypt or --disable-crypt was given.
1499 if test "${enable_crypt+set}" = set; then
1500   enableval="$enable_crypt"
1501   
1502         ol_arg=invalid
1503         for ol_val in auto yes no ; do
1504                 if test "$enableval" = "$ol_val" ; then
1505                         ol_arg="$ol_val"
1506                 fi
1507         done
1508         if test "$ol_arg" = "invalid" ; then
1509                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1510         fi
1511         ol_enable_crypt="$ol_arg"
1512
1513 else
1514         ol_enable_crypt="auto"
1515 fi
1516 # end --enable-crypt
1517 # OpenLDAP --enable-modules
1518         # Check whether --enable-modules or --disable-modules was given.
1519 if test "${enable_modules+set}" = set; then
1520   enableval="$enable_modules"
1521   
1522         ol_arg=invalid
1523         for ol_val in auto yes no ; do
1524                 if test "$enableval" = "$ol_val" ; then
1525                         ol_arg="$ol_val"
1526                 fi
1527         done
1528         if test "$ol_arg" = "invalid" ; then
1529                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1530         fi
1531         ol_enable_modules="$ol_arg"
1532
1533 else
1534         ol_enable_modules="no"
1535 fi
1536 # end --enable-modules
1537 # OpenLDAP --enable-phonetic
1538         # Check whether --enable-phonetic or --disable-phonetic was given.
1539 if test "${enable_phonetic+set}" = set; then
1540   enableval="$enable_phonetic"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no ; do
1544                 if test "$enableval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1550         fi
1551         ol_enable_phonetic="$ol_arg"
1552
1553 else
1554         ol_enable_phonetic="no"
1555 fi
1556 # end --enable-phonetic
1557 # OpenLDAP --enable-rlookups
1558         # Check whether --enable-rlookups or --disable-rlookups was given.
1559 if test "${enable_rlookups+set}" = set; then
1560   enableval="$enable_rlookups"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no ; do
1564                 if test "$enableval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1570         fi
1571         ol_enable_rlookups="$ol_arg"
1572
1573 else
1574         ol_enable_rlookups="auto"
1575 fi
1576 # end --enable-rlookups
1577 # OpenLDAP --enable-wrappers
1578         # Check whether --enable-wrappers or --disable-wrappers was given.
1579 if test "${enable_wrappers+set}" = set; then
1580   enableval="$enable_wrappers"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1590         fi
1591         ol_enable_wrappers="$ol_arg"
1592
1593 else
1594         ol_enable_wrappers="no"
1595 fi
1596 # end --enable-wrappers
1597
1598 # OpenLDAP --enable-bdb2
1599         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1600 if test "${enable_bdb2+set}" = set; then
1601   enableval="$enable_bdb2"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no ; do
1605                 if test "$enableval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1611         fi
1612         ol_enable_bdb2="$ol_arg"
1613
1614 else
1615         ol_enable_bdb2="no"
1616 fi
1617 # end --enable-bdb2
1618 # OpenLDAP --with-bdb2_module
1619         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1620 if test "${with_bdb2_module+set}" = set; then
1621   withval="$with_bdb2_module"
1622   
1623         ol_arg=invalid
1624         for ol_val in static dynamic ; do
1625                 if test "$withval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1631         fi
1632         ol_with_bdb2_module="$ol_arg"
1633
1634 else
1635         ol_with_bdb2_module="static"
1636 fi
1637 # end --with-bdb2_module
1638
1639 # OpenLDAP --enable-ldap
1640         # Check whether --enable-ldap or --disable-ldap was given.
1641 if test "${enable_ldap+set}" = set; then
1642   enableval="$enable_ldap"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1652         fi
1653         ol_enable_ldap="$ol_arg"
1654
1655 else
1656         ol_enable_ldap="no"
1657 fi
1658 # end --enable-ldap
1659 # OpenLDAP --with-ldap_module
1660         # Check whether --with-ldap_module or --without-ldap_module was given.
1661 if test "${with_ldap_module+set}" = set; then
1662   withval="$with_ldap_module"
1663   
1664         ol_arg=invalid
1665         for ol_val in static dynamic ; do
1666                 if test "$withval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1672         fi
1673         ol_with_ldap_module="$ol_arg"
1674
1675 else
1676         ol_with_ldap_module="static"
1677 fi
1678 # end --with-ldap_module
1679
1680 # OpenLDAP --enable-ldbm
1681         # Check whether --enable-ldbm or --disable-ldbm was given.
1682 if test "${enable_ldbm+set}" = set; then
1683   enableval="$enable_ldbm"
1684   
1685         ol_arg=invalid
1686         for ol_val in auto yes no ; do
1687                 if test "$enableval" = "$ol_val" ; then
1688                         ol_arg="$ol_val"
1689                 fi
1690         done
1691         if test "$ol_arg" = "invalid" ; then
1692                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1693         fi
1694         ol_enable_ldbm="$ol_arg"
1695
1696 else
1697         ol_enable_ldbm="yes"
1698 fi
1699 # end --enable-ldbm
1700 # OpenLDAP --with-ldbm_module
1701         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1702 if test "${with_ldbm_module+set}" = set; then
1703   withval="$with_ldbm_module"
1704   
1705         ol_arg=invalid
1706         for ol_val in static dynamic ; do
1707                 if test "$withval" = "$ol_val" ; then
1708                         ol_arg="$ol_val"
1709                 fi
1710         done
1711         if test "$ol_arg" = "invalid" ; then
1712                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1713         fi
1714         ol_with_ldbm_module="$ol_arg"
1715
1716 else
1717         ol_with_ldbm_module="static"
1718 fi
1719 # end --with-ldbm_module
1720
1721 # OpenLDAP --with-ldbm_api
1722         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1723 if test "${with_ldbm_api+set}" = set; then
1724   withval="$with_ldbm_api"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1728                 if test "$withval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1734         fi
1735         ol_with_ldbm_api="$ol_arg"
1736
1737 else
1738         ol_with_ldbm_api="auto"
1739 fi
1740 # end --with-ldbm_api
1741
1742 # OpenLDAP --with-ldbm_type
1743         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1744 if test "${with_ldbm_type+set}" = set; then
1745   withval="$with_ldbm_type"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto btree hash ; do
1749                 if test "$withval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1755         fi
1756         ol_with_ldbm_type="$ol_arg"
1757
1758 else
1759         ol_with_ldbm_type="auto"
1760 fi
1761 # end --with-ldbm_type
1762
1763
1764 # OpenLDAP --enable-passwd
1765         # Check whether --enable-passwd or --disable-passwd was given.
1766 if test "${enable_passwd+set}" = set; then
1767   enableval="$enable_passwd"
1768   
1769         ol_arg=invalid
1770         for ol_val in auto yes no ; do
1771                 if test "$enableval" = "$ol_val" ; then
1772                         ol_arg="$ol_val"
1773                 fi
1774         done
1775         if test "$ol_arg" = "invalid" ; then
1776                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1777         fi
1778         ol_enable_passwd="$ol_arg"
1779
1780 else
1781         ol_enable_passwd="no"
1782 fi
1783 # end --enable-passwd
1784 # OpenLDAP --with-passwd_module
1785         # Check whether --with-passwd_module or --without-passwd_module was given.
1786 if test "${with_passwd_module+set}" = set; then
1787   withval="$with_passwd_module"
1788   
1789         ol_arg=invalid
1790         for ol_val in static dynamic ; do
1791                 if test "$withval" = "$ol_val" ; then
1792                         ol_arg="$ol_val"
1793                 fi
1794         done
1795         if test "$ol_arg" = "invalid" ; then
1796                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1797         fi
1798         ol_with_passwd_module="$ol_arg"
1799
1800 else
1801         ol_with_passwd_module="static"
1802 fi
1803 # end --with-passwd_module
1804
1805 # OpenLDAP --enable-perl
1806         # Check whether --enable-perl or --disable-perl was given.
1807 if test "${enable_perl+set}" = set; then
1808   enableval="$enable_perl"
1809   
1810         ol_arg=invalid
1811         for ol_val in auto yes no ; do
1812                 if test "$enableval" = "$ol_val" ; then
1813                         ol_arg="$ol_val"
1814                 fi
1815         done
1816         if test "$ol_arg" = "invalid" ; then
1817                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1818         fi
1819         ol_enable_perl="$ol_arg"
1820
1821 else
1822         ol_enable_perl="no"
1823 fi
1824 # end --enable-perl
1825 # OpenLDAP --with-perl_module
1826         # Check whether --with-perl_module or --without-perl_module was given.
1827 if test "${with_perl_module+set}" = set; then
1828   withval="$with_perl_module"
1829   
1830         ol_arg=invalid
1831         for ol_val in static dynamic ; do
1832                 if test "$withval" = "$ol_val" ; then
1833                         ol_arg="$ol_val"
1834                 fi
1835         done
1836         if test "$ol_arg" = "invalid" ; then
1837                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1838         fi
1839         ol_with_perl_module="$ol_arg"
1840
1841 else
1842         ol_with_perl_module="static"
1843 fi
1844 # end --with-perl_module
1845
1846 # OpenLDAP --enable-shell
1847         # Check whether --enable-shell or --disable-shell was given.
1848 if test "${enable_shell+set}" = set; then
1849   enableval="$enable_shell"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1859         fi
1860         ol_enable_shell="$ol_arg"
1861
1862 else
1863         ol_enable_shell="no"
1864 fi
1865 # end --enable-shell
1866 # OpenLDAP --with-shell_module
1867         # Check whether --with-shell_module or --without-shell_module was given.
1868 if test "${with_shell_module+set}" = set; then
1869   withval="$with_shell_module"
1870   
1871         ol_arg=invalid
1872         for ol_val in static dynamic ; do
1873                 if test "$withval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1879         fi
1880         ol_with_shell_module="$ol_arg"
1881
1882 else
1883         ol_with_shell_module="static"
1884 fi
1885 # end --with-shell_module
1886
1887 # OpenLDAP --enable-tcl
1888         # Check whether --enable-tcl or --disable-tcl was given.
1889 if test "${enable_tcl+set}" = set; then
1890   enableval="$enable_tcl"
1891   
1892         ol_arg=invalid
1893         for ol_val in auto yes no ; do
1894                 if test "$enableval" = "$ol_val" ; then
1895                         ol_arg="$ol_val"
1896                 fi
1897         done
1898         if test "$ol_arg" = "invalid" ; then
1899                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1900         fi
1901         ol_enable_tcl="$ol_arg"
1902
1903 else
1904         ol_enable_tcl="no"
1905 fi
1906 # end --enable-tcl
1907 # OpenLDAP --with-tcl_module
1908         # Check whether --with-tcl_module or --without-tcl_module was given.
1909 if test "${with_tcl_module+set}" = set; then
1910   withval="$with_tcl_module"
1911   
1912         ol_arg=invalid
1913         for ol_val in static dynamic ; do
1914                 if test "$withval" = "$ol_val" ; then
1915                         ol_arg="$ol_val"
1916                 fi
1917         done
1918         if test "$ol_arg" = "invalid" ; then
1919                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1920         fi
1921         ol_with_tcl_module="$ol_arg"
1922
1923 else
1924         ol_with_tcl_module="static"
1925 fi
1926 # end --with-tcl_module
1927
1928
1929 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1930 if test "${with_xxslurpdoptions+set}" = set; then
1931   withval="$with_xxslurpdoptions"
1932   :
1933 fi
1934
1935 # OpenLDAP --enable-slurpd
1936         # Check whether --enable-slurpd or --disable-slurpd was given.
1937 if test "${enable_slurpd+set}" = set; then
1938   enableval="$enable_slurpd"
1939   
1940         ol_arg=invalid
1941         for ol_val in auto yes no ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1948         fi
1949         ol_enable_slurpd="$ol_arg"
1950
1951 else
1952         ol_enable_slurpd="auto"
1953 fi
1954 # end --enable-slurpd
1955
1956 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1957 if test "${with_xxliboptions+set}" = set; then
1958   withval="$with_xxliboptions"
1959   :
1960 fi
1961
1962 # Check whether --enable-static or --disable-static was given.
1963 if test "${enable_static+set}" = set; then
1964   enableval="$enable_static"
1965   p=${PACKAGE-default}
1966 case "$enableval" in
1967 yes) enable_static=yes ;;
1968 no) enable_static=no ;;
1969 *)
1970   enable_static=no
1971   # Look at the argument we got.  We use all the common list separators.
1972   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1973   for pkg in $enableval; do
1974     if test "X$pkg" = "X$p"; then
1975       enable_static=yes
1976     fi
1977   done
1978   IFS="$ac_save_ifs"
1979   ;;
1980 esac
1981 else
1982   enable_static=yes
1983 fi
1984
1985 # Check whether --enable-shared or --disable-shared was given.
1986 if test "${enable_shared+set}" = set; then
1987   enableval="$enable_shared"
1988   p=${PACKAGE-default}
1989 case "$enableval" in
1990 yes) enable_shared=yes ;;
1991 no) enable_shared=no ;;
1992 *)
1993   enable_shared=no
1994   # Look at the argument we got.  We use all the common list separators.
1995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1996   for pkg in $enableval; do
1997     if test "X$pkg" = "X$p"; then
1998       enable_shared=yes
1999     fi
2000   done
2001   IFS="$ac_save_ifs"
2002   ;;
2003 esac
2004 else
2005   enable_shared=yes
2006 fi
2007
2008
2009 # validate options
2010 if test $ol_enable_dns = yes ; then
2011         if test $ol_enable_referrals = no ; then
2012                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2013         fi
2014         if test $ol_enable_referrals = auto ; then
2015                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2016                 ol_enable_referrals=yes
2017         fi
2018 fi
2019
2020 if test $ol_enable_slapd = no ; then
2021                 if test $ol_enable_bdb2 = yes ; then
2022                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2023         fi
2024         if test $ol_enable_ldap = yes ; then
2025                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2026         fi
2027         if test $ol_enable_ldbm = yes ; then
2028                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2029         fi
2030         if test $ol_enable_passwd = yes ; then
2031                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2032         fi
2033         if test $ol_enable_perl = yes ; then
2034                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2035         fi
2036         if test $ol_enable_shell = yes ; then
2037                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2038         fi
2039         if test $ol_enable_tcl = yes ; then
2040                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2041         fi
2042         if test $ol_enable_modules = yes ; then
2043                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2044         fi
2045         if test $ol_enable_wrappers = yes ; then
2046                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2047         fi
2048         if test $ol_enable_phonetic = yes ; then
2049                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2050         fi
2051         if test $ol_enable_rlookups = yes ; then
2052                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2053         fi
2054         if test $ol_with_ldbm_api != auto ; then
2055                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2056         fi
2057         if test $ol_with_ldbm_type != auto ; then
2058                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2059         fi
2060         if test $ol_with_bdb2_module != static ; then
2061                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2062         fi
2063         if test $ol_with_ldap_module != static ; then
2064                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2065         fi
2066         if test $ol_with_ldbm_module != static ; then
2067                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2068         fi
2069         if test $ol_with_passwd_module != static ; then
2070                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2071         fi
2072         if test $ol_with_perl_module != static ; then
2073                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2074         fi
2075         if test $ol_with_shell_module != static ; then
2076                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2077         fi
2078         if test $ol_with_tcl_module != static ; then
2079                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2080         fi
2081         if test $ol_enable_slurpd = yes ; then
2082                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2083         fi
2084
2085         # force settings to no
2086         ol_enable_bdb2=no
2087         ol_enable_ldap=no
2088         ol_enable_ldbm=no
2089         ol_enable_passwd=no
2090         ol_enable_perl=no
2091         ol_enable_shell=no
2092         ol_enable_tcl=no
2093
2094         ol_enable_modules=no
2095         ol_enable_phonetic=no
2096         ol_enable_rlookups=no
2097         ol_enable_wrappers=no
2098
2099         ol_with_ldbm_api=no
2100         ol_with_ldbm_type=no
2101
2102         ol_with_bdb2_module=static
2103         ol_with_ldap_module=static
2104         ol_with_ldbm_module=static
2105         ol_with_passwd_module=static
2106         ol_with_perl_module=static
2107         ol_with_shell_module=static
2108         ol_with_tcl_module=static
2109
2110         ol_enable_slurpd=no
2111
2112 elif test $ol_enable_ldbm = no ; then
2113         
2114         if test $ol_with_ldbm_api != auto ; then
2115                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2116         fi
2117
2118         if test $ol_with_ldbm_type != auto ; then
2119                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2120         fi
2121
2122         if test $ol_with_ldbm_module != static ; then
2123                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2124         fi
2125
2126         if test $ol_enable_bdb2 = yes ; then
2127                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2128         fi
2129
2130         if test $ol_enable_modules != yes -a \
2131                 $ol_enable_ldap = no -a \
2132                 $ol_enable_passwd = no -a \
2133                 $ol_enable_perl = no -a \
2134                 $ol_enable_shell = no -a \
2135                 $ol_enable_tcl = no ; then
2136                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2137         fi
2138
2139         ol_with_ldbm_api=no
2140         ol_with_ldbm_type=no
2141         ol_with_ldbm_module=static
2142
2143 elif test $ol_enable_bdb2 = yes ; then
2144         
2145         if test $ol_with_ldbm_api != auto -a \
2146                 $ol_with_ldbm_api != db2 ; then
2147                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2148         fi
2149
2150         ol_with_ldbm_api=db2
2151
2152 else
2153         
2154         if test $ol_enable_bdb2 != no ; then
2155                 if test $ol_with_ldbm_api != auto -a \
2156                         $ol_with_ldbm_api != db2 ; then
2157                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2158                         ol_enable_bdb2=no
2159                 fi
2160         fi
2161
2162         if test $ol_with_ldbm_api = gdbm -a \
2163                 $ol_with_ldbm_type = btree ; then
2164                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2165         fi
2166         if test $ol_with_ldbm_api = mdbm -a \
2167                 $ol_with_ldbm_type = btree ; then
2168                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2169         fi
2170         if test $ol_with_ldbm_api = ndbm -a \
2171                 $ol_with_ldbm_type = btree ; then
2172                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2173         fi
2174 fi
2175
2176 if test $ol_enable_slurpd = yes ; then
2177                 if test $ol_with_threads = no ; then
2178                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2179         fi
2180 fi
2181
2182 echo "$ac_t""done" 1>&6
2183
2184 ## Initialize vars
2185 LDAP_LIBS=
2186 LDBM_LIBS=
2187 LTHREAD_LIBS=
2188 LUTIL_LIBS=
2189
2190 LDAPD_LIBS=
2191 SLAPD_LIBS=
2192 SLURPD_LIBS=
2193
2194 BUILD_LDAPD=no
2195 BUILD_SLAPD=no
2196 BUILD_SLURPD=no
2197
2198 BUILD_BDB2=no
2199 BUILD_LDAP=no
2200 BUILD_LDBM=no
2201 BUILD_PASSWD=no
2202 BUILD_PERL=no
2203 BUILD_SHELL=no
2204 BUILD_TCL=no
2205 BUILD_THREAD=no
2206
2207 BUILD_BDB2_DYNAMIC=no
2208 BUILD_LDAP_DYNAMIC=no
2209 BUILD_LDBM_DYNAMIC=no
2210 BUILD_PASSWD_DYNAMIC=no
2211 BUILD_PERL_DYNAMIC=no
2212 BUILD_SHELL_DYNAMIC=no
2213 BUILD_TCL_DYNAMIC=no
2214
2215 SLAPD_MODULES_LDFLAGS=
2216 SLAPD_MODULES_CPPFLAGS=
2217
2218 SLAPD_PERL_LDFLAGS=
2219 SLAPD_PERL_CPPFLAGS=
2220
2221 KRB_LIBS=
2222 READLINE_LIBS=
2223 TERMCAP_LIBS=
2224 TLS_LIBS=
2225
2226
2227
2228
2229 ol_aix_threads=no
2230 case "$target" in
2231 *-*-aix*)       if test -z "$CC" ; then
2232                 case "$ol_with_threads" in
2233                 auto | yes |  posix) ol_aix_threads=yes ;;
2234                 esac
2235         fi
2236 ;;
2237 esac
2238
2239 if test $ol_aix_threads = yes ; then
2240         if test -z "${CC}" ; then
2241                 for ac_prog in cc_r xlc_r cc
2242 do
2243 # Extract the first word of "$ac_prog", so it can be a program name with args.
2244 set dummy $ac_prog; ac_word=$2
2245 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2246 echo "configure:2247: checking for $ac_word" >&5
2247 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2248   echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250   if test -n "$CC"; then
2251   ac_cv_prog_CC="$CC" # Let the user override the test.
2252 else
2253   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2254   ac_dummy="$PATH"
2255   for ac_dir in $ac_dummy; do
2256     test -z "$ac_dir" && ac_dir=.
2257     if test -f $ac_dir/$ac_word; then
2258       ac_cv_prog_CC="$ac_prog"
2259       break
2260     fi
2261   done
2262   IFS="$ac_save_ifs"
2263 fi
2264 fi
2265 CC="$ac_cv_prog_CC"
2266 if test -n "$CC"; then
2267   echo "$ac_t""$CC" 1>&6
2268 else
2269   echo "$ac_t""no" 1>&6
2270 fi
2271
2272 test -n "$CC" && break
2273 done
2274
2275
2276                 if test "$CC" = cc ; then
2277                                                 if test $ol_with_threads != auto ; then
2278                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2279                         else
2280                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2281                         fi
2282                         ol_with_threads=no
2283                 fi
2284         fi
2285
2286         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2287                 ol_with_threads=posix
2288                 ol_cv_pthread_create=yes
2289         fi
2290 fi
2291
2292 if test -z "${CC}"; then
2293         for ac_prog in cc
2294 do
2295 # Extract the first word of "$ac_prog", so it can be a program name with args.
2296 set dummy $ac_prog; ac_word=$2
2297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2298 echo "configure:2299: checking for $ac_word" >&5
2299 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   if test -n "$CC"; then
2303   ac_cv_prog_CC="$CC" # Let the user override the test.
2304 else
2305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2306   ac_dummy="$PATH"
2307   for ac_dir in $ac_dummy; do
2308     test -z "$ac_dir" && ac_dir=.
2309     if test -f $ac_dir/$ac_word; then
2310       ac_cv_prog_CC="$ac_prog"
2311       break
2312     fi
2313   done
2314   IFS="$ac_save_ifs"
2315 fi
2316 fi
2317 CC="$ac_cv_prog_CC"
2318 if test -n "$CC"; then
2319   echo "$ac_t""$CC" 1>&6
2320 else
2321   echo "$ac_t""no" 1>&6
2322 fi
2323
2324 test -n "$CC" && break
2325 done
2326
2327 fi
2328
2329
2330 # Check whether --enable-fast-install or --disable-fast-install was given.
2331 if test "${enable_fast_install+set}" = set; then
2332   enableval="$enable_fast_install"
2333   p=${PACKAGE-default}
2334 case "$enableval" in
2335 yes) enable_fast_install=yes ;;
2336 no) enable_fast_install=no ;;
2337 *)
2338   enable_fast_install=no
2339   # Look at the argument we got.  We use all the common list separators.
2340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2341   for pkg in $enableval; do
2342     if test "X$pkg" = "X$p"; then
2343       enable_fast_install=yes
2344     fi
2345   done
2346   IFS="$ac_save_ifs"
2347   ;;
2348 esac
2349 else
2350   enable_fast_install=yes
2351 fi
2352
2353 # Extract the first word of "ranlib", so it can be a program name with args.
2354 set dummy ranlib; ac_word=$2
2355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2356 echo "configure:2357: checking for $ac_word" >&5
2357 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2358   echo $ac_n "(cached) $ac_c" 1>&6
2359 else
2360   if test -n "$RANLIB"; then
2361   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2362 else
2363   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2364   ac_dummy="$PATH"
2365   for ac_dir in $ac_dummy; do
2366     test -z "$ac_dir" && ac_dir=.
2367     if test -f $ac_dir/$ac_word; then
2368       ac_cv_prog_RANLIB="ranlib"
2369       break
2370     fi
2371   done
2372   IFS="$ac_save_ifs"
2373   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2374 fi
2375 fi
2376 RANLIB="$ac_cv_prog_RANLIB"
2377 if test -n "$RANLIB"; then
2378   echo "$ac_t""$RANLIB" 1>&6
2379 else
2380   echo "$ac_t""no" 1>&6
2381 fi
2382
2383 # Extract the first word of "gcc", so it can be a program name with args.
2384 set dummy gcc; ac_word=$2
2385 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2386 echo "configure:2387: checking for $ac_word" >&5
2387 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2388   echo $ac_n "(cached) $ac_c" 1>&6
2389 else
2390   if test -n "$CC"; then
2391   ac_cv_prog_CC="$CC" # Let the user override the test.
2392 else
2393   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2394   ac_dummy="$PATH"
2395   for ac_dir in $ac_dummy; do
2396     test -z "$ac_dir" && ac_dir=.
2397     if test -f $ac_dir/$ac_word; then
2398       ac_cv_prog_CC="gcc"
2399       break
2400     fi
2401   done
2402   IFS="$ac_save_ifs"
2403 fi
2404 fi
2405 CC="$ac_cv_prog_CC"
2406 if test -n "$CC"; then
2407   echo "$ac_t""$CC" 1>&6
2408 else
2409   echo "$ac_t""no" 1>&6
2410 fi
2411
2412 if test -z "$CC"; then
2413   # Extract the first word of "cc", so it can be a program name with args.
2414 set dummy cc; ac_word=$2
2415 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2416 echo "configure:2417: checking for $ac_word" >&5
2417 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2418   echo $ac_n "(cached) $ac_c" 1>&6
2419 else
2420   if test -n "$CC"; then
2421   ac_cv_prog_CC="$CC" # Let the user override the test.
2422 else
2423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2424   ac_prog_rejected=no
2425   ac_dummy="$PATH"
2426   for ac_dir in $ac_dummy; do
2427     test -z "$ac_dir" && ac_dir=.
2428     if test -f $ac_dir/$ac_word; then
2429       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2430         ac_prog_rejected=yes
2431         continue
2432       fi
2433       ac_cv_prog_CC="cc"
2434       break
2435     fi
2436   done
2437   IFS="$ac_save_ifs"
2438 if test $ac_prog_rejected = yes; then
2439   # We found a bogon in the path, so make sure we never use it.
2440   set dummy $ac_cv_prog_CC
2441   shift
2442   if test $# -gt 0; then
2443     # We chose a different compiler from the bogus one.
2444     # However, it has the same basename, so the bogon will be chosen
2445     # first if we set CC to just the basename; use the full file name.
2446     shift
2447     set dummy "$ac_dir/$ac_word" "$@"
2448     shift
2449     ac_cv_prog_CC="$@"
2450   fi
2451 fi
2452 fi
2453 fi
2454 CC="$ac_cv_prog_CC"
2455 if test -n "$CC"; then
2456   echo "$ac_t""$CC" 1>&6
2457 else
2458   echo "$ac_t""no" 1>&6
2459 fi
2460
2461   if test -z "$CC"; then
2462     case "`uname -s`" in
2463     *win32* | *WIN32* | *CYGWIN*)
2464       # Extract the first word of "cl", so it can be a program name with args.
2465 set dummy cl; ac_word=$2
2466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2467 echo "configure:2468: checking for $ac_word" >&5
2468 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2469   echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471   if test -n "$CC"; then
2472   ac_cv_prog_CC="$CC" # Let the user override the test.
2473 else
2474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2475   ac_dummy="$PATH"
2476   for ac_dir in $ac_dummy; do
2477     test -z "$ac_dir" && ac_dir=.
2478     if test -f $ac_dir/$ac_word; then
2479       ac_cv_prog_CC="cl"
2480       break
2481     fi
2482   done
2483   IFS="$ac_save_ifs"
2484 fi
2485 fi
2486 CC="$ac_cv_prog_CC"
2487 if test -n "$CC"; then
2488   echo "$ac_t""$CC" 1>&6
2489 else
2490   echo "$ac_t""no" 1>&6
2491 fi
2492  ;;
2493     esac
2494   fi
2495   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2496 fi
2497
2498 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2499 echo "configure:2500: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2500
2501 ac_ext=c
2502 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2503 ac_cpp='$CPP $CPPFLAGS'
2504 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2505 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2506 cross_compiling=$ac_cv_prog_cc_cross
2507
2508 cat > conftest.$ac_ext << EOF
2509
2510 #line 2511 "configure"
2511 #include "confdefs.h"
2512
2513 main(){return(0);}
2514 EOF
2515 if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2516   ac_cv_prog_cc_works=yes
2517   # If we can't run a trivial program, we are probably using a cross compiler.
2518   if (./conftest; exit) 2>/dev/null; then
2519     ac_cv_prog_cc_cross=no
2520   else
2521     ac_cv_prog_cc_cross=yes
2522   fi
2523 else
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   ac_cv_prog_cc_works=no
2527 fi
2528 rm -fr conftest*
2529 ac_ext=c
2530 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2531 ac_cpp='$CPP $CPPFLAGS'
2532 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2533 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2534 cross_compiling=$ac_cv_prog_cc_cross
2535
2536 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2537 if test $ac_cv_prog_cc_works = no; then
2538   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2539 fi
2540 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2541 echo "configure:2542: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2542 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2543 cross_compiling=$ac_cv_prog_cc_cross
2544
2545 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2546 echo "configure:2547: checking whether we are using GNU C" >&5
2547 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   cat > conftest.c <<EOF
2551 #ifdef __GNUC__
2552   yes;
2553 #endif
2554 EOF
2555 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2556   ac_cv_prog_gcc=yes
2557 else
2558   ac_cv_prog_gcc=no
2559 fi
2560 fi
2561
2562 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2563
2564 if test $ac_cv_prog_gcc = yes; then
2565   GCC=yes
2566 else
2567   GCC=
2568 fi
2569
2570 ac_test_CFLAGS="${CFLAGS+set}"
2571 ac_save_CFLAGS="$CFLAGS"
2572 CFLAGS=
2573 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2574 echo "configure:2575: checking whether ${CC-cc} accepts -g" >&5
2575 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2576   echo $ac_n "(cached) $ac_c" 1>&6
2577 else
2578   echo 'void f(){}' > conftest.c
2579 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2580   ac_cv_prog_cc_g=yes
2581 else
2582   ac_cv_prog_cc_g=no
2583 fi
2584 rm -f conftest*
2585
2586 fi
2587
2588 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2589 if test "$ac_test_CFLAGS" = set; then
2590   CFLAGS="$ac_save_CFLAGS"
2591 elif test $ac_cv_prog_cc_g = yes; then
2592   if test "$GCC" = yes; then
2593     CFLAGS="-g -O2"
2594   else
2595     CFLAGS="-g"
2596   fi
2597 else
2598   if test "$GCC" = yes; then
2599     CFLAGS="-O2"
2600   else
2601     CFLAGS=
2602   fi
2603 fi
2604
2605 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2606 if test "${with_gnu_ld+set}" = set; then
2607   withval="$with_gnu_ld"
2608   test "$withval" = no || with_gnu_ld=yes
2609 else
2610   with_gnu_ld=no
2611 fi
2612
2613 ac_prog=ld
2614 if test "$ac_cv_prog_gcc" = yes; then
2615   # Check if gcc -print-prog-name=ld gives a path.
2616   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2617 echo "configure:2618: checking for ld used by GCC" >&5
2618   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2619   case "$ac_prog" in
2620     # Accept absolute paths.
2621     [\\/]* | [A-Za-z]:[\\/]*)
2622       re_direlt='/[^/][^/]*/\.\./'
2623       # Canonicalize the path of ld
2624       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2625       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2626         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2627       done
2628       test -z "$LD" && LD="$ac_prog"
2629       ;;
2630   "")
2631     # If it fails, then pretend we aren't using GCC.
2632     ac_prog=ld
2633     ;;
2634   *)
2635     # If it is relative, then search for the first ld in PATH.
2636     with_gnu_ld=unknown
2637     ;;
2638   esac
2639 elif test "$with_gnu_ld" = yes; then
2640   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2641 echo "configure:2642: checking for GNU ld" >&5
2642 else
2643   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2644 echo "configure:2645: checking for non-GNU ld" >&5
2645 fi
2646 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2647   echo $ac_n "(cached) $ac_c" 1>&6
2648 else
2649   if test -z "$LD"; then
2650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2651   for ac_dir in $PATH; do
2652     test -z "$ac_dir" && ac_dir=.
2653     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2654       ac_cv_path_LD="$ac_dir/$ac_prog"
2655       # Check to see if the program is GNU ld.  I'd rather use --version,
2656       # but apparently some GNU ld's only accept -v.
2657       # Break only if it was the GNU/non-GNU ld that we prefer.
2658       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2659         test "$with_gnu_ld" != no && break
2660       else
2661         test "$with_gnu_ld" != yes && break
2662       fi
2663     fi
2664   done
2665   IFS="$ac_save_ifs"
2666 else
2667   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2668 fi
2669 fi
2670
2671 LD="$ac_cv_path_LD"
2672 if test -n "$LD"; then
2673   echo "$ac_t""$LD" 1>&6
2674 else
2675   echo "$ac_t""no" 1>&6
2676 fi
2677 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2678
2679 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2680 echo "configure:2681: checking if the linker ($LD) is GNU ld" >&5
2681 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2685 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2686   ac_cv_prog_gnu_ld=yes
2687 else
2688   ac_cv_prog_gnu_ld=no
2689 fi
2690 fi
2691
2692 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2693
2694
2695 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2696 echo "configure:2697: checking for BSD-compatible nm" >&5
2697 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2698   echo $ac_n "(cached) $ac_c" 1>&6
2699 else
2700   if test -n "$NM"; then
2701   # Let the user override the test.
2702   ac_cv_path_NM="$NM"
2703 else
2704   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2705   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2706     test -z "$ac_dir" && ac_dir=.
2707     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2708       # Check to see if the nm accepts a BSD-compat flag.
2709       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2710       #   nm: unknown option "B" ignored
2711       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2712         ac_cv_path_NM="$ac_dir/nm -B"
2713         break
2714       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2715         ac_cv_path_NM="$ac_dir/nm -p"
2716         break
2717       else
2718         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2719         continue # so that we can try to find one that supports BSD flags
2720       fi
2721     fi
2722   done
2723   IFS="$ac_save_ifs"
2724   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2725 fi
2726 fi
2727
2728 NM="$ac_cv_path_NM"
2729 echo "$ac_t""$NM" 1>&6
2730
2731
2732 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2733 echo "configure:2734: checking whether ln -s works" >&5
2734 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2735   echo $ac_n "(cached) $ac_c" 1>&6
2736 else
2737   rm -f conftestdata
2738 if ln -s X conftestdata 2>/dev/null
2739 then
2740   rm -f conftestdata
2741   ac_cv_prog_LN_S="ln -s"
2742 else
2743   ac_cv_prog_LN_S=ln
2744 fi
2745 fi
2746 LN_S="$ac_cv_prog_LN_S"
2747 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2748   echo "$ac_t""yes" 1>&6
2749 else
2750   echo "$ac_t""no" 1>&6
2751 fi
2752
2753
2754 # Check for any special flags to pass to ltconfig.
2755 libtool_flags="--cache-file=$cache_file"
2756 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2757 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2758 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2759 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2760 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2761
2762
2763 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2764 if test "${enable_libtool_lock+set}" = set; then
2765   enableval="$enable_libtool_lock"
2766   :
2767 fi
2768
2769 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2770 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2771
2772 # Some flags need to be propagated to the compiler or linker for good
2773 # libtool support.
2774 case "$host" in
2775 *-*-irix6*)
2776   # Find out which ABI we are using.
2777   echo '#line 2778 "configure"' > conftest.$ac_ext
2778   if { (eval echo configure:2779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2779     case "`/usr/bin/file conftest.o`" in
2780     *32-bit*)
2781       LD="${LD-ld} -32"
2782       ;;
2783     *N32*)
2784       LD="${LD-ld} -n32"
2785       ;;
2786     *64-bit*)
2787       LD="${LD-ld} -64"
2788       ;;
2789     esac
2790   fi
2791   rm -rf conftest*
2792   ;;
2793
2794 *-*-sco3.2v5*)
2795   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2796   SAVE_CFLAGS="$CFLAGS"
2797   CFLAGS="$CFLAGS -belf"
2798   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2799 echo "configure:2800: checking whether the C compiler needs -belf" >&5
2800 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   cat > conftest.$ac_ext <<EOF
2804 #line 2805 "configure"
2805 #include "confdefs.h"
2806
2807 int main() {
2808
2809 ; return 0; }
2810 EOF
2811 if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2812   rm -rf conftest*
2813   lt_cv_cc_needs_belf=yes
2814 else
2815   echo "configure: failed program was:" >&5
2816   cat conftest.$ac_ext >&5
2817   rm -rf conftest*
2818   lt_cv_cc_needs_belf=no
2819 fi
2820 rm -f conftest*
2821 fi
2822
2823 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2824   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2825     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2826     CFLAGS="$SAVE_CFLAGS"
2827   fi
2828   ;;
2829
2830
2831 esac
2832
2833
2834 # Save cache, so that ltconfig can load it
2835
2836
2837 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2838 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2839 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2840 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2841 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2842 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2843 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2844 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2845
2846 # Reload cache, that may have been modified by ltconfig
2847
2848
2849 # This can be used to rebuild libtool when needed
2850 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2851
2852 # Always use our own libtool.
2853 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2854
2855 # Redirect the config.log output again, so that the ltconfig log is not
2856 # clobbered by the next message.
2857 exec 5>>./config.log
2858
2859
2860 for ac_prog in mawk gawk nawk awk
2861 do
2862 # Extract the first word of "$ac_prog", so it can be a program name with args.
2863 set dummy $ac_prog; ac_word=$2
2864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2865 echo "configure:2866: checking for $ac_word" >&5
2866 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   if test -n "$AWK"; then
2870   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2871 else
2872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2873   ac_dummy="$PATH"
2874   for ac_dir in $ac_dummy; do
2875     test -z "$ac_dir" && ac_dir=.
2876     if test -f $ac_dir/$ac_word; then
2877       ac_cv_prog_AWK="$ac_prog"
2878       break
2879     fi
2880   done
2881   IFS="$ac_save_ifs"
2882 fi
2883 fi
2884 AWK="$ac_cv_prog_AWK"
2885 if test -n "$AWK"; then
2886   echo "$ac_t""$AWK" 1>&6
2887 else
2888   echo "$ac_t""no" 1>&6
2889 fi
2890
2891 test -n "$AWK" && break
2892 done
2893
2894 # test for ln hardlink support
2895 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2896 echo "configure:2897: checking whether ln works" >&5
2897 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2898   echo $ac_n "(cached) $ac_c" 1>&6
2899 else
2900   rm -f conftest.src conftest.dst
2901 echo "conftest" > conftest.src
2902 if ln conftest.src conftest.dst 2>/dev/null
2903 then
2904   ol_cv_prog_LN_H="ln"
2905 else
2906   ol_cv_prog_LN_H="cp"
2907 fi
2908 rm -f conftest.src conftest.dst
2909
2910 fi
2911 LN_H="$ol_cv_prog_LN_H"
2912 if test "$ol_cv_prog_LN_H" = "ln"; then
2913         echo "$ac_t""yes" 1>&6
2914 else
2915         echo "$ac_t""no" 1>&6
2916 fi
2917
2918 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2919 echo "configure:2920: checking whether ln -s works" >&5
2920 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2921   echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923   rm -f conftestdata
2924 if ln -s X conftestdata 2>/dev/null
2925 then
2926   rm -f conftestdata
2927   ac_cv_prog_LN_S="ln -s"
2928 else
2929   ac_cv_prog_LN_S=ln
2930 fi
2931 fi
2932 LN_S="$ac_cv_prog_LN_S"
2933 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2934   echo "$ac_t""yes" 1>&6
2935 else
2936   echo "$ac_t""no" 1>&6
2937 fi
2938
2939
2940 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2941         LN_S="$LN_H"
2942 fi
2943
2944 # Extract the first word of "sendmail", so it can be a program name with args.
2945 set dummy sendmail; ac_word=$2
2946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2947 echo "configure:2948: checking for $ac_word" >&5
2948 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   case "$SENDMAIL" in
2952   /*)
2953   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2954   ;;
2955   ?:/*)                  
2956   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2957   ;;
2958   *)
2959   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2960   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2961   for ac_dir in $ac_dummy; do 
2962     test -z "$ac_dir" && ac_dir=.
2963     if test -f $ac_dir/$ac_word; then
2964       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2965       break
2966     fi
2967   done
2968   IFS="$ac_save_ifs"
2969   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2970   ;;
2971 esac
2972 fi
2973 SENDMAIL="$ac_cv_path_SENDMAIL"
2974 if test -n "$SENDMAIL"; then
2975   echo "$ac_t""$SENDMAIL" 1>&6
2976 else
2977   echo "$ac_t""no" 1>&6
2978 fi
2979
2980 # Extract the first word of "vi", so it can be a program name with args.
2981 set dummy vi; ac_word=$2
2982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2983 echo "configure:2984: checking for $ac_word" >&5
2984 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   case "$EDITOR" in
2988   /*)
2989   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2990   ;;
2991   ?:/*)                  
2992   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2993   ;;
2994   *)
2995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2996   ac_dummy="$PATH:/usr/ucb"
2997   for ac_dir in $ac_dummy; do 
2998     test -z "$ac_dir" && ac_dir=.
2999     if test -f $ac_dir/$ac_word; then
3000       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3001       break
3002     fi
3003   done
3004   IFS="$ac_save_ifs"
3005   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3006   ;;
3007 esac
3008 fi
3009 EDITOR="$ac_cv_path_EDITOR"
3010 if test -n "$EDITOR"; then
3011   echo "$ac_t""$EDITOR" 1>&6
3012 else
3013   echo "$ac_t""no" 1>&6
3014 fi
3015
3016 # Extract the first word of "finger", so it can be a program name with args.
3017 set dummy finger; ac_word=$2
3018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3019 echo "configure:3020: checking for $ac_word" >&5
3020 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   case "$FINGER" in
3024   /*)
3025   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3026   ;;
3027   ?:/*)                  
3028   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3029   ;;
3030   *)
3031   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3032   ac_dummy="$PATH:/usr/ucb"
3033   for ac_dir in $ac_dummy; do 
3034     test -z "$ac_dir" && ac_dir=.
3035     if test -f $ac_dir/$ac_word; then
3036       ac_cv_path_FINGER="$ac_dir/$ac_word"
3037       break
3038     fi
3039   done
3040   IFS="$ac_save_ifs"
3041   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3042   ;;
3043 esac
3044 fi
3045 FINGER="$ac_cv_path_FINGER"
3046 if test -n "$FINGER"; then
3047   echo "$ac_t""$FINGER" 1>&6
3048 else
3049   echo "$ac_t""no" 1>&6
3050 fi
3051
3052
3053 ol_link_modules=no
3054 if test $ol_enable_modules != no ; then
3055         # Extract the first word of "glib-config", so it can be a program name with args.
3056 set dummy glib-config; ac_word=$2
3057 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3058 echo "configure:3059: checking for $ac_word" >&5
3059 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   case "$GLIBCONFIG" in
3063   /*)
3064   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3065   ;;
3066   ?:/*)                  
3067   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3068   ;;
3069   *)
3070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3071   ac_dummy="$PATH"
3072   for ac_dir in $ac_dummy; do 
3073     test -z "$ac_dir" && ac_dir=.
3074     if test -f $ac_dir/$ac_word; then
3075       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3076       break
3077     fi
3078   done
3079   IFS="$ac_save_ifs"
3080   ;;
3081 esac
3082 fi
3083 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3084 if test -n "$GLIBCONFIG"; then
3085   echo "$ac_t""$GLIBCONFIG" 1>&6
3086 else
3087   echo "$ac_t""no" 1>&6
3088 fi
3089
3090
3091         if test "no$GLIBCONFIG" = "no" ; then
3092                 if test $ol_enable_modules = yes ; then
3093                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3094                 fi
3095
3096         else
3097                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3098                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3099                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3100
3101                                 ol_link_modules=yes
3102         fi
3103 else
3104         ol_with_bdb2_module=static
3105         ol_with_ldap_module=static
3106         ol_with_ldbm_module=static
3107         ol_with_passwd_module=static
3108         ol_with_perl_module=static
3109         ol_with_shell_module=static
3110         ol_with_tcl_module=static
3111 fi
3112
3113 ol_link_perl=no
3114 if test $ol_enable_perl != no ; then
3115         # Extract the first word of "perl", so it can be a program name with args.
3116 set dummy perl; ac_word=$2
3117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3118 echo "configure:3119: checking for $ac_word" >&5
3119 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3120   echo $ac_n "(cached) $ac_c" 1>&6
3121 else
3122   case "$PERLBIN" in
3123   /*)
3124   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3125   ;;
3126   ?:/*)                  
3127   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3128   ;;
3129   *)
3130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3131   ac_dummy="$PATH"
3132   for ac_dir in $ac_dummy; do 
3133     test -z "$ac_dir" && ac_dir=.
3134     if test -f $ac_dir/$ac_word; then
3135       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3136       break
3137     fi
3138   done
3139   IFS="$ac_save_ifs"
3140   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3141   ;;
3142 esac
3143 fi
3144 PERLBIN="$ac_cv_path_PERLBIN"
3145 if test -n "$PERLBIN"; then
3146   echo "$ac_t""$PERLBIN" 1>&6
3147 else
3148   echo "$ac_t""no" 1>&6
3149 fi
3150
3151
3152         if test "no$PERLBIN" = "no" ; then
3153                 if test $ol_enable_perl = yes ; then
3154                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3155                 fi
3156
3157         else
3158                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3159                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3160
3161                                 ol_link_perl=yes
3162         fi
3163 fi
3164
3165 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3166 echo "configure:3167: checking how to run the C preprocessor" >&5
3167 # On Suns, sometimes $CPP names a directory.
3168 if test -n "$CPP" && test -d "$CPP"; then
3169   CPP=
3170 fi
3171 if test -z "$CPP"; then
3172 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3173   echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175     # This must be in double quotes, not single quotes, because CPP may get
3176   # substituted into the Makefile and "${CC-cc}" will confuse make.
3177   CPP="${CC-cc} -E"
3178   # On the NeXT, cc -E runs the code through the compiler's parser,
3179   # not just through cpp.
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 #include <assert.h>
3184 Syntax Error
3185 EOF
3186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3187 { (eval echo configure:3188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3189 if test -z "$ac_err"; then
3190   :
3191 else
3192   echo "$ac_err" >&5
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195   rm -rf conftest*
3196   CPP="${CC-cc} -E -traditional-cpp"
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #include <assert.h>
3201 Syntax Error
3202 EOF
3203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3204 { (eval echo configure:3205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3206 if test -z "$ac_err"; then
3207   :
3208 else
3209   echo "$ac_err" >&5
3210   echo "configure: failed program was:" >&5
3211   cat conftest.$ac_ext >&5
3212   rm -rf conftest*
3213   CPP="${CC-cc} -nologo -E"
3214   cat > conftest.$ac_ext <<EOF
3215 #line 3216 "configure"
3216 #include "confdefs.h"
3217 #include <assert.h>
3218 Syntax Error
3219 EOF
3220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3221 { (eval echo configure:3222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3223 if test -z "$ac_err"; then
3224   :
3225 else
3226   echo "$ac_err" >&5
3227   echo "configure: failed program was:" >&5
3228   cat conftest.$ac_ext >&5
3229   rm -rf conftest*
3230   CPP=/lib/cpp
3231 fi
3232 rm -f conftest*
3233 fi
3234 rm -f conftest*
3235 fi
3236 rm -f conftest*
3237   ac_cv_prog_CPP="$CPP"
3238 fi
3239   CPP="$ac_cv_prog_CPP"
3240 else
3241   ac_cv_prog_CPP="$CPP"
3242 fi
3243 echo "$ac_t""$CPP" 1>&6
3244
3245
3246 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3247         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3248
3249 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3250         echo "configure: warning: programs compiled here do run here..." 1>&2
3251         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3252
3253 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3254         echo "configure: warning: programs compiled here do not run here..." 1>&2
3255         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3256 fi
3257
3258 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3259 echo "configure:3260: checking for AIX" >&5
3260 cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263 #ifdef _AIX
3264   yes
3265 #endif
3266
3267 EOF
3268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3269   egrep "yes" >/dev/null 2>&1; then
3270   rm -rf conftest*
3271   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3272 #define _ALL_SOURCE 1
3273 EOF
3274
3275 else
3276   rm -rf conftest*
3277   echo "$ac_t""no" 1>&6
3278 fi
3279 rm -f conftest*
3280
3281
3282 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3283 echo "configure:3284: checking for POSIXized ISC" >&5
3284 if test -d /etc/conf/kconfig.d &&
3285   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3286 then
3287   echo "$ac_t""yes" 1>&6
3288   ISC=yes # If later tests want to check for ISC.
3289   cat >> confdefs.h <<\EOF
3290 #define _POSIX_SOURCE 1
3291 EOF
3292
3293   if test "$GCC" = yes; then
3294     CC="$CC -posix"
3295   else
3296     CC="$CC -Xp"
3297   fi
3298 else
3299   echo "$ac_t""no" 1>&6
3300   ISC=
3301 fi
3302
3303 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3304 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3305 echo "configure:3306: checking for minix/config.h" >&5
3306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3307   echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 #include <minix/config.h>
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   rm -rf conftest*
3319   eval "ac_cv_header_$ac_safe=yes"
3320 else
3321   echo "$ac_err" >&5
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   eval "ac_cv_header_$ac_safe=no"
3326 fi
3327 rm -f conftest*
3328 fi
3329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3330   echo "$ac_t""yes" 1>&6
3331   MINIX=yes
3332 else
3333   echo "$ac_t""no" 1>&6
3334 MINIX=
3335 fi
3336
3337 if test "$MINIX" = yes; then
3338   cat >> confdefs.h <<\EOF
3339 #define _POSIX_SOURCE 1
3340 EOF
3341
3342   cat >> confdefs.h <<\EOF
3343 #define _POSIX_1_SOURCE 2
3344 EOF
3345
3346   cat >> confdefs.h <<\EOF
3347 #define _MINIX 1
3348 EOF
3349
3350 fi
3351
3352
3353 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3354 echo "configure:3355: checking for be_app in -lbe" >&5
3355 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   ac_save_LIBS="$LIBS"
3360 LIBS="-lbe -lroot -lnet $LIBS"
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 /* Override any gcc2 internal prototype to avoid an error.  */
3365 /* We use char because int might match the return type of a gcc2
3366     builtin and then its argument prototype would still apply.  */
3367 char be_app();
3368
3369 int main() {
3370 be_app()
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3374   rm -rf conftest*
3375   eval "ac_cv_lib_$ac_lib_var=yes"
3376 else
3377   echo "configure: failed program was:" >&5
3378   cat conftest.$ac_ext >&5
3379   rm -rf conftest*
3380   eval "ac_cv_lib_$ac_lib_var=no"
3381 fi
3382 rm -f conftest*
3383 LIBS="$ac_save_LIBS"
3384
3385 fi
3386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3387   echo "$ac_t""yes" 1>&6
3388   LIBS="$LIBS -lbe -lroot -lnet"
3389 else
3390   echo "$ac_t""no" 1>&6
3391 :
3392 fi
3393
3394
3395 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3396 echo "configure:3397: checking for Cygwin environment" >&5
3397 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3398   echo $ac_n "(cached) $ac_c" 1>&6
3399 else
3400   cat > conftest.$ac_ext <<EOF
3401 #line 3402 "configure"
3402 #include "confdefs.h"
3403
3404 int main() {
3405
3406 #ifndef __CYGWIN__
3407 #define __CYGWIN__ __CYGWIN32__
3408 #endif
3409 return __CYGWIN__;
3410 ; return 0; }
3411 EOF
3412 if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3413   rm -rf conftest*
3414   ac_cv_cygwin=yes
3415 else
3416   echo "configure: failed program was:" >&5
3417   cat conftest.$ac_ext >&5
3418   rm -rf conftest*
3419   ac_cv_cygwin=no
3420 fi
3421 rm -f conftest*
3422 fi
3423
3424 echo "$ac_t""$ac_cv_cygwin" 1>&6
3425 CYGWIN=
3426 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3427 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3428 echo "configure:3429: checking for mingw32 environment" >&5
3429 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3430   echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432   cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435
3436 int main() {
3437 return __MINGW32__;
3438 ; return 0; }
3439 EOF
3440 if { (eval echo configure:3441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3441   rm -rf conftest*
3442   ac_cv_mingw32=yes
3443 else
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -rf conftest*
3447   ac_cv_mingw32=no
3448 fi
3449 rm -f conftest*
3450 fi
3451
3452 echo "$ac_t""$ac_cv_mingw32" 1>&6
3453 MINGW32=
3454 test "$ac_cv_mingw32" = yes && MINGW32=yes
3455 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3456 echo "configure:3457: checking for EMX OS/2 environment" >&5
3457 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   cat > conftest.$ac_ext <<EOF
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463
3464 int main() {
3465 return __EMX__;
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3469   rm -rf conftest*
3470   ac_cv_emxos2=yes
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   ac_cv_emxos2=no
3476 fi
3477 rm -f conftest*
3478 fi
3479
3480 echo "$ac_t""$ac_cv_emxos2" 1>&6
3481 EMXOS2=
3482 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3483
3484
3485
3486 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3487 echo "configure:3488: checking for executable suffix" >&5
3488 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3492   ac_cv_exeext=.exe
3493 else
3494   rm -f conftest*
3495   echo 'int main () { return 0; }' > conftest.$ac_ext
3496   ac_cv_exeext=
3497   if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3498     for file in conftest.*; do
3499       case $file in
3500       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3501       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3502       esac
3503     done
3504   else
3505     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3506   fi
3507   rm -f conftest*
3508   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3509 fi
3510 fi
3511
3512 EXEEXT=""
3513 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3514 echo "$ac_t""${ac_cv_exeext}" 1>&6
3515 ac_exeext=$EXEEXT
3516
3517 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3518 echo "configure:3519: checking for object suffix" >&5
3519 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3520   echo $ac_n "(cached) $ac_c" 1>&6
3521 else
3522   rm -f conftest*
3523 echo 'int i = 1;' > conftest.$ac_ext
3524 if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3525   for ac_file in conftest.*; do
3526     case $ac_file in
3527     *.c) ;;
3528     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3529     esac
3530   done
3531 else
3532   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3533 fi
3534 rm -f conftest*
3535 fi
3536
3537 echo "$ac_t""$ac_cv_objext" 1>&6
3538 OBJEXT=$ac_cv_objext
3539 ac_objext=$ac_cv_objext
3540
3541
3542 cat >> confdefs.h <<EOF
3543 #define EXEEXT "${EXEEXT}"
3544 EOF
3545
3546
3547
3548
3549
3550 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3551 echo "configure:3552: checking for ${CC-cc} option to accept ANSI C" >&5
3552 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   am_cv_prog_cc_stdc=no
3556 ac_save_CC="$CC"
3557 # Don't try gcc -ansi; that turns off useful extensions and
3558 # breaks some systems' header files.
3559 # AIX                   -qlanglvl=ansi
3560 # Ultrix and OSF/1      -std1
3561 # HP-UX 10.20 and later -Ae
3562 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3563 # SVR4                  -Xc -D__EXTENSIONS__
3564 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3565 do
3566   CC="$ac_save_CC $ac_arg"
3567   cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 #include <stdarg.h>
3571 #include <stdio.h>
3572 #include <sys/types.h>
3573 #include <sys/stat.h>
3574 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3575 struct buf { int x; };
3576 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3577 static char *e (p, i)
3578      char **p;
3579      int i;
3580 {
3581   return p[i];
3582 }
3583 static char *f (char * (*g) (char **, int), char **p, ...)
3584 {
3585   char *s;
3586   va_list v;
3587   va_start (v,p);
3588   s = g (p, va_arg (v,int));
3589   va_end (v);
3590   return s;
3591 }
3592 int test (int i, double x);
3593 struct s1 {int (*f) (int a);};
3594 struct s2 {int (*f) (double a);};
3595 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3596 int argc;
3597 char **argv;
3598
3599 int main() {
3600
3601 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3602
3603 ; return 0; }
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3606   rm -rf conftest*
3607   am_cv_prog_cc_stdc="$ac_arg"; break
3608 else
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611 fi
3612 rm -f conftest*
3613 done
3614 CC="$ac_save_CC"
3615
3616 fi
3617
3618 if test -z "$am_cv_prog_cc_stdc"; then
3619   echo "$ac_t""none needed" 1>&6
3620 else
3621   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3622 fi
3623 case "x$am_cv_prog_cc_stdc" in
3624   x|xno) ;;
3625   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3626 esac
3627
3628 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3629         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3630 fi
3631
3632
3633 # test for make depend flag
3634 OL_MKDEP=
3635 OL_MKDEP_FLAGS=
3636 if test -z "${MKDEP}"; then
3637         OL_MKDEP="${CC-cc}"
3638         if test -z "${MKDEP_FLAGS}"; then
3639                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3640 echo "configure:3641: checking for ${OL_MKDEP} depend flag" >&5
3641 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   
3645                         ol_cv_mkdep=no
3646                         for flag in "-M" "-xM"; do
3647                                 cat > conftest.c <<EOF
3648  noCode;
3649 EOF
3650                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3651                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3652                                 then
3653                                         if test ! -f conftest."${ac_object}" ; then
3654                                                 ol_cv_mkdep=$flag
3655                                                 OL_MKDEP_FLAGS="$flag"
3656                                                 break
3657                                         fi
3658                                 fi
3659                         done
3660                         rm -f conftest*
3661                 
3662 fi
3663
3664 echo "$ac_t""$ol_cv_mkdep" 1>&6
3665         else
3666                 cc_cv_mkdep=yes
3667                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3668         fi
3669 else
3670         cc_cv_mkdep=yes
3671         OL_MKDEP="${MKDEP}"
3672         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3673 fi
3674
3675
3676
3677 if test "${ol_cv_mkdep}" = no ; then
3678         # this will soon become an error
3679         echo "configure: warning: do not know how to generate dependencies" 1>&2
3680 fi
3681
3682
3683
3684 echo $ac_n "checking for socket""... $ac_c" 1>&6
3685 echo "configure:3686: checking for socket" >&5
3686 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 /* System header to define __stub macros and hopefully few prototypes,
3693     which can conflict with char socket(); below.  */
3694 #include <assert.h>
3695 /* Override any gcc2 internal prototype to avoid an error.  */
3696 /* We use char because int might match the return type of a gcc2
3697     builtin and then its argument prototype would still apply.  */
3698 char socket();
3699 char (*f)();
3700
3701 int main() {
3702
3703 /* The GNU C library defines this for functions which it implements
3704     to always fail with ENOSYS.  Some functions are actually named
3705     something starting with __ and the normal name is an alias.  */
3706 #if defined (__stub_socket) || defined (__stub___socket)
3707 choke me
3708 #else
3709 f = socket;
3710 #endif
3711
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3715   rm -rf conftest*
3716   eval "ac_cv_func_socket=yes"
3717 else
3718   echo "configure: failed program was:" >&5
3719   cat conftest.$ac_ext >&5
3720   rm -rf conftest*
3721   eval "ac_cv_func_socket=no"
3722 fi
3723 rm -f conftest*
3724 fi
3725
3726 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3727   echo "$ac_t""yes" 1>&6
3728   :
3729 else
3730   echo "$ac_t""no" 1>&6
3731         
3732         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3733 echo "configure:3734: checking for main in -lsocket" >&5
3734 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
3735 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   ac_save_LIBS="$LIBS"
3739 LIBS="-lsocket  $LIBS"
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743
3744 int main() {
3745 main()
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749   rm -rf conftest*
3750   eval "ac_cv_lib_$ac_lib_var=yes"
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -rf conftest*
3755   eval "ac_cv_lib_$ac_lib_var=no"
3756 fi
3757 rm -f conftest*
3758 LIBS="$ac_save_LIBS"
3759
3760 fi
3761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3762   echo "$ac_t""yes" 1>&6
3763     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3764     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3765   cat >> confdefs.h <<EOF
3766 #define $ac_tr_lib 1
3767 EOF
3768
3769   LIBS="-lsocket $LIBS"
3770
3771 else
3772   echo "$ac_t""no" 1>&6
3773 fi
3774
3775         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3776 echo "configure:3777: checking for main in -lnet" >&5
3777 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
3778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3779   echo $ac_n "(cached) $ac_c" 1>&6
3780 else
3781   ac_save_LIBS="$LIBS"
3782 LIBS="-lnet  $LIBS"
3783 cat > conftest.$ac_ext <<EOF
3784 #line 3785 "configure"
3785 #include "confdefs.h"
3786
3787 int main() {
3788 main()
3789 ; return 0; }
3790 EOF
3791 if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3792   rm -rf conftest*
3793   eval "ac_cv_lib_$ac_lib_var=yes"
3794 else
3795   echo "configure: failed program was:" >&5
3796   cat conftest.$ac_ext >&5
3797   rm -rf conftest*
3798   eval "ac_cv_lib_$ac_lib_var=no"
3799 fi
3800 rm -f conftest*
3801 LIBS="$ac_save_LIBS"
3802
3803 fi
3804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3805   echo "$ac_t""yes" 1>&6
3806     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3808   cat >> confdefs.h <<EOF
3809 #define $ac_tr_lib 1
3810 EOF
3811
3812   LIBS="-lnet $LIBS"
3813
3814 else
3815   echo "$ac_t""no" 1>&6
3816 fi
3817
3818         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3819 echo "configure:3820: checking for socket in -lnet" >&5
3820 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
3821 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   ac_save_LIBS="$LIBS"
3825 LIBS="-lnet  $LIBS"
3826 cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 /* Override any gcc2 internal prototype to avoid an error.  */
3830 /* We use char because int might match the return type of a gcc2
3831     builtin and then its argument prototype would still apply.  */
3832 char socket();
3833
3834 int main() {
3835 socket()
3836 ; return 0; }
3837 EOF
3838 if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3839   rm -rf conftest*
3840   eval "ac_cv_lib_$ac_lib_var=yes"
3841 else
3842   echo "configure: failed program was:" >&5
3843   cat conftest.$ac_ext >&5
3844   rm -rf conftest*
3845   eval "ac_cv_lib_$ac_lib_var=no"
3846 fi
3847 rm -f conftest*
3848 LIBS="$ac_save_LIBS"
3849
3850 fi
3851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3852   echo "$ac_t""yes" 1>&6
3853     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3854     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3855   cat >> confdefs.h <<EOF
3856 #define $ac_tr_lib 1
3857 EOF
3858
3859   LIBS="-lnet $LIBS"
3860
3861 else
3862   echo "$ac_t""no" 1>&6
3863 fi
3864
3865         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3866 echo "configure:3867: checking for main in -lnsl_s" >&5
3867 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
3868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3869   echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871   ac_save_LIBS="$LIBS"
3872 LIBS="-lnsl_s  $LIBS"
3873 cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876
3877 int main() {
3878 main()
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3882   rm -rf conftest*
3883   eval "ac_cv_lib_$ac_lib_var=yes"
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   eval "ac_cv_lib_$ac_lib_var=no"
3889 fi
3890 rm -f conftest*
3891 LIBS="$ac_save_LIBS"
3892
3893 fi
3894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3895   echo "$ac_t""yes" 1>&6
3896     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3897     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3898   cat >> confdefs.h <<EOF
3899 #define $ac_tr_lib 1
3900 EOF
3901
3902   LIBS="-lnsl_s $LIBS"
3903
3904 else
3905   echo "$ac_t""no" 1>&6
3906 fi
3907
3908         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3909 echo "configure:3910: checking for main in -lnsl" >&5
3910 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
3911 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   ac_save_LIBS="$LIBS"
3915 LIBS="-lnsl  $LIBS"
3916 cat > conftest.$ac_ext <<EOF
3917 #line 3918 "configure"
3918 #include "confdefs.h"
3919
3920 int main() {
3921 main()
3922 ; return 0; }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3925   rm -rf conftest*
3926   eval "ac_cv_lib_$ac_lib_var=yes"
3927 else
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   eval "ac_cv_lib_$ac_lib_var=no"
3932 fi
3933 rm -f conftest*
3934 LIBS="$ac_save_LIBS"
3935
3936 fi
3937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3938   echo "$ac_t""yes" 1>&6
3939     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3940     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3941   cat >> confdefs.h <<EOF
3942 #define $ac_tr_lib 1
3943 EOF
3944
3945   LIBS="-lnsl $LIBS"
3946
3947 else
3948   echo "$ac_t""no" 1>&6
3949 fi
3950
3951         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3952 echo "configure:3953: checking for socket in -linet" >&5
3953 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
3954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   ac_save_LIBS="$LIBS"
3958 LIBS="-linet  $LIBS"
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 /* Override any gcc2 internal prototype to avoid an error.  */
3963 /* We use char because int might match the return type of a gcc2
3964     builtin and then its argument prototype would still apply.  */
3965 char socket();
3966
3967 int main() {
3968 socket()
3969 ; return 0; }
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=yes"
3974 else
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -rf conftest*
3978   eval "ac_cv_lib_$ac_lib_var=no"
3979 fi
3980 rm -f conftest*
3981 LIBS="$ac_save_LIBS"
3982
3983 fi
3984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3985   echo "$ac_t""yes" 1>&6
3986     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3987     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3988   cat >> confdefs.h <<EOF
3989 #define $ac_tr_lib 1
3990 EOF
3991
3992   LIBS="-linet $LIBS"
3993
3994 else
3995   echo "$ac_t""no" 1>&6
3996 fi
3997
3998         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3999 echo "configure:4000: checking for main in -lgen" >&5
4000 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4002   echo $ac_n "(cached) $ac_c" 1>&6
4003 else
4004   ac_save_LIBS="$LIBS"
4005 LIBS="-lgen  $LIBS"
4006 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009
4010 int main() {
4011 main()
4012 ; return 0; }
4013 EOF
4014 if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4015   rm -rf conftest*
4016   eval "ac_cv_lib_$ac_lib_var=yes"
4017 else
4018   echo "configure: failed program was:" >&5
4019   cat conftest.$ac_ext >&5
4020   rm -rf conftest*
4021   eval "ac_cv_lib_$ac_lib_var=no"
4022 fi
4023 rm -f conftest*
4024 LIBS="$ac_save_LIBS"
4025
4026 fi
4027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4028   echo "$ac_t""yes" 1>&6
4029     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4030     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4031   cat >> confdefs.h <<EOF
4032 #define $ac_tr_lib 1
4033 EOF
4034
4035   LIBS="-lgen $LIBS"
4036
4037 else
4038   echo "$ac_t""no" 1>&6
4039 fi
4040
4041
4042 fi
4043
4044
4045 for ac_func in res_search
4046 do
4047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4048 echo "configure:4049: checking for $ac_func" >&5
4049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 /* System header to define __stub macros and hopefully few prototypes,
4056     which can conflict with char $ac_func(); below.  */
4057 #include <assert.h>
4058 /* Override any gcc2 internal prototype to avoid an error.  */
4059 /* We use char because int might match the return type of a gcc2
4060     builtin and then its argument prototype would still apply.  */
4061 char $ac_func();
4062 char (*f)();
4063
4064 int main() {
4065
4066 /* The GNU C library defines this for functions which it implements
4067     to always fail with ENOSYS.  Some functions are actually named
4068     something starting with __ and the normal name is an alias.  */
4069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4070 choke me
4071 #else
4072 f = $ac_func;
4073 #endif
4074
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4078   rm -rf conftest*
4079   eval "ac_cv_func_$ac_func=yes"
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   eval "ac_cv_func_$ac_func=no"
4085 fi
4086 rm -f conftest*
4087 fi
4088
4089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4090   echo "$ac_t""yes" 1>&6
4091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4092   cat >> confdefs.h <<EOF
4093 #define $ac_tr_func 1
4094 EOF
4095  
4096 else
4097   echo "$ac_t""no" 1>&6
4098 fi
4099 done
4100
4101 if test $ac_cv_func_res_search = "no" ; then 
4102         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4103 echo "configure:4104: checking for res_search in -lbind" >&5
4104 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
4105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4106   echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108   ac_save_LIBS="$LIBS"
4109 LIBS="-lbind  $LIBS"
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113 /* Override any gcc2 internal prototype to avoid an error.  */
4114 /* We use char because int might match the return type of a gcc2
4115     builtin and then its argument prototype would still apply.  */
4116 char res_search();
4117
4118 int main() {
4119 res_search()
4120 ; return 0; }
4121 EOF
4122 if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4123   rm -rf conftest*
4124   eval "ac_cv_lib_$ac_lib_var=yes"
4125 else
4126   echo "configure: failed program was:" >&5
4127   cat conftest.$ac_ext >&5
4128   rm -rf conftest*
4129   eval "ac_cv_lib_$ac_lib_var=no"
4130 fi
4131 rm -f conftest*
4132 LIBS="$ac_save_LIBS"
4133
4134 fi
4135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4136   echo "$ac_t""yes" 1>&6
4137     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4138     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4139   cat >> confdefs.h <<EOF
4140 #define $ac_tr_lib 1
4141 EOF
4142
4143   LIBS="-lbind $LIBS"
4144
4145 else
4146   echo "$ac_t""no" 1>&6
4147 fi
4148
4149         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
4150                 cat >> confdefs.h <<\EOF
4151 #define HAVE_RES_SEARCH 1
4152 EOF
4153
4154         else
4155                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
4156 echo "configure:4157: checking for res_search in -lresolv" >&5
4157 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
4158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4159   echo $ac_n "(cached) $ac_c" 1>&6
4160 else
4161   ac_save_LIBS="$LIBS"
4162 LIBS="-lresolv  $LIBS"
4163 cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 /* Override any gcc2 internal prototype to avoid an error.  */
4167 /* We use char because int might match the return type of a gcc2
4168     builtin and then its argument prototype would still apply.  */
4169 char res_search();
4170
4171 int main() {
4172 res_search()
4173 ; return 0; }
4174 EOF
4175 if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4176   rm -rf conftest*
4177   eval "ac_cv_lib_$ac_lib_var=yes"
4178 else
4179   echo "configure: failed program was:" >&5
4180   cat conftest.$ac_ext >&5
4181   rm -rf conftest*
4182   eval "ac_cv_lib_$ac_lib_var=no"
4183 fi
4184 rm -f conftest*
4185 LIBS="$ac_save_LIBS"
4186
4187 fi
4188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4189   echo "$ac_t""yes" 1>&6
4190     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4192   cat >> confdefs.h <<EOF
4193 #define $ac_tr_lib 1
4194 EOF
4195
4196   LIBS="-lresolv $LIBS"
4197
4198 else
4199   echo "$ac_t""no" 1>&6
4200 fi
4201
4202                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
4203                         cat >> confdefs.h <<\EOF
4204 #define HAVE_RES_SEARCH 1
4205 EOF
4206
4207                 fi
4208         fi
4209 fi
4210
4211 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4212 echo "configure:4213: checking for sigset in -lV3" >&5
4213 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   ac_save_LIBS="$LIBS"
4218 LIBS="-lV3  $LIBS"
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 /* Override any gcc2 internal prototype to avoid an error.  */
4223 /* We use char because int might match the return type of a gcc2
4224     builtin and then its argument prototype would still apply.  */
4225 char sigset();
4226
4227 int main() {
4228 sigset()
4229 ; return 0; }
4230 EOF
4231 if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4232   rm -rf conftest*
4233   eval "ac_cv_lib_$ac_lib_var=yes"
4234 else
4235   echo "configure: failed program was:" >&5
4236   cat conftest.$ac_ext >&5
4237   rm -rf conftest*
4238   eval "ac_cv_lib_$ac_lib_var=no"
4239 fi
4240 rm -f conftest*
4241 LIBS="$ac_save_LIBS"
4242
4243 fi
4244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4247     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4248   cat >> confdefs.h <<EOF
4249 #define $ac_tr_lib 1
4250 EOF
4251
4252   LIBS="-lV3 $LIBS"
4253
4254 else
4255   echo "$ac_t""no" 1>&6
4256 fi
4257
4258
4259 for ac_hdr in regex.h 
4260 do
4261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4263 echo "configure:4264: checking for $ac_hdr" >&5
4264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 #include <$ac_hdr>
4271 EOF
4272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4273 { (eval echo configure:4274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4275 if test -z "$ac_err"; then
4276   rm -rf conftest*
4277   eval "ac_cv_header_$ac_safe=yes"
4278 else
4279   echo "$ac_err" >&5
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -rf conftest*
4283   eval "ac_cv_header_$ac_safe=no"
4284 fi
4285 rm -f conftest*
4286 fi
4287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4288   echo "$ac_t""yes" 1>&6
4289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4290   cat >> confdefs.h <<EOF
4291 #define $ac_tr_hdr 1
4292 EOF
4293  
4294 else
4295   echo "$ac_t""no" 1>&6
4296 fi
4297 done
4298
4299 if test "$ac_cv_header_regex_h" != yes ; then
4300         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4301 fi
4302 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4303 echo "configure:4304: checking for regfree" >&5
4304 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4305   echo $ac_n "(cached) $ac_c" 1>&6
4306 else
4307   cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4310 /* System header to define __stub macros and hopefully few prototypes,
4311     which can conflict with char regfree(); below.  */
4312 #include <assert.h>
4313 /* Override any gcc2 internal prototype to avoid an error.  */
4314 /* We use char because int might match the return type of a gcc2
4315     builtin and then its argument prototype would still apply.  */
4316 char regfree();
4317 char (*f)();
4318
4319 int main() {
4320
4321 /* The GNU C library defines this for functions which it implements
4322     to always fail with ENOSYS.  Some functions are actually named
4323     something starting with __ and the normal name is an alias.  */
4324 #if defined (__stub_regfree) || defined (__stub___regfree)
4325 choke me
4326 #else
4327 f = regfree;
4328 #endif
4329
4330 ; return 0; }
4331 EOF
4332 if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4333   rm -rf conftest*
4334   eval "ac_cv_func_regfree=yes"
4335 else
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   eval "ac_cv_func_regfree=no"
4340 fi
4341 rm -f conftest*
4342 fi
4343
4344 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4345   echo "$ac_t""yes" 1>&6
4346   :
4347 else
4348   echo "$ac_t""no" 1>&6
4349 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4350 fi
4351
4352
4353
4354 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4355 echo "configure:4356: checking for compatible POSIX regex" >&5
4356 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   
4360         if test "$cross_compiling" = yes; then
4361   ol_cv_c_posix_regex=cross
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366
4367 #include <sys/types.h>
4368 #include <regex.h>
4369 static char *pattern, *string;
4370 main()
4371 {
4372         int rc;
4373         regex_t re;
4374
4375         pattern = "^A";
4376
4377         if(regcomp(&re, pattern, 0)) {
4378                 return -1;
4379         }
4380         
4381         string = "ALL MATCH";
4382         
4383         rc = regexec(&re, string, 0, (void*)0, 0);
4384
4385         regfree(&re);
4386
4387         return rc;
4388 }
4389 EOF
4390 if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4391 then
4392   ol_cv_c_posix_regex=yes
4393 else
4394   echo "configure: failed program was:" >&5
4395   cat conftest.$ac_ext >&5
4396   rm -fr conftest*
4397   ol_cv_c_posix_regex=no
4398 fi
4399 rm -fr conftest*
4400 fi
4401
4402 fi
4403
4404 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4405
4406 if test "$ol_cv_c_posix_regex" = no ; then
4407         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4408 fi
4409
4410 echo $ac_n "checking for select""... $ac_c" 1>&6
4411 echo "configure:4412: checking for select" >&5
4412 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 /* System header to define __stub macros and hopefully few prototypes,
4419     which can conflict with char select(); below.  */
4420 #include <assert.h>
4421 /* Override any gcc2 internal prototype to avoid an error.  */
4422 /* We use char because int might match the return type of a gcc2
4423     builtin and then its argument prototype would still apply.  */
4424 char select();
4425 char (*f)();
4426
4427 int main() {
4428
4429 /* The GNU C library defines this for functions which it implements
4430     to always fail with ENOSYS.  Some functions are actually named
4431     something starting with __ and the normal name is an alias.  */
4432 #if defined (__stub_select) || defined (__stub___select)
4433 choke me
4434 #else
4435 f = select;
4436 #endif
4437
4438 ; return 0; }
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441   rm -rf conftest*
4442   eval "ac_cv_func_select=yes"
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -rf conftest*
4447   eval "ac_cv_func_select=no"
4448 fi
4449 rm -f conftest*
4450 fi
4451
4452 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4453   echo "$ac_t""yes" 1>&6
4454   :
4455 else
4456   echo "$ac_t""no" 1>&6
4457 { echo "configure: error: select() required." 1>&2; exit 1; }
4458 fi
4459
4460
4461 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4462 echo "configure:4463: checking types of arguments for select()" >&5
4463  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4473      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4474       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4475        cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4478 #ifdef HAVE_SYS_TYPES_H
4479 #include <sys/types.h>
4480 #endif
4481 #ifdef HAVE_SYS_TIME_H
4482 #include <sys/time.h>
4483 #endif
4484 #ifdef HAVE_SYS_SELECT_H
4485 #include <sys/select.h>
4486 #endif
4487 #ifdef HAVE_SYS_SOCKET_H
4488 #include <sys/socket.h>
4489 #endif
4490 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);
4491 int main() {
4492
4493 ; return 0; }
4494 EOF
4495 if { (eval echo configure:4496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4496   rm -rf conftest*
4497           ac_not_found=no ; break 3
4498 else
4499   echo "configure: failed program was:" >&5
4500   cat conftest.$ac_ext >&5
4501   rm -rf conftest*
4502   ac_not_found=yes
4503 fi
4504 rm -f conftest*
4505       done
4506      done
4507     done
4508    
4509 fi
4510   
4511 fi
4512  
4513 fi
4514  if test "$ac_not_found" = yes; then
4515   ac_cv_func_select_arg1=int 
4516   ac_cv_func_select_arg234='int *' 
4517   ac_cv_func_select_arg5='struct timeval *'
4518  fi
4519  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4520  cat >> confdefs.h <<EOF
4521 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4522 EOF
4523
4524  cat >> confdefs.h <<EOF
4525 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4526 EOF
4527
4528  cat >> confdefs.h <<EOF
4529 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4530 EOF
4531
4532
4533
4534 # ISODE tests
4535 ol_link_isode=no
4536 if test $ol_enable_ldapd != no ; then
4537         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4538
4539                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4540 echo "configure:4541: checking for main in -lxtpp" >&5
4541 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
4542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4543   echo $ac_n "(cached) $ac_c" 1>&6
4544 else
4545   ac_save_LIBS="$LIBS"
4546 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4547 cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550
4551 int main() {
4552 main()
4553 ; return 0; }
4554 EOF
4555 if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=yes"
4558 else
4559   echo "configure: failed program was:" >&5
4560   cat conftest.$ac_ext >&5
4561   rm -rf conftest*
4562   eval "ac_cv_lib_$ac_lib_var=no"
4563 fi
4564 rm -f conftest*
4565 LIBS="$ac_save_LIBS"
4566
4567 fi
4568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4569   echo "$ac_t""yes" 1>&6
4570   
4571                 ol_link_isode=yes
4572                 cat >> confdefs.h <<\EOF
4573 #define HAVE_XTPP 1
4574 EOF
4575
4576                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4577                 
4578 else
4579   echo "$ac_t""no" 1>&6
4580 :
4581 fi
4582
4583         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4584 echo "configure:4585: checking for main in -ldsap" >&5
4585 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
4586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4587   echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589   ac_save_LIBS="$LIBS"
4590 LIBS="-ldsap -lisode $LIBS"
4591 cat > conftest.$ac_ext <<EOF
4592 #line 4593 "configure"
4593 #include "confdefs.h"
4594
4595 int main() {
4596 main()
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4600   rm -rf conftest*
4601   eval "ac_cv_lib_$ac_lib_var=yes"
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   eval "ac_cv_lib_$ac_lib_var=no"
4607 fi
4608 rm -f conftest*
4609 LIBS="$ac_save_LIBS"
4610
4611 fi
4612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4613   echo "$ac_t""yes" 1>&6
4614   
4615                 ol_link_isode=yes
4616                 cat >> confdefs.h <<\EOF
4617 #define HAVE_DSAP 1
4618 EOF
4619
4620                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4621                 
4622 else
4623   echo "$ac_t""no" 1>&6
4624 :
4625 fi
4626
4627         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4628 echo "configure:4629: checking for main in -lisode" >&5
4629 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
4630 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   ac_save_LIBS="$LIBS"
4634 LIBS="-lisode  $LIBS"
4635 cat > conftest.$ac_ext <<EOF
4636 #line 4637 "configure"
4637 #include "confdefs.h"
4638
4639 int main() {
4640 main()
4641 ; return 0; }
4642 EOF
4643 if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4644   rm -rf conftest*
4645   eval "ac_cv_lib_$ac_lib_var=yes"
4646 else
4647   echo "configure: failed program was:" >&5
4648   cat conftest.$ac_ext >&5
4649   rm -rf conftest*
4650   eval "ac_cv_lib_$ac_lib_var=no"
4651 fi
4652 rm -f conftest*
4653 LIBS="$ac_save_LIBS"
4654
4655 fi
4656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4657   echo "$ac_t""yes" 1>&6
4658   
4659                 ol_link_isode=yes
4660                 cat >> confdefs.h <<\EOF
4661 #define HAVE_ISODE 1
4662 EOF
4663
4664                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4665                 
4666 else
4667   echo "$ac_t""no" 1>&6
4668 :
4669 fi
4670
4671 fi
4672
4673 if test $ol_link_isode != no; then
4674         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4675 echo "configure:4676: checking for main in -lpp" >&5
4676 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
4677 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4678   echo $ac_n "(cached) $ac_c" 1>&6
4679 else
4680   ac_save_LIBS="$LIBS"
4681 LIBS="-lpp  $LIBS"
4682 cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685
4686 int main() {
4687 main()
4688 ; return 0; }
4689 EOF
4690 if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691   rm -rf conftest*
4692   eval "ac_cv_lib_$ac_lib_var=yes"
4693 else
4694   echo "configure: failed program was:" >&5
4695   cat conftest.$ac_ext >&5
4696   rm -rf conftest*
4697   eval "ac_cv_lib_$ac_lib_var=no"
4698 fi
4699 rm -f conftest*
4700 LIBS="$ac_save_LIBS"
4701
4702 fi
4703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4704   echo "$ac_t""yes" 1>&6
4705   
4706                 cat >> confdefs.h <<\EOF
4707 #define HAVE_PP 1
4708 EOF
4709
4710                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4711                 
4712 else
4713   echo "$ac_t""no" 1>&6
4714 :
4715 fi
4716
4717
4718         # Extract the first word of "pepsy", so it can be a program name with args.
4719 set dummy pepsy; ac_word=$2
4720 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4721 echo "configure:4722: checking for $ac_word" >&5
4722 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   case "$PEPSY" in
4726   /*)
4727   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4728   ;;
4729   ?:/*)                  
4730   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4731   ;;
4732   *)
4733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4734   ac_dummy="$PATH"
4735   for ac_dir in $ac_dummy; do 
4736     test -z "$ac_dir" && ac_dir=.
4737     if test -f $ac_dir/$ac_word; then
4738       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4739       break
4740     fi
4741   done
4742   IFS="$ac_save_ifs"
4743   ;;
4744 esac
4745 fi
4746 PEPSY="$ac_cv_path_PEPSY"
4747 if test -n "$PEPSY"; then
4748   echo "$ac_t""$PEPSY" 1>&6
4749 else
4750   echo "$ac_t""no" 1>&6
4751 fi
4752
4753 fi
4754
4755 ol_link_kerberos=no
4756
4757 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4758         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4759 do
4760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4762 echo "configure:4763: checking for $ac_hdr" >&5
4763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769 #include <$ac_hdr>
4770 EOF
4771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4772 { (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4774 if test -z "$ac_err"; then
4775   rm -rf conftest*
4776   eval "ac_cv_header_$ac_safe=yes"
4777 else
4778   echo "$ac_err" >&5
4779   echo "configure: failed program was:" >&5
4780   cat conftest.$ac_ext >&5
4781   rm -rf conftest*
4782   eval "ac_cv_header_$ac_safe=no"
4783 fi
4784 rm -f conftest*
4785 fi
4786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4787   echo "$ac_t""yes" 1>&6
4788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4789   cat >> confdefs.h <<EOF
4790 #define $ac_tr_hdr 1
4791 EOF
4792  
4793 else
4794   echo "$ac_t""no" 1>&6
4795 fi
4796 done
4797
4798
4799         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4800                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4801 echo "configure:4802: checking for main in -lkrb4" >&5
4802 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
4803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   ac_save_LIBS="$LIBS"
4807 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4808 cat > conftest.$ac_ext <<EOF
4809 #line 4810 "configure"
4810 #include "confdefs.h"
4811
4812 int main() {
4813 main()
4814 ; return 0; }
4815 EOF
4816 if { (eval echo configure:4817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4817   rm -rf conftest*
4818   eval "ac_cv_lib_$ac_lib_var=yes"
4819 else
4820   echo "configure: failed program was:" >&5
4821   cat conftest.$ac_ext >&5
4822   rm -rf conftest*
4823   eval "ac_cv_lib_$ac_lib_var=no"
4824 fi
4825 rm -f conftest*
4826 LIBS="$ac_save_LIBS"
4827
4828 fi
4829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4830   echo "$ac_t""yes" 1>&6
4831   have_k5=yes
4832 else
4833   echo "$ac_t""no" 1>&6
4834 have_k5=no
4835 fi
4836
4837
4838                 if test $have_k5 = yes ; then
4839                         ol_with_kerberos=found
4840                         ol_link_kerberos=yes
4841
4842                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4843
4844                         LIBS="$KRB_LIBS $LIBS"
4845
4846                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4847 echo "configure:4848: checking for des_debug in Kerberos libraries" >&5
4848 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851   
4852                                                                 save_LIBS="$LIBS"
4853                                 LIBS="$KRB_LIBS $LIBS"
4854                                 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857
4858 #include <kerberosIV/krb.h>
4859 #include <kerberosIV/des.h>
4860 extern int des_debug;
4861
4862 int main() {
4863
4864 des_debug = 1;
4865
4866 ; return 0; }
4867 EOF
4868 if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4869   rm -rf conftest*
4870   ol_cv_var_des_debug=yes
4871 else
4872   echo "configure: failed program was:" >&5
4873   cat conftest.$ac_ext >&5
4874   rm -rf conftest*
4875   ol_cv_var_des_debug=no
4876 fi
4877 rm -f conftest*
4878                                                                 LIBS="$save_LIBS"
4879                         
4880 fi
4881
4882 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4883
4884                         if test $ol_cv_var_des_debug = yes ; then
4885                                 cat >> confdefs.h <<\EOF
4886 #define HAVE_DES_DEBUG 1
4887 EOF
4888
4889                         fi
4890
4891                         LIBS="$save_LIBS"
4892                 fi
4893         fi
4894 fi
4895
4896 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4897         for ac_hdr in krb.h des.h
4898 do
4899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4901 echo "configure:4902: checking for $ac_hdr" >&5
4902 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4903   echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905   cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 #include <$ac_hdr>
4909 EOF
4910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4911 { (eval echo configure:4912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4913 if test -z "$ac_err"; then
4914   rm -rf conftest*
4915   eval "ac_cv_header_$ac_safe=yes"
4916 else
4917   echo "$ac_err" >&5
4918   echo "configure: failed program was:" >&5
4919   cat conftest.$ac_ext >&5
4920   rm -rf conftest*
4921   eval "ac_cv_header_$ac_safe=no"
4922 fi
4923 rm -f conftest*
4924 fi
4925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4926   echo "$ac_t""yes" 1>&6
4927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4928   cat >> confdefs.h <<EOF
4929 #define $ac_tr_hdr 1
4930 EOF
4931  
4932 else
4933   echo "$ac_t""no" 1>&6
4934 fi
4935 done
4936
4937
4938         if test $ac_cv_header_krb_h = yes ; then
4939                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4940 echo "configure:4941: checking for main in -lkrb" >&5
4941 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
4942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4943   echo $ac_n "(cached) $ac_c" 1>&6
4944 else
4945   ac_save_LIBS="$LIBS"
4946 LIBS="-lkrb -ldes $LIBS"
4947 cat > conftest.$ac_ext <<EOF
4948 #line 4949 "configure"
4949 #include "confdefs.h"
4950
4951 int main() {
4952 main()
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956   rm -rf conftest*
4957   eval "ac_cv_lib_$ac_lib_var=yes"
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=no"
4963 fi
4964 rm -f conftest*
4965 LIBS="$ac_save_LIBS"
4966
4967 fi
4968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4969   echo "$ac_t""yes" 1>&6
4970   have_k4=yes
4971 else
4972   echo "$ac_t""no" 1>&6
4973 have_k4=no
4974 fi
4975
4976
4977                 if test $have_k4 = yes ; then
4978                         ol_with_kerberos=found
4979                         ol_link_kerberos=yes
4980
4981                         KRB_LIBS="-lkrb -ldes"
4982                 fi
4983         fi
4984 fi
4985
4986 if test $ol_link_kerberos = yes ; then
4987         cat >> confdefs.h <<\EOF
4988 #define HAVE_KERBEROS 1
4989 EOF
4990
4991 fi
4992
4993 ol_link_tls=no
4994 if test $ol_with_tls != no ; then
4995         
4996         for ac_hdr in openssl/ssl.h ssl.h
4997 do
4998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4999 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5000 echo "configure:5001: checking for $ac_hdr" >&5
5001 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 #include <$ac_hdr>
5008 EOF
5009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5010 { (eval echo configure:5011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5012 if test -z "$ac_err"; then
5013   rm -rf conftest*
5014   eval "ac_cv_header_$ac_safe=yes"
5015 else
5016   echo "$ac_err" >&5
5017   echo "configure: failed program was:" >&5
5018   cat conftest.$ac_ext >&5
5019   rm -rf conftest*
5020   eval "ac_cv_header_$ac_safe=no"
5021 fi
5022 rm -f conftest*
5023 fi
5024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5025   echo "$ac_t""yes" 1>&6
5026     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5027   cat >> confdefs.h <<EOF
5028 #define $ac_tr_hdr 1
5029 EOF
5030  
5031 else
5032   echo "$ac_t""no" 1>&6
5033 fi
5034 done
5035
5036         
5037         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5038                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5039 echo "configure:5040: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5040 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5042   echo $ac_n "(cached) $ac_c" 1>&6
5043 else
5044   ac_save_LIBS="$LIBS"
5045 LIBS="-lssl -lcrypto $LIBS"
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 /* Override any gcc2 internal prototype to avoid an error.  */
5050 /* We use char because int might match the return type of a gcc2
5051     builtin and then its argument prototype would still apply.  */
5052 char SSLeay_add_ssl_algorithms();
5053
5054 int main() {
5055 SSLeay_add_ssl_algorithms()
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   eval "ac_cv_lib_$ac_lib_var=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=no"
5066 fi
5067 rm -f conftest*
5068 LIBS="$ac_save_LIBS"
5069
5070 fi
5071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5072   echo "$ac_t""yes" 1>&6
5073   have_ssleay=yes
5074                         need_rsaref=no
5075 else
5076   echo "$ac_t""no" 1>&6
5077 have_ssleay=no
5078 fi
5079
5080                         
5081                 if test $have_ssleay = no ; then
5082                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5083 echo "configure:5084: checking for SSL_library_init in -lssl" >&5
5084 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   ac_save_LIBS="$LIBS"
5089 LIBS="-lssl -lcrypto $LIBS"
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093 /* Override any gcc2 internal prototype to avoid an error.  */
5094 /* We use char because int might match the return type of a gcc2
5095     builtin and then its argument prototype would still apply.  */
5096 char SSL_library_init();
5097
5098 int main() {
5099 SSL_library_init()
5100 ; return 0; }
5101 EOF
5102 if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=yes"
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=no"
5110 fi
5111 rm -f conftest*
5112 LIBS="$ac_save_LIBS"
5113
5114 fi
5115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5116   echo "$ac_t""yes" 1>&6
5117   have_ssleay=yes
5118                                 need_rsaref=no
5119 else
5120   echo "$ac_t""no" 1>&6
5121 have_ssleay=no
5122 fi
5123
5124                 fi
5125
5126                 if test $have_ssleay = no ; then
5127                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5128 echo "configure:5129: checking for ssl3_accept in -lssl" >&5
5129 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5130 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5131   echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5133   ac_save_LIBS="$LIBS"
5134 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5135 cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138 /* Override any gcc2 internal prototype to avoid an error.  */
5139 /* We use char because int might match the return type of a gcc2
5140     builtin and then its argument prototype would still apply.  */
5141 char ssl3_accept();
5142
5143 int main() {
5144 ssl3_accept()
5145 ; return 0; }
5146 EOF
5147 if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5148   rm -rf conftest*
5149   eval "ac_cv_lib_$ac_lib_var=yes"
5150 else
5151   echo "configure: failed program was:" >&5
5152   cat conftest.$ac_ext >&5
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=no"
5155 fi
5156 rm -f conftest*
5157 LIBS="$ac_save_LIBS"
5158
5159 fi
5160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5161   echo "$ac_t""yes" 1>&6
5162   have_ssleay=yes
5163                                 need_rsaref=yes
5164 else
5165   echo "$ac_t""no" 1>&6
5166 have_ssleay=no
5167 fi
5168
5169                 fi
5170
5171                 if test $have_ssleay = yes ; then
5172                         ol_with_tls=found
5173                         ol_link_tls=yes
5174
5175                         cat >> confdefs.h <<\EOF
5176 #define HAVE_SSLEAY 1
5177 EOF
5178
5179
5180                         if test $need_rsaref = yes; then
5181                                 cat >> confdefs.h <<\EOF
5182 #define HAVE_RSAREF 1
5183 EOF
5184
5185
5186                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5187                         else
5188                                 TLS_LIBS="-lssl -lcrypto"
5189                         fi
5190                 fi
5191         fi
5192 fi
5193
5194 if test $ol_link_tls = yes ; then
5195         cat >> confdefs.h <<\EOF
5196 #define HAVE_TLS 1
5197 EOF
5198
5199 fi      
5200
5201 for ac_func in \
5202         ctime_r                 \
5203         gethostbyname_r gethostbyaddr_r \
5204
5205 do
5206 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5207 echo "configure:5208: checking for $ac_func" >&5
5208 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5209   echo $ac_n "(cached) $ac_c" 1>&6
5210 else
5211   cat > conftest.$ac_ext <<EOF
5212 #line 5213 "configure"
5213 #include "confdefs.h"
5214 /* System header to define __stub macros and hopefully few prototypes,
5215     which can conflict with char $ac_func(); below.  */
5216 #include <assert.h>
5217 /* Override any gcc2 internal prototype to avoid an error.  */
5218 /* We use char because int might match the return type of a gcc2
5219     builtin and then its argument prototype would still apply.  */
5220 char $ac_func();
5221 char (*f)();
5222
5223 int main() {
5224
5225 /* The GNU C library defines this for functions which it implements
5226     to always fail with ENOSYS.  Some functions are actually named
5227     something starting with __ and the normal name is an alias.  */
5228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5229 choke me
5230 #else
5231 f = $ac_func;
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   eval "ac_cv_func_$ac_func=yes"
5239 else
5240   echo "configure: failed program was:" >&5
5241   cat conftest.$ac_ext >&5
5242   rm -rf conftest*
5243   eval "ac_cv_func_$ac_func=no"
5244 fi
5245 rm -f conftest*
5246 fi
5247
5248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5249   echo "$ac_t""yes" 1>&6
5250     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5251   cat >> confdefs.h <<EOF
5252 #define $ac_tr_func 1
5253 EOF
5254  
5255 else
5256   echo "$ac_t""no" 1>&6
5257 fi
5258 done
5259
5260
5261 if test "$ac_cv_func_ctime_r" = no ; then
5262         ol_cv_func_ctime_r_nargs=0
5263 else
5264         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5265 echo "configure:5266: checking number of arguments of ctime_r" >&5
5266 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 #include <time.h>
5273 int main() {
5274 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5275 ; return 0; }
5276 EOF
5277 if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5278   rm -rf conftest*
5279   ol_cv_func_ctime_r_nargs=3
5280 else
5281   echo "configure: failed program was:" >&5
5282   cat conftest.$ac_ext >&5
5283   rm -rf conftest*
5284   cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5287 #include <time.h>
5288 int main() {
5289 time_t ti; char *buffer; ctime_r(&ti,buffer);
5290 ; return 0; }
5291 EOF
5292 if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5293   rm -rf conftest*
5294   ol_cv_func_ctime_r_nargs=2
5295 else
5296   echo "configure: failed program was:" >&5
5297   cat conftest.$ac_ext >&5
5298   rm -rf conftest*
5299   ol_cv_func_ctime_r_nargs=0
5300 fi
5301 rm -f conftest*
5302 fi
5303 rm -f conftest*
5304 fi
5305
5306 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5307   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5308     cat >> confdefs.h <<EOF
5309 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5310 EOF
5311
5312   fi
5313
5314 fi
5315
5316 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5317         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5318 echo "configure:5319: checking number of arguments of gethostbyname_r" >&5
5319 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5320   echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 #include <sys/types.h>
5326 #include <sys/socket.h>
5327 #include <netinet/in.h>
5328 #include <netdb.h>
5329 #define BUFSIZE (sizeof(struct hostent)+10)
5330 int main() {
5331 struct hostent hent; char buffer[BUFSIZE];
5332                 int bufsize=BUFSIZE;int h_errno;
5333                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5334                         buffer, bufsize, &h_errno);
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5338   rm -rf conftest*
5339   ol_cv_func_gethostbyname_r_nargs=5
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5347 #include <sys/types.h>
5348 #include <sys/socket.h>
5349 #include <netinet/in.h>
5350 #include <netdb.h>
5351 #define BUFSIZE (sizeof(struct hostent)+10)
5352 int main() {
5353 struct hostent hent;struct hostent *rhent;
5354                         char buffer[BUFSIZE];
5355                         int bufsize=BUFSIZE;int h_errno;
5356                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5357                                 &rhent, &h_errno);
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5361   rm -rf conftest*
5362   ol_cv_func_gethostbyname_r_nargs=6
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   ol_cv_func_gethostbyname_r_nargs=0
5368 fi
5369 rm -f conftest*
5370 fi
5371 rm -f conftest*
5372 fi
5373
5374 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5375   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5376         cat >> confdefs.h <<EOF
5377 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5378 EOF
5379
5380   fi
5381
5382 else
5383         ol_cv_func_gethostbyname_r_nargs=0
5384 fi
5385  
5386 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5387         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5388 echo "configure:5389: checking number of arguments of gethostbyaddr_r" >&5
5389 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5390   echo $ac_n "(cached) $ac_c" 1>&6
5391 else
5392   cat > conftest.$ac_ext <<EOF
5393 #line 5394 "configure"
5394 #include "confdefs.h"
5395 #include <sys/types.h>
5396 #include <sys/socket.h>
5397 #include <netinet/in.h>
5398 #include <netdb.h>
5399 #define BUFSIZE (sizeof(struct hostent)+10)
5400 int main() {
5401 struct hostent hent; char buffer[BUFSIZE]; 
5402             struct in_addr add;
5403             size_t alen=sizeof(struct in_addr);
5404             int bufsize=BUFSIZE;int h_errno;
5405                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5406                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5410   rm -rf conftest*
5411   ol_cv_func_gethostbyaddr_r_nargs=7
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419 #include <sys/types.h>
5420 #include <sys/socket.h>
5421 #include <netinet/in.h>
5422 #include <netdb.h>
5423 #define BUFSIZE (sizeof(struct hostent)+10)
5424 int main() {
5425 struct hostent hent;
5426                         struct hostent *rhent; char buffer[BUFSIZE]; 
5427                         struct in_addr add;
5428                         size_t alen=sizeof(struct in_addr);
5429                         int bufsize=BUFSIZE;int h_errno;
5430                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5431                                 alen, AF_INET, &hent, buffer, bufsize, 
5432                                 &rhent, &h_errno);
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5436   rm -rf conftest*
5437   ol_cv_func_gethostbyaddr_r_nargs=8
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   ol_cv_func_gethostbyaddr_r_nargs=0
5443 fi
5444 rm -f conftest*
5445 fi
5446 rm -f conftest*
5447 fi
5448
5449 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5450   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5451     cat >> confdefs.h <<EOF
5452 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5453 EOF
5454
5455   fi
5456
5457 else
5458         ol_cv_func_gethostbyaddr_r_nargs=0
5459 fi
5460
5461 if test "$ac_cv_func_ctime_r" = yes \
5462         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5463         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5464         -a "$ac_cv_func_gethostbyname_r" = yes \
5465         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5466         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5467         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5468         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5469         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5470         ; then
5471  
5472         cat >> confdefs.h <<\EOF
5473 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5474 EOF
5475
5476 fi
5477
5478 ol_link_threads=no
5479 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5480         -o $ol_with_threads = posix ; then
5481
5482         for ac_hdr in pthread.h sched.h
5483 do
5484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5486 echo "configure:5487: checking for $ac_hdr" >&5
5487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5488   echo $ac_n "(cached) $ac_c" 1>&6
5489 else
5490   cat > conftest.$ac_ext <<EOF
5491 #line 5492 "configure"
5492 #include "confdefs.h"
5493 #include <$ac_hdr>
5494 EOF
5495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5496 { (eval echo configure:5497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5498 if test -z "$ac_err"; then
5499   rm -rf conftest*
5500   eval "ac_cv_header_$ac_safe=yes"
5501 else
5502   echo "$ac_err" >&5
5503   echo "configure: failed program was:" >&5
5504   cat conftest.$ac_ext >&5
5505   rm -rf conftest*
5506   eval "ac_cv_header_$ac_safe=no"
5507 fi
5508 rm -f conftest*
5509 fi
5510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5511   echo "$ac_t""yes" 1>&6
5512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5513   cat >> confdefs.h <<EOF
5514 #define $ac_tr_hdr 1
5515 EOF
5516  
5517 else
5518   echo "$ac_t""no" 1>&6
5519 fi
5520 done
5521
5522
5523         if test $ac_cv_header_pthread_h = yes ; then
5524                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5525 echo "configure:5526: checking POSIX thread version" >&5
5526 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
5527   echo $ac_n "(cached) $ac_c" 1>&6
5528 else
5529   
5530         cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533
5534 #               include <pthread.h>
5535                 /* this check could be improved */
5536 #               ifdef PTHREAD_ONCE_INIT
5537                         pthread_version_final
5538 #               endif
5539         
5540 EOF
5541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5542   egrep "pthread_version_final" >/dev/null 2>&1; then
5543   rm -rf conftest*
5544   ol_pthread_final=yes
5545 else
5546   rm -rf conftest*
5547   ol_pthread_final=no
5548 fi
5549 rm -f conftest*
5550
5551
5552         cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555
5556 #               include <pthread.h>
5557                 /* this check could be improved */
5558 #               ifdef pthread_once_init
5559                         pthread_version_draft4
5560 #               endif
5561         
5562 EOF
5563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5564   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5565   rm -rf conftest*
5566   ol_pthread_draft4=yes
5567 else
5568   rm -rf conftest*
5569   ol_pthread_draft4=no
5570 fi
5571 rm -f conftest*
5572
5573
5574         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5575                 ol_cv_pthread_version=final
5576         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5577                 ol_cv_pthread_version=draft4
5578         else
5579                 ol_cv_pthread_version=unknown
5580         fi
5581
5582 fi
5583
5584 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5585
5586
5587                 if test $ol_cv_pthread_version = final ; then
5588                         cat >> confdefs.h <<\EOF
5589 #define HAVE_PTHREADS_FINAL 1
5590 EOF
5591
5592                 elif test $ol_cv_pthread_version = draft4 ; then
5593                         cat >> confdefs.h <<\EOF
5594 #define HAVE_PTHREADS_D4 1
5595 EOF
5596
5597                 else
5598                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5599                 fi
5600
5601                 # consider threads found
5602                 ol_with_threads=found
5603
5604                 
5605         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5606 echo "configure:5607: checking for LinuxThreads pthread.h" >&5
5607 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
5608   echo $ac_n "(cached) $ac_c" 1>&6
5609 else
5610   cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613 #include <pthread.h>
5614 EOF
5615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5616   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5617   rm -rf conftest*
5618   ol_cv_header_linux_threads=yes
5619 else
5620   rm -rf conftest*
5621   ol_cv_header_linux_threads=no
5622 fi
5623 rm -f conftest*
5624
5625                 
5626 fi
5627
5628 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5629         if test $ol_cv_header_linux_threads = yes; then
5630                 cat >> confdefs.h <<\EOF
5631 #define HAVE_LINUX_THREADS 1
5632 EOF
5633
5634         fi
5635
5636
5637                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5638                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5639 echo "configure:5640: checking for pthread_create in default libraries" >&5
5640 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
5641   echo $ac_n "(cached) $ac_c" 1>&6
5642 else
5643   
5644                 if test "$cross_compiling" = yes; then
5645                         ol_cv_pthread_create=yes
5646 else
5647   cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650
5651 #include <pthread.h>
5652 #ifndef NULL
5653 #define NULL (void*)0
5654 #endif
5655
5656 static void *task(p)
5657         void *p;
5658 {
5659         return (void *) (p == NULL);
5660 }
5661
5662 int main(argc, argv)
5663         int argc;
5664         char **argv;
5665 {
5666         pthread_t t;
5667         int status;
5668
5669         /* make sure pthread_create() isn't just a stub */
5670 #if HAVE_PTHREADS_D4
5671         status = pthread_create(&t, pthread_attr_default, task, NULL);
5672 #else
5673         status = pthread_create(&t, NULL, task, NULL);
5674 #endif
5675
5676         if( status ) return status;
5677
5678         /* make sure pthread_detach() isn't just a stub */
5679 #if HAVE_PTHREADS_D4
5680         status = pthread_detach( &t );
5681 #else
5682         status = pthread_detach( t );
5683 #endif
5684
5685         if( status ) return status;
5686
5687         return status;
5688 }
5689
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5692 then
5693   ol_cv_pthread_create=yes
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -fr conftest*
5698   ol_cv_pthread_create=no
5699 fi
5700 rm -fr conftest*
5701 fi
5702
5703 fi
5704
5705 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5706
5707                 if test $ol_cv_pthread_create != no ; then
5708                         ol_link_threads=posix
5709                         ol_link_pthreads=""
5710                 fi
5711                 
5712                 # Pthread try link: -mt (ol_cv_pthread_mt)
5713         if test "$ol_link_threads" = no ; then
5714                 # try -mt
5715                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5716 echo "configure:5717: checking for pthread link with -mt" >&5
5717 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
5718   echo $ac_n "(cached) $ac_c" 1>&6
5719 else
5720   
5721                         # save the flags
5722                         ol_LIBS="$LIBS"
5723                         LIBS="-mt $LIBS"
5724
5725                         cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5728
5729 #include <pthread.h>
5730 #ifndef NULL
5731 #define NULL (void*)0
5732 #endif
5733
5734 int main() {
5735
5736         pthread_t t;
5737
5738 #if HAVE_PTHREADS_D4
5739         pthread_create(&t, pthread_attr_default, NULL, NULL);
5740         pthread_detach( &t );
5741 #else
5742         pthread_create(&t, NULL, NULL, NULL);
5743         pthread_detach( t );
5744 #endif
5745 #ifdef HAVE_LINUX_THREADS
5746         pthread_kill_other_threads_np();
5747 #endif
5748
5749 ; return 0; }
5750 EOF
5751 if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5752   rm -rf conftest*
5753   ol_cv_pthread_mt=yes
5754 else
5755   echo "configure: failed program was:" >&5
5756   cat conftest.$ac_ext >&5
5757   rm -rf conftest*
5758   ol_cv_pthread_mt=no
5759 fi
5760 rm -f conftest*
5761
5762                 # restore the LIBS
5763                 LIBS="$ol_LIBS"
5764                 
5765 fi
5766
5767 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5768
5769                 if test $ol_cv_pthread_mt = yes ; then
5770                         ol_link_pthreads="-mt"
5771                         ol_link_threads=posix
5772                 fi
5773         fi
5774
5775                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5776         if test "$ol_link_threads" = no ; then
5777                 # try -kthread
5778                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5779 echo "configure:5780: checking for pthread link with -kthread" >&5
5780 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
5781   echo $ac_n "(cached) $ac_c" 1>&6
5782 else
5783   
5784                         # save the flags
5785                         ol_LIBS="$LIBS"
5786                         LIBS="-kthread $LIBS"
5787
5788                         cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791
5792 #include <pthread.h>
5793 #ifndef NULL
5794 #define NULL (void*)0
5795 #endif
5796
5797 int main() {
5798
5799         pthread_t t;
5800
5801 #if HAVE_PTHREADS_D4
5802         pthread_create(&t, pthread_attr_default, NULL, NULL);
5803         pthread_detach( &t );
5804 #else
5805         pthread_create(&t, NULL, NULL, NULL);
5806         pthread_detach( t );
5807 #endif
5808 #ifdef HAVE_LINUX_THREADS
5809         pthread_kill_other_threads_np();
5810 #endif
5811
5812 ; return 0; }
5813 EOF
5814 if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5815   rm -rf conftest*
5816   ol_cv_pthread_kthread=yes
5817 else
5818   echo "configure: failed program was:" >&5
5819   cat conftest.$ac_ext >&5
5820   rm -rf conftest*
5821   ol_cv_pthread_kthread=no
5822 fi
5823 rm -f conftest*
5824
5825                 # restore the LIBS
5826                 LIBS="$ol_LIBS"
5827                 
5828 fi
5829
5830 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5831
5832                 if test $ol_cv_pthread_kthread = yes ; then
5833                         ol_link_pthreads="-kthread"
5834                         ol_link_threads=posix
5835                 fi
5836         fi
5837
5838                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5839         if test "$ol_link_threads" = no ; then
5840                 # try -pthread
5841                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5842 echo "configure:5843: checking for pthread link with -pthread" >&5
5843 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   
5847                         # save the flags
5848                         ol_LIBS="$LIBS"
5849                         LIBS="-pthread $LIBS"
5850
5851                         cat > conftest.$ac_ext <<EOF
5852 #line 5853 "configure"
5853 #include "confdefs.h"
5854
5855 #include <pthread.h>
5856 #ifndef NULL
5857 #define NULL (void*)0
5858 #endif
5859
5860 int main() {
5861
5862         pthread_t t;
5863
5864 #if HAVE_PTHREADS_D4
5865         pthread_create(&t, pthread_attr_default, NULL, NULL);
5866         pthread_detach( &t );
5867 #else
5868         pthread_create(&t, NULL, NULL, NULL);
5869         pthread_detach( t );
5870 #endif
5871 #ifdef HAVE_LINUX_THREADS
5872         pthread_kill_other_threads_np();
5873 #endif
5874
5875 ; return 0; }
5876 EOF
5877 if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5878   rm -rf conftest*
5879   ol_cv_pthread_pthread=yes
5880 else
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   ol_cv_pthread_pthread=no
5885 fi
5886 rm -f conftest*
5887
5888                 # restore the LIBS
5889                 LIBS="$ol_LIBS"
5890                 
5891 fi
5892
5893 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5894
5895                 if test $ol_cv_pthread_pthread = yes ; then
5896                         ol_link_pthreads="-pthread"
5897                         ol_link_threads=posix
5898                 fi
5899         fi
5900
5901                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5902         if test "$ol_link_threads" = no ; then
5903                 # try -pthreads
5904                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5905 echo "configure:5906: checking for pthread link with -pthreads" >&5
5906 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
5907   echo $ac_n "(cached) $ac_c" 1>&6
5908 else
5909   
5910                         # save the flags
5911                         ol_LIBS="$LIBS"
5912                         LIBS="-pthreads $LIBS"
5913
5914                         cat > conftest.$ac_ext <<EOF
5915 #line 5916 "configure"
5916 #include "confdefs.h"
5917
5918 #include <pthread.h>
5919 #ifndef NULL
5920 #define NULL (void*)0
5921 #endif
5922
5923 int main() {
5924
5925         pthread_t t;
5926
5927 #if HAVE_PTHREADS_D4
5928         pthread_create(&t, pthread_attr_default, NULL, NULL);
5929         pthread_detach( &t );
5930 #else
5931         pthread_create(&t, NULL, NULL, NULL);
5932         pthread_detach( t );
5933 #endif
5934 #ifdef HAVE_LINUX_THREADS
5935         pthread_kill_other_threads_np();
5936 #endif
5937
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5941   rm -rf conftest*
5942   ol_cv_pthread_pthreads=yes
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   ol_cv_pthread_pthreads=no
5948 fi
5949 rm -f conftest*
5950
5951                 # restore the LIBS
5952                 LIBS="$ol_LIBS"
5953                 
5954 fi
5955
5956 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5957
5958                 if test $ol_cv_pthread_pthreads = yes ; then
5959                         ol_link_pthreads="-pthreads"
5960                         ol_link_threads=posix
5961                 fi
5962         fi
5963
5964                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
5965         if test "$ol_link_threads" = no ; then
5966                 # try -mthreads
5967                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
5968 echo "configure:5969: checking for pthread link with -mthreads" >&5
5969 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
5970   echo $ac_n "(cached) $ac_c" 1>&6
5971 else
5972   
5973                         # save the flags
5974                         ol_LIBS="$LIBS"
5975                         LIBS="-mthreads $LIBS"
5976
5977                         cat > conftest.$ac_ext <<EOF
5978 #line 5979 "configure"
5979 #include "confdefs.h"
5980
5981 #include <pthread.h>
5982 #ifndef NULL
5983 #define NULL (void*)0
5984 #endif
5985
5986 int main() {
5987
5988         pthread_t t;
5989
5990 #if HAVE_PTHREADS_D4
5991         pthread_create(&t, pthread_attr_default, NULL, NULL);
5992         pthread_detach( &t );
5993 #else
5994         pthread_create(&t, NULL, NULL, NULL);
5995         pthread_detach( t );
5996 #endif
5997 #ifdef HAVE_LINUX_THREADS
5998         pthread_kill_other_threads_np();
5999 #endif
6000
6001 ; return 0; }
6002 EOF
6003 if { (eval echo configure:6004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6004   rm -rf conftest*
6005   ol_cv_pthread_mthreads=yes
6006 else
6007   echo "configure: failed program was:" >&5
6008   cat conftest.$ac_ext >&5
6009   rm -rf conftest*
6010   ol_cv_pthread_mthreads=no
6011 fi
6012 rm -f conftest*
6013
6014                 # restore the LIBS
6015                 LIBS="$ol_LIBS"
6016                 
6017 fi
6018
6019 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6020
6021                 if test $ol_cv_pthread_mthreads = yes ; then
6022                         ol_link_pthreads="-mthreads"
6023                         ol_link_threads=posix
6024                 fi
6025         fi
6026
6027                 # Pthread try link: -thread (ol_cv_pthread_thread)
6028         if test "$ol_link_threads" = no ; then
6029                 # try -thread
6030                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6031 echo "configure:6032: checking for pthread link with -thread" >&5
6032 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6033   echo $ac_n "(cached) $ac_c" 1>&6
6034 else
6035   
6036                         # save the flags
6037                         ol_LIBS="$LIBS"
6038                         LIBS="-thread $LIBS"
6039
6040                         cat > conftest.$ac_ext <<EOF
6041 #line 6042 "configure"
6042 #include "confdefs.h"
6043
6044 #include <pthread.h>
6045 #ifndef NULL
6046 #define NULL (void*)0
6047 #endif
6048
6049 int main() {
6050
6051         pthread_t t;
6052
6053 #if HAVE_PTHREADS_D4
6054         pthread_create(&t, pthread_attr_default, NULL, NULL);
6055         pthread_detach( &t );
6056 #else
6057         pthread_create(&t, NULL, NULL, NULL);
6058         pthread_detach( t );
6059 #endif
6060 #ifdef HAVE_LINUX_THREADS
6061         pthread_kill_other_threads_np();
6062 #endif
6063
6064 ; return 0; }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6067   rm -rf conftest*
6068   ol_cv_pthread_thread=yes
6069 else
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   ol_cv_pthread_thread=no
6074 fi
6075 rm -f conftest*
6076
6077                 # restore the LIBS
6078                 LIBS="$ol_LIBS"
6079                 
6080 fi
6081
6082 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6083
6084                 if test $ol_cv_pthread_thread = yes ; then
6085                         ol_link_pthreads="-thread"
6086                         ol_link_threads=posix
6087                 fi
6088         fi
6089
6090
6091                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6092         if test "$ol_link_threads" = no ; then
6093                 # try -lpthread -lmach -lexc -lc_r
6094                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6095 echo "configure:6096: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6096 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6097   echo $ac_n "(cached) $ac_c" 1>&6
6098 else
6099   
6100                         # save the flags
6101                         ol_LIBS="$LIBS"
6102                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6103
6104                         cat > conftest.$ac_ext <<EOF
6105 #line 6106 "configure"
6106 #include "confdefs.h"
6107
6108 #include <pthread.h>
6109 #ifndef NULL
6110 #define NULL (void*)0
6111 #endif
6112
6113 int main() {
6114
6115         pthread_t t;
6116
6117 #if HAVE_PTHREADS_D4
6118         pthread_create(&t, pthread_attr_default, NULL, NULL);
6119         pthread_detach( &t );
6120 #else
6121         pthread_create(&t, NULL, NULL, NULL);
6122         pthread_detach( t );
6123 #endif
6124 #ifdef HAVE_LINUX_THREADS
6125         pthread_kill_other_threads_np();
6126 #endif
6127
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131   rm -rf conftest*
6132   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6133 else
6134   echo "configure: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   rm -rf conftest*
6137   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6138 fi
6139 rm -f conftest*
6140
6141                 # restore the LIBS
6142                 LIBS="$ol_LIBS"
6143                 
6144 fi
6145
6146 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6147
6148                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6149                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6150                         ol_link_threads=posix
6151                 fi
6152         fi
6153
6154                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6155         if test "$ol_link_threads" = no ; then
6156                 # try -lpthread -lmach -lexc
6157                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6158 echo "configure:6159: checking for pthread link with -lpthread -lmach -lexc" >&5
6159 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6160   echo $ac_n "(cached) $ac_c" 1>&6
6161 else
6162   
6163                         # save the flags
6164                         ol_LIBS="$LIBS"
6165                         LIBS="-lpthread -lmach -lexc $LIBS"
6166
6167                         cat > conftest.$ac_ext <<EOF
6168 #line 6169 "configure"
6169 #include "confdefs.h"
6170
6171 #include <pthread.h>
6172 #ifndef NULL
6173 #define NULL (void*)0
6174 #endif
6175
6176 int main() {
6177
6178         pthread_t t;
6179
6180 #if HAVE_PTHREADS_D4
6181         pthread_create(&t, pthread_attr_default, NULL, NULL);
6182         pthread_detach( &t );
6183 #else
6184         pthread_create(&t, NULL, NULL, NULL);
6185         pthread_detach( t );
6186 #endif
6187 #ifdef HAVE_LINUX_THREADS
6188         pthread_kill_other_threads_np();
6189 #endif
6190
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   ol_cv_pthread_lpthread_lmach_lexc=yes
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   ol_cv_pthread_lpthread_lmach_lexc=no
6201 fi
6202 rm -f conftest*
6203
6204                 # restore the LIBS
6205                 LIBS="$ol_LIBS"
6206                 
6207 fi
6208
6209 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6210
6211                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6212                         ol_link_pthreads="-lpthread -lmach -lexc"
6213                         ol_link_threads=posix
6214                 fi
6215         fi
6216
6217
6218                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6219         if test "$ol_link_threads" = no ; then
6220                 # try -lpthread -Wl,-woff,85
6221                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6222 echo "configure:6223: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6223 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6224   echo $ac_n "(cached) $ac_c" 1>&6
6225 else
6226   
6227                         # save the flags
6228                         ol_LIBS="$LIBS"
6229                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6230
6231                         cat > conftest.$ac_ext <<EOF
6232 #line 6233 "configure"
6233 #include "confdefs.h"
6234
6235 #include <pthread.h>
6236 #ifndef NULL
6237 #define NULL (void*)0
6238 #endif
6239
6240 int main() {
6241
6242         pthread_t t;
6243
6244 #if HAVE_PTHREADS_D4
6245         pthread_create(&t, pthread_attr_default, NULL, NULL);
6246         pthread_detach( &t );
6247 #else
6248         pthread_create(&t, NULL, NULL, NULL);
6249         pthread_detach( t );
6250 #endif
6251 #ifdef HAVE_LINUX_THREADS
6252         pthread_kill_other_threads_np();
6253 #endif
6254
6255 ; return 0; }
6256 EOF
6257 if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6258   rm -rf conftest*
6259   ol_cv_pthread_lib_lpthread_woff=yes
6260 else
6261   echo "configure: failed program was:" >&5
6262   cat conftest.$ac_ext >&5
6263   rm -rf conftest*
6264   ol_cv_pthread_lib_lpthread_woff=no
6265 fi
6266 rm -f conftest*
6267
6268                 # restore the LIBS
6269                 LIBS="$ol_LIBS"
6270                 
6271 fi
6272
6273 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6274
6275                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6276                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6277                         ol_link_threads=posix
6278                 fi
6279         fi
6280
6281
6282                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6283         if test "$ol_link_threads" = no ; then
6284                 # try -lpthread
6285                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6286 echo "configure:6287: checking for pthread link with -lpthread" >&5
6287 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6288   echo $ac_n "(cached) $ac_c" 1>&6
6289 else
6290   
6291                         # save the flags
6292                         ol_LIBS="$LIBS"
6293                         LIBS="-lpthread $LIBS"
6294
6295                         cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298
6299 #include <pthread.h>
6300 #ifndef NULL
6301 #define NULL (void*)0
6302 #endif
6303
6304 int main() {
6305
6306         pthread_t t;
6307
6308 #if HAVE_PTHREADS_D4
6309         pthread_create(&t, pthread_attr_default, NULL, NULL);
6310         pthread_detach( &t );
6311 #else
6312         pthread_create(&t, NULL, NULL, NULL);
6313         pthread_detach( t );
6314 #endif
6315 #ifdef HAVE_LINUX_THREADS
6316         pthread_kill_other_threads_np();
6317 #endif
6318
6319 ; return 0; }
6320 EOF
6321 if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6322   rm -rf conftest*
6323   ol_cv_pthread_lpthread=yes
6324 else
6325   echo "configure: failed program was:" >&5
6326   cat conftest.$ac_ext >&5
6327   rm -rf conftest*
6328   ol_cv_pthread_lpthread=no
6329 fi
6330 rm -f conftest*
6331
6332                 # restore the LIBS
6333                 LIBS="$ol_LIBS"
6334                 
6335 fi
6336
6337 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6338
6339                 if test $ol_cv_pthread_lpthread = yes ; then
6340                         ol_link_pthreads="-lpthread"
6341                         ol_link_threads=posix
6342                 fi
6343         fi
6344
6345                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6346         if test "$ol_link_threads" = no ; then
6347                 # try -lc_r
6348                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6349 echo "configure:6350: checking for pthread link with -lc_r" >&5
6350 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6351   echo $ac_n "(cached) $ac_c" 1>&6
6352 else
6353   
6354                         # save the flags
6355                         ol_LIBS="$LIBS"
6356                         LIBS="-lc_r $LIBS"
6357
6358                         cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6361
6362 #include <pthread.h>
6363 #ifndef NULL
6364 #define NULL (void*)0
6365 #endif
6366
6367 int main() {
6368
6369         pthread_t t;
6370
6371 #if HAVE_PTHREADS_D4
6372         pthread_create(&t, pthread_attr_default, NULL, NULL);
6373         pthread_detach( &t );
6374 #else
6375         pthread_create(&t, NULL, NULL, NULL);
6376         pthread_detach( t );
6377 #endif
6378 #ifdef HAVE_LINUX_THREADS
6379         pthread_kill_other_threads_np();
6380 #endif
6381
6382 ; return 0; }
6383 EOF
6384 if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6385   rm -rf conftest*
6386   ol_cv_pthread_lc_r=yes
6387 else
6388   echo "configure: failed program was:" >&5
6389   cat conftest.$ac_ext >&5
6390   rm -rf conftest*
6391   ol_cv_pthread_lc_r=no
6392 fi
6393 rm -f conftest*
6394
6395                 # restore the LIBS
6396                 LIBS="$ol_LIBS"
6397                 
6398 fi
6399
6400 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6401
6402                 if test $ol_cv_pthread_lc_r = yes ; then
6403                         ol_link_pthreads="-lc_r"
6404                         ol_link_threads=posix
6405                 fi
6406         fi
6407
6408
6409                 # Pthread try link: -threads (ol_cv_pthread_threads)
6410         if test "$ol_link_threads" = no ; then
6411                 # try -threads
6412                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6413 echo "configure:6414: checking for pthread link with -threads" >&5
6414 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6415   echo $ac_n "(cached) $ac_c" 1>&6
6416 else
6417   
6418                         # save the flags
6419                         ol_LIBS="$LIBS"
6420                         LIBS="-threads $LIBS"
6421
6422                         cat > conftest.$ac_ext <<EOF
6423 #line 6424 "configure"
6424 #include "confdefs.h"
6425
6426 #include <pthread.h>
6427 #ifndef NULL
6428 #define NULL (void*)0
6429 #endif
6430
6431 int main() {
6432
6433         pthread_t t;
6434
6435 #if HAVE_PTHREADS_D4
6436         pthread_create(&t, pthread_attr_default, NULL, NULL);
6437         pthread_detach( &t );
6438 #else
6439         pthread_create(&t, NULL, NULL, NULL);
6440         pthread_detach( t );
6441 #endif
6442 #ifdef HAVE_LINUX_THREADS
6443         pthread_kill_other_threads_np();
6444 #endif
6445
6446 ; return 0; }
6447 EOF
6448 if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6449   rm -rf conftest*
6450   ol_cv_pthread_threads=yes
6451 else
6452   echo "configure: failed program was:" >&5
6453   cat conftest.$ac_ext >&5
6454   rm -rf conftest*
6455   ol_cv_pthread_threads=no
6456 fi
6457 rm -f conftest*
6458
6459                 # restore the LIBS
6460                 LIBS="$ol_LIBS"
6461                 
6462 fi
6463
6464 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6465
6466                 if test $ol_cv_pthread_threads = yes ; then
6467                         ol_link_pthreads="-threads"
6468                         ol_link_threads=posix
6469                 fi
6470         fi
6471
6472
6473                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6474         if test "$ol_link_threads" = no ; then
6475                 # try -lpthreads -lmach -lexc -lc_r
6476                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6477 echo "configure:6478: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6478 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
6479   echo $ac_n "(cached) $ac_c" 1>&6
6480 else
6481   
6482                         # save the flags
6483                         ol_LIBS="$LIBS"
6484                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6485
6486                         cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489
6490 #include <pthread.h>
6491 #ifndef NULL
6492 #define NULL (void*)0
6493 #endif
6494
6495 int main() {
6496
6497         pthread_t t;
6498
6499 #if HAVE_PTHREADS_D4
6500         pthread_create(&t, pthread_attr_default, NULL, NULL);
6501         pthread_detach( &t );
6502 #else
6503         pthread_create(&t, NULL, NULL, NULL);
6504         pthread_detach( t );
6505 #endif
6506 #ifdef HAVE_LINUX_THREADS
6507         pthread_kill_other_threads_np();
6508 #endif
6509
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6520 fi
6521 rm -f conftest*
6522
6523                 # restore the LIBS
6524                 LIBS="$ol_LIBS"
6525                 
6526 fi
6527
6528 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6529
6530                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6531                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6532                         ol_link_threads=posix
6533                 fi
6534         fi
6535
6536                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6537         if test "$ol_link_threads" = no ; then
6538                 # try -lpthreads -lmach -lexc
6539                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6540 echo "configure:6541: checking for pthread link with -lpthreads -lmach -lexc" >&5
6541 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
6542   echo $ac_n "(cached) $ac_c" 1>&6
6543 else
6544   
6545                         # save the flags
6546                         ol_LIBS="$LIBS"
6547                         LIBS="-lpthreads -lmach -lexc $LIBS"
6548
6549                         cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552
6553 #include <pthread.h>
6554 #ifndef NULL
6555 #define NULL (void*)0
6556 #endif
6557
6558 int main() {
6559
6560         pthread_t t;
6561
6562 #if HAVE_PTHREADS_D4
6563         pthread_create(&t, pthread_attr_default, NULL, NULL);
6564         pthread_detach( &t );
6565 #else
6566         pthread_create(&t, NULL, NULL, NULL);
6567         pthread_detach( t );
6568 #endif
6569 #ifdef HAVE_LINUX_THREADS
6570         pthread_kill_other_threads_np();
6571 #endif
6572
6573 ; return 0; }
6574 EOF
6575 if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6576   rm -rf conftest*
6577   ol_cv_pthread_lpthreads_lmach_lexc=yes
6578 else
6579   echo "configure: failed program was:" >&5
6580   cat conftest.$ac_ext >&5
6581   rm -rf conftest*
6582   ol_cv_pthread_lpthreads_lmach_lexc=no
6583 fi
6584 rm -f conftest*
6585
6586                 # restore the LIBS
6587                 LIBS="$ol_LIBS"
6588                 
6589 fi
6590
6591 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6592
6593                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6594                         ol_link_pthreads="-lpthreads -lmach -lexc"
6595                         ol_link_threads=posix
6596                 fi
6597         fi
6598
6599                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6600         if test "$ol_link_threads" = no ; then
6601                 # try -lpthreads -lexc
6602                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6603 echo "configure:6604: checking for pthread link with -lpthreads -lexc" >&5
6604 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
6605   echo $ac_n "(cached) $ac_c" 1>&6
6606 else
6607   
6608                         # save the flags
6609                         ol_LIBS="$LIBS"
6610                         LIBS="-lpthreads -lexc $LIBS"
6611
6612                         cat > conftest.$ac_ext <<EOF
6613 #line 6614 "configure"
6614 #include "confdefs.h"
6615
6616 #include <pthread.h>
6617 #ifndef NULL
6618 #define NULL (void*)0
6619 #endif
6620
6621 int main() {
6622
6623         pthread_t t;
6624
6625 #if HAVE_PTHREADS_D4
6626         pthread_create(&t, pthread_attr_default, NULL, NULL);
6627         pthread_detach( &t );
6628 #else
6629         pthread_create(&t, NULL, NULL, NULL);
6630         pthread_detach( t );
6631 #endif
6632 #ifdef HAVE_LINUX_THREADS
6633         pthread_kill_other_threads_np();
6634 #endif
6635
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   ol_cv_pthread_lpthreads_lexc=yes
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   ol_cv_pthread_lpthreads_lexc=no
6646 fi
6647 rm -f conftest*
6648
6649                 # restore the LIBS
6650                 LIBS="$ol_LIBS"
6651                 
6652 fi
6653
6654 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6655
6656                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6657                         ol_link_pthreads="-lpthreads -lexc"
6658                         ol_link_threads=posix
6659                 fi
6660         fi
6661
6662
6663                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6664         if test "$ol_link_threads" = no ; then
6665                 # try -lpthreads
6666                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6667 echo "configure:6668: checking for pthread link with -lpthreads" >&5
6668 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
6669   echo $ac_n "(cached) $ac_c" 1>&6
6670 else
6671   
6672                         # save the flags
6673                         ol_LIBS="$LIBS"
6674                         LIBS="-lpthreads $LIBS"
6675
6676                         cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679
6680 #include <pthread.h>
6681 #ifndef NULL
6682 #define NULL (void*)0
6683 #endif
6684
6685 int main() {
6686
6687         pthread_t t;
6688
6689 #if HAVE_PTHREADS_D4
6690         pthread_create(&t, pthread_attr_default, NULL, NULL);
6691         pthread_detach( &t );
6692 #else
6693         pthread_create(&t, NULL, NULL, NULL);
6694         pthread_detach( t );
6695 #endif
6696 #ifdef HAVE_LINUX_THREADS
6697         pthread_kill_other_threads_np();
6698 #endif
6699
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6703   rm -rf conftest*
6704   ol_cv_pthread_lib_lpthreads=yes
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   ol_cv_pthread_lib_lpthreads=no
6710 fi
6711 rm -f conftest*
6712
6713                 # restore the LIBS
6714                 LIBS="$ol_LIBS"
6715                 
6716 fi
6717
6718 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6719
6720                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6721                         ol_link_pthreads="-lpthreads"
6722                         ol_link_threads=posix
6723                 fi
6724         fi
6725
6726
6727                 if test $ol_link_threads != no ; then
6728                         cat >> confdefs.h <<\EOF
6729 #define HAVE_PTHREADS 1
6730 EOF
6731
6732
6733                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6734
6735                                                 save_CPPFLAGS="$CPPFLAGS"
6736                         save_LIBS="$LIBS"
6737                         LIBS="$LTHREAD_LIBS $LIBS"
6738
6739                                                                                                 for ac_func in sched_yield pthread_yield
6740 do
6741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6742 echo "configure:6743: checking for $ac_func" >&5
6743 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6744   echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746   cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749 /* System header to define __stub macros and hopefully few prototypes,
6750     which can conflict with char $ac_func(); below.  */
6751 #include <assert.h>
6752 /* Override any gcc2 internal prototype to avoid an error.  */
6753 /* We use char because int might match the return type of a gcc2
6754     builtin and then its argument prototype would still apply.  */
6755 char $ac_func();
6756 char (*f)();
6757
6758 int main() {
6759
6760 /* The GNU C library defines this for functions which it implements
6761     to always fail with ENOSYS.  Some functions are actually named
6762     something starting with __ and the normal name is an alias.  */
6763 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6764 choke me
6765 #else
6766 f = $ac_func;
6767 #endif
6768
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6772   rm -rf conftest*
6773   eval "ac_cv_func_$ac_func=yes"
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   eval "ac_cv_func_$ac_func=no"
6779 fi
6780 rm -f conftest*
6781 fi
6782
6783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6784   echo "$ac_t""yes" 1>&6
6785     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6786   cat >> confdefs.h <<EOF
6787 #define $ac_tr_func 1
6788 EOF
6789  
6790 else
6791   echo "$ac_t""no" 1>&6
6792 fi
6793 done
6794
6795
6796                         if test $ac_cv_func_sched_yield = no -a \
6797                                 $ac_cv_func_pthread_yield = no ; then
6798                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6799 echo "configure:6800: checking for sched_yield in -lrt" >&5
6800 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
6801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6802   echo $ac_n "(cached) $ac_c" 1>&6
6803 else
6804   ac_save_LIBS="$LIBS"
6805 LIBS="-lrt  $LIBS"
6806 cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 /* Override any gcc2 internal prototype to avoid an error.  */
6810 /* We use char because int might match the return type of a gcc2
6811     builtin and then its argument prototype would still apply.  */
6812 char sched_yield();
6813
6814 int main() {
6815 sched_yield()
6816 ; return 0; }
6817 EOF
6818 if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6819   rm -rf conftest*
6820   eval "ac_cv_lib_$ac_lib_var=yes"
6821 else
6822   echo "configure: failed program was:" >&5
6823   cat conftest.$ac_ext >&5
6824   rm -rf conftest*
6825   eval "ac_cv_lib_$ac_lib_var=no"
6826 fi
6827 rm -f conftest*
6828 LIBS="$ac_save_LIBS"
6829
6830 fi
6831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6832   echo "$ac_t""yes" 1>&6
6833   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6834                                         cat >> confdefs.h <<\EOF
6835 #define HAVE_SCHED_YIELD 1
6836 EOF
6837
6838                                         ac_cv_func_sched_yield=yes
6839 else
6840   echo "$ac_t""no" 1>&6
6841 ac_cv_func_sched_yield=no
6842 fi
6843
6844                         fi
6845                         if test $ac_cv_func_sched_yield = no -a \
6846                                 $ac_cv_func_pthread_yield = no ; then
6847                                                                                                 for ac_func in thr_yield
6848 do
6849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6850 echo "configure:6851: checking for $ac_func" >&5
6851 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6852   echo $ac_n "(cached) $ac_c" 1>&6
6853 else
6854   cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 /* System header to define __stub macros and hopefully few prototypes,
6858     which can conflict with char $ac_func(); below.  */
6859 #include <assert.h>
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char $ac_func();
6864 char (*f)();
6865
6866 int main() {
6867
6868 /* The GNU C library defines this for functions which it implements
6869     to always fail with ENOSYS.  Some functions are actually named
6870     something starting with __ and the normal name is an alias.  */
6871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6872 choke me
6873 #else
6874 f = $ac_func;
6875 #endif
6876
6877 ; return 0; }
6878 EOF
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6880   rm -rf conftest*
6881   eval "ac_cv_func_$ac_func=yes"
6882 else
6883   echo "configure: failed program was:" >&5
6884   cat conftest.$ac_ext >&5
6885   rm -rf conftest*
6886   eval "ac_cv_func_$ac_func=no"
6887 fi
6888 rm -f conftest*
6889 fi
6890
6891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6894   cat >> confdefs.h <<EOF
6895 #define $ac_tr_func 1
6896 EOF
6897  
6898 else
6899   echo "$ac_t""no" 1>&6
6900 fi
6901 done
6902
6903                         fi
6904                         if test $ac_cv_func_sched_yield = no -a \
6905                                 $ac_cv_func_pthread_yield = no -a \
6906                                 "$ac_cv_func_thr_yield" = no ; then
6907                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6908                         fi
6909
6910                                                 for ac_func in pthread_kill
6911 do
6912 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6913 echo "configure:6914: checking for $ac_func" >&5
6914 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6915   echo $ac_n "(cached) $ac_c" 1>&6
6916 else
6917   cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 /* System header to define __stub macros and hopefully few prototypes,
6921     which can conflict with char $ac_func(); below.  */
6922 #include <assert.h>
6923 /* Override any gcc2 internal prototype to avoid an error.  */
6924 /* We use char because int might match the return type of a gcc2
6925     builtin and then its argument prototype would still apply.  */
6926 char $ac_func();
6927 char (*f)();
6928
6929 int main() {
6930
6931 /* The GNU C library defines this for functions which it implements
6932     to always fail with ENOSYS.  Some functions are actually named
6933     something starting with __ and the normal name is an alias.  */
6934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6935 choke me
6936 #else
6937 f = $ac_func;
6938 #endif
6939
6940 ; return 0; }
6941 EOF
6942 if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6943   rm -rf conftest*
6944   eval "ac_cv_func_$ac_func=yes"
6945 else
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948   rm -rf conftest*
6949   eval "ac_cv_func_$ac_func=no"
6950 fi
6951 rm -f conftest*
6952 fi
6953
6954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6955   echo "$ac_t""yes" 1>&6
6956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6957   cat >> confdefs.h <<EOF
6958 #define $ac_tr_func 1
6959 EOF
6960  
6961 else
6962   echo "$ac_t""no" 1>&6
6963 fi
6964 done
6965
6966
6967                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6968 echo "configure:6969: checking for pthread_detach with <pthread.h>" >&5
6969 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
6970   echo $ac_n "(cached) $ac_c" 1>&6
6971 else
6972   
6973                                                                 cat > conftest.$ac_ext <<EOF
6974 #line 6975 "configure"
6975 #include "confdefs.h"
6976
6977 #include <pthread.h>
6978 #ifndef NULL
6979 #define NULL (void*)0
6980 #endif
6981
6982 int main() {
6983 pthread_detach(NULL);
6984 ; return 0; }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6987   rm -rf conftest*
6988   ol_cv_func_pthread_detach=yes
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -rf conftest*
6993   ol_cv_func_pthread_detach=no
6994 fi
6995 rm -f conftest*
6996                         
6997 fi
6998
6999 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7000
7001                         if test $ol_cv_func_pthread_detach = no ; then
7002                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7003                         fi
7004
7005                         cat >> confdefs.h <<\EOF
7006 #define HAVE_PTHREAD_DETACH 1
7007 EOF
7008
7009
7010                                                 for ac_func in \
7011                                 pthread_setconcurrency \
7012                                 pthread_getconcurrency \
7013                                 thr_setconcurrency \
7014                                 thr_getconcurrency \
7015                         
7016 do
7017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7018 echo "configure:7019: checking for $ac_func" >&5
7019 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7020   echo $ac_n "(cached) $ac_c" 1>&6
7021 else
7022   cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 /* System header to define __stub macros and hopefully few prototypes,
7026     which can conflict with char $ac_func(); below.  */
7027 #include <assert.h>
7028 /* Override any gcc2 internal prototype to avoid an error.  */
7029 /* We use char because int might match the return type of a gcc2
7030     builtin and then its argument prototype would still apply.  */
7031 char $ac_func();
7032 char (*f)();
7033
7034 int main() {
7035
7036 /* The GNU C library defines this for functions which it implements
7037     to always fail with ENOSYS.  Some functions are actually named
7038     something starting with __ and the normal name is an alias.  */
7039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7040 choke me
7041 #else
7042 f = $ac_func;
7043 #endif
7044
7045 ; return 0; }
7046 EOF
7047 if { (eval echo configure:7048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7048   rm -rf conftest*
7049   eval "ac_cv_func_$ac_func=yes"
7050 else
7051   echo "configure: failed program was:" >&5
7052   cat conftest.$ac_ext >&5
7053   rm -rf conftest*
7054   eval "ac_cv_func_$ac_func=no"
7055 fi
7056 rm -f conftest*
7057 fi
7058
7059 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7060   echo "$ac_t""yes" 1>&6
7061     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7062   cat >> confdefs.h <<EOF
7063 #define $ac_tr_func 1
7064 EOF
7065  
7066 else
7067   echo "$ac_t""no" 1>&6
7068 fi
7069 done
7070
7071
7072                         
7073         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7074 echo "configure:7075: checking for pthread_kill_other_threads_np" >&5
7075 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7076   echo $ac_n "(cached) $ac_c" 1>&6
7077 else
7078   cat > conftest.$ac_ext <<EOF
7079 #line 7080 "configure"
7080 #include "confdefs.h"
7081 /* System header to define __stub macros and hopefully few prototypes,
7082     which can conflict with char pthread_kill_other_threads_np(); below.  */
7083 #include <assert.h>
7084 /* Override any gcc2 internal prototype to avoid an error.  */
7085 /* We use char because int might match the return type of a gcc2
7086     builtin and then its argument prototype would still apply.  */
7087 char pthread_kill_other_threads_np();
7088 char (*f)();
7089
7090 int main() {
7091
7092 /* The GNU C library defines this for functions which it implements
7093     to always fail with ENOSYS.  Some functions are actually named
7094     something starting with __ and the normal name is an alias.  */
7095 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7096 choke me
7097 #else
7098 f = pthread_kill_other_threads_np;
7099 #endif
7100
7101 ; return 0; }
7102 EOF
7103 if { (eval echo configure:7104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7104   rm -rf conftest*
7105   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7106 else
7107   echo "configure: failed program was:" >&5
7108   cat conftest.$ac_ext >&5
7109   rm -rf conftest*
7110   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7111 fi
7112 rm -f conftest*
7113 fi
7114
7115 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7116   echo "$ac_t""yes" 1>&6
7117   :
7118 else
7119   echo "$ac_t""no" 1>&6
7120 fi
7121
7122         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7123 echo "configure:7124: checking for LinuxThreads implementation" >&5
7124 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7125   echo $ac_n "(cached) $ac_c" 1>&6
7126 else
7127   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7128 fi
7129
7130 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7131
7132                         
7133         
7134         
7135         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7136 echo "configure:7137: checking for LinuxThreads consistency" >&5
7137 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7138   echo $ac_n "(cached) $ac_c" 1>&6
7139 else
7140   
7141                 if test $ol_cv_header_linux_threads = yes -a \
7142                         $ol_cv_sys_linux_threads = yes; then
7143                         ol_cv_linux_threads=yes
7144                 elif test $ol_cv_header_linux_threads = no -a \
7145                         $ol_cv_sys_linux_threads = no; then
7146                         ol_cv_linux_threads=no
7147                 else
7148                         ol_cv_linux_threads=error
7149                 fi
7150         
7151 fi
7152
7153 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7154
7155
7156                         if test $ol_cv_linux_threads = error; then
7157                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7158                         fi
7159
7160                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7161 echo "configure:7162: checking if pthread_create() works" >&5
7162 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7163   echo $ac_n "(cached) $ac_c" 1>&6
7164 else
7165   
7166                         if test "$cross_compiling" = yes; then
7167                                 ol_cv_pthread_create_works=yes
7168 else
7169   cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172
7173 #include <pthread.h>
7174 #ifndef NULL
7175 #define NULL (void*)0
7176 #endif
7177
7178 static void *task(p)
7179         void *p;
7180 {
7181         return (void *) (p == NULL);
7182 }
7183
7184 int main(argc, argv)
7185         int argc;
7186         char **argv;
7187 {
7188         pthread_t t;
7189 #if HAVE_PTHREADS_D4
7190         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7191 #else
7192         exit(pthread_create(&t, NULL, task, NULL));
7193 #endif
7194 }
7195
7196 EOF
7197 if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7198 then
7199   ol_cv_pthread_create_works=yes
7200 else
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -fr conftest*
7204   ol_cv_pthread_create_works=no
7205 fi
7206 rm -fr conftest*
7207 fi
7208
7209 fi
7210
7211 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7212
7213                         if test $ol_cv_pthread_create_works = no ; then
7214                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7215                         fi
7216
7217                                                 if test $ol_with_yielding_select = auto ; then
7218                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7219 echo "configure:7220: checking if select yields when using pthreads" >&5
7220 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7221   echo $ac_n "(cached) $ac_c" 1>&6
7222 else
7223   
7224                                 if test "$cross_compiling" = yes; then
7225   ol_cv_pthread_select_yields=cross
7226 else
7227   cat > conftest.$ac_ext <<EOF
7228 #line 7229 "configure"
7229 #include "confdefs.h"
7230
7231 #include <sys/types.h>
7232 #include <sys/time.h>
7233 #include <unistd.h>
7234 #include <pthread.h>
7235 #ifndef NULL
7236 #define NULL (void*) 0
7237 #endif
7238
7239 static int fildes[2];
7240
7241 static void *task(p)
7242         void *p;
7243 {
7244         int i;
7245         struct timeval tv;
7246
7247         fd_set rfds;
7248
7249         tv.tv_sec=10;
7250         tv.tv_usec=0;
7251
7252         FD_ZERO(&rfds);
7253         FD_SET(fildes[0], &rfds);
7254
7255         /* we're not interested in any fds */
7256         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7257
7258         if(i < 0) {
7259                 perror("select");
7260                 exit(10);
7261         }
7262
7263         exit(0); /* if we exit here, the select blocked the whole process */
7264 }
7265
7266 int main(argc, argv)
7267         int argc;
7268         char **argv;
7269 {
7270         pthread_t t;
7271
7272         /* create a pipe to select */
7273         if(pipe(&fildes[0])) {
7274                 perror("select");
7275                 exit(1);
7276         }
7277
7278 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7279         (void) pthread_setconcurrency(2);
7280 #else
7281 #ifdef HAVE_THR_SETCONCURRENCY
7282         /* Set Solaris LWP concurrency to 2 */
7283         thr_setconcurrency(2);
7284 #endif
7285 #endif
7286
7287 #if HAVE_PTHREADS_D4
7288         pthread_create(&t, pthread_attr_default, task, NULL);
7289 #else
7290         pthread_create(&t, NULL, task, NULL);
7291 #endif
7292
7293 #if HAVE_SCHED_YIELD
7294         sched_yield();  /* make sure task runs first */
7295 #else
7296 #ifdef HAVE_PTHREAD_YIELD
7297         pthread_yield();        /* make sure task runs first */
7298 #endif
7299 #endif
7300
7301         exit(2);
7302 }
7303 EOF
7304 if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7305 then
7306   ol_cv_pthread_select_yields=no
7307 else
7308   echo "configure: failed program was:" >&5
7309   cat conftest.$ac_ext >&5
7310   rm -fr conftest*
7311   ol_cv_pthread_select_yields=yes
7312 fi
7313 rm -fr conftest*
7314 fi
7315
7316 fi
7317
7318 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7319
7320                                 if test $ol_cv_pthread_select_yields = cross ; then
7321                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7322                                 fi
7323
7324                                 if test $ol_cv_pthread_select_yields = yes ; then
7325                                         ol_with_yielding_select=yes
7326                                 fi
7327                         fi
7328
7329                                                 CPPFLAGS="$save_CPPFLAGS"
7330                         LIBS="$save_LIBS"
7331                 else
7332                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7333                 fi
7334         fi
7335
7336         if test $ol_with_threads = posix ; then
7337                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7338         fi
7339 fi
7340
7341 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7342         -o $ol_with_threads = mach ; then
7343
7344                 for ac_hdr in mach/cthreads.h
7345 do
7346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7348 echo "configure:7349: checking for $ac_hdr" >&5
7349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7350   echo $ac_n "(cached) $ac_c" 1>&6
7351 else
7352   cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 #include <$ac_hdr>
7356 EOF
7357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7358 { (eval echo configure:7359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7360 if test -z "$ac_err"; then
7361   rm -rf conftest*
7362   eval "ac_cv_header_$ac_safe=yes"
7363 else
7364   echo "$ac_err" >&5
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_header_$ac_safe=no"
7369 fi
7370 rm -f conftest*
7371 fi
7372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7373   echo "$ac_t""yes" 1>&6
7374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7375   cat >> confdefs.h <<EOF
7376 #define $ac_tr_hdr 1
7377 EOF
7378  
7379 else
7380   echo "$ac_t""no" 1>&6
7381 fi
7382 done
7383
7384         if test $ac_cv_header_mach_cthreads_h = yes ; then
7385                 ol_with_threads=found
7386
7387                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7388 echo "configure:7389: checking for cthread_fork" >&5
7389 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7390   echo $ac_n "(cached) $ac_c" 1>&6
7391 else
7392   cat > conftest.$ac_ext <<EOF
7393 #line 7394 "configure"
7394 #include "confdefs.h"
7395 /* System header to define __stub macros and hopefully few prototypes,
7396     which can conflict with char cthread_fork(); below.  */
7397 #include <assert.h>
7398 /* Override any gcc2 internal prototype to avoid an error.  */
7399 /* We use char because int might match the return type of a gcc2
7400     builtin and then its argument prototype would still apply.  */
7401 char cthread_fork();
7402 char (*f)();
7403
7404 int main() {
7405
7406 /* The GNU C library defines this for functions which it implements
7407     to always fail with ENOSYS.  Some functions are actually named
7408     something starting with __ and the normal name is an alias.  */
7409 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7410 choke me
7411 #else
7412 f = cthread_fork;
7413 #endif
7414
7415 ; return 0; }
7416 EOF
7417 if { (eval echo configure:7418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7418   rm -rf conftest*
7419   eval "ac_cv_func_cthread_fork=yes"
7420 else
7421   echo "configure: failed program was:" >&5
7422   cat conftest.$ac_ext >&5
7423   rm -rf conftest*
7424   eval "ac_cv_func_cthread_fork=no"
7425 fi
7426 rm -f conftest*
7427 fi
7428
7429 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7430   echo "$ac_t""yes" 1>&6
7431   ol_link_threads=yes
7432 else
7433   echo "$ac_t""no" 1>&6
7434 fi
7435
7436
7437                 if test $ol_link_threads = no ; then
7438                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7439 echo "configure:7440: checking for cthread_fork with -all_load" >&5
7440 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7441   echo $ac_n "(cached) $ac_c" 1>&6
7442 else
7443   
7444                                                                 save_LIBS="$LIBS"
7445                                 LIBS="-all_load $LIBS"
7446                                 cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 #include <mach/cthreads.h>
7450 int main() {
7451
7452                                         cthread_fork((void *)0, (void *)0);
7453                                         
7454 ; return 0; }
7455 EOF
7456 if { (eval echo configure:7457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7457   rm -rf conftest*
7458   ol_cv_cthread_all_load=yes
7459 else
7460   echo "configure: failed program was:" >&5
7461   cat conftest.$ac_ext >&5
7462   rm -rf conftest*
7463   ol_cv_cthread_all_load=no
7464 fi
7465 rm -f conftest*
7466                                                                 LIBS="$save_LIBS"
7467                         
7468 fi
7469
7470 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7471
7472                         if test $ol_cv_cthread_all_load = yes ; then
7473                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7474                                 ol_link_threads=mach
7475                         fi
7476                 fi
7477
7478                 if test $ol_link_threads != no ; then
7479                         : check for cthread specific functionality here
7480                         cat >> confdefs.h <<\EOF
7481 #define HAVE_MACH_CTHREADS 1
7482 EOF
7483
7484                 else
7485                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7486                 fi
7487         fi
7488
7489         if test $ol_with_threads = mach ; then
7490                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7491         fi
7492 fi
7493
7494 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7495         -o $ol_with_threads = lwp ; then
7496
7497                 for ac_hdr in thread.h synch.h
7498 do
7499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7501 echo "configure:7502: checking for $ac_hdr" >&5
7502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7503   echo $ac_n "(cached) $ac_c" 1>&6
7504 else
7505   cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508 #include <$ac_hdr>
7509 EOF
7510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7511 { (eval echo configure:7512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7513 if test -z "$ac_err"; then
7514   rm -rf conftest*
7515   eval "ac_cv_header_$ac_safe=yes"
7516 else
7517   echo "$ac_err" >&5
7518   echo "configure: failed program was:" >&5
7519   cat conftest.$ac_ext >&5
7520   rm -rf conftest*
7521   eval "ac_cv_header_$ac_safe=no"
7522 fi
7523 rm -f conftest*
7524 fi
7525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7526   echo "$ac_t""yes" 1>&6
7527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7528   cat >> confdefs.h <<EOF
7529 #define $ac_tr_hdr 1
7530 EOF
7531  
7532 else
7533   echo "$ac_t""no" 1>&6
7534 fi
7535 done
7536
7537         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7538                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7539 echo "configure:7540: checking for thr_create in -lthread" >&5
7540 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
7541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7542   echo $ac_n "(cached) $ac_c" 1>&6
7543 else
7544   ac_save_LIBS="$LIBS"
7545 LIBS="-lthread  $LIBS"
7546 cat > conftest.$ac_ext <<EOF
7547 #line 7548 "configure"
7548 #include "confdefs.h"
7549 /* Override any gcc2 internal prototype to avoid an error.  */
7550 /* We use char because int might match the return type of a gcc2
7551     builtin and then its argument prototype would still apply.  */
7552 char thr_create();
7553
7554 int main() {
7555 thr_create()
7556 ; return 0; }
7557 EOF
7558 if { (eval echo configure:7559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7559   rm -rf conftest*
7560   eval "ac_cv_lib_$ac_lib_var=yes"
7561 else
7562   echo "configure: failed program was:" >&5
7563   cat conftest.$ac_ext >&5
7564   rm -rf conftest*
7565   eval "ac_cv_lib_$ac_lib_var=no"
7566 fi
7567 rm -f conftest*
7568 LIBS="$ac_save_LIBS"
7569
7570 fi
7571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7572   echo "$ac_t""yes" 1>&6
7573   have_thr=yes
7574 else
7575   echo "$ac_t""no" 1>&6
7576 have_thr=no
7577 fi
7578
7579
7580                 if test $have_thr = yes ; then
7581                         cat >> confdefs.h <<\EOF
7582 #define HAVE_THR 1
7583 EOF
7584
7585                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7586                         ol_link_threads=thr
7587
7588                         if test $ol_with_yielding_select = auto ; then
7589                                 ol_with_yielding_select=yes
7590                         fi
7591
7592                                                 for ac_func in \
7593                                 thr_setconcurrency \
7594                                 thr_getconcurrency \
7595                         
7596 do
7597 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7598 echo "configure:7599: checking for $ac_func" >&5
7599 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7600   echo $ac_n "(cached) $ac_c" 1>&6
7601 else
7602   cat > conftest.$ac_ext <<EOF
7603 #line 7604 "configure"
7604 #include "confdefs.h"
7605 /* System header to define __stub macros and hopefully few prototypes,
7606     which can conflict with char $ac_func(); below.  */
7607 #include <assert.h>
7608 /* Override any gcc2 internal prototype to avoid an error.  */
7609 /* We use char because int might match the return type of a gcc2
7610     builtin and then its argument prototype would still apply.  */
7611 char $ac_func();
7612 char (*f)();
7613
7614 int main() {
7615
7616 /* The GNU C library defines this for functions which it implements
7617     to always fail with ENOSYS.  Some functions are actually named
7618     something starting with __ and the normal name is an alias.  */
7619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7620 choke me
7621 #else
7622 f = $ac_func;
7623 #endif
7624
7625 ; return 0; }
7626 EOF
7627 if { (eval echo configure:7628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7628   rm -rf conftest*
7629   eval "ac_cv_func_$ac_func=yes"
7630 else
7631   echo "configure: failed program was:" >&5
7632   cat conftest.$ac_ext >&5
7633   rm -rf conftest*
7634   eval "ac_cv_func_$ac_func=no"
7635 fi
7636 rm -f conftest*
7637 fi
7638
7639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7640   echo "$ac_t""yes" 1>&6
7641     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7642   cat >> confdefs.h <<EOF
7643 #define $ac_tr_func 1
7644 EOF
7645  
7646 else
7647   echo "$ac_t""no" 1>&6
7648 fi
7649 done
7650
7651                 fi
7652         fi
7653
7654                 for ac_hdr in lwp/lwp.h
7655 do
7656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7658 echo "configure:7659: checking for $ac_hdr" >&5
7659 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7660   echo $ac_n "(cached) $ac_c" 1>&6
7661 else
7662   cat > conftest.$ac_ext <<EOF
7663 #line 7664 "configure"
7664 #include "confdefs.h"
7665 #include <$ac_hdr>
7666 EOF
7667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7668 { (eval echo configure:7669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7670 if test -z "$ac_err"; then
7671   rm -rf conftest*
7672   eval "ac_cv_header_$ac_safe=yes"
7673 else
7674   echo "$ac_err" >&5
7675   echo "configure: failed program was:" >&5
7676   cat conftest.$ac_ext >&5
7677   rm -rf conftest*
7678   eval "ac_cv_header_$ac_safe=no"
7679 fi
7680 rm -f conftest*
7681 fi
7682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7683   echo "$ac_t""yes" 1>&6
7684     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7685   cat >> confdefs.h <<EOF
7686 #define $ac_tr_hdr 1
7687 EOF
7688  
7689 else
7690   echo "$ac_t""no" 1>&6
7691 fi
7692 done
7693
7694         if test $ac_cv_header_lwp_lwp_h = yes ; then
7695                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7696 echo "configure:7697: checking for lwp_create in -llwp" >&5
7697 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
7698 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7699   echo $ac_n "(cached) $ac_c" 1>&6
7700 else
7701   ac_save_LIBS="$LIBS"
7702 LIBS="-llwp  $LIBS"
7703 cat > conftest.$ac_ext <<EOF
7704 #line 7705 "configure"
7705 #include "confdefs.h"
7706 /* Override any gcc2 internal prototype to avoid an error.  */
7707 /* We use char because int might match the return type of a gcc2
7708     builtin and then its argument prototype would still apply.  */
7709 char lwp_create();
7710
7711 int main() {
7712 lwp_create()
7713 ; return 0; }
7714 EOF
7715 if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7716   rm -rf conftest*
7717   eval "ac_cv_lib_$ac_lib_var=yes"
7718 else
7719   echo "configure: failed program was:" >&5
7720   cat conftest.$ac_ext >&5
7721   rm -rf conftest*
7722   eval "ac_cv_lib_$ac_lib_var=no"
7723 fi
7724 rm -f conftest*
7725 LIBS="$ac_save_LIBS"
7726
7727 fi
7728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7729   echo "$ac_t""yes" 1>&6
7730   have_lwp=yes
7731 else
7732   echo "$ac_t""no" 1>&6
7733 have_lwp=no
7734 fi
7735
7736
7737                 if test $have_lwp = yes ; then
7738                         cat >> confdefs.h <<\EOF
7739 #define HAVE_LWP 1
7740 EOF
7741
7742                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7743                         ol_link_threads=lwp
7744
7745                         if test $ol_with_yielding_select = auto ; then
7746                                 ol_with_yielding_select=no
7747                         fi
7748                 fi
7749         fi
7750 fi
7751
7752 if test $ol_with_yielding_select = yes ; then
7753         cat >> confdefs.h <<\EOF
7754 #define HAVE_YIELDING_SELECT 1
7755 EOF
7756
7757 fi
7758
7759 if test $ol_with_threads = manual ; then
7760                 ol_link_threads=yes
7761
7762         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7763
7764         for ac_hdr in pthread.h sched.h
7765 do
7766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7768 echo "configure:7769: checking for $ac_hdr" >&5
7769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   cat > conftest.$ac_ext <<EOF
7773 #line 7774 "configure"
7774 #include "confdefs.h"
7775 #include <$ac_hdr>
7776 EOF
7777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7778 { (eval echo configure:7779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7780 if test -z "$ac_err"; then
7781   rm -rf conftest*
7782   eval "ac_cv_header_$ac_safe=yes"
7783 else
7784   echo "$ac_err" >&5
7785   echo "configure: failed program was:" >&5
7786   cat conftest.$ac_ext >&5
7787   rm -rf conftest*
7788   eval "ac_cv_header_$ac_safe=no"
7789 fi
7790 rm -f conftest*
7791 fi
7792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7793   echo "$ac_t""yes" 1>&6
7794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7795   cat >> confdefs.h <<EOF
7796 #define $ac_tr_hdr 1
7797 EOF
7798  
7799 else
7800   echo "$ac_t""no" 1>&6
7801 fi
7802 done
7803
7804         for ac_func in sched_yield pthread_yield
7805 do
7806 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7807 echo "configure:7808: checking for $ac_func" >&5
7808 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7809   echo $ac_n "(cached) $ac_c" 1>&6
7810 else
7811   cat > conftest.$ac_ext <<EOF
7812 #line 7813 "configure"
7813 #include "confdefs.h"
7814 /* System header to define __stub macros and hopefully few prototypes,
7815     which can conflict with char $ac_func(); below.  */
7816 #include <assert.h>
7817 /* Override any gcc2 internal prototype to avoid an error.  */
7818 /* We use char because int might match the return type of a gcc2
7819     builtin and then its argument prototype would still apply.  */
7820 char $ac_func();
7821 char (*f)();
7822
7823 int main() {
7824
7825 /* The GNU C library defines this for functions which it implements
7826     to always fail with ENOSYS.  Some functions are actually named
7827     something starting with __ and the normal name is an alias.  */
7828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7829 choke me
7830 #else
7831 f = $ac_func;
7832 #endif
7833
7834 ; return 0; }
7835 EOF
7836 if { (eval echo configure:7837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7837   rm -rf conftest*
7838   eval "ac_cv_func_$ac_func=yes"
7839 else
7840   echo "configure: failed program was:" >&5
7841   cat conftest.$ac_ext >&5
7842   rm -rf conftest*
7843   eval "ac_cv_func_$ac_func=no"
7844 fi
7845 rm -f conftest*
7846 fi
7847
7848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7849   echo "$ac_t""yes" 1>&6
7850     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7851   cat >> confdefs.h <<EOF
7852 #define $ac_tr_func 1
7853 EOF
7854  
7855 else
7856   echo "$ac_t""no" 1>&6
7857 fi
7858 done
7859
7860         
7861         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7862 echo "configure:7863: checking for LinuxThreads pthread.h" >&5
7863 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7864   echo $ac_n "(cached) $ac_c" 1>&6
7865 else
7866   cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869 #include <pthread.h>
7870 EOF
7871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7872   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7873   rm -rf conftest*
7874   ol_cv_header_linux_threads=yes
7875 else
7876   rm -rf conftest*
7877   ol_cv_header_linux_threads=no
7878 fi
7879 rm -f conftest*
7880
7881                 
7882 fi
7883
7884 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7885         if test $ol_cv_header_linux_threads = yes; then
7886                 cat >> confdefs.h <<\EOF
7887 #define HAVE_LINUX_THREADS 1
7888 EOF
7889
7890         fi
7891
7892
7893         for ac_hdr in mach/cthreads.h
7894 do
7895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7897 echo "configure:7898: checking for $ac_hdr" >&5
7898 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7899   echo $ac_n "(cached) $ac_c" 1>&6
7900 else
7901   cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904 #include <$ac_hdr>
7905 EOF
7906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7907 { (eval echo configure:7908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7909 if test -z "$ac_err"; then
7910   rm -rf conftest*
7911   eval "ac_cv_header_$ac_safe=yes"
7912 else
7913   echo "$ac_err" >&5
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   eval "ac_cv_header_$ac_safe=no"
7918 fi
7919 rm -f conftest*
7920 fi
7921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7922   echo "$ac_t""yes" 1>&6
7923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7924   cat >> confdefs.h <<EOF
7925 #define $ac_tr_hdr 1
7926 EOF
7927  
7928 else
7929   echo "$ac_t""no" 1>&6
7930 fi
7931 done
7932
7933         for ac_hdr in lwp/lwp.h
7934 do
7935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7937 echo "configure:7938: checking for $ac_hdr" >&5
7938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 #include <$ac_hdr>
7945 EOF
7946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7947 { (eval echo configure:7948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7949 if test -z "$ac_err"; then
7950   rm -rf conftest*
7951   eval "ac_cv_header_$ac_safe=yes"
7952 else
7953   echo "$ac_err" >&5
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   eval "ac_cv_header_$ac_safe=no"
7958 fi
7959 rm -f conftest*
7960 fi
7961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7962   echo "$ac_t""yes" 1>&6
7963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7964   cat >> confdefs.h <<EOF
7965 #define $ac_tr_hdr 1
7966 EOF
7967  
7968 else
7969   echo "$ac_t""no" 1>&6
7970 fi
7971 done
7972
7973         for ac_hdr in thread.h synch.h
7974 do
7975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7977 echo "configure:7978: checking for $ac_hdr" >&5
7978 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7979   echo $ac_n "(cached) $ac_c" 1>&6
7980 else
7981   cat > conftest.$ac_ext <<EOF
7982 #line 7983 "configure"
7983 #include "confdefs.h"
7984 #include <$ac_hdr>
7985 EOF
7986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7987 { (eval echo configure:7988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7989 if test -z "$ac_err"; then
7990   rm -rf conftest*
7991   eval "ac_cv_header_$ac_safe=yes"
7992 else
7993   echo "$ac_err" >&5
7994   echo "configure: failed program was:" >&5
7995   cat conftest.$ac_ext >&5
7996   rm -rf conftest*
7997   eval "ac_cv_header_$ac_safe=no"
7998 fi
7999 rm -f conftest*
8000 fi
8001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8002   echo "$ac_t""yes" 1>&6
8003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8004   cat >> confdefs.h <<EOF
8005 #define $ac_tr_hdr 1
8006 EOF
8007  
8008 else
8009   echo "$ac_t""no" 1>&6
8010 fi
8011 done
8012
8013 fi
8014
8015 if test $ol_link_threads != no ; then  
8016                         cat >> confdefs.h <<\EOF
8017 #define REENTRANT 1
8018 EOF
8019
8020         cat >> confdefs.h <<\EOF
8021 #define _REENTRANT 1
8022 EOF
8023
8024         cat >> confdefs.h <<\EOF
8025 #define THREAD_SAFE 1
8026 EOF
8027
8028         cat >> confdefs.h <<\EOF
8029 #define _THREAD_SAFE 1
8030 EOF
8031
8032         cat >> confdefs.h <<\EOF
8033 #define THREADSAFE 1
8034 EOF
8035
8036         cat >> confdefs.h <<\EOF
8037 #define _THREADSAFE 1
8038 EOF
8039
8040         cat >> confdefs.h <<\EOF
8041 #define _SGI_MP_SOURCE 1
8042 EOF
8043
8044
8045                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8046 echo "configure:8047: checking for thread specific errno" >&5
8047 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8048   echo $ac_n "(cached) $ac_c" 1>&6
8049 else
8050   
8051                 cat > conftest.$ac_ext <<EOF
8052 #line 8053 "configure"
8053 #include "confdefs.h"
8054 #include <errno.h>
8055 int main() {
8056 errno = 0;
8057 ; return 0; }
8058 EOF
8059 if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8060   rm -rf conftest*
8061   ol_cv_errno_thread_specific=yes
8062 else
8063   echo "configure: failed program was:" >&5
8064   cat conftest.$ac_ext >&5
8065   rm -rf conftest*
8066   ol_cv_errno_thread_specific=no
8067 fi
8068 rm -f conftest*
8069         
8070 fi
8071
8072 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8073
8074                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8075 echo "configure:8076: checking for thread specific h_errno" >&5
8076 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8077   echo $ac_n "(cached) $ac_c" 1>&6
8078 else
8079   
8080                 cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <netdb.h>
8084 int main() {
8085 h_errno = 0;
8086 ; return 0; }
8087 EOF
8088 if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8089   rm -rf conftest*
8090   ol_cv_h_errno_thread_specific=yes
8091 else
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -rf conftest*
8095   ol_cv_h_errno_thread_specific=no
8096 fi
8097 rm -f conftest*
8098         
8099 fi
8100
8101 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8102
8103         if test $ol_cv_errno_thread_specific != yes \
8104                 -o $ol_cv_h_errno_thread_specific != yes ; then
8105                 LIBS="$LTHREAD_LIBS $LIBS"
8106                 LTHREAD_LIBS=""
8107         fi
8108
8109 fi  
8110
8111 if test $ol_link_threads = no ; then
8112         if test $ol_with_threads = yes ; then
8113                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8114         fi
8115
8116         if test $ol_with_threads = auto ; then
8117                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8118                 ol_with_threads=no
8119         fi
8120
8121         cat >> confdefs.h <<\EOF
8122 #define NO_THREADS 1
8123 EOF
8124
8125         LTHREAD_LIBS=""
8126 fi
8127
8128 if test $ol_link_threads != no ; then
8129         cat >> confdefs.h <<\EOF
8130 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8131 EOF
8132
8133 fi
8134
8135
8136 ol_link_ldbm=no 
8137 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8138         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8139 echo "configure:8140: checking for DB2 library" >&5
8140 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143         ol_LIBS="$LIBS"
8144         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8145 echo "configure:8146: checking for db_open in -ldb" >&5
8146 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8147 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8148   echo $ac_n "(cached) $ac_c" 1>&6
8149 else
8150   ac_save_LIBS="$LIBS"
8151 LIBS="-ldb  $LIBS"
8152 cat > conftest.$ac_ext <<EOF
8153 #line 8154 "configure"
8154 #include "confdefs.h"
8155 /* Override any gcc2 internal prototype to avoid an error.  */
8156 /* We use char because int might match the return type of a gcc2
8157     builtin and then its argument prototype would still apply.  */
8158 char db_open();
8159
8160 int main() {
8161 db_open()
8162 ; return 0; }
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8165   rm -rf conftest*
8166   eval "ac_cv_lib_$ac_lib_var=yes"
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -rf conftest*
8171   eval "ac_cv_lib_$ac_lib_var=no"
8172 fi
8173 rm -f conftest*
8174 LIBS="$ac_save_LIBS"
8175
8176 fi
8177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8178   echo "$ac_t""yes" 1>&6
8179   ol_cv_lib_db2=-ldb
8180 else
8181   echo "$ac_t""no" 1>&6
8182 ol_cv_lib_db2=no
8183 fi
8184
8185         LIBS="$ol_LIBS"
8186
8187 fi
8188
8189 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8190
8191 for ac_hdr in db.h
8192 do
8193 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8194 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8195 echo "configure:8196: checking for $ac_hdr" >&5
8196 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 #include <$ac_hdr>
8203 EOF
8204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8205 { (eval echo configure:8206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8207 if test -z "$ac_err"; then
8208   rm -rf conftest*
8209   eval "ac_cv_header_$ac_safe=yes"
8210 else
8211   echo "$ac_err" >&5
8212   echo "configure: failed program was:" >&5
8213   cat conftest.$ac_ext >&5
8214   rm -rf conftest*
8215   eval "ac_cv_header_$ac_safe=no"
8216 fi
8217 rm -f conftest*
8218 fi
8219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8220   echo "$ac_t""yes" 1>&6
8221     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8222   cat >> confdefs.h <<EOF
8223 #define $ac_tr_hdr 1
8224 EOF
8225  
8226 else
8227   echo "$ac_t""no" 1>&6
8228 fi
8229 done
8230
8231 if test $ac_cv_header_db_h = yes ; then
8232         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8233 echo "configure:8234: checking if db.h is DB2" >&5
8234 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8235   echo $ac_n "(cached) $ac_c" 1>&6
8236 else
8237   
8238                 cat > conftest.$ac_ext <<EOF
8239 #line 8240 "configure"
8240 #include "confdefs.h"
8241
8242 #                       include <db.h>
8243                         /* this check could be improved */
8244 #                       ifdef DB_VERSION_MAJOR
8245 #                               if DB_VERSION_MAJOR == 2
8246                                         __db_version_2
8247 #                               endif
8248 #                       endif
8249                 
8250 EOF
8251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8252   egrep "__db_version_2" >/dev/null 2>&1; then
8253   rm -rf conftest*
8254   ol_cv_header_db2=yes
8255 else
8256   rm -rf conftest*
8257   ol_cv_header_db2=no
8258 fi
8259 rm -f conftest*
8260
8261 fi
8262
8263 echo "$ac_t""$ol_cv_header_db2" 1>&6
8264 else
8265         ol_cv_header_db2=no
8266 fi
8267
8268
8269  
8270  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8271 echo "configure:8272: checking for Berkeley DB2" >&5
8272 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   
8276         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8277                 ol_cv_berkeley_db2=no
8278         else
8279                 ol_cv_berkeley_db2=yes
8280         fi
8281
8282 fi
8283
8284 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8285  if test $ol_cv_berkeley_db2 = yes ; then
8286         cat >> confdefs.h <<\EOF
8287 #define HAVE_BERKELEY_DB2 1
8288 EOF
8289
8290  fi
8291
8292
8293         if test $ol_cv_berkeley_db2 = yes ; then
8294                 ol_link_ldbm=db2
8295                 ol_with_ldbm_api=db2
8296
8297                 if test $ol_with_ldbm_type = hash ; then
8298                         cat >> confdefs.h <<\EOF
8299 #define LDBM_USE_DBHASH 1
8300 EOF
8301
8302                 else
8303                         cat >> confdefs.h <<\EOF
8304 #define LDBM_USE_DBBTREE 1
8305 EOF
8306
8307                 fi
8308
8309                                                 if test $ol_cv_lib_db2 != yes ; then
8310                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8311                 fi
8312         fi
8313 fi
8314
8315 ol_link_bdb2=no
8316 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8317         ol_link_bdb2=yes
8318 fi
8319
8320 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8321         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8322 echo "configure:8323: checking for Berkeley DB library" >&5
8323 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8324   echo $ac_n "(cached) $ac_c" 1>&6
8325 else
8326   
8327         for ac_hdr in db1/db.h
8328 do
8329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8331 echo "configure:8332: checking for $ac_hdr" >&5
8332 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 #include <$ac_hdr>
8339 EOF
8340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8341 { (eval echo configure:8342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8343 if test -z "$ac_err"; then
8344   rm -rf conftest*
8345   eval "ac_cv_header_$ac_safe=yes"
8346 else
8347   echo "$ac_err" >&5
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   eval "ac_cv_header_$ac_safe=no"
8352 fi
8353 rm -f conftest*
8354 fi
8355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8356   echo "$ac_t""yes" 1>&6
8357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8358   cat >> confdefs.h <<EOF
8359 #define $ac_tr_hdr 1
8360 EOF
8361  
8362 else
8363   echo "$ac_t""no" 1>&6
8364 fi
8365 done
8366
8367         ol_LIBS="$LIBS"
8368         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8369 echo "configure:8370: checking for dbopen" >&5
8370 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8371   echo $ac_n "(cached) $ac_c" 1>&6
8372 else
8373   cat > conftest.$ac_ext <<EOF
8374 #line 8375 "configure"
8375 #include "confdefs.h"
8376 /* System header to define __stub macros and hopefully few prototypes,
8377     which can conflict with char dbopen(); below.  */
8378 #include <assert.h>
8379 /* Override any gcc2 internal prototype to avoid an error.  */
8380 /* We use char because int might match the return type of a gcc2
8381     builtin and then its argument prototype would still apply.  */
8382 char dbopen();
8383 char (*f)();
8384
8385 int main() {
8386
8387 /* The GNU C library defines this for functions which it implements
8388     to always fail with ENOSYS.  Some functions are actually named
8389     something starting with __ and the normal name is an alias.  */
8390 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8391 choke me
8392 #else
8393 f = dbopen;
8394 #endif
8395
8396 ; return 0; }
8397 EOF
8398 if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8399   rm -rf conftest*
8400   eval "ac_cv_func_dbopen=yes"
8401 else
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   eval "ac_cv_func_dbopen=no"
8406 fi
8407 rm -f conftest*
8408 fi
8409
8410 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8411   echo "$ac_t""yes" 1>&6
8412   ol_cv_lib_db=yes
8413 else
8414   echo "$ac_t""no" 1>&6
8415
8416                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8417 echo "configure:8418: checking for dbopen in -ldb1" >&5
8418 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8419 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8420   echo $ac_n "(cached) $ac_c" 1>&6
8421 else
8422   ac_save_LIBS="$LIBS"
8423 LIBS="-ldb1  $LIBS"
8424 cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 /* Override any gcc2 internal prototype to avoid an error.  */
8428 /* We use char because int might match the return type of a gcc2
8429     builtin and then its argument prototype would still apply.  */
8430 char dbopen();
8431
8432 int main() {
8433 dbopen()
8434 ; return 0; }
8435 EOF
8436 if { (eval echo configure:8437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8437   rm -rf conftest*
8438   eval "ac_cv_lib_$ac_lib_var=yes"
8439 else
8440   echo "configure: failed program was:" >&5
8441   cat conftest.$ac_ext >&5
8442   rm -rf conftest*
8443   eval "ac_cv_lib_$ac_lib_var=no"
8444 fi
8445 rm -f conftest*
8446 LIBS="$ac_save_LIBS"
8447
8448 fi
8449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8450   echo "$ac_t""yes" 1>&6
8451   ol_cv_lib_db=-ldb1
8452 else
8453   echo "$ac_t""no" 1>&6
8454
8455                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8456 echo "configure:8457: checking for dbopen in -ldb" >&5
8457 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
8458 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8459   echo $ac_n "(cached) $ac_c" 1>&6
8460 else
8461   ac_save_LIBS="$LIBS"
8462 LIBS="-ldb  $LIBS"
8463 cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466 /* Override any gcc2 internal prototype to avoid an error.  */
8467 /* We use char because int might match the return type of a gcc2
8468     builtin and then its argument prototype would still apply.  */
8469 char dbopen();
8470
8471 int main() {
8472 dbopen()
8473 ; return 0; }
8474 EOF
8475 if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8476   rm -rf conftest*
8477   eval "ac_cv_lib_$ac_lib_var=yes"
8478 else
8479   echo "configure: failed program was:" >&5
8480   cat conftest.$ac_ext >&5
8481   rm -rf conftest*
8482   eval "ac_cv_lib_$ac_lib_var=no"
8483 fi
8484 rm -f conftest*
8485 LIBS="$ac_save_LIBS"
8486
8487 fi
8488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8489   echo "$ac_t""yes" 1>&6
8490   ol_cv_lib_db=-ldb
8491 else
8492   echo "$ac_t""no" 1>&6
8493 ol_cv_lib_db=no
8494 fi
8495
8496                 
8497 fi
8498
8499         
8500 fi
8501
8502         LIBS="$ol_LIBS"
8503
8504 fi
8505
8506 echo "$ac_t""$ol_cv_lib_db" 1>&6
8507
8508
8509 for ac_hdr in db_185.h
8510 do
8511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8513 echo "configure:8514: checking for $ac_hdr" >&5
8514 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8515   echo $ac_n "(cached) $ac_c" 1>&6
8516 else
8517   cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 #include <$ac_hdr>
8521 EOF
8522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8523 { (eval echo configure:8524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8525 if test -z "$ac_err"; then
8526   rm -rf conftest*
8527   eval "ac_cv_header_$ac_safe=yes"
8528 else
8529   echo "$ac_err" >&5
8530   echo "configure: failed program was:" >&5
8531   cat conftest.$ac_ext >&5
8532   rm -rf conftest*
8533   eval "ac_cv_header_$ac_safe=no"
8534 fi
8535 rm -f conftest*
8536 fi
8537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8538   echo "$ac_t""yes" 1>&6
8539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8540   cat >> confdefs.h <<EOF
8541 #define $ac_tr_hdr 1
8542 EOF
8543  
8544 else
8545   echo "$ac_t""no" 1>&6
8546 fi
8547 done
8548
8549 if test "$ol_cv_header_db2" = yes ; then
8550         
8551         ol_cv_header_db=$ac_cv_header_db_185_h
8552 else
8553         ol_cv_header_db=$ac_cv_header_db_h
8554 fi
8555
8556
8557  
8558  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8559 echo "configure:8560: checking for Berkeley DB" >&5
8560 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
8561   echo $ac_n "(cached) $ac_c" 1>&6
8562 else
8563   
8564         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8565                 ol_cv_berkeley_db=no
8566         else
8567                 ol_cv_berkeley_db=yes
8568         fi
8569
8570 fi
8571
8572 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8573  if test $ol_cv_berkeley_db = yes ; then
8574         cat >> confdefs.h <<\EOF
8575 #define HAVE_BERKELEY_DB 1
8576 EOF
8577
8578  fi
8579
8580
8581         if test $ol_cv_berkeley_db = yes ; then
8582                 ol_link_ldbm=db
8583                 ol_with_ldbm_api=db
8584
8585                 if test $ol_with_ldbm_type = hash ; then
8586                         cat >> confdefs.h <<\EOF
8587 #define LDBM_USE_DBHASH 1
8588 EOF
8589
8590                 else
8591                         cat >> confdefs.h <<\EOF
8592 #define LDBM_USE_DBBTREE 1
8593 EOF
8594
8595                 fi
8596
8597                                                 if test $ol_cv_lib_db != yes ; then
8598                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8599                 fi
8600         fi
8601 fi
8602
8603 if test $ol_with_ldbm_api = manual ; then
8604                 ol_link_ldbm=yes
8605
8606         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8607
8608         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8609 do
8610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8612 echo "configure:8613: checking for $ac_hdr" >&5
8613 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8614   echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616   cat > conftest.$ac_ext <<EOF
8617 #line 8618 "configure"
8618 #include "confdefs.h"
8619 #include <$ac_hdr>
8620 EOF
8621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8622 { (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8624 if test -z "$ac_err"; then
8625   rm -rf conftest*
8626   eval "ac_cv_header_$ac_safe=yes"
8627 else
8628   echo "$ac_err" >&5
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   eval "ac_cv_header_$ac_safe=no"
8633 fi
8634 rm -f conftest*
8635 fi
8636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8637   echo "$ac_t""yes" 1>&6
8638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8639   cat >> confdefs.h <<EOF
8640 #define $ac_tr_hdr 1
8641 EOF
8642  
8643 else
8644   echo "$ac_t""no" 1>&6
8645 fi
8646 done
8647
8648 fi
8649
8650 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8651         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8652         ol_with_ldbm_api=none
8653 fi
8654
8655 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8656         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8657 echo "configure:8658: checking for MDBM library" >&5
8658 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
8659   echo $ac_n "(cached) $ac_c" 1>&6
8660 else
8661         ol_LIBS="$LIBS"
8662         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8663 echo "configure:8664: checking for mdbm_set_chain" >&5
8664 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 /* System header to define __stub macros and hopefully few prototypes,
8671     which can conflict with char mdbm_set_chain(); below.  */
8672 #include <assert.h>
8673 /* Override any gcc2 internal prototype to avoid an error.  */
8674 /* We use char because int might match the return type of a gcc2
8675     builtin and then its argument prototype would still apply.  */
8676 char mdbm_set_chain();
8677 char (*f)();
8678
8679 int main() {
8680
8681 /* The GNU C library defines this for functions which it implements
8682     to always fail with ENOSYS.  Some functions are actually named
8683     something starting with __ and the normal name is an alias.  */
8684 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8685 choke me
8686 #else
8687 f = mdbm_set_chain;
8688 #endif
8689
8690 ; return 0; }
8691 EOF
8692 if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8693   rm -rf conftest*
8694   eval "ac_cv_func_mdbm_set_chain=yes"
8695 else
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   eval "ac_cv_func_mdbm_set_chain=no"
8700 fi
8701 rm -f conftest*
8702 fi
8703
8704 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8705   echo "$ac_t""yes" 1>&6
8706   ol_cv_lib_mdbm=yes
8707 else
8708   echo "$ac_t""no" 1>&6
8709
8710                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8711 echo "configure:8712: checking for mdbm_set_chain in -lmdbm" >&5
8712 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
8713 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8714   echo $ac_n "(cached) $ac_c" 1>&6
8715 else
8716   ac_save_LIBS="$LIBS"
8717 LIBS="-lmdbm  $LIBS"
8718 cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 /* Override any gcc2 internal prototype to avoid an error.  */
8722 /* We use char because int might match the return type of a gcc2
8723     builtin and then its argument prototype would still apply.  */
8724 char mdbm_set_chain();
8725
8726 int main() {
8727 mdbm_set_chain()
8728 ; return 0; }
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8731   rm -rf conftest*
8732   eval "ac_cv_lib_$ac_lib_var=yes"
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -rf conftest*
8737   eval "ac_cv_lib_$ac_lib_var=no"
8738 fi
8739 rm -f conftest*
8740 LIBS="$ac_save_LIBS"
8741
8742 fi
8743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8744   echo "$ac_t""yes" 1>&6
8745   ol_cv_lib_mdbm=-lmdbm
8746 else
8747   echo "$ac_t""no" 1>&6
8748 ol_cv_lib_mdbm=no
8749 fi
8750
8751         
8752 fi
8753
8754         LIBS="$ol_LIBS"
8755
8756 fi
8757
8758 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8759
8760
8761  for ac_hdr in mdbm.h
8762 do
8763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8765 echo "configure:8766: checking for $ac_hdr" >&5
8766 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8767   echo $ac_n "(cached) $ac_c" 1>&6
8768 else
8769   cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772 #include <$ac_hdr>
8773 EOF
8774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8775 { (eval echo configure:8776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8777 if test -z "$ac_err"; then
8778   rm -rf conftest*
8779   eval "ac_cv_header_$ac_safe=yes"
8780 else
8781   echo "$ac_err" >&5
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -rf conftest*
8785   eval "ac_cv_header_$ac_safe=no"
8786 fi
8787 rm -f conftest*
8788 fi
8789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8790   echo "$ac_t""yes" 1>&6
8791     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8792   cat >> confdefs.h <<EOF
8793 #define $ac_tr_hdr 1
8794 EOF
8795  
8796 else
8797   echo "$ac_t""no" 1>&6
8798 fi
8799 done
8800
8801  echo $ac_n "checking for db""... $ac_c" 1>&6
8802 echo "configure:8803: checking for db" >&5
8803 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   
8807         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8808                 ol_cv_mdbm=no
8809         else
8810                 ol_cv_mdbm=yes
8811         fi
8812
8813 fi
8814
8815 echo "$ac_t""$ol_cv_mdbm" 1>&6
8816  if test $ol_cv_mdbm = yes ; then
8817         cat >> confdefs.h <<\EOF
8818 #define HAVE_MDBM 1
8819 EOF
8820
8821  fi
8822
8823
8824         if test $ol_cv_mdbm = yes ; then
8825                 ol_link_ldbm=mdbm
8826                 ol_with_ldbm_api=mdbm
8827                 if test $ol_cv_lib_mdbm != yes ; then
8828                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8829                 fi
8830         fi
8831 fi
8832
8833 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8834         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8835 echo "configure:8836: checking for GDBM library" >&5
8836 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
8837   echo $ac_n "(cached) $ac_c" 1>&6
8838 else
8839         ol_LIBS="$LIBS"
8840         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8841 echo "configure:8842: checking for gdbm_open" >&5
8842 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
8843   echo $ac_n "(cached) $ac_c" 1>&6
8844 else
8845   cat > conftest.$ac_ext <<EOF
8846 #line 8847 "configure"
8847 #include "confdefs.h"
8848 /* System header to define __stub macros and hopefully few prototypes,
8849     which can conflict with char gdbm_open(); below.  */
8850 #include <assert.h>
8851 /* Override any gcc2 internal prototype to avoid an error.  */
8852 /* We use char because int might match the return type of a gcc2
8853     builtin and then its argument prototype would still apply.  */
8854 char gdbm_open();
8855 char (*f)();
8856
8857 int main() {
8858
8859 /* The GNU C library defines this for functions which it implements
8860     to always fail with ENOSYS.  Some functions are actually named
8861     something starting with __ and the normal name is an alias.  */
8862 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8863 choke me
8864 #else
8865 f = gdbm_open;
8866 #endif
8867
8868 ; return 0; }
8869 EOF
8870 if { (eval echo configure:8871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8871   rm -rf conftest*
8872   eval "ac_cv_func_gdbm_open=yes"
8873 else
8874   echo "configure: failed program was:" >&5
8875   cat conftest.$ac_ext >&5
8876   rm -rf conftest*
8877   eval "ac_cv_func_gdbm_open=no"
8878 fi
8879 rm -f conftest*
8880 fi
8881
8882 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8883   echo "$ac_t""yes" 1>&6
8884   ol_cv_lib_gdbm=yes
8885 else
8886   echo "$ac_t""no" 1>&6
8887
8888                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8889 echo "configure:8890: checking for gdbm_open in -lgdbm" >&5
8890 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
8891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8892   echo $ac_n "(cached) $ac_c" 1>&6
8893 else
8894   ac_save_LIBS="$LIBS"
8895 LIBS="-lgdbm  $LIBS"
8896 cat > conftest.$ac_ext <<EOF
8897 #line 8898 "configure"
8898 #include "confdefs.h"
8899 /* Override any gcc2 internal prototype to avoid an error.  */
8900 /* We use char because int might match the return type of a gcc2
8901     builtin and then its argument prototype would still apply.  */
8902 char gdbm_open();
8903
8904 int main() {
8905 gdbm_open()
8906 ; return 0; }
8907 EOF
8908 if { (eval echo configure:8909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8909   rm -rf conftest*
8910   eval "ac_cv_lib_$ac_lib_var=yes"
8911 else
8912   echo "configure: failed program was:" >&5
8913   cat conftest.$ac_ext >&5
8914   rm -rf conftest*
8915   eval "ac_cv_lib_$ac_lib_var=no"
8916 fi
8917 rm -f conftest*
8918 LIBS="$ac_save_LIBS"
8919
8920 fi
8921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8922   echo "$ac_t""yes" 1>&6
8923   ol_cv_lib_gdbm=-lgdbm
8924 else
8925   echo "$ac_t""no" 1>&6
8926 ol_cv_lib_gdbm=no
8927 fi
8928
8929         
8930 fi
8931
8932         LIBS="$ol_LIBS"
8933
8934 fi
8935
8936 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8937
8938
8939  for ac_hdr in gdbm.h
8940 do
8941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8943 echo "configure:8944: checking for $ac_hdr" >&5
8944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8945   echo $ac_n "(cached) $ac_c" 1>&6
8946 else
8947   cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 #include <$ac_hdr>
8951 EOF
8952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8953 { (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8955 if test -z "$ac_err"; then
8956   rm -rf conftest*
8957   eval "ac_cv_header_$ac_safe=yes"
8958 else
8959   echo "$ac_err" >&5
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962   rm -rf conftest*
8963   eval "ac_cv_header_$ac_safe=no"
8964 fi
8965 rm -f conftest*
8966 fi
8967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8968   echo "$ac_t""yes" 1>&6
8969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8970   cat >> confdefs.h <<EOF
8971 #define $ac_tr_hdr 1
8972 EOF
8973  
8974 else
8975   echo "$ac_t""no" 1>&6
8976 fi
8977 done
8978
8979  echo $ac_n "checking for db""... $ac_c" 1>&6
8980 echo "configure:8981: checking for db" >&5
8981 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   
8985         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8986                 ol_cv_gdbm=no
8987         else
8988                 ol_cv_gdbm=yes
8989         fi
8990
8991 fi
8992
8993 echo "$ac_t""$ol_cv_gdbm" 1>&6
8994  if test $ol_cv_gdbm = yes ; then
8995         cat >> confdefs.h <<\EOF
8996 #define HAVE_GDBM 1
8997 EOF
8998
8999  fi
9000
9001
9002         if test $ol_cv_gdbm = yes ; then
9003                 ol_link_ldbm=gdbm
9004                 ol_with_ldbm_api=gdbm
9005
9006                 if test $ol_cv_lib_gdbm != yes ; then
9007                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9008                 fi
9009         fi
9010 fi
9011
9012 if test $ol_with_ldbm_api = auto ; then
9013         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9014 elif test $ol_with_ldbm_api = ndbm ; then
9015         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9016 echo "configure:9017: checking for NDBM library" >&5
9017 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9018   echo $ac_n "(cached) $ac_c" 1>&6
9019 else
9020         ol_LIBS="$LIBS"
9021         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9022 echo "configure:9023: checking for dbm_open" >&5
9023 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9024   echo $ac_n "(cached) $ac_c" 1>&6
9025 else
9026   cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029 /* System header to define __stub macros and hopefully few prototypes,
9030     which can conflict with char dbm_open(); below.  */
9031 #include <assert.h>
9032 /* Override any gcc2 internal prototype to avoid an error.  */
9033 /* We use char because int might match the return type of a gcc2
9034     builtin and then its argument prototype would still apply.  */
9035 char dbm_open();
9036 char (*f)();
9037
9038 int main() {
9039
9040 /* The GNU C library defines this for functions which it implements
9041     to always fail with ENOSYS.  Some functions are actually named
9042     something starting with __ and the normal name is an alias.  */
9043 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9044 choke me
9045 #else
9046 f = dbm_open;
9047 #endif
9048
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_func_dbm_open=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_func_dbm_open=no"
9059 fi
9060 rm -f conftest*
9061 fi
9062
9063 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9064   echo "$ac_t""yes" 1>&6
9065   ol_cv_lib_ndbm=yes
9066 else
9067   echo "$ac_t""no" 1>&6
9068
9069                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9070 echo "configure:9071: checking for dbm_open in -lndbm" >&5
9071 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   ac_save_LIBS="$LIBS"
9076 LIBS="-lndbm  $LIBS"
9077 cat > conftest.$ac_ext <<EOF
9078 #line 9079 "configure"
9079 #include "confdefs.h"
9080 /* Override any gcc2 internal prototype to avoid an error.  */
9081 /* We use char because int might match the return type of a gcc2
9082     builtin and then its argument prototype would still apply.  */
9083 char dbm_open();
9084
9085 int main() {
9086 dbm_open()
9087 ; return 0; }
9088 EOF
9089 if { (eval echo configure:9090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9090   rm -rf conftest*
9091   eval "ac_cv_lib_$ac_lib_var=yes"
9092 else
9093   echo "configure: failed program was:" >&5
9094   cat conftest.$ac_ext >&5
9095   rm -rf conftest*
9096   eval "ac_cv_lib_$ac_lib_var=no"
9097 fi
9098 rm -f conftest*
9099 LIBS="$ac_save_LIBS"
9100
9101 fi
9102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9103   echo "$ac_t""yes" 1>&6
9104   ol_cv_lib_ndbm=-lndbm
9105 else
9106   echo "$ac_t""no" 1>&6
9107
9108                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9109 echo "configure:9110: checking for dbm_open in -ldbm" >&5
9110 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9112   echo $ac_n "(cached) $ac_c" 1>&6
9113 else
9114   ac_save_LIBS="$LIBS"
9115 LIBS="-ldbm  $LIBS"
9116 cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119 /* Override any gcc2 internal prototype to avoid an error.  */
9120 /* We use char because int might match the return type of a gcc2
9121     builtin and then its argument prototype would still apply.  */
9122 char dbm_open();
9123
9124 int main() {
9125 dbm_open()
9126 ; return 0; }
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9129   rm -rf conftest*
9130   eval "ac_cv_lib_$ac_lib_var=yes"
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   eval "ac_cv_lib_$ac_lib_var=no"
9136 fi
9137 rm -f conftest*
9138 LIBS="$ac_save_LIBS"
9139
9140 fi
9141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143   ol_cv_lib_ndbm=-ldbm
9144 else
9145   echo "$ac_t""no" 1>&6
9146 ol_cv_lib_ndbm=no
9147 fi
9148                 
9149 fi
9150
9151         
9152 fi
9153
9154         LIBS="$ol_LIBS"
9155
9156 fi
9157
9158 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9159
9160
9161  for ac_hdr in ndbm.h
9162 do
9163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9165 echo "configure:9166: checking for $ac_hdr" >&5
9166 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9167   echo $ac_n "(cached) $ac_c" 1>&6
9168 else
9169   cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172 #include <$ac_hdr>
9173 EOF
9174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9175 { (eval echo configure:9176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9177 if test -z "$ac_err"; then
9178   rm -rf conftest*
9179   eval "ac_cv_header_$ac_safe=yes"
9180 else
9181   echo "$ac_err" >&5
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   eval "ac_cv_header_$ac_safe=no"
9186 fi
9187 rm -f conftest*
9188 fi
9189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9190   echo "$ac_t""yes" 1>&6
9191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9192   cat >> confdefs.h <<EOF
9193 #define $ac_tr_hdr 1
9194 EOF
9195  
9196 else
9197   echo "$ac_t""no" 1>&6
9198 fi
9199 done
9200
9201  echo $ac_n "checking for db""... $ac_c" 1>&6
9202 echo "configure:9203: checking for db" >&5
9203 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9204   echo $ac_n "(cached) $ac_c" 1>&6
9205 else
9206   
9207         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9208                 ol_cv_ndbm=no
9209         else
9210                 ol_cv_ndbm=yes
9211         fi
9212
9213 fi
9214
9215 echo "$ac_t""$ol_cv_ndbm" 1>&6
9216  if test $ol_cv_ndbm = yes ; then
9217         cat >> confdefs.h <<\EOF
9218 #define HAVE_NDBM 1
9219 EOF
9220
9221  fi
9222
9223
9224         if test $ol_cv_ndbm = yes ; then
9225                 ol_link_ldbm=ndbm
9226                 ol_with_ldbm_api=ndbm
9227
9228                 if test $ol_cv_lib_ndbm != yes ; then
9229                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9230                 fi
9231         fi
9232 fi
9233
9234 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9235         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9236         if test $ol_enable_ldbm = yes ; then
9237                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9238         fi
9239
9240         echo "configure: warning: disabling LDBM" 1>&2
9241         ol_enable_ldbm=no
9242 fi
9243
9244 if test $ol_enable_wrappers != no ; then
9245         for ac_hdr in tcpd.h
9246 do
9247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9249 echo "configure:9250: checking for $ac_hdr" >&5
9250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   cat > conftest.$ac_ext <<EOF
9254 #line 9255 "configure"
9255 #include "confdefs.h"
9256 #include <$ac_hdr>
9257 EOF
9258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9259 { (eval echo configure:9260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9261 if test -z "$ac_err"; then
9262   rm -rf conftest*
9263   eval "ac_cv_header_$ac_safe=yes"
9264 else
9265   echo "$ac_err" >&5
9266   echo "configure: failed program was:" >&5
9267   cat conftest.$ac_ext >&5
9268   rm -rf conftest*
9269   eval "ac_cv_header_$ac_safe=no"
9270 fi
9271 rm -f conftest*
9272 fi
9273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9274   echo "$ac_t""yes" 1>&6
9275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9276   cat >> confdefs.h <<EOF
9277 #define $ac_tr_hdr 1
9278 EOF
9279  
9280 else
9281   echo "$ac_t""no" 1>&6
9282 fi
9283 done
9284
9285
9286         if test $ac_cv_header_tcpd_h != yes ; then
9287                 have_wrappers=no
9288         else
9289                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9290 echo "configure:9291: checking for main in -lwrap" >&5
9291 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9292 if eval "test \"\${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="-lwrap  $LIBS"
9297 cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300
9301 int main() {
9302 main()
9303 ; return 0; }
9304 EOF
9305 if { (eval echo configure:9306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9306   rm -rf conftest*
9307   eval "ac_cv_lib_$ac_lib_var=yes"
9308 else
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=no"
9313 fi
9314 rm -f conftest*
9315 LIBS="$ac_save_LIBS"
9316
9317 fi
9318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9319   echo "$ac_t""yes" 1>&6
9320   have_wrappers=yes
9321 else
9322   echo "$ac_t""no" 1>&6
9323 have_wrappers=no
9324 fi
9325
9326         fi
9327
9328         if test $have_wrappers = yes ; then
9329                 cat >> confdefs.h <<\EOF
9330 #define HAVE_TCPD 1
9331 EOF
9332
9333                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9334
9335                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9336 echo "configure:9337: checking for main in -lnsl" >&5
9337 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9339   echo $ac_n "(cached) $ac_c" 1>&6
9340 else
9341   ac_save_LIBS="$LIBS"
9342 LIBS="-lnsl  $LIBS"
9343 cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346
9347 int main() {
9348 main()
9349 ; return 0; }
9350 EOF
9351 if { (eval echo configure:9352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9352   rm -rf conftest*
9353   eval "ac_cv_lib_$ac_lib_var=yes"
9354 else
9355   echo "configure: failed program was:" >&5
9356   cat conftest.$ac_ext >&5
9357   rm -rf conftest*
9358   eval "ac_cv_lib_$ac_lib_var=no"
9359 fi
9360 rm -f conftest*
9361 LIBS="$ac_save_LIBS"
9362
9363 fi
9364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9365   echo "$ac_t""yes" 1>&6
9366     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9367     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9368   cat >> confdefs.h <<EOF
9369 #define $ac_tr_lib 1
9370 EOF
9371
9372   LIBS="-lnsl $LIBS"
9373
9374 else
9375   echo "$ac_t""no" 1>&6
9376 fi
9377
9378         else
9379                 echo "configure: warning: could not find -lwrap" 1>&2
9380                 if test $ol_enable_wrappers = yes ; then
9381                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9382                 fi
9383
9384                 echo "configure: warning: disabling wrappers support" 1>&2
9385                 ol_enable_wrappers=no
9386         fi
9387 fi
9388
9389 if test $ol_enable_syslog != no ; then
9390         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9391 echo "configure:9392: checking for openlog" >&5
9392 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9393   echo $ac_n "(cached) $ac_c" 1>&6
9394 else
9395   cat > conftest.$ac_ext <<EOF
9396 #line 9397 "configure"
9397 #include "confdefs.h"
9398 /* System header to define __stub macros and hopefully few prototypes,
9399     which can conflict with char openlog(); below.  */
9400 #include <assert.h>
9401 /* Override any gcc2 internal prototype to avoid an error.  */
9402 /* We use char because int might match the return type of a gcc2
9403     builtin and then its argument prototype would still apply.  */
9404 char openlog();
9405 char (*f)();
9406
9407 int main() {
9408
9409 /* The GNU C library defines this for functions which it implements
9410     to always fail with ENOSYS.  Some functions are actually named
9411     something starting with __ and the normal name is an alias.  */
9412 #if defined (__stub_openlog) || defined (__stub___openlog)
9413 choke me
9414 #else
9415 f = openlog;
9416 #endif
9417
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   eval "ac_cv_func_openlog=yes"
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   eval "ac_cv_func_openlog=no"
9428 fi
9429 rm -f conftest*
9430 fi
9431
9432 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9433   echo "$ac_t""yes" 1>&6
9434   :
9435 else
9436   echo "$ac_t""no" 1>&6
9437 fi
9438
9439         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9440                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9441         fi
9442         ol_enable_syslog=$ac_cv_func_openlog
9443 fi
9444
9445 if test $ol_enable_dmalloc != no ; then
9446         for ac_hdr in dmalloc.h
9447 do
9448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9450 echo "configure:9451: checking for $ac_hdr" >&5
9451 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9452   echo $ac_n "(cached) $ac_c" 1>&6
9453 else
9454   cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 #include <$ac_hdr>
9458 EOF
9459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9460 { (eval echo configure:9461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9462 if test -z "$ac_err"; then
9463   rm -rf conftest*
9464   eval "ac_cv_header_$ac_safe=yes"
9465 else
9466   echo "$ac_err" >&5
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   eval "ac_cv_header_$ac_safe=no"
9471 fi
9472 rm -f conftest*
9473 fi
9474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9475   echo "$ac_t""yes" 1>&6
9476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9477   cat >> confdefs.h <<EOF
9478 #define $ac_tr_hdr 1
9479 EOF
9480  
9481 else
9482   echo "$ac_t""no" 1>&6
9483 fi
9484 done
9485
9486         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9487 echo "configure:9488: checking for dmalloc_shutdown in -ldmalloc" >&5
9488 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
9489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9490   echo $ac_n "(cached) $ac_c" 1>&6
9491 else
9492   ac_save_LIBS="$LIBS"
9493 LIBS="-ldmalloc  $LIBS"
9494 cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497 /* Override any gcc2 internal prototype to avoid an error.  */
9498 /* We use char because int might match the return type of a gcc2
9499     builtin and then its argument prototype would still apply.  */
9500 char dmalloc_shutdown();
9501
9502 int main() {
9503 dmalloc_shutdown()
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9507   rm -rf conftest*
9508   eval "ac_cv_lib_$ac_lib_var=yes"
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -rf conftest*
9513   eval "ac_cv_lib_$ac_lib_var=no"
9514 fi
9515 rm -f conftest*
9516 LIBS="$ac_save_LIBS"
9517
9518 fi
9519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9520   echo "$ac_t""yes" 1>&6
9521     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9522     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9523   cat >> confdefs.h <<EOF
9524 #define $ac_tr_lib 1
9525 EOF
9526
9527   LIBS="-ldmalloc $LIBS"
9528
9529 else
9530   echo "$ac_t""no" 1>&6
9531 fi
9532
9533 fi
9534
9535 if test $ol_enable_tcl != no ; then
9536         for ac_hdr in tcl.h
9537 do
9538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9540 echo "configure:9541: checking for $ac_hdr" >&5
9541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 #include <$ac_hdr>
9548 EOF
9549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9550 { (eval echo configure:9551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9552 if test -z "$ac_err"; then
9553   rm -rf conftest*
9554   eval "ac_cv_header_$ac_safe=yes"
9555 else
9556   echo "$ac_err" >&5
9557   echo "configure: failed program was:" >&5
9558   cat conftest.$ac_ext >&5
9559   rm -rf conftest*
9560   eval "ac_cv_header_$ac_safe=no"
9561 fi
9562 rm -f conftest*
9563 fi
9564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9565   echo "$ac_t""yes" 1>&6
9566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9567   cat >> confdefs.h <<EOF
9568 #define $ac_tr_hdr 1
9569 EOF
9570  
9571 else
9572   echo "$ac_t""no" 1>&6
9573 fi
9574 done
9575
9576
9577         if test $ac_cv_header_tcl_h != yes ; then
9578                 have_tcl=no
9579         else
9580                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9581 echo "configure:9582: checking for main in -ltcl" >&5
9582 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
9583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   ac_save_LIBS="$LIBS"
9587 LIBS="-ltcl  $LIBS"
9588 cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591
9592 int main() {
9593 main()
9594 ; return 0; }
9595 EOF
9596 if { (eval echo configure:9597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9597   rm -rf conftest*
9598   eval "ac_cv_lib_$ac_lib_var=yes"
9599 else
9600   echo "configure: failed program was:" >&5
9601   cat conftest.$ac_ext >&5
9602   rm -rf conftest*
9603   eval "ac_cv_lib_$ac_lib_var=no"
9604 fi
9605 rm -f conftest*
9606 LIBS="$ac_save_LIBS"
9607
9608 fi
9609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9610   echo "$ac_t""yes" 1>&6
9611   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9612 else
9613   echo "$ac_t""no" 1>&6
9614 have_tcl=no
9615 fi
9616
9617
9618                 if test $have_tcl != yes; then
9619                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9620 echo "configure:9621: checking for main in -ltcl7.6" >&5
9621 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
9622 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9623   echo $ac_n "(cached) $ac_c" 1>&6
9624 else
9625   ac_save_LIBS="$LIBS"
9626 LIBS="-ltcl7.6  $LIBS"
9627 cat > conftest.$ac_ext <<EOF
9628 #line 9629 "configure"
9629 #include "confdefs.h"
9630
9631 int main() {
9632 main()
9633 ; return 0; }
9634 EOF
9635 if { (eval echo configure:9636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9636   rm -rf conftest*
9637   eval "ac_cv_lib_$ac_lib_var=yes"
9638 else
9639   echo "configure: failed program was:" >&5
9640   cat conftest.$ac_ext >&5
9641   rm -rf conftest*
9642   eval "ac_cv_lib_$ac_lib_var=no"
9643 fi
9644 rm -f conftest*
9645 LIBS="$ac_save_LIBS"
9646
9647 fi
9648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9649   echo "$ac_t""yes" 1>&6
9650   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9651 else
9652   echo "$ac_t""no" 1>&6
9653 have_tcl=no
9654 fi
9655
9656                 fi
9657
9658                 if test $have_tcl != yes; then
9659                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9660 echo "configure:9661: checking for main in -ltcl8.0" >&5
9661 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
9662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9663   echo $ac_n "(cached) $ac_c" 1>&6
9664 else
9665   ac_save_LIBS="$LIBS"
9666 LIBS="-ltcl8.0  $LIBS"
9667 cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670
9671 int main() {
9672 main()
9673 ; return 0; }
9674 EOF
9675 if { (eval echo configure:9676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9676   rm -rf conftest*
9677   eval "ac_cv_lib_$ac_lib_var=yes"
9678 else
9679   echo "configure: failed program was:" >&5
9680   cat conftest.$ac_ext >&5
9681   rm -rf conftest*
9682   eval "ac_cv_lib_$ac_lib_var=no"
9683 fi
9684 rm -f conftest*
9685 LIBS="$ac_save_LIBS"
9686
9687 fi
9688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9689   echo "$ac_t""yes" 1>&6
9690   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9691 else
9692   echo "$ac_t""no" 1>&6
9693 have_tcl=no
9694 fi
9695
9696                 fi
9697         fi
9698
9699         if test $have_tcl != yes ; then
9700                 echo "configure: warning: could not find -ltcl" 1>&2
9701                 if test $ol_enable_tcl = yes ; then
9702                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9703                 fi
9704
9705                 ol_enable_tcl=no
9706         fi
9707 fi
9708
9709 # ud needs termcap (should insert check here)
9710 ol_link_termcap=no
9711 for ac_hdr in termcap.h ncurses.h
9712 do
9713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9715 echo "configure:9716: checking for $ac_hdr" >&5
9716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9717   echo $ac_n "(cached) $ac_c" 1>&6
9718 else
9719   cat > conftest.$ac_ext <<EOF
9720 #line 9721 "configure"
9721 #include "confdefs.h"
9722 #include <$ac_hdr>
9723 EOF
9724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9725 { (eval echo configure:9726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9727 if test -z "$ac_err"; then
9728   rm -rf conftest*
9729   eval "ac_cv_header_$ac_safe=yes"
9730 else
9731   echo "$ac_err" >&5
9732   echo "configure: failed program was:" >&5
9733   cat conftest.$ac_ext >&5
9734   rm -rf conftest*
9735   eval "ac_cv_header_$ac_safe=no"
9736 fi
9737 rm -f conftest*
9738 fi
9739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9740   echo "$ac_t""yes" 1>&6
9741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9742   cat >> confdefs.h <<EOF
9743 #define $ac_tr_hdr 1
9744 EOF
9745  
9746 else
9747   echo "$ac_t""no" 1>&6
9748 fi
9749 done
9750
9751
9752 if test $ol_link_termcap = no ; then
9753         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9754 echo "configure:9755: checking for tputs in -ltermcap" >&5
9755 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
9756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9757   echo $ac_n "(cached) $ac_c" 1>&6
9758 else
9759   ac_save_LIBS="$LIBS"
9760 LIBS="-ltermcap  $LIBS"
9761 cat > conftest.$ac_ext <<EOF
9762 #line 9763 "configure"
9763 #include "confdefs.h"
9764 /* Override any gcc2 internal prototype to avoid an error.  */
9765 /* We use char because int might match the return type of a gcc2
9766     builtin and then its argument prototype would still apply.  */
9767 char tputs();
9768
9769 int main() {
9770 tputs()
9771 ; return 0; }
9772 EOF
9773 if { (eval echo configure:9774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9774   rm -rf conftest*
9775   eval "ac_cv_lib_$ac_lib_var=yes"
9776 else
9777   echo "configure: failed program was:" >&5
9778   cat conftest.$ac_ext >&5
9779   rm -rf conftest*
9780   eval "ac_cv_lib_$ac_lib_var=no"
9781 fi
9782 rm -f conftest*
9783 LIBS="$ac_save_LIBS"
9784
9785 fi
9786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9787   echo "$ac_t""yes" 1>&6
9788   have_termcap=yes
9789 else
9790   echo "$ac_t""no" 1>&6
9791 have_termcap=no
9792 fi
9793
9794         if test $have_termcap = yes ; then
9795                 cat >> confdefs.h <<\EOF
9796 #define HAVE_TERMCAP 1
9797 EOF
9798
9799                 ol_link_termcap=yes
9800                 TERMCAP_LIBS=-ltermcap
9801         fi
9802 fi
9803
9804 if test $ol_link_termcap = no ; then
9805         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9806 echo "configure:9807: checking for initscr in -lncurses" >&5
9807 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
9808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9809   echo $ac_n "(cached) $ac_c" 1>&6
9810 else
9811   ac_save_LIBS="$LIBS"
9812 LIBS="-lncurses  $LIBS"
9813 cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 /* Override any gcc2 internal prototype to avoid an error.  */
9817 /* We use char because int might match the return type of a gcc2
9818     builtin and then its argument prototype would still apply.  */
9819 char initscr();
9820
9821 int main() {
9822 initscr()
9823 ; return 0; }
9824 EOF
9825 if { (eval echo configure:9826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9826   rm -rf conftest*
9827   eval "ac_cv_lib_$ac_lib_var=yes"
9828 else
9829   echo "configure: failed program was:" >&5
9830   cat conftest.$ac_ext >&5
9831   rm -rf conftest*
9832   eval "ac_cv_lib_$ac_lib_var=no"
9833 fi
9834 rm -f conftest*
9835 LIBS="$ac_save_LIBS"
9836
9837 fi
9838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9839   echo "$ac_t""yes" 1>&6
9840   have_ncurses=yes
9841 else
9842   echo "$ac_t""no" 1>&6
9843 have_ncurses=no
9844 fi
9845
9846         if test $have_ncurses = yes ; then
9847                 cat >> confdefs.h <<\EOF
9848 #define HAVE_NCURSES 1
9849 EOF
9850
9851                 ol_link_termcap=yes
9852                 TERMCAP_LIBS=-lncurses
9853         fi
9854 fi
9855
9856 if test $ol_link_termcap = no ; then
9857         cat >> confdefs.h <<\EOF
9858 #define NO_TERMCAP 1
9859 EOF
9860
9861         TERMCAP_LIBS=
9862 fi
9863
9864 ol_link_readline=no
9865 if test $ol_with_readline != no ; then
9866         for ac_hdr in readline/readline.h readline/history.h
9867 do
9868 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9869 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9870 echo "configure:9871: checking for $ac_hdr" >&5
9871 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9872   echo $ac_n "(cached) $ac_c" 1>&6
9873 else
9874   cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 #include <$ac_hdr>
9878 EOF
9879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9880 { (eval echo configure:9881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9881 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9882 if test -z "$ac_err"; then
9883   rm -rf conftest*
9884   eval "ac_cv_header_$ac_safe=yes"
9885 else
9886   echo "$ac_err" >&5
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -rf conftest*
9890   eval "ac_cv_header_$ac_safe=no"
9891 fi
9892 rm -f conftest*
9893 fi
9894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9895   echo "$ac_t""yes" 1>&6
9896     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9897   cat >> confdefs.h <<EOF
9898 #define $ac_tr_hdr 1
9899 EOF
9900  
9901 else
9902   echo "$ac_t""no" 1>&6
9903 fi
9904 done
9905
9906
9907         if test $ac_cv_header_readline_readline_h = yes ; then
9908                 save_LIBS="$LIBS"
9909                 LIBS="$TERMCAP_LIBS $LIBS"
9910                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9911 echo "configure:9912: checking for readline in -lreadline" >&5
9912 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
9913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9914   echo $ac_n "(cached) $ac_c" 1>&6
9915 else
9916   ac_save_LIBS="$LIBS"
9917 LIBS="-lreadline  $LIBS"
9918 cat > conftest.$ac_ext <<EOF
9919 #line 9920 "configure"
9920 #include "confdefs.h"
9921 /* Override any gcc2 internal prototype to avoid an error.  */
9922 /* We use char because int might match the return type of a gcc2
9923     builtin and then its argument prototype would still apply.  */
9924 char readline();
9925
9926 int main() {
9927 readline()
9928 ; return 0; }
9929 EOF
9930 if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9931   rm -rf conftest*
9932   eval "ac_cv_lib_$ac_lib_var=yes"
9933 else
9934   echo "configure: failed program was:" >&5
9935   cat conftest.$ac_ext >&5
9936   rm -rf conftest*
9937   eval "ac_cv_lib_$ac_lib_var=no"
9938 fi
9939 rm -f conftest*
9940 LIBS="$ac_save_LIBS"
9941
9942 fi
9943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9944   echo "$ac_t""yes" 1>&6
9945   have_readline=yes
9946 else
9947   echo "$ac_t""no" 1>&6
9948 have_readline=no
9949 fi
9950
9951                 LIBS="$save_LIBS"
9952                         
9953                 if test $have_readline = yes ; then
9954                         ol_with_readline=found
9955                         ol_link_readline=yes
9956
9957                         READLINE_LIBS="-lreadline"
9958                 fi
9959         fi
9960 fi
9961
9962 if test $ol_link_readline = yes ; then
9963         cat >> confdefs.h <<\EOF
9964 #define HAVE_READLINE 1
9965 EOF
9966
9967 fi
9968
9969
9970 # FreeBSD (and others) have crypt(3) in -lcrypt
9971 if test $ol_enable_crypt != no ; then
9972         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9973 echo "configure:9974: checking for crypt" >&5
9974 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
9975   echo $ac_n "(cached) $ac_c" 1>&6
9976 else
9977   cat > conftest.$ac_ext <<EOF
9978 #line 9979 "configure"
9979 #include "confdefs.h"
9980 /* System header to define __stub macros and hopefully few prototypes,
9981     which can conflict with char crypt(); below.  */
9982 #include <assert.h>
9983 /* Override any gcc2 internal prototype to avoid an error.  */
9984 /* We use char because int might match the return type of a gcc2
9985     builtin and then its argument prototype would still apply.  */
9986 char crypt();
9987 char (*f)();
9988
9989 int main() {
9990
9991 /* The GNU C library defines this for functions which it implements
9992     to always fail with ENOSYS.  Some functions are actually named
9993     something starting with __ and the normal name is an alias.  */
9994 #if defined (__stub_crypt) || defined (__stub___crypt)
9995 choke me
9996 #else
9997 f = crypt;
9998 #endif
9999
10000 ; return 0; }
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10003   rm -rf conftest*
10004   eval "ac_cv_func_crypt=yes"
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   eval "ac_cv_func_crypt=no"
10010 fi
10011 rm -f conftest*
10012 fi
10013
10014 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10015   echo "$ac_t""yes" 1>&6
10016   have_crypt=yes
10017 else
10018   echo "$ac_t""no" 1>&6
10019
10020                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10021 echo "configure:10022: checking for crypt in -lcrypt" >&5
10022 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10023 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10024   echo $ac_n "(cached) $ac_c" 1>&6
10025 else
10026   ac_save_LIBS="$LIBS"
10027 LIBS="-lcrypt  $LIBS"
10028 cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 /* Override any gcc2 internal prototype to avoid an error.  */
10032 /* We use char because int might match the return type of a gcc2
10033     builtin and then its argument prototype would still apply.  */
10034 char crypt();
10035
10036 int main() {
10037 crypt()
10038 ; return 0; }
10039 EOF
10040 if { (eval echo configure:10041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=yes"
10043 else
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   eval "ac_cv_lib_$ac_lib_var=no"
10048 fi
10049 rm -f conftest*
10050 LIBS="$ac_save_LIBS"
10051
10052 fi
10053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10054   echo "$ac_t""yes" 1>&6
10055   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10056                         have_crypt=yes
10057 else
10058   echo "$ac_t""no" 1>&6
10059 have_crypt=no
10060 fi
10061
10062 fi
10063
10064
10065         if test $have_crypt = yes ; then
10066                 cat >> confdefs.h <<\EOF
10067 #define HAVE_CRYPT 1
10068 EOF
10069
10070         else
10071                 echo "configure: warning: could not find crypt" 1>&2
10072                 if test $ol_enable_crypt = yes ; then
10073                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10074                 fi
10075
10076                 echo "configure: warning: disabling crypt support" 1>&2
10077                 ol_enable_crypt=no
10078         fi
10079 fi
10080
10081 # FreeBSD (and others) have setproctitle(3) in -lutil
10082 if test $ol_enable_proctitle != no ; then
10083         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10084 echo "configure:10085: checking for setproctitle" >&5
10085 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10086   echo $ac_n "(cached) $ac_c" 1>&6
10087 else
10088   cat > conftest.$ac_ext <<EOF
10089 #line 10090 "configure"
10090 #include "confdefs.h"
10091 /* System header to define __stub macros and hopefully few prototypes,
10092     which can conflict with char setproctitle(); below.  */
10093 #include <assert.h>
10094 /* Override any gcc2 internal prototype to avoid an error.  */
10095 /* We use char because int might match the return type of a gcc2
10096     builtin and then its argument prototype would still apply.  */
10097 char setproctitle();
10098 char (*f)();
10099
10100 int main() {
10101
10102 /* The GNU C library defines this for functions which it implements
10103     to always fail with ENOSYS.  Some functions are actually named
10104     something starting with __ and the normal name is an alias.  */
10105 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10106 choke me
10107 #else
10108 f = setproctitle;
10109 #endif
10110
10111 ; return 0; }
10112 EOF
10113 if { (eval echo configure:10114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10114   rm -rf conftest*
10115   eval "ac_cv_func_setproctitle=yes"
10116 else
10117   echo "configure: failed program was:" >&5
10118   cat conftest.$ac_ext >&5
10119   rm -rf conftest*
10120   eval "ac_cv_func_setproctitle=no"
10121 fi
10122 rm -f conftest*
10123 fi
10124
10125 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10126   echo "$ac_t""yes" 1>&6
10127   have_setproctitle=yes
10128 else
10129   echo "$ac_t""no" 1>&6
10130
10131                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10132 echo "configure:10133: checking for setproctitle in -lutil" >&5
10133 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10135   echo $ac_n "(cached) $ac_c" 1>&6
10136 else
10137   ac_save_LIBS="$LIBS"
10138 LIBS="-lutil  $LIBS"
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 /* Override any gcc2 internal prototype to avoid an error.  */
10143 /* We use char because int might match the return type of a gcc2
10144     builtin and then its argument prototype would still apply.  */
10145 char setproctitle();
10146
10147 int main() {
10148 setproctitle()
10149 ; return 0; }
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10152   rm -rf conftest*
10153   eval "ac_cv_lib_$ac_lib_var=yes"
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=no"
10159 fi
10160 rm -f conftest*
10161 LIBS="$ac_save_LIBS"
10162
10163 fi
10164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10165   echo "$ac_t""yes" 1>&6
10166   have_setproctitle=yes
10167                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10168 else
10169   echo "$ac_t""no" 1>&6
10170 have_setproctitle=no
10171                         LIBOBJS="$LIBOBJS setproctitle.o"
10172 fi
10173
10174 fi
10175
10176
10177         if test $have_setproctitle = yes ; then
10178                 cat >> confdefs.h <<\EOF
10179 #define HAVE_SETPROCTITLE 1
10180 EOF
10181
10182         fi
10183 fi
10184
10185 # test for EBCDIC
10186 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
10187 echo "configure:10188: checking for EBCDIC" >&5
10188 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
10189   echo $ac_n "(cached) $ac_c" 1>&6
10190 else
10191   
10192         cat > conftest.$ac_ext <<EOF
10193 #line 10194 "configure"
10194 #include "confdefs.h"
10195
10196 #if !('M' == 0xd4)
10197 #include <__ASCII__/generate_error.h>
10198 #endif
10199
10200 EOF
10201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10202 { (eval echo configure:10203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10204 if test -z "$ac_err"; then
10205   rm -rf conftest*
10206   ol_cv_cpp_ebcdic=yes
10207 else
10208   echo "$ac_err" >&5
10209   echo "configure: failed program was:" >&5
10210   cat conftest.$ac_ext >&5
10211   rm -rf conftest*
10212   ol_cv_cpp_ebcdic=no
10213 fi
10214 rm -f conftest*
10215 fi
10216
10217 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
10218 if test $ol_cv_cpp_ebcdic = yes ; then
10219         cat >> confdefs.h <<\EOF
10220 #define HAVE_EBCDIC 1
10221 EOF
10222
10223 fi
10224
10225 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10226 echo "configure:10227: checking for ANSI C header files" >&5
10227 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
10228   echo $ac_n "(cached) $ac_c" 1>&6
10229 else
10230   cat > conftest.$ac_ext <<EOF
10231 #line 10232 "configure"
10232 #include "confdefs.h"
10233 #include <stdlib.h>
10234 #include <stdarg.h>
10235 #include <string.h>
10236 #include <float.h>
10237 EOF
10238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10239 { (eval echo configure:10240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10241 if test -z "$ac_err"; then
10242   rm -rf conftest*
10243   ol_cv_header_stdc=yes
10244 else
10245   echo "$ac_err" >&5
10246   echo "configure: failed program was:" >&5
10247   cat conftest.$ac_ext >&5
10248   rm -rf conftest*
10249   ol_cv_header_stdc=no
10250 fi
10251 rm -f conftest*
10252
10253 if test $ol_cv_header_stdc = yes; then
10254   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10255 cat > conftest.$ac_ext <<EOF
10256 #line 10257 "configure"
10257 #include "confdefs.h"
10258 #include <string.h>
10259 EOF
10260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10261   egrep "memchr" >/dev/null 2>&1; then
10262   :
10263 else
10264   rm -rf conftest*
10265   ol_cv_header_stdc=no
10266 fi
10267 rm -f conftest*
10268
10269 fi
10270
10271 if test $ol_cv_header_stdc = yes; then
10272   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10273 cat > conftest.$ac_ext <<EOF
10274 #line 10275 "configure"
10275 #include "confdefs.h"
10276 #include <stdlib.h>
10277 EOF
10278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10279   egrep "free" >/dev/null 2>&1; then
10280   :
10281 else
10282   rm -rf conftest*
10283   ol_cv_header_stdc=no
10284 fi
10285 rm -f conftest*
10286
10287 fi
10288
10289 if test $ol_cv_header_stdc = yes; then
10290   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10291 if test "$cross_compiling" = yes; then
10292   :
10293 else
10294   cat > conftest.$ac_ext <<EOF
10295 #line 10296 "configure"
10296 #include "confdefs.h"
10297 #include <ctype.h>
10298 #ifndef HAVE_EBCDIC
10299 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10300 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10301 #else
10302 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10303                 || ('j' <= (c) && (c) <= 'r') \
10304                 || ('s' <= (c) && (c) <= 'z'))
10305 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
10306 #endif
10307 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10308 int main () { int i; for (i = 0; i < 256; i++)
10309 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10310 exit (0); }
10311
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10314 then
10315   :
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -fr conftest*
10320   ol_cv_header_stdc=no
10321 fi
10322 rm -fr conftest*
10323 fi
10324
10325 fi
10326 fi
10327
10328 echo "$ac_t""$ol_cv_header_stdc" 1>&6
10329 if test $ol_cv_header_stdc = yes; then
10330   cat >> confdefs.h <<\EOF
10331 #define STDC_HEADERS 1
10332 EOF
10333
10334 fi
10335 ac_cv_header_stdc=disable
10336
10337
10338 if test $ol_cv_header_stdc != yes; then
10339         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
10340 fi
10341
10342 ac_header_dirent=no
10343 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
10344 do
10345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10346 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
10347 echo "configure:10348: checking for $ac_hdr that defines DIR" >&5
10348 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
10349   echo $ac_n "(cached) $ac_c" 1>&6
10350 else
10351   cat > conftest.$ac_ext <<EOF
10352 #line 10353 "configure"
10353 #include "confdefs.h"
10354 #include <sys/types.h>
10355 #include <$ac_hdr>
10356 int main() {
10357 DIR *dirp = 0;
10358 ; return 0; }
10359 EOF
10360 if { (eval echo configure:10361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10361   rm -rf conftest*
10362   eval "ac_cv_header_dirent_$ac_safe=yes"
10363 else
10364   echo "configure: failed program was:" >&5
10365   cat conftest.$ac_ext >&5
10366   rm -rf conftest*
10367   eval "ac_cv_header_dirent_$ac_safe=no"
10368 fi
10369 rm -f conftest*
10370 fi
10371 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
10372   echo "$ac_t""yes" 1>&6
10373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10374   cat >> confdefs.h <<EOF
10375 #define $ac_tr_hdr 1
10376 EOF
10377  ac_header_dirent=$ac_hdr; break
10378 else
10379   echo "$ac_t""no" 1>&6
10380 fi
10381 done
10382 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10383 if test $ac_header_dirent = dirent.h; then
10384 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
10385 echo "configure:10386: checking for opendir in -ldir" >&5
10386 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
10387 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10388   echo $ac_n "(cached) $ac_c" 1>&6
10389 else
10390   ac_save_LIBS="$LIBS"
10391 LIBS="-ldir  $LIBS"
10392 cat > conftest.$ac_ext <<EOF
10393 #line 10394 "configure"
10394 #include "confdefs.h"
10395 /* Override any gcc2 internal prototype to avoid an error.  */
10396 /* We use char because int might match the return type of a gcc2
10397     builtin and then its argument prototype would still apply.  */
10398 char opendir();
10399
10400 int main() {
10401 opendir()
10402 ; return 0; }
10403 EOF
10404 if { (eval echo configure:10405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10405   rm -rf conftest*
10406   eval "ac_cv_lib_$ac_lib_var=yes"
10407 else
10408   echo "configure: failed program was:" >&5
10409   cat conftest.$ac_ext >&5
10410   rm -rf conftest*
10411   eval "ac_cv_lib_$ac_lib_var=no"
10412 fi
10413 rm -f conftest*
10414 LIBS="$ac_save_LIBS"
10415
10416 fi
10417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10418   echo "$ac_t""yes" 1>&6
10419   LIBS="$LIBS -ldir"
10420 else
10421   echo "$ac_t""no" 1>&6
10422 fi
10423
10424 else
10425 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
10426 echo "configure:10427: checking for opendir in -lx" >&5
10427 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
10428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   ac_save_LIBS="$LIBS"
10432 LIBS="-lx  $LIBS"
10433 cat > conftest.$ac_ext <<EOF
10434 #line 10435 "configure"
10435 #include "confdefs.h"
10436 /* Override any gcc2 internal prototype to avoid an error.  */
10437 /* We use char because int might match the return type of a gcc2
10438     builtin and then its argument prototype would still apply.  */
10439 char opendir();
10440
10441 int main() {
10442 opendir()
10443 ; return 0; }
10444 EOF
10445 if { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10446   rm -rf conftest*
10447   eval "ac_cv_lib_$ac_lib_var=yes"
10448 else
10449   echo "configure: failed program was:" >&5
10450   cat conftest.$ac_ext >&5
10451   rm -rf conftest*
10452   eval "ac_cv_lib_$ac_lib_var=no"
10453 fi
10454 rm -f conftest*
10455 LIBS="$ac_save_LIBS"
10456
10457 fi
10458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10459   echo "$ac_t""yes" 1>&6
10460   LIBS="$LIBS -lx"
10461 else
10462   echo "$ac_t""no" 1>&6
10463 fi
10464
10465 fi
10466
10467 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
10468 echo "configure:10469: checking for sys/wait.h that is POSIX.1 compatible" >&5
10469 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
10470   echo $ac_n "(cached) $ac_c" 1>&6
10471 else
10472   cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475 #include <sys/types.h>
10476 #include <sys/wait.h>
10477 #ifndef WEXITSTATUS
10478 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10479 #endif
10480 #ifndef WIFEXITED
10481 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10482 #endif
10483 int main() {
10484 int s;
10485 wait (&s);
10486 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10487 ; return 0; }
10488 EOF
10489 if { (eval echo configure:10490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10490   rm -rf conftest*
10491   ac_cv_header_sys_wait_h=yes
10492 else
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   ac_cv_header_sys_wait_h=no
10497 fi
10498 rm -f conftest*
10499 fi
10500
10501 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
10502 if test $ac_cv_header_sys_wait_h = yes; then
10503   cat >> confdefs.h <<\EOF
10504 #define HAVE_SYS_WAIT_H 1
10505 EOF
10506
10507 fi
10508
10509 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
10510 echo "configure:10511: checking POSIX termios" >&5
10511 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
10512   echo $ac_n "(cached) $ac_c" 1>&6
10513 else
10514   cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 #include <sys/types.h>
10518 #include <unistd.h>
10519 #include <termios.h>
10520 int main() {
10521 /* SunOS 4.0.3 has termios.h but not the library calls.  */
10522    tcgetattr(0, 0);
10523 ; return 0; }
10524 EOF
10525 if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10526   rm -rf conftest*
10527   am_cv_sys_posix_termios=yes
10528 else
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   am_cv_sys_posix_termios=no
10533 fi
10534 rm -f conftest*
10535 fi
10536
10537 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
10538
10539
10540  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
10541 echo "configure:10542: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
10542 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
10543   echo $ac_n "(cached) $ac_c" 1>&6
10544 else
10545   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
10546
10547   gwinsz_in_termios_h=no
10548   if test $am_cv_sys_posix_termios = yes; then
10549     cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552 #include <sys/types.h>
10553 #     include <termios.h>
10554 #     ifdef TIOCGWINSZ
10555         yes
10556 #     endif
10557     
10558 EOF
10559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10560   egrep "yes" >/dev/null 2>&1; then
10561   rm -rf conftest*
10562   gwinsz_in_termios_h=yes
10563 fi
10564 rm -f conftest*
10565
10566   fi
10567
10568   if test $gwinsz_in_termios_h = no; then
10569     cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572 #include <sys/types.h>
10573 #     include <sys/ioctl.h>
10574 #     ifdef TIOCGWINSZ
10575         yes
10576 #     endif
10577     
10578 EOF
10579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10580   egrep "yes" >/dev/null 2>&1; then
10581   rm -rf conftest*
10582   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10583 fi
10584 rm -f conftest*
10585
10586   fi
10587   
10588 fi
10589
10590 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10591   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10592     cat >> confdefs.h <<\EOF
10593 #define GWINSZ_IN_SYS_IOCTL 1
10594 EOF
10595
10596   fi
10597
10598 if test $am_cv_sys_posix_termios = yes ; then
10599         cat >> confdefs.h <<\EOF
10600 #define HAVE_POSIX_TERMIOS 1
10601 EOF
10602
10603 fi
10604
10605 for ac_hdr in \
10606         arpa/inet.h             \
10607         arpa/nameser.h  \
10608         assert.h                \
10609         crypt.h                 \
10610         errno.h                 \
10611         fcntl.h                 \
10612         filio.h                 \
10613         getopt.h                \
10614         grp.h                   \
10615         libutil.h               \
10616         limits.h                \
10617         locale.h                \
10618         malloc.h                \
10619         memory.h                \
10620         psap.h                  \
10621         pwd.h                   \
10622         resolv.h                \
10623         sgtty.h                 \
10624         shadow.h                \
10625         stdarg.h                \
10626         stddef.h                \
10627         string.h                \
10628         strings.h               \
10629         sysexits.h              \
10630         sys/file.h              \
10631         sys/filio.h             \
10632         sys/errno.h             \
10633         sys/ioctl.h             \
10634         sys/param.h             \
10635         sys/resource.h  \
10636         sys/select.h    \
10637         sys/socket.h    \
10638         sys/syslog.h    \
10639         sys/time.h              \
10640         sys/types.h             \
10641         syslog.h                \
10642         termios.h               \
10643         unistd.h                \
10644
10645 do
10646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10648 echo "configure:10649: checking for $ac_hdr" >&5
10649 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10650   echo $ac_n "(cached) $ac_c" 1>&6
10651 else
10652   cat > conftest.$ac_ext <<EOF
10653 #line 10654 "configure"
10654 #include "confdefs.h"
10655 #include <$ac_hdr>
10656 EOF
10657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10658 { (eval echo configure:10659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10660 if test -z "$ac_err"; then
10661   rm -rf conftest*
10662   eval "ac_cv_header_$ac_safe=yes"
10663 else
10664   echo "$ac_err" >&5
10665   echo "configure: failed program was:" >&5
10666   cat conftest.$ac_ext >&5
10667   rm -rf conftest*
10668   eval "ac_cv_header_$ac_safe=no"
10669 fi
10670 rm -f conftest*
10671 fi
10672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10673   echo "$ac_t""yes" 1>&6
10674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10675   cat >> confdefs.h <<EOF
10676 #define $ac_tr_hdr 1
10677 EOF
10678  
10679 else
10680   echo "$ac_t""no" 1>&6
10681 fi
10682 done
10683
10684
10685 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10686 echo "configure:10687: checking for uid_t in sys/types.h" >&5
10687 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10688   echo $ac_n "(cached) $ac_c" 1>&6
10689 else
10690   cat > conftest.$ac_ext <<EOF
10691 #line 10692 "configure"
10692 #include "confdefs.h"
10693 #include <sys/types.h>
10694 EOF
10695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10696   egrep "uid_t" >/dev/null 2>&1; then
10697   rm -rf conftest*
10698   ac_cv_type_uid_t=yes
10699 else
10700   rm -rf conftest*
10701   ac_cv_type_uid_t=no
10702 fi
10703 rm -f conftest*
10704
10705 fi
10706
10707 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10708 if test $ac_cv_type_uid_t = no; then
10709   cat >> confdefs.h <<\EOF
10710 #define uid_t int
10711 EOF
10712
10713   cat >> confdefs.h <<\EOF
10714 #define gid_t int
10715 EOF
10716
10717 fi
10718
10719 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10720 echo "configure:10721: checking type of array argument to getgroups" >&5
10721 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   if test "$cross_compiling" = yes; then
10725   ac_cv_type_getgroups=cross
10726 else
10727   cat > conftest.$ac_ext <<EOF
10728 #line 10729 "configure"
10729 #include "confdefs.h"
10730
10731 /* Thanks to Mike Rendell for this test.  */
10732 #include <sys/types.h>
10733 #define NGID 256
10734 #undef MAX
10735 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10736 main()
10737 {
10738   gid_t gidset[NGID];
10739   int i, n;
10740   union { gid_t gval; long lval; }  val;
10741
10742   val.lval = -1;
10743   for (i = 0; i < NGID; i++)
10744     gidset[i] = val.gval;
10745   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10746                  gidset);
10747   /* Exit non-zero if getgroups seems to require an array of ints.  This
10748      happens when gid_t is short but getgroups modifies an array of ints.  */
10749   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10750 }
10751
10752 EOF
10753 if { (eval echo configure:10754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10754 then
10755     ac_cv_type_getgroups=gid_t
10756 else
10757   echo "configure: failed program was:" >&5
10758   cat conftest.$ac_ext >&5
10759   rm -fr conftest*
10760   ac_cv_type_getgroups=int
10761 fi
10762 rm -fr conftest*
10763 fi
10764
10765 if test $ac_cv_type_getgroups = cross; then
10766         cat > conftest.$ac_ext <<EOF
10767 #line 10768 "configure"
10768 #include "confdefs.h"
10769 #include <unistd.h>
10770 EOF
10771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10772   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10773   rm -rf conftest*
10774   ac_cv_type_getgroups=gid_t
10775 else
10776   rm -rf conftest*
10777   ac_cv_type_getgroups=int
10778 fi
10779 rm -f conftest*
10780
10781 fi
10782 fi
10783
10784 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10785 cat >> confdefs.h <<EOF
10786 #define GETGROUPS_T $ac_cv_type_getgroups
10787 EOF
10788
10789  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10790 echo "configure:10791: checking for ANSI C header files" >&5
10791 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10792   echo $ac_n "(cached) $ac_c" 1>&6
10793 else
10794   cat > conftest.$ac_ext <<EOF
10795 #line 10796 "configure"
10796 #include "confdefs.h"
10797 #include <stdlib.h>
10798 #include <stdarg.h>
10799 #include <string.h>
10800 #include <float.h>
10801 EOF
10802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10803 { (eval echo configure:10804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10805 if test -z "$ac_err"; then
10806   rm -rf conftest*
10807   ac_cv_header_stdc=yes
10808 else
10809   echo "$ac_err" >&5
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   ac_cv_header_stdc=no
10814 fi
10815 rm -f conftest*
10816
10817 if test $ac_cv_header_stdc = yes; then
10818   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10819 cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 #include <string.h>
10823 EOF
10824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10825   egrep "memchr" >/dev/null 2>&1; then
10826   :
10827 else
10828   rm -rf conftest*
10829   ac_cv_header_stdc=no
10830 fi
10831 rm -f conftest*
10832
10833 fi
10834
10835 if test $ac_cv_header_stdc = yes; then
10836   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10837 cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 #include <stdlib.h>
10841 EOF
10842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10843   egrep "free" >/dev/null 2>&1; then
10844   :
10845 else
10846   rm -rf conftest*
10847   ac_cv_header_stdc=no
10848 fi
10849 rm -f conftest*
10850
10851 fi
10852
10853 if test $ac_cv_header_stdc = yes; then
10854   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10855 if test "$cross_compiling" = yes; then
10856   :
10857 else
10858   cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 #include <ctype.h>
10862 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10863 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10864 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10865 int main () { int i; for (i = 0; i < 256; i++)
10866 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10867 exit (0); }
10868
10869 EOF
10870 if { (eval echo configure:10871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10871 then
10872   :
10873 else
10874   echo "configure: failed program was:" >&5
10875   cat conftest.$ac_ext >&5
10876   rm -fr conftest*
10877   ac_cv_header_stdc=no
10878 fi
10879 rm -fr conftest*
10880 fi
10881
10882 fi
10883 fi
10884
10885 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10886 if test $ac_cv_header_stdc = yes; then
10887   cat >> confdefs.h <<\EOF
10888 #define STDC_HEADERS 1
10889 EOF
10890
10891 fi
10892
10893 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10894 echo "configure:10895: checking for mode_t" >&5
10895 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
10896   echo $ac_n "(cached) $ac_c" 1>&6
10897 else
10898   cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901 #include <sys/types.h>
10902 #if STDC_HEADERS
10903 #include <stdlib.h>
10904 #include <stddef.h>
10905 #endif
10906 EOF
10907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10908   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10909   rm -rf conftest*
10910   eval "ac_cv_type_mode_t=yes"
10911 else
10912   rm -rf conftest*
10913   eval "ac_cv_type_mode_t=no"
10914 fi
10915 rm -f conftest*
10916
10917 fi
10918 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
10919   echo "$ac_t""yes" 1>&6
10920 else
10921   echo "$ac_t""no" 1>&6
10922   cat >> confdefs.h <<EOF
10923 #define mode_t int
10924 EOF
10925
10926 fi
10927
10928 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10929 echo "configure:10930: checking for off_t" >&5
10930 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
10931   echo $ac_n "(cached) $ac_c" 1>&6
10932 else
10933   cat > conftest.$ac_ext <<EOF
10934 #line 10935 "configure"
10935 #include "confdefs.h"
10936 #include <sys/types.h>
10937 #if STDC_HEADERS
10938 #include <stdlib.h>
10939 #include <stddef.h>
10940 #endif
10941 EOF
10942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10943   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10944   rm -rf conftest*
10945   eval "ac_cv_type_off_t=yes"
10946 else
10947   rm -rf conftest*
10948   eval "ac_cv_type_off_t=no"
10949 fi
10950 rm -f conftest*
10951
10952 fi
10953 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
10954   echo "$ac_t""yes" 1>&6
10955 else
10956   echo "$ac_t""no" 1>&6
10957   cat >> confdefs.h <<EOF
10958 #define off_t long
10959 EOF
10960
10961 fi
10962
10963 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10964 echo "configure:10965: checking for pid_t" >&5
10965 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
10966   echo $ac_n "(cached) $ac_c" 1>&6
10967 else
10968   cat > conftest.$ac_ext <<EOF
10969 #line 10970 "configure"
10970 #include "confdefs.h"
10971 #include <sys/types.h>
10972 #if STDC_HEADERS
10973 #include <stdlib.h>
10974 #include <stddef.h>
10975 #endif
10976 EOF
10977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10978   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10979   rm -rf conftest*
10980   eval "ac_cv_type_pid_t=yes"
10981 else
10982   rm -rf conftest*
10983   eval "ac_cv_type_pid_t=no"
10984 fi
10985 rm -f conftest*
10986
10987 fi
10988 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
10989   echo "$ac_t""yes" 1>&6
10990 else
10991   echo "$ac_t""no" 1>&6
10992   cat >> confdefs.h <<EOF
10993 #define pid_t int
10994 EOF
10995
10996 fi
10997
10998 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10999 echo "configure:11000: checking for ptrdiff_t" >&5
11000 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11001   echo $ac_n "(cached) $ac_c" 1>&6
11002 else
11003   cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006 #include <stddef.h>
11007 int main() {
11008 ptrdiff_t p
11009 ; return 0; }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11012   rm -rf conftest*
11013   am_cv_type_ptrdiff_t=yes
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -rf conftest*
11018   am_cv_type_ptrdiff_t=no
11019 fi
11020 rm -f conftest*
11021 fi
11022
11023 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11024    if test $am_cv_type_ptrdiff_t = yes; then
11025      cat >> confdefs.h <<\EOF
11026 #define HAVE_PTRDIFF_T 1
11027 EOF
11028
11029    fi
11030
11031 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11032 echo "configure:11033: checking return type of signal handlers" >&5
11033 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   cat > conftest.$ac_ext <<EOF
11037 #line 11038 "configure"
11038 #include "confdefs.h"
11039 #include <sys/types.h>
11040 #include <signal.h>
11041 #ifdef signal
11042 #undef signal
11043 #endif
11044 #ifdef __cplusplus
11045 extern "C" void (*signal (int, void (*)(int)))(int);
11046 #else
11047 void (*signal ()) ();
11048 #endif
11049
11050 int main() {
11051 int i;
11052 ; return 0; }
11053 EOF
11054 if { (eval echo configure:11055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11055   rm -rf conftest*
11056   ac_cv_type_signal=void
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   ac_cv_type_signal=int
11062 fi
11063 rm -f conftest*
11064 fi
11065
11066 echo "$ac_t""$ac_cv_type_signal" 1>&6
11067 cat >> confdefs.h <<EOF
11068 #define RETSIGTYPE $ac_cv_type_signal
11069 EOF
11070
11071
11072 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11073 echo "configure:11074: checking for sig_atomic_t" >&5
11074 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11075   echo $ac_n "(cached) $ac_c" 1>&6
11076 else
11077   cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080 #include <signal.h>
11081 int main() {
11082 sig_atomic_t atomic;
11083 ; return 0; }
11084 EOF
11085 if { (eval echo configure:11086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11086   rm -rf conftest*
11087   ol_cv_type_sig_atomic_t=yes
11088 else
11089   echo "configure: failed program was:" >&5
11090   cat conftest.$ac_ext >&5
11091   rm -rf conftest*
11092   ol_cv_type_sig_atomic_t=no
11093 fi
11094 rm -f conftest*
11095 fi
11096
11097 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11098   if test $ol_cv_type_sig_atomic_t = no; then
11099     cat >> confdefs.h <<\EOF
11100 #define sig_atomic_t int
11101 EOF
11102
11103   fi
11104  
11105 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11106 echo "configure:11107: checking for size_t" >&5
11107 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11108   echo $ac_n "(cached) $ac_c" 1>&6
11109 else
11110   cat > conftest.$ac_ext <<EOF
11111 #line 11112 "configure"
11112 #include "confdefs.h"
11113 #include <sys/types.h>
11114 #if STDC_HEADERS
11115 #include <stdlib.h>
11116 #include <stddef.h>
11117 #endif
11118 EOF
11119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11120   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11121   rm -rf conftest*
11122   eval "ac_cv_type_size_t=yes"
11123 else
11124   rm -rf conftest*
11125   eval "ac_cv_type_size_t=no"
11126 fi
11127 rm -f conftest*
11128
11129 fi
11130 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11131   echo "$ac_t""yes" 1>&6
11132 else
11133   echo "$ac_t""no" 1>&6
11134   cat >> confdefs.h <<EOF
11135 #define size_t unsigned
11136 EOF
11137
11138 fi
11139
11140 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11141 echo "configure:11142: checking for socklen_t" >&5
11142 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11143   echo $ac_n "(cached) $ac_c" 1>&6
11144 else
11145   cat > conftest.$ac_ext <<EOF
11146 #line 11147 "configure"
11147 #include "confdefs.h"
11148
11149 #ifdef HAVE_SYS_TYPES_H
11150 #include <sys/types.h>
11151 #endif
11152 #ifdef HAVE_SYS_SOCKET_H
11153 #include <sys/socket.h>
11154 #endif
11155
11156 int main() {
11157 socklen_t len;
11158 ; return 0; }
11159 EOF
11160 if { (eval echo configure:11161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11161   rm -rf conftest*
11162   ol_cv_type_socklen_t=yes
11163 else
11164   echo "configure: failed program was:" >&5
11165   cat conftest.$ac_ext >&5
11166   rm -rf conftest*
11167   ol_cv_type_socklen_t=no
11168 fi
11169 rm -f conftest*
11170 fi
11171
11172 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11173   if test $ol_cv_type_socklen_t = no; then
11174     cat >> confdefs.h <<\EOF
11175 #define socklen_t int
11176 EOF
11177
11178   fi
11179  
11180 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11181 echo "configure:11182: checking for member st_blksize in aggregate type struct stat" >&5
11182 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11183   echo $ac_n "(cached) $ac_c" 1>&6
11184 else
11185   cat > conftest.$ac_ext <<EOF
11186 #line 11187 "configure"
11187 #include "confdefs.h"
11188 #include <sys/types.h>
11189 #include <sys/stat.h>
11190 int main() {
11191 struct stat foo; foo.st_blksize;
11192 ; return 0; }
11193 EOF
11194 if { (eval echo configure:11195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11195   rm -rf conftest*
11196   ac_cv_c_struct_member_st_blksize=yes
11197 else
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -rf conftest*
11201   ac_cv_c_struct_member_st_blksize=no
11202 fi
11203 rm -f conftest*
11204 fi
11205
11206 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11207 st_blksize="$ac_cv_c_struct_member_st_blksize"
11208 if test $ac_cv_c_struct_member_st_blksize = yes; then
11209   cat >> confdefs.h <<\EOF
11210 #define HAVE_ST_BLKSIZE 1
11211 EOF
11212
11213 fi
11214
11215 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11216 echo "configure:11217: checking whether time.h and sys/time.h may both be included" >&5
11217 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   cat > conftest.$ac_ext <<EOF
11221 #line 11222 "configure"
11222 #include "confdefs.h"
11223 #include <sys/types.h>
11224 #include <sys/time.h>
11225 #include <time.h>
11226 int main() {
11227 struct tm *tp;
11228 ; return 0; }
11229 EOF
11230 if { (eval echo configure:11231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11231   rm -rf conftest*
11232   ac_cv_header_time=yes
11233 else
11234   echo "configure: failed program was:" >&5
11235   cat conftest.$ac_ext >&5
11236   rm -rf conftest*
11237   ac_cv_header_time=no
11238 fi
11239 rm -f conftest*
11240 fi
11241
11242 echo "$ac_t""$ac_cv_header_time" 1>&6
11243 if test $ac_cv_header_time = yes; then
11244   cat >> confdefs.h <<\EOF
11245 #define TIME_WITH_SYS_TIME 1
11246 EOF
11247
11248 fi
11249
11250 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11251 echo "configure:11252: checking whether struct tm is in sys/time.h or time.h" >&5
11252 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 #include <sys/types.h>
11259 #include <time.h>
11260 int main() {
11261 struct tm *tp; tp->tm_sec;
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11265   rm -rf conftest*
11266   ac_cv_struct_tm=time.h
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   ac_cv_struct_tm=sys/time.h
11272 fi
11273 rm -f conftest*
11274 fi
11275
11276 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11277 if test $ac_cv_struct_tm = sys/time.h; then
11278   cat >> confdefs.h <<\EOF
11279 #define TM_IN_SYS_TIME 1
11280 EOF
11281
11282 fi
11283
11284 # test for pw_gecos in struct passwd
11285 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11286 echo "configure:11287: checking struct passwd for pw_gecos" >&5
11287 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   
11291         cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 #include <pwd.h>
11295 int main() {
11296
11297         struct passwd pwd;
11298         pwd.pw_gecos = pwd.pw_name;
11299
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11303   rm -rf conftest*
11304   ol_cv_struct_passwd_pw_gecos=yes
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   ol_cv_struct_passwd_pw_gecos=no
11310 fi
11311 rm -f conftest*
11312 fi
11313
11314 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11315 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11316         cat >> confdefs.h <<\EOF
11317 #define HAVE_PW_GECOS 1
11318 EOF
11319
11320 fi
11321
11322 # test for pw_passwd in struct passwd
11323 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11324 echo "configure:11325: checking struct passwd for pw_passwd" >&5
11325 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11326   echo $ac_n "(cached) $ac_c" 1>&6
11327 else
11328   
11329         cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 #include <pwd.h>
11333 int main() {
11334
11335         struct passwd pwd;
11336         pwd.pw_passwd = pwd.pw_name;
11337
11338 ; return 0; }
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11341   rm -rf conftest*
11342   ol_cv_struct_passwd_pw_passwd=yes
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -rf conftest*
11347   ol_cv_struct_passwd_pw_passwd=no
11348 fi
11349 rm -f conftest*
11350 fi
11351
11352 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11353 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11354         cat >> confdefs.h <<\EOF
11355 #define HAVE_PW_PASSWD 1
11356 EOF
11357
11358 fi
11359
11360
11361 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11362 echo "configure:11363: checking if toupper() requires islower()" >&5
11363 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11364   echo $ac_n "(cached) $ac_c" 1>&6
11365 else
11366   
11367         if test "$cross_compiling" = yes; then
11368   ol_cv_c_upper_lower=safe
11369 else
11370   cat > conftest.$ac_ext <<EOF
11371 #line 11372 "configure"
11372 #include "confdefs.h"
11373
11374 #include <ctype.h>
11375 main()
11376 {
11377         if ('C' == toupper('C'))
11378                 exit(0);
11379         else
11380                 exit(1);
11381 }
11382 EOF
11383 if { (eval echo configure:11384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11384 then
11385   ol_cv_c_upper_lower=no
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -fr conftest*
11390   ol_cv_c_upper_lower=yes
11391 fi
11392 rm -fr conftest*
11393 fi
11394
11395 fi
11396
11397 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11398 if test $ol_cv_c_upper_lower != no ; then
11399         cat >> confdefs.h <<\EOF
11400 #define C_UPPER_LOWER 1
11401 EOF
11402
11403 fi
11404
11405 echo $ac_n "checking for working const""... $ac_c" 1>&6
11406 echo "configure:11407: checking for working const" >&5
11407 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11408   echo $ac_n "(cached) $ac_c" 1>&6
11409 else
11410   cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413
11414 int main() {
11415
11416 /* Ultrix mips cc rejects this.  */
11417 typedef int charset[2]; const charset x;
11418 /* SunOS 4.1.1 cc rejects this.  */
11419 char const *const *ccp;
11420 char **p;
11421 /* NEC SVR4.0.2 mips cc rejects this.  */
11422 struct point {int x, y;};
11423 static struct point const zero = {0,0};
11424 /* AIX XL C 1.02.0.0 rejects this.
11425    It does not let you subtract one const X* pointer from another in an arm
11426    of an if-expression whose if-part is not a constant expression */
11427 const char *g = "string";
11428 ccp = &g + (g ? g-g : 0);
11429 /* HPUX 7.0 cc rejects these. */
11430 ++ccp;
11431 p = (char**) ccp;
11432 ccp = (char const *const *) p;
11433 { /* SCO 3.2v4 cc rejects this.  */
11434   char *t;
11435   char const *s = 0 ? (char *) 0 : (char const *) 0;
11436
11437   *t++ = 0;
11438 }
11439 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11440   int x[] = {25, 17};
11441   const int *foo = &x[0];
11442   ++foo;
11443 }
11444 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11445   typedef const int *iptr;
11446   iptr p = 0;
11447   ++p;
11448 }
11449 { /* AIX XL C 1.02.0.0 rejects this saying
11450      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11451   struct s { int j; const int *ap[3]; };
11452   struct s *b; b->j = 5;
11453 }
11454 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11455   const int foo = 10;
11456 }
11457
11458 ; return 0; }
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11461   rm -rf conftest*
11462   ac_cv_c_const=yes
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   ac_cv_c_const=no
11468 fi
11469 rm -f conftest*
11470 fi
11471
11472 echo "$ac_t""$ac_cv_c_const" 1>&6
11473 if test $ac_cv_c_const = no; then
11474   cat >> confdefs.h <<\EOF
11475 #define const 
11476 EOF
11477
11478 fi
11479
11480 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11481 echo "configure:11482: checking if compiler understands volatile" >&5
11482 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11483   echo $ac_n "(cached) $ac_c" 1>&6
11484 else
11485   cat > conftest.$ac_ext <<EOF
11486 #line 11487 "configure"
11487 #include "confdefs.h"
11488 int x, y, z;
11489 int main() {
11490 volatile int a; int * volatile b = x ? &y : &z;
11491       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11492       *b = 0;
11493 ; return 0; }
11494 EOF
11495 if { (eval echo configure:11496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11496   rm -rf conftest*
11497   ol_cv_c_volatile=yes
11498 else
11499   echo "configure: failed program was:" >&5
11500   cat conftest.$ac_ext >&5
11501   rm -rf conftest*
11502   ol_cv_c_volatile=no
11503 fi
11504 rm -f conftest*
11505 fi
11506
11507 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11508   if test $ol_cv_c_volatile = yes; then
11509     : 
11510   else
11511     cat >> confdefs.h <<\EOF
11512 #define volatile 
11513 EOF
11514
11515   fi
11516  
11517
11518 if test $cross_compiling = yes ; then
11519         cat >> confdefs.h <<\EOF
11520 #define CROSS_COMPILING 1
11521 EOF
11522
11523
11524         cat >> confdefs.h <<\EOF
11525 #define LBER_INT_T long
11526 EOF
11527
11528         cat >> confdefs.h <<\EOF
11529 #define LBER_TAG_T long
11530 EOF
11531
11532         cat >> confdefs.h <<\EOF
11533 #define LBER_SOCKET_T int
11534 EOF
11535
11536
11537 else
11538         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11539 echo "configure:11540: checking whether byte ordering is bigendian" >&5
11540 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   ac_cv_c_bigendian=unknown
11544 # See if sys/param.h defines the BYTE_ORDER macro.
11545 cat > conftest.$ac_ext <<EOF
11546 #line 11547 "configure"
11547 #include "confdefs.h"
11548 #include <sys/types.h>
11549 #include <sys/param.h>
11550 int main() {
11551
11552 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11553  bogus endian macros
11554 #endif
11555 ; return 0; }
11556 EOF
11557 if { (eval echo configure:11558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11558   rm -rf conftest*
11559   # It does; now see whether it defined to BIG_ENDIAN or not.
11560 cat > conftest.$ac_ext <<EOF
11561 #line 11562 "configure"
11562 #include "confdefs.h"
11563 #include <sys/types.h>
11564 #include <sys/param.h>
11565 int main() {
11566
11567 #if BYTE_ORDER != BIG_ENDIAN
11568  not big endian
11569 #endif
11570 ; return 0; }
11571 EOF
11572 if { (eval echo configure:11573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11573   rm -rf conftest*
11574   ac_cv_c_bigendian=yes
11575 else
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   ac_cv_c_bigendian=no
11580 fi
11581 rm -f conftest*
11582 else
11583   echo "configure: failed program was:" >&5
11584   cat conftest.$ac_ext >&5
11585 fi
11586 rm -f conftest*
11587 if test $ac_cv_c_bigendian = unknown; then
11588 if test "$cross_compiling" = yes; then
11589     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11590 else
11591   cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594 main () {
11595   /* Are we little or big endian?  From Harbison&Steele.  */
11596   union
11597   {
11598     long l;
11599     char c[sizeof (long)];
11600   } u;
11601   u.l = 1;
11602   exit (u.c[sizeof (long) - 1] == 1);
11603 }
11604 EOF
11605 if { (eval echo configure:11606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11606 then
11607   ac_cv_c_bigendian=no
11608 else
11609   echo "configure: failed program was:" >&5
11610   cat conftest.$ac_ext >&5
11611   rm -fr conftest*
11612   ac_cv_c_bigendian=yes
11613 fi
11614 rm -fr conftest*
11615 fi
11616
11617 fi
11618 fi
11619
11620 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11621 if test $ac_cv_c_bigendian = yes; then
11622   cat >> confdefs.h <<\EOF
11623 #define WORDS_BIGENDIAN 1
11624 EOF
11625
11626 fi
11627
11628         echo $ac_n "checking size of short""... $ac_c" 1>&6
11629 echo "configure:11630: checking size of short" >&5
11630 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11631   echo $ac_n "(cached) $ac_c" 1>&6
11632 else
11633   if test "$cross_compiling" = yes; then
11634     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11635 else
11636   cat > conftest.$ac_ext <<EOF
11637 #line 11638 "configure"
11638 #include "confdefs.h"
11639 #include <stdio.h>
11640 main()
11641 {
11642   FILE *f=fopen("conftestval", "w");
11643   if (!f) exit(1);
11644   fprintf(f, "%d\n", sizeof(short));
11645   exit(0);
11646 }
11647 EOF
11648 if { (eval echo configure:11649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11649 then
11650   ac_cv_sizeof_short=`cat conftestval`
11651 else
11652   echo "configure: failed program was:" >&5
11653   cat conftest.$ac_ext >&5
11654   rm -fr conftest*
11655   ac_cv_sizeof_short=0
11656 fi
11657 rm -fr conftest*
11658 fi
11659
11660 fi
11661 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11662 cat >> confdefs.h <<EOF
11663 #define SIZEOF_SHORT $ac_cv_sizeof_short
11664 EOF
11665
11666  
11667         echo $ac_n "checking size of int""... $ac_c" 1>&6
11668 echo "configure:11669: checking size of int" >&5
11669 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11670   echo $ac_n "(cached) $ac_c" 1>&6
11671 else
11672   if test "$cross_compiling" = yes; then
11673     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11674 else
11675   cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 #include <stdio.h>
11679 main()
11680 {
11681   FILE *f=fopen("conftestval", "w");
11682   if (!f) exit(1);
11683   fprintf(f, "%d\n", sizeof(int));
11684   exit(0);
11685 }
11686 EOF
11687 if { (eval echo configure:11688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11688 then
11689   ac_cv_sizeof_int=`cat conftestval`
11690 else
11691   echo "configure: failed program was:" >&5
11692   cat conftest.$ac_ext >&5
11693   rm -fr conftest*
11694   ac_cv_sizeof_int=0
11695 fi
11696 rm -fr conftest*
11697 fi
11698
11699 fi
11700 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11701 cat >> confdefs.h <<EOF
11702 #define SIZEOF_INT $ac_cv_sizeof_int
11703 EOF
11704
11705  
11706         echo $ac_n "checking size of long""... $ac_c" 1>&6
11707 echo "configure:11708: checking size of long" >&5
11708 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   if test "$cross_compiling" = yes; then
11712     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11713 else
11714   cat > conftest.$ac_ext <<EOF
11715 #line 11716 "configure"
11716 #include "confdefs.h"
11717 #include <stdio.h>
11718 main()
11719 {
11720   FILE *f=fopen("conftestval", "w");
11721   if (!f) exit(1);
11722   fprintf(f, "%d\n", sizeof(long));
11723   exit(0);
11724 }
11725 EOF
11726 if { (eval echo configure:11727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11727 then
11728   ac_cv_sizeof_long=`cat conftestval`
11729 else
11730   echo "configure: failed program was:" >&5
11731   cat conftest.$ac_ext >&5
11732   rm -fr conftest*
11733   ac_cv_sizeof_long=0
11734 fi
11735 rm -fr conftest*
11736 fi
11737
11738 fi
11739 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11740 cat >> confdefs.h <<EOF
11741 #define SIZEOF_LONG $ac_cv_sizeof_long
11742 EOF
11743
11744
11745
11746         if test "$ac_cv_sizeof_int" -lt 4 ; then
11747                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11748
11749                 cat >> confdefs.h <<\EOF
11750 #define LBER_INT_T long
11751 EOF
11752
11753                 cat >> confdefs.h <<\EOF
11754 #define LBER_TAG_T long
11755 EOF
11756
11757                 cat >> confdefs.h <<\EOF
11758 #define LBER_SOCKET_T int
11759 EOF
11760
11761         else
11762                 cat >> confdefs.h <<\EOF
11763 #define LBER_INT_T int
11764 EOF
11765
11766                 cat >> confdefs.h <<\EOF
11767 #define LBER_TAG_T long
11768 EOF
11769
11770                 cat >> confdefs.h <<\EOF
11771 #define LBER_SOCKET_T int
11772 EOF
11773
11774         fi
11775 fi
11776
11777 cat >> confdefs.h <<\EOF
11778 #define LBER_LEN_T long
11779 EOF
11780
11781
11782 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11783 echo "configure:11784: checking for 8-bit clean memcmp" >&5
11784 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11785   echo $ac_n "(cached) $ac_c" 1>&6
11786 else
11787   if test "$cross_compiling" = yes; then
11788   ac_cv_func_memcmp_clean=no
11789 else
11790   cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793
11794 main()
11795 {
11796   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11797   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11798 }
11799
11800 EOF
11801 if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11802 then
11803   ac_cv_func_memcmp_clean=yes
11804 else
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -fr conftest*
11808   ac_cv_func_memcmp_clean=no
11809 fi
11810 rm -fr conftest*
11811 fi
11812
11813 fi
11814
11815 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11816 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11817
11818 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11819 echo "configure:11820: checking for strftime" >&5
11820 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
11821   echo $ac_n "(cached) $ac_c" 1>&6
11822 else
11823   cat > conftest.$ac_ext <<EOF
11824 #line 11825 "configure"
11825 #include "confdefs.h"
11826 /* System header to define __stub macros and hopefully few prototypes,
11827     which can conflict with char strftime(); below.  */
11828 #include <assert.h>
11829 /* Override any gcc2 internal prototype to avoid an error.  */
11830 /* We use char because int might match the return type of a gcc2
11831     builtin and then its argument prototype would still apply.  */
11832 char strftime();
11833 char (*f)();
11834
11835 int main() {
11836
11837 /* The GNU C library defines this for functions which it implements
11838     to always fail with ENOSYS.  Some functions are actually named
11839     something starting with __ and the normal name is an alias.  */
11840 #if defined (__stub_strftime) || defined (__stub___strftime)
11841 choke me
11842 #else
11843 f = strftime;
11844 #endif
11845
11846 ; return 0; }
11847 EOF
11848 if { (eval echo configure:11849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11849   rm -rf conftest*
11850   eval "ac_cv_func_strftime=yes"
11851 else
11852   echo "configure: failed program was:" >&5
11853   cat conftest.$ac_ext >&5
11854   rm -rf conftest*
11855   eval "ac_cv_func_strftime=no"
11856 fi
11857 rm -f conftest*
11858 fi
11859
11860 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11861   echo "$ac_t""yes" 1>&6
11862   cat >> confdefs.h <<\EOF
11863 #define HAVE_STRFTIME 1
11864 EOF
11865
11866 else
11867   echo "$ac_t""no" 1>&6
11868 # strftime is in -lintl on SCO UNIX.
11869 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11870 echo "configure:11871: checking for strftime in -lintl" >&5
11871 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
11872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11873   echo $ac_n "(cached) $ac_c" 1>&6
11874 else
11875   ac_save_LIBS="$LIBS"
11876 LIBS="-lintl  $LIBS"
11877 cat > conftest.$ac_ext <<EOF
11878 #line 11879 "configure"
11879 #include "confdefs.h"
11880 /* Override any gcc2 internal prototype to avoid an error.  */
11881 /* We use char because int might match the return type of a gcc2
11882     builtin and then its argument prototype would still apply.  */
11883 char strftime();
11884
11885 int main() {
11886 strftime()
11887 ; return 0; }
11888 EOF
11889 if { (eval echo configure:11890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11890   rm -rf conftest*
11891   eval "ac_cv_lib_$ac_lib_var=yes"
11892 else
11893   echo "configure: failed program was:" >&5
11894   cat conftest.$ac_ext >&5
11895   rm -rf conftest*
11896   eval "ac_cv_lib_$ac_lib_var=no"
11897 fi
11898 rm -f conftest*
11899 LIBS="$ac_save_LIBS"
11900
11901 fi
11902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11903   echo "$ac_t""yes" 1>&6
11904   cat >> confdefs.h <<\EOF
11905 #define HAVE_STRFTIME 1
11906 EOF
11907
11908 LIBS="-lintl $LIBS"
11909 else
11910   echo "$ac_t""no" 1>&6
11911 fi
11912
11913 fi
11914
11915
11916 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11917 echo "configure:11918: checking for vprintf" >&5
11918 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
11919   echo $ac_n "(cached) $ac_c" 1>&6
11920 else
11921   cat > conftest.$ac_ext <<EOF
11922 #line 11923 "configure"
11923 #include "confdefs.h"
11924 /* System header to define __stub macros and hopefully few prototypes,
11925     which can conflict with char vprintf(); below.  */
11926 #include <assert.h>
11927 /* Override any gcc2 internal prototype to avoid an error.  */
11928 /* We use char because int might match the return type of a gcc2
11929     builtin and then its argument prototype would still apply.  */
11930 char vprintf();
11931 char (*f)();
11932
11933 int main() {
11934
11935 /* The GNU C library defines this for functions which it implements
11936     to always fail with ENOSYS.  Some functions are actually named
11937     something starting with __ and the normal name is an alias.  */
11938 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11939 choke me
11940 #else
11941 f = vprintf;
11942 #endif
11943
11944 ; return 0; }
11945 EOF
11946 if { (eval echo configure:11947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11947   rm -rf conftest*
11948   eval "ac_cv_func_vprintf=yes"
11949 else
11950   echo "configure: failed program was:" >&5
11951   cat conftest.$ac_ext >&5
11952   rm -rf conftest*
11953   eval "ac_cv_func_vprintf=no"
11954 fi
11955 rm -f conftest*
11956 fi
11957
11958 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11959   echo "$ac_t""yes" 1>&6
11960   cat >> confdefs.h <<\EOF
11961 #define HAVE_VPRINTF 1
11962 EOF
11963
11964 else
11965   echo "$ac_t""no" 1>&6
11966 fi
11967
11968 if test "$ac_cv_func_vprintf" != yes; then
11969 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11970 echo "configure:11971: checking for _doprnt" >&5
11971 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
11972   echo $ac_n "(cached) $ac_c" 1>&6
11973 else
11974   cat > conftest.$ac_ext <<EOF
11975 #line 11976 "configure"
11976 #include "confdefs.h"
11977 /* System header to define __stub macros and hopefully few prototypes,
11978     which can conflict with char _doprnt(); below.  */
11979 #include <assert.h>
11980 /* Override any gcc2 internal prototype to avoid an error.  */
11981 /* We use char because int might match the return type of a gcc2
11982     builtin and then its argument prototype would still apply.  */
11983 char _doprnt();
11984 char (*f)();
11985
11986 int main() {
11987
11988 /* The GNU C library defines this for functions which it implements
11989     to always fail with ENOSYS.  Some functions are actually named
11990     something starting with __ and the normal name is an alias.  */
11991 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11992 choke me
11993 #else
11994 f = _doprnt;
11995 #endif
11996
11997 ; return 0; }
11998 EOF
11999 if { (eval echo configure:12000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12000   rm -rf conftest*
12001   eval "ac_cv_func__doprnt=yes"
12002 else
12003   echo "configure: failed program was:" >&5
12004   cat conftest.$ac_ext >&5
12005   rm -rf conftest*
12006   eval "ac_cv_func__doprnt=no"
12007 fi
12008 rm -f conftest*
12009 fi
12010
12011 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12012   echo "$ac_t""yes" 1>&6
12013   cat >> confdefs.h <<\EOF
12014 #define HAVE_DOPRNT 1
12015 EOF
12016
12017 else
12018   echo "$ac_t""no" 1>&6
12019 fi
12020
12021 fi
12022
12023
12024 if test $ac_cv_func_vprintf = yes ; then
12025                 for ac_func in vsnprintf vsprintf
12026 do
12027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12028 echo "configure:12029: checking for $ac_func" >&5
12029 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12030   echo $ac_n "(cached) $ac_c" 1>&6
12031 else
12032   cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035 /* System header to define __stub macros and hopefully few prototypes,
12036     which can conflict with char $ac_func(); below.  */
12037 #include <assert.h>
12038 /* Override any gcc2 internal prototype to avoid an error.  */
12039 /* We use char because int might match the return type of a gcc2
12040     builtin and then its argument prototype would still apply.  */
12041 char $ac_func();
12042 char (*f)();
12043
12044 int main() {
12045
12046 /* The GNU C library defines this for functions which it implements
12047     to always fail with ENOSYS.  Some functions are actually named
12048     something starting with __ and the normal name is an alias.  */
12049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12050 choke me
12051 #else
12052 f = $ac_func;
12053 #endif
12054
12055 ; return 0; }
12056 EOF
12057 if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12058   rm -rf conftest*
12059   eval "ac_cv_func_$ac_func=yes"
12060 else
12061   echo "configure: failed program was:" >&5
12062   cat conftest.$ac_ext >&5
12063   rm -rf conftest*
12064   eval "ac_cv_func_$ac_func=no"
12065 fi
12066 rm -f conftest*
12067 fi
12068
12069 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12070   echo "$ac_t""yes" 1>&6
12071     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12072   cat >> confdefs.h <<EOF
12073 #define $ac_tr_func 1
12074 EOF
12075  
12076 else
12077   echo "$ac_t""no" 1>&6
12078 fi
12079 done
12080
12081 fi
12082
12083 for ac_func in \
12084         bcopy                   \
12085         closesocket             \
12086         endgrent                \
12087         endpwent                \
12088         flock                   \
12089         getdtablesize   \
12090         getgrgid                \
12091         gethostname             \
12092         getpass                 \
12093         getpwuid                \
12094         getpwnam                \
12095         getspnam                \
12096         gettimeofday    \
12097         initgroups              \
12098         lockf                   \
12099         memcpy                  \
12100         memmove                 \
12101         mkstemp                 \
12102         read                    \
12103         recv                    \
12104         recvfrom                \
12105         setpwfile               \
12106         setgid                  \
12107         setegid                 \
12108         setsid                  \
12109         setuid                  \
12110         seteuid                 \
12111         signal                  \
12112         sigset                  \
12113         snprintf                \
12114         strdup                  \
12115         strerror                \
12116         strpbrk                 \
12117         strrchr                 \
12118         strsep                  \
12119         strstr                  \
12120         strtol                  \
12121         strtoul                 \
12122         strspn                  \
12123         sysconf                 \
12124         waitpid                 \
12125         wait4                   \
12126         write                   \
12127         send                    \
12128         sendto                  \
12129
12130 do
12131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12132 echo "configure:12133: checking for $ac_func" >&5
12133 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12134   echo $ac_n "(cached) $ac_c" 1>&6
12135 else
12136   cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139 /* System header to define __stub macros and hopefully few prototypes,
12140     which can conflict with char $ac_func(); below.  */
12141 #include <assert.h>
12142 /* Override any gcc2 internal prototype to avoid an error.  */
12143 /* We use char because int might match the return type of a gcc2
12144     builtin and then its argument prototype would still apply.  */
12145 char $ac_func();
12146 char (*f)();
12147
12148 int main() {
12149
12150 /* The GNU C library defines this for functions which it implements
12151     to always fail with ENOSYS.  Some functions are actually named
12152     something starting with __ and the normal name is an alias.  */
12153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12154 choke me
12155 #else
12156 f = $ac_func;
12157 #endif
12158
12159 ; return 0; }
12160 EOF
12161 if { (eval echo configure:12162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12162   rm -rf conftest*
12163   eval "ac_cv_func_$ac_func=yes"
12164 else
12165   echo "configure: failed program was:" >&5
12166   cat conftest.$ac_ext >&5
12167   rm -rf conftest*
12168   eval "ac_cv_func_$ac_func=no"
12169 fi
12170 rm -f conftest*
12171 fi
12172
12173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12174   echo "$ac_t""yes" 1>&6
12175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12176   cat >> confdefs.h <<EOF
12177 #define $ac_tr_func 1
12178 EOF
12179  
12180 else
12181   echo "$ac_t""no" 1>&6
12182 fi
12183 done
12184
12185
12186 for ac_func in getopt tempnam
12187 do
12188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12189 echo "configure:12190: checking for $ac_func" >&5
12190 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12191   echo $ac_n "(cached) $ac_c" 1>&6
12192 else
12193   cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196 /* System header to define __stub macros and hopefully few prototypes,
12197     which can conflict with char $ac_func(); below.  */
12198 #include <assert.h>
12199 /* Override any gcc2 internal prototype to avoid an error.  */
12200 /* We use char because int might match the return type of a gcc2
12201     builtin and then its argument prototype would still apply.  */
12202 char $ac_func();
12203 char (*f)();
12204
12205 int main() {
12206
12207 /* The GNU C library defines this for functions which it implements
12208     to always fail with ENOSYS.  Some functions are actually named
12209     something starting with __ and the normal name is an alias.  */
12210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12211 choke me
12212 #else
12213 f = $ac_func;
12214 #endif
12215
12216 ; return 0; }
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12219   rm -rf conftest*
12220   eval "ac_cv_func_$ac_func=yes"
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -rf conftest*
12225   eval "ac_cv_func_$ac_func=no"
12226 fi
12227 rm -f conftest*
12228 fi
12229
12230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12231   echo "$ac_t""yes" 1>&6
12232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12233   cat >> confdefs.h <<EOF
12234 #define $ac_tr_func 1
12235 EOF
12236  
12237 else
12238   echo "$ac_t""no" 1>&6
12239 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12240 fi
12241 done
12242
12243
12244
12245 # Check Configuration
12246 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12247 echo "configure:12248: checking declaration of sys_errlist" >&5
12248 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12249   echo $ac_n "(cached) $ac_c" 1>&6
12250 else
12251   
12252         cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255
12256 #include <stdio.h>
12257 #include <sys/types.h>
12258 #include <errno.h> 
12259 int main() {
12260 char *c = (char *) *sys_errlist
12261 ; return 0; }
12262 EOF
12263 if { (eval echo configure:12264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12264   rm -rf conftest*
12265   ol_cv_dcl_sys_errlist=yes
12266         ol_cv_have_sys_errlist=yes
12267 else
12268   echo "configure: failed program was:" >&5
12269   cat conftest.$ac_ext >&5
12270   rm -rf conftest*
12271   ol_cv_dcl_sys_errlist=no
12272 fi
12273 rm -f conftest*
12274 fi
12275
12276 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12277 #
12278 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12279 if test $ol_cv_dcl_sys_errlist = no ; then
12280         cat >> confdefs.h <<\EOF
12281 #define DECL_SYS_ERRLIST 1
12282 EOF
12283
12284
12285         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12286 echo "configure:12287: checking existence of sys_errlist" >&5
12287 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12288   echo $ac_n "(cached) $ac_c" 1>&6
12289 else
12290   
12291                 cat > conftest.$ac_ext <<EOF
12292 #line 12293 "configure"
12293 #include "confdefs.h"
12294 #include <errno.h>
12295 int main() {
12296 char *c = (char *) *sys_errlist
12297 ; return 0; }
12298 EOF
12299 if { (eval echo configure:12300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12300   rm -rf conftest*
12301   ol_cv_have_sys_errlist=yes
12302 else
12303   echo "configure: failed program was:" >&5
12304   cat conftest.$ac_ext >&5
12305   rm -rf conftest*
12306   ol_cv_have_sys_errlist=no
12307 fi
12308 rm -f conftest*
12309 fi
12310
12311 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12312 fi
12313 if test $ol_cv_have_sys_errlist = yes ; then
12314         cat >> confdefs.h <<\EOF
12315 #define HAVE_SYS_ERRLIST 1
12316 EOF
12317
12318 fi
12319
12320
12321
12322 if test "$ol_enable_debug" != no ; then
12323         cat >> confdefs.h <<\EOF
12324 #define LDAP_DEBUG 1
12325 EOF
12326
12327 fi
12328 if test "$ol_enable_syslog" = yes ; then
12329         cat >> confdefs.h <<\EOF
12330 #define LDAP_SYSLOG 1
12331 EOF
12332
12333 fi
12334 if test "$ol_enable_libui" = yes ; then
12335         cat >> confdefs.h <<\EOF
12336 #define LDAP_LIBUI 1
12337 EOF
12338
12339 fi
12340 if test "$ol_enable_cache" = no ; then
12341         cat >> confdefs.h <<\EOF
12342 #define LDAP_NOCACHE 1
12343 EOF
12344
12345 fi
12346 if test "$ol_enable_dns" != no ; then
12347         cat >> confdefs.h <<\EOF
12348 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12349 EOF
12350
12351 fi
12352 if test "$ol_enable_proctitle" != no ; then
12353         cat >> confdefs.h <<\EOF
12354 #define LDAP_PROCTITLE 1
12355 EOF
12356
12357 fi
12358 if test "$ol_enable_referrals" != no ; then
12359         cat >> confdefs.h <<\EOF
12360 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12361 EOF
12362
12363 fi
12364 if test "$ol_enable_cldap" != no ; then
12365         cat >> confdefs.h <<\EOF
12366 #define LDAP_CONNECTIONLESS 1
12367 EOF
12368
12369 fi
12370
12371 if test "$ol_enable_crypt" != no ; then
12372         cat >> confdefs.h <<\EOF
12373 #define SLAPD_CRYPT 1
12374 EOF
12375
12376 fi
12377 if test "$ol_enable_cleartext" != no ; then
12378         cat >> confdefs.h <<\EOF
12379 #define SLAPD_CLEARTEXT 1
12380 EOF
12381
12382 fi
12383 if test "$ol_enable_phonetic" != no ; then
12384         cat >> confdefs.h <<\EOF
12385 #define SLAPD_PHONETIC 1
12386 EOF
12387
12388 fi
12389 if test "$ol_enable_rlookups" != no ; then
12390         cat >> confdefs.h <<\EOF
12391 #define SLAPD_RLOOKUPS 1
12392 EOF
12393
12394 fi
12395
12396 if test "$ol_link_modules" != no ; then
12397         cat >> confdefs.h <<\EOF
12398 #define SLAPD_MODULES 1
12399 EOF
12400
12401         BUILD_SLAPD=yes
12402 fi
12403
12404 if test "$ol_link_bdb2" != no ; then
12405         cat >> confdefs.h <<\EOF
12406 #define SLAPD_BDB2 1
12407 EOF
12408
12409         BUILD_SLAPD=yes
12410         BUILD_BDB2=yes
12411         if test "$ol_with_bdb2_module" != static ; then
12412                 cat >> confdefs.h <<\EOF
12413 #define SLAPD_BDB2_DYNAMIC 1
12414 EOF
12415
12416                 BUILD_BDB2_DYNAMIC=yes
12417         fi
12418 fi
12419
12420 if test "$ol_enable_ldap" != no ; then
12421         cat >> confdefs.h <<\EOF
12422 #define SLAPD_LDAP 1
12423 EOF
12424
12425         BUILD_SLAPD=yes
12426         BUILD_LDAP=yes
12427         if test "$ol_with_ldap_module" != static ; then
12428                 cat >> confdefs.h <<\EOF
12429 #define SLAPD_LDAP_DYNAMIC 1
12430 EOF
12431
12432                 BUILD_LDAP_DYNAMIC=yes
12433         fi
12434 fi
12435
12436 if test "$ol_link_ldbm" != no ; then
12437         cat >> confdefs.h <<\EOF
12438 #define SLAPD_LDBM 1
12439 EOF
12440
12441         BUILD_SLAPD=yes
12442         BUILD_LDBM=yes
12443         if test "$ol_with_ldbm_module" != static ; then
12444                 cat >> confdefs.h <<\EOF
12445 #define SLAPD_LDBM_DYNAMIC 1
12446 EOF
12447
12448                 BUILD_LDBM_DYNAMIC=yes
12449         fi
12450 fi
12451
12452 if test "$ol_enable_passwd" != no ; then
12453         cat >> confdefs.h <<\EOF
12454 #define SLAPD_PASSWD 1
12455 EOF
12456
12457         BUILD_SLAPD=yes
12458         BUILD_PASSWD=yes
12459         if test "$ol_with_passwd_module" != static ; then
12460                 cat >> confdefs.h <<\EOF
12461 #define SLAPD_PASSWD_DYNAMIC 1
12462 EOF
12463
12464                 BUILD_PASSWD_DYNAMIC=yes
12465         fi
12466 fi
12467
12468 if test "$ol_link_perl" != no ; then
12469         cat >> confdefs.h <<\EOF
12470 #define SLAPD_PERL 1
12471 EOF
12472
12473         BUILD_SLAPD=yes
12474         BUILD_PERL=yes
12475         if test "$ol_with_perl_module" != static ; then
12476                 cat >> confdefs.h <<\EOF
12477 #define SLAPD_PERL_DYNAMIC 1
12478 EOF
12479
12480                 BUILD_PERL_DYNAMIC=yes
12481         fi
12482 fi
12483
12484 if test "$ol_enable_shell" != no ; then
12485         cat >> confdefs.h <<\EOF
12486 #define SLAPD_SHELL 1
12487 EOF
12488
12489         BUILD_SLAPD=yes
12490         BUILD_SHELL=yes
12491         if test "$ol_with_shell_module" != static ; then
12492                 cat >> confdefs.h <<\EOF
12493 #define SLAPD_SHELL_DYNAMIC 1
12494 EOF
12495
12496                 BUILD_SHELL_DYNAMIC=yes
12497         fi
12498 fi
12499
12500 if test "$ol_enable_tcl" != no ; then
12501         cat >> confdefs.h <<\EOF
12502 #define SLAPD_TCL 1
12503 EOF
12504
12505         BUILD_SLAPD=yes
12506         BUILD_TCL=yes
12507         if test "$ol_with_tcl_module" != static; then
12508                 cat >> confdefs.h <<\EOF
12509 #define SLAPD_TCL_DYNAMIC 1
12510 EOF
12511
12512                 BUILD_TCL_DYNAMIC=yes
12513         fi
12514 fi
12515
12516 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12517         $BUILD_SLAPD = yes ; then
12518         BUILD_SLURPD=yes
12519 fi
12520
12521 if test "$ol_link_isode" != no ; then
12522         BUILD_LDAPD=yes
12523 fi
12524
12525
12526
12527
12528   
12529   
12530   
12531   
12532   
12533   
12534   
12535   
12536   
12537   
12538   
12539   
12540   
12541   
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564 trap '' 1 2 15
12565
12566 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12567
12568 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12569 # Let make expand exec_prefix.
12570 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12571
12572 # Any assignment to VPATH causes Sun make to only execute
12573 # the first set of double-colon rules, so remove it if not needed.
12574 # If there is a colon in the path, we need to keep it.
12575 if test "x$srcdir" = x.; then
12576   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12577 fi
12578
12579 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12580
12581 DEFS=-DHAVE_CONFIG_H
12582
12583 # Without the "./", some shells look in PATH for config.status.
12584 : ${CONFIG_STATUS=./config.status}
12585
12586 echo creating $CONFIG_STATUS
12587 rm -f $CONFIG_STATUS
12588 cat > $CONFIG_STATUS <<EOF
12589 #! /bin/sh
12590 # Generated automatically by configure.
12591 # Run this file to recreate the current configuration.
12592 # This directory was configured as follows,
12593 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12594 #
12595 # $0 $ac_configure_args
12596 #
12597 # Compiler output produced by configure, useful for debugging
12598 # configure, is in ./config.log if it exists.
12599
12600 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12601 for ac_option
12602 do
12603   case "\$ac_option" in
12604   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12605     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12606     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12607   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12608     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12609     exit 0 ;;
12610   -help | --help | --hel | --he | --h)
12611     echo "\$ac_cs_usage"; exit 0 ;;
12612   *) echo "\$ac_cs_usage"; exit 1 ;;
12613   esac
12614 done
12615
12616 ac_given_srcdir=$srcdir
12617 ac_given_INSTALL="$INSTALL"
12618
12619 trap 'rm -fr `echo "\
12620 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12621 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12622 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12623 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12624 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12625 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12626 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12627 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12628 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12629 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12630 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12631 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12632 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12633 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12634 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12635 include/Makefile:build/top.mk:include/Makefile.in \
12636 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12637 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12638 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12639 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12640 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12641 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12642 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12643 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12644 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12645 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12646 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12647 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12648 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12649 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12650 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12651 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12652 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12653 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12654 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12655 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12656 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12657 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12658 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12659 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12660 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12661 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12662  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12663 EOF
12664 cat >> $CONFIG_STATUS <<EOF
12665
12666 # Protect against being on the right side of a sed subst in config.status.
12667 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12668  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12669 $ac_vpsub
12670 $extrasub
12671 s%@SHELL@%$SHELL%g
12672 s%@CFLAGS@%$CFLAGS%g
12673 s%@CPPFLAGS@%$CPPFLAGS%g
12674 s%@CXXFLAGS@%$CXXFLAGS%g
12675 s%@FFLAGS@%$FFLAGS%g
12676 s%@DEFS@%$DEFS%g
12677 s%@LDFLAGS@%$LDFLAGS%g
12678 s%@LIBS@%$LIBS%g
12679 s%@exec_prefix@%$exec_prefix%g
12680 s%@prefix@%$prefix%g
12681 s%@program_transform_name@%$program_transform_name%g
12682 s%@bindir@%$bindir%g
12683 s%@sbindir@%$sbindir%g
12684 s%@libexecdir@%$libexecdir%g
12685 s%@datadir@%$datadir%g
12686 s%@sysconfdir@%$sysconfdir%g
12687 s%@sharedstatedir@%$sharedstatedir%g
12688 s%@localstatedir@%$localstatedir%g
12689 s%@libdir@%$libdir%g
12690 s%@includedir@%$includedir%g
12691 s%@oldincludedir@%$oldincludedir%g
12692 s%@infodir@%$infodir%g
12693 s%@mandir@%$mandir%g
12694 s%@host@%$host%g
12695 s%@host_alias@%$host_alias%g
12696 s%@host_cpu@%$host_cpu%g
12697 s%@host_vendor@%$host_vendor%g
12698 s%@host_os@%$host_os%g
12699 s%@target@%$target%g
12700 s%@target_alias@%$target_alias%g
12701 s%@target_cpu@%$target_cpu%g
12702 s%@target_vendor@%$target_vendor%g
12703 s%@target_os@%$target_os%g
12704 s%@build@%$build%g
12705 s%@build_alias@%$build_alias%g
12706 s%@build_cpu@%$build_cpu%g
12707 s%@build_vendor@%$build_vendor%g
12708 s%@build_os@%$build_os%g
12709 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12710 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12711 s%@INSTALL_DATA@%$INSTALL_DATA%g
12712 s%@PACKAGE@%$PACKAGE%g
12713 s%@VERSION@%$VERSION%g
12714 s%@ACLOCAL@%$ACLOCAL%g
12715 s%@AUTOCONF@%$AUTOCONF%g
12716 s%@AUTOMAKE@%$AUTOMAKE%g
12717 s%@AUTOHEADER@%$AUTOHEADER%g
12718 s%@MAKEINFO@%$MAKEINFO%g
12719 s%@install_sh@%$install_sh%g
12720 s%@AMTAR@%$AMTAR%g
12721 s%@AWK@%$AWK%g
12722 s%@AMTARFLAGS@%$AMTARFLAGS%g
12723 s%@SET_MAKE@%$SET_MAKE%g
12724 s%@top_builddir@%$top_builddir%g
12725 s%@ldap_subdir@%$ldap_subdir%g
12726 s%@CC@%$CC%g
12727 s%@RANLIB@%$RANLIB%g
12728 s%@LD@%$LD%g
12729 s%@NM@%$NM%g
12730 s%@LN_S@%$LN_S%g
12731 s%@LIBTOOL@%$LIBTOOL%g
12732 s%@LN_H@%$LN_H%g
12733 s%@SENDMAIL@%$SENDMAIL%g
12734 s%@EDITOR@%$EDITOR%g
12735 s%@FINGER@%$FINGER%g
12736 s%@GLIBCONFIG@%$GLIBCONFIG%g
12737 s%@PERLBIN@%$PERLBIN%g
12738 s%@CPP@%$CPP%g
12739 s%@EXEEXT@%$EXEEXT%g
12740 s%@OBJEXT@%$OBJEXT%g
12741 s%@OL_MKDEP@%$OL_MKDEP%g
12742 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12743 s%@PEPSY@%$PEPSY%g
12744 s%@LIBOBJS@%$LIBOBJS%g
12745 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12746 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12747 s%@BUILD_BDB2@%$BUILD_BDB2%g
12748 s%@BUILD_LDAP@%$BUILD_LDAP%g
12749 s%@BUILD_LDBM@%$BUILD_LDBM%g
12750 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12751 s%@BUILD_PERL@%$BUILD_PERL%g
12752 s%@BUILD_SHELL@%$BUILD_SHELL%g
12753 s%@BUILD_TCL@%$BUILD_TCL%g
12754 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12755 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12756 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12757 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12758 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12759 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12760 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12761 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12762 s%@LDAP_LIBS@%$LDAP_LIBS%g
12763 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12764 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12765 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12766 s%@LDBM_LIBS@%$LDBM_LIBS%g
12767 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12768 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12769 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12770 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12771 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12772 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12773 s%@KRB_LIBS@%$KRB_LIBS%g
12774 s%@READLINE_LIBS@%$READLINE_LIBS%g
12775 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12776 s%@TLS_LIBS@%$TLS_LIBS%g
12777
12778 CEOF
12779 EOF
12780
12781 cat >> $CONFIG_STATUS <<\EOF
12782
12783 # Split the substitutions into bite-sized pieces for seds with
12784 # small command number limits, like on Digital OSF/1 and HP-UX.
12785 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12786 ac_file=1 # Number of current file.
12787 ac_beg=1 # First line for current file.
12788 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12789 ac_more_lines=:
12790 ac_sed_cmds=""
12791 while $ac_more_lines; do
12792   if test $ac_beg -gt 1; then
12793     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12794   else
12795     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12796   fi
12797   if test ! -s conftest.s$ac_file; then
12798     ac_more_lines=false
12799     rm -f conftest.s$ac_file
12800   else
12801     if test -z "$ac_sed_cmds"; then
12802       ac_sed_cmds="sed -f conftest.s$ac_file"
12803     else
12804       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12805     fi
12806     ac_file=`expr $ac_file + 1`
12807     ac_beg=$ac_end
12808     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12809   fi
12810 done
12811 if test -z "$ac_sed_cmds"; then
12812   ac_sed_cmds=cat
12813 fi
12814 EOF
12815
12816 cat >> $CONFIG_STATUS <<EOF
12817
12818 CONFIG_FILES=\${CONFIG_FILES-"\
12819 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12820 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12821 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12822 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12823 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12824 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12825 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12826 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12827 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12828 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12829 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12830 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12831 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12832 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12833 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12834 include/Makefile:build/top.mk:include/Makefile.in \
12835 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12836 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12837 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12838 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12839 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12840 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12841 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12842 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12843 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12844 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12845 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12846 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12847 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12848 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12849 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12850 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12851 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12852 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12853 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12854 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12855 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12856 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12857 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12858 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12859 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12860 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12861 "}
12862 EOF
12863 cat >> $CONFIG_STATUS <<\EOF
12864 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12865   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12866   case "$ac_file" in
12867   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12868        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12869   *) ac_file_in="${ac_file}.in" ;;
12870   esac
12871
12872   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12873
12874   # Remove last slash and all that follows it.  Not all systems have dirname.
12875   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12876   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12877     # The file is in a subdirectory.
12878     test ! -d "$ac_dir" && mkdir "$ac_dir"
12879     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12880     # A "../" for each directory in $ac_dir_suffix.
12881     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12882   else
12883     ac_dir_suffix= ac_dots=
12884   fi
12885
12886   case "$ac_given_srcdir" in
12887   .)  srcdir=.
12888       if test -z "$ac_dots"; then top_srcdir=.
12889       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12890   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12891   *) # Relative path.
12892     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12893     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12894   esac
12895
12896   case "$ac_given_INSTALL" in
12897   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12898   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12899   esac
12900
12901   echo creating "$ac_file"
12902   rm -f "$ac_file"
12903   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12904   case "$ac_file" in
12905   *Makefile*) ac_comsub="1i\\
12906 # $configure_input" ;;
12907   *) ac_comsub= ;;
12908   esac
12909
12910   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12911   sed -e "$ac_comsub
12912 s%@configure_input@%$configure_input%g
12913 s%@srcdir@%$srcdir%g
12914 s%@top_srcdir@%$top_srcdir%g
12915 s%@INSTALL@%$INSTALL%g
12916 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12917 fi; done
12918 rm -f conftest.s*
12919
12920 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12921 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12922 #
12923 # ac_d sets the value in "#define NAME VALUE" lines.
12924 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12925 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12926 ac_dC='\3'
12927 ac_dD='%g'
12928 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12929 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12930 ac_uB='\([      ]\)%\1#\2define\3'
12931 ac_uC=' '
12932 ac_uD='\4%g'
12933 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12934 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12935 ac_eB='$%\1#\2define\3'
12936 ac_eC=' '
12937 ac_eD='%g'
12938
12939 if test "${CONFIG_HEADERS+set}" != set; then
12940 EOF
12941 cat >> $CONFIG_STATUS <<EOF
12942   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12943 EOF
12944 cat >> $CONFIG_STATUS <<\EOF
12945 fi
12946 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12947   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12948   case "$ac_file" in
12949   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12950        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12951   *) ac_file_in="${ac_file}.in" ;;
12952   esac
12953
12954   echo creating $ac_file
12955
12956   rm -f conftest.frag conftest.in conftest.out
12957   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12958   cat $ac_file_inputs > conftest.in
12959
12960 EOF
12961
12962 # Transform confdefs.h into a sed script conftest.vals that substitutes
12963 # the proper values into config.h.in to produce config.h.  And first:
12964 # Protect against being on the right side of a sed subst in config.status.
12965 # Protect against being in an unquoted here document in config.status.
12966 rm -f conftest.vals
12967 cat > conftest.hdr <<\EOF
12968 s/[\\&%]/\\&/g
12969 s%[\\$`]%\\&%g
12970 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12971 s%ac_d%ac_u%gp
12972 s%ac_u%ac_e%gp
12973 EOF
12974 sed -n -f conftest.hdr confdefs.h > conftest.vals
12975 rm -f conftest.hdr
12976
12977 # This sed command replaces #undef with comments.  This is necessary, for
12978 # example, in the case of _POSIX_SOURCE, which is predefined and required
12979 # on some systems where configure will not decide to define it.
12980 cat >> conftest.vals <<\EOF
12981 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12982 EOF
12983
12984 # Break up conftest.vals because some shells have a limit on
12985 # the size of here documents, and old seds have small limits too.
12986
12987 rm -f conftest.tail
12988 while :
12989 do
12990   ac_lines=`grep -c . conftest.vals`
12991   # grep -c gives empty output for an empty file on some AIX systems.
12992   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12993   # Write a limited-size here document to conftest.frag.
12994   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12995   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12996   echo 'CEOF
12997   sed -f conftest.frag conftest.in > conftest.out
12998   rm -f conftest.in
12999   mv conftest.out conftest.in
13000 ' >> $CONFIG_STATUS
13001   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13002   rm -f conftest.vals
13003   mv conftest.tail conftest.vals
13004 done
13005 rm -f conftest.vals
13006
13007 cat >> $CONFIG_STATUS <<\EOF
13008   rm -f conftest.frag conftest.h
13009   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13010   cat conftest.in >> conftest.h
13011   rm -f conftest.in
13012   if cmp -s $ac_file conftest.h 2>/dev/null; then
13013     echo "$ac_file is unchanged"
13014     rm -f conftest.h
13015   else
13016     # Remove last slash and all that follows it.  Not all systems have dirname.
13017       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13018       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13019       # The file is in a subdirectory.
13020       test ! -d "$ac_dir" && mkdir "$ac_dir"
13021     fi
13022     rm -f $ac_file
13023     mv conftest.h $ac_file
13024   fi
13025 fi; done
13026
13027 EOF
13028 cat >> $CONFIG_STATUS <<EOF
13029
13030 EOF
13031 cat >> $CONFIG_STATUS <<\EOF
13032
13033 date > stamp-h
13034 echo Please \"make depend\" to build dependencies
13035
13036 exit 0
13037 EOF
13038 chmod +x $CONFIG_STATUS
13039 rm -fr confdefs* $ac_clean_files
13040 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13041