]> git.sur5r.net Git - openldap/blob - configure
Fix modlist bug in last commit
[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 ldap_subdir="openldap"
1116
1117 # Check whether --with-subdir or --without-subdir was given.
1118 if test "${with_subdir+set}" = set; then
1119   withval="$with_subdir"
1120   
1121         if test "$withval" = "no"; then
1122                 ldap_subdir=""
1123         elif test "$withval" != "yes"; then
1124                 ldap_subdir="$withval"
1125         fi
1126
1127 fi
1128
1129
1130 # OpenLDAP --enable-debug
1131         # Check whether --enable-debug or --disable-debug was given.
1132 if test "${enable_debug+set}" = set; then
1133   enableval="$enable_debug"
1134   
1135         ol_arg=invalid
1136         for ol_val in auto yes no ; do
1137                 if test "$enableval" = "$ol_val" ; then
1138                         ol_arg="$ol_val"
1139                 fi
1140         done
1141         if test "$ol_arg" = "invalid" ; then
1142                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1143         fi
1144         ol_enable_debug="$ol_arg"
1145
1146 else
1147         ol_enable_debug="yes"
1148 fi
1149 # end --enable-debug
1150 # OpenLDAP --enable-syslog
1151         # Check whether --enable-syslog or --disable-syslog was given.
1152 if test "${enable_syslog+set}" = set; then
1153   enableval="$enable_syslog"
1154   
1155         ol_arg=invalid
1156         for ol_val in auto yes no ; do
1157                 if test "$enableval" = "$ol_val" ; then
1158                         ol_arg="$ol_val"
1159                 fi
1160         done
1161         if test "$ol_arg" = "invalid" ; then
1162                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1163         fi
1164         ol_enable_syslog="$ol_arg"
1165
1166 else
1167         ol_enable_syslog="auto"
1168 fi
1169 # end --enable-syslog
1170 # OpenLDAP --enable-proctitle
1171         # Check whether --enable-proctitle or --disable-proctitle was given.
1172 if test "${enable_proctitle+set}" = set; then
1173   enableval="$enable_proctitle"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1183         fi
1184         ol_enable_proctitle="$ol_arg"
1185
1186 else
1187         ol_enable_proctitle="yes"
1188 fi
1189 # end --enable-proctitle
1190 # OpenLDAP --enable-cache
1191         # Check whether --enable-cache or --disable-cache was given.
1192 if test "${enable_cache+set}" = set; then
1193   enableval="$enable_cache"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1203         fi
1204         ol_enable_cache="$ol_arg"
1205
1206 else
1207         ol_enable_cache="yes"
1208 fi
1209 # end --enable-cache
1210 # OpenLDAP --enable-dns
1211         # Check whether --enable-dns or --disable-dns was given.
1212 if test "${enable_dns+set}" = set; then
1213   enableval="$enable_dns"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1223         fi
1224         ol_enable_dns="$ol_arg"
1225
1226 else
1227         ol_enable_dns="no"
1228 fi
1229 # end --enable-dns
1230 # OpenLDAP --enable-referrals
1231         # Check whether --enable-referrals or --disable-referrals was given.
1232 if test "${enable_referrals+set}" = set; then
1233   enableval="$enable_referrals"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1243         fi
1244         ol_enable_referrals="$ol_arg"
1245
1246 else
1247         ol_enable_referrals="yes"
1248 fi
1249 # end --enable-referrals
1250 # OpenLDAP --enable-cldap
1251         # Check whether --enable-cldap or --disable-cldap was given.
1252 if test "${enable_cldap+set}" = set; then
1253   enableval="$enable_cldap"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1263         fi
1264         ol_enable_cldap="$ol_arg"
1265
1266 else
1267         ol_enable_cldap="no"
1268 fi
1269 # end --enable-cldap
1270 # OpenLDAP --enable-x_compile
1271         # Check whether --enable-x_compile or --disable-x_compile was given.
1272 if test "${enable_x_compile+set}" = set; then
1273   enableval="$enable_x_compile"
1274   
1275         ol_arg=invalid
1276         for ol_val in yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1283         fi
1284         ol_enable_x_compile="$ol_arg"
1285
1286 else
1287         ol_enable_x_compile="no"
1288 fi
1289 # end --enable-x_compile
1290
1291 # OpenLDAP --enable-dmalloc
1292         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1293 if test "${enable_dmalloc+set}" = set; then
1294   enableval="$enable_dmalloc"
1295   
1296         ol_arg=invalid
1297         for ol_val in auto yes no ; do
1298                 if test "$enableval" = "$ol_val" ; then
1299                         ol_arg="$ol_val"
1300                 fi
1301         done
1302         if test "$ol_arg" = "invalid" ; then
1303                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1304         fi
1305         ol_enable_dmalloc="$ol_arg"
1306
1307 else
1308         ol_enable_dmalloc="no"
1309 fi
1310 # end --enable-dmalloc
1311
1312 # OpenLDAP --with-kerberos
1313         # Check whether --with-kerberos or --without-kerberos was given.
1314 if test "${with_kerberos+set}" = set; then
1315   withval="$with_kerberos"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto k5 k4 afs yes no ; do
1319                 if test "$withval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1325         fi
1326         ol_with_kerberos="$ol_arg"
1327
1328 else
1329         ol_with_kerberos="auto"
1330 fi
1331 # end --with-kerberos
1332
1333 # OpenLDAP --with-readline
1334         # Check whether --with-readline or --without-readline was given.
1335 if test "${with_readline+set}" = set; then
1336   withval="$with_readline"
1337   
1338         ol_arg=invalid
1339         for ol_val in auto yes no  ; do
1340                 if test "$withval" = "$ol_val" ; then
1341                         ol_arg="$ol_val"
1342                 fi
1343         done
1344         if test "$ol_arg" = "invalid" ; then
1345                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1346         fi
1347         ol_with_readline="$ol_arg"
1348
1349 else
1350         ol_with_readline="auto"
1351 fi
1352 # end --with-readline
1353
1354 # OpenLDAP --with-threads
1355         # Check whether --with-threads or --without-threads was given.
1356 if test "${with_threads+set}" = set; then
1357   withval="$with_threads"
1358   
1359         ol_arg=invalid
1360         for ol_val in auto posix mach lwp yes no manual  ; do
1361                 if test "$withval" = "$ol_val" ; then
1362                         ol_arg="$ol_val"
1363                 fi
1364         done
1365         if test "$ol_arg" = "invalid" ; then
1366                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1367         fi
1368         ol_with_threads="$ol_arg"
1369
1370 else
1371         ol_with_threads="auto"
1372 fi
1373 # end --with-threads
1374
1375 # OpenLDAP --with-tls
1376         # Check whether --with-tls or --without-tls was given.
1377 if test "${with_tls+set}" = set; then
1378   withval="$with_tls"
1379   
1380         ol_arg=invalid
1381         for ol_val in auto ssleay openssl yes no  ; do
1382                 if test "$withval" = "$ol_val" ; then
1383                         ol_arg="$ol_val"
1384                 fi
1385         done
1386         if test "$ol_arg" = "invalid" ; then
1387                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1388         fi
1389         ol_with_tls="$ol_arg"
1390
1391 else
1392         ol_with_tls="auto"
1393 fi
1394 # end --with-tls
1395
1396 # OpenLDAP --with-yielding_select
1397         # Check whether --with-yielding_select or --without-yielding_select was given.
1398 if test "${with_yielding_select+set}" = set; then
1399   withval="$with_yielding_select"
1400   
1401         ol_arg=invalid
1402         for ol_val in auto yes no manual  ; do
1403                 if test "$withval" = "$ol_val" ; then
1404                         ol_arg="$ol_val"
1405                 fi
1406         done
1407         if test "$ol_arg" = "invalid" ; then
1408                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1409         fi
1410         ol_with_yielding_select="$ol_arg"
1411
1412 else
1413         ol_with_yielding_select="auto"
1414 fi
1415 # end --with-yielding_select
1416
1417
1418
1419 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1420 if test "${with_xxldapdoptions+set}" = set; then
1421   withval="$with_xxldapdoptions"
1422   :
1423 fi
1424
1425 # OpenLDAP --enable-ldapd
1426         # Check whether --enable-ldapd or --disable-ldapd was given.
1427 if test "${enable_ldapd+set}" = set; then
1428   enableval="$enable_ldapd"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto yes no ; do
1432                 if test "$enableval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1438         fi
1439         ol_enable_ldapd="$ol_arg"
1440
1441 else
1442         ol_enable_ldapd="no"
1443 fi
1444 # end --enable-ldapd
1445
1446 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1447 if test "${with_xxslapdoptions+set}" = set; then
1448   withval="$with_xxslapdoptions"
1449   :
1450 fi
1451
1452 # OpenLDAP --enable-slapd
1453         # Check whether --enable-slapd or --disable-slapd was given.
1454 if test "${enable_slapd+set}" = set; then
1455   enableval="$enable_slapd"
1456   
1457         ol_arg=invalid
1458         for ol_val in auto yes no ; do
1459                 if test "$enableval" = "$ol_val" ; then
1460                         ol_arg="$ol_val"
1461                 fi
1462         done
1463         if test "$ol_arg" = "invalid" ; then
1464                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1465         fi
1466         ol_enable_slapd="$ol_arg"
1467
1468 else
1469         ol_enable_slapd="yes"
1470 fi
1471 # end --enable-slapd
1472 # OpenLDAP --enable-cleartext
1473         # Check whether --enable-cleartext or --disable-cleartext was given.
1474 if test "${enable_cleartext+set}" = set; then
1475   enableval="$enable_cleartext"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no ; do
1479                 if test "$enableval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1485         fi
1486         ol_enable_cleartext="$ol_arg"
1487
1488 else
1489         ol_enable_cleartext="yes"
1490 fi
1491 # end --enable-cleartext
1492 # OpenLDAP --enable-crypt
1493         # Check whether --enable-crypt or --disable-crypt was given.
1494 if test "${enable_crypt+set}" = set; then
1495   enableval="$enable_crypt"
1496   
1497         ol_arg=invalid
1498         for ol_val in auto yes no ; do
1499                 if test "$enableval" = "$ol_val" ; then
1500                         ol_arg="$ol_val"
1501                 fi
1502         done
1503         if test "$ol_arg" = "invalid" ; then
1504                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1505         fi
1506         ol_enable_crypt="$ol_arg"
1507
1508 else
1509         ol_enable_crypt="auto"
1510 fi
1511 # end --enable-crypt
1512 # OpenLDAP --enable-modules
1513         # Check whether --enable-modules or --disable-modules was given.
1514 if test "${enable_modules+set}" = set; then
1515   enableval="$enable_modules"
1516   
1517         ol_arg=invalid
1518         for ol_val in auto yes no ; do
1519                 if test "$enableval" = "$ol_val" ; then
1520                         ol_arg="$ol_val"
1521                 fi
1522         done
1523         if test "$ol_arg" = "invalid" ; then
1524                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1525         fi
1526         ol_enable_modules="$ol_arg"
1527
1528 else
1529         ol_enable_modules="no"
1530 fi
1531 # end --enable-modules
1532 # OpenLDAP --enable-phonetic
1533         # Check whether --enable-phonetic or --disable-phonetic was given.
1534 if test "${enable_phonetic+set}" = set; then
1535   enableval="$enable_phonetic"
1536   
1537         ol_arg=invalid
1538         for ol_val in auto yes no ; do
1539                 if test "$enableval" = "$ol_val" ; then
1540                         ol_arg="$ol_val"
1541                 fi
1542         done
1543         if test "$ol_arg" = "invalid" ; then
1544                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1545         fi
1546         ol_enable_phonetic="$ol_arg"
1547
1548 else
1549         ol_enable_phonetic="no"
1550 fi
1551 # end --enable-phonetic
1552 # OpenLDAP --enable-rlookups
1553         # Check whether --enable-rlookups or --disable-rlookups was given.
1554 if test "${enable_rlookups+set}" = set; then
1555   enableval="$enable_rlookups"
1556   
1557         ol_arg=invalid
1558         for ol_val in auto yes no ; do
1559                 if test "$enableval" = "$ol_val" ; then
1560                         ol_arg="$ol_val"
1561                 fi
1562         done
1563         if test "$ol_arg" = "invalid" ; then
1564                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1565         fi
1566         ol_enable_rlookups="$ol_arg"
1567
1568 else
1569         ol_enable_rlookups="auto"
1570 fi
1571 # end --enable-rlookups
1572 # OpenLDAP --enable-wrappers
1573         # Check whether --enable-wrappers or --disable-wrappers was given.
1574 if test "${enable_wrappers+set}" = set; then
1575   enableval="$enable_wrappers"
1576   
1577         ol_arg=invalid
1578         for ol_val in auto yes no ; do
1579                 if test "$enableval" = "$ol_val" ; then
1580                         ol_arg="$ol_val"
1581                 fi
1582         done
1583         if test "$ol_arg" = "invalid" ; then
1584                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1585         fi
1586         ol_enable_wrappers="$ol_arg"
1587
1588 else
1589         ol_enable_wrappers="no"
1590 fi
1591 # end --enable-wrappers
1592
1593 # OpenLDAP --enable-bdb2
1594         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1595 if test "${enable_bdb2+set}" = set; then
1596   enableval="$enable_bdb2"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no ; do
1600                 if test "$enableval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1606         fi
1607         ol_enable_bdb2="$ol_arg"
1608
1609 else
1610         ol_enable_bdb2="no"
1611 fi
1612 # end --enable-bdb2
1613 # OpenLDAP --with-bdb2_module
1614         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1615 if test "${with_bdb2_module+set}" = set; then
1616   withval="$with_bdb2_module"
1617   
1618         ol_arg=invalid
1619         for ol_val in static dynamic ; do
1620                 if test "$withval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1626         fi
1627         ol_with_bdb2_module="$ol_arg"
1628
1629 else
1630         ol_with_bdb2_module="static"
1631 fi
1632 # end --with-bdb2_module
1633
1634 # OpenLDAP --enable-ldap
1635         # Check whether --enable-ldap or --disable-ldap was given.
1636 if test "${enable_ldap+set}" = set; then
1637   enableval="$enable_ldap"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto yes no ; do
1641                 if test "$enableval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1647         fi
1648         ol_enable_ldap="$ol_arg"
1649
1650 else
1651         ol_enable_ldap="no"
1652 fi
1653 # end --enable-ldap
1654 # OpenLDAP --with-ldap_module
1655         # Check whether --with-ldap_module or --without-ldap_module was given.
1656 if test "${with_ldap_module+set}" = set; then
1657   withval="$with_ldap_module"
1658   
1659         ol_arg=invalid
1660         for ol_val in static dynamic ; do
1661                 if test "$withval" = "$ol_val" ; then
1662                         ol_arg="$ol_val"
1663                 fi
1664         done
1665         if test "$ol_arg" = "invalid" ; then
1666                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1667         fi
1668         ol_with_ldap_module="$ol_arg"
1669
1670 else
1671         ol_with_ldap_module="static"
1672 fi
1673 # end --with-ldap_module
1674
1675 # OpenLDAP --enable-ldbm
1676         # Check whether --enable-ldbm or --disable-ldbm was given.
1677 if test "${enable_ldbm+set}" = set; then
1678   enableval="$enable_ldbm"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1688         fi
1689         ol_enable_ldbm="$ol_arg"
1690
1691 else
1692         ol_enable_ldbm="yes"
1693 fi
1694 # end --enable-ldbm
1695 # OpenLDAP --with-ldbm_module
1696         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1697 if test "${with_ldbm_module+set}" = set; then
1698   withval="$with_ldbm_module"
1699   
1700         ol_arg=invalid
1701         for ol_val in static dynamic ; do
1702                 if test "$withval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1708         fi
1709         ol_with_ldbm_module="$ol_arg"
1710
1711 else
1712         ol_with_ldbm_module="static"
1713 fi
1714 # end --with-ldbm_module
1715
1716 # OpenLDAP --with-ldbm_api
1717         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1718 if test "${with_ldbm_api+set}" = set; then
1719   withval="$with_ldbm_api"
1720   
1721         ol_arg=invalid
1722         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1723                 if test "$withval" = "$ol_val" ; then
1724                         ol_arg="$ol_val"
1725                 fi
1726         done
1727         if test "$ol_arg" = "invalid" ; then
1728                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1729         fi
1730         ol_with_ldbm_api="$ol_arg"
1731
1732 else
1733         ol_with_ldbm_api="auto"
1734 fi
1735 # end --with-ldbm_api
1736
1737 # OpenLDAP --with-ldbm_type
1738         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1739 if test "${with_ldbm_type+set}" = set; then
1740   withval="$with_ldbm_type"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto btree hash ; do
1744                 if test "$withval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1750         fi
1751         ol_with_ldbm_type="$ol_arg"
1752
1753 else
1754         ol_with_ldbm_type="auto"
1755 fi
1756 # end --with-ldbm_type
1757
1758
1759 # OpenLDAP --enable-passwd
1760         # Check whether --enable-passwd or --disable-passwd was given.
1761 if test "${enable_passwd+set}" = set; then
1762   enableval="$enable_passwd"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1772         fi
1773         ol_enable_passwd="$ol_arg"
1774
1775 else
1776         ol_enable_passwd="no"
1777 fi
1778 # end --enable-passwd
1779 # OpenLDAP --with-passwd_module
1780         # Check whether --with-passwd_module or --without-passwd_module was given.
1781 if test "${with_passwd_module+set}" = set; then
1782   withval="$with_passwd_module"
1783   
1784         ol_arg=invalid
1785         for ol_val in static dynamic ; do
1786                 if test "$withval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1792         fi
1793         ol_with_passwd_module="$ol_arg"
1794
1795 else
1796         ol_with_passwd_module="static"
1797 fi
1798 # end --with-passwd_module
1799
1800 # OpenLDAP --enable-perl
1801         # Check whether --enable-perl or --disable-perl was given.
1802 if test "${enable_perl+set}" = set; then
1803   enableval="$enable_perl"
1804   
1805         ol_arg=invalid
1806         for ol_val in auto yes no ; do
1807                 if test "$enableval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1813         fi
1814         ol_enable_perl="$ol_arg"
1815
1816 else
1817         ol_enable_perl="no"
1818 fi
1819 # end --enable-perl
1820 # OpenLDAP --with-perl_module
1821         # Check whether --with-perl_module or --without-perl_module was given.
1822 if test "${with_perl_module+set}" = set; then
1823   withval="$with_perl_module"
1824   
1825         ol_arg=invalid
1826         for ol_val in static dynamic ; do
1827                 if test "$withval" = "$ol_val" ; then
1828                         ol_arg="$ol_val"
1829                 fi
1830         done
1831         if test "$ol_arg" = "invalid" ; then
1832                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1833         fi
1834         ol_with_perl_module="$ol_arg"
1835
1836 else
1837         ol_with_perl_module="static"
1838 fi
1839 # end --with-perl_module
1840
1841 # OpenLDAP --enable-shell
1842         # Check whether --enable-shell or --disable-shell was given.
1843 if test "${enable_shell+set}" = set; then
1844   enableval="$enable_shell"
1845   
1846         ol_arg=invalid
1847         for ol_val in auto yes no ; do
1848                 if test "$enableval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1854         fi
1855         ol_enable_shell="$ol_arg"
1856
1857 else
1858         ol_enable_shell="no"
1859 fi
1860 # end --enable-shell
1861 # OpenLDAP --with-shell_module
1862         # Check whether --with-shell_module or --without-shell_module was given.
1863 if test "${with_shell_module+set}" = set; then
1864   withval="$with_shell_module"
1865   
1866         ol_arg=invalid
1867         for ol_val in static dynamic ; do
1868                 if test "$withval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1874         fi
1875         ol_with_shell_module="$ol_arg"
1876
1877 else
1878         ol_with_shell_module="static"
1879 fi
1880 # end --with-shell_module
1881
1882 # OpenLDAP --enable-tcl
1883         # Check whether --enable-tcl or --disable-tcl was given.
1884 if test "${enable_tcl+set}" = set; then
1885   enableval="$enable_tcl"
1886   
1887         ol_arg=invalid
1888         for ol_val in auto yes no ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1895         fi
1896         ol_enable_tcl="$ol_arg"
1897
1898 else
1899         ol_enable_tcl="no"
1900 fi
1901 # end --enable-tcl
1902 # OpenLDAP --with-tcl_module
1903         # Check whether --with-tcl_module or --without-tcl_module was given.
1904 if test "${with_tcl_module+set}" = set; then
1905   withval="$with_tcl_module"
1906   
1907         ol_arg=invalid
1908         for ol_val in static dynamic ; do
1909                 if test "$withval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1915         fi
1916         ol_with_tcl_module="$ol_arg"
1917
1918 else
1919         ol_with_tcl_module="static"
1920 fi
1921 # end --with-tcl_module
1922
1923
1924 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1925 if test "${with_xxslurpdoptions+set}" = set; then
1926   withval="$with_xxslurpdoptions"
1927   :
1928 fi
1929
1930 # OpenLDAP --enable-slurpd
1931         # Check whether --enable-slurpd or --disable-slurpd was given.
1932 if test "${enable_slurpd+set}" = set; then
1933   enableval="$enable_slurpd"
1934   
1935         ol_arg=invalid
1936         for ol_val in auto yes no ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1943         fi
1944         ol_enable_slurpd="$ol_arg"
1945
1946 else
1947         ol_enable_slurpd="auto"
1948 fi
1949 # end --enable-slurpd
1950
1951 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1952 if test "${with_xxliboptions+set}" = set; then
1953   withval="$with_xxliboptions"
1954   :
1955 fi
1956
1957 # Check whether --enable-static or --disable-static was given.
1958 if test "${enable_static+set}" = set; then
1959   enableval="$enable_static"
1960   p=${PACKAGE-default}
1961 case "$enableval" in
1962 yes) enable_static=yes ;;
1963 no) enable_static=no ;;
1964 *)
1965   enable_static=no
1966   # Look at the argument we got.  We use all the common list separators.
1967   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1968   for pkg in $enableval; do
1969     if test "X$pkg" = "X$p"; then
1970       enable_static=yes
1971     fi
1972   done
1973   IFS="$ac_save_ifs"
1974   ;;
1975 esac
1976 else
1977   enable_static=yes
1978 fi
1979
1980 # Check whether --enable-shared or --disable-shared was given.
1981 if test "${enable_shared+set}" = set; then
1982   enableval="$enable_shared"
1983   p=${PACKAGE-default}
1984 case "$enableval" in
1985 yes) enable_shared=yes ;;
1986 no) enable_shared=no ;;
1987 *)
1988   enable_shared=no
1989   # Look at the argument we got.  We use all the common list separators.
1990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1991   for pkg in $enableval; do
1992     if test "X$pkg" = "X$p"; then
1993       enable_shared=yes
1994     fi
1995   done
1996   IFS="$ac_save_ifs"
1997   ;;
1998 esac
1999 else
2000   enable_shared=yes
2001 fi
2002
2003
2004 # validate options
2005 if test $ol_enable_dns = yes ; then
2006         if test $ol_enable_referrals = no ; then
2007                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2008         fi
2009         if test $ol_enable_referrals = auto ; then
2010                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2011                 ol_enable_referrals=yes
2012         fi
2013 fi
2014
2015 if test $ol_enable_slapd = no ; then
2016                 if test $ol_enable_bdb2 = yes ; then
2017                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2018         fi
2019         if test $ol_enable_ldap = yes ; then
2020                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2021         fi
2022         if test $ol_enable_ldbm = yes ; then
2023                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2024         fi
2025         if test $ol_enable_passwd = yes ; then
2026                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2027         fi
2028         if test $ol_enable_perl = yes ; then
2029                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2030         fi
2031         if test $ol_enable_shell = yes ; then
2032                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2033         fi
2034         if test $ol_enable_tcl = yes ; then
2035                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2036         fi
2037         if test $ol_enable_modules = yes ; then
2038                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2039         fi
2040         if test $ol_enable_wrappers = yes ; then
2041                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2042         fi
2043         if test $ol_enable_phonetic = yes ; then
2044                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2045         fi
2046         if test $ol_enable_rlookups = yes ; then
2047                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2048         fi
2049         if test $ol_with_ldbm_api != auto ; then
2050                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2051         fi
2052         if test $ol_with_ldbm_type != auto ; then
2053                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2054         fi
2055         if test $ol_with_bdb2_module != static ; then
2056                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2057         fi
2058         if test $ol_with_ldap_module != static ; then
2059                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2060         fi
2061         if test $ol_with_ldbm_module != static ; then
2062                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2063         fi
2064         if test $ol_with_passwd_module != static ; then
2065                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2066         fi
2067         if test $ol_with_perl_module != static ; then
2068                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2069         fi
2070         if test $ol_with_shell_module != static ; then
2071                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2072         fi
2073         if test $ol_with_tcl_module != static ; then
2074                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2075         fi
2076         if test $ol_enable_slurpd = yes ; then
2077                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2078         fi
2079
2080         # force settings to no
2081         ol_enable_bdb2=no
2082         ol_enable_ldap=no
2083         ol_enable_ldbm=no
2084         ol_enable_passwd=no
2085         ol_enable_perl=no
2086         ol_enable_shell=no
2087         ol_enable_tcl=no
2088
2089         ol_enable_modules=no
2090         ol_enable_phonetic=no
2091         ol_enable_rlookups=no
2092         ol_enable_wrappers=no
2093
2094         ol_with_ldbm_api=no
2095         ol_with_ldbm_type=no
2096
2097         ol_with_bdb2_module=static
2098         ol_with_ldap_module=static
2099         ol_with_ldbm_module=static
2100         ol_with_passwd_module=static
2101         ol_with_perl_module=static
2102         ol_with_shell_module=static
2103         ol_with_tcl_module=static
2104
2105         ol_enable_slurpd=no
2106
2107 elif test $ol_enable_ldbm = no ; then
2108         
2109         if test $ol_with_ldbm_api != auto ; then
2110                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2111         fi
2112
2113         if test $ol_with_ldbm_type != auto ; then
2114                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2115         fi
2116
2117         if test $ol_with_ldbm_module != static ; then
2118                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2119         fi
2120
2121         if test $ol_enable_bdb2 = yes ; then
2122                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2123         fi
2124
2125         if test $ol_enable_modules != yes -a \
2126                 $ol_enable_ldap = no -a \
2127                 $ol_enable_passwd = no -a \
2128                 $ol_enable_perl = no -a \
2129                 $ol_enable_shell = no -a \
2130                 $ol_enable_tcl = no ; then
2131                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2132         fi
2133
2134         ol_with_ldbm_api=no
2135         ol_with_ldbm_type=no
2136         ol_with_ldbm_module=static
2137
2138 elif test $ol_enable_bdb2 = yes ; then
2139         
2140         if test $ol_with_ldbm_api != auto -a \
2141                 $ol_with_ldbm_api != db2 ; then
2142                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2143         fi
2144
2145         ol_with_ldbm_api=db2
2146
2147 else
2148         
2149         if test $ol_enable_bdb2 != no ; then
2150                 if test $ol_with_ldbm_api != auto -a \
2151                         $ol_with_ldbm_api != db2 ; then
2152                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2153                         ol_enable_bdb2=no
2154                 fi
2155         fi
2156
2157         if test $ol_with_ldbm_api = gdbm -a \
2158                 $ol_with_ldbm_type = btree ; then
2159                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2160         fi
2161         if test $ol_with_ldbm_api = mdbm -a \
2162                 $ol_with_ldbm_type = btree ; then
2163                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2164         fi
2165         if test $ol_with_ldbm_api = ndbm -a \
2166                 $ol_with_ldbm_type = btree ; then
2167                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2168         fi
2169 fi
2170
2171 if test $ol_enable_slurpd = yes ; then
2172                 if test $ol_with_threads = no ; then
2173                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2174         fi
2175 fi
2176
2177 echo "$ac_t""done" 1>&6
2178
2179 ## Initialize vars
2180 LDAP_LIBS=
2181 LDBM_LIBS=
2182 LTHREAD_LIBS=
2183 LUTIL_LIBS=
2184
2185 LDAPD_LIBS=
2186 SLAPD_LIBS=
2187 SLURPD_LIBS=
2188
2189 BUILD_LDAPD=no
2190 BUILD_SLAPD=no
2191 BUILD_SLURPD=no
2192
2193 BUILD_BDB2=no
2194 BUILD_LDAP=no
2195 BUILD_LDBM=no
2196 BUILD_PASSWD=no
2197 BUILD_PERL=no
2198 BUILD_SHELL=no
2199 BUILD_TCL=no
2200 BUILD_THREAD=no
2201
2202 BUILD_BDB2_DYNAMIC=no
2203 BUILD_LDAP_DYNAMIC=no
2204 BUILD_LDBM_DYNAMIC=no
2205 BUILD_PASSWD_DYNAMIC=no
2206 BUILD_PERL_DYNAMIC=no
2207 BUILD_SHELL_DYNAMIC=no
2208 BUILD_TCL_DYNAMIC=no
2209
2210 SLAPD_MODULES_LDFLAGS=
2211 SLAPD_MODULES_CPPFLAGS=
2212
2213 SLAPD_PERL_LDFLAGS=
2214 SLAPD_PERL_CPPFLAGS=
2215
2216 KRB_LIBS=
2217 READLINE_LIBS=
2218 TERMCAP_LIBS=
2219 TLS_LIBS=
2220
2221
2222
2223 cat >> confdefs.h <<\EOF
2224 #define HAVE_MKVERSION 1
2225 EOF
2226
2227
2228
2229
2230
2231 ol_aix_threads=no
2232 case "$target" in
2233 *-*-aix*)       if test -z "$CC" ; then
2234                 case "$ol_with_threads" in
2235                 auto | yes |  posix) ol_aix_threads=yes ;;
2236                 esac
2237         fi
2238 ;;
2239 esac
2240
2241 if test $ol_aix_threads = yes ; then
2242         if test -z "${CC}" ; then
2243                 for ac_prog in cc_r xlc_r cc
2244 do
2245 # Extract the first word of "$ac_prog", so it can be a program name with args.
2246 set dummy $ac_prog; ac_word=$2
2247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2248 echo "configure:2249: checking for $ac_word" >&5
2249 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2250   echo $ac_n "(cached) $ac_c" 1>&6
2251 else
2252   if test -n "$CC"; then
2253   ac_cv_prog_CC="$CC" # Let the user override the test.
2254 else
2255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2256   ac_dummy="$PATH"
2257   for ac_dir in $ac_dummy; do
2258     test -z "$ac_dir" && ac_dir=.
2259     if test -f $ac_dir/$ac_word; then
2260       ac_cv_prog_CC="$ac_prog"
2261       break
2262     fi
2263   done
2264   IFS="$ac_save_ifs"
2265 fi
2266 fi
2267 CC="$ac_cv_prog_CC"
2268 if test -n "$CC"; then
2269   echo "$ac_t""$CC" 1>&6
2270 else
2271   echo "$ac_t""no" 1>&6
2272 fi
2273
2274 test -n "$CC" && break
2275 done
2276
2277
2278                 if test "$CC" = cc ; then
2279                                                 if test $ol_with_threads != auto ; then
2280                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2281                         else
2282                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2283                         fi
2284                         ol_with_threads=no
2285                 fi
2286         fi
2287
2288         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2289                 ol_with_threads=posix
2290                 ol_cv_pthread_create=yes
2291         fi
2292 fi
2293
2294 if test -z "${CC}"; then
2295         for ac_prog in cc
2296 do
2297 # Extract the first word of "$ac_prog", so it can be a program name with args.
2298 set dummy $ac_prog; ac_word=$2
2299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2300 echo "configure:2301: checking for $ac_word" >&5
2301 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2302   echo $ac_n "(cached) $ac_c" 1>&6
2303 else
2304   if test -n "$CC"; then
2305   ac_cv_prog_CC="$CC" # Let the user override the test.
2306 else
2307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2308   ac_dummy="$PATH"
2309   for ac_dir in $ac_dummy; do
2310     test -z "$ac_dir" && ac_dir=.
2311     if test -f $ac_dir/$ac_word; then
2312       ac_cv_prog_CC="$ac_prog"
2313       break
2314     fi
2315   done
2316   IFS="$ac_save_ifs"
2317 fi
2318 fi
2319 CC="$ac_cv_prog_CC"
2320 if test -n "$CC"; then
2321   echo "$ac_t""$CC" 1>&6
2322 else
2323   echo "$ac_t""no" 1>&6
2324 fi
2325
2326 test -n "$CC" && break
2327 done
2328
2329 fi
2330
2331
2332 # Check whether --enable-fast-install or --disable-fast-install was given.
2333 if test "${enable_fast_install+set}" = set; then
2334   enableval="$enable_fast_install"
2335   p=${PACKAGE-default}
2336 case "$enableval" in
2337 yes) enable_fast_install=yes ;;
2338 no) enable_fast_install=no ;;
2339 *)
2340   enable_fast_install=no
2341   # Look at the argument we got.  We use all the common list separators.
2342   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2343   for pkg in $enableval; do
2344     if test "X$pkg" = "X$p"; then
2345       enable_fast_install=yes
2346     fi
2347   done
2348   IFS="$ac_save_ifs"
2349   ;;
2350 esac
2351 else
2352   enable_fast_install=yes
2353 fi
2354
2355 # Extract the first word of "ranlib", so it can be a program name with args.
2356 set dummy ranlib; ac_word=$2
2357 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2358 echo "configure:2359: checking for $ac_word" >&5
2359 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2360   echo $ac_n "(cached) $ac_c" 1>&6
2361 else
2362   if test -n "$RANLIB"; then
2363   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2364 else
2365   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2366   ac_dummy="$PATH"
2367   for ac_dir in $ac_dummy; do
2368     test -z "$ac_dir" && ac_dir=.
2369     if test -f $ac_dir/$ac_word; then
2370       ac_cv_prog_RANLIB="ranlib"
2371       break
2372     fi
2373   done
2374   IFS="$ac_save_ifs"
2375   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2376 fi
2377 fi
2378 RANLIB="$ac_cv_prog_RANLIB"
2379 if test -n "$RANLIB"; then
2380   echo "$ac_t""$RANLIB" 1>&6
2381 else
2382   echo "$ac_t""no" 1>&6
2383 fi
2384
2385 # Extract the first word of "gcc", so it can be a program name with args.
2386 set dummy gcc; ac_word=$2
2387 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2388 echo "configure:2389: checking for $ac_word" >&5
2389 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2390   echo $ac_n "(cached) $ac_c" 1>&6
2391 else
2392   if test -n "$CC"; then
2393   ac_cv_prog_CC="$CC" # Let the user override the test.
2394 else
2395   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2396   ac_dummy="$PATH"
2397   for ac_dir in $ac_dummy; do
2398     test -z "$ac_dir" && ac_dir=.
2399     if test -f $ac_dir/$ac_word; then
2400       ac_cv_prog_CC="gcc"
2401       break
2402     fi
2403   done
2404   IFS="$ac_save_ifs"
2405 fi
2406 fi
2407 CC="$ac_cv_prog_CC"
2408 if test -n "$CC"; then
2409   echo "$ac_t""$CC" 1>&6
2410 else
2411   echo "$ac_t""no" 1>&6
2412 fi
2413
2414 if test -z "$CC"; then
2415   # Extract the first word of "cc", so it can be a program name with args.
2416 set dummy cc; ac_word=$2
2417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2418 echo "configure:2419: checking for $ac_word" >&5
2419 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2420   echo $ac_n "(cached) $ac_c" 1>&6
2421 else
2422   if test -n "$CC"; then
2423   ac_cv_prog_CC="$CC" # Let the user override the test.
2424 else
2425   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2426   ac_prog_rejected=no
2427   ac_dummy="$PATH"
2428   for ac_dir in $ac_dummy; do
2429     test -z "$ac_dir" && ac_dir=.
2430     if test -f $ac_dir/$ac_word; then
2431       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2432         ac_prog_rejected=yes
2433         continue
2434       fi
2435       ac_cv_prog_CC="cc"
2436       break
2437     fi
2438   done
2439   IFS="$ac_save_ifs"
2440 if test $ac_prog_rejected = yes; then
2441   # We found a bogon in the path, so make sure we never use it.
2442   set dummy $ac_cv_prog_CC
2443   shift
2444   if test $# -gt 0; then
2445     # We chose a different compiler from the bogus one.
2446     # However, it has the same basename, so the bogon will be chosen
2447     # first if we set CC to just the basename; use the full file name.
2448     shift
2449     set dummy "$ac_dir/$ac_word" "$@"
2450     shift
2451     ac_cv_prog_CC="$@"
2452   fi
2453 fi
2454 fi
2455 fi
2456 CC="$ac_cv_prog_CC"
2457 if test -n "$CC"; then
2458   echo "$ac_t""$CC" 1>&6
2459 else
2460   echo "$ac_t""no" 1>&6
2461 fi
2462
2463   if test -z "$CC"; then
2464     case "`uname -s`" in
2465     *win32* | *WIN32* | *CYGWIN*)
2466       # Extract the first word of "cl", so it can be a program name with args.
2467 set dummy cl; ac_word=$2
2468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_word" >&5
2470 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   if test -n "$CC"; then
2474   ac_cv_prog_CC="$CC" # Let the user override the test.
2475 else
2476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2477   ac_dummy="$PATH"
2478   for ac_dir in $ac_dummy; do
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       ac_cv_prog_CC="cl"
2482       break
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486 fi
2487 fi
2488 CC="$ac_cv_prog_CC"
2489 if test -n "$CC"; then
2490   echo "$ac_t""$CC" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494  ;;
2495     esac
2496   fi
2497   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2498 fi
2499
2500 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2501 echo "configure:2502: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2502
2503 ac_ext=c
2504 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2505 ac_cpp='$CPP $CPPFLAGS'
2506 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2507 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2508 cross_compiling=$ac_cv_prog_cc_cross
2509
2510 cat > conftest.$ac_ext << EOF
2511
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514
2515 main(){return(0);}
2516 EOF
2517 if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2518   ac_cv_prog_cc_works=yes
2519   # If we can't run a trivial program, we are probably using a cross compiler.
2520   if (./conftest; exit) 2>/dev/null; then
2521     ac_cv_prog_cc_cross=no
2522   else
2523     ac_cv_prog_cc_cross=yes
2524   fi
2525 else
2526   echo "configure: failed program was:" >&5
2527   cat conftest.$ac_ext >&5
2528   ac_cv_prog_cc_works=no
2529 fi
2530 rm -fr conftest*
2531 ac_ext=c
2532 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2533 ac_cpp='$CPP $CPPFLAGS'
2534 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2535 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2536 cross_compiling=$ac_cv_prog_cc_cross
2537
2538 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2539 if test $ac_cv_prog_cc_works = no; then
2540   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2541 fi
2542 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2543 echo "configure:2544: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2544 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2545 cross_compiling=$ac_cv_prog_cc_cross
2546
2547 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2548 echo "configure:2549: checking whether we are using GNU C" >&5
2549 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2550   echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552   cat > conftest.c <<EOF
2553 #ifdef __GNUC__
2554   yes;
2555 #endif
2556 EOF
2557 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2558   ac_cv_prog_gcc=yes
2559 else
2560   ac_cv_prog_gcc=no
2561 fi
2562 fi
2563
2564 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2565
2566 if test $ac_cv_prog_gcc = yes; then
2567   GCC=yes
2568 else
2569   GCC=
2570 fi
2571
2572 ac_test_CFLAGS="${CFLAGS+set}"
2573 ac_save_CFLAGS="$CFLAGS"
2574 CFLAGS=
2575 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2576 echo "configure:2577: checking whether ${CC-cc} accepts -g" >&5
2577 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2578   echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580   echo 'void f(){}' > conftest.c
2581 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2582   ac_cv_prog_cc_g=yes
2583 else
2584   ac_cv_prog_cc_g=no
2585 fi
2586 rm -f conftest*
2587
2588 fi
2589
2590 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2591 if test "$ac_test_CFLAGS" = set; then
2592   CFLAGS="$ac_save_CFLAGS"
2593 elif test $ac_cv_prog_cc_g = yes; then
2594   if test "$GCC" = yes; then
2595     CFLAGS="-g -O2"
2596   else
2597     CFLAGS="-g"
2598   fi
2599 else
2600   if test "$GCC" = yes; then
2601     CFLAGS="-O2"
2602   else
2603     CFLAGS=
2604   fi
2605 fi
2606
2607 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2608 if test "${with_gnu_ld+set}" = set; then
2609   withval="$with_gnu_ld"
2610   test "$withval" = no || with_gnu_ld=yes
2611 else
2612   with_gnu_ld=no
2613 fi
2614
2615 ac_prog=ld
2616 if test "$ac_cv_prog_gcc" = yes; then
2617   # Check if gcc -print-prog-name=ld gives a path.
2618   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2619 echo "configure:2620: checking for ld used by GCC" >&5
2620   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2621   case "$ac_prog" in
2622     # Accept absolute paths.
2623     [\\/]* | [A-Za-z]:[\\/]*)
2624       re_direlt='/[^/][^/]*/\.\./'
2625       # Canonicalize the path of ld
2626       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2627       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2628         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2629       done
2630       test -z "$LD" && LD="$ac_prog"
2631       ;;
2632   "")
2633     # If it fails, then pretend we aren't using GCC.
2634     ac_prog=ld
2635     ;;
2636   *)
2637     # If it is relative, then search for the first ld in PATH.
2638     with_gnu_ld=unknown
2639     ;;
2640   esac
2641 elif test "$with_gnu_ld" = yes; then
2642   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2643 echo "configure:2644: checking for GNU ld" >&5
2644 else
2645   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2646 echo "configure:2647: checking for non-GNU ld" >&5
2647 fi
2648 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2649   echo $ac_n "(cached) $ac_c" 1>&6
2650 else
2651   if test -z "$LD"; then
2652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2653   for ac_dir in $PATH; do
2654     test -z "$ac_dir" && ac_dir=.
2655     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2656       ac_cv_path_LD="$ac_dir/$ac_prog"
2657       # Check to see if the program is GNU ld.  I'd rather use --version,
2658       # but apparently some GNU ld's only accept -v.
2659       # Break only if it was the GNU/non-GNU ld that we prefer.
2660       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2661         test "$with_gnu_ld" != no && break
2662       else
2663         test "$with_gnu_ld" != yes && break
2664       fi
2665     fi
2666   done
2667   IFS="$ac_save_ifs"
2668 else
2669   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2670 fi
2671 fi
2672
2673 LD="$ac_cv_path_LD"
2674 if test -n "$LD"; then
2675   echo "$ac_t""$LD" 1>&6
2676 else
2677   echo "$ac_t""no" 1>&6
2678 fi
2679 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2680
2681 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2682 echo "configure:2683: checking if the linker ($LD) is GNU ld" >&5
2683 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2687 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2688   ac_cv_prog_gnu_ld=yes
2689 else
2690   ac_cv_prog_gnu_ld=no
2691 fi
2692 fi
2693
2694 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2695
2696
2697 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2698 echo "configure:2699: checking for BSD-compatible nm" >&5
2699 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2700   echo $ac_n "(cached) $ac_c" 1>&6
2701 else
2702   if test -n "$NM"; then
2703   # Let the user override the test.
2704   ac_cv_path_NM="$NM"
2705 else
2706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2707   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2708     test -z "$ac_dir" && ac_dir=.
2709     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2710       # Check to see if the nm accepts a BSD-compat flag.
2711       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2712       #   nm: unknown option "B" ignored
2713       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2714         ac_cv_path_NM="$ac_dir/nm -B"
2715         break
2716       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2717         ac_cv_path_NM="$ac_dir/nm -p"
2718         break
2719       else
2720         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2721         continue # so that we can try to find one that supports BSD flags
2722       fi
2723     fi
2724   done
2725   IFS="$ac_save_ifs"
2726   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2727 fi
2728 fi
2729
2730 NM="$ac_cv_path_NM"
2731 echo "$ac_t""$NM" 1>&6
2732
2733
2734 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2735 echo "configure:2736: checking whether ln -s works" >&5
2736 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2737   echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739   rm -f conftestdata
2740 if ln -s X conftestdata 2>/dev/null
2741 then
2742   rm -f conftestdata
2743   ac_cv_prog_LN_S="ln -s"
2744 else
2745   ac_cv_prog_LN_S=ln
2746 fi
2747 fi
2748 LN_S="$ac_cv_prog_LN_S"
2749 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2750   echo "$ac_t""yes" 1>&6
2751 else
2752   echo "$ac_t""no" 1>&6
2753 fi
2754
2755
2756 # Check for any special flags to pass to ltconfig.
2757 libtool_flags="--cache-file=$cache_file"
2758 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2759 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2760 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2761 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2762 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2763
2764
2765 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2766 if test "${enable_libtool_lock+set}" = set; then
2767   enableval="$enable_libtool_lock"
2768   :
2769 fi
2770
2771 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2772 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2773
2774 # Some flags need to be propagated to the compiler or linker for good
2775 # libtool support.
2776 case "$host" in
2777 *-*-irix6*)
2778   # Find out which ABI we are using.
2779   echo '#line 2780 "configure"' > conftest.$ac_ext
2780   if { (eval echo configure:2781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2781     case "`/usr/bin/file conftest.o`" in
2782     *32-bit*)
2783       LD="${LD-ld} -32"
2784       ;;
2785     *N32*)
2786       LD="${LD-ld} -n32"
2787       ;;
2788     *64-bit*)
2789       LD="${LD-ld} -64"
2790       ;;
2791     esac
2792   fi
2793   rm -rf conftest*
2794   ;;
2795
2796 *-*-sco3.2v5*)
2797   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2798   SAVE_CFLAGS="$CFLAGS"
2799   CFLAGS="$CFLAGS -belf"
2800   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2801 echo "configure:2802: checking whether the C compiler needs -belf" >&5
2802 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808
2809 int main() {
2810
2811 ; return 0; }
2812 EOF
2813 if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2814   rm -rf conftest*
2815   lt_cv_cc_needs_belf=yes
2816 else
2817   echo "configure: failed program was:" >&5
2818   cat conftest.$ac_ext >&5
2819   rm -rf conftest*
2820   lt_cv_cc_needs_belf=no
2821 fi
2822 rm -f conftest*
2823 fi
2824
2825 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2826   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2827     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2828     CFLAGS="$SAVE_CFLAGS"
2829   fi
2830   ;;
2831
2832
2833 esac
2834
2835
2836 # Save cache, so that ltconfig can load it
2837
2838
2839 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2840 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2841 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2842 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2843 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2844 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2845 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2846 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2847
2848 # Reload cache, that may have been modified by ltconfig
2849
2850
2851 # This can be used to rebuild libtool when needed
2852 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2853
2854 # Always use our own libtool.
2855 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2856
2857 # Redirect the config.log output again, so that the ltconfig log is not
2858 # clobbered by the next message.
2859 exec 5>>./config.log
2860
2861
2862 for ac_prog in mawk gawk nawk awk
2863 do
2864 # Extract the first word of "$ac_prog", so it can be a program name with args.
2865 set dummy $ac_prog; ac_word=$2
2866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2867 echo "configure:2868: checking for $ac_word" >&5
2868 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2869   echo $ac_n "(cached) $ac_c" 1>&6
2870 else
2871   if test -n "$AWK"; then
2872   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2873 else
2874   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2875   ac_dummy="$PATH"
2876   for ac_dir in $ac_dummy; do
2877     test -z "$ac_dir" && ac_dir=.
2878     if test -f $ac_dir/$ac_word; then
2879       ac_cv_prog_AWK="$ac_prog"
2880       break
2881     fi
2882   done
2883   IFS="$ac_save_ifs"
2884 fi
2885 fi
2886 AWK="$ac_cv_prog_AWK"
2887 if test -n "$AWK"; then
2888   echo "$ac_t""$AWK" 1>&6
2889 else
2890   echo "$ac_t""no" 1>&6
2891 fi
2892
2893 test -n "$AWK" && break
2894 done
2895
2896 # test for ln hardlink support
2897 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2898 echo "configure:2899: checking whether ln works" >&5
2899 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   rm -f conftest.src conftest.dst
2903 echo "conftest" > conftest.src
2904 if ln conftest.src conftest.dst 2>/dev/null
2905 then
2906   ol_cv_prog_LN_H="ln"
2907 else
2908   ol_cv_prog_LN_H="cp"
2909 fi
2910 rm -f conftest.src conftest.dst
2911
2912 fi
2913 LN_H="$ol_cv_prog_LN_H"
2914 if test "$ol_cv_prog_LN_H" = "ln"; then
2915         echo "$ac_t""yes" 1>&6
2916 else
2917         echo "$ac_t""no" 1>&6
2918 fi
2919
2920 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2921 echo "configure:2922: checking whether ln -s works" >&5
2922 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2923   echo $ac_n "(cached) $ac_c" 1>&6
2924 else
2925   rm -f conftestdata
2926 if ln -s X conftestdata 2>/dev/null
2927 then
2928   rm -f conftestdata
2929   ac_cv_prog_LN_S="ln -s"
2930 else
2931   ac_cv_prog_LN_S=ln
2932 fi
2933 fi
2934 LN_S="$ac_cv_prog_LN_S"
2935 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2936   echo "$ac_t""yes" 1>&6
2937 else
2938   echo "$ac_t""no" 1>&6
2939 fi
2940
2941
2942 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2943         LN_S="$LN_H"
2944 fi
2945
2946 # Extract the first word of "sendmail", so it can be a program name with args.
2947 set dummy sendmail; ac_word=$2
2948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2949 echo "configure:2950: checking for $ac_word" >&5
2950 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   case "$SENDMAIL" in
2954   /*)
2955   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2956   ;;
2957   ?:/*)                  
2958   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2959   ;;
2960   *)
2961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2962   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2963   for ac_dir in $ac_dummy; do 
2964     test -z "$ac_dir" && ac_dir=.
2965     if test -f $ac_dir/$ac_word; then
2966       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2967       break
2968     fi
2969   done
2970   IFS="$ac_save_ifs"
2971   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2972   ;;
2973 esac
2974 fi
2975 SENDMAIL="$ac_cv_path_SENDMAIL"
2976 if test -n "$SENDMAIL"; then
2977   echo "$ac_t""$SENDMAIL" 1>&6
2978 else
2979   echo "$ac_t""no" 1>&6
2980 fi
2981
2982 # Extract the first word of "vi", so it can be a program name with args.
2983 set dummy vi; ac_word=$2
2984 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2985 echo "configure:2986: checking for $ac_word" >&5
2986 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
2987   echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989   case "$EDITOR" in
2990   /*)
2991   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2992   ;;
2993   ?:/*)                  
2994   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2995   ;;
2996   *)
2997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2998   ac_dummy="$PATH:/usr/ucb"
2999   for ac_dir in $ac_dummy; do 
3000     test -z "$ac_dir" && ac_dir=.
3001     if test -f $ac_dir/$ac_word; then
3002       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3003       break
3004     fi
3005   done
3006   IFS="$ac_save_ifs"
3007   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3008   ;;
3009 esac
3010 fi
3011 EDITOR="$ac_cv_path_EDITOR"
3012 if test -n "$EDITOR"; then
3013   echo "$ac_t""$EDITOR" 1>&6
3014 else
3015   echo "$ac_t""no" 1>&6
3016 fi
3017
3018 # Extract the first word of "finger", so it can be a program name with args.
3019 set dummy finger; ac_word=$2
3020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3021 echo "configure:3022: checking for $ac_word" >&5
3022 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   case "$FINGER" in
3026   /*)
3027   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3028   ;;
3029   ?:/*)                  
3030   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3031   ;;
3032   *)
3033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3034   ac_dummy="$PATH:/usr/ucb"
3035   for ac_dir in $ac_dummy; do 
3036     test -z "$ac_dir" && ac_dir=.
3037     if test -f $ac_dir/$ac_word; then
3038       ac_cv_path_FINGER="$ac_dir/$ac_word"
3039       break
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3044   ;;
3045 esac
3046 fi
3047 FINGER="$ac_cv_path_FINGER"
3048 if test -n "$FINGER"; then
3049   echo "$ac_t""$FINGER" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054
3055 ol_link_perl=no
3056 if test $ol_enable_perl != no ; then
3057         # Extract the first word of "perl", so it can be a program name with args.
3058 set dummy perl; ac_word=$2
3059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3060 echo "configure:3061: checking for $ac_word" >&5
3061 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3062   echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064   case "$PERLBIN" in
3065   /*)
3066   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3067   ;;
3068   ?:/*)                  
3069   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3070   ;;
3071   *)
3072   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3073   ac_dummy="$PATH"
3074   for ac_dir in $ac_dummy; do 
3075     test -z "$ac_dir" && ac_dir=.
3076     if test -f $ac_dir/$ac_word; then
3077       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3078       break
3079     fi
3080   done
3081   IFS="$ac_save_ifs"
3082   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3083   ;;
3084 esac
3085 fi
3086 PERLBIN="$ac_cv_path_PERLBIN"
3087 if test -n "$PERLBIN"; then
3088   echo "$ac_t""$PERLBIN" 1>&6
3089 else
3090   echo "$ac_t""no" 1>&6
3091 fi
3092
3093
3094         if test "no$PERLBIN" = "no" ; then
3095                 if test $ol_enable_perl = yes ; then
3096                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3097                 fi
3098
3099         else
3100                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3101                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3102
3103                                 ol_link_perl=yes
3104         fi
3105 fi
3106
3107 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3108 echo "configure:3109: checking how to run the C preprocessor" >&5
3109 # On Suns, sometimes $CPP names a directory.
3110 if test -n "$CPP" && test -d "$CPP"; then
3111   CPP=
3112 fi
3113 if test -z "$CPP"; then
3114 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117     # This must be in double quotes, not single quotes, because CPP may get
3118   # substituted into the Makefile and "${CC-cc}" will confuse make.
3119   CPP="${CC-cc} -E"
3120   # On the NeXT, cc -E runs the code through the compiler's parser,
3121   # not just through cpp.
3122   cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 #include <assert.h>
3126 Syntax Error
3127 EOF
3128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3129 { (eval echo configure:3130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3131 if test -z "$ac_err"; then
3132   :
3133 else
3134   echo "$ac_err" >&5
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   CPP="${CC-cc} -E -traditional-cpp"
3139   cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142 #include <assert.h>
3143 Syntax Error
3144 EOF
3145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3146 { (eval echo configure:3147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3148 if test -z "$ac_err"; then
3149   :
3150 else
3151   echo "$ac_err" >&5
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   CPP="${CC-cc} -nologo -E"
3156   cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 #include <assert.h>
3160 Syntax Error
3161 EOF
3162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3163 { (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3165 if test -z "$ac_err"; then
3166   :
3167 else
3168   echo "$ac_err" >&5
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   CPP=/lib/cpp
3173 fi
3174 rm -f conftest*
3175 fi
3176 rm -f conftest*
3177 fi
3178 rm -f conftest*
3179   ac_cv_prog_CPP="$CPP"
3180 fi
3181   CPP="$ac_cv_prog_CPP"
3182 else
3183   ac_cv_prog_CPP="$CPP"
3184 fi
3185 echo "$ac_t""$CPP" 1>&6
3186
3187
3188 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3189         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3190
3191 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3192         echo "configure: warning: programs compiled here do run here..." 1>&2
3193         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3194
3195 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3196         echo "configure: warning: programs compiled here do not run here..." 1>&2
3197         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3198 fi
3199
3200 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3201 echo "configure:3202: checking for AIX" >&5
3202 cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #ifdef _AIX
3206   yes
3207 #endif
3208
3209 EOF
3210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3211   egrep "yes" >/dev/null 2>&1; then
3212   rm -rf conftest*
3213   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3214 #define _ALL_SOURCE 1
3215 EOF
3216
3217 else
3218   rm -rf conftest*
3219   echo "$ac_t""no" 1>&6
3220 fi
3221 rm -f conftest*
3222
3223
3224 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3225 echo "configure:3226: checking for POSIXized ISC" >&5
3226 if test -d /etc/conf/kconfig.d &&
3227   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3228 then
3229   echo "$ac_t""yes" 1>&6
3230   ISC=yes # If later tests want to check for ISC.
3231   cat >> confdefs.h <<\EOF
3232 #define _POSIX_SOURCE 1
3233 EOF
3234
3235   if test "$GCC" = yes; then
3236     CC="$CC -posix"
3237   else
3238     CC="$CC -Xp"
3239   fi
3240 else
3241   echo "$ac_t""no" 1>&6
3242   ISC=
3243 fi
3244
3245 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3246 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3247 echo "configure:3248: checking for minix/config.h" >&5
3248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3249   echo $ac_n "(cached) $ac_c" 1>&6
3250 else
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <minix/config.h>
3255 EOF
3256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3257 { (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3259 if test -z "$ac_err"; then
3260   rm -rf conftest*
3261   eval "ac_cv_header_$ac_safe=yes"
3262 else
3263   echo "$ac_err" >&5
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   eval "ac_cv_header_$ac_safe=no"
3268 fi
3269 rm -f conftest*
3270 fi
3271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3272   echo "$ac_t""yes" 1>&6
3273   MINIX=yes
3274 else
3275   echo "$ac_t""no" 1>&6
3276 MINIX=
3277 fi
3278
3279 if test "$MINIX" = yes; then
3280   cat >> confdefs.h <<\EOF
3281 #define _POSIX_SOURCE 1
3282 EOF
3283
3284   cat >> confdefs.h <<\EOF
3285 #define _POSIX_1_SOURCE 2
3286 EOF
3287
3288   cat >> confdefs.h <<\EOF
3289 #define _MINIX 1
3290 EOF
3291
3292 fi
3293
3294
3295 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3296 echo "configure:3297: checking for Cygwin environment" >&5
3297 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3298   echo $ac_n "(cached) $ac_c" 1>&6
3299 else
3300   cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303
3304 int main() {
3305
3306 #ifndef __CYGWIN__
3307 #define __CYGWIN__ __CYGWIN32__
3308 #endif
3309 return __CYGWIN__;
3310 ; return 0; }
3311 EOF
3312 if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3313   rm -rf conftest*
3314   ac_cv_cygwin=yes
3315 else
3316   echo "configure: failed program was:" >&5
3317   cat conftest.$ac_ext >&5
3318   rm -rf conftest*
3319   ac_cv_cygwin=no
3320 fi
3321 rm -f conftest*
3322 fi
3323
3324 echo "$ac_t""$ac_cv_cygwin" 1>&6
3325 CYGWIN=
3326 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3327 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3328 echo "configure:3329: checking for mingw32 environment" >&5
3329 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3330   echo $ac_n "(cached) $ac_c" 1>&6
3331 else
3332   cat > conftest.$ac_ext <<EOF
3333 #line 3334 "configure"
3334 #include "confdefs.h"
3335
3336 int main() {
3337 return __MINGW32__;
3338 ; return 0; }
3339 EOF
3340 if { (eval echo configure:3341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3341   rm -rf conftest*
3342   ac_cv_mingw32=yes
3343 else
3344   echo "configure: failed program was:" >&5
3345   cat conftest.$ac_ext >&5
3346   rm -rf conftest*
3347   ac_cv_mingw32=no
3348 fi
3349 rm -f conftest*
3350 fi
3351
3352 echo "$ac_t""$ac_cv_mingw32" 1>&6
3353 MINGW32=
3354 test "$ac_cv_mingw32" = yes && MINGW32=yes
3355 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3356 echo "configure:3357: checking for EMX OS/2 environment" >&5
3357 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3358   echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360   cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363
3364 int main() {
3365 return __EMX__;
3366 ; return 0; }
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3369   rm -rf conftest*
3370   ac_cv_emxos2=yes
3371 else
3372   echo "configure: failed program was:" >&5
3373   cat conftest.$ac_ext >&5
3374   rm -rf conftest*
3375   ac_cv_emxos2=no
3376 fi
3377 rm -f conftest*
3378 fi
3379
3380 echo "$ac_t""$ac_cv_emxos2" 1>&6
3381 EMXOS2=
3382 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3383
3384
3385
3386 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3387 echo "configure:3388: checking for executable suffix" >&5
3388 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3389   echo $ac_n "(cached) $ac_c" 1>&6
3390 else
3391   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3392   ac_cv_exeext=.exe
3393 else
3394   rm -f conftest*
3395   echo 'int main () { return 0; }' > conftest.$ac_ext
3396   ac_cv_exeext=
3397   if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3398     for file in conftest.*; do
3399       case $file in
3400       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3401       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3402       esac
3403     done
3404   else
3405     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3406   fi
3407   rm -f conftest*
3408   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3409 fi
3410 fi
3411
3412 EXEEXT=""
3413 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3414 echo "$ac_t""${ac_cv_exeext}" 1>&6
3415 ac_exeext=$EXEEXT
3416
3417 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3418 echo "configure:3419: checking for object suffix" >&5
3419 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3420   echo $ac_n "(cached) $ac_c" 1>&6
3421 else
3422   rm -f conftest*
3423 echo 'int i = 1;' > conftest.$ac_ext
3424 if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3425   for ac_file in conftest.*; do
3426     case $ac_file in
3427     *.c) ;;
3428     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3429     esac
3430   done
3431 else
3432   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3433 fi
3434 rm -f conftest*
3435 fi
3436
3437 echo "$ac_t""$ac_cv_objext" 1>&6
3438 OBJEXT=$ac_cv_objext
3439 ac_objext=$ac_cv_objext
3440
3441
3442 cat >> confdefs.h <<EOF
3443 #define EXEEXT "${EXEEXT}"
3444 EOF
3445
3446
3447 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3448 echo "configure:3449: checking for be_app in -lbe" >&5
3449 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3451   echo $ac_n "(cached) $ac_c" 1>&6
3452 else
3453   ac_save_LIBS="$LIBS"
3454 LIBS="-lbe -lroot -lnet $LIBS"
3455 cat > conftest.$ac_ext <<EOF
3456 #line 3457 "configure"
3457 #include "confdefs.h"
3458 /* Override any gcc2 internal prototype to avoid an error.  */
3459 /* We use char because int might match the return type of a gcc2
3460     builtin and then its argument prototype would still apply.  */
3461 char be_app();
3462
3463 int main() {
3464 be_app()
3465 ; return 0; }
3466 EOF
3467 if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3468   rm -rf conftest*
3469   eval "ac_cv_lib_$ac_lib_var=yes"
3470 else
3471   echo "configure: failed program was:" >&5
3472   cat conftest.$ac_ext >&5
3473   rm -rf conftest*
3474   eval "ac_cv_lib_$ac_lib_var=no"
3475 fi
3476 rm -f conftest*
3477 LIBS="$ac_save_LIBS"
3478
3479 fi
3480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3481   echo "$ac_t""yes" 1>&6
3482   LIBS="$LIBS -lbe -lroot -lnet"
3483 else
3484   echo "$ac_t""no" 1>&6
3485 :
3486 fi
3487
3488
3489
3490
3491
3492 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3493 echo "configure:3494: checking for ${CC-cc} option to accept ANSI C" >&5
3494 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3495   echo $ac_n "(cached) $ac_c" 1>&6
3496 else
3497   am_cv_prog_cc_stdc=no
3498 ac_save_CC="$CC"
3499 # Don't try gcc -ansi; that turns off useful extensions and
3500 # breaks some systems' header files.
3501 # AIX                   -qlanglvl=ansi
3502 # Ultrix and OSF/1      -std1
3503 # HP-UX 10.20 and later -Ae
3504 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3505 # SVR4                  -Xc -D__EXTENSIONS__
3506 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3507 do
3508   CC="$ac_save_CC $ac_arg"
3509   cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512 #include <stdarg.h>
3513 #include <stdio.h>
3514 #include <sys/types.h>
3515 #include <sys/stat.h>
3516 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3517 struct buf { int x; };
3518 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3519 static char *e (p, i)
3520      char **p;
3521      int i;
3522 {
3523   return p[i];
3524 }
3525 static char *f (char * (*g) (char **, int), char **p, ...)
3526 {
3527   char *s;
3528   va_list v;
3529   va_start (v,p);
3530   s = g (p, va_arg (v,int));
3531   va_end (v);
3532   return s;
3533 }
3534 int test (int i, double x);
3535 struct s1 {int (*f) (int a);};
3536 struct s2 {int (*f) (double a);};
3537 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3538 int argc;
3539 char **argv;
3540
3541 int main() {
3542
3543 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3544
3545 ; return 0; }
3546 EOF
3547 if { (eval echo configure:3548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3548   rm -rf conftest*
3549   am_cv_prog_cc_stdc="$ac_arg"; break
3550 else
3551   echo "configure: failed program was:" >&5
3552   cat conftest.$ac_ext >&5
3553 fi
3554 rm -f conftest*
3555 done
3556 CC="$ac_save_CC"
3557
3558 fi
3559
3560 if test -z "$am_cv_prog_cc_stdc"; then
3561   echo "$ac_t""none needed" 1>&6
3562 else
3563   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3564 fi
3565 case "x$am_cv_prog_cc_stdc" in
3566   x|xno) ;;
3567   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3568 esac
3569
3570 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3571         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3572 fi
3573
3574 # test for make depend flag
3575 OL_MKDEP=
3576 OL_MKDEP_FLAGS=
3577 if test -z "${MKDEP}"; then
3578         OL_MKDEP="${CC-cc}"
3579         if test -z "${MKDEP_FLAGS}"; then
3580                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3581 echo "configure:3582: checking for ${OL_MKDEP} depend flag" >&5
3582 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3583   echo $ac_n "(cached) $ac_c" 1>&6
3584 else
3585   
3586                         ol_cv_mkdep=no
3587                         for flag in "-M" "-xM"; do
3588                                 cat > conftest.c <<EOF
3589  noCode;
3590 EOF
3591                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3592                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3593                                 then
3594                                         if test ! -f conftest."${ac_object}" ; then
3595                                                 ol_cv_mkdep=$flag
3596                                                 OL_MKDEP_FLAGS="$flag"
3597                                                 break
3598                                         fi
3599                                 fi
3600                         done
3601                         rm -f conftest*
3602                 
3603 fi
3604
3605 echo "$ac_t""$ol_cv_mkdep" 1>&6
3606         else
3607                 cc_cv_mkdep=yes
3608                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3609         fi
3610 else
3611         cc_cv_mkdep=yes
3612         OL_MKDEP="${MKDEP}"
3613         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3614 fi
3615
3616
3617
3618 if test "${ol_cv_mkdep}" = no ; then
3619         # this will soon become an error
3620         echo "configure: warning: do not know how to generate dependencies" 1>&2
3621 fi
3622
3623 ol_link_modules=no
3624 if test $ol_enable_modules != no ; then
3625         # Extract the first word of "glib-config", so it can be a program name with args.
3626 set dummy glib-config; ac_word=$2
3627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3628 echo "configure:3629: checking for $ac_word" >&5
3629 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   case "$GLIBCONFIG" in
3633   /*)
3634   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3635   ;;
3636   ?:/*)                  
3637   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3638   ;;
3639   *)
3640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3641   ac_dummy="$PATH"
3642   for ac_dir in $ac_dummy; do 
3643     test -z "$ac_dir" && ac_dir=.
3644     if test -f $ac_dir/$ac_word; then
3645       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3646       break
3647     fi
3648   done
3649   IFS="$ac_save_ifs"
3650   ;;
3651 esac
3652 fi
3653 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3654 if test -n "$GLIBCONFIG"; then
3655   echo "$ac_t""$GLIBCONFIG" 1>&6
3656 else
3657   echo "$ac_t""no" 1>&6
3658 fi
3659
3660
3661         if test "no$GLIBCONFIG" = "no" ; then
3662                 if test $ol_enable_modules = yes ; then
3663                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3664                 fi
3665
3666         else
3667                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3668                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3669                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3670
3671                                 ol_link_modules=yes
3672         fi
3673 else
3674         ol_with_bdb2_module=static
3675         ol_with_ldap_module=static
3676         ol_with_ldbm_module=static
3677         ol_with_passwd_module=static
3678         ol_with_perl_module=static
3679         ol_with_shell_module=static
3680         ol_with_tcl_module=static
3681 fi
3682
3683
3684
3685 echo $ac_n "checking for socket""... $ac_c" 1>&6
3686 echo "configure:3687: checking for socket" >&5
3687 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 /* System header to define __stub macros and hopefully few prototypes,
3694     which can conflict with char socket(); below.  */
3695 #include <assert.h>
3696 /* Override any gcc2 internal prototype to avoid an error.  */
3697 /* We use char because int might match the return type of a gcc2
3698     builtin and then its argument prototype would still apply.  */
3699 char socket();
3700 char (*f)();
3701
3702 int main() {
3703
3704 /* The GNU C library defines this for functions which it implements
3705     to always fail with ENOSYS.  Some functions are actually named
3706     something starting with __ and the normal name is an alias.  */
3707 #if defined (__stub_socket) || defined (__stub___socket)
3708 choke me
3709 #else
3710 f = socket;
3711 #endif
3712
3713 ; return 0; }
3714 EOF
3715 if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3716   rm -rf conftest*
3717   eval "ac_cv_func_socket=yes"
3718 else
3719   echo "configure: failed program was:" >&5
3720   cat conftest.$ac_ext >&5
3721   rm -rf conftest*
3722   eval "ac_cv_func_socket=no"
3723 fi
3724 rm -f conftest*
3725 fi
3726
3727 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3728   echo "$ac_t""yes" 1>&6
3729   :
3730 else
3731   echo "$ac_t""no" 1>&6
3732         
3733         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3734 echo "configure:3735: checking for main in -lsocket" >&5
3735 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
3736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   ac_save_LIBS="$LIBS"
3740 LIBS="-lsocket  $LIBS"
3741 cat > conftest.$ac_ext <<EOF
3742 #line 3743 "configure"
3743 #include "confdefs.h"
3744
3745 int main() {
3746 main()
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3750   rm -rf conftest*
3751   eval "ac_cv_lib_$ac_lib_var=yes"
3752 else
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   eval "ac_cv_lib_$ac_lib_var=no"
3757 fi
3758 rm -f conftest*
3759 LIBS="$ac_save_LIBS"
3760
3761 fi
3762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3763   echo "$ac_t""yes" 1>&6
3764     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3765     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3766   cat >> confdefs.h <<EOF
3767 #define $ac_tr_lib 1
3768 EOF
3769
3770   LIBS="-lsocket $LIBS"
3771
3772 else
3773   echo "$ac_t""no" 1>&6
3774 fi
3775
3776         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3777 echo "configure:3778: checking for main in -lnet" >&5
3778 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
3779 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3780   echo $ac_n "(cached) $ac_c" 1>&6
3781 else
3782   ac_save_LIBS="$LIBS"
3783 LIBS="-lnet  $LIBS"
3784 cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787
3788 int main() {
3789 main()
3790 ; return 0; }
3791 EOF
3792 if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3793   rm -rf conftest*
3794   eval "ac_cv_lib_$ac_lib_var=yes"
3795 else
3796   echo "configure: failed program was:" >&5
3797   cat conftest.$ac_ext >&5
3798   rm -rf conftest*
3799   eval "ac_cv_lib_$ac_lib_var=no"
3800 fi
3801 rm -f conftest*
3802 LIBS="$ac_save_LIBS"
3803
3804 fi
3805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3806   echo "$ac_t""yes" 1>&6
3807     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3808     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3809   cat >> confdefs.h <<EOF
3810 #define $ac_tr_lib 1
3811 EOF
3812
3813   LIBS="-lnet $LIBS"
3814
3815 else
3816   echo "$ac_t""no" 1>&6
3817 fi
3818
3819         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3820 echo "configure:3821: checking for socket in -lnet" >&5
3821 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
3822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3823   echo $ac_n "(cached) $ac_c" 1>&6
3824 else
3825   ac_save_LIBS="$LIBS"
3826 LIBS="-lnet  $LIBS"
3827 cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830 /* Override any gcc2 internal prototype to avoid an error.  */
3831 /* We use char because int might match the return type of a gcc2
3832     builtin and then its argument prototype would still apply.  */
3833 char socket();
3834
3835 int main() {
3836 socket()
3837 ; return 0; }
3838 EOF
3839 if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3840   rm -rf conftest*
3841   eval "ac_cv_lib_$ac_lib_var=yes"
3842 else
3843   echo "configure: failed program was:" >&5
3844   cat conftest.$ac_ext >&5
3845   rm -rf conftest*
3846   eval "ac_cv_lib_$ac_lib_var=no"
3847 fi
3848 rm -f conftest*
3849 LIBS="$ac_save_LIBS"
3850
3851 fi
3852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3853   echo "$ac_t""yes" 1>&6
3854     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3855     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3856   cat >> confdefs.h <<EOF
3857 #define $ac_tr_lib 1
3858 EOF
3859
3860   LIBS="-lnet $LIBS"
3861
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865
3866         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3867 echo "configure:3868: checking for main in -lnsl_s" >&5
3868 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
3869 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3870   echo $ac_n "(cached) $ac_c" 1>&6
3871 else
3872   ac_save_LIBS="$LIBS"
3873 LIBS="-lnsl_s  $LIBS"
3874 cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877
3878 int main() {
3879 main()
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3883   rm -rf conftest*
3884   eval "ac_cv_lib_$ac_lib_var=yes"
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   eval "ac_cv_lib_$ac_lib_var=no"
3890 fi
3891 rm -f conftest*
3892 LIBS="$ac_save_LIBS"
3893
3894 fi
3895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3896   echo "$ac_t""yes" 1>&6
3897     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3898     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3899   cat >> confdefs.h <<EOF
3900 #define $ac_tr_lib 1
3901 EOF
3902
3903   LIBS="-lnsl_s $LIBS"
3904
3905 else
3906   echo "$ac_t""no" 1>&6
3907 fi
3908
3909         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3910 echo "configure:3911: checking for main in -lnsl" >&5
3911 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
3912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   ac_save_LIBS="$LIBS"
3916 LIBS="-lnsl  $LIBS"
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920
3921 int main() {
3922 main()
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3926   rm -rf conftest*
3927   eval "ac_cv_lib_$ac_lib_var=yes"
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   eval "ac_cv_lib_$ac_lib_var=no"
3933 fi
3934 rm -f conftest*
3935 LIBS="$ac_save_LIBS"
3936
3937 fi
3938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3939   echo "$ac_t""yes" 1>&6
3940     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3941     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3942   cat >> confdefs.h <<EOF
3943 #define $ac_tr_lib 1
3944 EOF
3945
3946   LIBS="-lnsl $LIBS"
3947
3948 else
3949   echo "$ac_t""no" 1>&6
3950 fi
3951
3952         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3953 echo "configure:3954: checking for socket in -linet" >&5
3954 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
3955 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   ac_save_LIBS="$LIBS"
3959 LIBS="-linet  $LIBS"
3960 cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963 /* Override any gcc2 internal prototype to avoid an error.  */
3964 /* We use char because int might match the return type of a gcc2
3965     builtin and then its argument prototype would still apply.  */
3966 char socket();
3967
3968 int main() {
3969 socket()
3970 ; return 0; }
3971 EOF
3972 if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3973   rm -rf conftest*
3974   eval "ac_cv_lib_$ac_lib_var=yes"
3975 else
3976   echo "configure: failed program was:" >&5
3977   cat conftest.$ac_ext >&5
3978   rm -rf conftest*
3979   eval "ac_cv_lib_$ac_lib_var=no"
3980 fi
3981 rm -f conftest*
3982 LIBS="$ac_save_LIBS"
3983
3984 fi
3985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3986   echo "$ac_t""yes" 1>&6
3987     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3988     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3989   cat >> confdefs.h <<EOF
3990 #define $ac_tr_lib 1
3991 EOF
3992
3993   LIBS="-linet $LIBS"
3994
3995 else
3996   echo "$ac_t""no" 1>&6
3997 fi
3998
3999         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4000 echo "configure:4001: checking for main in -lgen" >&5
4001 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4003   echo $ac_n "(cached) $ac_c" 1>&6
4004 else
4005   ac_save_LIBS="$LIBS"
4006 LIBS="-lgen  $LIBS"
4007 cat > conftest.$ac_ext <<EOF
4008 #line 4009 "configure"
4009 #include "confdefs.h"
4010
4011 int main() {
4012 main()
4013 ; return 0; }
4014 EOF
4015 if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4016   rm -rf conftest*
4017   eval "ac_cv_lib_$ac_lib_var=yes"
4018 else
4019   echo "configure: failed program was:" >&5
4020   cat conftest.$ac_ext >&5
4021   rm -rf conftest*
4022   eval "ac_cv_lib_$ac_lib_var=no"
4023 fi
4024 rm -f conftest*
4025 LIBS="$ac_save_LIBS"
4026
4027 fi
4028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4029   echo "$ac_t""yes" 1>&6
4030     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4031     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4032   cat >> confdefs.h <<EOF
4033 #define $ac_tr_lib 1
4034 EOF
4035
4036   LIBS="-lgen $LIBS"
4037
4038 else
4039   echo "$ac_t""no" 1>&6
4040 fi
4041
4042
4043 fi
4044
4045
4046 if test $ol_enable_dns != no ; then
4047                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4048 echo "configure:4049: checking for res_search" >&5
4049 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 /* System header to define __stub macros and hopefully few prototypes,
4056     which can conflict with char res_search(); below.  */
4057 #include <assert.h>
4058 /* Override any gcc2 internal prototype to avoid an error.  */
4059 /* We use char because int might match the return type of a gcc2
4060     builtin and then its argument prototype would still apply.  */
4061 char res_search();
4062 char (*f)();
4063
4064 int main() {
4065
4066 /* The GNU C library defines this for functions which it implements
4067     to always fail with ENOSYS.  Some functions are actually named
4068     something starting with __ and the normal name is an alias.  */
4069 #if defined (__stub_res_search) || defined (__stub___res_search)
4070 choke me
4071 #else
4072 f = res_search;
4073 #endif
4074
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4078   rm -rf conftest*
4079   eval "ac_cv_func_res_search=yes"
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   eval "ac_cv_func_res_search=no"
4085 fi
4086 rm -f conftest*
4087 fi
4088
4089 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4090   echo "$ac_t""yes" 1>&6
4091   :
4092 else
4093   echo "$ac_t""no" 1>&6
4094 fi
4095
4096         if test $ac_cv_func_res_search = no ; then 
4097                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4098 echo "configure:4099: checking for res_search in -lbind" >&5
4099 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
4100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103   ac_save_LIBS="$LIBS"
4104 LIBS="-lbind  $LIBS"
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 /* Override any gcc2 internal prototype to avoid an error.  */
4109 /* We use char because int might match the return type of a gcc2
4110     builtin and then its argument prototype would still apply.  */
4111 char res_search();
4112
4113 int main() {
4114 res_search()
4115 ; return 0; }
4116 EOF
4117 if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4118   rm -rf conftest*
4119   eval "ac_cv_lib_$ac_lib_var=yes"
4120 else
4121   echo "configure: failed program was:" >&5
4122   cat conftest.$ac_ext >&5
4123   rm -rf conftest*
4124   eval "ac_cv_lib_$ac_lib_var=no"
4125 fi
4126 rm -f conftest*
4127 LIBS="$ac_save_LIBS"
4128
4129 fi
4130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4131   echo "$ac_t""yes" 1>&6
4132     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4133     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4134   cat >> confdefs.h <<EOF
4135 #define $ac_tr_lib 1
4136 EOF
4137
4138   LIBS="-lbind $LIBS"
4139
4140 else
4141   echo "$ac_t""no" 1>&6
4142 fi
4143
4144                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
4145         fi
4146         if test $ac_cv_func_res_search = no ; then 
4147                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
4148 echo "configure:4149: checking for res_search in -lresolv" >&5
4149 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
4150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   ac_save_LIBS="$LIBS"
4154 LIBS="-lresolv  $LIBS"
4155 cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 /* Override any gcc2 internal prototype to avoid an error.  */
4159 /* We use char because int might match the return type of a gcc2
4160     builtin and then its argument prototype would still apply.  */
4161 char res_search();
4162
4163 int main() {
4164 res_search()
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4168   rm -rf conftest*
4169   eval "ac_cv_lib_$ac_lib_var=yes"
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   eval "ac_cv_lib_$ac_lib_var=no"
4175 fi
4176 rm -f conftest*
4177 LIBS="$ac_save_LIBS"
4178
4179 fi
4180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4181   echo "$ac_t""yes" 1>&6
4182     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4183     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4184   cat >> confdefs.h <<EOF
4185 #define $ac_tr_lib 1
4186 EOF
4187
4188   LIBS="-lresolv $LIBS"
4189
4190 else
4191   echo "$ac_t""no" 1>&6
4192 fi
4193
4194                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
4195         fi
4196
4197         if test "$ac_cv_func_res_search" = yes ; then
4198                 cat >> confdefs.h <<\EOF
4199 #define HAVE_RES_SEARCH 1
4200 EOF
4201
4202         elif test $ol_enable_dns = yes ; then
4203                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
4204         else
4205                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
4206         fi
4207 fi
4208
4209 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4210 echo "configure:4211: checking for sigset in -lV3" >&5
4211 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4213   echo $ac_n "(cached) $ac_c" 1>&6
4214 else
4215   ac_save_LIBS="$LIBS"
4216 LIBS="-lV3  $LIBS"
4217 cat > conftest.$ac_ext <<EOF
4218 #line 4219 "configure"
4219 #include "confdefs.h"
4220 /* Override any gcc2 internal prototype to avoid an error.  */
4221 /* We use char because int might match the return type of a gcc2
4222     builtin and then its argument prototype would still apply.  */
4223 char sigset();
4224
4225 int main() {
4226 sigset()
4227 ; return 0; }
4228 EOF
4229 if { (eval echo configure:4230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4230   rm -rf conftest*
4231   eval "ac_cv_lib_$ac_lib_var=yes"
4232 else
4233   echo "configure: failed program was:" >&5
4234   cat conftest.$ac_ext >&5
4235   rm -rf conftest*
4236   eval "ac_cv_lib_$ac_lib_var=no"
4237 fi
4238 rm -f conftest*
4239 LIBS="$ac_save_LIBS"
4240
4241 fi
4242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4243   echo "$ac_t""yes" 1>&6
4244     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4245     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4246   cat >> confdefs.h <<EOF
4247 #define $ac_tr_lib 1
4248 EOF
4249
4250   LIBS="-lV3 $LIBS"
4251
4252 else
4253   echo "$ac_t""no" 1>&6
4254 fi
4255
4256
4257 for ac_hdr in regex.h 
4258 do
4259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4260 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4261 echo "configure:4262: checking for $ac_hdr" >&5
4262 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4263   echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265   cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268 #include <$ac_hdr>
4269 EOF
4270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4271 { (eval echo configure:4272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4273 if test -z "$ac_err"; then
4274   rm -rf conftest*
4275   eval "ac_cv_header_$ac_safe=yes"
4276 else
4277   echo "$ac_err" >&5
4278   echo "configure: failed program was:" >&5
4279   cat conftest.$ac_ext >&5
4280   rm -rf conftest*
4281   eval "ac_cv_header_$ac_safe=no"
4282 fi
4283 rm -f conftest*
4284 fi
4285 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4286   echo "$ac_t""yes" 1>&6
4287     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4288   cat >> confdefs.h <<EOF
4289 #define $ac_tr_hdr 1
4290 EOF
4291  
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295 done
4296
4297 if test "$ac_cv_header_regex_h" != yes ; then
4298         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4299 fi
4300 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4301 echo "configure:4302: checking for regfree" >&5
4302 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4303   echo $ac_n "(cached) $ac_c" 1>&6
4304 else
4305   cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 /* System header to define __stub macros and hopefully few prototypes,
4309     which can conflict with char regfree(); below.  */
4310 #include <assert.h>
4311 /* Override any gcc2 internal prototype to avoid an error.  */
4312 /* We use char because int might match the return type of a gcc2
4313     builtin and then its argument prototype would still apply.  */
4314 char regfree();
4315 char (*f)();
4316
4317 int main() {
4318
4319 /* The GNU C library defines this for functions which it implements
4320     to always fail with ENOSYS.  Some functions are actually named
4321     something starting with __ and the normal name is an alias.  */
4322 #if defined (__stub_regfree) || defined (__stub___regfree)
4323 choke me
4324 #else
4325 f = regfree;
4326 #endif
4327
4328 ; return 0; }
4329 EOF
4330 if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4331   rm -rf conftest*
4332   eval "ac_cv_func_regfree=yes"
4333 else
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -rf conftest*
4337   eval "ac_cv_func_regfree=no"
4338 fi
4339 rm -f conftest*
4340 fi
4341
4342 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4343   echo "$ac_t""yes" 1>&6
4344   :
4345 else
4346   echo "$ac_t""no" 1>&6
4347 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4348 fi
4349
4350
4351
4352 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4353 echo "configure:4354: checking for compatible POSIX regex" >&5
4354 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   
4358         if test "$cross_compiling" = yes; then
4359   ol_cv_c_posix_regex=cross
4360 else
4361   cat > conftest.$ac_ext <<EOF
4362 #line 4363 "configure"
4363 #include "confdefs.h"
4364
4365 #include <sys/types.h>
4366 #include <regex.h>
4367 static char *pattern, *string;
4368 main()
4369 {
4370         int rc;
4371         regex_t re;
4372
4373         pattern = "^A";
4374
4375         if(regcomp(&re, pattern, 0)) {
4376                 return -1;
4377         }
4378         
4379         string = "ALL MATCH";
4380         
4381         rc = regexec(&re, string, 0, (void*)0, 0);
4382
4383         regfree(&re);
4384
4385         return rc;
4386 }
4387 EOF
4388 if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4389 then
4390   ol_cv_c_posix_regex=yes
4391 else
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -fr conftest*
4395   ol_cv_c_posix_regex=no
4396 fi
4397 rm -fr conftest*
4398 fi
4399
4400 fi
4401
4402 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4403
4404 if test "$ol_cv_c_posix_regex" = no ; then
4405         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4406 fi
4407
4408 echo $ac_n "checking for select""... $ac_c" 1>&6
4409 echo "configure:4410: checking for select" >&5
4410 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   cat > conftest.$ac_ext <<EOF
4414 #line 4415 "configure"
4415 #include "confdefs.h"
4416 /* System header to define __stub macros and hopefully few prototypes,
4417     which can conflict with char select(); below.  */
4418 #include <assert.h>
4419 /* Override any gcc2 internal prototype to avoid an error.  */
4420 /* We use char because int might match the return type of a gcc2
4421     builtin and then its argument prototype would still apply.  */
4422 char select();
4423 char (*f)();
4424
4425 int main() {
4426
4427 /* The GNU C library defines this for functions which it implements
4428     to always fail with ENOSYS.  Some functions are actually named
4429     something starting with __ and the normal name is an alias.  */
4430 #if defined (__stub_select) || defined (__stub___select)
4431 choke me
4432 #else
4433 f = select;
4434 #endif
4435
4436 ; return 0; }
4437 EOF
4438 if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4439   rm -rf conftest*
4440   eval "ac_cv_func_select=yes"
4441 else
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   eval "ac_cv_func_select=no"
4446 fi
4447 rm -f conftest*
4448 fi
4449
4450 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4451   echo "$ac_t""yes" 1>&6
4452   :
4453 else
4454   echo "$ac_t""no" 1>&6
4455 { echo "configure: error: select() required." 1>&2; exit 1; }
4456 fi
4457
4458
4459 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4460 echo "configure:4461: checking types of arguments for select()" >&5
4461  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4462   echo $ac_n "(cached) $ac_c" 1>&6
4463 else
4464    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4465   echo $ac_n "(cached) $ac_c" 1>&6
4466 else
4467     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4468   echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4471      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4472       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4473        cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 #ifdef HAVE_SYS_TYPES_H
4477 #include <sys/types.h>
4478 #endif
4479 #ifdef HAVE_SYS_TIME_H
4480 #include <sys/time.h>
4481 #endif
4482 #ifdef HAVE_SYS_SELECT_H
4483 #include <sys/select.h>
4484 #endif
4485 #ifdef HAVE_SYS_SOCKET_H
4486 #include <sys/socket.h>
4487 #endif
4488 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);
4489 int main() {
4490
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4494   rm -rf conftest*
4495           ac_not_found=no ; break 3
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   ac_not_found=yes
4501 fi
4502 rm -f conftest*
4503       done
4504      done
4505     done
4506    
4507 fi
4508   
4509 fi
4510  
4511 fi
4512  if test "$ac_not_found" = yes; then
4513   ac_cv_func_select_arg1=int 
4514   ac_cv_func_select_arg234='int *' 
4515   ac_cv_func_select_arg5='struct timeval *'
4516  fi
4517  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4518  cat >> confdefs.h <<EOF
4519 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4520 EOF
4521
4522  cat >> confdefs.h <<EOF
4523 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4524 EOF
4525
4526  cat >> confdefs.h <<EOF
4527 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4528 EOF
4529
4530
4531
4532 # ISODE tests
4533 ol_link_isode=no
4534 if test $ol_enable_ldapd != no ; then
4535         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4536
4537                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4538 echo "configure:4539: checking for main in -lxtpp" >&5
4539 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
4540 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4541   echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543   ac_save_LIBS="$LIBS"
4544 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4545 cat > conftest.$ac_ext <<EOF
4546 #line 4547 "configure"
4547 #include "confdefs.h"
4548
4549 int main() {
4550 main()
4551 ; return 0; }
4552 EOF
4553 if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4554   rm -rf conftest*
4555   eval "ac_cv_lib_$ac_lib_var=yes"
4556 else
4557   echo "configure: failed program was:" >&5
4558   cat conftest.$ac_ext >&5
4559   rm -rf conftest*
4560   eval "ac_cv_lib_$ac_lib_var=no"
4561 fi
4562 rm -f conftest*
4563 LIBS="$ac_save_LIBS"
4564
4565 fi
4566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4567   echo "$ac_t""yes" 1>&6
4568   
4569                 ol_link_isode=yes
4570                 cat >> confdefs.h <<\EOF
4571 #define HAVE_XTPP 1
4572 EOF
4573
4574                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4575                 
4576 else
4577   echo "$ac_t""no" 1>&6
4578 :
4579 fi
4580
4581         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4582 echo "configure:4583: checking for main in -ldsap" >&5
4583 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
4584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   ac_save_LIBS="$LIBS"
4588 LIBS="-ldsap -lisode $LIBS"
4589 cat > conftest.$ac_ext <<EOF
4590 #line 4591 "configure"
4591 #include "confdefs.h"
4592
4593 int main() {
4594 main()
4595 ; return 0; }
4596 EOF
4597 if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4598   rm -rf conftest*
4599   eval "ac_cv_lib_$ac_lib_var=yes"
4600 else
4601   echo "configure: failed program was:" >&5
4602   cat conftest.$ac_ext >&5
4603   rm -rf conftest*
4604   eval "ac_cv_lib_$ac_lib_var=no"
4605 fi
4606 rm -f conftest*
4607 LIBS="$ac_save_LIBS"
4608
4609 fi
4610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4611   echo "$ac_t""yes" 1>&6
4612   
4613                 ol_link_isode=yes
4614                 cat >> confdefs.h <<\EOF
4615 #define HAVE_DSAP 1
4616 EOF
4617
4618                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4619                 
4620 else
4621   echo "$ac_t""no" 1>&6
4622 :
4623 fi
4624
4625         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4626 echo "configure:4627: checking for main in -lisode" >&5
4627 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
4628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   ac_save_LIBS="$LIBS"
4632 LIBS="-lisode  $LIBS"
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636
4637 int main() {
4638 main()
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=yes"
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=no"
4649 fi
4650 rm -f conftest*
4651 LIBS="$ac_save_LIBS"
4652
4653 fi
4654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4655   echo "$ac_t""yes" 1>&6
4656   
4657                 ol_link_isode=yes
4658                 cat >> confdefs.h <<\EOF
4659 #define HAVE_ISODE 1
4660 EOF
4661
4662                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4663                 
4664 else
4665   echo "$ac_t""no" 1>&6
4666 :
4667 fi
4668
4669 fi
4670
4671 if test $ol_link_isode != no; then
4672         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4673 echo "configure:4674: checking for main in -lpp" >&5
4674 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
4675 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   ac_save_LIBS="$LIBS"
4679 LIBS="-lpp  $LIBS"
4680 cat > conftest.$ac_ext <<EOF
4681 #line 4682 "configure"
4682 #include "confdefs.h"
4683
4684 int main() {
4685 main()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=no"
4696 fi
4697 rm -f conftest*
4698 LIBS="$ac_save_LIBS"
4699
4700 fi
4701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4702   echo "$ac_t""yes" 1>&6
4703   
4704                 cat >> confdefs.h <<\EOF
4705 #define HAVE_PP 1
4706 EOF
4707
4708                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4709                 
4710 else
4711   echo "$ac_t""no" 1>&6
4712 :
4713 fi
4714
4715
4716         # Extract the first word of "pepsy", so it can be a program name with args.
4717 set dummy pepsy; ac_word=$2
4718 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4719 echo "configure:4720: checking for $ac_word" >&5
4720 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   case "$PEPSY" in
4724   /*)
4725   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4726   ;;
4727   ?:/*)                  
4728   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4729   ;;
4730   *)
4731   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4732   ac_dummy="$PATH"
4733   for ac_dir in $ac_dummy; do 
4734     test -z "$ac_dir" && ac_dir=.
4735     if test -f $ac_dir/$ac_word; then
4736       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4737       break
4738     fi
4739   done
4740   IFS="$ac_save_ifs"
4741   ;;
4742 esac
4743 fi
4744 PEPSY="$ac_cv_path_PEPSY"
4745 if test -n "$PEPSY"; then
4746   echo "$ac_t""$PEPSY" 1>&6
4747 else
4748   echo "$ac_t""no" 1>&6
4749 fi
4750
4751 fi
4752
4753 ol_link_kerberos=no
4754
4755 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4756         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4757 do
4758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4760 echo "configure:4761: checking for $ac_hdr" >&5
4761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4762   echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764   cat > conftest.$ac_ext <<EOF
4765 #line 4766 "configure"
4766 #include "confdefs.h"
4767 #include <$ac_hdr>
4768 EOF
4769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4770 { (eval echo configure:4771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4772 if test -z "$ac_err"; then
4773   rm -rf conftest*
4774   eval "ac_cv_header_$ac_safe=yes"
4775 else
4776   echo "$ac_err" >&5
4777   echo "configure: failed program was:" >&5
4778   cat conftest.$ac_ext >&5
4779   rm -rf conftest*
4780   eval "ac_cv_header_$ac_safe=no"
4781 fi
4782 rm -f conftest*
4783 fi
4784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4785   echo "$ac_t""yes" 1>&6
4786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4787   cat >> confdefs.h <<EOF
4788 #define $ac_tr_hdr 1
4789 EOF
4790  
4791 else
4792   echo "$ac_t""no" 1>&6
4793 fi
4794 done
4795
4796
4797         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4798                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4799 echo "configure:4800: checking for main in -lkrb4" >&5
4800 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
4801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4802   echo $ac_n "(cached) $ac_c" 1>&6
4803 else
4804   ac_save_LIBS="$LIBS"
4805 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4806 cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809
4810 int main() {
4811 main()
4812 ; return 0; }
4813 EOF
4814 if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4815   rm -rf conftest*
4816   eval "ac_cv_lib_$ac_lib_var=yes"
4817 else
4818   echo "configure: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   rm -rf conftest*
4821   eval "ac_cv_lib_$ac_lib_var=no"
4822 fi
4823 rm -f conftest*
4824 LIBS="$ac_save_LIBS"
4825
4826 fi
4827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4828   echo "$ac_t""yes" 1>&6
4829   have_k5=yes
4830 else
4831   echo "$ac_t""no" 1>&6
4832 have_k5=no
4833 fi
4834
4835
4836                 if test $have_k5 = yes ; then
4837                         ol_with_kerberos=found
4838                         ol_link_kerberos=yes
4839
4840                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4841
4842                         LIBS="$KRB_LIBS $LIBS"
4843
4844                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4845 echo "configure:4846: checking for des_debug in Kerberos libraries" >&5
4846 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   
4850                                                                 save_LIBS="$LIBS"
4851                                 LIBS="$KRB_LIBS $LIBS"
4852                                 cat > conftest.$ac_ext <<EOF
4853 #line 4854 "configure"
4854 #include "confdefs.h"
4855
4856 #include <kerberosIV/krb.h>
4857 #include <kerberosIV/des.h>
4858 extern int des_debug;
4859
4860 int main() {
4861
4862 des_debug = 1;
4863
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   ol_cv_var_des_debug=yes
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   ol_cv_var_des_debug=no
4874 fi
4875 rm -f conftest*
4876                                                                 LIBS="$save_LIBS"
4877                         
4878 fi
4879
4880 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4881
4882                         if test $ol_cv_var_des_debug = yes ; then
4883                                 cat >> confdefs.h <<\EOF
4884 #define HAVE_DES_DEBUG 1
4885 EOF
4886
4887                         fi
4888
4889                         LIBS="$save_LIBS"
4890                 fi
4891         fi
4892 fi
4893
4894 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4895         for ac_hdr in krb.h des.h
4896 do
4897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4899 echo "configure:4900: checking for $ac_hdr" >&5
4900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 #include <$ac_hdr>
4907 EOF
4908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4909 { (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4911 if test -z "$ac_err"; then
4912   rm -rf conftest*
4913   eval "ac_cv_header_$ac_safe=yes"
4914 else
4915   echo "$ac_err" >&5
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_header_$ac_safe=no"
4920 fi
4921 rm -f conftest*
4922 fi
4923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4926   cat >> confdefs.h <<EOF
4927 #define $ac_tr_hdr 1
4928 EOF
4929  
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933 done
4934
4935
4936         if test $ac_cv_header_krb_h = yes ; then
4937                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4938 echo "configure:4939: checking for main in -lkrb" >&5
4939 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
4940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   ac_save_LIBS="$LIBS"
4944 LIBS="-lkrb -ldes $LIBS"
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4948
4949 int main() {
4950 main()
4951 ; return 0; }
4952 EOF
4953 if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4954   rm -rf conftest*
4955   eval "ac_cv_lib_$ac_lib_var=yes"
4956 else
4957   echo "configure: failed program was:" >&5
4958   cat conftest.$ac_ext >&5
4959   rm -rf conftest*
4960   eval "ac_cv_lib_$ac_lib_var=no"
4961 fi
4962 rm -f conftest*
4963 LIBS="$ac_save_LIBS"
4964
4965 fi
4966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968   have_k4=yes
4969 else
4970   echo "$ac_t""no" 1>&6
4971 have_k4=no
4972 fi
4973
4974
4975                 if test $have_k4 = yes ; then
4976                         ol_with_kerberos=found
4977                         ol_link_kerberos=yes
4978
4979                         KRB_LIBS="-lkrb -ldes"
4980                 fi
4981         fi
4982 fi
4983
4984 if test $ol_link_kerberos = yes ; then
4985         cat >> confdefs.h <<\EOF
4986 #define HAVE_KERBEROS 1
4987 EOF
4988
4989 fi
4990
4991 ol_link_tls=no
4992 if test $ol_with_tls != no ; then
4993         
4994         for ac_hdr in openssl/ssl.h ssl.h
4995 do
4996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4998 echo "configure:4999: checking for $ac_hdr" >&5
4999 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002   cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005 #include <$ac_hdr>
5006 EOF
5007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5008 { (eval echo configure:5009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5010 if test -z "$ac_err"; then
5011   rm -rf conftest*
5012   eval "ac_cv_header_$ac_safe=yes"
5013 else
5014   echo "$ac_err" >&5
5015   echo "configure: failed program was:" >&5
5016   cat conftest.$ac_ext >&5
5017   rm -rf conftest*
5018   eval "ac_cv_header_$ac_safe=no"
5019 fi
5020 rm -f conftest*
5021 fi
5022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5023   echo "$ac_t""yes" 1>&6
5024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5025   cat >> confdefs.h <<EOF
5026 #define $ac_tr_hdr 1
5027 EOF
5028  
5029 else
5030   echo "$ac_t""no" 1>&6
5031 fi
5032 done
5033
5034         
5035         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5036                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5037 echo "configure:5038: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5038 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5040   echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042   ac_save_LIBS="$LIBS"
5043 LIBS="-lssl -lcrypto $LIBS"
5044 cat > conftest.$ac_ext <<EOF
5045 #line 5046 "configure"
5046 #include "confdefs.h"
5047 /* Override any gcc2 internal prototype to avoid an error.  */
5048 /* We use char because int might match the return type of a gcc2
5049     builtin and then its argument prototype would still apply.  */
5050 char SSLeay_add_ssl_algorithms();
5051
5052 int main() {
5053 SSLeay_add_ssl_algorithms()
5054 ; return 0; }
5055 EOF
5056 if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5057   rm -rf conftest*
5058   eval "ac_cv_lib_$ac_lib_var=yes"
5059 else
5060   echo "configure: failed program was:" >&5
5061   cat conftest.$ac_ext >&5
5062   rm -rf conftest*
5063   eval "ac_cv_lib_$ac_lib_var=no"
5064 fi
5065 rm -f conftest*
5066 LIBS="$ac_save_LIBS"
5067
5068 fi
5069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5070   echo "$ac_t""yes" 1>&6
5071   have_ssleay=yes
5072                         need_rsaref=no
5073 else
5074   echo "$ac_t""no" 1>&6
5075 have_ssleay=no
5076 fi
5077
5078                         
5079                 if test $have_ssleay = no ; then
5080                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5081 echo "configure:5082: checking for SSL_library_init in -lssl" >&5
5082 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5083 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5084   echo $ac_n "(cached) $ac_c" 1>&6
5085 else
5086   ac_save_LIBS="$LIBS"
5087 LIBS="-lssl -lcrypto $LIBS"
5088 cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5091 /* Override any gcc2 internal prototype to avoid an error.  */
5092 /* We use char because int might match the return type of a gcc2
5093     builtin and then its argument prototype would still apply.  */
5094 char SSL_library_init();
5095
5096 int main() {
5097 SSL_library_init()
5098 ; return 0; }
5099 EOF
5100 if { (eval echo configure:5101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5101   rm -rf conftest*
5102   eval "ac_cv_lib_$ac_lib_var=yes"
5103 else
5104   echo "configure: failed program was:" >&5
5105   cat conftest.$ac_ext >&5
5106   rm -rf conftest*
5107   eval "ac_cv_lib_$ac_lib_var=no"
5108 fi
5109 rm -f conftest*
5110 LIBS="$ac_save_LIBS"
5111
5112 fi
5113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5114   echo "$ac_t""yes" 1>&6
5115   have_ssleay=yes
5116                                 need_rsaref=no
5117 else
5118   echo "$ac_t""no" 1>&6
5119 have_ssleay=no
5120 fi
5121
5122                 fi
5123
5124                 if test $have_ssleay = no ; then
5125                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5126 echo "configure:5127: checking for ssl3_accept in -lssl" >&5
5127 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5129   echo $ac_n "(cached) $ac_c" 1>&6
5130 else
5131   ac_save_LIBS="$LIBS"
5132 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 /* Override any gcc2 internal prototype to avoid an error.  */
5137 /* We use char because int might match the return type of a gcc2
5138     builtin and then its argument prototype would still apply.  */
5139 char ssl3_accept();
5140
5141 int main() {
5142 ssl3_accept()
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_lib_$ac_lib_var=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=no"
5153 fi
5154 rm -f conftest*
5155 LIBS="$ac_save_LIBS"
5156
5157 fi
5158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5159   echo "$ac_t""yes" 1>&6
5160   have_ssleay=yes
5161                                 need_rsaref=yes
5162 else
5163   echo "$ac_t""no" 1>&6
5164 have_ssleay=no
5165 fi
5166
5167                 fi
5168
5169                 if test $have_ssleay = yes ; then
5170                         ol_with_tls=found
5171                         ol_link_tls=yes
5172
5173                         cat >> confdefs.h <<\EOF
5174 #define HAVE_SSLEAY 1
5175 EOF
5176
5177
5178                         if test $need_rsaref = yes; then
5179                                 cat >> confdefs.h <<\EOF
5180 #define HAVE_RSAREF 1
5181 EOF
5182
5183
5184                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5185                         else
5186                                 TLS_LIBS="-lssl -lcrypto"
5187                         fi
5188                 fi
5189         fi
5190 fi
5191
5192 if test $ol_link_tls = yes ; then
5193         cat >> confdefs.h <<\EOF
5194 #define HAVE_TLS 1
5195 EOF
5196
5197 fi      
5198
5199 for ac_func in \
5200         ctime_r                 \
5201         gethostbyname_r gethostbyaddr_r \
5202
5203 do
5204 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5205 echo "configure:5206: checking for $ac_func" >&5
5206 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5207   echo $ac_n "(cached) $ac_c" 1>&6
5208 else
5209   cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 /* System header to define __stub macros and hopefully few prototypes,
5213     which can conflict with char $ac_func(); below.  */
5214 #include <assert.h>
5215 /* Override any gcc2 internal prototype to avoid an error.  */
5216 /* We use char because int might match the return type of a gcc2
5217     builtin and then its argument prototype would still apply.  */
5218 char $ac_func();
5219 char (*f)();
5220
5221 int main() {
5222
5223 /* The GNU C library defines this for functions which it implements
5224     to always fail with ENOSYS.  Some functions are actually named
5225     something starting with __ and the normal name is an alias.  */
5226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5227 choke me
5228 #else
5229 f = $ac_func;
5230 #endif
5231
5232 ; return 0; }
5233 EOF
5234 if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5235   rm -rf conftest*
5236   eval "ac_cv_func_$ac_func=yes"
5237 else
5238   echo "configure: failed program was:" >&5
5239   cat conftest.$ac_ext >&5
5240   rm -rf conftest*
5241   eval "ac_cv_func_$ac_func=no"
5242 fi
5243 rm -f conftest*
5244 fi
5245
5246 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5247   echo "$ac_t""yes" 1>&6
5248     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5249   cat >> confdefs.h <<EOF
5250 #define $ac_tr_func 1
5251 EOF
5252  
5253 else
5254   echo "$ac_t""no" 1>&6
5255 fi
5256 done
5257
5258
5259 if test "$ac_cv_func_ctime_r" = no ; then
5260         ol_cv_func_ctime_r_nargs=0
5261 else
5262         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5263 echo "configure:5264: checking number of arguments of ctime_r" >&5
5264 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267   cat > conftest.$ac_ext <<EOF
5268 #line 5269 "configure"
5269 #include "confdefs.h"
5270 #include <time.h>
5271 int main() {
5272 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5276   rm -rf conftest*
5277   ol_cv_func_ctime_r_nargs=3
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 #include <time.h>
5286 int main() {
5287 time_t ti; char *buffer; ctime_r(&ti,buffer);
5288 ; return 0; }
5289 EOF
5290 if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5291   rm -rf conftest*
5292   ol_cv_func_ctime_r_nargs=2
5293 else
5294   echo "configure: failed program was:" >&5
5295   cat conftest.$ac_ext >&5
5296   rm -rf conftest*
5297   ol_cv_func_ctime_r_nargs=0
5298 fi
5299 rm -f conftest*
5300 fi
5301 rm -f conftest*
5302 fi
5303
5304 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5305   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5306     cat >> confdefs.h <<EOF
5307 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5308 EOF
5309
5310   fi
5311
5312 fi
5313
5314 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5315         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5316 echo "configure:5317: checking number of arguments of gethostbyname_r" >&5
5317 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5318   echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320   cat > conftest.$ac_ext <<EOF
5321 #line 5322 "configure"
5322 #include "confdefs.h"
5323 #include <sys/types.h>
5324 #include <sys/socket.h>
5325 #include <netinet/in.h>
5326 #include <netdb.h>
5327 #define BUFSIZE (sizeof(struct hostent)+10)
5328 int main() {
5329 struct hostent hent; char buffer[BUFSIZE];
5330                 int bufsize=BUFSIZE;int h_errno;
5331                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5332                         buffer, bufsize, &h_errno);
5333 ; return 0; }
5334 EOF
5335 if { (eval echo configure:5336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5336   rm -rf conftest*
5337   ol_cv_func_gethostbyname_r_nargs=5
5338 else
5339   echo "configure: failed program was:" >&5
5340   cat conftest.$ac_ext >&5
5341   rm -rf conftest*
5342   cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 #include <sys/types.h>
5346 #include <sys/socket.h>
5347 #include <netinet/in.h>
5348 #include <netdb.h>
5349 #define BUFSIZE (sizeof(struct hostent)+10)
5350 int main() {
5351 struct hostent hent;struct hostent *rhent;
5352                         char buffer[BUFSIZE];
5353                         int bufsize=BUFSIZE;int h_errno;
5354                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5355                                 &rhent, &h_errno);
5356 ; return 0; }
5357 EOF
5358 if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5359   rm -rf conftest*
5360   ol_cv_func_gethostbyname_r_nargs=6
5361 else
5362   echo "configure: failed program was:" >&5
5363   cat conftest.$ac_ext >&5
5364   rm -rf conftest*
5365   ol_cv_func_gethostbyname_r_nargs=0
5366 fi
5367 rm -f conftest*
5368 fi
5369 rm -f conftest*
5370 fi
5371
5372 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5373   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5374         cat >> confdefs.h <<EOF
5375 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5376 EOF
5377
5378   fi
5379
5380 else
5381         ol_cv_func_gethostbyname_r_nargs=0
5382 fi
5383  
5384 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5385         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5386 echo "configure:5387: checking number of arguments of gethostbyaddr_r" >&5
5387 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5388   echo $ac_n "(cached) $ac_c" 1>&6
5389 else
5390   cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393 #include <sys/types.h>
5394 #include <sys/socket.h>
5395 #include <netinet/in.h>
5396 #include <netdb.h>
5397 #define BUFSIZE (sizeof(struct hostent)+10)
5398 int main() {
5399 struct hostent hent; char buffer[BUFSIZE]; 
5400             struct in_addr add;
5401             size_t alen=sizeof(struct in_addr);
5402             int bufsize=BUFSIZE;int h_errno;
5403                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5404                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5408   rm -rf conftest*
5409   ol_cv_func_gethostbyaddr_r_nargs=7
5410 else
5411   echo "configure: failed program was:" >&5
5412   cat conftest.$ac_ext >&5
5413   rm -rf conftest*
5414   cat > conftest.$ac_ext <<EOF
5415 #line 5416 "configure"
5416 #include "confdefs.h"
5417 #include <sys/types.h>
5418 #include <sys/socket.h>
5419 #include <netinet/in.h>
5420 #include <netdb.h>
5421 #define BUFSIZE (sizeof(struct hostent)+10)
5422 int main() {
5423 struct hostent hent;
5424                         struct hostent *rhent; char buffer[BUFSIZE]; 
5425                         struct in_addr add;
5426                         size_t alen=sizeof(struct in_addr);
5427                         int bufsize=BUFSIZE;int h_errno;
5428                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5429                                 alen, AF_INET, &hent, buffer, bufsize, 
5430                                 &rhent, &h_errno);
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5434   rm -rf conftest*
5435   ol_cv_func_gethostbyaddr_r_nargs=8
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   ol_cv_func_gethostbyaddr_r_nargs=0
5441 fi
5442 rm -f conftest*
5443 fi
5444 rm -f conftest*
5445 fi
5446
5447 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5448   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5449     cat >> confdefs.h <<EOF
5450 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5451 EOF
5452
5453   fi
5454
5455 else
5456         ol_cv_func_gethostbyaddr_r_nargs=0
5457 fi
5458
5459 if test "$ac_cv_func_ctime_r" = yes \
5460         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5461         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5462         -a "$ac_cv_func_gethostbyname_r" = yes \
5463         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5464         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5465         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5466         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5467         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5468         ; then
5469  
5470         cat >> confdefs.h <<\EOF
5471 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5472 EOF
5473
5474 fi
5475
5476 ol_link_threads=no
5477 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5478         -o $ol_with_threads = posix ; then
5479
5480         for ac_hdr in pthread.h sched.h
5481 do
5482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5484 echo "configure:5485: checking for $ac_hdr" >&5
5485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 #include <$ac_hdr>
5492 EOF
5493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5494 { (eval echo configure:5495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5496 if test -z "$ac_err"; then
5497   rm -rf conftest*
5498   eval "ac_cv_header_$ac_safe=yes"
5499 else
5500   echo "$ac_err" >&5
5501   echo "configure: failed program was:" >&5
5502   cat conftest.$ac_ext >&5
5503   rm -rf conftest*
5504   eval "ac_cv_header_$ac_safe=no"
5505 fi
5506 rm -f conftest*
5507 fi
5508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5509   echo "$ac_t""yes" 1>&6
5510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5511   cat >> confdefs.h <<EOF
5512 #define $ac_tr_hdr 1
5513 EOF
5514  
5515 else
5516   echo "$ac_t""no" 1>&6
5517 fi
5518 done
5519
5520
5521         if test $ac_cv_header_pthread_h = yes ; then
5522                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5523 echo "configure:5524: checking POSIX thread version" >&5
5524 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
5525   echo $ac_n "(cached) $ac_c" 1>&6
5526 else
5527   
5528         cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531
5532 #               include <pthread.h>
5533                 /* this check could be improved */
5534 #               ifdef PTHREAD_ONCE_INIT
5535                         pthread_version_final
5536 #               endif
5537         
5538 EOF
5539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5540   egrep "pthread_version_final" >/dev/null 2>&1; then
5541   rm -rf conftest*
5542   ol_pthread_final=yes
5543 else
5544   rm -rf conftest*
5545   ol_pthread_final=no
5546 fi
5547 rm -f conftest*
5548
5549
5550         cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553
5554 #               include <pthread.h>
5555                 /* this check could be improved */
5556 #               ifdef pthread_once_init
5557                         pthread_version_draft4
5558 #               endif
5559         
5560 EOF
5561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5562   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5563   rm -rf conftest*
5564   ol_pthread_draft4=yes
5565 else
5566   rm -rf conftest*
5567   ol_pthread_draft4=no
5568 fi
5569 rm -f conftest*
5570
5571
5572         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5573                 ol_cv_pthread_version=final
5574         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5575                 ol_cv_pthread_version=draft4
5576         else
5577                 ol_cv_pthread_version=unknown
5578         fi
5579
5580 fi
5581
5582 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5583
5584
5585                 if test $ol_cv_pthread_version = final ; then
5586                         cat >> confdefs.h <<\EOF
5587 #define HAVE_PTHREADS_FINAL 1
5588 EOF
5589
5590                 elif test $ol_cv_pthread_version = draft4 ; then
5591                         cat >> confdefs.h <<\EOF
5592 #define HAVE_PTHREADS_D4 1
5593 EOF
5594
5595                 else
5596                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5597                 fi
5598
5599                 # consider threads found
5600                 ol_with_threads=found
5601
5602                 
5603         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5604 echo "configure:5605: checking for LinuxThreads pthread.h" >&5
5605 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
5606   echo $ac_n "(cached) $ac_c" 1>&6
5607 else
5608   cat > conftest.$ac_ext <<EOF
5609 #line 5610 "configure"
5610 #include "confdefs.h"
5611 #include <pthread.h>
5612 EOF
5613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5614   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5615   rm -rf conftest*
5616   ol_cv_header_linux_threads=yes
5617 else
5618   rm -rf conftest*
5619   ol_cv_header_linux_threads=no
5620 fi
5621 rm -f conftest*
5622
5623                 
5624 fi
5625
5626 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5627         if test $ol_cv_header_linux_threads = yes; then
5628                 cat >> confdefs.h <<\EOF
5629 #define HAVE_LINUX_THREADS 1
5630 EOF
5631
5632         fi
5633
5634
5635                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5636                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5637 echo "configure:5638: checking for pthread_create in default libraries" >&5
5638 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   
5642                 if test "$cross_compiling" = yes; then
5643                         ol_cv_pthread_create=yes
5644 else
5645   cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648
5649 #include <pthread.h>
5650 #ifndef NULL
5651 #define NULL (void*)0
5652 #endif
5653
5654 static void *task(p)
5655         void *p;
5656 {
5657         return (void *) (p == NULL);
5658 }
5659
5660 int main(argc, argv)
5661         int argc;
5662         char **argv;
5663 {
5664         pthread_t t;
5665         int status;
5666
5667         /* make sure pthread_create() isn't just a stub */
5668 #if HAVE_PTHREADS_D4
5669         status = pthread_create(&t, pthread_attr_default, task, NULL);
5670 #else
5671         status = pthread_create(&t, NULL, task, NULL);
5672 #endif
5673
5674         if( status ) return status;
5675
5676         /* make sure pthread_detach() isn't just a stub */
5677 #if HAVE_PTHREADS_D4
5678         status = pthread_detach( &t );
5679 #else
5680         status = pthread_detach( t );
5681 #endif
5682
5683         if( status ) return status;
5684
5685         return status;
5686 }
5687
5688 EOF
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5690 then
5691   ol_cv_pthread_create=yes
5692 else
5693   echo "configure: failed program was:" >&5
5694   cat conftest.$ac_ext >&5
5695   rm -fr conftest*
5696   ol_cv_pthread_create=no
5697 fi
5698 rm -fr conftest*
5699 fi
5700
5701 fi
5702
5703 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5704
5705                 if test $ol_cv_pthread_create != no ; then
5706                         ol_link_threads=posix
5707                         ol_link_pthreads=""
5708                 fi
5709                 
5710                 # Pthread try link: -mt (ol_cv_pthread_mt)
5711         if test "$ol_link_threads" = no ; then
5712                 # try -mt
5713                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5714 echo "configure:5715: checking for pthread link with -mt" >&5
5715 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
5716   echo $ac_n "(cached) $ac_c" 1>&6
5717 else
5718   
5719                         # save the flags
5720                         ol_LIBS="$LIBS"
5721                         LIBS="-mt $LIBS"
5722
5723                         cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726
5727 #include <pthread.h>
5728 #ifndef NULL
5729 #define NULL (void*)0
5730 #endif
5731
5732 int main() {
5733
5734         pthread_t t;
5735
5736 #if HAVE_PTHREADS_D4
5737         pthread_create(&t, pthread_attr_default, NULL, NULL);
5738         pthread_detach( &t );
5739 #else
5740         pthread_create(&t, NULL, NULL, NULL);
5741         pthread_detach( t );
5742 #endif
5743 #ifdef HAVE_LINUX_THREADS
5744         pthread_kill_other_threads_np();
5745 #endif
5746
5747 ; return 0; }
5748 EOF
5749 if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5750   rm -rf conftest*
5751   ol_cv_pthread_mt=yes
5752 else
5753   echo "configure: failed program was:" >&5
5754   cat conftest.$ac_ext >&5
5755   rm -rf conftest*
5756   ol_cv_pthread_mt=no
5757 fi
5758 rm -f conftest*
5759
5760                 # restore the LIBS
5761                 LIBS="$ol_LIBS"
5762                 
5763 fi
5764
5765 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5766
5767                 if test $ol_cv_pthread_mt = yes ; then
5768                         ol_link_pthreads="-mt"
5769                         ol_link_threads=posix
5770                 fi
5771         fi
5772
5773                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5774         if test "$ol_link_threads" = no ; then
5775                 # try -kthread
5776                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5777 echo "configure:5778: checking for pthread link with -kthread" >&5
5778 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
5779   echo $ac_n "(cached) $ac_c" 1>&6
5780 else
5781   
5782                         # save the flags
5783                         ol_LIBS="$LIBS"
5784                         LIBS="-kthread $LIBS"
5785
5786                         cat > conftest.$ac_ext <<EOF
5787 #line 5788 "configure"
5788 #include "confdefs.h"
5789
5790 #include <pthread.h>
5791 #ifndef NULL
5792 #define NULL (void*)0
5793 #endif
5794
5795 int main() {
5796
5797         pthread_t t;
5798
5799 #if HAVE_PTHREADS_D4
5800         pthread_create(&t, pthread_attr_default, NULL, NULL);
5801         pthread_detach( &t );
5802 #else
5803         pthread_create(&t, NULL, NULL, NULL);
5804         pthread_detach( t );
5805 #endif
5806 #ifdef HAVE_LINUX_THREADS
5807         pthread_kill_other_threads_np();
5808 #endif
5809
5810 ; return 0; }
5811 EOF
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5813   rm -rf conftest*
5814   ol_cv_pthread_kthread=yes
5815 else
5816   echo "configure: failed program was:" >&5
5817   cat conftest.$ac_ext >&5
5818   rm -rf conftest*
5819   ol_cv_pthread_kthread=no
5820 fi
5821 rm -f conftest*
5822
5823                 # restore the LIBS
5824                 LIBS="$ol_LIBS"
5825                 
5826 fi
5827
5828 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5829
5830                 if test $ol_cv_pthread_kthread = yes ; then
5831                         ol_link_pthreads="-kthread"
5832                         ol_link_threads=posix
5833                 fi
5834         fi
5835
5836                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5837         if test "$ol_link_threads" = no ; then
5838                 # try -pthread
5839                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5840 echo "configure:5841: checking for pthread link with -pthread" >&5
5841 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
5842   echo $ac_n "(cached) $ac_c" 1>&6
5843 else
5844   
5845                         # save the flags
5846                         ol_LIBS="$LIBS"
5847                         LIBS="-pthread $LIBS"
5848
5849                         cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852
5853 #include <pthread.h>
5854 #ifndef NULL
5855 #define NULL (void*)0
5856 #endif
5857
5858 int main() {
5859
5860         pthread_t t;
5861
5862 #if HAVE_PTHREADS_D4
5863         pthread_create(&t, pthread_attr_default, NULL, NULL);
5864         pthread_detach( &t );
5865 #else
5866         pthread_create(&t, NULL, NULL, NULL);
5867         pthread_detach( t );
5868 #endif
5869 #ifdef HAVE_LINUX_THREADS
5870         pthread_kill_other_threads_np();
5871 #endif
5872
5873 ; return 0; }
5874 EOF
5875 if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5876   rm -rf conftest*
5877   ol_cv_pthread_pthread=yes
5878 else
5879   echo "configure: failed program was:" >&5
5880   cat conftest.$ac_ext >&5
5881   rm -rf conftest*
5882   ol_cv_pthread_pthread=no
5883 fi
5884 rm -f conftest*
5885
5886                 # restore the LIBS
5887                 LIBS="$ol_LIBS"
5888                 
5889 fi
5890
5891 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5892
5893                 if test $ol_cv_pthread_pthread = yes ; then
5894                         ol_link_pthreads="-pthread"
5895                         ol_link_threads=posix
5896                 fi
5897         fi
5898
5899                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5900         if test "$ol_link_threads" = no ; then
5901                 # try -pthreads
5902                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5903 echo "configure:5904: checking for pthread link with -pthreads" >&5
5904 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   
5908                         # save the flags
5909                         ol_LIBS="$LIBS"
5910                         LIBS="-pthreads $LIBS"
5911
5912                         cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915
5916 #include <pthread.h>
5917 #ifndef NULL
5918 #define NULL (void*)0
5919 #endif
5920
5921 int main() {
5922
5923         pthread_t t;
5924
5925 #if HAVE_PTHREADS_D4
5926         pthread_create(&t, pthread_attr_default, NULL, NULL);
5927         pthread_detach( &t );
5928 #else
5929         pthread_create(&t, NULL, NULL, NULL);
5930         pthread_detach( t );
5931 #endif
5932 #ifdef HAVE_LINUX_THREADS
5933         pthread_kill_other_threads_np();
5934 #endif
5935
5936 ; return 0; }
5937 EOF
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5939   rm -rf conftest*
5940   ol_cv_pthread_pthreads=yes
5941 else
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -rf conftest*
5945   ol_cv_pthread_pthreads=no
5946 fi
5947 rm -f conftest*
5948
5949                 # restore the LIBS
5950                 LIBS="$ol_LIBS"
5951                 
5952 fi
5953
5954 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5955
5956                 if test $ol_cv_pthread_pthreads = yes ; then
5957                         ol_link_pthreads="-pthreads"
5958                         ol_link_threads=posix
5959                 fi
5960         fi
5961
5962                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
5963         if test "$ol_link_threads" = no ; then
5964                 # try -mthreads
5965                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
5966 echo "configure:5967: checking for pthread link with -mthreads" >&5
5967 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
5968   echo $ac_n "(cached) $ac_c" 1>&6
5969 else
5970   
5971                         # save the flags
5972                         ol_LIBS="$LIBS"
5973                         LIBS="-mthreads $LIBS"
5974
5975                         cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978
5979 #include <pthread.h>
5980 #ifndef NULL
5981 #define NULL (void*)0
5982 #endif
5983
5984 int main() {
5985
5986         pthread_t t;
5987
5988 #if HAVE_PTHREADS_D4
5989         pthread_create(&t, pthread_attr_default, NULL, NULL);
5990         pthread_detach( &t );
5991 #else
5992         pthread_create(&t, NULL, NULL, NULL);
5993         pthread_detach( t );
5994 #endif
5995 #ifdef HAVE_LINUX_THREADS
5996         pthread_kill_other_threads_np();
5997 #endif
5998
5999 ; return 0; }
6000 EOF
6001 if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6002   rm -rf conftest*
6003   ol_cv_pthread_mthreads=yes
6004 else
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -rf conftest*
6008   ol_cv_pthread_mthreads=no
6009 fi
6010 rm -f conftest*
6011
6012                 # restore the LIBS
6013                 LIBS="$ol_LIBS"
6014                 
6015 fi
6016
6017 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6018
6019                 if test $ol_cv_pthread_mthreads = yes ; then
6020                         ol_link_pthreads="-mthreads"
6021                         ol_link_threads=posix
6022                 fi
6023         fi
6024
6025                 # Pthread try link: -thread (ol_cv_pthread_thread)
6026         if test "$ol_link_threads" = no ; then
6027                 # try -thread
6028                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6029 echo "configure:6030: checking for pthread link with -thread" >&5
6030 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   
6034                         # save the flags
6035                         ol_LIBS="$LIBS"
6036                         LIBS="-thread $LIBS"
6037
6038                         cat > conftest.$ac_ext <<EOF
6039 #line 6040 "configure"
6040 #include "confdefs.h"
6041
6042 #include <pthread.h>
6043 #ifndef NULL
6044 #define NULL (void*)0
6045 #endif
6046
6047 int main() {
6048
6049         pthread_t t;
6050
6051 #if HAVE_PTHREADS_D4
6052         pthread_create(&t, pthread_attr_default, NULL, NULL);
6053         pthread_detach( &t );
6054 #else
6055         pthread_create(&t, NULL, NULL, NULL);
6056         pthread_detach( t );
6057 #endif
6058 #ifdef HAVE_LINUX_THREADS
6059         pthread_kill_other_threads_np();
6060 #endif
6061
6062 ; return 0; }
6063 EOF
6064 if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6065   rm -rf conftest*
6066   ol_cv_pthread_thread=yes
6067 else
6068   echo "configure: failed program was:" >&5
6069   cat conftest.$ac_ext >&5
6070   rm -rf conftest*
6071   ol_cv_pthread_thread=no
6072 fi
6073 rm -f conftest*
6074
6075                 # restore the LIBS
6076                 LIBS="$ol_LIBS"
6077                 
6078 fi
6079
6080 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6081
6082                 if test $ol_cv_pthread_thread = yes ; then
6083                         ol_link_pthreads="-thread"
6084                         ol_link_threads=posix
6085                 fi
6086         fi
6087
6088
6089                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6090         if test "$ol_link_threads" = no ; then
6091                 # try -lpthread -lmach -lexc -lc_r
6092                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6093 echo "configure:6094: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6094 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   
6098                         # save the flags
6099                         ol_LIBS="$LIBS"
6100                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6101
6102                         cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105
6106 #include <pthread.h>
6107 #ifndef NULL
6108 #define NULL (void*)0
6109 #endif
6110
6111 int main() {
6112
6113         pthread_t t;
6114
6115 #if HAVE_PTHREADS_D4
6116         pthread_create(&t, pthread_attr_default, NULL, NULL);
6117         pthread_detach( &t );
6118 #else
6119         pthread_create(&t, NULL, NULL, NULL);
6120         pthread_detach( t );
6121 #endif
6122 #ifdef HAVE_LINUX_THREADS
6123         pthread_kill_other_threads_np();
6124 #endif
6125
6126 ; return 0; }
6127 EOF
6128 if { (eval echo configure:6129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6129   rm -rf conftest*
6130   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6131 else
6132   echo "configure: failed program was:" >&5
6133   cat conftest.$ac_ext >&5
6134   rm -rf conftest*
6135   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6136 fi
6137 rm -f conftest*
6138
6139                 # restore the LIBS
6140                 LIBS="$ol_LIBS"
6141                 
6142 fi
6143
6144 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6145
6146                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6147                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6148                         ol_link_threads=posix
6149                 fi
6150         fi
6151
6152                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6153         if test "$ol_link_threads" = no ; then
6154                 # try -lpthread -lmach -lexc
6155                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6156 echo "configure:6157: checking for pthread link with -lpthread -lmach -lexc" >&5
6157 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6158   echo $ac_n "(cached) $ac_c" 1>&6
6159 else
6160   
6161                         # save the flags
6162                         ol_LIBS="$LIBS"
6163                         LIBS="-lpthread -lmach -lexc $LIBS"
6164
6165                         cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168
6169 #include <pthread.h>
6170 #ifndef NULL
6171 #define NULL (void*)0
6172 #endif
6173
6174 int main() {
6175
6176         pthread_t t;
6177
6178 #if HAVE_PTHREADS_D4
6179         pthread_create(&t, pthread_attr_default, NULL, NULL);
6180         pthread_detach( &t );
6181 #else
6182         pthread_create(&t, NULL, NULL, NULL);
6183         pthread_detach( t );
6184 #endif
6185 #ifdef HAVE_LINUX_THREADS
6186         pthread_kill_other_threads_np();
6187 #endif
6188
6189 ; return 0; }
6190 EOF
6191 if { (eval echo configure:6192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6192   rm -rf conftest*
6193   ol_cv_pthread_lpthread_lmach_lexc=yes
6194 else
6195   echo "configure: failed program was:" >&5
6196   cat conftest.$ac_ext >&5
6197   rm -rf conftest*
6198   ol_cv_pthread_lpthread_lmach_lexc=no
6199 fi
6200 rm -f conftest*
6201
6202                 # restore the LIBS
6203                 LIBS="$ol_LIBS"
6204                 
6205 fi
6206
6207 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6208
6209                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6210                         ol_link_pthreads="-lpthread -lmach -lexc"
6211                         ol_link_threads=posix
6212                 fi
6213         fi
6214
6215
6216                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6217         if test "$ol_link_threads" = no ; then
6218                 # try -lpthread -Wl,-woff,85
6219                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6220 echo "configure:6221: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6221 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6222   echo $ac_n "(cached) $ac_c" 1>&6
6223 else
6224   
6225                         # save the flags
6226                         ol_LIBS="$LIBS"
6227                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6228
6229                         cat > conftest.$ac_ext <<EOF
6230 #line 6231 "configure"
6231 #include "confdefs.h"
6232
6233 #include <pthread.h>
6234 #ifndef NULL
6235 #define NULL (void*)0
6236 #endif
6237
6238 int main() {
6239
6240         pthread_t t;
6241
6242 #if HAVE_PTHREADS_D4
6243         pthread_create(&t, pthread_attr_default, NULL, NULL);
6244         pthread_detach( &t );
6245 #else
6246         pthread_create(&t, NULL, NULL, NULL);
6247         pthread_detach( t );
6248 #endif
6249 #ifdef HAVE_LINUX_THREADS
6250         pthread_kill_other_threads_np();
6251 #endif
6252
6253 ; return 0; }
6254 EOF
6255 if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6256   rm -rf conftest*
6257   ol_cv_pthread_lib_lpthread_woff=yes
6258 else
6259   echo "configure: failed program was:" >&5
6260   cat conftest.$ac_ext >&5
6261   rm -rf conftest*
6262   ol_cv_pthread_lib_lpthread_woff=no
6263 fi
6264 rm -f conftest*
6265
6266                 # restore the LIBS
6267                 LIBS="$ol_LIBS"
6268                 
6269 fi
6270
6271 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6272
6273                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6274                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6275                         ol_link_threads=posix
6276                 fi
6277         fi
6278
6279
6280                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6281         if test "$ol_link_threads" = no ; then
6282                 # try -lpthread
6283                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6284 echo "configure:6285: checking for pthread link with -lpthread" >&5
6285 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6286   echo $ac_n "(cached) $ac_c" 1>&6
6287 else
6288   
6289                         # save the flags
6290                         ol_LIBS="$LIBS"
6291                         LIBS="-lpthread $LIBS"
6292
6293                         cat > conftest.$ac_ext <<EOF
6294 #line 6295 "configure"
6295 #include "confdefs.h"
6296
6297 #include <pthread.h>
6298 #ifndef NULL
6299 #define NULL (void*)0
6300 #endif
6301
6302 int main() {
6303
6304         pthread_t t;
6305
6306 #if HAVE_PTHREADS_D4
6307         pthread_create(&t, pthread_attr_default, NULL, NULL);
6308         pthread_detach( &t );
6309 #else
6310         pthread_create(&t, NULL, NULL, NULL);
6311         pthread_detach( t );
6312 #endif
6313 #ifdef HAVE_LINUX_THREADS
6314         pthread_kill_other_threads_np();
6315 #endif
6316
6317 ; return 0; }
6318 EOF
6319 if { (eval echo configure:6320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6320   rm -rf conftest*
6321   ol_cv_pthread_lpthread=yes
6322 else
6323   echo "configure: failed program was:" >&5
6324   cat conftest.$ac_ext >&5
6325   rm -rf conftest*
6326   ol_cv_pthread_lpthread=no
6327 fi
6328 rm -f conftest*
6329
6330                 # restore the LIBS
6331                 LIBS="$ol_LIBS"
6332                 
6333 fi
6334
6335 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6336
6337                 if test $ol_cv_pthread_lpthread = yes ; then
6338                         ol_link_pthreads="-lpthread"
6339                         ol_link_threads=posix
6340                 fi
6341         fi
6342
6343                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6344         if test "$ol_link_threads" = no ; then
6345                 # try -lc_r
6346                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6347 echo "configure:6348: checking for pthread link with -lc_r" >&5
6348 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6349   echo $ac_n "(cached) $ac_c" 1>&6
6350 else
6351   
6352                         # save the flags
6353                         ol_LIBS="$LIBS"
6354                         LIBS="-lc_r $LIBS"
6355
6356                         cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359
6360 #include <pthread.h>
6361 #ifndef NULL
6362 #define NULL (void*)0
6363 #endif
6364
6365 int main() {
6366
6367         pthread_t t;
6368
6369 #if HAVE_PTHREADS_D4
6370         pthread_create(&t, pthread_attr_default, NULL, NULL);
6371         pthread_detach( &t );
6372 #else
6373         pthread_create(&t, NULL, NULL, NULL);
6374         pthread_detach( t );
6375 #endif
6376 #ifdef HAVE_LINUX_THREADS
6377         pthread_kill_other_threads_np();
6378 #endif
6379
6380 ; return 0; }
6381 EOF
6382 if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6383   rm -rf conftest*
6384   ol_cv_pthread_lc_r=yes
6385 else
6386   echo "configure: failed program was:" >&5
6387   cat conftest.$ac_ext >&5
6388   rm -rf conftest*
6389   ol_cv_pthread_lc_r=no
6390 fi
6391 rm -f conftest*
6392
6393                 # restore the LIBS
6394                 LIBS="$ol_LIBS"
6395                 
6396 fi
6397
6398 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6399
6400                 if test $ol_cv_pthread_lc_r = yes ; then
6401                         ol_link_pthreads="-lc_r"
6402                         ol_link_threads=posix
6403                 fi
6404         fi
6405
6406
6407                 # Pthread try link: -threads (ol_cv_pthread_threads)
6408         if test "$ol_link_threads" = no ; then
6409                 # try -threads
6410                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6411 echo "configure:6412: checking for pthread link with -threads" >&5
6412 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6413   echo $ac_n "(cached) $ac_c" 1>&6
6414 else
6415   
6416                         # save the flags
6417                         ol_LIBS="$LIBS"
6418                         LIBS="-threads $LIBS"
6419
6420                         cat > conftest.$ac_ext <<EOF
6421 #line 6422 "configure"
6422 #include "confdefs.h"
6423
6424 #include <pthread.h>
6425 #ifndef NULL
6426 #define NULL (void*)0
6427 #endif
6428
6429 int main() {
6430
6431         pthread_t t;
6432
6433 #if HAVE_PTHREADS_D4
6434         pthread_create(&t, pthread_attr_default, NULL, NULL);
6435         pthread_detach( &t );
6436 #else
6437         pthread_create(&t, NULL, NULL, NULL);
6438         pthread_detach( t );
6439 #endif
6440 #ifdef HAVE_LINUX_THREADS
6441         pthread_kill_other_threads_np();
6442 #endif
6443
6444 ; return 0; }
6445 EOF
6446 if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6447   rm -rf conftest*
6448   ol_cv_pthread_threads=yes
6449 else
6450   echo "configure: failed program was:" >&5
6451   cat conftest.$ac_ext >&5
6452   rm -rf conftest*
6453   ol_cv_pthread_threads=no
6454 fi
6455 rm -f conftest*
6456
6457                 # restore the LIBS
6458                 LIBS="$ol_LIBS"
6459                 
6460 fi
6461
6462 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6463
6464                 if test $ol_cv_pthread_threads = yes ; then
6465                         ol_link_pthreads="-threads"
6466                         ol_link_threads=posix
6467                 fi
6468         fi
6469
6470
6471                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6472         if test "$ol_link_threads" = no ; then
6473                 # try -lpthreads -lmach -lexc -lc_r
6474                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6475 echo "configure:6476: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6476 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
6477   echo $ac_n "(cached) $ac_c" 1>&6
6478 else
6479   
6480                         # save the flags
6481                         ol_LIBS="$LIBS"
6482                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6483
6484                         cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487
6488 #include <pthread.h>
6489 #ifndef NULL
6490 #define NULL (void*)0
6491 #endif
6492
6493 int main() {
6494
6495         pthread_t t;
6496
6497 #if HAVE_PTHREADS_D4
6498         pthread_create(&t, pthread_attr_default, NULL, NULL);
6499         pthread_detach( &t );
6500 #else
6501         pthread_create(&t, NULL, NULL, NULL);
6502         pthread_detach( t );
6503 #endif
6504 #ifdef HAVE_LINUX_THREADS
6505         pthread_kill_other_threads_np();
6506 #endif
6507
6508 ; return 0; }
6509 EOF
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6511   rm -rf conftest*
6512   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6518 fi
6519 rm -f conftest*
6520
6521                 # restore the LIBS
6522                 LIBS="$ol_LIBS"
6523                 
6524 fi
6525
6526 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6527
6528                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6529                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6530                         ol_link_threads=posix
6531                 fi
6532         fi
6533
6534                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6535         if test "$ol_link_threads" = no ; then
6536                 # try -lpthreads -lmach -lexc
6537                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6538 echo "configure:6539: checking for pthread link with -lpthreads -lmach -lexc" >&5
6539 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   
6543                         # save the flags
6544                         ol_LIBS="$LIBS"
6545                         LIBS="-lpthreads -lmach -lexc $LIBS"
6546
6547                         cat > conftest.$ac_ext <<EOF
6548 #line 6549 "configure"
6549 #include "confdefs.h"
6550
6551 #include <pthread.h>
6552 #ifndef NULL
6553 #define NULL (void*)0
6554 #endif
6555
6556 int main() {
6557
6558         pthread_t t;
6559
6560 #if HAVE_PTHREADS_D4
6561         pthread_create(&t, pthread_attr_default, NULL, NULL);
6562         pthread_detach( &t );
6563 #else
6564         pthread_create(&t, NULL, NULL, NULL);
6565         pthread_detach( t );
6566 #endif
6567 #ifdef HAVE_LINUX_THREADS
6568         pthread_kill_other_threads_np();
6569 #endif
6570
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574   rm -rf conftest*
6575   ol_cv_pthread_lpthreads_lmach_lexc=yes
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   ol_cv_pthread_lpthreads_lmach_lexc=no
6581 fi
6582 rm -f conftest*
6583
6584                 # restore the LIBS
6585                 LIBS="$ol_LIBS"
6586                 
6587 fi
6588
6589 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6590
6591                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6592                         ol_link_pthreads="-lpthreads -lmach -lexc"
6593                         ol_link_threads=posix
6594                 fi
6595         fi
6596
6597                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6598         if test "$ol_link_threads" = no ; then
6599                 # try -lpthreads -lexc
6600                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6601 echo "configure:6602: checking for pthread link with -lpthreads -lexc" >&5
6602 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   
6606                         # save the flags
6607                         ol_LIBS="$LIBS"
6608                         LIBS="-lpthreads -lexc $LIBS"
6609
6610                         cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613
6614 #include <pthread.h>
6615 #ifndef NULL
6616 #define NULL (void*)0
6617 #endif
6618
6619 int main() {
6620
6621         pthread_t t;
6622
6623 #if HAVE_PTHREADS_D4
6624         pthread_create(&t, pthread_attr_default, NULL, NULL);
6625         pthread_detach( &t );
6626 #else
6627         pthread_create(&t, NULL, NULL, NULL);
6628         pthread_detach( t );
6629 #endif
6630 #ifdef HAVE_LINUX_THREADS
6631         pthread_kill_other_threads_np();
6632 #endif
6633
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6637   rm -rf conftest*
6638   ol_cv_pthread_lpthreads_lexc=yes
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   ol_cv_pthread_lpthreads_lexc=no
6644 fi
6645 rm -f conftest*
6646
6647                 # restore the LIBS
6648                 LIBS="$ol_LIBS"
6649                 
6650 fi
6651
6652 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6653
6654                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6655                         ol_link_pthreads="-lpthreads -lexc"
6656                         ol_link_threads=posix
6657                 fi
6658         fi
6659
6660
6661                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6662         if test "$ol_link_threads" = no ; then
6663                 # try -lpthreads
6664                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6665 echo "configure:6666: checking for pthread link with -lpthreads" >&5
6666 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
6667   echo $ac_n "(cached) $ac_c" 1>&6
6668 else
6669   
6670                         # save the flags
6671                         ol_LIBS="$LIBS"
6672                         LIBS="-lpthreads $LIBS"
6673
6674                         cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677
6678 #include <pthread.h>
6679 #ifndef NULL
6680 #define NULL (void*)0
6681 #endif
6682
6683 int main() {
6684
6685         pthread_t t;
6686
6687 #if HAVE_PTHREADS_D4
6688         pthread_create(&t, pthread_attr_default, NULL, NULL);
6689         pthread_detach( &t );
6690 #else
6691         pthread_create(&t, NULL, NULL, NULL);
6692         pthread_detach( t );
6693 #endif
6694 #ifdef HAVE_LINUX_THREADS
6695         pthread_kill_other_threads_np();
6696 #endif
6697
6698 ; return 0; }
6699 EOF
6700 if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6701   rm -rf conftest*
6702   ol_cv_pthread_lib_lpthreads=yes
6703 else
6704   echo "configure: failed program was:" >&5
6705   cat conftest.$ac_ext >&5
6706   rm -rf conftest*
6707   ol_cv_pthread_lib_lpthreads=no
6708 fi
6709 rm -f conftest*
6710
6711                 # restore the LIBS
6712                 LIBS="$ol_LIBS"
6713                 
6714 fi
6715
6716 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6717
6718                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6719                         ol_link_pthreads="-lpthreads"
6720                         ol_link_threads=posix
6721                 fi
6722         fi
6723
6724
6725                 if test $ol_link_threads != no ; then
6726                         cat >> confdefs.h <<\EOF
6727 #define HAVE_PTHREADS 1
6728 EOF
6729
6730
6731                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6732
6733                                                 save_CPPFLAGS="$CPPFLAGS"
6734                         save_LIBS="$LIBS"
6735                         LIBS="$LTHREAD_LIBS $LIBS"
6736
6737                                                                                                 for ac_func in sched_yield pthread_yield
6738 do
6739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6740 echo "configure:6741: checking for $ac_func" >&5
6741 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 /* System header to define __stub macros and hopefully few prototypes,
6748     which can conflict with char $ac_func(); below.  */
6749 #include <assert.h>
6750 /* Override any gcc2 internal prototype to avoid an error.  */
6751 /* We use char because int might match the return type of a gcc2
6752     builtin and then its argument prototype would still apply.  */
6753 char $ac_func();
6754 char (*f)();
6755
6756 int main() {
6757
6758 /* The GNU C library defines this for functions which it implements
6759     to always fail with ENOSYS.  Some functions are actually named
6760     something starting with __ and the normal name is an alias.  */
6761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6762 choke me
6763 #else
6764 f = $ac_func;
6765 #endif
6766
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_func_$ac_func=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_func_$ac_func=no"
6777 fi
6778 rm -f conftest*
6779 fi
6780
6781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6782   echo "$ac_t""yes" 1>&6
6783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6784   cat >> confdefs.h <<EOF
6785 #define $ac_tr_func 1
6786 EOF
6787  
6788 else
6789   echo "$ac_t""no" 1>&6
6790 fi
6791 done
6792
6793
6794                         if test $ac_cv_func_sched_yield = no -a \
6795                                 $ac_cv_func_pthread_yield = no ; then
6796                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6797 echo "configure:6798: checking for sched_yield in -lrt" >&5
6798 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
6799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6800   echo $ac_n "(cached) $ac_c" 1>&6
6801 else
6802   ac_save_LIBS="$LIBS"
6803 LIBS="-lrt  $LIBS"
6804 cat > conftest.$ac_ext <<EOF
6805 #line 6806 "configure"
6806 #include "confdefs.h"
6807 /* Override any gcc2 internal prototype to avoid an error.  */
6808 /* We use char because int might match the return type of a gcc2
6809     builtin and then its argument prototype would still apply.  */
6810 char sched_yield();
6811
6812 int main() {
6813 sched_yield()
6814 ; return 0; }
6815 EOF
6816 if { (eval echo configure:6817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6817   rm -rf conftest*
6818   eval "ac_cv_lib_$ac_lib_var=yes"
6819 else
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -rf conftest*
6823   eval "ac_cv_lib_$ac_lib_var=no"
6824 fi
6825 rm -f conftest*
6826 LIBS="$ac_save_LIBS"
6827
6828 fi
6829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6830   echo "$ac_t""yes" 1>&6
6831   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6832                                         cat >> confdefs.h <<\EOF
6833 #define HAVE_SCHED_YIELD 1
6834 EOF
6835
6836                                         ac_cv_func_sched_yield=yes
6837 else
6838   echo "$ac_t""no" 1>&6
6839 ac_cv_func_sched_yield=no
6840 fi
6841
6842                         fi
6843                         if test $ac_cv_func_sched_yield = no -a \
6844                                 $ac_cv_func_pthread_yield = no ; then
6845                                                                                                 for ac_func in thr_yield
6846 do
6847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6848 echo "configure:6849: checking for $ac_func" >&5
6849 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6850   echo $ac_n "(cached) $ac_c" 1>&6
6851 else
6852   cat > conftest.$ac_ext <<EOF
6853 #line 6854 "configure"
6854 #include "confdefs.h"
6855 /* System header to define __stub macros and hopefully few prototypes,
6856     which can conflict with char $ac_func(); below.  */
6857 #include <assert.h>
6858 /* Override any gcc2 internal prototype to avoid an error.  */
6859 /* We use char because int might match the return type of a gcc2
6860     builtin and then its argument prototype would still apply.  */
6861 char $ac_func();
6862 char (*f)();
6863
6864 int main() {
6865
6866 /* The GNU C library defines this for functions which it implements
6867     to always fail with ENOSYS.  Some functions are actually named
6868     something starting with __ and the normal name is an alias.  */
6869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6870 choke me
6871 #else
6872 f = $ac_func;
6873 #endif
6874
6875 ; return 0; }
6876 EOF
6877 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6878   rm -rf conftest*
6879   eval "ac_cv_func_$ac_func=yes"
6880 else
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_func_$ac_func=no"
6885 fi
6886 rm -f conftest*
6887 fi
6888
6889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6890   echo "$ac_t""yes" 1>&6
6891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6892   cat >> confdefs.h <<EOF
6893 #define $ac_tr_func 1
6894 EOF
6895  
6896 else
6897   echo "$ac_t""no" 1>&6
6898 fi
6899 done
6900
6901                         fi
6902                         if test $ac_cv_func_sched_yield = no -a \
6903                                 $ac_cv_func_pthread_yield = no -a \
6904                                 "$ac_cv_func_thr_yield" = no ; then
6905                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6906                         fi
6907
6908                                                 for ac_func in pthread_kill
6909 do
6910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6911 echo "configure:6912: checking for $ac_func" >&5
6912 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6913   echo $ac_n "(cached) $ac_c" 1>&6
6914 else
6915   cat > conftest.$ac_ext <<EOF
6916 #line 6917 "configure"
6917 #include "confdefs.h"
6918 /* System header to define __stub macros and hopefully few prototypes,
6919     which can conflict with char $ac_func(); below.  */
6920 #include <assert.h>
6921 /* Override any gcc2 internal prototype to avoid an error.  */
6922 /* We use char because int might match the return type of a gcc2
6923     builtin and then its argument prototype would still apply.  */
6924 char $ac_func();
6925 char (*f)();
6926
6927 int main() {
6928
6929 /* The GNU C library defines this for functions which it implements
6930     to always fail with ENOSYS.  Some functions are actually named
6931     something starting with __ and the normal name is an alias.  */
6932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6933 choke me
6934 #else
6935 f = $ac_func;
6936 #endif
6937
6938 ; return 0; }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6941   rm -rf conftest*
6942   eval "ac_cv_func_$ac_func=yes"
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   eval "ac_cv_func_$ac_func=no"
6948 fi
6949 rm -f conftest*
6950 fi
6951
6952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6953   echo "$ac_t""yes" 1>&6
6954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6955   cat >> confdefs.h <<EOF
6956 #define $ac_tr_func 1
6957 EOF
6958  
6959 else
6960   echo "$ac_t""no" 1>&6
6961 fi
6962 done
6963
6964
6965                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6966 echo "configure:6967: checking for pthread_detach with <pthread.h>" >&5
6967 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
6968   echo $ac_n "(cached) $ac_c" 1>&6
6969 else
6970   
6971                                                                 cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974
6975 #include <pthread.h>
6976 #ifndef NULL
6977 #define NULL (void*)0
6978 #endif
6979
6980 int main() {
6981 pthread_detach(NULL);
6982 ; return 0; }
6983 EOF
6984 if { (eval echo configure:6985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6985   rm -rf conftest*
6986   ol_cv_func_pthread_detach=yes
6987 else
6988   echo "configure: failed program was:" >&5
6989   cat conftest.$ac_ext >&5
6990   rm -rf conftest*
6991   ol_cv_func_pthread_detach=no
6992 fi
6993 rm -f conftest*
6994                         
6995 fi
6996
6997 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6998
6999                         if test $ol_cv_func_pthread_detach = no ; then
7000                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7001                         fi
7002
7003                         cat >> confdefs.h <<\EOF
7004 #define HAVE_PTHREAD_DETACH 1
7005 EOF
7006
7007
7008                                                 for ac_func in \
7009                                 pthread_setconcurrency \
7010                                 pthread_getconcurrency \
7011                                 thr_setconcurrency \
7012                                 thr_getconcurrency \
7013                         
7014 do
7015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7016 echo "configure:7017: checking for $ac_func" >&5
7017 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7018   echo $ac_n "(cached) $ac_c" 1>&6
7019 else
7020   cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7023 /* System header to define __stub macros and hopefully few prototypes,
7024     which can conflict with char $ac_func(); below.  */
7025 #include <assert.h>
7026 /* Override any gcc2 internal prototype to avoid an error.  */
7027 /* We use char because int might match the return type of a gcc2
7028     builtin and then its argument prototype would still apply.  */
7029 char $ac_func();
7030 char (*f)();
7031
7032 int main() {
7033
7034 /* The GNU C library defines this for functions which it implements
7035     to always fail with ENOSYS.  Some functions are actually named
7036     something starting with __ and the normal name is an alias.  */
7037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7038 choke me
7039 #else
7040 f = $ac_func;
7041 #endif
7042
7043 ; return 0; }
7044 EOF
7045 if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7046   rm -rf conftest*
7047   eval "ac_cv_func_$ac_func=yes"
7048 else
7049   echo "configure: failed program was:" >&5
7050   cat conftest.$ac_ext >&5
7051   rm -rf conftest*
7052   eval "ac_cv_func_$ac_func=no"
7053 fi
7054 rm -f conftest*
7055 fi
7056
7057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7058   echo "$ac_t""yes" 1>&6
7059     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7060   cat >> confdefs.h <<EOF
7061 #define $ac_tr_func 1
7062 EOF
7063  
7064 else
7065   echo "$ac_t""no" 1>&6
7066 fi
7067 done
7068
7069
7070                         
7071         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7072 echo "configure:7073: checking for pthread_kill_other_threads_np" >&5
7073 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7074   echo $ac_n "(cached) $ac_c" 1>&6
7075 else
7076   cat > conftest.$ac_ext <<EOF
7077 #line 7078 "configure"
7078 #include "confdefs.h"
7079 /* System header to define __stub macros and hopefully few prototypes,
7080     which can conflict with char pthread_kill_other_threads_np(); below.  */
7081 #include <assert.h>
7082 /* Override any gcc2 internal prototype to avoid an error.  */
7083 /* We use char because int might match the return type of a gcc2
7084     builtin and then its argument prototype would still apply.  */
7085 char pthread_kill_other_threads_np();
7086 char (*f)();
7087
7088 int main() {
7089
7090 /* The GNU C library defines this for functions which it implements
7091     to always fail with ENOSYS.  Some functions are actually named
7092     something starting with __ and the normal name is an alias.  */
7093 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7094 choke me
7095 #else
7096 f = pthread_kill_other_threads_np;
7097 #endif
7098
7099 ; return 0; }
7100 EOF
7101 if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7102   rm -rf conftest*
7103   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7104 else
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7109 fi
7110 rm -f conftest*
7111 fi
7112
7113 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7114   echo "$ac_t""yes" 1>&6
7115   :
7116 else
7117   echo "$ac_t""no" 1>&6
7118 fi
7119
7120         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7121 echo "configure:7122: checking for LinuxThreads implementation" >&5
7122 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7123   echo $ac_n "(cached) $ac_c" 1>&6
7124 else
7125   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7126 fi
7127
7128 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7129
7130                         
7131         
7132         
7133         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7134 echo "configure:7135: checking for LinuxThreads consistency" >&5
7135 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7136   echo $ac_n "(cached) $ac_c" 1>&6
7137 else
7138   
7139                 if test $ol_cv_header_linux_threads = yes -a \
7140                         $ol_cv_sys_linux_threads = yes; then
7141                         ol_cv_linux_threads=yes
7142                 elif test $ol_cv_header_linux_threads = no -a \
7143                         $ol_cv_sys_linux_threads = no; then
7144                         ol_cv_linux_threads=no
7145                 else
7146                         ol_cv_linux_threads=error
7147                 fi
7148         
7149 fi
7150
7151 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7152
7153
7154                         if test $ol_cv_linux_threads = error; then
7155                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7156                         fi
7157
7158                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7159 echo "configure:7160: checking if pthread_create() works" >&5
7160 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7161   echo $ac_n "(cached) $ac_c" 1>&6
7162 else
7163   
7164                         if test "$cross_compiling" = yes; then
7165                                 ol_cv_pthread_create_works=yes
7166 else
7167   cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170
7171 #include <pthread.h>
7172 #ifndef NULL
7173 #define NULL (void*)0
7174 #endif
7175
7176 static void *task(p)
7177         void *p;
7178 {
7179         return (void *) (p == NULL);
7180 }
7181
7182 int main(argc, argv)
7183         int argc;
7184         char **argv;
7185 {
7186         pthread_t t;
7187 #if HAVE_PTHREADS_D4
7188         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7189 #else
7190         exit(pthread_create(&t, NULL, task, NULL));
7191 #endif
7192 }
7193
7194 EOF
7195 if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7196 then
7197   ol_cv_pthread_create_works=yes
7198 else
7199   echo "configure: failed program was:" >&5
7200   cat conftest.$ac_ext >&5
7201   rm -fr conftest*
7202   ol_cv_pthread_create_works=no
7203 fi
7204 rm -fr conftest*
7205 fi
7206
7207 fi
7208
7209 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7210
7211                         if test $ol_cv_pthread_create_works = no ; then
7212                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7213                         fi
7214
7215                                                 if test $ol_with_yielding_select = auto ; then
7216                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7217 echo "configure:7218: checking if select yields when using pthreads" >&5
7218 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7219   echo $ac_n "(cached) $ac_c" 1>&6
7220 else
7221   
7222                                 if test "$cross_compiling" = yes; then
7223   ol_cv_pthread_select_yields=cross
7224 else
7225   cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228
7229 #include <sys/types.h>
7230 #include <sys/time.h>
7231 #include <unistd.h>
7232 #include <pthread.h>
7233 #ifndef NULL
7234 #define NULL (void*) 0
7235 #endif
7236
7237 static int fildes[2];
7238
7239 static void *task(p)
7240         void *p;
7241 {
7242         int i;
7243         struct timeval tv;
7244
7245         fd_set rfds;
7246
7247         tv.tv_sec=10;
7248         tv.tv_usec=0;
7249
7250         FD_ZERO(&rfds);
7251         FD_SET(fildes[0], &rfds);
7252
7253         /* we're not interested in any fds */
7254         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7255
7256         if(i < 0) {
7257                 perror("select");
7258                 exit(10);
7259         }
7260
7261         exit(0); /* if we exit here, the select blocked the whole process */
7262 }
7263
7264 int main(argc, argv)
7265         int argc;
7266         char **argv;
7267 {
7268         pthread_t t;
7269
7270         /* create a pipe to select */
7271         if(pipe(&fildes[0])) {
7272                 perror("select");
7273                 exit(1);
7274         }
7275
7276 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7277         (void) pthread_setconcurrency(2);
7278 #else
7279 #ifdef HAVE_THR_SETCONCURRENCY
7280         /* Set Solaris LWP concurrency to 2 */
7281         thr_setconcurrency(2);
7282 #endif
7283 #endif
7284
7285 #if HAVE_PTHREADS_D4
7286         pthread_create(&t, pthread_attr_default, task, NULL);
7287 #else
7288         pthread_create(&t, NULL, task, NULL);
7289 #endif
7290
7291 #if HAVE_SCHED_YIELD
7292         sched_yield();  /* make sure task runs first */
7293 #else
7294 #ifdef HAVE_PTHREAD_YIELD
7295         pthread_yield();        /* make sure task runs first */
7296 #endif
7297 #endif
7298
7299         exit(2);
7300 }
7301 EOF
7302 if { (eval echo configure:7303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7303 then
7304   ol_cv_pthread_select_yields=no
7305 else
7306   echo "configure: failed program was:" >&5
7307   cat conftest.$ac_ext >&5
7308   rm -fr conftest*
7309   ol_cv_pthread_select_yields=yes
7310 fi
7311 rm -fr conftest*
7312 fi
7313
7314 fi
7315
7316 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7317
7318                                 if test $ol_cv_pthread_select_yields = cross ; then
7319                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7320                                 fi
7321
7322                                 if test $ol_cv_pthread_select_yields = yes ; then
7323                                         ol_with_yielding_select=yes
7324                                 fi
7325                         fi
7326
7327                                                 CPPFLAGS="$save_CPPFLAGS"
7328                         LIBS="$save_LIBS"
7329                 else
7330                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7331                 fi
7332         fi
7333
7334         if test $ol_with_threads = posix ; then
7335                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7336         fi
7337 fi
7338
7339 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7340         -o $ol_with_threads = mach ; then
7341
7342                 for ac_hdr in mach/cthreads.h
7343 do
7344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7346 echo "configure:7347: checking for $ac_hdr" >&5
7347 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7348   echo $ac_n "(cached) $ac_c" 1>&6
7349 else
7350   cat > conftest.$ac_ext <<EOF
7351 #line 7352 "configure"
7352 #include "confdefs.h"
7353 #include <$ac_hdr>
7354 EOF
7355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7356 { (eval echo configure:7357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7358 if test -z "$ac_err"; then
7359   rm -rf conftest*
7360   eval "ac_cv_header_$ac_safe=yes"
7361 else
7362   echo "$ac_err" >&5
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_header_$ac_safe=no"
7367 fi
7368 rm -f conftest*
7369 fi
7370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7373   cat >> confdefs.h <<EOF
7374 #define $ac_tr_hdr 1
7375 EOF
7376  
7377 else
7378   echo "$ac_t""no" 1>&6
7379 fi
7380 done
7381
7382         if test $ac_cv_header_mach_cthreads_h = yes ; then
7383                 ol_with_threads=found
7384
7385                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7386 echo "configure:7387: checking for cthread_fork" >&5
7387 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7388   echo $ac_n "(cached) $ac_c" 1>&6
7389 else
7390   cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7393 /* System header to define __stub macros and hopefully few prototypes,
7394     which can conflict with char cthread_fork(); below.  */
7395 #include <assert.h>
7396 /* Override any gcc2 internal prototype to avoid an error.  */
7397 /* We use char because int might match the return type of a gcc2
7398     builtin and then its argument prototype would still apply.  */
7399 char cthread_fork();
7400 char (*f)();
7401
7402 int main() {
7403
7404 /* The GNU C library defines this for functions which it implements
7405     to always fail with ENOSYS.  Some functions are actually named
7406     something starting with __ and the normal name is an alias.  */
7407 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7408 choke me
7409 #else
7410 f = cthread_fork;
7411 #endif
7412
7413 ; return 0; }
7414 EOF
7415 if { (eval echo configure:7416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416   rm -rf conftest*
7417   eval "ac_cv_func_cthread_fork=yes"
7418 else
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_func_cthread_fork=no"
7423 fi
7424 rm -f conftest*
7425 fi
7426
7427 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7428   echo "$ac_t""yes" 1>&6
7429   ol_link_threads=yes
7430 else
7431   echo "$ac_t""no" 1>&6
7432 fi
7433
7434
7435                 if test $ol_link_threads = no ; then
7436                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7437 echo "configure:7438: checking for cthread_fork with -all_load" >&5
7438 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7439   echo $ac_n "(cached) $ac_c" 1>&6
7440 else
7441   
7442                                                                 save_LIBS="$LIBS"
7443                                 LIBS="-all_load $LIBS"
7444                                 cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447 #include <mach/cthreads.h>
7448 int main() {
7449
7450                                         cthread_fork((void *)0, (void *)0);
7451                                         
7452 ; return 0; }
7453 EOF
7454 if { (eval echo configure:7455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7455   rm -rf conftest*
7456   ol_cv_cthread_all_load=yes
7457 else
7458   echo "configure: failed program was:" >&5
7459   cat conftest.$ac_ext >&5
7460   rm -rf conftest*
7461   ol_cv_cthread_all_load=no
7462 fi
7463 rm -f conftest*
7464                                                                 LIBS="$save_LIBS"
7465                         
7466 fi
7467
7468 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7469
7470                         if test $ol_cv_cthread_all_load = yes ; then
7471                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7472                                 ol_link_threads=mach
7473                         fi
7474                 fi
7475
7476                 if test $ol_link_threads != no ; then
7477                         : check for cthread specific functionality here
7478                         cat >> confdefs.h <<\EOF
7479 #define HAVE_MACH_CTHREADS 1
7480 EOF
7481
7482                 else
7483                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7484                 fi
7485         fi
7486
7487         if test $ol_with_threads = mach ; then
7488                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7489         fi
7490 fi
7491
7492 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7493         -o $ol_with_threads = lwp ; then
7494
7495                 for ac_hdr in thread.h synch.h
7496 do
7497 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7498 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7499 echo "configure:7500: checking for $ac_hdr" >&5
7500 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7501   echo $ac_n "(cached) $ac_c" 1>&6
7502 else
7503   cat > conftest.$ac_ext <<EOF
7504 #line 7505 "configure"
7505 #include "confdefs.h"
7506 #include <$ac_hdr>
7507 EOF
7508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7509 { (eval echo configure:7510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7511 if test -z "$ac_err"; then
7512   rm -rf conftest*
7513   eval "ac_cv_header_$ac_safe=yes"
7514 else
7515   echo "$ac_err" >&5
7516   echo "configure: failed program was:" >&5
7517   cat conftest.$ac_ext >&5
7518   rm -rf conftest*
7519   eval "ac_cv_header_$ac_safe=no"
7520 fi
7521 rm -f conftest*
7522 fi
7523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7524   echo "$ac_t""yes" 1>&6
7525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7526   cat >> confdefs.h <<EOF
7527 #define $ac_tr_hdr 1
7528 EOF
7529  
7530 else
7531   echo "$ac_t""no" 1>&6
7532 fi
7533 done
7534
7535         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7536                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7537 echo "configure:7538: checking for thr_create in -lthread" >&5
7538 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
7539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7540   echo $ac_n "(cached) $ac_c" 1>&6
7541 else
7542   ac_save_LIBS="$LIBS"
7543 LIBS="-lthread  $LIBS"
7544 cat > conftest.$ac_ext <<EOF
7545 #line 7546 "configure"
7546 #include "confdefs.h"
7547 /* Override any gcc2 internal prototype to avoid an error.  */
7548 /* We use char because int might match the return type of a gcc2
7549     builtin and then its argument prototype would still apply.  */
7550 char thr_create();
7551
7552 int main() {
7553 thr_create()
7554 ; return 0; }
7555 EOF
7556 if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7557   rm -rf conftest*
7558   eval "ac_cv_lib_$ac_lib_var=yes"
7559 else
7560   echo "configure: failed program was:" >&5
7561   cat conftest.$ac_ext >&5
7562   rm -rf conftest*
7563   eval "ac_cv_lib_$ac_lib_var=no"
7564 fi
7565 rm -f conftest*
7566 LIBS="$ac_save_LIBS"
7567
7568 fi
7569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7570   echo "$ac_t""yes" 1>&6
7571   have_thr=yes
7572 else
7573   echo "$ac_t""no" 1>&6
7574 have_thr=no
7575 fi
7576
7577
7578                 if test $have_thr = yes ; then
7579                         cat >> confdefs.h <<\EOF
7580 #define HAVE_THR 1
7581 EOF
7582
7583                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7584                         ol_link_threads=thr
7585
7586                         if test $ol_with_yielding_select = auto ; then
7587                                 ol_with_yielding_select=yes
7588                         fi
7589
7590                                                 for ac_func in \
7591                                 thr_setconcurrency \
7592                                 thr_getconcurrency \
7593                         
7594 do
7595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7596 echo "configure:7597: checking for $ac_func" >&5
7597 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7598   echo $ac_n "(cached) $ac_c" 1>&6
7599 else
7600   cat > conftest.$ac_ext <<EOF
7601 #line 7602 "configure"
7602 #include "confdefs.h"
7603 /* System header to define __stub macros and hopefully few prototypes,
7604     which can conflict with char $ac_func(); below.  */
7605 #include <assert.h>
7606 /* Override any gcc2 internal prototype to avoid an error.  */
7607 /* We use char because int might match the return type of a gcc2
7608     builtin and then its argument prototype would still apply.  */
7609 char $ac_func();
7610 char (*f)();
7611
7612 int main() {
7613
7614 /* The GNU C library defines this for functions which it implements
7615     to always fail with ENOSYS.  Some functions are actually named
7616     something starting with __ and the normal name is an alias.  */
7617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7618 choke me
7619 #else
7620 f = $ac_func;
7621 #endif
7622
7623 ; return 0; }
7624 EOF
7625 if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7626   rm -rf conftest*
7627   eval "ac_cv_func_$ac_func=yes"
7628 else
7629   echo "configure: failed program was:" >&5
7630   cat conftest.$ac_ext >&5
7631   rm -rf conftest*
7632   eval "ac_cv_func_$ac_func=no"
7633 fi
7634 rm -f conftest*
7635 fi
7636
7637 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7638   echo "$ac_t""yes" 1>&6
7639     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7640   cat >> confdefs.h <<EOF
7641 #define $ac_tr_func 1
7642 EOF
7643  
7644 else
7645   echo "$ac_t""no" 1>&6
7646 fi
7647 done
7648
7649                 fi
7650         fi
7651
7652                 for ac_hdr in lwp/lwp.h
7653 do
7654 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7655 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7656 echo "configure:7657: checking for $ac_hdr" >&5
7657 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7658   echo $ac_n "(cached) $ac_c" 1>&6
7659 else
7660   cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 #include <$ac_hdr>
7664 EOF
7665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7666 { (eval echo configure:7667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7668 if test -z "$ac_err"; then
7669   rm -rf conftest*
7670   eval "ac_cv_header_$ac_safe=yes"
7671 else
7672   echo "$ac_err" >&5
7673   echo "configure: failed program was:" >&5
7674   cat conftest.$ac_ext >&5
7675   rm -rf conftest*
7676   eval "ac_cv_header_$ac_safe=no"
7677 fi
7678 rm -f conftest*
7679 fi
7680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7681   echo "$ac_t""yes" 1>&6
7682     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7683   cat >> confdefs.h <<EOF
7684 #define $ac_tr_hdr 1
7685 EOF
7686  
7687 else
7688   echo "$ac_t""no" 1>&6
7689 fi
7690 done
7691
7692         if test $ac_cv_header_lwp_lwp_h = yes ; then
7693                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7694 echo "configure:7695: checking for lwp_create in -llwp" >&5
7695 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
7696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7697   echo $ac_n "(cached) $ac_c" 1>&6
7698 else
7699   ac_save_LIBS="$LIBS"
7700 LIBS="-llwp  $LIBS"
7701 cat > conftest.$ac_ext <<EOF
7702 #line 7703 "configure"
7703 #include "confdefs.h"
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 /* We use char because int might match the return type of a gcc2
7706     builtin and then its argument prototype would still apply.  */
7707 char lwp_create();
7708
7709 int main() {
7710 lwp_create()
7711 ; return 0; }
7712 EOF
7713 if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7714   rm -rf conftest*
7715   eval "ac_cv_lib_$ac_lib_var=yes"
7716 else
7717   echo "configure: failed program was:" >&5
7718   cat conftest.$ac_ext >&5
7719   rm -rf conftest*
7720   eval "ac_cv_lib_$ac_lib_var=no"
7721 fi
7722 rm -f conftest*
7723 LIBS="$ac_save_LIBS"
7724
7725 fi
7726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7727   echo "$ac_t""yes" 1>&6
7728   have_lwp=yes
7729 else
7730   echo "$ac_t""no" 1>&6
7731 have_lwp=no
7732 fi
7733
7734
7735                 if test $have_lwp = yes ; then
7736                         cat >> confdefs.h <<\EOF
7737 #define HAVE_LWP 1
7738 EOF
7739
7740                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7741                         ol_link_threads=lwp
7742
7743                         if test $ol_with_yielding_select = auto ; then
7744                                 ol_with_yielding_select=no
7745                         fi
7746                 fi
7747         fi
7748 fi
7749
7750 if test $ol_with_yielding_select = yes ; then
7751         cat >> confdefs.h <<\EOF
7752 #define HAVE_YIELDING_SELECT 1
7753 EOF
7754
7755 fi
7756
7757 if test $ol_with_threads = manual ; then
7758                 ol_link_threads=yes
7759
7760         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7761
7762         for ac_hdr in pthread.h sched.h
7763 do
7764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7766 echo "configure:7767: checking for $ac_hdr" >&5
7767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7768   echo $ac_n "(cached) $ac_c" 1>&6
7769 else
7770   cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 #include <$ac_hdr>
7774 EOF
7775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7776 { (eval echo configure:7777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7778 if test -z "$ac_err"; then
7779   rm -rf conftest*
7780   eval "ac_cv_header_$ac_safe=yes"
7781 else
7782   echo "$ac_err" >&5
7783   echo "configure: failed program was:" >&5
7784   cat conftest.$ac_ext >&5
7785   rm -rf conftest*
7786   eval "ac_cv_header_$ac_safe=no"
7787 fi
7788 rm -f conftest*
7789 fi
7790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7791   echo "$ac_t""yes" 1>&6
7792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7793   cat >> confdefs.h <<EOF
7794 #define $ac_tr_hdr 1
7795 EOF
7796  
7797 else
7798   echo "$ac_t""no" 1>&6
7799 fi
7800 done
7801
7802         for ac_func in sched_yield pthread_yield
7803 do
7804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7805 echo "configure:7806: checking for $ac_func" >&5
7806 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7807   echo $ac_n "(cached) $ac_c" 1>&6
7808 else
7809   cat > conftest.$ac_ext <<EOF
7810 #line 7811 "configure"
7811 #include "confdefs.h"
7812 /* System header to define __stub macros and hopefully few prototypes,
7813     which can conflict with char $ac_func(); below.  */
7814 #include <assert.h>
7815 /* Override any gcc2 internal prototype to avoid an error.  */
7816 /* We use char because int might match the return type of a gcc2
7817     builtin and then its argument prototype would still apply.  */
7818 char $ac_func();
7819 char (*f)();
7820
7821 int main() {
7822
7823 /* The GNU C library defines this for functions which it implements
7824     to always fail with ENOSYS.  Some functions are actually named
7825     something starting with __ and the normal name is an alias.  */
7826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7827 choke me
7828 #else
7829 f = $ac_func;
7830 #endif
7831
7832 ; return 0; }
7833 EOF
7834 if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7835   rm -rf conftest*
7836   eval "ac_cv_func_$ac_func=yes"
7837 else
7838   echo "configure: failed program was:" >&5
7839   cat conftest.$ac_ext >&5
7840   rm -rf conftest*
7841   eval "ac_cv_func_$ac_func=no"
7842 fi
7843 rm -f conftest*
7844 fi
7845
7846 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7847   echo "$ac_t""yes" 1>&6
7848     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7849   cat >> confdefs.h <<EOF
7850 #define $ac_tr_func 1
7851 EOF
7852  
7853 else
7854   echo "$ac_t""no" 1>&6
7855 fi
7856 done
7857
7858         
7859         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7860 echo "configure:7861: checking for LinuxThreads pthread.h" >&5
7861 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7862   echo $ac_n "(cached) $ac_c" 1>&6
7863 else
7864   cat > conftest.$ac_ext <<EOF
7865 #line 7866 "configure"
7866 #include "confdefs.h"
7867 #include <pthread.h>
7868 EOF
7869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7870   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7871   rm -rf conftest*
7872   ol_cv_header_linux_threads=yes
7873 else
7874   rm -rf conftest*
7875   ol_cv_header_linux_threads=no
7876 fi
7877 rm -f conftest*
7878
7879                 
7880 fi
7881
7882 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7883         if test $ol_cv_header_linux_threads = yes; then
7884                 cat >> confdefs.h <<\EOF
7885 #define HAVE_LINUX_THREADS 1
7886 EOF
7887
7888         fi
7889
7890
7891         for ac_hdr in mach/cthreads.h
7892 do
7893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7895 echo "configure:7896: checking for $ac_hdr" >&5
7896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7897   echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899   cat > conftest.$ac_ext <<EOF
7900 #line 7901 "configure"
7901 #include "confdefs.h"
7902 #include <$ac_hdr>
7903 EOF
7904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7905 { (eval echo configure:7906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7907 if test -z "$ac_err"; then
7908   rm -rf conftest*
7909   eval "ac_cv_header_$ac_safe=yes"
7910 else
7911   echo "$ac_err" >&5
7912   echo "configure: failed program was:" >&5
7913   cat conftest.$ac_ext >&5
7914   rm -rf conftest*
7915   eval "ac_cv_header_$ac_safe=no"
7916 fi
7917 rm -f conftest*
7918 fi
7919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7920   echo "$ac_t""yes" 1>&6
7921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7922   cat >> confdefs.h <<EOF
7923 #define $ac_tr_hdr 1
7924 EOF
7925  
7926 else
7927   echo "$ac_t""no" 1>&6
7928 fi
7929 done
7930
7931         for ac_hdr in lwp/lwp.h
7932 do
7933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7935 echo "configure:7936: checking for $ac_hdr" >&5
7936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7937   echo $ac_n "(cached) $ac_c" 1>&6
7938 else
7939   cat > conftest.$ac_ext <<EOF
7940 #line 7941 "configure"
7941 #include "confdefs.h"
7942 #include <$ac_hdr>
7943 EOF
7944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7945 { (eval echo configure:7946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7947 if test -z "$ac_err"; then
7948   rm -rf conftest*
7949   eval "ac_cv_header_$ac_safe=yes"
7950 else
7951   echo "$ac_err" >&5
7952   echo "configure: failed program was:" >&5
7953   cat conftest.$ac_ext >&5
7954   rm -rf conftest*
7955   eval "ac_cv_header_$ac_safe=no"
7956 fi
7957 rm -f conftest*
7958 fi
7959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7960   echo "$ac_t""yes" 1>&6
7961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7962   cat >> confdefs.h <<EOF
7963 #define $ac_tr_hdr 1
7964 EOF
7965  
7966 else
7967   echo "$ac_t""no" 1>&6
7968 fi
7969 done
7970
7971         for ac_hdr in thread.h synch.h
7972 do
7973 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7974 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7975 echo "configure:7976: checking for $ac_hdr" >&5
7976 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7977   echo $ac_n "(cached) $ac_c" 1>&6
7978 else
7979   cat > conftest.$ac_ext <<EOF
7980 #line 7981 "configure"
7981 #include "confdefs.h"
7982 #include <$ac_hdr>
7983 EOF
7984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7985 { (eval echo configure:7986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7987 if test -z "$ac_err"; then
7988   rm -rf conftest*
7989   eval "ac_cv_header_$ac_safe=yes"
7990 else
7991   echo "$ac_err" >&5
7992   echo "configure: failed program was:" >&5
7993   cat conftest.$ac_ext >&5
7994   rm -rf conftest*
7995   eval "ac_cv_header_$ac_safe=no"
7996 fi
7997 rm -f conftest*
7998 fi
7999 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8000   echo "$ac_t""yes" 1>&6
8001     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8002   cat >> confdefs.h <<EOF
8003 #define $ac_tr_hdr 1
8004 EOF
8005  
8006 else
8007   echo "$ac_t""no" 1>&6
8008 fi
8009 done
8010
8011 fi
8012
8013 if test $ol_link_threads != no ; then  
8014                         cat >> confdefs.h <<\EOF
8015 #define REENTRANT 1
8016 EOF
8017
8018         cat >> confdefs.h <<\EOF
8019 #define _REENTRANT 1
8020 EOF
8021
8022         cat >> confdefs.h <<\EOF
8023 #define THREAD_SAFE 1
8024 EOF
8025
8026         cat >> confdefs.h <<\EOF
8027 #define _THREAD_SAFE 1
8028 EOF
8029
8030         cat >> confdefs.h <<\EOF
8031 #define THREADSAFE 1
8032 EOF
8033
8034         cat >> confdefs.h <<\EOF
8035 #define _THREADSAFE 1
8036 EOF
8037
8038         cat >> confdefs.h <<\EOF
8039 #define _SGI_MP_SOURCE 1
8040 EOF
8041
8042
8043                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8044 echo "configure:8045: checking for thread specific errno" >&5
8045 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8046   echo $ac_n "(cached) $ac_c" 1>&6
8047 else
8048   
8049                 cat > conftest.$ac_ext <<EOF
8050 #line 8051 "configure"
8051 #include "confdefs.h"
8052 #include <errno.h>
8053 int main() {
8054 errno = 0;
8055 ; return 0; }
8056 EOF
8057 if { (eval echo configure:8058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8058   rm -rf conftest*
8059   ol_cv_errno_thread_specific=yes
8060 else
8061   echo "configure: failed program was:" >&5
8062   cat conftest.$ac_ext >&5
8063   rm -rf conftest*
8064   ol_cv_errno_thread_specific=no
8065 fi
8066 rm -f conftest*
8067         
8068 fi
8069
8070 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8071
8072                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8073 echo "configure:8074: checking for thread specific h_errno" >&5
8074 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8075   echo $ac_n "(cached) $ac_c" 1>&6
8076 else
8077   
8078                 cat > conftest.$ac_ext <<EOF
8079 #line 8080 "configure"
8080 #include "confdefs.h"
8081 #include <netdb.h>
8082 int main() {
8083 h_errno = 0;
8084 ; return 0; }
8085 EOF
8086 if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8087   rm -rf conftest*
8088   ol_cv_h_errno_thread_specific=yes
8089 else
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   ol_cv_h_errno_thread_specific=no
8094 fi
8095 rm -f conftest*
8096         
8097 fi
8098
8099 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8100
8101         if test $ol_cv_errno_thread_specific != yes \
8102                 -o $ol_cv_h_errno_thread_specific != yes ; then
8103                 LIBS="$LTHREAD_LIBS $LIBS"
8104                 LTHREAD_LIBS=""
8105         fi
8106
8107 fi  
8108
8109 if test $ol_link_threads = no ; then
8110         if test $ol_with_threads = yes ; then
8111                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8112         fi
8113
8114         if test $ol_with_threads = auto ; then
8115                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8116                 ol_with_threads=no
8117         fi
8118
8119         cat >> confdefs.h <<\EOF
8120 #define NO_THREADS 1
8121 EOF
8122
8123         LTHREAD_LIBS=""
8124 fi
8125
8126 if test $ol_link_threads != no ; then
8127         cat >> confdefs.h <<\EOF
8128 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8129 EOF
8130
8131 fi
8132
8133
8134 ol_link_ldbm=no 
8135 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8136         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8137 echo "configure:8138: checking for DB2 library" >&5
8138 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8139   echo $ac_n "(cached) $ac_c" 1>&6
8140 else
8141         ol_LIBS="$LIBS"
8142         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8143 echo "configure:8144: checking for db_open in -ldb" >&5
8144 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8145 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   ac_save_LIBS="$LIBS"
8149 LIBS="-ldb  $LIBS"
8150 cat > conftest.$ac_ext <<EOF
8151 #line 8152 "configure"
8152 #include "confdefs.h"
8153 /* Override any gcc2 internal prototype to avoid an error.  */
8154 /* We use char because int might match the return type of a gcc2
8155     builtin and then its argument prototype would still apply.  */
8156 char db_open();
8157
8158 int main() {
8159 db_open()
8160 ; return 0; }
8161 EOF
8162 if { (eval echo configure:8163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8163   rm -rf conftest*
8164   eval "ac_cv_lib_$ac_lib_var=yes"
8165 else
8166   echo "configure: failed program was:" >&5
8167   cat conftest.$ac_ext >&5
8168   rm -rf conftest*
8169   eval "ac_cv_lib_$ac_lib_var=no"
8170 fi
8171 rm -f conftest*
8172 LIBS="$ac_save_LIBS"
8173
8174 fi
8175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8176   echo "$ac_t""yes" 1>&6
8177   ol_cv_lib_db2=-ldb
8178 else
8179   echo "$ac_t""no" 1>&6
8180 ol_cv_lib_db2=no
8181 fi
8182
8183         LIBS="$ol_LIBS"
8184
8185 fi
8186
8187 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8188
8189 for ac_hdr in db.h
8190 do
8191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8193 echo "configure:8194: checking for $ac_hdr" >&5
8194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8195   echo $ac_n "(cached) $ac_c" 1>&6
8196 else
8197   cat > conftest.$ac_ext <<EOF
8198 #line 8199 "configure"
8199 #include "confdefs.h"
8200 #include <$ac_hdr>
8201 EOF
8202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8203 { (eval echo configure:8204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8205 if test -z "$ac_err"; then
8206   rm -rf conftest*
8207   eval "ac_cv_header_$ac_safe=yes"
8208 else
8209   echo "$ac_err" >&5
8210   echo "configure: failed program was:" >&5
8211   cat conftest.$ac_ext >&5
8212   rm -rf conftest*
8213   eval "ac_cv_header_$ac_safe=no"
8214 fi
8215 rm -f conftest*
8216 fi
8217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8218   echo "$ac_t""yes" 1>&6
8219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8220   cat >> confdefs.h <<EOF
8221 #define $ac_tr_hdr 1
8222 EOF
8223  
8224 else
8225   echo "$ac_t""no" 1>&6
8226 fi
8227 done
8228
8229 if test $ac_cv_header_db_h = yes ; then
8230         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8231 echo "configure:8232: checking if db.h is DB2" >&5
8232 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8233   echo $ac_n "(cached) $ac_c" 1>&6
8234 else
8235   
8236                 cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239
8240 #                       include <db.h>
8241                         /* this check could be improved */
8242 #                       ifdef DB_VERSION_MAJOR
8243 #                               if DB_VERSION_MAJOR == 2
8244                                         __db_version_2
8245 #                               endif
8246 #                       endif
8247                 
8248 EOF
8249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8250   egrep "__db_version_2" >/dev/null 2>&1; then
8251   rm -rf conftest*
8252   ol_cv_header_db2=yes
8253 else
8254   rm -rf conftest*
8255   ol_cv_header_db2=no
8256 fi
8257 rm -f conftest*
8258
8259 fi
8260
8261 echo "$ac_t""$ol_cv_header_db2" 1>&6
8262 else
8263         ol_cv_header_db2=no
8264 fi
8265
8266
8267  
8268  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8269 echo "configure:8270: checking for Berkeley DB2" >&5
8270 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8271   echo $ac_n "(cached) $ac_c" 1>&6
8272 else
8273   
8274         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8275                 ol_cv_berkeley_db2=no
8276         else
8277                 ol_cv_berkeley_db2=yes
8278         fi
8279
8280 fi
8281
8282 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8283  if test $ol_cv_berkeley_db2 = yes ; then
8284         cat >> confdefs.h <<\EOF
8285 #define HAVE_BERKELEY_DB2 1
8286 EOF
8287
8288  fi
8289
8290
8291         if test $ol_cv_berkeley_db2 = yes ; then
8292                 ol_link_ldbm=db2
8293                 ol_with_ldbm_api=db2
8294
8295                 if test $ol_with_ldbm_type = hash ; then
8296                         cat >> confdefs.h <<\EOF
8297 #define LDBM_USE_DBHASH 1
8298 EOF
8299
8300                 else
8301                         cat >> confdefs.h <<\EOF
8302 #define LDBM_USE_DBBTREE 1
8303 EOF
8304
8305                 fi
8306
8307                                                 if test $ol_cv_lib_db2 != yes ; then
8308                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8309                 fi
8310         fi
8311 fi
8312
8313 ol_link_bdb2=no
8314 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8315         ol_link_bdb2=yes
8316 fi
8317
8318 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8319         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8320 echo "configure:8321: checking for Berkeley DB library" >&5
8321 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   
8325         for ac_hdr in db1/db.h
8326 do
8327 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8328 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8329 echo "configure:8330: checking for $ac_hdr" >&5
8330 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 #include <$ac_hdr>
8337 EOF
8338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8339 { (eval echo configure:8340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8341 if test -z "$ac_err"; then
8342   rm -rf conftest*
8343   eval "ac_cv_header_$ac_safe=yes"
8344 else
8345   echo "$ac_err" >&5
8346   echo "configure: failed program was:" >&5
8347   cat conftest.$ac_ext >&5
8348   rm -rf conftest*
8349   eval "ac_cv_header_$ac_safe=no"
8350 fi
8351 rm -f conftest*
8352 fi
8353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8354   echo "$ac_t""yes" 1>&6
8355     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8356   cat >> confdefs.h <<EOF
8357 #define $ac_tr_hdr 1
8358 EOF
8359  
8360 else
8361   echo "$ac_t""no" 1>&6
8362 fi
8363 done
8364
8365         ol_LIBS="$LIBS"
8366         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8367 echo "configure:8368: checking for dbopen" >&5
8368 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8369   echo $ac_n "(cached) $ac_c" 1>&6
8370 else
8371   cat > conftest.$ac_ext <<EOF
8372 #line 8373 "configure"
8373 #include "confdefs.h"
8374 /* System header to define __stub macros and hopefully few prototypes,
8375     which can conflict with char dbopen(); below.  */
8376 #include <assert.h>
8377 /* Override any gcc2 internal prototype to avoid an error.  */
8378 /* We use char because int might match the return type of a gcc2
8379     builtin and then its argument prototype would still apply.  */
8380 char dbopen();
8381 char (*f)();
8382
8383 int main() {
8384
8385 /* The GNU C library defines this for functions which it implements
8386     to always fail with ENOSYS.  Some functions are actually named
8387     something starting with __ and the normal name is an alias.  */
8388 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8389 choke me
8390 #else
8391 f = dbopen;
8392 #endif
8393
8394 ; return 0; }
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397   rm -rf conftest*
8398   eval "ac_cv_func_dbopen=yes"
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   eval "ac_cv_func_dbopen=no"
8404 fi
8405 rm -f conftest*
8406 fi
8407
8408 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8409   echo "$ac_t""yes" 1>&6
8410   ol_cv_lib_db=yes
8411 else
8412   echo "$ac_t""no" 1>&6
8413
8414                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8415 echo "configure:8416: checking for dbopen in -ldb1" >&5
8416 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8417 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8418   echo $ac_n "(cached) $ac_c" 1>&6
8419 else
8420   ac_save_LIBS="$LIBS"
8421 LIBS="-ldb1  $LIBS"
8422 cat > conftest.$ac_ext <<EOF
8423 #line 8424 "configure"
8424 #include "confdefs.h"
8425 /* Override any gcc2 internal prototype to avoid an error.  */
8426 /* We use char because int might match the return type of a gcc2
8427     builtin and then its argument prototype would still apply.  */
8428 char dbopen();
8429
8430 int main() {
8431 dbopen()
8432 ; return 0; }
8433 EOF
8434 if { (eval echo configure:8435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8435   rm -rf conftest*
8436   eval "ac_cv_lib_$ac_lib_var=yes"
8437 else
8438   echo "configure: failed program was:" >&5
8439   cat conftest.$ac_ext >&5
8440   rm -rf conftest*
8441   eval "ac_cv_lib_$ac_lib_var=no"
8442 fi
8443 rm -f conftest*
8444 LIBS="$ac_save_LIBS"
8445
8446 fi
8447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8448   echo "$ac_t""yes" 1>&6
8449   ol_cv_lib_db=-ldb1
8450 else
8451   echo "$ac_t""no" 1>&6
8452
8453                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8454 echo "configure:8455: checking for dbopen in -ldb" >&5
8455 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
8456 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8457   echo $ac_n "(cached) $ac_c" 1>&6
8458 else
8459   ac_save_LIBS="$LIBS"
8460 LIBS="-ldb  $LIBS"
8461 cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 /* Override any gcc2 internal prototype to avoid an error.  */
8465 /* We use char because int might match the return type of a gcc2
8466     builtin and then its argument prototype would still apply.  */
8467 char dbopen();
8468
8469 int main() {
8470 dbopen()
8471 ; return 0; }
8472 EOF
8473 if { (eval echo configure:8474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8474   rm -rf conftest*
8475   eval "ac_cv_lib_$ac_lib_var=yes"
8476 else
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   eval "ac_cv_lib_$ac_lib_var=no"
8481 fi
8482 rm -f conftest*
8483 LIBS="$ac_save_LIBS"
8484
8485 fi
8486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8487   echo "$ac_t""yes" 1>&6
8488   ol_cv_lib_db=-ldb
8489 else
8490   echo "$ac_t""no" 1>&6
8491 ol_cv_lib_db=no
8492 fi
8493
8494                 
8495 fi
8496
8497         
8498 fi
8499
8500         LIBS="$ol_LIBS"
8501
8502 fi
8503
8504 echo "$ac_t""$ol_cv_lib_db" 1>&6
8505
8506
8507 for ac_hdr in db_185.h
8508 do
8509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8511 echo "configure:8512: checking for $ac_hdr" >&5
8512 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8513   echo $ac_n "(cached) $ac_c" 1>&6
8514 else
8515   cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 #include <$ac_hdr>
8519 EOF
8520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8521 { (eval echo configure:8522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8523 if test -z "$ac_err"; then
8524   rm -rf conftest*
8525   eval "ac_cv_header_$ac_safe=yes"
8526 else
8527   echo "$ac_err" >&5
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -rf conftest*
8531   eval "ac_cv_header_$ac_safe=no"
8532 fi
8533 rm -f conftest*
8534 fi
8535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8536   echo "$ac_t""yes" 1>&6
8537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8538   cat >> confdefs.h <<EOF
8539 #define $ac_tr_hdr 1
8540 EOF
8541  
8542 else
8543   echo "$ac_t""no" 1>&6
8544 fi
8545 done
8546
8547 if test "$ol_cv_header_db2" = yes ; then
8548         
8549         ol_cv_header_db=$ac_cv_header_db_185_h
8550 else
8551         ol_cv_header_db=$ac_cv_header_db_h
8552 fi
8553
8554
8555  
8556  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8557 echo "configure:8558: checking for Berkeley DB" >&5
8558 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
8559   echo $ac_n "(cached) $ac_c" 1>&6
8560 else
8561   
8562         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8563                 ol_cv_berkeley_db=no
8564         else
8565                 ol_cv_berkeley_db=yes
8566         fi
8567
8568 fi
8569
8570 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8571  if test $ol_cv_berkeley_db = yes ; then
8572         cat >> confdefs.h <<\EOF
8573 #define HAVE_BERKELEY_DB 1
8574 EOF
8575
8576  fi
8577
8578
8579         if test $ol_cv_berkeley_db = yes ; then
8580                 ol_link_ldbm=db
8581                 ol_with_ldbm_api=db
8582
8583                 if test $ol_with_ldbm_type = hash ; then
8584                         cat >> confdefs.h <<\EOF
8585 #define LDBM_USE_DBHASH 1
8586 EOF
8587
8588                 else
8589                         cat >> confdefs.h <<\EOF
8590 #define LDBM_USE_DBBTREE 1
8591 EOF
8592
8593                 fi
8594
8595                                                 if test $ol_cv_lib_db != yes ; then
8596                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8597                 fi
8598         fi
8599 fi
8600
8601 if test $ol_with_ldbm_api = manual ; then
8602                 ol_link_ldbm=yes
8603
8604         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8605
8606         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8607 do
8608 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8609 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8610 echo "configure:8611: checking for $ac_hdr" >&5
8611 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8612   echo $ac_n "(cached) $ac_c" 1>&6
8613 else
8614   cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617 #include <$ac_hdr>
8618 EOF
8619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8620 { (eval echo configure:8621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8622 if test -z "$ac_err"; then
8623   rm -rf conftest*
8624   eval "ac_cv_header_$ac_safe=yes"
8625 else
8626   echo "$ac_err" >&5
8627   echo "configure: failed program was:" >&5
8628   cat conftest.$ac_ext >&5
8629   rm -rf conftest*
8630   eval "ac_cv_header_$ac_safe=no"
8631 fi
8632 rm -f conftest*
8633 fi
8634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8635   echo "$ac_t""yes" 1>&6
8636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8637   cat >> confdefs.h <<EOF
8638 #define $ac_tr_hdr 1
8639 EOF
8640  
8641 else
8642   echo "$ac_t""no" 1>&6
8643 fi
8644 done
8645
8646 fi
8647
8648 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8649         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8650         ol_with_ldbm_api=none
8651 fi
8652
8653 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8654         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8655 echo "configure:8656: checking for MDBM library" >&5
8656 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
8657   echo $ac_n "(cached) $ac_c" 1>&6
8658 else
8659         ol_LIBS="$LIBS"
8660         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8661 echo "configure:8662: checking for mdbm_set_chain" >&5
8662 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
8663   echo $ac_n "(cached) $ac_c" 1>&6
8664 else
8665   cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 /* System header to define __stub macros and hopefully few prototypes,
8669     which can conflict with char mdbm_set_chain(); below.  */
8670 #include <assert.h>
8671 /* Override any gcc2 internal prototype to avoid an error.  */
8672 /* We use char because int might match the return type of a gcc2
8673     builtin and then its argument prototype would still apply.  */
8674 char mdbm_set_chain();
8675 char (*f)();
8676
8677 int main() {
8678
8679 /* The GNU C library defines this for functions which it implements
8680     to always fail with ENOSYS.  Some functions are actually named
8681     something starting with __ and the normal name is an alias.  */
8682 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8683 choke me
8684 #else
8685 f = mdbm_set_chain;
8686 #endif
8687
8688 ; return 0; }
8689 EOF
8690 if { (eval echo configure:8691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8691   rm -rf conftest*
8692   eval "ac_cv_func_mdbm_set_chain=yes"
8693 else
8694   echo "configure: failed program was:" >&5
8695   cat conftest.$ac_ext >&5
8696   rm -rf conftest*
8697   eval "ac_cv_func_mdbm_set_chain=no"
8698 fi
8699 rm -f conftest*
8700 fi
8701
8702 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8703   echo "$ac_t""yes" 1>&6
8704   ol_cv_lib_mdbm=yes
8705 else
8706   echo "$ac_t""no" 1>&6
8707
8708                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8709 echo "configure:8710: checking for mdbm_set_chain in -lmdbm" >&5
8710 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
8711 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8712   echo $ac_n "(cached) $ac_c" 1>&6
8713 else
8714   ac_save_LIBS="$LIBS"
8715 LIBS="-lmdbm  $LIBS"
8716 cat > conftest.$ac_ext <<EOF
8717 #line 8718 "configure"
8718 #include "confdefs.h"
8719 /* Override any gcc2 internal prototype to avoid an error.  */
8720 /* We use char because int might match the return type of a gcc2
8721     builtin and then its argument prototype would still apply.  */
8722 char mdbm_set_chain();
8723
8724 int main() {
8725 mdbm_set_chain()
8726 ; return 0; }
8727 EOF
8728 if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8729   rm -rf conftest*
8730   eval "ac_cv_lib_$ac_lib_var=yes"
8731 else
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   eval "ac_cv_lib_$ac_lib_var=no"
8736 fi
8737 rm -f conftest*
8738 LIBS="$ac_save_LIBS"
8739
8740 fi
8741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8742   echo "$ac_t""yes" 1>&6
8743   ol_cv_lib_mdbm=-lmdbm
8744 else
8745   echo "$ac_t""no" 1>&6
8746 ol_cv_lib_mdbm=no
8747 fi
8748
8749         
8750 fi
8751
8752         LIBS="$ol_LIBS"
8753
8754 fi
8755
8756 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8757
8758
8759  for ac_hdr in mdbm.h
8760 do
8761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8763 echo "configure:8764: checking for $ac_hdr" >&5
8764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8765   echo $ac_n "(cached) $ac_c" 1>&6
8766 else
8767   cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 #include <$ac_hdr>
8771 EOF
8772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8773 { (eval echo configure:8774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8775 if test -z "$ac_err"; then
8776   rm -rf conftest*
8777   eval "ac_cv_header_$ac_safe=yes"
8778 else
8779   echo "$ac_err" >&5
8780   echo "configure: failed program was:" >&5
8781   cat conftest.$ac_ext >&5
8782   rm -rf conftest*
8783   eval "ac_cv_header_$ac_safe=no"
8784 fi
8785 rm -f conftest*
8786 fi
8787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8788   echo "$ac_t""yes" 1>&6
8789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8790   cat >> confdefs.h <<EOF
8791 #define $ac_tr_hdr 1
8792 EOF
8793  
8794 else
8795   echo "$ac_t""no" 1>&6
8796 fi
8797 done
8798
8799  echo $ac_n "checking for db""... $ac_c" 1>&6
8800 echo "configure:8801: checking for db" >&5
8801 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
8802   echo $ac_n "(cached) $ac_c" 1>&6
8803 else
8804   
8805         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8806                 ol_cv_mdbm=no
8807         else
8808                 ol_cv_mdbm=yes
8809         fi
8810
8811 fi
8812
8813 echo "$ac_t""$ol_cv_mdbm" 1>&6
8814  if test $ol_cv_mdbm = yes ; then
8815         cat >> confdefs.h <<\EOF
8816 #define HAVE_MDBM 1
8817 EOF
8818
8819  fi
8820
8821
8822         if test $ol_cv_mdbm = yes ; then
8823                 ol_link_ldbm=mdbm
8824                 ol_with_ldbm_api=mdbm
8825                 if test $ol_cv_lib_mdbm != yes ; then
8826                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8827                 fi
8828         fi
8829 fi
8830
8831 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8832         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8833 echo "configure:8834: checking for GDBM library" >&5
8834 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837         ol_LIBS="$LIBS"
8838         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8839 echo "configure:8840: checking for gdbm_open" >&5
8840 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
8841   echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843   cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 /* System header to define __stub macros and hopefully few prototypes,
8847     which can conflict with char gdbm_open(); below.  */
8848 #include <assert.h>
8849 /* Override any gcc2 internal prototype to avoid an error.  */
8850 /* We use char because int might match the return type of a gcc2
8851     builtin and then its argument prototype would still apply.  */
8852 char gdbm_open();
8853 char (*f)();
8854
8855 int main() {
8856
8857 /* The GNU C library defines this for functions which it implements
8858     to always fail with ENOSYS.  Some functions are actually named
8859     something starting with __ and the normal name is an alias.  */
8860 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8861 choke me
8862 #else
8863 f = gdbm_open;
8864 #endif
8865
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8869   rm -rf conftest*
8870   eval "ac_cv_func_gdbm_open=yes"
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_func_gdbm_open=no"
8876 fi
8877 rm -f conftest*
8878 fi
8879
8880 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8881   echo "$ac_t""yes" 1>&6
8882   ol_cv_lib_gdbm=yes
8883 else
8884   echo "$ac_t""no" 1>&6
8885
8886                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8887 echo "configure:8888: checking for gdbm_open in -lgdbm" >&5
8888 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
8889 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8890   echo $ac_n "(cached) $ac_c" 1>&6
8891 else
8892   ac_save_LIBS="$LIBS"
8893 LIBS="-lgdbm  $LIBS"
8894 cat > conftest.$ac_ext <<EOF
8895 #line 8896 "configure"
8896 #include "confdefs.h"
8897 /* Override any gcc2 internal prototype to avoid an error.  */
8898 /* We use char because int might match the return type of a gcc2
8899     builtin and then its argument prototype would still apply.  */
8900 char gdbm_open();
8901
8902 int main() {
8903 gdbm_open()
8904 ; return 0; }
8905 EOF
8906 if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=yes"
8909 else
8910   echo "configure: failed program was:" >&5
8911   cat conftest.$ac_ext >&5
8912   rm -rf conftest*
8913   eval "ac_cv_lib_$ac_lib_var=no"
8914 fi
8915 rm -f conftest*
8916 LIBS="$ac_save_LIBS"
8917
8918 fi
8919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8920   echo "$ac_t""yes" 1>&6
8921   ol_cv_lib_gdbm=-lgdbm
8922 else
8923   echo "$ac_t""no" 1>&6
8924 ol_cv_lib_gdbm=no
8925 fi
8926
8927         
8928 fi
8929
8930         LIBS="$ol_LIBS"
8931
8932 fi
8933
8934 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8935
8936
8937  for ac_hdr in gdbm.h
8938 do
8939 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8940 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8941 echo "configure:8942: checking for $ac_hdr" >&5
8942 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8943   echo $ac_n "(cached) $ac_c" 1>&6
8944 else
8945   cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8948 #include <$ac_hdr>
8949 EOF
8950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8951 { (eval echo configure:8952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8953 if test -z "$ac_err"; then
8954   rm -rf conftest*
8955   eval "ac_cv_header_$ac_safe=yes"
8956 else
8957   echo "$ac_err" >&5
8958   echo "configure: failed program was:" >&5
8959   cat conftest.$ac_ext >&5
8960   rm -rf conftest*
8961   eval "ac_cv_header_$ac_safe=no"
8962 fi
8963 rm -f conftest*
8964 fi
8965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8966   echo "$ac_t""yes" 1>&6
8967     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8968   cat >> confdefs.h <<EOF
8969 #define $ac_tr_hdr 1
8970 EOF
8971  
8972 else
8973   echo "$ac_t""no" 1>&6
8974 fi
8975 done
8976
8977  echo $ac_n "checking for db""... $ac_c" 1>&6
8978 echo "configure:8979: checking for db" >&5
8979 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
8980   echo $ac_n "(cached) $ac_c" 1>&6
8981 else
8982   
8983         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8984                 ol_cv_gdbm=no
8985         else
8986                 ol_cv_gdbm=yes
8987         fi
8988
8989 fi
8990
8991 echo "$ac_t""$ol_cv_gdbm" 1>&6
8992  if test $ol_cv_gdbm = yes ; then
8993         cat >> confdefs.h <<\EOF
8994 #define HAVE_GDBM 1
8995 EOF
8996
8997  fi
8998
8999
9000         if test $ol_cv_gdbm = yes ; then
9001                 ol_link_ldbm=gdbm
9002                 ol_with_ldbm_api=gdbm
9003
9004                 if test $ol_cv_lib_gdbm != yes ; then
9005                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9006                 fi
9007         fi
9008 fi
9009
9010 if test $ol_with_ldbm_api = auto ; then
9011         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9012 elif test $ol_with_ldbm_api = ndbm ; then
9013         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9014 echo "configure:9015: checking for NDBM library" >&5
9015 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018         ol_LIBS="$LIBS"
9019         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9020 echo "configure:9021: checking for dbm_open" >&5
9021 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 /* System header to define __stub macros and hopefully few prototypes,
9028     which can conflict with char dbm_open(); below.  */
9029 #include <assert.h>
9030 /* Override any gcc2 internal prototype to avoid an error.  */
9031 /* We use char because int might match the return type of a gcc2
9032     builtin and then its argument prototype would still apply.  */
9033 char dbm_open();
9034 char (*f)();
9035
9036 int main() {
9037
9038 /* The GNU C library defines this for functions which it implements
9039     to always fail with ENOSYS.  Some functions are actually named
9040     something starting with __ and the normal name is an alias.  */
9041 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9042 choke me
9043 #else
9044 f = dbm_open;
9045 #endif
9046
9047 ; return 0; }
9048 EOF
9049 if { (eval echo configure:9050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9050   rm -rf conftest*
9051   eval "ac_cv_func_dbm_open=yes"
9052 else
9053   echo "configure: failed program was:" >&5
9054   cat conftest.$ac_ext >&5
9055   rm -rf conftest*
9056   eval "ac_cv_func_dbm_open=no"
9057 fi
9058 rm -f conftest*
9059 fi
9060
9061 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9062   echo "$ac_t""yes" 1>&6
9063   ol_cv_lib_ndbm=yes
9064 else
9065   echo "$ac_t""no" 1>&6
9066
9067                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9068 echo "configure:9069: checking for dbm_open in -lndbm" >&5
9069 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9071   echo $ac_n "(cached) $ac_c" 1>&6
9072 else
9073   ac_save_LIBS="$LIBS"
9074 LIBS="-lndbm  $LIBS"
9075 cat > conftest.$ac_ext <<EOF
9076 #line 9077 "configure"
9077 #include "confdefs.h"
9078 /* Override any gcc2 internal prototype to avoid an error.  */
9079 /* We use char because int might match the return type of a gcc2
9080     builtin and then its argument prototype would still apply.  */
9081 char dbm_open();
9082
9083 int main() {
9084 dbm_open()
9085 ; return 0; }
9086 EOF
9087 if { (eval echo configure:9088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9088   rm -rf conftest*
9089   eval "ac_cv_lib_$ac_lib_var=yes"
9090 else
9091   echo "configure: failed program was:" >&5
9092   cat conftest.$ac_ext >&5
9093   rm -rf conftest*
9094   eval "ac_cv_lib_$ac_lib_var=no"
9095 fi
9096 rm -f conftest*
9097 LIBS="$ac_save_LIBS"
9098
9099 fi
9100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9101   echo "$ac_t""yes" 1>&6
9102   ol_cv_lib_ndbm=-lndbm
9103 else
9104   echo "$ac_t""no" 1>&6
9105
9106                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9107 echo "configure:9108: checking for dbm_open in -ldbm" >&5
9108 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9110   echo $ac_n "(cached) $ac_c" 1>&6
9111 else
9112   ac_save_LIBS="$LIBS"
9113 LIBS="-ldbm  $LIBS"
9114 cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117 /* Override any gcc2 internal prototype to avoid an error.  */
9118 /* We use char because int might match the return type of a gcc2
9119     builtin and then its argument prototype would still apply.  */
9120 char dbm_open();
9121
9122 int main() {
9123 dbm_open()
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   eval "ac_cv_lib_$ac_lib_var=yes"
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   eval "ac_cv_lib_$ac_lib_var=no"
9134 fi
9135 rm -f conftest*
9136 LIBS="$ac_save_LIBS"
9137
9138 fi
9139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9140   echo "$ac_t""yes" 1>&6
9141   ol_cv_lib_ndbm=-ldbm
9142 else
9143   echo "$ac_t""no" 1>&6
9144 ol_cv_lib_ndbm=no
9145 fi
9146                 
9147 fi
9148
9149         
9150 fi
9151
9152         LIBS="$ol_LIBS"
9153
9154 fi
9155
9156 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9157
9158
9159  for ac_hdr in ndbm.h
9160 do
9161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9163 echo "configure:9164: checking for $ac_hdr" >&5
9164 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9165   echo $ac_n "(cached) $ac_c" 1>&6
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 #include <$ac_hdr>
9171 EOF
9172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9173 { (eval echo configure:9174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9175 if test -z "$ac_err"; then
9176   rm -rf conftest*
9177   eval "ac_cv_header_$ac_safe=yes"
9178 else
9179   echo "$ac_err" >&5
9180   echo "configure: failed program was:" >&5
9181   cat conftest.$ac_ext >&5
9182   rm -rf conftest*
9183   eval "ac_cv_header_$ac_safe=no"
9184 fi
9185 rm -f conftest*
9186 fi
9187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9188   echo "$ac_t""yes" 1>&6
9189     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9190   cat >> confdefs.h <<EOF
9191 #define $ac_tr_hdr 1
9192 EOF
9193  
9194 else
9195   echo "$ac_t""no" 1>&6
9196 fi
9197 done
9198
9199  echo $ac_n "checking for db""... $ac_c" 1>&6
9200 echo "configure:9201: checking for db" >&5
9201 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   
9205         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9206                 ol_cv_ndbm=no
9207         else
9208                 ol_cv_ndbm=yes
9209         fi
9210
9211 fi
9212
9213 echo "$ac_t""$ol_cv_ndbm" 1>&6
9214  if test $ol_cv_ndbm = yes ; then
9215         cat >> confdefs.h <<\EOF
9216 #define HAVE_NDBM 1
9217 EOF
9218
9219  fi
9220
9221
9222         if test $ol_cv_ndbm = yes ; then
9223                 ol_link_ldbm=ndbm
9224                 ol_with_ldbm_api=ndbm
9225
9226                 if test $ol_cv_lib_ndbm != yes ; then
9227                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9228                 fi
9229         fi
9230 fi
9231
9232 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9233         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9234         if test $ol_enable_ldbm = yes ; then
9235                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9236         fi
9237
9238         echo "configure: warning: disabling LDBM" 1>&2
9239         ol_enable_ldbm=no
9240 fi
9241
9242 if test $ol_enable_wrappers != no ; then
9243         for ac_hdr in tcpd.h
9244 do
9245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9247 echo "configure:9248: checking for $ac_hdr" >&5
9248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9249   echo $ac_n "(cached) $ac_c" 1>&6
9250 else
9251   cat > conftest.$ac_ext <<EOF
9252 #line 9253 "configure"
9253 #include "confdefs.h"
9254 #include <$ac_hdr>
9255 EOF
9256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9257 { (eval echo configure:9258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9259 if test -z "$ac_err"; then
9260   rm -rf conftest*
9261   eval "ac_cv_header_$ac_safe=yes"
9262 else
9263   echo "$ac_err" >&5
9264   echo "configure: failed program was:" >&5
9265   cat conftest.$ac_ext >&5
9266   rm -rf conftest*
9267   eval "ac_cv_header_$ac_safe=no"
9268 fi
9269 rm -f conftest*
9270 fi
9271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9272   echo "$ac_t""yes" 1>&6
9273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9274   cat >> confdefs.h <<EOF
9275 #define $ac_tr_hdr 1
9276 EOF
9277  
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281 done
9282
9283
9284         if test $ac_cv_header_tcpd_h != yes ; then
9285                 have_wrappers=no
9286         else
9287                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9288 echo "configure:9289: checking for main in -lwrap" >&5
9289 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9291   echo $ac_n "(cached) $ac_c" 1>&6
9292 else
9293   ac_save_LIBS="$LIBS"
9294 LIBS="-lwrap  $LIBS"
9295 cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298
9299 int main() {
9300 main()
9301 ; return 0; }
9302 EOF
9303 if { (eval echo configure:9304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9304   rm -rf conftest*
9305   eval "ac_cv_lib_$ac_lib_var=yes"
9306 else
9307   echo "configure: failed program was:" >&5
9308   cat conftest.$ac_ext >&5
9309   rm -rf conftest*
9310   eval "ac_cv_lib_$ac_lib_var=no"
9311 fi
9312 rm -f conftest*
9313 LIBS="$ac_save_LIBS"
9314
9315 fi
9316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9317   echo "$ac_t""yes" 1>&6
9318   have_wrappers=yes
9319 else
9320   echo "$ac_t""no" 1>&6
9321 have_wrappers=no
9322 fi
9323
9324         fi
9325
9326         if test $have_wrappers = yes ; then
9327                 cat >> confdefs.h <<\EOF
9328 #define HAVE_TCPD 1
9329 EOF
9330
9331                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9332
9333                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9334 echo "configure:9335: checking for main in -lnsl" >&5
9335 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9336 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9337   echo $ac_n "(cached) $ac_c" 1>&6
9338 else
9339   ac_save_LIBS="$LIBS"
9340 LIBS="-lnsl  $LIBS"
9341 cat > conftest.$ac_ext <<EOF
9342 #line 9343 "configure"
9343 #include "confdefs.h"
9344
9345 int main() {
9346 main()
9347 ; return 0; }
9348 EOF
9349 if { (eval echo configure:9350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9350   rm -rf conftest*
9351   eval "ac_cv_lib_$ac_lib_var=yes"
9352 else
9353   echo "configure: failed program was:" >&5
9354   cat conftest.$ac_ext >&5
9355   rm -rf conftest*
9356   eval "ac_cv_lib_$ac_lib_var=no"
9357 fi
9358 rm -f conftest*
9359 LIBS="$ac_save_LIBS"
9360
9361 fi
9362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9363   echo "$ac_t""yes" 1>&6
9364     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9365     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9366   cat >> confdefs.h <<EOF
9367 #define $ac_tr_lib 1
9368 EOF
9369
9370   LIBS="-lnsl $LIBS"
9371
9372 else
9373   echo "$ac_t""no" 1>&6
9374 fi
9375
9376         else
9377                 echo "configure: warning: could not find -lwrap" 1>&2
9378                 if test $ol_enable_wrappers = yes ; then
9379                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9380                 fi
9381
9382                 echo "configure: warning: disabling wrappers support" 1>&2
9383                 ol_enable_wrappers=no
9384         fi
9385 fi
9386
9387 if test $ol_enable_syslog != no ; then
9388         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9389 echo "configure:9390: checking for openlog" >&5
9390 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9391   echo $ac_n "(cached) $ac_c" 1>&6
9392 else
9393   cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9396 /* System header to define __stub macros and hopefully few prototypes,
9397     which can conflict with char openlog(); below.  */
9398 #include <assert.h>
9399 /* Override any gcc2 internal prototype to avoid an error.  */
9400 /* We use char because int might match the return type of a gcc2
9401     builtin and then its argument prototype would still apply.  */
9402 char openlog();
9403 char (*f)();
9404
9405 int main() {
9406
9407 /* The GNU C library defines this for functions which it implements
9408     to always fail with ENOSYS.  Some functions are actually named
9409     something starting with __ and the normal name is an alias.  */
9410 #if defined (__stub_openlog) || defined (__stub___openlog)
9411 choke me
9412 #else
9413 f = openlog;
9414 #endif
9415
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9419   rm -rf conftest*
9420   eval "ac_cv_func_openlog=yes"
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_func_openlog=no"
9426 fi
9427 rm -f conftest*
9428 fi
9429
9430 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9431   echo "$ac_t""yes" 1>&6
9432   :
9433 else
9434   echo "$ac_t""no" 1>&6
9435 fi
9436
9437         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9438                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9439         fi
9440         ol_enable_syslog=$ac_cv_func_openlog
9441 fi
9442
9443 if test $ol_enable_dmalloc != no ; then
9444         for ac_hdr in dmalloc.h
9445 do
9446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9448 echo "configure:9449: checking for $ac_hdr" >&5
9449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9450   echo $ac_n "(cached) $ac_c" 1>&6
9451 else
9452   cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 #include <$ac_hdr>
9456 EOF
9457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9458 { (eval echo configure:9459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9460 if test -z "$ac_err"; then
9461   rm -rf conftest*
9462   eval "ac_cv_header_$ac_safe=yes"
9463 else
9464   echo "$ac_err" >&5
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   eval "ac_cv_header_$ac_safe=no"
9469 fi
9470 rm -f conftest*
9471 fi
9472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9473   echo "$ac_t""yes" 1>&6
9474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9475   cat >> confdefs.h <<EOF
9476 #define $ac_tr_hdr 1
9477 EOF
9478  
9479 else
9480   echo "$ac_t""no" 1>&6
9481 fi
9482 done
9483
9484         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9485 echo "configure:9486: checking for dmalloc_shutdown in -ldmalloc" >&5
9486 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
9487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9488   echo $ac_n "(cached) $ac_c" 1>&6
9489 else
9490   ac_save_LIBS="$LIBS"
9491 LIBS="-ldmalloc  $LIBS"
9492 cat > conftest.$ac_ext <<EOF
9493 #line 9494 "configure"
9494 #include "confdefs.h"
9495 /* Override any gcc2 internal prototype to avoid an error.  */
9496 /* We use char because int might match the return type of a gcc2
9497     builtin and then its argument prototype would still apply.  */
9498 char dmalloc_shutdown();
9499
9500 int main() {
9501 dmalloc_shutdown()
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9505   rm -rf conftest*
9506   eval "ac_cv_lib_$ac_lib_var=yes"
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   eval "ac_cv_lib_$ac_lib_var=no"
9512 fi
9513 rm -f conftest*
9514 LIBS="$ac_save_LIBS"
9515
9516 fi
9517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9518   echo "$ac_t""yes" 1>&6
9519     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9520     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9521   cat >> confdefs.h <<EOF
9522 #define $ac_tr_lib 1
9523 EOF
9524
9525   LIBS="-ldmalloc $LIBS"
9526
9527 else
9528   echo "$ac_t""no" 1>&6
9529 fi
9530
9531 fi
9532
9533 if test $ol_enable_tcl != no ; then
9534         for ac_hdr in tcl.h
9535 do
9536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9538 echo "configure:9539: checking for $ac_hdr" >&5
9539 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542   cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 #include <$ac_hdr>
9546 EOF
9547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9548 { (eval echo configure:9549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9550 if test -z "$ac_err"; then
9551   rm -rf conftest*
9552   eval "ac_cv_header_$ac_safe=yes"
9553 else
9554   echo "$ac_err" >&5
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557   rm -rf conftest*
9558   eval "ac_cv_header_$ac_safe=no"
9559 fi
9560 rm -f conftest*
9561 fi
9562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9563   echo "$ac_t""yes" 1>&6
9564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9565   cat >> confdefs.h <<EOF
9566 #define $ac_tr_hdr 1
9567 EOF
9568  
9569 else
9570   echo "$ac_t""no" 1>&6
9571 fi
9572 done
9573
9574
9575         if test $ac_cv_header_tcl_h != yes ; then
9576                 have_tcl=no
9577         else
9578                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9579 echo "configure:9580: checking for main in -ltcl" >&5
9580 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
9581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   ac_save_LIBS="$LIBS"
9585 LIBS="-ltcl  $LIBS"
9586 cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589
9590 int main() {
9591 main()
9592 ; return 0; }
9593 EOF
9594 if { (eval echo configure:9595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9595   rm -rf conftest*
9596   eval "ac_cv_lib_$ac_lib_var=yes"
9597 else
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_lib_$ac_lib_var=no"
9602 fi
9603 rm -f conftest*
9604 LIBS="$ac_save_LIBS"
9605
9606 fi
9607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9608   echo "$ac_t""yes" 1>&6
9609   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9610 else
9611   echo "$ac_t""no" 1>&6
9612 have_tcl=no
9613 fi
9614
9615
9616                 if test $have_tcl != yes; then
9617                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9618 echo "configure:9619: checking for main in -ltcl7.6" >&5
9619 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
9620 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9621   echo $ac_n "(cached) $ac_c" 1>&6
9622 else
9623   ac_save_LIBS="$LIBS"
9624 LIBS="-ltcl7.6  $LIBS"
9625 cat > conftest.$ac_ext <<EOF
9626 #line 9627 "configure"
9627 #include "confdefs.h"
9628
9629 int main() {
9630 main()
9631 ; return 0; }
9632 EOF
9633 if { (eval echo configure:9634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9634   rm -rf conftest*
9635   eval "ac_cv_lib_$ac_lib_var=yes"
9636 else
9637   echo "configure: failed program was:" >&5
9638   cat conftest.$ac_ext >&5
9639   rm -rf conftest*
9640   eval "ac_cv_lib_$ac_lib_var=no"
9641 fi
9642 rm -f conftest*
9643 LIBS="$ac_save_LIBS"
9644
9645 fi
9646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9647   echo "$ac_t""yes" 1>&6
9648   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9649 else
9650   echo "$ac_t""no" 1>&6
9651 have_tcl=no
9652 fi
9653
9654                 fi
9655
9656                 if test $have_tcl != yes; then
9657                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9658 echo "configure:9659: checking for main in -ltcl8.0" >&5
9659 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
9660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9661   echo $ac_n "(cached) $ac_c" 1>&6
9662 else
9663   ac_save_LIBS="$LIBS"
9664 LIBS="-ltcl8.0  $LIBS"
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668
9669 int main() {
9670 main()
9671 ; return 0; }
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9674   rm -rf conftest*
9675   eval "ac_cv_lib_$ac_lib_var=yes"
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -rf conftest*
9680   eval "ac_cv_lib_$ac_lib_var=no"
9681 fi
9682 rm -f conftest*
9683 LIBS="$ac_save_LIBS"
9684
9685 fi
9686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9687   echo "$ac_t""yes" 1>&6
9688   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9689 else
9690   echo "$ac_t""no" 1>&6
9691 have_tcl=no
9692 fi
9693
9694                 fi
9695         fi
9696
9697         if test $have_tcl != yes ; then
9698                 echo "configure: warning: could not find -ltcl" 1>&2
9699                 if test $ol_enable_tcl = yes ; then
9700                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9701                 fi
9702
9703                 ol_enable_tcl=no
9704         fi
9705 fi
9706
9707 # ud needs termcap (should insert check here)
9708 ol_link_termcap=no
9709 for ac_hdr in termcap.h ncurses.h
9710 do
9711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9713 echo "configure:9714: checking for $ac_hdr" >&5
9714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9715   echo $ac_n "(cached) $ac_c" 1>&6
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720 #include <$ac_hdr>
9721 EOF
9722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9723 { (eval echo configure:9724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9725 if test -z "$ac_err"; then
9726   rm -rf conftest*
9727   eval "ac_cv_header_$ac_safe=yes"
9728 else
9729   echo "$ac_err" >&5
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -rf conftest*
9733   eval "ac_cv_header_$ac_safe=no"
9734 fi
9735 rm -f conftest*
9736 fi
9737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9738   echo "$ac_t""yes" 1>&6
9739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9740   cat >> confdefs.h <<EOF
9741 #define $ac_tr_hdr 1
9742 EOF
9743  
9744 else
9745   echo "$ac_t""no" 1>&6
9746 fi
9747 done
9748
9749
9750 if test $ol_link_termcap = no ; then
9751         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9752 echo "configure:9753: checking for tputs in -ltermcap" >&5
9753 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
9754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   ac_save_LIBS="$LIBS"
9758 LIBS="-ltermcap  $LIBS"
9759 cat > conftest.$ac_ext <<EOF
9760 #line 9761 "configure"
9761 #include "confdefs.h"
9762 /* Override any gcc2 internal prototype to avoid an error.  */
9763 /* We use char because int might match the return type of a gcc2
9764     builtin and then its argument prototype would still apply.  */
9765 char tputs();
9766
9767 int main() {
9768 tputs()
9769 ; return 0; }
9770 EOF
9771 if { (eval echo configure:9772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9772   rm -rf conftest*
9773   eval "ac_cv_lib_$ac_lib_var=yes"
9774 else
9775   echo "configure: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   rm -rf conftest*
9778   eval "ac_cv_lib_$ac_lib_var=no"
9779 fi
9780 rm -f conftest*
9781 LIBS="$ac_save_LIBS"
9782
9783 fi
9784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9785   echo "$ac_t""yes" 1>&6
9786   have_termcap=yes
9787 else
9788   echo "$ac_t""no" 1>&6
9789 have_termcap=no
9790 fi
9791
9792         if test $have_termcap = yes ; then
9793                 cat >> confdefs.h <<\EOF
9794 #define HAVE_TERMCAP 1
9795 EOF
9796
9797                 ol_link_termcap=yes
9798                 TERMCAP_LIBS=-ltermcap
9799         fi
9800 fi
9801
9802 if test $ol_link_termcap = no ; then
9803         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9804 echo "configure:9805: checking for initscr in -lncurses" >&5
9805 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
9806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9807   echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809   ac_save_LIBS="$LIBS"
9810 LIBS="-lncurses  $LIBS"
9811 cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814 /* Override any gcc2 internal prototype to avoid an error.  */
9815 /* We use char because int might match the return type of a gcc2
9816     builtin and then its argument prototype would still apply.  */
9817 char initscr();
9818
9819 int main() {
9820 initscr()
9821 ; return 0; }
9822 EOF
9823 if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9824   rm -rf conftest*
9825   eval "ac_cv_lib_$ac_lib_var=yes"
9826 else
9827   echo "configure: failed program was:" >&5
9828   cat conftest.$ac_ext >&5
9829   rm -rf conftest*
9830   eval "ac_cv_lib_$ac_lib_var=no"
9831 fi
9832 rm -f conftest*
9833 LIBS="$ac_save_LIBS"
9834
9835 fi
9836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9837   echo "$ac_t""yes" 1>&6
9838   have_ncurses=yes
9839 else
9840   echo "$ac_t""no" 1>&6
9841 have_ncurses=no
9842 fi
9843
9844         if test $have_ncurses = yes ; then
9845                 cat >> confdefs.h <<\EOF
9846 #define HAVE_NCURSES 1
9847 EOF
9848
9849                 ol_link_termcap=yes
9850                 TERMCAP_LIBS=-lncurses
9851         fi
9852 fi
9853
9854 if test $ol_link_termcap = no ; then
9855         cat >> confdefs.h <<\EOF
9856 #define NO_TERMCAP 1
9857 EOF
9858
9859         TERMCAP_LIBS=
9860 fi
9861
9862 ol_link_readline=no
9863 if test $ol_with_readline != no ; then
9864         for ac_hdr in readline/readline.h readline/history.h
9865 do
9866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9868 echo "configure:9869: checking for $ac_hdr" >&5
9869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 #include <$ac_hdr>
9876 EOF
9877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9878 { (eval echo configure:9879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9880 if test -z "$ac_err"; then
9881   rm -rf conftest*
9882   eval "ac_cv_header_$ac_safe=yes"
9883 else
9884   echo "$ac_err" >&5
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   eval "ac_cv_header_$ac_safe=no"
9889 fi
9890 rm -f conftest*
9891 fi
9892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9893   echo "$ac_t""yes" 1>&6
9894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9895   cat >> confdefs.h <<EOF
9896 #define $ac_tr_hdr 1
9897 EOF
9898  
9899 else
9900   echo "$ac_t""no" 1>&6
9901 fi
9902 done
9903
9904
9905         if test $ac_cv_header_readline_readline_h = yes ; then
9906                 save_LIBS="$LIBS"
9907                 LIBS="$TERMCAP_LIBS $LIBS"
9908                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9909 echo "configure:9910: checking for readline in -lreadline" >&5
9910 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
9911 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9912   echo $ac_n "(cached) $ac_c" 1>&6
9913 else
9914   ac_save_LIBS="$LIBS"
9915 LIBS="-lreadline  $LIBS"
9916 cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919 /* Override any gcc2 internal prototype to avoid an error.  */
9920 /* We use char because int might match the return type of a gcc2
9921     builtin and then its argument prototype would still apply.  */
9922 char readline();
9923
9924 int main() {
9925 readline()
9926 ; return 0; }
9927 EOF
9928 if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9929   rm -rf conftest*
9930   eval "ac_cv_lib_$ac_lib_var=yes"
9931 else
9932   echo "configure: failed program was:" >&5
9933   cat conftest.$ac_ext >&5
9934   rm -rf conftest*
9935   eval "ac_cv_lib_$ac_lib_var=no"
9936 fi
9937 rm -f conftest*
9938 LIBS="$ac_save_LIBS"
9939
9940 fi
9941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943   have_readline=yes
9944 else
9945   echo "$ac_t""no" 1>&6
9946 have_readline=no
9947 fi
9948
9949                 LIBS="$save_LIBS"
9950                         
9951                 if test $have_readline = yes ; then
9952                         ol_with_readline=found
9953                         ol_link_readline=yes
9954
9955                         READLINE_LIBS="-lreadline"
9956                 fi
9957         fi
9958 fi
9959
9960 if test $ol_link_readline = yes ; then
9961         cat >> confdefs.h <<\EOF
9962 #define HAVE_READLINE 1
9963 EOF
9964
9965 fi
9966
9967
9968 # FreeBSD (and others) have crypt(3) in -lcrypt
9969 if test $ol_enable_crypt != no ; then
9970         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9971 echo "configure:9972: checking for crypt" >&5
9972 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
9973   echo $ac_n "(cached) $ac_c" 1>&6
9974 else
9975   cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* System header to define __stub macros and hopefully few prototypes,
9979     which can conflict with char crypt(); below.  */
9980 #include <assert.h>
9981 /* Override any gcc2 internal prototype to avoid an error.  */
9982 /* We use char because int might match the return type of a gcc2
9983     builtin and then its argument prototype would still apply.  */
9984 char crypt();
9985 char (*f)();
9986
9987 int main() {
9988
9989 /* The GNU C library defines this for functions which it implements
9990     to always fail with ENOSYS.  Some functions are actually named
9991     something starting with __ and the normal name is an alias.  */
9992 #if defined (__stub_crypt) || defined (__stub___crypt)
9993 choke me
9994 #else
9995 f = crypt;
9996 #endif
9997
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10001   rm -rf conftest*
10002   eval "ac_cv_func_crypt=yes"
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   eval "ac_cv_func_crypt=no"
10008 fi
10009 rm -f conftest*
10010 fi
10011
10012 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10013   echo "$ac_t""yes" 1>&6
10014   have_crypt=yes
10015 else
10016   echo "$ac_t""no" 1>&6
10017
10018                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10019 echo "configure:10020: checking for crypt in -lcrypt" >&5
10020 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10022   echo $ac_n "(cached) $ac_c" 1>&6
10023 else
10024   ac_save_LIBS="$LIBS"
10025 LIBS="-lcrypt  $LIBS"
10026 cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 /* Override any gcc2 internal prototype to avoid an error.  */
10030 /* We use char because int might match the return type of a gcc2
10031     builtin and then its argument prototype would still apply.  */
10032 char crypt();
10033
10034 int main() {
10035 crypt()
10036 ; return 0; }
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10039   rm -rf conftest*
10040   eval "ac_cv_lib_$ac_lib_var=yes"
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=no"
10046 fi
10047 rm -f conftest*
10048 LIBS="$ac_save_LIBS"
10049
10050 fi
10051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10052   echo "$ac_t""yes" 1>&6
10053   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10054                         have_crypt=yes
10055 else
10056   echo "$ac_t""no" 1>&6
10057 have_crypt=no
10058 fi
10059
10060 fi
10061
10062
10063         if test $have_crypt = yes ; then
10064                 cat >> confdefs.h <<\EOF
10065 #define HAVE_CRYPT 1
10066 EOF
10067
10068         else
10069                 echo "configure: warning: could not find crypt" 1>&2
10070                 if test $ol_enable_crypt = yes ; then
10071                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10072                 fi
10073
10074                 echo "configure: warning: disabling crypt support" 1>&2
10075                 ol_enable_crypt=no
10076         fi
10077 fi
10078
10079 # FreeBSD (and others) have setproctitle(3) in -lutil
10080 if test $ol_enable_proctitle != no ; then
10081         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10082 echo "configure:10083: checking for setproctitle" >&5
10083 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10084   echo $ac_n "(cached) $ac_c" 1>&6
10085 else
10086   cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089 /* System header to define __stub macros and hopefully few prototypes,
10090     which can conflict with char setproctitle(); below.  */
10091 #include <assert.h>
10092 /* Override any gcc2 internal prototype to avoid an error.  */
10093 /* We use char because int might match the return type of a gcc2
10094     builtin and then its argument prototype would still apply.  */
10095 char setproctitle();
10096 char (*f)();
10097
10098 int main() {
10099
10100 /* The GNU C library defines this for functions which it implements
10101     to always fail with ENOSYS.  Some functions are actually named
10102     something starting with __ and the normal name is an alias.  */
10103 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10104 choke me
10105 #else
10106 f = setproctitle;
10107 #endif
10108
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   eval "ac_cv_func_setproctitle=yes"
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_func_setproctitle=no"
10119 fi
10120 rm -f conftest*
10121 fi
10122
10123 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10124   echo "$ac_t""yes" 1>&6
10125   have_setproctitle=yes
10126 else
10127   echo "$ac_t""no" 1>&6
10128
10129                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10130 echo "configure:10131: checking for setproctitle in -lutil" >&5
10131 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10133   echo $ac_n "(cached) $ac_c" 1>&6
10134 else
10135   ac_save_LIBS="$LIBS"
10136 LIBS="-lutil  $LIBS"
10137 cat > conftest.$ac_ext <<EOF
10138 #line 10139 "configure"
10139 #include "confdefs.h"
10140 /* Override any gcc2 internal prototype to avoid an error.  */
10141 /* We use char because int might match the return type of a gcc2
10142     builtin and then its argument prototype would still apply.  */
10143 char setproctitle();
10144
10145 int main() {
10146 setproctitle()
10147 ; return 0; }
10148 EOF
10149 if { (eval echo configure:10150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10150   rm -rf conftest*
10151   eval "ac_cv_lib_$ac_lib_var=yes"
10152 else
10153   echo "configure: failed program was:" >&5
10154   cat conftest.$ac_ext >&5
10155   rm -rf conftest*
10156   eval "ac_cv_lib_$ac_lib_var=no"
10157 fi
10158 rm -f conftest*
10159 LIBS="$ac_save_LIBS"
10160
10161 fi
10162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10163   echo "$ac_t""yes" 1>&6
10164   have_setproctitle=yes
10165                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10166 else
10167   echo "$ac_t""no" 1>&6
10168 have_setproctitle=no
10169                         LIBOBJS="$LIBOBJS setproctitle.o"
10170 fi
10171
10172 fi
10173
10174
10175         if test $have_setproctitle = yes ; then
10176                 cat >> confdefs.h <<\EOF
10177 #define HAVE_SETPROCTITLE 1
10178 EOF
10179
10180         fi
10181 fi
10182
10183 # test for EBCDIC
10184 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
10185 echo "configure:10186: checking for EBCDIC" >&5
10186 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
10187   echo $ac_n "(cached) $ac_c" 1>&6
10188 else
10189   
10190         cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193
10194 #if !('M' == 0xd4)
10195 #include <__ASCII__/generate_error.h>
10196 #endif
10197
10198 EOF
10199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10200 { (eval echo configure:10201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10202 if test -z "$ac_err"; then
10203   rm -rf conftest*
10204   ol_cv_cpp_ebcdic=yes
10205 else
10206   echo "$ac_err" >&5
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -rf conftest*
10210   ol_cv_cpp_ebcdic=no
10211 fi
10212 rm -f conftest*
10213 fi
10214
10215 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
10216 if test $ol_cv_cpp_ebcdic = yes ; then
10217         cat >> confdefs.h <<\EOF
10218 #define HAVE_EBCDIC 1
10219 EOF
10220
10221 fi
10222
10223 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10224 echo "configure:10225: checking for ANSI C header files" >&5
10225 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
10226   echo $ac_n "(cached) $ac_c" 1>&6
10227 else
10228   cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 #include <stdlib.h>
10232 #include <stdarg.h>
10233 #include <string.h>
10234 #include <float.h>
10235 EOF
10236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10237 { (eval echo configure:10238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10239 if test -z "$ac_err"; then
10240   rm -rf conftest*
10241   ol_cv_header_stdc=yes
10242 else
10243   echo "$ac_err" >&5
10244   echo "configure: failed program was:" >&5
10245   cat conftest.$ac_ext >&5
10246   rm -rf conftest*
10247   ol_cv_header_stdc=no
10248 fi
10249 rm -f conftest*
10250
10251 if test $ol_cv_header_stdc = yes; then
10252   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10253 cat > conftest.$ac_ext <<EOF
10254 #line 10255 "configure"
10255 #include "confdefs.h"
10256 #include <string.h>
10257 EOF
10258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10259   egrep "memchr" >/dev/null 2>&1; then
10260   :
10261 else
10262   rm -rf conftest*
10263   ol_cv_header_stdc=no
10264 fi
10265 rm -f conftest*
10266
10267 fi
10268
10269 if test $ol_cv_header_stdc = yes; then
10270   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10271 cat > conftest.$ac_ext <<EOF
10272 #line 10273 "configure"
10273 #include "confdefs.h"
10274 #include <stdlib.h>
10275 EOF
10276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10277   egrep "free" >/dev/null 2>&1; then
10278   :
10279 else
10280   rm -rf conftest*
10281   ol_cv_header_stdc=no
10282 fi
10283 rm -f conftest*
10284
10285 fi
10286
10287 if test $ol_cv_header_stdc = yes; then
10288   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10289 if test "$cross_compiling" = yes; then
10290   :
10291 else
10292   cat > conftest.$ac_ext <<EOF
10293 #line 10294 "configure"
10294 #include "confdefs.h"
10295 #include <ctype.h>
10296 #ifndef HAVE_EBCDIC
10297 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10298 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10299 #else
10300 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10301                 || ('j' <= (c) && (c) <= 'r') \
10302                 || ('s' <= (c) && (c) <= 'z'))
10303 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
10304 #endif
10305 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10306 int main () { int i; for (i = 0; i < 256; i++)
10307 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10308 exit (0); }
10309
10310 EOF
10311 if { (eval echo configure:10312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10312 then
10313   :
10314 else
10315   echo "configure: failed program was:" >&5
10316   cat conftest.$ac_ext >&5
10317   rm -fr conftest*
10318   ol_cv_header_stdc=no
10319 fi
10320 rm -fr conftest*
10321 fi
10322
10323 fi
10324 fi
10325
10326 echo "$ac_t""$ol_cv_header_stdc" 1>&6
10327 if test $ol_cv_header_stdc = yes; then
10328   cat >> confdefs.h <<\EOF
10329 #define STDC_HEADERS 1
10330 EOF
10331
10332 fi
10333 ac_cv_header_stdc=disable
10334
10335
10336 if test $ol_cv_header_stdc != yes; then
10337         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
10338 fi
10339
10340 ac_header_dirent=no
10341 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
10342 do
10343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10344 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
10345 echo "configure:10346: checking for $ac_hdr that defines DIR" >&5
10346 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
10347   echo $ac_n "(cached) $ac_c" 1>&6
10348 else
10349   cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 #include <sys/types.h>
10353 #include <$ac_hdr>
10354 int main() {
10355 DIR *dirp = 0;
10356 ; return 0; }
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10359   rm -rf conftest*
10360   eval "ac_cv_header_dirent_$ac_safe=yes"
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_header_dirent_$ac_safe=no"
10366 fi
10367 rm -f conftest*
10368 fi
10369 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
10370   echo "$ac_t""yes" 1>&6
10371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10372   cat >> confdefs.h <<EOF
10373 #define $ac_tr_hdr 1
10374 EOF
10375  ac_header_dirent=$ac_hdr; break
10376 else
10377   echo "$ac_t""no" 1>&6
10378 fi
10379 done
10380 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10381 if test $ac_header_dirent = dirent.h; then
10382 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
10383 echo "configure:10384: checking for opendir in -ldir" >&5
10384 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
10385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   ac_save_LIBS="$LIBS"
10389 LIBS="-ldir  $LIBS"
10390 cat > conftest.$ac_ext <<EOF
10391 #line 10392 "configure"
10392 #include "confdefs.h"
10393 /* Override any gcc2 internal prototype to avoid an error.  */
10394 /* We use char because int might match the return type of a gcc2
10395     builtin and then its argument prototype would still apply.  */
10396 char opendir();
10397
10398 int main() {
10399 opendir()
10400 ; return 0; }
10401 EOF
10402 if { (eval echo configure:10403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10403   rm -rf conftest*
10404   eval "ac_cv_lib_$ac_lib_var=yes"
10405 else
10406   echo "configure: failed program was:" >&5
10407   cat conftest.$ac_ext >&5
10408   rm -rf conftest*
10409   eval "ac_cv_lib_$ac_lib_var=no"
10410 fi
10411 rm -f conftest*
10412 LIBS="$ac_save_LIBS"
10413
10414 fi
10415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10416   echo "$ac_t""yes" 1>&6
10417   LIBS="$LIBS -ldir"
10418 else
10419   echo "$ac_t""no" 1>&6
10420 fi
10421
10422 else
10423 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
10424 echo "configure:10425: checking for opendir in -lx" >&5
10425 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
10426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10427   echo $ac_n "(cached) $ac_c" 1>&6
10428 else
10429   ac_save_LIBS="$LIBS"
10430 LIBS="-lx  $LIBS"
10431 cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10434 /* Override any gcc2 internal prototype to avoid an error.  */
10435 /* We use char because int might match the return type of a gcc2
10436     builtin and then its argument prototype would still apply.  */
10437 char opendir();
10438
10439 int main() {
10440 opendir()
10441 ; return 0; }
10442 EOF
10443 if { (eval echo configure:10444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=yes"
10446 else
10447   echo "configure: failed program was:" >&5
10448   cat conftest.$ac_ext >&5
10449   rm -rf conftest*
10450   eval "ac_cv_lib_$ac_lib_var=no"
10451 fi
10452 rm -f conftest*
10453 LIBS="$ac_save_LIBS"
10454
10455 fi
10456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10457   echo "$ac_t""yes" 1>&6
10458   LIBS="$LIBS -lx"
10459 else
10460   echo "$ac_t""no" 1>&6
10461 fi
10462
10463 fi
10464
10465 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
10466 echo "configure:10467: checking for sys/wait.h that is POSIX.1 compatible" >&5
10467 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
10468   echo $ac_n "(cached) $ac_c" 1>&6
10469 else
10470   cat > conftest.$ac_ext <<EOF
10471 #line 10472 "configure"
10472 #include "confdefs.h"
10473 #include <sys/types.h>
10474 #include <sys/wait.h>
10475 #ifndef WEXITSTATUS
10476 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10477 #endif
10478 #ifndef WIFEXITED
10479 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10480 #endif
10481 int main() {
10482 int s;
10483 wait (&s);
10484 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10485 ; return 0; }
10486 EOF
10487 if { (eval echo configure:10488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10488   rm -rf conftest*
10489   ac_cv_header_sys_wait_h=yes
10490 else
10491   echo "configure: failed program was:" >&5
10492   cat conftest.$ac_ext >&5
10493   rm -rf conftest*
10494   ac_cv_header_sys_wait_h=no
10495 fi
10496 rm -f conftest*
10497 fi
10498
10499 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
10500 if test $ac_cv_header_sys_wait_h = yes; then
10501   cat >> confdefs.h <<\EOF
10502 #define HAVE_SYS_WAIT_H 1
10503 EOF
10504
10505 fi
10506
10507 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
10508 echo "configure:10509: checking POSIX termios" >&5
10509 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515 #include <sys/types.h>
10516 #include <unistd.h>
10517 #include <termios.h>
10518 int main() {
10519 /* SunOS 4.0.3 has termios.h but not the library calls.  */
10520    tcgetattr(0, 0);
10521 ; return 0; }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10524   rm -rf conftest*
10525   am_cv_sys_posix_termios=yes
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   am_cv_sys_posix_termios=no
10531 fi
10532 rm -f conftest*
10533 fi
10534
10535 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
10536
10537
10538  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
10539 echo "configure:10540: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
10540 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
10541   echo $ac_n "(cached) $ac_c" 1>&6
10542 else
10543   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
10544
10545   gwinsz_in_termios_h=no
10546   if test $am_cv_sys_posix_termios = yes; then
10547     cat > conftest.$ac_ext <<EOF
10548 #line 10549 "configure"
10549 #include "confdefs.h"
10550 #include <sys/types.h>
10551 #     include <termios.h>
10552 #     ifdef TIOCGWINSZ
10553         yes
10554 #     endif
10555     
10556 EOF
10557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10558   egrep "yes" >/dev/null 2>&1; then
10559   rm -rf conftest*
10560   gwinsz_in_termios_h=yes
10561 fi
10562 rm -f conftest*
10563
10564   fi
10565
10566   if test $gwinsz_in_termios_h = no; then
10567     cat > conftest.$ac_ext <<EOF
10568 #line 10569 "configure"
10569 #include "confdefs.h"
10570 #include <sys/types.h>
10571 #     include <sys/ioctl.h>
10572 #     ifdef TIOCGWINSZ
10573         yes
10574 #     endif
10575     
10576 EOF
10577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10578   egrep "yes" >/dev/null 2>&1; then
10579   rm -rf conftest*
10580   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10581 fi
10582 rm -f conftest*
10583
10584   fi
10585   
10586 fi
10587
10588 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10589   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10590     cat >> confdefs.h <<\EOF
10591 #define GWINSZ_IN_SYS_IOCTL 1
10592 EOF
10593
10594   fi
10595
10596 if test $am_cv_sys_posix_termios = yes ; then
10597         cat >> confdefs.h <<\EOF
10598 #define HAVE_POSIX_TERMIOS 1
10599 EOF
10600
10601 fi
10602
10603 for ac_hdr in \
10604         arpa/inet.h             \
10605         arpa/nameser.h  \
10606         assert.h                \
10607         crypt.h                 \
10608         errno.h                 \
10609         fcntl.h                 \
10610         filio.h                 \
10611         getopt.h                \
10612         grp.h                   \
10613         libutil.h               \
10614         limits.h                \
10615         locale.h                \
10616         netinet/tcp.h   \
10617         malloc.h                \
10618         memory.h                \
10619         psap.h                  \
10620         pwd.h                   \
10621         resolv.h                \
10622         sgtty.h                 \
10623         shadow.h                \
10624         stdarg.h                \
10625         stddef.h                \
10626         string.h                \
10627         strings.h               \
10628         sysexits.h              \
10629         sys/file.h              \
10630         sys/filio.h             \
10631         sys/errno.h             \
10632         sys/ioctl.h             \
10633         sys/param.h             \
10634         sys/resource.h  \
10635         sys/select.h    \
10636         sys/socket.h    \
10637         sys/syslog.h    \
10638         sys/time.h              \
10639         sys/types.h             \
10640         syslog.h                \
10641         termios.h               \
10642         unistd.h                \
10643
10644 do
10645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10647 echo "configure:10648: checking for $ac_hdr" >&5
10648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654 #include <$ac_hdr>
10655 EOF
10656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10657 { (eval echo configure:10658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10659 if test -z "$ac_err"; then
10660   rm -rf conftest*
10661   eval "ac_cv_header_$ac_safe=yes"
10662 else
10663   echo "$ac_err" >&5
10664   echo "configure: failed program was:" >&5
10665   cat conftest.$ac_ext >&5
10666   rm -rf conftest*
10667   eval "ac_cv_header_$ac_safe=no"
10668 fi
10669 rm -f conftest*
10670 fi
10671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10672   echo "$ac_t""yes" 1>&6
10673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10674   cat >> confdefs.h <<EOF
10675 #define $ac_tr_hdr 1
10676 EOF
10677  
10678 else
10679   echo "$ac_t""no" 1>&6
10680 fi
10681 done
10682
10683
10684 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10685 echo "configure:10686: checking for uid_t in sys/types.h" >&5
10686 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   cat > conftest.$ac_ext <<EOF
10690 #line 10691 "configure"
10691 #include "confdefs.h"
10692 #include <sys/types.h>
10693 EOF
10694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10695   egrep "uid_t" >/dev/null 2>&1; then
10696   rm -rf conftest*
10697   ac_cv_type_uid_t=yes
10698 else
10699   rm -rf conftest*
10700   ac_cv_type_uid_t=no
10701 fi
10702 rm -f conftest*
10703
10704 fi
10705
10706 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10707 if test $ac_cv_type_uid_t = no; then
10708   cat >> confdefs.h <<\EOF
10709 #define uid_t int
10710 EOF
10711
10712   cat >> confdefs.h <<\EOF
10713 #define gid_t int
10714 EOF
10715
10716 fi
10717
10718 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10719 echo "configure:10720: checking type of array argument to getgroups" >&5
10720 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10721   echo $ac_n "(cached) $ac_c" 1>&6
10722 else
10723   if test "$cross_compiling" = yes; then
10724   ac_cv_type_getgroups=cross
10725 else
10726   cat > conftest.$ac_ext <<EOF
10727 #line 10728 "configure"
10728 #include "confdefs.h"
10729
10730 /* Thanks to Mike Rendell for this test.  */
10731 #include <sys/types.h>
10732 #define NGID 256
10733 #undef MAX
10734 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10735 main()
10736 {
10737   gid_t gidset[NGID];
10738   int i, n;
10739   union { gid_t gval; long lval; }  val;
10740
10741   val.lval = -1;
10742   for (i = 0; i < NGID; i++)
10743     gidset[i] = val.gval;
10744   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10745                  gidset);
10746   /* Exit non-zero if getgroups seems to require an array of ints.  This
10747      happens when gid_t is short but getgroups modifies an array of ints.  */
10748   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10749 }
10750
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10753 then
10754     ac_cv_type_getgroups=gid_t
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -fr conftest*
10759   ac_cv_type_getgroups=int
10760 fi
10761 rm -fr conftest*
10762 fi
10763
10764 if test $ac_cv_type_getgroups = cross; then
10765         cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768 #include <unistd.h>
10769 EOF
10770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10771   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10772   rm -rf conftest*
10773   ac_cv_type_getgroups=gid_t
10774 else
10775   rm -rf conftest*
10776   ac_cv_type_getgroups=int
10777 fi
10778 rm -f conftest*
10779
10780 fi
10781 fi
10782
10783 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10784 cat >> confdefs.h <<EOF
10785 #define GETGROUPS_T $ac_cv_type_getgroups
10786 EOF
10787
10788  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10789 echo "configure:10790: checking for ANSI C header files" >&5
10790 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10791   echo $ac_n "(cached) $ac_c" 1>&6
10792 else
10793   cat > conftest.$ac_ext <<EOF
10794 #line 10795 "configure"
10795 #include "confdefs.h"
10796 #include <stdlib.h>
10797 #include <stdarg.h>
10798 #include <string.h>
10799 #include <float.h>
10800 EOF
10801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10802 { (eval echo configure:10803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10804 if test -z "$ac_err"; then
10805   rm -rf conftest*
10806   ac_cv_header_stdc=yes
10807 else
10808   echo "$ac_err" >&5
10809   echo "configure: failed program was:" >&5
10810   cat conftest.$ac_ext >&5
10811   rm -rf conftest*
10812   ac_cv_header_stdc=no
10813 fi
10814 rm -f conftest*
10815
10816 if test $ac_cv_header_stdc = yes; then
10817   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10818 cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 #include <string.h>
10822 EOF
10823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10824   egrep "memchr" >/dev/null 2>&1; then
10825   :
10826 else
10827   rm -rf conftest*
10828   ac_cv_header_stdc=no
10829 fi
10830 rm -f conftest*
10831
10832 fi
10833
10834 if test $ac_cv_header_stdc = yes; then
10835   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10836 cat > conftest.$ac_ext <<EOF
10837 #line 10838 "configure"
10838 #include "confdefs.h"
10839 #include <stdlib.h>
10840 EOF
10841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10842   egrep "free" >/dev/null 2>&1; then
10843   :
10844 else
10845   rm -rf conftest*
10846   ac_cv_header_stdc=no
10847 fi
10848 rm -f conftest*
10849
10850 fi
10851
10852 if test $ac_cv_header_stdc = yes; then
10853   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10854 if test "$cross_compiling" = yes; then
10855   :
10856 else
10857   cat > conftest.$ac_ext <<EOF
10858 #line 10859 "configure"
10859 #include "confdefs.h"
10860 #include <ctype.h>
10861 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10862 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10863 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10864 int main () { int i; for (i = 0; i < 256; i++)
10865 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10866 exit (0); }
10867
10868 EOF
10869 if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10870 then
10871   :
10872 else
10873   echo "configure: failed program was:" >&5
10874   cat conftest.$ac_ext >&5
10875   rm -fr conftest*
10876   ac_cv_header_stdc=no
10877 fi
10878 rm -fr conftest*
10879 fi
10880
10881 fi
10882 fi
10883
10884 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10885 if test $ac_cv_header_stdc = yes; then
10886   cat >> confdefs.h <<\EOF
10887 #define STDC_HEADERS 1
10888 EOF
10889
10890 fi
10891
10892 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10893 echo "configure:10894: checking for mode_t" >&5
10894 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   cat > conftest.$ac_ext <<EOF
10898 #line 10899 "configure"
10899 #include "confdefs.h"
10900 #include <sys/types.h>
10901 #if STDC_HEADERS
10902 #include <stdlib.h>
10903 #include <stddef.h>
10904 #endif
10905 EOF
10906 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10907   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10908   rm -rf conftest*
10909   eval "ac_cv_type_mode_t=yes"
10910 else
10911   rm -rf conftest*
10912   eval "ac_cv_type_mode_t=no"
10913 fi
10914 rm -f conftest*
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919 else
10920   echo "$ac_t""no" 1>&6
10921   cat >> confdefs.h <<EOF
10922 #define mode_t int
10923 EOF
10924
10925 fi
10926
10927 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10928 echo "configure:10929: checking for off_t" >&5
10929 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
10930   echo $ac_n "(cached) $ac_c" 1>&6
10931 else
10932   cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935 #include <sys/types.h>
10936 #if STDC_HEADERS
10937 #include <stdlib.h>
10938 #include <stddef.h>
10939 #endif
10940 EOF
10941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10942   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10943   rm -rf conftest*
10944   eval "ac_cv_type_off_t=yes"
10945 else
10946   rm -rf conftest*
10947   eval "ac_cv_type_off_t=no"
10948 fi
10949 rm -f conftest*
10950
10951 fi
10952 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
10953   echo "$ac_t""yes" 1>&6
10954 else
10955   echo "$ac_t""no" 1>&6
10956   cat >> confdefs.h <<EOF
10957 #define off_t long
10958 EOF
10959
10960 fi
10961
10962 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10963 echo "configure:10964: checking for pid_t" >&5
10964 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
10965   echo $ac_n "(cached) $ac_c" 1>&6
10966 else
10967   cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970 #include <sys/types.h>
10971 #if STDC_HEADERS
10972 #include <stdlib.h>
10973 #include <stddef.h>
10974 #endif
10975 EOF
10976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10977   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10978   rm -rf conftest*
10979   eval "ac_cv_type_pid_t=yes"
10980 else
10981   rm -rf conftest*
10982   eval "ac_cv_type_pid_t=no"
10983 fi
10984 rm -f conftest*
10985
10986 fi
10987 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
10988   echo "$ac_t""yes" 1>&6
10989 else
10990   echo "$ac_t""no" 1>&6
10991   cat >> confdefs.h <<EOF
10992 #define pid_t int
10993 EOF
10994
10995 fi
10996
10997 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10998 echo "configure:10999: checking for ptrdiff_t" >&5
10999 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11000   echo $ac_n "(cached) $ac_c" 1>&6
11001 else
11002   cat > conftest.$ac_ext <<EOF
11003 #line 11004 "configure"
11004 #include "confdefs.h"
11005 #include <stddef.h>
11006 int main() {
11007 ptrdiff_t p
11008 ; return 0; }
11009 EOF
11010 if { (eval echo configure:11011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11011   rm -rf conftest*
11012   am_cv_type_ptrdiff_t=yes
11013 else
11014   echo "configure: failed program was:" >&5
11015   cat conftest.$ac_ext >&5
11016   rm -rf conftest*
11017   am_cv_type_ptrdiff_t=no
11018 fi
11019 rm -f conftest*
11020 fi
11021
11022 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11023    if test $am_cv_type_ptrdiff_t = yes; then
11024      cat >> confdefs.h <<\EOF
11025 #define HAVE_PTRDIFF_T 1
11026 EOF
11027
11028    fi
11029
11030 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11031 echo "configure:11032: checking return type of signal handlers" >&5
11032 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11033   echo $ac_n "(cached) $ac_c" 1>&6
11034 else
11035   cat > conftest.$ac_ext <<EOF
11036 #line 11037 "configure"
11037 #include "confdefs.h"
11038 #include <sys/types.h>
11039 #include <signal.h>
11040 #ifdef signal
11041 #undef signal
11042 #endif
11043 #ifdef __cplusplus
11044 extern "C" void (*signal (int, void (*)(int)))(int);
11045 #else
11046 void (*signal ()) ();
11047 #endif
11048
11049 int main() {
11050 int i;
11051 ; return 0; }
11052 EOF
11053 if { (eval echo configure:11054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11054   rm -rf conftest*
11055   ac_cv_type_signal=void
11056 else
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   ac_cv_type_signal=int
11061 fi
11062 rm -f conftest*
11063 fi
11064
11065 echo "$ac_t""$ac_cv_type_signal" 1>&6
11066 cat >> confdefs.h <<EOF
11067 #define RETSIGTYPE $ac_cv_type_signal
11068 EOF
11069
11070
11071 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11072 echo "configure:11073: checking for sig_atomic_t" >&5
11073 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11074   echo $ac_n "(cached) $ac_c" 1>&6
11075 else
11076   cat > conftest.$ac_ext <<EOF
11077 #line 11078 "configure"
11078 #include "confdefs.h"
11079 #include <signal.h>
11080 int main() {
11081 sig_atomic_t atomic;
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11085   rm -rf conftest*
11086   ol_cv_type_sig_atomic_t=yes
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   ol_cv_type_sig_atomic_t=no
11092 fi
11093 rm -f conftest*
11094 fi
11095
11096 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11097   if test $ol_cv_type_sig_atomic_t = no; then
11098     cat >> confdefs.h <<\EOF
11099 #define sig_atomic_t int
11100 EOF
11101
11102   fi
11103  
11104 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11105 echo "configure:11106: checking for size_t" >&5
11106 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 #include <sys/types.h>
11113 #if STDC_HEADERS
11114 #include <stdlib.h>
11115 #include <stddef.h>
11116 #endif
11117 EOF
11118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11119   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11120   rm -rf conftest*
11121   eval "ac_cv_type_size_t=yes"
11122 else
11123   rm -rf conftest*
11124   eval "ac_cv_type_size_t=no"
11125 fi
11126 rm -f conftest*
11127
11128 fi
11129 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11130   echo "$ac_t""yes" 1>&6
11131 else
11132   echo "$ac_t""no" 1>&6
11133   cat >> confdefs.h <<EOF
11134 #define size_t unsigned
11135 EOF
11136
11137 fi
11138
11139 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11140 echo "configure:11141: checking for socklen_t" >&5
11141 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11142   echo $ac_n "(cached) $ac_c" 1>&6
11143 else
11144   cat > conftest.$ac_ext <<EOF
11145 #line 11146 "configure"
11146 #include "confdefs.h"
11147
11148 #ifdef HAVE_SYS_TYPES_H
11149 #include <sys/types.h>
11150 #endif
11151 #ifdef HAVE_SYS_SOCKET_H
11152 #include <sys/socket.h>
11153 #endif
11154
11155 int main() {
11156 socklen_t len;
11157 ; return 0; }
11158 EOF
11159 if { (eval echo configure:11160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11160   rm -rf conftest*
11161   ol_cv_type_socklen_t=yes
11162 else
11163   echo "configure: failed program was:" >&5
11164   cat conftest.$ac_ext >&5
11165   rm -rf conftest*
11166   ol_cv_type_socklen_t=no
11167 fi
11168 rm -f conftest*
11169 fi
11170
11171 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11172   if test $ol_cv_type_socklen_t = no; then
11173     cat >> confdefs.h <<\EOF
11174 #define socklen_t int
11175 EOF
11176
11177   fi
11178  
11179 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11180 echo "configure:11181: checking for member st_blksize in aggregate type struct stat" >&5
11181 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11182   echo $ac_n "(cached) $ac_c" 1>&6
11183 else
11184   cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187 #include <sys/types.h>
11188 #include <sys/stat.h>
11189 int main() {
11190 struct stat foo; foo.st_blksize;
11191 ; return 0; }
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11194   rm -rf conftest*
11195   ac_cv_c_struct_member_st_blksize=yes
11196 else
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -rf conftest*
11200   ac_cv_c_struct_member_st_blksize=no
11201 fi
11202 rm -f conftest*
11203 fi
11204
11205 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11206 st_blksize="$ac_cv_c_struct_member_st_blksize"
11207 if test $ac_cv_c_struct_member_st_blksize = yes; then
11208   cat >> confdefs.h <<\EOF
11209 #define HAVE_ST_BLKSIZE 1
11210 EOF
11211
11212 fi
11213
11214 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11215 echo "configure:11216: checking whether time.h and sys/time.h may both be included" >&5
11216 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11217   echo $ac_n "(cached) $ac_c" 1>&6
11218 else
11219   cat > conftest.$ac_ext <<EOF
11220 #line 11221 "configure"
11221 #include "confdefs.h"
11222 #include <sys/types.h>
11223 #include <sys/time.h>
11224 #include <time.h>
11225 int main() {
11226 struct tm *tp;
11227 ; return 0; }
11228 EOF
11229 if { (eval echo configure:11230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11230   rm -rf conftest*
11231   ac_cv_header_time=yes
11232 else
11233   echo "configure: failed program was:" >&5
11234   cat conftest.$ac_ext >&5
11235   rm -rf conftest*
11236   ac_cv_header_time=no
11237 fi
11238 rm -f conftest*
11239 fi
11240
11241 echo "$ac_t""$ac_cv_header_time" 1>&6
11242 if test $ac_cv_header_time = yes; then
11243   cat >> confdefs.h <<\EOF
11244 #define TIME_WITH_SYS_TIME 1
11245 EOF
11246
11247 fi
11248
11249 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11250 echo "configure:11251: checking whether struct tm is in sys/time.h or time.h" >&5
11251 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   cat > conftest.$ac_ext <<EOF
11255 #line 11256 "configure"
11256 #include "confdefs.h"
11257 #include <sys/types.h>
11258 #include <time.h>
11259 int main() {
11260 struct tm *tp; tp->tm_sec;
11261 ; return 0; }
11262 EOF
11263 if { (eval echo configure:11264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11264   rm -rf conftest*
11265   ac_cv_struct_tm=time.h
11266 else
11267   echo "configure: failed program was:" >&5
11268   cat conftest.$ac_ext >&5
11269   rm -rf conftest*
11270   ac_cv_struct_tm=sys/time.h
11271 fi
11272 rm -f conftest*
11273 fi
11274
11275 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11276 if test $ac_cv_struct_tm = sys/time.h; then
11277   cat >> confdefs.h <<\EOF
11278 #define TM_IN_SYS_TIME 1
11279 EOF
11280
11281 fi
11282
11283 # test for pw_gecos in struct passwd
11284 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11285 echo "configure:11286: checking struct passwd for pw_gecos" >&5
11286 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11287   echo $ac_n "(cached) $ac_c" 1>&6
11288 else
11289   
11290         cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 #include <pwd.h>
11294 int main() {
11295
11296         struct passwd pwd;
11297         pwd.pw_gecos = pwd.pw_name;
11298
11299 ; return 0; }
11300 EOF
11301 if { (eval echo configure:11302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11302   rm -rf conftest*
11303   ol_cv_struct_passwd_pw_gecos=yes
11304 else
11305   echo "configure: failed program was:" >&5
11306   cat conftest.$ac_ext >&5
11307   rm -rf conftest*
11308   ol_cv_struct_passwd_pw_gecos=no
11309 fi
11310 rm -f conftest*
11311 fi
11312
11313 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11314 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11315         cat >> confdefs.h <<\EOF
11316 #define HAVE_PW_GECOS 1
11317 EOF
11318
11319 fi
11320
11321 # test for pw_passwd in struct passwd
11322 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11323 echo "configure:11324: checking struct passwd for pw_passwd" >&5
11324 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   
11328         cat > conftest.$ac_ext <<EOF
11329 #line 11330 "configure"
11330 #include "confdefs.h"
11331 #include <pwd.h>
11332 int main() {
11333
11334         struct passwd pwd;
11335         pwd.pw_passwd = pwd.pw_name;
11336
11337 ; return 0; }
11338 EOF
11339 if { (eval echo configure:11340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11340   rm -rf conftest*
11341   ol_cv_struct_passwd_pw_passwd=yes
11342 else
11343   echo "configure: failed program was:" >&5
11344   cat conftest.$ac_ext >&5
11345   rm -rf conftest*
11346   ol_cv_struct_passwd_pw_passwd=no
11347 fi
11348 rm -f conftest*
11349 fi
11350
11351 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11352 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11353         cat >> confdefs.h <<\EOF
11354 #define HAVE_PW_PASSWD 1
11355 EOF
11356
11357 fi
11358
11359
11360 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11361 echo "configure:11362: checking if toupper() requires islower()" >&5
11362 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11363   echo $ac_n "(cached) $ac_c" 1>&6
11364 else
11365   
11366         if test "$cross_compiling" = yes; then
11367   ol_cv_c_upper_lower=safe
11368 else
11369   cat > conftest.$ac_ext <<EOF
11370 #line 11371 "configure"
11371 #include "confdefs.h"
11372
11373 #include <ctype.h>
11374 main()
11375 {
11376         if ('C' == toupper('C'))
11377                 exit(0);
11378         else
11379                 exit(1);
11380 }
11381 EOF
11382 if { (eval echo configure:11383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11383 then
11384   ol_cv_c_upper_lower=no
11385 else
11386   echo "configure: failed program was:" >&5
11387   cat conftest.$ac_ext >&5
11388   rm -fr conftest*
11389   ol_cv_c_upper_lower=yes
11390 fi
11391 rm -fr conftest*
11392 fi
11393
11394 fi
11395
11396 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11397 if test $ol_cv_c_upper_lower != no ; then
11398         cat >> confdefs.h <<\EOF
11399 #define C_UPPER_LOWER 1
11400 EOF
11401
11402 fi
11403
11404 echo $ac_n "checking for working const""... $ac_c" 1>&6
11405 echo "configure:11406: checking for working const" >&5
11406 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11407   echo $ac_n "(cached) $ac_c" 1>&6
11408 else
11409   cat > conftest.$ac_ext <<EOF
11410 #line 11411 "configure"
11411 #include "confdefs.h"
11412
11413 int main() {
11414
11415 /* Ultrix mips cc rejects this.  */
11416 typedef int charset[2]; const charset x;
11417 /* SunOS 4.1.1 cc rejects this.  */
11418 char const *const *ccp;
11419 char **p;
11420 /* NEC SVR4.0.2 mips cc rejects this.  */
11421 struct point {int x, y;};
11422 static struct point const zero = {0,0};
11423 /* AIX XL C 1.02.0.0 rejects this.
11424    It does not let you subtract one const X* pointer from another in an arm
11425    of an if-expression whose if-part is not a constant expression */
11426 const char *g = "string";
11427 ccp = &g + (g ? g-g : 0);
11428 /* HPUX 7.0 cc rejects these. */
11429 ++ccp;
11430 p = (char**) ccp;
11431 ccp = (char const *const *) p;
11432 { /* SCO 3.2v4 cc rejects this.  */
11433   char *t;
11434   char const *s = 0 ? (char *) 0 : (char const *) 0;
11435
11436   *t++ = 0;
11437 }
11438 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11439   int x[] = {25, 17};
11440   const int *foo = &x[0];
11441   ++foo;
11442 }
11443 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11444   typedef const int *iptr;
11445   iptr p = 0;
11446   ++p;
11447 }
11448 { /* AIX XL C 1.02.0.0 rejects this saying
11449      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11450   struct s { int j; const int *ap[3]; };
11451   struct s *b; b->j = 5;
11452 }
11453 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11454   const int foo = 10;
11455 }
11456
11457 ; return 0; }
11458 EOF
11459 if { (eval echo configure:11460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11460   rm -rf conftest*
11461   ac_cv_c_const=yes
11462 else
11463   echo "configure: failed program was:" >&5
11464   cat conftest.$ac_ext >&5
11465   rm -rf conftest*
11466   ac_cv_c_const=no
11467 fi
11468 rm -f conftest*
11469 fi
11470
11471 echo "$ac_t""$ac_cv_c_const" 1>&6
11472 if test $ac_cv_c_const = no; then
11473   cat >> confdefs.h <<\EOF
11474 #define const 
11475 EOF
11476
11477 fi
11478
11479 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11480 echo "configure:11481: checking if compiler understands volatile" >&5
11481 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11482   echo $ac_n "(cached) $ac_c" 1>&6
11483 else
11484   cat > conftest.$ac_ext <<EOF
11485 #line 11486 "configure"
11486 #include "confdefs.h"
11487 int x, y, z;
11488 int main() {
11489 volatile int a; int * volatile b = x ? &y : &z;
11490       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11491       *b = 0;
11492 ; return 0; }
11493 EOF
11494 if { (eval echo configure:11495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11495   rm -rf conftest*
11496   ol_cv_c_volatile=yes
11497 else
11498   echo "configure: failed program was:" >&5
11499   cat conftest.$ac_ext >&5
11500   rm -rf conftest*
11501   ol_cv_c_volatile=no
11502 fi
11503 rm -f conftest*
11504 fi
11505
11506 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11507   if test $ol_cv_c_volatile = yes; then
11508     : 
11509   else
11510     cat >> confdefs.h <<\EOF
11511 #define volatile 
11512 EOF
11513
11514   fi
11515  
11516
11517 if test $cross_compiling = yes ; then
11518         cat >> confdefs.h <<\EOF
11519 #define CROSS_COMPILING 1
11520 EOF
11521
11522
11523         cat >> confdefs.h <<\EOF
11524 #define LBER_INT_T long
11525 EOF
11526
11527         cat >> confdefs.h <<\EOF
11528 #define LBER_TAG_T long
11529 EOF
11530
11531         cat >> confdefs.h <<\EOF
11532 #define LBER_SOCKET_T int
11533 EOF
11534
11535
11536 else
11537         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11538 echo "configure:11539: checking whether byte ordering is bigendian" >&5
11539 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   ac_cv_c_bigendian=unknown
11543 # See if sys/param.h defines the BYTE_ORDER macro.
11544 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 #include <sys/types.h>
11548 #include <sys/param.h>
11549 int main() {
11550
11551 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11552  bogus endian macros
11553 #endif
11554 ; return 0; }
11555 EOF
11556 if { (eval echo configure:11557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11557   rm -rf conftest*
11558   # It does; now see whether it defined to BIG_ENDIAN or not.
11559 cat > conftest.$ac_ext <<EOF
11560 #line 11561 "configure"
11561 #include "confdefs.h"
11562 #include <sys/types.h>
11563 #include <sys/param.h>
11564 int main() {
11565
11566 #if BYTE_ORDER != BIG_ENDIAN
11567  not big endian
11568 #endif
11569 ; return 0; }
11570 EOF
11571 if { (eval echo configure:11572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11572   rm -rf conftest*
11573   ac_cv_c_bigendian=yes
11574 else
11575   echo "configure: failed program was:" >&5
11576   cat conftest.$ac_ext >&5
11577   rm -rf conftest*
11578   ac_cv_c_bigendian=no
11579 fi
11580 rm -f conftest*
11581 else
11582   echo "configure: failed program was:" >&5
11583   cat conftest.$ac_ext >&5
11584 fi
11585 rm -f conftest*
11586 if test $ac_cv_c_bigendian = unknown; then
11587 if test "$cross_compiling" = yes; then
11588     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11589 else
11590   cat > conftest.$ac_ext <<EOF
11591 #line 11592 "configure"
11592 #include "confdefs.h"
11593 main () {
11594   /* Are we little or big endian?  From Harbison&Steele.  */
11595   union
11596   {
11597     long l;
11598     char c[sizeof (long)];
11599   } u;
11600   u.l = 1;
11601   exit (u.c[sizeof (long) - 1] == 1);
11602 }
11603 EOF
11604 if { (eval echo configure:11605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11605 then
11606   ac_cv_c_bigendian=no
11607 else
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -fr conftest*
11611   ac_cv_c_bigendian=yes
11612 fi
11613 rm -fr conftest*
11614 fi
11615
11616 fi
11617 fi
11618
11619 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11620 if test $ac_cv_c_bigendian = yes; then
11621   cat >> confdefs.h <<\EOF
11622 #define WORDS_BIGENDIAN 1
11623 EOF
11624
11625 fi
11626
11627         echo $ac_n "checking size of short""... $ac_c" 1>&6
11628 echo "configure:11629: checking size of short" >&5
11629 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   if test "$cross_compiling" = yes; then
11633     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11634 else
11635   cat > conftest.$ac_ext <<EOF
11636 #line 11637 "configure"
11637 #include "confdefs.h"
11638 #include <stdio.h>
11639 main()
11640 {
11641   FILE *f=fopen("conftestval", "w");
11642   if (!f) exit(1);
11643   fprintf(f, "%d\n", sizeof(short));
11644   exit(0);
11645 }
11646 EOF
11647 if { (eval echo configure:11648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11648 then
11649   ac_cv_sizeof_short=`cat conftestval`
11650 else
11651   echo "configure: failed program was:" >&5
11652   cat conftest.$ac_ext >&5
11653   rm -fr conftest*
11654   ac_cv_sizeof_short=0
11655 fi
11656 rm -fr conftest*
11657 fi
11658
11659 fi
11660 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11661 cat >> confdefs.h <<EOF
11662 #define SIZEOF_SHORT $ac_cv_sizeof_short
11663 EOF
11664
11665  
11666         echo $ac_n "checking size of int""... $ac_c" 1>&6
11667 echo "configure:11668: checking size of int" >&5
11668 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11669   echo $ac_n "(cached) $ac_c" 1>&6
11670 else
11671   if test "$cross_compiling" = yes; then
11672     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11673 else
11674   cat > conftest.$ac_ext <<EOF
11675 #line 11676 "configure"
11676 #include "confdefs.h"
11677 #include <stdio.h>
11678 main()
11679 {
11680   FILE *f=fopen("conftestval", "w");
11681   if (!f) exit(1);
11682   fprintf(f, "%d\n", sizeof(int));
11683   exit(0);
11684 }
11685 EOF
11686 if { (eval echo configure:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11687 then
11688   ac_cv_sizeof_int=`cat conftestval`
11689 else
11690   echo "configure: failed program was:" >&5
11691   cat conftest.$ac_ext >&5
11692   rm -fr conftest*
11693   ac_cv_sizeof_int=0
11694 fi
11695 rm -fr conftest*
11696 fi
11697
11698 fi
11699 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11700 cat >> confdefs.h <<EOF
11701 #define SIZEOF_INT $ac_cv_sizeof_int
11702 EOF
11703
11704  
11705         echo $ac_n "checking size of long""... $ac_c" 1>&6
11706 echo "configure:11707: checking size of long" >&5
11707 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11708   echo $ac_n "(cached) $ac_c" 1>&6
11709 else
11710   if test "$cross_compiling" = yes; then
11711     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11712 else
11713   cat > conftest.$ac_ext <<EOF
11714 #line 11715 "configure"
11715 #include "confdefs.h"
11716 #include <stdio.h>
11717 main()
11718 {
11719   FILE *f=fopen("conftestval", "w");
11720   if (!f) exit(1);
11721   fprintf(f, "%d\n", sizeof(long));
11722   exit(0);
11723 }
11724 EOF
11725 if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11726 then
11727   ac_cv_sizeof_long=`cat conftestval`
11728 else
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -fr conftest*
11732   ac_cv_sizeof_long=0
11733 fi
11734 rm -fr conftest*
11735 fi
11736
11737 fi
11738 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11739 cat >> confdefs.h <<EOF
11740 #define SIZEOF_LONG $ac_cv_sizeof_long
11741 EOF
11742
11743
11744
11745         if test "$ac_cv_sizeof_int" -lt 4 ; then
11746                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11747
11748                 cat >> confdefs.h <<\EOF
11749 #define LBER_INT_T long
11750 EOF
11751
11752                 cat >> confdefs.h <<\EOF
11753 #define LBER_TAG_T long
11754 EOF
11755
11756                 cat >> confdefs.h <<\EOF
11757 #define LBER_SOCKET_T int
11758 EOF
11759
11760         else
11761                 cat >> confdefs.h <<\EOF
11762 #define LBER_INT_T int
11763 EOF
11764
11765                 cat >> confdefs.h <<\EOF
11766 #define LBER_TAG_T long
11767 EOF
11768
11769                 cat >> confdefs.h <<\EOF
11770 #define LBER_SOCKET_T int
11771 EOF
11772
11773         fi
11774 fi
11775
11776 cat >> confdefs.h <<\EOF
11777 #define LBER_LEN_T long
11778 EOF
11779
11780
11781 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11782 echo "configure:11783: checking for 8-bit clean memcmp" >&5
11783 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11784   echo $ac_n "(cached) $ac_c" 1>&6
11785 else
11786   if test "$cross_compiling" = yes; then
11787   ac_cv_func_memcmp_clean=no
11788 else
11789   cat > conftest.$ac_ext <<EOF
11790 #line 11791 "configure"
11791 #include "confdefs.h"
11792
11793 main()
11794 {
11795   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11796   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11797 }
11798
11799 EOF
11800 if { (eval echo configure:11801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11801 then
11802   ac_cv_func_memcmp_clean=yes
11803 else
11804   echo "configure: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   rm -fr conftest*
11807   ac_cv_func_memcmp_clean=no
11808 fi
11809 rm -fr conftest*
11810 fi
11811
11812 fi
11813
11814 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11815 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11816
11817 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11818 echo "configure:11819: checking for strftime" >&5
11819 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
11820   echo $ac_n "(cached) $ac_c" 1>&6
11821 else
11822   cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825 /* System header to define __stub macros and hopefully few prototypes,
11826     which can conflict with char strftime(); below.  */
11827 #include <assert.h>
11828 /* Override any gcc2 internal prototype to avoid an error.  */
11829 /* We use char because int might match the return type of a gcc2
11830     builtin and then its argument prototype would still apply.  */
11831 char strftime();
11832 char (*f)();
11833
11834 int main() {
11835
11836 /* The GNU C library defines this for functions which it implements
11837     to always fail with ENOSYS.  Some functions are actually named
11838     something starting with __ and the normal name is an alias.  */
11839 #if defined (__stub_strftime) || defined (__stub___strftime)
11840 choke me
11841 #else
11842 f = strftime;
11843 #endif
11844
11845 ; return 0; }
11846 EOF
11847 if { (eval echo configure:11848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11848   rm -rf conftest*
11849   eval "ac_cv_func_strftime=yes"
11850 else
11851   echo "configure: failed program was:" >&5
11852   cat conftest.$ac_ext >&5
11853   rm -rf conftest*
11854   eval "ac_cv_func_strftime=no"
11855 fi
11856 rm -f conftest*
11857 fi
11858
11859 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11860   echo "$ac_t""yes" 1>&6
11861   cat >> confdefs.h <<\EOF
11862 #define HAVE_STRFTIME 1
11863 EOF
11864
11865 else
11866   echo "$ac_t""no" 1>&6
11867 # strftime is in -lintl on SCO UNIX.
11868 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11869 echo "configure:11870: checking for strftime in -lintl" >&5
11870 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
11871 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   ac_save_LIBS="$LIBS"
11875 LIBS="-lintl  $LIBS"
11876 cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 /* Override any gcc2 internal prototype to avoid an error.  */
11880 /* We use char because int might match the return type of a gcc2
11881     builtin and then its argument prototype would still apply.  */
11882 char strftime();
11883
11884 int main() {
11885 strftime()
11886 ; return 0; }
11887 EOF
11888 if { (eval echo configure:11889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11889   rm -rf conftest*
11890   eval "ac_cv_lib_$ac_lib_var=yes"
11891 else
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -rf conftest*
11895   eval "ac_cv_lib_$ac_lib_var=no"
11896 fi
11897 rm -f conftest*
11898 LIBS="$ac_save_LIBS"
11899
11900 fi
11901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11902   echo "$ac_t""yes" 1>&6
11903   cat >> confdefs.h <<\EOF
11904 #define HAVE_STRFTIME 1
11905 EOF
11906
11907 LIBS="-lintl $LIBS"
11908 else
11909   echo "$ac_t""no" 1>&6
11910 fi
11911
11912 fi
11913
11914
11915 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11916 echo "configure:11917: checking for vprintf" >&5
11917 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
11918   echo $ac_n "(cached) $ac_c" 1>&6
11919 else
11920   cat > conftest.$ac_ext <<EOF
11921 #line 11922 "configure"
11922 #include "confdefs.h"
11923 /* System header to define __stub macros and hopefully few prototypes,
11924     which can conflict with char vprintf(); below.  */
11925 #include <assert.h>
11926 /* Override any gcc2 internal prototype to avoid an error.  */
11927 /* We use char because int might match the return type of a gcc2
11928     builtin and then its argument prototype would still apply.  */
11929 char vprintf();
11930 char (*f)();
11931
11932 int main() {
11933
11934 /* The GNU C library defines this for functions which it implements
11935     to always fail with ENOSYS.  Some functions are actually named
11936     something starting with __ and the normal name is an alias.  */
11937 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11938 choke me
11939 #else
11940 f = vprintf;
11941 #endif
11942
11943 ; return 0; }
11944 EOF
11945 if { (eval echo configure:11946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11946   rm -rf conftest*
11947   eval "ac_cv_func_vprintf=yes"
11948 else
11949   echo "configure: failed program was:" >&5
11950   cat conftest.$ac_ext >&5
11951   rm -rf conftest*
11952   eval "ac_cv_func_vprintf=no"
11953 fi
11954 rm -f conftest*
11955 fi
11956
11957 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11958   echo "$ac_t""yes" 1>&6
11959   cat >> confdefs.h <<\EOF
11960 #define HAVE_VPRINTF 1
11961 EOF
11962
11963 else
11964   echo "$ac_t""no" 1>&6
11965 fi
11966
11967 if test "$ac_cv_func_vprintf" != yes; then
11968 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11969 echo "configure:11970: checking for _doprnt" >&5
11970 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
11971   echo $ac_n "(cached) $ac_c" 1>&6
11972 else
11973   cat > conftest.$ac_ext <<EOF
11974 #line 11975 "configure"
11975 #include "confdefs.h"
11976 /* System header to define __stub macros and hopefully few prototypes,
11977     which can conflict with char _doprnt(); below.  */
11978 #include <assert.h>
11979 /* Override any gcc2 internal prototype to avoid an error.  */
11980 /* We use char because int might match the return type of a gcc2
11981     builtin and then its argument prototype would still apply.  */
11982 char _doprnt();
11983 char (*f)();
11984
11985 int main() {
11986
11987 /* The GNU C library defines this for functions which it implements
11988     to always fail with ENOSYS.  Some functions are actually named
11989     something starting with __ and the normal name is an alias.  */
11990 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11991 choke me
11992 #else
11993 f = _doprnt;
11994 #endif
11995
11996 ; return 0; }
11997 EOF
11998 if { (eval echo configure:11999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11999   rm -rf conftest*
12000   eval "ac_cv_func__doprnt=yes"
12001 else
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -rf conftest*
12005   eval "ac_cv_func__doprnt=no"
12006 fi
12007 rm -f conftest*
12008 fi
12009
12010 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12011   echo "$ac_t""yes" 1>&6
12012   cat >> confdefs.h <<\EOF
12013 #define HAVE_DOPRNT 1
12014 EOF
12015
12016 else
12017   echo "$ac_t""no" 1>&6
12018 fi
12019
12020 fi
12021
12022
12023 if test $ac_cv_func_vprintf = yes ; then
12024                 for ac_func in vsnprintf vsprintf
12025 do
12026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12027 echo "configure:12028: checking for $ac_func" >&5
12028 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12029   echo $ac_n "(cached) $ac_c" 1>&6
12030 else
12031   cat > conftest.$ac_ext <<EOF
12032 #line 12033 "configure"
12033 #include "confdefs.h"
12034 /* System header to define __stub macros and hopefully few prototypes,
12035     which can conflict with char $ac_func(); below.  */
12036 #include <assert.h>
12037 /* Override any gcc2 internal prototype to avoid an error.  */
12038 /* We use char because int might match the return type of a gcc2
12039     builtin and then its argument prototype would still apply.  */
12040 char $ac_func();
12041 char (*f)();
12042
12043 int main() {
12044
12045 /* The GNU C library defines this for functions which it implements
12046     to always fail with ENOSYS.  Some functions are actually named
12047     something starting with __ and the normal name is an alias.  */
12048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12049 choke me
12050 #else
12051 f = $ac_func;
12052 #endif
12053
12054 ; return 0; }
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12057   rm -rf conftest*
12058   eval "ac_cv_func_$ac_func=yes"
12059 else
12060   echo "configure: failed program was:" >&5
12061   cat conftest.$ac_ext >&5
12062   rm -rf conftest*
12063   eval "ac_cv_func_$ac_func=no"
12064 fi
12065 rm -f conftest*
12066 fi
12067
12068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12069   echo "$ac_t""yes" 1>&6
12070     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12071   cat >> confdefs.h <<EOF
12072 #define $ac_tr_func 1
12073 EOF
12074  
12075 else
12076   echo "$ac_t""no" 1>&6
12077 fi
12078 done
12079
12080 fi
12081
12082 for ac_func in \
12083         bcopy                   \
12084         closesocket             \
12085         endgrent                \
12086         endpwent                \
12087         flock                   \
12088         getdtablesize   \
12089         getgrgid                \
12090         gethostname             \
12091         getpass                 \
12092         getpwuid                \
12093         getpwnam                \
12094         getspnam                \
12095         gettimeofday    \
12096         initgroups              \
12097         lockf                   \
12098         memcpy                  \
12099         memmove                 \
12100         mkstemp                 \
12101         read                    \
12102         recv                    \
12103         recvfrom                \
12104         setpwfile               \
12105         setgid                  \
12106         setegid                 \
12107         setsid                  \
12108         setuid                  \
12109         seteuid                 \
12110         signal                  \
12111         sigset                  \
12112         snprintf                \
12113         strdup                  \
12114         strerror                \
12115         strpbrk                 \
12116         strrchr                 \
12117         strsep                  \
12118         strstr                  \
12119         strtol                  \
12120         strtoul                 \
12121         strspn                  \
12122         sysconf                 \
12123         waitpid                 \
12124         wait4                   \
12125         write                   \
12126         send                    \
12127         sendto                  \
12128
12129 do
12130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12131 echo "configure:12132: checking for $ac_func" >&5
12132 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12133   echo $ac_n "(cached) $ac_c" 1>&6
12134 else
12135   cat > conftest.$ac_ext <<EOF
12136 #line 12137 "configure"
12137 #include "confdefs.h"
12138 /* System header to define __stub macros and hopefully few prototypes,
12139     which can conflict with char $ac_func(); below.  */
12140 #include <assert.h>
12141 /* Override any gcc2 internal prototype to avoid an error.  */
12142 /* We use char because int might match the return type of a gcc2
12143     builtin and then its argument prototype would still apply.  */
12144 char $ac_func();
12145 char (*f)();
12146
12147 int main() {
12148
12149 /* The GNU C library defines this for functions which it implements
12150     to always fail with ENOSYS.  Some functions are actually named
12151     something starting with __ and the normal name is an alias.  */
12152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12153 choke me
12154 #else
12155 f = $ac_func;
12156 #endif
12157
12158 ; return 0; }
12159 EOF
12160 if { (eval echo configure:12161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12161   rm -rf conftest*
12162   eval "ac_cv_func_$ac_func=yes"
12163 else
12164   echo "configure: failed program was:" >&5
12165   cat conftest.$ac_ext >&5
12166   rm -rf conftest*
12167   eval "ac_cv_func_$ac_func=no"
12168 fi
12169 rm -f conftest*
12170 fi
12171
12172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12173   echo "$ac_t""yes" 1>&6
12174     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12175   cat >> confdefs.h <<EOF
12176 #define $ac_tr_func 1
12177 EOF
12178  
12179 else
12180   echo "$ac_t""no" 1>&6
12181 fi
12182 done
12183
12184
12185 for ac_func in getopt tempnam
12186 do
12187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12188 echo "configure:12189: checking for $ac_func" >&5
12189 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12190   echo $ac_n "(cached) $ac_c" 1>&6
12191 else
12192   cat > conftest.$ac_ext <<EOF
12193 #line 12194 "configure"
12194 #include "confdefs.h"
12195 /* System header to define __stub macros and hopefully few prototypes,
12196     which can conflict with char $ac_func(); below.  */
12197 #include <assert.h>
12198 /* Override any gcc2 internal prototype to avoid an error.  */
12199 /* We use char because int might match the return type of a gcc2
12200     builtin and then its argument prototype would still apply.  */
12201 char $ac_func();
12202 char (*f)();
12203
12204 int main() {
12205
12206 /* The GNU C library defines this for functions which it implements
12207     to always fail with ENOSYS.  Some functions are actually named
12208     something starting with __ and the normal name is an alias.  */
12209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12210 choke me
12211 #else
12212 f = $ac_func;
12213 #endif
12214
12215 ; return 0; }
12216 EOF
12217 if { (eval echo configure:12218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12218   rm -rf conftest*
12219   eval "ac_cv_func_$ac_func=yes"
12220 else
12221   echo "configure: failed program was:" >&5
12222   cat conftest.$ac_ext >&5
12223   rm -rf conftest*
12224   eval "ac_cv_func_$ac_func=no"
12225 fi
12226 rm -f conftest*
12227 fi
12228
12229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12230   echo "$ac_t""yes" 1>&6
12231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12232   cat >> confdefs.h <<EOF
12233 #define $ac_tr_func 1
12234 EOF
12235  
12236 else
12237   echo "$ac_t""no" 1>&6
12238 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12239 fi
12240 done
12241
12242
12243
12244 # Check Configuration
12245 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12246 echo "configure:12247: checking declaration of sys_errlist" >&5
12247 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12248   echo $ac_n "(cached) $ac_c" 1>&6
12249 else
12250   
12251         cat > conftest.$ac_ext <<EOF
12252 #line 12253 "configure"
12253 #include "confdefs.h"
12254
12255 #include <stdio.h>
12256 #include <sys/types.h>
12257 #include <errno.h> 
12258 int main() {
12259 char *c = (char *) *sys_errlist
12260 ; return 0; }
12261 EOF
12262 if { (eval echo configure:12263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12263   rm -rf conftest*
12264   ol_cv_dcl_sys_errlist=yes
12265         ol_cv_have_sys_errlist=yes
12266 else
12267   echo "configure: failed program was:" >&5
12268   cat conftest.$ac_ext >&5
12269   rm -rf conftest*
12270   ol_cv_dcl_sys_errlist=no
12271 fi
12272 rm -f conftest*
12273 fi
12274
12275 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12276 #
12277 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12278 if test $ol_cv_dcl_sys_errlist = no ; then
12279         cat >> confdefs.h <<\EOF
12280 #define DECL_SYS_ERRLIST 1
12281 EOF
12282
12283
12284         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12285 echo "configure:12286: checking existence of sys_errlist" >&5
12286 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12287   echo $ac_n "(cached) $ac_c" 1>&6
12288 else
12289   
12290                 cat > conftest.$ac_ext <<EOF
12291 #line 12292 "configure"
12292 #include "confdefs.h"
12293 #include <errno.h>
12294 int main() {
12295 char *c = (char *) *sys_errlist
12296 ; return 0; }
12297 EOF
12298 if { (eval echo configure:12299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12299   rm -rf conftest*
12300   ol_cv_have_sys_errlist=yes
12301 else
12302   echo "configure: failed program was:" >&5
12303   cat conftest.$ac_ext >&5
12304   rm -rf conftest*
12305   ol_cv_have_sys_errlist=no
12306 fi
12307 rm -f conftest*
12308 fi
12309
12310 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12311 fi
12312 if test $ol_cv_have_sys_errlist = yes ; then
12313         cat >> confdefs.h <<\EOF
12314 #define HAVE_SYS_ERRLIST 1
12315 EOF
12316
12317 fi
12318
12319
12320
12321 if test "$ol_enable_debug" != no ; then
12322         cat >> confdefs.h <<\EOF
12323 #define LDAP_DEBUG 1
12324 EOF
12325
12326 fi
12327 if test "$ol_enable_syslog" = yes ; then
12328         cat >> confdefs.h <<\EOF
12329 #define LDAP_SYSLOG 1
12330 EOF
12331
12332 fi
12333 if test "$ol_enable_libui" = yes ; then
12334         cat >> confdefs.h <<\EOF
12335 #define LDAP_LIBUI 1
12336 EOF
12337
12338 fi
12339 if test "$ol_enable_cache" = no ; then
12340         cat >> confdefs.h <<\EOF
12341 #define LDAP_NOCACHE 1
12342 EOF
12343
12344 fi
12345 if test "$ol_enable_dns" != no ; then
12346         cat >> confdefs.h <<\EOF
12347 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12348 EOF
12349
12350 fi
12351 if test "$ol_enable_proctitle" != no ; then
12352         cat >> confdefs.h <<\EOF
12353 #define LDAP_PROCTITLE 1
12354 EOF
12355
12356 fi
12357 if test "$ol_enable_referrals" != no ; then
12358         cat >> confdefs.h <<\EOF
12359 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12360 EOF
12361
12362 fi
12363 if test "$ol_enable_cldap" != no ; then
12364         cat >> confdefs.h <<\EOF
12365 #define LDAP_CONNECTIONLESS 1
12366 EOF
12367
12368 fi
12369
12370 if test "$ol_enable_crypt" != no ; then
12371         cat >> confdefs.h <<\EOF
12372 #define SLAPD_CRYPT 1
12373 EOF
12374
12375 fi
12376 if test "$ol_enable_cleartext" != no ; then
12377         cat >> confdefs.h <<\EOF
12378 #define SLAPD_CLEARTEXT 1
12379 EOF
12380
12381 fi
12382 if test "$ol_enable_phonetic" != no ; then
12383         cat >> confdefs.h <<\EOF
12384 #define SLAPD_PHONETIC 1
12385 EOF
12386
12387 fi
12388 if test "$ol_enable_rlookups" != no ; then
12389         cat >> confdefs.h <<\EOF
12390 #define SLAPD_RLOOKUPS 1
12391 EOF
12392
12393 fi
12394
12395 if test "$ol_link_modules" != no ; then
12396         cat >> confdefs.h <<\EOF
12397 #define SLAPD_MODULES 1
12398 EOF
12399
12400         BUILD_SLAPD=yes
12401 fi
12402
12403 if test "$ol_link_bdb2" != no ; then
12404         cat >> confdefs.h <<\EOF
12405 #define SLAPD_BDB2 1
12406 EOF
12407
12408         BUILD_SLAPD=yes
12409         BUILD_BDB2=yes
12410         if test "$ol_with_bdb2_module" != static ; then
12411                 cat >> confdefs.h <<\EOF
12412 #define SLAPD_BDB2_DYNAMIC 1
12413 EOF
12414
12415                 BUILD_BDB2_DYNAMIC=yes
12416         fi
12417 fi
12418
12419 if test "$ol_enable_ldap" != no ; then
12420         cat >> confdefs.h <<\EOF
12421 #define SLAPD_LDAP 1
12422 EOF
12423
12424         BUILD_SLAPD=yes
12425         BUILD_LDAP=yes
12426         if test "$ol_with_ldap_module" != static ; then
12427                 cat >> confdefs.h <<\EOF
12428 #define SLAPD_LDAP_DYNAMIC 1
12429 EOF
12430
12431                 BUILD_LDAP_DYNAMIC=yes
12432         fi
12433 fi
12434
12435 if test "$ol_link_ldbm" != no ; then
12436         cat >> confdefs.h <<\EOF
12437 #define SLAPD_LDBM 1
12438 EOF
12439
12440         BUILD_SLAPD=yes
12441         BUILD_LDBM=yes
12442         if test "$ol_with_ldbm_module" != static ; then
12443                 cat >> confdefs.h <<\EOF
12444 #define SLAPD_LDBM_DYNAMIC 1
12445 EOF
12446
12447                 BUILD_LDBM_DYNAMIC=yes
12448         fi
12449 fi
12450
12451 if test "$ol_enable_passwd" != no ; then
12452         cat >> confdefs.h <<\EOF
12453 #define SLAPD_PASSWD 1
12454 EOF
12455
12456         BUILD_SLAPD=yes
12457         BUILD_PASSWD=yes
12458         if test "$ol_with_passwd_module" != static ; then
12459                 cat >> confdefs.h <<\EOF
12460 #define SLAPD_PASSWD_DYNAMIC 1
12461 EOF
12462
12463                 BUILD_PASSWD_DYNAMIC=yes
12464         fi
12465 fi
12466
12467 if test "$ol_link_perl" != no ; then
12468         cat >> confdefs.h <<\EOF
12469 #define SLAPD_PERL 1
12470 EOF
12471
12472         BUILD_SLAPD=yes
12473         BUILD_PERL=yes
12474         if test "$ol_with_perl_module" != static ; then
12475                 cat >> confdefs.h <<\EOF
12476 #define SLAPD_PERL_DYNAMIC 1
12477 EOF
12478
12479                 BUILD_PERL_DYNAMIC=yes
12480         fi
12481 fi
12482
12483 if test "$ol_enable_shell" != no ; then
12484         cat >> confdefs.h <<\EOF
12485 #define SLAPD_SHELL 1
12486 EOF
12487
12488         BUILD_SLAPD=yes
12489         BUILD_SHELL=yes
12490         if test "$ol_with_shell_module" != static ; then
12491                 cat >> confdefs.h <<\EOF
12492 #define SLAPD_SHELL_DYNAMIC 1
12493 EOF
12494
12495                 BUILD_SHELL_DYNAMIC=yes
12496         fi
12497 fi
12498
12499 if test "$ol_enable_tcl" != no ; then
12500         cat >> confdefs.h <<\EOF
12501 #define SLAPD_TCL 1
12502 EOF
12503
12504         BUILD_SLAPD=yes
12505         BUILD_TCL=yes
12506         if test "$ol_with_tcl_module" != static; then
12507                 cat >> confdefs.h <<\EOF
12508 #define SLAPD_TCL_DYNAMIC 1
12509 EOF
12510
12511                 BUILD_TCL_DYNAMIC=yes
12512         fi
12513 fi
12514
12515 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12516         $BUILD_SLAPD = yes ; then
12517         BUILD_SLURPD=yes
12518 fi
12519
12520 if test "$ol_link_isode" != no ; then
12521         BUILD_LDAPD=yes
12522 fi
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
12563 trap '' 1 2 15
12564
12565 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12566
12567 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12568 # Let make expand exec_prefix.
12569 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12570
12571 # Any assignment to VPATH causes Sun make to only execute
12572 # the first set of double-colon rules, so remove it if not needed.
12573 # If there is a colon in the path, we need to keep it.
12574 if test "x$srcdir" = x.; then
12575   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12576 fi
12577
12578 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12579
12580 DEFS=-DHAVE_CONFIG_H
12581
12582 # Without the "./", some shells look in PATH for config.status.
12583 : ${CONFIG_STATUS=./config.status}
12584
12585 echo creating $CONFIG_STATUS
12586 rm -f $CONFIG_STATUS
12587 cat > $CONFIG_STATUS <<EOF
12588 #! /bin/sh
12589 # Generated automatically by configure.
12590 # Run this file to recreate the current configuration.
12591 # This directory was configured as follows,
12592 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12593 #
12594 # $0 $ac_configure_args
12595 #
12596 # Compiler output produced by configure, useful for debugging
12597 # configure, is in ./config.log if it exists.
12598
12599 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12600 for ac_option
12601 do
12602   case "\$ac_option" in
12603   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12604     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12605     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12606   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12607     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12608     exit 0 ;;
12609   -help | --help | --hel | --he | --h)
12610     echo "\$ac_cs_usage"; exit 0 ;;
12611   *) echo "\$ac_cs_usage"; exit 1 ;;
12612   esac
12613 done
12614
12615 ac_given_srcdir=$srcdir
12616 ac_given_INSTALL="$INSTALL"
12617
12618 trap 'rm -fr `echo "\
12619 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12620 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12621 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12622 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12623 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12624 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12625 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12626 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12627 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12628 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12629 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12630 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12631 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12632 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12633 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12634 include/Makefile:build/top.mk:include/Makefile.in \
12635 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12636 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12637 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12638 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12639 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12640 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12641 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12642 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12643 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12644 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12645 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12646 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12647 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12648 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12649 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12650 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12651 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12652 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12653 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12654 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12655 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12656 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12657 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12658 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12659 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12660 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12661  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12662 EOF
12663 cat >> $CONFIG_STATUS <<EOF
12664
12665 # Protect against being on the right side of a sed subst in config.status.
12666 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12667  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12668 $ac_vpsub
12669 $extrasub
12670 s%@SHELL@%$SHELL%g
12671 s%@CFLAGS@%$CFLAGS%g
12672 s%@CPPFLAGS@%$CPPFLAGS%g
12673 s%@CXXFLAGS@%$CXXFLAGS%g
12674 s%@FFLAGS@%$FFLAGS%g
12675 s%@DEFS@%$DEFS%g
12676 s%@LDFLAGS@%$LDFLAGS%g
12677 s%@LIBS@%$LIBS%g
12678 s%@exec_prefix@%$exec_prefix%g
12679 s%@prefix@%$prefix%g
12680 s%@program_transform_name@%$program_transform_name%g
12681 s%@bindir@%$bindir%g
12682 s%@sbindir@%$sbindir%g
12683 s%@libexecdir@%$libexecdir%g
12684 s%@datadir@%$datadir%g
12685 s%@sysconfdir@%$sysconfdir%g
12686 s%@sharedstatedir@%$sharedstatedir%g
12687 s%@localstatedir@%$localstatedir%g
12688 s%@libdir@%$libdir%g
12689 s%@includedir@%$includedir%g
12690 s%@oldincludedir@%$oldincludedir%g
12691 s%@infodir@%$infodir%g
12692 s%@mandir@%$mandir%g
12693 s%@host@%$host%g
12694 s%@host_alias@%$host_alias%g
12695 s%@host_cpu@%$host_cpu%g
12696 s%@host_vendor@%$host_vendor%g
12697 s%@host_os@%$host_os%g
12698 s%@target@%$target%g
12699 s%@target_alias@%$target_alias%g
12700 s%@target_cpu@%$target_cpu%g
12701 s%@target_vendor@%$target_vendor%g
12702 s%@target_os@%$target_os%g
12703 s%@build@%$build%g
12704 s%@build_alias@%$build_alias%g
12705 s%@build_cpu@%$build_cpu%g
12706 s%@build_vendor@%$build_vendor%g
12707 s%@build_os@%$build_os%g
12708 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12709 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12710 s%@INSTALL_DATA@%$INSTALL_DATA%g
12711 s%@PACKAGE@%$PACKAGE%g
12712 s%@VERSION@%$VERSION%g
12713 s%@ACLOCAL@%$ACLOCAL%g
12714 s%@AUTOCONF@%$AUTOCONF%g
12715 s%@AUTOMAKE@%$AUTOMAKE%g
12716 s%@AUTOHEADER@%$AUTOHEADER%g
12717 s%@MAKEINFO@%$MAKEINFO%g
12718 s%@install_sh@%$install_sh%g
12719 s%@AMTAR@%$AMTAR%g
12720 s%@AWK@%$AWK%g
12721 s%@AMTARFLAGS@%$AMTARFLAGS%g
12722 s%@SET_MAKE@%$SET_MAKE%g
12723 s%@top_builddir@%$top_builddir%g
12724 s%@ldap_subdir@%$ldap_subdir%g
12725 s%@CC@%$CC%g
12726 s%@RANLIB@%$RANLIB%g
12727 s%@LD@%$LD%g
12728 s%@NM@%$NM%g
12729 s%@LN_S@%$LN_S%g
12730 s%@LIBTOOL@%$LIBTOOL%g
12731 s%@LN_H@%$LN_H%g
12732 s%@SENDMAIL@%$SENDMAIL%g
12733 s%@EDITOR@%$EDITOR%g
12734 s%@FINGER@%$FINGER%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%@GLIBCONFIG@%$GLIBCONFIG%g
12742 s%@PEPSY@%$PEPSY%g
12743 s%@LIBOBJS@%$LIBOBJS%g
12744 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12745 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12746 s%@BUILD_BDB2@%$BUILD_BDB2%g
12747 s%@BUILD_LDAP@%$BUILD_LDAP%g
12748 s%@BUILD_LDBM@%$BUILD_LDBM%g
12749 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12750 s%@BUILD_PERL@%$BUILD_PERL%g
12751 s%@BUILD_SHELL@%$BUILD_SHELL%g
12752 s%@BUILD_TCL@%$BUILD_TCL%g
12753 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12754 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12755 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12756 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12757 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12758 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12759 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12760 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12761 s%@LDAP_LIBS@%$LDAP_LIBS%g
12762 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12763 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12764 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12765 s%@LDBM_LIBS@%$LDBM_LIBS%g
12766 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12767 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12768 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12769 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12770 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12771 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12772 s%@KRB_LIBS@%$KRB_LIBS%g
12773 s%@READLINE_LIBS@%$READLINE_LIBS%g
12774 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12775 s%@TLS_LIBS@%$TLS_LIBS%g
12776
12777 CEOF
12778 EOF
12779
12780 cat >> $CONFIG_STATUS <<\EOF
12781
12782 # Split the substitutions into bite-sized pieces for seds with
12783 # small command number limits, like on Digital OSF/1 and HP-UX.
12784 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12785 ac_file=1 # Number of current file.
12786 ac_beg=1 # First line for current file.
12787 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12788 ac_more_lines=:
12789 ac_sed_cmds=""
12790 while $ac_more_lines; do
12791   if test $ac_beg -gt 1; then
12792     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12793   else
12794     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12795   fi
12796   if test ! -s conftest.s$ac_file; then
12797     ac_more_lines=false
12798     rm -f conftest.s$ac_file
12799   else
12800     if test -z "$ac_sed_cmds"; then
12801       ac_sed_cmds="sed -f conftest.s$ac_file"
12802     else
12803       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12804     fi
12805     ac_file=`expr $ac_file + 1`
12806     ac_beg=$ac_end
12807     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12808   fi
12809 done
12810 if test -z "$ac_sed_cmds"; then
12811   ac_sed_cmds=cat
12812 fi
12813 EOF
12814
12815 cat >> $CONFIG_STATUS <<EOF
12816
12817 CONFIG_FILES=\${CONFIG_FILES-"\
12818 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12819 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12820 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12821 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12822 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12823 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12824 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12825 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12826 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12827 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12828 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12829 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12830 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12831 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12832 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12833 include/Makefile:build/top.mk:include/Makefile.in \
12834 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12835 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12836 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12837 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12838 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12839 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12840 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12841 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12842 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12843 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12844 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12845 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12846 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12847 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12848 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12849 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12850 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12851 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12852 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12853 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12854 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12855 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12856 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12857 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12858 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12859 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12860 "}
12861 EOF
12862 cat >> $CONFIG_STATUS <<\EOF
12863 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12864   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12865   case "$ac_file" in
12866   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12867        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12868   *) ac_file_in="${ac_file}.in" ;;
12869   esac
12870
12871   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12872
12873   # Remove last slash and all that follows it.  Not all systems have dirname.
12874   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12875   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12876     # The file is in a subdirectory.
12877     test ! -d "$ac_dir" && mkdir "$ac_dir"
12878     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12879     # A "../" for each directory in $ac_dir_suffix.
12880     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12881   else
12882     ac_dir_suffix= ac_dots=
12883   fi
12884
12885   case "$ac_given_srcdir" in
12886   .)  srcdir=.
12887       if test -z "$ac_dots"; then top_srcdir=.
12888       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12889   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12890   *) # Relative path.
12891     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12892     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12893   esac
12894
12895   case "$ac_given_INSTALL" in
12896   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12897   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12898   esac
12899
12900   echo creating "$ac_file"
12901   rm -f "$ac_file"
12902   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12903   case "$ac_file" in
12904   *Makefile*) ac_comsub="1i\\
12905 # $configure_input" ;;
12906   *) ac_comsub= ;;
12907   esac
12908
12909   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12910   sed -e "$ac_comsub
12911 s%@configure_input@%$configure_input%g
12912 s%@srcdir@%$srcdir%g
12913 s%@top_srcdir@%$top_srcdir%g
12914 s%@INSTALL@%$INSTALL%g
12915 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12916 fi; done
12917 rm -f conftest.s*
12918
12919 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12920 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12921 #
12922 # ac_d sets the value in "#define NAME VALUE" lines.
12923 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12924 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12925 ac_dC='\3'
12926 ac_dD='%g'
12927 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12928 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12929 ac_uB='\([      ]\)%\1#\2define\3'
12930 ac_uC=' '
12931 ac_uD='\4%g'
12932 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12933 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12934 ac_eB='$%\1#\2define\3'
12935 ac_eC=' '
12936 ac_eD='%g'
12937
12938 if test "${CONFIG_HEADERS+set}" != set; then
12939 EOF
12940 cat >> $CONFIG_STATUS <<EOF
12941   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12942 EOF
12943 cat >> $CONFIG_STATUS <<\EOF
12944 fi
12945 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12946   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12947   case "$ac_file" in
12948   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12949        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12950   *) ac_file_in="${ac_file}.in" ;;
12951   esac
12952
12953   echo creating $ac_file
12954
12955   rm -f conftest.frag conftest.in conftest.out
12956   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12957   cat $ac_file_inputs > conftest.in
12958
12959 EOF
12960
12961 # Transform confdefs.h into a sed script conftest.vals that substitutes
12962 # the proper values into config.h.in to produce config.h.  And first:
12963 # Protect against being on the right side of a sed subst in config.status.
12964 # Protect against being in an unquoted here document in config.status.
12965 rm -f conftest.vals
12966 cat > conftest.hdr <<\EOF
12967 s/[\\&%]/\\&/g
12968 s%[\\$`]%\\&%g
12969 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12970 s%ac_d%ac_u%gp
12971 s%ac_u%ac_e%gp
12972 EOF
12973 sed -n -f conftest.hdr confdefs.h > conftest.vals
12974 rm -f conftest.hdr
12975
12976 # This sed command replaces #undef with comments.  This is necessary, for
12977 # example, in the case of _POSIX_SOURCE, which is predefined and required
12978 # on some systems where configure will not decide to define it.
12979 cat >> conftest.vals <<\EOF
12980 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12981 EOF
12982
12983 # Break up conftest.vals because some shells have a limit on
12984 # the size of here documents, and old seds have small limits too.
12985
12986 rm -f conftest.tail
12987 while :
12988 do
12989   ac_lines=`grep -c . conftest.vals`
12990   # grep -c gives empty output for an empty file on some AIX systems.
12991   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12992   # Write a limited-size here document to conftest.frag.
12993   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12994   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12995   echo 'CEOF
12996   sed -f conftest.frag conftest.in > conftest.out
12997   rm -f conftest.in
12998   mv conftest.out conftest.in
12999 ' >> $CONFIG_STATUS
13000   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13001   rm -f conftest.vals
13002   mv conftest.tail conftest.vals
13003 done
13004 rm -f conftest.vals
13005
13006 cat >> $CONFIG_STATUS <<\EOF
13007   rm -f conftest.frag conftest.h
13008   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13009   cat conftest.in >> conftest.h
13010   rm -f conftest.in
13011   if cmp -s $ac_file conftest.h 2>/dev/null; then
13012     echo "$ac_file is unchanged"
13013     rm -f conftest.h
13014   else
13015     # Remove last slash and all that follows it.  Not all systems have dirname.
13016       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13017       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13018       # The file is in a subdirectory.
13019       test ! -d "$ac_dir" && mkdir "$ac_dir"
13020     fi
13021     rm -f $ac_file
13022     mv conftest.h $ac_file
13023   fi
13024 fi; done
13025
13026 EOF
13027 cat >> $CONFIG_STATUS <<EOF
13028
13029 EOF
13030 cat >> $CONFIG_STATUS <<\EOF
13031
13032 date > stamp-h
13033 echo Please \"make depend\" to build dependencies
13034
13035 exit 0
13036 EOF
13037 chmod +x $CONFIG_STATUS
13038 rm -fr confdefs* $ac_clean_files
13039 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13040