]> git.sur5r.net Git - openldap/blob - configure
define SLAPD_RLOOKUPS since it looks like connection_init wont work without it
[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 Cygwin environment""... $ac_c" 1>&6
3354 echo "configure:3355: checking for Cygwin environment" >&5
3355 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358   cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361
3362 int main() {
3363
3364 #ifndef __CYGWIN__
3365 #define __CYGWIN__ __CYGWIN32__
3366 #endif
3367 return __CYGWIN__;
3368 ; return 0; }
3369 EOF
3370 if { (eval echo configure:3371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3371   rm -rf conftest*
3372   ac_cv_cygwin=yes
3373 else
3374   echo "configure: failed program was:" >&5
3375   cat conftest.$ac_ext >&5
3376   rm -rf conftest*
3377   ac_cv_cygwin=no
3378 fi
3379 rm -f conftest*
3380 fi
3381
3382 echo "$ac_t""$ac_cv_cygwin" 1>&6
3383 CYGWIN=
3384 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3385 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3386 echo "configure:3387: checking for mingw32 environment" >&5
3387 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3388   echo $ac_n "(cached) $ac_c" 1>&6
3389 else
3390   cat > conftest.$ac_ext <<EOF
3391 #line 3392 "configure"
3392 #include "confdefs.h"
3393
3394 int main() {
3395 return __MINGW32__;
3396 ; return 0; }
3397 EOF
3398 if { (eval echo configure:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3399   rm -rf conftest*
3400   ac_cv_mingw32=yes
3401 else
3402   echo "configure: failed program was:" >&5
3403   cat conftest.$ac_ext >&5
3404   rm -rf conftest*
3405   ac_cv_mingw32=no
3406 fi
3407 rm -f conftest*
3408 fi
3409
3410 echo "$ac_t""$ac_cv_mingw32" 1>&6
3411 MINGW32=
3412 test "$ac_cv_mingw32" = yes && MINGW32=yes
3413 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3414 echo "configure:3415: checking for EMX OS/2 environment" >&5
3415 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   cat > conftest.$ac_ext <<EOF
3419 #line 3420 "configure"
3420 #include "confdefs.h"
3421
3422 int main() {
3423 return __EMX__;
3424 ; return 0; }
3425 EOF
3426 if { (eval echo configure:3427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3427   rm -rf conftest*
3428   ac_cv_emxos2=yes
3429 else
3430   echo "configure: failed program was:" >&5
3431   cat conftest.$ac_ext >&5
3432   rm -rf conftest*
3433   ac_cv_emxos2=no
3434 fi
3435 rm -f conftest*
3436 fi
3437
3438 echo "$ac_t""$ac_cv_emxos2" 1>&6
3439 EMXOS2=
3440 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3441
3442
3443
3444 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3445 echo "configure:3446: checking for executable suffix" >&5
3446 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3450   ac_cv_exeext=.exe
3451 else
3452   rm -f conftest*
3453   echo 'int main () { return 0; }' > conftest.$ac_ext
3454   ac_cv_exeext=
3455   if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3456     for file in conftest.*; do
3457       case $file in
3458       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3459       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3460       esac
3461     done
3462   else
3463     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3464   fi
3465   rm -f conftest*
3466   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3467 fi
3468 fi
3469
3470 EXEEXT=""
3471 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3472 echo "$ac_t""${ac_cv_exeext}" 1>&6
3473 ac_exeext=$EXEEXT
3474
3475 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3476 echo "configure:3477: checking for object suffix" >&5
3477 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   rm -f conftest*
3481 echo 'int i = 1;' > conftest.$ac_ext
3482 if { (eval echo configure:3483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3483   for ac_file in conftest.*; do
3484     case $ac_file in
3485     *.c) ;;
3486     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3487     esac
3488   done
3489 else
3490   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3491 fi
3492 rm -f conftest*
3493 fi
3494
3495 echo "$ac_t""$ac_cv_objext" 1>&6
3496 OBJEXT=$ac_cv_objext
3497 ac_objext=$ac_cv_objext
3498
3499
3500 cat >> confdefs.h <<EOF
3501 #define EXEEXT "${EXEEXT}"
3502 EOF
3503
3504
3505 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3506 echo "configure:3507: checking for be_app in -lbe" >&5
3507 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3509   echo $ac_n "(cached) $ac_c" 1>&6
3510 else
3511   ac_save_LIBS="$LIBS"
3512 LIBS="-lbe -lroot -lnet $LIBS"
3513 cat > conftest.$ac_ext <<EOF
3514 #line 3515 "configure"
3515 #include "confdefs.h"
3516 /* Override any gcc2 internal prototype to avoid an error.  */
3517 /* We use char because int might match the return type of a gcc2
3518     builtin and then its argument prototype would still apply.  */
3519 char be_app();
3520
3521 int main() {
3522 be_app()
3523 ; return 0; }
3524 EOF
3525 if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3526   rm -rf conftest*
3527   eval "ac_cv_lib_$ac_lib_var=yes"
3528 else
3529   echo "configure: failed program was:" >&5
3530   cat conftest.$ac_ext >&5
3531   rm -rf conftest*
3532   eval "ac_cv_lib_$ac_lib_var=no"
3533 fi
3534 rm -f conftest*
3535 LIBS="$ac_save_LIBS"
3536
3537 fi
3538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3539   echo "$ac_t""yes" 1>&6
3540   LIBS="$LIBS -lbe -lroot -lnet"
3541 else
3542   echo "$ac_t""no" 1>&6
3543 :
3544 fi
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 if test $ol_enable_dns != no ; then
4046                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4047 echo "configure:4048: checking for res_search" >&5
4048 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 /* System header to define __stub macros and hopefully few prototypes,
4055     which can conflict with char res_search(); below.  */
4056 #include <assert.h>
4057 /* Override any gcc2 internal prototype to avoid an error.  */
4058 /* We use char because int might match the return type of a gcc2
4059     builtin and then its argument prototype would still apply.  */
4060 char res_search();
4061 char (*f)();
4062
4063 int main() {
4064
4065 /* The GNU C library defines this for functions which it implements
4066     to always fail with ENOSYS.  Some functions are actually named
4067     something starting with __ and the normal name is an alias.  */
4068 #if defined (__stub_res_search) || defined (__stub___res_search)
4069 choke me
4070 #else
4071 f = res_search;
4072 #endif
4073
4074 ; return 0; }
4075 EOF
4076 if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4077   rm -rf conftest*
4078   eval "ac_cv_func_res_search=yes"
4079 else
4080   echo "configure: failed program was:" >&5
4081   cat conftest.$ac_ext >&5
4082   rm -rf conftest*
4083   eval "ac_cv_func_res_search=no"
4084 fi
4085 rm -f conftest*
4086 fi
4087
4088 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4089   echo "$ac_t""yes" 1>&6
4090   :
4091 else
4092   echo "$ac_t""no" 1>&6
4093 fi
4094
4095         if test $ac_cv_func_res_search = no ; then 
4096                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4097 echo "configure:4098: checking for res_search in -lbind" >&5
4098 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
4099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   ac_save_LIBS="$LIBS"
4103 LIBS="-lbind  $LIBS"
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 /* Override any gcc2 internal prototype to avoid an error.  */
4108 /* We use char because int might match the return type of a gcc2
4109     builtin and then its argument prototype would still apply.  */
4110 char res_search();
4111
4112 int main() {
4113 res_search()
4114 ; return 0; }
4115 EOF
4116 if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4117   rm -rf conftest*
4118   eval "ac_cv_lib_$ac_lib_var=yes"
4119 else
4120   echo "configure: failed program was:" >&5
4121   cat conftest.$ac_ext >&5
4122   rm -rf conftest*
4123   eval "ac_cv_lib_$ac_lib_var=no"
4124 fi
4125 rm -f conftest*
4126 LIBS="$ac_save_LIBS"
4127
4128 fi
4129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4130   echo "$ac_t""yes" 1>&6
4131     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4132     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4133   cat >> confdefs.h <<EOF
4134 #define $ac_tr_lib 1
4135 EOF
4136
4137   LIBS="-lbind $LIBS"
4138
4139 else
4140   echo "$ac_t""no" 1>&6
4141 fi
4142
4143                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
4144         fi
4145         if test $ac_cv_func_res_search = no ; then 
4146                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
4147 echo "configure:4148: checking for res_search in -lresolv" >&5
4148 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
4149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4150   echo $ac_n "(cached) $ac_c" 1>&6
4151 else
4152   ac_save_LIBS="$LIBS"
4153 LIBS="-lresolv  $LIBS"
4154 cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 /* Override any gcc2 internal prototype to avoid an error.  */
4158 /* We use char because int might match the return type of a gcc2
4159     builtin and then its argument prototype would still apply.  */
4160 char res_search();
4161
4162 int main() {
4163 res_search()
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4167   rm -rf conftest*
4168   eval "ac_cv_lib_$ac_lib_var=yes"
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_lib_$ac_lib_var=no"
4174 fi
4175 rm -f conftest*
4176 LIBS="$ac_save_LIBS"
4177
4178 fi
4179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4180   echo "$ac_t""yes" 1>&6
4181     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4182     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4183   cat >> confdefs.h <<EOF
4184 #define $ac_tr_lib 1
4185 EOF
4186
4187   LIBS="-lresolv $LIBS"
4188
4189 else
4190   echo "$ac_t""no" 1>&6
4191 fi
4192
4193                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
4194         fi
4195
4196         if test "$ac_cv_func_res_search" = yes ; then
4197                 cat >> confdefs.h <<\EOF
4198 #define HAVE_RES_SEARCH 1
4199 EOF
4200
4201         elif test $ol_enable_dns = yes ; then
4202                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
4203         else
4204                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
4205         fi
4206 fi
4207
4208 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4209 echo "configure:4210: checking for sigset in -lV3" >&5
4210 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4212   echo $ac_n "(cached) $ac_c" 1>&6
4213 else
4214   ac_save_LIBS="$LIBS"
4215 LIBS="-lV3  $LIBS"
4216 cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 /* Override any gcc2 internal prototype to avoid an error.  */
4220 /* We use char because int might match the return type of a gcc2
4221     builtin and then its argument prototype would still apply.  */
4222 char sigset();
4223
4224 int main() {
4225 sigset()
4226 ; return 0; }
4227 EOF
4228 if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4229   rm -rf conftest*
4230   eval "ac_cv_lib_$ac_lib_var=yes"
4231 else
4232   echo "configure: failed program was:" >&5
4233   cat conftest.$ac_ext >&5
4234   rm -rf conftest*
4235   eval "ac_cv_lib_$ac_lib_var=no"
4236 fi
4237 rm -f conftest*
4238 LIBS="$ac_save_LIBS"
4239
4240 fi
4241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4242   echo "$ac_t""yes" 1>&6
4243     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4244     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4245   cat >> confdefs.h <<EOF
4246 #define $ac_tr_lib 1
4247 EOF
4248
4249   LIBS="-lV3 $LIBS"
4250
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254
4255
4256 for ac_hdr in regex.h 
4257 do
4258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4260 echo "configure:4261: checking for $ac_hdr" >&5
4261 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 #include <$ac_hdr>
4268 EOF
4269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4270 { (eval echo configure:4271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4272 if test -z "$ac_err"; then
4273   rm -rf conftest*
4274   eval "ac_cv_header_$ac_safe=yes"
4275 else
4276   echo "$ac_err" >&5
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   eval "ac_cv_header_$ac_safe=no"
4281 fi
4282 rm -f conftest*
4283 fi
4284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4285   echo "$ac_t""yes" 1>&6
4286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4287   cat >> confdefs.h <<EOF
4288 #define $ac_tr_hdr 1
4289 EOF
4290  
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294 done
4295
4296 if test "$ac_cv_header_regex_h" != yes ; then
4297         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4298 fi
4299 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4300 echo "configure:4301: checking for regfree" >&5
4301 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4302   echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304   cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 /* System header to define __stub macros and hopefully few prototypes,
4308     which can conflict with char regfree(); below.  */
4309 #include <assert.h>
4310 /* Override any gcc2 internal prototype to avoid an error.  */
4311 /* We use char because int might match the return type of a gcc2
4312     builtin and then its argument prototype would still apply.  */
4313 char regfree();
4314 char (*f)();
4315
4316 int main() {
4317
4318 /* The GNU C library defines this for functions which it implements
4319     to always fail with ENOSYS.  Some functions are actually named
4320     something starting with __ and the normal name is an alias.  */
4321 #if defined (__stub_regfree) || defined (__stub___regfree)
4322 choke me
4323 #else
4324 f = regfree;
4325 #endif
4326
4327 ; return 0; }
4328 EOF
4329 if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4330   rm -rf conftest*
4331   eval "ac_cv_func_regfree=yes"
4332 else
4333   echo "configure: failed program was:" >&5
4334   cat conftest.$ac_ext >&5
4335   rm -rf conftest*
4336   eval "ac_cv_func_regfree=no"
4337 fi
4338 rm -f conftest*
4339 fi
4340
4341 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4342   echo "$ac_t""yes" 1>&6
4343   :
4344 else
4345   echo "$ac_t""no" 1>&6
4346 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4347 fi
4348
4349
4350
4351 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4352 echo "configure:4353: checking for compatible POSIX regex" >&5
4353 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   
4357         if test "$cross_compiling" = yes; then
4358   ol_cv_c_posix_regex=cross
4359 else
4360   cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363
4364 #include <sys/types.h>
4365 #include <regex.h>
4366 static char *pattern, *string;
4367 main()
4368 {
4369         int rc;
4370         regex_t re;
4371
4372         pattern = "^A";
4373
4374         if(regcomp(&re, pattern, 0)) {
4375                 return -1;
4376         }
4377         
4378         string = "ALL MATCH";
4379         
4380         rc = regexec(&re, string, 0, (void*)0, 0);
4381
4382         regfree(&re);
4383
4384         return rc;
4385 }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4388 then
4389   ol_cv_c_posix_regex=yes
4390 else
4391   echo "configure: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   rm -fr conftest*
4394   ol_cv_c_posix_regex=no
4395 fi
4396 rm -fr conftest*
4397 fi
4398
4399 fi
4400
4401 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4402
4403 if test "$ol_cv_c_posix_regex" = no ; then
4404         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4405 fi
4406
4407 echo $ac_n "checking for select""... $ac_c" 1>&6
4408 echo "configure:4409: checking for select" >&5
4409 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4410   echo $ac_n "(cached) $ac_c" 1>&6
4411 else
4412   cat > conftest.$ac_ext <<EOF
4413 #line 4414 "configure"
4414 #include "confdefs.h"
4415 /* System header to define __stub macros and hopefully few prototypes,
4416     which can conflict with char select(); below.  */
4417 #include <assert.h>
4418 /* Override any gcc2 internal prototype to avoid an error.  */
4419 /* We use char because int might match the return type of a gcc2
4420     builtin and then its argument prototype would still apply.  */
4421 char select();
4422 char (*f)();
4423
4424 int main() {
4425
4426 /* The GNU C library defines this for functions which it implements
4427     to always fail with ENOSYS.  Some functions are actually named
4428     something starting with __ and the normal name is an alias.  */
4429 #if defined (__stub_select) || defined (__stub___select)
4430 choke me
4431 #else
4432 f = select;
4433 #endif
4434
4435 ; return 0; }
4436 EOF
4437 if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4438   rm -rf conftest*
4439   eval "ac_cv_func_select=yes"
4440 else
4441   echo "configure: failed program was:" >&5
4442   cat conftest.$ac_ext >&5
4443   rm -rf conftest*
4444   eval "ac_cv_func_select=no"
4445 fi
4446 rm -f conftest*
4447 fi
4448
4449 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4450   echo "$ac_t""yes" 1>&6
4451   :
4452 else
4453   echo "$ac_t""no" 1>&6
4454 { echo "configure: error: select() required." 1>&2; exit 1; }
4455 fi
4456
4457
4458 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4459 echo "configure:4460: checking types of arguments for select()" >&5
4460  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4470      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4471       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4472        cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #ifdef HAVE_SYS_TYPES_H
4476 #include <sys/types.h>
4477 #endif
4478 #ifdef HAVE_SYS_TIME_H
4479 #include <sys/time.h>
4480 #endif
4481 #ifdef HAVE_SYS_SELECT_H
4482 #include <sys/select.h>
4483 #endif
4484 #ifdef HAVE_SYS_SOCKET_H
4485 #include <sys/socket.h>
4486 #endif
4487 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);
4488 int main() {
4489
4490 ; return 0; }
4491 EOF
4492 if { (eval echo configure:4493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4493   rm -rf conftest*
4494           ac_not_found=no ; break 3
4495 else
4496   echo "configure: failed program was:" >&5
4497   cat conftest.$ac_ext >&5
4498   rm -rf conftest*
4499   ac_not_found=yes
4500 fi
4501 rm -f conftest*
4502       done
4503      done
4504     done
4505    
4506 fi
4507   
4508 fi
4509  
4510 fi
4511  if test "$ac_not_found" = yes; then
4512   ac_cv_func_select_arg1=int 
4513   ac_cv_func_select_arg234='int *' 
4514   ac_cv_func_select_arg5='struct timeval *'
4515  fi
4516  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4517  cat >> confdefs.h <<EOF
4518 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4519 EOF
4520
4521  cat >> confdefs.h <<EOF
4522 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4523 EOF
4524
4525  cat >> confdefs.h <<EOF
4526 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4527 EOF
4528
4529
4530
4531 # ISODE tests
4532 ol_link_isode=no
4533 if test $ol_enable_ldapd != no ; then
4534         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4535
4536                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4537 echo "configure:4538: checking for main in -lxtpp" >&5
4538 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
4539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   ac_save_LIBS="$LIBS"
4543 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4544 cat > conftest.$ac_ext <<EOF
4545 #line 4546 "configure"
4546 #include "confdefs.h"
4547
4548 int main() {
4549 main()
4550 ; return 0; }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=yes"
4555 else
4556   echo "configure: failed program was:" >&5
4557   cat conftest.$ac_ext >&5
4558   rm -rf conftest*
4559   eval "ac_cv_lib_$ac_lib_var=no"
4560 fi
4561 rm -f conftest*
4562 LIBS="$ac_save_LIBS"
4563
4564 fi
4565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4566   echo "$ac_t""yes" 1>&6
4567   
4568                 ol_link_isode=yes
4569                 cat >> confdefs.h <<\EOF
4570 #define HAVE_XTPP 1
4571 EOF
4572
4573                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4574                 
4575 else
4576   echo "$ac_t""no" 1>&6
4577 :
4578 fi
4579
4580         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4581 echo "configure:4582: checking for main in -ldsap" >&5
4582 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
4583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   ac_save_LIBS="$LIBS"
4587 LIBS="-ldsap -lisode $LIBS"
4588 cat > conftest.$ac_ext <<EOF
4589 #line 4590 "configure"
4590 #include "confdefs.h"
4591
4592 int main() {
4593 main()
4594 ; return 0; }
4595 EOF
4596 if { (eval echo configure:4597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4597   rm -rf conftest*
4598   eval "ac_cv_lib_$ac_lib_var=yes"
4599 else
4600   echo "configure: failed program was:" >&5
4601   cat conftest.$ac_ext >&5
4602   rm -rf conftest*
4603   eval "ac_cv_lib_$ac_lib_var=no"
4604 fi
4605 rm -f conftest*
4606 LIBS="$ac_save_LIBS"
4607
4608 fi
4609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4610   echo "$ac_t""yes" 1>&6
4611   
4612                 ol_link_isode=yes
4613                 cat >> confdefs.h <<\EOF
4614 #define HAVE_DSAP 1
4615 EOF
4616
4617                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4618                 
4619 else
4620   echo "$ac_t""no" 1>&6
4621 :
4622 fi
4623
4624         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4625 echo "configure:4626: checking for main in -lisode" >&5
4626 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
4627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   ac_save_LIBS="$LIBS"
4631 LIBS="-lisode  $LIBS"
4632 cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635
4636 int main() {
4637 main()
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   eval "ac_cv_lib_$ac_lib_var=yes"
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=no"
4648 fi
4649 rm -f conftest*
4650 LIBS="$ac_save_LIBS"
4651
4652 fi
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655   
4656                 ol_link_isode=yes
4657                 cat >> confdefs.h <<\EOF
4658 #define HAVE_ISODE 1
4659 EOF
4660
4661                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4662                 
4663 else
4664   echo "$ac_t""no" 1>&6
4665 :
4666 fi
4667
4668 fi
4669
4670 if test $ol_link_isode != no; then
4671         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4672 echo "configure:4673: checking for main in -lpp" >&5
4673 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
4674 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4675   echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677   ac_save_LIBS="$LIBS"
4678 LIBS="-lpp  $LIBS"
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682
4683 int main() {
4684 main()
4685 ; return 0; }
4686 EOF
4687 if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4688   rm -rf conftest*
4689   eval "ac_cv_lib_$ac_lib_var=yes"
4690 else
4691   echo "configure: failed program was:" >&5
4692   cat conftest.$ac_ext >&5
4693   rm -rf conftest*
4694   eval "ac_cv_lib_$ac_lib_var=no"
4695 fi
4696 rm -f conftest*
4697 LIBS="$ac_save_LIBS"
4698
4699 fi
4700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4701   echo "$ac_t""yes" 1>&6
4702   
4703                 cat >> confdefs.h <<\EOF
4704 #define HAVE_PP 1
4705 EOF
4706
4707                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4708                 
4709 else
4710   echo "$ac_t""no" 1>&6
4711 :
4712 fi
4713
4714
4715         # Extract the first word of "pepsy", so it can be a program name with args.
4716 set dummy pepsy; ac_word=$2
4717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_word" >&5
4719 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   case "$PEPSY" in
4723   /*)
4724   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4725   ;;
4726   ?:/*)                  
4727   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4728   ;;
4729   *)
4730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4731   ac_dummy="$PATH"
4732   for ac_dir in $ac_dummy; do 
4733     test -z "$ac_dir" && ac_dir=.
4734     if test -f $ac_dir/$ac_word; then
4735       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4736       break
4737     fi
4738   done
4739   IFS="$ac_save_ifs"
4740   ;;
4741 esac
4742 fi
4743 PEPSY="$ac_cv_path_PEPSY"
4744 if test -n "$PEPSY"; then
4745   echo "$ac_t""$PEPSY" 1>&6
4746 else
4747   echo "$ac_t""no" 1>&6
4748 fi
4749
4750 fi
4751
4752 ol_link_kerberos=no
4753
4754 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4755         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4756 do
4757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4759 echo "configure:4760: checking for $ac_hdr" >&5
4760 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 #include <$ac_hdr>
4767 EOF
4768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4769 { (eval echo configure:4770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4771 if test -z "$ac_err"; then
4772   rm -rf conftest*
4773   eval "ac_cv_header_$ac_safe=yes"
4774 else
4775   echo "$ac_err" >&5
4776   echo "configure: failed program was:" >&5
4777   cat conftest.$ac_ext >&5
4778   rm -rf conftest*
4779   eval "ac_cv_header_$ac_safe=no"
4780 fi
4781 rm -f conftest*
4782 fi
4783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4786   cat >> confdefs.h <<EOF
4787 #define $ac_tr_hdr 1
4788 EOF
4789  
4790 else
4791   echo "$ac_t""no" 1>&6
4792 fi
4793 done
4794
4795
4796         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4797                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4798 echo "configure:4799: checking for main in -lkrb4" >&5
4799 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
4800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   ac_save_LIBS="$LIBS"
4804 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4805 cat > conftest.$ac_ext <<EOF
4806 #line 4807 "configure"
4807 #include "confdefs.h"
4808
4809 int main() {
4810 main()
4811 ; return 0; }
4812 EOF
4813 if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4814   rm -rf conftest*
4815   eval "ac_cv_lib_$ac_lib_var=yes"
4816 else
4817   echo "configure: failed program was:" >&5
4818   cat conftest.$ac_ext >&5
4819   rm -rf conftest*
4820   eval "ac_cv_lib_$ac_lib_var=no"
4821 fi
4822 rm -f conftest*
4823 LIBS="$ac_save_LIBS"
4824
4825 fi
4826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6
4828   have_k5=yes
4829 else
4830   echo "$ac_t""no" 1>&6
4831 have_k5=no
4832 fi
4833
4834
4835                 if test $have_k5 = yes ; then
4836                         ol_with_kerberos=found
4837                         ol_link_kerberos=yes
4838
4839                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4840
4841                         LIBS="$KRB_LIBS $LIBS"
4842
4843                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4844 echo "configure:4845: checking for des_debug in Kerberos libraries" >&5
4845 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
4846   echo $ac_n "(cached) $ac_c" 1>&6
4847 else
4848   
4849                                                                 save_LIBS="$LIBS"
4850                                 LIBS="$KRB_LIBS $LIBS"
4851                                 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854
4855 #include <kerberosIV/krb.h>
4856 #include <kerberosIV/des.h>
4857 extern int des_debug;
4858
4859 int main() {
4860
4861 des_debug = 1;
4862
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   ol_cv_var_des_debug=yes
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   ol_cv_var_des_debug=no
4873 fi
4874 rm -f conftest*
4875                                                                 LIBS="$save_LIBS"
4876                         
4877 fi
4878
4879 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4880
4881                         if test $ol_cv_var_des_debug = yes ; then
4882                                 cat >> confdefs.h <<\EOF
4883 #define HAVE_DES_DEBUG 1
4884 EOF
4885
4886                         fi
4887
4888                         LIBS="$save_LIBS"
4889                 fi
4890         fi
4891 fi
4892
4893 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4894         for ac_hdr in krb.h des.h
4895 do
4896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4898 echo "configure:4899: checking for $ac_hdr" >&5
4899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4900   echo $ac_n "(cached) $ac_c" 1>&6
4901 else
4902   cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905 #include <$ac_hdr>
4906 EOF
4907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4908 { (eval echo configure:4909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4910 if test -z "$ac_err"; then
4911   rm -rf conftest*
4912   eval "ac_cv_header_$ac_safe=yes"
4913 else
4914   echo "$ac_err" >&5
4915   echo "configure: failed program was:" >&5
4916   cat conftest.$ac_ext >&5
4917   rm -rf conftest*
4918   eval "ac_cv_header_$ac_safe=no"
4919 fi
4920 rm -f conftest*
4921 fi
4922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4923   echo "$ac_t""yes" 1>&6
4924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4925   cat >> confdefs.h <<EOF
4926 #define $ac_tr_hdr 1
4927 EOF
4928  
4929 else
4930   echo "$ac_t""no" 1>&6
4931 fi
4932 done
4933
4934
4935         if test $ac_cv_header_krb_h = yes ; then
4936                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4937 echo "configure:4938: checking for main in -lkrb" >&5
4938 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
4939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4940   echo $ac_n "(cached) $ac_c" 1>&6
4941 else
4942   ac_save_LIBS="$LIBS"
4943 LIBS="-lkrb -ldes $LIBS"
4944 cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947
4948 int main() {
4949 main()
4950 ; return 0; }
4951 EOF
4952 if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4953   rm -rf conftest*
4954   eval "ac_cv_lib_$ac_lib_var=yes"
4955 else
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   eval "ac_cv_lib_$ac_lib_var=no"
4960 fi
4961 rm -f conftest*
4962 LIBS="$ac_save_LIBS"
4963
4964 fi
4965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4966   echo "$ac_t""yes" 1>&6
4967   have_k4=yes
4968 else
4969   echo "$ac_t""no" 1>&6
4970 have_k4=no
4971 fi
4972
4973
4974                 if test $have_k4 = yes ; then
4975                         ol_with_kerberos=found
4976                         ol_link_kerberos=yes
4977
4978                         KRB_LIBS="-lkrb -ldes"
4979                 fi
4980         fi
4981 fi
4982
4983 if test $ol_link_kerberos = yes ; then
4984         cat >> confdefs.h <<\EOF
4985 #define HAVE_KERBEROS 1
4986 EOF
4987
4988 fi
4989
4990 ol_link_tls=no
4991 if test $ol_with_tls != no ; then
4992         
4993         for ac_hdr in openssl/ssl.h ssl.h
4994 do
4995 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4996 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4997 echo "configure:4998: checking for $ac_hdr" >&5
4998 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4999   echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001   cat > conftest.$ac_ext <<EOF
5002 #line 5003 "configure"
5003 #include "confdefs.h"
5004 #include <$ac_hdr>
5005 EOF
5006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5007 { (eval echo configure:5008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5009 if test -z "$ac_err"; then
5010   rm -rf conftest*
5011   eval "ac_cv_header_$ac_safe=yes"
5012 else
5013   echo "$ac_err" >&5
5014   echo "configure: failed program was:" >&5
5015   cat conftest.$ac_ext >&5
5016   rm -rf conftest*
5017   eval "ac_cv_header_$ac_safe=no"
5018 fi
5019 rm -f conftest*
5020 fi
5021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5022   echo "$ac_t""yes" 1>&6
5023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5024   cat >> confdefs.h <<EOF
5025 #define $ac_tr_hdr 1
5026 EOF
5027  
5028 else
5029   echo "$ac_t""no" 1>&6
5030 fi
5031 done
5032
5033         
5034         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5035                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5036 echo "configure:5037: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5037 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5039   echo $ac_n "(cached) $ac_c" 1>&6
5040 else
5041   ac_save_LIBS="$LIBS"
5042 LIBS="-lssl -lcrypto $LIBS"
5043 cat > conftest.$ac_ext <<EOF
5044 #line 5045 "configure"
5045 #include "confdefs.h"
5046 /* Override any gcc2 internal prototype to avoid an error.  */
5047 /* We use char because int might match the return type of a gcc2
5048     builtin and then its argument prototype would still apply.  */
5049 char SSLeay_add_ssl_algorithms();
5050
5051 int main() {
5052 SSLeay_add_ssl_algorithms()
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   eval "ac_cv_lib_$ac_lib_var=yes"
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=no"
5063 fi
5064 rm -f conftest*
5065 LIBS="$ac_save_LIBS"
5066
5067 fi
5068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5069   echo "$ac_t""yes" 1>&6
5070   have_ssleay=yes
5071                         need_rsaref=no
5072 else
5073   echo "$ac_t""no" 1>&6
5074 have_ssleay=no
5075 fi
5076
5077                         
5078                 if test $have_ssleay = no ; then
5079                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5080 echo "configure:5081: checking for SSL_library_init in -lssl" >&5
5081 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5083   echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085   ac_save_LIBS="$LIBS"
5086 LIBS="-lssl -lcrypto $LIBS"
5087 cat > conftest.$ac_ext <<EOF
5088 #line 5089 "configure"
5089 #include "confdefs.h"
5090 /* Override any gcc2 internal prototype to avoid an error.  */
5091 /* We use char because int might match the return type of a gcc2
5092     builtin and then its argument prototype would still apply.  */
5093 char SSL_library_init();
5094
5095 int main() {
5096 SSL_library_init()
5097 ; return 0; }
5098 EOF
5099 if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100   rm -rf conftest*
5101   eval "ac_cv_lib_$ac_lib_var=yes"
5102 else
5103   echo "configure: failed program was:" >&5
5104   cat conftest.$ac_ext >&5
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=no"
5107 fi
5108 rm -f conftest*
5109 LIBS="$ac_save_LIBS"
5110
5111 fi
5112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5113   echo "$ac_t""yes" 1>&6
5114   have_ssleay=yes
5115                                 need_rsaref=no
5116 else
5117   echo "$ac_t""no" 1>&6
5118 have_ssleay=no
5119 fi
5120
5121                 fi
5122
5123                 if test $have_ssleay = no ; then
5124                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5125 echo "configure:5126: checking for ssl3_accept in -lssl" >&5
5126 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5128   echo $ac_n "(cached) $ac_c" 1>&6
5129 else
5130   ac_save_LIBS="$LIBS"
5131 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5132 cat > conftest.$ac_ext <<EOF
5133 #line 5134 "configure"
5134 #include "confdefs.h"
5135 /* Override any gcc2 internal prototype to avoid an error.  */
5136 /* We use char because int might match the return type of a gcc2
5137     builtin and then its argument prototype would still apply.  */
5138 char ssl3_accept();
5139
5140 int main() {
5141 ssl3_accept()
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=yes"
5147 else
5148   echo "configure: failed program was:" >&5
5149   cat conftest.$ac_ext >&5
5150   rm -rf conftest*
5151   eval "ac_cv_lib_$ac_lib_var=no"
5152 fi
5153 rm -f conftest*
5154 LIBS="$ac_save_LIBS"
5155
5156 fi
5157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5158   echo "$ac_t""yes" 1>&6
5159   have_ssleay=yes
5160                                 need_rsaref=yes
5161 else
5162   echo "$ac_t""no" 1>&6
5163 have_ssleay=no
5164 fi
5165
5166                 fi
5167
5168                 if test $have_ssleay = yes ; then
5169                         ol_with_tls=found
5170                         ol_link_tls=yes
5171
5172                         cat >> confdefs.h <<\EOF
5173 #define HAVE_SSLEAY 1
5174 EOF
5175
5176
5177                         if test $need_rsaref = yes; then
5178                                 cat >> confdefs.h <<\EOF
5179 #define HAVE_RSAREF 1
5180 EOF
5181
5182
5183                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5184                         else
5185                                 TLS_LIBS="-lssl -lcrypto"
5186                         fi
5187                 fi
5188         fi
5189 fi
5190
5191 if test $ol_link_tls = yes ; then
5192         cat >> confdefs.h <<\EOF
5193 #define HAVE_TLS 1
5194 EOF
5195
5196 fi      
5197
5198 for ac_func in \
5199         ctime_r                 \
5200         gethostbyname_r gethostbyaddr_r \
5201
5202 do
5203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5204 echo "configure:5205: checking for $ac_func" >&5
5205 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5206   echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208   cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 /* System header to define __stub macros and hopefully few prototypes,
5212     which can conflict with char $ac_func(); below.  */
5213 #include <assert.h>
5214 /* Override any gcc2 internal prototype to avoid an error.  */
5215 /* We use char because int might match the return type of a gcc2
5216     builtin and then its argument prototype would still apply.  */
5217 char $ac_func();
5218 char (*f)();
5219
5220 int main() {
5221
5222 /* The GNU C library defines this for functions which it implements
5223     to always fail with ENOSYS.  Some functions are actually named
5224     something starting with __ and the normal name is an alias.  */
5225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5226 choke me
5227 #else
5228 f = $ac_func;
5229 #endif
5230
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5234   rm -rf conftest*
5235   eval "ac_cv_func_$ac_func=yes"
5236 else
5237   echo "configure: failed program was:" >&5
5238   cat conftest.$ac_ext >&5
5239   rm -rf conftest*
5240   eval "ac_cv_func_$ac_func=no"
5241 fi
5242 rm -f conftest*
5243 fi
5244
5245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5246   echo "$ac_t""yes" 1>&6
5247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5248   cat >> confdefs.h <<EOF
5249 #define $ac_tr_func 1
5250 EOF
5251  
5252 else
5253   echo "$ac_t""no" 1>&6
5254 fi
5255 done
5256
5257
5258 if test "$ac_cv_func_ctime_r" = no ; then
5259         ol_cv_func_ctime_r_nargs=0
5260 else
5261         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5262 echo "configure:5263: checking number of arguments of ctime_r" >&5
5263 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5264   echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266   cat > conftest.$ac_ext <<EOF
5267 #line 5268 "configure"
5268 #include "confdefs.h"
5269 #include <time.h>
5270 int main() {
5271 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5272 ; return 0; }
5273 EOF
5274 if { (eval echo configure:5275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5275   rm -rf conftest*
5276   ol_cv_func_ctime_r_nargs=3
5277 else
5278   echo "configure: failed program was:" >&5
5279   cat conftest.$ac_ext >&5
5280   rm -rf conftest*
5281   cat > conftest.$ac_ext <<EOF
5282 #line 5283 "configure"
5283 #include "confdefs.h"
5284 #include <time.h>
5285 int main() {
5286 time_t ti; char *buffer; ctime_r(&ti,buffer);
5287 ; return 0; }
5288 EOF
5289 if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5290   rm -rf conftest*
5291   ol_cv_func_ctime_r_nargs=2
5292 else
5293   echo "configure: failed program was:" >&5
5294   cat conftest.$ac_ext >&5
5295   rm -rf conftest*
5296   ol_cv_func_ctime_r_nargs=0
5297 fi
5298 rm -f conftest*
5299 fi
5300 rm -f conftest*
5301 fi
5302
5303 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5304   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5305     cat >> confdefs.h <<EOF
5306 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5307 EOF
5308
5309   fi
5310
5311 fi
5312
5313 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5314         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5315 echo "configure:5316: checking number of arguments of gethostbyname_r" >&5
5316 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5317   echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319   cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322 #include <sys/types.h>
5323 #include <sys/socket.h>
5324 #include <netinet/in.h>
5325 #include <netdb.h>
5326 #define BUFSIZE (sizeof(struct hostent)+10)
5327 int main() {
5328 struct hostent hent; char buffer[BUFSIZE];
5329                 int bufsize=BUFSIZE;int h_errno;
5330                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5331                         buffer, bufsize, &h_errno);
5332 ; return 0; }
5333 EOF
5334 if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5335   rm -rf conftest*
5336   ol_cv_func_gethostbyname_r_nargs=5
5337 else
5338   echo "configure: failed program was:" >&5
5339   cat conftest.$ac_ext >&5
5340   rm -rf conftest*
5341   cat > conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 #include "confdefs.h"
5344 #include <sys/types.h>
5345 #include <sys/socket.h>
5346 #include <netinet/in.h>
5347 #include <netdb.h>
5348 #define BUFSIZE (sizeof(struct hostent)+10)
5349 int main() {
5350 struct hostent hent;struct hostent *rhent;
5351                         char buffer[BUFSIZE];
5352                         int bufsize=BUFSIZE;int h_errno;
5353                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5354                                 &rhent, &h_errno);
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5358   rm -rf conftest*
5359   ol_cv_func_gethostbyname_r_nargs=6
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   ol_cv_func_gethostbyname_r_nargs=0
5365 fi
5366 rm -f conftest*
5367 fi
5368 rm -f conftest*
5369 fi
5370
5371 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5372   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5373         cat >> confdefs.h <<EOF
5374 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5375 EOF
5376
5377   fi
5378
5379 else
5380         ol_cv_func_gethostbyname_r_nargs=0
5381 fi
5382  
5383 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5384         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5385 echo "configure:5386: checking number of arguments of gethostbyaddr_r" >&5
5386 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5387   echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389   cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 #include <sys/types.h>
5393 #include <sys/socket.h>
5394 #include <netinet/in.h>
5395 #include <netdb.h>
5396 #define BUFSIZE (sizeof(struct hostent)+10)
5397 int main() {
5398 struct hostent hent; char buffer[BUFSIZE]; 
5399             struct in_addr add;
5400             size_t alen=sizeof(struct in_addr);
5401             int bufsize=BUFSIZE;int h_errno;
5402                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5403                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5404 ; return 0; }
5405 EOF
5406 if { (eval echo configure:5407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5407   rm -rf conftest*
5408   ol_cv_func_gethostbyaddr_r_nargs=7
5409 else
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416 #include <sys/types.h>
5417 #include <sys/socket.h>
5418 #include <netinet/in.h>
5419 #include <netdb.h>
5420 #define BUFSIZE (sizeof(struct hostent)+10)
5421 int main() {
5422 struct hostent hent;
5423                         struct hostent *rhent; char buffer[BUFSIZE]; 
5424                         struct in_addr add;
5425                         size_t alen=sizeof(struct in_addr);
5426                         int bufsize=BUFSIZE;int h_errno;
5427                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5428                                 alen, AF_INET, &hent, buffer, bufsize, 
5429                                 &rhent, &h_errno);
5430 ; return 0; }
5431 EOF
5432 if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5433   rm -rf conftest*
5434   ol_cv_func_gethostbyaddr_r_nargs=8
5435 else
5436   echo "configure: failed program was:" >&5
5437   cat conftest.$ac_ext >&5
5438   rm -rf conftest*
5439   ol_cv_func_gethostbyaddr_r_nargs=0
5440 fi
5441 rm -f conftest*
5442 fi
5443 rm -f conftest*
5444 fi
5445
5446 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5447   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5448     cat >> confdefs.h <<EOF
5449 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5450 EOF
5451
5452   fi
5453
5454 else
5455         ol_cv_func_gethostbyaddr_r_nargs=0
5456 fi
5457
5458 if test "$ac_cv_func_ctime_r" = yes \
5459         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5460         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5461         -a "$ac_cv_func_gethostbyname_r" = yes \
5462         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5463         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5464         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5465         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5466         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5467         ; then
5468  
5469         cat >> confdefs.h <<\EOF
5470 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5471 EOF
5472
5473 fi
5474
5475 ol_link_threads=no
5476 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5477         -o $ol_with_threads = posix ; then
5478
5479         for ac_hdr in pthread.h sched.h
5480 do
5481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5483 echo "configure:5484: checking for $ac_hdr" >&5
5484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5485   echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487   cat > conftest.$ac_ext <<EOF
5488 #line 5489 "configure"
5489 #include "confdefs.h"
5490 #include <$ac_hdr>
5491 EOF
5492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5493 { (eval echo configure:5494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5495 if test -z "$ac_err"; then
5496   rm -rf conftest*
5497   eval "ac_cv_header_$ac_safe=yes"
5498 else
5499   echo "$ac_err" >&5
5500   echo "configure: failed program was:" >&5
5501   cat conftest.$ac_ext >&5
5502   rm -rf conftest*
5503   eval "ac_cv_header_$ac_safe=no"
5504 fi
5505 rm -f conftest*
5506 fi
5507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5510   cat >> confdefs.h <<EOF
5511 #define $ac_tr_hdr 1
5512 EOF
5513  
5514 else
5515   echo "$ac_t""no" 1>&6
5516 fi
5517 done
5518
5519
5520         if test $ac_cv_header_pthread_h = yes ; then
5521                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5522 echo "configure:5523: checking POSIX thread version" >&5
5523 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
5524   echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526   
5527         cat > conftest.$ac_ext <<EOF
5528 #line 5529 "configure"
5529 #include "confdefs.h"
5530
5531 #               include <pthread.h>
5532                 /* this check could be improved */
5533 #               ifdef PTHREAD_ONCE_INIT
5534                         pthread_version_final
5535 #               endif
5536         
5537 EOF
5538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5539   egrep "pthread_version_final" >/dev/null 2>&1; then
5540   rm -rf conftest*
5541   ol_pthread_final=yes
5542 else
5543   rm -rf conftest*
5544   ol_pthread_final=no
5545 fi
5546 rm -f conftest*
5547
5548
5549         cat > conftest.$ac_ext <<EOF
5550 #line 5551 "configure"
5551 #include "confdefs.h"
5552
5553 #               include <pthread.h>
5554                 /* this check could be improved */
5555 #               ifdef pthread_once_init
5556                         pthread_version_draft4
5557 #               endif
5558         
5559 EOF
5560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5561   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5562   rm -rf conftest*
5563   ol_pthread_draft4=yes
5564 else
5565   rm -rf conftest*
5566   ol_pthread_draft4=no
5567 fi
5568 rm -f conftest*
5569
5570
5571         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5572                 ol_cv_pthread_version=final
5573         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5574                 ol_cv_pthread_version=draft4
5575         else
5576                 ol_cv_pthread_version=unknown
5577         fi
5578
5579 fi
5580
5581 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5582
5583
5584                 if test $ol_cv_pthread_version = final ; then
5585                         cat >> confdefs.h <<\EOF
5586 #define HAVE_PTHREADS_FINAL 1
5587 EOF
5588
5589                 elif test $ol_cv_pthread_version = draft4 ; then
5590                         cat >> confdefs.h <<\EOF
5591 #define HAVE_PTHREADS_D4 1
5592 EOF
5593
5594                 else
5595                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5596                 fi
5597
5598                 # consider threads found
5599                 ol_with_threads=found
5600
5601                 
5602         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5603 echo "configure:5604: checking for LinuxThreads pthread.h" >&5
5604 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
5605   echo $ac_n "(cached) $ac_c" 1>&6
5606 else
5607   cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 #include <pthread.h>
5611 EOF
5612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5613   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5614   rm -rf conftest*
5615   ol_cv_header_linux_threads=yes
5616 else
5617   rm -rf conftest*
5618   ol_cv_header_linux_threads=no
5619 fi
5620 rm -f conftest*
5621
5622                 
5623 fi
5624
5625 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5626         if test $ol_cv_header_linux_threads = yes; then
5627                 cat >> confdefs.h <<\EOF
5628 #define HAVE_LINUX_THREADS 1
5629 EOF
5630
5631         fi
5632
5633
5634                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5635                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5636 echo "configure:5637: checking for pthread_create in default libraries" >&5
5637 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
5638   echo $ac_n "(cached) $ac_c" 1>&6
5639 else
5640   
5641                 if test "$cross_compiling" = yes; then
5642                         ol_cv_pthread_create=yes
5643 else
5644   cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647
5648 #include <pthread.h>
5649 #ifndef NULL
5650 #define NULL (void*)0
5651 #endif
5652
5653 static void *task(p)
5654         void *p;
5655 {
5656         return (void *) (p == NULL);
5657 }
5658
5659 int main(argc, argv)
5660         int argc;
5661         char **argv;
5662 {
5663         pthread_t t;
5664         int status;
5665
5666         /* make sure pthread_create() isn't just a stub */
5667 #if HAVE_PTHREADS_D4
5668         status = pthread_create(&t, pthread_attr_default, task, NULL);
5669 #else
5670         status = pthread_create(&t, NULL, task, NULL);
5671 #endif
5672
5673         if( status ) return status;
5674
5675         /* make sure pthread_detach() isn't just a stub */
5676 #if HAVE_PTHREADS_D4
5677         status = pthread_detach( &t );
5678 #else
5679         status = pthread_detach( t );
5680 #endif
5681
5682         if( status ) return status;
5683
5684         return status;
5685 }
5686
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5689 then
5690   ol_cv_pthread_create=yes
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -fr conftest*
5695   ol_cv_pthread_create=no
5696 fi
5697 rm -fr conftest*
5698 fi
5699
5700 fi
5701
5702 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5703
5704                 if test $ol_cv_pthread_create != no ; then
5705                         ol_link_threads=posix
5706                         ol_link_pthreads=""
5707                 fi
5708                 
5709                 # Pthread try link: -mt (ol_cv_pthread_mt)
5710         if test "$ol_link_threads" = no ; then
5711                 # try -mt
5712                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5713 echo "configure:5714: checking for pthread link with -mt" >&5
5714 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
5715   echo $ac_n "(cached) $ac_c" 1>&6
5716 else
5717   
5718                         # save the flags
5719                         ol_LIBS="$LIBS"
5720                         LIBS="-mt $LIBS"
5721
5722                         cat > conftest.$ac_ext <<EOF
5723 #line 5724 "configure"
5724 #include "confdefs.h"
5725
5726 #include <pthread.h>
5727 #ifndef NULL
5728 #define NULL (void*)0
5729 #endif
5730
5731 int main() {
5732
5733         pthread_t t;
5734
5735 #if HAVE_PTHREADS_D4
5736         pthread_create(&t, pthread_attr_default, NULL, NULL);
5737         pthread_detach( &t );
5738 #else
5739         pthread_create(&t, NULL, NULL, NULL);
5740         pthread_detach( t );
5741 #endif
5742 #ifdef HAVE_LINUX_THREADS
5743         pthread_kill_other_threads_np();
5744 #endif
5745
5746 ; return 0; }
5747 EOF
5748 if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5749   rm -rf conftest*
5750   ol_cv_pthread_mt=yes
5751 else
5752   echo "configure: failed program was:" >&5
5753   cat conftest.$ac_ext >&5
5754   rm -rf conftest*
5755   ol_cv_pthread_mt=no
5756 fi
5757 rm -f conftest*
5758
5759                 # restore the LIBS
5760                 LIBS="$ol_LIBS"
5761                 
5762 fi
5763
5764 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5765
5766                 if test $ol_cv_pthread_mt = yes ; then
5767                         ol_link_pthreads="-mt"
5768                         ol_link_threads=posix
5769                 fi
5770         fi
5771
5772                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5773         if test "$ol_link_threads" = no ; then
5774                 # try -kthread
5775                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5776 echo "configure:5777: checking for pthread link with -kthread" >&5
5777 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
5778   echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780   
5781                         # save the flags
5782                         ol_LIBS="$LIBS"
5783                         LIBS="-kthread $LIBS"
5784
5785                         cat > conftest.$ac_ext <<EOF
5786 #line 5787 "configure"
5787 #include "confdefs.h"
5788
5789 #include <pthread.h>
5790 #ifndef NULL
5791 #define NULL (void*)0
5792 #endif
5793
5794 int main() {
5795
5796         pthread_t t;
5797
5798 #if HAVE_PTHREADS_D4
5799         pthread_create(&t, pthread_attr_default, NULL, NULL);
5800         pthread_detach( &t );
5801 #else
5802         pthread_create(&t, NULL, NULL, NULL);
5803         pthread_detach( t );
5804 #endif
5805 #ifdef HAVE_LINUX_THREADS
5806         pthread_kill_other_threads_np();
5807 #endif
5808
5809 ; return 0; }
5810 EOF
5811 if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5812   rm -rf conftest*
5813   ol_cv_pthread_kthread=yes
5814 else
5815   echo "configure: failed program was:" >&5
5816   cat conftest.$ac_ext >&5
5817   rm -rf conftest*
5818   ol_cv_pthread_kthread=no
5819 fi
5820 rm -f conftest*
5821
5822                 # restore the LIBS
5823                 LIBS="$ol_LIBS"
5824                 
5825 fi
5826
5827 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5828
5829                 if test $ol_cv_pthread_kthread = yes ; then
5830                         ol_link_pthreads="-kthread"
5831                         ol_link_threads=posix
5832                 fi
5833         fi
5834
5835                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5836         if test "$ol_link_threads" = no ; then
5837                 # try -pthread
5838                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5839 echo "configure:5840: checking for pthread link with -pthread" >&5
5840 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
5841   echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843   
5844                         # save the flags
5845                         ol_LIBS="$LIBS"
5846                         LIBS="-pthread $LIBS"
5847
5848                         cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851
5852 #include <pthread.h>
5853 #ifndef NULL
5854 #define NULL (void*)0
5855 #endif
5856
5857 int main() {
5858
5859         pthread_t t;
5860
5861 #if HAVE_PTHREADS_D4
5862         pthread_create(&t, pthread_attr_default, NULL, NULL);
5863         pthread_detach( &t );
5864 #else
5865         pthread_create(&t, NULL, NULL, NULL);
5866         pthread_detach( t );
5867 #endif
5868 #ifdef HAVE_LINUX_THREADS
5869         pthread_kill_other_threads_np();
5870 #endif
5871
5872 ; return 0; }
5873 EOF
5874 if { (eval echo configure:5875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5875   rm -rf conftest*
5876   ol_cv_pthread_pthread=yes
5877 else
5878   echo "configure: failed program was:" >&5
5879   cat conftest.$ac_ext >&5
5880   rm -rf conftest*
5881   ol_cv_pthread_pthread=no
5882 fi
5883 rm -f conftest*
5884
5885                 # restore the LIBS
5886                 LIBS="$ol_LIBS"
5887                 
5888 fi
5889
5890 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5891
5892                 if test $ol_cv_pthread_pthread = yes ; then
5893                         ol_link_pthreads="-pthread"
5894                         ol_link_threads=posix
5895                 fi
5896         fi
5897
5898                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5899         if test "$ol_link_threads" = no ; then
5900                 # try -pthreads
5901                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5902 echo "configure:5903: checking for pthread link with -pthreads" >&5
5903 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
5904   echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906   
5907                         # save the flags
5908                         ol_LIBS="$LIBS"
5909                         LIBS="-pthreads $LIBS"
5910
5911                         cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914
5915 #include <pthread.h>
5916 #ifndef NULL
5917 #define NULL (void*)0
5918 #endif
5919
5920 int main() {
5921
5922         pthread_t t;
5923
5924 #if HAVE_PTHREADS_D4
5925         pthread_create(&t, pthread_attr_default, NULL, NULL);
5926         pthread_detach( &t );
5927 #else
5928         pthread_create(&t, NULL, NULL, NULL);
5929         pthread_detach( t );
5930 #endif
5931 #ifdef HAVE_LINUX_THREADS
5932         pthread_kill_other_threads_np();
5933 #endif
5934
5935 ; return 0; }
5936 EOF
5937 if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5938   rm -rf conftest*
5939   ol_cv_pthread_pthreads=yes
5940 else
5941   echo "configure: failed program was:" >&5
5942   cat conftest.$ac_ext >&5
5943   rm -rf conftest*
5944   ol_cv_pthread_pthreads=no
5945 fi
5946 rm -f conftest*
5947
5948                 # restore the LIBS
5949                 LIBS="$ol_LIBS"
5950                 
5951 fi
5952
5953 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5954
5955                 if test $ol_cv_pthread_pthreads = yes ; then
5956                         ol_link_pthreads="-pthreads"
5957                         ol_link_threads=posix
5958                 fi
5959         fi
5960
5961                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
5962         if test "$ol_link_threads" = no ; then
5963                 # try -mthreads
5964                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
5965 echo "configure:5966: checking for pthread link with -mthreads" >&5
5966 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
5967   echo $ac_n "(cached) $ac_c" 1>&6
5968 else
5969   
5970                         # save the flags
5971                         ol_LIBS="$LIBS"
5972                         LIBS="-mthreads $LIBS"
5973
5974                         cat > conftest.$ac_ext <<EOF
5975 #line 5976 "configure"
5976 #include "confdefs.h"
5977
5978 #include <pthread.h>
5979 #ifndef NULL
5980 #define NULL (void*)0
5981 #endif
5982
5983 int main() {
5984
5985         pthread_t t;
5986
5987 #if HAVE_PTHREADS_D4
5988         pthread_create(&t, pthread_attr_default, NULL, NULL);
5989         pthread_detach( &t );
5990 #else
5991         pthread_create(&t, NULL, NULL, NULL);
5992         pthread_detach( t );
5993 #endif
5994 #ifdef HAVE_LINUX_THREADS
5995         pthread_kill_other_threads_np();
5996 #endif
5997
5998 ; return 0; }
5999 EOF
6000 if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6001   rm -rf conftest*
6002   ol_cv_pthread_mthreads=yes
6003 else
6004   echo "configure: failed program was:" >&5
6005   cat conftest.$ac_ext >&5
6006   rm -rf conftest*
6007   ol_cv_pthread_mthreads=no
6008 fi
6009 rm -f conftest*
6010
6011                 # restore the LIBS
6012                 LIBS="$ol_LIBS"
6013                 
6014 fi
6015
6016 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6017
6018                 if test $ol_cv_pthread_mthreads = yes ; then
6019                         ol_link_pthreads="-mthreads"
6020                         ol_link_threads=posix
6021                 fi
6022         fi
6023
6024                 # Pthread try link: -thread (ol_cv_pthread_thread)
6025         if test "$ol_link_threads" = no ; then
6026                 # try -thread
6027                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6028 echo "configure:6029: checking for pthread link with -thread" >&5
6029 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6030   echo $ac_n "(cached) $ac_c" 1>&6
6031 else
6032   
6033                         # save the flags
6034                         ol_LIBS="$LIBS"
6035                         LIBS="-thread $LIBS"
6036
6037                         cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040
6041 #include <pthread.h>
6042 #ifndef NULL
6043 #define NULL (void*)0
6044 #endif
6045
6046 int main() {
6047
6048         pthread_t t;
6049
6050 #if HAVE_PTHREADS_D4
6051         pthread_create(&t, pthread_attr_default, NULL, NULL);
6052         pthread_detach( &t );
6053 #else
6054         pthread_create(&t, NULL, NULL, NULL);
6055         pthread_detach( t );
6056 #endif
6057 #ifdef HAVE_LINUX_THREADS
6058         pthread_kill_other_threads_np();
6059 #endif
6060
6061 ; return 0; }
6062 EOF
6063 if { (eval echo configure:6064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6064   rm -rf conftest*
6065   ol_cv_pthread_thread=yes
6066 else
6067   echo "configure: failed program was:" >&5
6068   cat conftest.$ac_ext >&5
6069   rm -rf conftest*
6070   ol_cv_pthread_thread=no
6071 fi
6072 rm -f conftest*
6073
6074                 # restore the LIBS
6075                 LIBS="$ol_LIBS"
6076                 
6077 fi
6078
6079 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6080
6081                 if test $ol_cv_pthread_thread = yes ; then
6082                         ol_link_pthreads="-thread"
6083                         ol_link_threads=posix
6084                 fi
6085         fi
6086
6087
6088                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6089         if test "$ol_link_threads" = no ; then
6090                 # try -lpthread -lmach -lexc -lc_r
6091                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6092 echo "configure:6093: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6093 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6094   echo $ac_n "(cached) $ac_c" 1>&6
6095 else
6096   
6097                         # save the flags
6098                         ol_LIBS="$LIBS"
6099                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6100
6101                         cat > conftest.$ac_ext <<EOF
6102 #line 6103 "configure"
6103 #include "confdefs.h"
6104
6105 #include <pthread.h>
6106 #ifndef NULL
6107 #define NULL (void*)0
6108 #endif
6109
6110 int main() {
6111
6112         pthread_t t;
6113
6114 #if HAVE_PTHREADS_D4
6115         pthread_create(&t, pthread_attr_default, NULL, NULL);
6116         pthread_detach( &t );
6117 #else
6118         pthread_create(&t, NULL, NULL, NULL);
6119         pthread_detach( t );
6120 #endif
6121 #ifdef HAVE_LINUX_THREADS
6122         pthread_kill_other_threads_np();
6123 #endif
6124
6125 ; return 0; }
6126 EOF
6127 if { (eval echo configure:6128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6128   rm -rf conftest*
6129   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6130 else
6131   echo "configure: failed program was:" >&5
6132   cat conftest.$ac_ext >&5
6133   rm -rf conftest*
6134   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6135 fi
6136 rm -f conftest*
6137
6138                 # restore the LIBS
6139                 LIBS="$ol_LIBS"
6140                 
6141 fi
6142
6143 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6144
6145                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6146                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6147                         ol_link_threads=posix
6148                 fi
6149         fi
6150
6151                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6152         if test "$ol_link_threads" = no ; then
6153                 # try -lpthread -lmach -lexc
6154                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6155 echo "configure:6156: checking for pthread link with -lpthread -lmach -lexc" >&5
6156 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   
6160                         # save the flags
6161                         ol_LIBS="$LIBS"
6162                         LIBS="-lpthread -lmach -lexc $LIBS"
6163
6164                         cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167
6168 #include <pthread.h>
6169 #ifndef NULL
6170 #define NULL (void*)0
6171 #endif
6172
6173 int main() {
6174
6175         pthread_t t;
6176
6177 #if HAVE_PTHREADS_D4
6178         pthread_create(&t, pthread_attr_default, NULL, NULL);
6179         pthread_detach( &t );
6180 #else
6181         pthread_create(&t, NULL, NULL, NULL);
6182         pthread_detach( t );
6183 #endif
6184 #ifdef HAVE_LINUX_THREADS
6185         pthread_kill_other_threads_np();
6186 #endif
6187
6188 ; return 0; }
6189 EOF
6190 if { (eval echo configure:6191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6191   rm -rf conftest*
6192   ol_cv_pthread_lpthread_lmach_lexc=yes
6193 else
6194   echo "configure: failed program was:" >&5
6195   cat conftest.$ac_ext >&5
6196   rm -rf conftest*
6197   ol_cv_pthread_lpthread_lmach_lexc=no
6198 fi
6199 rm -f conftest*
6200
6201                 # restore the LIBS
6202                 LIBS="$ol_LIBS"
6203                 
6204 fi
6205
6206 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6207
6208                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6209                         ol_link_pthreads="-lpthread -lmach -lexc"
6210                         ol_link_threads=posix
6211                 fi
6212         fi
6213
6214
6215                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6216         if test "$ol_link_threads" = no ; then
6217                 # try -lpthread -Wl,-woff,85
6218                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6219 echo "configure:6220: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6220 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   
6224                         # save the flags
6225                         ol_LIBS="$LIBS"
6226                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6227
6228                         cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231
6232 #include <pthread.h>
6233 #ifndef NULL
6234 #define NULL (void*)0
6235 #endif
6236
6237 int main() {
6238
6239         pthread_t t;
6240
6241 #if HAVE_PTHREADS_D4
6242         pthread_create(&t, pthread_attr_default, NULL, NULL);
6243         pthread_detach( &t );
6244 #else
6245         pthread_create(&t, NULL, NULL, NULL);
6246         pthread_detach( t );
6247 #endif
6248 #ifdef HAVE_LINUX_THREADS
6249         pthread_kill_other_threads_np();
6250 #endif
6251
6252 ; return 0; }
6253 EOF
6254 if { (eval echo configure:6255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6255   rm -rf conftest*
6256   ol_cv_pthread_lib_lpthread_woff=yes
6257 else
6258   echo "configure: failed program was:" >&5
6259   cat conftest.$ac_ext >&5
6260   rm -rf conftest*
6261   ol_cv_pthread_lib_lpthread_woff=no
6262 fi
6263 rm -f conftest*
6264
6265                 # restore the LIBS
6266                 LIBS="$ol_LIBS"
6267                 
6268 fi
6269
6270 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6271
6272                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6273                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6274                         ol_link_threads=posix
6275                 fi
6276         fi
6277
6278
6279                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6280         if test "$ol_link_threads" = no ; then
6281                 # try -lpthread
6282                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6283 echo "configure:6284: checking for pthread link with -lpthread" >&5
6284 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6285   echo $ac_n "(cached) $ac_c" 1>&6
6286 else
6287   
6288                         # save the flags
6289                         ol_LIBS="$LIBS"
6290                         LIBS="-lpthread $LIBS"
6291
6292                         cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295
6296 #include <pthread.h>
6297 #ifndef NULL
6298 #define NULL (void*)0
6299 #endif
6300
6301 int main() {
6302
6303         pthread_t t;
6304
6305 #if HAVE_PTHREADS_D4
6306         pthread_create(&t, pthread_attr_default, NULL, NULL);
6307         pthread_detach( &t );
6308 #else
6309         pthread_create(&t, NULL, NULL, NULL);
6310         pthread_detach( t );
6311 #endif
6312 #ifdef HAVE_LINUX_THREADS
6313         pthread_kill_other_threads_np();
6314 #endif
6315
6316 ; return 0; }
6317 EOF
6318 if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6319   rm -rf conftest*
6320   ol_cv_pthread_lpthread=yes
6321 else
6322   echo "configure: failed program was:" >&5
6323   cat conftest.$ac_ext >&5
6324   rm -rf conftest*
6325   ol_cv_pthread_lpthread=no
6326 fi
6327 rm -f conftest*
6328
6329                 # restore the LIBS
6330                 LIBS="$ol_LIBS"
6331                 
6332 fi
6333
6334 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6335
6336                 if test $ol_cv_pthread_lpthread = yes ; then
6337                         ol_link_pthreads="-lpthread"
6338                         ol_link_threads=posix
6339                 fi
6340         fi
6341
6342                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6343         if test "$ol_link_threads" = no ; then
6344                 # try -lc_r
6345                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6346 echo "configure:6347: checking for pthread link with -lc_r" >&5
6347 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6348   echo $ac_n "(cached) $ac_c" 1>&6
6349 else
6350   
6351                         # save the flags
6352                         ol_LIBS="$LIBS"
6353                         LIBS="-lc_r $LIBS"
6354
6355                         cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358
6359 #include <pthread.h>
6360 #ifndef NULL
6361 #define NULL (void*)0
6362 #endif
6363
6364 int main() {
6365
6366         pthread_t t;
6367
6368 #if HAVE_PTHREADS_D4
6369         pthread_create(&t, pthread_attr_default, NULL, NULL);
6370         pthread_detach( &t );
6371 #else
6372         pthread_create(&t, NULL, NULL, NULL);
6373         pthread_detach( t );
6374 #endif
6375 #ifdef HAVE_LINUX_THREADS
6376         pthread_kill_other_threads_np();
6377 #endif
6378
6379 ; return 0; }
6380 EOF
6381 if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6382   rm -rf conftest*
6383   ol_cv_pthread_lc_r=yes
6384 else
6385   echo "configure: failed program was:" >&5
6386   cat conftest.$ac_ext >&5
6387   rm -rf conftest*
6388   ol_cv_pthread_lc_r=no
6389 fi
6390 rm -f conftest*
6391
6392                 # restore the LIBS
6393                 LIBS="$ol_LIBS"
6394                 
6395 fi
6396
6397 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6398
6399                 if test $ol_cv_pthread_lc_r = yes ; then
6400                         ol_link_pthreads="-lc_r"
6401                         ol_link_threads=posix
6402                 fi
6403         fi
6404
6405
6406                 # Pthread try link: -threads (ol_cv_pthread_threads)
6407         if test "$ol_link_threads" = no ; then
6408                 # try -threads
6409                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6410 echo "configure:6411: checking for pthread link with -threads" >&5
6411 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6412   echo $ac_n "(cached) $ac_c" 1>&6
6413 else
6414   
6415                         # save the flags
6416                         ol_LIBS="$LIBS"
6417                         LIBS="-threads $LIBS"
6418
6419                         cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422
6423 #include <pthread.h>
6424 #ifndef NULL
6425 #define NULL (void*)0
6426 #endif
6427
6428 int main() {
6429
6430         pthread_t t;
6431
6432 #if HAVE_PTHREADS_D4
6433         pthread_create(&t, pthread_attr_default, NULL, NULL);
6434         pthread_detach( &t );
6435 #else
6436         pthread_create(&t, NULL, NULL, NULL);
6437         pthread_detach( t );
6438 #endif
6439 #ifdef HAVE_LINUX_THREADS
6440         pthread_kill_other_threads_np();
6441 #endif
6442
6443 ; return 0; }
6444 EOF
6445 if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6446   rm -rf conftest*
6447   ol_cv_pthread_threads=yes
6448 else
6449   echo "configure: failed program was:" >&5
6450   cat conftest.$ac_ext >&5
6451   rm -rf conftest*
6452   ol_cv_pthread_threads=no
6453 fi
6454 rm -f conftest*
6455
6456                 # restore the LIBS
6457                 LIBS="$ol_LIBS"
6458                 
6459 fi
6460
6461 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6462
6463                 if test $ol_cv_pthread_threads = yes ; then
6464                         ol_link_pthreads="-threads"
6465                         ol_link_threads=posix
6466                 fi
6467         fi
6468
6469
6470                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6471         if test "$ol_link_threads" = no ; then
6472                 # try -lpthreads -lmach -lexc -lc_r
6473                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6474 echo "configure:6475: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6475 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
6476   echo $ac_n "(cached) $ac_c" 1>&6
6477 else
6478   
6479                         # save the flags
6480                         ol_LIBS="$LIBS"
6481                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6482
6483                         cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486
6487 #include <pthread.h>
6488 #ifndef NULL
6489 #define NULL (void*)0
6490 #endif
6491
6492 int main() {
6493
6494         pthread_t t;
6495
6496 #if HAVE_PTHREADS_D4
6497         pthread_create(&t, pthread_attr_default, NULL, NULL);
6498         pthread_detach( &t );
6499 #else
6500         pthread_create(&t, NULL, NULL, NULL);
6501         pthread_detach( t );
6502 #endif
6503 #ifdef HAVE_LINUX_THREADS
6504         pthread_kill_other_threads_np();
6505 #endif
6506
6507 ; return 0; }
6508 EOF
6509 if { (eval echo configure:6510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6510   rm -rf conftest*
6511   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6512 else
6513   echo "configure: failed program was:" >&5
6514   cat conftest.$ac_ext >&5
6515   rm -rf conftest*
6516   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6517 fi
6518 rm -f conftest*
6519
6520                 # restore the LIBS
6521                 LIBS="$ol_LIBS"
6522                 
6523 fi
6524
6525 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6526
6527                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6528                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6529                         ol_link_threads=posix
6530                 fi
6531         fi
6532
6533                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6534         if test "$ol_link_threads" = no ; then
6535                 # try -lpthreads -lmach -lexc
6536                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6537 echo "configure:6538: checking for pthread link with -lpthreads -lmach -lexc" >&5
6538 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
6539   echo $ac_n "(cached) $ac_c" 1>&6
6540 else
6541   
6542                         # save the flags
6543                         ol_LIBS="$LIBS"
6544                         LIBS="-lpthreads -lmach -lexc $LIBS"
6545
6546                         cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549
6550 #include <pthread.h>
6551 #ifndef NULL
6552 #define NULL (void*)0
6553 #endif
6554
6555 int main() {
6556
6557         pthread_t t;
6558
6559 #if HAVE_PTHREADS_D4
6560         pthread_create(&t, pthread_attr_default, NULL, NULL);
6561         pthread_detach( &t );
6562 #else
6563         pthread_create(&t, NULL, NULL, NULL);
6564         pthread_detach( t );
6565 #endif
6566 #ifdef HAVE_LINUX_THREADS
6567         pthread_kill_other_threads_np();
6568 #endif
6569
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6573   rm -rf conftest*
6574   ol_cv_pthread_lpthreads_lmach_lexc=yes
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   ol_cv_pthread_lpthreads_lmach_lexc=no
6580 fi
6581 rm -f conftest*
6582
6583                 # restore the LIBS
6584                 LIBS="$ol_LIBS"
6585                 
6586 fi
6587
6588 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6589
6590                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6591                         ol_link_pthreads="-lpthreads -lmach -lexc"
6592                         ol_link_threads=posix
6593                 fi
6594         fi
6595
6596                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6597         if test "$ol_link_threads" = no ; then
6598                 # try -lpthreads -lexc
6599                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6600 echo "configure:6601: checking for pthread link with -lpthreads -lexc" >&5
6601 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
6602   echo $ac_n "(cached) $ac_c" 1>&6
6603 else
6604   
6605                         # save the flags
6606                         ol_LIBS="$LIBS"
6607                         LIBS="-lpthreads -lexc $LIBS"
6608
6609                         cat > conftest.$ac_ext <<EOF
6610 #line 6611 "configure"
6611 #include "confdefs.h"
6612
6613 #include <pthread.h>
6614 #ifndef NULL
6615 #define NULL (void*)0
6616 #endif
6617
6618 int main() {
6619
6620         pthread_t t;
6621
6622 #if HAVE_PTHREADS_D4
6623         pthread_create(&t, pthread_attr_default, NULL, NULL);
6624         pthread_detach( &t );
6625 #else
6626         pthread_create(&t, NULL, NULL, NULL);
6627         pthread_detach( t );
6628 #endif
6629 #ifdef HAVE_LINUX_THREADS
6630         pthread_kill_other_threads_np();
6631 #endif
6632
6633 ; return 0; }
6634 EOF
6635 if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6636   rm -rf conftest*
6637   ol_cv_pthread_lpthreads_lexc=yes
6638 else
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641   rm -rf conftest*
6642   ol_cv_pthread_lpthreads_lexc=no
6643 fi
6644 rm -f conftest*
6645
6646                 # restore the LIBS
6647                 LIBS="$ol_LIBS"
6648                 
6649 fi
6650
6651 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6652
6653                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6654                         ol_link_pthreads="-lpthreads -lexc"
6655                         ol_link_threads=posix
6656                 fi
6657         fi
6658
6659
6660                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6661         if test "$ol_link_threads" = no ; then
6662                 # try -lpthreads
6663                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6664 echo "configure:6665: checking for pthread link with -lpthreads" >&5
6665 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
6666   echo $ac_n "(cached) $ac_c" 1>&6
6667 else
6668   
6669                         # save the flags
6670                         ol_LIBS="$LIBS"
6671                         LIBS="-lpthreads $LIBS"
6672
6673                         cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676
6677 #include <pthread.h>
6678 #ifndef NULL
6679 #define NULL (void*)0
6680 #endif
6681
6682 int main() {
6683
6684         pthread_t t;
6685
6686 #if HAVE_PTHREADS_D4
6687         pthread_create(&t, pthread_attr_default, NULL, NULL);
6688         pthread_detach( &t );
6689 #else
6690         pthread_create(&t, NULL, NULL, NULL);
6691         pthread_detach( t );
6692 #endif
6693 #ifdef HAVE_LINUX_THREADS
6694         pthread_kill_other_threads_np();
6695 #endif
6696
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6700   rm -rf conftest*
6701   ol_cv_pthread_lib_lpthreads=yes
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   ol_cv_pthread_lib_lpthreads=no
6707 fi
6708 rm -f conftest*
6709
6710                 # restore the LIBS
6711                 LIBS="$ol_LIBS"
6712                 
6713 fi
6714
6715 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6716
6717                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6718                         ol_link_pthreads="-lpthreads"
6719                         ol_link_threads=posix
6720                 fi
6721         fi
6722
6723
6724                 if test $ol_link_threads != no ; then
6725                         cat >> confdefs.h <<\EOF
6726 #define HAVE_PTHREADS 1
6727 EOF
6728
6729
6730                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6731
6732                                                 save_CPPFLAGS="$CPPFLAGS"
6733                         save_LIBS="$LIBS"
6734                         LIBS="$LTHREAD_LIBS $LIBS"
6735
6736                                                                                                 for ac_func in sched_yield pthread_yield
6737 do
6738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6739 echo "configure:6740: checking for $ac_func" >&5
6740 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char $ac_func(); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 /* We use char because int might match the return type of a gcc2
6751     builtin and then its argument prototype would still apply.  */
6752 char $ac_func();
6753 char (*f)();
6754
6755 int main() {
6756
6757 /* The GNU C library defines this for functions which it implements
6758     to always fail with ENOSYS.  Some functions are actually named
6759     something starting with __ and the normal name is an alias.  */
6760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6761 choke me
6762 #else
6763 f = $ac_func;
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_func_$ac_func=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_func_$ac_func=no"
6776 fi
6777 rm -f conftest*
6778 fi
6779
6780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6783   cat >> confdefs.h <<EOF
6784 #define $ac_tr_func 1
6785 EOF
6786  
6787 else
6788   echo "$ac_t""no" 1>&6
6789 fi
6790 done
6791
6792
6793                         if test $ac_cv_func_sched_yield = no -a \
6794                                 $ac_cv_func_pthread_yield = no ; then
6795                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6796 echo "configure:6797: checking for sched_yield in -lrt" >&5
6797 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
6798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6799   echo $ac_n "(cached) $ac_c" 1>&6
6800 else
6801   ac_save_LIBS="$LIBS"
6802 LIBS="-lrt  $LIBS"
6803 cat > conftest.$ac_ext <<EOF
6804 #line 6805 "configure"
6805 #include "confdefs.h"
6806 /* Override any gcc2 internal prototype to avoid an error.  */
6807 /* We use char because int might match the return type of a gcc2
6808     builtin and then its argument prototype would still apply.  */
6809 char sched_yield();
6810
6811 int main() {
6812 sched_yield()
6813 ; return 0; }
6814 EOF
6815 if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6816   rm -rf conftest*
6817   eval "ac_cv_lib_$ac_lib_var=yes"
6818 else
6819   echo "configure: failed program was:" >&5
6820   cat conftest.$ac_ext >&5
6821   rm -rf conftest*
6822   eval "ac_cv_lib_$ac_lib_var=no"
6823 fi
6824 rm -f conftest*
6825 LIBS="$ac_save_LIBS"
6826
6827 fi
6828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6829   echo "$ac_t""yes" 1>&6
6830   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6831                                         cat >> confdefs.h <<\EOF
6832 #define HAVE_SCHED_YIELD 1
6833 EOF
6834
6835                                         ac_cv_func_sched_yield=yes
6836 else
6837   echo "$ac_t""no" 1>&6
6838 ac_cv_func_sched_yield=no
6839 fi
6840
6841                         fi
6842                         if test $ac_cv_func_sched_yield = no -a \
6843                                 $ac_cv_func_pthread_yield = no ; then
6844                                                                                                 for ac_func in thr_yield
6845 do
6846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6847 echo "configure:6848: checking for $ac_func" >&5
6848 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6849   echo $ac_n "(cached) $ac_c" 1>&6
6850 else
6851   cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854 /* System header to define __stub macros and hopefully few prototypes,
6855     which can conflict with char $ac_func(); below.  */
6856 #include <assert.h>
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char $ac_func();
6861 char (*f)();
6862
6863 int main() {
6864
6865 /* The GNU C library defines this for functions which it implements
6866     to always fail with ENOSYS.  Some functions are actually named
6867     something starting with __ and the normal name is an alias.  */
6868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6869 choke me
6870 #else
6871 f = $ac_func;
6872 #endif
6873
6874 ; return 0; }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6877   rm -rf conftest*
6878   eval "ac_cv_func_$ac_func=yes"
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -rf conftest*
6883   eval "ac_cv_func_$ac_func=no"
6884 fi
6885 rm -f conftest*
6886 fi
6887
6888 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6889   echo "$ac_t""yes" 1>&6
6890     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6891   cat >> confdefs.h <<EOF
6892 #define $ac_tr_func 1
6893 EOF
6894  
6895 else
6896   echo "$ac_t""no" 1>&6
6897 fi
6898 done
6899
6900                         fi
6901                         if test $ac_cv_func_sched_yield = no -a \
6902                                 $ac_cv_func_pthread_yield = no -a \
6903                                 "$ac_cv_func_thr_yield" = no ; then
6904                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6905                         fi
6906
6907                                                 for ac_func in pthread_kill
6908 do
6909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6910 echo "configure:6911: checking for $ac_func" >&5
6911 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914   cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 /* System header to define __stub macros and hopefully few prototypes,
6918     which can conflict with char $ac_func(); below.  */
6919 #include <assert.h>
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 /* We use char because int might match the return type of a gcc2
6922     builtin and then its argument prototype would still apply.  */
6923 char $ac_func();
6924 char (*f)();
6925
6926 int main() {
6927
6928 /* The GNU C library defines this for functions which it implements
6929     to always fail with ENOSYS.  Some functions are actually named
6930     something starting with __ and the normal name is an alias.  */
6931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6932 choke me
6933 #else
6934 f = $ac_func;
6935 #endif
6936
6937 ; return 0; }
6938 EOF
6939 if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6940   rm -rf conftest*
6941   eval "ac_cv_func_$ac_func=yes"
6942 else
6943   echo "configure: failed program was:" >&5
6944   cat conftest.$ac_ext >&5
6945   rm -rf conftest*
6946   eval "ac_cv_func_$ac_func=no"
6947 fi
6948 rm -f conftest*
6949 fi
6950
6951 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6952   echo "$ac_t""yes" 1>&6
6953     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6954   cat >> confdefs.h <<EOF
6955 #define $ac_tr_func 1
6956 EOF
6957  
6958 else
6959   echo "$ac_t""no" 1>&6
6960 fi
6961 done
6962
6963
6964                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6965 echo "configure:6966: checking for pthread_detach with <pthread.h>" >&5
6966 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
6967   echo $ac_n "(cached) $ac_c" 1>&6
6968 else
6969   
6970                                                                 cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973
6974 #include <pthread.h>
6975 #ifndef NULL
6976 #define NULL (void*)0
6977 #endif
6978
6979 int main() {
6980 pthread_detach(NULL);
6981 ; return 0; }
6982 EOF
6983 if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6984   rm -rf conftest*
6985   ol_cv_func_pthread_detach=yes
6986 else
6987   echo "configure: failed program was:" >&5
6988   cat conftest.$ac_ext >&5
6989   rm -rf conftest*
6990   ol_cv_func_pthread_detach=no
6991 fi
6992 rm -f conftest*
6993                         
6994 fi
6995
6996 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6997
6998                         if test $ol_cv_func_pthread_detach = no ; then
6999                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7000                         fi
7001
7002                         cat >> confdefs.h <<\EOF
7003 #define HAVE_PTHREAD_DETACH 1
7004 EOF
7005
7006
7007                                                 for ac_func in \
7008                                 pthread_setconcurrency \
7009                                 pthread_getconcurrency \
7010                                 thr_setconcurrency \
7011                                 thr_getconcurrency \
7012                         
7013 do
7014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7015 echo "configure:7016: checking for $ac_func" >&5
7016 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7017   echo $ac_n "(cached) $ac_c" 1>&6
7018 else
7019   cat > conftest.$ac_ext <<EOF
7020 #line 7021 "configure"
7021 #include "confdefs.h"
7022 /* System header to define __stub macros and hopefully few prototypes,
7023     which can conflict with char $ac_func(); below.  */
7024 #include <assert.h>
7025 /* Override any gcc2 internal prototype to avoid an error.  */
7026 /* We use char because int might match the return type of a gcc2
7027     builtin and then its argument prototype would still apply.  */
7028 char $ac_func();
7029 char (*f)();
7030
7031 int main() {
7032
7033 /* The GNU C library defines this for functions which it implements
7034     to always fail with ENOSYS.  Some functions are actually named
7035     something starting with __ and the normal name is an alias.  */
7036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7037 choke me
7038 #else
7039 f = $ac_func;
7040 #endif
7041
7042 ; return 0; }
7043 EOF
7044 if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7045   rm -rf conftest*
7046   eval "ac_cv_func_$ac_func=yes"
7047 else
7048   echo "configure: failed program was:" >&5
7049   cat conftest.$ac_ext >&5
7050   rm -rf conftest*
7051   eval "ac_cv_func_$ac_func=no"
7052 fi
7053 rm -f conftest*
7054 fi
7055
7056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7057   echo "$ac_t""yes" 1>&6
7058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7059   cat >> confdefs.h <<EOF
7060 #define $ac_tr_func 1
7061 EOF
7062  
7063 else
7064   echo "$ac_t""no" 1>&6
7065 fi
7066 done
7067
7068
7069                         
7070         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7071 echo "configure:7072: checking for pthread_kill_other_threads_np" >&5
7072 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7073   echo $ac_n "(cached) $ac_c" 1>&6
7074 else
7075   cat > conftest.$ac_ext <<EOF
7076 #line 7077 "configure"
7077 #include "confdefs.h"
7078 /* System header to define __stub macros and hopefully few prototypes,
7079     which can conflict with char pthread_kill_other_threads_np(); below.  */
7080 #include <assert.h>
7081 /* Override any gcc2 internal prototype to avoid an error.  */
7082 /* We use char because int might match the return type of a gcc2
7083     builtin and then its argument prototype would still apply.  */
7084 char pthread_kill_other_threads_np();
7085 char (*f)();
7086
7087 int main() {
7088
7089 /* The GNU C library defines this for functions which it implements
7090     to always fail with ENOSYS.  Some functions are actually named
7091     something starting with __ and the normal name is an alias.  */
7092 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7093 choke me
7094 #else
7095 f = pthread_kill_other_threads_np;
7096 #endif
7097
7098 ; return 0; }
7099 EOF
7100 if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7101   rm -rf conftest*
7102   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7103 else
7104   echo "configure: failed program was:" >&5
7105   cat conftest.$ac_ext >&5
7106   rm -rf conftest*
7107   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7108 fi
7109 rm -f conftest*
7110 fi
7111
7112 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7113   echo "$ac_t""yes" 1>&6
7114   :
7115 else
7116   echo "$ac_t""no" 1>&6
7117 fi
7118
7119         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7120 echo "configure:7121: checking for LinuxThreads implementation" >&5
7121 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7125 fi
7126
7127 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7128
7129                         
7130         
7131         
7132         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7133 echo "configure:7134: checking for LinuxThreads consistency" >&5
7134 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7135   echo $ac_n "(cached) $ac_c" 1>&6
7136 else
7137   
7138                 if test $ol_cv_header_linux_threads = yes -a \
7139                         $ol_cv_sys_linux_threads = yes; then
7140                         ol_cv_linux_threads=yes
7141                 elif test $ol_cv_header_linux_threads = no -a \
7142                         $ol_cv_sys_linux_threads = no; then
7143                         ol_cv_linux_threads=no
7144                 else
7145                         ol_cv_linux_threads=error
7146                 fi
7147         
7148 fi
7149
7150 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7151
7152
7153                         if test $ol_cv_linux_threads = error; then
7154                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7155                         fi
7156
7157                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7158 echo "configure:7159: checking if pthread_create() works" >&5
7159 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7160   echo $ac_n "(cached) $ac_c" 1>&6
7161 else
7162   
7163                         if test "$cross_compiling" = yes; then
7164                                 ol_cv_pthread_create_works=yes
7165 else
7166   cat > conftest.$ac_ext <<EOF
7167 #line 7168 "configure"
7168 #include "confdefs.h"
7169
7170 #include <pthread.h>
7171 #ifndef NULL
7172 #define NULL (void*)0
7173 #endif
7174
7175 static void *task(p)
7176         void *p;
7177 {
7178         return (void *) (p == NULL);
7179 }
7180
7181 int main(argc, argv)
7182         int argc;
7183         char **argv;
7184 {
7185         pthread_t t;
7186 #if HAVE_PTHREADS_D4
7187         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7188 #else
7189         exit(pthread_create(&t, NULL, task, NULL));
7190 #endif
7191 }
7192
7193 EOF
7194 if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7195 then
7196   ol_cv_pthread_create_works=yes
7197 else
7198   echo "configure: failed program was:" >&5
7199   cat conftest.$ac_ext >&5
7200   rm -fr conftest*
7201   ol_cv_pthread_create_works=no
7202 fi
7203 rm -fr conftest*
7204 fi
7205
7206 fi
7207
7208 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7209
7210                         if test $ol_cv_pthread_create_works = no ; then
7211                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7212                         fi
7213
7214                                                 if test $ol_with_yielding_select = auto ; then
7215                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7216 echo "configure:7217: checking if select yields when using pthreads" >&5
7217 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7218   echo $ac_n "(cached) $ac_c" 1>&6
7219 else
7220   
7221                                 if test "$cross_compiling" = yes; then
7222   ol_cv_pthread_select_yields=cross
7223 else
7224   cat > conftest.$ac_ext <<EOF
7225 #line 7226 "configure"
7226 #include "confdefs.h"
7227
7228 #include <sys/types.h>
7229 #include <sys/time.h>
7230 #include <unistd.h>
7231 #include <pthread.h>
7232 #ifndef NULL
7233 #define NULL (void*) 0
7234 #endif
7235
7236 static int fildes[2];
7237
7238 static void *task(p)
7239         void *p;
7240 {
7241         int i;
7242         struct timeval tv;
7243
7244         fd_set rfds;
7245
7246         tv.tv_sec=10;
7247         tv.tv_usec=0;
7248
7249         FD_ZERO(&rfds);
7250         FD_SET(fildes[0], &rfds);
7251
7252         /* we're not interested in any fds */
7253         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7254
7255         if(i < 0) {
7256                 perror("select");
7257                 exit(10);
7258         }
7259
7260         exit(0); /* if we exit here, the select blocked the whole process */
7261 }
7262
7263 int main(argc, argv)
7264         int argc;
7265         char **argv;
7266 {
7267         pthread_t t;
7268
7269         /* create a pipe to select */
7270         if(pipe(&fildes[0])) {
7271                 perror("select");
7272                 exit(1);
7273         }
7274
7275 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7276         (void) pthread_setconcurrency(2);
7277 #else
7278 #ifdef HAVE_THR_SETCONCURRENCY
7279         /* Set Solaris LWP concurrency to 2 */
7280         thr_setconcurrency(2);
7281 #endif
7282 #endif
7283
7284 #if HAVE_PTHREADS_D4
7285         pthread_create(&t, pthread_attr_default, task, NULL);
7286 #else
7287         pthread_create(&t, NULL, task, NULL);
7288 #endif
7289
7290 #if HAVE_SCHED_YIELD
7291         sched_yield();  /* make sure task runs first */
7292 #else
7293 #ifdef HAVE_PTHREAD_YIELD
7294         pthread_yield();        /* make sure task runs first */
7295 #endif
7296 #endif
7297
7298         exit(2);
7299 }
7300 EOF
7301 if { (eval echo configure:7302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7302 then
7303   ol_cv_pthread_select_yields=no
7304 else
7305   echo "configure: failed program was:" >&5
7306   cat conftest.$ac_ext >&5
7307   rm -fr conftest*
7308   ol_cv_pthread_select_yields=yes
7309 fi
7310 rm -fr conftest*
7311 fi
7312
7313 fi
7314
7315 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7316
7317                                 if test $ol_cv_pthread_select_yields = cross ; then
7318                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7319                                 fi
7320
7321                                 if test $ol_cv_pthread_select_yields = yes ; then
7322                                         ol_with_yielding_select=yes
7323                                 fi
7324                         fi
7325
7326                                                 CPPFLAGS="$save_CPPFLAGS"
7327                         LIBS="$save_LIBS"
7328                 else
7329                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7330                 fi
7331         fi
7332
7333         if test $ol_with_threads = posix ; then
7334                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7335         fi
7336 fi
7337
7338 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7339         -o $ol_with_threads = mach ; then
7340
7341                 for ac_hdr in mach/cthreads.h
7342 do
7343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7345 echo "configure:7346: checking for $ac_hdr" >&5
7346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7347   echo $ac_n "(cached) $ac_c" 1>&6
7348 else
7349   cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 #include <$ac_hdr>
7353 EOF
7354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7355 { (eval echo configure:7356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7357 if test -z "$ac_err"; then
7358   rm -rf conftest*
7359   eval "ac_cv_header_$ac_safe=yes"
7360 else
7361   echo "$ac_err" >&5
7362   echo "configure: failed program was:" >&5
7363   cat conftest.$ac_ext >&5
7364   rm -rf conftest*
7365   eval "ac_cv_header_$ac_safe=no"
7366 fi
7367 rm -f conftest*
7368 fi
7369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7370   echo "$ac_t""yes" 1>&6
7371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7372   cat >> confdefs.h <<EOF
7373 #define $ac_tr_hdr 1
7374 EOF
7375  
7376 else
7377   echo "$ac_t""no" 1>&6
7378 fi
7379 done
7380
7381         if test $ac_cv_header_mach_cthreads_h = yes ; then
7382                 ol_with_threads=found
7383
7384                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7385 echo "configure:7386: checking for cthread_fork" >&5
7386 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7387   echo $ac_n "(cached) $ac_c" 1>&6
7388 else
7389   cat > conftest.$ac_ext <<EOF
7390 #line 7391 "configure"
7391 #include "confdefs.h"
7392 /* System header to define __stub macros and hopefully few prototypes,
7393     which can conflict with char cthread_fork(); below.  */
7394 #include <assert.h>
7395 /* Override any gcc2 internal prototype to avoid an error.  */
7396 /* We use char because int might match the return type of a gcc2
7397     builtin and then its argument prototype would still apply.  */
7398 char cthread_fork();
7399 char (*f)();
7400
7401 int main() {
7402
7403 /* The GNU C library defines this for functions which it implements
7404     to always fail with ENOSYS.  Some functions are actually named
7405     something starting with __ and the normal name is an alias.  */
7406 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7407 choke me
7408 #else
7409 f = cthread_fork;
7410 #endif
7411
7412 ; return 0; }
7413 EOF
7414 if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7415   rm -rf conftest*
7416   eval "ac_cv_func_cthread_fork=yes"
7417 else
7418   echo "configure: failed program was:" >&5
7419   cat conftest.$ac_ext >&5
7420   rm -rf conftest*
7421   eval "ac_cv_func_cthread_fork=no"
7422 fi
7423 rm -f conftest*
7424 fi
7425
7426 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7427   echo "$ac_t""yes" 1>&6
7428   ol_link_threads=yes
7429 else
7430   echo "$ac_t""no" 1>&6
7431 fi
7432
7433
7434                 if test $ol_link_threads = no ; then
7435                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7436 echo "configure:7437: checking for cthread_fork with -all_load" >&5
7437 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7438   echo $ac_n "(cached) $ac_c" 1>&6
7439 else
7440   
7441                                                                 save_LIBS="$LIBS"
7442                                 LIBS="-all_load $LIBS"
7443                                 cat > conftest.$ac_ext <<EOF
7444 #line 7445 "configure"
7445 #include "confdefs.h"
7446 #include <mach/cthreads.h>
7447 int main() {
7448
7449                                         cthread_fork((void *)0, (void *)0);
7450                                         
7451 ; return 0; }
7452 EOF
7453 if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7454   rm -rf conftest*
7455   ol_cv_cthread_all_load=yes
7456 else
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -rf conftest*
7460   ol_cv_cthread_all_load=no
7461 fi
7462 rm -f conftest*
7463                                                                 LIBS="$save_LIBS"
7464                         
7465 fi
7466
7467 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7468
7469                         if test $ol_cv_cthread_all_load = yes ; then
7470                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7471                                 ol_link_threads=mach
7472                         fi
7473                 fi
7474
7475                 if test $ol_link_threads != no ; then
7476                         : check for cthread specific functionality here
7477                         cat >> confdefs.h <<\EOF
7478 #define HAVE_MACH_CTHREADS 1
7479 EOF
7480
7481                 else
7482                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7483                 fi
7484         fi
7485
7486         if test $ol_with_threads = mach ; then
7487                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7488         fi
7489 fi
7490
7491 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7492         -o $ol_with_threads = lwp ; then
7493
7494                 for ac_hdr in thread.h synch.h
7495 do
7496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7498 echo "configure:7499: checking for $ac_hdr" >&5
7499 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 #include <$ac_hdr>
7506 EOF
7507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7508 { (eval echo configure:7509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7510 if test -z "$ac_err"; then
7511   rm -rf conftest*
7512   eval "ac_cv_header_$ac_safe=yes"
7513 else
7514   echo "$ac_err" >&5
7515   echo "configure: failed program was:" >&5
7516   cat conftest.$ac_ext >&5
7517   rm -rf conftest*
7518   eval "ac_cv_header_$ac_safe=no"
7519 fi
7520 rm -f conftest*
7521 fi
7522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7523   echo "$ac_t""yes" 1>&6
7524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7525   cat >> confdefs.h <<EOF
7526 #define $ac_tr_hdr 1
7527 EOF
7528  
7529 else
7530   echo "$ac_t""no" 1>&6
7531 fi
7532 done
7533
7534         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7535                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7536 echo "configure:7537: checking for thr_create in -lthread" >&5
7537 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
7538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7539   echo $ac_n "(cached) $ac_c" 1>&6
7540 else
7541   ac_save_LIBS="$LIBS"
7542 LIBS="-lthread  $LIBS"
7543 cat > conftest.$ac_ext <<EOF
7544 #line 7545 "configure"
7545 #include "confdefs.h"
7546 /* Override any gcc2 internal prototype to avoid an error.  */
7547 /* We use char because int might match the return type of a gcc2
7548     builtin and then its argument prototype would still apply.  */
7549 char thr_create();
7550
7551 int main() {
7552 thr_create()
7553 ; return 0; }
7554 EOF
7555 if { (eval echo configure:7556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7556   rm -rf conftest*
7557   eval "ac_cv_lib_$ac_lib_var=yes"
7558 else
7559   echo "configure: failed program was:" >&5
7560   cat conftest.$ac_ext >&5
7561   rm -rf conftest*
7562   eval "ac_cv_lib_$ac_lib_var=no"
7563 fi
7564 rm -f conftest*
7565 LIBS="$ac_save_LIBS"
7566
7567 fi
7568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7569   echo "$ac_t""yes" 1>&6
7570   have_thr=yes
7571 else
7572   echo "$ac_t""no" 1>&6
7573 have_thr=no
7574 fi
7575
7576
7577                 if test $have_thr = yes ; then
7578                         cat >> confdefs.h <<\EOF
7579 #define HAVE_THR 1
7580 EOF
7581
7582                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7583                         ol_link_threads=thr
7584
7585                         if test $ol_with_yielding_select = auto ; then
7586                                 ol_with_yielding_select=yes
7587                         fi
7588
7589                                                 for ac_func in \
7590                                 thr_setconcurrency \
7591                                 thr_getconcurrency \
7592                         
7593 do
7594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7595 echo "configure:7596: checking for $ac_func" >&5
7596 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7597   echo $ac_n "(cached) $ac_c" 1>&6
7598 else
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 /* System header to define __stub macros and hopefully few prototypes,
7603     which can conflict with char $ac_func(); below.  */
7604 #include <assert.h>
7605 /* Override any gcc2 internal prototype to avoid an error.  */
7606 /* We use char because int might match the return type of a gcc2
7607     builtin and then its argument prototype would still apply.  */
7608 char $ac_func();
7609 char (*f)();
7610
7611 int main() {
7612
7613 /* The GNU C library defines this for functions which it implements
7614     to always fail with ENOSYS.  Some functions are actually named
7615     something starting with __ and the normal name is an alias.  */
7616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7617 choke me
7618 #else
7619 f = $ac_func;
7620 #endif
7621
7622 ; return 0; }
7623 EOF
7624 if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7625   rm -rf conftest*
7626   eval "ac_cv_func_$ac_func=yes"
7627 else
7628   echo "configure: failed program was:" >&5
7629   cat conftest.$ac_ext >&5
7630   rm -rf conftest*
7631   eval "ac_cv_func_$ac_func=no"
7632 fi
7633 rm -f conftest*
7634 fi
7635
7636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7637   echo "$ac_t""yes" 1>&6
7638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7639   cat >> confdefs.h <<EOF
7640 #define $ac_tr_func 1
7641 EOF
7642  
7643 else
7644   echo "$ac_t""no" 1>&6
7645 fi
7646 done
7647
7648                 fi
7649         fi
7650
7651                 for ac_hdr in lwp/lwp.h
7652 do
7653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7655 echo "configure:7656: checking for $ac_hdr" >&5
7656 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7657   echo $ac_n "(cached) $ac_c" 1>&6
7658 else
7659   cat > conftest.$ac_ext <<EOF
7660 #line 7661 "configure"
7661 #include "confdefs.h"
7662 #include <$ac_hdr>
7663 EOF
7664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7665 { (eval echo configure:7666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7667 if test -z "$ac_err"; then
7668   rm -rf conftest*
7669   eval "ac_cv_header_$ac_safe=yes"
7670 else
7671   echo "$ac_err" >&5
7672   echo "configure: failed program was:" >&5
7673   cat conftest.$ac_ext >&5
7674   rm -rf conftest*
7675   eval "ac_cv_header_$ac_safe=no"
7676 fi
7677 rm -f conftest*
7678 fi
7679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7680   echo "$ac_t""yes" 1>&6
7681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7682   cat >> confdefs.h <<EOF
7683 #define $ac_tr_hdr 1
7684 EOF
7685  
7686 else
7687   echo "$ac_t""no" 1>&6
7688 fi
7689 done
7690
7691         if test $ac_cv_header_lwp_lwp_h = yes ; then
7692                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7693 echo "configure:7694: checking for lwp_create in -llwp" >&5
7694 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
7695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7696   echo $ac_n "(cached) $ac_c" 1>&6
7697 else
7698   ac_save_LIBS="$LIBS"
7699 LIBS="-llwp  $LIBS"
7700 cat > conftest.$ac_ext <<EOF
7701 #line 7702 "configure"
7702 #include "confdefs.h"
7703 /* Override any gcc2 internal prototype to avoid an error.  */
7704 /* We use char because int might match the return type of a gcc2
7705     builtin and then its argument prototype would still apply.  */
7706 char lwp_create();
7707
7708 int main() {
7709 lwp_create()
7710 ; return 0; }
7711 EOF
7712 if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7713   rm -rf conftest*
7714   eval "ac_cv_lib_$ac_lib_var=yes"
7715 else
7716   echo "configure: failed program was:" >&5
7717   cat conftest.$ac_ext >&5
7718   rm -rf conftest*
7719   eval "ac_cv_lib_$ac_lib_var=no"
7720 fi
7721 rm -f conftest*
7722 LIBS="$ac_save_LIBS"
7723
7724 fi
7725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7726   echo "$ac_t""yes" 1>&6
7727   have_lwp=yes
7728 else
7729   echo "$ac_t""no" 1>&6
7730 have_lwp=no
7731 fi
7732
7733
7734                 if test $have_lwp = yes ; then
7735                         cat >> confdefs.h <<\EOF
7736 #define HAVE_LWP 1
7737 EOF
7738
7739                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7740                         ol_link_threads=lwp
7741
7742                         if test $ol_with_yielding_select = auto ; then
7743                                 ol_with_yielding_select=no
7744                         fi
7745                 fi
7746         fi
7747 fi
7748
7749 if test $ol_with_yielding_select = yes ; then
7750         cat >> confdefs.h <<\EOF
7751 #define HAVE_YIELDING_SELECT 1
7752 EOF
7753
7754 fi
7755
7756 if test $ol_with_threads = manual ; then
7757                 ol_link_threads=yes
7758
7759         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7760
7761         for ac_hdr in pthread.h sched.h
7762 do
7763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7765 echo "configure:7766: checking for $ac_hdr" >&5
7766 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7767   echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769   cat > conftest.$ac_ext <<EOF
7770 #line 7771 "configure"
7771 #include "confdefs.h"
7772 #include <$ac_hdr>
7773 EOF
7774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7775 { (eval echo configure:7776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7777 if test -z "$ac_err"; then
7778   rm -rf conftest*
7779   eval "ac_cv_header_$ac_safe=yes"
7780 else
7781   echo "$ac_err" >&5
7782   echo "configure: failed program was:" >&5
7783   cat conftest.$ac_ext >&5
7784   rm -rf conftest*
7785   eval "ac_cv_header_$ac_safe=no"
7786 fi
7787 rm -f conftest*
7788 fi
7789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7790   echo "$ac_t""yes" 1>&6
7791     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7792   cat >> confdefs.h <<EOF
7793 #define $ac_tr_hdr 1
7794 EOF
7795  
7796 else
7797   echo "$ac_t""no" 1>&6
7798 fi
7799 done
7800
7801         for ac_func in sched_yield pthread_yield
7802 do
7803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7804 echo "configure:7805: checking for $ac_func" >&5
7805 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7806   echo $ac_n "(cached) $ac_c" 1>&6
7807 else
7808   cat > conftest.$ac_ext <<EOF
7809 #line 7810 "configure"
7810 #include "confdefs.h"
7811 /* System header to define __stub macros and hopefully few prototypes,
7812     which can conflict with char $ac_func(); below.  */
7813 #include <assert.h>
7814 /* Override any gcc2 internal prototype to avoid an error.  */
7815 /* We use char because int might match the return type of a gcc2
7816     builtin and then its argument prototype would still apply.  */
7817 char $ac_func();
7818 char (*f)();
7819
7820 int main() {
7821
7822 /* The GNU C library defines this for functions which it implements
7823     to always fail with ENOSYS.  Some functions are actually named
7824     something starting with __ and the normal name is an alias.  */
7825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7826 choke me
7827 #else
7828 f = $ac_func;
7829 #endif
7830
7831 ; return 0; }
7832 EOF
7833 if { (eval echo configure:7834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7834   rm -rf conftest*
7835   eval "ac_cv_func_$ac_func=yes"
7836 else
7837   echo "configure: failed program was:" >&5
7838   cat conftest.$ac_ext >&5
7839   rm -rf conftest*
7840   eval "ac_cv_func_$ac_func=no"
7841 fi
7842 rm -f conftest*
7843 fi
7844
7845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7846   echo "$ac_t""yes" 1>&6
7847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7848   cat >> confdefs.h <<EOF
7849 #define $ac_tr_func 1
7850 EOF
7851  
7852 else
7853   echo "$ac_t""no" 1>&6
7854 fi
7855 done
7856
7857         
7858         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7859 echo "configure:7860: checking for LinuxThreads pthread.h" >&5
7860 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7861   echo $ac_n "(cached) $ac_c" 1>&6
7862 else
7863   cat > conftest.$ac_ext <<EOF
7864 #line 7865 "configure"
7865 #include "confdefs.h"
7866 #include <pthread.h>
7867 EOF
7868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7869   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7870   rm -rf conftest*
7871   ol_cv_header_linux_threads=yes
7872 else
7873   rm -rf conftest*
7874   ol_cv_header_linux_threads=no
7875 fi
7876 rm -f conftest*
7877
7878                 
7879 fi
7880
7881 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7882         if test $ol_cv_header_linux_threads = yes; then
7883                 cat >> confdefs.h <<\EOF
7884 #define HAVE_LINUX_THREADS 1
7885 EOF
7886
7887         fi
7888
7889
7890         for ac_hdr in mach/cthreads.h
7891 do
7892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7894 echo "configure:7895: checking for $ac_hdr" >&5
7895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7896   echo $ac_n "(cached) $ac_c" 1>&6
7897 else
7898   cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 #include <$ac_hdr>
7902 EOF
7903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7904 { (eval echo configure:7905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7906 if test -z "$ac_err"; then
7907   rm -rf conftest*
7908   eval "ac_cv_header_$ac_safe=yes"
7909 else
7910   echo "$ac_err" >&5
7911   echo "configure: failed program was:" >&5
7912   cat conftest.$ac_ext >&5
7913   rm -rf conftest*
7914   eval "ac_cv_header_$ac_safe=no"
7915 fi
7916 rm -f conftest*
7917 fi
7918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7919   echo "$ac_t""yes" 1>&6
7920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7921   cat >> confdefs.h <<EOF
7922 #define $ac_tr_hdr 1
7923 EOF
7924  
7925 else
7926   echo "$ac_t""no" 1>&6
7927 fi
7928 done
7929
7930         for ac_hdr in lwp/lwp.h
7931 do
7932 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7933 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7934 echo "configure:7935: checking for $ac_hdr" >&5
7935 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938   cat > conftest.$ac_ext <<EOF
7939 #line 7940 "configure"
7940 #include "confdefs.h"
7941 #include <$ac_hdr>
7942 EOF
7943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7944 { (eval echo configure:7945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7946 if test -z "$ac_err"; then
7947   rm -rf conftest*
7948   eval "ac_cv_header_$ac_safe=yes"
7949 else
7950   echo "$ac_err" >&5
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -rf conftest*
7954   eval "ac_cv_header_$ac_safe=no"
7955 fi
7956 rm -f conftest*
7957 fi
7958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7959   echo "$ac_t""yes" 1>&6
7960     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7961   cat >> confdefs.h <<EOF
7962 #define $ac_tr_hdr 1
7963 EOF
7964  
7965 else
7966   echo "$ac_t""no" 1>&6
7967 fi
7968 done
7969
7970         for ac_hdr in thread.h synch.h
7971 do
7972 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7973 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7974 echo "configure:7975: checking for $ac_hdr" >&5
7975 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7976   echo $ac_n "(cached) $ac_c" 1>&6
7977 else
7978   cat > conftest.$ac_ext <<EOF
7979 #line 7980 "configure"
7980 #include "confdefs.h"
7981 #include <$ac_hdr>
7982 EOF
7983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7984 { (eval echo configure:7985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7986 if test -z "$ac_err"; then
7987   rm -rf conftest*
7988   eval "ac_cv_header_$ac_safe=yes"
7989 else
7990   echo "$ac_err" >&5
7991   echo "configure: failed program was:" >&5
7992   cat conftest.$ac_ext >&5
7993   rm -rf conftest*
7994   eval "ac_cv_header_$ac_safe=no"
7995 fi
7996 rm -f conftest*
7997 fi
7998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7999   echo "$ac_t""yes" 1>&6
8000     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8001   cat >> confdefs.h <<EOF
8002 #define $ac_tr_hdr 1
8003 EOF
8004  
8005 else
8006   echo "$ac_t""no" 1>&6
8007 fi
8008 done
8009
8010 fi
8011
8012 if test $ol_link_threads != no ; then  
8013                         cat >> confdefs.h <<\EOF
8014 #define REENTRANT 1
8015 EOF
8016
8017         cat >> confdefs.h <<\EOF
8018 #define _REENTRANT 1
8019 EOF
8020
8021         cat >> confdefs.h <<\EOF
8022 #define THREAD_SAFE 1
8023 EOF
8024
8025         cat >> confdefs.h <<\EOF
8026 #define _THREAD_SAFE 1
8027 EOF
8028
8029         cat >> confdefs.h <<\EOF
8030 #define THREADSAFE 1
8031 EOF
8032
8033         cat >> confdefs.h <<\EOF
8034 #define _THREADSAFE 1
8035 EOF
8036
8037         cat >> confdefs.h <<\EOF
8038 #define _SGI_MP_SOURCE 1
8039 EOF
8040
8041
8042                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8043 echo "configure:8044: checking for thread specific errno" >&5
8044 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8045   echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047   
8048                 cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051 #include <errno.h>
8052 int main() {
8053 errno = 0;
8054 ; return 0; }
8055 EOF
8056 if { (eval echo configure:8057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8057   rm -rf conftest*
8058   ol_cv_errno_thread_specific=yes
8059 else
8060   echo "configure: failed program was:" >&5
8061   cat conftest.$ac_ext >&5
8062   rm -rf conftest*
8063   ol_cv_errno_thread_specific=no
8064 fi
8065 rm -f conftest*
8066         
8067 fi
8068
8069 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8070
8071                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8072 echo "configure:8073: checking for thread specific h_errno" >&5
8073 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8074   echo $ac_n "(cached) $ac_c" 1>&6
8075 else
8076   
8077                 cat > conftest.$ac_ext <<EOF
8078 #line 8079 "configure"
8079 #include "confdefs.h"
8080 #include <netdb.h>
8081 int main() {
8082 h_errno = 0;
8083 ; return 0; }
8084 EOF
8085 if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8086   rm -rf conftest*
8087   ol_cv_h_errno_thread_specific=yes
8088 else
8089   echo "configure: failed program was:" >&5
8090   cat conftest.$ac_ext >&5
8091   rm -rf conftest*
8092   ol_cv_h_errno_thread_specific=no
8093 fi
8094 rm -f conftest*
8095         
8096 fi
8097
8098 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8099
8100         if test $ol_cv_errno_thread_specific != yes \
8101                 -o $ol_cv_h_errno_thread_specific != yes ; then
8102                 LIBS="$LTHREAD_LIBS $LIBS"
8103                 LTHREAD_LIBS=""
8104         fi
8105
8106 fi  
8107
8108 if test $ol_link_threads = no ; then
8109         if test $ol_with_threads = yes ; then
8110                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8111         fi
8112
8113         if test $ol_with_threads = auto ; then
8114                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8115                 ol_with_threads=no
8116         fi
8117
8118         cat >> confdefs.h <<\EOF
8119 #define NO_THREADS 1
8120 EOF
8121
8122         LTHREAD_LIBS=""
8123 fi
8124
8125 if test $ol_link_threads != no ; then
8126         cat >> confdefs.h <<\EOF
8127 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8128 EOF
8129
8130 fi
8131
8132
8133 ol_link_ldbm=no 
8134 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8135         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8136 echo "configure:8137: checking for DB2 library" >&5
8137 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8138   echo $ac_n "(cached) $ac_c" 1>&6
8139 else
8140         ol_LIBS="$LIBS"
8141         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8142 echo "configure:8143: checking for db_open in -ldb" >&5
8143 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   ac_save_LIBS="$LIBS"
8148 LIBS="-ldb  $LIBS"
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* Override any gcc2 internal prototype to avoid an error.  */
8153 /* We use char because int might match the return type of a gcc2
8154     builtin and then its argument prototype would still apply.  */
8155 char db_open();
8156
8157 int main() {
8158 db_open()
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   eval "ac_cv_lib_$ac_lib_var=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=no"
8169 fi
8170 rm -f conftest*
8171 LIBS="$ac_save_LIBS"
8172
8173 fi
8174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8175   echo "$ac_t""yes" 1>&6
8176   ol_cv_lib_db2=-ldb
8177 else
8178   echo "$ac_t""no" 1>&6
8179 ol_cv_lib_db2=no
8180 fi
8181
8182         LIBS="$ol_LIBS"
8183
8184 fi
8185
8186 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8187
8188 for ac_hdr in db.h
8189 do
8190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8192 echo "configure:8193: checking for $ac_hdr" >&5
8193 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199 #include <$ac_hdr>
8200 EOF
8201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8202 { (eval echo configure:8203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8204 if test -z "$ac_err"; then
8205   rm -rf conftest*
8206   eval "ac_cv_header_$ac_safe=yes"
8207 else
8208   echo "$ac_err" >&5
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   eval "ac_cv_header_$ac_safe=no"
8213 fi
8214 rm -f conftest*
8215 fi
8216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8217   echo "$ac_t""yes" 1>&6
8218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8219   cat >> confdefs.h <<EOF
8220 #define $ac_tr_hdr 1
8221 EOF
8222  
8223 else
8224   echo "$ac_t""no" 1>&6
8225 fi
8226 done
8227
8228 if test $ac_cv_header_db_h = yes ; then
8229         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8230 echo "configure:8231: checking if db.h is DB2" >&5
8231 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8232   echo $ac_n "(cached) $ac_c" 1>&6
8233 else
8234   
8235                 cat > conftest.$ac_ext <<EOF
8236 #line 8237 "configure"
8237 #include "confdefs.h"
8238
8239 #                       include <db.h>
8240                         /* this check could be improved */
8241 #                       ifdef DB_VERSION_MAJOR
8242 #                               if DB_VERSION_MAJOR == 2
8243                                         __db_version_2
8244 #                               endif
8245 #                       endif
8246                 
8247 EOF
8248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8249   egrep "__db_version_2" >/dev/null 2>&1; then
8250   rm -rf conftest*
8251   ol_cv_header_db2=yes
8252 else
8253   rm -rf conftest*
8254   ol_cv_header_db2=no
8255 fi
8256 rm -f conftest*
8257
8258 fi
8259
8260 echo "$ac_t""$ol_cv_header_db2" 1>&6
8261 else
8262         ol_cv_header_db2=no
8263 fi
8264
8265
8266  
8267  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8268 echo "configure:8269: checking for Berkeley DB2" >&5
8269 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   
8273         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8274                 ol_cv_berkeley_db2=no
8275         else
8276                 ol_cv_berkeley_db2=yes
8277         fi
8278
8279 fi
8280
8281 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8282  if test $ol_cv_berkeley_db2 = yes ; then
8283         cat >> confdefs.h <<\EOF
8284 #define HAVE_BERKELEY_DB2 1
8285 EOF
8286
8287  fi
8288
8289
8290         if test $ol_cv_berkeley_db2 = yes ; then
8291                 ol_link_ldbm=db2
8292                 ol_with_ldbm_api=db2
8293
8294                 if test $ol_with_ldbm_type = hash ; then
8295                         cat >> confdefs.h <<\EOF
8296 #define LDBM_USE_DBHASH 1
8297 EOF
8298
8299                 else
8300                         cat >> confdefs.h <<\EOF
8301 #define LDBM_USE_DBBTREE 1
8302 EOF
8303
8304                 fi
8305
8306                                                 if test $ol_cv_lib_db2 != yes ; then
8307                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8308                 fi
8309         fi
8310 fi
8311
8312 ol_link_bdb2=no
8313 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8314         ol_link_bdb2=yes
8315 fi
8316
8317 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8318         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8319 echo "configure:8320: checking for Berkeley DB library" >&5
8320 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8321   echo $ac_n "(cached) $ac_c" 1>&6
8322 else
8323   
8324         for ac_hdr in db1/db.h
8325 do
8326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8328 echo "configure:8329: checking for $ac_hdr" >&5
8329 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8330   echo $ac_n "(cached) $ac_c" 1>&6
8331 else
8332   cat > conftest.$ac_ext <<EOF
8333 #line 8334 "configure"
8334 #include "confdefs.h"
8335 #include <$ac_hdr>
8336 EOF
8337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8338 { (eval echo configure:8339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8340 if test -z "$ac_err"; then
8341   rm -rf conftest*
8342   eval "ac_cv_header_$ac_safe=yes"
8343 else
8344   echo "$ac_err" >&5
8345   echo "configure: failed program was:" >&5
8346   cat conftest.$ac_ext >&5
8347   rm -rf conftest*
8348   eval "ac_cv_header_$ac_safe=no"
8349 fi
8350 rm -f conftest*
8351 fi
8352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8353   echo "$ac_t""yes" 1>&6
8354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8355   cat >> confdefs.h <<EOF
8356 #define $ac_tr_hdr 1
8357 EOF
8358  
8359 else
8360   echo "$ac_t""no" 1>&6
8361 fi
8362 done
8363
8364         ol_LIBS="$LIBS"
8365         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8366 echo "configure:8367: checking for dbopen" >&5
8367 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8368   echo $ac_n "(cached) $ac_c" 1>&6
8369 else
8370   cat > conftest.$ac_ext <<EOF
8371 #line 8372 "configure"
8372 #include "confdefs.h"
8373 /* System header to define __stub macros and hopefully few prototypes,
8374     which can conflict with char dbopen(); below.  */
8375 #include <assert.h>
8376 /* Override any gcc2 internal prototype to avoid an error.  */
8377 /* We use char because int might match the return type of a gcc2
8378     builtin and then its argument prototype would still apply.  */
8379 char dbopen();
8380 char (*f)();
8381
8382 int main() {
8383
8384 /* The GNU C library defines this for functions which it implements
8385     to always fail with ENOSYS.  Some functions are actually named
8386     something starting with __ and the normal name is an alias.  */
8387 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8388 choke me
8389 #else
8390 f = dbopen;
8391 #endif
8392
8393 ; return 0; }
8394 EOF
8395 if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8396   rm -rf conftest*
8397   eval "ac_cv_func_dbopen=yes"
8398 else
8399   echo "configure: failed program was:" >&5
8400   cat conftest.$ac_ext >&5
8401   rm -rf conftest*
8402   eval "ac_cv_func_dbopen=no"
8403 fi
8404 rm -f conftest*
8405 fi
8406
8407 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8408   echo "$ac_t""yes" 1>&6
8409   ol_cv_lib_db=yes
8410 else
8411   echo "$ac_t""no" 1>&6
8412
8413                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8414 echo "configure:8415: checking for dbopen in -ldb1" >&5
8415 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   ac_save_LIBS="$LIBS"
8420 LIBS="-ldb1  $LIBS"
8421 cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char dbopen();
8428
8429 int main() {
8430 dbopen()
8431 ; return 0; }
8432 EOF
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=yes"
8436 else
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_lib_$ac_lib_var=no"
8441 fi
8442 rm -f conftest*
8443 LIBS="$ac_save_LIBS"
8444
8445 fi
8446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8447   echo "$ac_t""yes" 1>&6
8448   ol_cv_lib_db=-ldb1
8449 else
8450   echo "$ac_t""no" 1>&6
8451
8452                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8453 echo "configure:8454: checking for dbopen in -ldb" >&5
8454 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
8455 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8456   echo $ac_n "(cached) $ac_c" 1>&6
8457 else
8458   ac_save_LIBS="$LIBS"
8459 LIBS="-ldb  $LIBS"
8460 cat > conftest.$ac_ext <<EOF
8461 #line 8462 "configure"
8462 #include "confdefs.h"
8463 /* Override any gcc2 internal prototype to avoid an error.  */
8464 /* We use char because int might match the return type of a gcc2
8465     builtin and then its argument prototype would still apply.  */
8466 char dbopen();
8467
8468 int main() {
8469 dbopen()
8470 ; return 0; }
8471 EOF
8472 if { (eval echo configure:8473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8473   rm -rf conftest*
8474   eval "ac_cv_lib_$ac_lib_var=yes"
8475 else
8476   echo "configure: failed program was:" >&5
8477   cat conftest.$ac_ext >&5
8478   rm -rf conftest*
8479   eval "ac_cv_lib_$ac_lib_var=no"
8480 fi
8481 rm -f conftest*
8482 LIBS="$ac_save_LIBS"
8483
8484 fi
8485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8486   echo "$ac_t""yes" 1>&6
8487   ol_cv_lib_db=-ldb
8488 else
8489   echo "$ac_t""no" 1>&6
8490 ol_cv_lib_db=no
8491 fi
8492
8493                 
8494 fi
8495
8496         
8497 fi
8498
8499         LIBS="$ol_LIBS"
8500
8501 fi
8502
8503 echo "$ac_t""$ol_cv_lib_db" 1>&6
8504
8505
8506 for ac_hdr in db_185.h
8507 do
8508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8510 echo "configure:8511: checking for $ac_hdr" >&5
8511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8512   echo $ac_n "(cached) $ac_c" 1>&6
8513 else
8514   cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <$ac_hdr>
8518 EOF
8519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8520 { (eval echo configure:8521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8522 if test -z "$ac_err"; then
8523   rm -rf conftest*
8524   eval "ac_cv_header_$ac_safe=yes"
8525 else
8526   echo "$ac_err" >&5
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_header_$ac_safe=no"
8531 fi
8532 rm -f conftest*
8533 fi
8534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8535   echo "$ac_t""yes" 1>&6
8536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8537   cat >> confdefs.h <<EOF
8538 #define $ac_tr_hdr 1
8539 EOF
8540  
8541 else
8542   echo "$ac_t""no" 1>&6
8543 fi
8544 done
8545
8546 if test "$ol_cv_header_db2" = yes ; then
8547         
8548         ol_cv_header_db=$ac_cv_header_db_185_h
8549 else
8550         ol_cv_header_db=$ac_cv_header_db_h
8551 fi
8552
8553
8554  
8555  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8556 echo "configure:8557: checking for Berkeley DB" >&5
8557 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
8558   echo $ac_n "(cached) $ac_c" 1>&6
8559 else
8560   
8561         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8562                 ol_cv_berkeley_db=no
8563         else
8564                 ol_cv_berkeley_db=yes
8565         fi
8566
8567 fi
8568
8569 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8570  if test $ol_cv_berkeley_db = yes ; then
8571         cat >> confdefs.h <<\EOF
8572 #define HAVE_BERKELEY_DB 1
8573 EOF
8574
8575  fi
8576
8577
8578         if test $ol_cv_berkeley_db = yes ; then
8579                 ol_link_ldbm=db
8580                 ol_with_ldbm_api=db
8581
8582                 if test $ol_with_ldbm_type = hash ; then
8583                         cat >> confdefs.h <<\EOF
8584 #define LDBM_USE_DBHASH 1
8585 EOF
8586
8587                 else
8588                         cat >> confdefs.h <<\EOF
8589 #define LDBM_USE_DBBTREE 1
8590 EOF
8591
8592                 fi
8593
8594                                                 if test $ol_cv_lib_db != yes ; then
8595                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8596                 fi
8597         fi
8598 fi
8599
8600 if test $ol_with_ldbm_api = manual ; then
8601                 ol_link_ldbm=yes
8602
8603         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8604
8605         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8606 do
8607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8609 echo "configure:8610: checking for $ac_hdr" >&5
8610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8611   echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8613   cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 #include <$ac_hdr>
8617 EOF
8618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8619 { (eval echo configure:8620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8621 if test -z "$ac_err"; then
8622   rm -rf conftest*
8623   eval "ac_cv_header_$ac_safe=yes"
8624 else
8625   echo "$ac_err" >&5
8626   echo "configure: failed program was:" >&5
8627   cat conftest.$ac_ext >&5
8628   rm -rf conftest*
8629   eval "ac_cv_header_$ac_safe=no"
8630 fi
8631 rm -f conftest*
8632 fi
8633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8634   echo "$ac_t""yes" 1>&6
8635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8636   cat >> confdefs.h <<EOF
8637 #define $ac_tr_hdr 1
8638 EOF
8639  
8640 else
8641   echo "$ac_t""no" 1>&6
8642 fi
8643 done
8644
8645 fi
8646
8647 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8648         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8649         ol_with_ldbm_api=none
8650 fi
8651
8652 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8653         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8654 echo "configure:8655: checking for MDBM library" >&5
8655 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
8656   echo $ac_n "(cached) $ac_c" 1>&6
8657 else
8658         ol_LIBS="$LIBS"
8659         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8660 echo "configure:8661: checking for mdbm_set_chain" >&5
8661 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
8662   echo $ac_n "(cached) $ac_c" 1>&6
8663 else
8664   cat > conftest.$ac_ext <<EOF
8665 #line 8666 "configure"
8666 #include "confdefs.h"
8667 /* System header to define __stub macros and hopefully few prototypes,
8668     which can conflict with char mdbm_set_chain(); below.  */
8669 #include <assert.h>
8670 /* Override any gcc2 internal prototype to avoid an error.  */
8671 /* We use char because int might match the return type of a gcc2
8672     builtin and then its argument prototype would still apply.  */
8673 char mdbm_set_chain();
8674 char (*f)();
8675
8676 int main() {
8677
8678 /* The GNU C library defines this for functions which it implements
8679     to always fail with ENOSYS.  Some functions are actually named
8680     something starting with __ and the normal name is an alias.  */
8681 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8682 choke me
8683 #else
8684 f = mdbm_set_chain;
8685 #endif
8686
8687 ; return 0; }
8688 EOF
8689 if { (eval echo configure:8690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8690   rm -rf conftest*
8691   eval "ac_cv_func_mdbm_set_chain=yes"
8692 else
8693   echo "configure: failed program was:" >&5
8694   cat conftest.$ac_ext >&5
8695   rm -rf conftest*
8696   eval "ac_cv_func_mdbm_set_chain=no"
8697 fi
8698 rm -f conftest*
8699 fi
8700
8701 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8702   echo "$ac_t""yes" 1>&6
8703   ol_cv_lib_mdbm=yes
8704 else
8705   echo "$ac_t""no" 1>&6
8706
8707                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8708 echo "configure:8709: checking for mdbm_set_chain in -lmdbm" >&5
8709 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
8710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   ac_save_LIBS="$LIBS"
8714 LIBS="-lmdbm  $LIBS"
8715 cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8718 /* Override any gcc2 internal prototype to avoid an error.  */
8719 /* We use char because int might match the return type of a gcc2
8720     builtin and then its argument prototype would still apply.  */
8721 char mdbm_set_chain();
8722
8723 int main() {
8724 mdbm_set_chain()
8725 ; return 0; }
8726 EOF
8727 if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8728   rm -rf conftest*
8729   eval "ac_cv_lib_$ac_lib_var=yes"
8730 else
8731   echo "configure: failed program was:" >&5
8732   cat conftest.$ac_ext >&5
8733   rm -rf conftest*
8734   eval "ac_cv_lib_$ac_lib_var=no"
8735 fi
8736 rm -f conftest*
8737 LIBS="$ac_save_LIBS"
8738
8739 fi
8740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8741   echo "$ac_t""yes" 1>&6
8742   ol_cv_lib_mdbm=-lmdbm
8743 else
8744   echo "$ac_t""no" 1>&6
8745 ol_cv_lib_mdbm=no
8746 fi
8747
8748         
8749 fi
8750
8751         LIBS="$ol_LIBS"
8752
8753 fi
8754
8755 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8756
8757
8758  for ac_hdr in mdbm.h
8759 do
8760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8762 echo "configure:8763: checking for $ac_hdr" >&5
8763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <$ac_hdr>
8770 EOF
8771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8772 { (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8774 if test -z "$ac_err"; then
8775   rm -rf conftest*
8776   eval "ac_cv_header_$ac_safe=yes"
8777 else
8778   echo "$ac_err" >&5
8779   echo "configure: failed program was:" >&5
8780   cat conftest.$ac_ext >&5
8781   rm -rf conftest*
8782   eval "ac_cv_header_$ac_safe=no"
8783 fi
8784 rm -f conftest*
8785 fi
8786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8787   echo "$ac_t""yes" 1>&6
8788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8789   cat >> confdefs.h <<EOF
8790 #define $ac_tr_hdr 1
8791 EOF
8792  
8793 else
8794   echo "$ac_t""no" 1>&6
8795 fi
8796 done
8797
8798  echo $ac_n "checking for db""... $ac_c" 1>&6
8799 echo "configure:8800: checking for db" >&5
8800 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
8801   echo $ac_n "(cached) $ac_c" 1>&6
8802 else
8803   
8804         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8805                 ol_cv_mdbm=no
8806         else
8807                 ol_cv_mdbm=yes
8808         fi
8809
8810 fi
8811
8812 echo "$ac_t""$ol_cv_mdbm" 1>&6
8813  if test $ol_cv_mdbm = yes ; then
8814         cat >> confdefs.h <<\EOF
8815 #define HAVE_MDBM 1
8816 EOF
8817
8818  fi
8819
8820
8821         if test $ol_cv_mdbm = yes ; then
8822                 ol_link_ldbm=mdbm
8823                 ol_with_ldbm_api=mdbm
8824                 if test $ol_cv_lib_mdbm != yes ; then
8825                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8826                 fi
8827         fi
8828 fi
8829
8830 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8831         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8832 echo "configure:8833: checking for GDBM library" >&5
8833 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
8834   echo $ac_n "(cached) $ac_c" 1>&6
8835 else
8836         ol_LIBS="$LIBS"
8837         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8838 echo "configure:8839: checking for gdbm_open" >&5
8839 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
8840   echo $ac_n "(cached) $ac_c" 1>&6
8841 else
8842   cat > conftest.$ac_ext <<EOF
8843 #line 8844 "configure"
8844 #include "confdefs.h"
8845 /* System header to define __stub macros and hopefully few prototypes,
8846     which can conflict with char gdbm_open(); below.  */
8847 #include <assert.h>
8848 /* Override any gcc2 internal prototype to avoid an error.  */
8849 /* We use char because int might match the return type of a gcc2
8850     builtin and then its argument prototype would still apply.  */
8851 char gdbm_open();
8852 char (*f)();
8853
8854 int main() {
8855
8856 /* The GNU C library defines this for functions which it implements
8857     to always fail with ENOSYS.  Some functions are actually named
8858     something starting with __ and the normal name is an alias.  */
8859 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8860 choke me
8861 #else
8862 f = gdbm_open;
8863 #endif
8864
8865 ; return 0; }
8866 EOF
8867 if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8868   rm -rf conftest*
8869   eval "ac_cv_func_gdbm_open=yes"
8870 else
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_func_gdbm_open=no"
8875 fi
8876 rm -f conftest*
8877 fi
8878
8879 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8880   echo "$ac_t""yes" 1>&6
8881   ol_cv_lib_gdbm=yes
8882 else
8883   echo "$ac_t""no" 1>&6
8884
8885                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8886 echo "configure:8887: checking for gdbm_open in -lgdbm" >&5
8887 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
8888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8889   echo $ac_n "(cached) $ac_c" 1>&6
8890 else
8891   ac_save_LIBS="$LIBS"
8892 LIBS="-lgdbm  $LIBS"
8893 cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* Override any gcc2 internal prototype to avoid an error.  */
8897 /* We use char because int might match the return type of a gcc2
8898     builtin and then its argument prototype would still apply.  */
8899 char gdbm_open();
8900
8901 int main() {
8902 gdbm_open()
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=yes"
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=no"
8913 fi
8914 rm -f conftest*
8915 LIBS="$ac_save_LIBS"
8916
8917 fi
8918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8919   echo "$ac_t""yes" 1>&6
8920   ol_cv_lib_gdbm=-lgdbm
8921 else
8922   echo "$ac_t""no" 1>&6
8923 ol_cv_lib_gdbm=no
8924 fi
8925
8926         
8927 fi
8928
8929         LIBS="$ol_LIBS"
8930
8931 fi
8932
8933 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8934
8935
8936  for ac_hdr in gdbm.h
8937 do
8938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8940 echo "configure:8941: checking for $ac_hdr" >&5
8941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 #include <$ac_hdr>
8948 EOF
8949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8950 { (eval echo configure:8951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8952 if test -z "$ac_err"; then
8953   rm -rf conftest*
8954   eval "ac_cv_header_$ac_safe=yes"
8955 else
8956   echo "$ac_err" >&5
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   eval "ac_cv_header_$ac_safe=no"
8961 fi
8962 rm -f conftest*
8963 fi
8964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8965   echo "$ac_t""yes" 1>&6
8966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8967   cat >> confdefs.h <<EOF
8968 #define $ac_tr_hdr 1
8969 EOF
8970  
8971 else
8972   echo "$ac_t""no" 1>&6
8973 fi
8974 done
8975
8976  echo $ac_n "checking for db""... $ac_c" 1>&6
8977 echo "configure:8978: checking for db" >&5
8978 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
8979   echo $ac_n "(cached) $ac_c" 1>&6
8980 else
8981   
8982         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8983                 ol_cv_gdbm=no
8984         else
8985                 ol_cv_gdbm=yes
8986         fi
8987
8988 fi
8989
8990 echo "$ac_t""$ol_cv_gdbm" 1>&6
8991  if test $ol_cv_gdbm = yes ; then
8992         cat >> confdefs.h <<\EOF
8993 #define HAVE_GDBM 1
8994 EOF
8995
8996  fi
8997
8998
8999         if test $ol_cv_gdbm = yes ; then
9000                 ol_link_ldbm=gdbm
9001                 ol_with_ldbm_api=gdbm
9002
9003                 if test $ol_cv_lib_gdbm != yes ; then
9004                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9005                 fi
9006         fi
9007 fi
9008
9009 if test $ol_with_ldbm_api = auto ; then
9010         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9011 elif test $ol_with_ldbm_api = ndbm ; then
9012         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9013 echo "configure:9014: checking for NDBM library" >&5
9014 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9015   echo $ac_n "(cached) $ac_c" 1>&6
9016 else
9017         ol_LIBS="$LIBS"
9018         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9019 echo "configure:9020: checking for dbm_open" >&5
9020 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9021   echo $ac_n "(cached) $ac_c" 1>&6
9022 else
9023   cat > conftest.$ac_ext <<EOF
9024 #line 9025 "configure"
9025 #include "confdefs.h"
9026 /* System header to define __stub macros and hopefully few prototypes,
9027     which can conflict with char dbm_open(); below.  */
9028 #include <assert.h>
9029 /* Override any gcc2 internal prototype to avoid an error.  */
9030 /* We use char because int might match the return type of a gcc2
9031     builtin and then its argument prototype would still apply.  */
9032 char dbm_open();
9033 char (*f)();
9034
9035 int main() {
9036
9037 /* The GNU C library defines this for functions which it implements
9038     to always fail with ENOSYS.  Some functions are actually named
9039     something starting with __ and the normal name is an alias.  */
9040 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9041 choke me
9042 #else
9043 f = dbm_open;
9044 #endif
9045
9046 ; return 0; }
9047 EOF
9048 if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9049   rm -rf conftest*
9050   eval "ac_cv_func_dbm_open=yes"
9051 else
9052   echo "configure: failed program was:" >&5
9053   cat conftest.$ac_ext >&5
9054   rm -rf conftest*
9055   eval "ac_cv_func_dbm_open=no"
9056 fi
9057 rm -f conftest*
9058 fi
9059
9060 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9061   echo "$ac_t""yes" 1>&6
9062   ol_cv_lib_ndbm=yes
9063 else
9064   echo "$ac_t""no" 1>&6
9065
9066                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9067 echo "configure:9068: checking for dbm_open in -lndbm" >&5
9068 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9070   echo $ac_n "(cached) $ac_c" 1>&6
9071 else
9072   ac_save_LIBS="$LIBS"
9073 LIBS="-lndbm  $LIBS"
9074 cat > conftest.$ac_ext <<EOF
9075 #line 9076 "configure"
9076 #include "confdefs.h"
9077 /* Override any gcc2 internal prototype to avoid an error.  */
9078 /* We use char because int might match the return type of a gcc2
9079     builtin and then its argument prototype would still apply.  */
9080 char dbm_open();
9081
9082 int main() {
9083 dbm_open()
9084 ; return 0; }
9085 EOF
9086 if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9087   rm -rf conftest*
9088   eval "ac_cv_lib_$ac_lib_var=yes"
9089 else
9090   echo "configure: failed program was:" >&5
9091   cat conftest.$ac_ext >&5
9092   rm -rf conftest*
9093   eval "ac_cv_lib_$ac_lib_var=no"
9094 fi
9095 rm -f conftest*
9096 LIBS="$ac_save_LIBS"
9097
9098 fi
9099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9100   echo "$ac_t""yes" 1>&6
9101   ol_cv_lib_ndbm=-lndbm
9102 else
9103   echo "$ac_t""no" 1>&6
9104
9105                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9106 echo "configure:9107: checking for dbm_open in -ldbm" >&5
9107 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9109   echo $ac_n "(cached) $ac_c" 1>&6
9110 else
9111   ac_save_LIBS="$LIBS"
9112 LIBS="-ldbm  $LIBS"
9113 cat > conftest.$ac_ext <<EOF
9114 #line 9115 "configure"
9115 #include "confdefs.h"
9116 /* Override any gcc2 internal prototype to avoid an error.  */
9117 /* We use char because int might match the return type of a gcc2
9118     builtin and then its argument prototype would still apply.  */
9119 char dbm_open();
9120
9121 int main() {
9122 dbm_open()
9123 ; return 0; }
9124 EOF
9125 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9126   rm -rf conftest*
9127   eval "ac_cv_lib_$ac_lib_var=yes"
9128 else
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -rf conftest*
9132   eval "ac_cv_lib_$ac_lib_var=no"
9133 fi
9134 rm -f conftest*
9135 LIBS="$ac_save_LIBS"
9136
9137 fi
9138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9139   echo "$ac_t""yes" 1>&6
9140   ol_cv_lib_ndbm=-ldbm
9141 else
9142   echo "$ac_t""no" 1>&6
9143 ol_cv_lib_ndbm=no
9144 fi
9145                 
9146 fi
9147
9148         
9149 fi
9150
9151         LIBS="$ol_LIBS"
9152
9153 fi
9154
9155 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9156
9157
9158  for ac_hdr in ndbm.h
9159 do
9160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9162 echo "configure:9163: checking for $ac_hdr" >&5
9163 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   cat > conftest.$ac_ext <<EOF
9167 #line 9168 "configure"
9168 #include "confdefs.h"
9169 #include <$ac_hdr>
9170 EOF
9171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9172 { (eval echo configure:9173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9174 if test -z "$ac_err"; then
9175   rm -rf conftest*
9176   eval "ac_cv_header_$ac_safe=yes"
9177 else
9178   echo "$ac_err" >&5
9179   echo "configure: failed program was:" >&5
9180   cat conftest.$ac_ext >&5
9181   rm -rf conftest*
9182   eval "ac_cv_header_$ac_safe=no"
9183 fi
9184 rm -f conftest*
9185 fi
9186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9187   echo "$ac_t""yes" 1>&6
9188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9189   cat >> confdefs.h <<EOF
9190 #define $ac_tr_hdr 1
9191 EOF
9192  
9193 else
9194   echo "$ac_t""no" 1>&6
9195 fi
9196 done
9197
9198  echo $ac_n "checking for db""... $ac_c" 1>&6
9199 echo "configure:9200: checking for db" >&5
9200 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   
9204         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9205                 ol_cv_ndbm=no
9206         else
9207                 ol_cv_ndbm=yes
9208         fi
9209
9210 fi
9211
9212 echo "$ac_t""$ol_cv_ndbm" 1>&6
9213  if test $ol_cv_ndbm = yes ; then
9214         cat >> confdefs.h <<\EOF
9215 #define HAVE_NDBM 1
9216 EOF
9217
9218  fi
9219
9220
9221         if test $ol_cv_ndbm = yes ; then
9222                 ol_link_ldbm=ndbm
9223                 ol_with_ldbm_api=ndbm
9224
9225                 if test $ol_cv_lib_ndbm != yes ; then
9226                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9227                 fi
9228         fi
9229 fi
9230
9231 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9232         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9233         if test $ol_enable_ldbm = yes ; then
9234                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9235         fi
9236
9237         echo "configure: warning: disabling LDBM" 1>&2
9238         ol_enable_ldbm=no
9239 fi
9240
9241 if test $ol_enable_wrappers != no ; then
9242         for ac_hdr in tcpd.h
9243 do
9244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9246 echo "configure:9247: checking for $ac_hdr" >&5
9247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9248   echo $ac_n "(cached) $ac_c" 1>&6
9249 else
9250   cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253 #include <$ac_hdr>
9254 EOF
9255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9256 { (eval echo configure:9257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9258 if test -z "$ac_err"; then
9259   rm -rf conftest*
9260   eval "ac_cv_header_$ac_safe=yes"
9261 else
9262   echo "$ac_err" >&5
9263   echo "configure: failed program was:" >&5
9264   cat conftest.$ac_ext >&5
9265   rm -rf conftest*
9266   eval "ac_cv_header_$ac_safe=no"
9267 fi
9268 rm -f conftest*
9269 fi
9270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9271   echo "$ac_t""yes" 1>&6
9272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9273   cat >> confdefs.h <<EOF
9274 #define $ac_tr_hdr 1
9275 EOF
9276  
9277 else
9278   echo "$ac_t""no" 1>&6
9279 fi
9280 done
9281
9282
9283         if test $ac_cv_header_tcpd_h != yes ; then
9284                 have_wrappers=no
9285         else
9286                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9287 echo "configure:9288: checking for main in -lwrap" >&5
9288 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9289 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9290   echo $ac_n "(cached) $ac_c" 1>&6
9291 else
9292   ac_save_LIBS="$LIBS"
9293 LIBS="-lwrap  $LIBS"
9294 cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297
9298 int main() {
9299 main()
9300 ; return 0; }
9301 EOF
9302 if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9303   rm -rf conftest*
9304   eval "ac_cv_lib_$ac_lib_var=yes"
9305 else
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -rf conftest*
9309   eval "ac_cv_lib_$ac_lib_var=no"
9310 fi
9311 rm -f conftest*
9312 LIBS="$ac_save_LIBS"
9313
9314 fi
9315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317   have_wrappers=yes
9318 else
9319   echo "$ac_t""no" 1>&6
9320 have_wrappers=no
9321 fi
9322
9323         fi
9324
9325         if test $have_wrappers = yes ; then
9326                 cat >> confdefs.h <<\EOF
9327 #define HAVE_TCPD 1
9328 EOF
9329
9330                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9331
9332                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9333 echo "configure:9334: checking for main in -lnsl" >&5
9334 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9336   echo $ac_n "(cached) $ac_c" 1>&6
9337 else
9338   ac_save_LIBS="$LIBS"
9339 LIBS="-lnsl  $LIBS"
9340 cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343
9344 int main() {
9345 main()
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9349   rm -rf conftest*
9350   eval "ac_cv_lib_$ac_lib_var=yes"
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -rf conftest*
9355   eval "ac_cv_lib_$ac_lib_var=no"
9356 fi
9357 rm -f conftest*
9358 LIBS="$ac_save_LIBS"
9359
9360 fi
9361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9362   echo "$ac_t""yes" 1>&6
9363     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9364     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9365   cat >> confdefs.h <<EOF
9366 #define $ac_tr_lib 1
9367 EOF
9368
9369   LIBS="-lnsl $LIBS"
9370
9371 else
9372   echo "$ac_t""no" 1>&6
9373 fi
9374
9375         else
9376                 echo "configure: warning: could not find -lwrap" 1>&2
9377                 if test $ol_enable_wrappers = yes ; then
9378                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9379                 fi
9380
9381                 echo "configure: warning: disabling wrappers support" 1>&2
9382                 ol_enable_wrappers=no
9383         fi
9384 fi
9385
9386 if test $ol_enable_syslog != no ; then
9387         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9388 echo "configure:9389: checking for openlog" >&5
9389 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9390   echo $ac_n "(cached) $ac_c" 1>&6
9391 else
9392   cat > conftest.$ac_ext <<EOF
9393 #line 9394 "configure"
9394 #include "confdefs.h"
9395 /* System header to define __stub macros and hopefully few prototypes,
9396     which can conflict with char openlog(); below.  */
9397 #include <assert.h>
9398 /* Override any gcc2 internal prototype to avoid an error.  */
9399 /* We use char because int might match the return type of a gcc2
9400     builtin and then its argument prototype would still apply.  */
9401 char openlog();
9402 char (*f)();
9403
9404 int main() {
9405
9406 /* The GNU C library defines this for functions which it implements
9407     to always fail with ENOSYS.  Some functions are actually named
9408     something starting with __ and the normal name is an alias.  */
9409 #if defined (__stub_openlog) || defined (__stub___openlog)
9410 choke me
9411 #else
9412 f = openlog;
9413 #endif
9414
9415 ; return 0; }
9416 EOF
9417 if { (eval echo configure:9418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9418   rm -rf conftest*
9419   eval "ac_cv_func_openlog=yes"
9420 else
9421   echo "configure: failed program was:" >&5
9422   cat conftest.$ac_ext >&5
9423   rm -rf conftest*
9424   eval "ac_cv_func_openlog=no"
9425 fi
9426 rm -f conftest*
9427 fi
9428
9429 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9430   echo "$ac_t""yes" 1>&6
9431   :
9432 else
9433   echo "$ac_t""no" 1>&6
9434 fi
9435
9436         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9437                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9438         fi
9439         ol_enable_syslog=$ac_cv_func_openlog
9440 fi
9441
9442 if test $ol_enable_dmalloc != no ; then
9443         for ac_hdr in dmalloc.h
9444 do
9445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9447 echo "configure:9448: checking for $ac_hdr" >&5
9448 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9449   echo $ac_n "(cached) $ac_c" 1>&6
9450 else
9451   cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454 #include <$ac_hdr>
9455 EOF
9456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9457 { (eval echo configure:9458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9459 if test -z "$ac_err"; then
9460   rm -rf conftest*
9461   eval "ac_cv_header_$ac_safe=yes"
9462 else
9463   echo "$ac_err" >&5
9464   echo "configure: failed program was:" >&5
9465   cat conftest.$ac_ext >&5
9466   rm -rf conftest*
9467   eval "ac_cv_header_$ac_safe=no"
9468 fi
9469 rm -f conftest*
9470 fi
9471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9472   echo "$ac_t""yes" 1>&6
9473     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9474   cat >> confdefs.h <<EOF
9475 #define $ac_tr_hdr 1
9476 EOF
9477  
9478 else
9479   echo "$ac_t""no" 1>&6
9480 fi
9481 done
9482
9483         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9484 echo "configure:9485: checking for dmalloc_shutdown in -ldmalloc" >&5
9485 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
9486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   ac_save_LIBS="$LIBS"
9490 LIBS="-ldmalloc  $LIBS"
9491 cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 /* Override any gcc2 internal prototype to avoid an error.  */
9495 /* We use char because int might match the return type of a gcc2
9496     builtin and then its argument prototype would still apply.  */
9497 char dmalloc_shutdown();
9498
9499 int main() {
9500 dmalloc_shutdown()
9501 ; return 0; }
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9504   rm -rf conftest*
9505   eval "ac_cv_lib_$ac_lib_var=yes"
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   eval "ac_cv_lib_$ac_lib_var=no"
9511 fi
9512 rm -f conftest*
9513 LIBS="$ac_save_LIBS"
9514
9515 fi
9516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9517   echo "$ac_t""yes" 1>&6
9518     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9519     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9520   cat >> confdefs.h <<EOF
9521 #define $ac_tr_lib 1
9522 EOF
9523
9524   LIBS="-ldmalloc $LIBS"
9525
9526 else
9527   echo "$ac_t""no" 1>&6
9528 fi
9529
9530 fi
9531
9532 if test $ol_enable_tcl != no ; then
9533         for ac_hdr in tcl.h
9534 do
9535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9537 echo "configure:9538: checking for $ac_hdr" >&5
9538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9539   echo $ac_n "(cached) $ac_c" 1>&6
9540 else
9541   cat > conftest.$ac_ext <<EOF
9542 #line 9543 "configure"
9543 #include "confdefs.h"
9544 #include <$ac_hdr>
9545 EOF
9546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9547 { (eval echo configure:9548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9549 if test -z "$ac_err"; then
9550   rm -rf conftest*
9551   eval "ac_cv_header_$ac_safe=yes"
9552 else
9553   echo "$ac_err" >&5
9554   echo "configure: failed program was:" >&5
9555   cat conftest.$ac_ext >&5
9556   rm -rf conftest*
9557   eval "ac_cv_header_$ac_safe=no"
9558 fi
9559 rm -f conftest*
9560 fi
9561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9562   echo "$ac_t""yes" 1>&6
9563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9564   cat >> confdefs.h <<EOF
9565 #define $ac_tr_hdr 1
9566 EOF
9567  
9568 else
9569   echo "$ac_t""no" 1>&6
9570 fi
9571 done
9572
9573
9574         if test $ac_cv_header_tcl_h != yes ; then
9575                 have_tcl=no
9576         else
9577                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9578 echo "configure:9579: checking for main in -ltcl" >&5
9579 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
9580 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9581   echo $ac_n "(cached) $ac_c" 1>&6
9582 else
9583   ac_save_LIBS="$LIBS"
9584 LIBS="-ltcl  $LIBS"
9585 cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588
9589 int main() {
9590 main()
9591 ; return 0; }
9592 EOF
9593 if { (eval echo configure:9594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9594   rm -rf conftest*
9595   eval "ac_cv_lib_$ac_lib_var=yes"
9596 else
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   eval "ac_cv_lib_$ac_lib_var=no"
9601 fi
9602 rm -f conftest*
9603 LIBS="$ac_save_LIBS"
9604
9605 fi
9606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9607   echo "$ac_t""yes" 1>&6
9608   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9609 else
9610   echo "$ac_t""no" 1>&6
9611 have_tcl=no
9612 fi
9613
9614
9615                 if test $have_tcl != yes; then
9616                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9617 echo "configure:9618: checking for main in -ltcl7.6" >&5
9618 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
9619 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9620   echo $ac_n "(cached) $ac_c" 1>&6
9621 else
9622   ac_save_LIBS="$LIBS"
9623 LIBS="-ltcl7.6  $LIBS"
9624 cat > conftest.$ac_ext <<EOF
9625 #line 9626 "configure"
9626 #include "confdefs.h"
9627
9628 int main() {
9629 main()
9630 ; return 0; }
9631 EOF
9632 if { (eval echo configure:9633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9633   rm -rf conftest*
9634   eval "ac_cv_lib_$ac_lib_var=yes"
9635 else
9636   echo "configure: failed program was:" >&5
9637   cat conftest.$ac_ext >&5
9638   rm -rf conftest*
9639   eval "ac_cv_lib_$ac_lib_var=no"
9640 fi
9641 rm -f conftest*
9642 LIBS="$ac_save_LIBS"
9643
9644 fi
9645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9646   echo "$ac_t""yes" 1>&6
9647   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9648 else
9649   echo "$ac_t""no" 1>&6
9650 have_tcl=no
9651 fi
9652
9653                 fi
9654
9655                 if test $have_tcl != yes; then
9656                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9657 echo "configure:9658: checking for main in -ltcl8.0" >&5
9658 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
9659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9660   echo $ac_n "(cached) $ac_c" 1>&6
9661 else
9662   ac_save_LIBS="$LIBS"
9663 LIBS="-ltcl8.0  $LIBS"
9664 cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667
9668 int main() {
9669 main()
9670 ; return 0; }
9671 EOF
9672 if { (eval echo configure:9673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9673   rm -rf conftest*
9674   eval "ac_cv_lib_$ac_lib_var=yes"
9675 else
9676   echo "configure: failed program was:" >&5
9677   cat conftest.$ac_ext >&5
9678   rm -rf conftest*
9679   eval "ac_cv_lib_$ac_lib_var=no"
9680 fi
9681 rm -f conftest*
9682 LIBS="$ac_save_LIBS"
9683
9684 fi
9685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9686   echo "$ac_t""yes" 1>&6
9687   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9688 else
9689   echo "$ac_t""no" 1>&6
9690 have_tcl=no
9691 fi
9692
9693                 fi
9694         fi
9695
9696         if test $have_tcl != yes ; then
9697                 echo "configure: warning: could not find -ltcl" 1>&2
9698                 if test $ol_enable_tcl = yes ; then
9699                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9700                 fi
9701
9702                 ol_enable_tcl=no
9703         fi
9704 fi
9705
9706 # ud needs termcap (should insert check here)
9707 ol_link_termcap=no
9708 for ac_hdr in termcap.h ncurses.h
9709 do
9710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9712 echo "configure:9713: checking for $ac_hdr" >&5
9713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   cat > conftest.$ac_ext <<EOF
9717 #line 9718 "configure"
9718 #include "confdefs.h"
9719 #include <$ac_hdr>
9720 EOF
9721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9722 { (eval echo configure:9723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9724 if test -z "$ac_err"; then
9725   rm -rf conftest*
9726   eval "ac_cv_header_$ac_safe=yes"
9727 else
9728   echo "$ac_err" >&5
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -rf conftest*
9732   eval "ac_cv_header_$ac_safe=no"
9733 fi
9734 rm -f conftest*
9735 fi
9736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9737   echo "$ac_t""yes" 1>&6
9738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9739   cat >> confdefs.h <<EOF
9740 #define $ac_tr_hdr 1
9741 EOF
9742  
9743 else
9744   echo "$ac_t""no" 1>&6
9745 fi
9746 done
9747
9748
9749 if test $ol_link_termcap = no ; then
9750         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9751 echo "configure:9752: checking for tputs in -ltermcap" >&5
9752 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
9753 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   ac_save_LIBS="$LIBS"
9757 LIBS="-ltermcap  $LIBS"
9758 cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 /* Override any gcc2 internal prototype to avoid an error.  */
9762 /* We use char because int might match the return type of a gcc2
9763     builtin and then its argument prototype would still apply.  */
9764 char tputs();
9765
9766 int main() {
9767 tputs()
9768 ; return 0; }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9771   rm -rf conftest*
9772   eval "ac_cv_lib_$ac_lib_var=yes"
9773 else
9774   echo "configure: failed program was:" >&5
9775   cat conftest.$ac_ext >&5
9776   rm -rf conftest*
9777   eval "ac_cv_lib_$ac_lib_var=no"
9778 fi
9779 rm -f conftest*
9780 LIBS="$ac_save_LIBS"
9781
9782 fi
9783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9784   echo "$ac_t""yes" 1>&6
9785   have_termcap=yes
9786 else
9787   echo "$ac_t""no" 1>&6
9788 have_termcap=no
9789 fi
9790
9791         if test $have_termcap = yes ; then
9792                 cat >> confdefs.h <<\EOF
9793 #define HAVE_TERMCAP 1
9794 EOF
9795
9796                 ol_link_termcap=yes
9797                 TERMCAP_LIBS=-ltermcap
9798         fi
9799 fi
9800
9801 if test $ol_link_termcap = no ; then
9802         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9803 echo "configure:9804: checking for initscr in -lncurses" >&5
9804 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
9805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9806   echo $ac_n "(cached) $ac_c" 1>&6
9807 else
9808   ac_save_LIBS="$LIBS"
9809 LIBS="-lncurses  $LIBS"
9810 cat > conftest.$ac_ext <<EOF
9811 #line 9812 "configure"
9812 #include "confdefs.h"
9813 /* Override any gcc2 internal prototype to avoid an error.  */
9814 /* We use char because int might match the return type of a gcc2
9815     builtin and then its argument prototype would still apply.  */
9816 char initscr();
9817
9818 int main() {
9819 initscr()
9820 ; return 0; }
9821 EOF
9822 if { (eval echo configure:9823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9823   rm -rf conftest*
9824   eval "ac_cv_lib_$ac_lib_var=yes"
9825 else
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -rf conftest*
9829   eval "ac_cv_lib_$ac_lib_var=no"
9830 fi
9831 rm -f conftest*
9832 LIBS="$ac_save_LIBS"
9833
9834 fi
9835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9836   echo "$ac_t""yes" 1>&6
9837   have_ncurses=yes
9838 else
9839   echo "$ac_t""no" 1>&6
9840 have_ncurses=no
9841 fi
9842
9843         if test $have_ncurses = yes ; then
9844                 cat >> confdefs.h <<\EOF
9845 #define HAVE_NCURSES 1
9846 EOF
9847
9848                 ol_link_termcap=yes
9849                 TERMCAP_LIBS=-lncurses
9850         fi
9851 fi
9852
9853 if test $ol_link_termcap = no ; then
9854         cat >> confdefs.h <<\EOF
9855 #define NO_TERMCAP 1
9856 EOF
9857
9858         TERMCAP_LIBS=
9859 fi
9860
9861 ol_link_readline=no
9862 if test $ol_with_readline != no ; then
9863         for ac_hdr in readline/readline.h readline/history.h
9864 do
9865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9867 echo "configure:9868: checking for $ac_hdr" >&5
9868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9869   echo $ac_n "(cached) $ac_c" 1>&6
9870 else
9871   cat > conftest.$ac_ext <<EOF
9872 #line 9873 "configure"
9873 #include "confdefs.h"
9874 #include <$ac_hdr>
9875 EOF
9876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9877 { (eval echo configure:9878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9879 if test -z "$ac_err"; then
9880   rm -rf conftest*
9881   eval "ac_cv_header_$ac_safe=yes"
9882 else
9883   echo "$ac_err" >&5
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -rf conftest*
9887   eval "ac_cv_header_$ac_safe=no"
9888 fi
9889 rm -f conftest*
9890 fi
9891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9892   echo "$ac_t""yes" 1>&6
9893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9894   cat >> confdefs.h <<EOF
9895 #define $ac_tr_hdr 1
9896 EOF
9897  
9898 else
9899   echo "$ac_t""no" 1>&6
9900 fi
9901 done
9902
9903
9904         if test $ac_cv_header_readline_readline_h = yes ; then
9905                 save_LIBS="$LIBS"
9906                 LIBS="$TERMCAP_LIBS $LIBS"
9907                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9908 echo "configure:9909: checking for readline in -lreadline" >&5
9909 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
9910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9911   echo $ac_n "(cached) $ac_c" 1>&6
9912 else
9913   ac_save_LIBS="$LIBS"
9914 LIBS="-lreadline  $LIBS"
9915 cat > conftest.$ac_ext <<EOF
9916 #line 9917 "configure"
9917 #include "confdefs.h"
9918 /* Override any gcc2 internal prototype to avoid an error.  */
9919 /* We use char because int might match the return type of a gcc2
9920     builtin and then its argument prototype would still apply.  */
9921 char readline();
9922
9923 int main() {
9924 readline()
9925 ; return 0; }
9926 EOF
9927 if { (eval echo configure:9928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9928   rm -rf conftest*
9929   eval "ac_cv_lib_$ac_lib_var=yes"
9930 else
9931   echo "configure: failed program was:" >&5
9932   cat conftest.$ac_ext >&5
9933   rm -rf conftest*
9934   eval "ac_cv_lib_$ac_lib_var=no"
9935 fi
9936 rm -f conftest*
9937 LIBS="$ac_save_LIBS"
9938
9939 fi
9940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9941   echo "$ac_t""yes" 1>&6
9942   have_readline=yes
9943 else
9944   echo "$ac_t""no" 1>&6
9945 have_readline=no
9946 fi
9947
9948                 LIBS="$save_LIBS"
9949                         
9950                 if test $have_readline = yes ; then
9951                         ol_with_readline=found
9952                         ol_link_readline=yes
9953
9954                         READLINE_LIBS="-lreadline"
9955                 fi
9956         fi
9957 fi
9958
9959 if test $ol_link_readline = yes ; then
9960         cat >> confdefs.h <<\EOF
9961 #define HAVE_READLINE 1
9962 EOF
9963
9964 fi
9965
9966
9967 # FreeBSD (and others) have crypt(3) in -lcrypt
9968 if test $ol_enable_crypt != no ; then
9969         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9970 echo "configure:9971: checking for crypt" >&5
9971 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
9972   echo $ac_n "(cached) $ac_c" 1>&6
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 /* System header to define __stub macros and hopefully few prototypes,
9978     which can conflict with char crypt(); below.  */
9979 #include <assert.h>
9980 /* Override any gcc2 internal prototype to avoid an error.  */
9981 /* We use char because int might match the return type of a gcc2
9982     builtin and then its argument prototype would still apply.  */
9983 char crypt();
9984 char (*f)();
9985
9986 int main() {
9987
9988 /* The GNU C library defines this for functions which it implements
9989     to always fail with ENOSYS.  Some functions are actually named
9990     something starting with __ and the normal name is an alias.  */
9991 #if defined (__stub_crypt) || defined (__stub___crypt)
9992 choke me
9993 #else
9994 f = crypt;
9995 #endif
9996
9997 ; return 0; }
9998 EOF
9999 if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10000   rm -rf conftest*
10001   eval "ac_cv_func_crypt=yes"
10002 else
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   rm -rf conftest*
10006   eval "ac_cv_func_crypt=no"
10007 fi
10008 rm -f conftest*
10009 fi
10010
10011 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10012   echo "$ac_t""yes" 1>&6
10013   have_crypt=yes
10014 else
10015   echo "$ac_t""no" 1>&6
10016
10017                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10018 echo "configure:10019: checking for crypt in -lcrypt" >&5
10019 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10021   echo $ac_n "(cached) $ac_c" 1>&6
10022 else
10023   ac_save_LIBS="$LIBS"
10024 LIBS="-lcrypt  $LIBS"
10025 cat > conftest.$ac_ext <<EOF
10026 #line 10027 "configure"
10027 #include "confdefs.h"
10028 /* Override any gcc2 internal prototype to avoid an error.  */
10029 /* We use char because int might match the return type of a gcc2
10030     builtin and then its argument prototype would still apply.  */
10031 char crypt();
10032
10033 int main() {
10034 crypt()
10035 ; return 0; }
10036 EOF
10037 if { (eval echo configure:10038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10038   rm -rf conftest*
10039   eval "ac_cv_lib_$ac_lib_var=yes"
10040 else
10041   echo "configure: failed program was:" >&5
10042   cat conftest.$ac_ext >&5
10043   rm -rf conftest*
10044   eval "ac_cv_lib_$ac_lib_var=no"
10045 fi
10046 rm -f conftest*
10047 LIBS="$ac_save_LIBS"
10048
10049 fi
10050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10051   echo "$ac_t""yes" 1>&6
10052   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10053                         have_crypt=yes
10054 else
10055   echo "$ac_t""no" 1>&6
10056 have_crypt=no
10057 fi
10058
10059 fi
10060
10061
10062         if test $have_crypt = yes ; then
10063                 cat >> confdefs.h <<\EOF
10064 #define HAVE_CRYPT 1
10065 EOF
10066
10067         else
10068                 echo "configure: warning: could not find crypt" 1>&2
10069                 if test $ol_enable_crypt = yes ; then
10070                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10071                 fi
10072
10073                 echo "configure: warning: disabling crypt support" 1>&2
10074                 ol_enable_crypt=no
10075         fi
10076 fi
10077
10078 # FreeBSD (and others) have setproctitle(3) in -lutil
10079 if test $ol_enable_proctitle != no ; then
10080         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10081 echo "configure:10082: checking for setproctitle" >&5
10082 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10083   echo $ac_n "(cached) $ac_c" 1>&6
10084 else
10085   cat > conftest.$ac_ext <<EOF
10086 #line 10087 "configure"
10087 #include "confdefs.h"
10088 /* System header to define __stub macros and hopefully few prototypes,
10089     which can conflict with char setproctitle(); below.  */
10090 #include <assert.h>
10091 /* Override any gcc2 internal prototype to avoid an error.  */
10092 /* We use char because int might match the return type of a gcc2
10093     builtin and then its argument prototype would still apply.  */
10094 char setproctitle();
10095 char (*f)();
10096
10097 int main() {
10098
10099 /* The GNU C library defines this for functions which it implements
10100     to always fail with ENOSYS.  Some functions are actually named
10101     something starting with __ and the normal name is an alias.  */
10102 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10103 choke me
10104 #else
10105 f = setproctitle;
10106 #endif
10107
10108 ; return 0; }
10109 EOF
10110 if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10111   rm -rf conftest*
10112   eval "ac_cv_func_setproctitle=yes"
10113 else
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -rf conftest*
10117   eval "ac_cv_func_setproctitle=no"
10118 fi
10119 rm -f conftest*
10120 fi
10121
10122 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10123   echo "$ac_t""yes" 1>&6
10124   have_setproctitle=yes
10125 else
10126   echo "$ac_t""no" 1>&6
10127
10128                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10129 echo "configure:10130: checking for setproctitle in -lutil" >&5
10130 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10132   echo $ac_n "(cached) $ac_c" 1>&6
10133 else
10134   ac_save_LIBS="$LIBS"
10135 LIBS="-lutil  $LIBS"
10136 cat > conftest.$ac_ext <<EOF
10137 #line 10138 "configure"
10138 #include "confdefs.h"
10139 /* Override any gcc2 internal prototype to avoid an error.  */
10140 /* We use char because int might match the return type of a gcc2
10141     builtin and then its argument prototype would still apply.  */
10142 char setproctitle();
10143
10144 int main() {
10145 setproctitle()
10146 ; return 0; }
10147 EOF
10148 if { (eval echo configure:10149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10149   rm -rf conftest*
10150   eval "ac_cv_lib_$ac_lib_var=yes"
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   eval "ac_cv_lib_$ac_lib_var=no"
10156 fi
10157 rm -f conftest*
10158 LIBS="$ac_save_LIBS"
10159
10160 fi
10161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10162   echo "$ac_t""yes" 1>&6
10163   have_setproctitle=yes
10164                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10165 else
10166   echo "$ac_t""no" 1>&6
10167 have_setproctitle=no
10168                         LIBOBJS="$LIBOBJS setproctitle.o"
10169 fi
10170
10171 fi
10172
10173
10174         if test $have_setproctitle = yes ; then
10175                 cat >> confdefs.h <<\EOF
10176 #define HAVE_SETPROCTITLE 1
10177 EOF
10178
10179         fi
10180 fi
10181
10182 # test for EBCDIC
10183 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
10184 echo "configure:10185: checking for EBCDIC" >&5
10185 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
10186   echo $ac_n "(cached) $ac_c" 1>&6
10187 else
10188   
10189         cat > conftest.$ac_ext <<EOF
10190 #line 10191 "configure"
10191 #include "confdefs.h"
10192
10193 #if !('M' == 0xd4)
10194 #include <__ASCII__/generate_error.h>
10195 #endif
10196
10197 EOF
10198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10199 { (eval echo configure:10200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10201 if test -z "$ac_err"; then
10202   rm -rf conftest*
10203   ol_cv_cpp_ebcdic=yes
10204 else
10205   echo "$ac_err" >&5
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   ol_cv_cpp_ebcdic=no
10210 fi
10211 rm -f conftest*
10212 fi
10213
10214 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
10215 if test $ol_cv_cpp_ebcdic = yes ; then
10216         cat >> confdefs.h <<\EOF
10217 #define HAVE_EBCDIC 1
10218 EOF
10219
10220 fi
10221
10222 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10223 echo "configure:10224: checking for ANSI C header files" >&5
10224 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 #include <stdlib.h>
10231 #include <stdarg.h>
10232 #include <string.h>
10233 #include <float.h>
10234 EOF
10235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10236 { (eval echo configure:10237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10238 if test -z "$ac_err"; then
10239   rm -rf conftest*
10240   ol_cv_header_stdc=yes
10241 else
10242   echo "$ac_err" >&5
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -rf conftest*
10246   ol_cv_header_stdc=no
10247 fi
10248 rm -f conftest*
10249
10250 if test $ol_cv_header_stdc = yes; then
10251   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10252 cat > conftest.$ac_ext <<EOF
10253 #line 10254 "configure"
10254 #include "confdefs.h"
10255 #include <string.h>
10256 EOF
10257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10258   egrep "memchr" >/dev/null 2>&1; then
10259   :
10260 else
10261   rm -rf conftest*
10262   ol_cv_header_stdc=no
10263 fi
10264 rm -f conftest*
10265
10266 fi
10267
10268 if test $ol_cv_header_stdc = yes; then
10269   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10270 cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 #include <stdlib.h>
10274 EOF
10275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10276   egrep "free" >/dev/null 2>&1; then
10277   :
10278 else
10279   rm -rf conftest*
10280   ol_cv_header_stdc=no
10281 fi
10282 rm -f conftest*
10283
10284 fi
10285
10286 if test $ol_cv_header_stdc = yes; then
10287   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10288 if test "$cross_compiling" = yes; then
10289   :
10290 else
10291   cat > conftest.$ac_ext <<EOF
10292 #line 10293 "configure"
10293 #include "confdefs.h"
10294 #include <ctype.h>
10295 #ifndef HAVE_EBCDIC
10296 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10297 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10298 #else
10299 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10300                 || ('j' <= (c) && (c) <= 'r') \
10301                 || ('s' <= (c) && (c) <= 'z'))
10302 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
10303 #endif
10304 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10305 int main () { int i; for (i = 0; i < 256; i++)
10306 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10307 exit (0); }
10308
10309 EOF
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10311 then
10312   :
10313 else
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -fr conftest*
10317   ol_cv_header_stdc=no
10318 fi
10319 rm -fr conftest*
10320 fi
10321
10322 fi
10323 fi
10324
10325 echo "$ac_t""$ol_cv_header_stdc" 1>&6
10326 if test $ol_cv_header_stdc = yes; then
10327   cat >> confdefs.h <<\EOF
10328 #define STDC_HEADERS 1
10329 EOF
10330
10331 fi
10332 ac_cv_header_stdc=disable
10333
10334
10335 if test $ol_cv_header_stdc != yes; then
10336         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
10337 fi
10338
10339 ac_header_dirent=no
10340 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
10341 do
10342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10343 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
10344 echo "configure:10345: checking for $ac_hdr that defines DIR" >&5
10345 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
10346   echo $ac_n "(cached) $ac_c" 1>&6
10347 else
10348   cat > conftest.$ac_ext <<EOF
10349 #line 10350 "configure"
10350 #include "confdefs.h"
10351 #include <sys/types.h>
10352 #include <$ac_hdr>
10353 int main() {
10354 DIR *dirp = 0;
10355 ; return 0; }
10356 EOF
10357 if { (eval echo configure:10358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10358   rm -rf conftest*
10359   eval "ac_cv_header_dirent_$ac_safe=yes"
10360 else
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -rf conftest*
10364   eval "ac_cv_header_dirent_$ac_safe=no"
10365 fi
10366 rm -f conftest*
10367 fi
10368 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
10369   echo "$ac_t""yes" 1>&6
10370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10371   cat >> confdefs.h <<EOF
10372 #define $ac_tr_hdr 1
10373 EOF
10374  ac_header_dirent=$ac_hdr; break
10375 else
10376   echo "$ac_t""no" 1>&6
10377 fi
10378 done
10379 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10380 if test $ac_header_dirent = dirent.h; then
10381 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
10382 echo "configure:10383: checking for opendir in -ldir" >&5
10383 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
10384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10385   echo $ac_n "(cached) $ac_c" 1>&6
10386 else
10387   ac_save_LIBS="$LIBS"
10388 LIBS="-ldir  $LIBS"
10389 cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 /* Override any gcc2 internal prototype to avoid an error.  */
10393 /* We use char because int might match the return type of a gcc2
10394     builtin and then its argument prototype would still apply.  */
10395 char opendir();
10396
10397 int main() {
10398 opendir()
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10402   rm -rf conftest*
10403   eval "ac_cv_lib_$ac_lib_var=yes"
10404 else
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   eval "ac_cv_lib_$ac_lib_var=no"
10409 fi
10410 rm -f conftest*
10411 LIBS="$ac_save_LIBS"
10412
10413 fi
10414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10415   echo "$ac_t""yes" 1>&6
10416   LIBS="$LIBS -ldir"
10417 else
10418   echo "$ac_t""no" 1>&6
10419 fi
10420
10421 else
10422 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
10423 echo "configure:10424: checking for opendir in -lx" >&5
10424 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
10425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   ac_save_LIBS="$LIBS"
10429 LIBS="-lx  $LIBS"
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433 /* Override any gcc2 internal prototype to avoid an error.  */
10434 /* We use char because int might match the return type of a gcc2
10435     builtin and then its argument prototype would still apply.  */
10436 char opendir();
10437
10438 int main() {
10439 opendir()
10440 ; return 0; }
10441 EOF
10442 if { (eval echo configure:10443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10443   rm -rf conftest*
10444   eval "ac_cv_lib_$ac_lib_var=yes"
10445 else
10446   echo "configure: failed program was:" >&5
10447   cat conftest.$ac_ext >&5
10448   rm -rf conftest*
10449   eval "ac_cv_lib_$ac_lib_var=no"
10450 fi
10451 rm -f conftest*
10452 LIBS="$ac_save_LIBS"
10453
10454 fi
10455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10456   echo "$ac_t""yes" 1>&6
10457   LIBS="$LIBS -lx"
10458 else
10459   echo "$ac_t""no" 1>&6
10460 fi
10461
10462 fi
10463
10464 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
10465 echo "configure:10466: checking for sys/wait.h that is POSIX.1 compatible" >&5
10466 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
10467   echo $ac_n "(cached) $ac_c" 1>&6
10468 else
10469   cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 #include <sys/types.h>
10473 #include <sys/wait.h>
10474 #ifndef WEXITSTATUS
10475 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10476 #endif
10477 #ifndef WIFEXITED
10478 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10479 #endif
10480 int main() {
10481 int s;
10482 wait (&s);
10483 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10484 ; return 0; }
10485 EOF
10486 if { (eval echo configure:10487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10487   rm -rf conftest*
10488   ac_cv_header_sys_wait_h=yes
10489 else
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   ac_cv_header_sys_wait_h=no
10494 fi
10495 rm -f conftest*
10496 fi
10497
10498 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
10499 if test $ac_cv_header_sys_wait_h = yes; then
10500   cat >> confdefs.h <<\EOF
10501 #define HAVE_SYS_WAIT_H 1
10502 EOF
10503
10504 fi
10505
10506 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
10507 echo "configure:10508: checking POSIX termios" >&5
10508 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
10509   echo $ac_n "(cached) $ac_c" 1>&6
10510 else
10511   cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514 #include <sys/types.h>
10515 #include <unistd.h>
10516 #include <termios.h>
10517 int main() {
10518 /* SunOS 4.0.3 has termios.h but not the library calls.  */
10519    tcgetattr(0, 0);
10520 ; return 0; }
10521 EOF
10522 if { (eval echo configure:10523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10523   rm -rf conftest*
10524   am_cv_sys_posix_termios=yes
10525 else
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   am_cv_sys_posix_termios=no
10530 fi
10531 rm -f conftest*
10532 fi
10533
10534 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
10535
10536
10537  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
10538 echo "configure:10539: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
10539 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
10543
10544   gwinsz_in_termios_h=no
10545   if test $am_cv_sys_posix_termios = yes; then
10546     cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549 #include <sys/types.h>
10550 #     include <termios.h>
10551 #     ifdef TIOCGWINSZ
10552         yes
10553 #     endif
10554     
10555 EOF
10556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10557   egrep "yes" >/dev/null 2>&1; then
10558   rm -rf conftest*
10559   gwinsz_in_termios_h=yes
10560 fi
10561 rm -f conftest*
10562
10563   fi
10564
10565   if test $gwinsz_in_termios_h = no; then
10566     cat > conftest.$ac_ext <<EOF
10567 #line 10568 "configure"
10568 #include "confdefs.h"
10569 #include <sys/types.h>
10570 #     include <sys/ioctl.h>
10571 #     ifdef TIOCGWINSZ
10572         yes
10573 #     endif
10574     
10575 EOF
10576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10577   egrep "yes" >/dev/null 2>&1; then
10578   rm -rf conftest*
10579   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10580 fi
10581 rm -f conftest*
10582
10583   fi
10584   
10585 fi
10586
10587 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10588   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10589     cat >> confdefs.h <<\EOF
10590 #define GWINSZ_IN_SYS_IOCTL 1
10591 EOF
10592
10593   fi
10594
10595 if test $am_cv_sys_posix_termios = yes ; then
10596         cat >> confdefs.h <<\EOF
10597 #define HAVE_POSIX_TERMIOS 1
10598 EOF
10599
10600 fi
10601
10602 for ac_hdr in \
10603         arpa/inet.h             \
10604         arpa/nameser.h  \
10605         assert.h                \
10606         crypt.h                 \
10607         errno.h                 \
10608         fcntl.h                 \
10609         filio.h                 \
10610         getopt.h                \
10611         grp.h                   \
10612         libutil.h               \
10613         limits.h                \
10614         locale.h                \
10615         netinet/tcp.h   \
10616         malloc.h                \
10617         memory.h                \
10618         psap.h                  \
10619         pwd.h                   \
10620         resolv.h                \
10621         sgtty.h                 \
10622         shadow.h                \
10623         stdarg.h                \
10624         stddef.h                \
10625         string.h                \
10626         strings.h               \
10627         sysexits.h              \
10628         sys/file.h              \
10629         sys/filio.h             \
10630         sys/errno.h             \
10631         sys/ioctl.h             \
10632         sys/param.h             \
10633         sys/resource.h  \
10634         sys/select.h    \
10635         sys/socket.h    \
10636         sys/syslog.h    \
10637         sys/time.h              \
10638         sys/types.h             \
10639         syslog.h                \
10640         termios.h               \
10641         unistd.h                \
10642
10643 do
10644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10646 echo "configure:10647: checking for $ac_hdr" >&5
10647 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10648   echo $ac_n "(cached) $ac_c" 1>&6
10649 else
10650   cat > conftest.$ac_ext <<EOF
10651 #line 10652 "configure"
10652 #include "confdefs.h"
10653 #include <$ac_hdr>
10654 EOF
10655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10656 { (eval echo configure:10657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10658 if test -z "$ac_err"; then
10659   rm -rf conftest*
10660   eval "ac_cv_header_$ac_safe=yes"
10661 else
10662   echo "$ac_err" >&5
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   eval "ac_cv_header_$ac_safe=no"
10667 fi
10668 rm -f conftest*
10669 fi
10670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10671   echo "$ac_t""yes" 1>&6
10672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10673   cat >> confdefs.h <<EOF
10674 #define $ac_tr_hdr 1
10675 EOF
10676  
10677 else
10678   echo "$ac_t""no" 1>&6
10679 fi
10680 done
10681
10682
10683 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10684 echo "configure:10685: checking for uid_t in sys/types.h" >&5
10685 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10686   echo $ac_n "(cached) $ac_c" 1>&6
10687 else
10688   cat > conftest.$ac_ext <<EOF
10689 #line 10690 "configure"
10690 #include "confdefs.h"
10691 #include <sys/types.h>
10692 EOF
10693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10694   egrep "uid_t" >/dev/null 2>&1; then
10695   rm -rf conftest*
10696   ac_cv_type_uid_t=yes
10697 else
10698   rm -rf conftest*
10699   ac_cv_type_uid_t=no
10700 fi
10701 rm -f conftest*
10702
10703 fi
10704
10705 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10706 if test $ac_cv_type_uid_t = no; then
10707   cat >> confdefs.h <<\EOF
10708 #define uid_t int
10709 EOF
10710
10711   cat >> confdefs.h <<\EOF
10712 #define gid_t int
10713 EOF
10714
10715 fi
10716
10717 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10718 echo "configure:10719: checking type of array argument to getgroups" >&5
10719 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   if test "$cross_compiling" = yes; then
10723   ac_cv_type_getgroups=cross
10724 else
10725   cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728
10729 /* Thanks to Mike Rendell for this test.  */
10730 #include <sys/types.h>
10731 #define NGID 256
10732 #undef MAX
10733 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10734 main()
10735 {
10736   gid_t gidset[NGID];
10737   int i, n;
10738   union { gid_t gval; long lval; }  val;
10739
10740   val.lval = -1;
10741   for (i = 0; i < NGID; i++)
10742     gidset[i] = val.gval;
10743   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10744                  gidset);
10745   /* Exit non-zero if getgroups seems to require an array of ints.  This
10746      happens when gid_t is short but getgroups modifies an array of ints.  */
10747   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10748 }
10749
10750 EOF
10751 if { (eval echo configure:10752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10752 then
10753     ac_cv_type_getgroups=gid_t
10754 else
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -fr conftest*
10758   ac_cv_type_getgroups=int
10759 fi
10760 rm -fr conftest*
10761 fi
10762
10763 if test $ac_cv_type_getgroups = cross; then
10764         cat > conftest.$ac_ext <<EOF
10765 #line 10766 "configure"
10766 #include "confdefs.h"
10767 #include <unistd.h>
10768 EOF
10769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10770   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10771   rm -rf conftest*
10772   ac_cv_type_getgroups=gid_t
10773 else
10774   rm -rf conftest*
10775   ac_cv_type_getgroups=int
10776 fi
10777 rm -f conftest*
10778
10779 fi
10780 fi
10781
10782 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10783 cat >> confdefs.h <<EOF
10784 #define GETGROUPS_T $ac_cv_type_getgroups
10785 EOF
10786
10787  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10788 echo "configure:10789: checking for ANSI C header files" >&5
10789 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10790   echo $ac_n "(cached) $ac_c" 1>&6
10791 else
10792   cat > conftest.$ac_ext <<EOF
10793 #line 10794 "configure"
10794 #include "confdefs.h"
10795 #include <stdlib.h>
10796 #include <stdarg.h>
10797 #include <string.h>
10798 #include <float.h>
10799 EOF
10800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10801 { (eval echo configure:10802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10803 if test -z "$ac_err"; then
10804   rm -rf conftest*
10805   ac_cv_header_stdc=yes
10806 else
10807   echo "$ac_err" >&5
10808   echo "configure: failed program was:" >&5
10809   cat conftest.$ac_ext >&5
10810   rm -rf conftest*
10811   ac_cv_header_stdc=no
10812 fi
10813 rm -f conftest*
10814
10815 if test $ac_cv_header_stdc = yes; then
10816   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10817 cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820 #include <string.h>
10821 EOF
10822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10823   egrep "memchr" >/dev/null 2>&1; then
10824   :
10825 else
10826   rm -rf conftest*
10827   ac_cv_header_stdc=no
10828 fi
10829 rm -f conftest*
10830
10831 fi
10832
10833 if test $ac_cv_header_stdc = yes; then
10834   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10835 cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838 #include <stdlib.h>
10839 EOF
10840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10841   egrep "free" >/dev/null 2>&1; then
10842   :
10843 else
10844   rm -rf conftest*
10845   ac_cv_header_stdc=no
10846 fi
10847 rm -f conftest*
10848
10849 fi
10850
10851 if test $ac_cv_header_stdc = yes; then
10852   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10853 if test "$cross_compiling" = yes; then
10854   :
10855 else
10856   cat > conftest.$ac_ext <<EOF
10857 #line 10858 "configure"
10858 #include "confdefs.h"
10859 #include <ctype.h>
10860 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10861 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10862 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10863 int main () { int i; for (i = 0; i < 256; i++)
10864 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10865 exit (0); }
10866
10867 EOF
10868 if { (eval echo configure:10869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10869 then
10870   :
10871 else
10872   echo "configure: failed program was:" >&5
10873   cat conftest.$ac_ext >&5
10874   rm -fr conftest*
10875   ac_cv_header_stdc=no
10876 fi
10877 rm -fr conftest*
10878 fi
10879
10880 fi
10881 fi
10882
10883 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10884 if test $ac_cv_header_stdc = yes; then
10885   cat >> confdefs.h <<\EOF
10886 #define STDC_HEADERS 1
10887 EOF
10888
10889 fi
10890
10891 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10892 echo "configure:10893: checking for mode_t" >&5
10893 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
10894   echo $ac_n "(cached) $ac_c" 1>&6
10895 else
10896   cat > conftest.$ac_ext <<EOF
10897 #line 10898 "configure"
10898 #include "confdefs.h"
10899 #include <sys/types.h>
10900 #if STDC_HEADERS
10901 #include <stdlib.h>
10902 #include <stddef.h>
10903 #endif
10904 EOF
10905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10906   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10907   rm -rf conftest*
10908   eval "ac_cv_type_mode_t=yes"
10909 else
10910   rm -rf conftest*
10911   eval "ac_cv_type_mode_t=no"
10912 fi
10913 rm -f conftest*
10914
10915 fi
10916 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
10917   echo "$ac_t""yes" 1>&6
10918 else
10919   echo "$ac_t""no" 1>&6
10920   cat >> confdefs.h <<EOF
10921 #define mode_t int
10922 EOF
10923
10924 fi
10925
10926 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10927 echo "configure:10928: checking for off_t" >&5
10928 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 #include <sys/types.h>
10935 #if STDC_HEADERS
10936 #include <stdlib.h>
10937 #include <stddef.h>
10938 #endif
10939 EOF
10940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10941   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10942   rm -rf conftest*
10943   eval "ac_cv_type_off_t=yes"
10944 else
10945   rm -rf conftest*
10946   eval "ac_cv_type_off_t=no"
10947 fi
10948 rm -f conftest*
10949
10950 fi
10951 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
10952   echo "$ac_t""yes" 1>&6
10953 else
10954   echo "$ac_t""no" 1>&6
10955   cat >> confdefs.h <<EOF
10956 #define off_t long
10957 EOF
10958
10959 fi
10960
10961 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10962 echo "configure:10963: checking for pid_t" >&5
10963 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
10964   echo $ac_n "(cached) $ac_c" 1>&6
10965 else
10966   cat > conftest.$ac_ext <<EOF
10967 #line 10968 "configure"
10968 #include "confdefs.h"
10969 #include <sys/types.h>
10970 #if STDC_HEADERS
10971 #include <stdlib.h>
10972 #include <stddef.h>
10973 #endif
10974 EOF
10975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10976   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10977   rm -rf conftest*
10978   eval "ac_cv_type_pid_t=yes"
10979 else
10980   rm -rf conftest*
10981   eval "ac_cv_type_pid_t=no"
10982 fi
10983 rm -f conftest*
10984
10985 fi
10986 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
10987   echo "$ac_t""yes" 1>&6
10988 else
10989   echo "$ac_t""no" 1>&6
10990   cat >> confdefs.h <<EOF
10991 #define pid_t int
10992 EOF
10993
10994 fi
10995
10996 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10997 echo "configure:10998: checking for ptrdiff_t" >&5
10998 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
10999   echo $ac_n "(cached) $ac_c" 1>&6
11000 else
11001   cat > conftest.$ac_ext <<EOF
11002 #line 11003 "configure"
11003 #include "confdefs.h"
11004 #include <stddef.h>
11005 int main() {
11006 ptrdiff_t p
11007 ; return 0; }
11008 EOF
11009 if { (eval echo configure:11010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11010   rm -rf conftest*
11011   am_cv_type_ptrdiff_t=yes
11012 else
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -rf conftest*
11016   am_cv_type_ptrdiff_t=no
11017 fi
11018 rm -f conftest*
11019 fi
11020
11021 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11022    if test $am_cv_type_ptrdiff_t = yes; then
11023      cat >> confdefs.h <<\EOF
11024 #define HAVE_PTRDIFF_T 1
11025 EOF
11026
11027    fi
11028
11029 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11030 echo "configure:11031: checking return type of signal handlers" >&5
11031 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11032   echo $ac_n "(cached) $ac_c" 1>&6
11033 else
11034   cat > conftest.$ac_ext <<EOF
11035 #line 11036 "configure"
11036 #include "confdefs.h"
11037 #include <sys/types.h>
11038 #include <signal.h>
11039 #ifdef signal
11040 #undef signal
11041 #endif
11042 #ifdef __cplusplus
11043 extern "C" void (*signal (int, void (*)(int)))(int);
11044 #else
11045 void (*signal ()) ();
11046 #endif
11047
11048 int main() {
11049 int i;
11050 ; return 0; }
11051 EOF
11052 if { (eval echo configure:11053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11053   rm -rf conftest*
11054   ac_cv_type_signal=void
11055 else
11056   echo "configure: failed program was:" >&5
11057   cat conftest.$ac_ext >&5
11058   rm -rf conftest*
11059   ac_cv_type_signal=int
11060 fi
11061 rm -f conftest*
11062 fi
11063
11064 echo "$ac_t""$ac_cv_type_signal" 1>&6
11065 cat >> confdefs.h <<EOF
11066 #define RETSIGTYPE $ac_cv_type_signal
11067 EOF
11068
11069
11070 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11071 echo "configure:11072: checking for sig_atomic_t" >&5
11072 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11073   echo $ac_n "(cached) $ac_c" 1>&6
11074 else
11075   cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 #include <signal.h>
11079 int main() {
11080 sig_atomic_t atomic;
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11084   rm -rf conftest*
11085   ol_cv_type_sig_atomic_t=yes
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   ol_cv_type_sig_atomic_t=no
11091 fi
11092 rm -f conftest*
11093 fi
11094
11095 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11096   if test $ol_cv_type_sig_atomic_t = no; then
11097     cat >> confdefs.h <<\EOF
11098 #define sig_atomic_t int
11099 EOF
11100
11101   fi
11102  
11103 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11104 echo "configure:11105: checking for size_t" >&5
11105 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11106   echo $ac_n "(cached) $ac_c" 1>&6
11107 else
11108   cat > conftest.$ac_ext <<EOF
11109 #line 11110 "configure"
11110 #include "confdefs.h"
11111 #include <sys/types.h>
11112 #if STDC_HEADERS
11113 #include <stdlib.h>
11114 #include <stddef.h>
11115 #endif
11116 EOF
11117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11118   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11119   rm -rf conftest*
11120   eval "ac_cv_type_size_t=yes"
11121 else
11122   rm -rf conftest*
11123   eval "ac_cv_type_size_t=no"
11124 fi
11125 rm -f conftest*
11126
11127 fi
11128 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11129   echo "$ac_t""yes" 1>&6
11130 else
11131   echo "$ac_t""no" 1>&6
11132   cat >> confdefs.h <<EOF
11133 #define size_t unsigned
11134 EOF
11135
11136 fi
11137
11138 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11139 echo "configure:11140: checking for socklen_t" >&5
11140 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11141   echo $ac_n "(cached) $ac_c" 1>&6
11142 else
11143   cat > conftest.$ac_ext <<EOF
11144 #line 11145 "configure"
11145 #include "confdefs.h"
11146
11147 #ifdef HAVE_SYS_TYPES_H
11148 #include <sys/types.h>
11149 #endif
11150 #ifdef HAVE_SYS_SOCKET_H
11151 #include <sys/socket.h>
11152 #endif
11153
11154 int main() {
11155 socklen_t len;
11156 ; return 0; }
11157 EOF
11158 if { (eval echo configure:11159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11159   rm -rf conftest*
11160   ol_cv_type_socklen_t=yes
11161 else
11162   echo "configure: failed program was:" >&5
11163   cat conftest.$ac_ext >&5
11164   rm -rf conftest*
11165   ol_cv_type_socklen_t=no
11166 fi
11167 rm -f conftest*
11168 fi
11169
11170 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11171   if test $ol_cv_type_socklen_t = no; then
11172     cat >> confdefs.h <<\EOF
11173 #define socklen_t int
11174 EOF
11175
11176   fi
11177  
11178 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11179 echo "configure:11180: checking for member st_blksize in aggregate type struct stat" >&5
11180 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11181   echo $ac_n "(cached) $ac_c" 1>&6
11182 else
11183   cat > conftest.$ac_ext <<EOF
11184 #line 11185 "configure"
11185 #include "confdefs.h"
11186 #include <sys/types.h>
11187 #include <sys/stat.h>
11188 int main() {
11189 struct stat foo; foo.st_blksize;
11190 ; return 0; }
11191 EOF
11192 if { (eval echo configure:11193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11193   rm -rf conftest*
11194   ac_cv_c_struct_member_st_blksize=yes
11195 else
11196   echo "configure: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   rm -rf conftest*
11199   ac_cv_c_struct_member_st_blksize=no
11200 fi
11201 rm -f conftest*
11202 fi
11203
11204 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11205 st_blksize="$ac_cv_c_struct_member_st_blksize"
11206 if test $ac_cv_c_struct_member_st_blksize = yes; then
11207   cat >> confdefs.h <<\EOF
11208 #define HAVE_ST_BLKSIZE 1
11209 EOF
11210
11211 fi
11212
11213 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11214 echo "configure:11215: checking whether time.h and sys/time.h may both be included" >&5
11215 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11216   echo $ac_n "(cached) $ac_c" 1>&6
11217 else
11218   cat > conftest.$ac_ext <<EOF
11219 #line 11220 "configure"
11220 #include "confdefs.h"
11221 #include <sys/types.h>
11222 #include <sys/time.h>
11223 #include <time.h>
11224 int main() {
11225 struct tm *tp;
11226 ; return 0; }
11227 EOF
11228 if { (eval echo configure:11229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11229   rm -rf conftest*
11230   ac_cv_header_time=yes
11231 else
11232   echo "configure: failed program was:" >&5
11233   cat conftest.$ac_ext >&5
11234   rm -rf conftest*
11235   ac_cv_header_time=no
11236 fi
11237 rm -f conftest*
11238 fi
11239
11240 echo "$ac_t""$ac_cv_header_time" 1>&6
11241 if test $ac_cv_header_time = yes; then
11242   cat >> confdefs.h <<\EOF
11243 #define TIME_WITH_SYS_TIME 1
11244 EOF
11245
11246 fi
11247
11248 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11249 echo "configure:11250: checking whether struct tm is in sys/time.h or time.h" >&5
11250 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 #include <sys/types.h>
11257 #include <time.h>
11258 int main() {
11259 struct tm *tp; tp->tm_sec;
11260 ; return 0; }
11261 EOF
11262 if { (eval echo configure:11263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11263   rm -rf conftest*
11264   ac_cv_struct_tm=time.h
11265 else
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   ac_cv_struct_tm=sys/time.h
11270 fi
11271 rm -f conftest*
11272 fi
11273
11274 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11275 if test $ac_cv_struct_tm = sys/time.h; then
11276   cat >> confdefs.h <<\EOF
11277 #define TM_IN_SYS_TIME 1
11278 EOF
11279
11280 fi
11281
11282 # test for pw_gecos in struct passwd
11283 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11284 echo "configure:11285: checking struct passwd for pw_gecos" >&5
11285 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   
11289         cat > conftest.$ac_ext <<EOF
11290 #line 11291 "configure"
11291 #include "confdefs.h"
11292 #include <pwd.h>
11293 int main() {
11294
11295         struct passwd pwd;
11296         pwd.pw_gecos = pwd.pw_name;
11297
11298 ; return 0; }
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11301   rm -rf conftest*
11302   ol_cv_struct_passwd_pw_gecos=yes
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   ol_cv_struct_passwd_pw_gecos=no
11308 fi
11309 rm -f conftest*
11310 fi
11311
11312 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11313 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11314         cat >> confdefs.h <<\EOF
11315 #define HAVE_PW_GECOS 1
11316 EOF
11317
11318 fi
11319
11320 # test for pw_passwd in struct passwd
11321 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11322 echo "configure:11323: checking struct passwd for pw_passwd" >&5
11323 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11324   echo $ac_n "(cached) $ac_c" 1>&6
11325 else
11326   
11327         cat > conftest.$ac_ext <<EOF
11328 #line 11329 "configure"
11329 #include "confdefs.h"
11330 #include <pwd.h>
11331 int main() {
11332
11333         struct passwd pwd;
11334         pwd.pw_passwd = pwd.pw_name;
11335
11336 ; return 0; }
11337 EOF
11338 if { (eval echo configure:11339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11339   rm -rf conftest*
11340   ol_cv_struct_passwd_pw_passwd=yes
11341 else
11342   echo "configure: failed program was:" >&5
11343   cat conftest.$ac_ext >&5
11344   rm -rf conftest*
11345   ol_cv_struct_passwd_pw_passwd=no
11346 fi
11347 rm -f conftest*
11348 fi
11349
11350 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11351 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11352         cat >> confdefs.h <<\EOF
11353 #define HAVE_PW_PASSWD 1
11354 EOF
11355
11356 fi
11357
11358
11359 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11360 echo "configure:11361: checking if toupper() requires islower()" >&5
11361 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11362   echo $ac_n "(cached) $ac_c" 1>&6
11363 else
11364   
11365         if test "$cross_compiling" = yes; then
11366   ol_cv_c_upper_lower=safe
11367 else
11368   cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371
11372 #include <ctype.h>
11373 main()
11374 {
11375         if ('C' == toupper('C'))
11376                 exit(0);
11377         else
11378                 exit(1);
11379 }
11380 EOF
11381 if { (eval echo configure:11382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11382 then
11383   ol_cv_c_upper_lower=no
11384 else
11385   echo "configure: failed program was:" >&5
11386   cat conftest.$ac_ext >&5
11387   rm -fr conftest*
11388   ol_cv_c_upper_lower=yes
11389 fi
11390 rm -fr conftest*
11391 fi
11392
11393 fi
11394
11395 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11396 if test $ol_cv_c_upper_lower != no ; then
11397         cat >> confdefs.h <<\EOF
11398 #define C_UPPER_LOWER 1
11399 EOF
11400
11401 fi
11402
11403 echo $ac_n "checking for working const""... $ac_c" 1>&6
11404 echo "configure:11405: checking for working const" >&5
11405 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11406   echo $ac_n "(cached) $ac_c" 1>&6
11407 else
11408   cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11411
11412 int main() {
11413
11414 /* Ultrix mips cc rejects this.  */
11415 typedef int charset[2]; const charset x;
11416 /* SunOS 4.1.1 cc rejects this.  */
11417 char const *const *ccp;
11418 char **p;
11419 /* NEC SVR4.0.2 mips cc rejects this.  */
11420 struct point {int x, y;};
11421 static struct point const zero = {0,0};
11422 /* AIX XL C 1.02.0.0 rejects this.
11423    It does not let you subtract one const X* pointer from another in an arm
11424    of an if-expression whose if-part is not a constant expression */
11425 const char *g = "string";
11426 ccp = &g + (g ? g-g : 0);
11427 /* HPUX 7.0 cc rejects these. */
11428 ++ccp;
11429 p = (char**) ccp;
11430 ccp = (char const *const *) p;
11431 { /* SCO 3.2v4 cc rejects this.  */
11432   char *t;
11433   char const *s = 0 ? (char *) 0 : (char const *) 0;
11434
11435   *t++ = 0;
11436 }
11437 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11438   int x[] = {25, 17};
11439   const int *foo = &x[0];
11440   ++foo;
11441 }
11442 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11443   typedef const int *iptr;
11444   iptr p = 0;
11445   ++p;
11446 }
11447 { /* AIX XL C 1.02.0.0 rejects this saying
11448      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11449   struct s { int j; const int *ap[3]; };
11450   struct s *b; b->j = 5;
11451 }
11452 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11453   const int foo = 10;
11454 }
11455
11456 ; return 0; }
11457 EOF
11458 if { (eval echo configure:11459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11459   rm -rf conftest*
11460   ac_cv_c_const=yes
11461 else
11462   echo "configure: failed program was:" >&5
11463   cat conftest.$ac_ext >&5
11464   rm -rf conftest*
11465   ac_cv_c_const=no
11466 fi
11467 rm -f conftest*
11468 fi
11469
11470 echo "$ac_t""$ac_cv_c_const" 1>&6
11471 if test $ac_cv_c_const = no; then
11472   cat >> confdefs.h <<\EOF
11473 #define const 
11474 EOF
11475
11476 fi
11477
11478 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11479 echo "configure:11480: checking if compiler understands volatile" >&5
11480 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11481   echo $ac_n "(cached) $ac_c" 1>&6
11482 else
11483   cat > conftest.$ac_ext <<EOF
11484 #line 11485 "configure"
11485 #include "confdefs.h"
11486 int x, y, z;
11487 int main() {
11488 volatile int a; int * volatile b = x ? &y : &z;
11489       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11490       *b = 0;
11491 ; return 0; }
11492 EOF
11493 if { (eval echo configure:11494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11494   rm -rf conftest*
11495   ol_cv_c_volatile=yes
11496 else
11497   echo "configure: failed program was:" >&5
11498   cat conftest.$ac_ext >&5
11499   rm -rf conftest*
11500   ol_cv_c_volatile=no
11501 fi
11502 rm -f conftest*
11503 fi
11504
11505 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11506   if test $ol_cv_c_volatile = yes; then
11507     : 
11508   else
11509     cat >> confdefs.h <<\EOF
11510 #define volatile 
11511 EOF
11512
11513   fi
11514  
11515
11516 if test $cross_compiling = yes ; then
11517         cat >> confdefs.h <<\EOF
11518 #define CROSS_COMPILING 1
11519 EOF
11520
11521
11522         cat >> confdefs.h <<\EOF
11523 #define LBER_INT_T long
11524 EOF
11525
11526         cat >> confdefs.h <<\EOF
11527 #define LBER_TAG_T long
11528 EOF
11529
11530         cat >> confdefs.h <<\EOF
11531 #define LBER_SOCKET_T int
11532 EOF
11533
11534
11535 else
11536         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11537 echo "configure:11538: checking whether byte ordering is bigendian" >&5
11538 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11539   echo $ac_n "(cached) $ac_c" 1>&6
11540 else
11541   ac_cv_c_bigendian=unknown
11542 # See if sys/param.h defines the BYTE_ORDER macro.
11543 cat > conftest.$ac_ext <<EOF
11544 #line 11545 "configure"
11545 #include "confdefs.h"
11546 #include <sys/types.h>
11547 #include <sys/param.h>
11548 int main() {
11549
11550 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11551  bogus endian macros
11552 #endif
11553 ; return 0; }
11554 EOF
11555 if { (eval echo configure:11556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11556   rm -rf conftest*
11557   # It does; now see whether it defined to BIG_ENDIAN or not.
11558 cat > conftest.$ac_ext <<EOF
11559 #line 11560 "configure"
11560 #include "confdefs.h"
11561 #include <sys/types.h>
11562 #include <sys/param.h>
11563 int main() {
11564
11565 #if BYTE_ORDER != BIG_ENDIAN
11566  not big endian
11567 #endif
11568 ; return 0; }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11571   rm -rf conftest*
11572   ac_cv_c_bigendian=yes
11573 else
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   ac_cv_c_bigendian=no
11578 fi
11579 rm -f conftest*
11580 else
11581   echo "configure: failed program was:" >&5
11582   cat conftest.$ac_ext >&5
11583 fi
11584 rm -f conftest*
11585 if test $ac_cv_c_bigendian = unknown; then
11586 if test "$cross_compiling" = yes; then
11587     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11588 else
11589   cat > conftest.$ac_ext <<EOF
11590 #line 11591 "configure"
11591 #include "confdefs.h"
11592 main () {
11593   /* Are we little or big endian?  From Harbison&Steele.  */
11594   union
11595   {
11596     long l;
11597     char c[sizeof (long)];
11598   } u;
11599   u.l = 1;
11600   exit (u.c[sizeof (long) - 1] == 1);
11601 }
11602 EOF
11603 if { (eval echo configure:11604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11604 then
11605   ac_cv_c_bigendian=no
11606 else
11607   echo "configure: failed program was:" >&5
11608   cat conftest.$ac_ext >&5
11609   rm -fr conftest*
11610   ac_cv_c_bigendian=yes
11611 fi
11612 rm -fr conftest*
11613 fi
11614
11615 fi
11616 fi
11617
11618 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11619 if test $ac_cv_c_bigendian = yes; then
11620   cat >> confdefs.h <<\EOF
11621 #define WORDS_BIGENDIAN 1
11622 EOF
11623
11624 fi
11625
11626         echo $ac_n "checking size of short""... $ac_c" 1>&6
11627 echo "configure:11628: checking size of short" >&5
11628 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11629   echo $ac_n "(cached) $ac_c" 1>&6
11630 else
11631   if test "$cross_compiling" = yes; then
11632     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11633 else
11634   cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637 #include <stdio.h>
11638 main()
11639 {
11640   FILE *f=fopen("conftestval", "w");
11641   if (!f) exit(1);
11642   fprintf(f, "%d\n", sizeof(short));
11643   exit(0);
11644 }
11645 EOF
11646 if { (eval echo configure:11647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11647 then
11648   ac_cv_sizeof_short=`cat conftestval`
11649 else
11650   echo "configure: failed program was:" >&5
11651   cat conftest.$ac_ext >&5
11652   rm -fr conftest*
11653   ac_cv_sizeof_short=0
11654 fi
11655 rm -fr conftest*
11656 fi
11657
11658 fi
11659 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11660 cat >> confdefs.h <<EOF
11661 #define SIZEOF_SHORT $ac_cv_sizeof_short
11662 EOF
11663
11664  
11665         echo $ac_n "checking size of int""... $ac_c" 1>&6
11666 echo "configure:11667: checking size of int" >&5
11667 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11668   echo $ac_n "(cached) $ac_c" 1>&6
11669 else
11670   if test "$cross_compiling" = yes; then
11671     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11672 else
11673   cat > conftest.$ac_ext <<EOF
11674 #line 11675 "configure"
11675 #include "confdefs.h"
11676 #include <stdio.h>
11677 main()
11678 {
11679   FILE *f=fopen("conftestval", "w");
11680   if (!f) exit(1);
11681   fprintf(f, "%d\n", sizeof(int));
11682   exit(0);
11683 }
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11686 then
11687   ac_cv_sizeof_int=`cat conftestval`
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -fr conftest*
11692   ac_cv_sizeof_int=0
11693 fi
11694 rm -fr conftest*
11695 fi
11696
11697 fi
11698 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11699 cat >> confdefs.h <<EOF
11700 #define SIZEOF_INT $ac_cv_sizeof_int
11701 EOF
11702
11703  
11704         echo $ac_n "checking size of long""... $ac_c" 1>&6
11705 echo "configure:11706: checking size of long" >&5
11706 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   if test "$cross_compiling" = yes; then
11710     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11711 else
11712   cat > conftest.$ac_ext <<EOF
11713 #line 11714 "configure"
11714 #include "confdefs.h"
11715 #include <stdio.h>
11716 main()
11717 {
11718   FILE *f=fopen("conftestval", "w");
11719   if (!f) exit(1);
11720   fprintf(f, "%d\n", sizeof(long));
11721   exit(0);
11722 }
11723 EOF
11724 if { (eval echo configure:11725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11725 then
11726   ac_cv_sizeof_long=`cat conftestval`
11727 else
11728   echo "configure: failed program was:" >&5
11729   cat conftest.$ac_ext >&5
11730   rm -fr conftest*
11731   ac_cv_sizeof_long=0
11732 fi
11733 rm -fr conftest*
11734 fi
11735
11736 fi
11737 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11738 cat >> confdefs.h <<EOF
11739 #define SIZEOF_LONG $ac_cv_sizeof_long
11740 EOF
11741
11742
11743
11744         if test "$ac_cv_sizeof_int" -lt 4 ; then
11745                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11746
11747                 cat >> confdefs.h <<\EOF
11748 #define LBER_INT_T long
11749 EOF
11750
11751                 cat >> confdefs.h <<\EOF
11752 #define LBER_TAG_T long
11753 EOF
11754
11755                 cat >> confdefs.h <<\EOF
11756 #define LBER_SOCKET_T int
11757 EOF
11758
11759         else
11760                 cat >> confdefs.h <<\EOF
11761 #define LBER_INT_T int
11762 EOF
11763
11764                 cat >> confdefs.h <<\EOF
11765 #define LBER_TAG_T long
11766 EOF
11767
11768                 cat >> confdefs.h <<\EOF
11769 #define LBER_SOCKET_T int
11770 EOF
11771
11772         fi
11773 fi
11774
11775 cat >> confdefs.h <<\EOF
11776 #define LBER_LEN_T long
11777 EOF
11778
11779
11780 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11781 echo "configure:11782: checking for 8-bit clean memcmp" >&5
11782 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11783   echo $ac_n "(cached) $ac_c" 1>&6
11784 else
11785   if test "$cross_compiling" = yes; then
11786   ac_cv_func_memcmp_clean=no
11787 else
11788   cat > conftest.$ac_ext <<EOF
11789 #line 11790 "configure"
11790 #include "confdefs.h"
11791
11792 main()
11793 {
11794   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11795   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11796 }
11797
11798 EOF
11799 if { (eval echo configure:11800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11800 then
11801   ac_cv_func_memcmp_clean=yes
11802 else
11803   echo "configure: failed program was:" >&5
11804   cat conftest.$ac_ext >&5
11805   rm -fr conftest*
11806   ac_cv_func_memcmp_clean=no
11807 fi
11808 rm -fr conftest*
11809 fi
11810
11811 fi
11812
11813 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11814 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11815
11816 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11817 echo "configure:11818: checking for strftime" >&5
11818 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
11819   echo $ac_n "(cached) $ac_c" 1>&6
11820 else
11821   cat > conftest.$ac_ext <<EOF
11822 #line 11823 "configure"
11823 #include "confdefs.h"
11824 /* System header to define __stub macros and hopefully few prototypes,
11825     which can conflict with char strftime(); below.  */
11826 #include <assert.h>
11827 /* Override any gcc2 internal prototype to avoid an error.  */
11828 /* We use char because int might match the return type of a gcc2
11829     builtin and then its argument prototype would still apply.  */
11830 char strftime();
11831 char (*f)();
11832
11833 int main() {
11834
11835 /* The GNU C library defines this for functions which it implements
11836     to always fail with ENOSYS.  Some functions are actually named
11837     something starting with __ and the normal name is an alias.  */
11838 #if defined (__stub_strftime) || defined (__stub___strftime)
11839 choke me
11840 #else
11841 f = strftime;
11842 #endif
11843
11844 ; return 0; }
11845 EOF
11846 if { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11847   rm -rf conftest*
11848   eval "ac_cv_func_strftime=yes"
11849 else
11850   echo "configure: failed program was:" >&5
11851   cat conftest.$ac_ext >&5
11852   rm -rf conftest*
11853   eval "ac_cv_func_strftime=no"
11854 fi
11855 rm -f conftest*
11856 fi
11857
11858 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11859   echo "$ac_t""yes" 1>&6
11860   cat >> confdefs.h <<\EOF
11861 #define HAVE_STRFTIME 1
11862 EOF
11863
11864 else
11865   echo "$ac_t""no" 1>&6
11866 # strftime is in -lintl on SCO UNIX.
11867 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11868 echo "configure:11869: checking for strftime in -lintl" >&5
11869 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
11870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11871   echo $ac_n "(cached) $ac_c" 1>&6
11872 else
11873   ac_save_LIBS="$LIBS"
11874 LIBS="-lintl  $LIBS"
11875 cat > conftest.$ac_ext <<EOF
11876 #line 11877 "configure"
11877 #include "confdefs.h"
11878 /* Override any gcc2 internal prototype to avoid an error.  */
11879 /* We use char because int might match the return type of a gcc2
11880     builtin and then its argument prototype would still apply.  */
11881 char strftime();
11882
11883 int main() {
11884 strftime()
11885 ; return 0; }
11886 EOF
11887 if { (eval echo configure:11888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11888   rm -rf conftest*
11889   eval "ac_cv_lib_$ac_lib_var=yes"
11890 else
11891   echo "configure: failed program was:" >&5
11892   cat conftest.$ac_ext >&5
11893   rm -rf conftest*
11894   eval "ac_cv_lib_$ac_lib_var=no"
11895 fi
11896 rm -f conftest*
11897 LIBS="$ac_save_LIBS"
11898
11899 fi
11900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11901   echo "$ac_t""yes" 1>&6
11902   cat >> confdefs.h <<\EOF
11903 #define HAVE_STRFTIME 1
11904 EOF
11905
11906 LIBS="-lintl $LIBS"
11907 else
11908   echo "$ac_t""no" 1>&6
11909 fi
11910
11911 fi
11912
11913
11914 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11915 echo "configure:11916: checking for vprintf" >&5
11916 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
11917   echo $ac_n "(cached) $ac_c" 1>&6
11918 else
11919   cat > conftest.$ac_ext <<EOF
11920 #line 11921 "configure"
11921 #include "confdefs.h"
11922 /* System header to define __stub macros and hopefully few prototypes,
11923     which can conflict with char vprintf(); below.  */
11924 #include <assert.h>
11925 /* Override any gcc2 internal prototype to avoid an error.  */
11926 /* We use char because int might match the return type of a gcc2
11927     builtin and then its argument prototype would still apply.  */
11928 char vprintf();
11929 char (*f)();
11930
11931 int main() {
11932
11933 /* The GNU C library defines this for functions which it implements
11934     to always fail with ENOSYS.  Some functions are actually named
11935     something starting with __ and the normal name is an alias.  */
11936 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11937 choke me
11938 #else
11939 f = vprintf;
11940 #endif
11941
11942 ; return 0; }
11943 EOF
11944 if { (eval echo configure:11945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11945   rm -rf conftest*
11946   eval "ac_cv_func_vprintf=yes"
11947 else
11948   echo "configure: failed program was:" >&5
11949   cat conftest.$ac_ext >&5
11950   rm -rf conftest*
11951   eval "ac_cv_func_vprintf=no"
11952 fi
11953 rm -f conftest*
11954 fi
11955
11956 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11957   echo "$ac_t""yes" 1>&6
11958   cat >> confdefs.h <<\EOF
11959 #define HAVE_VPRINTF 1
11960 EOF
11961
11962 else
11963   echo "$ac_t""no" 1>&6
11964 fi
11965
11966 if test "$ac_cv_func_vprintf" != yes; then
11967 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11968 echo "configure:11969: checking for _doprnt" >&5
11969 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
11970   echo $ac_n "(cached) $ac_c" 1>&6
11971 else
11972   cat > conftest.$ac_ext <<EOF
11973 #line 11974 "configure"
11974 #include "confdefs.h"
11975 /* System header to define __stub macros and hopefully few prototypes,
11976     which can conflict with char _doprnt(); below.  */
11977 #include <assert.h>
11978 /* Override any gcc2 internal prototype to avoid an error.  */
11979 /* We use char because int might match the return type of a gcc2
11980     builtin and then its argument prototype would still apply.  */
11981 char _doprnt();
11982 char (*f)();
11983
11984 int main() {
11985
11986 /* The GNU C library defines this for functions which it implements
11987     to always fail with ENOSYS.  Some functions are actually named
11988     something starting with __ and the normal name is an alias.  */
11989 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11990 choke me
11991 #else
11992 f = _doprnt;
11993 #endif
11994
11995 ; return 0; }
11996 EOF
11997 if { (eval echo configure:11998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11998   rm -rf conftest*
11999   eval "ac_cv_func__doprnt=yes"
12000 else
12001   echo "configure: failed program was:" >&5
12002   cat conftest.$ac_ext >&5
12003   rm -rf conftest*
12004   eval "ac_cv_func__doprnt=no"
12005 fi
12006 rm -f conftest*
12007 fi
12008
12009 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12010   echo "$ac_t""yes" 1>&6
12011   cat >> confdefs.h <<\EOF
12012 #define HAVE_DOPRNT 1
12013 EOF
12014
12015 else
12016   echo "$ac_t""no" 1>&6
12017 fi
12018
12019 fi
12020
12021
12022 if test $ac_cv_func_vprintf = yes ; then
12023                 for ac_func in vsnprintf vsprintf
12024 do
12025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12026 echo "configure:12027: checking for $ac_func" >&5
12027 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12028   echo $ac_n "(cached) $ac_c" 1>&6
12029 else
12030   cat > conftest.$ac_ext <<EOF
12031 #line 12032 "configure"
12032 #include "confdefs.h"
12033 /* System header to define __stub macros and hopefully few prototypes,
12034     which can conflict with char $ac_func(); below.  */
12035 #include <assert.h>
12036 /* Override any gcc2 internal prototype to avoid an error.  */
12037 /* We use char because int might match the return type of a gcc2
12038     builtin and then its argument prototype would still apply.  */
12039 char $ac_func();
12040 char (*f)();
12041
12042 int main() {
12043
12044 /* The GNU C library defines this for functions which it implements
12045     to always fail with ENOSYS.  Some functions are actually named
12046     something starting with __ and the normal name is an alias.  */
12047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12048 choke me
12049 #else
12050 f = $ac_func;
12051 #endif
12052
12053 ; return 0; }
12054 EOF
12055 if { (eval echo configure:12056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12056   rm -rf conftest*
12057   eval "ac_cv_func_$ac_func=yes"
12058 else
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   eval "ac_cv_func_$ac_func=no"
12063 fi
12064 rm -f conftest*
12065 fi
12066
12067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12068   echo "$ac_t""yes" 1>&6
12069     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12070   cat >> confdefs.h <<EOF
12071 #define $ac_tr_func 1
12072 EOF
12073  
12074 else
12075   echo "$ac_t""no" 1>&6
12076 fi
12077 done
12078
12079 fi
12080
12081 for ac_func in \
12082         bcopy                   \
12083         closesocket             \
12084         endgrent                \
12085         endpwent                \
12086         flock                   \
12087         getdtablesize   \
12088         getgrgid                \
12089         gethostname             \
12090         getpass                 \
12091         getpwuid                \
12092         getpwnam                \
12093         getspnam                \
12094         gettimeofday    \
12095         initgroups              \
12096         lockf                   \
12097         memcpy                  \
12098         memmove                 \
12099         mkstemp                 \
12100         read                    \
12101         recv                    \
12102         recvfrom                \
12103         setpwfile               \
12104         setgid                  \
12105         setegid                 \
12106         setsid                  \
12107         setuid                  \
12108         seteuid                 \
12109         signal                  \
12110         sigset                  \
12111         snprintf                \
12112         strdup                  \
12113         strerror                \
12114         strpbrk                 \
12115         strrchr                 \
12116         strsep                  \
12117         strstr                  \
12118         strtol                  \
12119         strtoul                 \
12120         strspn                  \
12121         sysconf                 \
12122         waitpid                 \
12123         wait4                   \
12124         write                   \
12125         send                    \
12126         sendto                  \
12127
12128 do
12129 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12130 echo "configure:12131: checking for $ac_func" >&5
12131 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12132   echo $ac_n "(cached) $ac_c" 1>&6
12133 else
12134   cat > conftest.$ac_ext <<EOF
12135 #line 12136 "configure"
12136 #include "confdefs.h"
12137 /* System header to define __stub macros and hopefully few prototypes,
12138     which can conflict with char $ac_func(); below.  */
12139 #include <assert.h>
12140 /* Override any gcc2 internal prototype to avoid an error.  */
12141 /* We use char because int might match the return type of a gcc2
12142     builtin and then its argument prototype would still apply.  */
12143 char $ac_func();
12144 char (*f)();
12145
12146 int main() {
12147
12148 /* The GNU C library defines this for functions which it implements
12149     to always fail with ENOSYS.  Some functions are actually named
12150     something starting with __ and the normal name is an alias.  */
12151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12152 choke me
12153 #else
12154 f = $ac_func;
12155 #endif
12156
12157 ; return 0; }
12158 EOF
12159 if { (eval echo configure:12160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12160   rm -rf conftest*
12161   eval "ac_cv_func_$ac_func=yes"
12162 else
12163   echo "configure: failed program was:" >&5
12164   cat conftest.$ac_ext >&5
12165   rm -rf conftest*
12166   eval "ac_cv_func_$ac_func=no"
12167 fi
12168 rm -f conftest*
12169 fi
12170
12171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12172   echo "$ac_t""yes" 1>&6
12173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12174   cat >> confdefs.h <<EOF
12175 #define $ac_tr_func 1
12176 EOF
12177  
12178 else
12179   echo "$ac_t""no" 1>&6
12180 fi
12181 done
12182
12183
12184 for ac_func in getopt tempnam
12185 do
12186 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12187 echo "configure:12188: checking for $ac_func" >&5
12188 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12189   echo $ac_n "(cached) $ac_c" 1>&6
12190 else
12191   cat > conftest.$ac_ext <<EOF
12192 #line 12193 "configure"
12193 #include "confdefs.h"
12194 /* System header to define __stub macros and hopefully few prototypes,
12195     which can conflict with char $ac_func(); below.  */
12196 #include <assert.h>
12197 /* Override any gcc2 internal prototype to avoid an error.  */
12198 /* We use char because int might match the return type of a gcc2
12199     builtin and then its argument prototype would still apply.  */
12200 char $ac_func();
12201 char (*f)();
12202
12203 int main() {
12204
12205 /* The GNU C library defines this for functions which it implements
12206     to always fail with ENOSYS.  Some functions are actually named
12207     something starting with __ and the normal name is an alias.  */
12208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12209 choke me
12210 #else
12211 f = $ac_func;
12212 #endif
12213
12214 ; return 0; }
12215 EOF
12216 if { (eval echo configure:12217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12217   rm -rf conftest*
12218   eval "ac_cv_func_$ac_func=yes"
12219 else
12220   echo "configure: failed program was:" >&5
12221   cat conftest.$ac_ext >&5
12222   rm -rf conftest*
12223   eval "ac_cv_func_$ac_func=no"
12224 fi
12225 rm -f conftest*
12226 fi
12227
12228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12229   echo "$ac_t""yes" 1>&6
12230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12231   cat >> confdefs.h <<EOF
12232 #define $ac_tr_func 1
12233 EOF
12234  
12235 else
12236   echo "$ac_t""no" 1>&6
12237 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12238 fi
12239 done
12240
12241
12242
12243 # Check Configuration
12244 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12245 echo "configure:12246: checking declaration of sys_errlist" >&5
12246 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12247   echo $ac_n "(cached) $ac_c" 1>&6
12248 else
12249   
12250         cat > conftest.$ac_ext <<EOF
12251 #line 12252 "configure"
12252 #include "confdefs.h"
12253
12254 #include <stdio.h>
12255 #include <sys/types.h>
12256 #include <errno.h> 
12257 int main() {
12258 char *c = (char *) *sys_errlist
12259 ; return 0; }
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12262   rm -rf conftest*
12263   ol_cv_dcl_sys_errlist=yes
12264         ol_cv_have_sys_errlist=yes
12265 else
12266   echo "configure: failed program was:" >&5
12267   cat conftest.$ac_ext >&5
12268   rm -rf conftest*
12269   ol_cv_dcl_sys_errlist=no
12270 fi
12271 rm -f conftest*
12272 fi
12273
12274 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12275 #
12276 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12277 if test $ol_cv_dcl_sys_errlist = no ; then
12278         cat >> confdefs.h <<\EOF
12279 #define DECL_SYS_ERRLIST 1
12280 EOF
12281
12282
12283         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12284 echo "configure:12285: checking existence of sys_errlist" >&5
12285 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12286   echo $ac_n "(cached) $ac_c" 1>&6
12287 else
12288   
12289                 cat > conftest.$ac_ext <<EOF
12290 #line 12291 "configure"
12291 #include "confdefs.h"
12292 #include <errno.h>
12293 int main() {
12294 char *c = (char *) *sys_errlist
12295 ; return 0; }
12296 EOF
12297 if { (eval echo configure:12298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12298   rm -rf conftest*
12299   ol_cv_have_sys_errlist=yes
12300 else
12301   echo "configure: failed program was:" >&5
12302   cat conftest.$ac_ext >&5
12303   rm -rf conftest*
12304   ol_cv_have_sys_errlist=no
12305 fi
12306 rm -f conftest*
12307 fi
12308
12309 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12310 fi
12311 if test $ol_cv_have_sys_errlist = yes ; then
12312         cat >> confdefs.h <<\EOF
12313 #define HAVE_SYS_ERRLIST 1
12314 EOF
12315
12316 fi
12317
12318
12319
12320 if test "$ol_enable_debug" != no ; then
12321         cat >> confdefs.h <<\EOF
12322 #define LDAP_DEBUG 1
12323 EOF
12324
12325 fi
12326 if test "$ol_enable_syslog" = yes ; then
12327         cat >> confdefs.h <<\EOF
12328 #define LDAP_SYSLOG 1
12329 EOF
12330
12331 fi
12332 if test "$ol_enable_libui" = yes ; then
12333         cat >> confdefs.h <<\EOF
12334 #define LDAP_LIBUI 1
12335 EOF
12336
12337 fi
12338 if test "$ol_enable_cache" = no ; then
12339         cat >> confdefs.h <<\EOF
12340 #define LDAP_NOCACHE 1
12341 EOF
12342
12343 fi
12344 if test "$ol_enable_dns" != no ; then
12345         cat >> confdefs.h <<\EOF
12346 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12347 EOF
12348
12349 fi
12350 if test "$ol_enable_proctitle" != no ; then
12351         cat >> confdefs.h <<\EOF
12352 #define LDAP_PROCTITLE 1
12353 EOF
12354
12355 fi
12356 if test "$ol_enable_referrals" != no ; then
12357         cat >> confdefs.h <<\EOF
12358 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12359 EOF
12360
12361 fi
12362 if test "$ol_enable_cldap" != no ; then
12363         cat >> confdefs.h <<\EOF
12364 #define LDAP_CONNECTIONLESS 1
12365 EOF
12366
12367 fi
12368
12369 if test "$ol_enable_crypt" != no ; then
12370         cat >> confdefs.h <<\EOF
12371 #define SLAPD_CRYPT 1
12372 EOF
12373
12374 fi
12375 if test "$ol_enable_cleartext" != no ; then
12376         cat >> confdefs.h <<\EOF
12377 #define SLAPD_CLEARTEXT 1
12378 EOF
12379
12380 fi
12381 if test "$ol_enable_phonetic" != no ; then
12382         cat >> confdefs.h <<\EOF
12383 #define SLAPD_PHONETIC 1
12384 EOF
12385
12386 fi
12387 if test "$ol_enable_rlookups" != no ; then
12388         cat >> confdefs.h <<\EOF
12389 #define SLAPD_RLOOKUPS 1
12390 EOF
12391
12392 fi
12393
12394 if test "$ol_link_modules" != no ; then
12395         cat >> confdefs.h <<\EOF
12396 #define SLAPD_MODULES 1
12397 EOF
12398
12399         BUILD_SLAPD=yes
12400 fi
12401
12402 if test "$ol_link_bdb2" != no ; then
12403         cat >> confdefs.h <<\EOF
12404 #define SLAPD_BDB2 1
12405 EOF
12406
12407         BUILD_SLAPD=yes
12408         BUILD_BDB2=yes
12409         if test "$ol_with_bdb2_module" != static ; then
12410                 cat >> confdefs.h <<\EOF
12411 #define SLAPD_BDB2_DYNAMIC 1
12412 EOF
12413
12414                 BUILD_BDB2_DYNAMIC=yes
12415         fi
12416 fi
12417
12418 if test "$ol_enable_ldap" != no ; then
12419         cat >> confdefs.h <<\EOF
12420 #define SLAPD_LDAP 1
12421 EOF
12422
12423         BUILD_SLAPD=yes
12424         BUILD_LDAP=yes
12425         if test "$ol_with_ldap_module" != static ; then
12426                 cat >> confdefs.h <<\EOF
12427 #define SLAPD_LDAP_DYNAMIC 1
12428 EOF
12429
12430                 BUILD_LDAP_DYNAMIC=yes
12431         fi
12432 fi
12433
12434 if test "$ol_link_ldbm" != no ; then
12435         cat >> confdefs.h <<\EOF
12436 #define SLAPD_LDBM 1
12437 EOF
12438
12439         BUILD_SLAPD=yes
12440         BUILD_LDBM=yes
12441         if test "$ol_with_ldbm_module" != static ; then
12442                 cat >> confdefs.h <<\EOF
12443 #define SLAPD_LDBM_DYNAMIC 1
12444 EOF
12445
12446                 BUILD_LDBM_DYNAMIC=yes
12447         fi
12448 fi
12449
12450 if test "$ol_enable_passwd" != no ; then
12451         cat >> confdefs.h <<\EOF
12452 #define SLAPD_PASSWD 1
12453 EOF
12454
12455         BUILD_SLAPD=yes
12456         BUILD_PASSWD=yes
12457         if test "$ol_with_passwd_module" != static ; then
12458                 cat >> confdefs.h <<\EOF
12459 #define SLAPD_PASSWD_DYNAMIC 1
12460 EOF
12461
12462                 BUILD_PASSWD_DYNAMIC=yes
12463         fi
12464 fi
12465
12466 if test "$ol_link_perl" != no ; then
12467         cat >> confdefs.h <<\EOF
12468 #define SLAPD_PERL 1
12469 EOF
12470
12471         BUILD_SLAPD=yes
12472         BUILD_PERL=yes
12473         if test "$ol_with_perl_module" != static ; then
12474                 cat >> confdefs.h <<\EOF
12475 #define SLAPD_PERL_DYNAMIC 1
12476 EOF
12477
12478                 BUILD_PERL_DYNAMIC=yes
12479         fi
12480 fi
12481
12482 if test "$ol_enable_shell" != no ; then
12483         cat >> confdefs.h <<\EOF
12484 #define SLAPD_SHELL 1
12485 EOF
12486
12487         BUILD_SLAPD=yes
12488         BUILD_SHELL=yes
12489         if test "$ol_with_shell_module" != static ; then
12490                 cat >> confdefs.h <<\EOF
12491 #define SLAPD_SHELL_DYNAMIC 1
12492 EOF
12493
12494                 BUILD_SHELL_DYNAMIC=yes
12495         fi
12496 fi
12497
12498 if test "$ol_enable_tcl" != no ; then
12499         cat >> confdefs.h <<\EOF
12500 #define SLAPD_TCL 1
12501 EOF
12502
12503         BUILD_SLAPD=yes
12504         BUILD_TCL=yes
12505         if test "$ol_with_tcl_module" != static; then
12506                 cat >> confdefs.h <<\EOF
12507 #define SLAPD_TCL_DYNAMIC 1
12508 EOF
12509
12510                 BUILD_TCL_DYNAMIC=yes
12511         fi
12512 fi
12513
12514 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12515         $BUILD_SLAPD = yes ; then
12516         BUILD_SLURPD=yes
12517 fi
12518
12519 if test "$ol_link_isode" != no ; then
12520         BUILD_LDAPD=yes
12521 fi
12522
12523
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 trap '' 1 2 15
12563
12564 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12565
12566 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12567 # Let make expand exec_prefix.
12568 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12569
12570 # Any assignment to VPATH causes Sun make to only execute
12571 # the first set of double-colon rules, so remove it if not needed.
12572 # If there is a colon in the path, we need to keep it.
12573 if test "x$srcdir" = x.; then
12574   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12575 fi
12576
12577 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12578
12579 DEFS=-DHAVE_CONFIG_H
12580
12581 # Without the "./", some shells look in PATH for config.status.
12582 : ${CONFIG_STATUS=./config.status}
12583
12584 echo creating $CONFIG_STATUS
12585 rm -f $CONFIG_STATUS
12586 cat > $CONFIG_STATUS <<EOF
12587 #! /bin/sh
12588 # Generated automatically by configure.
12589 # Run this file to recreate the current configuration.
12590 # This directory was configured as follows,
12591 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12592 #
12593 # $0 $ac_configure_args
12594 #
12595 # Compiler output produced by configure, useful for debugging
12596 # configure, is in ./config.log if it exists.
12597
12598 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12599 for ac_option
12600 do
12601   case "\$ac_option" in
12602   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12603     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12604     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12605   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12606     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12607     exit 0 ;;
12608   -help | --help | --hel | --he | --h)
12609     echo "\$ac_cs_usage"; exit 0 ;;
12610   *) echo "\$ac_cs_usage"; exit 1 ;;
12611   esac
12612 done
12613
12614 ac_given_srcdir=$srcdir
12615 ac_given_INSTALL="$INSTALL"
12616
12617 trap 'rm -fr `echo "\
12618 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12619 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12620 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12621 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12622 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12623 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12624 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12625 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12626 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12627 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12628 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12629 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12630 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12631 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12632 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12633 include/Makefile:build/top.mk:include/Makefile.in \
12634 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12635 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12636 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12637 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12638 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12639 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12640 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12641 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12642 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12643 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12644 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12645 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12646 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12647 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12648 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12649 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12650 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12651 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12652 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12653 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12654 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12655 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12656 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12657 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12658 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12659 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12660  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12661 EOF
12662 cat >> $CONFIG_STATUS <<EOF
12663
12664 # Protect against being on the right side of a sed subst in config.status.
12665 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12666  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12667 $ac_vpsub
12668 $extrasub
12669 s%@SHELL@%$SHELL%g
12670 s%@CFLAGS@%$CFLAGS%g
12671 s%@CPPFLAGS@%$CPPFLAGS%g
12672 s%@CXXFLAGS@%$CXXFLAGS%g
12673 s%@FFLAGS@%$FFLAGS%g
12674 s%@DEFS@%$DEFS%g
12675 s%@LDFLAGS@%$LDFLAGS%g
12676 s%@LIBS@%$LIBS%g
12677 s%@exec_prefix@%$exec_prefix%g
12678 s%@prefix@%$prefix%g
12679 s%@program_transform_name@%$program_transform_name%g
12680 s%@bindir@%$bindir%g
12681 s%@sbindir@%$sbindir%g
12682 s%@libexecdir@%$libexecdir%g
12683 s%@datadir@%$datadir%g
12684 s%@sysconfdir@%$sysconfdir%g
12685 s%@sharedstatedir@%$sharedstatedir%g
12686 s%@localstatedir@%$localstatedir%g
12687 s%@libdir@%$libdir%g
12688 s%@includedir@%$includedir%g
12689 s%@oldincludedir@%$oldincludedir%g
12690 s%@infodir@%$infodir%g
12691 s%@mandir@%$mandir%g
12692 s%@host@%$host%g
12693 s%@host_alias@%$host_alias%g
12694 s%@host_cpu@%$host_cpu%g
12695 s%@host_vendor@%$host_vendor%g
12696 s%@host_os@%$host_os%g
12697 s%@target@%$target%g
12698 s%@target_alias@%$target_alias%g
12699 s%@target_cpu@%$target_cpu%g
12700 s%@target_vendor@%$target_vendor%g
12701 s%@target_os@%$target_os%g
12702 s%@build@%$build%g
12703 s%@build_alias@%$build_alias%g
12704 s%@build_cpu@%$build_cpu%g
12705 s%@build_vendor@%$build_vendor%g
12706 s%@build_os@%$build_os%g
12707 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12708 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12709 s%@INSTALL_DATA@%$INSTALL_DATA%g
12710 s%@PACKAGE@%$PACKAGE%g
12711 s%@VERSION@%$VERSION%g
12712 s%@ACLOCAL@%$ACLOCAL%g
12713 s%@AUTOCONF@%$AUTOCONF%g
12714 s%@AUTOMAKE@%$AUTOMAKE%g
12715 s%@AUTOHEADER@%$AUTOHEADER%g
12716 s%@MAKEINFO@%$MAKEINFO%g
12717 s%@install_sh@%$install_sh%g
12718 s%@AMTAR@%$AMTAR%g
12719 s%@AWK@%$AWK%g
12720 s%@AMTARFLAGS@%$AMTARFLAGS%g
12721 s%@SET_MAKE@%$SET_MAKE%g
12722 s%@top_builddir@%$top_builddir%g
12723 s%@ldap_subdir@%$ldap_subdir%g
12724 s%@CC@%$CC%g
12725 s%@RANLIB@%$RANLIB%g
12726 s%@LD@%$LD%g
12727 s%@NM@%$NM%g
12728 s%@LN_S@%$LN_S%g
12729 s%@LIBTOOL@%$LIBTOOL%g
12730 s%@LN_H@%$LN_H%g
12731 s%@SENDMAIL@%$SENDMAIL%g
12732 s%@EDITOR@%$EDITOR%g
12733 s%@FINGER@%$FINGER%g
12734 s%@GLIBCONFIG@%$GLIBCONFIG%g
12735 s%@PERLBIN@%$PERLBIN%g
12736 s%@CPP@%$CPP%g
12737 s%@EXEEXT@%$EXEEXT%g
12738 s%@OBJEXT@%$OBJEXT%g
12739 s%@OL_MKDEP@%$OL_MKDEP%g
12740 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12741 s%@PEPSY@%$PEPSY%g
12742 s%@LIBOBJS@%$LIBOBJS%g
12743 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12744 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12745 s%@BUILD_BDB2@%$BUILD_BDB2%g
12746 s%@BUILD_LDAP@%$BUILD_LDAP%g
12747 s%@BUILD_LDBM@%$BUILD_LDBM%g
12748 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12749 s%@BUILD_PERL@%$BUILD_PERL%g
12750 s%@BUILD_SHELL@%$BUILD_SHELL%g
12751 s%@BUILD_TCL@%$BUILD_TCL%g
12752 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12753 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12754 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12755 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12756 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12757 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12758 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12759 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12760 s%@LDAP_LIBS@%$LDAP_LIBS%g
12761 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12762 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12763 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12764 s%@LDBM_LIBS@%$LDBM_LIBS%g
12765 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12766 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12767 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12768 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12769 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12770 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12771 s%@KRB_LIBS@%$KRB_LIBS%g
12772 s%@READLINE_LIBS@%$READLINE_LIBS%g
12773 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12774 s%@TLS_LIBS@%$TLS_LIBS%g
12775
12776 CEOF
12777 EOF
12778
12779 cat >> $CONFIG_STATUS <<\EOF
12780
12781 # Split the substitutions into bite-sized pieces for seds with
12782 # small command number limits, like on Digital OSF/1 and HP-UX.
12783 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12784 ac_file=1 # Number of current file.
12785 ac_beg=1 # First line for current file.
12786 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12787 ac_more_lines=:
12788 ac_sed_cmds=""
12789 while $ac_more_lines; do
12790   if test $ac_beg -gt 1; then
12791     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12792   else
12793     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12794   fi
12795   if test ! -s conftest.s$ac_file; then
12796     ac_more_lines=false
12797     rm -f conftest.s$ac_file
12798   else
12799     if test -z "$ac_sed_cmds"; then
12800       ac_sed_cmds="sed -f conftest.s$ac_file"
12801     else
12802       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12803     fi
12804     ac_file=`expr $ac_file + 1`
12805     ac_beg=$ac_end
12806     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12807   fi
12808 done
12809 if test -z "$ac_sed_cmds"; then
12810   ac_sed_cmds=cat
12811 fi
12812 EOF
12813
12814 cat >> $CONFIG_STATUS <<EOF
12815
12816 CONFIG_FILES=\${CONFIG_FILES-"\
12817 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12818 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12819 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12820 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12821 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12822 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12823 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12824 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12825 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12826 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12827 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12828 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12829 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12830 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12831 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12832 include/Makefile:build/top.mk:include/Makefile.in \
12833 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12834 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12835 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12836 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12837 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12838 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12839 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12840 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12841 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12842 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12843 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12844 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12845 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12846 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12847 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12848 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12849 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12850 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12851 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12852 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12853 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12854 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12855 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12856 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12857 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12858 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12859 "}
12860 EOF
12861 cat >> $CONFIG_STATUS <<\EOF
12862 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12863   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12864   case "$ac_file" in
12865   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12866        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12867   *) ac_file_in="${ac_file}.in" ;;
12868   esac
12869
12870   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12871
12872   # Remove last slash and all that follows it.  Not all systems have dirname.
12873   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12874   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12875     # The file is in a subdirectory.
12876     test ! -d "$ac_dir" && mkdir "$ac_dir"
12877     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12878     # A "../" for each directory in $ac_dir_suffix.
12879     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12880   else
12881     ac_dir_suffix= ac_dots=
12882   fi
12883
12884   case "$ac_given_srcdir" in
12885   .)  srcdir=.
12886       if test -z "$ac_dots"; then top_srcdir=.
12887       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12888   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12889   *) # Relative path.
12890     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12891     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12892   esac
12893
12894   case "$ac_given_INSTALL" in
12895   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12896   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12897   esac
12898
12899   echo creating "$ac_file"
12900   rm -f "$ac_file"
12901   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12902   case "$ac_file" in
12903   *Makefile*) ac_comsub="1i\\
12904 # $configure_input" ;;
12905   *) ac_comsub= ;;
12906   esac
12907
12908   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12909   sed -e "$ac_comsub
12910 s%@configure_input@%$configure_input%g
12911 s%@srcdir@%$srcdir%g
12912 s%@top_srcdir@%$top_srcdir%g
12913 s%@INSTALL@%$INSTALL%g
12914 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12915 fi; done
12916 rm -f conftest.s*
12917
12918 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12919 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12920 #
12921 # ac_d sets the value in "#define NAME VALUE" lines.
12922 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12923 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12924 ac_dC='\3'
12925 ac_dD='%g'
12926 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12927 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12928 ac_uB='\([      ]\)%\1#\2define\3'
12929 ac_uC=' '
12930 ac_uD='\4%g'
12931 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12932 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12933 ac_eB='$%\1#\2define\3'
12934 ac_eC=' '
12935 ac_eD='%g'
12936
12937 if test "${CONFIG_HEADERS+set}" != set; then
12938 EOF
12939 cat >> $CONFIG_STATUS <<EOF
12940   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12941 EOF
12942 cat >> $CONFIG_STATUS <<\EOF
12943 fi
12944 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12945   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12946   case "$ac_file" in
12947   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12948        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12949   *) ac_file_in="${ac_file}.in" ;;
12950   esac
12951
12952   echo creating $ac_file
12953
12954   rm -f conftest.frag conftest.in conftest.out
12955   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12956   cat $ac_file_inputs > conftest.in
12957
12958 EOF
12959
12960 # Transform confdefs.h into a sed script conftest.vals that substitutes
12961 # the proper values into config.h.in to produce config.h.  And first:
12962 # Protect against being on the right side of a sed subst in config.status.
12963 # Protect against being in an unquoted here document in config.status.
12964 rm -f conftest.vals
12965 cat > conftest.hdr <<\EOF
12966 s/[\\&%]/\\&/g
12967 s%[\\$`]%\\&%g
12968 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12969 s%ac_d%ac_u%gp
12970 s%ac_u%ac_e%gp
12971 EOF
12972 sed -n -f conftest.hdr confdefs.h > conftest.vals
12973 rm -f conftest.hdr
12974
12975 # This sed command replaces #undef with comments.  This is necessary, for
12976 # example, in the case of _POSIX_SOURCE, which is predefined and required
12977 # on some systems where configure will not decide to define it.
12978 cat >> conftest.vals <<\EOF
12979 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12980 EOF
12981
12982 # Break up conftest.vals because some shells have a limit on
12983 # the size of here documents, and old seds have small limits too.
12984
12985 rm -f conftest.tail
12986 while :
12987 do
12988   ac_lines=`grep -c . conftest.vals`
12989   # grep -c gives empty output for an empty file on some AIX systems.
12990   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12991   # Write a limited-size here document to conftest.frag.
12992   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12993   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12994   echo 'CEOF
12995   sed -f conftest.frag conftest.in > conftest.out
12996   rm -f conftest.in
12997   mv conftest.out conftest.in
12998 ' >> $CONFIG_STATUS
12999   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13000   rm -f conftest.vals
13001   mv conftest.tail conftest.vals
13002 done
13003 rm -f conftest.vals
13004
13005 cat >> $CONFIG_STATUS <<\EOF
13006   rm -f conftest.frag conftest.h
13007   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13008   cat conftest.in >> conftest.h
13009   rm -f conftest.in
13010   if cmp -s $ac_file conftest.h 2>/dev/null; then
13011     echo "$ac_file is unchanged"
13012     rm -f conftest.h
13013   else
13014     # Remove last slash and all that follows it.  Not all systems have dirname.
13015       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13016       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13017       # The file is in a subdirectory.
13018       test ! -d "$ac_dir" && mkdir "$ac_dir"
13019     fi
13020     rm -f $ac_file
13021     mv conftest.h $ac_file
13022   fi
13023 fi; done
13024
13025 EOF
13026 cat >> $CONFIG_STATUS <<EOF
13027
13028 EOF
13029 cat >> $CONFIG_STATUS <<\EOF
13030
13031 date > stamp-h
13032 echo Please \"make depend\" to build dependencies
13033
13034 exit 0
13035 EOF
13036 chmod +x $CONFIG_STATUS
13037 rm -fr confdefs* $ac_clean_files
13038 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13039