]> git.sur5r.net Git - openldap/blob - configure
remove ldapd(8) from 2.0
[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 SLAPD Options:"
47 ac_help="$ac_help
48   --enable-slapd        enable building slapd (yes)"
49 ac_help="$ac_help
50     --enable-cleartext  enable cleartext passwords (yes)"
51 ac_help="$ac_help
52     --enable-crypt      enable crypt(3) passwords (auto)"
53 ac_help="$ac_help
54     --enable-modules    enable dynamic module support (no)"
55 ac_help="$ac_help
56     --enable-phonetic   enable phonetic/soundex (no)"
57 ac_help="$ac_help
58     --enable-rlookups   enable reverse lookups (auto)"
59 ac_help="$ac_help
60     --enable-wrappers   enable tcp wrapper support (no)"
61 ac_help="$ac_help
62     --enable-bdb2       enable bdb2 backend (no)"
63 ac_help="$ac_help
64       --with-bdb2-module        module type (static)"
65 ac_help="$ac_help
66     --enable-ldap       enable ldap backend (no)"
67 ac_help="$ac_help
68       --with-ldap-module        module type (static)"
69 ac_help="$ac_help
70     --enable-ldbm       enable ldbm backend (yes)"
71 ac_help="$ac_help
72       --with-ldbm-module        module type (static)"
73 ac_help="$ac_help
74       --with-ldbm-api   use LDBM API (auto)"
75 ac_help="$ac_help
76       --with-ldbm-type  use LDBM type (auto)"
77 ac_help="$ac_help
78     --enable-passwd     enable passwd backend (no)"
79 ac_help="$ac_help
80       --with-passwd-module      module type (static)"
81 ac_help="$ac_help
82     --enable-perl       enable perl backend (no)"
83 ac_help="$ac_help
84       --with-perl-module        module type (static)"
85 ac_help="$ac_help
86     --enable-shell      enable shell backend (no)"
87 ac_help="$ac_help
88       --with-shell-module       module type (static)"
89 ac_help="$ac_help
90     --enable-tcl        enable tcl backend (no)"
91 ac_help="$ac_help
92       --with-tcl-module module type (static)"
93 ac_help="$ac_help
94 SLURPD Options:"
95 ac_help="$ac_help
96   --enable-slurpd       enable building slurpd (auto)"
97 ac_help="$ac_help
98 Library Generation & Linking Options"
99 ac_help="$ac_help
100   --enable-static[=PKGS]  build static libraries [default=yes]"
101 ac_help="$ac_help
102   --enable-shared[=PKGS]  build shared libraries [default=yes]"
103 ac_help="$ac_help
104   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
105 ac_help="$ac_help
106   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
107 ac_help="$ac_help
108   --disable-libtool-lock  avoid locking (might break parallel builds)"
109
110 # Initialize some variables set by options.
111 # The variables have the same names as the options, with
112 # dashes changed to underlines.
113 build=NONE
114 cache_file=./config.cache
115 exec_prefix=NONE
116 host=NONE
117 no_create=
118 nonopt=NONE
119 no_recursion=
120 prefix=NONE
121 program_prefix=NONE
122 program_suffix=NONE
123 program_transform_name=s,x,x,
124 silent=
125 site=
126 srcdir=
127 target=NONE
128 verbose=
129 x_includes=NONE
130 x_libraries=NONE
131 bindir='${exec_prefix}/bin'
132 sbindir='${exec_prefix}/sbin'
133 libexecdir='${exec_prefix}/libexec'
134 datadir='${prefix}/share'
135 sysconfdir='${prefix}/etc'
136 sharedstatedir='${prefix}/com'
137 localstatedir='${prefix}/var'
138 libdir='${exec_prefix}/lib'
139 includedir='${prefix}/include'
140 oldincludedir='/usr/include'
141 infodir='${prefix}/info'
142 mandir='${prefix}/man'
143
144 # Initialize some other variables.
145 subdirs=
146 MFLAGS= MAKEFLAGS=
147 SHELL=${CONFIG_SHELL-/bin/sh}
148 # Maximum number of lines to put in a shell here document.
149 ac_max_here_lines=12
150
151 ac_prev=
152 for ac_option
153 do
154
155   # If the previous option needs an argument, assign it.
156   if test -n "$ac_prev"; then
157     eval "$ac_prev=\$ac_option"
158     ac_prev=
159     continue
160   fi
161
162   case "$ac_option" in
163   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
164   *) ac_optarg= ;;
165   esac
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case "$ac_option" in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir="$ac_optarg" ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build="$ac_optarg" ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file="$ac_optarg" ;;
187
188   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
189     ac_prev=datadir ;;
190   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
191   | --da=*)
192     datadir="$ac_optarg" ;;
193
194   -disable-* | --disable-*)
195     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
196     # Reject names that are not valid shell variable names.
197     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
198       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199     fi
200     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
201     eval "enable_${ac_feature}=no" ;;
202
203   -enable-* | --enable-*)
204     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
205     # Reject names that are not valid shell variable names.
206     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
207       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208     fi
209     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
210     case "$ac_option" in
211       *=*) ;;
212       *) ac_optarg=yes ;;
213     esac
214     eval "enable_${ac_feature}='$ac_optarg'" ;;
215
216   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
217   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
218   | --exec | --exe | --ex)
219     ac_prev=exec_prefix ;;
220   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
221   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
222   | --exec=* | --exe=* | --ex=*)
223     exec_prefix="$ac_optarg" ;;
224
225   -gas | --gas | --ga | --g)
226     # Obsolete; use --with-gas.
227     with_gas=yes ;;
228
229   -help | --help | --hel | --he)
230     # Omit some internal or obsolete options to make the list less imposing.
231     # This message is too long to be a string in the A/UX 3.1 sh.
232     cat << EOF
233 Usage: configure [options] [host]
234 Options: [defaults in brackets after descriptions]
235 Configuration:
236   --cache-file=FILE       cache test results in FILE
237   --help                  print this message
238   --no-create             do not create output files
239   --quiet, --silent       do not print \`checking...' messages
240   --version               print the version of autoconf that created configure
241 Directory and file names:
242   --prefix=PREFIX         install architecture-independent files in PREFIX
243                           [$ac_default_prefix]
244   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
245                           [same as prefix]
246   --bindir=DIR            user executables in DIR [EPREFIX/bin]
247   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
248   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
249   --datadir=DIR           read-only architecture-independent data in DIR
250                           [PREFIX/share]
251   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
252   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
253                           [PREFIX/com]
254   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
255   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
256   --includedir=DIR        C header files in DIR [PREFIX/include]
257   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
258   --infodir=DIR           info documentation in DIR [PREFIX/info]
259   --mandir=DIR            man documentation in DIR [PREFIX/man]
260   --srcdir=DIR            find the sources in DIR [configure dir or ..]
261   --program-prefix=PREFIX prepend PREFIX to installed program names
262   --program-suffix=SUFFIX append SUFFIX to installed program names
263   --program-transform-name=PROGRAM
264                           run sed PROGRAM on installed program names
265 EOF
266     cat << EOF
267 Host type:
268   --build=BUILD           configure for building on BUILD [BUILD=HOST]
269   --host=HOST             configure for HOST [guessed]
270   --target=TARGET         configure for TARGET [TARGET=HOST]
271 Features and packages:
272   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
273   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
274   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
275   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
276   --x-includes=DIR        X include files are in DIR
277   --x-libraries=DIR       X library files are in DIR
278 EOF
279     if test -n "$ac_help"; then
280       echo "--enable and --with options recognized:$ac_help"
281     fi
282     exit 0 ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host="$ac_optarg" ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir="$ac_optarg" ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir="$ac_optarg" ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir="$ac_optarg" ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir="$ac_optarg" ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir="$ac_optarg" ;;
321
322   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323     ac_prev=mandir ;;
324   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
325     mandir="$ac_optarg" ;;
326
327   -nfp | --nfp | --nf)
328     # Obsolete; use --without-fp.
329     with_fp=no ;;
330
331   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
332   | --no-cr | --no-c)
333     no_create=yes ;;
334
335   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
336   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
337     no_recursion=yes ;;
338
339   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
340   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
341   | --oldin | --oldi | --old | --ol | --o)
342     ac_prev=oldincludedir ;;
343   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
344   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
345   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
346     oldincludedir="$ac_optarg" ;;
347
348   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349     ac_prev=prefix ;;
350   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
351     prefix="$ac_optarg" ;;
352
353   -program-prefix | --program-prefix | --program-prefi | --program-pref \
354   | --program-pre | --program-pr | --program-p)
355     ac_prev=program_prefix ;;
356   -program-prefix=* | --program-prefix=* | --program-prefi=* \
357   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
358     program_prefix="$ac_optarg" ;;
359
360   -program-suffix | --program-suffix | --program-suffi | --program-suff \
361   | --program-suf | --program-su | --program-s)
362     ac_prev=program_suffix ;;
363   -program-suffix=* | --program-suffix=* | --program-suffi=* \
364   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
365     program_suffix="$ac_optarg" ;;
366
367   -program-transform-name | --program-transform-name \
368   | --program-transform-nam | --program-transform-na \
369   | --program-transform-n | --program-transform- \
370   | --program-transform | --program-transfor \
371   | --program-transfo | --program-transf \
372   | --program-trans | --program-tran \
373   | --progr-tra | --program-tr | --program-t)
374     ac_prev=program_transform_name ;;
375   -program-transform-name=* | --program-transform-name=* \
376   | --program-transform-nam=* | --program-transform-na=* \
377   | --program-transform-n=* | --program-transform-=* \
378   | --program-transform=* | --program-transfor=* \
379   | --program-transfo=* | --program-transf=* \
380   | --program-trans=* | --program-tran=* \
381   | --progr-tra=* | --program-tr=* | --program-t=*)
382     program_transform_name="$ac_optarg" ;;
383
384   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
385   | -silent | --silent | --silen | --sile | --sil)
386     silent=yes ;;
387
388   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389     ac_prev=sbindir ;;
390   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391   | --sbi=* | --sb=*)
392     sbindir="$ac_optarg" ;;
393
394   -sharedstatedir | --sharedstatedir | --sharedstatedi \
395   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
396   | --sharedst | --shareds | --shared | --share | --shar \
397   | --sha | --sh)
398     ac_prev=sharedstatedir ;;
399   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
400   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
401   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402   | --sha=* | --sh=*)
403     sharedstatedir="$ac_optarg" ;;
404
405   -site | --site | --sit)
406     ac_prev=site ;;
407   -site=* | --site=* | --sit=*)
408     site="$ac_optarg" ;;
409
410   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411     ac_prev=srcdir ;;
412   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
413     srcdir="$ac_optarg" ;;
414
415   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
416   | --syscon | --sysco | --sysc | --sys | --sy)
417     ac_prev=sysconfdir ;;
418   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
419   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
420     sysconfdir="$ac_optarg" ;;
421
422   -target | --target | --targe | --targ | --tar | --ta | --t)
423     ac_prev=target ;;
424   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
425     target="$ac_optarg" ;;
426
427   -v | -verbose | --verbose | --verbos | --verbo | --verb)
428     verbose=yes ;;
429
430   -version | --version | --versio | --versi | --vers)
431     echo "configure generated by autoconf version 2.13.1"
432     exit 0 ;;
433
434   -with-* | --with-*)
435     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
436     # Reject names that are not valid shell variable names.
437     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
438       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439     fi
440     ac_package=`echo $ac_package| sed 's/-/_/g'`
441     case "$ac_option" in
442       *=*) ;;
443       *) ac_optarg=yes ;;
444     esac
445     eval "with_${ac_package}='$ac_optarg'" ;;
446
447   -without-* | --without-*)
448     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
449     # Reject names that are not valid shell variable names.
450     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
451       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452     fi
453     ac_package=`echo $ac_package| sed 's/-/_/g'`
454     eval "with_${ac_package}=no" ;;
455
456   --x)
457     # Obsolete; use --with-x.
458     with_x=yes ;;
459
460   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
461   | --x-incl | --x-inc | --x-in | --x-i)
462     ac_prev=x_includes ;;
463   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
464   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
465     x_includes="$ac_optarg" ;;
466
467   -x-libraries | --x-libraries | --x-librarie | --x-librari \
468   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
469     ac_prev=x_libraries ;;
470   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
471   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
472     x_libraries="$ac_optarg" ;;
473
474   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
475     ;;
476
477   *)
478     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
479       echo "configure: warning: $ac_option: invalid host type" 1>&2
480     fi
481     if test "x$nonopt" != xNONE; then
482       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
483     fi
484     nonopt="$ac_option"
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
492 fi
493
494 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495
496 # File descriptor usage:
497 # 0 standard input
498 # 1 file creation
499 # 2 errors and warnings
500 # 3 some systems may open it to /dev/tty
501 # 4 used on the Kubota Titan
502 # 6 checking for... messages and results
503 # 5 compiler messages saved in config.log
504 if test "$silent" = yes; then
505   exec 6>/dev/null
506 else
507   exec 6>&1
508 fi
509 exec 5>./config.log
510
511 echo "\
512 This file contains any messages produced by compilers while
513 running configure, to aid debugging if configure makes a mistake.
514 " 1>&5
515
516 # Strip out --no-create and --no-recursion so they do not pile up.
517 # Also quote any args containing shell metacharacters.
518 ac_configure_args=
519 for ac_arg
520 do
521   case "$ac_arg" in
522   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
523   | --no-cr | --no-c) ;;
524   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
525   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
526   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
527   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
528   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
529   esac
530 done
531
532 # NLS nuisances.
533 # Only set these to C if already set.  These must not be set unconditionally
534 # because not all systems understand e.g. LANG=C (notably SCO).
535 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
536 # Non-C LC_CTYPE values break the ctype check.
537 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
538 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
539 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
540 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
541
542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
543 rm -rf conftest* confdefs.h
544 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
545 echo > confdefs.h
546
547 # A filename unique to this package, relative to the directory that
548 # configure is in, which we can look for to find out if srcdir is correct.
549 ac_unique_file=build/version
550
551 # Find the source files, if location was not specified.
552 if test -z "$srcdir"; then
553   ac_srcdir_defaulted=yes
554   # Try the directory containing this script, then its parent.
555   ac_prog=$0
556   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
557   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
558   srcdir=$ac_confdir
559   if test ! -r $srcdir/$ac_unique_file; then
560     srcdir=..
561   fi
562 else
563   ac_srcdir_defaulted=no
564 fi
565 if test ! -r $srcdir/$ac_unique_file; then
566   if test "$ac_srcdir_defaulted" = yes; then
567     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
568   else
569     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
570   fi
571 fi
572 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573
574 # Prefer explicitly selected file to automatically selected ones.
575 if test -z "$CONFIG_SITE"; then
576   if test "x$prefix" != xNONE; then
577     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
578   else
579     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
580   fi
581 fi
582 for ac_site_file in $CONFIG_SITE; do
583   if test -r "$ac_site_file"; then
584     echo "loading site script $ac_site_file"
585     . "$ac_site_file"
586   fi
587 done
588
589
590 ac_ext=c
591 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
592 ac_cpp='$CPP $CPPFLAGS'
593 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
594 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
595 cross_compiling=$ac_cv_prog_cc_cross
596
597 ac_exeext=
598 ac_objext=o
599 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
600   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
601   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
602     ac_n= ac_c='
603 ' ac_t='        '
604   else
605     ac_n=-n ac_c= ac_t=
606   fi
607 else
608   ac_n= ac_c='\c' ac_t=
609 fi
610
611 ac_aux_dir=
612 for ac_dir in build $srcdir/build; do
613   if test -f $ac_dir/install-sh; then
614     ac_aux_dir=$ac_dir
615     ac_install_sh="$ac_aux_dir/install-sh -c"
616     break
617   elif 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   fi
622 done
623 if test -z "$ac_aux_dir"; then
624   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
625 fi
626 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
627 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
628 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
629
630 OL_VERSION=`cat $ac_aux_dir/version`
631 if test -z "$OL_VERSION"; then
632         { echo "configure: error: could not determine version" 1>&2; exit 1; }
633 fi
634
635
636 echo $ac_n "checking host system type""... $ac_c" 1>&6
637 echo "configure:638: checking host system type" >&5
638 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
639
640 # Make sure we can run config.sub.
641   if $ac_config_sub sun4 >/dev/null 2>&1; then :
642     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
643   fi
644
645   ac_cv_host_alias=$host
646   case "$ac_cv_host_alias" in
647   NONE)
648     case $nonopt in
649     NONE)
650       if ac_cv_host_alias=`$ac_config_guess`; then :
651       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
652       fi ;;
653     *) ac_cv_host_alias=$nonopt ;;
654     esac ;;
655   esac
656
657   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
658   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
659   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
660   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
661 else
662   echo $ac_n "(cached) $ac_c" 1>&6
663 fi
664
665 echo "$ac_t""$ac_cv_host" 1>&6
666
667 host=$ac_cv_host
668 host_alias=$ac_cv_host_alias
669 host_cpu=$ac_cv_host_cpu
670 host_vendor=$ac_cv_host_vendor
671 host_os=$ac_cv_host_os
672
673
674
675
676
677 echo $ac_n "checking target system type""... $ac_c" 1>&6
678 echo "configure:679: checking target system type" >&5
679 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
680
681 # Make sure we can run config.sub.
682   if $ac_config_sub sun4 >/dev/null 2>&1; then :
683     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
684   fi
685
686   ac_cv_target_alias=$target
687   case "$ac_cv_target_alias" in
688   NONE)
689     case $nonopt in
690     NONE)
691       ac_cv_target_alias=$host_alias ;;
692
693     *) ac_cv_target_alias=$nonopt ;;
694     esac ;;
695   esac
696
697   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
698   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
699   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
700   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
701 else
702   echo $ac_n "(cached) $ac_c" 1>&6
703 fi
704
705 echo "$ac_t""$ac_cv_target" 1>&6
706
707 target=$ac_cv_target
708 target_alias=$ac_cv_target_alias
709 target_cpu=$ac_cv_target_cpu
710 target_vendor=$ac_cv_target_vendor
711 target_os=$ac_cv_target_os
712
713
714
715
716
717 echo $ac_n "checking build system type""... $ac_c" 1>&6
718 echo "configure:719: checking build system type" >&5
719 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
720
721 # Make sure we can run config.sub.
722   if $ac_config_sub sun4 >/dev/null 2>&1; then :
723     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
724   fi
725
726   ac_cv_build_alias=$build
727   case "$ac_cv_build_alias" in
728   NONE)
729     case $nonopt in
730     NONE)
731       ac_cv_build_alias=$host_alias ;;
732
733     *) ac_cv_build_alias=$nonopt ;;
734     esac ;;
735   esac
736
737   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
738   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
739   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
740   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
741 else
742   echo $ac_n "(cached) $ac_c" 1>&6
743 fi
744
745 echo "$ac_t""$ac_cv_build" 1>&6
746
747 build=$ac_cv_build
748 build_alias=$ac_cv_build_alias
749 build_cpu=$ac_cv_build_cpu
750 build_vendor=$ac_cv_build_vendor
751 build_os=$ac_cv_build_os
752
753
754
755
756
757 # Do some error checking and defaulting for the host and target type.
758 # The inputs are:
759 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
760 #
761 # The rules are:
762 # 1. You are not allowed to specify --host, --target, and nonopt at the
763 #    same time.
764 # 2. Host defaults to nonopt.
765 # 3. If nonopt is not specified, then host defaults to the current host,
766 #    as determined by config.guess.
767 # 4. Target and build default to nonopt.
768 # 5. If nonopt is not specified, then target and build default to host.
769
770 # The aliases save the names the user supplied, while $host etc.
771 # will get canonicalized.
772 case $host---$target---$nonopt in
773 NONE---*---* | *---NONE---* | *---*---NONE) ;;
774 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
775 esac
776
777 test "$host_alias" != "$target_alias" &&
778   test "$program_prefix$program_suffix$program_transform_name" = \
779     NONENONEs,x,x, &&
780   program_prefix=${target_alias}-
781
782
783 # Find a good install program.  We prefer a C program (faster),
784 # so one script is as good as another.  But avoid the broken or
785 # incompatible versions:
786 # SysV /etc/install, /usr/sbin/install
787 # SunOS /usr/etc/install
788 # IRIX /sbin/install
789 # AIX /bin/install
790 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
791 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
792 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
793 # ./install, which can be erroneously created by make from ./install.sh.
794 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
795 echo "configure:796: checking for a BSD compatible install" >&5
796 if test -z "$INSTALL"; then
797 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
798   echo $ac_n "(cached) $ac_c" 1>&6
799 else
800     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
801   for ac_dir in $PATH; do
802     # Account for people who put trailing slashes in PATH elements.
803     case "$ac_dir/" in
804     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
805     *)
806       # OSF1 and SCO ODT 3.0 have their own names for install.
807       # Don't use installbsd from OSF since it installs stuff as root
808       # by default.
809       for ac_prog in ginstall scoinst install; do
810         if test -f $ac_dir/$ac_prog; then
811           if test $ac_prog = install &&
812             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
813             # AIX install.  It has an incompatible calling convention.
814             :
815           elif test $ac_prog = install &&
816             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
817             # program-specific install script used by HP pwplus--don't use.
818             :
819           else
820             ac_cv_path_install="$ac_dir/$ac_prog -c"
821             break 2
822           fi
823         fi
824       done
825       ;;
826     esac
827   done
828   IFS="$ac_save_IFS"
829
830 fi
831   if test "${ac_cv_path_install+set}" = set; then
832     INSTALL="$ac_cv_path_install"
833   else
834     # As a last resort, use the slow shell script.  We don't cache a
835     # path for INSTALL within a source directory, because that will
836     # break other packages using the cache if that directory is
837     # removed, or if the path is relative.
838     INSTALL="$ac_install_sh"
839   fi
840 fi
841 echo "$ac_t""$INSTALL" 1>&6
842
843 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
844 # It thinks the first close brace ends the variable substitution.
845 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
846
847 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
848
849 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
850
851 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
852 echo "configure:853: checking whether build environment is sane" >&5
853 # Just in case
854 sleep 1
855 echo timestamp > conftestfile
856 # Do `set' in a subshell so we don't clobber the current shell's
857 # arguments.  Must try -L first in case configure is actually a
858 # symlink; some systems play weird games with the mod time of symlinks
859 # (eg FreeBSD returns the mod time of the symlink's containing
860 # directory).
861 if (
862    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
863    if test "$*" = "X"; then
864       # -L didn't work.
865       set X `ls -t $srcdir/configure conftestfile`
866    fi
867    if test "$*" != "X $srcdir/configure conftestfile" \
868       && test "$*" != "X conftestfile $srcdir/configure"; then
869
870       # If neither matched, then we have a broken ls.  This can happen
871       # if, for instance, CONFIG_SHELL is bash and it inherits a
872       # broken ls alias from the environment.  This has actually
873       # happened.  Such a system could not be considered "sane".
874       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
875 alias in your environment" 1>&2; exit 1; }
876    fi
877
878    test "$2" = conftestfile
879    )
880 then
881    # Ok.
882    :
883 else
884    { echo "configure: error: newly created file is older than distributed files!
885 Check your system clock" 1>&2; exit 1; }
886 fi
887 rm -f conftest*
888 echo "$ac_t""yes" 1>&6
889 if test "$program_transform_name" = s,x,x,; then
890   program_transform_name=
891 else
892   # Double any \ or $.  echo might interpret backslashes.
893   cat <<\EOF_SED > conftestsed
894 s,\\,\\\\,g; s,\$,$$,g
895 EOF_SED
896   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
897   rm -f conftestsed
898 fi
899 test "$program_prefix" != NONE &&
900   program_transform_name="s,^,${program_prefix},;$program_transform_name"
901 # Use a double $ so make ignores it.
902 test "$program_suffix" != NONE &&
903   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
904
905 # sed with no file args requires a program.
906 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
907
908 for ac_prog in mawk gawk nawk awk
909 do
910 # Extract the first word of "$ac_prog", so it can be a program name with args.
911 set dummy $ac_prog; ac_word=$2
912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
913 echo "configure:914: checking for $ac_word" >&5
914 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
915   echo $ac_n "(cached) $ac_c" 1>&6
916 else
917   if test -n "$AWK"; then
918   ac_cv_prog_AWK="$AWK" # Let the user override the test.
919 else
920   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
921   ac_dummy="$PATH"
922   for ac_dir in $ac_dummy; do
923     test -z "$ac_dir" && ac_dir=.
924     if test -f $ac_dir/$ac_word; then
925       ac_cv_prog_AWK="$ac_prog"
926       break
927     fi
928   done
929   IFS="$ac_save_ifs"
930 fi
931 fi
932 AWK="$ac_cv_prog_AWK"
933 if test -n "$AWK"; then
934   echo "$ac_t""$AWK" 1>&6
935 else
936   echo "$ac_t""no" 1>&6
937 fi
938
939 test -n "$AWK" && break
940 done
941
942 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
943 echo "configure:944: checking whether ${MAKE-make} sets \${MAKE}" >&5
944 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
945 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
946   echo $ac_n "(cached) $ac_c" 1>&6
947 else
948   cat > conftestmake <<\EOF
949 all:
950         @echo 'ac_maketemp="${MAKE}"'
951 EOF
952 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
953 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
954 if test -n "$ac_maketemp"; then
955   eval ac_cv_prog_make_${ac_make}_set=yes
956 else
957   eval ac_cv_prog_make_${ac_make}_set=no
958 fi
959 rm -f conftestmake
960 fi
961 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
962   echo "$ac_t""yes" 1>&6
963   SET_MAKE=
964 else
965   echo "$ac_t""no" 1>&6
966   SET_MAKE="MAKE=${MAKE-make}"
967 fi
968
969
970
971 PACKAGE=OpenLDAP
972
973 VERSION=$OL_VERSION
974
975 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
976   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
977 fi
978
979
980
981 missing_dir=`cd $ac_aux_dir && pwd`
982 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
983 echo "configure:984: checking for working aclocal" >&5
984 # Run test in a subshell; some versions of sh will print an error if
985 # an executable is not found, even if stderr is redirected.
986 # Redirect stdin to placate older versions of autoconf.  Sigh.
987 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
988    ACLOCAL=aclocal
989    echo "$ac_t""found" 1>&6
990 else
991    ACLOCAL="$missing_dir/missing aclocal"
992    echo "$ac_t""missing" 1>&6
993 fi
994
995 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
996 echo "configure:997: checking for working autoconf" >&5
997 # Run test in a subshell; some versions of sh will print an error if
998 # an executable is not found, even if stderr is redirected.
999 # Redirect stdin to placate older versions of autoconf.  Sigh.
1000 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1001    AUTOCONF=autoconf
1002    echo "$ac_t""found" 1>&6
1003 else
1004    AUTOCONF="$missing_dir/missing autoconf"
1005    echo "$ac_t""missing" 1>&6
1006 fi
1007
1008 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1009 echo "configure:1010: checking for working automake" >&5
1010 # Run test in a subshell; some versions of sh will print an error if
1011 # an executable is not found, even if stderr is redirected.
1012 # Redirect stdin to placate older versions of autoconf.  Sigh.
1013 if (automake --version) < /dev/null > /dev/null 2>&1; then
1014    AUTOMAKE=automake
1015    echo "$ac_t""found" 1>&6
1016 else
1017    AUTOMAKE="$missing_dir/missing automake"
1018    echo "$ac_t""missing" 1>&6
1019 fi
1020
1021 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1022 echo "configure:1023: checking for working autoheader" >&5
1023 # Run test in a subshell; some versions of sh will print an error if
1024 # an executable is not found, even if stderr is redirected.
1025 # Redirect stdin to placate older versions of autoconf.  Sigh.
1026 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1027    AUTOHEADER=autoheader
1028    echo "$ac_t""found" 1>&6
1029 else
1030    AUTOHEADER="$missing_dir/missing autoheader"
1031    echo "$ac_t""missing" 1>&6
1032 fi
1033
1034 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1035 echo "configure:1036: checking for working makeinfo" >&5
1036 # Run test in a subshell; some versions of sh will print an error if
1037 # an executable is not found, even if stderr is redirected.
1038 # Redirect stdin to placate older versions of autoconf.  Sigh.
1039 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1040    MAKEINFO=makeinfo
1041    echo "$ac_t""found" 1>&6
1042 else
1043    MAKEINFO="$missing_dir/missing makeinfo"
1044    echo "$ac_t""missing" 1>&6
1045 fi
1046
1047 install_sh="$missing_dir/install-sh"
1048 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1049
1050 for ac_prog in gnutar gtar tar
1051 do
1052 # Extract the first word of "$ac_prog", so it can be a program name with args.
1053 set dummy $ac_prog; ac_word=$2
1054 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1055 echo "configure:1056: checking for $ac_word" >&5
1056 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1057   echo $ac_n "(cached) $ac_c" 1>&6
1058 else
1059   if test -n "$AMTAR"; then
1060   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1061 else
1062   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1063   ac_dummy="$PATH"
1064   for ac_dir in $ac_dummy; do
1065     test -z "$ac_dir" && ac_dir=.
1066     if test -f $ac_dir/$ac_word; then
1067       ac_cv_prog_AMTAR="$ac_prog"
1068       break
1069     fi
1070   done
1071   IFS="$ac_save_ifs"
1072 fi
1073 fi
1074 AMTAR="$ac_cv_prog_AMTAR"
1075 if test -n "$AMTAR"; then
1076   echo "$ac_t""$AMTAR" 1>&6
1077 else
1078   echo "$ac_t""no" 1>&6
1079 fi
1080
1081 test -n "$AMTAR" && break
1082 done
1083
1084
1085 AMTARFLAGS=
1086 if test -n "$AMTAR"; then
1087   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1088         AMTARFLAGS=o
1089   fi
1090 fi
1091
1092
1093
1094 cat >> confdefs.h <<EOF
1095 #define OPENLDAP_PACKAGE "$PACKAGE"
1096 EOF
1097
1098 cat >> confdefs.h <<EOF
1099 #define OPENLDAP_VERSION "$VERSION"
1100 EOF
1101
1102
1103
1104
1105 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1106 echo "configure:1107: checking configure arguments" >&5
1107
1108
1109 top_builddir=`pwd`
1110
1111 ldap_subdir="openldap"
1112
1113 # Check whether --with-subdir or --without-subdir was given.
1114 if test "${with_subdir+set}" = set; then
1115   withval="$with_subdir"
1116   
1117         if test "$withval" = "no"; then
1118                 ldap_subdir=""
1119         elif test "$withval" != "yes"; then
1120                 ldap_subdir="$withval"
1121         fi
1122
1123 fi
1124
1125
1126 # OpenLDAP --enable-debug
1127         # Check whether --enable-debug or --disable-debug was given.
1128 if test "${enable_debug+set}" = set; then
1129   enableval="$enable_debug"
1130   
1131         ol_arg=invalid
1132         for ol_val in auto yes no ; do
1133                 if test "$enableval" = "$ol_val" ; then
1134                         ol_arg="$ol_val"
1135                 fi
1136         done
1137         if test "$ol_arg" = "invalid" ; then
1138                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1139         fi
1140         ol_enable_debug="$ol_arg"
1141
1142 else
1143         ol_enable_debug="yes"
1144 fi
1145 # end --enable-debug
1146 # OpenLDAP --enable-syslog
1147         # Check whether --enable-syslog or --disable-syslog was given.
1148 if test "${enable_syslog+set}" = set; then
1149   enableval="$enable_syslog"
1150   
1151         ol_arg=invalid
1152         for ol_val in auto yes no ; do
1153                 if test "$enableval" = "$ol_val" ; then
1154                         ol_arg="$ol_val"
1155                 fi
1156         done
1157         if test "$ol_arg" = "invalid" ; then
1158                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1159         fi
1160         ol_enable_syslog="$ol_arg"
1161
1162 else
1163         ol_enable_syslog="auto"
1164 fi
1165 # end --enable-syslog
1166 # OpenLDAP --enable-proctitle
1167         # Check whether --enable-proctitle or --disable-proctitle was given.
1168 if test "${enable_proctitle+set}" = set; then
1169   enableval="$enable_proctitle"
1170   
1171         ol_arg=invalid
1172         for ol_val in auto yes no ; do
1173                 if test "$enableval" = "$ol_val" ; then
1174                         ol_arg="$ol_val"
1175                 fi
1176         done
1177         if test "$ol_arg" = "invalid" ; then
1178                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1179         fi
1180         ol_enable_proctitle="$ol_arg"
1181
1182 else
1183         ol_enable_proctitle="yes"
1184 fi
1185 # end --enable-proctitle
1186 # OpenLDAP --enable-cache
1187         # Check whether --enable-cache or --disable-cache was given.
1188 if test "${enable_cache+set}" = set; then
1189   enableval="$enable_cache"
1190   
1191         ol_arg=invalid
1192         for ol_val in auto yes no ; do
1193                 if test "$enableval" = "$ol_val" ; then
1194                         ol_arg="$ol_val"
1195                 fi
1196         done
1197         if test "$ol_arg" = "invalid" ; then
1198                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1199         fi
1200         ol_enable_cache="$ol_arg"
1201
1202 else
1203         ol_enable_cache="yes"
1204 fi
1205 # end --enable-cache
1206 # OpenLDAP --enable-dns
1207         # Check whether --enable-dns or --disable-dns was given.
1208 if test "${enable_dns+set}" = set; then
1209   enableval="$enable_dns"
1210   
1211         ol_arg=invalid
1212         for ol_val in auto yes no ; do
1213                 if test "$enableval" = "$ol_val" ; then
1214                         ol_arg="$ol_val"
1215                 fi
1216         done
1217         if test "$ol_arg" = "invalid" ; then
1218                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1219         fi
1220         ol_enable_dns="$ol_arg"
1221
1222 else
1223         ol_enable_dns="no"
1224 fi
1225 # end --enable-dns
1226 # OpenLDAP --enable-referrals
1227         # Check whether --enable-referrals or --disable-referrals was given.
1228 if test "${enable_referrals+set}" = set; then
1229   enableval="$enable_referrals"
1230   
1231         ol_arg=invalid
1232         for ol_val in auto yes no ; do
1233                 if test "$enableval" = "$ol_val" ; then
1234                         ol_arg="$ol_val"
1235                 fi
1236         done
1237         if test "$ol_arg" = "invalid" ; then
1238                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1239         fi
1240         ol_enable_referrals="$ol_arg"
1241
1242 else
1243         ol_enable_referrals="yes"
1244 fi
1245 # end --enable-referrals
1246 # OpenLDAP --enable-cldap
1247         # Check whether --enable-cldap or --disable-cldap was given.
1248 if test "${enable_cldap+set}" = set; then
1249   enableval="$enable_cldap"
1250   
1251         ol_arg=invalid
1252         for ol_val in auto yes no ; do
1253                 if test "$enableval" = "$ol_val" ; then
1254                         ol_arg="$ol_val"
1255                 fi
1256         done
1257         if test "$ol_arg" = "invalid" ; then
1258                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1259         fi
1260         ol_enable_cldap="$ol_arg"
1261
1262 else
1263         ol_enable_cldap="no"
1264 fi
1265 # end --enable-cldap
1266 # OpenLDAP --enable-x_compile
1267         # Check whether --enable-x_compile or --disable-x_compile was given.
1268 if test "${enable_x_compile+set}" = set; then
1269   enableval="$enable_x_compile"
1270   
1271         ol_arg=invalid
1272         for ol_val in yes no ; do
1273                 if test "$enableval" = "$ol_val" ; then
1274                         ol_arg="$ol_val"
1275                 fi
1276         done
1277         if test "$ol_arg" = "invalid" ; then
1278                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1279         fi
1280         ol_enable_x_compile="$ol_arg"
1281
1282 else
1283         ol_enable_x_compile="no"
1284 fi
1285 # end --enable-x_compile
1286
1287 # OpenLDAP --enable-dmalloc
1288         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1289 if test "${enable_dmalloc+set}" = set; then
1290   enableval="$enable_dmalloc"
1291   
1292         ol_arg=invalid
1293         for ol_val in auto yes no ; do
1294                 if test "$enableval" = "$ol_val" ; then
1295                         ol_arg="$ol_val"
1296                 fi
1297         done
1298         if test "$ol_arg" = "invalid" ; then
1299                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1300         fi
1301         ol_enable_dmalloc="$ol_arg"
1302
1303 else
1304         ol_enable_dmalloc="no"
1305 fi
1306 # end --enable-dmalloc
1307
1308 # OpenLDAP --with-kerberos
1309         # Check whether --with-kerberos or --without-kerberos was given.
1310 if test "${with_kerberos+set}" = set; then
1311   withval="$with_kerberos"
1312   
1313         ol_arg=invalid
1314         for ol_val in auto k5 k4 afs yes no ; do
1315                 if test "$withval" = "$ol_val" ; then
1316                         ol_arg="$ol_val"
1317                 fi
1318         done
1319         if test "$ol_arg" = "invalid" ; then
1320                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1321         fi
1322         ol_with_kerberos="$ol_arg"
1323
1324 else
1325         ol_with_kerberos="auto"
1326 fi
1327 # end --with-kerberos
1328
1329 # OpenLDAP --with-readline
1330         # Check whether --with-readline or --without-readline was given.
1331 if test "${with_readline+set}" = set; then
1332   withval="$with_readline"
1333   
1334         ol_arg=invalid
1335         for ol_val in auto yes no  ; do
1336                 if test "$withval" = "$ol_val" ; then
1337                         ol_arg="$ol_val"
1338                 fi
1339         done
1340         if test "$ol_arg" = "invalid" ; then
1341                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1342         fi
1343         ol_with_readline="$ol_arg"
1344
1345 else
1346         ol_with_readline="auto"
1347 fi
1348 # end --with-readline
1349
1350 # OpenLDAP --with-threads
1351         # Check whether --with-threads or --without-threads was given.
1352 if test "${with_threads+set}" = set; then
1353   withval="$with_threads"
1354   
1355         ol_arg=invalid
1356         for ol_val in auto posix mach lwp yes no manual  ; do
1357                 if test "$withval" = "$ol_val" ; then
1358                         ol_arg="$ol_val"
1359                 fi
1360         done
1361         if test "$ol_arg" = "invalid" ; then
1362                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1363         fi
1364         ol_with_threads="$ol_arg"
1365
1366 else
1367         ol_with_threads="auto"
1368 fi
1369 # end --with-threads
1370
1371 # OpenLDAP --with-tls
1372         # Check whether --with-tls or --without-tls was given.
1373 if test "${with_tls+set}" = set; then
1374   withval="$with_tls"
1375   
1376         ol_arg=invalid
1377         for ol_val in auto ssleay openssl yes no  ; do
1378                 if test "$withval" = "$ol_val" ; then
1379                         ol_arg="$ol_val"
1380                 fi
1381         done
1382         if test "$ol_arg" = "invalid" ; then
1383                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1384         fi
1385         ol_with_tls="$ol_arg"
1386
1387 else
1388         ol_with_tls="auto"
1389 fi
1390 # end --with-tls
1391
1392 # OpenLDAP --with-yielding_select
1393         # Check whether --with-yielding_select or --without-yielding_select was given.
1394 if test "${with_yielding_select+set}" = set; then
1395   withval="$with_yielding_select"
1396   
1397         ol_arg=invalid
1398         for ol_val in auto yes no manual  ; do
1399                 if test "$withval" = "$ol_val" ; then
1400                         ol_arg="$ol_val"
1401                 fi
1402         done
1403         if test "$ol_arg" = "invalid" ; then
1404                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1405         fi
1406         ol_with_yielding_select="$ol_arg"
1407
1408 else
1409         ol_with_yielding_select="auto"
1410 fi
1411 # end --with-yielding_select
1412
1413
1414
1415 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1416 if test "${with_xxslapdoptions+set}" = set; then
1417   withval="$with_xxslapdoptions"
1418   :
1419 fi
1420
1421 # OpenLDAP --enable-slapd
1422         # Check whether --enable-slapd or --disable-slapd was given.
1423 if test "${enable_slapd+set}" = set; then
1424   enableval="$enable_slapd"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no ; do
1428                 if test "$enableval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1434         fi
1435         ol_enable_slapd="$ol_arg"
1436
1437 else
1438         ol_enable_slapd="yes"
1439 fi
1440 # end --enable-slapd
1441 # OpenLDAP --enable-cleartext
1442         # Check whether --enable-cleartext or --disable-cleartext was given.
1443 if test "${enable_cleartext+set}" = set; then
1444   enableval="$enable_cleartext"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1454         fi
1455         ol_enable_cleartext="$ol_arg"
1456
1457 else
1458         ol_enable_cleartext="yes"
1459 fi
1460 # end --enable-cleartext
1461 # OpenLDAP --enable-crypt
1462         # Check whether --enable-crypt or --disable-crypt was given.
1463 if test "${enable_crypt+set}" = set; then
1464   enableval="$enable_crypt"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1474         fi
1475         ol_enable_crypt="$ol_arg"
1476
1477 else
1478         ol_enable_crypt="auto"
1479 fi
1480 # end --enable-crypt
1481 # OpenLDAP --enable-modules
1482         # Check whether --enable-modules or --disable-modules was given.
1483 if test "${enable_modules+set}" = set; then
1484   enableval="$enable_modules"
1485   
1486         ol_arg=invalid
1487         for ol_val in auto yes no ; do
1488                 if test "$enableval" = "$ol_val" ; then
1489                         ol_arg="$ol_val"
1490                 fi
1491         done
1492         if test "$ol_arg" = "invalid" ; then
1493                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1494         fi
1495         ol_enable_modules="$ol_arg"
1496
1497 else
1498         ol_enable_modules="no"
1499 fi
1500 # end --enable-modules
1501 # OpenLDAP --enable-phonetic
1502         # Check whether --enable-phonetic or --disable-phonetic was given.
1503 if test "${enable_phonetic+set}" = set; then
1504   enableval="$enable_phonetic"
1505   
1506         ol_arg=invalid
1507         for ol_val in auto yes no ; do
1508                 if test "$enableval" = "$ol_val" ; then
1509                         ol_arg="$ol_val"
1510                 fi
1511         done
1512         if test "$ol_arg" = "invalid" ; then
1513                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1514         fi
1515         ol_enable_phonetic="$ol_arg"
1516
1517 else
1518         ol_enable_phonetic="no"
1519 fi
1520 # end --enable-phonetic
1521 # OpenLDAP --enable-rlookups
1522         # Check whether --enable-rlookups or --disable-rlookups was given.
1523 if test "${enable_rlookups+set}" = set; then
1524   enableval="$enable_rlookups"
1525   
1526         ol_arg=invalid
1527         for ol_val in auto yes no ; do
1528                 if test "$enableval" = "$ol_val" ; then
1529                         ol_arg="$ol_val"
1530                 fi
1531         done
1532         if test "$ol_arg" = "invalid" ; then
1533                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1534         fi
1535         ol_enable_rlookups="$ol_arg"
1536
1537 else
1538         ol_enable_rlookups="auto"
1539 fi
1540 # end --enable-rlookups
1541 # OpenLDAP --enable-wrappers
1542         # Check whether --enable-wrappers or --disable-wrappers was given.
1543 if test "${enable_wrappers+set}" = set; then
1544   enableval="$enable_wrappers"
1545   
1546         ol_arg=invalid
1547         for ol_val in auto yes no ; do
1548                 if test "$enableval" = "$ol_val" ; then
1549                         ol_arg="$ol_val"
1550                 fi
1551         done
1552         if test "$ol_arg" = "invalid" ; then
1553                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1554         fi
1555         ol_enable_wrappers="$ol_arg"
1556
1557 else
1558         ol_enable_wrappers="no"
1559 fi
1560 # end --enable-wrappers
1561
1562 # OpenLDAP --enable-bdb2
1563         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1564 if test "${enable_bdb2+set}" = set; then
1565   enableval="$enable_bdb2"
1566   
1567         ol_arg=invalid
1568         for ol_val in auto yes no ; do
1569                 if test "$enableval" = "$ol_val" ; then
1570                         ol_arg="$ol_val"
1571                 fi
1572         done
1573         if test "$ol_arg" = "invalid" ; then
1574                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1575         fi
1576         ol_enable_bdb2="$ol_arg"
1577
1578 else
1579         ol_enable_bdb2="no"
1580 fi
1581 # end --enable-bdb2
1582 # OpenLDAP --with-bdb2_module
1583         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1584 if test "${with_bdb2_module+set}" = set; then
1585   withval="$with_bdb2_module"
1586   
1587         ol_arg=invalid
1588         for ol_val in static dynamic ; do
1589                 if test "$withval" = "$ol_val" ; then
1590                         ol_arg="$ol_val"
1591                 fi
1592         done
1593         if test "$ol_arg" = "invalid" ; then
1594                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1595         fi
1596         ol_with_bdb2_module="$ol_arg"
1597
1598 else
1599         ol_with_bdb2_module="static"
1600 fi
1601 # end --with-bdb2_module
1602
1603 # OpenLDAP --enable-ldap
1604         # Check whether --enable-ldap or --disable-ldap was given.
1605 if test "${enable_ldap+set}" = set; then
1606   enableval="$enable_ldap"
1607   
1608         ol_arg=invalid
1609         for ol_val in auto yes no ; do
1610                 if test "$enableval" = "$ol_val" ; then
1611                         ol_arg="$ol_val"
1612                 fi
1613         done
1614         if test "$ol_arg" = "invalid" ; then
1615                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1616         fi
1617         ol_enable_ldap="$ol_arg"
1618
1619 else
1620         ol_enable_ldap="no"
1621 fi
1622 # end --enable-ldap
1623 # OpenLDAP --with-ldap_module
1624         # Check whether --with-ldap_module or --without-ldap_module was given.
1625 if test "${with_ldap_module+set}" = set; then
1626   withval="$with_ldap_module"
1627   
1628         ol_arg=invalid
1629         for ol_val in static dynamic ; do
1630                 if test "$withval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1636         fi
1637         ol_with_ldap_module="$ol_arg"
1638
1639 else
1640         ol_with_ldap_module="static"
1641 fi
1642 # end --with-ldap_module
1643
1644 # OpenLDAP --enable-ldbm
1645         # Check whether --enable-ldbm or --disable-ldbm was given.
1646 if test "${enable_ldbm+set}" = set; then
1647   enableval="$enable_ldbm"
1648   
1649         ol_arg=invalid
1650         for ol_val in auto yes no ; do
1651                 if test "$enableval" = "$ol_val" ; then
1652                         ol_arg="$ol_val"
1653                 fi
1654         done
1655         if test "$ol_arg" = "invalid" ; then
1656                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1657         fi
1658         ol_enable_ldbm="$ol_arg"
1659
1660 else
1661         ol_enable_ldbm="yes"
1662 fi
1663 # end --enable-ldbm
1664 # OpenLDAP --with-ldbm_module
1665         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1666 if test "${with_ldbm_module+set}" = set; then
1667   withval="$with_ldbm_module"
1668   
1669         ol_arg=invalid
1670         for ol_val in static dynamic ; do
1671                 if test "$withval" = "$ol_val" ; then
1672                         ol_arg="$ol_val"
1673                 fi
1674         done
1675         if test "$ol_arg" = "invalid" ; then
1676                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1677         fi
1678         ol_with_ldbm_module="$ol_arg"
1679
1680 else
1681         ol_with_ldbm_module="static"
1682 fi
1683 # end --with-ldbm_module
1684
1685 # OpenLDAP --with-ldbm_api
1686         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1687 if test "${with_ldbm_api+set}" = set; then
1688   withval="$with_ldbm_api"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1692                 if test "$withval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1698         fi
1699         ol_with_ldbm_api="$ol_arg"
1700
1701 else
1702         ol_with_ldbm_api="auto"
1703 fi
1704 # end --with-ldbm_api
1705
1706 # OpenLDAP --with-ldbm_type
1707         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1708 if test "${with_ldbm_type+set}" = set; then
1709   withval="$with_ldbm_type"
1710   
1711         ol_arg=invalid
1712         for ol_val in auto btree hash ; do
1713                 if test "$withval" = "$ol_val" ; then
1714                         ol_arg="$ol_val"
1715                 fi
1716         done
1717         if test "$ol_arg" = "invalid" ; then
1718                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1719         fi
1720         ol_with_ldbm_type="$ol_arg"
1721
1722 else
1723         ol_with_ldbm_type="auto"
1724 fi
1725 # end --with-ldbm_type
1726
1727
1728 # OpenLDAP --enable-passwd
1729         # Check whether --enable-passwd or --disable-passwd was given.
1730 if test "${enable_passwd+set}" = set; then
1731   enableval="$enable_passwd"
1732   
1733         ol_arg=invalid
1734         for ol_val in auto yes no ; do
1735                 if test "$enableval" = "$ol_val" ; then
1736                         ol_arg="$ol_val"
1737                 fi
1738         done
1739         if test "$ol_arg" = "invalid" ; then
1740                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1741         fi
1742         ol_enable_passwd="$ol_arg"
1743
1744 else
1745         ol_enable_passwd="no"
1746 fi
1747 # end --enable-passwd
1748 # OpenLDAP --with-passwd_module
1749         # Check whether --with-passwd_module or --without-passwd_module was given.
1750 if test "${with_passwd_module+set}" = set; then
1751   withval="$with_passwd_module"
1752   
1753         ol_arg=invalid
1754         for ol_val in static dynamic ; do
1755                 if test "$withval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1761         fi
1762         ol_with_passwd_module="$ol_arg"
1763
1764 else
1765         ol_with_passwd_module="static"
1766 fi
1767 # end --with-passwd_module
1768
1769 # OpenLDAP --enable-perl
1770         # Check whether --enable-perl or --disable-perl was given.
1771 if test "${enable_perl+set}" = set; then
1772   enableval="$enable_perl"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1782         fi
1783         ol_enable_perl="$ol_arg"
1784
1785 else
1786         ol_enable_perl="no"
1787 fi
1788 # end --enable-perl
1789 # OpenLDAP --with-perl_module
1790         # Check whether --with-perl_module or --without-perl_module was given.
1791 if test "${with_perl_module+set}" = set; then
1792   withval="$with_perl_module"
1793   
1794         ol_arg=invalid
1795         for ol_val in static dynamic ; do
1796                 if test "$withval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1802         fi
1803         ol_with_perl_module="$ol_arg"
1804
1805 else
1806         ol_with_perl_module="static"
1807 fi
1808 # end --with-perl_module
1809
1810 # OpenLDAP --enable-shell
1811         # Check whether --enable-shell or --disable-shell was given.
1812 if test "${enable_shell+set}" = set; then
1813   enableval="$enable_shell"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1823         fi
1824         ol_enable_shell="$ol_arg"
1825
1826 else
1827         ol_enable_shell="no"
1828 fi
1829 # end --enable-shell
1830 # OpenLDAP --with-shell_module
1831         # Check whether --with-shell_module or --without-shell_module was given.
1832 if test "${with_shell_module+set}" = set; then
1833   withval="$with_shell_module"
1834   
1835         ol_arg=invalid
1836         for ol_val in static dynamic ; do
1837                 if test "$withval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1843         fi
1844         ol_with_shell_module="$ol_arg"
1845
1846 else
1847         ol_with_shell_module="static"
1848 fi
1849 # end --with-shell_module
1850
1851 # OpenLDAP --enable-tcl
1852         # Check whether --enable-tcl or --disable-tcl was given.
1853 if test "${enable_tcl+set}" = set; then
1854   enableval="$enable_tcl"
1855   
1856         ol_arg=invalid
1857         for ol_val in auto yes no ; do
1858                 if test "$enableval" = "$ol_val" ; then
1859                         ol_arg="$ol_val"
1860                 fi
1861         done
1862         if test "$ol_arg" = "invalid" ; then
1863                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1864         fi
1865         ol_enable_tcl="$ol_arg"
1866
1867 else
1868         ol_enable_tcl="no"
1869 fi
1870 # end --enable-tcl
1871 # OpenLDAP --with-tcl_module
1872         # Check whether --with-tcl_module or --without-tcl_module was given.
1873 if test "${with_tcl_module+set}" = set; then
1874   withval="$with_tcl_module"
1875   
1876         ol_arg=invalid
1877         for ol_val in static dynamic ; do
1878                 if test "$withval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1884         fi
1885         ol_with_tcl_module="$ol_arg"
1886
1887 else
1888         ol_with_tcl_module="static"
1889 fi
1890 # end --with-tcl_module
1891
1892
1893 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1894 if test "${with_xxslurpdoptions+set}" = set; then
1895   withval="$with_xxslurpdoptions"
1896   :
1897 fi
1898
1899 # OpenLDAP --enable-slurpd
1900         # Check whether --enable-slurpd or --disable-slurpd was given.
1901 if test "${enable_slurpd+set}" = set; then
1902   enableval="$enable_slurpd"
1903   
1904         ol_arg=invalid
1905         for ol_val in auto yes no ; do
1906                 if test "$enableval" = "$ol_val" ; then
1907                         ol_arg="$ol_val"
1908                 fi
1909         done
1910         if test "$ol_arg" = "invalid" ; then
1911                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1912         fi
1913         ol_enable_slurpd="$ol_arg"
1914
1915 else
1916         ol_enable_slurpd="auto"
1917 fi
1918 # end --enable-slurpd
1919
1920 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1921 if test "${with_xxliboptions+set}" = set; then
1922   withval="$with_xxliboptions"
1923   :
1924 fi
1925
1926 # Check whether --enable-static or --disable-static was given.
1927 if test "${enable_static+set}" = set; then
1928   enableval="$enable_static"
1929   p=${PACKAGE-default}
1930 case "$enableval" in
1931 yes) enable_static=yes ;;
1932 no) enable_static=no ;;
1933 *)
1934   enable_static=no
1935   # Look at the argument we got.  We use all the common list separators.
1936   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1937   for pkg in $enableval; do
1938     if test "X$pkg" = "X$p"; then
1939       enable_static=yes
1940     fi
1941   done
1942   IFS="$ac_save_ifs"
1943   ;;
1944 esac
1945 else
1946   enable_static=yes
1947 fi
1948
1949 # Check whether --enable-shared or --disable-shared was given.
1950 if test "${enable_shared+set}" = set; then
1951   enableval="$enable_shared"
1952   p=${PACKAGE-default}
1953 case "$enableval" in
1954 yes) enable_shared=yes ;;
1955 no) enable_shared=no ;;
1956 *)
1957   enable_shared=no
1958   # Look at the argument we got.  We use all the common list separators.
1959   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1960   for pkg in $enableval; do
1961     if test "X$pkg" = "X$p"; then
1962       enable_shared=yes
1963     fi
1964   done
1965   IFS="$ac_save_ifs"
1966   ;;
1967 esac
1968 else
1969   enable_shared=yes
1970 fi
1971
1972
1973 # validate options
1974 if test $ol_enable_dns = yes ; then
1975         if test $ol_enable_referrals = no ; then
1976                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1977         fi
1978         if test $ol_enable_referrals = auto ; then
1979                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1980                 ol_enable_referrals=yes
1981         fi
1982 fi
1983
1984 if test $ol_enable_slapd = no ; then
1985                 if test $ol_enable_bdb2 = yes ; then
1986                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
1987         fi
1988         if test $ol_enable_ldap = yes ; then
1989                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
1990         fi
1991         if test $ol_enable_ldbm = yes ; then
1992                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
1993         fi
1994         if test $ol_enable_passwd = yes ; then
1995                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
1996         fi
1997         if test $ol_enable_perl = yes ; then
1998                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
1999         fi
2000         if test $ol_enable_shell = yes ; then
2001                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2002         fi
2003         if test $ol_enable_tcl = yes ; then
2004                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2005         fi
2006         if test $ol_enable_modules = yes ; then
2007                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2008         fi
2009         if test $ol_enable_wrappers = yes ; then
2010                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2011         fi
2012         if test $ol_enable_phonetic = yes ; then
2013                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2014         fi
2015         if test $ol_enable_rlookups = yes ; then
2016                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2017         fi
2018         if test $ol_with_ldbm_api != auto ; then
2019                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2020         fi
2021         if test $ol_with_ldbm_type != auto ; then
2022                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2023         fi
2024         if test $ol_with_bdb2_module != static ; then
2025                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2026         fi
2027         if test $ol_with_ldap_module != static ; then
2028                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2029         fi
2030         if test $ol_with_ldbm_module != static ; then
2031                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2032         fi
2033         if test $ol_with_passwd_module != static ; then
2034                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2035         fi
2036         if test $ol_with_perl_module != static ; then
2037                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2038         fi
2039         if test $ol_with_shell_module != static ; then
2040                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2041         fi
2042         if test $ol_with_tcl_module != static ; then
2043                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2044         fi
2045         if test $ol_enable_slurpd = yes ; then
2046                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2047         fi
2048
2049         # force settings to no
2050         ol_enable_bdb2=no
2051         ol_enable_ldap=no
2052         ol_enable_ldbm=no
2053         ol_enable_passwd=no
2054         ol_enable_perl=no
2055         ol_enable_shell=no
2056         ol_enable_tcl=no
2057
2058         ol_enable_modules=no
2059         ol_enable_phonetic=no
2060         ol_enable_rlookups=no
2061         ol_enable_wrappers=no
2062
2063         ol_with_ldbm_api=no
2064         ol_with_ldbm_type=no
2065
2066         ol_with_bdb2_module=static
2067         ol_with_ldap_module=static
2068         ol_with_ldbm_module=static
2069         ol_with_passwd_module=static
2070         ol_with_perl_module=static
2071         ol_with_shell_module=static
2072         ol_with_tcl_module=static
2073
2074         ol_enable_slurpd=no
2075
2076 elif test $ol_enable_ldbm = no ; then
2077         
2078         if test $ol_with_ldbm_api != auto ; then
2079                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2080         fi
2081
2082         if test $ol_with_ldbm_type != auto ; then
2083                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2084         fi
2085
2086         if test $ol_with_ldbm_module != static ; then
2087                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2088         fi
2089
2090         if test $ol_enable_bdb2 = yes ; then
2091                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2092         fi
2093
2094         if test $ol_enable_modules != yes -a \
2095                 $ol_enable_ldap = no -a \
2096                 $ol_enable_passwd = no -a \
2097                 $ol_enable_perl = no -a \
2098                 $ol_enable_shell = no -a \
2099                 $ol_enable_tcl = no ; then
2100                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2101         fi
2102
2103         ol_with_ldbm_api=no
2104         ol_with_ldbm_type=no
2105         ol_with_ldbm_module=static
2106
2107 elif test $ol_enable_bdb2 = yes ; then
2108         
2109         if test $ol_with_ldbm_api != auto -a \
2110                 $ol_with_ldbm_api != db2 ; then
2111                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2112         fi
2113
2114         ol_with_ldbm_api=db2
2115
2116 else
2117         
2118         if test $ol_enable_bdb2 != no ; then
2119                 if test $ol_with_ldbm_api != auto -a \
2120                         $ol_with_ldbm_api != db2 ; then
2121                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2122                         ol_enable_bdb2=no
2123                 fi
2124         fi
2125
2126         if test $ol_with_ldbm_api = gdbm -a \
2127                 $ol_with_ldbm_type = btree ; then
2128                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2129         fi
2130         if test $ol_with_ldbm_api = mdbm -a \
2131                 $ol_with_ldbm_type = btree ; then
2132                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2133         fi
2134         if test $ol_with_ldbm_api = ndbm -a \
2135                 $ol_with_ldbm_type = btree ; then
2136                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2137         fi
2138 fi
2139
2140 if test $ol_enable_slurpd = yes ; then
2141                 if test $ol_with_threads = no ; then
2142                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2143         fi
2144 fi
2145
2146 echo "$ac_t""done" 1>&6
2147
2148 ## Initialize vars
2149 LDAP_LIBS=
2150 LDBM_LIBS=
2151 LTHREAD_LIBS=
2152 LUTIL_LIBS=
2153
2154 SLAPD_LIBS=
2155 SLURPD_LIBS=
2156
2157 BUILD_SLAPD=no
2158 BUILD_SLURPD=no
2159
2160 BUILD_BDB2=no
2161 BUILD_LDAP=no
2162 BUILD_LDBM=no
2163 BUILD_PASSWD=no
2164 BUILD_PERL=no
2165 BUILD_SHELL=no
2166 BUILD_TCL=no
2167 BUILD_THREAD=no
2168
2169 BUILD_BDB2_DYNAMIC=no
2170 BUILD_LDAP_DYNAMIC=no
2171 BUILD_LDBM_DYNAMIC=no
2172 BUILD_PASSWD_DYNAMIC=no
2173 BUILD_PERL_DYNAMIC=no
2174 BUILD_SHELL_DYNAMIC=no
2175 BUILD_TCL_DYNAMIC=no
2176
2177 SLAPD_MODULES_LDFLAGS=
2178 SLAPD_MODULES_CPPFLAGS=
2179
2180 SLAPD_PERL_LDFLAGS=
2181 SLAPD_PERL_CPPFLAGS=
2182
2183 KRB_LIBS=
2184 READLINE_LIBS=
2185 TERMCAP_LIBS=
2186 TLS_LIBS=
2187
2188
2189
2190 cat >> confdefs.h <<\EOF
2191 #define HAVE_MKVERSION 1
2192 EOF
2193
2194
2195
2196
2197
2198 ol_aix_threads=no
2199 case "$target" in
2200 *-*-aix*)       if test -z "$CC" ; then
2201                 case "$ol_with_threads" in
2202                 auto | yes |  posix) ol_aix_threads=yes ;;
2203                 esac
2204         fi
2205 ;;
2206 esac
2207
2208 if test $ol_aix_threads = yes ; then
2209         if test -z "${CC}" ; then
2210                 for ac_prog in cc_r xlc_r cc
2211 do
2212 # Extract the first word of "$ac_prog", so it can be a program name with args.
2213 set dummy $ac_prog; ac_word=$2
2214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2215 echo "configure:2216: checking for $ac_word" >&5
2216 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2217   echo $ac_n "(cached) $ac_c" 1>&6
2218 else
2219   if test -n "$CC"; then
2220   ac_cv_prog_CC="$CC" # Let the user override the test.
2221 else
2222   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2223   ac_dummy="$PATH"
2224   for ac_dir in $ac_dummy; do
2225     test -z "$ac_dir" && ac_dir=.
2226     if test -f $ac_dir/$ac_word; then
2227       ac_cv_prog_CC="$ac_prog"
2228       break
2229     fi
2230   done
2231   IFS="$ac_save_ifs"
2232 fi
2233 fi
2234 CC="$ac_cv_prog_CC"
2235 if test -n "$CC"; then
2236   echo "$ac_t""$CC" 1>&6
2237 else
2238   echo "$ac_t""no" 1>&6
2239 fi
2240
2241 test -n "$CC" && break
2242 done
2243
2244
2245                 if test "$CC" = cc ; then
2246                                                 if test $ol_with_threads != auto ; then
2247                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2248                         else
2249                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2250                         fi
2251                         ol_with_threads=no
2252                 fi
2253         fi
2254
2255         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2256                 ol_with_threads=posix
2257                 ol_cv_pthread_create=yes
2258         fi
2259 fi
2260
2261 if test -z "${CC}"; then
2262         for ac_prog in cc
2263 do
2264 # Extract the first word of "$ac_prog", so it can be a program name with args.
2265 set dummy $ac_prog; ac_word=$2
2266 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2267 echo "configure:2268: checking for $ac_word" >&5
2268 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2269   echo $ac_n "(cached) $ac_c" 1>&6
2270 else
2271   if test -n "$CC"; then
2272   ac_cv_prog_CC="$CC" # Let the user override the test.
2273 else
2274   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2275   ac_dummy="$PATH"
2276   for ac_dir in $ac_dummy; do
2277     test -z "$ac_dir" && ac_dir=.
2278     if test -f $ac_dir/$ac_word; then
2279       ac_cv_prog_CC="$ac_prog"
2280       break
2281     fi
2282   done
2283   IFS="$ac_save_ifs"
2284 fi
2285 fi
2286 CC="$ac_cv_prog_CC"
2287 if test -n "$CC"; then
2288   echo "$ac_t""$CC" 1>&6
2289 else
2290   echo "$ac_t""no" 1>&6
2291 fi
2292
2293 test -n "$CC" && break
2294 done
2295
2296 fi
2297
2298
2299 # Check whether --enable-fast-install or --disable-fast-install was given.
2300 if test "${enable_fast_install+set}" = set; then
2301   enableval="$enable_fast_install"
2302   p=${PACKAGE-default}
2303 case "$enableval" in
2304 yes) enable_fast_install=yes ;;
2305 no) enable_fast_install=no ;;
2306 *)
2307   enable_fast_install=no
2308   # Look at the argument we got.  We use all the common list separators.
2309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2310   for pkg in $enableval; do
2311     if test "X$pkg" = "X$p"; then
2312       enable_fast_install=yes
2313     fi
2314   done
2315   IFS="$ac_save_ifs"
2316   ;;
2317 esac
2318 else
2319   enable_fast_install=yes
2320 fi
2321
2322 # Extract the first word of "ranlib", so it can be a program name with args.
2323 set dummy ranlib; ac_word=$2
2324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2325 echo "configure:2326: checking for $ac_word" >&5
2326 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   if test -n "$RANLIB"; then
2330   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2331 else
2332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2333   ac_dummy="$PATH"
2334   for ac_dir in $ac_dummy; do
2335     test -z "$ac_dir" && ac_dir=.
2336     if test -f $ac_dir/$ac_word; then
2337       ac_cv_prog_RANLIB="ranlib"
2338       break
2339     fi
2340   done
2341   IFS="$ac_save_ifs"
2342   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2343 fi
2344 fi
2345 RANLIB="$ac_cv_prog_RANLIB"
2346 if test -n "$RANLIB"; then
2347   echo "$ac_t""$RANLIB" 1>&6
2348 else
2349   echo "$ac_t""no" 1>&6
2350 fi
2351
2352 # Extract the first word of "gcc", so it can be a program name with args.
2353 set dummy gcc; ac_word=$2
2354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_word" >&5
2356 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   if test -n "$CC"; then
2360   ac_cv_prog_CC="$CC" # Let the user override the test.
2361 else
2362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2363   ac_dummy="$PATH"
2364   for ac_dir in $ac_dummy; do
2365     test -z "$ac_dir" && ac_dir=.
2366     if test -f $ac_dir/$ac_word; then
2367       ac_cv_prog_CC="gcc"
2368       break
2369     fi
2370   done
2371   IFS="$ac_save_ifs"
2372 fi
2373 fi
2374 CC="$ac_cv_prog_CC"
2375 if test -n "$CC"; then
2376   echo "$ac_t""$CC" 1>&6
2377 else
2378   echo "$ac_t""no" 1>&6
2379 fi
2380
2381 if test -z "$CC"; then
2382   # Extract the first word of "cc", so it can be a program name with args.
2383 set dummy cc; ac_word=$2
2384 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2385 echo "configure:2386: checking for $ac_word" >&5
2386 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2387   echo $ac_n "(cached) $ac_c" 1>&6
2388 else
2389   if test -n "$CC"; then
2390   ac_cv_prog_CC="$CC" # Let the user override the test.
2391 else
2392   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2393   ac_prog_rejected=no
2394   ac_dummy="$PATH"
2395   for ac_dir in $ac_dummy; do
2396     test -z "$ac_dir" && ac_dir=.
2397     if test -f $ac_dir/$ac_word; then
2398       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2399         ac_prog_rejected=yes
2400         continue
2401       fi
2402       ac_cv_prog_CC="cc"
2403       break
2404     fi
2405   done
2406   IFS="$ac_save_ifs"
2407 if test $ac_prog_rejected = yes; then
2408   # We found a bogon in the path, so make sure we never use it.
2409   set dummy $ac_cv_prog_CC
2410   shift
2411   if test $# -gt 0; then
2412     # We chose a different compiler from the bogus one.
2413     # However, it has the same basename, so the bogon will be chosen
2414     # first if we set CC to just the basename; use the full file name.
2415     shift
2416     set dummy "$ac_dir/$ac_word" "$@"
2417     shift
2418     ac_cv_prog_CC="$@"
2419   fi
2420 fi
2421 fi
2422 fi
2423 CC="$ac_cv_prog_CC"
2424 if test -n "$CC"; then
2425   echo "$ac_t""$CC" 1>&6
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429
2430   if test -z "$CC"; then
2431     case "`uname -s`" in
2432     *win32* | *WIN32* | *CYGWIN*)
2433       # Extract the first word of "cl", so it can be a program name with args.
2434 set dummy cl; ac_word=$2
2435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_word" >&5
2437 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   if test -n "$CC"; then
2441   ac_cv_prog_CC="$CC" # Let the user override the test.
2442 else
2443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2444   ac_dummy="$PATH"
2445   for ac_dir in $ac_dummy; do
2446     test -z "$ac_dir" && ac_dir=.
2447     if test -f $ac_dir/$ac_word; then
2448       ac_cv_prog_CC="cl"
2449       break
2450     fi
2451   done
2452   IFS="$ac_save_ifs"
2453 fi
2454 fi
2455 CC="$ac_cv_prog_CC"
2456 if test -n "$CC"; then
2457   echo "$ac_t""$CC" 1>&6
2458 else
2459   echo "$ac_t""no" 1>&6
2460 fi
2461  ;;
2462     esac
2463   fi
2464   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2465 fi
2466
2467 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2468 echo "configure:2469: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2469
2470 ac_ext=c
2471 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2472 ac_cpp='$CPP $CPPFLAGS'
2473 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2474 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2475 cross_compiling=$ac_cv_prog_cc_cross
2476
2477 cat > conftest.$ac_ext << EOF
2478
2479 #line 2480 "configure"
2480 #include "confdefs.h"
2481
2482 main(){return(0);}
2483 EOF
2484 if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2485   ac_cv_prog_cc_works=yes
2486   # If we can't run a trivial program, we are probably using a cross compiler.
2487   if (./conftest; exit) 2>/dev/null; then
2488     ac_cv_prog_cc_cross=no
2489   else
2490     ac_cv_prog_cc_cross=yes
2491   fi
2492 else
2493   echo "configure: failed program was:" >&5
2494   cat conftest.$ac_ext >&5
2495   ac_cv_prog_cc_works=no
2496 fi
2497 rm -fr conftest*
2498 ac_ext=c
2499 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2500 ac_cpp='$CPP $CPPFLAGS'
2501 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2502 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2503 cross_compiling=$ac_cv_prog_cc_cross
2504
2505 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2506 if test $ac_cv_prog_cc_works = no; then
2507   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2508 fi
2509 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2510 echo "configure:2511: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2511 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2512 cross_compiling=$ac_cv_prog_cc_cross
2513
2514 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2515 echo "configure:2516: checking whether we are using GNU C" >&5
2516 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   cat > conftest.c <<EOF
2520 #ifdef __GNUC__
2521   yes;
2522 #endif
2523 EOF
2524 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2525   ac_cv_prog_gcc=yes
2526 else
2527   ac_cv_prog_gcc=no
2528 fi
2529 fi
2530
2531 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2532
2533 if test $ac_cv_prog_gcc = yes; then
2534   GCC=yes
2535 else
2536   GCC=
2537 fi
2538
2539 ac_test_CFLAGS="${CFLAGS+set}"
2540 ac_save_CFLAGS="$CFLAGS"
2541 CFLAGS=
2542 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2543 echo "configure:2544: checking whether ${CC-cc} accepts -g" >&5
2544 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   echo 'void f(){}' > conftest.c
2548 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2549   ac_cv_prog_cc_g=yes
2550 else
2551   ac_cv_prog_cc_g=no
2552 fi
2553 rm -f conftest*
2554
2555 fi
2556
2557 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2558 if test "$ac_test_CFLAGS" = set; then
2559   CFLAGS="$ac_save_CFLAGS"
2560 elif test $ac_cv_prog_cc_g = yes; then
2561   if test "$GCC" = yes; then
2562     CFLAGS="-g -O2"
2563   else
2564     CFLAGS="-g"
2565   fi
2566 else
2567   if test "$GCC" = yes; then
2568     CFLAGS="-O2"
2569   else
2570     CFLAGS=
2571   fi
2572 fi
2573
2574 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2575 if test "${with_gnu_ld+set}" = set; then
2576   withval="$with_gnu_ld"
2577   test "$withval" = no || with_gnu_ld=yes
2578 else
2579   with_gnu_ld=no
2580 fi
2581
2582 ac_prog=ld
2583 if test "$ac_cv_prog_gcc" = yes; then
2584   # Check if gcc -print-prog-name=ld gives a path.
2585   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2586 echo "configure:2587: checking for ld used by GCC" >&5
2587   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2588   case "$ac_prog" in
2589     # Accept absolute paths.
2590     [\\/]* | [A-Za-z]:[\\/]*)
2591       re_direlt='/[^/][^/]*/\.\./'
2592       # Canonicalize the path of ld
2593       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2594       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2595         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2596       done
2597       test -z "$LD" && LD="$ac_prog"
2598       ;;
2599   "")
2600     # If it fails, then pretend we aren't using GCC.
2601     ac_prog=ld
2602     ;;
2603   *)
2604     # If it is relative, then search for the first ld in PATH.
2605     with_gnu_ld=unknown
2606     ;;
2607   esac
2608 elif test "$with_gnu_ld" = yes; then
2609   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2610 echo "configure:2611: checking for GNU ld" >&5
2611 else
2612   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2613 echo "configure:2614: checking for non-GNU ld" >&5
2614 fi
2615 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   if test -z "$LD"; then
2619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2620   for ac_dir in $PATH; do
2621     test -z "$ac_dir" && ac_dir=.
2622     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2623       ac_cv_path_LD="$ac_dir/$ac_prog"
2624       # Check to see if the program is GNU ld.  I'd rather use --version,
2625       # but apparently some GNU ld's only accept -v.
2626       # Break only if it was the GNU/non-GNU ld that we prefer.
2627       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2628         test "$with_gnu_ld" != no && break
2629       else
2630         test "$with_gnu_ld" != yes && break
2631       fi
2632     fi
2633   done
2634   IFS="$ac_save_ifs"
2635 else
2636   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2637 fi
2638 fi
2639
2640 LD="$ac_cv_path_LD"
2641 if test -n "$LD"; then
2642   echo "$ac_t""$LD" 1>&6
2643 else
2644   echo "$ac_t""no" 1>&6
2645 fi
2646 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2647
2648 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2649 echo "configure:2650: checking if the linker ($LD) is GNU ld" >&5
2650 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2651   echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2654 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2655   ac_cv_prog_gnu_ld=yes
2656 else
2657   ac_cv_prog_gnu_ld=no
2658 fi
2659 fi
2660
2661 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2662
2663
2664 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2665 echo "configure:2666: checking for BSD-compatible nm" >&5
2666 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2667   echo $ac_n "(cached) $ac_c" 1>&6
2668 else
2669   if test -n "$NM"; then
2670   # Let the user override the test.
2671   ac_cv_path_NM="$NM"
2672 else
2673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2674   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2675     test -z "$ac_dir" && ac_dir=.
2676     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2677       # Check to see if the nm accepts a BSD-compat flag.
2678       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2679       #   nm: unknown option "B" ignored
2680       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2681         ac_cv_path_NM="$ac_dir/nm -B"
2682         break
2683       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2684         ac_cv_path_NM="$ac_dir/nm -p"
2685         break
2686       else
2687         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2688         continue # so that we can try to find one that supports BSD flags
2689       fi
2690     fi
2691   done
2692   IFS="$ac_save_ifs"
2693   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2694 fi
2695 fi
2696
2697 NM="$ac_cv_path_NM"
2698 echo "$ac_t""$NM" 1>&6
2699
2700
2701 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2702 echo "configure:2703: checking whether ln -s works" >&5
2703 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2704   echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706   rm -f conftestdata
2707 if ln -s X conftestdata 2>/dev/null
2708 then
2709   rm -f conftestdata
2710   ac_cv_prog_LN_S="ln -s"
2711 else
2712   ac_cv_prog_LN_S=ln
2713 fi
2714 fi
2715 LN_S="$ac_cv_prog_LN_S"
2716 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2717   echo "$ac_t""yes" 1>&6
2718 else
2719   echo "$ac_t""no" 1>&6
2720 fi
2721
2722
2723 # Check for any special flags to pass to ltconfig.
2724 libtool_flags="--cache-file=$cache_file"
2725 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2726 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2727 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2728 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2729 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2730
2731
2732 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2733 if test "${enable_libtool_lock+set}" = set; then
2734   enableval="$enable_libtool_lock"
2735   :
2736 fi
2737
2738 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2739 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2740
2741 # Some flags need to be propagated to the compiler or linker for good
2742 # libtool support.
2743 case "$host" in
2744 *-*-irix6*)
2745   # Find out which ABI we are using.
2746   echo '#line 2747 "configure"' > conftest.$ac_ext
2747   if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2748     case "`/usr/bin/file conftest.o`" in
2749     *32-bit*)
2750       LD="${LD-ld} -32"
2751       ;;
2752     *N32*)
2753       LD="${LD-ld} -n32"
2754       ;;
2755     *64-bit*)
2756       LD="${LD-ld} -64"
2757       ;;
2758     esac
2759   fi
2760   rm -rf conftest*
2761   ;;
2762
2763 *-*-sco3.2v5*)
2764   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2765   SAVE_CFLAGS="$CFLAGS"
2766   CFLAGS="$CFLAGS -belf"
2767   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2768 echo "configure:2769: checking whether the C compiler needs -belf" >&5
2769 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   cat > conftest.$ac_ext <<EOF
2773 #line 2774 "configure"
2774 #include "confdefs.h"
2775
2776 int main() {
2777
2778 ; return 0; }
2779 EOF
2780 if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2781   rm -rf conftest*
2782   lt_cv_cc_needs_belf=yes
2783 else
2784   echo "configure: failed program was:" >&5
2785   cat conftest.$ac_ext >&5
2786   rm -rf conftest*
2787   lt_cv_cc_needs_belf=no
2788 fi
2789 rm -f conftest*
2790 fi
2791
2792 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2793   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2794     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2795     CFLAGS="$SAVE_CFLAGS"
2796   fi
2797   ;;
2798
2799
2800 esac
2801
2802
2803 # Save cache, so that ltconfig can load it
2804
2805
2806 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2807 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2808 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2809 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2810 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2811 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2812 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2813 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2814
2815 # Reload cache, that may have been modified by ltconfig
2816
2817
2818 # This can be used to rebuild libtool when needed
2819 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2820
2821 # Always use our own libtool.
2822 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2823
2824 # Redirect the config.log output again, so that the ltconfig log is not
2825 # clobbered by the next message.
2826 exec 5>>./config.log
2827
2828
2829 for ac_prog in mawk gawk nawk awk
2830 do
2831 # Extract the first word of "$ac_prog", so it can be a program name with args.
2832 set dummy $ac_prog; ac_word=$2
2833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2834 echo "configure:2835: checking for $ac_word" >&5
2835 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2836   echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838   if test -n "$AWK"; then
2839   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2840 else
2841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2842   ac_dummy="$PATH"
2843   for ac_dir in $ac_dummy; do
2844     test -z "$ac_dir" && ac_dir=.
2845     if test -f $ac_dir/$ac_word; then
2846       ac_cv_prog_AWK="$ac_prog"
2847       break
2848     fi
2849   done
2850   IFS="$ac_save_ifs"
2851 fi
2852 fi
2853 AWK="$ac_cv_prog_AWK"
2854 if test -n "$AWK"; then
2855   echo "$ac_t""$AWK" 1>&6
2856 else
2857   echo "$ac_t""no" 1>&6
2858 fi
2859
2860 test -n "$AWK" && break
2861 done
2862
2863 # test for ln hardlink support
2864 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2865 echo "configure:2866: checking whether ln works" >&5
2866 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   rm -f conftest.src conftest.dst
2870 echo "conftest" > conftest.src
2871 if ln conftest.src conftest.dst 2>/dev/null
2872 then
2873   ol_cv_prog_LN_H="ln"
2874 else
2875   ol_cv_prog_LN_H="cp"
2876 fi
2877 rm -f conftest.src conftest.dst
2878
2879 fi
2880 LN_H="$ol_cv_prog_LN_H"
2881 if test "$ol_cv_prog_LN_H" = "ln"; then
2882         echo "$ac_t""yes" 1>&6
2883 else
2884         echo "$ac_t""no" 1>&6
2885 fi
2886
2887 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2888 echo "configure:2889: checking whether ln -s works" >&5
2889 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   rm -f conftestdata
2893 if ln -s X conftestdata 2>/dev/null
2894 then
2895   rm -f conftestdata
2896   ac_cv_prog_LN_S="ln -s"
2897 else
2898   ac_cv_prog_LN_S=ln
2899 fi
2900 fi
2901 LN_S="$ac_cv_prog_LN_S"
2902 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2903   echo "$ac_t""yes" 1>&6
2904 else
2905   echo "$ac_t""no" 1>&6
2906 fi
2907
2908
2909 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2910         LN_S="$LN_H"
2911 fi
2912
2913 # Extract the first word of "sendmail", so it can be a program name with args.
2914 set dummy sendmail; ac_word=$2
2915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2916 echo "configure:2917: checking for $ac_word" >&5
2917 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   case "$SENDMAIL" in
2921   /*)
2922   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2923   ;;
2924   ?:/*)                  
2925   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2926   ;;
2927   *)
2928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2929   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2930   for ac_dir in $ac_dummy; do 
2931     test -z "$ac_dir" && ac_dir=.
2932     if test -f $ac_dir/$ac_word; then
2933       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2934       break
2935     fi
2936   done
2937   IFS="$ac_save_ifs"
2938   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2939   ;;
2940 esac
2941 fi
2942 SENDMAIL="$ac_cv_path_SENDMAIL"
2943 if test -n "$SENDMAIL"; then
2944   echo "$ac_t""$SENDMAIL" 1>&6
2945 else
2946   echo "$ac_t""no" 1>&6
2947 fi
2948
2949 # Extract the first word of "vi", so it can be a program name with args.
2950 set dummy vi; ac_word=$2
2951 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2952 echo "configure:2953: checking for $ac_word" >&5
2953 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
2954   echo $ac_n "(cached) $ac_c" 1>&6
2955 else
2956   case "$EDITOR" in
2957   /*)
2958   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2959   ;;
2960   ?:/*)                  
2961   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2962   ;;
2963   *)
2964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2965   ac_dummy="$PATH:/usr/ucb"
2966   for ac_dir in $ac_dummy; do 
2967     test -z "$ac_dir" && ac_dir=.
2968     if test -f $ac_dir/$ac_word; then
2969       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2970       break
2971     fi
2972   done
2973   IFS="$ac_save_ifs"
2974   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2975   ;;
2976 esac
2977 fi
2978 EDITOR="$ac_cv_path_EDITOR"
2979 if test -n "$EDITOR"; then
2980   echo "$ac_t""$EDITOR" 1>&6
2981 else
2982   echo "$ac_t""no" 1>&6
2983 fi
2984
2985 # Extract the first word of "finger", so it can be a program name with args.
2986 set dummy finger; ac_word=$2
2987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2988 echo "configure:2989: checking for $ac_word" >&5
2989 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
2990   echo $ac_n "(cached) $ac_c" 1>&6
2991 else
2992   case "$FINGER" in
2993   /*)
2994   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2995   ;;
2996   ?:/*)                  
2997   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2998   ;;
2999   *)
3000   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3001   ac_dummy="$PATH:/usr/ucb"
3002   for ac_dir in $ac_dummy; do 
3003     test -z "$ac_dir" && ac_dir=.
3004     if test -f $ac_dir/$ac_word; then
3005       ac_cv_path_FINGER="$ac_dir/$ac_word"
3006       break
3007     fi
3008   done
3009   IFS="$ac_save_ifs"
3010   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3011   ;;
3012 esac
3013 fi
3014 FINGER="$ac_cv_path_FINGER"
3015 if test -n "$FINGER"; then
3016   echo "$ac_t""$FINGER" 1>&6
3017 else
3018   echo "$ac_t""no" 1>&6
3019 fi
3020
3021
3022 ol_link_perl=no
3023 if test $ol_enable_perl != no ; then
3024         # Extract the first word of "perl", so it can be a program name with args.
3025 set dummy perl; ac_word=$2
3026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3027 echo "configure:3028: checking for $ac_word" >&5
3028 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   case "$PERLBIN" in
3032   /*)
3033   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3034   ;;
3035   ?:/*)                  
3036   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3037   ;;
3038   *)
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH"
3041   for ac_dir in $ac_dummy; do 
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3050   ;;
3051 esac
3052 fi
3053 PERLBIN="$ac_cv_path_PERLBIN"
3054 if test -n "$PERLBIN"; then
3055   echo "$ac_t""$PERLBIN" 1>&6
3056 else
3057   echo "$ac_t""no" 1>&6
3058 fi
3059
3060
3061         if test "no$PERLBIN" = "no" ; then
3062                 if test $ol_enable_perl = yes ; then
3063                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3064                 fi
3065
3066         else
3067                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3068                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3069
3070                                 ol_link_perl=yes
3071         fi
3072 fi
3073
3074 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3075 echo "configure:3076: checking how to run the C preprocessor" >&5
3076 # On Suns, sometimes $CPP names a directory.
3077 if test -n "$CPP" && test -d "$CPP"; then
3078   CPP=
3079 fi
3080 if test -z "$CPP"; then
3081 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084     # This must be in double quotes, not single quotes, because CPP may get
3085   # substituted into the Makefile and "${CC-cc}" will confuse make.
3086   CPP="${CC-cc} -E"
3087   # On the NeXT, cc -E runs the code through the compiler's parser,
3088   # not just through cpp.
3089   cat > conftest.$ac_ext <<EOF
3090 #line 3091 "configure"
3091 #include "confdefs.h"
3092 #include <assert.h>
3093 Syntax Error
3094 EOF
3095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3096 { (eval echo configure:3097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3098 if test -z "$ac_err"; then
3099   :
3100 else
3101   echo "$ac_err" >&5
3102   echo "configure: failed program was:" >&5
3103   cat conftest.$ac_ext >&5
3104   rm -rf conftest*
3105   CPP="${CC-cc} -E -traditional-cpp"
3106   cat > conftest.$ac_ext <<EOF
3107 #line 3108 "configure"
3108 #include "confdefs.h"
3109 #include <assert.h>
3110 Syntax Error
3111 EOF
3112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3113 { (eval echo configure:3114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3115 if test -z "$ac_err"; then
3116   :
3117 else
3118   echo "$ac_err" >&5
3119   echo "configure: failed program was:" >&5
3120   cat conftest.$ac_ext >&5
3121   rm -rf conftest*
3122   CPP="${CC-cc} -nologo -E"
3123   cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 #include <assert.h>
3127 Syntax Error
3128 EOF
3129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3130 { (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3132 if test -z "$ac_err"; then
3133   :
3134 else
3135   echo "$ac_err" >&5
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   rm -rf conftest*
3139   CPP=/lib/cpp
3140 fi
3141 rm -f conftest*
3142 fi
3143 rm -f conftest*
3144 fi
3145 rm -f conftest*
3146   ac_cv_prog_CPP="$CPP"
3147 fi
3148   CPP="$ac_cv_prog_CPP"
3149 else
3150   ac_cv_prog_CPP="$CPP"
3151 fi
3152 echo "$ac_t""$CPP" 1>&6
3153
3154
3155 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3156         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3157
3158 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3159         echo "configure: warning: programs compiled here do run here..." 1>&2
3160         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3161
3162 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3163         echo "configure: warning: programs compiled here do not run here..." 1>&2
3164         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3165 fi
3166
3167 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3168 echo "configure:3169: checking for AIX" >&5
3169 cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #ifdef _AIX
3173   yes
3174 #endif
3175
3176 EOF
3177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3178   egrep "yes" >/dev/null 2>&1; then
3179   rm -rf conftest*
3180   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3181 #define _ALL_SOURCE 1
3182 EOF
3183
3184 else
3185   rm -rf conftest*
3186   echo "$ac_t""no" 1>&6
3187 fi
3188 rm -f conftest*
3189
3190
3191 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3192 echo "configure:3193: checking for POSIXized ISC" >&5
3193 if test -d /etc/conf/kconfig.d &&
3194   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3195 then
3196   echo "$ac_t""yes" 1>&6
3197   ISC=yes # If later tests want to check for ISC.
3198   cat >> confdefs.h <<\EOF
3199 #define _POSIX_SOURCE 1
3200 EOF
3201
3202   if test "$GCC" = yes; then
3203     CC="$CC -posix"
3204   else
3205     CC="$CC -Xp"
3206   fi
3207 else
3208   echo "$ac_t""no" 1>&6
3209   ISC=
3210 fi
3211
3212 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3213 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3214 echo "configure:3215: checking for minix/config.h" >&5
3215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   cat > conftest.$ac_ext <<EOF
3219 #line 3220 "configure"
3220 #include "confdefs.h"
3221 #include <minix/config.h>
3222 EOF
3223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3224 { (eval echo configure:3225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3226 if test -z "$ac_err"; then
3227   rm -rf conftest*
3228   eval "ac_cv_header_$ac_safe=yes"
3229 else
3230   echo "$ac_err" >&5
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -rf conftest*
3234   eval "ac_cv_header_$ac_safe=no"
3235 fi
3236 rm -f conftest*
3237 fi
3238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3239   echo "$ac_t""yes" 1>&6
3240   MINIX=yes
3241 else
3242   echo "$ac_t""no" 1>&6
3243 MINIX=
3244 fi
3245
3246 if test "$MINIX" = yes; then
3247   cat >> confdefs.h <<\EOF
3248 #define _POSIX_SOURCE 1
3249 EOF
3250
3251   cat >> confdefs.h <<\EOF
3252 #define _POSIX_1_SOURCE 2
3253 EOF
3254
3255   cat >> confdefs.h <<\EOF
3256 #define _MINIX 1
3257 EOF
3258
3259 fi
3260
3261
3262 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3263 echo "configure:3264: checking for Cygwin environment" >&5
3264 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3265   echo $ac_n "(cached) $ac_c" 1>&6
3266 else
3267   cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270
3271 int main() {
3272
3273 #ifndef __CYGWIN__
3274 #define __CYGWIN__ __CYGWIN32__
3275 #endif
3276 return __CYGWIN__;
3277 ; return 0; }
3278 EOF
3279 if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3280   rm -rf conftest*
3281   ac_cv_cygwin=yes
3282 else
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   ac_cv_cygwin=no
3287 fi
3288 rm -f conftest*
3289 fi
3290
3291 echo "$ac_t""$ac_cv_cygwin" 1>&6
3292 CYGWIN=
3293 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3294 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3295 echo "configure:3296: checking for mingw32 environment" >&5
3296 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3297   echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299   cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302
3303 int main() {
3304 return __MINGW32__;
3305 ; return 0; }
3306 EOF
3307 if { (eval echo configure:3308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3308   rm -rf conftest*
3309   ac_cv_mingw32=yes
3310 else
3311   echo "configure: failed program was:" >&5
3312   cat conftest.$ac_ext >&5
3313   rm -rf conftest*
3314   ac_cv_mingw32=no
3315 fi
3316 rm -f conftest*
3317 fi
3318
3319 echo "$ac_t""$ac_cv_mingw32" 1>&6
3320 MINGW32=
3321 test "$ac_cv_mingw32" = yes && MINGW32=yes
3322 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3323 echo "configure:3324: checking for EMX OS/2 environment" >&5
3324 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330
3331 int main() {
3332 return __EMX__;
3333 ; return 0; }
3334 EOF
3335 if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3336   rm -rf conftest*
3337   ac_cv_emxos2=yes
3338 else
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   ac_cv_emxos2=no
3343 fi
3344 rm -f conftest*
3345 fi
3346
3347 echo "$ac_t""$ac_cv_emxos2" 1>&6
3348 EMXOS2=
3349 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3350
3351
3352
3353 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3354 echo "configure:3355: checking for executable suffix" >&5
3355 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3359   ac_cv_exeext=.exe
3360 else
3361   rm -f conftest*
3362   echo 'int main () { return 0; }' > conftest.$ac_ext
3363   ac_cv_exeext=
3364   if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3365     for file in conftest.*; do
3366       case $file in
3367       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3368       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3369       esac
3370     done
3371   else
3372     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3373   fi
3374   rm -f conftest*
3375   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3376 fi
3377 fi
3378
3379 EXEEXT=""
3380 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3381 echo "$ac_t""${ac_cv_exeext}" 1>&6
3382 ac_exeext=$EXEEXT
3383
3384 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3385 echo "configure:3386: checking for object suffix" >&5
3386 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3387   echo $ac_n "(cached) $ac_c" 1>&6
3388 else
3389   rm -f conftest*
3390 echo 'int i = 1;' > conftest.$ac_ext
3391 if { (eval echo configure:3392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3392   for ac_file in conftest.*; do
3393     case $ac_file in
3394     *.c) ;;
3395     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3396     esac
3397   done
3398 else
3399   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3400 fi
3401 rm -f conftest*
3402 fi
3403
3404 echo "$ac_t""$ac_cv_objext" 1>&6
3405 OBJEXT=$ac_cv_objext
3406 ac_objext=$ac_cv_objext
3407
3408
3409 cat >> confdefs.h <<EOF
3410 #define EXEEXT "${EXEEXT}"
3411 EOF
3412
3413
3414 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3415 echo "configure:3416: checking for be_app in -lbe" >&5
3416 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3417 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3418   echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420   ac_save_LIBS="$LIBS"
3421 LIBS="-lbe -lroot -lnet $LIBS"
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 /* Override any gcc2 internal prototype to avoid an error.  */
3426 /* We use char because int might match the return type of a gcc2
3427     builtin and then its argument prototype would still apply.  */
3428 char be_app();
3429
3430 int main() {
3431 be_app()
3432 ; return 0; }
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3435   rm -rf conftest*
3436   eval "ac_cv_lib_$ac_lib_var=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_lib_$ac_lib_var=no"
3442 fi
3443 rm -f conftest*
3444 LIBS="$ac_save_LIBS"
3445
3446 fi
3447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449   LIBS="$LIBS -lbe -lroot -lnet"
3450 else
3451   echo "$ac_t""no" 1>&6
3452 :
3453 fi
3454
3455
3456
3457
3458
3459 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3460 echo "configure:3461: checking for ${CC-cc} option to accept ANSI C" >&5
3461 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   am_cv_prog_cc_stdc=no
3465 ac_save_CC="$CC"
3466 # Don't try gcc -ansi; that turns off useful extensions and
3467 # breaks some systems' header files.
3468 # AIX                   -qlanglvl=ansi
3469 # Ultrix and OSF/1      -std1
3470 # HP-UX 10.20 and later -Ae
3471 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3472 # SVR4                  -Xc -D__EXTENSIONS__
3473 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3474 do
3475   CC="$ac_save_CC $ac_arg"
3476   cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 #include <stdarg.h>
3480 #include <stdio.h>
3481 #include <sys/types.h>
3482 #include <sys/stat.h>
3483 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3484 struct buf { int x; };
3485 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3486 static char *e (p, i)
3487      char **p;
3488      int i;
3489 {
3490   return p[i];
3491 }
3492 static char *f (char * (*g) (char **, int), char **p, ...)
3493 {
3494   char *s;
3495   va_list v;
3496   va_start (v,p);
3497   s = g (p, va_arg (v,int));
3498   va_end (v);
3499   return s;
3500 }
3501 int test (int i, double x);
3502 struct s1 {int (*f) (int a);};
3503 struct s2 {int (*f) (double a);};
3504 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3505 int argc;
3506 char **argv;
3507
3508 int main() {
3509
3510 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3511
3512 ; return 0; }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3515   rm -rf conftest*
3516   am_cv_prog_cc_stdc="$ac_arg"; break
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520 fi
3521 rm -f conftest*
3522 done
3523 CC="$ac_save_CC"
3524
3525 fi
3526
3527 if test -z "$am_cv_prog_cc_stdc"; then
3528   echo "$ac_t""none needed" 1>&6
3529 else
3530   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3531 fi
3532 case "x$am_cv_prog_cc_stdc" in
3533   x|xno) ;;
3534   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3535 esac
3536
3537 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3538         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3539 fi
3540
3541 # test for make depend flag
3542 OL_MKDEP=
3543 OL_MKDEP_FLAGS=
3544 if test -z "${MKDEP}"; then
3545         OL_MKDEP="${CC-cc}"
3546         if test -z "${MKDEP_FLAGS}"; then
3547                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3548 echo "configure:3549: checking for ${OL_MKDEP} depend flag" >&5
3549 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3550   echo $ac_n "(cached) $ac_c" 1>&6
3551 else
3552   
3553                         ol_cv_mkdep=no
3554                         for flag in "-M" "-xM"; do
3555                                 cat > conftest.c <<EOF
3556  noCode;
3557 EOF
3558                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3559                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3560                                 then
3561                                         if test ! -f conftest."${ac_object}" ; then
3562                                                 ol_cv_mkdep=$flag
3563                                                 OL_MKDEP_FLAGS="$flag"
3564                                                 break
3565                                         fi
3566                                 fi
3567                         done
3568                         rm -f conftest*
3569                 
3570 fi
3571
3572 echo "$ac_t""$ol_cv_mkdep" 1>&6
3573         else
3574                 cc_cv_mkdep=yes
3575                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3576         fi
3577 else
3578         cc_cv_mkdep=yes
3579         OL_MKDEP="${MKDEP}"
3580         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3581 fi
3582
3583
3584
3585 if test "${ol_cv_mkdep}" = no ; then
3586         # this will soon become an error
3587         echo "configure: warning: do not know how to generate dependencies" 1>&2
3588 fi
3589
3590 ol_link_modules=no
3591 if test $ol_enable_modules != no ; then
3592         # Extract the first word of "glib-config", so it can be a program name with args.
3593 set dummy glib-config; ac_word=$2
3594 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3595 echo "configure:3596: checking for $ac_word" >&5
3596 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3597   echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599   case "$GLIBCONFIG" in
3600   /*)
3601   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3602   ;;
3603   ?:/*)                  
3604   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3605   ;;
3606   *)
3607   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3608   ac_dummy="$PATH"
3609   for ac_dir in $ac_dummy; do 
3610     test -z "$ac_dir" && ac_dir=.
3611     if test -f $ac_dir/$ac_word; then
3612       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3613       break
3614     fi
3615   done
3616   IFS="$ac_save_ifs"
3617   ;;
3618 esac
3619 fi
3620 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3621 if test -n "$GLIBCONFIG"; then
3622   echo "$ac_t""$GLIBCONFIG" 1>&6
3623 else
3624   echo "$ac_t""no" 1>&6
3625 fi
3626
3627
3628         if test "no$GLIBCONFIG" = "no" ; then
3629                 if test $ol_enable_modules = yes ; then
3630                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3631                 fi
3632
3633         else
3634                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3635                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3636                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3637
3638                                 ol_link_modules=yes
3639         fi
3640 else
3641         ol_with_bdb2_module=static
3642         ol_with_ldap_module=static
3643         ol_with_ldbm_module=static
3644         ol_with_passwd_module=static
3645         ol_with_perl_module=static
3646         ol_with_shell_module=static
3647         ol_with_tcl_module=static
3648 fi
3649
3650 # test for EBCDIC
3651 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3652 echo "configure:3653: checking for EBCDIC" >&5
3653 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   
3657         cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660
3661 #if !('M' == 0xd4)
3662 #include <__ASCII__/generate_error.h>
3663 #endif
3664
3665 EOF
3666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3667 { (eval echo configure:3668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3669 if test -z "$ac_err"; then
3670   rm -rf conftest*
3671   ol_cv_cpp_ebcdic=yes
3672 else
3673   echo "$ac_err" >&5
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -rf conftest*
3677   ol_cv_cpp_ebcdic=no
3678 fi
3679 rm -f conftest*
3680 fi
3681
3682 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3683 if test $ol_cv_cpp_ebcdic = yes ; then
3684         cat >> confdefs.h <<\EOF
3685 #define HAVE_EBCDIC 1
3686 EOF
3687
3688 fi
3689
3690 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3691 echo "configure:3692: checking for ANSI C header files" >&5
3692 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   cat > conftest.$ac_ext <<EOF
3696 #line 3697 "configure"
3697 #include "confdefs.h"
3698 #include <stdlib.h>
3699 #include <stdarg.h>
3700 #include <string.h>
3701 #include <float.h>
3702 EOF
3703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3704 { (eval echo configure:3705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3706 if test -z "$ac_err"; then
3707   rm -rf conftest*
3708   ol_cv_header_stdc=yes
3709 else
3710   echo "$ac_err" >&5
3711   echo "configure: failed program was:" >&5
3712   cat conftest.$ac_ext >&5
3713   rm -rf conftest*
3714   ol_cv_header_stdc=no
3715 fi
3716 rm -f conftest*
3717
3718 if test $ol_cv_header_stdc = yes; then
3719   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3720 cat > conftest.$ac_ext <<EOF
3721 #line 3722 "configure"
3722 #include "confdefs.h"
3723 #include <string.h>
3724 EOF
3725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3726   egrep "memchr" >/dev/null 2>&1; then
3727   :
3728 else
3729   rm -rf conftest*
3730   ol_cv_header_stdc=no
3731 fi
3732 rm -f conftest*
3733
3734 fi
3735
3736 if test $ol_cv_header_stdc = yes; then
3737   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3738 cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 #include <stdlib.h>
3742 EOF
3743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3744   egrep "free" >/dev/null 2>&1; then
3745   :
3746 else
3747   rm -rf conftest*
3748   ol_cv_header_stdc=no
3749 fi
3750 rm -f conftest*
3751
3752 fi
3753
3754 if test $ol_cv_header_stdc = yes; then
3755   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3756 if test "$cross_compiling" = yes; then
3757   :
3758 else
3759   cat > conftest.$ac_ext <<EOF
3760 #line 3761 "configure"
3761 #include "confdefs.h"
3762 #include <ctype.h>
3763 #ifndef HAVE_EBCDIC
3764 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3765 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3766 #else
3767 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3768                 || ('j' <= (c) && (c) <= 'r') \
3769                 || ('s' <= (c) && (c) <= 'z'))
3770 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3771 #endif
3772 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3773 int main () { int i; for (i = 0; i < 256; i++)
3774 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3775 exit (0); }
3776
3777 EOF
3778 if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3779 then
3780   :
3781 else
3782   echo "configure: failed program was:" >&5
3783   cat conftest.$ac_ext >&5
3784   rm -fr conftest*
3785   ol_cv_header_stdc=no
3786 fi
3787 rm -fr conftest*
3788 fi
3789
3790 fi
3791 fi
3792
3793 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3794 if test $ol_cv_header_stdc = yes; then
3795   cat >> confdefs.h <<\EOF
3796 #define STDC_HEADERS 1
3797 EOF
3798
3799 fi
3800 ac_cv_header_stdc=disable
3801
3802
3803 if test $ol_cv_header_stdc != yes; then
3804         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3805 fi
3806
3807 ac_header_dirent=no
3808 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3809 do
3810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3811 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3812 echo "configure:3813: checking for $ac_hdr that defines DIR" >&5
3813 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
3814   echo $ac_n "(cached) $ac_c" 1>&6
3815 else
3816   cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819 #include <sys/types.h>
3820 #include <$ac_hdr>
3821 int main() {
3822 DIR *dirp = 0;
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826   rm -rf conftest*
3827   eval "ac_cv_header_dirent_$ac_safe=yes"
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   eval "ac_cv_header_dirent_$ac_safe=no"
3833 fi
3834 rm -f conftest*
3835 fi
3836 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3837   echo "$ac_t""yes" 1>&6
3838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3839   cat >> confdefs.h <<EOF
3840 #define $ac_tr_hdr 1
3841 EOF
3842  ac_header_dirent=$ac_hdr; break
3843 else
3844   echo "$ac_t""no" 1>&6
3845 fi
3846 done
3847 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3848 if test $ac_header_dirent = dirent.h; then
3849 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3850 echo "configure:3851: checking for opendir in -ldir" >&5
3851 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
3852 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   ac_save_LIBS="$LIBS"
3856 LIBS="-ldir  $LIBS"
3857 cat > conftest.$ac_ext <<EOF
3858 #line 3859 "configure"
3859 #include "confdefs.h"
3860 /* Override any gcc2 internal prototype to avoid an error.  */
3861 /* We use char because int might match the return type of a gcc2
3862     builtin and then its argument prototype would still apply.  */
3863 char opendir();
3864
3865 int main() {
3866 opendir()
3867 ; return 0; }
3868 EOF
3869 if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3870   rm -rf conftest*
3871   eval "ac_cv_lib_$ac_lib_var=yes"
3872 else
3873   echo "configure: failed program was:" >&5
3874   cat conftest.$ac_ext >&5
3875   rm -rf conftest*
3876   eval "ac_cv_lib_$ac_lib_var=no"
3877 fi
3878 rm -f conftest*
3879 LIBS="$ac_save_LIBS"
3880
3881 fi
3882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3883   echo "$ac_t""yes" 1>&6
3884   LIBS="$LIBS -ldir"
3885 else
3886   echo "$ac_t""no" 1>&6
3887 fi
3888
3889 else
3890 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3891 echo "configure:3892: checking for opendir in -lx" >&5
3892 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
3893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3894   echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3896   ac_save_LIBS="$LIBS"
3897 LIBS="-lx  $LIBS"
3898 cat > conftest.$ac_ext <<EOF
3899 #line 3900 "configure"
3900 #include "confdefs.h"
3901 /* Override any gcc2 internal prototype to avoid an error.  */
3902 /* We use char because int might match the return type of a gcc2
3903     builtin and then its argument prototype would still apply.  */
3904 char opendir();
3905
3906 int main() {
3907 opendir()
3908 ; return 0; }
3909 EOF
3910 if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3911   rm -rf conftest*
3912   eval "ac_cv_lib_$ac_lib_var=yes"
3913 else
3914   echo "configure: failed program was:" >&5
3915   cat conftest.$ac_ext >&5
3916   rm -rf conftest*
3917   eval "ac_cv_lib_$ac_lib_var=no"
3918 fi
3919 rm -f conftest*
3920 LIBS="$ac_save_LIBS"
3921
3922 fi
3923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3924   echo "$ac_t""yes" 1>&6
3925   LIBS="$LIBS -lx"
3926 else
3927   echo "$ac_t""no" 1>&6
3928 fi
3929
3930 fi
3931
3932 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3933 echo "configure:3934: checking for sys/wait.h that is POSIX.1 compatible" >&5
3934 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
3935   echo $ac_n "(cached) $ac_c" 1>&6
3936 else
3937   cat > conftest.$ac_ext <<EOF
3938 #line 3939 "configure"
3939 #include "confdefs.h"
3940 #include <sys/types.h>
3941 #include <sys/wait.h>
3942 #ifndef WEXITSTATUS
3943 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3944 #endif
3945 #ifndef WIFEXITED
3946 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3947 #endif
3948 int main() {
3949 int s;
3950 wait (&s);
3951 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3952 ; return 0; }
3953 EOF
3954 if { (eval echo configure:3955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3955   rm -rf conftest*
3956   ac_cv_header_sys_wait_h=yes
3957 else
3958   echo "configure: failed program was:" >&5
3959   cat conftest.$ac_ext >&5
3960   rm -rf conftest*
3961   ac_cv_header_sys_wait_h=no
3962 fi
3963 rm -f conftest*
3964 fi
3965
3966 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3967 if test $ac_cv_header_sys_wait_h = yes; then
3968   cat >> confdefs.h <<\EOF
3969 #define HAVE_SYS_WAIT_H 1
3970 EOF
3971
3972 fi
3973
3974 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
3975 echo "configure:3976: checking POSIX termios" >&5
3976 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
3977   echo $ac_n "(cached) $ac_c" 1>&6
3978 else
3979   cat > conftest.$ac_ext <<EOF
3980 #line 3981 "configure"
3981 #include "confdefs.h"
3982 #include <sys/types.h>
3983 #include <unistd.h>
3984 #include <termios.h>
3985 int main() {
3986 /* SunOS 4.0.3 has termios.h but not the library calls.  */
3987    tcgetattr(0, 0);
3988 ; return 0; }
3989 EOF
3990 if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3991   rm -rf conftest*
3992   am_cv_sys_posix_termios=yes
3993 else
3994   echo "configure: failed program was:" >&5
3995   cat conftest.$ac_ext >&5
3996   rm -rf conftest*
3997   am_cv_sys_posix_termios=no
3998 fi
3999 rm -f conftest*
4000 fi
4001
4002 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4003
4004
4005  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4006 echo "configure:4007: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4007 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4011
4012   gwinsz_in_termios_h=no
4013   if test $am_cv_sys_posix_termios = yes; then
4014     cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 #include <sys/types.h>
4018 #     include <termios.h>
4019 #     ifdef TIOCGWINSZ
4020         yes
4021 #     endif
4022     
4023 EOF
4024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4025   egrep "yes" >/dev/null 2>&1; then
4026   rm -rf conftest*
4027   gwinsz_in_termios_h=yes
4028 fi
4029 rm -f conftest*
4030
4031   fi
4032
4033   if test $gwinsz_in_termios_h = no; then
4034     cat > conftest.$ac_ext <<EOF
4035 #line 4036 "configure"
4036 #include "confdefs.h"
4037 #include <sys/types.h>
4038 #     include <sys/ioctl.h>
4039 #     ifdef TIOCGWINSZ
4040         yes
4041 #     endif
4042     
4043 EOF
4044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4045   egrep "yes" >/dev/null 2>&1; then
4046   rm -rf conftest*
4047   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4048 fi
4049 rm -f conftest*
4050
4051   fi
4052   
4053 fi
4054
4055 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4056   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4057     cat >> confdefs.h <<\EOF
4058 #define GWINSZ_IN_SYS_IOCTL 1
4059 EOF
4060
4061   fi
4062
4063 if test $am_cv_sys_posix_termios = yes ; then
4064         cat >> confdefs.h <<\EOF
4065 #define HAVE_POSIX_TERMIOS 1
4066 EOF
4067
4068 fi
4069
4070 for ac_hdr in \
4071         arpa/inet.h             \
4072         arpa/nameser.h  \
4073         assert.h                \
4074         crypt.h                 \
4075         errno.h                 \
4076         fcntl.h                 \
4077         filio.h                 \
4078         getopt.h                \
4079         grp.h                   \
4080         libutil.h               \
4081         limits.h                \
4082         locale.h                \
4083         netinet/tcp.h   \
4084         malloc.h                \
4085         memory.h                \
4086         psap.h                  \
4087         pwd.h                   \
4088         resolv.h                \
4089         sgtty.h                 \
4090         shadow.h                \
4091         stdarg.h                \
4092         stddef.h                \
4093         string.h                \
4094         strings.h               \
4095         sysexits.h              \
4096         sys/file.h              \
4097         sys/filio.h             \
4098         sys/errno.h             \
4099         sys/ioctl.h             \
4100         sys/param.h             \
4101         sys/resource.h  \
4102         sys/select.h    \
4103         sys/socket.h    \
4104         sys/syslog.h    \
4105         sys/time.h              \
4106         sys/types.h             \
4107         syslog.h                \
4108         termios.h               \
4109         unistd.h                \
4110
4111 do
4112 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4113 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4114 echo "configure:4115: checking for $ac_hdr" >&5
4115 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4116   echo $ac_n "(cached) $ac_c" 1>&6
4117 else
4118   cat > conftest.$ac_ext <<EOF
4119 #line 4120 "configure"
4120 #include "confdefs.h"
4121 #include <$ac_hdr>
4122 EOF
4123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4124 { (eval echo configure:4125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4126 if test -z "$ac_err"; then
4127   rm -rf conftest*
4128   eval "ac_cv_header_$ac_safe=yes"
4129 else
4130   echo "$ac_err" >&5
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   eval "ac_cv_header_$ac_safe=no"
4135 fi
4136 rm -f conftest*
4137 fi
4138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4139   echo "$ac_t""yes" 1>&6
4140     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4141   cat >> confdefs.h <<EOF
4142 #define $ac_tr_hdr 1
4143 EOF
4144  
4145 else
4146   echo "$ac_t""no" 1>&6
4147 fi
4148 done
4149
4150
4151
4152
4153 echo $ac_n "checking for socket""... $ac_c" 1>&6
4154 echo "configure:4155: checking for socket" >&5
4155 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4156   echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158   cat > conftest.$ac_ext <<EOF
4159 #line 4160 "configure"
4160 #include "confdefs.h"
4161 /* System header to define __stub macros and hopefully few prototypes,
4162     which can conflict with char socket(); below.  */
4163 #include <assert.h>
4164 /* Override any gcc2 internal prototype to avoid an error.  */
4165 /* We use char because int might match the return type of a gcc2
4166     builtin and then its argument prototype would still apply.  */
4167 char socket();
4168 char (*f)();
4169
4170 int main() {
4171
4172 /* The GNU C library defines this for functions which it implements
4173     to always fail with ENOSYS.  Some functions are actually named
4174     something starting with __ and the normal name is an alias.  */
4175 #if defined (__stub_socket) || defined (__stub___socket)
4176 choke me
4177 #else
4178 f = socket;
4179 #endif
4180
4181 ; return 0; }
4182 EOF
4183 if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4184   rm -rf conftest*
4185   eval "ac_cv_func_socket=yes"
4186 else
4187   echo "configure: failed program was:" >&5
4188   cat conftest.$ac_ext >&5
4189   rm -rf conftest*
4190   eval "ac_cv_func_socket=no"
4191 fi
4192 rm -f conftest*
4193 fi
4194
4195 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4196   echo "$ac_t""yes" 1>&6
4197   :
4198 else
4199   echo "$ac_t""no" 1>&6
4200         
4201         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4202 echo "configure:4203: checking for main in -lsocket" >&5
4203 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4205   echo $ac_n "(cached) $ac_c" 1>&6
4206 else
4207   ac_save_LIBS="$LIBS"
4208 LIBS="-lsocket  $LIBS"
4209 cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212
4213 int main() {
4214 main()
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218   rm -rf conftest*
4219   eval "ac_cv_lib_$ac_lib_var=yes"
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -rf conftest*
4224   eval "ac_cv_lib_$ac_lib_var=no"
4225 fi
4226 rm -f conftest*
4227 LIBS="$ac_save_LIBS"
4228
4229 fi
4230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4231   echo "$ac_t""yes" 1>&6
4232     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4233     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4234   cat >> confdefs.h <<EOF
4235 #define $ac_tr_lib 1
4236 EOF
4237
4238   LIBS="-lsocket $LIBS"
4239
4240 else
4241   echo "$ac_t""no" 1>&6
4242 fi
4243
4244         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4245 echo "configure:4246: checking for main in -lnet" >&5
4246 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4248   echo $ac_n "(cached) $ac_c" 1>&6
4249 else
4250   ac_save_LIBS="$LIBS"
4251 LIBS="-lnet  $LIBS"
4252 cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255
4256 int main() {
4257 main()
4258 ; return 0; }
4259 EOF
4260 if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4261   rm -rf conftest*
4262   eval "ac_cv_lib_$ac_lib_var=yes"
4263 else
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   eval "ac_cv_lib_$ac_lib_var=no"
4268 fi
4269 rm -f conftest*
4270 LIBS="$ac_save_LIBS"
4271
4272 fi
4273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4274   echo "$ac_t""yes" 1>&6
4275     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4276     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4277   cat >> confdefs.h <<EOF
4278 #define $ac_tr_lib 1
4279 EOF
4280
4281   LIBS="-lnet $LIBS"
4282
4283 else
4284   echo "$ac_t""no" 1>&6
4285 fi
4286
4287         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4288 echo "configure:4289: checking for socket in -lnet" >&5
4289 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4291   echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293   ac_save_LIBS="$LIBS"
4294 LIBS="-lnet  $LIBS"
4295 cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 /* Override any gcc2 internal prototype to avoid an error.  */
4299 /* We use char because int might match the return type of a gcc2
4300     builtin and then its argument prototype would still apply.  */
4301 char socket();
4302
4303 int main() {
4304 socket()
4305 ; return 0; }
4306 EOF
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4308   rm -rf conftest*
4309   eval "ac_cv_lib_$ac_lib_var=yes"
4310 else
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -rf conftest*
4314   eval "ac_cv_lib_$ac_lib_var=no"
4315 fi
4316 rm -f conftest*
4317 LIBS="$ac_save_LIBS"
4318
4319 fi
4320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4321   echo "$ac_t""yes" 1>&6
4322     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4323     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4324   cat >> confdefs.h <<EOF
4325 #define $ac_tr_lib 1
4326 EOF
4327
4328   LIBS="-lnet $LIBS"
4329
4330 else
4331   echo "$ac_t""no" 1>&6
4332 fi
4333
4334         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4335 echo "configure:4336: checking for main in -lnsl_s" >&5
4336 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   ac_save_LIBS="$LIBS"
4341 LIBS="-lnsl_s  $LIBS"
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345
4346 int main() {
4347 main()
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4351   rm -rf conftest*
4352   eval "ac_cv_lib_$ac_lib_var=yes"
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=no"
4358 fi
4359 rm -f conftest*
4360 LIBS="$ac_save_LIBS"
4361
4362 fi
4363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4364   echo "$ac_t""yes" 1>&6
4365     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4366     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4367   cat >> confdefs.h <<EOF
4368 #define $ac_tr_lib 1
4369 EOF
4370
4371   LIBS="-lnsl_s $LIBS"
4372
4373 else
4374   echo "$ac_t""no" 1>&6
4375 fi
4376
4377         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4378 echo "configure:4379: checking for main in -lnsl" >&5
4379 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   ac_save_LIBS="$LIBS"
4384 LIBS="-lnsl  $LIBS"
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388
4389 int main() {
4390 main()
4391 ; return 0; }
4392 EOF
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394   rm -rf conftest*
4395   eval "ac_cv_lib_$ac_lib_var=yes"
4396 else
4397   echo "configure: failed program was:" >&5
4398   cat conftest.$ac_ext >&5
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=no"
4401 fi
4402 rm -f conftest*
4403 LIBS="$ac_save_LIBS"
4404
4405 fi
4406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407   echo "$ac_t""yes" 1>&6
4408     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4409     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4410   cat >> confdefs.h <<EOF
4411 #define $ac_tr_lib 1
4412 EOF
4413
4414   LIBS="-lnsl $LIBS"
4415
4416 else
4417   echo "$ac_t""no" 1>&6
4418 fi
4419
4420         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4421 echo "configure:4422: checking for socket in -linet" >&5
4422 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4424   echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426   ac_save_LIBS="$LIBS"
4427 LIBS="-linet  $LIBS"
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 /* Override any gcc2 internal prototype to avoid an error.  */
4432 /* We use char because int might match the return type of a gcc2
4433     builtin and then its argument prototype would still apply.  */
4434 char socket();
4435
4436 int main() {
4437 socket()
4438 ; return 0; }
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441   rm -rf conftest*
4442   eval "ac_cv_lib_$ac_lib_var=yes"
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -rf conftest*
4447   eval "ac_cv_lib_$ac_lib_var=no"
4448 fi
4449 rm -f conftest*
4450 LIBS="$ac_save_LIBS"
4451
4452 fi
4453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4454   echo "$ac_t""yes" 1>&6
4455     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4456     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4457   cat >> confdefs.h <<EOF
4458 #define $ac_tr_lib 1
4459 EOF
4460
4461   LIBS="-linet $LIBS"
4462
4463 else
4464   echo "$ac_t""no" 1>&6
4465 fi
4466
4467         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4468 echo "configure:4469: checking for main in -lgen" >&5
4469 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4470 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4471   echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473   ac_save_LIBS="$LIBS"
4474 LIBS="-lgen  $LIBS"
4475 cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4478
4479 int main() {
4480 main()
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   eval "ac_cv_lib_$ac_lib_var=yes"
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   eval "ac_cv_lib_$ac_lib_var=no"
4491 fi
4492 rm -f conftest*
4493 LIBS="$ac_save_LIBS"
4494
4495 fi
4496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4500   cat >> confdefs.h <<EOF
4501 #define $ac_tr_lib 1
4502 EOF
4503
4504   LIBS="-lgen $LIBS"
4505
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509
4510
4511 fi
4512
4513
4514 echo $ac_n "checking for select""... $ac_c" 1>&6
4515 echo "configure:4516: checking for select" >&5
4516 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 /* System header to define __stub macros and hopefully few prototypes,
4523     which can conflict with char select(); below.  */
4524 #include <assert.h>
4525 /* Override any gcc2 internal prototype to avoid an error.  */
4526 /* We use char because int might match the return type of a gcc2
4527     builtin and then its argument prototype would still apply.  */
4528 char select();
4529 char (*f)();
4530
4531 int main() {
4532
4533 /* The GNU C library defines this for functions which it implements
4534     to always fail with ENOSYS.  Some functions are actually named
4535     something starting with __ and the normal name is an alias.  */
4536 #if defined (__stub_select) || defined (__stub___select)
4537 choke me
4538 #else
4539 f = select;
4540 #endif
4541
4542 ; return 0; }
4543 EOF
4544 if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4545   rm -rf conftest*
4546   eval "ac_cv_func_select=yes"
4547 else
4548   echo "configure: failed program was:" >&5
4549   cat conftest.$ac_ext >&5
4550   rm -rf conftest*
4551   eval "ac_cv_func_select=no"
4552 fi
4553 rm -f conftest*
4554 fi
4555
4556 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4557   echo "$ac_t""yes" 1>&6
4558   :
4559 else
4560   echo "$ac_t""no" 1>&6
4561 { echo "configure: error: select() required." 1>&2; exit 1; }
4562 fi
4563
4564
4565 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4566 echo "configure:4567: checking types of arguments for select()" >&5
4567  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4568   echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4571   echo $ac_n "(cached) $ac_c" 1>&6
4572 else
4573     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4574   echo $ac_n "(cached) $ac_c" 1>&6
4575 else
4576      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4577      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4578       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4579        cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 #ifdef HAVE_SYS_TYPES_H
4583 #include <sys/types.h>
4584 #endif
4585 #ifdef HAVE_SYS_TIME_H
4586 #include <sys/time.h>
4587 #endif
4588 #ifdef HAVE_SYS_SELECT_H
4589 #include <sys/select.h>
4590 #endif
4591 #ifdef HAVE_SYS_SOCKET_H
4592 #include <sys/socket.h>
4593 #endif
4594 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);
4595 int main() {
4596
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4600   rm -rf conftest*
4601           ac_not_found=no ; break 3
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   ac_not_found=yes
4607 fi
4608 rm -f conftest*
4609       done
4610      done
4611     done
4612    
4613 fi
4614   
4615 fi
4616  
4617 fi
4618  if test "$ac_not_found" = yes; then
4619   ac_cv_func_select_arg1=int 
4620   ac_cv_func_select_arg234='int *' 
4621   ac_cv_func_select_arg5='struct timeval *'
4622  fi
4623  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4624  cat >> confdefs.h <<EOF
4625 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4626 EOF
4627
4628  cat >> confdefs.h <<EOF
4629 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4630 EOF
4631
4632  cat >> confdefs.h <<EOF
4633 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4634 EOF
4635
4636
4637
4638
4639 for ac_hdr in regex.h 
4640 do
4641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4643 echo "configure:4644: checking for $ac_hdr" >&5
4644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <$ac_hdr>
4651 EOF
4652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4653 { (eval echo configure:4654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4655 if test -z "$ac_err"; then
4656   rm -rf conftest*
4657   eval "ac_cv_header_$ac_safe=yes"
4658 else
4659   echo "$ac_err" >&5
4660   echo "configure: failed program was:" >&5
4661   cat conftest.$ac_ext >&5
4662   rm -rf conftest*
4663   eval "ac_cv_header_$ac_safe=no"
4664 fi
4665 rm -f conftest*
4666 fi
4667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4668   echo "$ac_t""yes" 1>&6
4669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4670   cat >> confdefs.h <<EOF
4671 #define $ac_tr_hdr 1
4672 EOF
4673  
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677 done
4678
4679 if test "$ac_cv_header_regex_h" != yes ; then
4680         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4681 fi
4682 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4683 echo "configure:4684: checking for regfree" >&5
4684 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4685   echo $ac_n "(cached) $ac_c" 1>&6
4686 else
4687   cat > conftest.$ac_ext <<EOF
4688 #line 4689 "configure"
4689 #include "confdefs.h"
4690 /* System header to define __stub macros and hopefully few prototypes,
4691     which can conflict with char regfree(); below.  */
4692 #include <assert.h>
4693 /* Override any gcc2 internal prototype to avoid an error.  */
4694 /* We use char because int might match the return type of a gcc2
4695     builtin and then its argument prototype would still apply.  */
4696 char regfree();
4697 char (*f)();
4698
4699 int main() {
4700
4701 /* The GNU C library defines this for functions which it implements
4702     to always fail with ENOSYS.  Some functions are actually named
4703     something starting with __ and the normal name is an alias.  */
4704 #if defined (__stub_regfree) || defined (__stub___regfree)
4705 choke me
4706 #else
4707 f = regfree;
4708 #endif
4709
4710 ; return 0; }
4711 EOF
4712 if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4713   rm -rf conftest*
4714   eval "ac_cv_func_regfree=yes"
4715 else
4716   echo "configure: failed program was:" >&5
4717   cat conftest.$ac_ext >&5
4718   rm -rf conftest*
4719   eval "ac_cv_func_regfree=no"
4720 fi
4721 rm -f conftest*
4722 fi
4723
4724 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6
4726   :
4727 else
4728   echo "$ac_t""no" 1>&6
4729 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4730 fi
4731
4732
4733
4734 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4735 echo "configure:4736: checking for compatible POSIX regex" >&5
4736 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4737   echo $ac_n "(cached) $ac_c" 1>&6
4738 else
4739   
4740         if test "$cross_compiling" = yes; then
4741   ol_cv_c_posix_regex=cross
4742 else
4743   cat > conftest.$ac_ext <<EOF
4744 #line 4745 "configure"
4745 #include "confdefs.h"
4746
4747 #include <sys/types.h>
4748 #include <regex.h>
4749 static char *pattern, *string;
4750 main()
4751 {
4752         int rc;
4753         regex_t re;
4754
4755         pattern = "^A";
4756
4757         if(regcomp(&re, pattern, 0)) {
4758                 return -1;
4759         }
4760         
4761         string = "ALL MATCH";
4762         
4763         rc = regexec(&re, string, 0, (void*)0, 0);
4764
4765         regfree(&re);
4766
4767         return rc;
4768 }
4769 EOF
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4771 then
4772   ol_cv_c_posix_regex=yes
4773 else
4774   echo "configure: failed program was:" >&5
4775   cat conftest.$ac_ext >&5
4776   rm -fr conftest*
4777   ol_cv_c_posix_regex=no
4778 fi
4779 rm -fr conftest*
4780 fi
4781
4782 fi
4783
4784 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4785
4786 if test "$ol_cv_c_posix_regex" = no ; then
4787         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4788 fi
4789
4790
4791 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4792 echo "configure:4793: checking for sigset in -lV3" >&5
4793 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   ac_save_LIBS="$LIBS"
4798 LIBS="-lV3  $LIBS"
4799 cat > conftest.$ac_ext <<EOF
4800 #line 4801 "configure"
4801 #include "confdefs.h"
4802 /* Override any gcc2 internal prototype to avoid an error.  */
4803 /* We use char because int might match the return type of a gcc2
4804     builtin and then its argument prototype would still apply.  */
4805 char sigset();
4806
4807 int main() {
4808 sigset()
4809 ; return 0; }
4810 EOF
4811 if { (eval echo configure:4812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4812   rm -rf conftest*
4813   eval "ac_cv_lib_$ac_lib_var=yes"
4814 else
4815   echo "configure: failed program was:" >&5
4816   cat conftest.$ac_ext >&5
4817   rm -rf conftest*
4818   eval "ac_cv_lib_$ac_lib_var=no"
4819 fi
4820 rm -f conftest*
4821 LIBS="$ac_save_LIBS"
4822
4823 fi
4824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4825   echo "$ac_t""yes" 1>&6
4826     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4827     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4828   cat >> confdefs.h <<EOF
4829 #define $ac_tr_lib 1
4830 EOF
4831
4832   LIBS="-lV3 $LIBS"
4833
4834 else
4835   echo "$ac_t""no" 1>&6
4836 fi
4837
4838
4839
4840 # find res_search
4841 if test $ol_enable_dns != no ; then
4842                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4843 echo "configure:4844: checking for res_search" >&5
4844 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4845   echo $ac_n "(cached) $ac_c" 1>&6
4846 else
4847   cat > conftest.$ac_ext <<EOF
4848 #line 4849 "configure"
4849 #include "confdefs.h"
4850 /* System header to define __stub macros and hopefully few prototypes,
4851     which can conflict with char res_search(); below.  */
4852 #include <assert.h>
4853 /* Override any gcc2 internal prototype to avoid an error.  */
4854 /* We use char because int might match the return type of a gcc2
4855     builtin and then its argument prototype would still apply.  */
4856 char res_search();
4857 char (*f)();
4858
4859 int main() {
4860
4861 /* The GNU C library defines this for functions which it implements
4862     to always fail with ENOSYS.  Some functions are actually named
4863     something starting with __ and the normal name is an alias.  */
4864 #if defined (__stub_res_search) || defined (__stub___res_search)
4865 choke me
4866 #else
4867 f = res_search;
4868 #endif
4869
4870 ; return 0; }
4871 EOF
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873   rm -rf conftest*
4874   eval "ac_cv_func_res_search=yes"
4875 else
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_func_res_search=no"
4880 fi
4881 rm -f conftest*
4882 fi
4883
4884 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4885   echo "$ac_t""yes" 1>&6
4886   :
4887 else
4888   echo "$ac_t""no" 1>&6
4889 fi
4890
4891         if test $ac_cv_func_res_search = no ; then 
4892                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4893 echo "configure:4894: checking for res_search in -lbind" >&5
4894 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
4895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   ac_save_LIBS="$LIBS"
4899 LIBS="-lbind  $LIBS"
4900 cat > conftest.$ac_ext <<EOF
4901 #line 4902 "configure"
4902 #include "confdefs.h"
4903 /* Override any gcc2 internal prototype to avoid an error.  */
4904 /* We use char because int might match the return type of a gcc2
4905     builtin and then its argument prototype would still apply.  */
4906 char res_search();
4907
4908 int main() {
4909 res_search()
4910 ; return 0; }
4911 EOF
4912 if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4913   rm -rf conftest*
4914   eval "ac_cv_lib_$ac_lib_var=yes"
4915 else
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_lib_$ac_lib_var=no"
4920 fi
4921 rm -f conftest*
4922 LIBS="$ac_save_LIBS"
4923
4924 fi
4925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4926   echo "$ac_t""yes" 1>&6
4927     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4928     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4929   cat >> confdefs.h <<EOF
4930 #define $ac_tr_lib 1
4931 EOF
4932
4933   LIBS="-lbind $LIBS"
4934
4935 else
4936   echo "$ac_t""no" 1>&6
4937 fi
4938
4939                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
4940         fi
4941         if test $ac_cv_func_res_search = no ; then 
4942                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
4943 echo "configure:4944: checking for res_search in -lresolv" >&5
4944 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
4945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4946   echo $ac_n "(cached) $ac_c" 1>&6
4947 else
4948   ac_save_LIBS="$LIBS"
4949 LIBS="-lresolv  $LIBS"
4950 cat > conftest.$ac_ext <<EOF
4951 #line 4952 "configure"
4952 #include "confdefs.h"
4953 /* Override any gcc2 internal prototype to avoid an error.  */
4954 /* We use char because int might match the return type of a gcc2
4955     builtin and then its argument prototype would still apply.  */
4956 char res_search();
4957
4958 int main() {
4959 res_search()
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   eval "ac_cv_lib_$ac_lib_var=yes"
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   eval "ac_cv_lib_$ac_lib_var=no"
4970 fi
4971 rm -f conftest*
4972 LIBS="$ac_save_LIBS"
4973
4974 fi
4975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4976   echo "$ac_t""yes" 1>&6
4977     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4978     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4979   cat >> confdefs.h <<EOF
4980 #define $ac_tr_lib 1
4981 EOF
4982
4983   LIBS="-lresolv $LIBS"
4984
4985 else
4986   echo "$ac_t""no" 1>&6
4987 fi
4988
4989                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
4990         fi
4991
4992         if test "$ac_cv_func_res_search" = yes ; then
4993                 cat >> confdefs.h <<\EOF
4994 #define HAVE_RES_SEARCH 1
4995 EOF
4996
4997         elif test $ol_enable_dns = yes ; then
4998                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
4999         else
5000                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5001         fi
5002 fi
5003
5004 ol_link_kerberos=no
5005
5006 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5007         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5008 do
5009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5011 echo "configure:5012: checking for $ac_hdr" >&5
5012 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5013   echo $ac_n "(cached) $ac_c" 1>&6
5014 else
5015   cat > conftest.$ac_ext <<EOF
5016 #line 5017 "configure"
5017 #include "confdefs.h"
5018 #include <$ac_hdr>
5019 EOF
5020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5021 { (eval echo configure:5022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5023 if test -z "$ac_err"; then
5024   rm -rf conftest*
5025   eval "ac_cv_header_$ac_safe=yes"
5026 else
5027   echo "$ac_err" >&5
5028   echo "configure: failed program was:" >&5
5029   cat conftest.$ac_ext >&5
5030   rm -rf conftest*
5031   eval "ac_cv_header_$ac_safe=no"
5032 fi
5033 rm -f conftest*
5034 fi
5035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5036   echo "$ac_t""yes" 1>&6
5037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5038   cat >> confdefs.h <<EOF
5039 #define $ac_tr_hdr 1
5040 EOF
5041  
5042 else
5043   echo "$ac_t""no" 1>&6
5044 fi
5045 done
5046
5047
5048         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5049                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5050 echo "configure:5051: checking for main in -lkrb4" >&5
5051 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5053   echo $ac_n "(cached) $ac_c" 1>&6
5054 else
5055   ac_save_LIBS="$LIBS"
5056 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5057 cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060
5061 int main() {
5062 main()
5063 ; return 0; }
5064 EOF
5065 if { (eval echo configure:5066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5066   rm -rf conftest*
5067   eval "ac_cv_lib_$ac_lib_var=yes"
5068 else
5069   echo "configure: failed program was:" >&5
5070   cat conftest.$ac_ext >&5
5071   rm -rf conftest*
5072   eval "ac_cv_lib_$ac_lib_var=no"
5073 fi
5074 rm -f conftest*
5075 LIBS="$ac_save_LIBS"
5076
5077 fi
5078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5079   echo "$ac_t""yes" 1>&6
5080   have_k5=yes
5081 else
5082   echo "$ac_t""no" 1>&6
5083 have_k5=no
5084 fi
5085
5086
5087                 if test $have_k5 = yes ; then
5088                         ol_with_kerberos=found
5089                         ol_link_kerberos=yes
5090
5091                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5092
5093                         LIBS="$KRB_LIBS $LIBS"
5094
5095                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5096 echo "configure:5097: checking for des_debug in Kerberos libraries" >&5
5097 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   
5101                                                                 save_LIBS="$LIBS"
5102                                 LIBS="$KRB_LIBS $LIBS"
5103                                 cat > conftest.$ac_ext <<EOF
5104 #line 5105 "configure"
5105 #include "confdefs.h"
5106
5107 #include <kerberosIV/krb.h>
5108 #include <kerberosIV/des.h>
5109 extern int des_debug;
5110
5111 int main() {
5112
5113 des_debug = 1;
5114
5115 ; return 0; }
5116 EOF
5117 if { (eval echo configure:5118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5118   rm -rf conftest*
5119   ol_cv_var_des_debug=yes
5120 else
5121   echo "configure: failed program was:" >&5
5122   cat conftest.$ac_ext >&5
5123   rm -rf conftest*
5124   ol_cv_var_des_debug=no
5125 fi
5126 rm -f conftest*
5127                                                                 LIBS="$save_LIBS"
5128                         
5129 fi
5130
5131 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5132
5133                         if test $ol_cv_var_des_debug = yes ; then
5134                                 cat >> confdefs.h <<\EOF
5135 #define HAVE_DES_DEBUG 1
5136 EOF
5137
5138                         fi
5139
5140                         LIBS="$save_LIBS"
5141                 fi
5142         fi
5143 fi
5144
5145 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5146         for ac_hdr in krb.h des.h
5147 do
5148 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5149 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5150 echo "configure:5151: checking for $ac_hdr" >&5
5151 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5152   echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154   cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 #include <$ac_hdr>
5158 EOF
5159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5160 { (eval echo configure:5161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5162 if test -z "$ac_err"; then
5163   rm -rf conftest*
5164   eval "ac_cv_header_$ac_safe=yes"
5165 else
5166   echo "$ac_err" >&5
5167   echo "configure: failed program was:" >&5
5168   cat conftest.$ac_ext >&5
5169   rm -rf conftest*
5170   eval "ac_cv_header_$ac_safe=no"
5171 fi
5172 rm -f conftest*
5173 fi
5174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5175   echo "$ac_t""yes" 1>&6
5176     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5177   cat >> confdefs.h <<EOF
5178 #define $ac_tr_hdr 1
5179 EOF
5180  
5181 else
5182   echo "$ac_t""no" 1>&6
5183 fi
5184 done
5185
5186
5187         if test $ac_cv_header_krb_h = yes ; then
5188                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5189 echo "configure:5190: checking for main in -lkrb" >&5
5190 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5192   echo $ac_n "(cached) $ac_c" 1>&6
5193 else
5194   ac_save_LIBS="$LIBS"
5195 LIBS="-lkrb -ldes $LIBS"
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199
5200 int main() {
5201 main()
5202 ; return 0; }
5203 EOF
5204 if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5205   rm -rf conftest*
5206   eval "ac_cv_lib_$ac_lib_var=yes"
5207 else
5208   echo "configure: failed program was:" >&5
5209   cat conftest.$ac_ext >&5
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=no"
5212 fi
5213 rm -f conftest*
5214 LIBS="$ac_save_LIBS"
5215
5216 fi
5217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219   have_k4=yes
5220 else
5221   echo "$ac_t""no" 1>&6
5222 have_k4=no
5223 fi
5224
5225
5226                 if test $have_k4 = yes ; then
5227                         ol_with_kerberos=found
5228                         ol_link_kerberos=yes
5229
5230                         KRB_LIBS="-lkrb -ldes"
5231                 fi
5232         fi
5233 fi
5234
5235 if test $ol_link_kerberos = yes ; then
5236         cat >> confdefs.h <<\EOF
5237 #define HAVE_KERBEROS 1
5238 EOF
5239
5240 fi
5241
5242 ol_link_tls=no
5243 if test $ol_with_tls != no ; then
5244         
5245         for ac_hdr in openssl/ssl.h ssl.h
5246 do
5247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5249 echo "configure:5250: checking for $ac_hdr" >&5
5250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5251   echo $ac_n "(cached) $ac_c" 1>&6
5252 else
5253   cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256 #include <$ac_hdr>
5257 EOF
5258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5259 { (eval echo configure:5260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5261 if test -z "$ac_err"; then
5262   rm -rf conftest*
5263   eval "ac_cv_header_$ac_safe=yes"
5264 else
5265   echo "$ac_err" >&5
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   eval "ac_cv_header_$ac_safe=no"
5270 fi
5271 rm -f conftest*
5272 fi
5273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5274   echo "$ac_t""yes" 1>&6
5275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5276   cat >> confdefs.h <<EOF
5277 #define $ac_tr_hdr 1
5278 EOF
5279  
5280 else
5281   echo "$ac_t""no" 1>&6
5282 fi
5283 done
5284
5285         
5286         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5287                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5288 echo "configure:5289: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5289 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5291   echo $ac_n "(cached) $ac_c" 1>&6
5292 else
5293   ac_save_LIBS="$LIBS"
5294 LIBS="-lssl -lcrypto $LIBS"
5295 cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298 /* Override any gcc2 internal prototype to avoid an error.  */
5299 /* We use char because int might match the return type of a gcc2
5300     builtin and then its argument prototype would still apply.  */
5301 char SSLeay_add_ssl_algorithms();
5302
5303 int main() {
5304 SSLeay_add_ssl_algorithms()
5305 ; return 0; }
5306 EOF
5307 if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5308   rm -rf conftest*
5309   eval "ac_cv_lib_$ac_lib_var=yes"
5310 else
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=no"
5315 fi
5316 rm -f conftest*
5317 LIBS="$ac_save_LIBS"
5318
5319 fi
5320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5321   echo "$ac_t""yes" 1>&6
5322   have_ssleay=yes
5323                         need_rsaref=no
5324 else
5325   echo "$ac_t""no" 1>&6
5326 have_ssleay=no
5327 fi
5328
5329                         
5330                 if test $have_ssleay = no ; then
5331                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5332 echo "configure:5333: checking for SSL_library_init in -lssl" >&5
5333 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5335   echo $ac_n "(cached) $ac_c" 1>&6
5336 else
5337   ac_save_LIBS="$LIBS"
5338 LIBS="-lssl -lcrypto $LIBS"
5339 cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5342 /* Override any gcc2 internal prototype to avoid an error.  */
5343 /* We use char because int might match the return type of a gcc2
5344     builtin and then its argument prototype would still apply.  */
5345 char SSL_library_init();
5346
5347 int main() {
5348 SSL_library_init()
5349 ; return 0; }
5350 EOF
5351 if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5352   rm -rf conftest*
5353   eval "ac_cv_lib_$ac_lib_var=yes"
5354 else
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=no"
5359 fi
5360 rm -f conftest*
5361 LIBS="$ac_save_LIBS"
5362
5363 fi
5364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5365   echo "$ac_t""yes" 1>&6
5366   have_ssleay=yes
5367                                 need_rsaref=no
5368 else
5369   echo "$ac_t""no" 1>&6
5370 have_ssleay=no
5371 fi
5372
5373                 fi
5374
5375                 if test $have_ssleay = no ; then
5376                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5377 echo "configure:5378: checking for ssl3_accept in -lssl" >&5
5378 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5379 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5380   echo $ac_n "(cached) $ac_c" 1>&6
5381 else
5382   ac_save_LIBS="$LIBS"
5383 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5384 cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387 /* Override any gcc2 internal prototype to avoid an error.  */
5388 /* We use char because int might match the return type of a gcc2
5389     builtin and then its argument prototype would still apply.  */
5390 char ssl3_accept();
5391
5392 int main() {
5393 ssl3_accept()
5394 ; return 0; }
5395 EOF
5396 if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5397   rm -rf conftest*
5398   eval "ac_cv_lib_$ac_lib_var=yes"
5399 else
5400   echo "configure: failed program was:" >&5
5401   cat conftest.$ac_ext >&5
5402   rm -rf conftest*
5403   eval "ac_cv_lib_$ac_lib_var=no"
5404 fi
5405 rm -f conftest*
5406 LIBS="$ac_save_LIBS"
5407
5408 fi
5409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5410   echo "$ac_t""yes" 1>&6
5411   have_ssleay=yes
5412                                 need_rsaref=yes
5413 else
5414   echo "$ac_t""no" 1>&6
5415 have_ssleay=no
5416 fi
5417
5418                 fi
5419
5420                 if test $have_ssleay = yes ; then
5421                         ol_with_tls=found
5422                         ol_link_tls=yes
5423
5424                         cat >> confdefs.h <<\EOF
5425 #define HAVE_SSLEAY 1
5426 EOF
5427
5428
5429                         if test $need_rsaref = yes; then
5430                                 cat >> confdefs.h <<\EOF
5431 #define HAVE_RSAREF 1
5432 EOF
5433
5434
5435                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5436                         else
5437                                 TLS_LIBS="-lssl -lcrypto"
5438                         fi
5439                 fi
5440         fi
5441 fi
5442
5443 if test $ol_link_tls = yes ; then
5444         cat >> confdefs.h <<\EOF
5445 #define HAVE_TLS 1
5446 EOF
5447
5448 fi      
5449
5450 for ac_func in \
5451         ctime_r                 \
5452         gethostbyname_r gethostbyaddr_r \
5453
5454 do
5455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5456 echo "configure:5457: checking for $ac_func" >&5
5457 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5458   echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460   cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463 /* System header to define __stub macros and hopefully few prototypes,
5464     which can conflict with char $ac_func(); below.  */
5465 #include <assert.h>
5466 /* Override any gcc2 internal prototype to avoid an error.  */
5467 /* We use char because int might match the return type of a gcc2
5468     builtin and then its argument prototype would still apply.  */
5469 char $ac_func();
5470 char (*f)();
5471
5472 int main() {
5473
5474 /* The GNU C library defines this for functions which it implements
5475     to always fail with ENOSYS.  Some functions are actually named
5476     something starting with __ and the normal name is an alias.  */
5477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5478 choke me
5479 #else
5480 f = $ac_func;
5481 #endif
5482
5483 ; return 0; }
5484 EOF
5485 if { (eval echo configure:5486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5486   rm -rf conftest*
5487   eval "ac_cv_func_$ac_func=yes"
5488 else
5489   echo "configure: failed program was:" >&5
5490   cat conftest.$ac_ext >&5
5491   rm -rf conftest*
5492   eval "ac_cv_func_$ac_func=no"
5493 fi
5494 rm -f conftest*
5495 fi
5496
5497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5498   echo "$ac_t""yes" 1>&6
5499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5500   cat >> confdefs.h <<EOF
5501 #define $ac_tr_func 1
5502 EOF
5503  
5504 else
5505   echo "$ac_t""no" 1>&6
5506 fi
5507 done
5508
5509
5510 if test "$ac_cv_func_ctime_r" = no ; then
5511         ol_cv_func_ctime_r_nargs=0
5512 else
5513         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5514 echo "configure:5515: checking number of arguments of ctime_r" >&5
5515 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5516   echo $ac_n "(cached) $ac_c" 1>&6
5517 else
5518   cat > conftest.$ac_ext <<EOF
5519 #line 5520 "configure"
5520 #include "confdefs.h"
5521 #include <time.h>
5522 int main() {
5523 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5524 ; return 0; }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5527   rm -rf conftest*
5528   ol_cv_func_ctime_r_nargs=3
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -rf conftest*
5533   cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 #include <time.h>
5537 int main() {
5538 time_t ti; char *buffer; ctime_r(&ti,buffer);
5539 ; return 0; }
5540 EOF
5541 if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5542   rm -rf conftest*
5543   ol_cv_func_ctime_r_nargs=2
5544 else
5545   echo "configure: failed program was:" >&5
5546   cat conftest.$ac_ext >&5
5547   rm -rf conftest*
5548   ol_cv_func_ctime_r_nargs=0
5549 fi
5550 rm -f conftest*
5551 fi
5552 rm -f conftest*
5553 fi
5554
5555 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5556   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5557     cat >> confdefs.h <<EOF
5558 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5559 EOF
5560
5561   fi
5562
5563 fi
5564
5565 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5566         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5567 echo "configure:5568: checking number of arguments of gethostbyname_r" >&5
5568 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5569   echo $ac_n "(cached) $ac_c" 1>&6
5570 else
5571   cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574 #include <sys/types.h>
5575 #include <sys/socket.h>
5576 #include <netinet/in.h>
5577 #include <netdb.h>
5578 #define BUFSIZE (sizeof(struct hostent)+10)
5579 int main() {
5580 struct hostent hent; char buffer[BUFSIZE];
5581                 int bufsize=BUFSIZE;int h_errno;
5582                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5583                         buffer, bufsize, &h_errno);
5584 ; return 0; }
5585 EOF
5586 if { (eval echo configure:5587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5587   rm -rf conftest*
5588   ol_cv_func_gethostbyname_r_nargs=5
5589 else
5590   echo "configure: failed program was:" >&5
5591   cat conftest.$ac_ext >&5
5592   rm -rf conftest*
5593   cat > conftest.$ac_ext <<EOF
5594 #line 5595 "configure"
5595 #include "confdefs.h"
5596 #include <sys/types.h>
5597 #include <sys/socket.h>
5598 #include <netinet/in.h>
5599 #include <netdb.h>
5600 #define BUFSIZE (sizeof(struct hostent)+10)
5601 int main() {
5602 struct hostent hent;struct hostent *rhent;
5603                         char buffer[BUFSIZE];
5604                         int bufsize=BUFSIZE;int h_errno;
5605                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5606                                 &rhent, &h_errno);
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5610   rm -rf conftest*
5611   ol_cv_func_gethostbyname_r_nargs=6
5612 else
5613   echo "configure: failed program was:" >&5
5614   cat conftest.$ac_ext >&5
5615   rm -rf conftest*
5616   ol_cv_func_gethostbyname_r_nargs=0
5617 fi
5618 rm -f conftest*
5619 fi
5620 rm -f conftest*
5621 fi
5622
5623 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5624   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5625         cat >> confdefs.h <<EOF
5626 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5627 EOF
5628
5629   fi
5630
5631 else
5632         ol_cv_func_gethostbyname_r_nargs=0
5633 fi
5634  
5635 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5636         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5637 echo "configure:5638: checking number of arguments of gethostbyaddr_r" >&5
5638 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 #include <sys/types.h>
5645 #include <sys/socket.h>
5646 #include <netinet/in.h>
5647 #include <netdb.h>
5648 #define BUFSIZE (sizeof(struct hostent)+10)
5649 int main() {
5650 struct hostent hent; char buffer[BUFSIZE]; 
5651             struct in_addr add;
5652             size_t alen=sizeof(struct in_addr);
5653             int bufsize=BUFSIZE;int h_errno;
5654                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5655                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5659   rm -rf conftest*
5660   ol_cv_func_gethostbyaddr_r_nargs=7
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 #include <sys/types.h>
5669 #include <sys/socket.h>
5670 #include <netinet/in.h>
5671 #include <netdb.h>
5672 #define BUFSIZE (sizeof(struct hostent)+10)
5673 int main() {
5674 struct hostent hent;
5675                         struct hostent *rhent; char buffer[BUFSIZE]; 
5676                         struct in_addr add;
5677                         size_t alen=sizeof(struct in_addr);
5678                         int bufsize=BUFSIZE;int h_errno;
5679                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5680                                 alen, AF_INET, &hent, buffer, bufsize, 
5681                                 &rhent, &h_errno);
5682 ; return 0; }
5683 EOF
5684 if { (eval echo configure:5685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5685   rm -rf conftest*
5686   ol_cv_func_gethostbyaddr_r_nargs=8
5687 else
5688   echo "configure: failed program was:" >&5
5689   cat conftest.$ac_ext >&5
5690   rm -rf conftest*
5691   ol_cv_func_gethostbyaddr_r_nargs=0
5692 fi
5693 rm -f conftest*
5694 fi
5695 rm -f conftest*
5696 fi
5697
5698 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5699   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5700     cat >> confdefs.h <<EOF
5701 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5702 EOF
5703
5704   fi
5705
5706 else
5707         ol_cv_func_gethostbyaddr_r_nargs=0
5708 fi
5709
5710 if test "$ac_cv_func_ctime_r" = yes \
5711         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5712         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5713         -a "$ac_cv_func_gethostbyname_r" = yes \
5714         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5715         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5716         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5717         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5718         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5719         ; then
5720  
5721         cat >> confdefs.h <<\EOF
5722 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5723 EOF
5724
5725 fi
5726
5727 ol_link_threads=no
5728 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5729         -o $ol_with_threads = posix ; then
5730
5731         for ac_hdr in pthread.h sched.h
5732 do
5733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5735 echo "configure:5736: checking for $ac_hdr" >&5
5736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   cat > conftest.$ac_ext <<EOF
5740 #line 5741 "configure"
5741 #include "confdefs.h"
5742 #include <$ac_hdr>
5743 EOF
5744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5745 { (eval echo configure:5746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5747 if test -z "$ac_err"; then
5748   rm -rf conftest*
5749   eval "ac_cv_header_$ac_safe=yes"
5750 else
5751   echo "$ac_err" >&5
5752   echo "configure: failed program was:" >&5
5753   cat conftest.$ac_ext >&5
5754   rm -rf conftest*
5755   eval "ac_cv_header_$ac_safe=no"
5756 fi
5757 rm -f conftest*
5758 fi
5759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5760   echo "$ac_t""yes" 1>&6
5761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5762   cat >> confdefs.h <<EOF
5763 #define $ac_tr_hdr 1
5764 EOF
5765  
5766 else
5767   echo "$ac_t""no" 1>&6
5768 fi
5769 done
5770
5771
5772         if test $ac_cv_header_pthread_h = yes ; then
5773                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5774 echo "configure:5775: checking POSIX thread version" >&5
5775 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
5776   echo $ac_n "(cached) $ac_c" 1>&6
5777 else
5778   
5779         cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782
5783 #               include <pthread.h>
5784                 /* this check could be improved */
5785 #               ifdef PTHREAD_ONCE_INIT
5786                         pthread_version_final
5787 #               endif
5788         
5789 EOF
5790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5791   egrep "pthread_version_final" >/dev/null 2>&1; then
5792   rm -rf conftest*
5793   ol_pthread_final=yes
5794 else
5795   rm -rf conftest*
5796   ol_pthread_final=no
5797 fi
5798 rm -f conftest*
5799
5800
5801         cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804
5805 #               include <pthread.h>
5806                 /* this check could be improved */
5807 #               ifdef pthread_once_init
5808                         pthread_version_draft4
5809 #               endif
5810         
5811 EOF
5812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5813   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5814   rm -rf conftest*
5815   ol_pthread_draft4=yes
5816 else
5817   rm -rf conftest*
5818   ol_pthread_draft4=no
5819 fi
5820 rm -f conftest*
5821
5822
5823         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5824                 ol_cv_pthread_version=final
5825         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5826                 ol_cv_pthread_version=draft4
5827         else
5828                 ol_cv_pthread_version=unknown
5829         fi
5830
5831 fi
5832
5833 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5834
5835
5836                 if test $ol_cv_pthread_version = final ; then
5837                         cat >> confdefs.h <<\EOF
5838 #define HAVE_PTHREADS_FINAL 1
5839 EOF
5840
5841                 elif test $ol_cv_pthread_version = draft4 ; then
5842                         cat >> confdefs.h <<\EOF
5843 #define HAVE_PTHREADS_D4 1
5844 EOF
5845
5846                 else
5847                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5848                 fi
5849
5850                 # consider threads found
5851                 ol_with_threads=found
5852
5853                 
5854         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5855 echo "configure:5856: checking for LinuxThreads pthread.h" >&5
5856 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
5857   echo $ac_n "(cached) $ac_c" 1>&6
5858 else
5859   cat > conftest.$ac_ext <<EOF
5860 #line 5861 "configure"
5861 #include "confdefs.h"
5862 #include <pthread.h>
5863 EOF
5864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5865   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5866   rm -rf conftest*
5867   ol_cv_header_linux_threads=yes
5868 else
5869   rm -rf conftest*
5870   ol_cv_header_linux_threads=no
5871 fi
5872 rm -f conftest*
5873
5874                 
5875 fi
5876
5877 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5878         if test $ol_cv_header_linux_threads = yes; then
5879                 cat >> confdefs.h <<\EOF
5880 #define HAVE_LINUX_THREADS 1
5881 EOF
5882
5883         fi
5884
5885
5886                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5887                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5888 echo "configure:5889: checking for pthread_create in default libraries" >&5
5889 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
5890   echo $ac_n "(cached) $ac_c" 1>&6
5891 else
5892   
5893                 if test "$cross_compiling" = yes; then
5894                         ol_cv_pthread_create=yes
5895 else
5896   cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899
5900 #include <pthread.h>
5901 #ifndef NULL
5902 #define NULL (void*)0
5903 #endif
5904
5905 static void *task(p)
5906         void *p;
5907 {
5908         return (void *) (p == NULL);
5909 }
5910
5911 int main(argc, argv)
5912         int argc;
5913         char **argv;
5914 {
5915         pthread_t t;
5916         int status;
5917
5918         /* make sure pthread_create() isn't just a stub */
5919 #if HAVE_PTHREADS_D4
5920         status = pthread_create(&t, pthread_attr_default, task, NULL);
5921 #else
5922         status = pthread_create(&t, NULL, task, NULL);
5923 #endif
5924
5925         if( status ) return status;
5926
5927         /* make sure pthread_detach() isn't just a stub */
5928 #if HAVE_PTHREADS_D4
5929         status = pthread_detach( &t );
5930 #else
5931         status = pthread_detach( t );
5932 #endif
5933
5934         return status;
5935 }
5936
5937 EOF
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5939 then
5940   ol_cv_pthread_create=yes
5941 else
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -fr conftest*
5945   ol_cv_pthread_create=no
5946 fi
5947 rm -fr conftest*
5948 fi
5949
5950 fi
5951
5952 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5953
5954                 if test $ol_cv_pthread_create != no ; then
5955                         ol_link_threads=posix
5956                         ol_link_pthreads=""
5957                 fi
5958                 
5959                 # Pthread try link: -mt (ol_cv_pthread_mt)
5960         if test "$ol_link_threads" = no ; then
5961                 # try -mt
5962                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5963 echo "configure:5964: checking for pthread link with -mt" >&5
5964 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
5965   echo $ac_n "(cached) $ac_c" 1>&6
5966 else
5967   
5968                         # save the flags
5969                         ol_LIBS="$LIBS"
5970                         LIBS="-mt $LIBS"
5971
5972                         cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975
5976 #include <pthread.h>
5977 #ifndef NULL
5978 #define NULL (void*)0
5979 #endif
5980
5981 int main() {
5982
5983         pthread_t t;
5984
5985 #if HAVE_PTHREADS_D4
5986         pthread_create(&t, pthread_attr_default, NULL, NULL);
5987         pthread_detach( &t );
5988 #else
5989         pthread_create(&t, NULL, NULL, NULL);
5990         pthread_detach( t );
5991 #endif
5992 #ifdef HAVE_LINUX_THREADS
5993         pthread_kill_other_threads_np();
5994 #endif
5995
5996 ; return 0; }
5997 EOF
5998 if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5999   rm -rf conftest*
6000   ol_cv_pthread_mt=yes
6001 else
6002   echo "configure: failed program was:" >&5
6003   cat conftest.$ac_ext >&5
6004   rm -rf conftest*
6005   ol_cv_pthread_mt=no
6006 fi
6007 rm -f conftest*
6008
6009                 # restore the LIBS
6010                 LIBS="$ol_LIBS"
6011                 
6012 fi
6013
6014 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6015
6016                 if test $ol_cv_pthread_mt = yes ; then
6017                         ol_link_pthreads="-mt"
6018                         ol_link_threads=posix
6019                 fi
6020         fi
6021
6022                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6023         if test "$ol_link_threads" = no ; then
6024                 # try -kthread
6025                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6026 echo "configure:6027: checking for pthread link with -kthread" >&5
6027 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6028   echo $ac_n "(cached) $ac_c" 1>&6
6029 else
6030   
6031                         # save the flags
6032                         ol_LIBS="$LIBS"
6033                         LIBS="-kthread $LIBS"
6034
6035                         cat > conftest.$ac_ext <<EOF
6036 #line 6037 "configure"
6037 #include "confdefs.h"
6038
6039 #include <pthread.h>
6040 #ifndef NULL
6041 #define NULL (void*)0
6042 #endif
6043
6044 int main() {
6045
6046         pthread_t t;
6047
6048 #if HAVE_PTHREADS_D4
6049         pthread_create(&t, pthread_attr_default, NULL, NULL);
6050         pthread_detach( &t );
6051 #else
6052         pthread_create(&t, NULL, NULL, NULL);
6053         pthread_detach( t );
6054 #endif
6055 #ifdef HAVE_LINUX_THREADS
6056         pthread_kill_other_threads_np();
6057 #endif
6058
6059 ; return 0; }
6060 EOF
6061 if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062   rm -rf conftest*
6063   ol_cv_pthread_kthread=yes
6064 else
6065   echo "configure: failed program was:" >&5
6066   cat conftest.$ac_ext >&5
6067   rm -rf conftest*
6068   ol_cv_pthread_kthread=no
6069 fi
6070 rm -f conftest*
6071
6072                 # restore the LIBS
6073                 LIBS="$ol_LIBS"
6074                 
6075 fi
6076
6077 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6078
6079                 if test $ol_cv_pthread_kthread = yes ; then
6080                         ol_link_pthreads="-kthread"
6081                         ol_link_threads=posix
6082                 fi
6083         fi
6084
6085                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6086         if test "$ol_link_threads" = no ; then
6087                 # try -pthread
6088                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6089 echo "configure:6090: checking for pthread link with -pthread" >&5
6090 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   
6094                         # save the flags
6095                         ol_LIBS="$LIBS"
6096                         LIBS="-pthread $LIBS"
6097
6098                         cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101
6102 #include <pthread.h>
6103 #ifndef NULL
6104 #define NULL (void*)0
6105 #endif
6106
6107 int main() {
6108
6109         pthread_t t;
6110
6111 #if HAVE_PTHREADS_D4
6112         pthread_create(&t, pthread_attr_default, NULL, NULL);
6113         pthread_detach( &t );
6114 #else
6115         pthread_create(&t, NULL, NULL, NULL);
6116         pthread_detach( t );
6117 #endif
6118 #ifdef HAVE_LINUX_THREADS
6119         pthread_kill_other_threads_np();
6120 #endif
6121
6122 ; return 0; }
6123 EOF
6124 if { (eval echo configure:6125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6125   rm -rf conftest*
6126   ol_cv_pthread_pthread=yes
6127 else
6128   echo "configure: failed program was:" >&5
6129   cat conftest.$ac_ext >&5
6130   rm -rf conftest*
6131   ol_cv_pthread_pthread=no
6132 fi
6133 rm -f conftest*
6134
6135                 # restore the LIBS
6136                 LIBS="$ol_LIBS"
6137                 
6138 fi
6139
6140 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6141
6142                 if test $ol_cv_pthread_pthread = yes ; then
6143                         ol_link_pthreads="-pthread"
6144                         ol_link_threads=posix
6145                 fi
6146         fi
6147
6148                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6149         if test "$ol_link_threads" = no ; then
6150                 # try -pthreads
6151                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6152 echo "configure:6153: checking for pthread link with -pthreads" >&5
6153 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6154   echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156   
6157                         # save the flags
6158                         ol_LIBS="$LIBS"
6159                         LIBS="-pthreads $LIBS"
6160
6161                         cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164
6165 #include <pthread.h>
6166 #ifndef NULL
6167 #define NULL (void*)0
6168 #endif
6169
6170 int main() {
6171
6172         pthread_t t;
6173
6174 #if HAVE_PTHREADS_D4
6175         pthread_create(&t, pthread_attr_default, NULL, NULL);
6176         pthread_detach( &t );
6177 #else
6178         pthread_create(&t, NULL, NULL, NULL);
6179         pthread_detach( t );
6180 #endif
6181 #ifdef HAVE_LINUX_THREADS
6182         pthread_kill_other_threads_np();
6183 #endif
6184
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   ol_cv_pthread_pthreads=yes
6190 else
6191   echo "configure: failed program was:" >&5
6192   cat conftest.$ac_ext >&5
6193   rm -rf conftest*
6194   ol_cv_pthread_pthreads=no
6195 fi
6196 rm -f conftest*
6197
6198                 # restore the LIBS
6199                 LIBS="$ol_LIBS"
6200                 
6201 fi
6202
6203 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6204
6205                 if test $ol_cv_pthread_pthreads = yes ; then
6206                         ol_link_pthreads="-pthreads"
6207                         ol_link_threads=posix
6208                 fi
6209         fi
6210
6211                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6212         if test "$ol_link_threads" = no ; then
6213                 # try -mthreads
6214                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6215 echo "configure:6216: checking for pthread link with -mthreads" >&5
6216 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   
6220                         # save the flags
6221                         ol_LIBS="$LIBS"
6222                         LIBS="-mthreads $LIBS"
6223
6224                         cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227
6228 #include <pthread.h>
6229 #ifndef NULL
6230 #define NULL (void*)0
6231 #endif
6232
6233 int main() {
6234
6235         pthread_t t;
6236
6237 #if HAVE_PTHREADS_D4
6238         pthread_create(&t, pthread_attr_default, NULL, NULL);
6239         pthread_detach( &t );
6240 #else
6241         pthread_create(&t, NULL, NULL, NULL);
6242         pthread_detach( t );
6243 #endif
6244 #ifdef HAVE_LINUX_THREADS
6245         pthread_kill_other_threads_np();
6246 #endif
6247
6248 ; return 0; }
6249 EOF
6250 if { (eval echo configure:6251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6251   rm -rf conftest*
6252   ol_cv_pthread_mthreads=yes
6253 else
6254   echo "configure: failed program was:" >&5
6255   cat conftest.$ac_ext >&5
6256   rm -rf conftest*
6257   ol_cv_pthread_mthreads=no
6258 fi
6259 rm -f conftest*
6260
6261                 # restore the LIBS
6262                 LIBS="$ol_LIBS"
6263                 
6264 fi
6265
6266 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6267
6268                 if test $ol_cv_pthread_mthreads = yes ; then
6269                         ol_link_pthreads="-mthreads"
6270                         ol_link_threads=posix
6271                 fi
6272         fi
6273
6274                 # Pthread try link: -thread (ol_cv_pthread_thread)
6275         if test "$ol_link_threads" = no ; then
6276                 # try -thread
6277                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6278 echo "configure:6279: checking for pthread link with -thread" >&5
6279 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6280   echo $ac_n "(cached) $ac_c" 1>&6
6281 else
6282   
6283                         # save the flags
6284                         ol_LIBS="$LIBS"
6285                         LIBS="-thread $LIBS"
6286
6287                         cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290
6291 #include <pthread.h>
6292 #ifndef NULL
6293 #define NULL (void*)0
6294 #endif
6295
6296 int main() {
6297
6298         pthread_t t;
6299
6300 #if HAVE_PTHREADS_D4
6301         pthread_create(&t, pthread_attr_default, NULL, NULL);
6302         pthread_detach( &t );
6303 #else
6304         pthread_create(&t, NULL, NULL, NULL);
6305         pthread_detach( t );
6306 #endif
6307 #ifdef HAVE_LINUX_THREADS
6308         pthread_kill_other_threads_np();
6309 #endif
6310
6311 ; return 0; }
6312 EOF
6313 if { (eval echo configure:6314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6314   rm -rf conftest*
6315   ol_cv_pthread_thread=yes
6316 else
6317   echo "configure: failed program was:" >&5
6318   cat conftest.$ac_ext >&5
6319   rm -rf conftest*
6320   ol_cv_pthread_thread=no
6321 fi
6322 rm -f conftest*
6323
6324                 # restore the LIBS
6325                 LIBS="$ol_LIBS"
6326                 
6327 fi
6328
6329 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6330
6331                 if test $ol_cv_pthread_thread = yes ; then
6332                         ol_link_pthreads="-thread"
6333                         ol_link_threads=posix
6334                 fi
6335         fi
6336
6337
6338                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6339         if test "$ol_link_threads" = no ; then
6340                 # try -lpthread -lmach -lexc -lc_r
6341                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6342 echo "configure:6343: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6343 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6344   echo $ac_n "(cached) $ac_c" 1>&6
6345 else
6346   
6347                         # save the flags
6348                         ol_LIBS="$LIBS"
6349                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6350
6351                         cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354
6355 #include <pthread.h>
6356 #ifndef NULL
6357 #define NULL (void*)0
6358 #endif
6359
6360 int main() {
6361
6362         pthread_t t;
6363
6364 #if HAVE_PTHREADS_D4
6365         pthread_create(&t, pthread_attr_default, NULL, NULL);
6366         pthread_detach( &t );
6367 #else
6368         pthread_create(&t, NULL, NULL, NULL);
6369         pthread_detach( t );
6370 #endif
6371 #ifdef HAVE_LINUX_THREADS
6372         pthread_kill_other_threads_np();
6373 #endif
6374
6375 ; return 0; }
6376 EOF
6377 if { (eval echo configure:6378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6378   rm -rf conftest*
6379   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6380 else
6381   echo "configure: failed program was:" >&5
6382   cat conftest.$ac_ext >&5
6383   rm -rf conftest*
6384   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6385 fi
6386 rm -f conftest*
6387
6388                 # restore the LIBS
6389                 LIBS="$ol_LIBS"
6390                 
6391 fi
6392
6393 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6394
6395                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6396                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6397                         ol_link_threads=posix
6398                 fi
6399         fi
6400
6401                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6402         if test "$ol_link_threads" = no ; then
6403                 # try -lpthread -lmach -lexc
6404                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6405 echo "configure:6406: checking for pthread link with -lpthread -lmach -lexc" >&5
6406 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6407   echo $ac_n "(cached) $ac_c" 1>&6
6408 else
6409   
6410                         # save the flags
6411                         ol_LIBS="$LIBS"
6412                         LIBS="-lpthread -lmach -lexc $LIBS"
6413
6414                         cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417
6418 #include <pthread.h>
6419 #ifndef NULL
6420 #define NULL (void*)0
6421 #endif
6422
6423 int main() {
6424
6425         pthread_t t;
6426
6427 #if HAVE_PTHREADS_D4
6428         pthread_create(&t, pthread_attr_default, NULL, NULL);
6429         pthread_detach( &t );
6430 #else
6431         pthread_create(&t, NULL, NULL, NULL);
6432         pthread_detach( t );
6433 #endif
6434 #ifdef HAVE_LINUX_THREADS
6435         pthread_kill_other_threads_np();
6436 #endif
6437
6438 ; return 0; }
6439 EOF
6440 if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6441   rm -rf conftest*
6442   ol_cv_pthread_lpthread_lmach_lexc=yes
6443 else
6444   echo "configure: failed program was:" >&5
6445   cat conftest.$ac_ext >&5
6446   rm -rf conftest*
6447   ol_cv_pthread_lpthread_lmach_lexc=no
6448 fi
6449 rm -f conftest*
6450
6451                 # restore the LIBS
6452                 LIBS="$ol_LIBS"
6453                 
6454 fi
6455
6456 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6457
6458                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6459                         ol_link_pthreads="-lpthread -lmach -lexc"
6460                         ol_link_threads=posix
6461                 fi
6462         fi
6463
6464
6465                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6466         if test "$ol_link_threads" = no ; then
6467                 # try -lpthread -Wl,-woff,85
6468                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6469 echo "configure:6470: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6470 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6471   echo $ac_n "(cached) $ac_c" 1>&6
6472 else
6473   
6474                         # save the flags
6475                         ol_LIBS="$LIBS"
6476                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6477
6478                         cat > conftest.$ac_ext <<EOF
6479 #line 6480 "configure"
6480 #include "confdefs.h"
6481
6482 #include <pthread.h>
6483 #ifndef NULL
6484 #define NULL (void*)0
6485 #endif
6486
6487 int main() {
6488
6489         pthread_t t;
6490
6491 #if HAVE_PTHREADS_D4
6492         pthread_create(&t, pthread_attr_default, NULL, NULL);
6493         pthread_detach( &t );
6494 #else
6495         pthread_create(&t, NULL, NULL, NULL);
6496         pthread_detach( t );
6497 #endif
6498 #ifdef HAVE_LINUX_THREADS
6499         pthread_kill_other_threads_np();
6500 #endif
6501
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6505   rm -rf conftest*
6506   ol_cv_pthread_lib_lpthread_woff=yes
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   ol_cv_pthread_lib_lpthread_woff=no
6512 fi
6513 rm -f conftest*
6514
6515                 # restore the LIBS
6516                 LIBS="$ol_LIBS"
6517                 
6518 fi
6519
6520 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6521
6522                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6523                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6524                         ol_link_threads=posix
6525                 fi
6526         fi
6527
6528
6529                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6530         if test "$ol_link_threads" = no ; then
6531                 # try -lpthread
6532                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6533 echo "configure:6534: checking for pthread link with -lpthread" >&5
6534 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6535   echo $ac_n "(cached) $ac_c" 1>&6
6536 else
6537   
6538                         # save the flags
6539                         ol_LIBS="$LIBS"
6540                         LIBS="-lpthread $LIBS"
6541
6542                         cat > conftest.$ac_ext <<EOF
6543 #line 6544 "configure"
6544 #include "confdefs.h"
6545
6546 #include <pthread.h>
6547 #ifndef NULL
6548 #define NULL (void*)0
6549 #endif
6550
6551 int main() {
6552
6553         pthread_t t;
6554
6555 #if HAVE_PTHREADS_D4
6556         pthread_create(&t, pthread_attr_default, NULL, NULL);
6557         pthread_detach( &t );
6558 #else
6559         pthread_create(&t, NULL, NULL, NULL);
6560         pthread_detach( t );
6561 #endif
6562 #ifdef HAVE_LINUX_THREADS
6563         pthread_kill_other_threads_np();
6564 #endif
6565
6566 ; return 0; }
6567 EOF
6568 if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569   rm -rf conftest*
6570   ol_cv_pthread_lpthread=yes
6571 else
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   ol_cv_pthread_lpthread=no
6576 fi
6577 rm -f conftest*
6578
6579                 # restore the LIBS
6580                 LIBS="$ol_LIBS"
6581                 
6582 fi
6583
6584 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6585
6586                 if test $ol_cv_pthread_lpthread = yes ; then
6587                         ol_link_pthreads="-lpthread"
6588                         ol_link_threads=posix
6589                 fi
6590         fi
6591
6592                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6593         if test "$ol_link_threads" = no ; then
6594                 # try -lc_r
6595                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6596 echo "configure:6597: checking for pthread link with -lc_r" >&5
6597 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6598   echo $ac_n "(cached) $ac_c" 1>&6
6599 else
6600   
6601                         # save the flags
6602                         ol_LIBS="$LIBS"
6603                         LIBS="-lc_r $LIBS"
6604
6605                         cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608
6609 #include <pthread.h>
6610 #ifndef NULL
6611 #define NULL (void*)0
6612 #endif
6613
6614 int main() {
6615
6616         pthread_t t;
6617
6618 #if HAVE_PTHREADS_D4
6619         pthread_create(&t, pthread_attr_default, NULL, NULL);
6620         pthread_detach( &t );
6621 #else
6622         pthread_create(&t, NULL, NULL, NULL);
6623         pthread_detach( t );
6624 #endif
6625 #ifdef HAVE_LINUX_THREADS
6626         pthread_kill_other_threads_np();
6627 #endif
6628
6629 ; return 0; }
6630 EOF
6631 if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632   rm -rf conftest*
6633   ol_cv_pthread_lc_r=yes
6634 else
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   ol_cv_pthread_lc_r=no
6639 fi
6640 rm -f conftest*
6641
6642                 # restore the LIBS
6643                 LIBS="$ol_LIBS"
6644                 
6645 fi
6646
6647 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6648
6649                 if test $ol_cv_pthread_lc_r = yes ; then
6650                         ol_link_pthreads="-lc_r"
6651                         ol_link_threads=posix
6652                 fi
6653         fi
6654
6655
6656                 # Pthread try link: -threads (ol_cv_pthread_threads)
6657         if test "$ol_link_threads" = no ; then
6658                 # try -threads
6659                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6660 echo "configure:6661: checking for pthread link with -threads" >&5
6661 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6662   echo $ac_n "(cached) $ac_c" 1>&6
6663 else
6664   
6665                         # save the flags
6666                         ol_LIBS="$LIBS"
6667                         LIBS="-threads $LIBS"
6668
6669                         cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672
6673 #include <pthread.h>
6674 #ifndef NULL
6675 #define NULL (void*)0
6676 #endif
6677
6678 int main() {
6679
6680         pthread_t t;
6681
6682 #if HAVE_PTHREADS_D4
6683         pthread_create(&t, pthread_attr_default, NULL, NULL);
6684         pthread_detach( &t );
6685 #else
6686         pthread_create(&t, NULL, NULL, NULL);
6687         pthread_detach( t );
6688 #endif
6689 #ifdef HAVE_LINUX_THREADS
6690         pthread_kill_other_threads_np();
6691 #endif
6692
6693 ; return 0; }
6694 EOF
6695 if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6696   rm -rf conftest*
6697   ol_cv_pthread_threads=yes
6698 else
6699   echo "configure: failed program was:" >&5
6700   cat conftest.$ac_ext >&5
6701   rm -rf conftest*
6702   ol_cv_pthread_threads=no
6703 fi
6704 rm -f conftest*
6705
6706                 # restore the LIBS
6707                 LIBS="$ol_LIBS"
6708                 
6709 fi
6710
6711 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6712
6713                 if test $ol_cv_pthread_threads = yes ; then
6714                         ol_link_pthreads="-threads"
6715                         ol_link_threads=posix
6716                 fi
6717         fi
6718
6719
6720                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6721         if test "$ol_link_threads" = no ; then
6722                 # try -lpthreads -lmach -lexc -lc_r
6723                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6724 echo "configure:6725: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6725 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   
6729                         # save the flags
6730                         ol_LIBS="$LIBS"
6731                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6732
6733                         cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736
6737 #include <pthread.h>
6738 #ifndef NULL
6739 #define NULL (void*)0
6740 #endif
6741
6742 int main() {
6743
6744         pthread_t t;
6745
6746 #if HAVE_PTHREADS_D4
6747         pthread_create(&t, pthread_attr_default, NULL, NULL);
6748         pthread_detach( &t );
6749 #else
6750         pthread_create(&t, NULL, NULL, NULL);
6751         pthread_detach( t );
6752 #endif
6753 #ifdef HAVE_LINUX_THREADS
6754         pthread_kill_other_threads_np();
6755 #endif
6756
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765   rm -rf conftest*
6766   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6767 fi
6768 rm -f conftest*
6769
6770                 # restore the LIBS
6771                 LIBS="$ol_LIBS"
6772                 
6773 fi
6774
6775 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6776
6777                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6778                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6779                         ol_link_threads=posix
6780                 fi
6781         fi
6782
6783                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6784         if test "$ol_link_threads" = no ; then
6785                 # try -lpthreads -lmach -lexc
6786                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6787 echo "configure:6788: checking for pthread link with -lpthreads -lmach -lexc" >&5
6788 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   
6792                         # save the flags
6793                         ol_LIBS="$LIBS"
6794                         LIBS="-lpthreads -lmach -lexc $LIBS"
6795
6796                         cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799
6800 #include <pthread.h>
6801 #ifndef NULL
6802 #define NULL (void*)0
6803 #endif
6804
6805 int main() {
6806
6807         pthread_t t;
6808
6809 #if HAVE_PTHREADS_D4
6810         pthread_create(&t, pthread_attr_default, NULL, NULL);
6811         pthread_detach( &t );
6812 #else
6813         pthread_create(&t, NULL, NULL, NULL);
6814         pthread_detach( t );
6815 #endif
6816 #ifdef HAVE_LINUX_THREADS
6817         pthread_kill_other_threads_np();
6818 #endif
6819
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   ol_cv_pthread_lpthreads_lmach_lexc=yes
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   ol_cv_pthread_lpthreads_lmach_lexc=no
6830 fi
6831 rm -f conftest*
6832
6833                 # restore the LIBS
6834                 LIBS="$ol_LIBS"
6835                 
6836 fi
6837
6838 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6839
6840                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6841                         ol_link_pthreads="-lpthreads -lmach -lexc"
6842                         ol_link_threads=posix
6843                 fi
6844         fi
6845
6846                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6847         if test "$ol_link_threads" = no ; then
6848                 # try -lpthreads -lexc
6849                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6850 echo "configure:6851: checking for pthread link with -lpthreads -lexc" >&5
6851 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
6852   echo $ac_n "(cached) $ac_c" 1>&6
6853 else
6854   
6855                         # save the flags
6856                         ol_LIBS="$LIBS"
6857                         LIBS="-lpthreads -lexc $LIBS"
6858
6859                         cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862
6863 #include <pthread.h>
6864 #ifndef NULL
6865 #define NULL (void*)0
6866 #endif
6867
6868 int main() {
6869
6870         pthread_t t;
6871
6872 #if HAVE_PTHREADS_D4
6873         pthread_create(&t, pthread_attr_default, NULL, NULL);
6874         pthread_detach( &t );
6875 #else
6876         pthread_create(&t, NULL, NULL, NULL);
6877         pthread_detach( t );
6878 #endif
6879 #ifdef HAVE_LINUX_THREADS
6880         pthread_kill_other_threads_np();
6881 #endif
6882
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   ol_cv_pthread_lpthreads_lexc=yes
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   ol_cv_pthread_lpthreads_lexc=no
6893 fi
6894 rm -f conftest*
6895
6896                 # restore the LIBS
6897                 LIBS="$ol_LIBS"
6898                 
6899 fi
6900
6901 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6902
6903                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6904                         ol_link_pthreads="-lpthreads -lexc"
6905                         ol_link_threads=posix
6906                 fi
6907         fi
6908
6909
6910                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6911         if test "$ol_link_threads" = no ; then
6912                 # try -lpthreads
6913                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6914 echo "configure:6915: checking for pthread link with -lpthreads" >&5
6915 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
6916   echo $ac_n "(cached) $ac_c" 1>&6
6917 else
6918   
6919                         # save the flags
6920                         ol_LIBS="$LIBS"
6921                         LIBS="-lpthreads $LIBS"
6922
6923                         cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926
6927 #include <pthread.h>
6928 #ifndef NULL
6929 #define NULL (void*)0
6930 #endif
6931
6932 int main() {
6933
6934         pthread_t t;
6935
6936 #if HAVE_PTHREADS_D4
6937         pthread_create(&t, pthread_attr_default, NULL, NULL);
6938         pthread_detach( &t );
6939 #else
6940         pthread_create(&t, NULL, NULL, NULL);
6941         pthread_detach( t );
6942 #endif
6943 #ifdef HAVE_LINUX_THREADS
6944         pthread_kill_other_threads_np();
6945 #endif
6946
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   ol_cv_pthread_lib_lpthreads=yes
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   ol_cv_pthread_lib_lpthreads=no
6957 fi
6958 rm -f conftest*
6959
6960                 # restore the LIBS
6961                 LIBS="$ol_LIBS"
6962                 
6963 fi
6964
6965 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6966
6967                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6968                         ol_link_pthreads="-lpthreads"
6969                         ol_link_threads=posix
6970                 fi
6971         fi
6972
6973
6974                 if test $ol_link_threads != no ; then
6975                         cat >> confdefs.h <<\EOF
6976 #define HAVE_PTHREADS 1
6977 EOF
6978
6979
6980                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6981
6982                                                 save_CPPFLAGS="$CPPFLAGS"
6983                         save_LIBS="$LIBS"
6984                         LIBS="$LTHREAD_LIBS $LIBS"
6985
6986                                                                                                 for ac_func in sched_yield pthread_yield
6987 do
6988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6989 echo "configure:6990: checking for $ac_func" >&5
6990 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6991   echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993   cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996 /* System header to define __stub macros and hopefully few prototypes,
6997     which can conflict with char $ac_func(); below.  */
6998 #include <assert.h>
6999 /* Override any gcc2 internal prototype to avoid an error.  */
7000 /* We use char because int might match the return type of a gcc2
7001     builtin and then its argument prototype would still apply.  */
7002 char $ac_func();
7003 char (*f)();
7004
7005 int main() {
7006
7007 /* The GNU C library defines this for functions which it implements
7008     to always fail with ENOSYS.  Some functions are actually named
7009     something starting with __ and the normal name is an alias.  */
7010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7011 choke me
7012 #else
7013 f = $ac_func;
7014 #endif
7015
7016 ; return 0; }
7017 EOF
7018 if { (eval echo configure:7019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7019   rm -rf conftest*
7020   eval "ac_cv_func_$ac_func=yes"
7021 else
7022   echo "configure: failed program was:" >&5
7023   cat conftest.$ac_ext >&5
7024   rm -rf conftest*
7025   eval "ac_cv_func_$ac_func=no"
7026 fi
7027 rm -f conftest*
7028 fi
7029
7030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7031   echo "$ac_t""yes" 1>&6
7032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7033   cat >> confdefs.h <<EOF
7034 #define $ac_tr_func 1
7035 EOF
7036  
7037 else
7038   echo "$ac_t""no" 1>&6
7039 fi
7040 done
7041
7042
7043                         if test $ac_cv_func_sched_yield = no -a \
7044                                 $ac_cv_func_pthread_yield = no ; then
7045                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7046 echo "configure:7047: checking for sched_yield in -lrt" >&5
7047 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051   ac_save_LIBS="$LIBS"
7052 LIBS="-lrt  $LIBS"
7053 cat > conftest.$ac_ext <<EOF
7054 #line 7055 "configure"
7055 #include "confdefs.h"
7056 /* Override any gcc2 internal prototype to avoid an error.  */
7057 /* We use char because int might match the return type of a gcc2
7058     builtin and then its argument prototype would still apply.  */
7059 char sched_yield();
7060
7061 int main() {
7062 sched_yield()
7063 ; return 0; }
7064 EOF
7065 if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7066   rm -rf conftest*
7067   eval "ac_cv_lib_$ac_lib_var=yes"
7068 else
7069   echo "configure: failed program was:" >&5
7070   cat conftest.$ac_ext >&5
7071   rm -rf conftest*
7072   eval "ac_cv_lib_$ac_lib_var=no"
7073 fi
7074 rm -f conftest*
7075 LIBS="$ac_save_LIBS"
7076
7077 fi
7078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7079   echo "$ac_t""yes" 1>&6
7080   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7081                                         cat >> confdefs.h <<\EOF
7082 #define HAVE_SCHED_YIELD 1
7083 EOF
7084
7085                                         ac_cv_func_sched_yield=yes
7086 else
7087   echo "$ac_t""no" 1>&6
7088 ac_cv_func_sched_yield=no
7089 fi
7090
7091                         fi
7092                         if test $ac_cv_func_sched_yield = no -a \
7093                                 $ac_cv_func_pthread_yield = no ; then
7094                                                                                                 for ac_func in thr_yield
7095 do
7096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7097 echo "configure:7098: checking for $ac_func" >&5
7098 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7099   echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101   cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* System header to define __stub macros and hopefully few prototypes,
7105     which can conflict with char $ac_func(); below.  */
7106 #include <assert.h>
7107 /* Override any gcc2 internal prototype to avoid an error.  */
7108 /* We use char because int might match the return type of a gcc2
7109     builtin and then its argument prototype would still apply.  */
7110 char $ac_func();
7111 char (*f)();
7112
7113 int main() {
7114
7115 /* The GNU C library defines this for functions which it implements
7116     to always fail with ENOSYS.  Some functions are actually named
7117     something starting with __ and the normal name is an alias.  */
7118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7119 choke me
7120 #else
7121 f = $ac_func;
7122 #endif
7123
7124 ; return 0; }
7125 EOF
7126 if { (eval echo configure:7127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7127   rm -rf conftest*
7128   eval "ac_cv_func_$ac_func=yes"
7129 else
7130   echo "configure: failed program was:" >&5
7131   cat conftest.$ac_ext >&5
7132   rm -rf conftest*
7133   eval "ac_cv_func_$ac_func=no"
7134 fi
7135 rm -f conftest*
7136 fi
7137
7138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7139   echo "$ac_t""yes" 1>&6
7140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7141   cat >> confdefs.h <<EOF
7142 #define $ac_tr_func 1
7143 EOF
7144  
7145 else
7146   echo "$ac_t""no" 1>&6
7147 fi
7148 done
7149
7150                         fi
7151                         if test $ac_cv_func_sched_yield = no -a \
7152                                 $ac_cv_func_pthread_yield = no -a \
7153                                 "$ac_cv_func_thr_yield" = no ; then
7154                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7155                         fi
7156
7157                                                 for ac_func in pthread_kill
7158 do
7159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7160 echo "configure:7161: checking for $ac_func" >&5
7161 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7162   echo $ac_n "(cached) $ac_c" 1>&6
7163 else
7164   cat > conftest.$ac_ext <<EOF
7165 #line 7166 "configure"
7166 #include "confdefs.h"
7167 /* System header to define __stub macros and hopefully few prototypes,
7168     which can conflict with char $ac_func(); below.  */
7169 #include <assert.h>
7170 /* Override any gcc2 internal prototype to avoid an error.  */
7171 /* We use char because int might match the return type of a gcc2
7172     builtin and then its argument prototype would still apply.  */
7173 char $ac_func();
7174 char (*f)();
7175
7176 int main() {
7177
7178 /* The GNU C library defines this for functions which it implements
7179     to always fail with ENOSYS.  Some functions are actually named
7180     something starting with __ and the normal name is an alias.  */
7181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7182 choke me
7183 #else
7184 f = $ac_func;
7185 #endif
7186
7187 ; return 0; }
7188 EOF
7189 if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7190   rm -rf conftest*
7191   eval "ac_cv_func_$ac_func=yes"
7192 else
7193   echo "configure: failed program was:" >&5
7194   cat conftest.$ac_ext >&5
7195   rm -rf conftest*
7196   eval "ac_cv_func_$ac_func=no"
7197 fi
7198 rm -f conftest*
7199 fi
7200
7201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7202   echo "$ac_t""yes" 1>&6
7203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7204   cat >> confdefs.h <<EOF
7205 #define $ac_tr_func 1
7206 EOF
7207  
7208 else
7209   echo "$ac_t""no" 1>&6
7210 fi
7211 done
7212
7213
7214                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7215 echo "configure:7216: checking for pthread_detach with <pthread.h>" >&5
7216 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7217   echo $ac_n "(cached) $ac_c" 1>&6
7218 else
7219   
7220                                                                 cat > conftest.$ac_ext <<EOF
7221 #line 7222 "configure"
7222 #include "confdefs.h"
7223
7224 #include <pthread.h>
7225 #ifndef NULL
7226 #define NULL (void*)0
7227 #endif
7228
7229 int main() {
7230 pthread_detach(NULL);
7231 ; return 0; }
7232 EOF
7233 if { (eval echo configure:7234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7234   rm -rf conftest*
7235   ol_cv_func_pthread_detach=yes
7236 else
7237   echo "configure: failed program was:" >&5
7238   cat conftest.$ac_ext >&5
7239   rm -rf conftest*
7240   ol_cv_func_pthread_detach=no
7241 fi
7242 rm -f conftest*
7243                         
7244 fi
7245
7246 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7247
7248                         if test $ol_cv_func_pthread_detach = no ; then
7249                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7250                         fi
7251
7252                         cat >> confdefs.h <<\EOF
7253 #define HAVE_PTHREAD_DETACH 1
7254 EOF
7255
7256
7257                                                 for ac_func in \
7258                                 pthread_setconcurrency \
7259                                 pthread_getconcurrency \
7260                                 thr_setconcurrency \
7261                                 thr_getconcurrency \
7262                         
7263 do
7264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7265 echo "configure:7266: checking for $ac_func" >&5
7266 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7267   echo $ac_n "(cached) $ac_c" 1>&6
7268 else
7269   cat > conftest.$ac_ext <<EOF
7270 #line 7271 "configure"
7271 #include "confdefs.h"
7272 /* System header to define __stub macros and hopefully few prototypes,
7273     which can conflict with char $ac_func(); below.  */
7274 #include <assert.h>
7275 /* Override any gcc2 internal prototype to avoid an error.  */
7276 /* We use char because int might match the return type of a gcc2
7277     builtin and then its argument prototype would still apply.  */
7278 char $ac_func();
7279 char (*f)();
7280
7281 int main() {
7282
7283 /* The GNU C library defines this for functions which it implements
7284     to always fail with ENOSYS.  Some functions are actually named
7285     something starting with __ and the normal name is an alias.  */
7286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7287 choke me
7288 #else
7289 f = $ac_func;
7290 #endif
7291
7292 ; return 0; }
7293 EOF
7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7295   rm -rf conftest*
7296   eval "ac_cv_func_$ac_func=yes"
7297 else
7298   echo "configure: failed program was:" >&5
7299   cat conftest.$ac_ext >&5
7300   rm -rf conftest*
7301   eval "ac_cv_func_$ac_func=no"
7302 fi
7303 rm -f conftest*
7304 fi
7305
7306 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7307   echo "$ac_t""yes" 1>&6
7308     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7309   cat >> confdefs.h <<EOF
7310 #define $ac_tr_func 1
7311 EOF
7312  
7313 else
7314   echo "$ac_t""no" 1>&6
7315 fi
7316 done
7317
7318
7319                         
7320         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7321 echo "configure:7322: checking for pthread_kill_other_threads_np" >&5
7322 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7323   echo $ac_n "(cached) $ac_c" 1>&6
7324 else
7325   cat > conftest.$ac_ext <<EOF
7326 #line 7327 "configure"
7327 #include "confdefs.h"
7328 /* System header to define __stub macros and hopefully few prototypes,
7329     which can conflict with char pthread_kill_other_threads_np(); below.  */
7330 #include <assert.h>
7331 /* Override any gcc2 internal prototype to avoid an error.  */
7332 /* We use char because int might match the return type of a gcc2
7333     builtin and then its argument prototype would still apply.  */
7334 char pthread_kill_other_threads_np();
7335 char (*f)();
7336
7337 int main() {
7338
7339 /* The GNU C library defines this for functions which it implements
7340     to always fail with ENOSYS.  Some functions are actually named
7341     something starting with __ and the normal name is an alias.  */
7342 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7343 choke me
7344 #else
7345 f = pthread_kill_other_threads_np;
7346 #endif
7347
7348 ; return 0; }
7349 EOF
7350 if { (eval echo configure:7351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7351   rm -rf conftest*
7352   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7353 else
7354   echo "configure: failed program was:" >&5
7355   cat conftest.$ac_ext >&5
7356   rm -rf conftest*
7357   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7358 fi
7359 rm -f conftest*
7360 fi
7361
7362 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7363   echo "$ac_t""yes" 1>&6
7364   :
7365 else
7366   echo "$ac_t""no" 1>&6
7367 fi
7368
7369         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7370 echo "configure:7371: checking for LinuxThreads implementation" >&5
7371 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7372   echo $ac_n "(cached) $ac_c" 1>&6
7373 else
7374   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7375 fi
7376
7377 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7378
7379                         
7380         
7381         
7382         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7383 echo "configure:7384: checking for LinuxThreads consistency" >&5
7384 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7385   echo $ac_n "(cached) $ac_c" 1>&6
7386 else
7387   
7388                 if test $ol_cv_header_linux_threads = yes -a \
7389                         $ol_cv_sys_linux_threads = yes; then
7390                         ol_cv_linux_threads=yes
7391                 elif test $ol_cv_header_linux_threads = no -a \
7392                         $ol_cv_sys_linux_threads = no; then
7393                         ol_cv_linux_threads=no
7394                 else
7395                         ol_cv_linux_threads=error
7396                 fi
7397         
7398 fi
7399
7400 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7401
7402
7403                         if test $ol_cv_linux_threads = error; then
7404                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7405                         fi
7406
7407                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7408 echo "configure:7409: checking if pthread_create() works" >&5
7409 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7410   echo $ac_n "(cached) $ac_c" 1>&6
7411 else
7412   
7413                         if test "$cross_compiling" = yes; then
7414                                 ol_cv_pthread_create_works=yes
7415 else
7416   cat > conftest.$ac_ext <<EOF
7417 #line 7418 "configure"
7418 #include "confdefs.h"
7419
7420 #include <pthread.h>
7421 #ifndef NULL
7422 #define NULL (void*)0
7423 #endif
7424
7425 static void *task(p)
7426         void *p;
7427 {
7428         return (void *) (p == NULL);
7429 }
7430
7431 int main(argc, argv)
7432         int argc;
7433         char **argv;
7434 {
7435         pthread_t t;
7436 #if HAVE_PTHREADS_D4
7437         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7438 #else
7439         exit(pthread_create(&t, NULL, task, NULL));
7440 #endif
7441 }
7442
7443 EOF
7444 if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7445 then
7446   ol_cv_pthread_create_works=yes
7447 else
7448   echo "configure: failed program was:" >&5
7449   cat conftest.$ac_ext >&5
7450   rm -fr conftest*
7451   ol_cv_pthread_create_works=no
7452 fi
7453 rm -fr conftest*
7454 fi
7455
7456 fi
7457
7458 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7459
7460                         if test $ol_cv_pthread_create_works = no ; then
7461                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7462                         fi
7463
7464                                                 if test $ol_with_yielding_select = auto ; then
7465                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7466 echo "configure:7467: checking if select yields when using pthreads" >&5
7467 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7468   echo $ac_n "(cached) $ac_c" 1>&6
7469 else
7470   
7471                                 if test "$cross_compiling" = yes; then
7472   ol_cv_pthread_select_yields=cross
7473 else
7474   cat > conftest.$ac_ext <<EOF
7475 #line 7476 "configure"
7476 #include "confdefs.h"
7477
7478 #include <sys/types.h>
7479 #include <sys/time.h>
7480 #include <unistd.h>
7481 #include <pthread.h>
7482 #ifndef NULL
7483 #define NULL (void*) 0
7484 #endif
7485
7486 static int fildes[2];
7487
7488 static void *task(p)
7489         void *p;
7490 {
7491         int i;
7492         struct timeval tv;
7493
7494         fd_set rfds;
7495
7496         tv.tv_sec=10;
7497         tv.tv_usec=0;
7498
7499         FD_ZERO(&rfds);
7500         FD_SET(fildes[0], &rfds);
7501
7502         /* we're not interested in any fds */
7503         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7504
7505         if(i < 0) {
7506                 perror("select");
7507                 exit(10);
7508         }
7509
7510         exit(0); /* if we exit here, the select blocked the whole process */
7511 }
7512
7513 int main(argc, argv)
7514         int argc;
7515         char **argv;
7516 {
7517         pthread_t t;
7518
7519         /* create a pipe to select */
7520         if(pipe(&fildes[0])) {
7521                 perror("select");
7522                 exit(1);
7523         }
7524
7525 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7526         (void) pthread_setconcurrency(2);
7527 #else
7528 #ifdef HAVE_THR_SETCONCURRENCY
7529         /* Set Solaris LWP concurrency to 2 */
7530         thr_setconcurrency(2);
7531 #endif
7532 #endif
7533
7534 #if HAVE_PTHREADS_D4
7535         pthread_create(&t, pthread_attr_default, task, NULL);
7536 #else
7537         pthread_create(&t, NULL, task, NULL);
7538 #endif
7539
7540 #if HAVE_SCHED_YIELD
7541         sched_yield();  /* make sure task runs first */
7542 #else
7543 #ifdef HAVE_PTHREAD_YIELD
7544         pthread_yield();        /* make sure task runs first */
7545 #endif
7546 #endif
7547
7548         exit(2);
7549 }
7550 EOF
7551 if { (eval echo configure:7552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7552 then
7553   ol_cv_pthread_select_yields=no
7554 else
7555   echo "configure: failed program was:" >&5
7556   cat conftest.$ac_ext >&5
7557   rm -fr conftest*
7558   ol_cv_pthread_select_yields=yes
7559 fi
7560 rm -fr conftest*
7561 fi
7562
7563 fi
7564
7565 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7566
7567                                 if test $ol_cv_pthread_select_yields = cross ; then
7568                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7569                                 fi
7570
7571                                 if test $ol_cv_pthread_select_yields = yes ; then
7572                                         ol_with_yielding_select=yes
7573                                 fi
7574                         fi
7575
7576                                                 CPPFLAGS="$save_CPPFLAGS"
7577                         LIBS="$save_LIBS"
7578                 else
7579                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7580                 fi
7581         fi
7582
7583         if test $ol_with_threads = posix ; then
7584                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7585         fi
7586 fi
7587
7588 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7589         -o $ol_with_threads = mach ; then
7590
7591                 for ac_hdr in mach/cthreads.h
7592 do
7593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7595 echo "configure:7596: checking for $ac_hdr" >&5
7596 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7597   echo $ac_n "(cached) $ac_c" 1>&6
7598 else
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 #include <$ac_hdr>
7603 EOF
7604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7605 { (eval echo configure:7606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7607 if test -z "$ac_err"; then
7608   rm -rf conftest*
7609   eval "ac_cv_header_$ac_safe=yes"
7610 else
7611   echo "$ac_err" >&5
7612   echo "configure: failed program was:" >&5
7613   cat conftest.$ac_ext >&5
7614   rm -rf conftest*
7615   eval "ac_cv_header_$ac_safe=no"
7616 fi
7617 rm -f conftest*
7618 fi
7619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7620   echo "$ac_t""yes" 1>&6
7621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7622   cat >> confdefs.h <<EOF
7623 #define $ac_tr_hdr 1
7624 EOF
7625  
7626 else
7627   echo "$ac_t""no" 1>&6
7628 fi
7629 done
7630
7631         if test $ac_cv_header_mach_cthreads_h = yes ; then
7632                 ol_with_threads=found
7633
7634                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7635 echo "configure:7636: checking for cthread_fork" >&5
7636 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7637   echo $ac_n "(cached) $ac_c" 1>&6
7638 else
7639   cat > conftest.$ac_ext <<EOF
7640 #line 7641 "configure"
7641 #include "confdefs.h"
7642 /* System header to define __stub macros and hopefully few prototypes,
7643     which can conflict with char cthread_fork(); below.  */
7644 #include <assert.h>
7645 /* Override any gcc2 internal prototype to avoid an error.  */
7646 /* We use char because int might match the return type of a gcc2
7647     builtin and then its argument prototype would still apply.  */
7648 char cthread_fork();
7649 char (*f)();
7650
7651 int main() {
7652
7653 /* The GNU C library defines this for functions which it implements
7654     to always fail with ENOSYS.  Some functions are actually named
7655     something starting with __ and the normal name is an alias.  */
7656 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7657 choke me
7658 #else
7659 f = cthread_fork;
7660 #endif
7661
7662 ; return 0; }
7663 EOF
7664 if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7665   rm -rf conftest*
7666   eval "ac_cv_func_cthread_fork=yes"
7667 else
7668   echo "configure: failed program was:" >&5
7669   cat conftest.$ac_ext >&5
7670   rm -rf conftest*
7671   eval "ac_cv_func_cthread_fork=no"
7672 fi
7673 rm -f conftest*
7674 fi
7675
7676 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7677   echo "$ac_t""yes" 1>&6
7678   ol_link_threads=yes
7679 else
7680   echo "$ac_t""no" 1>&6
7681 fi
7682
7683
7684                 if test $ol_link_threads = no ; then
7685                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7686 echo "configure:7687: checking for cthread_fork with -all_load" >&5
7687 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7688   echo $ac_n "(cached) $ac_c" 1>&6
7689 else
7690   
7691                                                                 save_LIBS="$LIBS"
7692                                 LIBS="-all_load $LIBS"
7693                                 cat > conftest.$ac_ext <<EOF
7694 #line 7695 "configure"
7695 #include "confdefs.h"
7696 #include <mach/cthreads.h>
7697 int main() {
7698
7699                                         cthread_fork((void *)0, (void *)0);
7700                                         
7701 ; return 0; }
7702 EOF
7703 if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7704   rm -rf conftest*
7705   ol_cv_cthread_all_load=yes
7706 else
7707   echo "configure: failed program was:" >&5
7708   cat conftest.$ac_ext >&5
7709   rm -rf conftest*
7710   ol_cv_cthread_all_load=no
7711 fi
7712 rm -f conftest*
7713                                                                 LIBS="$save_LIBS"
7714                         
7715 fi
7716
7717 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7718
7719                         if test $ol_cv_cthread_all_load = yes ; then
7720                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7721                                 ol_link_threads=mach
7722                         fi
7723                 fi
7724
7725                 if test $ol_link_threads != no ; then
7726                         : check for cthread specific functionality here
7727                         cat >> confdefs.h <<\EOF
7728 #define HAVE_MACH_CTHREADS 1
7729 EOF
7730
7731                 else
7732                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7733                 fi
7734         fi
7735
7736         if test $ol_with_threads = mach ; then
7737                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7738         fi
7739 fi
7740
7741 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7742         -o $ol_with_threads = lwp ; then
7743
7744                 for ac_hdr in thread.h synch.h
7745 do
7746 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7747 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7748 echo "configure:7749: checking for $ac_hdr" >&5
7749 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7750   echo $ac_n "(cached) $ac_c" 1>&6
7751 else
7752   cat > conftest.$ac_ext <<EOF
7753 #line 7754 "configure"
7754 #include "confdefs.h"
7755 #include <$ac_hdr>
7756 EOF
7757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7758 { (eval echo configure:7759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7760 if test -z "$ac_err"; then
7761   rm -rf conftest*
7762   eval "ac_cv_header_$ac_safe=yes"
7763 else
7764   echo "$ac_err" >&5
7765   echo "configure: failed program was:" >&5
7766   cat conftest.$ac_ext >&5
7767   rm -rf conftest*
7768   eval "ac_cv_header_$ac_safe=no"
7769 fi
7770 rm -f conftest*
7771 fi
7772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7773   echo "$ac_t""yes" 1>&6
7774     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7775   cat >> confdefs.h <<EOF
7776 #define $ac_tr_hdr 1
7777 EOF
7778  
7779 else
7780   echo "$ac_t""no" 1>&6
7781 fi
7782 done
7783
7784         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7785                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7786 echo "configure:7787: checking for thr_create in -lthread" >&5
7787 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
7788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   ac_save_LIBS="$LIBS"
7792 LIBS="-lthread  $LIBS"
7793 cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 /* Override any gcc2 internal prototype to avoid an error.  */
7797 /* We use char because int might match the return type of a gcc2
7798     builtin and then its argument prototype would still apply.  */
7799 char thr_create();
7800
7801 int main() {
7802 thr_create()
7803 ; return 0; }
7804 EOF
7805 if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=yes"
7808 else
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=no"
7813 fi
7814 rm -f conftest*
7815 LIBS="$ac_save_LIBS"
7816
7817 fi
7818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7819   echo "$ac_t""yes" 1>&6
7820   have_thr=yes
7821 else
7822   echo "$ac_t""no" 1>&6
7823 have_thr=no
7824 fi
7825
7826
7827                 if test $have_thr = yes ; then
7828                         cat >> confdefs.h <<\EOF
7829 #define HAVE_THR 1
7830 EOF
7831
7832                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7833                         ol_link_threads=thr
7834
7835                         if test $ol_with_yielding_select = auto ; then
7836                                 ol_with_yielding_select=yes
7837                         fi
7838
7839                                                 for ac_func in \
7840                                 thr_setconcurrency \
7841                                 thr_getconcurrency \
7842                         
7843 do
7844 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7845 echo "configure:7846: checking for $ac_func" >&5
7846 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7847   echo $ac_n "(cached) $ac_c" 1>&6
7848 else
7849   cat > conftest.$ac_ext <<EOF
7850 #line 7851 "configure"
7851 #include "confdefs.h"
7852 /* System header to define __stub macros and hopefully few prototypes,
7853     which can conflict with char $ac_func(); below.  */
7854 #include <assert.h>
7855 /* Override any gcc2 internal prototype to avoid an error.  */
7856 /* We use char because int might match the return type of a gcc2
7857     builtin and then its argument prototype would still apply.  */
7858 char $ac_func();
7859 char (*f)();
7860
7861 int main() {
7862
7863 /* The GNU C library defines this for functions which it implements
7864     to always fail with ENOSYS.  Some functions are actually named
7865     something starting with __ and the normal name is an alias.  */
7866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7867 choke me
7868 #else
7869 f = $ac_func;
7870 #endif
7871
7872 ; return 0; }
7873 EOF
7874 if { (eval echo configure:7875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7875   rm -rf conftest*
7876   eval "ac_cv_func_$ac_func=yes"
7877 else
7878   echo "configure: failed program was:" >&5
7879   cat conftest.$ac_ext >&5
7880   rm -rf conftest*
7881   eval "ac_cv_func_$ac_func=no"
7882 fi
7883 rm -f conftest*
7884 fi
7885
7886 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7887   echo "$ac_t""yes" 1>&6
7888     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7889   cat >> confdefs.h <<EOF
7890 #define $ac_tr_func 1
7891 EOF
7892  
7893 else
7894   echo "$ac_t""no" 1>&6
7895 fi
7896 done
7897
7898                 fi
7899         fi
7900
7901                 for ac_hdr in lwp/lwp.h
7902 do
7903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7905 echo "configure:7906: checking for $ac_hdr" >&5
7906 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7907   echo $ac_n "(cached) $ac_c" 1>&6
7908 else
7909   cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 #include <$ac_hdr>
7913 EOF
7914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7915 { (eval echo configure:7916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7917 if test -z "$ac_err"; then
7918   rm -rf conftest*
7919   eval "ac_cv_header_$ac_safe=yes"
7920 else
7921   echo "$ac_err" >&5
7922   echo "configure: failed program was:" >&5
7923   cat conftest.$ac_ext >&5
7924   rm -rf conftest*
7925   eval "ac_cv_header_$ac_safe=no"
7926 fi
7927 rm -f conftest*
7928 fi
7929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7930   echo "$ac_t""yes" 1>&6
7931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7932   cat >> confdefs.h <<EOF
7933 #define $ac_tr_hdr 1
7934 EOF
7935  
7936 else
7937   echo "$ac_t""no" 1>&6
7938 fi
7939 done
7940
7941         if test $ac_cv_header_lwp_lwp_h = yes ; then
7942                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7943 echo "configure:7944: checking for lwp_create in -llwp" >&5
7944 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
7945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   ac_save_LIBS="$LIBS"
7949 LIBS="-llwp  $LIBS"
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char lwp_create();
7957
7958 int main() {
7959 lwp_create()
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=no"
7970 fi
7971 rm -f conftest*
7972 LIBS="$ac_save_LIBS"
7973
7974 fi
7975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977   have_lwp=yes
7978 else
7979   echo "$ac_t""no" 1>&6
7980 have_lwp=no
7981 fi
7982
7983
7984                 if test $have_lwp = yes ; then
7985                         cat >> confdefs.h <<\EOF
7986 #define HAVE_LWP 1
7987 EOF
7988
7989                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7990                         ol_link_threads=lwp
7991
7992                         if test $ol_with_yielding_select = auto ; then
7993                                 ol_with_yielding_select=no
7994                         fi
7995                 fi
7996         fi
7997 fi
7998
7999 if test $ol_with_yielding_select = yes ; then
8000         cat >> confdefs.h <<\EOF
8001 #define HAVE_YIELDING_SELECT 1
8002 EOF
8003
8004 fi
8005
8006 if test $ol_with_threads = manual ; then
8007                 ol_link_threads=yes
8008
8009         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8010
8011         for ac_hdr in pthread.h sched.h
8012 do
8013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8015 echo "configure:8016: checking for $ac_hdr" >&5
8016 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8017   echo $ac_n "(cached) $ac_c" 1>&6
8018 else
8019   cat > conftest.$ac_ext <<EOF
8020 #line 8021 "configure"
8021 #include "confdefs.h"
8022 #include <$ac_hdr>
8023 EOF
8024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8025 { (eval echo configure:8026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8027 if test -z "$ac_err"; then
8028   rm -rf conftest*
8029   eval "ac_cv_header_$ac_safe=yes"
8030 else
8031   echo "$ac_err" >&5
8032   echo "configure: failed program was:" >&5
8033   cat conftest.$ac_ext >&5
8034   rm -rf conftest*
8035   eval "ac_cv_header_$ac_safe=no"
8036 fi
8037 rm -f conftest*
8038 fi
8039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8040   echo "$ac_t""yes" 1>&6
8041     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8042   cat >> confdefs.h <<EOF
8043 #define $ac_tr_hdr 1
8044 EOF
8045  
8046 else
8047   echo "$ac_t""no" 1>&6
8048 fi
8049 done
8050
8051         for ac_func in sched_yield pthread_yield
8052 do
8053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8054 echo "configure:8055: checking for $ac_func" >&5
8055 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8056   echo $ac_n "(cached) $ac_c" 1>&6
8057 else
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* System header to define __stub macros and hopefully few prototypes,
8062     which can conflict with char $ac_func(); below.  */
8063 #include <assert.h>
8064 /* Override any gcc2 internal prototype to avoid an error.  */
8065 /* We use char because int might match the return type of a gcc2
8066     builtin and then its argument prototype would still apply.  */
8067 char $ac_func();
8068 char (*f)();
8069
8070 int main() {
8071
8072 /* The GNU C library defines this for functions which it implements
8073     to always fail with ENOSYS.  Some functions are actually named
8074     something starting with __ and the normal name is an alias.  */
8075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8076 choke me
8077 #else
8078 f = $ac_func;
8079 #endif
8080
8081 ; return 0; }
8082 EOF
8083 if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8084   rm -rf conftest*
8085   eval "ac_cv_func_$ac_func=yes"
8086 else
8087   echo "configure: failed program was:" >&5
8088   cat conftest.$ac_ext >&5
8089   rm -rf conftest*
8090   eval "ac_cv_func_$ac_func=no"
8091 fi
8092 rm -f conftest*
8093 fi
8094
8095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8096   echo "$ac_t""yes" 1>&6
8097     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8098   cat >> confdefs.h <<EOF
8099 #define $ac_tr_func 1
8100 EOF
8101  
8102 else
8103   echo "$ac_t""no" 1>&6
8104 fi
8105 done
8106
8107         
8108         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8109 echo "configure:8110: checking for LinuxThreads pthread.h" >&5
8110 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8111   echo $ac_n "(cached) $ac_c" 1>&6
8112 else
8113   cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8116 #include <pthread.h>
8117 EOF
8118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8119   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8120   rm -rf conftest*
8121   ol_cv_header_linux_threads=yes
8122 else
8123   rm -rf conftest*
8124   ol_cv_header_linux_threads=no
8125 fi
8126 rm -f conftest*
8127
8128                 
8129 fi
8130
8131 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8132         if test $ol_cv_header_linux_threads = yes; then
8133                 cat >> confdefs.h <<\EOF
8134 #define HAVE_LINUX_THREADS 1
8135 EOF
8136
8137         fi
8138
8139
8140         for ac_hdr in mach/cthreads.h
8141 do
8142 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8143 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8144 echo "configure:8145: checking for $ac_hdr" >&5
8145 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 #include <$ac_hdr>
8152 EOF
8153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8154 { (eval echo configure:8155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8156 if test -z "$ac_err"; then
8157   rm -rf conftest*
8158   eval "ac_cv_header_$ac_safe=yes"
8159 else
8160   echo "$ac_err" >&5
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163   rm -rf conftest*
8164   eval "ac_cv_header_$ac_safe=no"
8165 fi
8166 rm -f conftest*
8167 fi
8168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8169   echo "$ac_t""yes" 1>&6
8170     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8171   cat >> confdefs.h <<EOF
8172 #define $ac_tr_hdr 1
8173 EOF
8174  
8175 else
8176   echo "$ac_t""no" 1>&6
8177 fi
8178 done
8179
8180         for ac_hdr in lwp/lwp.h
8181 do
8182 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8183 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8184 echo "configure:8185: checking for $ac_hdr" >&5
8185 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8186   echo $ac_n "(cached) $ac_c" 1>&6
8187 else
8188   cat > conftest.$ac_ext <<EOF
8189 #line 8190 "configure"
8190 #include "confdefs.h"
8191 #include <$ac_hdr>
8192 EOF
8193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8194 { (eval echo configure:8195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8196 if test -z "$ac_err"; then
8197   rm -rf conftest*
8198   eval "ac_cv_header_$ac_safe=yes"
8199 else
8200   echo "$ac_err" >&5
8201   echo "configure: failed program was:" >&5
8202   cat conftest.$ac_ext >&5
8203   rm -rf conftest*
8204   eval "ac_cv_header_$ac_safe=no"
8205 fi
8206 rm -f conftest*
8207 fi
8208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8209   echo "$ac_t""yes" 1>&6
8210     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8211   cat >> confdefs.h <<EOF
8212 #define $ac_tr_hdr 1
8213 EOF
8214  
8215 else
8216   echo "$ac_t""no" 1>&6
8217 fi
8218 done
8219
8220         for ac_hdr in thread.h synch.h
8221 do
8222 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8223 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8224 echo "configure:8225: checking for $ac_hdr" >&5
8225 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 #include <$ac_hdr>
8232 EOF
8233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8234 { (eval echo configure:8235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8236 if test -z "$ac_err"; then
8237   rm -rf conftest*
8238   eval "ac_cv_header_$ac_safe=yes"
8239 else
8240   echo "$ac_err" >&5
8241   echo "configure: failed program was:" >&5
8242   cat conftest.$ac_ext >&5
8243   rm -rf conftest*
8244   eval "ac_cv_header_$ac_safe=no"
8245 fi
8246 rm -f conftest*
8247 fi
8248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8249   echo "$ac_t""yes" 1>&6
8250     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8251   cat >> confdefs.h <<EOF
8252 #define $ac_tr_hdr 1
8253 EOF
8254  
8255 else
8256   echo "$ac_t""no" 1>&6
8257 fi
8258 done
8259
8260 fi
8261
8262 if test $ol_link_threads != no ; then  
8263                         cat >> confdefs.h <<\EOF
8264 #define REENTRANT 1
8265 EOF
8266
8267         cat >> confdefs.h <<\EOF
8268 #define _REENTRANT 1
8269 EOF
8270
8271         cat >> confdefs.h <<\EOF
8272 #define THREAD_SAFE 1
8273 EOF
8274
8275         cat >> confdefs.h <<\EOF
8276 #define _THREAD_SAFE 1
8277 EOF
8278
8279         cat >> confdefs.h <<\EOF
8280 #define THREADSAFE 1
8281 EOF
8282
8283         cat >> confdefs.h <<\EOF
8284 #define _THREADSAFE 1
8285 EOF
8286
8287         cat >> confdefs.h <<\EOF
8288 #define _SGI_MP_SOURCE 1
8289 EOF
8290
8291
8292                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8293 echo "configure:8294: checking for thread specific errno" >&5
8294 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8295   echo $ac_n "(cached) $ac_c" 1>&6
8296 else
8297   
8298                 cat > conftest.$ac_ext <<EOF
8299 #line 8300 "configure"
8300 #include "confdefs.h"
8301 #include <errno.h>
8302 int main() {
8303 errno = 0;
8304 ; return 0; }
8305 EOF
8306 if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8307   rm -rf conftest*
8308   ol_cv_errno_thread_specific=yes
8309 else
8310   echo "configure: failed program was:" >&5
8311   cat conftest.$ac_ext >&5
8312   rm -rf conftest*
8313   ol_cv_errno_thread_specific=no
8314 fi
8315 rm -f conftest*
8316         
8317 fi
8318
8319 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8320
8321                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8322 echo "configure:8323: checking for thread specific h_errno" >&5
8323 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8324   echo $ac_n "(cached) $ac_c" 1>&6
8325 else
8326   
8327                 cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 #include <netdb.h>
8331 int main() {
8332 h_errno = 0;
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   ol_cv_h_errno_thread_specific=yes
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   ol_cv_h_errno_thread_specific=no
8343 fi
8344 rm -f conftest*
8345         
8346 fi
8347
8348 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8349
8350         if test $ol_cv_errno_thread_specific != yes \
8351                 -o $ol_cv_h_errno_thread_specific != yes ; then
8352                 LIBS="$LTHREAD_LIBS $LIBS"
8353                 LTHREAD_LIBS=""
8354         fi
8355
8356 fi  
8357
8358 if test $ol_link_threads = no ; then
8359         if test $ol_with_threads = yes ; then
8360                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8361         fi
8362
8363         if test $ol_with_threads = auto ; then
8364                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8365                 ol_with_threads=no
8366         fi
8367
8368         cat >> confdefs.h <<\EOF
8369 #define NO_THREADS 1
8370 EOF
8371
8372         LTHREAD_LIBS=""
8373 fi
8374
8375 if test $ol_link_threads != no ; then
8376         cat >> confdefs.h <<\EOF
8377 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8378 EOF
8379
8380 fi
8381
8382
8383 ol_link_ldbm=no 
8384 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8385         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8386 echo "configure:8387: checking for DB2 library" >&5
8387 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8388   echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390         ol_LIBS="$LIBS"
8391         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8392 echo "configure:8393: checking for db_open in -ldb" >&5
8393 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8395   echo $ac_n "(cached) $ac_c" 1>&6
8396 else
8397   ac_save_LIBS="$LIBS"
8398 LIBS="-ldb  $LIBS"
8399 cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 /* Override any gcc2 internal prototype to avoid an error.  */
8403 /* We use char because int might match the return type of a gcc2
8404     builtin and then its argument prototype would still apply.  */
8405 char db_open();
8406
8407 int main() {
8408 db_open()
8409 ; return 0; }
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8412   rm -rf conftest*
8413   eval "ac_cv_lib_$ac_lib_var=yes"
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -rf conftest*
8418   eval "ac_cv_lib_$ac_lib_var=no"
8419 fi
8420 rm -f conftest*
8421 LIBS="$ac_save_LIBS"
8422
8423 fi
8424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8425   echo "$ac_t""yes" 1>&6
8426   ol_cv_lib_db2=-ldb
8427 else
8428   echo "$ac_t""no" 1>&6
8429 ol_cv_lib_db2=no
8430 fi
8431
8432         LIBS="$ol_LIBS"
8433
8434 fi
8435
8436 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8437
8438 for ac_hdr in db.h
8439 do
8440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8442 echo "configure:8443: checking for $ac_hdr" >&5
8443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8444   echo $ac_n "(cached) $ac_c" 1>&6
8445 else
8446   cat > conftest.$ac_ext <<EOF
8447 #line 8448 "configure"
8448 #include "confdefs.h"
8449 #include <$ac_hdr>
8450 EOF
8451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8452 { (eval echo configure:8453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8454 if test -z "$ac_err"; then
8455   rm -rf conftest*
8456   eval "ac_cv_header_$ac_safe=yes"
8457 else
8458   echo "$ac_err" >&5
8459   echo "configure: failed program was:" >&5
8460   cat conftest.$ac_ext >&5
8461   rm -rf conftest*
8462   eval "ac_cv_header_$ac_safe=no"
8463 fi
8464 rm -f conftest*
8465 fi
8466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8467   echo "$ac_t""yes" 1>&6
8468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8469   cat >> confdefs.h <<EOF
8470 #define $ac_tr_hdr 1
8471 EOF
8472  
8473 else
8474   echo "$ac_t""no" 1>&6
8475 fi
8476 done
8477
8478 if test $ac_cv_header_db_h = yes ; then
8479         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8480 echo "configure:8481: checking if db.h is DB2" >&5
8481 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8482   echo $ac_n "(cached) $ac_c" 1>&6
8483 else
8484   
8485                 cat > conftest.$ac_ext <<EOF
8486 #line 8487 "configure"
8487 #include "confdefs.h"
8488
8489 #                       include <db.h>
8490                         /* this check could be improved */
8491 #                       ifdef DB_VERSION_MAJOR
8492 #                               if DB_VERSION_MAJOR == 2
8493                                         __db_version_2
8494 #                               endif
8495 #                       endif
8496                 
8497 EOF
8498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8499   egrep "__db_version_2" >/dev/null 2>&1; then
8500   rm -rf conftest*
8501   ol_cv_header_db2=yes
8502 else
8503   rm -rf conftest*
8504   ol_cv_header_db2=no
8505 fi
8506 rm -f conftest*
8507
8508 fi
8509
8510 echo "$ac_t""$ol_cv_header_db2" 1>&6
8511 else
8512         ol_cv_header_db2=no
8513 fi
8514
8515
8516  
8517  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8518 echo "configure:8519: checking for Berkeley DB2" >&5
8519 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8520   echo $ac_n "(cached) $ac_c" 1>&6
8521 else
8522   
8523         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8524                 ol_cv_berkeley_db2=no
8525         else
8526                 ol_cv_berkeley_db2=yes
8527         fi
8528
8529 fi
8530
8531 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8532  if test $ol_cv_berkeley_db2 = yes ; then
8533         cat >> confdefs.h <<\EOF
8534 #define HAVE_BERKELEY_DB2 1
8535 EOF
8536
8537  fi
8538
8539
8540         if test $ol_cv_berkeley_db2 = yes ; then
8541                 ol_link_ldbm=db2
8542                 ol_with_ldbm_api=db2
8543
8544                 if test $ol_with_ldbm_type = hash ; then
8545                         cat >> confdefs.h <<\EOF
8546 #define LDBM_USE_DBHASH 1
8547 EOF
8548
8549                 else
8550                         cat >> confdefs.h <<\EOF
8551 #define LDBM_USE_DBBTREE 1
8552 EOF
8553
8554                 fi
8555
8556                                                 if test $ol_cv_lib_db2 != yes ; then
8557                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8558                 fi
8559         fi
8560 fi
8561
8562 ol_link_bdb2=no
8563 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8564         ol_link_bdb2=yes
8565 fi
8566
8567 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8568         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8569 echo "configure:8570: checking for Berkeley DB library" >&5
8570 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8571   echo $ac_n "(cached) $ac_c" 1>&6
8572 else
8573   
8574         for ac_hdr in db1/db.h
8575 do
8576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8578 echo "configure:8579: checking for $ac_hdr" >&5
8579 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8580   echo $ac_n "(cached) $ac_c" 1>&6
8581 else
8582   cat > conftest.$ac_ext <<EOF
8583 #line 8584 "configure"
8584 #include "confdefs.h"
8585 #include <$ac_hdr>
8586 EOF
8587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8588 { (eval echo configure:8589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8590 if test -z "$ac_err"; then
8591   rm -rf conftest*
8592   eval "ac_cv_header_$ac_safe=yes"
8593 else
8594   echo "$ac_err" >&5
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -rf conftest*
8598   eval "ac_cv_header_$ac_safe=no"
8599 fi
8600 rm -f conftest*
8601 fi
8602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8603   echo "$ac_t""yes" 1>&6
8604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8605   cat >> confdefs.h <<EOF
8606 #define $ac_tr_hdr 1
8607 EOF
8608  
8609 else
8610   echo "$ac_t""no" 1>&6
8611 fi
8612 done
8613
8614         ol_LIBS="$LIBS"
8615         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8616 echo "configure:8617: checking for dbopen" >&5
8617 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8618   echo $ac_n "(cached) $ac_c" 1>&6
8619 else
8620   cat > conftest.$ac_ext <<EOF
8621 #line 8622 "configure"
8622 #include "confdefs.h"
8623 /* System header to define __stub macros and hopefully few prototypes,
8624     which can conflict with char dbopen(); below.  */
8625 #include <assert.h>
8626 /* Override any gcc2 internal prototype to avoid an error.  */
8627 /* We use char because int might match the return type of a gcc2
8628     builtin and then its argument prototype would still apply.  */
8629 char dbopen();
8630 char (*f)();
8631
8632 int main() {
8633
8634 /* The GNU C library defines this for functions which it implements
8635     to always fail with ENOSYS.  Some functions are actually named
8636     something starting with __ and the normal name is an alias.  */
8637 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8638 choke me
8639 #else
8640 f = dbopen;
8641 #endif
8642
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   eval "ac_cv_func_dbopen=yes"
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   eval "ac_cv_func_dbopen=no"
8653 fi
8654 rm -f conftest*
8655 fi
8656
8657 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8658   echo "$ac_t""yes" 1>&6
8659   ol_cv_lib_db=yes
8660 else
8661   echo "$ac_t""no" 1>&6
8662
8663                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8664 echo "configure:8665: checking for dbopen in -ldb1" >&5
8665 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8666 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   ac_save_LIBS="$LIBS"
8670 LIBS="-ldb1  $LIBS"
8671 cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 /* Override any gcc2 internal prototype to avoid an error.  */
8675 /* We use char because int might match the return type of a gcc2
8676     builtin and then its argument prototype would still apply.  */
8677 char dbopen();
8678
8679 int main() {
8680 dbopen()
8681 ; return 0; }
8682 EOF
8683 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8684   rm -rf conftest*
8685   eval "ac_cv_lib_$ac_lib_var=yes"
8686 else
8687   echo "configure: failed program was:" >&5
8688   cat conftest.$ac_ext >&5
8689   rm -rf conftest*
8690   eval "ac_cv_lib_$ac_lib_var=no"
8691 fi
8692 rm -f conftest*
8693 LIBS="$ac_save_LIBS"
8694
8695 fi
8696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8697   echo "$ac_t""yes" 1>&6
8698   ol_cv_lib_db=-ldb1
8699 else
8700   echo "$ac_t""no" 1>&6
8701
8702                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8703 echo "configure:8704: checking for dbopen in -ldb" >&5
8704 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
8705 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8706   echo $ac_n "(cached) $ac_c" 1>&6
8707 else
8708   ac_save_LIBS="$LIBS"
8709 LIBS="-ldb  $LIBS"
8710 cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8713 /* Override any gcc2 internal prototype to avoid an error.  */
8714 /* We use char because int might match the return type of a gcc2
8715     builtin and then its argument prototype would still apply.  */
8716 char dbopen();
8717
8718 int main() {
8719 dbopen()
8720 ; return 0; }
8721 EOF
8722 if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8723   rm -rf conftest*
8724   eval "ac_cv_lib_$ac_lib_var=yes"
8725 else
8726   echo "configure: failed program was:" >&5
8727   cat conftest.$ac_ext >&5
8728   rm -rf conftest*
8729   eval "ac_cv_lib_$ac_lib_var=no"
8730 fi
8731 rm -f conftest*
8732 LIBS="$ac_save_LIBS"
8733
8734 fi
8735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8736   echo "$ac_t""yes" 1>&6
8737   ol_cv_lib_db=-ldb
8738 else
8739   echo "$ac_t""no" 1>&6
8740 ol_cv_lib_db=no
8741 fi
8742
8743                 
8744 fi
8745
8746         
8747 fi
8748
8749         LIBS="$ol_LIBS"
8750
8751 fi
8752
8753 echo "$ac_t""$ol_cv_lib_db" 1>&6
8754
8755
8756 for ac_hdr in db_185.h
8757 do
8758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8760 echo "configure:8761: checking for $ac_hdr" >&5
8761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8762   echo $ac_n "(cached) $ac_c" 1>&6
8763 else
8764   cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 #include <$ac_hdr>
8768 EOF
8769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8770 { (eval echo configure:8771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8772 if test -z "$ac_err"; then
8773   rm -rf conftest*
8774   eval "ac_cv_header_$ac_safe=yes"
8775 else
8776   echo "$ac_err" >&5
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   eval "ac_cv_header_$ac_safe=no"
8781 fi
8782 rm -f conftest*
8783 fi
8784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8785   echo "$ac_t""yes" 1>&6
8786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8787   cat >> confdefs.h <<EOF
8788 #define $ac_tr_hdr 1
8789 EOF
8790  
8791 else
8792   echo "$ac_t""no" 1>&6
8793 fi
8794 done
8795
8796 if test "$ol_cv_header_db2" = yes ; then
8797         
8798         ol_cv_header_db=$ac_cv_header_db_185_h
8799 else
8800         ol_cv_header_db=$ac_cv_header_db_h
8801 fi
8802
8803
8804  
8805  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8806 echo "configure:8807: checking for Berkeley DB" >&5
8807 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
8808   echo $ac_n "(cached) $ac_c" 1>&6
8809 else
8810   
8811         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8812                 ol_cv_berkeley_db=no
8813         else
8814                 ol_cv_berkeley_db=yes
8815         fi
8816
8817 fi
8818
8819 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8820  if test $ol_cv_berkeley_db = yes ; then
8821         cat >> confdefs.h <<\EOF
8822 #define HAVE_BERKELEY_DB 1
8823 EOF
8824
8825  fi
8826
8827
8828         if test $ol_cv_berkeley_db = yes ; then
8829                 ol_link_ldbm=db
8830                 ol_with_ldbm_api=db
8831
8832                 if test $ol_with_ldbm_type = hash ; then
8833                         cat >> confdefs.h <<\EOF
8834 #define LDBM_USE_DBHASH 1
8835 EOF
8836
8837                 else
8838                         cat >> confdefs.h <<\EOF
8839 #define LDBM_USE_DBBTREE 1
8840 EOF
8841
8842                 fi
8843
8844                                                 if test $ol_cv_lib_db != yes ; then
8845                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8846                 fi
8847         fi
8848 fi
8849
8850 if test $ol_with_ldbm_api = manual ; then
8851                 ol_link_ldbm=yes
8852
8853         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8854
8855         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8856 do
8857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8859 echo "configure:8860: checking for $ac_hdr" >&5
8860 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8861   echo $ac_n "(cached) $ac_c" 1>&6
8862 else
8863   cat > conftest.$ac_ext <<EOF
8864 #line 8865 "configure"
8865 #include "confdefs.h"
8866 #include <$ac_hdr>
8867 EOF
8868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8869 { (eval echo configure:8870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8871 if test -z "$ac_err"; then
8872   rm -rf conftest*
8873   eval "ac_cv_header_$ac_safe=yes"
8874 else
8875   echo "$ac_err" >&5
8876   echo "configure: failed program was:" >&5
8877   cat conftest.$ac_ext >&5
8878   rm -rf conftest*
8879   eval "ac_cv_header_$ac_safe=no"
8880 fi
8881 rm -f conftest*
8882 fi
8883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8884   echo "$ac_t""yes" 1>&6
8885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8886   cat >> confdefs.h <<EOF
8887 #define $ac_tr_hdr 1
8888 EOF
8889  
8890 else
8891   echo "$ac_t""no" 1>&6
8892 fi
8893 done
8894
8895 fi
8896
8897 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8898         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8899         ol_with_ldbm_api=none
8900 fi
8901
8902 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8903         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8904 echo "configure:8905: checking for MDBM library" >&5
8905 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
8906   echo $ac_n "(cached) $ac_c" 1>&6
8907 else
8908         ol_LIBS="$LIBS"
8909         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8910 echo "configure:8911: checking for mdbm_set_chain" >&5
8911 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917 /* System header to define __stub macros and hopefully few prototypes,
8918     which can conflict with char mdbm_set_chain(); below.  */
8919 #include <assert.h>
8920 /* Override any gcc2 internal prototype to avoid an error.  */
8921 /* We use char because int might match the return type of a gcc2
8922     builtin and then its argument prototype would still apply.  */
8923 char mdbm_set_chain();
8924 char (*f)();
8925
8926 int main() {
8927
8928 /* The GNU C library defines this for functions which it implements
8929     to always fail with ENOSYS.  Some functions are actually named
8930     something starting with __ and the normal name is an alias.  */
8931 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8932 choke me
8933 #else
8934 f = mdbm_set_chain;
8935 #endif
8936
8937 ; return 0; }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8940   rm -rf conftest*
8941   eval "ac_cv_func_mdbm_set_chain=yes"
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   eval "ac_cv_func_mdbm_set_chain=no"
8947 fi
8948 rm -f conftest*
8949 fi
8950
8951 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8952   echo "$ac_t""yes" 1>&6
8953   ol_cv_lib_mdbm=yes
8954 else
8955   echo "$ac_t""no" 1>&6
8956
8957                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8958 echo "configure:8959: checking for mdbm_set_chain in -lmdbm" >&5
8959 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
8960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8961   echo $ac_n "(cached) $ac_c" 1>&6
8962 else
8963   ac_save_LIBS="$LIBS"
8964 LIBS="-lmdbm  $LIBS"
8965 cat > conftest.$ac_ext <<EOF
8966 #line 8967 "configure"
8967 #include "confdefs.h"
8968 /* Override any gcc2 internal prototype to avoid an error.  */
8969 /* We use char because int might match the return type of a gcc2
8970     builtin and then its argument prototype would still apply.  */
8971 char mdbm_set_chain();
8972
8973 int main() {
8974 mdbm_set_chain()
8975 ; return 0; }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8978   rm -rf conftest*
8979   eval "ac_cv_lib_$ac_lib_var=yes"
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -rf conftest*
8984   eval "ac_cv_lib_$ac_lib_var=no"
8985 fi
8986 rm -f conftest*
8987 LIBS="$ac_save_LIBS"
8988
8989 fi
8990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8991   echo "$ac_t""yes" 1>&6
8992   ol_cv_lib_mdbm=-lmdbm
8993 else
8994   echo "$ac_t""no" 1>&6
8995 ol_cv_lib_mdbm=no
8996 fi
8997
8998         
8999 fi
9000
9001         LIBS="$ol_LIBS"
9002
9003 fi
9004
9005 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9006
9007
9008  for ac_hdr in mdbm.h
9009 do
9010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9012 echo "configure:9013: checking for $ac_hdr" >&5
9013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9014   echo $ac_n "(cached) $ac_c" 1>&6
9015 else
9016   cat > conftest.$ac_ext <<EOF
9017 #line 9018 "configure"
9018 #include "confdefs.h"
9019 #include <$ac_hdr>
9020 EOF
9021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9022 { (eval echo configure:9023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9024 if test -z "$ac_err"; then
9025   rm -rf conftest*
9026   eval "ac_cv_header_$ac_safe=yes"
9027 else
9028   echo "$ac_err" >&5
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -rf conftest*
9032   eval "ac_cv_header_$ac_safe=no"
9033 fi
9034 rm -f conftest*
9035 fi
9036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9037   echo "$ac_t""yes" 1>&6
9038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9039   cat >> confdefs.h <<EOF
9040 #define $ac_tr_hdr 1
9041 EOF
9042  
9043 else
9044   echo "$ac_t""no" 1>&6
9045 fi
9046 done
9047
9048  echo $ac_n "checking for db""... $ac_c" 1>&6
9049 echo "configure:9050: checking for db" >&5
9050 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9051   echo $ac_n "(cached) $ac_c" 1>&6
9052 else
9053   
9054         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9055                 ol_cv_mdbm=no
9056         else
9057                 ol_cv_mdbm=yes
9058         fi
9059
9060 fi
9061
9062 echo "$ac_t""$ol_cv_mdbm" 1>&6
9063  if test $ol_cv_mdbm = yes ; then
9064         cat >> confdefs.h <<\EOF
9065 #define HAVE_MDBM 1
9066 EOF
9067
9068  fi
9069
9070
9071         if test $ol_cv_mdbm = yes ; then
9072                 ol_link_ldbm=mdbm
9073                 ol_with_ldbm_api=mdbm
9074                 if test $ol_cv_lib_mdbm != yes ; then
9075                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9076                 fi
9077         fi
9078 fi
9079
9080 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9081         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9082 echo "configure:9083: checking for GDBM library" >&5
9083 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9084   echo $ac_n "(cached) $ac_c" 1>&6
9085 else
9086         ol_LIBS="$LIBS"
9087         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9088 echo "configure:9089: checking for gdbm_open" >&5
9089 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095 /* System header to define __stub macros and hopefully few prototypes,
9096     which can conflict with char gdbm_open(); below.  */
9097 #include <assert.h>
9098 /* Override any gcc2 internal prototype to avoid an error.  */
9099 /* We use char because int might match the return type of a gcc2
9100     builtin and then its argument prototype would still apply.  */
9101 char gdbm_open();
9102 char (*f)();
9103
9104 int main() {
9105
9106 /* The GNU C library defines this for functions which it implements
9107     to always fail with ENOSYS.  Some functions are actually named
9108     something starting with __ and the normal name is an alias.  */
9109 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9110 choke me
9111 #else
9112 f = gdbm_open;
9113 #endif
9114
9115 ; return 0; }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9118   rm -rf conftest*
9119   eval "ac_cv_func_gdbm_open=yes"
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_func_gdbm_open=no"
9125 fi
9126 rm -f conftest*
9127 fi
9128
9129 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9130   echo "$ac_t""yes" 1>&6
9131   ol_cv_lib_gdbm=yes
9132 else
9133   echo "$ac_t""no" 1>&6
9134
9135                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9136 echo "configure:9137: checking for gdbm_open in -lgdbm" >&5
9137 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9138 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9139   echo $ac_n "(cached) $ac_c" 1>&6
9140 else
9141   ac_save_LIBS="$LIBS"
9142 LIBS="-lgdbm  $LIBS"
9143 cat > conftest.$ac_ext <<EOF
9144 #line 9145 "configure"
9145 #include "confdefs.h"
9146 /* Override any gcc2 internal prototype to avoid an error.  */
9147 /* We use char because int might match the return type of a gcc2
9148     builtin and then its argument prototype would still apply.  */
9149 char gdbm_open();
9150
9151 int main() {
9152 gdbm_open()
9153 ; return 0; }
9154 EOF
9155 if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9156   rm -rf conftest*
9157   eval "ac_cv_lib_$ac_lib_var=yes"
9158 else
9159   echo "configure: failed program was:" >&5
9160   cat conftest.$ac_ext >&5
9161   rm -rf conftest*
9162   eval "ac_cv_lib_$ac_lib_var=no"
9163 fi
9164 rm -f conftest*
9165 LIBS="$ac_save_LIBS"
9166
9167 fi
9168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9169   echo "$ac_t""yes" 1>&6
9170   ol_cv_lib_gdbm=-lgdbm
9171 else
9172   echo "$ac_t""no" 1>&6
9173 ol_cv_lib_gdbm=no
9174 fi
9175
9176         
9177 fi
9178
9179         LIBS="$ol_LIBS"
9180
9181 fi
9182
9183 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9184
9185
9186  for ac_hdr in gdbm.h
9187 do
9188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9190 echo "configure:9191: checking for $ac_hdr" >&5
9191 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9192   echo $ac_n "(cached) $ac_c" 1>&6
9193 else
9194   cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 #include <$ac_hdr>
9198 EOF
9199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9200 { (eval echo configure:9201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9202 if test -z "$ac_err"; then
9203   rm -rf conftest*
9204   eval "ac_cv_header_$ac_safe=yes"
9205 else
9206   echo "$ac_err" >&5
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_header_$ac_safe=no"
9211 fi
9212 rm -f conftest*
9213 fi
9214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9217   cat >> confdefs.h <<EOF
9218 #define $ac_tr_hdr 1
9219 EOF
9220  
9221 else
9222   echo "$ac_t""no" 1>&6
9223 fi
9224 done
9225
9226  echo $ac_n "checking for db""... $ac_c" 1>&6
9227 echo "configure:9228: checking for db" >&5
9228 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9229   echo $ac_n "(cached) $ac_c" 1>&6
9230 else
9231   
9232         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9233                 ol_cv_gdbm=no
9234         else
9235                 ol_cv_gdbm=yes
9236         fi
9237
9238 fi
9239
9240 echo "$ac_t""$ol_cv_gdbm" 1>&6
9241  if test $ol_cv_gdbm = yes ; then
9242         cat >> confdefs.h <<\EOF
9243 #define HAVE_GDBM 1
9244 EOF
9245
9246  fi
9247
9248
9249         if test $ol_cv_gdbm = yes ; then
9250                 ol_link_ldbm=gdbm
9251                 ol_with_ldbm_api=gdbm
9252
9253                 if test $ol_cv_lib_gdbm != yes ; then
9254                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9255                 fi
9256         fi
9257 fi
9258
9259 if test $ol_with_ldbm_api = auto ; then
9260         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9261 elif test $ol_with_ldbm_api = ndbm ; then
9262         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9263 echo "configure:9264: checking for NDBM library" >&5
9264 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9265   echo $ac_n "(cached) $ac_c" 1>&6
9266 else
9267         ol_LIBS="$LIBS"
9268         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9269 echo "configure:9270: checking for dbm_open" >&5
9270 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9271   echo $ac_n "(cached) $ac_c" 1>&6
9272 else
9273   cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276 /* System header to define __stub macros and hopefully few prototypes,
9277     which can conflict with char dbm_open(); below.  */
9278 #include <assert.h>
9279 /* Override any gcc2 internal prototype to avoid an error.  */
9280 /* We use char because int might match the return type of a gcc2
9281     builtin and then its argument prototype would still apply.  */
9282 char dbm_open();
9283 char (*f)();
9284
9285 int main() {
9286
9287 /* The GNU C library defines this for functions which it implements
9288     to always fail with ENOSYS.  Some functions are actually named
9289     something starting with __ and the normal name is an alias.  */
9290 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9291 choke me
9292 #else
9293 f = dbm_open;
9294 #endif
9295
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9299   rm -rf conftest*
9300   eval "ac_cv_func_dbm_open=yes"
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_func_dbm_open=no"
9306 fi
9307 rm -f conftest*
9308 fi
9309
9310 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312   ol_cv_lib_ndbm=yes
9313 else
9314   echo "$ac_t""no" 1>&6
9315
9316                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9317 echo "configure:9318: checking for dbm_open in -lndbm" >&5
9318 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   ac_save_LIBS="$LIBS"
9323 LIBS="-lndbm  $LIBS"
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 /* Override any gcc2 internal prototype to avoid an error.  */
9328 /* We use char because int might match the return type of a gcc2
9329     builtin and then its argument prototype would still apply.  */
9330 char dbm_open();
9331
9332 int main() {
9333 dbm_open()
9334 ; return 0; }
9335 EOF
9336 if { (eval echo configure:9337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9337   rm -rf conftest*
9338   eval "ac_cv_lib_$ac_lib_var=yes"
9339 else
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=no"
9344 fi
9345 rm -f conftest*
9346 LIBS="$ac_save_LIBS"
9347
9348 fi
9349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9350   echo "$ac_t""yes" 1>&6
9351   ol_cv_lib_ndbm=-lndbm
9352 else
9353   echo "$ac_t""no" 1>&6
9354
9355                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9356 echo "configure:9357: checking for dbm_open in -ldbm" >&5
9357 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   ac_save_LIBS="$LIBS"
9362 LIBS="-ldbm  $LIBS"
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char dbm_open();
9370
9371 int main() {
9372 dbm_open()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 LIBS="$ac_save_LIBS"
9386
9387 fi
9388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9389   echo "$ac_t""yes" 1>&6
9390   ol_cv_lib_ndbm=-ldbm
9391 else
9392   echo "$ac_t""no" 1>&6
9393 ol_cv_lib_ndbm=no
9394 fi
9395                 
9396 fi
9397
9398         
9399 fi
9400
9401         LIBS="$ol_LIBS"
9402
9403 fi
9404
9405 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9406
9407
9408  for ac_hdr in ndbm.h
9409 do
9410 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9411 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9412 echo "configure:9413: checking for $ac_hdr" >&5
9413 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416   cat > conftest.$ac_ext <<EOF
9417 #line 9418 "configure"
9418 #include "confdefs.h"
9419 #include <$ac_hdr>
9420 EOF
9421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9422 { (eval echo configure:9423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9424 if test -z "$ac_err"; then
9425   rm -rf conftest*
9426   eval "ac_cv_header_$ac_safe=yes"
9427 else
9428   echo "$ac_err" >&5
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -rf conftest*
9432   eval "ac_cv_header_$ac_safe=no"
9433 fi
9434 rm -f conftest*
9435 fi
9436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9437   echo "$ac_t""yes" 1>&6
9438     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9439   cat >> confdefs.h <<EOF
9440 #define $ac_tr_hdr 1
9441 EOF
9442  
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446 done
9447
9448  echo $ac_n "checking for db""... $ac_c" 1>&6
9449 echo "configure:9450: checking for db" >&5
9450 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   
9454         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9455                 ol_cv_ndbm=no
9456         else
9457                 ol_cv_ndbm=yes
9458         fi
9459
9460 fi
9461
9462 echo "$ac_t""$ol_cv_ndbm" 1>&6
9463  if test $ol_cv_ndbm = yes ; then
9464         cat >> confdefs.h <<\EOF
9465 #define HAVE_NDBM 1
9466 EOF
9467
9468  fi
9469
9470
9471         if test $ol_cv_ndbm = yes ; then
9472                 ol_link_ldbm=ndbm
9473                 ol_with_ldbm_api=ndbm
9474
9475                 if test $ol_cv_lib_ndbm != yes ; then
9476                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9477                 fi
9478         fi
9479 fi
9480
9481 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9482         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9483         if test $ol_enable_ldbm = yes ; then
9484                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9485         fi
9486
9487         echo "configure: warning: disabling LDBM" 1>&2
9488         ol_enable_ldbm=no
9489 fi
9490
9491 if test $ol_enable_wrappers != no ; then
9492         for ac_hdr in tcpd.h
9493 do
9494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9496 echo "configure:9497: checking for $ac_hdr" >&5
9497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 #include <$ac_hdr>
9504 EOF
9505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9506 { (eval echo configure:9507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9508 if test -z "$ac_err"; then
9509   rm -rf conftest*
9510   eval "ac_cv_header_$ac_safe=yes"
9511 else
9512   echo "$ac_err" >&5
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -rf conftest*
9516   eval "ac_cv_header_$ac_safe=no"
9517 fi
9518 rm -f conftest*
9519 fi
9520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9521   echo "$ac_t""yes" 1>&6
9522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9523   cat >> confdefs.h <<EOF
9524 #define $ac_tr_hdr 1
9525 EOF
9526  
9527 else
9528   echo "$ac_t""no" 1>&6
9529 fi
9530 done
9531
9532
9533         if test $ac_cv_header_tcpd_h != yes ; then
9534                 have_wrappers=no
9535         else
9536                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9537 echo "configure:9538: checking for main in -lwrap" >&5
9538 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542   ac_save_LIBS="$LIBS"
9543 LIBS="-lwrap  $LIBS"
9544 cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547
9548 int main() {
9549 main()
9550 ; return 0; }
9551 EOF
9552 if { (eval echo configure:9553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9553   rm -rf conftest*
9554   eval "ac_cv_lib_$ac_lib_var=yes"
9555 else
9556   echo "configure: failed program was:" >&5
9557   cat conftest.$ac_ext >&5
9558   rm -rf conftest*
9559   eval "ac_cv_lib_$ac_lib_var=no"
9560 fi
9561 rm -f conftest*
9562 LIBS="$ac_save_LIBS"
9563
9564 fi
9565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9566   echo "$ac_t""yes" 1>&6
9567   have_wrappers=yes
9568 else
9569   echo "$ac_t""no" 1>&6
9570 have_wrappers=no
9571 fi
9572
9573         fi
9574
9575         if test $have_wrappers = yes ; then
9576                 cat >> confdefs.h <<\EOF
9577 #define HAVE_TCPD 1
9578 EOF
9579
9580                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9581
9582                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9583 echo "configure:9584: checking for main in -lnsl" >&5
9584 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   ac_save_LIBS="$LIBS"
9589 LIBS="-lnsl  $LIBS"
9590 cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593
9594 int main() {
9595 main()
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9599   rm -rf conftest*
9600   eval "ac_cv_lib_$ac_lib_var=yes"
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604   rm -rf conftest*
9605   eval "ac_cv_lib_$ac_lib_var=no"
9606 fi
9607 rm -f conftest*
9608 LIBS="$ac_save_LIBS"
9609
9610 fi
9611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9612   echo "$ac_t""yes" 1>&6
9613     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9614     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9615   cat >> confdefs.h <<EOF
9616 #define $ac_tr_lib 1
9617 EOF
9618
9619   LIBS="-lnsl $LIBS"
9620
9621 else
9622   echo "$ac_t""no" 1>&6
9623 fi
9624
9625         else
9626                 echo "configure: warning: could not find -lwrap" 1>&2
9627                 if test $ol_enable_wrappers = yes ; then
9628                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9629                 fi
9630
9631                 echo "configure: warning: disabling wrappers support" 1>&2
9632                 ol_enable_wrappers=no
9633         fi
9634 fi
9635
9636 if test $ol_enable_syslog != no ; then
9637         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9638 echo "configure:9639: checking for openlog" >&5
9639 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9640   echo $ac_n "(cached) $ac_c" 1>&6
9641 else
9642   cat > conftest.$ac_ext <<EOF
9643 #line 9644 "configure"
9644 #include "confdefs.h"
9645 /* System header to define __stub macros and hopefully few prototypes,
9646     which can conflict with char openlog(); below.  */
9647 #include <assert.h>
9648 /* Override any gcc2 internal prototype to avoid an error.  */
9649 /* We use char because int might match the return type of a gcc2
9650     builtin and then its argument prototype would still apply.  */
9651 char openlog();
9652 char (*f)();
9653
9654 int main() {
9655
9656 /* The GNU C library defines this for functions which it implements
9657     to always fail with ENOSYS.  Some functions are actually named
9658     something starting with __ and the normal name is an alias.  */
9659 #if defined (__stub_openlog) || defined (__stub___openlog)
9660 choke me
9661 #else
9662 f = openlog;
9663 #endif
9664
9665 ; return 0; }
9666 EOF
9667 if { (eval echo configure:9668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9668   rm -rf conftest*
9669   eval "ac_cv_func_openlog=yes"
9670 else
9671   echo "configure: failed program was:" >&5
9672   cat conftest.$ac_ext >&5
9673   rm -rf conftest*
9674   eval "ac_cv_func_openlog=no"
9675 fi
9676 rm -f conftest*
9677 fi
9678
9679 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9680   echo "$ac_t""yes" 1>&6
9681   :
9682 else
9683   echo "$ac_t""no" 1>&6
9684 fi
9685
9686         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9687                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9688         fi
9689         ol_enable_syslog=$ac_cv_func_openlog
9690 fi
9691
9692 if test $ol_enable_dmalloc != no ; then
9693         for ac_hdr in dmalloc.h
9694 do
9695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9697 echo "configure:9698: checking for $ac_hdr" >&5
9698 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9699   echo $ac_n "(cached) $ac_c" 1>&6
9700 else
9701   cat > conftest.$ac_ext <<EOF
9702 #line 9703 "configure"
9703 #include "confdefs.h"
9704 #include <$ac_hdr>
9705 EOF
9706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9707 { (eval echo configure:9708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9709 if test -z "$ac_err"; then
9710   rm -rf conftest*
9711   eval "ac_cv_header_$ac_safe=yes"
9712 else
9713   echo "$ac_err" >&5
9714   echo "configure: failed program was:" >&5
9715   cat conftest.$ac_ext >&5
9716   rm -rf conftest*
9717   eval "ac_cv_header_$ac_safe=no"
9718 fi
9719 rm -f conftest*
9720 fi
9721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9722   echo "$ac_t""yes" 1>&6
9723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9724   cat >> confdefs.h <<EOF
9725 #define $ac_tr_hdr 1
9726 EOF
9727  
9728 else
9729   echo "$ac_t""no" 1>&6
9730 fi
9731 done
9732
9733         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9734 echo "configure:9735: checking for dmalloc_shutdown in -ldmalloc" >&5
9735 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
9736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9737   echo $ac_n "(cached) $ac_c" 1>&6
9738 else
9739   ac_save_LIBS="$LIBS"
9740 LIBS="-ldmalloc  $LIBS"
9741 cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 /* Override any gcc2 internal prototype to avoid an error.  */
9745 /* We use char because int might match the return type of a gcc2
9746     builtin and then its argument prototype would still apply.  */
9747 char dmalloc_shutdown();
9748
9749 int main() {
9750 dmalloc_shutdown()
9751 ; return 0; }
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9754   rm -rf conftest*
9755   eval "ac_cv_lib_$ac_lib_var=yes"
9756 else
9757   echo "configure: failed program was:" >&5
9758   cat conftest.$ac_ext >&5
9759   rm -rf conftest*
9760   eval "ac_cv_lib_$ac_lib_var=no"
9761 fi
9762 rm -f conftest*
9763 LIBS="$ac_save_LIBS"
9764
9765 fi
9766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9767   echo "$ac_t""yes" 1>&6
9768     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9769     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9770   cat >> confdefs.h <<EOF
9771 #define $ac_tr_lib 1
9772 EOF
9773
9774   LIBS="-ldmalloc $LIBS"
9775
9776 else
9777   echo "$ac_t""no" 1>&6
9778 fi
9779
9780 fi
9781
9782 if test $ol_enable_tcl != no ; then
9783         for ac_hdr in tcl.h
9784 do
9785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9787 echo "configure:9788: checking for $ac_hdr" >&5
9788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 #include <$ac_hdr>
9795 EOF
9796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9797 { (eval echo configure:9798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9799 if test -z "$ac_err"; then
9800   rm -rf conftest*
9801   eval "ac_cv_header_$ac_safe=yes"
9802 else
9803   echo "$ac_err" >&5
9804   echo "configure: failed program was:" >&5
9805   cat conftest.$ac_ext >&5
9806   rm -rf conftest*
9807   eval "ac_cv_header_$ac_safe=no"
9808 fi
9809 rm -f conftest*
9810 fi
9811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9812   echo "$ac_t""yes" 1>&6
9813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9814   cat >> confdefs.h <<EOF
9815 #define $ac_tr_hdr 1
9816 EOF
9817  
9818 else
9819   echo "$ac_t""no" 1>&6
9820 fi
9821 done
9822
9823
9824         if test $ac_cv_header_tcl_h != yes ; then
9825                 have_tcl=no
9826         else
9827                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9828 echo "configure:9829: checking for main in -ltcl" >&5
9829 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
9830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9831   echo $ac_n "(cached) $ac_c" 1>&6
9832 else
9833   ac_save_LIBS="$LIBS"
9834 LIBS="-ltcl  $LIBS"
9835 cat > conftest.$ac_ext <<EOF
9836 #line 9837 "configure"
9837 #include "confdefs.h"
9838
9839 int main() {
9840 main()
9841 ; return 0; }
9842 EOF
9843 if { (eval echo configure:9844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9844   rm -rf conftest*
9845   eval "ac_cv_lib_$ac_lib_var=yes"
9846 else
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -rf conftest*
9850   eval "ac_cv_lib_$ac_lib_var=no"
9851 fi
9852 rm -f conftest*
9853 LIBS="$ac_save_LIBS"
9854
9855 fi
9856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9857   echo "$ac_t""yes" 1>&6
9858   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9859 else
9860   echo "$ac_t""no" 1>&6
9861 have_tcl=no
9862 fi
9863
9864
9865                 if test $have_tcl != yes; then
9866                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9867 echo "configure:9868: checking for main in -ltcl7.6" >&5
9868 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
9869 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   ac_save_LIBS="$LIBS"
9873 LIBS="-ltcl7.6  $LIBS"
9874 cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877
9878 int main() {
9879 main()
9880 ; return 0; }
9881 EOF
9882 if { (eval echo configure:9883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9883   rm -rf conftest*
9884   eval "ac_cv_lib_$ac_lib_var=yes"
9885 else
9886   echo "configure: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888   rm -rf conftest*
9889   eval "ac_cv_lib_$ac_lib_var=no"
9890 fi
9891 rm -f conftest*
9892 LIBS="$ac_save_LIBS"
9893
9894 fi
9895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9896   echo "$ac_t""yes" 1>&6
9897   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9898 else
9899   echo "$ac_t""no" 1>&6
9900 have_tcl=no
9901 fi
9902
9903                 fi
9904
9905                 if test $have_tcl != yes; then
9906                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9907 echo "configure:9908: checking for main in -ltcl8.0" >&5
9908 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
9909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   ac_save_LIBS="$LIBS"
9913 LIBS="-ltcl8.0  $LIBS"
9914 cat > conftest.$ac_ext <<EOF
9915 #line 9916 "configure"
9916 #include "confdefs.h"
9917
9918 int main() {
9919 main()
9920 ; return 0; }
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9923   rm -rf conftest*
9924   eval "ac_cv_lib_$ac_lib_var=yes"
9925 else
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   eval "ac_cv_lib_$ac_lib_var=no"
9930 fi
9931 rm -f conftest*
9932 LIBS="$ac_save_LIBS"
9933
9934 fi
9935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9936   echo "$ac_t""yes" 1>&6
9937   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9938 else
9939   echo "$ac_t""no" 1>&6
9940 have_tcl=no
9941 fi
9942
9943                 fi
9944         fi
9945
9946         if test $have_tcl != yes ; then
9947                 echo "configure: warning: could not find -ltcl" 1>&2
9948                 if test $ol_enable_tcl = yes ; then
9949                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9950                 fi
9951
9952                 ol_enable_tcl=no
9953         fi
9954 fi
9955
9956 # ud needs termcap (should insert check here)
9957 ol_link_termcap=no
9958 for ac_hdr in termcap.h ncurses.h
9959 do
9960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9962 echo "configure:9963: checking for $ac_hdr" >&5
9963 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   cat > conftest.$ac_ext <<EOF
9967 #line 9968 "configure"
9968 #include "confdefs.h"
9969 #include <$ac_hdr>
9970 EOF
9971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9972 { (eval echo configure:9973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9974 if test -z "$ac_err"; then
9975   rm -rf conftest*
9976   eval "ac_cv_header_$ac_safe=yes"
9977 else
9978   echo "$ac_err" >&5
9979   echo "configure: failed program was:" >&5
9980   cat conftest.$ac_ext >&5
9981   rm -rf conftest*
9982   eval "ac_cv_header_$ac_safe=no"
9983 fi
9984 rm -f conftest*
9985 fi
9986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9987   echo "$ac_t""yes" 1>&6
9988     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9989   cat >> confdefs.h <<EOF
9990 #define $ac_tr_hdr 1
9991 EOF
9992  
9993 else
9994   echo "$ac_t""no" 1>&6
9995 fi
9996 done
9997
9998
9999 if test $ol_link_termcap = no ; then
10000         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10001 echo "configure:10002: checking for tputs in -ltermcap" >&5
10002 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10004   echo $ac_n "(cached) $ac_c" 1>&6
10005 else
10006   ac_save_LIBS="$LIBS"
10007 LIBS="-ltermcap  $LIBS"
10008 cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 /* Override any gcc2 internal prototype to avoid an error.  */
10012 /* We use char because int might match the return type of a gcc2
10013     builtin and then its argument prototype would still apply.  */
10014 char tputs();
10015
10016 int main() {
10017 tputs()
10018 ; return 0; }
10019 EOF
10020 if { (eval echo configure:10021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10021   rm -rf conftest*
10022   eval "ac_cv_lib_$ac_lib_var=yes"
10023 else
10024   echo "configure: failed program was:" >&5
10025   cat conftest.$ac_ext >&5
10026   rm -rf conftest*
10027   eval "ac_cv_lib_$ac_lib_var=no"
10028 fi
10029 rm -f conftest*
10030 LIBS="$ac_save_LIBS"
10031
10032 fi
10033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10034   echo "$ac_t""yes" 1>&6
10035   have_termcap=yes
10036 else
10037   echo "$ac_t""no" 1>&6
10038 have_termcap=no
10039 fi
10040
10041         if test $have_termcap = yes ; then
10042                 cat >> confdefs.h <<\EOF
10043 #define HAVE_TERMCAP 1
10044 EOF
10045
10046                 ol_link_termcap=yes
10047                 TERMCAP_LIBS=-ltermcap
10048         fi
10049 fi
10050
10051 if test $ol_link_termcap = no ; then
10052         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10053 echo "configure:10054: checking for initscr in -lncurses" >&5
10054 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10055 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10056   echo $ac_n "(cached) $ac_c" 1>&6
10057 else
10058   ac_save_LIBS="$LIBS"
10059 LIBS="-lncurses  $LIBS"
10060 cat > conftest.$ac_ext <<EOF
10061 #line 10062 "configure"
10062 #include "confdefs.h"
10063 /* Override any gcc2 internal prototype to avoid an error.  */
10064 /* We use char because int might match the return type of a gcc2
10065     builtin and then its argument prototype would still apply.  */
10066 char initscr();
10067
10068 int main() {
10069 initscr()
10070 ; return 0; }
10071 EOF
10072 if { (eval echo configure:10073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10073   rm -rf conftest*
10074   eval "ac_cv_lib_$ac_lib_var=yes"
10075 else
10076   echo "configure: failed program was:" >&5
10077   cat conftest.$ac_ext >&5
10078   rm -rf conftest*
10079   eval "ac_cv_lib_$ac_lib_var=no"
10080 fi
10081 rm -f conftest*
10082 LIBS="$ac_save_LIBS"
10083
10084 fi
10085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10086   echo "$ac_t""yes" 1>&6
10087   have_ncurses=yes
10088 else
10089   echo "$ac_t""no" 1>&6
10090 have_ncurses=no
10091 fi
10092
10093         if test $have_ncurses = yes ; then
10094                 cat >> confdefs.h <<\EOF
10095 #define HAVE_NCURSES 1
10096 EOF
10097
10098                 ol_link_termcap=yes
10099                 TERMCAP_LIBS=-lncurses
10100         fi
10101 fi
10102
10103 if test $ol_link_termcap = no ; then
10104         cat >> confdefs.h <<\EOF
10105 #define NO_TERMCAP 1
10106 EOF
10107
10108         TERMCAP_LIBS=
10109 fi
10110
10111 ol_link_readline=no
10112 if test $ol_with_readline != no ; then
10113         for ac_hdr in readline/readline.h readline/history.h
10114 do
10115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10117 echo "configure:10118: checking for $ac_hdr" >&5
10118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 #include <$ac_hdr>
10125 EOF
10126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10127 { (eval echo configure:10128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10129 if test -z "$ac_err"; then
10130   rm -rf conftest*
10131   eval "ac_cv_header_$ac_safe=yes"
10132 else
10133   echo "$ac_err" >&5
10134   echo "configure: failed program was:" >&5
10135   cat conftest.$ac_ext >&5
10136   rm -rf conftest*
10137   eval "ac_cv_header_$ac_safe=no"
10138 fi
10139 rm -f conftest*
10140 fi
10141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10142   echo "$ac_t""yes" 1>&6
10143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_hdr 1
10146 EOF
10147  
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151 done
10152
10153
10154         if test $ac_cv_header_readline_readline_h = yes ; then
10155                 save_LIBS="$LIBS"
10156                 LIBS="$TERMCAP_LIBS $LIBS"
10157                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10158 echo "configure:10159: checking for readline in -lreadline" >&5
10159 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10161   echo $ac_n "(cached) $ac_c" 1>&6
10162 else
10163   ac_save_LIBS="$LIBS"
10164 LIBS="-lreadline  $LIBS"
10165 cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 /* Override any gcc2 internal prototype to avoid an error.  */
10169 /* We use char because int might match the return type of a gcc2
10170     builtin and then its argument prototype would still apply.  */
10171 char readline();
10172
10173 int main() {
10174 readline()
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   eval "ac_cv_lib_$ac_lib_var=yes"
10180 else
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   eval "ac_cv_lib_$ac_lib_var=no"
10185 fi
10186 rm -f conftest*
10187 LIBS="$ac_save_LIBS"
10188
10189 fi
10190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10191   echo "$ac_t""yes" 1>&6
10192   have_readline=yes
10193 else
10194   echo "$ac_t""no" 1>&6
10195 have_readline=no
10196 fi
10197
10198                 LIBS="$save_LIBS"
10199                         
10200                 if test $have_readline = yes ; then
10201                         ol_with_readline=found
10202                         ol_link_readline=yes
10203
10204                         READLINE_LIBS="-lreadline"
10205                 fi
10206         fi
10207 fi
10208
10209 if test $ol_link_readline = yes ; then
10210         cat >> confdefs.h <<\EOF
10211 #define HAVE_READLINE 1
10212 EOF
10213
10214 fi
10215
10216
10217 # FreeBSD (and others) have crypt(3) in -lcrypt
10218 if test $ol_enable_crypt != no ; then
10219         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10220 echo "configure:10221: checking for crypt" >&5
10221 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10222   echo $ac_n "(cached) $ac_c" 1>&6
10223 else
10224   cat > conftest.$ac_ext <<EOF
10225 #line 10226 "configure"
10226 #include "confdefs.h"
10227 /* System header to define __stub macros and hopefully few prototypes,
10228     which can conflict with char crypt(); below.  */
10229 #include <assert.h>
10230 /* Override any gcc2 internal prototype to avoid an error.  */
10231 /* We use char because int might match the return type of a gcc2
10232     builtin and then its argument prototype would still apply.  */
10233 char crypt();
10234 char (*f)();
10235
10236 int main() {
10237
10238 /* The GNU C library defines this for functions which it implements
10239     to always fail with ENOSYS.  Some functions are actually named
10240     something starting with __ and the normal name is an alias.  */
10241 #if defined (__stub_crypt) || defined (__stub___crypt)
10242 choke me
10243 #else
10244 f = crypt;
10245 #endif
10246
10247 ; return 0; }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10250   rm -rf conftest*
10251   eval "ac_cv_func_crypt=yes"
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   eval "ac_cv_func_crypt=no"
10257 fi
10258 rm -f conftest*
10259 fi
10260
10261 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263   have_crypt=yes
10264 else
10265   echo "$ac_t""no" 1>&6
10266
10267                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10268 echo "configure:10269: checking for crypt in -lcrypt" >&5
10269 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   ac_save_LIBS="$LIBS"
10274 LIBS="-lcrypt  $LIBS"
10275 cat > conftest.$ac_ext <<EOF
10276 #line 10277 "configure"
10277 #include "confdefs.h"
10278 /* Override any gcc2 internal prototype to avoid an error.  */
10279 /* We use char because int might match the return type of a gcc2
10280     builtin and then its argument prototype would still apply.  */
10281 char crypt();
10282
10283 int main() {
10284 crypt()
10285 ; return 0; }
10286 EOF
10287 if { (eval echo configure:10288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10288   rm -rf conftest*
10289   eval "ac_cv_lib_$ac_lib_var=yes"
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   eval "ac_cv_lib_$ac_lib_var=no"
10295 fi
10296 rm -f conftest*
10297 LIBS="$ac_save_LIBS"
10298
10299 fi
10300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10301   echo "$ac_t""yes" 1>&6
10302   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10303                         have_crypt=yes
10304 else
10305   echo "$ac_t""no" 1>&6
10306 have_crypt=no
10307 fi
10308
10309 fi
10310
10311
10312         if test $have_crypt = yes ; then
10313                 cat >> confdefs.h <<\EOF
10314 #define HAVE_CRYPT 1
10315 EOF
10316
10317         else
10318                 echo "configure: warning: could not find crypt" 1>&2
10319                 if test $ol_enable_crypt = yes ; then
10320                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10321                 fi
10322
10323                 echo "configure: warning: disabling crypt support" 1>&2
10324                 ol_enable_crypt=no
10325         fi
10326 fi
10327
10328 # FreeBSD (and others) have setproctitle(3) in -lutil
10329 if test $ol_enable_proctitle != no ; then
10330         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10331 echo "configure:10332: checking for setproctitle" >&5
10332 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10333   echo $ac_n "(cached) $ac_c" 1>&6
10334 else
10335   cat > conftest.$ac_ext <<EOF
10336 #line 10337 "configure"
10337 #include "confdefs.h"
10338 /* System header to define __stub macros and hopefully few prototypes,
10339     which can conflict with char setproctitle(); below.  */
10340 #include <assert.h>
10341 /* Override any gcc2 internal prototype to avoid an error.  */
10342 /* We use char because int might match the return type of a gcc2
10343     builtin and then its argument prototype would still apply.  */
10344 char setproctitle();
10345 char (*f)();
10346
10347 int main() {
10348
10349 /* The GNU C library defines this for functions which it implements
10350     to always fail with ENOSYS.  Some functions are actually named
10351     something starting with __ and the normal name is an alias.  */
10352 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10353 choke me
10354 #else
10355 f = setproctitle;
10356 #endif
10357
10358 ; return 0; }
10359 EOF
10360 if { (eval echo configure:10361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10361   rm -rf conftest*
10362   eval "ac_cv_func_setproctitle=yes"
10363 else
10364   echo "configure: failed program was:" >&5
10365   cat conftest.$ac_ext >&5
10366   rm -rf conftest*
10367   eval "ac_cv_func_setproctitle=no"
10368 fi
10369 rm -f conftest*
10370 fi
10371
10372 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10373   echo "$ac_t""yes" 1>&6
10374   have_setproctitle=yes
10375 else
10376   echo "$ac_t""no" 1>&6
10377
10378                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10379 echo "configure:10380: checking for setproctitle in -lutil" >&5
10380 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10381 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10382   echo $ac_n "(cached) $ac_c" 1>&6
10383 else
10384   ac_save_LIBS="$LIBS"
10385 LIBS="-lutil  $LIBS"
10386 cat > conftest.$ac_ext <<EOF
10387 #line 10388 "configure"
10388 #include "confdefs.h"
10389 /* Override any gcc2 internal prototype to avoid an error.  */
10390 /* We use char because int might match the return type of a gcc2
10391     builtin and then its argument prototype would still apply.  */
10392 char setproctitle();
10393
10394 int main() {
10395 setproctitle()
10396 ; return 0; }
10397 EOF
10398 if { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10399   rm -rf conftest*
10400   eval "ac_cv_lib_$ac_lib_var=yes"
10401 else
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_lib_$ac_lib_var=no"
10406 fi
10407 rm -f conftest*
10408 LIBS="$ac_save_LIBS"
10409
10410 fi
10411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10412   echo "$ac_t""yes" 1>&6
10413   have_setproctitle=yes
10414                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10415 else
10416   echo "$ac_t""no" 1>&6
10417 have_setproctitle=no
10418                         LIBOBJS="$LIBOBJS setproctitle.o"
10419 fi
10420
10421 fi
10422
10423
10424         if test $have_setproctitle = yes ; then
10425                 cat >> confdefs.h <<\EOF
10426 #define HAVE_SETPROCTITLE 1
10427 EOF
10428
10429         fi
10430 fi
10431
10432 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10433 echo "configure:10434: checking for uid_t in sys/types.h" >&5
10434 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   cat > conftest.$ac_ext <<EOF
10438 #line 10439 "configure"
10439 #include "confdefs.h"
10440 #include <sys/types.h>
10441 EOF
10442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10443   egrep "uid_t" >/dev/null 2>&1; then
10444   rm -rf conftest*
10445   ac_cv_type_uid_t=yes
10446 else
10447   rm -rf conftest*
10448   ac_cv_type_uid_t=no
10449 fi
10450 rm -f conftest*
10451
10452 fi
10453
10454 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10455 if test $ac_cv_type_uid_t = no; then
10456   cat >> confdefs.h <<\EOF
10457 #define uid_t int
10458 EOF
10459
10460   cat >> confdefs.h <<\EOF
10461 #define gid_t int
10462 EOF
10463
10464 fi
10465
10466 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10467 echo "configure:10468: checking type of array argument to getgroups" >&5
10468 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10469   echo $ac_n "(cached) $ac_c" 1>&6
10470 else
10471   if test "$cross_compiling" = yes; then
10472   ac_cv_type_getgroups=cross
10473 else
10474   cat > conftest.$ac_ext <<EOF
10475 #line 10476 "configure"
10476 #include "confdefs.h"
10477
10478 /* Thanks to Mike Rendell for this test.  */
10479 #include <sys/types.h>
10480 #define NGID 256
10481 #undef MAX
10482 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10483 main()
10484 {
10485   gid_t gidset[NGID];
10486   int i, n;
10487   union { gid_t gval; long lval; }  val;
10488
10489   val.lval = -1;
10490   for (i = 0; i < NGID; i++)
10491     gidset[i] = val.gval;
10492   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10493                  gidset);
10494   /* Exit non-zero if getgroups seems to require an array of ints.  This
10495      happens when gid_t is short but getgroups modifies an array of ints.  */
10496   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10497 }
10498
10499 EOF
10500 if { (eval echo configure:10501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10501 then
10502     ac_cv_type_getgroups=gid_t
10503 else
10504   echo "configure: failed program was:" >&5
10505   cat conftest.$ac_ext >&5
10506   rm -fr conftest*
10507   ac_cv_type_getgroups=int
10508 fi
10509 rm -fr conftest*
10510 fi
10511
10512 if test $ac_cv_type_getgroups = cross; then
10513         cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516 #include <unistd.h>
10517 EOF
10518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10519   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10520   rm -rf conftest*
10521   ac_cv_type_getgroups=gid_t
10522 else
10523   rm -rf conftest*
10524   ac_cv_type_getgroups=int
10525 fi
10526 rm -f conftest*
10527
10528 fi
10529 fi
10530
10531 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10532 cat >> confdefs.h <<EOF
10533 #define GETGROUPS_T $ac_cv_type_getgroups
10534 EOF
10535
10536  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10537 echo "configure:10538: checking for ANSI C header files" >&5
10538 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10539   echo $ac_n "(cached) $ac_c" 1>&6
10540 else
10541   cat > conftest.$ac_ext <<EOF
10542 #line 10543 "configure"
10543 #include "confdefs.h"
10544 #include <stdlib.h>
10545 #include <stdarg.h>
10546 #include <string.h>
10547 #include <float.h>
10548 EOF
10549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10550 { (eval echo configure:10551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10552 if test -z "$ac_err"; then
10553   rm -rf conftest*
10554   ac_cv_header_stdc=yes
10555 else
10556   echo "$ac_err" >&5
10557   echo "configure: failed program was:" >&5
10558   cat conftest.$ac_ext >&5
10559   rm -rf conftest*
10560   ac_cv_header_stdc=no
10561 fi
10562 rm -f conftest*
10563
10564 if test $ac_cv_header_stdc = yes; then
10565   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10566 cat > conftest.$ac_ext <<EOF
10567 #line 10568 "configure"
10568 #include "confdefs.h"
10569 #include <string.h>
10570 EOF
10571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10572   egrep "memchr" >/dev/null 2>&1; then
10573   :
10574 else
10575   rm -rf conftest*
10576   ac_cv_header_stdc=no
10577 fi
10578 rm -f conftest*
10579
10580 fi
10581
10582 if test $ac_cv_header_stdc = yes; then
10583   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10584 cat > conftest.$ac_ext <<EOF
10585 #line 10586 "configure"
10586 #include "confdefs.h"
10587 #include <stdlib.h>
10588 EOF
10589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10590   egrep "free" >/dev/null 2>&1; then
10591   :
10592 else
10593   rm -rf conftest*
10594   ac_cv_header_stdc=no
10595 fi
10596 rm -f conftest*
10597
10598 fi
10599
10600 if test $ac_cv_header_stdc = yes; then
10601   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10602 if test "$cross_compiling" = yes; then
10603   :
10604 else
10605   cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608 #include <ctype.h>
10609 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10610 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10611 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10612 int main () { int i; for (i = 0; i < 256; i++)
10613 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10614 exit (0); }
10615
10616 EOF
10617 if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10618 then
10619   :
10620 else
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -fr conftest*
10624   ac_cv_header_stdc=no
10625 fi
10626 rm -fr conftest*
10627 fi
10628
10629 fi
10630 fi
10631
10632 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10633 if test $ac_cv_header_stdc = yes; then
10634   cat >> confdefs.h <<\EOF
10635 #define STDC_HEADERS 1
10636 EOF
10637
10638 fi
10639
10640 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10641 echo "configure:10642: checking for mode_t" >&5
10642 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
10643   echo $ac_n "(cached) $ac_c" 1>&6
10644 else
10645   cat > conftest.$ac_ext <<EOF
10646 #line 10647 "configure"
10647 #include "confdefs.h"
10648 #include <sys/types.h>
10649 #if STDC_HEADERS
10650 #include <stdlib.h>
10651 #include <stddef.h>
10652 #endif
10653 EOF
10654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10655   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10656   rm -rf conftest*
10657   eval "ac_cv_type_mode_t=yes"
10658 else
10659   rm -rf conftest*
10660   eval "ac_cv_type_mode_t=no"
10661 fi
10662 rm -f conftest*
10663
10664 fi
10665 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667 else
10668   echo "$ac_t""no" 1>&6
10669   cat >> confdefs.h <<EOF
10670 #define mode_t int
10671 EOF
10672
10673 fi
10674
10675 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10676 echo "configure:10677: checking for off_t" >&5
10677 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
10678   echo $ac_n "(cached) $ac_c" 1>&6
10679 else
10680   cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 #include <sys/types.h>
10684 #if STDC_HEADERS
10685 #include <stdlib.h>
10686 #include <stddef.h>
10687 #endif
10688 EOF
10689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10690   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10691   rm -rf conftest*
10692   eval "ac_cv_type_off_t=yes"
10693 else
10694   rm -rf conftest*
10695   eval "ac_cv_type_off_t=no"
10696 fi
10697 rm -f conftest*
10698
10699 fi
10700 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
10701   echo "$ac_t""yes" 1>&6
10702 else
10703   echo "$ac_t""no" 1>&6
10704   cat >> confdefs.h <<EOF
10705 #define off_t long
10706 EOF
10707
10708 fi
10709
10710 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10711 echo "configure:10712: checking for pid_t" >&5
10712 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   cat > conftest.$ac_ext <<EOF
10716 #line 10717 "configure"
10717 #include "confdefs.h"
10718 #include <sys/types.h>
10719 #if STDC_HEADERS
10720 #include <stdlib.h>
10721 #include <stddef.h>
10722 #endif
10723 EOF
10724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10725   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10726   rm -rf conftest*
10727   eval "ac_cv_type_pid_t=yes"
10728 else
10729   rm -rf conftest*
10730   eval "ac_cv_type_pid_t=no"
10731 fi
10732 rm -f conftest*
10733
10734 fi
10735 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
10736   echo "$ac_t""yes" 1>&6
10737 else
10738   echo "$ac_t""no" 1>&6
10739   cat >> confdefs.h <<EOF
10740 #define pid_t int
10741 EOF
10742
10743 fi
10744
10745 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10746 echo "configure:10747: checking for ptrdiff_t" >&5
10747 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
10748   echo $ac_n "(cached) $ac_c" 1>&6
10749 else
10750   cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753 #include <stddef.h>
10754 int main() {
10755 ptrdiff_t p
10756 ; return 0; }
10757 EOF
10758 if { (eval echo configure:10759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10759   rm -rf conftest*
10760   am_cv_type_ptrdiff_t=yes
10761 else
10762   echo "configure: failed program was:" >&5
10763   cat conftest.$ac_ext >&5
10764   rm -rf conftest*
10765   am_cv_type_ptrdiff_t=no
10766 fi
10767 rm -f conftest*
10768 fi
10769
10770 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10771    if test $am_cv_type_ptrdiff_t = yes; then
10772      cat >> confdefs.h <<\EOF
10773 #define HAVE_PTRDIFF_T 1
10774 EOF
10775
10776    fi
10777
10778 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10779 echo "configure:10780: checking return type of signal handlers" >&5
10780 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
10781   echo $ac_n "(cached) $ac_c" 1>&6
10782 else
10783   cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include <sys/types.h>
10787 #include <signal.h>
10788 #ifdef signal
10789 #undef signal
10790 #endif
10791 #ifdef __cplusplus
10792 extern "C" void (*signal (int, void (*)(int)))(int);
10793 #else
10794 void (*signal ()) ();
10795 #endif
10796
10797 int main() {
10798 int i;
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10802   rm -rf conftest*
10803   ac_cv_type_signal=void
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   ac_cv_type_signal=int
10809 fi
10810 rm -f conftest*
10811 fi
10812
10813 echo "$ac_t""$ac_cv_type_signal" 1>&6
10814 cat >> confdefs.h <<EOF
10815 #define RETSIGTYPE $ac_cv_type_signal
10816 EOF
10817
10818
10819 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10820 echo "configure:10821: checking for sig_atomic_t" >&5
10821 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 #include <signal.h>
10828 int main() {
10829 sig_atomic_t atomic;
10830 ; return 0; }
10831 EOF
10832 if { (eval echo configure:10833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10833   rm -rf conftest*
10834   ol_cv_type_sig_atomic_t=yes
10835 else
10836   echo "configure: failed program was:" >&5
10837   cat conftest.$ac_ext >&5
10838   rm -rf conftest*
10839   ol_cv_type_sig_atomic_t=no
10840 fi
10841 rm -f conftest*
10842 fi
10843
10844 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10845   if test $ol_cv_type_sig_atomic_t = no; then
10846     cat >> confdefs.h <<\EOF
10847 #define sig_atomic_t int
10848 EOF
10849
10850   fi
10851  
10852 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10853 echo "configure:10854: checking for size_t" >&5
10854 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
10855   echo $ac_n "(cached) $ac_c" 1>&6
10856 else
10857   cat > conftest.$ac_ext <<EOF
10858 #line 10859 "configure"
10859 #include "confdefs.h"
10860 #include <sys/types.h>
10861 #if STDC_HEADERS
10862 #include <stdlib.h>
10863 #include <stddef.h>
10864 #endif
10865 EOF
10866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10867   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10868   rm -rf conftest*
10869   eval "ac_cv_type_size_t=yes"
10870 else
10871   rm -rf conftest*
10872   eval "ac_cv_type_size_t=no"
10873 fi
10874 rm -f conftest*
10875
10876 fi
10877 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
10878   echo "$ac_t""yes" 1>&6
10879 else
10880   echo "$ac_t""no" 1>&6
10881   cat >> confdefs.h <<EOF
10882 #define size_t unsigned
10883 EOF
10884
10885 fi
10886
10887 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
10888 echo "configure:10889: checking for socklen_t" >&5
10889 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
10890   echo $ac_n "(cached) $ac_c" 1>&6
10891 else
10892   cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895
10896 #ifdef HAVE_SYS_TYPES_H
10897 #include <sys/types.h>
10898 #endif
10899 #ifdef HAVE_SYS_SOCKET_H
10900 #include <sys/socket.h>
10901 #endif
10902
10903 int main() {
10904 socklen_t len;
10905 ; return 0; }
10906 EOF
10907 if { (eval echo configure:10908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10908   rm -rf conftest*
10909   ol_cv_type_socklen_t=yes
10910 else
10911   echo "configure: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   rm -rf conftest*
10914   ol_cv_type_socklen_t=no
10915 fi
10916 rm -f conftest*
10917 fi
10918
10919 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
10920   if test $ol_cv_type_socklen_t = no; then
10921     cat >> confdefs.h <<\EOF
10922 #define socklen_t int
10923 EOF
10924
10925   fi
10926  
10927 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
10928 echo "configure:10929: checking for member st_blksize in aggregate type struct stat" >&5
10929 if eval "test \"\${ac_cv_c_struct_member_st_blksize+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 #include <sys/stat.h>
10937 int main() {
10938 struct stat foo; foo.st_blksize;
10939 ; return 0; }
10940 EOF
10941 if { (eval echo configure:10942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10942   rm -rf conftest*
10943   ac_cv_c_struct_member_st_blksize=yes
10944 else
10945   echo "configure: failed program was:" >&5
10946   cat conftest.$ac_ext >&5
10947   rm -rf conftest*
10948   ac_cv_c_struct_member_st_blksize=no
10949 fi
10950 rm -f conftest*
10951 fi
10952
10953 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
10954 st_blksize="$ac_cv_c_struct_member_st_blksize"
10955 if test $ac_cv_c_struct_member_st_blksize = yes; then
10956   cat >> confdefs.h <<\EOF
10957 #define HAVE_ST_BLKSIZE 1
10958 EOF
10959
10960 fi
10961
10962 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10963 echo "configure:10964: checking whether time.h and sys/time.h may both be included" >&5
10964 if eval "test \"\${ac_cv_header_time+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 #include <sys/time.h>
10972 #include <time.h>
10973 int main() {
10974 struct tm *tp;
10975 ; return 0; }
10976 EOF
10977 if { (eval echo configure:10978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10978   rm -rf conftest*
10979   ac_cv_header_time=yes
10980 else
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -rf conftest*
10984   ac_cv_header_time=no
10985 fi
10986 rm -f conftest*
10987 fi
10988
10989 echo "$ac_t""$ac_cv_header_time" 1>&6
10990 if test $ac_cv_header_time = yes; then
10991   cat >> confdefs.h <<\EOF
10992 #define TIME_WITH_SYS_TIME 1
10993 EOF
10994
10995 fi
10996
10997 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10998 echo "configure:10999: checking whether struct tm is in sys/time.h or time.h" >&5
10999 if eval "test \"\${ac_cv_struct_tm+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 <sys/types.h>
11006 #include <time.h>
11007 int main() {
11008 struct tm *tp; tp->tm_sec;
11009 ; return 0; }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11012   rm -rf conftest*
11013   ac_cv_struct_tm=time.h
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -rf conftest*
11018   ac_cv_struct_tm=sys/time.h
11019 fi
11020 rm -f conftest*
11021 fi
11022
11023 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11024 if test $ac_cv_struct_tm = sys/time.h; then
11025   cat >> confdefs.h <<\EOF
11026 #define TM_IN_SYS_TIME 1
11027 EOF
11028
11029 fi
11030
11031 # test for pw_gecos in struct passwd
11032 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11033 echo "configure:11034: checking struct passwd for pw_gecos" >&5
11034 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11035   echo $ac_n "(cached) $ac_c" 1>&6
11036 else
11037   
11038         cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 #include <pwd.h>
11042 int main() {
11043
11044         struct passwd pwd;
11045         pwd.pw_gecos = pwd.pw_name;
11046
11047 ; return 0; }
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11050   rm -rf conftest*
11051   ol_cv_struct_passwd_pw_gecos=yes
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -rf conftest*
11056   ol_cv_struct_passwd_pw_gecos=no
11057 fi
11058 rm -f conftest*
11059 fi
11060
11061 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11062 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11063         cat >> confdefs.h <<\EOF
11064 #define HAVE_PW_GECOS 1
11065 EOF
11066
11067 fi
11068
11069 # test for pw_passwd in struct passwd
11070 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11071 echo "configure:11072: checking struct passwd for pw_passwd" >&5
11072 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11073   echo $ac_n "(cached) $ac_c" 1>&6
11074 else
11075   
11076         cat > conftest.$ac_ext <<EOF
11077 #line 11078 "configure"
11078 #include "confdefs.h"
11079 #include <pwd.h>
11080 int main() {
11081
11082         struct passwd pwd;
11083         pwd.pw_passwd = pwd.pw_name;
11084
11085 ; return 0; }
11086 EOF
11087 if { (eval echo configure:11088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11088   rm -rf conftest*
11089   ol_cv_struct_passwd_pw_passwd=yes
11090 else
11091   echo "configure: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   rm -rf conftest*
11094   ol_cv_struct_passwd_pw_passwd=no
11095 fi
11096 rm -f conftest*
11097 fi
11098
11099 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11100 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11101         cat >> confdefs.h <<\EOF
11102 #define HAVE_PW_PASSWD 1
11103 EOF
11104
11105 fi
11106
11107
11108 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11109 echo "configure:11110: checking if toupper() requires islower()" >&5
11110 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11111   echo $ac_n "(cached) $ac_c" 1>&6
11112 else
11113   
11114         if test "$cross_compiling" = yes; then
11115   ol_cv_c_upper_lower=safe
11116 else
11117   cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120
11121 #include <ctype.h>
11122 main()
11123 {
11124         if ('C' == toupper('C'))
11125                 exit(0);
11126         else
11127                 exit(1);
11128 }
11129 EOF
11130 if { (eval echo configure:11131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11131 then
11132   ol_cv_c_upper_lower=no
11133 else
11134   echo "configure: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   rm -fr conftest*
11137   ol_cv_c_upper_lower=yes
11138 fi
11139 rm -fr conftest*
11140 fi
11141
11142 fi
11143
11144 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11145 if test $ol_cv_c_upper_lower != no ; then
11146         cat >> confdefs.h <<\EOF
11147 #define C_UPPER_LOWER 1
11148 EOF
11149
11150 fi
11151
11152 echo $ac_n "checking for working const""... $ac_c" 1>&6
11153 echo "configure:11154: checking for working const" >&5
11154 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11155   echo $ac_n "(cached) $ac_c" 1>&6
11156 else
11157   cat > conftest.$ac_ext <<EOF
11158 #line 11159 "configure"
11159 #include "confdefs.h"
11160
11161 int main() {
11162
11163 /* Ultrix mips cc rejects this.  */
11164 typedef int charset[2]; const charset x;
11165 /* SunOS 4.1.1 cc rejects this.  */
11166 char const *const *ccp;
11167 char **p;
11168 /* NEC SVR4.0.2 mips cc rejects this.  */
11169 struct point {int x, y;};
11170 static struct point const zero = {0,0};
11171 /* AIX XL C 1.02.0.0 rejects this.
11172    It does not let you subtract one const X* pointer from another in an arm
11173    of an if-expression whose if-part is not a constant expression */
11174 const char *g = "string";
11175 ccp = &g + (g ? g-g : 0);
11176 /* HPUX 7.0 cc rejects these. */
11177 ++ccp;
11178 p = (char**) ccp;
11179 ccp = (char const *const *) p;
11180 { /* SCO 3.2v4 cc rejects this.  */
11181   char *t;
11182   char const *s = 0 ? (char *) 0 : (char const *) 0;
11183
11184   *t++ = 0;
11185 }
11186 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11187   int x[] = {25, 17};
11188   const int *foo = &x[0];
11189   ++foo;
11190 }
11191 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11192   typedef const int *iptr;
11193   iptr p = 0;
11194   ++p;
11195 }
11196 { /* AIX XL C 1.02.0.0 rejects this saying
11197      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11198   struct s { int j; const int *ap[3]; };
11199   struct s *b; b->j = 5;
11200 }
11201 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11202   const int foo = 10;
11203 }
11204
11205 ; return 0; }
11206 EOF
11207 if { (eval echo configure:11208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11208   rm -rf conftest*
11209   ac_cv_c_const=yes
11210 else
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   ac_cv_c_const=no
11215 fi
11216 rm -f conftest*
11217 fi
11218
11219 echo "$ac_t""$ac_cv_c_const" 1>&6
11220 if test $ac_cv_c_const = no; then
11221   cat >> confdefs.h <<\EOF
11222 #define const 
11223 EOF
11224
11225 fi
11226
11227 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11228 echo "configure:11229: checking if compiler understands volatile" >&5
11229 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 int x, y, z;
11236 int main() {
11237 volatile int a; int * volatile b = x ? &y : &z;
11238       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11239       *b = 0;
11240 ; return 0; }
11241 EOF
11242 if { (eval echo configure:11243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11243   rm -rf conftest*
11244   ol_cv_c_volatile=yes
11245 else
11246   echo "configure: failed program was:" >&5
11247   cat conftest.$ac_ext >&5
11248   rm -rf conftest*
11249   ol_cv_c_volatile=no
11250 fi
11251 rm -f conftest*
11252 fi
11253
11254 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11255   if test $ol_cv_c_volatile = yes; then
11256     : 
11257   else
11258     cat >> confdefs.h <<\EOF
11259 #define volatile 
11260 EOF
11261
11262   fi
11263  
11264
11265 if test $cross_compiling = yes ; then
11266         cat >> confdefs.h <<\EOF
11267 #define CROSS_COMPILING 1
11268 EOF
11269
11270
11271         cat >> confdefs.h <<\EOF
11272 #define LBER_INT_T long
11273 EOF
11274
11275         cat >> confdefs.h <<\EOF
11276 #define LBER_TAG_T long
11277 EOF
11278
11279         cat >> confdefs.h <<\EOF
11280 #define LBER_SOCKET_T int
11281 EOF
11282
11283
11284 else
11285         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11286 echo "configure:11287: checking whether byte ordering is bigendian" >&5
11287 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   ac_cv_c_bigendian=unknown
11291 # See if sys/param.h defines the BYTE_ORDER macro.
11292 cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295 #include <sys/types.h>
11296 #include <sys/param.h>
11297 int main() {
11298
11299 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11300  bogus endian macros
11301 #endif
11302 ; return 0; }
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11305   rm -rf conftest*
11306   # It does; now see whether it defined to BIG_ENDIAN or not.
11307 cat > conftest.$ac_ext <<EOF
11308 #line 11309 "configure"
11309 #include "confdefs.h"
11310 #include <sys/types.h>
11311 #include <sys/param.h>
11312 int main() {
11313
11314 #if BYTE_ORDER != BIG_ENDIAN
11315  not big endian
11316 #endif
11317 ; return 0; }
11318 EOF
11319 if { (eval echo configure:11320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11320   rm -rf conftest*
11321   ac_cv_c_bigendian=yes
11322 else
11323   echo "configure: failed program was:" >&5
11324   cat conftest.$ac_ext >&5
11325   rm -rf conftest*
11326   ac_cv_c_bigendian=no
11327 fi
11328 rm -f conftest*
11329 else
11330   echo "configure: failed program was:" >&5
11331   cat conftest.$ac_ext >&5
11332 fi
11333 rm -f conftest*
11334 if test $ac_cv_c_bigendian = unknown; then
11335 if test "$cross_compiling" = yes; then
11336     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11337 else
11338   cat > conftest.$ac_ext <<EOF
11339 #line 11340 "configure"
11340 #include "confdefs.h"
11341 main () {
11342   /* Are we little or big endian?  From Harbison&Steele.  */
11343   union
11344   {
11345     long l;
11346     char c[sizeof (long)];
11347   } u;
11348   u.l = 1;
11349   exit (u.c[sizeof (long) - 1] == 1);
11350 }
11351 EOF
11352 if { (eval echo configure:11353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11353 then
11354   ac_cv_c_bigendian=no
11355 else
11356   echo "configure: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   rm -fr conftest*
11359   ac_cv_c_bigendian=yes
11360 fi
11361 rm -fr conftest*
11362 fi
11363
11364 fi
11365 fi
11366
11367 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11368 if test $ac_cv_c_bigendian = yes; then
11369   cat >> confdefs.h <<\EOF
11370 #define WORDS_BIGENDIAN 1
11371 EOF
11372
11373 fi
11374
11375         echo $ac_n "checking size of short""... $ac_c" 1>&6
11376 echo "configure:11377: checking size of short" >&5
11377 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   if test "$cross_compiling" = yes; then
11381     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11382 else
11383   cat > conftest.$ac_ext <<EOF
11384 #line 11385 "configure"
11385 #include "confdefs.h"
11386 #include <stdio.h>
11387 main()
11388 {
11389   FILE *f=fopen("conftestval", "w");
11390   if (!f) exit(1);
11391   fprintf(f, "%d\n", sizeof(short));
11392   exit(0);
11393 }
11394 EOF
11395 if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11396 then
11397   ac_cv_sizeof_short=`cat conftestval`
11398 else
11399   echo "configure: failed program was:" >&5
11400   cat conftest.$ac_ext >&5
11401   rm -fr conftest*
11402   ac_cv_sizeof_short=0
11403 fi
11404 rm -fr conftest*
11405 fi
11406
11407 fi
11408 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11409 cat >> confdefs.h <<EOF
11410 #define SIZEOF_SHORT $ac_cv_sizeof_short
11411 EOF
11412
11413  
11414         echo $ac_n "checking size of int""... $ac_c" 1>&6
11415 echo "configure:11416: checking size of int" >&5
11416 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   if test "$cross_compiling" = yes; then
11420     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11421 else
11422   cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 #include <stdio.h>
11426 main()
11427 {
11428   FILE *f=fopen("conftestval", "w");
11429   if (!f) exit(1);
11430   fprintf(f, "%d\n", sizeof(int));
11431   exit(0);
11432 }
11433 EOF
11434 if { (eval echo configure:11435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11435 then
11436   ac_cv_sizeof_int=`cat conftestval`
11437 else
11438   echo "configure: failed program was:" >&5
11439   cat conftest.$ac_ext >&5
11440   rm -fr conftest*
11441   ac_cv_sizeof_int=0
11442 fi
11443 rm -fr conftest*
11444 fi
11445
11446 fi
11447 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11448 cat >> confdefs.h <<EOF
11449 #define SIZEOF_INT $ac_cv_sizeof_int
11450 EOF
11451
11452  
11453         echo $ac_n "checking size of long""... $ac_c" 1>&6
11454 echo "configure:11455: checking size of long" >&5
11455 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   if test "$cross_compiling" = yes; then
11459     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11460 else
11461   cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 #include <stdio.h>
11465 main()
11466 {
11467   FILE *f=fopen("conftestval", "w");
11468   if (!f) exit(1);
11469   fprintf(f, "%d\n", sizeof(long));
11470   exit(0);
11471 }
11472 EOF
11473 if { (eval echo configure:11474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11474 then
11475   ac_cv_sizeof_long=`cat conftestval`
11476 else
11477   echo "configure: failed program was:" >&5
11478   cat conftest.$ac_ext >&5
11479   rm -fr conftest*
11480   ac_cv_sizeof_long=0
11481 fi
11482 rm -fr conftest*
11483 fi
11484
11485 fi
11486 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11487 cat >> confdefs.h <<EOF
11488 #define SIZEOF_LONG $ac_cv_sizeof_long
11489 EOF
11490
11491
11492
11493         if test "$ac_cv_sizeof_int" -lt 4 ; then
11494                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11495
11496                 cat >> confdefs.h <<\EOF
11497 #define LBER_INT_T long
11498 EOF
11499
11500                 cat >> confdefs.h <<\EOF
11501 #define LBER_TAG_T long
11502 EOF
11503
11504                 cat >> confdefs.h <<\EOF
11505 #define LBER_SOCKET_T int
11506 EOF
11507
11508         else
11509                 cat >> confdefs.h <<\EOF
11510 #define LBER_INT_T int
11511 EOF
11512
11513                 cat >> confdefs.h <<\EOF
11514 #define LBER_TAG_T long
11515 EOF
11516
11517                 cat >> confdefs.h <<\EOF
11518 #define LBER_SOCKET_T int
11519 EOF
11520
11521         fi
11522 fi
11523
11524 cat >> confdefs.h <<\EOF
11525 #define LBER_LEN_T long
11526 EOF
11527
11528
11529 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11530 echo "configure:11531: checking for 8-bit clean memcmp" >&5
11531 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11532   echo $ac_n "(cached) $ac_c" 1>&6
11533 else
11534   if test "$cross_compiling" = yes; then
11535   ac_cv_func_memcmp_clean=no
11536 else
11537   cat > conftest.$ac_ext <<EOF
11538 #line 11539 "configure"
11539 #include "confdefs.h"
11540
11541 main()
11542 {
11543   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11544   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11545 }
11546
11547 EOF
11548 if { (eval echo configure:11549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11549 then
11550   ac_cv_func_memcmp_clean=yes
11551 else
11552   echo "configure: failed program was:" >&5
11553   cat conftest.$ac_ext >&5
11554   rm -fr conftest*
11555   ac_cv_func_memcmp_clean=no
11556 fi
11557 rm -fr conftest*
11558 fi
11559
11560 fi
11561
11562 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11563 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11564
11565 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11566 echo "configure:11567: checking for strftime" >&5
11567 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
11568   echo $ac_n "(cached) $ac_c" 1>&6
11569 else
11570   cat > conftest.$ac_ext <<EOF
11571 #line 11572 "configure"
11572 #include "confdefs.h"
11573 /* System header to define __stub macros and hopefully few prototypes,
11574     which can conflict with char strftime(); below.  */
11575 #include <assert.h>
11576 /* Override any gcc2 internal prototype to avoid an error.  */
11577 /* We use char because int might match the return type of a gcc2
11578     builtin and then its argument prototype would still apply.  */
11579 char strftime();
11580 char (*f)();
11581
11582 int main() {
11583
11584 /* The GNU C library defines this for functions which it implements
11585     to always fail with ENOSYS.  Some functions are actually named
11586     something starting with __ and the normal name is an alias.  */
11587 #if defined (__stub_strftime) || defined (__stub___strftime)
11588 choke me
11589 #else
11590 f = strftime;
11591 #endif
11592
11593 ; return 0; }
11594 EOF
11595 if { (eval echo configure:11596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11596   rm -rf conftest*
11597   eval "ac_cv_func_strftime=yes"
11598 else
11599   echo "configure: failed program was:" >&5
11600   cat conftest.$ac_ext >&5
11601   rm -rf conftest*
11602   eval "ac_cv_func_strftime=no"
11603 fi
11604 rm -f conftest*
11605 fi
11606
11607 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11608   echo "$ac_t""yes" 1>&6
11609   cat >> confdefs.h <<\EOF
11610 #define HAVE_STRFTIME 1
11611 EOF
11612
11613 else
11614   echo "$ac_t""no" 1>&6
11615 # strftime is in -lintl on SCO UNIX.
11616 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11617 echo "configure:11618: checking for strftime in -lintl" >&5
11618 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
11619 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11620   echo $ac_n "(cached) $ac_c" 1>&6
11621 else
11622   ac_save_LIBS="$LIBS"
11623 LIBS="-lintl  $LIBS"
11624 cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627 /* Override any gcc2 internal prototype to avoid an error.  */
11628 /* We use char because int might match the return type of a gcc2
11629     builtin and then its argument prototype would still apply.  */
11630 char strftime();
11631
11632 int main() {
11633 strftime()
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11637   rm -rf conftest*
11638   eval "ac_cv_lib_$ac_lib_var=yes"
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -rf conftest*
11643   eval "ac_cv_lib_$ac_lib_var=no"
11644 fi
11645 rm -f conftest*
11646 LIBS="$ac_save_LIBS"
11647
11648 fi
11649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11650   echo "$ac_t""yes" 1>&6
11651   cat >> confdefs.h <<\EOF
11652 #define HAVE_STRFTIME 1
11653 EOF
11654
11655 LIBS="-lintl $LIBS"
11656 else
11657   echo "$ac_t""no" 1>&6
11658 fi
11659
11660 fi
11661
11662
11663 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11664 echo "configure:11665: checking for vprintf" >&5
11665 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
11666   echo $ac_n "(cached) $ac_c" 1>&6
11667 else
11668   cat > conftest.$ac_ext <<EOF
11669 #line 11670 "configure"
11670 #include "confdefs.h"
11671 /* System header to define __stub macros and hopefully few prototypes,
11672     which can conflict with char vprintf(); below.  */
11673 #include <assert.h>
11674 /* Override any gcc2 internal prototype to avoid an error.  */
11675 /* We use char because int might match the return type of a gcc2
11676     builtin and then its argument prototype would still apply.  */
11677 char vprintf();
11678 char (*f)();
11679
11680 int main() {
11681
11682 /* The GNU C library defines this for functions which it implements
11683     to always fail with ENOSYS.  Some functions are actually named
11684     something starting with __ and the normal name is an alias.  */
11685 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11686 choke me
11687 #else
11688 f = vprintf;
11689 #endif
11690
11691 ; return 0; }
11692 EOF
11693 if { (eval echo configure:11694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11694   rm -rf conftest*
11695   eval "ac_cv_func_vprintf=yes"
11696 else
11697   echo "configure: failed program was:" >&5
11698   cat conftest.$ac_ext >&5
11699   rm -rf conftest*
11700   eval "ac_cv_func_vprintf=no"
11701 fi
11702 rm -f conftest*
11703 fi
11704
11705 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11706   echo "$ac_t""yes" 1>&6
11707   cat >> confdefs.h <<\EOF
11708 #define HAVE_VPRINTF 1
11709 EOF
11710
11711 else
11712   echo "$ac_t""no" 1>&6
11713 fi
11714
11715 if test "$ac_cv_func_vprintf" != yes; then
11716 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11717 echo "configure:11718: checking for _doprnt" >&5
11718 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
11719   echo $ac_n "(cached) $ac_c" 1>&6
11720 else
11721   cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724 /* System header to define __stub macros and hopefully few prototypes,
11725     which can conflict with char _doprnt(); below.  */
11726 #include <assert.h>
11727 /* Override any gcc2 internal prototype to avoid an error.  */
11728 /* We use char because int might match the return type of a gcc2
11729     builtin and then its argument prototype would still apply.  */
11730 char _doprnt();
11731 char (*f)();
11732
11733 int main() {
11734
11735 /* The GNU C library defines this for functions which it implements
11736     to always fail with ENOSYS.  Some functions are actually named
11737     something starting with __ and the normal name is an alias.  */
11738 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11739 choke me
11740 #else
11741 f = _doprnt;
11742 #endif
11743
11744 ; return 0; }
11745 EOF
11746 if { (eval echo configure:11747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11747   rm -rf conftest*
11748   eval "ac_cv_func__doprnt=yes"
11749 else
11750   echo "configure: failed program was:" >&5
11751   cat conftest.$ac_ext >&5
11752   rm -rf conftest*
11753   eval "ac_cv_func__doprnt=no"
11754 fi
11755 rm -f conftest*
11756 fi
11757
11758 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11759   echo "$ac_t""yes" 1>&6
11760   cat >> confdefs.h <<\EOF
11761 #define HAVE_DOPRNT 1
11762 EOF
11763
11764 else
11765   echo "$ac_t""no" 1>&6
11766 fi
11767
11768 fi
11769
11770
11771 if test $ac_cv_func_vprintf = yes ; then
11772                 for ac_func in vsnprintf vsprintf
11773 do
11774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11775 echo "configure:11776: checking for $ac_func" >&5
11776 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11777   echo $ac_n "(cached) $ac_c" 1>&6
11778 else
11779   cat > conftest.$ac_ext <<EOF
11780 #line 11781 "configure"
11781 #include "confdefs.h"
11782 /* System header to define __stub macros and hopefully few prototypes,
11783     which can conflict with char $ac_func(); below.  */
11784 #include <assert.h>
11785 /* Override any gcc2 internal prototype to avoid an error.  */
11786 /* We use char because int might match the return type of a gcc2
11787     builtin and then its argument prototype would still apply.  */
11788 char $ac_func();
11789 char (*f)();
11790
11791 int main() {
11792
11793 /* The GNU C library defines this for functions which it implements
11794     to always fail with ENOSYS.  Some functions are actually named
11795     something starting with __ and the normal name is an alias.  */
11796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11797 choke me
11798 #else
11799 f = $ac_func;
11800 #endif
11801
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11805   rm -rf conftest*
11806   eval "ac_cv_func_$ac_func=yes"
11807 else
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   eval "ac_cv_func_$ac_func=no"
11812 fi
11813 rm -f conftest*
11814 fi
11815
11816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11817   echo "$ac_t""yes" 1>&6
11818     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11819   cat >> confdefs.h <<EOF
11820 #define $ac_tr_func 1
11821 EOF
11822  
11823 else
11824   echo "$ac_t""no" 1>&6
11825 fi
11826 done
11827
11828 fi
11829
11830 for ac_func in \
11831         bcopy                   \
11832         closesocket             \
11833         endgrent                \
11834         endpwent                \
11835         flock                   \
11836         getdtablesize   \
11837         getgrgid                \
11838         gethostname             \
11839         getpass                 \
11840         getpwuid                \
11841         getpwnam                \
11842         getspnam                \
11843         gettimeofday    \
11844         initgroups              \
11845         lockf                   \
11846         memcpy                  \
11847         memmove                 \
11848         mkstemp                 \
11849         read                    \
11850         recv                    \
11851         recvfrom                \
11852         setpwfile               \
11853         setgid                  \
11854         setegid                 \
11855         setsid                  \
11856         setuid                  \
11857         seteuid                 \
11858         signal                  \
11859         sigset                  \
11860         snprintf                \
11861         strdup                  \
11862         strerror                \
11863         strpbrk                 \
11864         strrchr                 \
11865         strsep                  \
11866         strstr                  \
11867         strtol                  \
11868         strtoul                 \
11869         strspn                  \
11870         sysconf                 \
11871         waitpid                 \
11872         wait4                   \
11873         write                   \
11874         send                    \
11875         sendto                  \
11876
11877 do
11878 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11879 echo "configure:11880: checking for $ac_func" >&5
11880 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11881   echo $ac_n "(cached) $ac_c" 1>&6
11882 else
11883   cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886 /* System header to define __stub macros and hopefully few prototypes,
11887     which can conflict with char $ac_func(); below.  */
11888 #include <assert.h>
11889 /* Override any gcc2 internal prototype to avoid an error.  */
11890 /* We use char because int might match the return type of a gcc2
11891     builtin and then its argument prototype would still apply.  */
11892 char $ac_func();
11893 char (*f)();
11894
11895 int main() {
11896
11897 /* The GNU C library defines this for functions which it implements
11898     to always fail with ENOSYS.  Some functions are actually named
11899     something starting with __ and the normal name is an alias.  */
11900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11901 choke me
11902 #else
11903 f = $ac_func;
11904 #endif
11905
11906 ; return 0; }
11907 EOF
11908 if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11909   rm -rf conftest*
11910   eval "ac_cv_func_$ac_func=yes"
11911 else
11912   echo "configure: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   rm -rf conftest*
11915   eval "ac_cv_func_$ac_func=no"
11916 fi
11917 rm -f conftest*
11918 fi
11919
11920 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11921   echo "$ac_t""yes" 1>&6
11922     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11923   cat >> confdefs.h <<EOF
11924 #define $ac_tr_func 1
11925 EOF
11926  
11927 else
11928   echo "$ac_t""no" 1>&6
11929 fi
11930 done
11931
11932
11933 for ac_func in getopt tempnam
11934 do
11935 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11936 echo "configure:11937: checking for $ac_func" >&5
11937 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11938   echo $ac_n "(cached) $ac_c" 1>&6
11939 else
11940   cat > conftest.$ac_ext <<EOF
11941 #line 11942 "configure"
11942 #include "confdefs.h"
11943 /* System header to define __stub macros and hopefully few prototypes,
11944     which can conflict with char $ac_func(); below.  */
11945 #include <assert.h>
11946 /* Override any gcc2 internal prototype to avoid an error.  */
11947 /* We use char because int might match the return type of a gcc2
11948     builtin and then its argument prototype would still apply.  */
11949 char $ac_func();
11950 char (*f)();
11951
11952 int main() {
11953
11954 /* The GNU C library defines this for functions which it implements
11955     to always fail with ENOSYS.  Some functions are actually named
11956     something starting with __ and the normal name is an alias.  */
11957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11958 choke me
11959 #else
11960 f = $ac_func;
11961 #endif
11962
11963 ; return 0; }
11964 EOF
11965 if { (eval echo configure:11966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11966   rm -rf conftest*
11967   eval "ac_cv_func_$ac_func=yes"
11968 else
11969   echo "configure: failed program was:" >&5
11970   cat conftest.$ac_ext >&5
11971   rm -rf conftest*
11972   eval "ac_cv_func_$ac_func=no"
11973 fi
11974 rm -f conftest*
11975 fi
11976
11977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11978   echo "$ac_t""yes" 1>&6
11979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11980   cat >> confdefs.h <<EOF
11981 #define $ac_tr_func 1
11982 EOF
11983  
11984 else
11985   echo "$ac_t""no" 1>&6
11986 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11987 fi
11988 done
11989
11990
11991
11992 # Check Configuration
11993 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11994 echo "configure:11995: checking declaration of sys_errlist" >&5
11995 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
11996   echo $ac_n "(cached) $ac_c" 1>&6
11997 else
11998   
11999         cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002
12003 #include <stdio.h>
12004 #include <sys/types.h>
12005 #include <errno.h> 
12006 int main() {
12007 char *c = (char *) *sys_errlist
12008 ; return 0; }
12009 EOF
12010 if { (eval echo configure:12011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12011   rm -rf conftest*
12012   ol_cv_dcl_sys_errlist=yes
12013         ol_cv_have_sys_errlist=yes
12014 else
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   ol_cv_dcl_sys_errlist=no
12019 fi
12020 rm -f conftest*
12021 fi
12022
12023 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12024 #
12025 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12026 if test $ol_cv_dcl_sys_errlist = no ; then
12027         cat >> confdefs.h <<\EOF
12028 #define DECL_SYS_ERRLIST 1
12029 EOF
12030
12031
12032         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12033 echo "configure:12034: checking existence of sys_errlist" >&5
12034 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12035   echo $ac_n "(cached) $ac_c" 1>&6
12036 else
12037   
12038                 cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 #include <errno.h>
12042 int main() {
12043 char *c = (char *) *sys_errlist
12044 ; return 0; }
12045 EOF
12046 if { (eval echo configure:12047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12047   rm -rf conftest*
12048   ol_cv_have_sys_errlist=yes
12049 else
12050   echo "configure: failed program was:" >&5
12051   cat conftest.$ac_ext >&5
12052   rm -rf conftest*
12053   ol_cv_have_sys_errlist=no
12054 fi
12055 rm -f conftest*
12056 fi
12057
12058 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12059 fi
12060 if test $ol_cv_have_sys_errlist = yes ; then
12061         cat >> confdefs.h <<\EOF
12062 #define HAVE_SYS_ERRLIST 1
12063 EOF
12064
12065 fi
12066
12067
12068
12069 if test "$ol_enable_debug" != no ; then
12070         cat >> confdefs.h <<\EOF
12071 #define LDAP_DEBUG 1
12072 EOF
12073
12074 fi
12075 if test "$ol_enable_syslog" = yes ; then
12076         cat >> confdefs.h <<\EOF
12077 #define LDAP_SYSLOG 1
12078 EOF
12079
12080 fi
12081 if test "$ol_enable_libui" = yes ; then
12082         cat >> confdefs.h <<\EOF
12083 #define LDAP_LIBUI 1
12084 EOF
12085
12086 fi
12087 if test "$ol_enable_cache" = no ; then
12088         cat >> confdefs.h <<\EOF
12089 #define LDAP_NOCACHE 1
12090 EOF
12091
12092 fi
12093 if test "$ol_enable_dns" != no ; then
12094         cat >> confdefs.h <<\EOF
12095 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12096 EOF
12097
12098 fi
12099 if test "$ol_enable_proctitle" != no ; then
12100         cat >> confdefs.h <<\EOF
12101 #define LDAP_PROCTITLE 1
12102 EOF
12103
12104 fi
12105 if test "$ol_enable_referrals" != no ; then
12106         cat >> confdefs.h <<\EOF
12107 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12108 EOF
12109
12110 fi
12111 if test "$ol_enable_cldap" != no ; then
12112         cat >> confdefs.h <<\EOF
12113 #define LDAP_CONNECTIONLESS 1
12114 EOF
12115
12116 fi
12117
12118 if test "$ol_enable_crypt" != no ; then
12119         cat >> confdefs.h <<\EOF
12120 #define SLAPD_CRYPT 1
12121 EOF
12122
12123 fi
12124 if test "$ol_enable_cleartext" != no ; then
12125         cat >> confdefs.h <<\EOF
12126 #define SLAPD_CLEARTEXT 1
12127 EOF
12128
12129 fi
12130 if test "$ol_enable_phonetic" != no ; then
12131         cat >> confdefs.h <<\EOF
12132 #define SLAPD_PHONETIC 1
12133 EOF
12134
12135 fi
12136 if test "$ol_enable_rlookups" != no ; then
12137         cat >> confdefs.h <<\EOF
12138 #define SLAPD_RLOOKUPS 1
12139 EOF
12140
12141 fi
12142
12143 if test "$ol_link_modules" != no ; then
12144         cat >> confdefs.h <<\EOF
12145 #define SLAPD_MODULES 1
12146 EOF
12147
12148         BUILD_SLAPD=yes
12149 fi
12150
12151 if test "$ol_link_bdb2" != no ; then
12152         cat >> confdefs.h <<\EOF
12153 #define SLAPD_BDB2 1
12154 EOF
12155
12156         BUILD_SLAPD=yes
12157         BUILD_BDB2=yes
12158         if test "$ol_with_bdb2_module" != static ; then
12159                 cat >> confdefs.h <<\EOF
12160 #define SLAPD_BDB2_DYNAMIC 1
12161 EOF
12162
12163                 BUILD_BDB2_DYNAMIC=yes
12164         fi
12165 fi
12166
12167 if test "$ol_enable_ldap" != no ; then
12168         cat >> confdefs.h <<\EOF
12169 #define SLAPD_LDAP 1
12170 EOF
12171
12172         BUILD_SLAPD=yes
12173         BUILD_LDAP=yes
12174         if test "$ol_with_ldap_module" != static ; then
12175                 cat >> confdefs.h <<\EOF
12176 #define SLAPD_LDAP_DYNAMIC 1
12177 EOF
12178
12179                 BUILD_LDAP_DYNAMIC=yes
12180         fi
12181 fi
12182
12183 if test "$ol_link_ldbm" != no ; then
12184         cat >> confdefs.h <<\EOF
12185 #define SLAPD_LDBM 1
12186 EOF
12187
12188         BUILD_SLAPD=yes
12189         BUILD_LDBM=yes
12190         if test "$ol_with_ldbm_module" != static ; then
12191                 cat >> confdefs.h <<\EOF
12192 #define SLAPD_LDBM_DYNAMIC 1
12193 EOF
12194
12195                 BUILD_LDBM_DYNAMIC=yes
12196         fi
12197 fi
12198
12199 if test "$ol_enable_passwd" != no ; then
12200         cat >> confdefs.h <<\EOF
12201 #define SLAPD_PASSWD 1
12202 EOF
12203
12204         BUILD_SLAPD=yes
12205         BUILD_PASSWD=yes
12206         if test "$ol_with_passwd_module" != static ; then
12207                 cat >> confdefs.h <<\EOF
12208 #define SLAPD_PASSWD_DYNAMIC 1
12209 EOF
12210
12211                 BUILD_PASSWD_DYNAMIC=yes
12212         fi
12213 fi
12214
12215 if test "$ol_link_perl" != no ; then
12216         cat >> confdefs.h <<\EOF
12217 #define SLAPD_PERL 1
12218 EOF
12219
12220         BUILD_SLAPD=yes
12221         BUILD_PERL=yes
12222         if test "$ol_with_perl_module" != static ; then
12223                 cat >> confdefs.h <<\EOF
12224 #define SLAPD_PERL_DYNAMIC 1
12225 EOF
12226
12227                 BUILD_PERL_DYNAMIC=yes
12228         fi
12229 fi
12230
12231 if test "$ol_enable_shell" != no ; then
12232         cat >> confdefs.h <<\EOF
12233 #define SLAPD_SHELL 1
12234 EOF
12235
12236         BUILD_SLAPD=yes
12237         BUILD_SHELL=yes
12238         if test "$ol_with_shell_module" != static ; then
12239                 cat >> confdefs.h <<\EOF
12240 #define SLAPD_SHELL_DYNAMIC 1
12241 EOF
12242
12243                 BUILD_SHELL_DYNAMIC=yes
12244         fi
12245 fi
12246
12247 if test "$ol_enable_tcl" != no ; then
12248         cat >> confdefs.h <<\EOF
12249 #define SLAPD_TCL 1
12250 EOF
12251
12252         BUILD_SLAPD=yes
12253         BUILD_TCL=yes
12254         if test "$ol_with_tcl_module" != static; then
12255                 cat >> confdefs.h <<\EOF
12256 #define SLAPD_TCL_DYNAMIC 1
12257 EOF
12258
12259                 BUILD_TCL_DYNAMIC=yes
12260         fi
12261 fi
12262
12263 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12264         $BUILD_SLAPD = yes ; then
12265         BUILD_SLURPD=yes
12266 fi
12267
12268
12269
12270   
12271   
12272   
12273   
12274   
12275   
12276   
12277   
12278   
12279   
12280   
12281   
12282   
12283   
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305 trap '' 1 2 15
12306
12307 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12308
12309 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12310 # Let make expand exec_prefix.
12311 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12312
12313 # Any assignment to VPATH causes Sun make to only execute
12314 # the first set of double-colon rules, so remove it if not needed.
12315 # If there is a colon in the path, we need to keep it.
12316 if test "x$srcdir" = x.; then
12317   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12318 fi
12319
12320 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12321
12322 DEFS=-DHAVE_CONFIG_H
12323
12324 # Without the "./", some shells look in PATH for config.status.
12325 : ${CONFIG_STATUS=./config.status}
12326
12327 echo creating $CONFIG_STATUS
12328 rm -f $CONFIG_STATUS
12329 cat > $CONFIG_STATUS <<EOF
12330 #! /bin/sh
12331 # Generated automatically by configure.
12332 # Run this file to recreate the current configuration.
12333 # This directory was configured as follows,
12334 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12335 #
12336 # $0 $ac_configure_args
12337 #
12338 # Compiler output produced by configure, useful for debugging
12339 # configure, is in ./config.log if it exists.
12340
12341 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12342 for ac_option
12343 do
12344   case "\$ac_option" in
12345   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12346     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12347     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12348   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12349     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12350     exit 0 ;;
12351   -help | --help | --hel | --he | --h)
12352     echo "\$ac_cs_usage"; exit 0 ;;
12353   *) echo "\$ac_cs_usage"; exit 1 ;;
12354   esac
12355 done
12356
12357 ac_given_srcdir=$srcdir
12358 ac_given_INSTALL="$INSTALL"
12359
12360 trap 'rm -fr `echo "\
12361 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12362 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12363 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12364 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12365 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12366 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12367 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12368 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12369 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12370 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12371 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12372 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12373 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12374 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12375 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12376 include/Makefile:build/top.mk:include/Makefile.in \
12377 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12378 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12379 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12380 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12381 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12382 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12383 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12384 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12385 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12386 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12387 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12388 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12389 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12390 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12391 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12392 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12393 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12394 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12395 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12396 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12397 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12398 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12399 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12400 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12401 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12402  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12403 EOF
12404 cat >> $CONFIG_STATUS <<EOF
12405
12406 # Protect against being on the right side of a sed subst in config.status.
12407 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12408  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12409 $ac_vpsub
12410 $extrasub
12411 s%@SHELL@%$SHELL%g
12412 s%@CFLAGS@%$CFLAGS%g
12413 s%@CPPFLAGS@%$CPPFLAGS%g
12414 s%@CXXFLAGS@%$CXXFLAGS%g
12415 s%@FFLAGS@%$FFLAGS%g
12416 s%@DEFS@%$DEFS%g
12417 s%@LDFLAGS@%$LDFLAGS%g
12418 s%@LIBS@%$LIBS%g
12419 s%@exec_prefix@%$exec_prefix%g
12420 s%@prefix@%$prefix%g
12421 s%@program_transform_name@%$program_transform_name%g
12422 s%@bindir@%$bindir%g
12423 s%@sbindir@%$sbindir%g
12424 s%@libexecdir@%$libexecdir%g
12425 s%@datadir@%$datadir%g
12426 s%@sysconfdir@%$sysconfdir%g
12427 s%@sharedstatedir@%$sharedstatedir%g
12428 s%@localstatedir@%$localstatedir%g
12429 s%@libdir@%$libdir%g
12430 s%@includedir@%$includedir%g
12431 s%@oldincludedir@%$oldincludedir%g
12432 s%@infodir@%$infodir%g
12433 s%@mandir@%$mandir%g
12434 s%@host@%$host%g
12435 s%@host_alias@%$host_alias%g
12436 s%@host_cpu@%$host_cpu%g
12437 s%@host_vendor@%$host_vendor%g
12438 s%@host_os@%$host_os%g
12439 s%@target@%$target%g
12440 s%@target_alias@%$target_alias%g
12441 s%@target_cpu@%$target_cpu%g
12442 s%@target_vendor@%$target_vendor%g
12443 s%@target_os@%$target_os%g
12444 s%@build@%$build%g
12445 s%@build_alias@%$build_alias%g
12446 s%@build_cpu@%$build_cpu%g
12447 s%@build_vendor@%$build_vendor%g
12448 s%@build_os@%$build_os%g
12449 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12450 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12451 s%@INSTALL_DATA@%$INSTALL_DATA%g
12452 s%@PACKAGE@%$PACKAGE%g
12453 s%@VERSION@%$VERSION%g
12454 s%@ACLOCAL@%$ACLOCAL%g
12455 s%@AUTOCONF@%$AUTOCONF%g
12456 s%@AUTOMAKE@%$AUTOMAKE%g
12457 s%@AUTOHEADER@%$AUTOHEADER%g
12458 s%@MAKEINFO@%$MAKEINFO%g
12459 s%@install_sh@%$install_sh%g
12460 s%@AMTAR@%$AMTAR%g
12461 s%@AWK@%$AWK%g
12462 s%@AMTARFLAGS@%$AMTARFLAGS%g
12463 s%@SET_MAKE@%$SET_MAKE%g
12464 s%@top_builddir@%$top_builddir%g
12465 s%@ldap_subdir@%$ldap_subdir%g
12466 s%@CC@%$CC%g
12467 s%@RANLIB@%$RANLIB%g
12468 s%@LD@%$LD%g
12469 s%@NM@%$NM%g
12470 s%@LN_S@%$LN_S%g
12471 s%@LIBTOOL@%$LIBTOOL%g
12472 s%@LN_H@%$LN_H%g
12473 s%@SENDMAIL@%$SENDMAIL%g
12474 s%@EDITOR@%$EDITOR%g
12475 s%@FINGER@%$FINGER%g
12476 s%@PERLBIN@%$PERLBIN%g
12477 s%@CPP@%$CPP%g
12478 s%@EXEEXT@%$EXEEXT%g
12479 s%@OBJEXT@%$OBJEXT%g
12480 s%@OL_MKDEP@%$OL_MKDEP%g
12481 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12482 s%@GLIBCONFIG@%$GLIBCONFIG%g
12483 s%@LIBOBJS@%$LIBOBJS%g
12484 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12485 s%@BUILD_BDB2@%$BUILD_BDB2%g
12486 s%@BUILD_LDAP@%$BUILD_LDAP%g
12487 s%@BUILD_LDBM@%$BUILD_LDBM%g
12488 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12489 s%@BUILD_PERL@%$BUILD_PERL%g
12490 s%@BUILD_SHELL@%$BUILD_SHELL%g
12491 s%@BUILD_TCL@%$BUILD_TCL%g
12492 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12493 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12494 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12495 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12496 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12497 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12498 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12499 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12500 s%@LDAP_LIBS@%$LDAP_LIBS%g
12501 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12502 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12503 s%@LDBM_LIBS@%$LDBM_LIBS%g
12504 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12505 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12506 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12507 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12508 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12509 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12510 s%@KRB_LIBS@%$KRB_LIBS%g
12511 s%@READLINE_LIBS@%$READLINE_LIBS%g
12512 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12513 s%@TLS_LIBS@%$TLS_LIBS%g
12514
12515 CEOF
12516 EOF
12517
12518 cat >> $CONFIG_STATUS <<\EOF
12519
12520 # Split the substitutions into bite-sized pieces for seds with
12521 # small command number limits, like on Digital OSF/1 and HP-UX.
12522 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12523 ac_file=1 # Number of current file.
12524 ac_beg=1 # First line for current file.
12525 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12526 ac_more_lines=:
12527 ac_sed_cmds=""
12528 while $ac_more_lines; do
12529   if test $ac_beg -gt 1; then
12530     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12531   else
12532     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12533   fi
12534   if test ! -s conftest.s$ac_file; then
12535     ac_more_lines=false
12536     rm -f conftest.s$ac_file
12537   else
12538     if test -z "$ac_sed_cmds"; then
12539       ac_sed_cmds="sed -f conftest.s$ac_file"
12540     else
12541       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12542     fi
12543     ac_file=`expr $ac_file + 1`
12544     ac_beg=$ac_end
12545     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12546   fi
12547 done
12548 if test -z "$ac_sed_cmds"; then
12549   ac_sed_cmds=cat
12550 fi
12551 EOF
12552
12553 cat >> $CONFIG_STATUS <<EOF
12554
12555 CONFIG_FILES=\${CONFIG_FILES-"\
12556 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12557 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12558 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12559 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12560 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12561 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12562 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12563 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12564 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12565 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12566 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12567 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12568 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12569 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12570 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12571 include/Makefile:build/top.mk:include/Makefile.in \
12572 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12573 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12574 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12575 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12576 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12577 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12578 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12579 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12580 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12581 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12582 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12583 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12584 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12585 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12586 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12587 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12588 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12589 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12590 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12591 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12592 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12593 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12594 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12595 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12596 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12597 "}
12598 EOF
12599 cat >> $CONFIG_STATUS <<\EOF
12600 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12601   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12602   case "$ac_file" in
12603   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12604        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12605   *) ac_file_in="${ac_file}.in" ;;
12606   esac
12607
12608   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12609
12610   # Remove last slash and all that follows it.  Not all systems have dirname.
12611   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12612   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12613     # The file is in a subdirectory.
12614     test ! -d "$ac_dir" && mkdir "$ac_dir"
12615     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12616     # A "../" for each directory in $ac_dir_suffix.
12617     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12618   else
12619     ac_dir_suffix= ac_dots=
12620   fi
12621
12622   case "$ac_given_srcdir" in
12623   .)  srcdir=.
12624       if test -z "$ac_dots"; then top_srcdir=.
12625       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12626   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12627   *) # Relative path.
12628     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12629     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12630   esac
12631
12632   case "$ac_given_INSTALL" in
12633   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12634   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12635   esac
12636
12637   echo creating "$ac_file"
12638   rm -f "$ac_file"
12639   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12640   case "$ac_file" in
12641   *Makefile*) ac_comsub="1i\\
12642 # $configure_input" ;;
12643   *) ac_comsub= ;;
12644   esac
12645
12646   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12647   sed -e "$ac_comsub
12648 s%@configure_input@%$configure_input%g
12649 s%@srcdir@%$srcdir%g
12650 s%@top_srcdir@%$top_srcdir%g
12651 s%@INSTALL@%$INSTALL%g
12652 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12653 fi; done
12654 rm -f conftest.s*
12655
12656 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12657 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12658 #
12659 # ac_d sets the value in "#define NAME VALUE" lines.
12660 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12661 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12662 ac_dC='\3'
12663 ac_dD='%g'
12664 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12665 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12666 ac_uB='\([      ]\)%\1#\2define\3'
12667 ac_uC=' '
12668 ac_uD='\4%g'
12669 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12670 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12671 ac_eB='$%\1#\2define\3'
12672 ac_eC=' '
12673 ac_eD='%g'
12674
12675 if test "${CONFIG_HEADERS+set}" != set; then
12676 EOF
12677 cat >> $CONFIG_STATUS <<EOF
12678   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12679 EOF
12680 cat >> $CONFIG_STATUS <<\EOF
12681 fi
12682 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12683   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12684   case "$ac_file" in
12685   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12686        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12687   *) ac_file_in="${ac_file}.in" ;;
12688   esac
12689
12690   echo creating $ac_file
12691
12692   rm -f conftest.frag conftest.in conftest.out
12693   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12694   cat $ac_file_inputs > conftest.in
12695
12696 EOF
12697
12698 # Transform confdefs.h into a sed script conftest.vals that substitutes
12699 # the proper values into config.h.in to produce config.h.  And first:
12700 # Protect against being on the right side of a sed subst in config.status.
12701 # Protect against being in an unquoted here document in config.status.
12702 rm -f conftest.vals
12703 cat > conftest.hdr <<\EOF
12704 s/[\\&%]/\\&/g
12705 s%[\\$`]%\\&%g
12706 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12707 s%ac_d%ac_u%gp
12708 s%ac_u%ac_e%gp
12709 EOF
12710 sed -n -f conftest.hdr confdefs.h > conftest.vals
12711 rm -f conftest.hdr
12712
12713 # This sed command replaces #undef with comments.  This is necessary, for
12714 # example, in the case of _POSIX_SOURCE, which is predefined and required
12715 # on some systems where configure will not decide to define it.
12716 cat >> conftest.vals <<\EOF
12717 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12718 EOF
12719
12720 # Break up conftest.vals because some shells have a limit on
12721 # the size of here documents, and old seds have small limits too.
12722
12723 rm -f conftest.tail
12724 while :
12725 do
12726   ac_lines=`grep -c . conftest.vals`
12727   # grep -c gives empty output for an empty file on some AIX systems.
12728   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12729   # Write a limited-size here document to conftest.frag.
12730   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12731   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12732   echo 'CEOF
12733   sed -f conftest.frag conftest.in > conftest.out
12734   rm -f conftest.in
12735   mv conftest.out conftest.in
12736 ' >> $CONFIG_STATUS
12737   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12738   rm -f conftest.vals
12739   mv conftest.tail conftest.vals
12740 done
12741 rm -f conftest.vals
12742
12743 cat >> $CONFIG_STATUS <<\EOF
12744   rm -f conftest.frag conftest.h
12745   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12746   cat conftest.in >> conftest.h
12747   rm -f conftest.in
12748   if cmp -s $ac_file conftest.h 2>/dev/null; then
12749     echo "$ac_file is unchanged"
12750     rm -f conftest.h
12751   else
12752     # Remove last slash and all that follows it.  Not all systems have dirname.
12753       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12754       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12755       # The file is in a subdirectory.
12756       test ! -d "$ac_dir" && mkdir "$ac_dir"
12757     fi
12758     rm -f $ac_file
12759     mv conftest.h $ac_file
12760   fi
12761 fi; done
12762
12763 EOF
12764 cat >> $CONFIG_STATUS <<EOF
12765
12766 EOF
12767 cat >> $CONFIG_STATUS <<\EOF
12768
12769 date > stamp-h
12770 echo Please \"make depend\" to build dependencies
12771
12772 exit 0
12773 EOF
12774 chmod +x $CONFIG_STATUS
12775 rm -fr confdefs* $ac_clean_files
12776 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
12777