]> git.sur5r.net Git - openldap/blob - configure
b3c310aecc0544f1bf971ea871f654b278518d54
[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-cyrus-sasl  with Cyrus SASL support (auto)"
37 ac_help="$ac_help
38   --with-fetch  with fetch URL support (auto)"
39 ac_help="$ac_help
40   --with-kerberos       with Kerberos support (auto)"
41 ac_help="$ac_help
42   --with-readline  with readline support (auto)"
43 ac_help="$ac_help
44   --with-threads        use threads (auto)"
45 ac_help="$ac_help
46   --with-tls  with TLS/SSL support (auto)"
47 ac_help="$ac_help
48   --with-yielding-select        with implicitly yielding select (auto)"
49 ac_help="$ac_help
50 LDAPD Options:"
51 ac_help="$ac_help
52   --enable-ldapd        enable building ldapd (no)"
53 ac_help="$ac_help
54 SLAPD Options:"
55 ac_help="$ac_help
56   --enable-slapd        enable building slapd (yes)"
57 ac_help="$ac_help
58     --enable-cleartext  enable cleartext passwords (yes)"
59 ac_help="$ac_help
60     --enable-crypt      enable crypt(3) passwords (auto)"
61 ac_help="$ac_help
62     --enable-modules    enable dynamic module support (no)"
63 ac_help="$ac_help
64     --enable-multimaster        enable multimaster replication (no)"
65 ac_help="$ac_help
66     --enable-phonetic   enable phonetic/soundex (no)"
67 ac_help="$ac_help
68     --enable-quipu      build quipu migration tools (no)"
69 ac_help="$ac_help
70     --enable-rlookups   enable reverse lookups (auto)"
71 ac_help="$ac_help
72     --enable-wrappers   enable tcp wrapper support (no)"
73 ac_help="$ac_help
74     --enable-bdb2       enable bdb2 backend (no)"
75 ac_help="$ac_help
76       --with-bdb2-module        module type (static)"
77 ac_help="$ac_help
78     --enable-ldap       enable ldap backend (no)"
79 ac_help="$ac_help
80       --with-ldap-module        module type (static)"
81 ac_help="$ac_help
82     --enable-ldbm       enable ldbm backend (yes)"
83 ac_help="$ac_help
84       --with-ldbm-module        module type (static)"
85 ac_help="$ac_help
86       --with-ldbm-api   use LDBM API (auto)"
87 ac_help="$ac_help
88       --with-ldbm-type  use LDBM type (auto)"
89 ac_help="$ac_help
90     --enable-passwd     enable passwd backend (no)"
91 ac_help="$ac_help
92       --with-passwd-module      module type (static)"
93 ac_help="$ac_help
94     --enable-perl       enable perl backend (no)"
95 ac_help="$ac_help
96       --with-perl-module        module type (static)"
97 ac_help="$ac_help
98     --enable-shell      enable shell backend (no)"
99 ac_help="$ac_help
100       --with-shell-module       module type (static)"
101 ac_help="$ac_help
102     --enable-tcl        enable tcl backend (no)"
103 ac_help="$ac_help
104       --with-tcl-module module type (static)"
105 ac_help="$ac_help
106 SLURPD Options:"
107 ac_help="$ac_help
108   --enable-slurpd       enable building slurpd (auto)"
109 ac_help="$ac_help
110 Library Generation & Linking Options"
111 ac_help="$ac_help
112   --enable-static[=PKGS]  build static libraries [default=yes]"
113 ac_help="$ac_help
114   --enable-shared[=PKGS]  build shared libraries [default=yes]"
115 ac_help="$ac_help
116   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
117 ac_help="$ac_help
118   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
119 ac_help="$ac_help
120   --disable-libtool-lock  avoid locking (might break parallel builds)"
121
122 # Initialize some variables set by options.
123 # The variables have the same names as the options, with
124 # dashes changed to underlines.
125 build=NONE
126 cache_file=./config.cache
127 exec_prefix=NONE
128 host=NONE
129 no_create=
130 nonopt=NONE
131 no_recursion=
132 prefix=NONE
133 program_prefix=NONE
134 program_suffix=NONE
135 program_transform_name=s,x,x,
136 silent=
137 site=
138 srcdir=
139 target=NONE
140 verbose=
141 x_includes=NONE
142 x_libraries=NONE
143 bindir='${exec_prefix}/bin'
144 sbindir='${exec_prefix}/sbin'
145 libexecdir='${exec_prefix}/libexec'
146 datadir='${prefix}/share'
147 sysconfdir='${prefix}/etc'
148 sharedstatedir='${prefix}/com'
149 localstatedir='${prefix}/var'
150 libdir='${exec_prefix}/lib'
151 includedir='${prefix}/include'
152 oldincludedir='/usr/include'
153 infodir='${prefix}/info'
154 mandir='${prefix}/man'
155
156 # Initialize some other variables.
157 subdirs=
158 MFLAGS= MAKEFLAGS=
159 SHELL=${CONFIG_SHELL-/bin/sh}
160 # Maximum number of lines to put in a shell here document.
161 ac_max_here_lines=12
162
163 ac_prev=
164 for ac_option
165 do
166
167   # If the previous option needs an argument, assign it.
168   if test -n "$ac_prev"; then
169     eval "$ac_prev=\$ac_option"
170     ac_prev=
171     continue
172   fi
173
174   case "$ac_option" in
175   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
176   *) ac_optarg= ;;
177   esac
178
179   # Accept the important Cygnus configure options, so we can diagnose typos.
180
181   case "$ac_option" in
182
183   -bindir | --bindir | --bindi | --bind | --bin | --bi)
184     ac_prev=bindir ;;
185   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
186     bindir="$ac_optarg" ;;
187
188   -build | --build | --buil | --bui | --bu)
189     ac_prev=build ;;
190   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
191     build="$ac_optarg" ;;
192
193   -cache-file | --cache-file | --cache-fil | --cache-fi \
194   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
195     ac_prev=cache_file ;;
196   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
197   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
198     cache_file="$ac_optarg" ;;
199
200   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
201     ac_prev=datadir ;;
202   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
203   | --da=*)
204     datadir="$ac_optarg" ;;
205
206   -disable-* | --disable-*)
207     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
208     # Reject names that are not valid shell variable names.
209     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
210       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
211     fi
212     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213     eval "enable_${ac_feature}=no" ;;
214
215   -enable-* | --enable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     case "$ac_option" in
223       *=*) ;;
224       *) ac_optarg=yes ;;
225     esac
226     eval "enable_${ac_feature}='$ac_optarg'" ;;
227
228   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
229   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
230   | --exec | --exe | --ex)
231     ac_prev=exec_prefix ;;
232   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
233   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
234   | --exec=* | --exe=* | --ex=*)
235     exec_prefix="$ac_optarg" ;;
236
237   -gas | --gas | --ga | --g)
238     # Obsolete; use --with-gas.
239     with_gas=yes ;;
240
241   -help | --help | --hel | --he)
242     # Omit some internal or obsolete options to make the list less imposing.
243     # This message is too long to be a string in the A/UX 3.1 sh.
244     cat << EOF
245 Usage: configure [options] [host]
246 Options: [defaults in brackets after descriptions]
247 Configuration:
248   --cache-file=FILE       cache test results in FILE
249   --help                  print this message
250   --no-create             do not create output files
251   --quiet, --silent       do not print \`checking...' messages
252   --version               print the version of autoconf that created configure
253 Directory and file names:
254   --prefix=PREFIX         install architecture-independent files in PREFIX
255                           [$ac_default_prefix]
256   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
257                           [same as prefix]
258   --bindir=DIR            user executables in DIR [EPREFIX/bin]
259   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
260   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
261   --datadir=DIR           read-only architecture-independent data in DIR
262                           [PREFIX/share]
263   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
264   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
265                           [PREFIX/com]
266   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
267   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
268   --includedir=DIR        C header files in DIR [PREFIX/include]
269   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
270   --infodir=DIR           info documentation in DIR [PREFIX/info]
271   --mandir=DIR            man documentation in DIR [PREFIX/man]
272   --srcdir=DIR            find the sources in DIR [configure dir or ..]
273   --program-prefix=PREFIX prepend PREFIX to installed program names
274   --program-suffix=SUFFIX append SUFFIX to installed program names
275   --program-transform-name=PROGRAM
276                           run sed PROGRAM on installed program names
277 EOF
278     cat << EOF
279 Host type:
280   --build=BUILD           configure for building on BUILD [BUILD=HOST]
281   --host=HOST             configure for HOST [guessed]
282   --target=TARGET         configure for TARGET [TARGET=HOST]
283 Features and packages:
284   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
285   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
286   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
287   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
288   --x-includes=DIR        X include files are in DIR
289   --x-libraries=DIR       X library files are in DIR
290 EOF
291     if test -n "$ac_help"; then
292       echo "--enable and --with options recognized:$ac_help"
293     fi
294     exit 0 ;;
295
296   -host | --host | --hos | --ho)
297     ac_prev=host ;;
298   -host=* | --host=* | --hos=* | --ho=*)
299     host="$ac_optarg" ;;
300
301   -includedir | --includedir | --includedi | --included | --include \
302   | --includ | --inclu | --incl | --inc)
303     ac_prev=includedir ;;
304   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
305   | --includ=* | --inclu=* | --incl=* | --inc=*)
306     includedir="$ac_optarg" ;;
307
308   -infodir | --infodir | --infodi | --infod | --info | --inf)
309     ac_prev=infodir ;;
310   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
311     infodir="$ac_optarg" ;;
312
313   -libdir | --libdir | --libdi | --libd)
314     ac_prev=libdir ;;
315   -libdir=* | --libdir=* | --libdi=* | --libd=*)
316     libdir="$ac_optarg" ;;
317
318   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
319   | --libexe | --libex | --libe)
320     ac_prev=libexecdir ;;
321   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
322   | --libexe=* | --libex=* | --libe=*)
323     libexecdir="$ac_optarg" ;;
324
325   -localstatedir | --localstatedir | --localstatedi | --localstated \
326   | --localstate | --localstat | --localsta | --localst \
327   | --locals | --local | --loca | --loc | --lo)
328     ac_prev=localstatedir ;;
329   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
330   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
331   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
332     localstatedir="$ac_optarg" ;;
333
334   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335     ac_prev=mandir ;;
336   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337     mandir="$ac_optarg" ;;
338
339   -nfp | --nfp | --nf)
340     # Obsolete; use --without-fp.
341     with_fp=no ;;
342
343   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344   | --no-cr | --no-c)
345     no_create=yes ;;
346
347   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
348   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349     no_recursion=yes ;;
350
351   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
352   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
353   | --oldin | --oldi | --old | --ol | --o)
354     ac_prev=oldincludedir ;;
355   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
356   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
357   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
358     oldincludedir="$ac_optarg" ;;
359
360   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361     ac_prev=prefix ;;
362   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363     prefix="$ac_optarg" ;;
364
365   -program-prefix | --program-prefix | --program-prefi | --program-pref \
366   | --program-pre | --program-pr | --program-p)
367     ac_prev=program_prefix ;;
368   -program-prefix=* | --program-prefix=* | --program-prefi=* \
369   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
370     program_prefix="$ac_optarg" ;;
371
372   -program-suffix | --program-suffix | --program-suffi | --program-suff \
373   | --program-suf | --program-su | --program-s)
374     ac_prev=program_suffix ;;
375   -program-suffix=* | --program-suffix=* | --program-suffi=* \
376   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
377     program_suffix="$ac_optarg" ;;
378
379   -program-transform-name | --program-transform-name \
380   | --program-transform-nam | --program-transform-na \
381   | --program-transform-n | --program-transform- \
382   | --program-transform | --program-transfor \
383   | --program-transfo | --program-transf \
384   | --program-trans | --program-tran \
385   | --progr-tra | --program-tr | --program-t)
386     ac_prev=program_transform_name ;;
387   -program-transform-name=* | --program-transform-name=* \
388   | --program-transform-nam=* | --program-transform-na=* \
389   | --program-transform-n=* | --program-transform-=* \
390   | --program-transform=* | --program-transfor=* \
391   | --program-transfo=* | --program-transf=* \
392   | --program-trans=* | --program-tran=* \
393   | --progr-tra=* | --program-tr=* | --program-t=*)
394     program_transform_name="$ac_optarg" ;;
395
396   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
397   | -silent | --silent | --silen | --sile | --sil)
398     silent=yes ;;
399
400   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401     ac_prev=sbindir ;;
402   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403   | --sbi=* | --sb=*)
404     sbindir="$ac_optarg" ;;
405
406   -sharedstatedir | --sharedstatedir | --sharedstatedi \
407   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
408   | --sharedst | --shareds | --shared | --share | --shar \
409   | --sha | --sh)
410     ac_prev=sharedstatedir ;;
411   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
412   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
413   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414   | --sha=* | --sh=*)
415     sharedstatedir="$ac_optarg" ;;
416
417   -site | --site | --sit)
418     ac_prev=site ;;
419   -site=* | --site=* | --sit=*)
420     site="$ac_optarg" ;;
421
422   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423     ac_prev=srcdir ;;
424   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425     srcdir="$ac_optarg" ;;
426
427   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
428   | --syscon | --sysco | --sysc | --sys | --sy)
429     ac_prev=sysconfdir ;;
430   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
431   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
432     sysconfdir="$ac_optarg" ;;
433
434   -target | --target | --targe | --targ | --tar | --ta | --t)
435     ac_prev=target ;;
436   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
437     target="$ac_optarg" ;;
438
439   -v | -verbose | --verbose | --verbos | --verbo | --verb)
440     verbose=yes ;;
441
442   -version | --version | --versio | --versi | --vers)
443     echo "configure generated by autoconf version 2.13.1"
444     exit 0 ;;
445
446   -with-* | --with-*)
447     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
448     # Reject names that are not valid shell variable names.
449     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
450       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
451     fi
452     ac_package=`echo $ac_package| sed 's/-/_/g'`
453     case "$ac_option" in
454       *=*) ;;
455       *) ac_optarg=yes ;;
456     esac
457     eval "with_${ac_package}='$ac_optarg'" ;;
458
459   -without-* | --without-*)
460     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
461     # Reject names that are not valid shell variable names.
462     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
463       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464     fi
465     ac_package=`echo $ac_package| sed 's/-/_/g'`
466     eval "with_${ac_package}=no" ;;
467
468   --x)
469     # Obsolete; use --with-x.
470     with_x=yes ;;
471
472   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
473   | --x-incl | --x-inc | --x-in | --x-i)
474     ac_prev=x_includes ;;
475   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
476   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
477     x_includes="$ac_optarg" ;;
478
479   -x-libraries | --x-libraries | --x-librarie | --x-librari \
480   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
481     ac_prev=x_libraries ;;
482   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
483   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
484     x_libraries="$ac_optarg" ;;
485
486   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
487     ;;
488
489   *)
490     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
491       echo "configure: warning: $ac_option: invalid host type" 1>&2
492     fi
493     if test "x$nonopt" != xNONE; then
494       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
495     fi
496     nonopt="$ac_option"
497     ;;
498
499   esac
500 done
501
502 if test -n "$ac_prev"; then
503   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
504 fi
505
506 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
507
508 # File descriptor usage:
509 # 0 standard input
510 # 1 file creation
511 # 2 errors and warnings
512 # 3 some systems may open it to /dev/tty
513 # 4 used on the Kubota Titan
514 # 6 checking for... messages and results
515 # 5 compiler messages saved in config.log
516 if test "$silent" = yes; then
517   exec 6>/dev/null
518 else
519   exec 6>&1
520 fi
521 exec 5>./config.log
522
523 echo "\
524 This file contains any messages produced by compilers while
525 running configure, to aid debugging if configure makes a mistake.
526 " 1>&5
527
528 # Strip out --no-create and --no-recursion so they do not pile up.
529 # Also quote any args containing shell metacharacters.
530 ac_configure_args=
531 for ac_arg
532 do
533   case "$ac_arg" in
534   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
535   | --no-cr | --no-c) ;;
536   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
537   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
538   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
539   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
540   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
541   esac
542 done
543
544 # NLS nuisances.
545 # Only set these to C if already set.  These must not be set unconditionally
546 # because not all systems understand e.g. LANG=C (notably SCO).
547 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
548 # Non-C LC_CTYPE values break the ctype check.
549 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
550 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
551 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
552 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
553
554 # confdefs.h avoids OS command line length limits that DEFS can exceed.
555 rm -rf conftest* confdefs.h
556 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
557 echo > confdefs.h
558
559 # A filename unique to this package, relative to the directory that
560 # configure is in, which we can look for to find out if srcdir is correct.
561 ac_unique_file=build/version
562
563 # Find the source files, if location was not specified.
564 if test -z "$srcdir"; then
565   ac_srcdir_defaulted=yes
566   # Try the directory containing this script, then its parent.
567   ac_prog=$0
568   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
569   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
570   srcdir=$ac_confdir
571   if test ! -r $srcdir/$ac_unique_file; then
572     srcdir=..
573   fi
574 else
575   ac_srcdir_defaulted=no
576 fi
577 if test ! -r $srcdir/$ac_unique_file; then
578   if test "$ac_srcdir_defaulted" = yes; then
579     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
580   else
581     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
582   fi
583 fi
584 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
585
586 # Prefer explicitly selected file to automatically selected ones.
587 if test -z "$CONFIG_SITE"; then
588   if test "x$prefix" != xNONE; then
589     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
590   else
591     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
592   fi
593 fi
594 for ac_site_file in $CONFIG_SITE; do
595   if test -r "$ac_site_file"; then
596     echo "loading site script $ac_site_file"
597     . "$ac_site_file"
598   fi
599 done
600
601
602 ac_ext=c
603 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
604 ac_cpp='$CPP $CPPFLAGS'
605 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
606 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
607 cross_compiling=$ac_cv_prog_cc_cross
608
609 ac_exeext=
610 ac_objext=o
611 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
612   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
613   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614     ac_n= ac_c='
615 ' ac_t='        '
616   else
617     ac_n=-n ac_c= ac_t=
618   fi
619 else
620   ac_n= ac_c='\c' ac_t=
621 fi
622
623 ac_aux_dir=
624 for ac_dir in build $srcdir/build; do
625   if test -f $ac_dir/install-sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install-sh -c"
628     break
629   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
637 fi
638 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
639 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
640 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
641
642 OL_VERSION=`cat $ac_aux_dir/version`
643 if test -z "$OL_VERSION"; then
644         { echo "configure: error: could not determine version" 1>&2; exit 1; }
645 fi
646
647
648 echo $ac_n "checking host system type""... $ac_c" 1>&6
649 echo "configure:650: checking host system type" >&5
650 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
651
652 # Make sure we can run config.sub.
653   if $ac_config_sub sun4 >/dev/null 2>&1; then :
654     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
655   fi
656
657   ac_cv_host_alias=$host
658   case "$ac_cv_host_alias" in
659   NONE)
660     case $nonopt in
661     NONE)
662       if ac_cv_host_alias=`$ac_config_guess`; then :
663       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
664       fi ;;
665     *) ac_cv_host_alias=$nonopt ;;
666     esac ;;
667   esac
668
669   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
670   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
671   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
672   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
673 else
674   echo $ac_n "(cached) $ac_c" 1>&6
675 fi
676
677 echo "$ac_t""$ac_cv_host" 1>&6
678
679 host=$ac_cv_host
680 host_alias=$ac_cv_host_alias
681 host_cpu=$ac_cv_host_cpu
682 host_vendor=$ac_cv_host_vendor
683 host_os=$ac_cv_host_os
684
685
686
687
688
689 echo $ac_n "checking target system type""... $ac_c" 1>&6
690 echo "configure:691: checking target system type" >&5
691 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
692
693 # Make sure we can run config.sub.
694   if $ac_config_sub sun4 >/dev/null 2>&1; then :
695     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
696   fi
697
698   ac_cv_target_alias=$target
699   case "$ac_cv_target_alias" in
700   NONE)
701     case $nonopt in
702     NONE)
703       ac_cv_target_alias=$host_alias ;;
704
705     *) ac_cv_target_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
710   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_target" 1>&6
718
719 target=$ac_cv_target
720 target_alias=$ac_cv_target_alias
721 target_cpu=$ac_cv_target_cpu
722 target_vendor=$ac_cv_target_vendor
723 target_os=$ac_cv_target_os
724
725
726
727
728
729 echo $ac_n "checking build system type""... $ac_c" 1>&6
730 echo "configure:731: checking build system type" >&5
731 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_build_alias=$build
739   case "$ac_cv_build_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_build_alias=$host_alias ;;
744
745     *) ac_cv_build_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
750   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_build" 1>&6
758
759 build=$ac_cv_build
760 build_alias=$ac_cv_build_alias
761 build_cpu=$ac_cv_build_cpu
762 build_vendor=$ac_cv_build_vendor
763 build_os=$ac_cv_build_os
764
765
766
767
768
769 # Do some error checking and defaulting for the host and target type.
770 # The inputs are:
771 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
772 #
773 # The rules are:
774 # 1. You are not allowed to specify --host, --target, and nonopt at the
775 #    same time.
776 # 2. Host defaults to nonopt.
777 # 3. If nonopt is not specified, then host defaults to the current host,
778 #    as determined by config.guess.
779 # 4. Target and build default to nonopt.
780 # 5. If nonopt is not specified, then target and build default to host.
781
782 # The aliases save the names the user supplied, while $host etc.
783 # will get canonicalized.
784 case $host---$target---$nonopt in
785 NONE---*---* | *---NONE---* | *---*---NONE) ;;
786 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
787 esac
788
789 test "$host_alias" != "$target_alias" &&
790   test "$program_prefix$program_suffix$program_transform_name" = \
791     NONENONEs,x,x, &&
792   program_prefix=${target_alias}-
793
794
795 # Find a good install program.  We prefer a C program (faster),
796 # so one script is as good as another.  But avoid the broken or
797 # incompatible versions:
798 # SysV /etc/install, /usr/sbin/install
799 # SunOS /usr/etc/install
800 # IRIX /sbin/install
801 # AIX /bin/install
802 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
803 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
804 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
805 # ./install, which can be erroneously created by make from ./install.sh.
806 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
807 echo "configure:808: checking for a BSD compatible install" >&5
808 if test -z "$INSTALL"; then
809 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
813   for ac_dir in $PATH; do
814     # Account for people who put trailing slashes in PATH elements.
815     case "$ac_dir/" in
816     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
817     *)
818       # OSF1 and SCO ODT 3.0 have their own names for install.
819       # Don't use installbsd from OSF since it installs stuff as root
820       # by default.
821       for ac_prog in ginstall scoinst install; do
822         if test -f $ac_dir/$ac_prog; then
823           if test $ac_prog = install &&
824             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
825             # AIX install.  It has an incompatible calling convention.
826             :
827           elif test $ac_prog = install &&
828             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
829             # program-specific install script used by HP pwplus--don't use.
830             :
831           else
832             ac_cv_path_install="$ac_dir/$ac_prog -c"
833             break 2
834           fi
835         fi
836       done
837       ;;
838     esac
839   done
840   IFS="$ac_save_IFS"
841
842 fi
843   if test "${ac_cv_path_install+set}" = set; then
844     INSTALL="$ac_cv_path_install"
845   else
846     # As a last resort, use the slow shell script.  We don't cache a
847     # path for INSTALL within a source directory, because that will
848     # break other packages using the cache if that directory is
849     # removed, or if the path is relative.
850     INSTALL="$ac_install_sh"
851   fi
852 fi
853 echo "$ac_t""$INSTALL" 1>&6
854
855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
856 # It thinks the first close brace ends the variable substitution.
857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
858
859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
860
861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
862
863 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
864 echo "configure:865: checking whether build environment is sane" >&5
865 # Just in case
866 sleep 1
867 echo timestamp > conftestfile
868 # Do `set' in a subshell so we don't clobber the current shell's
869 # arguments.  Must try -L first in case configure is actually a
870 # symlink; some systems play weird games with the mod time of symlinks
871 # (eg FreeBSD returns the mod time of the symlink's containing
872 # directory).
873 if (
874    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
875    if test "$*" = "X"; then
876       # -L didn't work.
877       set X `ls -t $srcdir/configure conftestfile`
878    fi
879    if test "$*" != "X $srcdir/configure conftestfile" \
880       && test "$*" != "X conftestfile $srcdir/configure"; then
881
882       # If neither matched, then we have a broken ls.  This can happen
883       # if, for instance, CONFIG_SHELL is bash and it inherits a
884       # broken ls alias from the environment.  This has actually
885       # happened.  Such a system could not be considered "sane".
886       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
887 alias in your environment" 1>&2; exit 1; }
888    fi
889
890    test "$2" = conftestfile
891    )
892 then
893    # Ok.
894    :
895 else
896    { echo "configure: error: newly created file is older than distributed files!
897 Check your system clock" 1>&2; exit 1; }
898 fi
899 rm -f conftest*
900 echo "$ac_t""yes" 1>&6
901 if test "$program_transform_name" = s,x,x,; then
902   program_transform_name=
903 else
904   # Double any \ or $.  echo might interpret backslashes.
905   cat <<\EOF_SED > conftestsed
906 s,\\,\\\\,g; s,\$,$$,g
907 EOF_SED
908   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
909   rm -f conftestsed
910 fi
911 test "$program_prefix" != NONE &&
912   program_transform_name="s,^,${program_prefix},;$program_transform_name"
913 # Use a double $ so make ignores it.
914 test "$program_suffix" != NONE &&
915   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
916
917 # sed with no file args requires a program.
918 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
919
920 for ac_prog in mawk gawk nawk awk
921 do
922 # Extract the first word of "$ac_prog", so it can be a program name with args.
923 set dummy $ac_prog; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$AWK"; then
930   ac_cv_prog_AWK="$AWK" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
933   ac_dummy="$PATH"
934   for ac_dir in $ac_dummy; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       ac_cv_prog_AWK="$ac_prog"
938       break
939     fi
940   done
941   IFS="$ac_save_ifs"
942 fi
943 fi
944 AWK="$ac_cv_prog_AWK"
945 if test -n "$AWK"; then
946   echo "$ac_t""$AWK" 1>&6
947 else
948   echo "$ac_t""no" 1>&6
949 fi
950
951 test -n "$AWK" && break
952 done
953
954 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
955 echo "configure:956: checking whether ${MAKE-make} sets \${MAKE}" >&5
956 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
957 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   cat > conftestmake <<\EOF
961 all:
962         @echo 'ac_maketemp="${MAKE}"'
963 EOF
964 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
965 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
966 if test -n "$ac_maketemp"; then
967   eval ac_cv_prog_make_${ac_make}_set=yes
968 else
969   eval ac_cv_prog_make_${ac_make}_set=no
970 fi
971 rm -f conftestmake
972 fi
973 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
974   echo "$ac_t""yes" 1>&6
975   SET_MAKE=
976 else
977   echo "$ac_t""no" 1>&6
978   SET_MAKE="MAKE=${MAKE-make}"
979 fi
980
981
982
983 PACKAGE=OpenLDAP
984
985 VERSION=$OL_VERSION
986
987 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
988   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
989 fi
990
991
992
993 missing_dir=`cd $ac_aux_dir && pwd`
994 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
995 echo "configure:996: checking for working aclocal" >&5
996 # Run test in a subshell; some versions of sh will print an error if
997 # an executable is not found, even if stderr is redirected.
998 # Redirect stdin to placate older versions of autoconf.  Sigh.
999 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1000    ACLOCAL=aclocal
1001    echo "$ac_t""found" 1>&6
1002 else
1003    ACLOCAL="$missing_dir/missing aclocal"
1004    echo "$ac_t""missing" 1>&6
1005 fi
1006
1007 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1008 echo "configure:1009: checking for working autoconf" >&5
1009 # Run test in a subshell; some versions of sh will print an error if
1010 # an executable is not found, even if stderr is redirected.
1011 # Redirect stdin to placate older versions of autoconf.  Sigh.
1012 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1013    AUTOCONF=autoconf
1014    echo "$ac_t""found" 1>&6
1015 else
1016    AUTOCONF="$missing_dir/missing autoconf"
1017    echo "$ac_t""missing" 1>&6
1018 fi
1019
1020 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working automake" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (automake --version) < /dev/null > /dev/null 2>&1; then
1026    AUTOMAKE=automake
1027    echo "$ac_t""found" 1>&6
1028 else
1029    AUTOMAKE="$missing_dir/missing automake"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoheader" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOHEADER=autoheader
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOHEADER="$missing_dir/missing autoheader"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working makeinfo" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1052    MAKEINFO=makeinfo
1053    echo "$ac_t""found" 1>&6
1054 else
1055    MAKEINFO="$missing_dir/missing makeinfo"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 install_sh="$missing_dir/install-sh"
1060 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1061
1062 for ac_prog in gnutar gtar tar
1063 do
1064 # Extract the first word of "$ac_prog", so it can be a program name with args.
1065 set dummy $ac_prog; ac_word=$2
1066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067 echo "configure:1068: checking for $ac_word" >&5
1068 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071   if test -n "$AMTAR"; then
1072   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1073 else
1074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1075   ac_dummy="$PATH"
1076   for ac_dir in $ac_dummy; do
1077     test -z "$ac_dir" && ac_dir=.
1078     if test -f $ac_dir/$ac_word; then
1079       ac_cv_prog_AMTAR="$ac_prog"
1080       break
1081     fi
1082   done
1083   IFS="$ac_save_ifs"
1084 fi
1085 fi
1086 AMTAR="$ac_cv_prog_AMTAR"
1087 if test -n "$AMTAR"; then
1088   echo "$ac_t""$AMTAR" 1>&6
1089 else
1090   echo "$ac_t""no" 1>&6
1091 fi
1092
1093 test -n "$AMTAR" && break
1094 done
1095
1096
1097 AMTARFLAGS=
1098 if test -n "$AMTAR"; then
1099   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1100         AMTARFLAGS=o
1101   fi
1102 fi
1103
1104
1105
1106 cat >> confdefs.h <<EOF
1107 #define OPENLDAP_PACKAGE "$PACKAGE"
1108 EOF
1109
1110 cat >> confdefs.h <<EOF
1111 #define OPENLDAP_VERSION "$VERSION"
1112 EOF
1113
1114
1115
1116
1117 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1118 echo "configure:1119: checking configure arguments" >&5
1119
1120
1121 top_builddir=`pwd`
1122
1123 ldap_subdir="/openldap"
1124
1125 # Check whether --with-subdir or --without-subdir was given.
1126 if test "${with_subdir+set}" = set; then
1127   withval="$with_subdir"
1128   case "$withval" in
1129         no) ldap_subdir=""
1130                 ;;
1131         yes)
1132                 ;;
1133         /*|\\*)
1134                 ldap_subdir="$withval"
1135                 ;;
1136         *)
1137                 ldap_subdir="/$withval"
1138                 ;;
1139 esac
1140
1141 fi
1142
1143
1144 # OpenLDAP --enable-debug
1145         # Check whether --enable-debug or --disable-debug was given.
1146 if test "${enable_debug+set}" = set; then
1147   enableval="$enable_debug"
1148   
1149         ol_arg=invalid
1150         for ol_val in auto yes no ; do
1151                 if test "$enableval" = "$ol_val" ; then
1152                         ol_arg="$ol_val"
1153                 fi
1154         done
1155         if test "$ol_arg" = "invalid" ; then
1156                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1157         fi
1158         ol_enable_debug="$ol_arg"
1159
1160 else
1161         ol_enable_debug="yes"
1162 fi
1163 # end --enable-debug
1164 # OpenLDAP --enable-syslog
1165         # Check whether --enable-syslog or --disable-syslog was given.
1166 if test "${enable_syslog+set}" = set; then
1167   enableval="$enable_syslog"
1168   
1169         ol_arg=invalid
1170         for ol_val in auto yes no ; do
1171                 if test "$enableval" = "$ol_val" ; then
1172                         ol_arg="$ol_val"
1173                 fi
1174         done
1175         if test "$ol_arg" = "invalid" ; then
1176                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1177         fi
1178         ol_enable_syslog="$ol_arg"
1179
1180 else
1181         ol_enable_syslog="auto"
1182 fi
1183 # end --enable-syslog
1184 # OpenLDAP --enable-proctitle
1185         # Check whether --enable-proctitle or --disable-proctitle was given.
1186 if test "${enable_proctitle+set}" = set; then
1187   enableval="$enable_proctitle"
1188   
1189         ol_arg=invalid
1190         for ol_val in auto yes no ; do
1191                 if test "$enableval" = "$ol_val" ; then
1192                         ol_arg="$ol_val"
1193                 fi
1194         done
1195         if test "$ol_arg" = "invalid" ; then
1196                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1197         fi
1198         ol_enable_proctitle="$ol_arg"
1199
1200 else
1201         ol_enable_proctitle="yes"
1202 fi
1203 # end --enable-proctitle
1204 # OpenLDAP --enable-cache
1205         # Check whether --enable-cache or --disable-cache was given.
1206 if test "${enable_cache+set}" = set; then
1207   enableval="$enable_cache"
1208   
1209         ol_arg=invalid
1210         for ol_val in auto yes no ; do
1211                 if test "$enableval" = "$ol_val" ; then
1212                         ol_arg="$ol_val"
1213                 fi
1214         done
1215         if test "$ol_arg" = "invalid" ; then
1216                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1217         fi
1218         ol_enable_cache="$ol_arg"
1219
1220 else
1221         ol_enable_cache="yes"
1222 fi
1223 # end --enable-cache
1224 # OpenLDAP --enable-dns
1225         # Check whether --enable-dns or --disable-dns was given.
1226 if test "${enable_dns+set}" = set; then
1227   enableval="$enable_dns"
1228   
1229         ol_arg=invalid
1230         for ol_val in auto yes no ; do
1231                 if test "$enableval" = "$ol_val" ; then
1232                         ol_arg="$ol_val"
1233                 fi
1234         done
1235         if test "$ol_arg" = "invalid" ; then
1236                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1237         fi
1238         ol_enable_dns="$ol_arg"
1239
1240 else
1241         ol_enable_dns="no"
1242 fi
1243 # end --enable-dns
1244 # OpenLDAP --enable-referrals
1245         # Check whether --enable-referrals or --disable-referrals was given.
1246 if test "${enable_referrals+set}" = set; then
1247   enableval="$enable_referrals"
1248   
1249         ol_arg=invalid
1250         for ol_val in auto yes no ; do
1251                 if test "$enableval" = "$ol_val" ; then
1252                         ol_arg="$ol_val"
1253                 fi
1254         done
1255         if test "$ol_arg" = "invalid" ; then
1256                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1257         fi
1258         ol_enable_referrals="$ol_arg"
1259
1260 else
1261         ol_enable_referrals="yes"
1262 fi
1263 # end --enable-referrals
1264 # OpenLDAP --enable-cldap
1265         # Check whether --enable-cldap or --disable-cldap was given.
1266 if test "${enable_cldap+set}" = set; then
1267   enableval="$enable_cldap"
1268   
1269         ol_arg=invalid
1270         for ol_val in auto yes no ; do
1271                 if test "$enableval" = "$ol_val" ; then
1272                         ol_arg="$ol_val"
1273                 fi
1274         done
1275         if test "$ol_arg" = "invalid" ; then
1276                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1277         fi
1278         ol_enable_cldap="$ol_arg"
1279
1280 else
1281         ol_enable_cldap="no"
1282 fi
1283 # end --enable-cldap
1284 # OpenLDAP --enable-x_compile
1285         # Check whether --enable-x_compile or --disable-x_compile was given.
1286 if test "${enable_x_compile+set}" = set; then
1287   enableval="$enable_x_compile"
1288   
1289         ol_arg=invalid
1290         for ol_val in yes no ; do
1291                 if test "$enableval" = "$ol_val" ; then
1292                         ol_arg="$ol_val"
1293                 fi
1294         done
1295         if test "$ol_arg" = "invalid" ; then
1296                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1297         fi
1298         ol_enable_x_compile="$ol_arg"
1299
1300 else
1301         ol_enable_x_compile="no"
1302 fi
1303 # end --enable-x_compile
1304
1305 # OpenLDAP --enable-dmalloc
1306         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1307 if test "${enable_dmalloc+set}" = set; then
1308   enableval="$enable_dmalloc"
1309   
1310         ol_arg=invalid
1311         for ol_val in auto yes no ; do
1312                 if test "$enableval" = "$ol_val" ; then
1313                         ol_arg="$ol_val"
1314                 fi
1315         done
1316         if test "$ol_arg" = "invalid" ; then
1317                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1318         fi
1319         ol_enable_dmalloc="$ol_arg"
1320
1321 else
1322         ol_enable_dmalloc="no"
1323 fi
1324 # end --enable-dmalloc
1325
1326 # OpenLDAP --with-cyrus_sasl
1327         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1328 if test "${with_cyrus_sasl+set}" = set; then
1329   withval="$with_cyrus_sasl"
1330   
1331         ol_arg=invalid
1332         for ol_val in auto yes no  ; do
1333                 if test "$withval" = "$ol_val" ; then
1334                         ol_arg="$ol_val"
1335                 fi
1336         done
1337         if test "$ol_arg" = "invalid" ; then
1338                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1339         fi
1340         ol_with_cyrus_sasl="$ol_arg"
1341
1342 else
1343         ol_with_cyrus_sasl="auto"
1344 fi
1345 # end --with-cyrus_sasl
1346
1347 # OpenLDAP --with-fetch
1348         # Check whether --with-fetch or --without-fetch was given.
1349 if test "${with_fetch+set}" = set; then
1350   withval="$with_fetch"
1351   
1352         ol_arg=invalid
1353         for ol_val in auto yes no  ; do
1354                 if test "$withval" = "$ol_val" ; then
1355                         ol_arg="$ol_val"
1356                 fi
1357         done
1358         if test "$ol_arg" = "invalid" ; then
1359                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1360         fi
1361         ol_with_fetch="$ol_arg"
1362
1363 else
1364         ol_with_fetch="auto"
1365 fi
1366 # end --with-fetch
1367
1368 # OpenLDAP --with-kerberos
1369         # Check whether --with-kerberos or --without-kerberos was given.
1370 if test "${with_kerberos+set}" = set; then
1371   withval="$with_kerberos"
1372   
1373         ol_arg=invalid
1374         for ol_val in auto k5 k4 afs yes no ; do
1375                 if test "$withval" = "$ol_val" ; then
1376                         ol_arg="$ol_val"
1377                 fi
1378         done
1379         if test "$ol_arg" = "invalid" ; then
1380                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1381         fi
1382         ol_with_kerberos="$ol_arg"
1383
1384 else
1385         ol_with_kerberos="auto"
1386 fi
1387 # end --with-kerberos
1388
1389 # OpenLDAP --with-readline
1390         # Check whether --with-readline or --without-readline was given.
1391 if test "${with_readline+set}" = set; then
1392   withval="$with_readline"
1393   
1394         ol_arg=invalid
1395         for ol_val in auto yes no  ; do
1396                 if test "$withval" = "$ol_val" ; then
1397                         ol_arg="$ol_val"
1398                 fi
1399         done
1400         if test "$ol_arg" = "invalid" ; then
1401                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1402         fi
1403         ol_with_readline="$ol_arg"
1404
1405 else
1406         ol_with_readline="auto"
1407 fi
1408 # end --with-readline
1409
1410 # OpenLDAP --with-threads
1411         # Check whether --with-threads or --without-threads was given.
1412 if test "${with_threads+set}" = set; then
1413   withval="$with_threads"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto posix mach lwp yes no manual  ; do
1417                 if test "$withval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1423         fi
1424         ol_with_threads="$ol_arg"
1425
1426 else
1427         ol_with_threads="auto"
1428 fi
1429 # end --with-threads
1430
1431 # OpenLDAP --with-tls
1432         # Check whether --with-tls or --without-tls was given.
1433 if test "${with_tls+set}" = set; then
1434   withval="$with_tls"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto ssleay openssl yes no  ; do
1438                 if test "$withval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1444         fi
1445         ol_with_tls="$ol_arg"
1446
1447 else
1448         ol_with_tls="auto"
1449 fi
1450 # end --with-tls
1451
1452 # OpenLDAP --with-yielding_select
1453         # Check whether --with-yielding_select or --without-yielding_select was given.
1454 if test "${with_yielding_select+set}" = set; then
1455   withval="$with_yielding_select"
1456   
1457         ol_arg=invalid
1458         for ol_val in auto yes no manual  ; do
1459                 if test "$withval" = "$ol_val" ; then
1460                         ol_arg="$ol_val"
1461                 fi
1462         done
1463         if test "$ol_arg" = "invalid" ; then
1464                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1465         fi
1466         ol_with_yielding_select="$ol_arg"
1467
1468 else
1469         ol_with_yielding_select="auto"
1470 fi
1471 # end --with-yielding_select
1472
1473
1474
1475 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1476 if test "${with_xxldapdoptions+set}" = set; then
1477   withval="$with_xxldapdoptions"
1478   :
1479 fi
1480
1481 # OpenLDAP --enable-ldapd
1482         # Check whether --enable-ldapd or --disable-ldapd was given.
1483 if test "${enable_ldapd+set}" = set; then
1484   enableval="$enable_ldapd"
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-ldapd" 1>&2; exit 1; }
1494         fi
1495         ol_enable_ldapd="$ol_arg"
1496
1497 else
1498         ol_enable_ldapd="no"
1499 fi
1500 # end --enable-ldapd
1501
1502 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1503 if test "${with_xxslapdoptions+set}" = set; then
1504   withval="$with_xxslapdoptions"
1505   :
1506 fi
1507
1508 # OpenLDAP --enable-slapd
1509         # Check whether --enable-slapd or --disable-slapd was given.
1510 if test "${enable_slapd+set}" = set; then
1511   enableval="$enable_slapd"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no ; do
1515                 if test "$enableval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1521         fi
1522         ol_enable_slapd="$ol_arg"
1523
1524 else
1525         ol_enable_slapd="yes"
1526 fi
1527 # end --enable-slapd
1528 # OpenLDAP --enable-cleartext
1529         # Check whether --enable-cleartext or --disable-cleartext was given.
1530 if test "${enable_cleartext+set}" = set; then
1531   enableval="$enable_cleartext"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no ; do
1535                 if test "$enableval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1541         fi
1542         ol_enable_cleartext="$ol_arg"
1543
1544 else
1545         ol_enable_cleartext="yes"
1546 fi
1547 # end --enable-cleartext
1548 # OpenLDAP --enable-crypt
1549         # Check whether --enable-crypt or --disable-crypt was given.
1550 if test "${enable_crypt+set}" = set; then
1551   enableval="$enable_crypt"
1552   
1553         ol_arg=invalid
1554         for ol_val in auto yes no ; do
1555                 if test "$enableval" = "$ol_val" ; then
1556                         ol_arg="$ol_val"
1557                 fi
1558         done
1559         if test "$ol_arg" = "invalid" ; then
1560                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1561         fi
1562         ol_enable_crypt="$ol_arg"
1563
1564 else
1565         ol_enable_crypt="auto"
1566 fi
1567 # end --enable-crypt
1568 # OpenLDAP --enable-modules
1569         # Check whether --enable-modules or --disable-modules was given.
1570 if test "${enable_modules+set}" = set; then
1571   enableval="$enable_modules"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto yes no ; do
1575                 if test "$enableval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1581         fi
1582         ol_enable_modules="$ol_arg"
1583
1584 else
1585         ol_enable_modules="no"
1586 fi
1587 # end --enable-modules
1588 # OpenLDAP --enable-multimaster
1589         # Check whether --enable-multimaster or --disable-multimaster was given.
1590 if test "${enable_multimaster+set}" = set; then
1591   enableval="$enable_multimaster"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto yes no ; do
1595                 if test "$enableval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1601         fi
1602         ol_enable_multimaster="$ol_arg"
1603
1604 else
1605         ol_enable_multimaster="no"
1606 fi
1607 # end --enable-multimaster
1608 # OpenLDAP --enable-phonetic
1609         # Check whether --enable-phonetic or --disable-phonetic was given.
1610 if test "${enable_phonetic+set}" = set; then
1611   enableval="$enable_phonetic"
1612   
1613         ol_arg=invalid
1614         for ol_val in auto yes no ; do
1615                 if test "$enableval" = "$ol_val" ; then
1616                         ol_arg="$ol_val"
1617                 fi
1618         done
1619         if test "$ol_arg" = "invalid" ; then
1620                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1621         fi
1622         ol_enable_phonetic="$ol_arg"
1623
1624 else
1625         ol_enable_phonetic="no"
1626 fi
1627 # end --enable-phonetic
1628 # OpenLDAP --enable-quipu
1629         # Check whether --enable-quipu or --disable-quipu was given.
1630 if test "${enable_quipu+set}" = set; then
1631   enableval="$enable_quipu"
1632   
1633         ol_arg=invalid
1634         for ol_val in auto yes no ; do
1635                 if test "$enableval" = "$ol_val" ; then
1636                         ol_arg="$ol_val"
1637                 fi
1638         done
1639         if test "$ol_arg" = "invalid" ; then
1640                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1641         fi
1642         ol_enable_quipu="$ol_arg"
1643
1644 else
1645         ol_enable_quipu="no"
1646 fi
1647 # end --enable-quipu
1648 # OpenLDAP --enable-rlookups
1649         # Check whether --enable-rlookups or --disable-rlookups was given.
1650 if test "${enable_rlookups+set}" = set; then
1651   enableval="$enable_rlookups"
1652   
1653         ol_arg=invalid
1654         for ol_val in auto yes no ; do
1655                 if test "$enableval" = "$ol_val" ; then
1656                         ol_arg="$ol_val"
1657                 fi
1658         done
1659         if test "$ol_arg" = "invalid" ; then
1660                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1661         fi
1662         ol_enable_rlookups="$ol_arg"
1663
1664 else
1665         ol_enable_rlookups="auto"
1666 fi
1667 # end --enable-rlookups
1668 # OpenLDAP --enable-wrappers
1669         # Check whether --enable-wrappers or --disable-wrappers was given.
1670 if test "${enable_wrappers+set}" = set; then
1671   enableval="$enable_wrappers"
1672   
1673         ol_arg=invalid
1674         for ol_val in auto yes no ; do
1675                 if test "$enableval" = "$ol_val" ; then
1676                         ol_arg="$ol_val"
1677                 fi
1678         done
1679         if test "$ol_arg" = "invalid" ; then
1680                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1681         fi
1682         ol_enable_wrappers="$ol_arg"
1683
1684 else
1685         ol_enable_wrappers="no"
1686 fi
1687 # end --enable-wrappers
1688
1689 # OpenLDAP --enable-bdb2
1690         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1691 if test "${enable_bdb2+set}" = set; then
1692   enableval="$enable_bdb2"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1702         fi
1703         ol_enable_bdb2="$ol_arg"
1704
1705 else
1706         ol_enable_bdb2="no"
1707 fi
1708 # end --enable-bdb2
1709 # OpenLDAP --with-bdb2_module
1710         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1711 if test "${with_bdb2_module+set}" = set; then
1712   withval="$with_bdb2_module"
1713   
1714         ol_arg=invalid
1715         for ol_val in static dynamic ; do
1716                 if test "$withval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1722         fi
1723         ol_with_bdb2_module="$ol_arg"
1724
1725 else
1726         ol_with_bdb2_module="static"
1727 fi
1728 # end --with-bdb2_module
1729
1730 # OpenLDAP --enable-ldap
1731         # Check whether --enable-ldap or --disable-ldap was given.
1732 if test "${enable_ldap+set}" = set; then
1733   enableval="$enable_ldap"
1734   
1735         ol_arg=invalid
1736         for ol_val in auto yes no ; do
1737                 if test "$enableval" = "$ol_val" ; then
1738                         ol_arg="$ol_val"
1739                 fi
1740         done
1741         if test "$ol_arg" = "invalid" ; then
1742                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1743         fi
1744         ol_enable_ldap="$ol_arg"
1745
1746 else
1747         ol_enable_ldap="no"
1748 fi
1749 # end --enable-ldap
1750 # OpenLDAP --with-ldap_module
1751         # Check whether --with-ldap_module or --without-ldap_module was given.
1752 if test "${with_ldap_module+set}" = set; then
1753   withval="$with_ldap_module"
1754   
1755         ol_arg=invalid
1756         for ol_val in static dynamic ; do
1757                 if test "$withval" = "$ol_val" ; then
1758                         ol_arg="$ol_val"
1759                 fi
1760         done
1761         if test "$ol_arg" = "invalid" ; then
1762                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1763         fi
1764         ol_with_ldap_module="$ol_arg"
1765
1766 else
1767         ol_with_ldap_module="static"
1768 fi
1769 # end --with-ldap_module
1770
1771 # OpenLDAP --enable-ldbm
1772         # Check whether --enable-ldbm or --disable-ldbm was given.
1773 if test "${enable_ldbm+set}" = set; then
1774   enableval="$enable_ldbm"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1784         fi
1785         ol_enable_ldbm="$ol_arg"
1786
1787 else
1788         ol_enable_ldbm="yes"
1789 fi
1790 # end --enable-ldbm
1791 # OpenLDAP --with-ldbm_module
1792         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1793 if test "${with_ldbm_module+set}" = set; then
1794   withval="$with_ldbm_module"
1795   
1796         ol_arg=invalid
1797         for ol_val in static dynamic ; do
1798                 if test "$withval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1804         fi
1805         ol_with_ldbm_module="$ol_arg"
1806
1807 else
1808         ol_with_ldbm_module="static"
1809 fi
1810 # end --with-ldbm_module
1811
1812 # OpenLDAP --with-ldbm_api
1813         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1814 if test "${with_ldbm_api+set}" = set; then
1815   withval="$with_ldbm_api"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1819                 if test "$withval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1825         fi
1826         ol_with_ldbm_api="$ol_arg"
1827
1828 else
1829         ol_with_ldbm_api="auto"
1830 fi
1831 # end --with-ldbm_api
1832
1833 # OpenLDAP --with-ldbm_type
1834         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1835 if test "${with_ldbm_type+set}" = set; then
1836   withval="$with_ldbm_type"
1837   
1838         ol_arg=invalid
1839         for ol_val in auto btree hash ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1846         fi
1847         ol_with_ldbm_type="$ol_arg"
1848
1849 else
1850         ol_with_ldbm_type="auto"
1851 fi
1852 # end --with-ldbm_type
1853
1854
1855 # OpenLDAP --enable-passwd
1856         # Check whether --enable-passwd or --disable-passwd was given.
1857 if test "${enable_passwd+set}" = set; then
1858   enableval="$enable_passwd"
1859   
1860         ol_arg=invalid
1861         for ol_val in auto yes no ; do
1862                 if test "$enableval" = "$ol_val" ; then
1863                         ol_arg="$ol_val"
1864                 fi
1865         done
1866         if test "$ol_arg" = "invalid" ; then
1867                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1868         fi
1869         ol_enable_passwd="$ol_arg"
1870
1871 else
1872         ol_enable_passwd="no"
1873 fi
1874 # end --enable-passwd
1875 # OpenLDAP --with-passwd_module
1876         # Check whether --with-passwd_module or --without-passwd_module was given.
1877 if test "${with_passwd_module+set}" = set; then
1878   withval="$with_passwd_module"
1879   
1880         ol_arg=invalid
1881         for ol_val in static dynamic ; do
1882                 if test "$withval" = "$ol_val" ; then
1883                         ol_arg="$ol_val"
1884                 fi
1885         done
1886         if test "$ol_arg" = "invalid" ; then
1887                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1888         fi
1889         ol_with_passwd_module="$ol_arg"
1890
1891 else
1892         ol_with_passwd_module="static"
1893 fi
1894 # end --with-passwd_module
1895
1896 # OpenLDAP --enable-perl
1897         # Check whether --enable-perl or --disable-perl was given.
1898 if test "${enable_perl+set}" = set; then
1899   enableval="$enable_perl"
1900   
1901         ol_arg=invalid
1902         for ol_val in auto yes no ; do
1903                 if test "$enableval" = "$ol_val" ; then
1904                         ol_arg="$ol_val"
1905                 fi
1906         done
1907         if test "$ol_arg" = "invalid" ; then
1908                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1909         fi
1910         ol_enable_perl="$ol_arg"
1911
1912 else
1913         ol_enable_perl="no"
1914 fi
1915 # end --enable-perl
1916 # OpenLDAP --with-perl_module
1917         # Check whether --with-perl_module or --without-perl_module was given.
1918 if test "${with_perl_module+set}" = set; then
1919   withval="$with_perl_module"
1920   
1921         ol_arg=invalid
1922         for ol_val in static dynamic ; do
1923                 if test "$withval" = "$ol_val" ; then
1924                         ol_arg="$ol_val"
1925                 fi
1926         done
1927         if test "$ol_arg" = "invalid" ; then
1928                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1929         fi
1930         ol_with_perl_module="$ol_arg"
1931
1932 else
1933         ol_with_perl_module="static"
1934 fi
1935 # end --with-perl_module
1936
1937 # OpenLDAP --enable-shell
1938         # Check whether --enable-shell or --disable-shell was given.
1939 if test "${enable_shell+set}" = set; then
1940   enableval="$enable_shell"
1941   
1942         ol_arg=invalid
1943         for ol_val in auto yes no ; do
1944                 if test "$enableval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1950         fi
1951         ol_enable_shell="$ol_arg"
1952
1953 else
1954         ol_enable_shell="no"
1955 fi
1956 # end --enable-shell
1957 # OpenLDAP --with-shell_module
1958         # Check whether --with-shell_module or --without-shell_module was given.
1959 if test "${with_shell_module+set}" = set; then
1960   withval="$with_shell_module"
1961   
1962         ol_arg=invalid
1963         for ol_val in static dynamic ; do
1964                 if test "$withval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1970         fi
1971         ol_with_shell_module="$ol_arg"
1972
1973 else
1974         ol_with_shell_module="static"
1975 fi
1976 # end --with-shell_module
1977
1978 # OpenLDAP --enable-tcl
1979         # Check whether --enable-tcl or --disable-tcl was given.
1980 if test "${enable_tcl+set}" = set; then
1981   enableval="$enable_tcl"
1982   
1983         ol_arg=invalid
1984         for ol_val in auto yes no ; do
1985                 if test "$enableval" = "$ol_val" ; then
1986                         ol_arg="$ol_val"
1987                 fi
1988         done
1989         if test "$ol_arg" = "invalid" ; then
1990                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1991         fi
1992         ol_enable_tcl="$ol_arg"
1993
1994 else
1995         ol_enable_tcl="no"
1996 fi
1997 # end --enable-tcl
1998 # OpenLDAP --with-tcl_module
1999         # Check whether --with-tcl_module or --without-tcl_module was given.
2000 if test "${with_tcl_module+set}" = set; then
2001   withval="$with_tcl_module"
2002   
2003         ol_arg=invalid
2004         for ol_val in static dynamic ; do
2005                 if test "$withval" = "$ol_val" ; then
2006                         ol_arg="$ol_val"
2007                 fi
2008         done
2009         if test "$ol_arg" = "invalid" ; then
2010                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2011         fi
2012         ol_with_tcl_module="$ol_arg"
2013
2014 else
2015         ol_with_tcl_module="static"
2016 fi
2017 # end --with-tcl_module
2018
2019
2020 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2021 if test "${with_xxslurpdoptions+set}" = set; then
2022   withval="$with_xxslurpdoptions"
2023   :
2024 fi
2025
2026 # OpenLDAP --enable-slurpd
2027         # Check whether --enable-slurpd or --disable-slurpd was given.
2028 if test "${enable_slurpd+set}" = set; then
2029   enableval="$enable_slurpd"
2030   
2031         ol_arg=invalid
2032         for ol_val in auto yes no ; do
2033                 if test "$enableval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2039         fi
2040         ol_enable_slurpd="$ol_arg"
2041
2042 else
2043         ol_enable_slurpd="auto"
2044 fi
2045 # end --enable-slurpd
2046
2047 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2048 if test "${with_xxliboptions+set}" = set; then
2049   withval="$with_xxliboptions"
2050   :
2051 fi
2052
2053 # Check whether --enable-static or --disable-static was given.
2054 if test "${enable_static+set}" = set; then
2055   enableval="$enable_static"
2056   p=${PACKAGE-default}
2057 case "$enableval" in
2058 yes) enable_static=yes ;;
2059 no) enable_static=no ;;
2060 *)
2061   enable_static=no
2062   # Look at the argument we got.  We use all the common list separators.
2063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2064   for pkg in $enableval; do
2065     if test "X$pkg" = "X$p"; then
2066       enable_static=yes
2067     fi
2068   done
2069   IFS="$ac_save_ifs"
2070   ;;
2071 esac
2072 else
2073   enable_static=yes
2074 fi
2075
2076 # Check whether --enable-shared or --disable-shared was given.
2077 if test "${enable_shared+set}" = set; then
2078   enableval="$enable_shared"
2079   p=${PACKAGE-default}
2080 case "$enableval" in
2081 yes) enable_shared=yes ;;
2082 no) enable_shared=no ;;
2083 *)
2084   enable_shared=no
2085   # Look at the argument we got.  We use all the common list separators.
2086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2087   for pkg in $enableval; do
2088     if test "X$pkg" = "X$p"; then
2089       enable_shared=yes
2090     fi
2091   done
2092   IFS="$ac_save_ifs"
2093   ;;
2094 esac
2095 else
2096   enable_shared=yes
2097 fi
2098
2099
2100 # validate options
2101 if test $ol_enable_dns = yes ; then
2102         if test $ol_enable_referrals = no ; then
2103                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2104         fi
2105         if test $ol_enable_referrals = auto ; then
2106                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2107                 ol_enable_referrals=yes
2108         fi
2109 fi
2110
2111 if test $ol_enable_slapd = no ; then
2112                 if test $ol_enable_bdb2 = yes ; then
2113                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2114         fi
2115         if test $ol_enable_ldap = yes ; then
2116                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2117         fi
2118         if test $ol_enable_ldbm = yes ; then
2119                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2120         fi
2121         if test $ol_enable_passwd = yes ; then
2122                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2123         fi
2124         if test $ol_enable_perl = yes ; then
2125                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2126         fi
2127         if test $ol_enable_shell = yes ; then
2128                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2129         fi
2130         if test $ol_enable_tcl = yes ; then
2131                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2132         fi
2133         if test $ol_enable_modules = yes ; then
2134                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2135         fi
2136         if test $ol_enable_multimaster = yes ; then
2137                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2138         fi
2139         if test $ol_enable_wrappers = yes ; then
2140                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2141         fi
2142         if test $ol_enable_phonetic = yes ; then
2143                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2144         fi
2145         if test $ol_enable_quipu = yes ; then
2146                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2147         fi
2148         if test $ol_enable_rlookups = yes ; then
2149                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2150         fi
2151         if test $ol_with_ldbm_api != auto ; then
2152                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2153         fi
2154         if test $ol_with_ldbm_type != auto ; then
2155                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2156         fi
2157         if test $ol_with_bdb2_module != static ; then
2158                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2159         fi
2160         if test $ol_with_ldap_module != static ; then
2161                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2162         fi
2163         if test $ol_with_ldbm_module != static ; then
2164                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2165         fi
2166         if test $ol_with_passwd_module != static ; then
2167                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2168         fi
2169         if test $ol_with_perl_module != static ; then
2170                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2171         fi
2172         if test $ol_with_shell_module != static ; then
2173                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2174         fi
2175         if test $ol_with_tcl_module != static ; then
2176                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2177         fi
2178         if test $ol_enable_slurpd = yes ; then
2179                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2180         fi
2181
2182         # force settings to no
2183         ol_enable_bdb2=no
2184         ol_enable_ldap=no
2185         ol_enable_ldbm=no
2186         ol_enable_passwd=no
2187         ol_enable_perl=no
2188         ol_enable_shell=no
2189         ol_enable_tcl=no
2190
2191         ol_enable_modules=no
2192         ol_enable_multimaster=no
2193         ol_enable_phonetic=no
2194         ol_enable_quipu=no
2195         ol_enable_rlookups=no
2196         ol_enable_wrappers=no
2197
2198         ol_with_ldbm_api=no
2199         ol_with_ldbm_type=no
2200
2201         ol_with_bdb2_module=static
2202         ol_with_ldap_module=static
2203         ol_with_ldbm_module=static
2204         ol_with_passwd_module=static
2205         ol_with_perl_module=static
2206         ol_with_shell_module=static
2207         ol_with_tcl_module=static
2208
2209         ol_enable_slurpd=no
2210
2211 elif test $ol_enable_ldbm = no ; then
2212         
2213         if test $ol_with_ldbm_api != auto ; then
2214                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2215         fi
2216
2217         if test $ol_with_ldbm_type != auto ; then
2218                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2219         fi
2220
2221         if test $ol_with_ldbm_module != static ; then
2222                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2223         fi
2224
2225         if test $ol_enable_bdb2 = yes ; then
2226                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2227         fi
2228
2229         if test $ol_enable_modules != yes -a \
2230                 $ol_enable_ldap = no -a \
2231                 $ol_enable_passwd = no -a \
2232                 $ol_enable_perl = no -a \
2233                 $ol_enable_shell = no -a \
2234                 $ol_enable_tcl = no ; then
2235                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2236         fi
2237
2238         ol_with_ldbm_api=no
2239         ol_with_ldbm_type=no
2240         ol_with_ldbm_module=static
2241
2242 elif test $ol_enable_bdb2 = yes ; then
2243         
2244         if test $ol_with_ldbm_api != auto -a \
2245                 $ol_with_ldbm_api != db2 ; then
2246                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2247         fi
2248
2249         ol_with_ldbm_api=db2
2250
2251 else
2252         
2253         if test $ol_enable_bdb2 != no ; then
2254                 if test $ol_with_ldbm_api != auto -a \
2255                         $ol_with_ldbm_api != db2 ; then
2256                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2257                         ol_enable_bdb2=no
2258                 fi
2259         fi
2260
2261         if test $ol_with_ldbm_api = gdbm -a \
2262                 $ol_with_ldbm_type = btree ; then
2263                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2264         fi
2265         if test $ol_with_ldbm_api = mdbm -a \
2266                 $ol_with_ldbm_type = btree ; then
2267                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2268         fi
2269         if test $ol_with_ldbm_api = ndbm -a \
2270                 $ol_with_ldbm_type = btree ; then
2271                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2272         fi
2273 fi
2274
2275 if test $ol_enable_slurpd = yes ; then
2276                 if test $ol_with_threads = no ; then
2277                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2278         fi
2279 fi
2280
2281 echo "$ac_t""done" 1>&6
2282
2283 ## Initialize vars
2284 LDAP_LIBS=
2285 LDIF_LIBS=
2286 LDBM_LIBS=
2287 LTHREAD_LIBS=
2288 LUTIL_LIBS=
2289
2290 LDAPD_LIBS=
2291 SLAPD_LIBS=
2292 SLURPD_LIBS=
2293
2294 BUILD_LDAPD=no
2295 BUILD_SLAPD=no
2296 BUILD_SLURPD=no
2297
2298 BUILD_BDB2=no
2299 BUILD_LDAP=no
2300 BUILD_LDBM=no
2301 BUILD_PASSWD=no
2302 BUILD_PERL=no
2303 BUILD_QUIPU=no
2304 BUILD_SHELL=no
2305 BUILD_TCL=no
2306 BUILD_THREAD=no
2307
2308 BUILD_BDB2_DYNAMIC=static
2309 BUILD_LDAP_DYNAMIC=static
2310 BUILD_LDBM_DYNAMIC=static
2311 BUILD_PASSWD_DYNAMIC=static
2312 BUILD_PERL_DYNAMIC=static
2313 BUILD_SHELL_DYNAMIC=static
2314 BUILD_TCL_DYNAMIC=static
2315
2316 SLAPD_MODULES_LDFLAGS=
2317 SLAPD_MODULES_CPPFLAGS=
2318 SLAPD_MODULES_LIST=
2319
2320 SLAPD_PERL_LDFLAGS=
2321 SLAPD_PERL_CPPFLAGS=
2322
2323 KRB_LIBS=
2324 READLINE_LIBS=
2325 SASL_LIBS=
2326 TERMCAP_LIBS=
2327 TLS_LIBS=
2328 MODULES_LIBS=
2329
2330
2331
2332 cat >> confdefs.h <<\EOF
2333 #define HAVE_MKVERSION 1
2334 EOF
2335
2336
2337
2338
2339
2340 ol_aix_threads=no
2341 case "$target" in
2342 *-*-aix*)       if test -z "$CC" ; then
2343                 case "$ol_with_threads" in
2344                 auto | yes |  posix) ol_aix_threads=yes ;;
2345                 esac
2346         fi
2347 ;;
2348 esac
2349
2350 if test $ol_aix_threads = yes ; then
2351         if test -z "${CC}" ; then
2352                 for ac_prog in cc_r xlc_r cc
2353 do
2354 # Extract the first word of "$ac_prog", so it can be a program name with args.
2355 set dummy $ac_prog; ac_word=$2
2356 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2357 echo "configure:2358: checking for $ac_word" >&5
2358 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2359   echo $ac_n "(cached) $ac_c" 1>&6
2360 else
2361   if test -n "$CC"; then
2362   ac_cv_prog_CC="$CC" # Let the user override the test.
2363 else
2364   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2365   ac_dummy="$PATH"
2366   for ac_dir in $ac_dummy; do
2367     test -z "$ac_dir" && ac_dir=.
2368     if test -f $ac_dir/$ac_word; then
2369       ac_cv_prog_CC="$ac_prog"
2370       break
2371     fi
2372   done
2373   IFS="$ac_save_ifs"
2374 fi
2375 fi
2376 CC="$ac_cv_prog_CC"
2377 if test -n "$CC"; then
2378   echo "$ac_t""$CC" 1>&6
2379 else
2380   echo "$ac_t""no" 1>&6
2381 fi
2382
2383 test -n "$CC" && break
2384 done
2385
2386
2387                 if test "$CC" = cc ; then
2388                                                 if test $ol_with_threads != auto ; then
2389                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2390                         else
2391                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2392                         fi
2393                         ol_with_threads=no
2394                 fi
2395         fi
2396
2397         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2398                 ol_with_threads=posix
2399                 ol_cv_pthread_create=yes
2400         fi
2401 fi
2402
2403 if test -z "${CC}"; then
2404         for ac_prog in cc
2405 do
2406 # Extract the first word of "$ac_prog", so it can be a program name with args.
2407 set dummy $ac_prog; ac_word=$2
2408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2409 echo "configure:2410: checking for $ac_word" >&5
2410 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413   if test -n "$CC"; then
2414   ac_cv_prog_CC="$CC" # Let the user override the test.
2415 else
2416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2417   ac_dummy="$PATH"
2418   for ac_dir in $ac_dummy; do
2419     test -z "$ac_dir" && ac_dir=.
2420     if test -f $ac_dir/$ac_word; then
2421       ac_cv_prog_CC="$ac_prog"
2422       break
2423     fi
2424   done
2425   IFS="$ac_save_ifs"
2426 fi
2427 fi
2428 CC="$ac_cv_prog_CC"
2429 if test -n "$CC"; then
2430   echo "$ac_t""$CC" 1>&6
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434
2435 test -n "$CC" && break
2436 done
2437
2438 fi
2439
2440
2441
2442 # Check whether --enable-fast-install or --disable-fast-install was given.
2443 if test "${enable_fast_install+set}" = set; then
2444   enableval="$enable_fast_install"
2445   p=${PACKAGE-default}
2446 case "$enableval" in
2447 yes) enable_fast_install=yes ;;
2448 no) enable_fast_install=no ;;
2449 *)
2450   enable_fast_install=no
2451   # Look at the argument we got.  We use all the common list separators.
2452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2453   for pkg in $enableval; do
2454     if test "X$pkg" = "X$p"; then
2455       enable_fast_install=yes
2456     fi
2457   done
2458   IFS="$ac_save_ifs"
2459   ;;
2460 esac
2461 else
2462   enable_fast_install=yes
2463 fi
2464
2465 # Extract the first word of "ranlib", so it can be a program name with args.
2466 set dummy ranlib; ac_word=$2
2467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2468 echo "configure:2469: checking for $ac_word" >&5
2469 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   if test -n "$RANLIB"; then
2473   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2474 else
2475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2476   ac_dummy="$PATH"
2477   for ac_dir in $ac_dummy; do
2478     test -z "$ac_dir" && ac_dir=.
2479     if test -f $ac_dir/$ac_word; then
2480       ac_cv_prog_RANLIB="ranlib"
2481       break
2482     fi
2483   done
2484   IFS="$ac_save_ifs"
2485   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2486 fi
2487 fi
2488 RANLIB="$ac_cv_prog_RANLIB"
2489 if test -n "$RANLIB"; then
2490   echo "$ac_t""$RANLIB" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494
2495 # Extract the first word of "gcc", so it can be a program name with args.
2496 set dummy gcc; ac_word=$2
2497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_word" >&5
2499 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   if test -n "$CC"; then
2503   ac_cv_prog_CC="$CC" # Let the user override the test.
2504 else
2505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       ac_cv_prog_CC="gcc"
2511       break
2512     fi
2513   done
2514   IFS="$ac_save_ifs"
2515 fi
2516 fi
2517 CC="$ac_cv_prog_CC"
2518 if test -n "$CC"; then
2519   echo "$ac_t""$CC" 1>&6
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523
2524 if test -z "$CC"; then
2525   # Extract the first word of "cc", so it can be a program name with args.
2526 set dummy cc; ac_word=$2
2527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2528 echo "configure:2529: checking for $ac_word" >&5
2529 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2530   echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532   if test -n "$CC"; then
2533   ac_cv_prog_CC="$CC" # Let the user override the test.
2534 else
2535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2536   ac_prog_rejected=no
2537   ac_dummy="$PATH"
2538   for ac_dir in $ac_dummy; do
2539     test -z "$ac_dir" && ac_dir=.
2540     if test -f $ac_dir/$ac_word; then
2541       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2542         ac_prog_rejected=yes
2543         continue
2544       fi
2545       ac_cv_prog_CC="cc"
2546       break
2547     fi
2548   done
2549   IFS="$ac_save_ifs"
2550 if test $ac_prog_rejected = yes; then
2551   # We found a bogon in the path, so make sure we never use it.
2552   set dummy $ac_cv_prog_CC
2553   shift
2554   if test $# -gt 0; then
2555     # We chose a different compiler from the bogus one.
2556     # However, it has the same basename, so the bogon will be chosen
2557     # first if we set CC to just the basename; use the full file name.
2558     shift
2559     set dummy "$ac_dir/$ac_word" "$@"
2560     shift
2561     ac_cv_prog_CC="$@"
2562   fi
2563 fi
2564 fi
2565 fi
2566 CC="$ac_cv_prog_CC"
2567 if test -n "$CC"; then
2568   echo "$ac_t""$CC" 1>&6
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572
2573   if test -z "$CC"; then
2574     case "`uname -s`" in
2575     *win32* | *WIN32* | *CYGWIN*)
2576       # Extract the first word of "cl", so it can be a program name with args.
2577 set dummy cl; ac_word=$2
2578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2579 echo "configure:2580: checking for $ac_word" >&5
2580 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   if test -n "$CC"; then
2584   ac_cv_prog_CC="$CC" # Let the user override the test.
2585 else
2586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2587   ac_dummy="$PATH"
2588   for ac_dir in $ac_dummy; do
2589     test -z "$ac_dir" && ac_dir=.
2590     if test -f $ac_dir/$ac_word; then
2591       ac_cv_prog_CC="cl"
2592       break
2593     fi
2594   done
2595   IFS="$ac_save_ifs"
2596 fi
2597 fi
2598 CC="$ac_cv_prog_CC"
2599 if test -n "$CC"; then
2600   echo "$ac_t""$CC" 1>&6
2601 else
2602   echo "$ac_t""no" 1>&6
2603 fi
2604  ;;
2605     esac
2606   fi
2607   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2608 fi
2609
2610 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2611 echo "configure:2612: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2612
2613 ac_ext=c
2614 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2615 ac_cpp='$CPP $CPPFLAGS'
2616 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2617 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2618 cross_compiling=$ac_cv_prog_cc_cross
2619
2620 cat > conftest.$ac_ext << EOF
2621
2622 #line 2623 "configure"
2623 #include "confdefs.h"
2624
2625 main(){return(0);}
2626 EOF
2627 if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2628   ac_cv_prog_cc_works=yes
2629   # If we can't run a trivial program, we are probably using a cross compiler.
2630   if (./conftest; exit) 2>/dev/null; then
2631     ac_cv_prog_cc_cross=no
2632   else
2633     ac_cv_prog_cc_cross=yes
2634   fi
2635 else
2636   echo "configure: failed program was:" >&5
2637   cat conftest.$ac_ext >&5
2638   ac_cv_prog_cc_works=no
2639 fi
2640 rm -fr conftest*
2641 ac_ext=c
2642 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2643 ac_cpp='$CPP $CPPFLAGS'
2644 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2645 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2646 cross_compiling=$ac_cv_prog_cc_cross
2647
2648 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2649 if test $ac_cv_prog_cc_works = no; then
2650   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2651 fi
2652 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2653 echo "configure:2654: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2654 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2655 cross_compiling=$ac_cv_prog_cc_cross
2656
2657 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2658 echo "configure:2659: checking whether we are using GNU C" >&5
2659 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   cat > conftest.c <<EOF
2663 #ifdef __GNUC__
2664   yes;
2665 #endif
2666 EOF
2667 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2668   ac_cv_prog_gcc=yes
2669 else
2670   ac_cv_prog_gcc=no
2671 fi
2672 fi
2673
2674 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2675
2676 if test $ac_cv_prog_gcc = yes; then
2677   GCC=yes
2678 else
2679   GCC=
2680 fi
2681
2682 ac_test_CFLAGS="${CFLAGS+set}"
2683 ac_save_CFLAGS="$CFLAGS"
2684 CFLAGS=
2685 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2686 echo "configure:2687: checking whether ${CC-cc} accepts -g" >&5
2687 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2688   echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690   echo 'void f(){}' > conftest.c
2691 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2692   ac_cv_prog_cc_g=yes
2693 else
2694   ac_cv_prog_cc_g=no
2695 fi
2696 rm -f conftest*
2697
2698 fi
2699
2700 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2701 if test "$ac_test_CFLAGS" = set; then
2702   CFLAGS="$ac_save_CFLAGS"
2703 elif test $ac_cv_prog_cc_g = yes; then
2704   if test "$GCC" = yes; then
2705     CFLAGS="-g -O2"
2706   else
2707     CFLAGS="-g"
2708   fi
2709 else
2710   if test "$GCC" = yes; then
2711     CFLAGS="-O2"
2712   else
2713     CFLAGS=
2714   fi
2715 fi
2716
2717 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2718 if test "${with_gnu_ld+set}" = set; then
2719   withval="$with_gnu_ld"
2720   test "$withval" = no || with_gnu_ld=yes
2721 else
2722   with_gnu_ld=no
2723 fi
2724
2725 ac_prog=ld
2726 if test "$ac_cv_prog_gcc" = yes; then
2727   # Check if gcc -print-prog-name=ld gives a path.
2728   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2729 echo "configure:2730: checking for ld used by GCC" >&5
2730   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2731   case "$ac_prog" in
2732     # Accept absolute paths.
2733     [\\/]* | [A-Za-z]:[\\/]*)
2734       re_direlt='/[^/][^/]*/\.\./'
2735       # Canonicalize the path of ld
2736       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2737       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2738         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2739       done
2740       test -z "$LD" && LD="$ac_prog"
2741       ;;
2742   "")
2743     # If it fails, then pretend we aren't using GCC.
2744     ac_prog=ld
2745     ;;
2746   *)
2747     # If it is relative, then search for the first ld in PATH.
2748     with_gnu_ld=unknown
2749     ;;
2750   esac
2751 elif test "$with_gnu_ld" = yes; then
2752   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2753 echo "configure:2754: checking for GNU ld" >&5
2754 else
2755   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2756 echo "configure:2757: checking for non-GNU ld" >&5
2757 fi
2758 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2759   echo $ac_n "(cached) $ac_c" 1>&6
2760 else
2761   if test -z "$LD"; then
2762   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2763   for ac_dir in $PATH; do
2764     test -z "$ac_dir" && ac_dir=.
2765     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2766       ac_cv_path_LD="$ac_dir/$ac_prog"
2767       # Check to see if the program is GNU ld.  I'd rather use --version,
2768       # but apparently some GNU ld's only accept -v.
2769       # Break only if it was the GNU/non-GNU ld that we prefer.
2770       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2771         test "$with_gnu_ld" != no && break
2772       else
2773         test "$with_gnu_ld" != yes && break
2774       fi
2775     fi
2776   done
2777   IFS="$ac_save_ifs"
2778 else
2779   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2780 fi
2781 fi
2782
2783 LD="$ac_cv_path_LD"
2784 if test -n "$LD"; then
2785   echo "$ac_t""$LD" 1>&6
2786 else
2787   echo "$ac_t""no" 1>&6
2788 fi
2789 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2790
2791 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2792 echo "configure:2793: checking if the linker ($LD) is GNU ld" >&5
2793 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2797 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2798   ac_cv_prog_gnu_ld=yes
2799 else
2800   ac_cv_prog_gnu_ld=no
2801 fi
2802 fi
2803
2804 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2805
2806
2807 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2808 echo "configure:2809: checking for BSD-compatible nm" >&5
2809 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2810   echo $ac_n "(cached) $ac_c" 1>&6
2811 else
2812   if test -n "$NM"; then
2813   # Let the user override the test.
2814   ac_cv_path_NM="$NM"
2815 else
2816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2817   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2818     test -z "$ac_dir" && ac_dir=.
2819     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2820       # Check to see if the nm accepts a BSD-compat flag.
2821       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2822       #   nm: unknown option "B" ignored
2823       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2824         ac_cv_path_NM="$ac_dir/nm -B"
2825         break
2826       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2827         ac_cv_path_NM="$ac_dir/nm -p"
2828         break
2829       else
2830         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2831         continue # so that we can try to find one that supports BSD flags
2832       fi
2833     fi
2834   done
2835   IFS="$ac_save_ifs"
2836   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2837 fi
2838 fi
2839
2840 NM="$ac_cv_path_NM"
2841 echo "$ac_t""$NM" 1>&6
2842
2843
2844 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2845 echo "configure:2846: checking whether ln -s works" >&5
2846 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2847   echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849   rm -f conftestdata
2850 if ln -s X conftestdata 2>/dev/null
2851 then
2852   rm -f conftestdata
2853   ac_cv_prog_LN_S="ln -s"
2854 else
2855   ac_cv_prog_LN_S=ln
2856 fi
2857 fi
2858 LN_S="$ac_cv_prog_LN_S"
2859 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2860   echo "$ac_t""yes" 1>&6
2861 else
2862   echo "$ac_t""no" 1>&6
2863 fi
2864
2865
2866 # Check for any special flags to pass to ltconfig.
2867 libtool_flags="--cache-file=$cache_file"
2868 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2869 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2870 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2871 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2872 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2873 libtool_flags="$libtool_flags --enable-dlopen"
2874
2875 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2876 if test "${enable_libtool_lock+set}" = set; then
2877   enableval="$enable_libtool_lock"
2878   :
2879 fi
2880
2881 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2882 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2883
2884 # Some flags need to be propagated to the compiler or linker for good
2885 # libtool support.
2886 case "$host" in
2887 *-*-irix6*)
2888   # Find out which ABI we are using.
2889   echo '#line 2890 "configure"' > conftest.$ac_ext
2890   if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2891     case "`/usr/bin/file conftest.o`" in
2892     *32-bit*)
2893       LD="${LD-ld} -32"
2894       ;;
2895     *N32*)
2896       LD="${LD-ld} -n32"
2897       ;;
2898     *64-bit*)
2899       LD="${LD-ld} -64"
2900       ;;
2901     esac
2902   fi
2903   rm -rf conftest*
2904   ;;
2905
2906 *-*-sco3.2v5*)
2907   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2908   SAVE_CFLAGS="$CFLAGS"
2909   CFLAGS="$CFLAGS -belf"
2910   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2911 echo "configure:2912: checking whether the C compiler needs -belf" >&5
2912 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   cat > conftest.$ac_ext <<EOF
2916 #line 2917 "configure"
2917 #include "confdefs.h"
2918
2919 int main() {
2920
2921 ; return 0; }
2922 EOF
2923 if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2924   rm -rf conftest*
2925   lt_cv_cc_needs_belf=yes
2926 else
2927   echo "configure: failed program was:" >&5
2928   cat conftest.$ac_ext >&5
2929   rm -rf conftest*
2930   lt_cv_cc_needs_belf=no
2931 fi
2932 rm -f conftest*
2933 fi
2934
2935 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2936   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2937     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2938     CFLAGS="$SAVE_CFLAGS"
2939   fi
2940   ;;
2941
2942
2943 esac
2944
2945
2946 # Save cache, so that ltconfig can load it
2947
2948
2949 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2950 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2951 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2952 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2953 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2954 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2955 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2956 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2957
2958 # Reload cache, that may have been modified by ltconfig
2959
2960
2961 # This can be used to rebuild libtool when needed
2962 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2963
2964 # Always use our own libtool.
2965 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2966
2967 # Redirect the config.log output again, so that the ltconfig log is not
2968 # clobbered by the next message.
2969 exec 5>>./config.log
2970
2971
2972 for ac_prog in mawk gawk nawk awk
2973 do
2974 # Extract the first word of "$ac_prog", so it can be a program name with args.
2975 set dummy $ac_prog; ac_word=$2
2976 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2977 echo "configure:2978: checking for $ac_word" >&5
2978 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   if test -n "$AWK"; then
2982   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2983 else
2984   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2985   ac_dummy="$PATH"
2986   for ac_dir in $ac_dummy; do
2987     test -z "$ac_dir" && ac_dir=.
2988     if test -f $ac_dir/$ac_word; then
2989       ac_cv_prog_AWK="$ac_prog"
2990       break
2991     fi
2992   done
2993   IFS="$ac_save_ifs"
2994 fi
2995 fi
2996 AWK="$ac_cv_prog_AWK"
2997 if test -n "$AWK"; then
2998   echo "$ac_t""$AWK" 1>&6
2999 else
3000   echo "$ac_t""no" 1>&6
3001 fi
3002
3003 test -n "$AWK" && break
3004 done
3005
3006 # test for ln hardlink support
3007 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3008 echo "configure:3009: checking whether ln works" >&5
3009 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3010   echo $ac_n "(cached) $ac_c" 1>&6
3011 else
3012   rm -f conftest.src conftest.dst
3013 echo "conftest" > conftest.src
3014 if ln conftest.src conftest.dst 2>/dev/null
3015 then
3016   ol_cv_prog_LN_H="ln"
3017 else
3018   ol_cv_prog_LN_H="cp"
3019 fi
3020 rm -f conftest.src conftest.dst
3021
3022 fi
3023 LN_H="$ol_cv_prog_LN_H"
3024 if test "$ol_cv_prog_LN_H" = "ln"; then
3025         echo "$ac_t""yes" 1>&6
3026 else
3027         echo "$ac_t""no" 1>&6
3028 fi
3029
3030 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3031 echo "configure:3032: checking whether ln -s works" >&5
3032 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   rm -f conftestdata
3036 if ln -s X conftestdata 2>/dev/null
3037 then
3038   rm -f conftestdata
3039   ac_cv_prog_LN_S="ln -s"
3040 else
3041   ac_cv_prog_LN_S=ln
3042 fi
3043 fi
3044 LN_S="$ac_cv_prog_LN_S"
3045 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3046   echo "$ac_t""yes" 1>&6
3047 else
3048   echo "$ac_t""no" 1>&6
3049 fi
3050
3051
3052 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3053         LN_S="$LN_H"
3054 fi
3055
3056 # Extract the first word of "sendmail", so it can be a program name with args.
3057 set dummy sendmail; ac_word=$2
3058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3059 echo "configure:3060: checking for $ac_word" >&5
3060 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   case "$SENDMAIL" in
3064   /*)
3065   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3066   ;;
3067   ?:/*)                  
3068   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3069   ;;
3070   *)
3071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3072   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3073   for ac_dir in $ac_dummy; do 
3074     test -z "$ac_dir" && ac_dir=.
3075     if test -f $ac_dir/$ac_word; then
3076       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3077       break
3078     fi
3079   done
3080   IFS="$ac_save_ifs"
3081   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3082   ;;
3083 esac
3084 fi
3085 SENDMAIL="$ac_cv_path_SENDMAIL"
3086 if test -n "$SENDMAIL"; then
3087   echo "$ac_t""$SENDMAIL" 1>&6
3088 else
3089   echo "$ac_t""no" 1>&6
3090 fi
3091
3092 # Extract the first word of "vi", so it can be a program name with args.
3093 set dummy vi; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   case "$EDITOR" in
3100   /*)
3101   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3102   ;;
3103   ?:/*)                  
3104   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3105   ;;
3106   *)
3107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3108   ac_dummy="$PATH:/usr/ucb"
3109   for ac_dir in $ac_dummy; do 
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/$ac_word; then
3112       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3113       break
3114     fi
3115   done
3116   IFS="$ac_save_ifs"
3117   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3118   ;;
3119 esac
3120 fi
3121 EDITOR="$ac_cv_path_EDITOR"
3122 if test -n "$EDITOR"; then
3123   echo "$ac_t""$EDITOR" 1>&6
3124 else
3125   echo "$ac_t""no" 1>&6
3126 fi
3127
3128 # Extract the first word of "finger", so it can be a program name with args.
3129 set dummy finger; ac_word=$2
3130 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3131 echo "configure:3132: checking for $ac_word" >&5
3132 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   case "$FINGER" in
3136   /*)
3137   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3138   ;;
3139   ?:/*)                  
3140   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3141   ;;
3142   *)
3143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3144   ac_dummy="$PATH:/usr/ucb"
3145   for ac_dir in $ac_dummy; do 
3146     test -z "$ac_dir" && ac_dir=.
3147     if test -f $ac_dir/$ac_word; then
3148       ac_cv_path_FINGER="$ac_dir/$ac_word"
3149       break
3150     fi
3151   done
3152   IFS="$ac_save_ifs"
3153   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3154   ;;
3155 esac
3156 fi
3157 FINGER="$ac_cv_path_FINGER"
3158 if test -n "$FINGER"; then
3159   echo "$ac_t""$FINGER" 1>&6
3160 else
3161   echo "$ac_t""no" 1>&6
3162 fi
3163
3164
3165 ol_link_perl=no
3166 if test $ol_enable_perl != no ; then
3167         # Extract the first word of "perl", so it can be a program name with args.
3168 set dummy perl; ac_word=$2
3169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3170 echo "configure:3171: checking for $ac_word" >&5
3171 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3172   echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174   case "$PERLBIN" in
3175   /*)
3176   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3177   ;;
3178   ?:/*)                  
3179   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3180   ;;
3181   *)
3182   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3183   ac_dummy="$PATH"
3184   for ac_dir in $ac_dummy; do 
3185     test -z "$ac_dir" && ac_dir=.
3186     if test -f $ac_dir/$ac_word; then
3187       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3188       break
3189     fi
3190   done
3191   IFS="$ac_save_ifs"
3192   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3193   ;;
3194 esac
3195 fi
3196 PERLBIN="$ac_cv_path_PERLBIN"
3197 if test -n "$PERLBIN"; then
3198   echo "$ac_t""$PERLBIN" 1>&6
3199 else
3200   echo "$ac_t""no" 1>&6
3201 fi
3202
3203
3204         if test "no$PERLBIN" = "no" ; then
3205                 if test $ol_enable_perl = yes ; then
3206                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3207                 fi
3208
3209         else
3210                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3211                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3212
3213                                 ol_link_perl=yes
3214         fi
3215 fi
3216
3217 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3218 echo "configure:3219: checking how to run the C preprocessor" >&5
3219 # On Suns, sometimes $CPP names a directory.
3220 if test -n "$CPP" && test -d "$CPP"; then
3221   CPP=
3222 fi
3223 if test -z "$CPP"; then
3224 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227     # This must be in double quotes, not single quotes, because CPP may get
3228   # substituted into the Makefile and "${CC-cc}" will confuse make.
3229   CPP="${CC-cc} -E"
3230   # On the NeXT, cc -E runs the code through the compiler's parser,
3231   # not just through cpp.
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <assert.h>
3236 Syntax Error
3237 EOF
3238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3239 { (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241 if test -z "$ac_err"; then
3242   :
3243 else
3244   echo "$ac_err" >&5
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247   rm -rf conftest*
3248   CPP="${CC-cc} -E -traditional-cpp"
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <assert.h>
3253 Syntax Error
3254 EOF
3255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3256 { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3258 if test -z "$ac_err"; then
3259   :
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   CPP="${CC-cc} -nologo -E"
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include <assert.h>
3270 Syntax Error
3271 EOF
3272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3273 { (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3275 if test -z "$ac_err"; then
3276   :
3277 else
3278   echo "$ac_err" >&5
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   CPP=/lib/cpp
3283 fi
3284 rm -f conftest*
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289   ac_cv_prog_CPP="$CPP"
3290 fi
3291   CPP="$ac_cv_prog_CPP"
3292 else
3293   ac_cv_prog_CPP="$CPP"
3294 fi
3295 echo "$ac_t""$CPP" 1>&6
3296
3297
3298 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3299         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3300
3301 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3302         echo "configure: warning: programs compiled here do run here..." 1>&2
3303         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3304
3305 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3306         echo "configure: warning: programs compiled here do not run here..." 1>&2
3307         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3308 fi
3309
3310 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3311 echo "configure:3312: checking for AIX" >&5
3312 cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 #ifdef _AIX
3316   yes
3317 #endif
3318
3319 EOF
3320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3321   egrep "yes" >/dev/null 2>&1; then
3322   rm -rf conftest*
3323   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3324 #define _ALL_SOURCE 1
3325 EOF
3326
3327 else
3328   rm -rf conftest*
3329   echo "$ac_t""no" 1>&6
3330 fi
3331 rm -f conftest*
3332
3333
3334 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3335 echo "configure:3336: checking for POSIXized ISC" >&5
3336 if test -d /etc/conf/kconfig.d &&
3337   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3338 then
3339   echo "$ac_t""yes" 1>&6
3340   ISC=yes # If later tests want to check for ISC.
3341   cat >> confdefs.h <<\EOF
3342 #define _POSIX_SOURCE 1
3343 EOF
3344
3345   if test "$GCC" = yes; then
3346     CC="$CC -posix"
3347   else
3348     CC="$CC -Xp"
3349   fi
3350 else
3351   echo "$ac_t""no" 1>&6
3352   ISC=
3353 fi
3354
3355 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3356 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3357 echo "configure:3358: checking for minix/config.h" >&5
3358 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 #include <minix/config.h>
3365 EOF
3366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3367 { (eval echo configure:3368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3369 if test -z "$ac_err"; then
3370   rm -rf conftest*
3371   eval "ac_cv_header_$ac_safe=yes"
3372 else
3373   echo "$ac_err" >&5
3374   echo "configure: failed program was:" >&5
3375   cat conftest.$ac_ext >&5
3376   rm -rf conftest*
3377   eval "ac_cv_header_$ac_safe=no"
3378 fi
3379 rm -f conftest*
3380 fi
3381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3382   echo "$ac_t""yes" 1>&6
3383   MINIX=yes
3384 else
3385   echo "$ac_t""no" 1>&6
3386 MINIX=
3387 fi
3388
3389 if test "$MINIX" = yes; then
3390   cat >> confdefs.h <<\EOF
3391 #define _POSIX_SOURCE 1
3392 EOF
3393
3394   cat >> confdefs.h <<\EOF
3395 #define _POSIX_1_SOURCE 2
3396 EOF
3397
3398   cat >> confdefs.h <<\EOF
3399 #define _MINIX 1
3400 EOF
3401
3402 fi
3403
3404
3405 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3406 echo "configure:3407: checking for Cygwin environment" >&5
3407 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413
3414 int main() {
3415
3416 #ifndef __CYGWIN__
3417 #define __CYGWIN__ __CYGWIN32__
3418 #endif
3419 return __CYGWIN__;
3420 ; return 0; }
3421 EOF
3422 if { (eval echo configure:3423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3423   rm -rf conftest*
3424   ac_cv_cygwin=yes
3425 else
3426   echo "configure: failed program was:" >&5
3427   cat conftest.$ac_ext >&5
3428   rm -rf conftest*
3429   ac_cv_cygwin=no
3430 fi
3431 rm -f conftest*
3432 fi
3433
3434 echo "$ac_t""$ac_cv_cygwin" 1>&6
3435 CYGWIN=
3436 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3437 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3438 echo "configure:3439: checking for mingw32 environment" >&5
3439 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445
3446 int main() {
3447 return __MINGW32__;
3448 ; return 0; }
3449 EOF
3450 if { (eval echo configure:3451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3451   rm -rf conftest*
3452   ac_cv_mingw32=yes
3453 else
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   rm -rf conftest*
3457   ac_cv_mingw32=no
3458 fi
3459 rm -f conftest*
3460 fi
3461
3462 echo "$ac_t""$ac_cv_mingw32" 1>&6
3463 MINGW32=
3464 test "$ac_cv_mingw32" = yes && MINGW32=yes
3465 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3466 echo "configure:3467: checking for EMX OS/2 environment" >&5
3467 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473
3474 int main() {
3475 return __EMX__;
3476 ; return 0; }
3477 EOF
3478 if { (eval echo configure:3479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3479   rm -rf conftest*
3480   ac_cv_emxos2=yes
3481 else
3482   echo "configure: failed program was:" >&5
3483   cat conftest.$ac_ext >&5
3484   rm -rf conftest*
3485   ac_cv_emxos2=no
3486 fi
3487 rm -f conftest*
3488 fi
3489
3490 echo "$ac_t""$ac_cv_emxos2" 1>&6
3491 EMXOS2=
3492 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3493
3494
3495
3496 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3497 echo "configure:3498: checking for executable suffix" >&5
3498 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3502   ac_cv_exeext=.exe
3503 else
3504   rm -f conftest*
3505   echo 'int main () { return 0; }' > conftest.$ac_ext
3506   ac_cv_exeext=
3507   if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3508     for file in conftest.*; do
3509       case $file in
3510       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3511       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3512       esac
3513     done
3514   else
3515     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3516   fi
3517   rm -f conftest*
3518   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3519 fi
3520 fi
3521
3522 EXEEXT=""
3523 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3524 echo "$ac_t""${ac_cv_exeext}" 1>&6
3525 ac_exeext=$EXEEXT
3526
3527 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3528 echo "configure:3529: checking for object suffix" >&5
3529 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   rm -f conftest*
3533 echo 'int i = 1;' > conftest.$ac_ext
3534 if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3535   for ac_file in conftest.*; do
3536     case $ac_file in
3537     *.c) ;;
3538     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3539     esac
3540   done
3541 else
3542   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3543 fi
3544 rm -f conftest*
3545 fi
3546
3547 echo "$ac_t""$ac_cv_objext" 1>&6
3548 OBJEXT=$ac_cv_objext
3549 ac_objext=$ac_cv_objext
3550
3551
3552 cat >> confdefs.h <<EOF
3553 #define EXEEXT "${EXEEXT}"
3554 EOF
3555
3556
3557 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3558 echo "configure:3559: checking for be_app in -lbe" >&5
3559 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3560 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3561   echo $ac_n "(cached) $ac_c" 1>&6
3562 else
3563   ac_save_LIBS="$LIBS"
3564 LIBS="-lbe -lroot -lnet $LIBS"
3565 cat > conftest.$ac_ext <<EOF
3566 #line 3567 "configure"
3567 #include "confdefs.h"
3568 /* Override any gcc2 internal prototype to avoid an error.  */
3569 /* We use char because int might match the return type of a gcc2
3570     builtin and then its argument prototype would still apply.  */
3571 char be_app();
3572
3573 int main() {
3574 be_app()
3575 ; return 0; }
3576 EOF
3577 if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3578   rm -rf conftest*
3579   eval "ac_cv_lib_$ac_lib_var=yes"
3580 else
3581   echo "configure: failed program was:" >&5
3582   cat conftest.$ac_ext >&5
3583   rm -rf conftest*
3584   eval "ac_cv_lib_$ac_lib_var=no"
3585 fi
3586 rm -f conftest*
3587 LIBS="$ac_save_LIBS"
3588
3589 fi
3590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3591   echo "$ac_t""yes" 1>&6
3592   LIBS="$LIBS -lbe -lroot -lnet"
3593 else
3594   echo "$ac_t""no" 1>&6
3595 :
3596 fi
3597
3598
3599
3600
3601
3602 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3603 echo "configure:3604: checking for ${CC-cc} option to accept ANSI C" >&5
3604 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   am_cv_prog_cc_stdc=no
3608 ac_save_CC="$CC"
3609 # Don't try gcc -ansi; that turns off useful extensions and
3610 # breaks some systems' header files.
3611 # AIX                   -qlanglvl=ansi
3612 # Ultrix and OSF/1      -std1
3613 # HP-UX 10.20 and later -Ae
3614 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3615 # SVR4                  -Xc -D__EXTENSIONS__
3616 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3617 do
3618   CC="$ac_save_CC $ac_arg"
3619   cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 #include <stdarg.h>
3623 #include <stdio.h>
3624 #include <sys/types.h>
3625 #include <sys/stat.h>
3626 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3627 struct buf { int x; };
3628 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3629 static char *e (p, i)
3630      char **p;
3631      int i;
3632 {
3633   return p[i];
3634 }
3635 static char *f (char * (*g) (char **, int), char **p, ...)
3636 {
3637   char *s;
3638   va_list v;
3639   va_start (v,p);
3640   s = g (p, va_arg (v,int));
3641   va_end (v);
3642   return s;
3643 }
3644 int test (int i, double x);
3645 struct s1 {int (*f) (int a);};
3646 struct s2 {int (*f) (double a);};
3647 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3648 int argc;
3649 char **argv;
3650
3651 int main() {
3652
3653 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3654
3655 ; return 0; }
3656 EOF
3657 if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3658   rm -rf conftest*
3659   am_cv_prog_cc_stdc="$ac_arg"; break
3660 else
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663 fi
3664 rm -f conftest*
3665 done
3666 CC="$ac_save_CC"
3667
3668 fi
3669
3670 if test -z "$am_cv_prog_cc_stdc"; then
3671   echo "$ac_t""none needed" 1>&6
3672 else
3673   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3674 fi
3675 case "x$am_cv_prog_cc_stdc" in
3676   x|xno) ;;
3677   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3678 esac
3679
3680 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3681         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3682 fi
3683
3684 # test for make depend flag
3685 OL_MKDEP=
3686 OL_MKDEP_FLAGS=
3687 if test -z "${MKDEP}"; then
3688         OL_MKDEP="${CC-cc}"
3689         if test -z "${MKDEP_FLAGS}"; then
3690                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3691 echo "configure:3692: checking for ${OL_MKDEP} depend flag" >&5
3692 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   
3696                         ol_cv_mkdep=no
3697                         for flag in "-M" "-xM"; do
3698                                 cat > conftest.c <<EOF
3699  noCode;
3700 EOF
3701                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3702                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3703                                 then
3704                                         if test ! -f conftest."${ac_object}" ; then
3705                                                 ol_cv_mkdep=$flag
3706                                                 OL_MKDEP_FLAGS="$flag"
3707                                                 break
3708                                         fi
3709                                 fi
3710                         done
3711                         rm -f conftest*
3712                 
3713 fi
3714
3715 echo "$ac_t""$ol_cv_mkdep" 1>&6
3716         else
3717                 cc_cv_mkdep=yes
3718                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3719         fi
3720 else
3721         cc_cv_mkdep=yes
3722         OL_MKDEP="${MKDEP}"
3723         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3724 fi
3725
3726
3727
3728 if test "${ol_cv_mkdep}" = no ; then
3729         # this will soon become an error
3730         echo "configure: warning: do not know how to generate dependencies" 1>&2
3731 fi
3732
3733 ol_link_modules=no
3734 if test $ol_enable_modules != no ; then
3735         for ac_hdr in ltdl.h
3736 do
3737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3739 echo "configure:3740: checking for $ac_hdr" >&5
3740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3741   echo $ac_n "(cached) $ac_c" 1>&6
3742 else
3743   cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <$ac_hdr>
3747 EOF
3748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3749 { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3751 if test -z "$ac_err"; then
3752   rm -rf conftest*
3753   eval "ac_cv_header_$ac_safe=yes"
3754 else
3755   echo "$ac_err" >&5
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   eval "ac_cv_header_$ac_safe=no"
3760 fi
3761 rm -f conftest*
3762 fi
3763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3764   echo "$ac_t""yes" 1>&6
3765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3766   cat >> confdefs.h <<EOF
3767 #define $ac_tr_hdr 1
3768 EOF
3769  
3770 else
3771   echo "$ac_t""no" 1>&6
3772 fi
3773 done
3774
3775
3776         if test $ac_cv_header_ltdl_h = no ; then
3777                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3778
3779         fi
3780
3781         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3782 echo "configure:3783: checking for lt_dlinit in -lltdl" >&5
3783 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3785   echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787   ac_save_LIBS="$LIBS"
3788 LIBS="-lltdl  $LIBS"
3789 cat > conftest.$ac_ext <<EOF
3790 #line 3791 "configure"
3791 #include "confdefs.h"
3792 /* Override any gcc2 internal prototype to avoid an error.  */
3793 /* We use char because int might match the return type of a gcc2
3794     builtin and then its argument prototype would still apply.  */
3795 char lt_dlinit();
3796
3797 int main() {
3798 lt_dlinit()
3799 ; return 0; }
3800 EOF
3801 if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3802   rm -rf conftest*
3803   eval "ac_cv_lib_$ac_lib_var=yes"
3804 else
3805   echo "configure: failed program was:" >&5
3806   cat conftest.$ac_ext >&5
3807   rm -rf conftest*
3808   eval "ac_cv_lib_$ac_lib_var=no"
3809 fi
3810 rm -f conftest*
3811 LIBS="$ac_save_LIBS"
3812
3813 fi
3814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3815   echo "$ac_t""yes" 1>&6
3816     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3817     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3818   cat >> confdefs.h <<EOF
3819 #define $ac_tr_lib 1
3820 EOF
3821
3822   LIBS="-lltdl $LIBS"
3823
3824 else
3825   echo "$ac_t""no" 1>&6
3826 fi
3827
3828         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3829                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3830         fi
3831         ol_link_modules=yes
3832 else
3833         ol_with_bdb2_module=static
3834         ol_with_ldap_module=static
3835         ol_with_ldbm_module=static
3836         ol_with_passwd_module=static
3837         ol_with_perl_module=static
3838         ol_with_shell_module=static
3839         ol_with_tcl_module=static
3840 fi
3841
3842 # test for EBCDIC
3843 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3844 echo "configure:3845: checking for EBCDIC" >&5
3845 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3846   echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848   
3849         cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852
3853 #if !('M' == 0xd4)
3854 #include <__ASCII__/generate_error.h>
3855 #endif
3856
3857 EOF
3858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3859 { (eval echo configure:3860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3861 if test -z "$ac_err"; then
3862   rm -rf conftest*
3863   ol_cv_cpp_ebcdic=yes
3864 else
3865   echo "$ac_err" >&5
3866   echo "configure: failed program was:" >&5
3867   cat conftest.$ac_ext >&5
3868   rm -rf conftest*
3869   ol_cv_cpp_ebcdic=no
3870 fi
3871 rm -f conftest*
3872 fi
3873
3874 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3875 if test $ol_cv_cpp_ebcdic = yes ; then
3876         cat >> confdefs.h <<\EOF
3877 #define HAVE_EBCDIC 1
3878 EOF
3879
3880 fi
3881
3882 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3883 echo "configure:3884: checking for ANSI C header files" >&5
3884 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3885   echo $ac_n "(cached) $ac_c" 1>&6
3886 else
3887   cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 #include <stdlib.h>
3891 #include <stdarg.h>
3892 #include <string.h>
3893 #include <float.h>
3894 EOF
3895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3896 { (eval echo configure:3897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3898 if test -z "$ac_err"; then
3899   rm -rf conftest*
3900   ol_cv_header_stdc=yes
3901 else
3902   echo "$ac_err" >&5
3903   echo "configure: failed program was:" >&5
3904   cat conftest.$ac_ext >&5
3905   rm -rf conftest*
3906   ol_cv_header_stdc=no
3907 fi
3908 rm -f conftest*
3909
3910 if test $ol_cv_header_stdc = yes; then
3911   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <string.h>
3916 EOF
3917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918   egrep "memchr" >/dev/null 2>&1; then
3919   :
3920 else
3921   rm -rf conftest*
3922   ol_cv_header_stdc=no
3923 fi
3924 rm -f conftest*
3925
3926 fi
3927
3928 if test $ol_cv_header_stdc = yes; then
3929   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3930 cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 #include <stdlib.h>
3934 EOF
3935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3936   egrep "free" >/dev/null 2>&1; then
3937   :
3938 else
3939   rm -rf conftest*
3940   ol_cv_header_stdc=no
3941 fi
3942 rm -f conftest*
3943
3944 fi
3945
3946 if test $ol_cv_header_stdc = yes; then
3947   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3948 if test "$cross_compiling" = yes; then
3949   :
3950 else
3951   cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <ctype.h>
3955 #ifndef HAVE_EBCDIC
3956 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3957 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3958 #else
3959 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3960                 || ('j' <= (c) && (c) <= 'r') \
3961                 || ('s' <= (c) && (c) <= 'z'))
3962 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3963 #endif
3964 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3965 int main () { int i; for (i = 0; i < 256; i++)
3966 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3967 exit (0); }
3968
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3971 then
3972   :
3973 else
3974   echo "configure: failed program was:" >&5
3975   cat conftest.$ac_ext >&5
3976   rm -fr conftest*
3977   ol_cv_header_stdc=no
3978 fi
3979 rm -fr conftest*
3980 fi
3981
3982 fi
3983 fi
3984
3985 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3986 if test $ol_cv_header_stdc = yes; then
3987   cat >> confdefs.h <<\EOF
3988 #define STDC_HEADERS 1
3989 EOF
3990
3991 fi
3992 ac_cv_header_stdc=disable
3993
3994
3995 if test $ol_cv_header_stdc != yes; then
3996         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3997 fi
3998
3999 ac_header_dirent=no
4000 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4001 do
4002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4003 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4004 echo "configure:4005: checking for $ac_hdr that defines DIR" >&5
4005 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4006   echo $ac_n "(cached) $ac_c" 1>&6
4007 else
4008   cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011 #include <sys/types.h>
4012 #include <$ac_hdr>
4013 int main() {
4014 DIR *dirp = 0;
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   eval "ac_cv_header_dirent_$ac_safe=yes"
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   eval "ac_cv_header_dirent_$ac_safe=no"
4025 fi
4026 rm -f conftest*
4027 fi
4028 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4029   echo "$ac_t""yes" 1>&6
4030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4031   cat >> confdefs.h <<EOF
4032 #define $ac_tr_hdr 1
4033 EOF
4034  ac_header_dirent=$ac_hdr; break
4035 else
4036   echo "$ac_t""no" 1>&6
4037 fi
4038 done
4039 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4040 if test $ac_header_dirent = dirent.h; then
4041 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4042 echo "configure:4043: checking for opendir in -ldir" >&5
4043 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   ac_save_LIBS="$LIBS"
4048 LIBS="-ldir  $LIBS"
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 /* Override any gcc2 internal prototype to avoid an error.  */
4053 /* We use char because int might match the return type of a gcc2
4054     builtin and then its argument prototype would still apply.  */
4055 char opendir();
4056
4057 int main() {
4058 opendir()
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062   rm -rf conftest*
4063   eval "ac_cv_lib_$ac_lib_var=yes"
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067   rm -rf conftest*
4068   eval "ac_cv_lib_$ac_lib_var=no"
4069 fi
4070 rm -f conftest*
4071 LIBS="$ac_save_LIBS"
4072
4073 fi
4074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4075   echo "$ac_t""yes" 1>&6
4076   LIBS="$LIBS -ldir"
4077 else
4078   echo "$ac_t""no" 1>&6
4079 fi
4080
4081 else
4082 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4083 echo "configure:4084: checking for opendir in -lx" >&5
4084 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   ac_save_LIBS="$LIBS"
4089 LIBS="-lx  $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char opendir();
4097
4098 int main() {
4099 opendir()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117   LIBS="$LIBS -lx"
4118 else
4119   echo "$ac_t""no" 1>&6
4120 fi
4121
4122 fi
4123
4124 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4125 echo "configure:4126: checking for sys/wait.h that is POSIX.1 compatible" >&5
4126 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4127   echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129   cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <sys/types.h>
4133 #include <sys/wait.h>
4134 #ifndef WEXITSTATUS
4135 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4136 #endif
4137 #ifndef WIFEXITED
4138 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4139 #endif
4140 int main() {
4141 int s;
4142 wait (&s);
4143 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147   rm -rf conftest*
4148   ac_cv_header_sys_wait_h=yes
4149 else
4150   echo "configure: failed program was:" >&5
4151   cat conftest.$ac_ext >&5
4152   rm -rf conftest*
4153   ac_cv_header_sys_wait_h=no
4154 fi
4155 rm -f conftest*
4156 fi
4157
4158 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4159 if test $ac_cv_header_sys_wait_h = yes; then
4160   cat >> confdefs.h <<\EOF
4161 #define HAVE_SYS_WAIT_H 1
4162 EOF
4163
4164 fi
4165
4166 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4167 echo "configure:4168: checking POSIX termios" >&5
4168 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   cat > conftest.$ac_ext <<EOF
4172 #line 4173 "configure"
4173 #include "confdefs.h"
4174 #include <sys/types.h>
4175 #include <unistd.h>
4176 #include <termios.h>
4177 int main() {
4178 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4179    tcgetattr(0, 0);
4180 ; return 0; }
4181 EOF
4182 if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4183   rm -rf conftest*
4184   am_cv_sys_posix_termios=yes
4185 else
4186   echo "configure: failed program was:" >&5
4187   cat conftest.$ac_ext >&5
4188   rm -rf conftest*
4189   am_cv_sys_posix_termios=no
4190 fi
4191 rm -f conftest*
4192 fi
4193
4194 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4195
4196
4197  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4198 echo "configure:4199: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4199 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4200   echo $ac_n "(cached) $ac_c" 1>&6
4201 else
4202   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4203
4204   gwinsz_in_termios_h=no
4205   if test $am_cv_sys_posix_termios = yes; then
4206     cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209 #include <sys/types.h>
4210 #     include <termios.h>
4211 #     ifdef TIOCGWINSZ
4212         yes
4213 #     endif
4214     
4215 EOF
4216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4217   egrep "yes" >/dev/null 2>&1; then
4218   rm -rf conftest*
4219   gwinsz_in_termios_h=yes
4220 fi
4221 rm -f conftest*
4222
4223   fi
4224
4225   if test $gwinsz_in_termios_h = no; then
4226     cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 #include <sys/types.h>
4230 #     include <sys/ioctl.h>
4231 #     ifdef TIOCGWINSZ
4232         yes
4233 #     endif
4234     
4235 EOF
4236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4237   egrep "yes" >/dev/null 2>&1; then
4238   rm -rf conftest*
4239   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4240 fi
4241 rm -f conftest*
4242
4243   fi
4244   
4245 fi
4246
4247 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4248   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4249     cat >> confdefs.h <<\EOF
4250 #define GWINSZ_IN_SYS_IOCTL 1
4251 EOF
4252
4253   fi
4254
4255 if test $am_cv_sys_posix_termios = yes ; then
4256         cat >> confdefs.h <<\EOF
4257 #define HAVE_POSIX_TERMIOS 1
4258 EOF
4259
4260 fi
4261
4262 for ac_hdr in \
4263         arpa/inet.h             \
4264         arpa/nameser.h  \
4265         assert.h                \
4266         crypt.h                 \
4267         errno.h                 \
4268         fcntl.h                 \
4269         filio.h                 \
4270         getopt.h                \
4271         grp.h                   \
4272         libutil.h               \
4273         limits.h                \
4274         locale.h                \
4275         netinet/tcp.h   \
4276         malloc.h                \
4277         memory.h                \
4278         psap.h                  \
4279         pwd.h                   \
4280         resolv.h                \
4281         sgtty.h                 \
4282         shadow.h                \
4283         stdarg.h                \
4284         stddef.h                \
4285         string.h                \
4286         strings.h               \
4287         sysexits.h              \
4288         sys/file.h              \
4289         sys/filio.h             \
4290         sys/errno.h             \
4291         sys/ioctl.h             \
4292         sys/param.h             \
4293         sys/resource.h  \
4294         sys/select.h    \
4295         sys/socket.h    \
4296         sys/syslog.h    \
4297         sys/time.h              \
4298         sys/types.h             \
4299         syslog.h                \
4300         termios.h               \
4301         unistd.h                \
4302
4303 do
4304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4305 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_hdr" >&5
4307 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 #include <$ac_hdr>
4314 EOF
4315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4316 { (eval echo configure:4317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4318 if test -z "$ac_err"; then
4319   rm -rf conftest*
4320   eval "ac_cv_header_$ac_safe=yes"
4321 else
4322   echo "$ac_err" >&5
4323   echo "configure: failed program was:" >&5
4324   cat conftest.$ac_ext >&5
4325   rm -rf conftest*
4326   eval "ac_cv_header_$ac_safe=no"
4327 fi
4328 rm -f conftest*
4329 fi
4330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4331   echo "$ac_t""yes" 1>&6
4332     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4333   cat >> confdefs.h <<EOF
4334 #define $ac_tr_hdr 1
4335 EOF
4336  
4337 else
4338   echo "$ac_t""no" 1>&6
4339 fi
4340 done
4341
4342
4343
4344
4345 echo $ac_n "checking for socket""... $ac_c" 1>&6
4346 echo "configure:4347: checking for socket" >&5
4347 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   cat > conftest.$ac_ext <<EOF
4351 #line 4352 "configure"
4352 #include "confdefs.h"
4353 /* System header to define __stub macros and hopefully few prototypes,
4354     which can conflict with char socket(); below.  */
4355 #include <assert.h>
4356 /* Override any gcc2 internal prototype to avoid an error.  */
4357 /* We use char because int might match the return type of a gcc2
4358     builtin and then its argument prototype would still apply.  */
4359 char socket();
4360 char (*f)();
4361
4362 int main() {
4363
4364 /* The GNU C library defines this for functions which it implements
4365     to always fail with ENOSYS.  Some functions are actually named
4366     something starting with __ and the normal name is an alias.  */
4367 #if defined (__stub_socket) || defined (__stub___socket)
4368 choke me
4369 #else
4370 f = socket;
4371 #endif
4372
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376   rm -rf conftest*
4377   eval "ac_cv_func_socket=yes"
4378 else
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   eval "ac_cv_func_socket=no"
4383 fi
4384 rm -f conftest*
4385 fi
4386
4387 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4388   echo "$ac_t""yes" 1>&6
4389   :
4390 else
4391   echo "$ac_t""no" 1>&6
4392         
4393         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4394 echo "configure:4395: checking for main in -lsocket" >&5
4395 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4396 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4397   echo $ac_n "(cached) $ac_c" 1>&6
4398 else
4399   ac_save_LIBS="$LIBS"
4400 LIBS="-lsocket  $LIBS"
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404
4405 int main() {
4406 main()
4407 ; return 0; }
4408 EOF
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4410   rm -rf conftest*
4411   eval "ac_cv_lib_$ac_lib_var=yes"
4412 else
4413   echo "configure: failed program was:" >&5
4414   cat conftest.$ac_ext >&5
4415   rm -rf conftest*
4416   eval "ac_cv_lib_$ac_lib_var=no"
4417 fi
4418 rm -f conftest*
4419 LIBS="$ac_save_LIBS"
4420
4421 fi
4422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4423   echo "$ac_t""yes" 1>&6
4424     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4425     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4426   cat >> confdefs.h <<EOF
4427 #define $ac_tr_lib 1
4428 EOF
4429
4430   LIBS="-lsocket $LIBS"
4431
4432 else
4433   echo "$ac_t""no" 1>&6
4434 fi
4435
4436         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4437 echo "configure:4438: checking for main in -lnet" >&5
4438 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4439 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4440   echo $ac_n "(cached) $ac_c" 1>&6
4441 else
4442   ac_save_LIBS="$LIBS"
4443 LIBS="-lnet  $LIBS"
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447
4448 int main() {
4449 main()
4450 ; return 0; }
4451 EOF
4452 if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4453   rm -rf conftest*
4454   eval "ac_cv_lib_$ac_lib_var=yes"
4455 else
4456   echo "configure: failed program was:" >&5
4457   cat conftest.$ac_ext >&5
4458   rm -rf conftest*
4459   eval "ac_cv_lib_$ac_lib_var=no"
4460 fi
4461 rm -f conftest*
4462 LIBS="$ac_save_LIBS"
4463
4464 fi
4465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4466   echo "$ac_t""yes" 1>&6
4467     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4468     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4469   cat >> confdefs.h <<EOF
4470 #define $ac_tr_lib 1
4471 EOF
4472
4473   LIBS="-lnet $LIBS"
4474
4475 else
4476   echo "$ac_t""no" 1>&6
4477 fi
4478
4479         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4480 echo "configure:4481: checking for socket in -lnet" >&5
4481 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   ac_save_LIBS="$LIBS"
4486 LIBS="-lnet  $LIBS"
4487 cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490 /* Override any gcc2 internal prototype to avoid an error.  */
4491 /* We use char because int might match the return type of a gcc2
4492     builtin and then its argument prototype would still apply.  */
4493 char socket();
4494
4495 int main() {
4496 socket()
4497 ; return 0; }
4498 EOF
4499 if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4500   rm -rf conftest*
4501   eval "ac_cv_lib_$ac_lib_var=yes"
4502 else
4503   echo "configure: failed program was:" >&5
4504   cat conftest.$ac_ext >&5
4505   rm -rf conftest*
4506   eval "ac_cv_lib_$ac_lib_var=no"
4507 fi
4508 rm -f conftest*
4509 LIBS="$ac_save_LIBS"
4510
4511 fi
4512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4513   echo "$ac_t""yes" 1>&6
4514     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4516   cat >> confdefs.h <<EOF
4517 #define $ac_tr_lib 1
4518 EOF
4519
4520   LIBS="-lnet $LIBS"
4521
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525
4526         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4527 echo "configure:4528: checking for main in -lnsl_s" >&5
4528 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   ac_save_LIBS="$LIBS"
4533 LIBS="-lnsl_s  $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537
4538 int main() {
4539 main()
4540 ; return 0; }
4541 EOF
4542 if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4543   rm -rf conftest*
4544   eval "ac_cv_lib_$ac_lib_var=yes"
4545 else
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548   rm -rf conftest*
4549   eval "ac_cv_lib_$ac_lib_var=no"
4550 fi
4551 rm -f conftest*
4552 LIBS="$ac_save_LIBS"
4553
4554 fi
4555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4556   echo "$ac_t""yes" 1>&6
4557     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4558     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4559   cat >> confdefs.h <<EOF
4560 #define $ac_tr_lib 1
4561 EOF
4562
4563   LIBS="-lnsl_s $LIBS"
4564
4565 else
4566   echo "$ac_t""no" 1>&6
4567 fi
4568
4569         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4570 echo "configure:4571: checking for main in -lnsl" >&5
4571 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4572 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   ac_save_LIBS="$LIBS"
4576 LIBS="-lnsl  $LIBS"
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580
4581 int main() {
4582 main()
4583 ; return 0; }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4586   rm -rf conftest*
4587   eval "ac_cv_lib_$ac_lib_var=yes"
4588 else
4589   echo "configure: failed program was:" >&5
4590   cat conftest.$ac_ext >&5
4591   rm -rf conftest*
4592   eval "ac_cv_lib_$ac_lib_var=no"
4593 fi
4594 rm -f conftest*
4595 LIBS="$ac_save_LIBS"
4596
4597 fi
4598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4599   echo "$ac_t""yes" 1>&6
4600     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4601     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4602   cat >> confdefs.h <<EOF
4603 #define $ac_tr_lib 1
4604 EOF
4605
4606   LIBS="-lnsl $LIBS"
4607
4608 else
4609   echo "$ac_t""no" 1>&6
4610 fi
4611
4612         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4613 echo "configure:4614: checking for socket in -linet" >&5
4614 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4615 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4616   echo $ac_n "(cached) $ac_c" 1>&6
4617 else
4618   ac_save_LIBS="$LIBS"
4619 LIBS="-linet  $LIBS"
4620 cat > conftest.$ac_ext <<EOF
4621 #line 4622 "configure"
4622 #include "confdefs.h"
4623 /* Override any gcc2 internal prototype to avoid an error.  */
4624 /* We use char because int might match the return type of a gcc2
4625     builtin and then its argument prototype would still apply.  */
4626 char socket();
4627
4628 int main() {
4629 socket()
4630 ; return 0; }
4631 EOF
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4633   rm -rf conftest*
4634   eval "ac_cv_lib_$ac_lib_var=yes"
4635 else
4636   echo "configure: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   rm -rf conftest*
4639   eval "ac_cv_lib_$ac_lib_var=no"
4640 fi
4641 rm -f conftest*
4642 LIBS="$ac_save_LIBS"
4643
4644 fi
4645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4646   echo "$ac_t""yes" 1>&6
4647     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4648     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4649   cat >> confdefs.h <<EOF
4650 #define $ac_tr_lib 1
4651 EOF
4652
4653   LIBS="-linet $LIBS"
4654
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4660 echo "configure:4661: checking for main in -lgen" >&5
4661 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   ac_save_LIBS="$LIBS"
4666 LIBS="-lgen  $LIBS"
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670
4671 int main() {
4672 main()
4673 ; return 0; }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4676   rm -rf conftest*
4677   eval "ac_cv_lib_$ac_lib_var=yes"
4678 else
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   eval "ac_cv_lib_$ac_lib_var=no"
4683 fi
4684 rm -f conftest*
4685 LIBS="$ac_save_LIBS"
4686
4687 fi
4688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4689   echo "$ac_t""yes" 1>&6
4690     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4691     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4692   cat >> confdefs.h <<EOF
4693 #define $ac_tr_lib 1
4694 EOF
4695
4696   LIBS="-lgen $LIBS"
4697
4698 else
4699   echo "$ac_t""no" 1>&6
4700 fi
4701
4702
4703 fi
4704
4705
4706 echo $ac_n "checking for select""... $ac_c" 1>&6
4707 echo "configure:4708: checking for select" >&5
4708 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   cat > conftest.$ac_ext <<EOF
4712 #line 4713 "configure"
4713 #include "confdefs.h"
4714 /* System header to define __stub macros and hopefully few prototypes,
4715     which can conflict with char select(); below.  */
4716 #include <assert.h>
4717 /* Override any gcc2 internal prototype to avoid an error.  */
4718 /* We use char because int might match the return type of a gcc2
4719     builtin and then its argument prototype would still apply.  */
4720 char select();
4721 char (*f)();
4722
4723 int main() {
4724
4725 /* The GNU C library defines this for functions which it implements
4726     to always fail with ENOSYS.  Some functions are actually named
4727     something starting with __ and the normal name is an alias.  */
4728 #if defined (__stub_select) || defined (__stub___select)
4729 choke me
4730 #else
4731 f = select;
4732 #endif
4733
4734 ; return 0; }
4735 EOF
4736 if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737   rm -rf conftest*
4738   eval "ac_cv_func_select=yes"
4739 else
4740   echo "configure: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   rm -rf conftest*
4743   eval "ac_cv_func_select=no"
4744 fi
4745 rm -f conftest*
4746 fi
4747
4748 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4749   echo "$ac_t""yes" 1>&6
4750   :
4751 else
4752   echo "$ac_t""no" 1>&6
4753 { echo "configure: error: select() required." 1>&2; exit 1; }
4754 fi
4755
4756
4757 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4758 echo "configure:4759: checking types of arguments for select()" >&5
4759  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4763   echo $ac_n "(cached) $ac_c" 1>&6
4764 else
4765     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4769      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4770       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4771        cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774 #ifdef HAVE_SYS_TYPES_H
4775 #include <sys/types.h>
4776 #endif
4777 #ifdef HAVE_SYS_TIME_H
4778 #include <sys/time.h>
4779 #endif
4780 #ifdef HAVE_SYS_SELECT_H
4781 #include <sys/select.h>
4782 #endif
4783 #ifdef HAVE_SYS_SOCKET_H
4784 #include <sys/socket.h>
4785 #endif
4786 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);
4787 int main() {
4788
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4792   rm -rf conftest*
4793           ac_not_found=no ; break 3
4794 else
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   ac_not_found=yes
4799 fi
4800 rm -f conftest*
4801       done
4802      done
4803     done
4804    
4805 fi
4806   
4807 fi
4808  
4809 fi
4810  if test "$ac_not_found" = yes; then
4811   ac_cv_func_select_arg1=int 
4812   ac_cv_func_select_arg234='int *' 
4813   ac_cv_func_select_arg5='struct timeval *'
4814  fi
4815  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4816  cat >> confdefs.h <<EOF
4817 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4818 EOF
4819
4820  cat >> confdefs.h <<EOF
4821 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4822 EOF
4823
4824  cat >> confdefs.h <<EOF
4825 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4826 EOF
4827
4828
4829
4830
4831 for ac_hdr in regex.h 
4832 do
4833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4835 echo "configure:4836: checking for $ac_hdr" >&5
4836 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842 #include <$ac_hdr>
4843 EOF
4844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4845 { (eval echo configure:4846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4847 if test -z "$ac_err"; then
4848   rm -rf conftest*
4849   eval "ac_cv_header_$ac_safe=yes"
4850 else
4851   echo "$ac_err" >&5
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   eval "ac_cv_header_$ac_safe=no"
4856 fi
4857 rm -f conftest*
4858 fi
4859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4862   cat >> confdefs.h <<EOF
4863 #define $ac_tr_hdr 1
4864 EOF
4865  
4866 else
4867   echo "$ac_t""no" 1>&6
4868 fi
4869 done
4870
4871 if test "$ac_cv_header_regex_h" != yes ; then
4872         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4873 fi
4874 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4875 echo "configure:4876: checking for regfree" >&5
4876 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 /* System header to define __stub macros and hopefully few prototypes,
4883     which can conflict with char regfree(); below.  */
4884 #include <assert.h>
4885 /* Override any gcc2 internal prototype to avoid an error.  */
4886 /* We use char because int might match the return type of a gcc2
4887     builtin and then its argument prototype would still apply.  */
4888 char regfree();
4889 char (*f)();
4890
4891 int main() {
4892
4893 /* The GNU C library defines this for functions which it implements
4894     to always fail with ENOSYS.  Some functions are actually named
4895     something starting with __ and the normal name is an alias.  */
4896 #if defined (__stub_regfree) || defined (__stub___regfree)
4897 choke me
4898 #else
4899 f = regfree;
4900 #endif
4901
4902 ; return 0; }
4903 EOF
4904 if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4905   rm -rf conftest*
4906   eval "ac_cv_func_regfree=yes"
4907 else
4908   echo "configure: failed program was:" >&5
4909   cat conftest.$ac_ext >&5
4910   rm -rf conftest*
4911   eval "ac_cv_func_regfree=no"
4912 fi
4913 rm -f conftest*
4914 fi
4915
4916 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4917   echo "$ac_t""yes" 1>&6
4918   :
4919 else
4920   echo "$ac_t""no" 1>&6
4921 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4922 fi
4923
4924
4925
4926 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4927 echo "configure:4928: checking for compatible POSIX regex" >&5
4928 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   
4932         if test "$cross_compiling" = yes; then
4933   ol_cv_c_posix_regex=cross
4934 else
4935   cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938
4939 #include <sys/types.h>
4940 #include <regex.h>
4941 static char *pattern, *string;
4942 main()
4943 {
4944         int rc;
4945         regex_t re;
4946
4947         pattern = "^A";
4948
4949         if(regcomp(&re, pattern, 0)) {
4950                 return -1;
4951         }
4952         
4953         string = "ALL MATCH";
4954         
4955         rc = regexec(&re, string, 0, (void*)0, 0);
4956
4957         regfree(&re);
4958
4959         return rc;
4960 }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4963 then
4964   ol_cv_c_posix_regex=yes
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -fr conftest*
4969   ol_cv_c_posix_regex=no
4970 fi
4971 rm -fr conftest*
4972 fi
4973
4974 fi
4975
4976 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4977
4978 if test "$ol_cv_c_posix_regex" = no ; then
4979         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4980 fi
4981
4982
4983 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4984 echo "configure:4985: checking for sigset in -lV3" >&5
4985 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4987   echo $ac_n "(cached) $ac_c" 1>&6
4988 else
4989   ac_save_LIBS="$LIBS"
4990 LIBS="-lV3  $LIBS"
4991 cat > conftest.$ac_ext <<EOF
4992 #line 4993 "configure"
4993 #include "confdefs.h"
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 /* We use char because int might match the return type of a gcc2
4996     builtin and then its argument prototype would still apply.  */
4997 char sigset();
4998
4999 int main() {
5000 sigset()
5001 ; return 0; }
5002 EOF
5003 if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=yes"
5006 else
5007   echo "configure: failed program was:" >&5
5008   cat conftest.$ac_ext >&5
5009   rm -rf conftest*
5010   eval "ac_cv_lib_$ac_lib_var=no"
5011 fi
5012 rm -f conftest*
5013 LIBS="$ac_save_LIBS"
5014
5015 fi
5016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5017   echo "$ac_t""yes" 1>&6
5018     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_lib 1
5022 EOF
5023
5024   LIBS="-lV3 $LIBS"
5025
5026 else
5027   echo "$ac_t""no" 1>&6
5028 fi
5029
5030
5031
5032 # find res_search
5033 if test $ol_enable_dns != no ; then
5034                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5035 echo "configure:5036: checking for res_search" >&5
5036 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5037   echo $ac_n "(cached) $ac_c" 1>&6
5038 else
5039   cat > conftest.$ac_ext <<EOF
5040 #line 5041 "configure"
5041 #include "confdefs.h"
5042 /* System header to define __stub macros and hopefully few prototypes,
5043     which can conflict with char res_search(); below.  */
5044 #include <assert.h>
5045 /* Override any gcc2 internal prototype to avoid an error.  */
5046 /* We use char because int might match the return type of a gcc2
5047     builtin and then its argument prototype would still apply.  */
5048 char res_search();
5049 char (*f)();
5050
5051 int main() {
5052
5053 /* The GNU C library defines this for functions which it implements
5054     to always fail with ENOSYS.  Some functions are actually named
5055     something starting with __ and the normal name is an alias.  */
5056 #if defined (__stub_res_search) || defined (__stub___res_search)
5057 choke me
5058 #else
5059 f = res_search;
5060 #endif
5061
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065   rm -rf conftest*
5066   eval "ac_cv_func_res_search=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_func_res_search=no"
5072 fi
5073 rm -f conftest*
5074 fi
5075
5076 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078   :
5079 else
5080   echo "$ac_t""no" 1>&6
5081 fi
5082
5083         if test $ac_cv_func_res_search = no ; then 
5084                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5085 echo "configure:5086: checking for res_search in -lbind" >&5
5086 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   ac_save_LIBS="$LIBS"
5091 LIBS="-lbind  $LIBS"
5092 cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char res_search();
5099
5100 int main() {
5101 res_search()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lbind $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130
5131                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5132         fi
5133         if test $ac_cv_func_res_search = no ; then 
5134                 echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5135 echo "configure:5136: checking for __res_search in -lbind" >&5
5136 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-lbind  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char __res_search();
5149
5150 int main() {
5151 __res_search()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-lbind $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180
5181                 ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5182         fi
5183         if test $ac_cv_func_res_search = no ; then 
5184                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5185 echo "configure:5186: checking for res_search in -lresolv" >&5
5186 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190   ac_save_LIBS="$LIBS"
5191 LIBS="-lresolv  $LIBS"
5192 cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195 /* Override any gcc2 internal prototype to avoid an error.  */
5196 /* We use char because int might match the return type of a gcc2
5197     builtin and then its argument prototype would still apply.  */
5198 char res_search();
5199
5200 int main() {
5201 res_search()
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     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5221   cat >> confdefs.h <<EOF
5222 #define $ac_tr_lib 1
5223 EOF
5224
5225   LIBS="-lresolv $LIBS"
5226
5227 else
5228   echo "$ac_t""no" 1>&6
5229 fi
5230
5231                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5232         fi
5233
5234         if test "$ac_cv_func_res_search" = yes ; then
5235                 cat >> confdefs.h <<\EOF
5236 #define HAVE_RES_SEARCH 1
5237 EOF
5238
5239         elif test $ol_enable_dns = yes ; then
5240                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5241         else
5242                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5243         fi
5244 fi
5245
5246
5247 # ISODE tests
5248 ol_link_isode=no
5249 if test $ol_enable_ldapd != no ; then
5250         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5251
5252                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5253 echo "configure:5254: checking for main in -lxtpp" >&5
5254 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5256   echo $ac_n "(cached) $ac_c" 1>&6
5257 else
5258   ac_save_LIBS="$LIBS"
5259 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5260 cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263
5264 int main() {
5265 main()
5266 ; return 0; }
5267 EOF
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5269   rm -rf conftest*
5270   eval "ac_cv_lib_$ac_lib_var=yes"
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274   rm -rf conftest*
5275   eval "ac_cv_lib_$ac_lib_var=no"
5276 fi
5277 rm -f conftest*
5278 LIBS="$ac_save_LIBS"
5279
5280 fi
5281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283   
5284                 ol_link_isode=yes
5285                 cat >> confdefs.h <<\EOF
5286 #define HAVE_XTPP 1
5287 EOF
5288
5289                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5290                 
5291 else
5292   echo "$ac_t""no" 1>&6
5293 :
5294 fi
5295
5296         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5297 echo "configure:5298: checking for main in -ldsap" >&5
5298 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   ac_save_LIBS="$LIBS"
5303 LIBS="-ldsap -lisode $LIBS"
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307
5308 int main() {
5309 main()
5310 ; return 0; }
5311 EOF
5312 if { (eval echo configure:5313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=yes"
5315 else
5316   echo "configure: failed program was:" >&5
5317   cat conftest.$ac_ext >&5
5318   rm -rf conftest*
5319   eval "ac_cv_lib_$ac_lib_var=no"
5320 fi
5321 rm -f conftest*
5322 LIBS="$ac_save_LIBS"
5323
5324 fi
5325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5326   echo "$ac_t""yes" 1>&6
5327   
5328                 ol_link_isode=yes
5329                 cat >> confdefs.h <<\EOF
5330 #define HAVE_DSAP 1
5331 EOF
5332
5333                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5334                 
5335 else
5336   echo "$ac_t""no" 1>&6
5337 :
5338 fi
5339
5340         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5341 echo "configure:5342: checking for main in -lisode" >&5
5342 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5344   echo $ac_n "(cached) $ac_c" 1>&6
5345 else
5346   ac_save_LIBS="$LIBS"
5347 LIBS="-lisode  $LIBS"
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351
5352 int main() {
5353 main()
5354 ; return 0; }
5355 EOF
5356 if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=yes"
5359 else
5360   echo "configure: failed program was:" >&5
5361   cat conftest.$ac_ext >&5
5362   rm -rf conftest*
5363   eval "ac_cv_lib_$ac_lib_var=no"
5364 fi
5365 rm -f conftest*
5366 LIBS="$ac_save_LIBS"
5367
5368 fi
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5370   echo "$ac_t""yes" 1>&6
5371   
5372                 ol_link_isode=yes
5373                 cat >> confdefs.h <<\EOF
5374 #define HAVE_ISODE 1
5375 EOF
5376
5377                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5378                 
5379 else
5380   echo "$ac_t""no" 1>&6
5381 :
5382 fi
5383
5384 fi
5385
5386 if test $ol_link_isode != no; then
5387         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5388 echo "configure:5389: checking for main in -lpp" >&5
5389 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5391   echo $ac_n "(cached) $ac_c" 1>&6
5392 else
5393   ac_save_LIBS="$LIBS"
5394 LIBS="-lpp  $LIBS"
5395 cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398
5399 int main() {
5400 main()
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   eval "ac_cv_lib_$ac_lib_var=yes"
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   eval "ac_cv_lib_$ac_lib_var=no"
5411 fi
5412 rm -f conftest*
5413 LIBS="$ac_save_LIBS"
5414
5415 fi
5416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5417   echo "$ac_t""yes" 1>&6
5418   
5419                 cat >> confdefs.h <<\EOF
5420 #define HAVE_PP 1
5421 EOF
5422
5423                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5424                 
5425 else
5426   echo "$ac_t""no" 1>&6
5427 :
5428 fi
5429
5430
5431         # Extract the first word of "pepsy", so it can be a program name with args.
5432 set dummy pepsy; ac_word=$2
5433 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5434 echo "configure:5435: checking for $ac_word" >&5
5435 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5436   echo $ac_n "(cached) $ac_c" 1>&6
5437 else
5438   case "$PEPSY" in
5439   /*)
5440   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5441   ;;
5442   ?:/*)                  
5443   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5444   ;;
5445   *)
5446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5447   ac_dummy="$PATH"
5448   for ac_dir in $ac_dummy; do 
5449     test -z "$ac_dir" && ac_dir=.
5450     if test -f $ac_dir/$ac_word; then
5451       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5452       break
5453     fi
5454   done
5455   IFS="$ac_save_ifs"
5456   ;;
5457 esac
5458 fi
5459 PEPSY="$ac_cv_path_PEPSY"
5460 if test -n "$PEPSY"; then
5461   echo "$ac_t""$PEPSY" 1>&6
5462 else
5463   echo "$ac_t""no" 1>&6
5464 fi
5465
5466 fi
5467
5468 if test $ol_enable_quipu != no ; then
5469         for ac_hdr in quipu/commonarg.h
5470 do
5471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5473 echo "configure:5474: checking for $ac_hdr" >&5
5474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5475   echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477   cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480 #include <$ac_hdr>
5481 EOF
5482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5483 { (eval echo configure:5484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5485 if test -z "$ac_err"; then
5486   rm -rf conftest*
5487   eval "ac_cv_header_$ac_safe=yes"
5488 else
5489   echo "$ac_err" >&5
5490   echo "configure: failed program was:" >&5
5491   cat conftest.$ac_ext >&5
5492   rm -rf conftest*
5493   eval "ac_cv_header_$ac_safe=no"
5494 fi
5495 rm -f conftest*
5496 fi
5497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5498   echo "$ac_t""yes" 1>&6
5499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5500   cat >> confdefs.h <<EOF
5501 #define $ac_tr_hdr 1
5502 EOF
5503  
5504 else
5505   echo "$ac_t""no" 1>&6
5506 fi
5507 done
5508
5509
5510         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5511                 BUILD_QUIPU=yes
5512         elif test $ol_enable_quipu = auto ; then
5513                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5514         else
5515                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5516         fi
5517 fi
5518
5519 ol_link_kerberos=no
5520
5521 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5522         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5523 do
5524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5526 echo "configure:5527: checking for $ac_hdr" >&5
5527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5528   echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530   cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 #include <$ac_hdr>
5534 EOF
5535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5536 { (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5538 if test -z "$ac_err"; then
5539   rm -rf conftest*
5540   eval "ac_cv_header_$ac_safe=yes"
5541 else
5542   echo "$ac_err" >&5
5543   echo "configure: failed program was:" >&5
5544   cat conftest.$ac_ext >&5
5545   rm -rf conftest*
5546   eval "ac_cv_header_$ac_safe=no"
5547 fi
5548 rm -f conftest*
5549 fi
5550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5551   echo "$ac_t""yes" 1>&6
5552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5553   cat >> confdefs.h <<EOF
5554 #define $ac_tr_hdr 1
5555 EOF
5556  
5557 else
5558   echo "$ac_t""no" 1>&6
5559 fi
5560 done
5561
5562
5563         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5564                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5565 echo "configure:5566: checking for main in -lkrb4" >&5
5566 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5568   echo $ac_n "(cached) $ac_c" 1>&6
5569 else
5570   ac_save_LIBS="$LIBS"
5571 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5572 cat > conftest.$ac_ext <<EOF
5573 #line 5574 "configure"
5574 #include "confdefs.h"
5575
5576 int main() {
5577 main()
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5581   rm -rf conftest*
5582   eval "ac_cv_lib_$ac_lib_var=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_lib_$ac_lib_var=no"
5588 fi
5589 rm -f conftest*
5590 LIBS="$ac_save_LIBS"
5591
5592 fi
5593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5594   echo "$ac_t""yes" 1>&6
5595   have_k5=yes
5596 else
5597   echo "$ac_t""no" 1>&6
5598 have_k5=no
5599 fi
5600
5601
5602                 if test $have_k5 = yes ; then
5603                         ol_with_kerberos=found
5604                         ol_link_kerberos=yes
5605
5606                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5607
5608                         LIBS="$KRB_LIBS $LIBS"
5609
5610                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5611 echo "configure:5612: checking for des_debug in Kerberos libraries" >&5
5612 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5613   echo $ac_n "(cached) $ac_c" 1>&6
5614 else
5615   
5616                                                                 save_LIBS="$LIBS"
5617                                 LIBS="$KRB_LIBS $LIBS"
5618                                 cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621
5622 #include <kerberosIV/krb.h>
5623 #include <kerberosIV/des.h>
5624 extern int des_debug;
5625
5626 int main() {
5627
5628 des_debug = 1;
5629
5630 ; return 0; }
5631 EOF
5632 if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5633   rm -rf conftest*
5634   ol_cv_var_des_debug=yes
5635 else
5636   echo "configure: failed program was:" >&5
5637   cat conftest.$ac_ext >&5
5638   rm -rf conftest*
5639   ol_cv_var_des_debug=no
5640 fi
5641 rm -f conftest*
5642                                                                 LIBS="$save_LIBS"
5643                         
5644 fi
5645
5646 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5647
5648                         if test $ol_cv_var_des_debug = yes ; then
5649                                 cat >> confdefs.h <<\EOF
5650 #define HAVE_DES_DEBUG 1
5651 EOF
5652
5653                         fi
5654
5655                         LIBS="$save_LIBS"
5656                 fi
5657         fi
5658 fi
5659
5660 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5661         for ac_hdr in krb.h des.h
5662 do
5663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5665 echo "configure:5666: checking for $ac_hdr" >&5
5666 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5667   echo $ac_n "(cached) $ac_c" 1>&6
5668 else
5669   cat > conftest.$ac_ext <<EOF
5670 #line 5671 "configure"
5671 #include "confdefs.h"
5672 #include <$ac_hdr>
5673 EOF
5674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5675 { (eval echo configure:5676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5677 if test -z "$ac_err"; then
5678   rm -rf conftest*
5679   eval "ac_cv_header_$ac_safe=yes"
5680 else
5681   echo "$ac_err" >&5
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   eval "ac_cv_header_$ac_safe=no"
5686 fi
5687 rm -f conftest*
5688 fi
5689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5690   echo "$ac_t""yes" 1>&6
5691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5692   cat >> confdefs.h <<EOF
5693 #define $ac_tr_hdr 1
5694 EOF
5695  
5696 else
5697   echo "$ac_t""no" 1>&6
5698 fi
5699 done
5700
5701
5702         if test $ac_cv_header_krb_h = yes ; then
5703                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5704 echo "configure:5705: checking for main in -lkrb" >&5
5705 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   ac_save_LIBS="$LIBS"
5710 LIBS="-lkrb -ldes $LIBS"
5711 cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714
5715 int main() {
5716 main()
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   eval "ac_cv_lib_$ac_lib_var=yes"
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   eval "ac_cv_lib_$ac_lib_var=no"
5727 fi
5728 rm -f conftest*
5729 LIBS="$ac_save_LIBS"
5730
5731 fi
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734   have_k4=yes
5735 else
5736   echo "$ac_t""no" 1>&6
5737 have_k4=no
5738 fi
5739
5740
5741                 if test $have_k4 = yes ; then
5742                         ol_with_kerberos=found
5743                         ol_link_kerberos=yes
5744
5745                         KRB_LIBS="-lkrb -ldes"
5746                 fi
5747         fi
5748 fi
5749
5750 if test $ol_link_kerberos = yes ; then
5751         cat >> confdefs.h <<\EOF
5752 #define HAVE_KERBEROS 1
5753 EOF
5754
5755 fi
5756
5757 ol_link_tls=no
5758 if test $ol_with_tls != no ; then
5759         
5760         for ac_hdr in openssl/ssl.h ssl.h
5761 do
5762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5764 echo "configure:5765: checking for $ac_hdr" >&5
5765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5766   echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768   cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771 #include <$ac_hdr>
5772 EOF
5773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5774 { (eval echo configure:5775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5776 if test -z "$ac_err"; then
5777   rm -rf conftest*
5778   eval "ac_cv_header_$ac_safe=yes"
5779 else
5780   echo "$ac_err" >&5
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   eval "ac_cv_header_$ac_safe=no"
5785 fi
5786 rm -f conftest*
5787 fi
5788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5789   echo "$ac_t""yes" 1>&6
5790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5791   cat >> confdefs.h <<EOF
5792 #define $ac_tr_hdr 1
5793 EOF
5794  
5795 else
5796   echo "$ac_t""no" 1>&6
5797 fi
5798 done
5799
5800         
5801         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5802                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5803 echo "configure:5804: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5804 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5806   echo $ac_n "(cached) $ac_c" 1>&6
5807 else
5808   ac_save_LIBS="$LIBS"
5809 LIBS="-lssl -lcrypto $LIBS"
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 /* Override any gcc2 internal prototype to avoid an error.  */
5814 /* We use char because int might match the return type of a gcc2
5815     builtin and then its argument prototype would still apply.  */
5816 char SSLeay_add_ssl_algorithms();
5817
5818 int main() {
5819 SSLeay_add_ssl_algorithms()
5820 ; return 0; }
5821 EOF
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5823   rm -rf conftest*
5824   eval "ac_cv_lib_$ac_lib_var=yes"
5825 else
5826   echo "configure: failed program was:" >&5
5827   cat conftest.$ac_ext >&5
5828   rm -rf conftest*
5829   eval "ac_cv_lib_$ac_lib_var=no"
5830 fi
5831 rm -f conftest*
5832 LIBS="$ac_save_LIBS"
5833
5834 fi
5835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837   have_ssleay=yes
5838                         need_rsaref=no
5839 else
5840   echo "$ac_t""no" 1>&6
5841 have_ssleay=no
5842 fi
5843
5844                         
5845                 if test $have_ssleay = no ; then
5846                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5847 echo "configure:5848: checking for SSL_library_init in -lssl" >&5
5848 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5850   echo $ac_n "(cached) $ac_c" 1>&6
5851 else
5852   ac_save_LIBS="$LIBS"
5853 LIBS="-lssl -lcrypto $LIBS"
5854 cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 /* Override any gcc2 internal prototype to avoid an error.  */
5858 /* We use char because int might match the return type of a gcc2
5859     builtin and then its argument prototype would still apply.  */
5860 char SSL_library_init();
5861
5862 int main() {
5863 SSL_library_init()
5864 ; return 0; }
5865 EOF
5866 if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5867   rm -rf conftest*
5868   eval "ac_cv_lib_$ac_lib_var=yes"
5869 else
5870   echo "configure: failed program was:" >&5
5871   cat conftest.$ac_ext >&5
5872   rm -rf conftest*
5873   eval "ac_cv_lib_$ac_lib_var=no"
5874 fi
5875 rm -f conftest*
5876 LIBS="$ac_save_LIBS"
5877
5878 fi
5879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5880   echo "$ac_t""yes" 1>&6
5881   have_ssleay=yes
5882                                 need_rsaref=no
5883 else
5884   echo "$ac_t""no" 1>&6
5885 have_ssleay=no
5886 fi
5887
5888                 fi
5889
5890                 if test $have_ssleay = no ; then
5891                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5892 echo "configure:5893: checking for ssl3_accept in -lssl" >&5
5893 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5894 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5895   echo $ac_n "(cached) $ac_c" 1>&6
5896 else
5897   ac_save_LIBS="$LIBS"
5898 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char ssl3_accept();
5906
5907 int main() {
5908 ssl3_accept()
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_lib_$ac_lib_var=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=no"
5919 fi
5920 rm -f conftest*
5921 LIBS="$ac_save_LIBS"
5922
5923 fi
5924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5925   echo "$ac_t""yes" 1>&6
5926   have_ssleay=yes
5927                                 need_rsaref=yes
5928 else
5929   echo "$ac_t""no" 1>&6
5930 have_ssleay=no
5931 fi
5932
5933                 fi
5934
5935                 if test $have_ssleay = yes ; then
5936                         ol_with_tls=found
5937                         ol_link_tls=yes
5938
5939                         cat >> confdefs.h <<\EOF
5940 #define HAVE_SSLEAY 1
5941 EOF
5942
5943
5944                         if test $need_rsaref = yes; then
5945                                 cat >> confdefs.h <<\EOF
5946 #define HAVE_RSAREF 1
5947 EOF
5948
5949
5950                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5951                         else
5952                                 TLS_LIBS="-lssl -lcrypto"
5953                         fi
5954                 fi
5955         fi
5956 fi
5957
5958 if test $ol_link_tls = yes ; then
5959         cat >> confdefs.h <<\EOF
5960 #define HAVE_TLS 1
5961 EOF
5962
5963 fi      
5964
5965 for ac_func in \
5966         ctime_r                 \
5967         gethostbyname_r gethostbyaddr_r \
5968
5969 do
5970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5971 echo "configure:5972: checking for $ac_func" >&5
5972 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* System header to define __stub macros and hopefully few prototypes,
5979     which can conflict with char $ac_func(); below.  */
5980 #include <assert.h>
5981 /* Override any gcc2 internal prototype to avoid an error.  */
5982 /* We use char because int might match the return type of a gcc2
5983     builtin and then its argument prototype would still apply.  */
5984 char $ac_func();
5985 char (*f)();
5986
5987 int main() {
5988
5989 /* The GNU C library defines this for functions which it implements
5990     to always fail with ENOSYS.  Some functions are actually named
5991     something starting with __ and the normal name is an alias.  */
5992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5993 choke me
5994 #else
5995 f = $ac_func;
5996 #endif
5997
5998 ; return 0; }
5999 EOF
6000 if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6001   rm -rf conftest*
6002   eval "ac_cv_func_$ac_func=yes"
6003 else
6004   echo "configure: failed program was:" >&5
6005   cat conftest.$ac_ext >&5
6006   rm -rf conftest*
6007   eval "ac_cv_func_$ac_func=no"
6008 fi
6009 rm -f conftest*
6010 fi
6011
6012 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6013   echo "$ac_t""yes" 1>&6
6014     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6015   cat >> confdefs.h <<EOF
6016 #define $ac_tr_func 1
6017 EOF
6018  
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022 done
6023
6024
6025 if test "$ac_cv_func_ctime_r" = no ; then
6026         ol_cv_func_ctime_r_nargs=0
6027 else
6028         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6029 echo "configure:6030: checking number of arguments of ctime_r" >&5
6030 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 #include <time.h>
6037 int main() {
6038 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6042   rm -rf conftest*
6043   ol_cv_func_ctime_r_nargs=3
6044 else
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 #include <time.h>
6052 int main() {
6053 time_t ti; char *buffer; ctime_r(&ti,buffer);
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6057   rm -rf conftest*
6058   ol_cv_func_ctime_r_nargs=2
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   ol_cv_func_ctime_r_nargs=0
6064 fi
6065 rm -f conftest*
6066 fi
6067 rm -f conftest*
6068 fi
6069
6070 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6071   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6072     cat >> confdefs.h <<EOF
6073 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6074 EOF
6075
6076   fi
6077
6078 fi
6079
6080 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6081         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6082 echo "configure:6083: checking number of arguments of gethostbyname_r" >&5
6083 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6084   echo $ac_n "(cached) $ac_c" 1>&6
6085 else
6086   cat > conftest.$ac_ext <<EOF
6087 #line 6088 "configure"
6088 #include "confdefs.h"
6089 #include <sys/types.h>
6090 #include <sys/socket.h>
6091 #include <netinet/in.h>
6092 #include <netdb.h>
6093 #define BUFSIZE (sizeof(struct hostent)+10)
6094 int main() {
6095 struct hostent hent; char buffer[BUFSIZE];
6096                 int bufsize=BUFSIZE;int h_errno;
6097                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6098                         buffer, bufsize, &h_errno);
6099 ; return 0; }
6100 EOF
6101 if { (eval echo configure:6102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6102   rm -rf conftest*
6103   ol_cv_func_gethostbyname_r_nargs=5
6104 else
6105   echo "configure: failed program was:" >&5
6106   cat conftest.$ac_ext >&5
6107   rm -rf conftest*
6108   cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 #include <sys/types.h>
6112 #include <sys/socket.h>
6113 #include <netinet/in.h>
6114 #include <netdb.h>
6115 #define BUFSIZE (sizeof(struct hostent)+10)
6116 int main() {
6117 struct hostent hent;struct hostent *rhent;
6118                         char buffer[BUFSIZE];
6119                         int bufsize=BUFSIZE;int h_errno;
6120                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6121                                 &rhent, &h_errno);
6122 ; return 0; }
6123 EOF
6124 if { (eval echo configure:6125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6125   rm -rf conftest*
6126   ol_cv_func_gethostbyname_r_nargs=6
6127 else
6128   echo "configure: failed program was:" >&5
6129   cat conftest.$ac_ext >&5
6130   rm -rf conftest*
6131   ol_cv_func_gethostbyname_r_nargs=0
6132 fi
6133 rm -f conftest*
6134 fi
6135 rm -f conftest*
6136 fi
6137
6138 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6139   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6140         cat >> confdefs.h <<EOF
6141 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6142 EOF
6143
6144   fi
6145
6146 else
6147         ol_cv_func_gethostbyname_r_nargs=0
6148 fi
6149  
6150 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6151         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6152 echo "configure:6153: checking number of arguments of gethostbyaddr_r" >&5
6153 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6154   echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156   cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 #include <sys/types.h>
6160 #include <sys/socket.h>
6161 #include <netinet/in.h>
6162 #include <netdb.h>
6163 #define BUFSIZE (sizeof(struct hostent)+10)
6164 int main() {
6165 struct hostent hent; char buffer[BUFSIZE]; 
6166             struct in_addr add;
6167             size_t alen=sizeof(struct in_addr);
6168             int bufsize=BUFSIZE;int h_errno;
6169                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6170                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6171 ; return 0; }
6172 EOF
6173 if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6174   rm -rf conftest*
6175   ol_cv_func_gethostbyaddr_r_nargs=7
6176 else
6177   echo "configure: failed program was:" >&5
6178   cat conftest.$ac_ext >&5
6179   rm -rf conftest*
6180   cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 #include <sys/types.h>
6184 #include <sys/socket.h>
6185 #include <netinet/in.h>
6186 #include <netdb.h>
6187 #define BUFSIZE (sizeof(struct hostent)+10)
6188 int main() {
6189 struct hostent hent;
6190                         struct hostent *rhent; char buffer[BUFSIZE]; 
6191                         struct in_addr add;
6192                         size_t alen=sizeof(struct in_addr);
6193                         int bufsize=BUFSIZE;int h_errno;
6194                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6195                                 alen, AF_INET, &hent, buffer, bufsize, 
6196                                 &rhent, &h_errno);
6197 ; return 0; }
6198 EOF
6199 if { (eval echo configure:6200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6200   rm -rf conftest*
6201   ol_cv_func_gethostbyaddr_r_nargs=8
6202 else
6203   echo "configure: failed program was:" >&5
6204   cat conftest.$ac_ext >&5
6205   rm -rf conftest*
6206   ol_cv_func_gethostbyaddr_r_nargs=0
6207 fi
6208 rm -f conftest*
6209 fi
6210 rm -f conftest*
6211 fi
6212
6213 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6214   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6215     cat >> confdefs.h <<EOF
6216 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6217 EOF
6218
6219   fi
6220
6221 else
6222         ol_cv_func_gethostbyaddr_r_nargs=0
6223 fi
6224
6225 if test "$ac_cv_func_ctime_r" = yes \
6226         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6227         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6228         -a "$ac_cv_func_gethostbyname_r" = yes \
6229         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6230         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6231         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6232         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6233         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6234         ; then
6235  
6236         cat >> confdefs.h <<\EOF
6237 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6238 EOF
6239
6240 fi
6241
6242 ol_link_threads=no
6243 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6244         -o $ol_with_threads = posix ; then
6245
6246         for ac_hdr in pthread.h sched.h
6247 do
6248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6250 echo "configure:6251: checking for $ac_hdr" >&5
6251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6252   echo $ac_n "(cached) $ac_c" 1>&6
6253 else
6254   cat > conftest.$ac_ext <<EOF
6255 #line 6256 "configure"
6256 #include "confdefs.h"
6257 #include <$ac_hdr>
6258 EOF
6259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6260 { (eval echo configure:6261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6262 if test -z "$ac_err"; then
6263   rm -rf conftest*
6264   eval "ac_cv_header_$ac_safe=yes"
6265 else
6266   echo "$ac_err" >&5
6267   echo "configure: failed program was:" >&5
6268   cat conftest.$ac_ext >&5
6269   rm -rf conftest*
6270   eval "ac_cv_header_$ac_safe=no"
6271 fi
6272 rm -f conftest*
6273 fi
6274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6275   echo "$ac_t""yes" 1>&6
6276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6277   cat >> confdefs.h <<EOF
6278 #define $ac_tr_hdr 1
6279 EOF
6280  
6281 else
6282   echo "$ac_t""no" 1>&6
6283 fi
6284 done
6285
6286
6287         if test $ac_cv_header_pthread_h = yes ; then
6288                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6289 echo "configure:6290: checking POSIX thread version" >&5
6290 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   
6294         cat > conftest.$ac_ext <<EOF
6295 #line 6296 "configure"
6296 #include "confdefs.h"
6297
6298 #               include <pthread.h>
6299                 /* this check could be improved */
6300 #               ifdef PTHREAD_ONCE_INIT
6301                         pthread_version_final
6302 #               endif
6303         
6304 EOF
6305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6306   egrep "pthread_version_final" >/dev/null 2>&1; then
6307   rm -rf conftest*
6308   ol_pthread_final=yes
6309 else
6310   rm -rf conftest*
6311   ol_pthread_final=no
6312 fi
6313 rm -f conftest*
6314
6315
6316         cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6319
6320 #               include <pthread.h>
6321                 /* this check could be improved */
6322 #               ifdef pthread_once_init
6323                         pthread_version_draft4
6324 #               endif
6325         
6326 EOF
6327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6328   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6329   rm -rf conftest*
6330   ol_pthread_draft4=yes
6331 else
6332   rm -rf conftest*
6333   ol_pthread_draft4=no
6334 fi
6335 rm -f conftest*
6336
6337
6338         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6339                 ol_cv_pthread_version=final
6340         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6341                 ol_cv_pthread_version=draft4
6342         else
6343                 ol_cv_pthread_version=unknown
6344         fi
6345
6346 fi
6347
6348 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6349
6350
6351                 if test $ol_cv_pthread_version = final ; then
6352                         cat >> confdefs.h <<\EOF
6353 #define HAVE_PTHREADS_FINAL 1
6354 EOF
6355
6356                 elif test $ol_cv_pthread_version = draft4 ; then
6357                         cat >> confdefs.h <<\EOF
6358 #define HAVE_PTHREADS_D4 1
6359 EOF
6360
6361                 else
6362                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6363                 fi
6364
6365                 # consider threads found
6366                 ol_with_threads=found
6367
6368                 
6369         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6370 echo "configure:6371: checking for LinuxThreads pthread.h" >&5
6371 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 #include <pthread.h>
6378 EOF
6379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6380   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6381   rm -rf conftest*
6382   ol_cv_header_linux_threads=yes
6383 else
6384   rm -rf conftest*
6385   ol_cv_header_linux_threads=no
6386 fi
6387 rm -f conftest*
6388
6389                 
6390 fi
6391
6392 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6393         if test $ol_cv_header_linux_threads = yes; then
6394                 cat >> confdefs.h <<\EOF
6395 #define HAVE_LINUX_THREADS 1
6396 EOF
6397
6398         fi
6399
6400
6401                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6402                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6403 echo "configure:6404: checking for pthread_create in default libraries" >&5
6404 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6405   echo $ac_n "(cached) $ac_c" 1>&6
6406 else
6407   
6408                 if test "$cross_compiling" = yes; then
6409   cat > conftest.$ac_ext <<EOF
6410 #line 6411 "configure"
6411 #include "confdefs.h"
6412 /* pthread test headers */
6413 #include <pthread.h>
6414 #ifndef NULL
6415 #define NULL (void*)0
6416 #endif
6417
6418 static void *task(p)
6419         void *p;
6420 {
6421         return (void *) (p == NULL);
6422 }
6423
6424 int main() {
6425
6426         /* pthread test function */
6427         pthread_t t;
6428         int status;
6429
6430         /* make sure pthread_create() isn't just a stub */
6431 #if HAVE_PTHREADS_D4
6432         status = pthread_create(&t, pthread_attr_default, task, NULL);
6433 #else
6434         status = pthread_create(&t, NULL, task, NULL);
6435 #endif
6436
6437         if( status ) exit( status );
6438
6439         /* make sure pthread_detach() isn't just a stub */
6440 #if HAVE_PTHREADS_D4
6441         status = pthread_detach( &t );
6442 #else
6443         status = pthread_detach( t );
6444 #endif
6445
6446 #ifdef HAVE_LINUX_THREADS
6447         pthread_kill_other_threads_np();
6448 #endif
6449
6450         exit( status );
6451
6452 ; return 0; }
6453 EOF
6454 if { (eval echo configure:6455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6455   rm -rf conftest*
6456   ol_cv_pthread_create=yes
6457 else
6458   echo "configure: failed program was:" >&5
6459   cat conftest.$ac_ext >&5
6460   rm -rf conftest*
6461   ol_cv_pthread_create=no
6462 fi
6463 rm -f conftest*
6464 else
6465   cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 /* pthread test headers */
6469 #include <pthread.h>
6470 #ifndef NULL
6471 #define NULL (void*)0
6472 #endif
6473
6474 static void *task(p)
6475         void *p;
6476 {
6477         return (void *) (p == NULL);
6478 }
6479
6480
6481 int main(argc, argv)
6482         int argc;
6483         char **argv;
6484 {
6485
6486         /* pthread test function */
6487         pthread_t t;
6488         int status;
6489
6490         /* make sure pthread_create() isn't just a stub */
6491 #if HAVE_PTHREADS_D4
6492         status = pthread_create(&t, pthread_attr_default, task, NULL);
6493 #else
6494         status = pthread_create(&t, NULL, task, NULL);
6495 #endif
6496
6497         if( status ) exit( status );
6498
6499         /* make sure pthread_detach() isn't just a stub */
6500 #if HAVE_PTHREADS_D4
6501         status = pthread_detach( &t );
6502 #else
6503         status = pthread_detach( t );
6504 #endif
6505
6506 #ifdef HAVE_LINUX_THREADS
6507         pthread_kill_other_threads_np();
6508 #endif
6509
6510         exit( status );
6511
6512 }
6513
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6516 then
6517   ol_cv_pthread_create=yes
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -fr conftest*
6522   ol_cv_pthread_create=no
6523 fi
6524 rm -fr conftest*
6525 fi
6526
6527 fi
6528
6529 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6530
6531                 if test $ol_cv_pthread_create != no ; then
6532                         ol_link_threads=posix
6533                         ol_link_pthreads=""
6534                 fi
6535                 
6536                 # Pthread try link: -mt (ol_cv_pthread_mt)
6537 if test "$ol_link_threads" = no ; then
6538         # try -mt
6539         echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6540 echo "configure:6541: checking for pthread link with -mt" >&5
6541 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6542   echo $ac_n "(cached) $ac_c" 1>&6
6543 else
6544   
6545                 # save the flags
6546                 ol_LIBS="$LIBS"
6547                 LIBS="-mt $LIBS"
6548
6549                 if test "$cross_compiling" = yes; then
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 /* pthread test headers */
6554 #include <pthread.h>
6555 #ifndef NULL
6556 #define NULL (void*)0
6557 #endif
6558
6559 static void *task(p)
6560         void *p;
6561 {
6562         return (void *) (p == NULL);
6563 }
6564
6565 int main() {
6566
6567         /* pthread test function */
6568         pthread_t t;
6569         int status;
6570
6571         /* make sure pthread_create() isn't just a stub */
6572 #if HAVE_PTHREADS_D4
6573         status = pthread_create(&t, pthread_attr_default, task, NULL);
6574 #else
6575         status = pthread_create(&t, NULL, task, NULL);
6576 #endif
6577
6578         if( status ) exit( status );
6579
6580         /* make sure pthread_detach() isn't just a stub */
6581 #if HAVE_PTHREADS_D4
6582         status = pthread_detach( &t );
6583 #else
6584         status = pthread_detach( t );
6585 #endif
6586
6587 #ifdef HAVE_LINUX_THREADS
6588         pthread_kill_other_threads_np();
6589 #endif
6590
6591         exit( status );
6592
6593 ; return 0; }
6594 EOF
6595 if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6596   rm -rf conftest*
6597   ol_cv_pthread_mt=yes
6598 else
6599   echo "configure: failed program was:" >&5
6600   cat conftest.$ac_ext >&5
6601   rm -rf conftest*
6602   ol_cv_pthread_mt=no
6603 fi
6604 rm -f conftest*
6605 else
6606   cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* pthread test headers */
6610 #include <pthread.h>
6611 #ifndef NULL
6612 #define NULL (void*)0
6613 #endif
6614
6615 static void *task(p)
6616         void *p;
6617 {
6618         return (void *) (p == NULL);
6619 }
6620
6621
6622 int main(argc, argv)
6623         int argc;
6624         char **argv;
6625 {
6626
6627         /* pthread test function */
6628         pthread_t t;
6629         int status;
6630
6631         /* make sure pthread_create() isn't just a stub */
6632 #if HAVE_PTHREADS_D4
6633         status = pthread_create(&t, pthread_attr_default, task, NULL);
6634 #else
6635         status = pthread_create(&t, NULL, task, NULL);
6636 #endif
6637
6638         if( status ) exit( status );
6639
6640         /* make sure pthread_detach() isn't just a stub */
6641 #if HAVE_PTHREADS_D4
6642         status = pthread_detach( &t );
6643 #else
6644         status = pthread_detach( t );
6645 #endif
6646
6647 #ifdef HAVE_LINUX_THREADS
6648         pthread_kill_other_threads_np();
6649 #endif
6650
6651         exit( status );
6652
6653 }
6654
6655 EOF
6656 if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6657 then
6658   ol_cv_pthread_mt=yes
6659 else
6660   echo "configure: failed program was:" >&5
6661   cat conftest.$ac_ext >&5
6662   rm -fr conftest*
6663   ol_cv_pthread_mt=no
6664 fi
6665 rm -fr conftest*
6666 fi
6667
6668
6669                 # restore the LIBS
6670                 LIBS="$ol_LIBS"
6671         
6672 fi
6673
6674 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6675
6676         if test $ol_cv_pthread_mt = yes ; then
6677                 ol_link_pthreads="-mt"
6678                 ol_link_threads=posix
6679         fi
6680 fi
6681
6682                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6683 if test "$ol_link_threads" = no ; then
6684         # try -kthread
6685         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6686 echo "configure:6687: checking for pthread link with -kthread" >&5
6687 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6688   echo $ac_n "(cached) $ac_c" 1>&6
6689 else
6690   
6691                 # save the flags
6692                 ol_LIBS="$LIBS"
6693                 LIBS="-kthread $LIBS"
6694
6695                 if test "$cross_compiling" = yes; then
6696   cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* pthread test headers */
6700 #include <pthread.h>
6701 #ifndef NULL
6702 #define NULL (void*)0
6703 #endif
6704
6705 static void *task(p)
6706         void *p;
6707 {
6708         return (void *) (p == NULL);
6709 }
6710
6711 int main() {
6712
6713         /* pthread test function */
6714         pthread_t t;
6715         int status;
6716
6717         /* make sure pthread_create() isn't just a stub */
6718 #if HAVE_PTHREADS_D4
6719         status = pthread_create(&t, pthread_attr_default, task, NULL);
6720 #else
6721         status = pthread_create(&t, NULL, task, NULL);
6722 #endif
6723
6724         if( status ) exit( status );
6725
6726         /* make sure pthread_detach() isn't just a stub */
6727 #if HAVE_PTHREADS_D4
6728         status = pthread_detach( &t );
6729 #else
6730         status = pthread_detach( t );
6731 #endif
6732
6733 #ifdef HAVE_LINUX_THREADS
6734         pthread_kill_other_threads_np();
6735 #endif
6736
6737         exit( status );
6738
6739 ; return 0; }
6740 EOF
6741 if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6742   rm -rf conftest*
6743   ol_cv_pthread_kthread=yes
6744 else
6745   echo "configure: failed program was:" >&5
6746   cat conftest.$ac_ext >&5
6747   rm -rf conftest*
6748   ol_cv_pthread_kthread=no
6749 fi
6750 rm -f conftest*
6751 else
6752   cat > conftest.$ac_ext <<EOF
6753 #line 6754 "configure"
6754 #include "confdefs.h"
6755 /* pthread test headers */
6756 #include <pthread.h>
6757 #ifndef NULL
6758 #define NULL (void*)0
6759 #endif
6760
6761 static void *task(p)
6762         void *p;
6763 {
6764         return (void *) (p == NULL);
6765 }
6766
6767
6768 int main(argc, argv)
6769         int argc;
6770         char **argv;
6771 {
6772
6773         /* pthread test function */
6774         pthread_t t;
6775         int status;
6776
6777         /* make sure pthread_create() isn't just a stub */
6778 #if HAVE_PTHREADS_D4
6779         status = pthread_create(&t, pthread_attr_default, task, NULL);
6780 #else
6781         status = pthread_create(&t, NULL, task, NULL);
6782 #endif
6783
6784         if( status ) exit( status );
6785
6786         /* make sure pthread_detach() isn't just a stub */
6787 #if HAVE_PTHREADS_D4
6788         status = pthread_detach( &t );
6789 #else
6790         status = pthread_detach( t );
6791 #endif
6792
6793 #ifdef HAVE_LINUX_THREADS
6794         pthread_kill_other_threads_np();
6795 #endif
6796
6797         exit( status );
6798
6799 }
6800
6801 EOF
6802 if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6803 then
6804   ol_cv_pthread_kthread=yes
6805 else
6806   echo "configure: failed program was:" >&5
6807   cat conftest.$ac_ext >&5
6808   rm -fr conftest*
6809   ol_cv_pthread_kthread=no
6810 fi
6811 rm -fr conftest*
6812 fi
6813
6814
6815                 # restore the LIBS
6816                 LIBS="$ol_LIBS"
6817         
6818 fi
6819
6820 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6821
6822         if test $ol_cv_pthread_kthread = yes ; then
6823                 ol_link_pthreads="-kthread"
6824                 ol_link_threads=posix
6825         fi
6826 fi
6827
6828                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6829 if test "$ol_link_threads" = no ; then
6830         # try -pthread
6831         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6832 echo "configure:6833: checking for pthread link with -pthread" >&5
6833 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6834   echo $ac_n "(cached) $ac_c" 1>&6
6835 else
6836   
6837                 # save the flags
6838                 ol_LIBS="$LIBS"
6839                 LIBS="-pthread $LIBS"
6840
6841                 if test "$cross_compiling" = yes; then
6842   cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 /* pthread test headers */
6846 #include <pthread.h>
6847 #ifndef NULL
6848 #define NULL (void*)0
6849 #endif
6850
6851 static void *task(p)
6852         void *p;
6853 {
6854         return (void *) (p == NULL);
6855 }
6856
6857 int main() {
6858
6859         /* pthread test function */
6860         pthread_t t;
6861         int status;
6862
6863         /* make sure pthread_create() isn't just a stub */
6864 #if HAVE_PTHREADS_D4
6865         status = pthread_create(&t, pthread_attr_default, task, NULL);
6866 #else
6867         status = pthread_create(&t, NULL, task, NULL);
6868 #endif
6869
6870         if( status ) exit( status );
6871
6872         /* make sure pthread_detach() isn't just a stub */
6873 #if HAVE_PTHREADS_D4
6874         status = pthread_detach( &t );
6875 #else
6876         status = pthread_detach( t );
6877 #endif
6878
6879 #ifdef HAVE_LINUX_THREADS
6880         pthread_kill_other_threads_np();
6881 #endif
6882
6883         exit( status );
6884
6885 ; return 0; }
6886 EOF
6887 if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6888   rm -rf conftest*
6889   ol_cv_pthread_pthread=yes
6890 else
6891   echo "configure: failed program was:" >&5
6892   cat conftest.$ac_ext >&5
6893   rm -rf conftest*
6894   ol_cv_pthread_pthread=no
6895 fi
6896 rm -f conftest*
6897 else
6898   cat > conftest.$ac_ext <<EOF
6899 #line 6900 "configure"
6900 #include "confdefs.h"
6901 /* pthread test headers */
6902 #include <pthread.h>
6903 #ifndef NULL
6904 #define NULL (void*)0
6905 #endif
6906
6907 static void *task(p)
6908         void *p;
6909 {
6910         return (void *) (p == NULL);
6911 }
6912
6913
6914 int main(argc, argv)
6915         int argc;
6916         char **argv;
6917 {
6918
6919         /* pthread test function */
6920         pthread_t t;
6921         int status;
6922
6923         /* make sure pthread_create() isn't just a stub */
6924 #if HAVE_PTHREADS_D4
6925         status = pthread_create(&t, pthread_attr_default, task, NULL);
6926 #else
6927         status = pthread_create(&t, NULL, task, NULL);
6928 #endif
6929
6930         if( status ) exit( status );
6931
6932         /* make sure pthread_detach() isn't just a stub */
6933 #if HAVE_PTHREADS_D4
6934         status = pthread_detach( &t );
6935 #else
6936         status = pthread_detach( t );
6937 #endif
6938
6939 #ifdef HAVE_LINUX_THREADS
6940         pthread_kill_other_threads_np();
6941 #endif
6942
6943         exit( status );
6944
6945 }
6946
6947 EOF
6948 if { (eval echo configure:6949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6949 then
6950   ol_cv_pthread_pthread=yes
6951 else
6952   echo "configure: failed program was:" >&5
6953   cat conftest.$ac_ext >&5
6954   rm -fr conftest*
6955   ol_cv_pthread_pthread=no
6956 fi
6957 rm -fr conftest*
6958 fi
6959
6960
6961                 # restore the LIBS
6962                 LIBS="$ol_LIBS"
6963         
6964 fi
6965
6966 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6967
6968         if test $ol_cv_pthread_pthread = yes ; then
6969                 ol_link_pthreads="-pthread"
6970                 ol_link_threads=posix
6971         fi
6972 fi
6973
6974                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6975 if test "$ol_link_threads" = no ; then
6976         # try -pthreads
6977         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6978 echo "configure:6979: checking for pthread link with -pthreads" >&5
6979 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6980   echo $ac_n "(cached) $ac_c" 1>&6
6981 else
6982   
6983                 # save the flags
6984                 ol_LIBS="$LIBS"
6985                 LIBS="-pthreads $LIBS"
6986
6987                 if test "$cross_compiling" = yes; then
6988   cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991 /* pthread test headers */
6992 #include <pthread.h>
6993 #ifndef NULL
6994 #define NULL (void*)0
6995 #endif
6996
6997 static void *task(p)
6998         void *p;
6999 {
7000         return (void *) (p == NULL);
7001 }
7002
7003 int main() {
7004
7005         /* pthread test function */
7006         pthread_t t;
7007         int status;
7008
7009         /* make sure pthread_create() isn't just a stub */
7010 #if HAVE_PTHREADS_D4
7011         status = pthread_create(&t, pthread_attr_default, task, NULL);
7012 #else
7013         status = pthread_create(&t, NULL, task, NULL);
7014 #endif
7015
7016         if( status ) exit( status );
7017
7018         /* make sure pthread_detach() isn't just a stub */
7019 #if HAVE_PTHREADS_D4
7020         status = pthread_detach( &t );
7021 #else
7022         status = pthread_detach( t );
7023 #endif
7024
7025 #ifdef HAVE_LINUX_THREADS
7026         pthread_kill_other_threads_np();
7027 #endif
7028
7029         exit( status );
7030
7031 ; return 0; }
7032 EOF
7033 if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7034   rm -rf conftest*
7035   ol_cv_pthread_pthreads=yes
7036 else
7037   echo "configure: failed program was:" >&5
7038   cat conftest.$ac_ext >&5
7039   rm -rf conftest*
7040   ol_cv_pthread_pthreads=no
7041 fi
7042 rm -f conftest*
7043 else
7044   cat > conftest.$ac_ext <<EOF
7045 #line 7046 "configure"
7046 #include "confdefs.h"
7047 /* pthread test headers */
7048 #include <pthread.h>
7049 #ifndef NULL
7050 #define NULL (void*)0
7051 #endif
7052
7053 static void *task(p)
7054         void *p;
7055 {
7056         return (void *) (p == NULL);
7057 }
7058
7059
7060 int main(argc, argv)
7061         int argc;
7062         char **argv;
7063 {
7064
7065         /* pthread test function */
7066         pthread_t t;
7067         int status;
7068
7069         /* make sure pthread_create() isn't just a stub */
7070 #if HAVE_PTHREADS_D4
7071         status = pthread_create(&t, pthread_attr_default, task, NULL);
7072 #else
7073         status = pthread_create(&t, NULL, task, NULL);
7074 #endif
7075
7076         if( status ) exit( status );
7077
7078         /* make sure pthread_detach() isn't just a stub */
7079 #if HAVE_PTHREADS_D4
7080         status = pthread_detach( &t );
7081 #else
7082         status = pthread_detach( t );
7083 #endif
7084
7085 #ifdef HAVE_LINUX_THREADS
7086         pthread_kill_other_threads_np();
7087 #endif
7088
7089         exit( status );
7090
7091 }
7092
7093 EOF
7094 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7095 then
7096   ol_cv_pthread_pthreads=yes
7097 else
7098   echo "configure: failed program was:" >&5
7099   cat conftest.$ac_ext >&5
7100   rm -fr conftest*
7101   ol_cv_pthread_pthreads=no
7102 fi
7103 rm -fr conftest*
7104 fi
7105
7106
7107                 # restore the LIBS
7108                 LIBS="$ol_LIBS"
7109         
7110 fi
7111
7112 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7113
7114         if test $ol_cv_pthread_pthreads = yes ; then
7115                 ol_link_pthreads="-pthreads"
7116                 ol_link_threads=posix
7117         fi
7118 fi
7119
7120                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7121 if test "$ol_link_threads" = no ; then
7122         # try -mthreads
7123         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7124 echo "configure:7125: checking for pthread link with -mthreads" >&5
7125 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7126   echo $ac_n "(cached) $ac_c" 1>&6
7127 else
7128   
7129                 # save the flags
7130                 ol_LIBS="$LIBS"
7131                 LIBS="-mthreads $LIBS"
7132
7133                 if test "$cross_compiling" = yes; then
7134   cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 /* pthread test headers */
7138 #include <pthread.h>
7139 #ifndef NULL
7140 #define NULL (void*)0
7141 #endif
7142
7143 static void *task(p)
7144         void *p;
7145 {
7146         return (void *) (p == NULL);
7147 }
7148
7149 int main() {
7150
7151         /* pthread test function */
7152         pthread_t t;
7153         int status;
7154
7155         /* make sure pthread_create() isn't just a stub */
7156 #if HAVE_PTHREADS_D4
7157         status = pthread_create(&t, pthread_attr_default, task, NULL);
7158 #else
7159         status = pthread_create(&t, NULL, task, NULL);
7160 #endif
7161
7162         if( status ) exit( status );
7163
7164         /* make sure pthread_detach() isn't just a stub */
7165 #if HAVE_PTHREADS_D4
7166         status = pthread_detach( &t );
7167 #else
7168         status = pthread_detach( t );
7169 #endif
7170
7171 #ifdef HAVE_LINUX_THREADS
7172         pthread_kill_other_threads_np();
7173 #endif
7174
7175         exit( status );
7176
7177 ; return 0; }
7178 EOF
7179 if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7180   rm -rf conftest*
7181   ol_cv_pthread_mthreads=yes
7182 else
7183   echo "configure: failed program was:" >&5
7184   cat conftest.$ac_ext >&5
7185   rm -rf conftest*
7186   ol_cv_pthread_mthreads=no
7187 fi
7188 rm -f conftest*
7189 else
7190   cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193 /* pthread test headers */
7194 #include <pthread.h>
7195 #ifndef NULL
7196 #define NULL (void*)0
7197 #endif
7198
7199 static void *task(p)
7200         void *p;
7201 {
7202         return (void *) (p == NULL);
7203 }
7204
7205
7206 int main(argc, argv)
7207         int argc;
7208         char **argv;
7209 {
7210
7211         /* pthread test function */
7212         pthread_t t;
7213         int status;
7214
7215         /* make sure pthread_create() isn't just a stub */
7216 #if HAVE_PTHREADS_D4
7217         status = pthread_create(&t, pthread_attr_default, task, NULL);
7218 #else
7219         status = pthread_create(&t, NULL, task, NULL);
7220 #endif
7221
7222         if( status ) exit( status );
7223
7224         /* make sure pthread_detach() isn't just a stub */
7225 #if HAVE_PTHREADS_D4
7226         status = pthread_detach( &t );
7227 #else
7228         status = pthread_detach( t );
7229 #endif
7230
7231 #ifdef HAVE_LINUX_THREADS
7232         pthread_kill_other_threads_np();
7233 #endif
7234
7235         exit( status );
7236
7237 }
7238
7239 EOF
7240 if { (eval echo configure:7241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7241 then
7242   ol_cv_pthread_mthreads=yes
7243 else
7244   echo "configure: failed program was:" >&5
7245   cat conftest.$ac_ext >&5
7246   rm -fr conftest*
7247   ol_cv_pthread_mthreads=no
7248 fi
7249 rm -fr conftest*
7250 fi
7251
7252
7253                 # restore the LIBS
7254                 LIBS="$ol_LIBS"
7255         
7256 fi
7257
7258 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7259
7260         if test $ol_cv_pthread_mthreads = yes ; then
7261                 ol_link_pthreads="-mthreads"
7262                 ol_link_threads=posix
7263         fi
7264 fi
7265
7266                 # Pthread try link: -thread (ol_cv_pthread_thread)
7267 if test "$ol_link_threads" = no ; then
7268         # try -thread
7269         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7270 echo "configure:7271: checking for pthread link with -thread" >&5
7271 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7272   echo $ac_n "(cached) $ac_c" 1>&6
7273 else
7274   
7275                 # save the flags
7276                 ol_LIBS="$LIBS"
7277                 LIBS="-thread $LIBS"
7278
7279                 if test "$cross_compiling" = yes; then
7280   cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 /* pthread test headers */
7284 #include <pthread.h>
7285 #ifndef NULL
7286 #define NULL (void*)0
7287 #endif
7288
7289 static void *task(p)
7290         void *p;
7291 {
7292         return (void *) (p == NULL);
7293 }
7294
7295 int main() {
7296
7297         /* pthread test function */
7298         pthread_t t;
7299         int status;
7300
7301         /* make sure pthread_create() isn't just a stub */
7302 #if HAVE_PTHREADS_D4
7303         status = pthread_create(&t, pthread_attr_default, task, NULL);
7304 #else
7305         status = pthread_create(&t, NULL, task, NULL);
7306 #endif
7307
7308         if( status ) exit( status );
7309
7310         /* make sure pthread_detach() isn't just a stub */
7311 #if HAVE_PTHREADS_D4
7312         status = pthread_detach( &t );
7313 #else
7314         status = pthread_detach( t );
7315 #endif
7316
7317 #ifdef HAVE_LINUX_THREADS
7318         pthread_kill_other_threads_np();
7319 #endif
7320
7321         exit( status );
7322
7323 ; return 0; }
7324 EOF
7325 if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7326   rm -rf conftest*
7327   ol_cv_pthread_thread=yes
7328 else
7329   echo "configure: failed program was:" >&5
7330   cat conftest.$ac_ext >&5
7331   rm -rf conftest*
7332   ol_cv_pthread_thread=no
7333 fi
7334 rm -f conftest*
7335 else
7336   cat > conftest.$ac_ext <<EOF
7337 #line 7338 "configure"
7338 #include "confdefs.h"
7339 /* pthread test headers */
7340 #include <pthread.h>
7341 #ifndef NULL
7342 #define NULL (void*)0
7343 #endif
7344
7345 static void *task(p)
7346         void *p;
7347 {
7348         return (void *) (p == NULL);
7349 }
7350
7351
7352 int main(argc, argv)
7353         int argc;
7354         char **argv;
7355 {
7356
7357         /* pthread test function */
7358         pthread_t t;
7359         int status;
7360
7361         /* make sure pthread_create() isn't just a stub */
7362 #if HAVE_PTHREADS_D4
7363         status = pthread_create(&t, pthread_attr_default, task, NULL);
7364 #else
7365         status = pthread_create(&t, NULL, task, NULL);
7366 #endif
7367
7368         if( status ) exit( status );
7369
7370         /* make sure pthread_detach() isn't just a stub */
7371 #if HAVE_PTHREADS_D4
7372         status = pthread_detach( &t );
7373 #else
7374         status = pthread_detach( t );
7375 #endif
7376
7377 #ifdef HAVE_LINUX_THREADS
7378         pthread_kill_other_threads_np();
7379 #endif
7380
7381         exit( status );
7382
7383 }
7384
7385 EOF
7386 if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7387 then
7388   ol_cv_pthread_thread=yes
7389 else
7390   echo "configure: failed program was:" >&5
7391   cat conftest.$ac_ext >&5
7392   rm -fr conftest*
7393   ol_cv_pthread_thread=no
7394 fi
7395 rm -fr conftest*
7396 fi
7397
7398
7399                 # restore the LIBS
7400                 LIBS="$ol_LIBS"
7401         
7402 fi
7403
7404 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7405
7406         if test $ol_cv_pthread_thread = yes ; then
7407                 ol_link_pthreads="-thread"
7408                 ol_link_threads=posix
7409         fi
7410 fi
7411
7412
7413                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7414 if test "$ol_link_threads" = no ; then
7415         # try -lpthread -lmach -lexc -lc_r
7416         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7417 echo "configure:7418: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7418 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7419   echo $ac_n "(cached) $ac_c" 1>&6
7420 else
7421   
7422                 # save the flags
7423                 ol_LIBS="$LIBS"
7424                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7425
7426                 if test "$cross_compiling" = yes; then
7427   cat > conftest.$ac_ext <<EOF
7428 #line 7429 "configure"
7429 #include "confdefs.h"
7430 /* pthread test headers */
7431 #include <pthread.h>
7432 #ifndef NULL
7433 #define NULL (void*)0
7434 #endif
7435
7436 static void *task(p)
7437         void *p;
7438 {
7439         return (void *) (p == NULL);
7440 }
7441
7442 int main() {
7443
7444         /* pthread test function */
7445         pthread_t t;
7446         int status;
7447
7448         /* make sure pthread_create() isn't just a stub */
7449 #if HAVE_PTHREADS_D4
7450         status = pthread_create(&t, pthread_attr_default, task, NULL);
7451 #else
7452         status = pthread_create(&t, NULL, task, NULL);
7453 #endif
7454
7455         if( status ) exit( status );
7456
7457         /* make sure pthread_detach() isn't just a stub */
7458 #if HAVE_PTHREADS_D4
7459         status = pthread_detach( &t );
7460 #else
7461         status = pthread_detach( t );
7462 #endif
7463
7464 #ifdef HAVE_LINUX_THREADS
7465         pthread_kill_other_threads_np();
7466 #endif
7467
7468         exit( status );
7469
7470 ; return 0; }
7471 EOF
7472 if { (eval echo configure:7473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7473   rm -rf conftest*
7474   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7475 else
7476   echo "configure: failed program was:" >&5
7477   cat conftest.$ac_ext >&5
7478   rm -rf conftest*
7479   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7480 fi
7481 rm -f conftest*
7482 else
7483   cat > conftest.$ac_ext <<EOF
7484 #line 7485 "configure"
7485 #include "confdefs.h"
7486 /* pthread test headers */
7487 #include <pthread.h>
7488 #ifndef NULL
7489 #define NULL (void*)0
7490 #endif
7491
7492 static void *task(p)
7493         void *p;
7494 {
7495         return (void *) (p == NULL);
7496 }
7497
7498
7499 int main(argc, argv)
7500         int argc;
7501         char **argv;
7502 {
7503
7504         /* pthread test function */
7505         pthread_t t;
7506         int status;
7507
7508         /* make sure pthread_create() isn't just a stub */
7509 #if HAVE_PTHREADS_D4
7510         status = pthread_create(&t, pthread_attr_default, task, NULL);
7511 #else
7512         status = pthread_create(&t, NULL, task, NULL);
7513 #endif
7514
7515         if( status ) exit( status );
7516
7517         /* make sure pthread_detach() isn't just a stub */
7518 #if HAVE_PTHREADS_D4
7519         status = pthread_detach( &t );
7520 #else
7521         status = pthread_detach( t );
7522 #endif
7523
7524 #ifdef HAVE_LINUX_THREADS
7525         pthread_kill_other_threads_np();
7526 #endif
7527
7528         exit( status );
7529
7530 }
7531
7532 EOF
7533 if { (eval echo configure:7534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7534 then
7535   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7536 else
7537   echo "configure: failed program was:" >&5
7538   cat conftest.$ac_ext >&5
7539   rm -fr conftest*
7540   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7541 fi
7542 rm -fr conftest*
7543 fi
7544
7545
7546                 # restore the LIBS
7547                 LIBS="$ol_LIBS"
7548         
7549 fi
7550
7551 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7552
7553         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7554                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7555                 ol_link_threads=posix
7556         fi
7557 fi
7558
7559                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7560 if test "$ol_link_threads" = no ; then
7561         # try -lpthread -lmach -lexc
7562         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7563 echo "configure:7564: checking for pthread link with -lpthread -lmach -lexc" >&5
7564 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7565   echo $ac_n "(cached) $ac_c" 1>&6
7566 else
7567   
7568                 # save the flags
7569                 ol_LIBS="$LIBS"
7570                 LIBS="-lpthread -lmach -lexc $LIBS"
7571
7572                 if test "$cross_compiling" = yes; then
7573   cat > conftest.$ac_ext <<EOF
7574 #line 7575 "configure"
7575 #include "confdefs.h"
7576 /* pthread test headers */
7577 #include <pthread.h>
7578 #ifndef NULL
7579 #define NULL (void*)0
7580 #endif
7581
7582 static void *task(p)
7583         void *p;
7584 {
7585         return (void *) (p == NULL);
7586 }
7587
7588 int main() {
7589
7590         /* pthread test function */
7591         pthread_t t;
7592         int status;
7593
7594         /* make sure pthread_create() isn't just a stub */
7595 #if HAVE_PTHREADS_D4
7596         status = pthread_create(&t, pthread_attr_default, task, NULL);
7597 #else
7598         status = pthread_create(&t, NULL, task, NULL);
7599 #endif
7600
7601         if( status ) exit( status );
7602
7603         /* make sure pthread_detach() isn't just a stub */
7604 #if HAVE_PTHREADS_D4
7605         status = pthread_detach( &t );
7606 #else
7607         status = pthread_detach( t );
7608 #endif
7609
7610 #ifdef HAVE_LINUX_THREADS
7611         pthread_kill_other_threads_np();
7612 #endif
7613
7614         exit( status );
7615
7616 ; return 0; }
7617 EOF
7618 if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7619   rm -rf conftest*
7620   ol_cv_pthread_lpthread_lmach_lexc=yes
7621 else
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   ol_cv_pthread_lpthread_lmach_lexc=no
7626 fi
7627 rm -f conftest*
7628 else
7629   cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 /* pthread test headers */
7633 #include <pthread.h>
7634 #ifndef NULL
7635 #define NULL (void*)0
7636 #endif
7637
7638 static void *task(p)
7639         void *p;
7640 {
7641         return (void *) (p == NULL);
7642 }
7643
7644
7645 int main(argc, argv)
7646         int argc;
7647         char **argv;
7648 {
7649
7650         /* pthread test function */
7651         pthread_t t;
7652         int status;
7653
7654         /* make sure pthread_create() isn't just a stub */
7655 #if HAVE_PTHREADS_D4
7656         status = pthread_create(&t, pthread_attr_default, task, NULL);
7657 #else
7658         status = pthread_create(&t, NULL, task, NULL);
7659 #endif
7660
7661         if( status ) exit( status );
7662
7663         /* make sure pthread_detach() isn't just a stub */
7664 #if HAVE_PTHREADS_D4
7665         status = pthread_detach( &t );
7666 #else
7667         status = pthread_detach( t );
7668 #endif
7669
7670 #ifdef HAVE_LINUX_THREADS
7671         pthread_kill_other_threads_np();
7672 #endif
7673
7674         exit( status );
7675
7676 }
7677
7678 EOF
7679 if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7680 then
7681   ol_cv_pthread_lpthread_lmach_lexc=yes
7682 else
7683   echo "configure: failed program was:" >&5
7684   cat conftest.$ac_ext >&5
7685   rm -fr conftest*
7686   ol_cv_pthread_lpthread_lmach_lexc=no
7687 fi
7688 rm -fr conftest*
7689 fi
7690
7691
7692                 # restore the LIBS
7693                 LIBS="$ol_LIBS"
7694         
7695 fi
7696
7697 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7698
7699         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7700                 ol_link_pthreads="-lpthread -lmach -lexc"
7701                 ol_link_threads=posix
7702         fi
7703 fi
7704
7705
7706                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7707 if test "$ol_link_threads" = no ; then
7708         # try -lpthread -Wl,-woff,85
7709         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7710 echo "configure:7711: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7711 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   
7715                 # save the flags
7716                 ol_LIBS="$LIBS"
7717                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7718
7719                 if test "$cross_compiling" = yes; then
7720   cat > conftest.$ac_ext <<EOF
7721 #line 7722 "configure"
7722 #include "confdefs.h"
7723 /* pthread test headers */
7724 #include <pthread.h>
7725 #ifndef NULL
7726 #define NULL (void*)0
7727 #endif
7728
7729 static void *task(p)
7730         void *p;
7731 {
7732         return (void *) (p == NULL);
7733 }
7734
7735 int main() {
7736
7737         /* pthread test function */
7738         pthread_t t;
7739         int status;
7740
7741         /* make sure pthread_create() isn't just a stub */
7742 #if HAVE_PTHREADS_D4
7743         status = pthread_create(&t, pthread_attr_default, task, NULL);
7744 #else
7745         status = pthread_create(&t, NULL, task, NULL);
7746 #endif
7747
7748         if( status ) exit( status );
7749
7750         /* make sure pthread_detach() isn't just a stub */
7751 #if HAVE_PTHREADS_D4
7752         status = pthread_detach( &t );
7753 #else
7754         status = pthread_detach( t );
7755 #endif
7756
7757 #ifdef HAVE_LINUX_THREADS
7758         pthread_kill_other_threads_np();
7759 #endif
7760
7761         exit( status );
7762
7763 ; return 0; }
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7766   rm -rf conftest*
7767   ol_cv_pthread_lib_lpthread_woff=yes
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -rf conftest*
7772   ol_cv_pthread_lib_lpthread_woff=no
7773 fi
7774 rm -f conftest*
7775 else
7776   cat > conftest.$ac_ext <<EOF
7777 #line 7778 "configure"
7778 #include "confdefs.h"
7779 /* pthread test headers */
7780 #include <pthread.h>
7781 #ifndef NULL
7782 #define NULL (void*)0
7783 #endif
7784
7785 static void *task(p)
7786         void *p;
7787 {
7788         return (void *) (p == NULL);
7789 }
7790
7791
7792 int main(argc, argv)
7793         int argc;
7794         char **argv;
7795 {
7796
7797         /* pthread test function */
7798         pthread_t t;
7799         int status;
7800
7801         /* make sure pthread_create() isn't just a stub */
7802 #if HAVE_PTHREADS_D4
7803         status = pthread_create(&t, pthread_attr_default, task, NULL);
7804 #else
7805         status = pthread_create(&t, NULL, task, NULL);
7806 #endif
7807
7808         if( status ) exit( status );
7809
7810         /* make sure pthread_detach() isn't just a stub */
7811 #if HAVE_PTHREADS_D4
7812         status = pthread_detach( &t );
7813 #else
7814         status = pthread_detach( t );
7815 #endif
7816
7817 #ifdef HAVE_LINUX_THREADS
7818         pthread_kill_other_threads_np();
7819 #endif
7820
7821         exit( status );
7822
7823 }
7824
7825 EOF
7826 if { (eval echo configure:7827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7827 then
7828   ol_cv_pthread_lib_lpthread_woff=yes
7829 else
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -fr conftest*
7833   ol_cv_pthread_lib_lpthread_woff=no
7834 fi
7835 rm -fr conftest*
7836 fi
7837
7838
7839                 # restore the LIBS
7840                 LIBS="$ol_LIBS"
7841         
7842 fi
7843
7844 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7845
7846         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7847                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7848                 ol_link_threads=posix
7849         fi
7850 fi
7851
7852
7853                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7854 if test "$ol_link_threads" = no ; then
7855         # try -lpthread
7856         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7857 echo "configure:7858: checking for pthread link with -lpthread" >&5
7858 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7859   echo $ac_n "(cached) $ac_c" 1>&6
7860 else
7861   
7862                 # save the flags
7863                 ol_LIBS="$LIBS"
7864                 LIBS="-lpthread $LIBS"
7865
7866                 if test "$cross_compiling" = yes; then
7867   cat > conftest.$ac_ext <<EOF
7868 #line 7869 "configure"
7869 #include "confdefs.h"
7870 /* pthread test headers */
7871 #include <pthread.h>
7872 #ifndef NULL
7873 #define NULL (void*)0
7874 #endif
7875
7876 static void *task(p)
7877         void *p;
7878 {
7879         return (void *) (p == NULL);
7880 }
7881
7882 int main() {
7883
7884         /* pthread test function */
7885         pthread_t t;
7886         int status;
7887
7888         /* make sure pthread_create() isn't just a stub */
7889 #if HAVE_PTHREADS_D4
7890         status = pthread_create(&t, pthread_attr_default, task, NULL);
7891 #else
7892         status = pthread_create(&t, NULL, task, NULL);
7893 #endif
7894
7895         if( status ) exit( status );
7896
7897         /* make sure pthread_detach() isn't just a stub */
7898 #if HAVE_PTHREADS_D4
7899         status = pthread_detach( &t );
7900 #else
7901         status = pthread_detach( t );
7902 #endif
7903
7904 #ifdef HAVE_LINUX_THREADS
7905         pthread_kill_other_threads_np();
7906 #endif
7907
7908         exit( status );
7909
7910 ; return 0; }
7911 EOF
7912 if { (eval echo configure:7913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7913   rm -rf conftest*
7914   ol_cv_pthread_lpthread=yes
7915 else
7916   echo "configure: failed program was:" >&5
7917   cat conftest.$ac_ext >&5
7918   rm -rf conftest*
7919   ol_cv_pthread_lpthread=no
7920 fi
7921 rm -f conftest*
7922 else
7923   cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 /* pthread test headers */
7927 #include <pthread.h>
7928 #ifndef NULL
7929 #define NULL (void*)0
7930 #endif
7931
7932 static void *task(p)
7933         void *p;
7934 {
7935         return (void *) (p == NULL);
7936 }
7937
7938
7939 int main(argc, argv)
7940         int argc;
7941         char **argv;
7942 {
7943
7944         /* pthread test function */
7945         pthread_t t;
7946         int status;
7947
7948         /* make sure pthread_create() isn't just a stub */
7949 #if HAVE_PTHREADS_D4
7950         status = pthread_create(&t, pthread_attr_default, task, NULL);
7951 #else
7952         status = pthread_create(&t, NULL, task, NULL);
7953 #endif
7954
7955         if( status ) exit( status );
7956
7957         /* make sure pthread_detach() isn't just a stub */
7958 #if HAVE_PTHREADS_D4
7959         status = pthread_detach( &t );
7960 #else
7961         status = pthread_detach( t );
7962 #endif
7963
7964 #ifdef HAVE_LINUX_THREADS
7965         pthread_kill_other_threads_np();
7966 #endif
7967
7968         exit( status );
7969
7970 }
7971
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7974 then
7975   ol_cv_pthread_lpthread=yes
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -fr conftest*
7980   ol_cv_pthread_lpthread=no
7981 fi
7982 rm -fr conftest*
7983 fi
7984
7985
7986                 # restore the LIBS
7987                 LIBS="$ol_LIBS"
7988         
7989 fi
7990
7991 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7992
7993         if test $ol_cv_pthread_lpthread = yes ; then
7994                 ol_link_pthreads="-lpthread"
7995                 ol_link_threads=posix
7996         fi
7997 fi
7998
7999                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8000 if test "$ol_link_threads" = no ; then
8001         # try -lc_r
8002         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8003 echo "configure:8004: checking for pthread link with -lc_r" >&5
8004 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8005   echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8007   
8008                 # save the flags
8009                 ol_LIBS="$LIBS"
8010                 LIBS="-lc_r $LIBS"
8011
8012                 if test "$cross_compiling" = yes; then
8013   cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* pthread test headers */
8017 #include <pthread.h>
8018 #ifndef NULL
8019 #define NULL (void*)0
8020 #endif
8021
8022 static void *task(p)
8023         void *p;
8024 {
8025         return (void *) (p == NULL);
8026 }
8027
8028 int main() {
8029
8030         /* pthread test function */
8031         pthread_t t;
8032         int status;
8033
8034         /* make sure pthread_create() isn't just a stub */
8035 #if HAVE_PTHREADS_D4
8036         status = pthread_create(&t, pthread_attr_default, task, NULL);
8037 #else
8038         status = pthread_create(&t, NULL, task, NULL);
8039 #endif
8040
8041         if( status ) exit( status );
8042
8043         /* make sure pthread_detach() isn't just a stub */
8044 #if HAVE_PTHREADS_D4
8045         status = pthread_detach( &t );
8046 #else
8047         status = pthread_detach( t );
8048 #endif
8049
8050 #ifdef HAVE_LINUX_THREADS
8051         pthread_kill_other_threads_np();
8052 #endif
8053
8054         exit( status );
8055
8056 ; return 0; }
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8059   rm -rf conftest*
8060   ol_cv_pthread_lc_r=yes
8061 else
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -rf conftest*
8065   ol_cv_pthread_lc_r=no
8066 fi
8067 rm -f conftest*
8068 else
8069   cat > conftest.$ac_ext <<EOF
8070 #line 8071 "configure"
8071 #include "confdefs.h"
8072 /* pthread test headers */
8073 #include <pthread.h>
8074 #ifndef NULL
8075 #define NULL (void*)0
8076 #endif
8077
8078 static void *task(p)
8079         void *p;
8080 {
8081         return (void *) (p == NULL);
8082 }
8083
8084
8085 int main(argc, argv)
8086         int argc;
8087         char **argv;
8088 {
8089
8090         /* pthread test function */
8091         pthread_t t;
8092         int status;
8093
8094         /* make sure pthread_create() isn't just a stub */
8095 #if HAVE_PTHREADS_D4
8096         status = pthread_create(&t, pthread_attr_default, task, NULL);
8097 #else
8098         status = pthread_create(&t, NULL, task, NULL);
8099 #endif
8100
8101         if( status ) exit( status );
8102
8103         /* make sure pthread_detach() isn't just a stub */
8104 #if HAVE_PTHREADS_D4
8105         status = pthread_detach( &t );
8106 #else
8107         status = pthread_detach( t );
8108 #endif
8109
8110 #ifdef HAVE_LINUX_THREADS
8111         pthread_kill_other_threads_np();
8112 #endif
8113
8114         exit( status );
8115
8116 }
8117
8118 EOF
8119 if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8120 then
8121   ol_cv_pthread_lc_r=yes
8122 else
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -fr conftest*
8126   ol_cv_pthread_lc_r=no
8127 fi
8128 rm -fr conftest*
8129 fi
8130
8131
8132                 # restore the LIBS
8133                 LIBS="$ol_LIBS"
8134         
8135 fi
8136
8137 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8138
8139         if test $ol_cv_pthread_lc_r = yes ; then
8140                 ol_link_pthreads="-lc_r"
8141                 ol_link_threads=posix
8142         fi
8143 fi
8144
8145
8146                 # Pthread try link: -threads (ol_cv_pthread_threads)
8147 if test "$ol_link_threads" = no ; then
8148         # try -threads
8149         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8150 echo "configure:8151: checking for pthread link with -threads" >&5
8151 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   
8155                 # save the flags
8156                 ol_LIBS="$LIBS"
8157                 LIBS="-threads $LIBS"
8158
8159                 if test "$cross_compiling" = yes; then
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 /* pthread test headers */
8164 #include <pthread.h>
8165 #ifndef NULL
8166 #define NULL (void*)0
8167 #endif
8168
8169 static void *task(p)
8170         void *p;
8171 {
8172         return (void *) (p == NULL);
8173 }
8174
8175 int main() {
8176
8177         /* pthread test function */
8178         pthread_t t;
8179         int status;
8180
8181         /* make sure pthread_create() isn't just a stub */
8182 #if HAVE_PTHREADS_D4
8183         status = pthread_create(&t, pthread_attr_default, task, NULL);
8184 #else
8185         status = pthread_create(&t, NULL, task, NULL);
8186 #endif
8187
8188         if( status ) exit( status );
8189
8190         /* make sure pthread_detach() isn't just a stub */
8191 #if HAVE_PTHREADS_D4
8192         status = pthread_detach( &t );
8193 #else
8194         status = pthread_detach( t );
8195 #endif
8196
8197 #ifdef HAVE_LINUX_THREADS
8198         pthread_kill_other_threads_np();
8199 #endif
8200
8201         exit( status );
8202
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8206   rm -rf conftest*
8207   ol_cv_pthread_threads=yes
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   ol_cv_pthread_threads=no
8213 fi
8214 rm -f conftest*
8215 else
8216   cat > conftest.$ac_ext <<EOF
8217 #line 8218 "configure"
8218 #include "confdefs.h"
8219 /* pthread test headers */
8220 #include <pthread.h>
8221 #ifndef NULL
8222 #define NULL (void*)0
8223 #endif
8224
8225 static void *task(p)
8226         void *p;
8227 {
8228         return (void *) (p == NULL);
8229 }
8230
8231
8232 int main(argc, argv)
8233         int argc;
8234         char **argv;
8235 {
8236
8237         /* pthread test function */
8238         pthread_t t;
8239         int status;
8240
8241         /* make sure pthread_create() isn't just a stub */
8242 #if HAVE_PTHREADS_D4
8243         status = pthread_create(&t, pthread_attr_default, task, NULL);
8244 #else
8245         status = pthread_create(&t, NULL, task, NULL);
8246 #endif
8247
8248         if( status ) exit( status );
8249
8250         /* make sure pthread_detach() isn't just a stub */
8251 #if HAVE_PTHREADS_D4
8252         status = pthread_detach( &t );
8253 #else
8254         status = pthread_detach( t );
8255 #endif
8256
8257 #ifdef HAVE_LINUX_THREADS
8258         pthread_kill_other_threads_np();
8259 #endif
8260
8261         exit( status );
8262
8263 }
8264
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8267 then
8268   ol_cv_pthread_threads=yes
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -fr conftest*
8273   ol_cv_pthread_threads=no
8274 fi
8275 rm -fr conftest*
8276 fi
8277
8278
8279                 # restore the LIBS
8280                 LIBS="$ol_LIBS"
8281         
8282 fi
8283
8284 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8285
8286         if test $ol_cv_pthread_threads = yes ; then
8287                 ol_link_pthreads="-threads"
8288                 ol_link_threads=posix
8289         fi
8290 fi
8291
8292
8293                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8294 if test "$ol_link_threads" = no ; then
8295         # try -lpthreads -lmach -lexc -lc_r
8296         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8297 echo "configure:8298: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8298 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8299   echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8301   
8302                 # save the flags
8303                 ol_LIBS="$LIBS"
8304                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8305
8306                 if test "$cross_compiling" = yes; then
8307   cat > conftest.$ac_ext <<EOF
8308 #line 8309 "configure"
8309 #include "confdefs.h"
8310 /* pthread test headers */
8311 #include <pthread.h>
8312 #ifndef NULL
8313 #define NULL (void*)0
8314 #endif
8315
8316 static void *task(p)
8317         void *p;
8318 {
8319         return (void *) (p == NULL);
8320 }
8321
8322 int main() {
8323
8324         /* pthread test function */
8325         pthread_t t;
8326         int status;
8327
8328         /* make sure pthread_create() isn't just a stub */
8329 #if HAVE_PTHREADS_D4
8330         status = pthread_create(&t, pthread_attr_default, task, NULL);
8331 #else
8332         status = pthread_create(&t, NULL, task, NULL);
8333 #endif
8334
8335         if( status ) exit( status );
8336
8337         /* make sure pthread_detach() isn't just a stub */
8338 #if HAVE_PTHREADS_D4
8339         status = pthread_detach( &t );
8340 #else
8341         status = pthread_detach( t );
8342 #endif
8343
8344 #ifdef HAVE_LINUX_THREADS
8345         pthread_kill_other_threads_np();
8346 #endif
8347
8348         exit( status );
8349
8350 ; return 0; }
8351 EOF
8352 if { (eval echo configure:8353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8353   rm -rf conftest*
8354   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8355 else
8356   echo "configure: failed program was:" >&5
8357   cat conftest.$ac_ext >&5
8358   rm -rf conftest*
8359   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8360 fi
8361 rm -f conftest*
8362 else
8363   cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* pthread test headers */
8367 #include <pthread.h>
8368 #ifndef NULL
8369 #define NULL (void*)0
8370 #endif
8371
8372 static void *task(p)
8373         void *p;
8374 {
8375         return (void *) (p == NULL);
8376 }
8377
8378
8379 int main(argc, argv)
8380         int argc;
8381         char **argv;
8382 {
8383
8384         /* pthread test function */
8385         pthread_t t;
8386         int status;
8387
8388         /* make sure pthread_create() isn't just a stub */
8389 #if HAVE_PTHREADS_D4
8390         status = pthread_create(&t, pthread_attr_default, task, NULL);
8391 #else
8392         status = pthread_create(&t, NULL, task, NULL);
8393 #endif
8394
8395         if( status ) exit( status );
8396
8397         /* make sure pthread_detach() isn't just a stub */
8398 #if HAVE_PTHREADS_D4
8399         status = pthread_detach( &t );
8400 #else
8401         status = pthread_detach( t );
8402 #endif
8403
8404 #ifdef HAVE_LINUX_THREADS
8405         pthread_kill_other_threads_np();
8406 #endif
8407
8408         exit( status );
8409
8410 }
8411
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8414 then
8415   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8416 else
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -fr conftest*
8420   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8421 fi
8422 rm -fr conftest*
8423 fi
8424
8425
8426                 # restore the LIBS
8427                 LIBS="$ol_LIBS"
8428         
8429 fi
8430
8431 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8432
8433         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8434                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8435                 ol_link_threads=posix
8436         fi
8437 fi
8438
8439                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8440 if test "$ol_link_threads" = no ; then
8441         # try -lpthreads -lmach -lexc
8442         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8443 echo "configure:8444: checking for pthread link with -lpthreads -lmach -lexc" >&5
8444 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8445   echo $ac_n "(cached) $ac_c" 1>&6
8446 else
8447   
8448                 # save the flags
8449                 ol_LIBS="$LIBS"
8450                 LIBS="-lpthreads -lmach -lexc $LIBS"
8451
8452                 if test "$cross_compiling" = yes; then
8453   cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 /* pthread test headers */
8457 #include <pthread.h>
8458 #ifndef NULL
8459 #define NULL (void*)0
8460 #endif
8461
8462 static void *task(p)
8463         void *p;
8464 {
8465         return (void *) (p == NULL);
8466 }
8467
8468 int main() {
8469
8470         /* pthread test function */
8471         pthread_t t;
8472         int status;
8473
8474         /* make sure pthread_create() isn't just a stub */
8475 #if HAVE_PTHREADS_D4
8476         status = pthread_create(&t, pthread_attr_default, task, NULL);
8477 #else
8478         status = pthread_create(&t, NULL, task, NULL);
8479 #endif
8480
8481         if( status ) exit( status );
8482
8483         /* make sure pthread_detach() isn't just a stub */
8484 #if HAVE_PTHREADS_D4
8485         status = pthread_detach( &t );
8486 #else
8487         status = pthread_detach( t );
8488 #endif
8489
8490 #ifdef HAVE_LINUX_THREADS
8491         pthread_kill_other_threads_np();
8492 #endif
8493
8494         exit( status );
8495
8496 ; return 0; }
8497 EOF
8498 if { (eval echo configure:8499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8499   rm -rf conftest*
8500   ol_cv_pthread_lpthreads_lmach_lexc=yes
8501 else
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   ol_cv_pthread_lpthreads_lmach_lexc=no
8506 fi
8507 rm -f conftest*
8508 else
8509   cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 /* pthread test headers */
8513 #include <pthread.h>
8514 #ifndef NULL
8515 #define NULL (void*)0
8516 #endif
8517
8518 static void *task(p)
8519         void *p;
8520 {
8521         return (void *) (p == NULL);
8522 }
8523
8524
8525 int main(argc, argv)
8526         int argc;
8527         char **argv;
8528 {
8529
8530         /* pthread test function */
8531         pthread_t t;
8532         int status;
8533
8534         /* make sure pthread_create() isn't just a stub */
8535 #if HAVE_PTHREADS_D4
8536         status = pthread_create(&t, pthread_attr_default, task, NULL);
8537 #else
8538         status = pthread_create(&t, NULL, task, NULL);
8539 #endif
8540
8541         if( status ) exit( status );
8542
8543         /* make sure pthread_detach() isn't just a stub */
8544 #if HAVE_PTHREADS_D4
8545         status = pthread_detach( &t );
8546 #else
8547         status = pthread_detach( t );
8548 #endif
8549
8550 #ifdef HAVE_LINUX_THREADS
8551         pthread_kill_other_threads_np();
8552 #endif
8553
8554         exit( status );
8555
8556 }
8557
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8560 then
8561   ol_cv_pthread_lpthreads_lmach_lexc=yes
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -fr conftest*
8566   ol_cv_pthread_lpthreads_lmach_lexc=no
8567 fi
8568 rm -fr conftest*
8569 fi
8570
8571
8572                 # restore the LIBS
8573                 LIBS="$ol_LIBS"
8574         
8575 fi
8576
8577 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8578
8579         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8580                 ol_link_pthreads="-lpthreads -lmach -lexc"
8581                 ol_link_threads=posix
8582         fi
8583 fi
8584
8585                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8586 if test "$ol_link_threads" = no ; then
8587         # try -lpthreads -lexc
8588         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8589 echo "configure:8590: checking for pthread link with -lpthreads -lexc" >&5
8590 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8591   echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593   
8594                 # save the flags
8595                 ol_LIBS="$LIBS"
8596                 LIBS="-lpthreads -lexc $LIBS"
8597
8598                 if test "$cross_compiling" = yes; then
8599   cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 /* pthread test headers */
8603 #include <pthread.h>
8604 #ifndef NULL
8605 #define NULL (void*)0
8606 #endif
8607
8608 static void *task(p)
8609         void *p;
8610 {
8611         return (void *) (p == NULL);
8612 }
8613
8614 int main() {
8615
8616         /* pthread test function */
8617         pthread_t t;
8618         int status;
8619
8620         /* make sure pthread_create() isn't just a stub */
8621 #if HAVE_PTHREADS_D4
8622         status = pthread_create(&t, pthread_attr_default, task, NULL);
8623 #else
8624         status = pthread_create(&t, NULL, task, NULL);
8625 #endif
8626
8627         if( status ) exit( status );
8628
8629         /* make sure pthread_detach() isn't just a stub */
8630 #if HAVE_PTHREADS_D4
8631         status = pthread_detach( &t );
8632 #else
8633         status = pthread_detach( t );
8634 #endif
8635
8636 #ifdef HAVE_LINUX_THREADS
8637         pthread_kill_other_threads_np();
8638 #endif
8639
8640         exit( status );
8641
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   ol_cv_pthread_lpthreads_lexc=yes
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   ol_cv_pthread_lpthreads_lexc=no
8652 fi
8653 rm -f conftest*
8654 else
8655   cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 /* pthread test headers */
8659 #include <pthread.h>
8660 #ifndef NULL
8661 #define NULL (void*)0
8662 #endif
8663
8664 static void *task(p)
8665         void *p;
8666 {
8667         return (void *) (p == NULL);
8668 }
8669
8670
8671 int main(argc, argv)
8672         int argc;
8673         char **argv;
8674 {
8675
8676         /* pthread test function */
8677         pthread_t t;
8678         int status;
8679
8680         /* make sure pthread_create() isn't just a stub */
8681 #if HAVE_PTHREADS_D4
8682         status = pthread_create(&t, pthread_attr_default, task, NULL);
8683 #else
8684         status = pthread_create(&t, NULL, task, NULL);
8685 #endif
8686
8687         if( status ) exit( status );
8688
8689         /* make sure pthread_detach() isn't just a stub */
8690 #if HAVE_PTHREADS_D4
8691         status = pthread_detach( &t );
8692 #else
8693         status = pthread_detach( t );
8694 #endif
8695
8696 #ifdef HAVE_LINUX_THREADS
8697         pthread_kill_other_threads_np();
8698 #endif
8699
8700         exit( status );
8701
8702 }
8703
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8706 then
8707   ol_cv_pthread_lpthreads_lexc=yes
8708 else
8709   echo "configure: failed program was:" >&5
8710   cat conftest.$ac_ext >&5
8711   rm -fr conftest*
8712   ol_cv_pthread_lpthreads_lexc=no
8713 fi
8714 rm -fr conftest*
8715 fi
8716
8717
8718                 # restore the LIBS
8719                 LIBS="$ol_LIBS"
8720         
8721 fi
8722
8723 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8724
8725         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8726                 ol_link_pthreads="-lpthreads -lexc"
8727                 ol_link_threads=posix
8728         fi
8729 fi
8730
8731
8732                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8733 if test "$ol_link_threads" = no ; then
8734         # try -lpthreads
8735         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8736 echo "configure:8737: checking for pthread link with -lpthreads" >&5
8737 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   
8741                 # save the flags
8742                 ol_LIBS="$LIBS"
8743                 LIBS="-lpthreads $LIBS"
8744
8745                 if test "$cross_compiling" = yes; then
8746   cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 /* pthread test headers */
8750 #include <pthread.h>
8751 #ifndef NULL
8752 #define NULL (void*)0
8753 #endif
8754
8755 static void *task(p)
8756         void *p;
8757 {
8758         return (void *) (p == NULL);
8759 }
8760
8761 int main() {
8762
8763         /* pthread test function */
8764         pthread_t t;
8765         int status;
8766
8767         /* make sure pthread_create() isn't just a stub */
8768 #if HAVE_PTHREADS_D4
8769         status = pthread_create(&t, pthread_attr_default, task, NULL);
8770 #else
8771         status = pthread_create(&t, NULL, task, NULL);
8772 #endif
8773
8774         if( status ) exit( status );
8775
8776         /* make sure pthread_detach() isn't just a stub */
8777 #if HAVE_PTHREADS_D4
8778         status = pthread_detach( &t );
8779 #else
8780         status = pthread_detach( t );
8781 #endif
8782
8783 #ifdef HAVE_LINUX_THREADS
8784         pthread_kill_other_threads_np();
8785 #endif
8786
8787         exit( status );
8788
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8792   rm -rf conftest*
8793   ol_cv_pthread_lib_lpthreads=yes
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   ol_cv_pthread_lib_lpthreads=no
8799 fi
8800 rm -f conftest*
8801 else
8802   cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 /* pthread test headers */
8806 #include <pthread.h>
8807 #ifndef NULL
8808 #define NULL (void*)0
8809 #endif
8810
8811 static void *task(p)
8812         void *p;
8813 {
8814         return (void *) (p == NULL);
8815 }
8816
8817
8818 int main(argc, argv)
8819         int argc;
8820         char **argv;
8821 {
8822
8823         /* pthread test function */
8824         pthread_t t;
8825         int status;
8826
8827         /* make sure pthread_create() isn't just a stub */
8828 #if HAVE_PTHREADS_D4
8829         status = pthread_create(&t, pthread_attr_default, task, NULL);
8830 #else
8831         status = pthread_create(&t, NULL, task, NULL);
8832 #endif
8833
8834         if( status ) exit( status );
8835
8836         /* make sure pthread_detach() isn't just a stub */
8837 #if HAVE_PTHREADS_D4
8838         status = pthread_detach( &t );
8839 #else
8840         status = pthread_detach( t );
8841 #endif
8842
8843 #ifdef HAVE_LINUX_THREADS
8844         pthread_kill_other_threads_np();
8845 #endif
8846
8847         exit( status );
8848
8849 }
8850
8851 EOF
8852 if { (eval echo configure:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8853 then
8854   ol_cv_pthread_lib_lpthreads=yes
8855 else
8856   echo "configure: failed program was:" >&5
8857   cat conftest.$ac_ext >&5
8858   rm -fr conftest*
8859   ol_cv_pthread_lib_lpthreads=no
8860 fi
8861 rm -fr conftest*
8862 fi
8863
8864
8865                 # restore the LIBS
8866                 LIBS="$ol_LIBS"
8867         
8868 fi
8869
8870 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8871
8872         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8873                 ol_link_pthreads="-lpthreads"
8874                 ol_link_threads=posix
8875         fi
8876 fi
8877
8878
8879                 if test $ol_link_threads != no ; then
8880                         cat >> confdefs.h <<\EOF
8881 #define HAVE_PTHREADS 1
8882 EOF
8883
8884
8885                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8886
8887                                                 save_CPPFLAGS="$CPPFLAGS"
8888                         save_LIBS="$LIBS"
8889                         LIBS="$LTHREAD_LIBS $LIBS"
8890
8891                                                                                                 for ac_func in sched_yield pthread_yield
8892 do
8893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8894 echo "configure:8895: checking for $ac_func" >&5
8895 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8896   echo $ac_n "(cached) $ac_c" 1>&6
8897 else
8898   cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* System header to define __stub macros and hopefully few prototypes,
8902     which can conflict with char $ac_func(); below.  */
8903 #include <assert.h>
8904 /* Override any gcc2 internal prototype to avoid an error.  */
8905 /* We use char because int might match the return type of a gcc2
8906     builtin and then its argument prototype would still apply.  */
8907 char $ac_func();
8908 char (*f)();
8909
8910 int main() {
8911
8912 /* The GNU C library defines this for functions which it implements
8913     to always fail with ENOSYS.  Some functions are actually named
8914     something starting with __ and the normal name is an alias.  */
8915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8916 choke me
8917 #else
8918 f = $ac_func;
8919 #endif
8920
8921 ; return 0; }
8922 EOF
8923 if { (eval echo configure:8924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8924   rm -rf conftest*
8925   eval "ac_cv_func_$ac_func=yes"
8926 else
8927   echo "configure: failed program was:" >&5
8928   cat conftest.$ac_ext >&5
8929   rm -rf conftest*
8930   eval "ac_cv_func_$ac_func=no"
8931 fi
8932 rm -f conftest*
8933 fi
8934
8935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8936   echo "$ac_t""yes" 1>&6
8937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8938   cat >> confdefs.h <<EOF
8939 #define $ac_tr_func 1
8940 EOF
8941  
8942 else
8943   echo "$ac_t""no" 1>&6
8944 fi
8945 done
8946
8947
8948                         if test $ac_cv_func_sched_yield = no -a \
8949                                 $ac_cv_func_pthread_yield = no ; then
8950                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8951 echo "configure:8952: checking for sched_yield in -lrt" >&5
8952 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8953 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8954   echo $ac_n "(cached) $ac_c" 1>&6
8955 else
8956   ac_save_LIBS="$LIBS"
8957 LIBS="-lrt  $LIBS"
8958 cat > conftest.$ac_ext <<EOF
8959 #line 8960 "configure"
8960 #include "confdefs.h"
8961 /* Override any gcc2 internal prototype to avoid an error.  */
8962 /* We use char because int might match the return type of a gcc2
8963     builtin and then its argument prototype would still apply.  */
8964 char sched_yield();
8965
8966 int main() {
8967 sched_yield()
8968 ; return 0; }
8969 EOF
8970 if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8971   rm -rf conftest*
8972   eval "ac_cv_lib_$ac_lib_var=yes"
8973 else
8974   echo "configure: failed program was:" >&5
8975   cat conftest.$ac_ext >&5
8976   rm -rf conftest*
8977   eval "ac_cv_lib_$ac_lib_var=no"
8978 fi
8979 rm -f conftest*
8980 LIBS="$ac_save_LIBS"
8981
8982 fi
8983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8984   echo "$ac_t""yes" 1>&6
8985   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8986                                         cat >> confdefs.h <<\EOF
8987 #define HAVE_SCHED_YIELD 1
8988 EOF
8989
8990                                         ac_cv_func_sched_yield=yes
8991 else
8992   echo "$ac_t""no" 1>&6
8993 ac_cv_func_sched_yield=no
8994 fi
8995
8996                         fi
8997                         if test $ac_cv_func_sched_yield = no -a \
8998                                 $ac_cv_func_pthread_yield = no ; then
8999                                                                                                 for ac_func in thr_yield
9000 do
9001 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9002 echo "configure:9003: checking for $ac_func" >&5
9003 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9004   echo $ac_n "(cached) $ac_c" 1>&6
9005 else
9006   cat > conftest.$ac_ext <<EOF
9007 #line 9008 "configure"
9008 #include "confdefs.h"
9009 /* System header to define __stub macros and hopefully few prototypes,
9010     which can conflict with char $ac_func(); below.  */
9011 #include <assert.h>
9012 /* Override any gcc2 internal prototype to avoid an error.  */
9013 /* We use char because int might match the return type of a gcc2
9014     builtin and then its argument prototype would still apply.  */
9015 char $ac_func();
9016 char (*f)();
9017
9018 int main() {
9019
9020 /* The GNU C library defines this for functions which it implements
9021     to always fail with ENOSYS.  Some functions are actually named
9022     something starting with __ and the normal name is an alias.  */
9023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9024 choke me
9025 #else
9026 f = $ac_func;
9027 #endif
9028
9029 ; return 0; }
9030 EOF
9031 if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9032   rm -rf conftest*
9033   eval "ac_cv_func_$ac_func=yes"
9034 else
9035   echo "configure: failed program was:" >&5
9036   cat conftest.$ac_ext >&5
9037   rm -rf conftest*
9038   eval "ac_cv_func_$ac_func=no"
9039 fi
9040 rm -f conftest*
9041 fi
9042
9043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9044   echo "$ac_t""yes" 1>&6
9045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9046   cat >> confdefs.h <<EOF
9047 #define $ac_tr_func 1
9048 EOF
9049  
9050 else
9051   echo "$ac_t""no" 1>&6
9052 fi
9053 done
9054
9055                         fi
9056                         if test $ac_cv_func_sched_yield = no -a \
9057                                 $ac_cv_func_pthread_yield = no -a \
9058                                 "$ac_cv_func_thr_yield" = no ; then
9059                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9060                         fi
9061
9062                                                 for ac_func in pthread_kill
9063 do
9064 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9065 echo "configure:9066: checking for $ac_func" >&5
9066 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9067   echo $ac_n "(cached) $ac_c" 1>&6
9068 else
9069   cat > conftest.$ac_ext <<EOF
9070 #line 9071 "configure"
9071 #include "confdefs.h"
9072 /* System header to define __stub macros and hopefully few prototypes,
9073     which can conflict with char $ac_func(); below.  */
9074 #include <assert.h>
9075 /* Override any gcc2 internal prototype to avoid an error.  */
9076 /* We use char because int might match the return type of a gcc2
9077     builtin and then its argument prototype would still apply.  */
9078 char $ac_func();
9079 char (*f)();
9080
9081 int main() {
9082
9083 /* The GNU C library defines this for functions which it implements
9084     to always fail with ENOSYS.  Some functions are actually named
9085     something starting with __ and the normal name is an alias.  */
9086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9087 choke me
9088 #else
9089 f = $ac_func;
9090 #endif
9091
9092 ; return 0; }
9093 EOF
9094 if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9095   rm -rf conftest*
9096   eval "ac_cv_func_$ac_func=yes"
9097 else
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -rf conftest*
9101   eval "ac_cv_func_$ac_func=no"
9102 fi
9103 rm -f conftest*
9104 fi
9105
9106 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9107   echo "$ac_t""yes" 1>&6
9108     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9109   cat >> confdefs.h <<EOF
9110 #define $ac_tr_func 1
9111 EOF
9112  
9113 else
9114   echo "$ac_t""no" 1>&6
9115 fi
9116 done
9117
9118
9119                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9120 echo "configure:9121: checking for pthread_detach with <pthread.h>" >&5
9121 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9122   echo $ac_n "(cached) $ac_c" 1>&6
9123 else
9124   
9125                                                                 cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128
9129 #include <pthread.h>
9130 #ifndef NULL
9131 #define NULL (void*)0
9132 #endif
9133
9134 int main() {
9135 pthread_detach(NULL);
9136 ; return 0; }
9137 EOF
9138 if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9139   rm -rf conftest*
9140   ol_cv_func_pthread_detach=yes
9141 else
9142   echo "configure: failed program was:" >&5
9143   cat conftest.$ac_ext >&5
9144   rm -rf conftest*
9145   ol_cv_func_pthread_detach=no
9146 fi
9147 rm -f conftest*
9148                         
9149 fi
9150
9151 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9152
9153                         if test $ol_cv_func_pthread_detach = no ; then
9154                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9155                         fi
9156
9157                         cat >> confdefs.h <<\EOF
9158 #define HAVE_PTHREAD_DETACH 1
9159 EOF
9160
9161
9162                                                 for ac_func in \
9163                                 pthread_setconcurrency \
9164                                 pthread_getconcurrency \
9165                                 thr_setconcurrency \
9166                                 thr_getconcurrency \
9167                         
9168 do
9169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9170 echo "configure:9171: checking for $ac_func" >&5
9171 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9172   echo $ac_n "(cached) $ac_c" 1>&6
9173 else
9174   cat > conftest.$ac_ext <<EOF
9175 #line 9176 "configure"
9176 #include "confdefs.h"
9177 /* System header to define __stub macros and hopefully few prototypes,
9178     which can conflict with char $ac_func(); below.  */
9179 #include <assert.h>
9180 /* Override any gcc2 internal prototype to avoid an error.  */
9181 /* We use char because int might match the return type of a gcc2
9182     builtin and then its argument prototype would still apply.  */
9183 char $ac_func();
9184 char (*f)();
9185
9186 int main() {
9187
9188 /* The GNU C library defines this for functions which it implements
9189     to always fail with ENOSYS.  Some functions are actually named
9190     something starting with __ and the normal name is an alias.  */
9191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9192 choke me
9193 #else
9194 f = $ac_func;
9195 #endif
9196
9197 ; return 0; }
9198 EOF
9199 if { (eval echo configure:9200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9200   rm -rf conftest*
9201   eval "ac_cv_func_$ac_func=yes"
9202 else
9203   echo "configure: failed program was:" >&5
9204   cat conftest.$ac_ext >&5
9205   rm -rf conftest*
9206   eval "ac_cv_func_$ac_func=no"
9207 fi
9208 rm -f conftest*
9209 fi
9210
9211 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9212   echo "$ac_t""yes" 1>&6
9213     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9214   cat >> confdefs.h <<EOF
9215 #define $ac_tr_func 1
9216 EOF
9217  
9218 else
9219   echo "$ac_t""no" 1>&6
9220 fi
9221 done
9222
9223
9224                         
9225         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9226 echo "configure:9227: checking for pthread_kill_other_threads_np" >&5
9227 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9228   echo $ac_n "(cached) $ac_c" 1>&6
9229 else
9230   cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 /* System header to define __stub macros and hopefully few prototypes,
9234     which can conflict with char pthread_kill_other_threads_np(); below.  */
9235 #include <assert.h>
9236 /* Override any gcc2 internal prototype to avoid an error.  */
9237 /* We use char because int might match the return type of a gcc2
9238     builtin and then its argument prototype would still apply.  */
9239 char pthread_kill_other_threads_np();
9240 char (*f)();
9241
9242 int main() {
9243
9244 /* The GNU C library defines this for functions which it implements
9245     to always fail with ENOSYS.  Some functions are actually named
9246     something starting with __ and the normal name is an alias.  */
9247 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9248 choke me
9249 #else
9250 f = pthread_kill_other_threads_np;
9251 #endif
9252
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9263 fi
9264 rm -f conftest*
9265 fi
9266
9267 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9268   echo "$ac_t""yes" 1>&6
9269   :
9270 else
9271   echo "$ac_t""no" 1>&6
9272 fi
9273
9274         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9275 echo "configure:9276: checking for LinuxThreads implementation" >&5
9276 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9280 fi
9281
9282 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9283
9284                         
9285         
9286         
9287         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9288 echo "configure:9289: checking for LinuxThreads consistency" >&5
9289 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9290   echo $ac_n "(cached) $ac_c" 1>&6
9291 else
9292   
9293                 if test $ol_cv_header_linux_threads = yes -a \
9294                         $ol_cv_sys_linux_threads = yes; then
9295                         ol_cv_linux_threads=yes
9296                 elif test $ol_cv_header_linux_threads = no -a \
9297                         $ol_cv_sys_linux_threads = no; then
9298                         ol_cv_linux_threads=no
9299                 else
9300                         ol_cv_linux_threads=error
9301                 fi
9302         
9303 fi
9304
9305 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9306
9307
9308                         if test $ol_cv_linux_threads = error; then
9309                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9310                         fi
9311
9312                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9313 echo "configure:9314: checking if pthread_create() works" >&5
9314 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   
9318                         if test "$cross_compiling" = yes; then
9319                                 ol_cv_pthread_create_works=yes
9320 else
9321   cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9324 /* pthread test headers */
9325 #include <pthread.h>
9326 #ifndef NULL
9327 #define NULL (void*)0
9328 #endif
9329
9330 static void *task(p)
9331         void *p;
9332 {
9333         return (void *) (p == NULL);
9334 }
9335
9336
9337 int main(argc, argv)
9338         int argc;
9339         char **argv;
9340 {
9341
9342         /* pthread test function */
9343         pthread_t t;
9344         int status;
9345
9346         /* make sure pthread_create() isn't just a stub */
9347 #if HAVE_PTHREADS_D4
9348         status = pthread_create(&t, pthread_attr_default, task, NULL);
9349 #else
9350         status = pthread_create(&t, NULL, task, NULL);
9351 #endif
9352
9353         if( status ) exit( status );
9354
9355         /* make sure pthread_detach() isn't just a stub */
9356 #if HAVE_PTHREADS_D4
9357         status = pthread_detach( &t );
9358 #else
9359         status = pthread_detach( t );
9360 #endif
9361
9362 #ifdef HAVE_LINUX_THREADS
9363         pthread_kill_other_threads_np();
9364 #endif
9365
9366         exit( status );
9367
9368 }
9369
9370 EOF
9371 if { (eval echo configure:9372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9372 then
9373   ol_cv_pthread_create_works=yes
9374 else
9375   echo "configure: failed program was:" >&5
9376   cat conftest.$ac_ext >&5
9377   rm -fr conftest*
9378   ol_cv_pthread_create_works=no
9379 fi
9380 rm -fr conftest*
9381 fi
9382
9383 fi
9384
9385 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9386
9387                         if test $ol_cv_pthread_create_works = no ; then
9388                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9389                         fi
9390
9391                                                 if test $ol_with_yielding_select = auto ; then
9392                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9393 echo "configure:9394: checking if select yields when using pthreads" >&5
9394 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9395   echo $ac_n "(cached) $ac_c" 1>&6
9396 else
9397   
9398                                 if test "$cross_compiling" = yes; then
9399   ol_cv_pthread_select_yields=cross
9400 else
9401   cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404
9405 #include <sys/types.h>
9406 #include <sys/time.h>
9407 #include <unistd.h>
9408 #include <pthread.h>
9409 #ifndef NULL
9410 #define NULL (void*) 0
9411 #endif
9412
9413 static int fildes[2];
9414
9415 static void *task(p)
9416         void *p;
9417 {
9418         int i;
9419         struct timeval tv;
9420
9421         fd_set rfds;
9422
9423         tv.tv_sec=10;
9424         tv.tv_usec=0;
9425
9426         FD_ZERO(&rfds);
9427         FD_SET(fildes[0], &rfds);
9428
9429         /* we're not interested in any fds */
9430         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9431
9432         if(i < 0) {
9433                 perror("select");
9434                 exit(10);
9435         }
9436
9437         exit(0); /* if we exit here, the select blocked the whole process */
9438 }
9439
9440 int main(argc, argv)
9441         int argc;
9442         char **argv;
9443 {
9444         pthread_t t;
9445
9446         /* create a pipe to select */
9447         if(pipe(&fildes[0])) {
9448                 perror("select");
9449                 exit(1);
9450         }
9451
9452 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9453         (void) pthread_setconcurrency(2);
9454 #else
9455 #ifdef HAVE_THR_SETCONCURRENCY
9456         /* Set Solaris LWP concurrency to 2 */
9457         thr_setconcurrency(2);
9458 #endif
9459 #endif
9460
9461 #if HAVE_PTHREADS_D4
9462         pthread_create(&t, pthread_attr_default, task, NULL);
9463 #else
9464         pthread_create(&t, NULL, task, NULL);
9465 #endif
9466
9467 #if HAVE_SCHED_YIELD
9468         sched_yield();  /* make sure task runs first */
9469 #else
9470 #ifdef HAVE_PTHREAD_YIELD
9471         pthread_yield();        /* make sure task runs first */
9472 #endif
9473 #endif
9474
9475         exit(2);
9476 }
9477 EOF
9478 if { (eval echo configure:9479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9479 then
9480   ol_cv_pthread_select_yields=no
9481 else
9482   echo "configure: failed program was:" >&5
9483   cat conftest.$ac_ext >&5
9484   rm -fr conftest*
9485   ol_cv_pthread_select_yields=yes
9486 fi
9487 rm -fr conftest*
9488 fi
9489
9490 fi
9491
9492 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9493
9494                                 if test $ol_cv_pthread_select_yields = cross ; then
9495                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9496                                 fi
9497
9498                                 if test $ol_cv_pthread_select_yields = yes ; then
9499                                         ol_with_yielding_select=yes
9500                                 fi
9501                         fi
9502
9503                                                 CPPFLAGS="$save_CPPFLAGS"
9504                         LIBS="$save_LIBS"
9505                 else
9506                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9507                 fi
9508         fi
9509
9510         if test $ol_with_threads = posix ; then
9511                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9512         fi
9513 fi
9514
9515 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9516         -o $ol_with_threads = mach ; then
9517
9518                 for ac_hdr in mach/cthreads.h
9519 do
9520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9522 echo "configure:9523: checking for $ac_hdr" >&5
9523 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   cat > conftest.$ac_ext <<EOF
9527 #line 9528 "configure"
9528 #include "confdefs.h"
9529 #include <$ac_hdr>
9530 EOF
9531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9532 { (eval echo configure:9533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9534 if test -z "$ac_err"; then
9535   rm -rf conftest*
9536   eval "ac_cv_header_$ac_safe=yes"
9537 else
9538   echo "$ac_err" >&5
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   eval "ac_cv_header_$ac_safe=no"
9543 fi
9544 rm -f conftest*
9545 fi
9546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9547   echo "$ac_t""yes" 1>&6
9548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9549   cat >> confdefs.h <<EOF
9550 #define $ac_tr_hdr 1
9551 EOF
9552  
9553 else
9554   echo "$ac_t""no" 1>&6
9555 fi
9556 done
9557
9558         if test $ac_cv_header_mach_cthreads_h = yes ; then
9559                 ol_with_threads=found
9560
9561                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9562 echo "configure:9563: checking for cthread_fork" >&5
9563 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9564   echo $ac_n "(cached) $ac_c" 1>&6
9565 else
9566   cat > conftest.$ac_ext <<EOF
9567 #line 9568 "configure"
9568 #include "confdefs.h"
9569 /* System header to define __stub macros and hopefully few prototypes,
9570     which can conflict with char cthread_fork(); below.  */
9571 #include <assert.h>
9572 /* Override any gcc2 internal prototype to avoid an error.  */
9573 /* We use char because int might match the return type of a gcc2
9574     builtin and then its argument prototype would still apply.  */
9575 char cthread_fork();
9576 char (*f)();
9577
9578 int main() {
9579
9580 /* The GNU C library defines this for functions which it implements
9581     to always fail with ENOSYS.  Some functions are actually named
9582     something starting with __ and the normal name is an alias.  */
9583 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9584 choke me
9585 #else
9586 f = cthread_fork;
9587 #endif
9588
9589 ; return 0; }
9590 EOF
9591 if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9592   rm -rf conftest*
9593   eval "ac_cv_func_cthread_fork=yes"
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -rf conftest*
9598   eval "ac_cv_func_cthread_fork=no"
9599 fi
9600 rm -f conftest*
9601 fi
9602
9603 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9604   echo "$ac_t""yes" 1>&6
9605   ol_link_threads=yes
9606 else
9607   echo "$ac_t""no" 1>&6
9608 fi
9609
9610
9611                 if test $ol_link_threads = no ; then
9612                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9613 echo "configure:9614: checking for cthread_fork with -all_load" >&5
9614 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618                                                                 save_LIBS="$LIBS"
9619                                 LIBS="-all_load $LIBS"
9620                                 cat > conftest.$ac_ext <<EOF
9621 #line 9622 "configure"
9622 #include "confdefs.h"
9623 #include <mach/cthreads.h>
9624 int main() {
9625
9626                                         cthread_fork((void *)0, (void *)0);
9627                                         
9628 ; return 0; }
9629 EOF
9630 if { (eval echo configure:9631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9631   rm -rf conftest*
9632   ol_cv_cthread_all_load=yes
9633 else
9634   echo "configure: failed program was:" >&5
9635   cat conftest.$ac_ext >&5
9636   rm -rf conftest*
9637   ol_cv_cthread_all_load=no
9638 fi
9639 rm -f conftest*
9640                                                                 LIBS="$save_LIBS"
9641                         
9642 fi
9643
9644 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9645
9646                         if test $ol_cv_cthread_all_load = yes ; then
9647                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9648                                 ol_link_threads=mach
9649                         fi
9650                 fi
9651
9652                 if test $ol_link_threads != no ; then
9653                         : check for cthread specific functionality here
9654                         cat >> confdefs.h <<\EOF
9655 #define HAVE_MACH_CTHREADS 1
9656 EOF
9657
9658                 else
9659                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9660                 fi
9661         fi
9662
9663         if test $ol_with_threads = mach ; then
9664                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9665         fi
9666 fi
9667
9668 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9669         -o $ol_with_threads = lwp ; then
9670
9671                 for ac_hdr in thread.h synch.h
9672 do
9673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9675 echo "configure:9676: checking for $ac_hdr" >&5
9676 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9677   echo $ac_n "(cached) $ac_c" 1>&6
9678 else
9679   cat > conftest.$ac_ext <<EOF
9680 #line 9681 "configure"
9681 #include "confdefs.h"
9682 #include <$ac_hdr>
9683 EOF
9684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9685 { (eval echo configure:9686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9687 if test -z "$ac_err"; then
9688   rm -rf conftest*
9689   eval "ac_cv_header_$ac_safe=yes"
9690 else
9691   echo "$ac_err" >&5
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694   rm -rf conftest*
9695   eval "ac_cv_header_$ac_safe=no"
9696 fi
9697 rm -f conftest*
9698 fi
9699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9700   echo "$ac_t""yes" 1>&6
9701     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9702   cat >> confdefs.h <<EOF
9703 #define $ac_tr_hdr 1
9704 EOF
9705  
9706 else
9707   echo "$ac_t""no" 1>&6
9708 fi
9709 done
9710
9711         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9712                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9713 echo "configure:9714: checking for thr_create in -lthread" >&5
9714 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9715 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   ac_save_LIBS="$LIBS"
9719 LIBS="-lthread  $LIBS"
9720 cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 /* Override any gcc2 internal prototype to avoid an error.  */
9724 /* We use char because int might match the return type of a gcc2
9725     builtin and then its argument prototype would still apply.  */
9726 char thr_create();
9727
9728 int main() {
9729 thr_create()
9730 ; return 0; }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9733   rm -rf conftest*
9734   eval "ac_cv_lib_$ac_lib_var=yes"
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -rf conftest*
9739   eval "ac_cv_lib_$ac_lib_var=no"
9740 fi
9741 rm -f conftest*
9742 LIBS="$ac_save_LIBS"
9743
9744 fi
9745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9746   echo "$ac_t""yes" 1>&6
9747   have_thr=yes
9748 else
9749   echo "$ac_t""no" 1>&6
9750 have_thr=no
9751 fi
9752
9753
9754                 if test $have_thr = yes ; then
9755                         cat >> confdefs.h <<\EOF
9756 #define HAVE_THR 1
9757 EOF
9758
9759                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9760                         ol_link_threads=thr
9761
9762                         if test $ol_with_yielding_select = auto ; then
9763                                 ol_with_yielding_select=yes
9764                         fi
9765
9766                                                 for ac_func in \
9767                                 thr_setconcurrency \
9768                                 thr_getconcurrency \
9769                         
9770 do
9771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9772 echo "configure:9773: checking for $ac_func" >&5
9773 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9774   echo $ac_n "(cached) $ac_c" 1>&6
9775 else
9776   cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9779 /* System header to define __stub macros and hopefully few prototypes,
9780     which can conflict with char $ac_func(); below.  */
9781 #include <assert.h>
9782 /* Override any gcc2 internal prototype to avoid an error.  */
9783 /* We use char because int might match the return type of a gcc2
9784     builtin and then its argument prototype would still apply.  */
9785 char $ac_func();
9786 char (*f)();
9787
9788 int main() {
9789
9790 /* The GNU C library defines this for functions which it implements
9791     to always fail with ENOSYS.  Some functions are actually named
9792     something starting with __ and the normal name is an alias.  */
9793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9794 choke me
9795 #else
9796 f = $ac_func;
9797 #endif
9798
9799 ; return 0; }
9800 EOF
9801 if { (eval echo configure:9802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9802   rm -rf conftest*
9803   eval "ac_cv_func_$ac_func=yes"
9804 else
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807   rm -rf conftest*
9808   eval "ac_cv_func_$ac_func=no"
9809 fi
9810 rm -f conftest*
9811 fi
9812
9813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9814   echo "$ac_t""yes" 1>&6
9815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9816   cat >> confdefs.h <<EOF
9817 #define $ac_tr_func 1
9818 EOF
9819  
9820 else
9821   echo "$ac_t""no" 1>&6
9822 fi
9823 done
9824
9825                 fi
9826         fi
9827
9828                 for ac_hdr in lwp/lwp.h
9829 do
9830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9832 echo "configure:9833: checking for $ac_hdr" >&5
9833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9834   echo $ac_n "(cached) $ac_c" 1>&6
9835 else
9836   cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839 #include <$ac_hdr>
9840 EOF
9841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9842 { (eval echo configure:9843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9844 if test -z "$ac_err"; then
9845   rm -rf conftest*
9846   eval "ac_cv_header_$ac_safe=yes"
9847 else
9848   echo "$ac_err" >&5
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -rf conftest*
9852   eval "ac_cv_header_$ac_safe=no"
9853 fi
9854 rm -f conftest*
9855 fi
9856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9857   echo "$ac_t""yes" 1>&6
9858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9859   cat >> confdefs.h <<EOF
9860 #define $ac_tr_hdr 1
9861 EOF
9862  
9863 else
9864   echo "$ac_t""no" 1>&6
9865 fi
9866 done
9867
9868         if test $ac_cv_header_lwp_lwp_h = yes ; then
9869                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9870 echo "configure:9871: checking for lwp_create in -llwp" >&5
9871 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9873   echo $ac_n "(cached) $ac_c" 1>&6
9874 else
9875   ac_save_LIBS="$LIBS"
9876 LIBS="-llwp  $LIBS"
9877 cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 /* Override any gcc2 internal prototype to avoid an error.  */
9881 /* We use char because int might match the return type of a gcc2
9882     builtin and then its argument prototype would still apply.  */
9883 char lwp_create();
9884
9885 int main() {
9886 lwp_create()
9887 ; return 0; }
9888 EOF
9889 if { (eval echo configure:9890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9890   rm -rf conftest*
9891   eval "ac_cv_lib_$ac_lib_var=yes"
9892 else
9893   echo "configure: failed program was:" >&5
9894   cat conftest.$ac_ext >&5
9895   rm -rf conftest*
9896   eval "ac_cv_lib_$ac_lib_var=no"
9897 fi
9898 rm -f conftest*
9899 LIBS="$ac_save_LIBS"
9900
9901 fi
9902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9903   echo "$ac_t""yes" 1>&6
9904   have_lwp=yes
9905 else
9906   echo "$ac_t""no" 1>&6
9907 have_lwp=no
9908 fi
9909
9910
9911                 if test $have_lwp = yes ; then
9912                         cat >> confdefs.h <<\EOF
9913 #define HAVE_LWP 1
9914 EOF
9915
9916                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9917                         ol_link_threads=lwp
9918
9919                         if test $ol_with_yielding_select = auto ; then
9920                                 ol_with_yielding_select=no
9921                         fi
9922                 fi
9923         fi
9924 fi
9925
9926 if test $ol_with_yielding_select = yes ; then
9927         cat >> confdefs.h <<\EOF
9928 #define HAVE_YIELDING_SELECT 1
9929 EOF
9930
9931 fi
9932
9933 if test $ol_with_threads = manual ; then
9934                 ol_link_threads=yes
9935
9936         echo "configure: warning: thread defines and link options must be set manually" 1>&2
9937
9938         for ac_hdr in pthread.h sched.h
9939 do
9940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9942 echo "configure:9943: checking for $ac_hdr" >&5
9943 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9944   echo $ac_n "(cached) $ac_c" 1>&6
9945 else
9946   cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 #include <$ac_hdr>
9950 EOF
9951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9952 { (eval echo configure:9953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9954 if test -z "$ac_err"; then
9955   rm -rf conftest*
9956   eval "ac_cv_header_$ac_safe=yes"
9957 else
9958   echo "$ac_err" >&5
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   eval "ac_cv_header_$ac_safe=no"
9963 fi
9964 rm -f conftest*
9965 fi
9966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9967   echo "$ac_t""yes" 1>&6
9968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9969   cat >> confdefs.h <<EOF
9970 #define $ac_tr_hdr 1
9971 EOF
9972  
9973 else
9974   echo "$ac_t""no" 1>&6
9975 fi
9976 done
9977
9978         for ac_func in sched_yield pthread_yield
9979 do
9980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9981 echo "configure:9982: checking for $ac_func" >&5
9982 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   cat > conftest.$ac_ext <<EOF
9986 #line 9987 "configure"
9987 #include "confdefs.h"
9988 /* System header to define __stub macros and hopefully few prototypes,
9989     which can conflict with char $ac_func(); below.  */
9990 #include <assert.h>
9991 /* Override any gcc2 internal prototype to avoid an error.  */
9992 /* We use char because int might match the return type of a gcc2
9993     builtin and then its argument prototype would still apply.  */
9994 char $ac_func();
9995 char (*f)();
9996
9997 int main() {
9998
9999 /* The GNU C library defines this for functions which it implements
10000     to always fail with ENOSYS.  Some functions are actually named
10001     something starting with __ and the normal name is an alias.  */
10002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10003 choke me
10004 #else
10005 f = $ac_func;
10006 #endif
10007
10008 ; return 0; }
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10011   rm -rf conftest*
10012   eval "ac_cv_func_$ac_func=yes"
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016   rm -rf conftest*
10017   eval "ac_cv_func_$ac_func=no"
10018 fi
10019 rm -f conftest*
10020 fi
10021
10022 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10023   echo "$ac_t""yes" 1>&6
10024     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10025   cat >> confdefs.h <<EOF
10026 #define $ac_tr_func 1
10027 EOF
10028  
10029 else
10030   echo "$ac_t""no" 1>&6
10031 fi
10032 done
10033
10034         
10035         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10036 echo "configure:10037: checking for LinuxThreads pthread.h" >&5
10037 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10038   echo $ac_n "(cached) $ac_c" 1>&6
10039 else
10040   cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043 #include <pthread.h>
10044 EOF
10045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10046   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10047   rm -rf conftest*
10048   ol_cv_header_linux_threads=yes
10049 else
10050   rm -rf conftest*
10051   ol_cv_header_linux_threads=no
10052 fi
10053 rm -f conftest*
10054
10055                 
10056 fi
10057
10058 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10059         if test $ol_cv_header_linux_threads = yes; then
10060                 cat >> confdefs.h <<\EOF
10061 #define HAVE_LINUX_THREADS 1
10062 EOF
10063
10064         fi
10065
10066
10067         for ac_hdr in mach/cthreads.h
10068 do
10069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10071 echo "configure:10072: checking for $ac_hdr" >&5
10072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 #include <$ac_hdr>
10079 EOF
10080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10081 { (eval echo configure:10082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10083 if test -z "$ac_err"; then
10084   rm -rf conftest*
10085   eval "ac_cv_header_$ac_safe=yes"
10086 else
10087   echo "$ac_err" >&5
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   eval "ac_cv_header_$ac_safe=no"
10092 fi
10093 rm -f conftest*
10094 fi
10095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10096   echo "$ac_t""yes" 1>&6
10097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10098   cat >> confdefs.h <<EOF
10099 #define $ac_tr_hdr 1
10100 EOF
10101  
10102 else
10103   echo "$ac_t""no" 1>&6
10104 fi
10105 done
10106
10107         for ac_hdr in lwp/lwp.h
10108 do
10109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10111 echo "configure:10112: checking for $ac_hdr" >&5
10112 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10113   echo $ac_n "(cached) $ac_c" 1>&6
10114 else
10115   cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 #include <$ac_hdr>
10119 EOF
10120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10121 { (eval echo configure:10122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10123 if test -z "$ac_err"; then
10124   rm -rf conftest*
10125   eval "ac_cv_header_$ac_safe=yes"
10126 else
10127   echo "$ac_err" >&5
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_header_$ac_safe=no"
10132 fi
10133 rm -f conftest*
10134 fi
10135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10138   cat >> confdefs.h <<EOF
10139 #define $ac_tr_hdr 1
10140 EOF
10141  
10142 else
10143   echo "$ac_t""no" 1>&6
10144 fi
10145 done
10146
10147         for ac_hdr in thread.h synch.h
10148 do
10149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10151 echo "configure:10152: checking for $ac_hdr" >&5
10152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10153   echo $ac_n "(cached) $ac_c" 1>&6
10154 else
10155   cat > conftest.$ac_ext <<EOF
10156 #line 10157 "configure"
10157 #include "confdefs.h"
10158 #include <$ac_hdr>
10159 EOF
10160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10161 { (eval echo configure:10162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10163 if test -z "$ac_err"; then
10164   rm -rf conftest*
10165   eval "ac_cv_header_$ac_safe=yes"
10166 else
10167   echo "$ac_err" >&5
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   eval "ac_cv_header_$ac_safe=no"
10172 fi
10173 rm -f conftest*
10174 fi
10175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10176   echo "$ac_t""yes" 1>&6
10177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10178   cat >> confdefs.h <<EOF
10179 #define $ac_tr_hdr 1
10180 EOF
10181  
10182 else
10183   echo "$ac_t""no" 1>&6
10184 fi
10185 done
10186
10187 fi
10188
10189 if test $ol_link_threads != no ; then  
10190                         cat >> confdefs.h <<\EOF
10191 #define REENTRANT 1
10192 EOF
10193
10194         cat >> confdefs.h <<\EOF
10195 #define _REENTRANT 1
10196 EOF
10197
10198         cat >> confdefs.h <<\EOF
10199 #define THREAD_SAFE 1
10200 EOF
10201
10202         cat >> confdefs.h <<\EOF
10203 #define _THREAD_SAFE 1
10204 EOF
10205
10206         cat >> confdefs.h <<\EOF
10207 #define THREADSAFE 1
10208 EOF
10209
10210         cat >> confdefs.h <<\EOF
10211 #define _THREADSAFE 1
10212 EOF
10213
10214         cat >> confdefs.h <<\EOF
10215 #define _SGI_MP_SOURCE 1
10216 EOF
10217
10218
10219                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10220 echo "configure:10221: checking for thread specific errno" >&5
10221 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10222   echo $ac_n "(cached) $ac_c" 1>&6
10223 else
10224   
10225                 cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 #include <errno.h>
10229 int main() {
10230 errno = 0;
10231 ; return 0; }
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10234   rm -rf conftest*
10235   ol_cv_errno_thread_specific=yes
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -rf conftest*
10240   ol_cv_errno_thread_specific=no
10241 fi
10242 rm -f conftest*
10243         
10244 fi
10245
10246 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10247
10248                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10249 echo "configure:10250: checking for thread specific h_errno" >&5
10250 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10251   echo $ac_n "(cached) $ac_c" 1>&6
10252 else
10253   
10254                 cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 #include <netdb.h>
10258 int main() {
10259 h_errno = 0;
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10263   rm -rf conftest*
10264   ol_cv_h_errno_thread_specific=yes
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   ol_cv_h_errno_thread_specific=no
10270 fi
10271 rm -f conftest*
10272         
10273 fi
10274
10275 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10276
10277         if test $ol_cv_errno_thread_specific != yes \
10278                 -o $ol_cv_h_errno_thread_specific != yes ; then
10279                 LIBS="$LTHREAD_LIBS $LIBS"
10280                 LTHREAD_LIBS=""
10281         fi
10282
10283 fi  
10284
10285 if test $ol_link_threads = no ; then
10286         if test $ol_with_threads = yes ; then
10287                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10288         fi
10289
10290         if test $ol_with_threads = auto ; then
10291                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10292                 ol_with_threads=no
10293         fi
10294
10295         cat >> confdefs.h <<\EOF
10296 #define NO_THREADS 1
10297 EOF
10298
10299         LTHREAD_LIBS=""
10300 fi
10301
10302 if test $ol_link_threads != no ; then
10303         cat >> confdefs.h <<\EOF
10304 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10305 EOF
10306
10307 fi
10308
10309
10310 ol_link_ldbm=no 
10311 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10312         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10313 echo "configure:10314: checking for DB2 library" >&5
10314 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317         ol_LIBS="$LIBS"
10318         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10319 echo "configure:10320: checking for db_open in -ldb" >&5
10320 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   ac_save_LIBS="$LIBS"
10325 LIBS="-ldb  $LIBS"
10326 cat > conftest.$ac_ext <<EOF
10327 #line 10328 "configure"
10328 #include "confdefs.h"
10329 /* Override any gcc2 internal prototype to avoid an error.  */
10330 /* We use char because int might match the return type of a gcc2
10331     builtin and then its argument prototype would still apply.  */
10332 char db_open();
10333
10334 int main() {
10335 db_open()
10336 ; return 0; }
10337 EOF
10338 if { (eval echo configure:10339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10339   rm -rf conftest*
10340   eval "ac_cv_lib_$ac_lib_var=yes"
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   eval "ac_cv_lib_$ac_lib_var=no"
10346 fi
10347 rm -f conftest*
10348 LIBS="$ac_save_LIBS"
10349
10350 fi
10351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10352   echo "$ac_t""yes" 1>&6
10353   ol_cv_lib_db2=-ldb
10354 else
10355   echo "$ac_t""no" 1>&6
10356 ol_cv_lib_db2=no
10357 fi
10358
10359         LIBS="$ol_LIBS"
10360
10361 fi
10362
10363 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10364
10365 for ac_hdr in db.h
10366 do
10367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10369 echo "configure:10370: checking for $ac_hdr" >&5
10370 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376 #include <$ac_hdr>
10377 EOF
10378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10379 { (eval echo configure:10380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10381 if test -z "$ac_err"; then
10382   rm -rf conftest*
10383   eval "ac_cv_header_$ac_safe=yes"
10384 else
10385   echo "$ac_err" >&5
10386   echo "configure: failed program was:" >&5
10387   cat conftest.$ac_ext >&5
10388   rm -rf conftest*
10389   eval "ac_cv_header_$ac_safe=no"
10390 fi
10391 rm -f conftest*
10392 fi
10393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10394   echo "$ac_t""yes" 1>&6
10395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10396   cat >> confdefs.h <<EOF
10397 #define $ac_tr_hdr 1
10398 EOF
10399  
10400 else
10401   echo "$ac_t""no" 1>&6
10402 fi
10403 done
10404
10405 if test $ac_cv_header_db_h = yes ; then
10406         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10407 echo "configure:10408: checking if db.h is DB2" >&5
10408 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10409   echo $ac_n "(cached) $ac_c" 1>&6
10410 else
10411   
10412                 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415
10416 #                       include <db.h>
10417                         /* this check could be improved */
10418 #                       ifdef DB_VERSION_MAJOR
10419 #                               if DB_VERSION_MAJOR == 2
10420                                         __db_version_2
10421 #                               endif
10422 #                       endif
10423                 
10424 EOF
10425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10426   egrep "__db_version_2" >/dev/null 2>&1; then
10427   rm -rf conftest*
10428   ol_cv_header_db2=yes
10429 else
10430   rm -rf conftest*
10431   ol_cv_header_db2=no
10432 fi
10433 rm -f conftest*
10434
10435 fi
10436
10437 echo "$ac_t""$ol_cv_header_db2" 1>&6
10438 else
10439         ol_cv_header_db2=no
10440 fi
10441
10442
10443  
10444  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10445 echo "configure:10446: checking for Berkeley DB2" >&5
10446 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10447   echo $ac_n "(cached) $ac_c" 1>&6
10448 else
10449   
10450         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10451                 ol_cv_berkeley_db2=no
10452         else
10453                 ol_cv_berkeley_db2=yes
10454         fi
10455
10456 fi
10457
10458 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10459  if test $ol_cv_berkeley_db2 = yes ; then
10460         cat >> confdefs.h <<\EOF
10461 #define HAVE_BERKELEY_DB2 1
10462 EOF
10463
10464  fi
10465
10466
10467         if test $ol_cv_berkeley_db2 = yes ; then
10468                 ol_link_ldbm=db2
10469                 ol_with_ldbm_api=db2
10470
10471                 if test $ol_with_ldbm_type = hash ; then
10472                         cat >> confdefs.h <<\EOF
10473 #define LDBM_USE_DBHASH 1
10474 EOF
10475
10476                 else
10477                         cat >> confdefs.h <<\EOF
10478 #define LDBM_USE_DBBTREE 1
10479 EOF
10480
10481                 fi
10482
10483                                                 if test $ol_cv_lib_db2 != yes ; then
10484                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10485                 fi
10486         fi
10487 fi
10488
10489 ol_link_bdb2=no
10490 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10491         ol_link_bdb2=yes
10492 fi
10493
10494 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10495         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10496 echo "configure:10497: checking for Berkeley DB library" >&5
10497 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10498   echo $ac_n "(cached) $ac_c" 1>&6
10499 else
10500   
10501         for ac_hdr in db1/db.h
10502 do
10503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10505 echo "configure:10506: checking for $ac_hdr" >&5
10506 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10507   echo $ac_n "(cached) $ac_c" 1>&6
10508 else
10509   cat > conftest.$ac_ext <<EOF
10510 #line 10511 "configure"
10511 #include "confdefs.h"
10512 #include <$ac_hdr>
10513 EOF
10514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10515 { (eval echo configure:10516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10517 if test -z "$ac_err"; then
10518   rm -rf conftest*
10519   eval "ac_cv_header_$ac_safe=yes"
10520 else
10521   echo "$ac_err" >&5
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -rf conftest*
10525   eval "ac_cv_header_$ac_safe=no"
10526 fi
10527 rm -f conftest*
10528 fi
10529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10530   echo "$ac_t""yes" 1>&6
10531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10532   cat >> confdefs.h <<EOF
10533 #define $ac_tr_hdr 1
10534 EOF
10535  
10536 else
10537   echo "$ac_t""no" 1>&6
10538 fi
10539 done
10540
10541         ol_LIBS="$LIBS"
10542         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10543 echo "configure:10544: checking for dbopen" >&5
10544 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10545   echo $ac_n "(cached) $ac_c" 1>&6
10546 else
10547   cat > conftest.$ac_ext <<EOF
10548 #line 10549 "configure"
10549 #include "confdefs.h"
10550 /* System header to define __stub macros and hopefully few prototypes,
10551     which can conflict with char dbopen(); below.  */
10552 #include <assert.h>
10553 /* Override any gcc2 internal prototype to avoid an error.  */
10554 /* We use char because int might match the return type of a gcc2
10555     builtin and then its argument prototype would still apply.  */
10556 char dbopen();
10557 char (*f)();
10558
10559 int main() {
10560
10561 /* The GNU C library defines this for functions which it implements
10562     to always fail with ENOSYS.  Some functions are actually named
10563     something starting with __ and the normal name is an alias.  */
10564 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10565 choke me
10566 #else
10567 f = dbopen;
10568 #endif
10569
10570 ; return 0; }
10571 EOF
10572 if { (eval echo configure:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10573   rm -rf conftest*
10574   eval "ac_cv_func_dbopen=yes"
10575 else
10576   echo "configure: failed program was:" >&5
10577   cat conftest.$ac_ext >&5
10578   rm -rf conftest*
10579   eval "ac_cv_func_dbopen=no"
10580 fi
10581 rm -f conftest*
10582 fi
10583
10584 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10585   echo "$ac_t""yes" 1>&6
10586   ol_cv_lib_db=yes
10587 else
10588   echo "$ac_t""no" 1>&6
10589
10590                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10591 echo "configure:10592: checking for dbopen in -ldb1" >&5
10592 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10594   echo $ac_n "(cached) $ac_c" 1>&6
10595 else
10596   ac_save_LIBS="$LIBS"
10597 LIBS="-ldb1  $LIBS"
10598 cat > conftest.$ac_ext <<EOF
10599 #line 10600 "configure"
10600 #include "confdefs.h"
10601 /* Override any gcc2 internal prototype to avoid an error.  */
10602 /* We use char because int might match the return type of a gcc2
10603     builtin and then its argument prototype would still apply.  */
10604 char dbopen();
10605
10606 int main() {
10607 dbopen()
10608 ; return 0; }
10609 EOF
10610 if { (eval echo configure:10611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10611   rm -rf conftest*
10612   eval "ac_cv_lib_$ac_lib_var=yes"
10613 else
10614   echo "configure: failed program was:" >&5
10615   cat conftest.$ac_ext >&5
10616   rm -rf conftest*
10617   eval "ac_cv_lib_$ac_lib_var=no"
10618 fi
10619 rm -f conftest*
10620 LIBS="$ac_save_LIBS"
10621
10622 fi
10623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10624   echo "$ac_t""yes" 1>&6
10625   ol_cv_lib_db=-ldb1
10626 else
10627   echo "$ac_t""no" 1>&6
10628
10629                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10630 echo "configure:10631: checking for dbopen in -ldb" >&5
10631 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10632 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10633   echo $ac_n "(cached) $ac_c" 1>&6
10634 else
10635   ac_save_LIBS="$LIBS"
10636 LIBS="-ldb  $LIBS"
10637 cat > conftest.$ac_ext <<EOF
10638 #line 10639 "configure"
10639 #include "confdefs.h"
10640 /* Override any gcc2 internal prototype to avoid an error.  */
10641 /* We use char because int might match the return type of a gcc2
10642     builtin and then its argument prototype would still apply.  */
10643 char dbopen();
10644
10645 int main() {
10646 dbopen()
10647 ; return 0; }
10648 EOF
10649 if { (eval echo configure:10650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10650   rm -rf conftest*
10651   eval "ac_cv_lib_$ac_lib_var=yes"
10652 else
10653   echo "configure: failed program was:" >&5
10654   cat conftest.$ac_ext >&5
10655   rm -rf conftest*
10656   eval "ac_cv_lib_$ac_lib_var=no"
10657 fi
10658 rm -f conftest*
10659 LIBS="$ac_save_LIBS"
10660
10661 fi
10662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10663   echo "$ac_t""yes" 1>&6
10664   ol_cv_lib_db=-ldb
10665 else
10666   echo "$ac_t""no" 1>&6
10667 ol_cv_lib_db=no
10668 fi
10669
10670                 
10671 fi
10672
10673         
10674 fi
10675
10676         LIBS="$ol_LIBS"
10677
10678 fi
10679
10680 echo "$ac_t""$ol_cv_lib_db" 1>&6
10681
10682
10683 for ac_hdr in db_185.h
10684 do
10685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10687 echo "configure:10688: checking for $ac_hdr" >&5
10688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10689   echo $ac_n "(cached) $ac_c" 1>&6
10690 else
10691   cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694 #include <$ac_hdr>
10695 EOF
10696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10697 { (eval echo configure:10698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10699 if test -z "$ac_err"; then
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=yes"
10702 else
10703   echo "$ac_err" >&5
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -rf conftest*
10707   eval "ac_cv_header_$ac_safe=no"
10708 fi
10709 rm -f conftest*
10710 fi
10711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10712   echo "$ac_t""yes" 1>&6
10713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10714   cat >> confdefs.h <<EOF
10715 #define $ac_tr_hdr 1
10716 EOF
10717  
10718 else
10719   echo "$ac_t""no" 1>&6
10720 fi
10721 done
10722
10723 if test "$ol_cv_header_db2" = yes ; then
10724         
10725         ol_cv_header_db=$ac_cv_header_db_185_h
10726 else
10727         ol_cv_header_db=$ac_cv_header_db_h
10728 fi
10729
10730
10731  
10732  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10733 echo "configure:10734: checking for Berkeley DB" >&5
10734 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10735   echo $ac_n "(cached) $ac_c" 1>&6
10736 else
10737   
10738         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10739                 ol_cv_berkeley_db=no
10740         else
10741                 ol_cv_berkeley_db=yes
10742         fi
10743
10744 fi
10745
10746 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10747  if test $ol_cv_berkeley_db = yes ; then
10748         cat >> confdefs.h <<\EOF
10749 #define HAVE_BERKELEY_DB 1
10750 EOF
10751
10752  fi
10753
10754
10755         if test $ol_cv_berkeley_db = yes ; then
10756                 ol_link_ldbm=db
10757                 ol_with_ldbm_api=db
10758
10759                 if test $ol_with_ldbm_type = hash ; then
10760                         cat >> confdefs.h <<\EOF
10761 #define LDBM_USE_DBHASH 1
10762 EOF
10763
10764                 else
10765                         cat >> confdefs.h <<\EOF
10766 #define LDBM_USE_DBBTREE 1
10767 EOF
10768
10769                 fi
10770
10771                                                 if test $ol_cv_lib_db != yes ; then
10772                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10773                 fi
10774         fi
10775 fi
10776
10777 if test $ol_with_ldbm_api = manual ; then
10778                 ol_link_ldbm=yes
10779
10780         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10781
10782         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10783 do
10784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10786 echo "configure:10787: checking for $ac_hdr" >&5
10787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10788   echo $ac_n "(cached) $ac_c" 1>&6
10789 else
10790   cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <$ac_hdr>
10794 EOF
10795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10796 { (eval echo configure:10797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10798 if test -z "$ac_err"; then
10799   rm -rf conftest*
10800   eval "ac_cv_header_$ac_safe=yes"
10801 else
10802   echo "$ac_err" >&5
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   eval "ac_cv_header_$ac_safe=no"
10807 fi
10808 rm -f conftest*
10809 fi
10810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10811   echo "$ac_t""yes" 1>&6
10812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10813   cat >> confdefs.h <<EOF
10814 #define $ac_tr_hdr 1
10815 EOF
10816  
10817 else
10818   echo "$ac_t""no" 1>&6
10819 fi
10820 done
10821
10822 fi
10823
10824 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10825         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10826         ol_with_ldbm_api=none
10827 fi
10828
10829 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10830         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10831 echo "configure:10832: checking for MDBM library" >&5
10832 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10833   echo $ac_n "(cached) $ac_c" 1>&6
10834 else
10835         ol_LIBS="$LIBS"
10836         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10837 echo "configure:10838: checking for mdbm_set_chain" >&5
10838 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10839   echo $ac_n "(cached) $ac_c" 1>&6
10840 else
10841   cat > conftest.$ac_ext <<EOF
10842 #line 10843 "configure"
10843 #include "confdefs.h"
10844 /* System header to define __stub macros and hopefully few prototypes,
10845     which can conflict with char mdbm_set_chain(); below.  */
10846 #include <assert.h>
10847 /* Override any gcc2 internal prototype to avoid an error.  */
10848 /* We use char because int might match the return type of a gcc2
10849     builtin and then its argument prototype would still apply.  */
10850 char mdbm_set_chain();
10851 char (*f)();
10852
10853 int main() {
10854
10855 /* The GNU C library defines this for functions which it implements
10856     to always fail with ENOSYS.  Some functions are actually named
10857     something starting with __ and the normal name is an alias.  */
10858 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10859 choke me
10860 #else
10861 f = mdbm_set_chain;
10862 #endif
10863
10864 ; return 0; }
10865 EOF
10866 if { (eval echo configure:10867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10867   rm -rf conftest*
10868   eval "ac_cv_func_mdbm_set_chain=yes"
10869 else
10870   echo "configure: failed program was:" >&5
10871   cat conftest.$ac_ext >&5
10872   rm -rf conftest*
10873   eval "ac_cv_func_mdbm_set_chain=no"
10874 fi
10875 rm -f conftest*
10876 fi
10877
10878 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10879   echo "$ac_t""yes" 1>&6
10880   ol_cv_lib_mdbm=yes
10881 else
10882   echo "$ac_t""no" 1>&6
10883
10884                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10885 echo "configure:10886: checking for mdbm_set_chain in -lmdbm" >&5
10886 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10888   echo $ac_n "(cached) $ac_c" 1>&6
10889 else
10890   ac_save_LIBS="$LIBS"
10891 LIBS="-lmdbm  $LIBS"
10892 cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 /* Override any gcc2 internal prototype to avoid an error.  */
10896 /* We use char because int might match the return type of a gcc2
10897     builtin and then its argument prototype would still apply.  */
10898 char mdbm_set_chain();
10899
10900 int main() {
10901 mdbm_set_chain()
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=no"
10912 fi
10913 rm -f conftest*
10914 LIBS="$ac_save_LIBS"
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   ol_cv_lib_mdbm=-lmdbm
10920 else
10921   echo "$ac_t""no" 1>&6
10922 ol_cv_lib_mdbm=no
10923 fi
10924
10925         
10926 fi
10927
10928         LIBS="$ol_LIBS"
10929
10930 fi
10931
10932 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
10933
10934
10935  for ac_hdr in mdbm.h
10936 do
10937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10939 echo "configure:10940: checking for $ac_hdr" >&5
10940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10941   echo $ac_n "(cached) $ac_c" 1>&6
10942 else
10943   cat > conftest.$ac_ext <<EOF
10944 #line 10945 "configure"
10945 #include "confdefs.h"
10946 #include <$ac_hdr>
10947 EOF
10948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10949 { (eval echo configure:10950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10951 if test -z "$ac_err"; then
10952   rm -rf conftest*
10953   eval "ac_cv_header_$ac_safe=yes"
10954 else
10955   echo "$ac_err" >&5
10956   echo "configure: failed program was:" >&5
10957   cat conftest.$ac_ext >&5
10958   rm -rf conftest*
10959   eval "ac_cv_header_$ac_safe=no"
10960 fi
10961 rm -f conftest*
10962 fi
10963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10964   echo "$ac_t""yes" 1>&6
10965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10966   cat >> confdefs.h <<EOF
10967 #define $ac_tr_hdr 1
10968 EOF
10969  
10970 else
10971   echo "$ac_t""no" 1>&6
10972 fi
10973 done
10974
10975  echo $ac_n "checking for db""... $ac_c" 1>&6
10976 echo "configure:10977: checking for db" >&5
10977 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   
10981         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
10982                 ol_cv_mdbm=no
10983         else
10984                 ol_cv_mdbm=yes
10985         fi
10986
10987 fi
10988
10989 echo "$ac_t""$ol_cv_mdbm" 1>&6
10990  if test $ol_cv_mdbm = yes ; then
10991         cat >> confdefs.h <<\EOF
10992 #define HAVE_MDBM 1
10993 EOF
10994
10995  fi
10996
10997
10998         if test $ol_cv_mdbm = yes ; then
10999                 ol_link_ldbm=mdbm
11000                 ol_with_ldbm_api=mdbm
11001                 if test $ol_cv_lib_mdbm != yes ; then
11002                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11003                 fi
11004         fi
11005 fi
11006
11007 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11008         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11009 echo "configure:11010: checking for GDBM library" >&5
11010 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11011   echo $ac_n "(cached) $ac_c" 1>&6
11012 else
11013         ol_LIBS="$LIBS"
11014         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11015 echo "configure:11016: checking for gdbm_open" >&5
11016 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11017   echo $ac_n "(cached) $ac_c" 1>&6
11018 else
11019   cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 /* System header to define __stub macros and hopefully few prototypes,
11023     which can conflict with char gdbm_open(); below.  */
11024 #include <assert.h>
11025 /* Override any gcc2 internal prototype to avoid an error.  */
11026 /* We use char because int might match the return type of a gcc2
11027     builtin and then its argument prototype would still apply.  */
11028 char gdbm_open();
11029 char (*f)();
11030
11031 int main() {
11032
11033 /* The GNU C library defines this for functions which it implements
11034     to always fail with ENOSYS.  Some functions are actually named
11035     something starting with __ and the normal name is an alias.  */
11036 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11037 choke me
11038 #else
11039 f = gdbm_open;
11040 #endif
11041
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11045   rm -rf conftest*
11046   eval "ac_cv_func_gdbm_open=yes"
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_func_gdbm_open=no"
11052 fi
11053 rm -f conftest*
11054 fi
11055
11056 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11057   echo "$ac_t""yes" 1>&6
11058   ol_cv_lib_gdbm=yes
11059 else
11060   echo "$ac_t""no" 1>&6
11061
11062                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11063 echo "configure:11064: checking for gdbm_open in -lgdbm" >&5
11064 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11066   echo $ac_n "(cached) $ac_c" 1>&6
11067 else
11068   ac_save_LIBS="$LIBS"
11069 LIBS="-lgdbm  $LIBS"
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 /* Override any gcc2 internal prototype to avoid an error.  */
11074 /* We use char because int might match the return type of a gcc2
11075     builtin and then its argument prototype would still apply.  */
11076 char gdbm_open();
11077
11078 int main() {
11079 gdbm_open()
11080 ; return 0; }
11081 EOF
11082 if { (eval echo configure:11083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11083   rm -rf conftest*
11084   eval "ac_cv_lib_$ac_lib_var=yes"
11085 else
11086   echo "configure: failed program was:" >&5
11087   cat conftest.$ac_ext >&5
11088   rm -rf conftest*
11089   eval "ac_cv_lib_$ac_lib_var=no"
11090 fi
11091 rm -f conftest*
11092 LIBS="$ac_save_LIBS"
11093
11094 fi
11095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11096   echo "$ac_t""yes" 1>&6
11097   ol_cv_lib_gdbm=-lgdbm
11098 else
11099   echo "$ac_t""no" 1>&6
11100 ol_cv_lib_gdbm=no
11101 fi
11102
11103         
11104 fi
11105
11106         LIBS="$ol_LIBS"
11107
11108 fi
11109
11110 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11111
11112
11113  for ac_hdr in gdbm.h
11114 do
11115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11117 echo "configure:11118: checking for $ac_hdr" >&5
11118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11119   echo $ac_n "(cached) $ac_c" 1>&6
11120 else
11121   cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 #include <$ac_hdr>
11125 EOF
11126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11127 { (eval echo configure:11128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11129 if test -z "$ac_err"; then
11130   rm -rf conftest*
11131   eval "ac_cv_header_$ac_safe=yes"
11132 else
11133   echo "$ac_err" >&5
11134   echo "configure: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   rm -rf conftest*
11137   eval "ac_cv_header_$ac_safe=no"
11138 fi
11139 rm -f conftest*
11140 fi
11141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11142   echo "$ac_t""yes" 1>&6
11143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11144   cat >> confdefs.h <<EOF
11145 #define $ac_tr_hdr 1
11146 EOF
11147  
11148 else
11149   echo "$ac_t""no" 1>&6
11150 fi
11151 done
11152
11153  echo $ac_n "checking for db""... $ac_c" 1>&6
11154 echo "configure:11155: checking for db" >&5
11155 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   
11159         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11160                 ol_cv_gdbm=no
11161         else
11162                 ol_cv_gdbm=yes
11163         fi
11164
11165 fi
11166
11167 echo "$ac_t""$ol_cv_gdbm" 1>&6
11168  if test $ol_cv_gdbm = yes ; then
11169         cat >> confdefs.h <<\EOF
11170 #define HAVE_GDBM 1
11171 EOF
11172
11173  fi
11174
11175
11176         if test $ol_cv_gdbm = yes ; then
11177                 ol_link_ldbm=gdbm
11178                 ol_with_ldbm_api=gdbm
11179
11180                 if test $ol_cv_lib_gdbm != yes ; then
11181                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11182                 fi
11183         fi
11184 fi
11185
11186 if test $ol_with_ldbm_api = auto ; then
11187         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11188 elif test $ol_with_ldbm_api = ndbm ; then
11189         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11190 echo "configure:11191: checking for NDBM library" >&5
11191 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11192   echo $ac_n "(cached) $ac_c" 1>&6
11193 else
11194         ol_LIBS="$LIBS"
11195         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11196 echo "configure:11197: checking for dbm_open" >&5
11197 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11198   echo $ac_n "(cached) $ac_c" 1>&6
11199 else
11200   cat > conftest.$ac_ext <<EOF
11201 #line 11202 "configure"
11202 #include "confdefs.h"
11203 /* System header to define __stub macros and hopefully few prototypes,
11204     which can conflict with char dbm_open(); below.  */
11205 #include <assert.h>
11206 /* Override any gcc2 internal prototype to avoid an error.  */
11207 /* We use char because int might match the return type of a gcc2
11208     builtin and then its argument prototype would still apply.  */
11209 char dbm_open();
11210 char (*f)();
11211
11212 int main() {
11213
11214 /* The GNU C library defines this for functions which it implements
11215     to always fail with ENOSYS.  Some functions are actually named
11216     something starting with __ and the normal name is an alias.  */
11217 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11218 choke me
11219 #else
11220 f = dbm_open;
11221 #endif
11222
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   eval "ac_cv_func_dbm_open=yes"
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_func_dbm_open=no"
11233 fi
11234 rm -f conftest*
11235 fi
11236
11237 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11238   echo "$ac_t""yes" 1>&6
11239   ol_cv_lib_ndbm=yes
11240 else
11241   echo "$ac_t""no" 1>&6
11242
11243                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11244 echo "configure:11245: checking for dbm_open in -lndbm" >&5
11245 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11246 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   ac_save_LIBS="$LIBS"
11250 LIBS="-lndbm  $LIBS"
11251 cat > conftest.$ac_ext <<EOF
11252 #line 11253 "configure"
11253 #include "confdefs.h"
11254 /* Override any gcc2 internal prototype to avoid an error.  */
11255 /* We use char because int might match the return type of a gcc2
11256     builtin and then its argument prototype would still apply.  */
11257 char dbm_open();
11258
11259 int main() {
11260 dbm_open()
11261 ; return 0; }
11262 EOF
11263 if { (eval echo configure:11264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11264   rm -rf conftest*
11265   eval "ac_cv_lib_$ac_lib_var=yes"
11266 else
11267   echo "configure: failed program was:" >&5
11268   cat conftest.$ac_ext >&5
11269   rm -rf conftest*
11270   eval "ac_cv_lib_$ac_lib_var=no"
11271 fi
11272 rm -f conftest*
11273 LIBS="$ac_save_LIBS"
11274
11275 fi
11276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11277   echo "$ac_t""yes" 1>&6
11278   ol_cv_lib_ndbm=-lndbm
11279 else
11280   echo "$ac_t""no" 1>&6
11281
11282                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11283 echo "configure:11284: checking for dbm_open in -ldbm" >&5
11284 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   ac_save_LIBS="$LIBS"
11289 LIBS="-ldbm  $LIBS"
11290 cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 /* Override any gcc2 internal prototype to avoid an error.  */
11294 /* We use char because int might match the return type of a gcc2
11295     builtin and then its argument prototype would still apply.  */
11296 char dbm_open();
11297
11298 int main() {
11299 dbm_open()
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11303   rm -rf conftest*
11304   eval "ac_cv_lib_$ac_lib_var=yes"
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   eval "ac_cv_lib_$ac_lib_var=no"
11310 fi
11311 rm -f conftest*
11312 LIBS="$ac_save_LIBS"
11313
11314 fi
11315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317   ol_cv_lib_ndbm=-ldbm
11318 else
11319   echo "$ac_t""no" 1>&6
11320 ol_cv_lib_ndbm=no
11321 fi
11322                 
11323 fi
11324
11325         
11326 fi
11327
11328         LIBS="$ol_LIBS"
11329
11330 fi
11331
11332 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11333
11334
11335  for ac_hdr in ndbm.h
11336 do
11337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11339 echo "configure:11340: checking for $ac_hdr" >&5
11340 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11341   echo $ac_n "(cached) $ac_c" 1>&6
11342 else
11343   cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 #include <$ac_hdr>
11347 EOF
11348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11349 { (eval echo configure:11350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11351 if test -z "$ac_err"; then
11352   rm -rf conftest*
11353   eval "ac_cv_header_$ac_safe=yes"
11354 else
11355   echo "$ac_err" >&5
11356   echo "configure: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   rm -rf conftest*
11359   eval "ac_cv_header_$ac_safe=no"
11360 fi
11361 rm -f conftest*
11362 fi
11363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11364   echo "$ac_t""yes" 1>&6
11365     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11366   cat >> confdefs.h <<EOF
11367 #define $ac_tr_hdr 1
11368 EOF
11369  
11370 else
11371   echo "$ac_t""no" 1>&6
11372 fi
11373 done
11374
11375  echo $ac_n "checking for db""... $ac_c" 1>&6
11376 echo "configure:11377: checking for db" >&5
11377 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   
11381         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11382                 ol_cv_ndbm=no
11383         else
11384                 ol_cv_ndbm=yes
11385         fi
11386
11387 fi
11388
11389 echo "$ac_t""$ol_cv_ndbm" 1>&6
11390  if test $ol_cv_ndbm = yes ; then
11391         cat >> confdefs.h <<\EOF
11392 #define HAVE_NDBM 1
11393 EOF
11394
11395  fi
11396
11397
11398         if test $ol_cv_ndbm = yes ; then
11399                 ol_link_ldbm=ndbm
11400                 ol_with_ldbm_api=ndbm
11401
11402                 if test $ol_cv_lib_ndbm != yes ; then
11403                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11404                 fi
11405         fi
11406 fi
11407
11408 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11409         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11410         if test $ol_enable_ldbm = yes ; then
11411                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11412         fi
11413
11414         echo "configure: warning: disabling LDBM" 1>&2
11415         ol_enable_ldbm=no
11416 fi
11417
11418 if test $ol_enable_wrappers != no ; then
11419         for ac_hdr in tcpd.h
11420 do
11421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11423 echo "configure:11424: checking for $ac_hdr" >&5
11424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11425   echo $ac_n "(cached) $ac_c" 1>&6
11426 else
11427   cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 #include <$ac_hdr>
11431 EOF
11432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11433 { (eval echo configure:11434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11435 if test -z "$ac_err"; then
11436   rm -rf conftest*
11437   eval "ac_cv_header_$ac_safe=yes"
11438 else
11439   echo "$ac_err" >&5
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   eval "ac_cv_header_$ac_safe=no"
11444 fi
11445 rm -f conftest*
11446 fi
11447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11448   echo "$ac_t""yes" 1>&6
11449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11450   cat >> confdefs.h <<EOF
11451 #define $ac_tr_hdr 1
11452 EOF
11453  
11454 else
11455   echo "$ac_t""no" 1>&6
11456 fi
11457 done
11458
11459
11460         if test $ac_cv_header_tcpd_h != yes ; then
11461                 have_wrappers=no
11462         else
11463                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11464 echo "configure:11465: checking for main in -lwrap" >&5
11465 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11466 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11467   echo $ac_n "(cached) $ac_c" 1>&6
11468 else
11469   ac_save_LIBS="$LIBS"
11470 LIBS="-lwrap  $LIBS"
11471 cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474
11475 int main() {
11476 main()
11477 ; return 0; }
11478 EOF
11479 if { (eval echo configure:11480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11480   rm -rf conftest*
11481   eval "ac_cv_lib_$ac_lib_var=yes"
11482 else
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -rf conftest*
11486   eval "ac_cv_lib_$ac_lib_var=no"
11487 fi
11488 rm -f conftest*
11489 LIBS="$ac_save_LIBS"
11490
11491 fi
11492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11493   echo "$ac_t""yes" 1>&6
11494   have_wrappers=yes
11495 else
11496   echo "$ac_t""no" 1>&6
11497 have_wrappers=no
11498 fi
11499
11500         fi
11501
11502         if test $have_wrappers = yes ; then
11503                 cat >> confdefs.h <<\EOF
11504 #define HAVE_TCPD 1
11505 EOF
11506
11507                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11508
11509                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11510 echo "configure:11511: checking for main in -lnsl" >&5
11511 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11513   echo $ac_n "(cached) $ac_c" 1>&6
11514 else
11515   ac_save_LIBS="$LIBS"
11516 LIBS="-lnsl  $LIBS"
11517 cat > conftest.$ac_ext <<EOF
11518 #line 11519 "configure"
11519 #include "confdefs.h"
11520
11521 int main() {
11522 main()
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   eval "ac_cv_lib_$ac_lib_var=yes"
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   eval "ac_cv_lib_$ac_lib_var=no"
11533 fi
11534 rm -f conftest*
11535 LIBS="$ac_save_LIBS"
11536
11537 fi
11538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11539   echo "$ac_t""yes" 1>&6
11540     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11541     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11542   cat >> confdefs.h <<EOF
11543 #define $ac_tr_lib 1
11544 EOF
11545
11546   LIBS="-lnsl $LIBS"
11547
11548 else
11549   echo "$ac_t""no" 1>&6
11550 fi
11551
11552         else
11553                 echo "configure: warning: could not find -lwrap" 1>&2
11554                 if test $ol_enable_wrappers = yes ; then
11555                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11556                 fi
11557
11558                 echo "configure: warning: disabling wrappers support" 1>&2
11559                 ol_enable_wrappers=no
11560         fi
11561 fi
11562
11563 if test $ol_enable_syslog != no ; then
11564         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11565 echo "configure:11566: checking for openlog" >&5
11566 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11567   echo $ac_n "(cached) $ac_c" 1>&6
11568 else
11569   cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 /* System header to define __stub macros and hopefully few prototypes,
11573     which can conflict with char openlog(); below.  */
11574 #include <assert.h>
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char openlog();
11579 char (*f)();
11580
11581 int main() {
11582
11583 /* The GNU C library defines this for functions which it implements
11584     to always fail with ENOSYS.  Some functions are actually named
11585     something starting with __ and the normal name is an alias.  */
11586 #if defined (__stub_openlog) || defined (__stub___openlog)
11587 choke me
11588 #else
11589 f = openlog;
11590 #endif
11591
11592 ; return 0; }
11593 EOF
11594 if { (eval echo configure:11595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11595   rm -rf conftest*
11596   eval "ac_cv_func_openlog=yes"
11597 else
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -rf conftest*
11601   eval "ac_cv_func_openlog=no"
11602 fi
11603 rm -f conftest*
11604 fi
11605
11606 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11607   echo "$ac_t""yes" 1>&6
11608   :
11609 else
11610   echo "$ac_t""no" 1>&6
11611 fi
11612
11613         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11614                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11615         fi
11616         ol_enable_syslog=$ac_cv_func_openlog
11617 fi
11618
11619 if test $ol_enable_dmalloc != no ; then
11620         for ac_hdr in dmalloc.h
11621 do
11622 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11623 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11624 echo "configure:11625: checking for $ac_hdr" >&5
11625 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11626   echo $ac_n "(cached) $ac_c" 1>&6
11627 else
11628   cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 #include <$ac_hdr>
11632 EOF
11633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11634 { (eval echo configure:11635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11636 if test -z "$ac_err"; then
11637   rm -rf conftest*
11638   eval "ac_cv_header_$ac_safe=yes"
11639 else
11640   echo "$ac_err" >&5
11641   echo "configure: failed program was:" >&5
11642   cat conftest.$ac_ext >&5
11643   rm -rf conftest*
11644   eval "ac_cv_header_$ac_safe=no"
11645 fi
11646 rm -f conftest*
11647 fi
11648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11649   echo "$ac_t""yes" 1>&6
11650     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11651   cat >> confdefs.h <<EOF
11652 #define $ac_tr_hdr 1
11653 EOF
11654  
11655 else
11656   echo "$ac_t""no" 1>&6
11657 fi
11658 done
11659
11660         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11661 echo "configure:11662: checking for dmalloc_shutdown in -ldmalloc" >&5
11662 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11664   echo $ac_n "(cached) $ac_c" 1>&6
11665 else
11666   ac_save_LIBS="$LIBS"
11667 LIBS="-ldmalloc  $LIBS"
11668 cat > conftest.$ac_ext <<EOF
11669 #line 11670 "configure"
11670 #include "confdefs.h"
11671 /* Override any gcc2 internal prototype to avoid an error.  */
11672 /* We use char because int might match the return type of a gcc2
11673     builtin and then its argument prototype would still apply.  */
11674 char dmalloc_shutdown();
11675
11676 int main() {
11677 dmalloc_shutdown()
11678 ; return 0; }
11679 EOF
11680 if { (eval echo configure:11681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11681   rm -rf conftest*
11682   eval "ac_cv_lib_$ac_lib_var=yes"
11683 else
11684   echo "configure: failed program was:" >&5
11685   cat conftest.$ac_ext >&5
11686   rm -rf conftest*
11687   eval "ac_cv_lib_$ac_lib_var=no"
11688 fi
11689 rm -f conftest*
11690 LIBS="$ac_save_LIBS"
11691
11692 fi
11693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11694   echo "$ac_t""yes" 1>&6
11695     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11696     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11697   cat >> confdefs.h <<EOF
11698 #define $ac_tr_lib 1
11699 EOF
11700
11701   LIBS="-ldmalloc $LIBS"
11702
11703 else
11704   echo "$ac_t""no" 1>&6
11705 fi
11706
11707 fi
11708
11709 if test $ol_enable_tcl != no ; then
11710         for ac_hdr in tcl.h
11711 do
11712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11714 echo "configure:11715: checking for $ac_hdr" >&5
11715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11716   echo $ac_n "(cached) $ac_c" 1>&6
11717 else
11718   cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721 #include <$ac_hdr>
11722 EOF
11723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11724 { (eval echo configure:11725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11726 if test -z "$ac_err"; then
11727   rm -rf conftest*
11728   eval "ac_cv_header_$ac_safe=yes"
11729 else
11730   echo "$ac_err" >&5
11731   echo "configure: failed program was:" >&5
11732   cat conftest.$ac_ext >&5
11733   rm -rf conftest*
11734   eval "ac_cv_header_$ac_safe=no"
11735 fi
11736 rm -f conftest*
11737 fi
11738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11739   echo "$ac_t""yes" 1>&6
11740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11741   cat >> confdefs.h <<EOF
11742 #define $ac_tr_hdr 1
11743 EOF
11744  
11745 else
11746   echo "$ac_t""no" 1>&6
11747 fi
11748 done
11749
11750
11751         if test $ac_cv_header_tcl_h != yes ; then
11752                 have_tcl=no
11753         else
11754                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11755 echo "configure:11756: checking for main in -ltcl" >&5
11756 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11758   echo $ac_n "(cached) $ac_c" 1>&6
11759 else
11760   ac_save_LIBS="$LIBS"
11761 LIBS="-ltcl  $LIBS"
11762 cat > conftest.$ac_ext <<EOF
11763 #line 11764 "configure"
11764 #include "confdefs.h"
11765
11766 int main() {
11767 main()
11768 ; return 0; }
11769 EOF
11770 if { (eval echo configure:11771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11771   rm -rf conftest*
11772   eval "ac_cv_lib_$ac_lib_var=yes"
11773 else
11774   echo "configure: failed program was:" >&5
11775   cat conftest.$ac_ext >&5
11776   rm -rf conftest*
11777   eval "ac_cv_lib_$ac_lib_var=no"
11778 fi
11779 rm -f conftest*
11780 LIBS="$ac_save_LIBS"
11781
11782 fi
11783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11784   echo "$ac_t""yes" 1>&6
11785   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11786 else
11787   echo "$ac_t""no" 1>&6
11788 have_tcl=no
11789 fi
11790
11791
11792                 if test $have_tcl != yes; then
11793                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11794 echo "configure:11795: checking for main in -ltcl7.6" >&5
11795 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11797   echo $ac_n "(cached) $ac_c" 1>&6
11798 else
11799   ac_save_LIBS="$LIBS"
11800 LIBS="-ltcl7.6  $LIBS"
11801 cat > conftest.$ac_ext <<EOF
11802 #line 11803 "configure"
11803 #include "confdefs.h"
11804
11805 int main() {
11806 main()
11807 ; return 0; }
11808 EOF
11809 if { (eval echo configure:11810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11810   rm -rf conftest*
11811   eval "ac_cv_lib_$ac_lib_var=yes"
11812 else
11813   echo "configure: failed program was:" >&5
11814   cat conftest.$ac_ext >&5
11815   rm -rf conftest*
11816   eval "ac_cv_lib_$ac_lib_var=no"
11817 fi
11818 rm -f conftest*
11819 LIBS="$ac_save_LIBS"
11820
11821 fi
11822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11823   echo "$ac_t""yes" 1>&6
11824   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11825 else
11826   echo "$ac_t""no" 1>&6
11827 have_tcl=no
11828 fi
11829
11830                 fi
11831
11832                 if test $have_tcl != yes; then
11833                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11834 echo "configure:11835: checking for main in -ltcl8.0" >&5
11835 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11837   echo $ac_n "(cached) $ac_c" 1>&6
11838 else
11839   ac_save_LIBS="$LIBS"
11840 LIBS="-ltcl8.0  $LIBS"
11841 cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844
11845 int main() {
11846 main()
11847 ; return 0; }
11848 EOF
11849 if { (eval echo configure:11850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11850   rm -rf conftest*
11851   eval "ac_cv_lib_$ac_lib_var=yes"
11852 else
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   eval "ac_cv_lib_$ac_lib_var=no"
11857 fi
11858 rm -f conftest*
11859 LIBS="$ac_save_LIBS"
11860
11861 fi
11862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11863   echo "$ac_t""yes" 1>&6
11864   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11865 else
11866   echo "$ac_t""no" 1>&6
11867 have_tcl=no
11868 fi
11869
11870                 fi
11871         fi
11872
11873         if test $have_tcl != yes ; then
11874                 echo "configure: warning: could not find -ltcl" 1>&2
11875                 if test $ol_enable_tcl = yes ; then
11876                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11877                 fi
11878
11879                 ol_enable_tcl=no
11880         fi
11881 fi
11882
11883 # ud needs termcap (should insert check here)
11884 ol_link_termcap=no
11885 for ac_hdr in termcap.h ncurses.h
11886 do
11887 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11888 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11889 echo "configure:11890: checking for $ac_hdr" >&5
11890 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11891   echo $ac_n "(cached) $ac_c" 1>&6
11892 else
11893   cat > conftest.$ac_ext <<EOF
11894 #line 11895 "configure"
11895 #include "confdefs.h"
11896 #include <$ac_hdr>
11897 EOF
11898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11899 { (eval echo configure:11900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11901 if test -z "$ac_err"; then
11902   rm -rf conftest*
11903   eval "ac_cv_header_$ac_safe=yes"
11904 else
11905   echo "$ac_err" >&5
11906   echo "configure: failed program was:" >&5
11907   cat conftest.$ac_ext >&5
11908   rm -rf conftest*
11909   eval "ac_cv_header_$ac_safe=no"
11910 fi
11911 rm -f conftest*
11912 fi
11913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11914   echo "$ac_t""yes" 1>&6
11915     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11916   cat >> confdefs.h <<EOF
11917 #define $ac_tr_hdr 1
11918 EOF
11919  
11920 else
11921   echo "$ac_t""no" 1>&6
11922 fi
11923 done
11924
11925
11926 if test $ol_link_termcap = no ; then
11927         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
11928 echo "configure:11929: checking for tputs in -ltermcap" >&5
11929 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
11930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11931   echo $ac_n "(cached) $ac_c" 1>&6
11932 else
11933   ac_save_LIBS="$LIBS"
11934 LIBS="-ltermcap  $LIBS"
11935 cat > conftest.$ac_ext <<EOF
11936 #line 11937 "configure"
11937 #include "confdefs.h"
11938 /* Override any gcc2 internal prototype to avoid an error.  */
11939 /* We use char because int might match the return type of a gcc2
11940     builtin and then its argument prototype would still apply.  */
11941 char tputs();
11942
11943 int main() {
11944 tputs()
11945 ; return 0; }
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11948   rm -rf conftest*
11949   eval "ac_cv_lib_$ac_lib_var=yes"
11950 else
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -rf conftest*
11954   eval "ac_cv_lib_$ac_lib_var=no"
11955 fi
11956 rm -f conftest*
11957 LIBS="$ac_save_LIBS"
11958
11959 fi
11960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11961   echo "$ac_t""yes" 1>&6
11962   have_termcap=yes
11963 else
11964   echo "$ac_t""no" 1>&6
11965 have_termcap=no
11966 fi
11967
11968         if test $have_termcap = yes ; then
11969                 cat >> confdefs.h <<\EOF
11970 #define HAVE_TERMCAP 1
11971 EOF
11972
11973                 ol_link_termcap=yes
11974                 TERMCAP_LIBS=-ltermcap
11975         fi
11976 fi
11977
11978 if test $ol_link_termcap = no ; then
11979         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
11980 echo "configure:11981: checking for initscr in -lncurses" >&5
11981 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
11982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11983   echo $ac_n "(cached) $ac_c" 1>&6
11984 else
11985   ac_save_LIBS="$LIBS"
11986 LIBS="-lncurses  $LIBS"
11987 cat > conftest.$ac_ext <<EOF
11988 #line 11989 "configure"
11989 #include "confdefs.h"
11990 /* Override any gcc2 internal prototype to avoid an error.  */
11991 /* We use char because int might match the return type of a gcc2
11992     builtin and then its argument prototype would still apply.  */
11993 char initscr();
11994
11995 int main() {
11996 initscr()
11997 ; return 0; }
11998 EOF
11999 if { (eval echo configure:12000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12000   rm -rf conftest*
12001   eval "ac_cv_lib_$ac_lib_var=yes"
12002 else
12003   echo "configure: failed program was:" >&5
12004   cat conftest.$ac_ext >&5
12005   rm -rf conftest*
12006   eval "ac_cv_lib_$ac_lib_var=no"
12007 fi
12008 rm -f conftest*
12009 LIBS="$ac_save_LIBS"
12010
12011 fi
12012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12013   echo "$ac_t""yes" 1>&6
12014   have_ncurses=yes
12015 else
12016   echo "$ac_t""no" 1>&6
12017 have_ncurses=no
12018 fi
12019
12020         if test $have_ncurses = yes ; then
12021                 cat >> confdefs.h <<\EOF
12022 #define HAVE_NCURSES 1
12023 EOF
12024
12025                 ol_link_termcap=yes
12026                 TERMCAP_LIBS=-lncurses
12027         fi
12028 fi
12029
12030 if test $ol_link_termcap = no ; then
12031         cat >> confdefs.h <<\EOF
12032 #define NO_TERMCAP 1
12033 EOF
12034
12035         TERMCAP_LIBS=
12036 fi
12037
12038 ol_link_sasl=no
12039 if test $ol_with_cyrus_sasl != no ; then
12040         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12041 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12042 echo "configure:12043: checking for sasl.h" >&5
12043 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12044   echo $ac_n "(cached) $ac_c" 1>&6
12045 else
12046   cat > conftest.$ac_ext <<EOF
12047 #line 12048 "configure"
12048 #include "confdefs.h"
12049 #include <sasl.h>
12050 EOF
12051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12052 { (eval echo configure:12053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12054 if test -z "$ac_err"; then
12055   rm -rf conftest*
12056   eval "ac_cv_header_$ac_safe=yes"
12057 else
12058   echo "$ac_err" >&5
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   eval "ac_cv_header_$ac_safe=no"
12063 fi
12064 rm -f conftest*
12065 fi
12066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12067   echo "$ac_t""yes" 1>&6
12068   :
12069 else
12070   echo "$ac_t""no" 1>&6
12071 fi
12072
12073
12074         if test $ac_cv_header_sasl_h = yes ; then
12075                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12076 echo "configure:12077: checking for sasl_client_init in -lsasl" >&5
12077 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12079   echo $ac_n "(cached) $ac_c" 1>&6
12080 else
12081   ac_save_LIBS="$LIBS"
12082 LIBS="-lsasl  $LIBS"
12083 cat > conftest.$ac_ext <<EOF
12084 #line 12085 "configure"
12085 #include "confdefs.h"
12086 /* Override any gcc2 internal prototype to avoid an error.  */
12087 /* We use char because int might match the return type of a gcc2
12088     builtin and then its argument prototype would still apply.  */
12089 char sasl_client_init();
12090
12091 int main() {
12092 sasl_client_init()
12093 ; return 0; }
12094 EOF
12095 if { (eval echo configure:12096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12096   rm -rf conftest*
12097   eval "ac_cv_lib_$ac_lib_var=yes"
12098 else
12099   echo "configure: failed program was:" >&5
12100   cat conftest.$ac_ext >&5
12101   rm -rf conftest*
12102   eval "ac_cv_lib_$ac_lib_var=no"
12103 fi
12104 rm -f conftest*
12105 LIBS="$ac_save_LIBS"
12106
12107 fi
12108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12109   echo "$ac_t""yes" 1>&6
12110   have_cyrus_sasl=yes
12111 else
12112   echo "$ac_t""no" 1>&6
12113 have_cyrus_sasl=no
12114 fi
12115
12116
12117                 if test $have_cyrus_sasl != no ; then
12118                         SASL_LIBS="-lsasl"
12119                         cat >> confdefs.h <<\EOF
12120 #define HAVE_CYRUS_SASL 1
12121 EOF
12122
12123                         ol_link_sasl=yes
12124                 fi
12125         fi
12126
12127         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12128                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12129         fi
12130 fi
12131
12132 ol_link_fetch=no
12133 if test $ol_with_fetch != no ; then
12134         ol=$LIBS
12135 LIBS="-lfetch -lcom_err $LIBS"
12136 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12137 echo "configure:12138: checking fetch(3) library" >&5
12138 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141   
12142         cat > conftest.$ac_ext <<EOF
12143 #line 12144 "configure"
12144 #include "confdefs.h"
12145
12146 #include <sys/param.h>
12147 #include <stdio.h>
12148 #include <fetch.h>
12149 int main() {
12150 struct url *u = fetchParseURL("file:///"); 
12151 ; return 0; }
12152 EOF
12153 if { (eval echo configure:12154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12154   rm -rf conftest*
12155   ol_cv_lib_fetch=yes
12156 else
12157   echo "configure: failed program was:" >&5
12158   cat conftest.$ac_ext >&5
12159   rm -rf conftest*
12160   ol_cv_lib_fetch=no
12161 fi
12162 rm -f conftest*
12163 fi
12164
12165 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12166 LIBS=$ol_LIBS
12167 if test $ol_cv_lib_fetch != no ; then
12168         ol_link_fetch="-lfetch -lcom_err"
12169         cat >> confdefs.h <<\EOF
12170 #define HAVE_FETCH 1
12171 EOF
12172
12173 fi
12174
12175
12176         if test $ol_cv_lib_fetch != no ; then
12177                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12178                 ol_link_fetch=freebsd
12179
12180         elif test $ol_with_fetch != auto ; then
12181                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12182         fi 
12183 fi
12184
12185 ol_link_readline=no
12186 if test $ol_with_readline != no ; then
12187         for ac_hdr in readline/readline.h readline/history.h
12188 do
12189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12191 echo "configure:12192: checking for $ac_hdr" >&5
12192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12193   echo $ac_n "(cached) $ac_c" 1>&6
12194 else
12195   cat > conftest.$ac_ext <<EOF
12196 #line 12197 "configure"
12197 #include "confdefs.h"
12198 #include <$ac_hdr>
12199 EOF
12200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12201 { (eval echo configure:12202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12203 if test -z "$ac_err"; then
12204   rm -rf conftest*
12205   eval "ac_cv_header_$ac_safe=yes"
12206 else
12207   echo "$ac_err" >&5
12208   echo "configure: failed program was:" >&5
12209   cat conftest.$ac_ext >&5
12210   rm -rf conftest*
12211   eval "ac_cv_header_$ac_safe=no"
12212 fi
12213 rm -f conftest*
12214 fi
12215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12216   echo "$ac_t""yes" 1>&6
12217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12218   cat >> confdefs.h <<EOF
12219 #define $ac_tr_hdr 1
12220 EOF
12221  
12222 else
12223   echo "$ac_t""no" 1>&6
12224 fi
12225 done
12226
12227
12228         if test $ac_cv_header_readline_readline_h = yes ; then
12229                 save_LIBS="$LIBS"
12230                 LIBS="$TERMCAP_LIBS $LIBS"
12231                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12232 echo "configure:12233: checking for readline in -lreadline" >&5
12233 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12235   echo $ac_n "(cached) $ac_c" 1>&6
12236 else
12237   ac_save_LIBS="$LIBS"
12238 LIBS="-lreadline  $LIBS"
12239 cat > conftest.$ac_ext <<EOF
12240 #line 12241 "configure"
12241 #include "confdefs.h"
12242 /* Override any gcc2 internal prototype to avoid an error.  */
12243 /* We use char because int might match the return type of a gcc2
12244     builtin and then its argument prototype would still apply.  */
12245 char readline();
12246
12247 int main() {
12248 readline()
12249 ; return 0; }
12250 EOF
12251 if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12252   rm -rf conftest*
12253   eval "ac_cv_lib_$ac_lib_var=yes"
12254 else
12255   echo "configure: failed program was:" >&5
12256   cat conftest.$ac_ext >&5
12257   rm -rf conftest*
12258   eval "ac_cv_lib_$ac_lib_var=no"
12259 fi
12260 rm -f conftest*
12261 LIBS="$ac_save_LIBS"
12262
12263 fi
12264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12265   echo "$ac_t""yes" 1>&6
12266   have_readline=yes
12267 else
12268   echo "$ac_t""no" 1>&6
12269 have_readline=no
12270 fi
12271
12272                 LIBS="$save_LIBS"
12273                         
12274                 if test $have_readline = yes ; then
12275                         ol_with_readline=found
12276                         ol_link_readline=yes
12277
12278                         READLINE_LIBS="-lreadline"
12279                 fi
12280         fi
12281 fi
12282
12283 if test $ol_link_readline = yes ; then
12284         cat >> confdefs.h <<\EOF
12285 #define HAVE_READLINE 1
12286 EOF
12287
12288 fi
12289
12290
12291 # FreeBSD (and others) have crypt(3) in -lcrypt
12292 if test $ol_enable_crypt != no ; then
12293         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12294 echo "configure:12295: checking for crypt" >&5
12295 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12296   echo $ac_n "(cached) $ac_c" 1>&6
12297 else
12298   cat > conftest.$ac_ext <<EOF
12299 #line 12300 "configure"
12300 #include "confdefs.h"
12301 /* System header to define __stub macros and hopefully few prototypes,
12302     which can conflict with char crypt(); below.  */
12303 #include <assert.h>
12304 /* Override any gcc2 internal prototype to avoid an error.  */
12305 /* We use char because int might match the return type of a gcc2
12306     builtin and then its argument prototype would still apply.  */
12307 char crypt();
12308 char (*f)();
12309
12310 int main() {
12311
12312 /* The GNU C library defines this for functions which it implements
12313     to always fail with ENOSYS.  Some functions are actually named
12314     something starting with __ and the normal name is an alias.  */
12315 #if defined (__stub_crypt) || defined (__stub___crypt)
12316 choke me
12317 #else
12318 f = crypt;
12319 #endif
12320
12321 ; return 0; }
12322 EOF
12323 if { (eval echo configure:12324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12324   rm -rf conftest*
12325   eval "ac_cv_func_crypt=yes"
12326 else
12327   echo "configure: failed program was:" >&5
12328   cat conftest.$ac_ext >&5
12329   rm -rf conftest*
12330   eval "ac_cv_func_crypt=no"
12331 fi
12332 rm -f conftest*
12333 fi
12334
12335 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12336   echo "$ac_t""yes" 1>&6
12337   have_crypt=yes
12338 else
12339   echo "$ac_t""no" 1>&6
12340
12341                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12342 echo "configure:12343: checking for crypt in -lcrypt" >&5
12343 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12345   echo $ac_n "(cached) $ac_c" 1>&6
12346 else
12347   ac_save_LIBS="$LIBS"
12348 LIBS="-lcrypt  $LIBS"
12349 cat > conftest.$ac_ext <<EOF
12350 #line 12351 "configure"
12351 #include "confdefs.h"
12352 /* Override any gcc2 internal prototype to avoid an error.  */
12353 /* We use char because int might match the return type of a gcc2
12354     builtin and then its argument prototype would still apply.  */
12355 char crypt();
12356
12357 int main() {
12358 crypt()
12359 ; return 0; }
12360 EOF
12361 if { (eval echo configure:12362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12362   rm -rf conftest*
12363   eval "ac_cv_lib_$ac_lib_var=yes"
12364 else
12365   echo "configure: failed program was:" >&5
12366   cat conftest.$ac_ext >&5
12367   rm -rf conftest*
12368   eval "ac_cv_lib_$ac_lib_var=no"
12369 fi
12370 rm -f conftest*
12371 LIBS="$ac_save_LIBS"
12372
12373 fi
12374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12375   echo "$ac_t""yes" 1>&6
12376   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12377                         have_crypt=yes
12378 else
12379   echo "$ac_t""no" 1>&6
12380 have_crypt=no
12381 fi
12382
12383 fi
12384
12385
12386         if test $have_crypt = yes ; then
12387                 cat >> confdefs.h <<\EOF
12388 #define HAVE_CRYPT 1
12389 EOF
12390
12391         else
12392                 echo "configure: warning: could not find crypt" 1>&2
12393                 if test $ol_enable_crypt = yes ; then
12394                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12395                 fi
12396
12397                 echo "configure: warning: disabling crypt support" 1>&2
12398                 ol_enable_crypt=no
12399         fi
12400 fi
12401
12402 # FreeBSD (and others) have setproctitle(3) in -lutil
12403 if test $ol_enable_proctitle != no ; then
12404         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12405 echo "configure:12406: checking for setproctitle" >&5
12406 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12407   echo $ac_n "(cached) $ac_c" 1>&6
12408 else
12409   cat > conftest.$ac_ext <<EOF
12410 #line 12411 "configure"
12411 #include "confdefs.h"
12412 /* System header to define __stub macros and hopefully few prototypes,
12413     which can conflict with char setproctitle(); below.  */
12414 #include <assert.h>
12415 /* Override any gcc2 internal prototype to avoid an error.  */
12416 /* We use char because int might match the return type of a gcc2
12417     builtin and then its argument prototype would still apply.  */
12418 char setproctitle();
12419 char (*f)();
12420
12421 int main() {
12422
12423 /* The GNU C library defines this for functions which it implements
12424     to always fail with ENOSYS.  Some functions are actually named
12425     something starting with __ and the normal name is an alias.  */
12426 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12427 choke me
12428 #else
12429 f = setproctitle;
12430 #endif
12431
12432 ; return 0; }
12433 EOF
12434 if { (eval echo configure:12435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12435   rm -rf conftest*
12436   eval "ac_cv_func_setproctitle=yes"
12437 else
12438   echo "configure: failed program was:" >&5
12439   cat conftest.$ac_ext >&5
12440   rm -rf conftest*
12441   eval "ac_cv_func_setproctitle=no"
12442 fi
12443 rm -f conftest*
12444 fi
12445
12446 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12447   echo "$ac_t""yes" 1>&6
12448   have_setproctitle=yes
12449 else
12450   echo "$ac_t""no" 1>&6
12451
12452                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12453 echo "configure:12454: checking for setproctitle in -lutil" >&5
12454 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12455 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12456   echo $ac_n "(cached) $ac_c" 1>&6
12457 else
12458   ac_save_LIBS="$LIBS"
12459 LIBS="-lutil  $LIBS"
12460 cat > conftest.$ac_ext <<EOF
12461 #line 12462 "configure"
12462 #include "confdefs.h"
12463 /* Override any gcc2 internal prototype to avoid an error.  */
12464 /* We use char because int might match the return type of a gcc2
12465     builtin and then its argument prototype would still apply.  */
12466 char setproctitle();
12467
12468 int main() {
12469 setproctitle()
12470 ; return 0; }
12471 EOF
12472 if { (eval echo configure:12473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12473   rm -rf conftest*
12474   eval "ac_cv_lib_$ac_lib_var=yes"
12475 else
12476   echo "configure: failed program was:" >&5
12477   cat conftest.$ac_ext >&5
12478   rm -rf conftest*
12479   eval "ac_cv_lib_$ac_lib_var=no"
12480 fi
12481 rm -f conftest*
12482 LIBS="$ac_save_LIBS"
12483
12484 fi
12485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12486   echo "$ac_t""yes" 1>&6
12487   have_setproctitle=yes
12488                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12489 else
12490   echo "$ac_t""no" 1>&6
12491 have_setproctitle=no
12492                         LIBOBJS="$LIBOBJS setproctitle.o"
12493 fi
12494
12495 fi
12496
12497
12498         if test $have_setproctitle = yes ; then
12499                 cat >> confdefs.h <<\EOF
12500 #define HAVE_SETPROCTITLE 1
12501 EOF
12502
12503         fi
12504 fi
12505
12506 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12507 echo "configure:12508: checking for uid_t in sys/types.h" >&5
12508 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12509   echo $ac_n "(cached) $ac_c" 1>&6
12510 else
12511   cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514 #include <sys/types.h>
12515 EOF
12516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12517   egrep "uid_t" >/dev/null 2>&1; then
12518   rm -rf conftest*
12519   ac_cv_type_uid_t=yes
12520 else
12521   rm -rf conftest*
12522   ac_cv_type_uid_t=no
12523 fi
12524 rm -f conftest*
12525
12526 fi
12527
12528 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12529 if test $ac_cv_type_uid_t = no; then
12530   cat >> confdefs.h <<\EOF
12531 #define uid_t int
12532 EOF
12533
12534   cat >> confdefs.h <<\EOF
12535 #define gid_t int
12536 EOF
12537
12538 fi
12539
12540 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12541 echo "configure:12542: checking type of array argument to getgroups" >&5
12542 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12543   echo $ac_n "(cached) $ac_c" 1>&6
12544 else
12545   if test "$cross_compiling" = yes; then
12546   ac_cv_type_getgroups=cross
12547 else
12548   cat > conftest.$ac_ext <<EOF
12549 #line 12550 "configure"
12550 #include "confdefs.h"
12551
12552 /* Thanks to Mike Rendell for this test.  */
12553 #include <sys/types.h>
12554 #define NGID 256
12555 #undef MAX
12556 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12557 main()
12558 {
12559   gid_t gidset[NGID];
12560   int i, n;
12561   union { gid_t gval; long lval; }  val;
12562
12563   val.lval = -1;
12564   for (i = 0; i < NGID; i++)
12565     gidset[i] = val.gval;
12566   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12567                  gidset);
12568   /* Exit non-zero if getgroups seems to require an array of ints.  This
12569      happens when gid_t is short but getgroups modifies an array of ints.  */
12570   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12571 }
12572
12573 EOF
12574 if { (eval echo configure:12575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12575 then
12576     ac_cv_type_getgroups=gid_t
12577 else
12578   echo "configure: failed program was:" >&5
12579   cat conftest.$ac_ext >&5
12580   rm -fr conftest*
12581   ac_cv_type_getgroups=int
12582 fi
12583 rm -fr conftest*
12584 fi
12585
12586 if test $ac_cv_type_getgroups = cross; then
12587         cat > conftest.$ac_ext <<EOF
12588 #line 12589 "configure"
12589 #include "confdefs.h"
12590 #include <unistd.h>
12591 EOF
12592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12593   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12594   rm -rf conftest*
12595   ac_cv_type_getgroups=gid_t
12596 else
12597   rm -rf conftest*
12598   ac_cv_type_getgroups=int
12599 fi
12600 rm -f conftest*
12601
12602 fi
12603 fi
12604
12605 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12606 cat >> confdefs.h <<EOF
12607 #define GETGROUPS_T $ac_cv_type_getgroups
12608 EOF
12609
12610  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12611 echo "configure:12612: checking for ANSI C header files" >&5
12612 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12613   echo $ac_n "(cached) $ac_c" 1>&6
12614 else
12615   cat > conftest.$ac_ext <<EOF
12616 #line 12617 "configure"
12617 #include "confdefs.h"
12618 #include <stdlib.h>
12619 #include <stdarg.h>
12620 #include <string.h>
12621 #include <float.h>
12622 EOF
12623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12624 { (eval echo configure:12625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12626 if test -z "$ac_err"; then
12627   rm -rf conftest*
12628   ac_cv_header_stdc=yes
12629 else
12630   echo "$ac_err" >&5
12631   echo "configure: failed program was:" >&5
12632   cat conftest.$ac_ext >&5
12633   rm -rf conftest*
12634   ac_cv_header_stdc=no
12635 fi
12636 rm -f conftest*
12637
12638 if test $ac_cv_header_stdc = yes; then
12639   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12640 cat > conftest.$ac_ext <<EOF
12641 #line 12642 "configure"
12642 #include "confdefs.h"
12643 #include <string.h>
12644 EOF
12645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12646   egrep "memchr" >/dev/null 2>&1; then
12647   :
12648 else
12649   rm -rf conftest*
12650   ac_cv_header_stdc=no
12651 fi
12652 rm -f conftest*
12653
12654 fi
12655
12656 if test $ac_cv_header_stdc = yes; then
12657   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12658 cat > conftest.$ac_ext <<EOF
12659 #line 12660 "configure"
12660 #include "confdefs.h"
12661 #include <stdlib.h>
12662 EOF
12663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12664   egrep "free" >/dev/null 2>&1; then
12665   :
12666 else
12667   rm -rf conftest*
12668   ac_cv_header_stdc=no
12669 fi
12670 rm -f conftest*
12671
12672 fi
12673
12674 if test $ac_cv_header_stdc = yes; then
12675   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12676 if test "$cross_compiling" = yes; then
12677   :
12678 else
12679   cat > conftest.$ac_ext <<EOF
12680 #line 12681 "configure"
12681 #include "confdefs.h"
12682 #include <ctype.h>
12683 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12684 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12685 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12686 int main () { int i; for (i = 0; i < 256; i++)
12687 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12688 exit (0); }
12689
12690 EOF
12691 if { (eval echo configure:12692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12692 then
12693   :
12694 else
12695   echo "configure: failed program was:" >&5
12696   cat conftest.$ac_ext >&5
12697   rm -fr conftest*
12698   ac_cv_header_stdc=no
12699 fi
12700 rm -fr conftest*
12701 fi
12702
12703 fi
12704 fi
12705
12706 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12707 if test $ac_cv_header_stdc = yes; then
12708   cat >> confdefs.h <<\EOF
12709 #define STDC_HEADERS 1
12710 EOF
12711
12712 fi
12713
12714 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12715 echo "configure:12716: checking for mode_t" >&5
12716 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12717   echo $ac_n "(cached) $ac_c" 1>&6
12718 else
12719   cat > conftest.$ac_ext <<EOF
12720 #line 12721 "configure"
12721 #include "confdefs.h"
12722 #include <sys/types.h>
12723 #if STDC_HEADERS
12724 #include <stdlib.h>
12725 #include <stddef.h>
12726 #endif
12727 EOF
12728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12729   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12730   rm -rf conftest*
12731   eval "ac_cv_type_mode_t=yes"
12732 else
12733   rm -rf conftest*
12734   eval "ac_cv_type_mode_t=no"
12735 fi
12736 rm -f conftest*
12737
12738 fi
12739 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12740   echo "$ac_t""yes" 1>&6
12741 else
12742   echo "$ac_t""no" 1>&6
12743   cat >> confdefs.h <<EOF
12744 #define mode_t int
12745 EOF
12746
12747 fi
12748
12749 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12750 echo "configure:12751: checking for off_t" >&5
12751 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12752   echo $ac_n "(cached) $ac_c" 1>&6
12753 else
12754   cat > conftest.$ac_ext <<EOF
12755 #line 12756 "configure"
12756 #include "confdefs.h"
12757 #include <sys/types.h>
12758 #if STDC_HEADERS
12759 #include <stdlib.h>
12760 #include <stddef.h>
12761 #endif
12762 EOF
12763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12764   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12765   rm -rf conftest*
12766   eval "ac_cv_type_off_t=yes"
12767 else
12768   rm -rf conftest*
12769   eval "ac_cv_type_off_t=no"
12770 fi
12771 rm -f conftest*
12772
12773 fi
12774 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12775   echo "$ac_t""yes" 1>&6
12776 else
12777   echo "$ac_t""no" 1>&6
12778   cat >> confdefs.h <<EOF
12779 #define off_t long
12780 EOF
12781
12782 fi
12783
12784 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12785 echo "configure:12786: checking for pid_t" >&5
12786 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12787   echo $ac_n "(cached) $ac_c" 1>&6
12788 else
12789   cat > conftest.$ac_ext <<EOF
12790 #line 12791 "configure"
12791 #include "confdefs.h"
12792 #include <sys/types.h>
12793 #if STDC_HEADERS
12794 #include <stdlib.h>
12795 #include <stddef.h>
12796 #endif
12797 EOF
12798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12799   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12800   rm -rf conftest*
12801   eval "ac_cv_type_pid_t=yes"
12802 else
12803   rm -rf conftest*
12804   eval "ac_cv_type_pid_t=no"
12805 fi
12806 rm -f conftest*
12807
12808 fi
12809 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12810   echo "$ac_t""yes" 1>&6
12811 else
12812   echo "$ac_t""no" 1>&6
12813   cat >> confdefs.h <<EOF
12814 #define pid_t int
12815 EOF
12816
12817 fi
12818
12819 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12820 echo "configure:12821: checking for ptrdiff_t" >&5
12821 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12822   echo $ac_n "(cached) $ac_c" 1>&6
12823 else
12824   cat > conftest.$ac_ext <<EOF
12825 #line 12826 "configure"
12826 #include "confdefs.h"
12827 #include <stddef.h>
12828 int main() {
12829 ptrdiff_t p
12830 ; return 0; }
12831 EOF
12832 if { (eval echo configure:12833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12833   rm -rf conftest*
12834   am_cv_type_ptrdiff_t=yes
12835 else
12836   echo "configure: failed program was:" >&5
12837   cat conftest.$ac_ext >&5
12838   rm -rf conftest*
12839   am_cv_type_ptrdiff_t=no
12840 fi
12841 rm -f conftest*
12842 fi
12843
12844 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12845    if test $am_cv_type_ptrdiff_t = yes; then
12846      cat >> confdefs.h <<\EOF
12847 #define HAVE_PTRDIFF_T 1
12848 EOF
12849
12850    fi
12851
12852 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12853 echo "configure:12854: checking return type of signal handlers" >&5
12854 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12855   echo $ac_n "(cached) $ac_c" 1>&6
12856 else
12857   cat > conftest.$ac_ext <<EOF
12858 #line 12859 "configure"
12859 #include "confdefs.h"
12860 #include <sys/types.h>
12861 #include <signal.h>
12862 #ifdef signal
12863 #undef signal
12864 #endif
12865 #ifdef __cplusplus
12866 extern "C" void (*signal (int, void (*)(int)))(int);
12867 #else
12868 void (*signal ()) ();
12869 #endif
12870
12871 int main() {
12872 int i;
12873 ; return 0; }
12874 EOF
12875 if { (eval echo configure:12876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12876   rm -rf conftest*
12877   ac_cv_type_signal=void
12878 else
12879   echo "configure: failed program was:" >&5
12880   cat conftest.$ac_ext >&5
12881   rm -rf conftest*
12882   ac_cv_type_signal=int
12883 fi
12884 rm -f conftest*
12885 fi
12886
12887 echo "$ac_t""$ac_cv_type_signal" 1>&6
12888 cat >> confdefs.h <<EOF
12889 #define RETSIGTYPE $ac_cv_type_signal
12890 EOF
12891
12892
12893 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12894 echo "configure:12895: checking for sig_atomic_t" >&5
12895 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12896   echo $ac_n "(cached) $ac_c" 1>&6
12897 else
12898   cat > conftest.$ac_ext <<EOF
12899 #line 12900 "configure"
12900 #include "confdefs.h"
12901 #include <signal.h>
12902 int main() {
12903 sig_atomic_t atomic;
12904 ; return 0; }
12905 EOF
12906 if { (eval echo configure:12907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12907   rm -rf conftest*
12908   ol_cv_type_sig_atomic_t=yes
12909 else
12910   echo "configure: failed program was:" >&5
12911   cat conftest.$ac_ext >&5
12912   rm -rf conftest*
12913   ol_cv_type_sig_atomic_t=no
12914 fi
12915 rm -f conftest*
12916 fi
12917
12918 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12919   if test $ol_cv_type_sig_atomic_t = no; then
12920     cat >> confdefs.h <<\EOF
12921 #define sig_atomic_t int
12922 EOF
12923
12924   fi
12925  
12926 echo $ac_n "checking for size_t""... $ac_c" 1>&6
12927 echo "configure:12928: checking for size_t" >&5
12928 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
12929   echo $ac_n "(cached) $ac_c" 1>&6
12930 else
12931   cat > conftest.$ac_ext <<EOF
12932 #line 12933 "configure"
12933 #include "confdefs.h"
12934 #include <sys/types.h>
12935 #if STDC_HEADERS
12936 #include <stdlib.h>
12937 #include <stddef.h>
12938 #endif
12939 EOF
12940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12941   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12942   rm -rf conftest*
12943   eval "ac_cv_type_size_t=yes"
12944 else
12945   rm -rf conftest*
12946   eval "ac_cv_type_size_t=no"
12947 fi
12948 rm -f conftest*
12949
12950 fi
12951 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
12952   echo "$ac_t""yes" 1>&6
12953 else
12954   echo "$ac_t""no" 1>&6
12955   cat >> confdefs.h <<EOF
12956 #define size_t unsigned
12957 EOF
12958
12959 fi
12960
12961 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
12962 echo "configure:12963: checking for socklen_t" >&5
12963 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
12964   echo $ac_n "(cached) $ac_c" 1>&6
12965 else
12966   cat > conftest.$ac_ext <<EOF
12967 #line 12968 "configure"
12968 #include "confdefs.h"
12969
12970 #ifdef HAVE_SYS_TYPES_H
12971 #include <sys/types.h>
12972 #endif
12973 #ifdef HAVE_SYS_SOCKET_H
12974 #include <sys/socket.h>
12975 #endif
12976
12977 int main() {
12978 socklen_t len;
12979 ; return 0; }
12980 EOF
12981 if { (eval echo configure:12982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12982   rm -rf conftest*
12983   ol_cv_type_socklen_t=yes
12984 else
12985   echo "configure: failed program was:" >&5
12986   cat conftest.$ac_ext >&5
12987   rm -rf conftest*
12988   ol_cv_type_socklen_t=no
12989 fi
12990 rm -f conftest*
12991 fi
12992
12993 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
12994   if test $ol_cv_type_socklen_t = no; then
12995     cat >> confdefs.h <<\EOF
12996 #define socklen_t int
12997 EOF
12998
12999   fi
13000  
13001 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13002 echo "configure:13003: checking for member st_blksize in aggregate type struct stat" >&5
13003 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13004   echo $ac_n "(cached) $ac_c" 1>&6
13005 else
13006   cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009 #include <sys/types.h>
13010 #include <sys/stat.h>
13011 int main() {
13012 struct stat foo; foo.st_blksize;
13013 ; return 0; }
13014 EOF
13015 if { (eval echo configure:13016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13016   rm -rf conftest*
13017   ac_cv_c_struct_member_st_blksize=yes
13018 else
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -rf conftest*
13022   ac_cv_c_struct_member_st_blksize=no
13023 fi
13024 rm -f conftest*
13025 fi
13026
13027 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13028 st_blksize="$ac_cv_c_struct_member_st_blksize"
13029 if test $ac_cv_c_struct_member_st_blksize = yes; then
13030   cat >> confdefs.h <<\EOF
13031 #define HAVE_ST_BLKSIZE 1
13032 EOF
13033
13034 fi
13035
13036 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13037 echo "configure:13038: checking whether time.h and sys/time.h may both be included" >&5
13038 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13039   echo $ac_n "(cached) $ac_c" 1>&6
13040 else
13041   cat > conftest.$ac_ext <<EOF
13042 #line 13043 "configure"
13043 #include "confdefs.h"
13044 #include <sys/types.h>
13045 #include <sys/time.h>
13046 #include <time.h>
13047 int main() {
13048 struct tm *tp;
13049 ; return 0; }
13050 EOF
13051 if { (eval echo configure:13052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13052   rm -rf conftest*
13053   ac_cv_header_time=yes
13054 else
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -rf conftest*
13058   ac_cv_header_time=no
13059 fi
13060 rm -f conftest*
13061 fi
13062
13063 echo "$ac_t""$ac_cv_header_time" 1>&6
13064 if test $ac_cv_header_time = yes; then
13065   cat >> confdefs.h <<\EOF
13066 #define TIME_WITH_SYS_TIME 1
13067 EOF
13068
13069 fi
13070
13071 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13072 echo "configure:13073: checking whether struct tm is in sys/time.h or time.h" >&5
13073 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13074   echo $ac_n "(cached) $ac_c" 1>&6
13075 else
13076   cat > conftest.$ac_ext <<EOF
13077 #line 13078 "configure"
13078 #include "confdefs.h"
13079 #include <sys/types.h>
13080 #include <time.h>
13081 int main() {
13082 struct tm *tp; tp->tm_sec;
13083 ; return 0; }
13084 EOF
13085 if { (eval echo configure:13086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13086   rm -rf conftest*
13087   ac_cv_struct_tm=time.h
13088 else
13089   echo "configure: failed program was:" >&5
13090   cat conftest.$ac_ext >&5
13091   rm -rf conftest*
13092   ac_cv_struct_tm=sys/time.h
13093 fi
13094 rm -f conftest*
13095 fi
13096
13097 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13098 if test $ac_cv_struct_tm = sys/time.h; then
13099   cat >> confdefs.h <<\EOF
13100 #define TM_IN_SYS_TIME 1
13101 EOF
13102
13103 fi
13104
13105 # test for pw_gecos in struct passwd
13106 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13107 echo "configure:13108: checking struct passwd for pw_gecos" >&5
13108 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13109   echo $ac_n "(cached) $ac_c" 1>&6
13110 else
13111   
13112         cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 #include <pwd.h>
13116 int main() {
13117
13118         struct passwd pwd;
13119         pwd.pw_gecos = pwd.pw_name;
13120
13121 ; return 0; }
13122 EOF
13123 if { (eval echo configure:13124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13124   rm -rf conftest*
13125   ol_cv_struct_passwd_pw_gecos=yes
13126 else
13127   echo "configure: failed program was:" >&5
13128   cat conftest.$ac_ext >&5
13129   rm -rf conftest*
13130   ol_cv_struct_passwd_pw_gecos=no
13131 fi
13132 rm -f conftest*
13133 fi
13134
13135 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13136 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13137         cat >> confdefs.h <<\EOF
13138 #define HAVE_PW_GECOS 1
13139 EOF
13140
13141 fi
13142
13143 # test for pw_passwd in struct passwd
13144 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13145 echo "configure:13146: checking struct passwd for pw_passwd" >&5
13146 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13147   echo $ac_n "(cached) $ac_c" 1>&6
13148 else
13149   
13150         cat > conftest.$ac_ext <<EOF
13151 #line 13152 "configure"
13152 #include "confdefs.h"
13153 #include <pwd.h>
13154 int main() {
13155
13156         struct passwd pwd;
13157         pwd.pw_passwd = pwd.pw_name;
13158
13159 ; return 0; }
13160 EOF
13161 if { (eval echo configure:13162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13162   rm -rf conftest*
13163   ol_cv_struct_passwd_pw_passwd=yes
13164 else
13165   echo "configure: failed program was:" >&5
13166   cat conftest.$ac_ext >&5
13167   rm -rf conftest*
13168   ol_cv_struct_passwd_pw_passwd=no
13169 fi
13170 rm -f conftest*
13171 fi
13172
13173 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13174 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13175         cat >> confdefs.h <<\EOF
13176 #define HAVE_PW_PASSWD 1
13177 EOF
13178
13179 fi
13180
13181
13182 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13183 echo "configure:13184: checking if toupper() requires islower()" >&5
13184 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13185   echo $ac_n "(cached) $ac_c" 1>&6
13186 else
13187   
13188         if test "$cross_compiling" = yes; then
13189   ol_cv_c_upper_lower=safe
13190 else
13191   cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194
13195 #include <ctype.h>
13196 main()
13197 {
13198         if ('C' == toupper('C'))
13199                 exit(0);
13200         else
13201                 exit(1);
13202 }
13203 EOF
13204 if { (eval echo configure:13205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13205 then
13206   ol_cv_c_upper_lower=no
13207 else
13208   echo "configure: failed program was:" >&5
13209   cat conftest.$ac_ext >&5
13210   rm -fr conftest*
13211   ol_cv_c_upper_lower=yes
13212 fi
13213 rm -fr conftest*
13214 fi
13215
13216 fi
13217
13218 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13219 if test $ol_cv_c_upper_lower != no ; then
13220         cat >> confdefs.h <<\EOF
13221 #define C_UPPER_LOWER 1
13222 EOF
13223
13224 fi
13225
13226 echo $ac_n "checking for working const""... $ac_c" 1>&6
13227 echo "configure:13228: checking for working const" >&5
13228 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13229   echo $ac_n "(cached) $ac_c" 1>&6
13230 else
13231   cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234
13235 int main() {
13236
13237 /* Ultrix mips cc rejects this.  */
13238 typedef int charset[2]; const charset x;
13239 /* SunOS 4.1.1 cc rejects this.  */
13240 char const *const *ccp;
13241 char **p;
13242 /* NEC SVR4.0.2 mips cc rejects this.  */
13243 struct point {int x, y;};
13244 static struct point const zero = {0,0};
13245 /* AIX XL C 1.02.0.0 rejects this.
13246    It does not let you subtract one const X* pointer from another in an arm
13247    of an if-expression whose if-part is not a constant expression */
13248 const char *g = "string";
13249 ccp = &g + (g ? g-g : 0);
13250 /* HPUX 7.0 cc rejects these. */
13251 ++ccp;
13252 p = (char**) ccp;
13253 ccp = (char const *const *) p;
13254 { /* SCO 3.2v4 cc rejects this.  */
13255   char *t;
13256   char const *s = 0 ? (char *) 0 : (char const *) 0;
13257
13258   *t++ = 0;
13259 }
13260 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13261   int x[] = {25, 17};
13262   const int *foo = &x[0];
13263   ++foo;
13264 }
13265 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13266   typedef const int *iptr;
13267   iptr p = 0;
13268   ++p;
13269 }
13270 { /* AIX XL C 1.02.0.0 rejects this saying
13271      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13272   struct s { int j; const int *ap[3]; };
13273   struct s *b; b->j = 5;
13274 }
13275 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13276   const int foo = 10;
13277 }
13278
13279 ; return 0; }
13280 EOF
13281 if { (eval echo configure:13282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13282   rm -rf conftest*
13283   ac_cv_c_const=yes
13284 else
13285   echo "configure: failed program was:" >&5
13286   cat conftest.$ac_ext >&5
13287   rm -rf conftest*
13288   ac_cv_c_const=no
13289 fi
13290 rm -f conftest*
13291 fi
13292
13293 echo "$ac_t""$ac_cv_c_const" 1>&6
13294 if test $ac_cv_c_const = no; then
13295   cat >> confdefs.h <<\EOF
13296 #define const 
13297 EOF
13298
13299 fi
13300
13301 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13302 echo "configure:13303: checking if compiler understands volatile" >&5
13303 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13304   echo $ac_n "(cached) $ac_c" 1>&6
13305 else
13306   cat > conftest.$ac_ext <<EOF
13307 #line 13308 "configure"
13308 #include "confdefs.h"
13309 int x, y, z;
13310 int main() {
13311 volatile int a; int * volatile b = x ? &y : &z;
13312       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13313       *b = 0;
13314 ; return 0; }
13315 EOF
13316 if { (eval echo configure:13317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13317   rm -rf conftest*
13318   ol_cv_c_volatile=yes
13319 else
13320   echo "configure: failed program was:" >&5
13321   cat conftest.$ac_ext >&5
13322   rm -rf conftest*
13323   ol_cv_c_volatile=no
13324 fi
13325 rm -f conftest*
13326 fi
13327
13328 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13329   if test $ol_cv_c_volatile = yes; then
13330     : 
13331   else
13332     cat >> confdefs.h <<\EOF
13333 #define volatile 
13334 EOF
13335
13336   fi
13337  
13338
13339 if test $cross_compiling = yes ; then
13340         cat >> confdefs.h <<\EOF
13341 #define CROSS_COMPILING 1
13342 EOF
13343
13344
13345         cat >> confdefs.h <<\EOF
13346 #define LBER_INT_T long
13347 EOF
13348
13349         cat >> confdefs.h <<\EOF
13350 #define LBER_TAG_T long
13351 EOF
13352
13353         cat >> confdefs.h <<\EOF
13354 #define LBER_SOCKET_T int
13355 EOF
13356
13357
13358 else
13359         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13360 echo "configure:13361: checking whether byte ordering is bigendian" >&5
13361 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13362   echo $ac_n "(cached) $ac_c" 1>&6
13363 else
13364   ac_cv_c_bigendian=unknown
13365 # See if sys/param.h defines the BYTE_ORDER macro.
13366 cat > conftest.$ac_ext <<EOF
13367 #line 13368 "configure"
13368 #include "confdefs.h"
13369 #include <sys/types.h>
13370 #include <sys/param.h>
13371 int main() {
13372
13373 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13374  bogus endian macros
13375 #endif
13376 ; return 0; }
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13379   rm -rf conftest*
13380   # It does; now see whether it defined to BIG_ENDIAN or not.
13381 cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 #include <sys/types.h>
13385 #include <sys/param.h>
13386 int main() {
13387
13388 #if BYTE_ORDER != BIG_ENDIAN
13389  not big endian
13390 #endif
13391 ; return 0; }
13392 EOF
13393 if { (eval echo configure:13394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13394   rm -rf conftest*
13395   ac_cv_c_bigendian=yes
13396 else
13397   echo "configure: failed program was:" >&5
13398   cat conftest.$ac_ext >&5
13399   rm -rf conftest*
13400   ac_cv_c_bigendian=no
13401 fi
13402 rm -f conftest*
13403 else
13404   echo "configure: failed program was:" >&5
13405   cat conftest.$ac_ext >&5
13406 fi
13407 rm -f conftest*
13408 if test $ac_cv_c_bigendian = unknown; then
13409 if test "$cross_compiling" = yes; then
13410     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13411 else
13412   cat > conftest.$ac_ext <<EOF
13413 #line 13414 "configure"
13414 #include "confdefs.h"
13415 main () {
13416   /* Are we little or big endian?  From Harbison&Steele.  */
13417   union
13418   {
13419     long l;
13420     char c[sizeof (long)];
13421   } u;
13422   u.l = 1;
13423   exit (u.c[sizeof (long) - 1] == 1);
13424 }
13425 EOF
13426 if { (eval echo configure:13427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13427 then
13428   ac_cv_c_bigendian=no
13429 else
13430   echo "configure: failed program was:" >&5
13431   cat conftest.$ac_ext >&5
13432   rm -fr conftest*
13433   ac_cv_c_bigendian=yes
13434 fi
13435 rm -fr conftest*
13436 fi
13437
13438 fi
13439 fi
13440
13441 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13442 if test $ac_cv_c_bigendian = yes; then
13443   cat >> confdefs.h <<\EOF
13444 #define WORDS_BIGENDIAN 1
13445 EOF
13446
13447 fi
13448
13449         echo $ac_n "checking size of short""... $ac_c" 1>&6
13450 echo "configure:13451: checking size of short" >&5
13451 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13452   echo $ac_n "(cached) $ac_c" 1>&6
13453 else
13454   if test "$cross_compiling" = yes; then
13455     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13456 else
13457   cat > conftest.$ac_ext <<EOF
13458 #line 13459 "configure"
13459 #include "confdefs.h"
13460 #include <stdio.h>
13461 main()
13462 {
13463   FILE *f=fopen("conftestval", "w");
13464   if (!f) exit(1);
13465   fprintf(f, "%d\n", sizeof(short));
13466   exit(0);
13467 }
13468 EOF
13469 if { (eval echo configure:13470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13470 then
13471   ac_cv_sizeof_short=`cat conftestval`
13472 else
13473   echo "configure: failed program was:" >&5
13474   cat conftest.$ac_ext >&5
13475   rm -fr conftest*
13476   ac_cv_sizeof_short=0
13477 fi
13478 rm -fr conftest*
13479 fi
13480
13481 fi
13482 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13483 cat >> confdefs.h <<EOF
13484 #define SIZEOF_SHORT $ac_cv_sizeof_short
13485 EOF
13486
13487  
13488         echo $ac_n "checking size of int""... $ac_c" 1>&6
13489 echo "configure:13490: checking size of int" >&5
13490 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13491   echo $ac_n "(cached) $ac_c" 1>&6
13492 else
13493   if test "$cross_compiling" = yes; then
13494     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13495 else
13496   cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 #include <stdio.h>
13500 main()
13501 {
13502   FILE *f=fopen("conftestval", "w");
13503   if (!f) exit(1);
13504   fprintf(f, "%d\n", sizeof(int));
13505   exit(0);
13506 }
13507 EOF
13508 if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13509 then
13510   ac_cv_sizeof_int=`cat conftestval`
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -fr conftest*
13515   ac_cv_sizeof_int=0
13516 fi
13517 rm -fr conftest*
13518 fi
13519
13520 fi
13521 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13522 cat >> confdefs.h <<EOF
13523 #define SIZEOF_INT $ac_cv_sizeof_int
13524 EOF
13525
13526  
13527         echo $ac_n "checking size of long""... $ac_c" 1>&6
13528 echo "configure:13529: checking size of long" >&5
13529 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13530   echo $ac_n "(cached) $ac_c" 1>&6
13531 else
13532   if test "$cross_compiling" = yes; then
13533     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13534 else
13535   cat > conftest.$ac_ext <<EOF
13536 #line 13537 "configure"
13537 #include "confdefs.h"
13538 #include <stdio.h>
13539 main()
13540 {
13541   FILE *f=fopen("conftestval", "w");
13542   if (!f) exit(1);
13543   fprintf(f, "%d\n", sizeof(long));
13544   exit(0);
13545 }
13546 EOF
13547 if { (eval echo configure:13548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13548 then
13549   ac_cv_sizeof_long=`cat conftestval`
13550 else
13551   echo "configure: failed program was:" >&5
13552   cat conftest.$ac_ext >&5
13553   rm -fr conftest*
13554   ac_cv_sizeof_long=0
13555 fi
13556 rm -fr conftest*
13557 fi
13558
13559 fi
13560 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13561 cat >> confdefs.h <<EOF
13562 #define SIZEOF_LONG $ac_cv_sizeof_long
13563 EOF
13564
13565
13566
13567         if test "$ac_cv_sizeof_int" -lt 4 ; then
13568                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13569
13570                 cat >> confdefs.h <<\EOF
13571 #define LBER_INT_T long
13572 EOF
13573
13574                 cat >> confdefs.h <<\EOF
13575 #define LBER_TAG_T long
13576 EOF
13577
13578                 cat >> confdefs.h <<\EOF
13579 #define LBER_SOCKET_T int
13580 EOF
13581
13582         else
13583                 cat >> confdefs.h <<\EOF
13584 #define LBER_INT_T int
13585 EOF
13586
13587                 cat >> confdefs.h <<\EOF
13588 #define LBER_TAG_T long
13589 EOF
13590
13591                 cat >> confdefs.h <<\EOF
13592 #define LBER_SOCKET_T int
13593 EOF
13594
13595         fi
13596 fi
13597
13598 cat >> confdefs.h <<\EOF
13599 #define LBER_LEN_T long
13600 EOF
13601
13602
13603 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13604 echo "configure:13605: checking for 8-bit clean memcmp" >&5
13605 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13606   echo $ac_n "(cached) $ac_c" 1>&6
13607 else
13608   if test "$cross_compiling" = yes; then
13609   ac_cv_func_memcmp_clean=no
13610 else
13611   cat > conftest.$ac_ext <<EOF
13612 #line 13613 "configure"
13613 #include "confdefs.h"
13614
13615 main()
13616 {
13617   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13618   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13619 }
13620
13621 EOF
13622 if { (eval echo configure:13623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13623 then
13624   ac_cv_func_memcmp_clean=yes
13625 else
13626   echo "configure: failed program was:" >&5
13627   cat conftest.$ac_ext >&5
13628   rm -fr conftest*
13629   ac_cv_func_memcmp_clean=no
13630 fi
13631 rm -fr conftest*
13632 fi
13633
13634 fi
13635
13636 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13637 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13638
13639 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13640 echo "configure:13641: checking for strftime" >&5
13641 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13642   echo $ac_n "(cached) $ac_c" 1>&6
13643 else
13644   cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 /* System header to define __stub macros and hopefully few prototypes,
13648     which can conflict with char strftime(); below.  */
13649 #include <assert.h>
13650 /* Override any gcc2 internal prototype to avoid an error.  */
13651 /* We use char because int might match the return type of a gcc2
13652     builtin and then its argument prototype would still apply.  */
13653 char strftime();
13654 char (*f)();
13655
13656 int main() {
13657
13658 /* The GNU C library defines this for functions which it implements
13659     to always fail with ENOSYS.  Some functions are actually named
13660     something starting with __ and the normal name is an alias.  */
13661 #if defined (__stub_strftime) || defined (__stub___strftime)
13662 choke me
13663 #else
13664 f = strftime;
13665 #endif
13666
13667 ; return 0; }
13668 EOF
13669 if { (eval echo configure:13670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13670   rm -rf conftest*
13671   eval "ac_cv_func_strftime=yes"
13672 else
13673   echo "configure: failed program was:" >&5
13674   cat conftest.$ac_ext >&5
13675   rm -rf conftest*
13676   eval "ac_cv_func_strftime=no"
13677 fi
13678 rm -f conftest*
13679 fi
13680
13681 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13682   echo "$ac_t""yes" 1>&6
13683   cat >> confdefs.h <<\EOF
13684 #define HAVE_STRFTIME 1
13685 EOF
13686
13687 else
13688   echo "$ac_t""no" 1>&6
13689 # strftime is in -lintl on SCO UNIX.
13690 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13691 echo "configure:13692: checking for strftime in -lintl" >&5
13692 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13694   echo $ac_n "(cached) $ac_c" 1>&6
13695 else
13696   ac_save_LIBS="$LIBS"
13697 LIBS="-lintl  $LIBS"
13698 cat > conftest.$ac_ext <<EOF
13699 #line 13700 "configure"
13700 #include "confdefs.h"
13701 /* Override any gcc2 internal prototype to avoid an error.  */
13702 /* We use char because int might match the return type of a gcc2
13703     builtin and then its argument prototype would still apply.  */
13704 char strftime();
13705
13706 int main() {
13707 strftime()
13708 ; return 0; }
13709 EOF
13710 if { (eval echo configure:13711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13711   rm -rf conftest*
13712   eval "ac_cv_lib_$ac_lib_var=yes"
13713 else
13714   echo "configure: failed program was:" >&5
13715   cat conftest.$ac_ext >&5
13716   rm -rf conftest*
13717   eval "ac_cv_lib_$ac_lib_var=no"
13718 fi
13719 rm -f conftest*
13720 LIBS="$ac_save_LIBS"
13721
13722 fi
13723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13724   echo "$ac_t""yes" 1>&6
13725   cat >> confdefs.h <<\EOF
13726 #define HAVE_STRFTIME 1
13727 EOF
13728
13729 LIBS="-lintl $LIBS"
13730 else
13731   echo "$ac_t""no" 1>&6
13732 fi
13733
13734 fi
13735
13736
13737 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13738 echo "configure:13739: checking for inet_aton()" >&5
13739 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13740   echo $ac_n "(cached) $ac_c" 1>&6
13741 else
13742   cat > conftest.$ac_ext <<EOF
13743 #line 13744 "configure"
13744 #include "confdefs.h"
13745
13746 #ifdef HAVE_SYS_TYPES_H
13747 #       include <sys/types.h>
13748 #endif
13749 #ifdef HAVE_SYS_SOCKET_H
13750 #       include <sys/socket.h>
13751 #       ifdef HAVE_SYS_SELECT_H
13752 #               include <sys/select.h>
13753 #       endif
13754 #       include <netinet/in.h>
13755 #       ifdef HAVE_ARPA_INET_H
13756 #               include <arpa/inet.h>
13757 #       endif
13758 #endif
13759
13760 int main() {
13761 struct in_addr in;
13762 int rc = inet_aton( "255.255.255.255", &in );
13763 ; return 0; }
13764 EOF
13765 if { (eval echo configure:13766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13766   rm -rf conftest*
13767   ol_cv_func_inet_aton=yes
13768 else
13769   echo "configure: failed program was:" >&5
13770   cat conftest.$ac_ext >&5
13771   rm -rf conftest*
13772   ol_cv_func_inet_aton=no
13773 fi
13774 rm -f conftest*
13775 fi
13776
13777 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13778   if test $ol_cv_func_inet_aton != no; then
13779     cat >> confdefs.h <<\EOF
13780 #define HAVE_INET_ATON 1
13781 EOF
13782
13783   fi
13784  
13785
13786 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13787 echo "configure:13788: checking for vprintf" >&5
13788 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13789   echo $ac_n "(cached) $ac_c" 1>&6
13790 else
13791   cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* System header to define __stub macros and hopefully few prototypes,
13795     which can conflict with char vprintf(); below.  */
13796 #include <assert.h>
13797 /* Override any gcc2 internal prototype to avoid an error.  */
13798 /* We use char because int might match the return type of a gcc2
13799     builtin and then its argument prototype would still apply.  */
13800 char vprintf();
13801 char (*f)();
13802
13803 int main() {
13804
13805 /* The GNU C library defines this for functions which it implements
13806     to always fail with ENOSYS.  Some functions are actually named
13807     something starting with __ and the normal name is an alias.  */
13808 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13809 choke me
13810 #else
13811 f = vprintf;
13812 #endif
13813
13814 ; return 0; }
13815 EOF
13816 if { (eval echo configure:13817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13817   rm -rf conftest*
13818   eval "ac_cv_func_vprintf=yes"
13819 else
13820   echo "configure: failed program was:" >&5
13821   cat conftest.$ac_ext >&5
13822   rm -rf conftest*
13823   eval "ac_cv_func_vprintf=no"
13824 fi
13825 rm -f conftest*
13826 fi
13827
13828 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13829   echo "$ac_t""yes" 1>&6
13830   cat >> confdefs.h <<\EOF
13831 #define HAVE_VPRINTF 1
13832 EOF
13833
13834 else
13835   echo "$ac_t""no" 1>&6
13836 fi
13837
13838 if test "$ac_cv_func_vprintf" != yes; then
13839 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13840 echo "configure:13841: checking for _doprnt" >&5
13841 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13842   echo $ac_n "(cached) $ac_c" 1>&6
13843 else
13844   cat > conftest.$ac_ext <<EOF
13845 #line 13846 "configure"
13846 #include "confdefs.h"
13847 /* System header to define __stub macros and hopefully few prototypes,
13848     which can conflict with char _doprnt(); below.  */
13849 #include <assert.h>
13850 /* Override any gcc2 internal prototype to avoid an error.  */
13851 /* We use char because int might match the return type of a gcc2
13852     builtin and then its argument prototype would still apply.  */
13853 char _doprnt();
13854 char (*f)();
13855
13856 int main() {
13857
13858 /* The GNU C library defines this for functions which it implements
13859     to always fail with ENOSYS.  Some functions are actually named
13860     something starting with __ and the normal name is an alias.  */
13861 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13862 choke me
13863 #else
13864 f = _doprnt;
13865 #endif
13866
13867 ; return 0; }
13868 EOF
13869 if { (eval echo configure:13870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13870   rm -rf conftest*
13871   eval "ac_cv_func__doprnt=yes"
13872 else
13873   echo "configure: failed program was:" >&5
13874   cat conftest.$ac_ext >&5
13875   rm -rf conftest*
13876   eval "ac_cv_func__doprnt=no"
13877 fi
13878 rm -f conftest*
13879 fi
13880
13881 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13882   echo "$ac_t""yes" 1>&6
13883   cat >> confdefs.h <<\EOF
13884 #define HAVE_DOPRNT 1
13885 EOF
13886
13887 else
13888   echo "$ac_t""no" 1>&6
13889 fi
13890
13891 fi
13892
13893
13894 if test $ac_cv_func_vprintf = yes ; then
13895                 for ac_func in vsnprintf vsprintf
13896 do
13897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13898 echo "configure:13899: checking for $ac_func" >&5
13899 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13900   echo $ac_n "(cached) $ac_c" 1>&6
13901 else
13902   cat > conftest.$ac_ext <<EOF
13903 #line 13904 "configure"
13904 #include "confdefs.h"
13905 /* System header to define __stub macros and hopefully few prototypes,
13906     which can conflict with char $ac_func(); below.  */
13907 #include <assert.h>
13908 /* Override any gcc2 internal prototype to avoid an error.  */
13909 /* We use char because int might match the return type of a gcc2
13910     builtin and then its argument prototype would still apply.  */
13911 char $ac_func();
13912 char (*f)();
13913
13914 int main() {
13915
13916 /* The GNU C library defines this for functions which it implements
13917     to always fail with ENOSYS.  Some functions are actually named
13918     something starting with __ and the normal name is an alias.  */
13919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13920 choke me
13921 #else
13922 f = $ac_func;
13923 #endif
13924
13925 ; return 0; }
13926 EOF
13927 if { (eval echo configure:13928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13928   rm -rf conftest*
13929   eval "ac_cv_func_$ac_func=yes"
13930 else
13931   echo "configure: failed program was:" >&5
13932   cat conftest.$ac_ext >&5
13933   rm -rf conftest*
13934   eval "ac_cv_func_$ac_func=no"
13935 fi
13936 rm -f conftest*
13937 fi
13938
13939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13940   echo "$ac_t""yes" 1>&6
13941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13942   cat >> confdefs.h <<EOF
13943 #define $ac_tr_func 1
13944 EOF
13945  
13946 else
13947   echo "$ac_t""no" 1>&6
13948 fi
13949 done
13950
13951 fi
13952
13953 for ac_func in \
13954         bcopy                   \
13955         closesocket             \
13956         endgrent                \
13957         endpwent                \
13958         flock                   \
13959         getdtablesize   \
13960         getgrgid                \
13961         gethostname             \
13962         getpass                 \
13963         getpwuid                \
13964         getpwnam                \
13965         getspnam                \
13966         gettimeofday    \
13967         initgroups              \
13968         lockf                   \
13969         memcpy                  \
13970         memmove                 \
13971         mkstemp                 \
13972         read                    \
13973         recv                    \
13974         recvfrom                \
13975         setpwfile               \
13976         setgid                  \
13977         setegid                 \
13978         setsid                  \
13979         setuid                  \
13980         seteuid                 \
13981         signal                  \
13982         sigset                  \
13983         snprintf                \
13984         strdup                  \
13985         strerror                \
13986         strpbrk                 \
13987         strrchr                 \
13988         strsep                  \
13989         strstr                  \
13990         strtol                  \
13991         strtoul                 \
13992         strspn                  \
13993         sysconf                 \
13994         waitpid                 \
13995         wait4                   \
13996         write                   \
13997         send                    \
13998         sendto                  \
13999
14000 do
14001 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14002 echo "configure:14003: checking for $ac_func" >&5
14003 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14004   echo $ac_n "(cached) $ac_c" 1>&6
14005 else
14006   cat > conftest.$ac_ext <<EOF
14007 #line 14008 "configure"
14008 #include "confdefs.h"
14009 /* System header to define __stub macros and hopefully few prototypes,
14010     which can conflict with char $ac_func(); below.  */
14011 #include <assert.h>
14012 /* Override any gcc2 internal prototype to avoid an error.  */
14013 /* We use char because int might match the return type of a gcc2
14014     builtin and then its argument prototype would still apply.  */
14015 char $ac_func();
14016 char (*f)();
14017
14018 int main() {
14019
14020 /* The GNU C library defines this for functions which it implements
14021     to always fail with ENOSYS.  Some functions are actually named
14022     something starting with __ and the normal name is an alias.  */
14023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14024 choke me
14025 #else
14026 f = $ac_func;
14027 #endif
14028
14029 ; return 0; }
14030 EOF
14031 if { (eval echo configure:14032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14032   rm -rf conftest*
14033   eval "ac_cv_func_$ac_func=yes"
14034 else
14035   echo "configure: failed program was:" >&5
14036   cat conftest.$ac_ext >&5
14037   rm -rf conftest*
14038   eval "ac_cv_func_$ac_func=no"
14039 fi
14040 rm -f conftest*
14041 fi
14042
14043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14044   echo "$ac_t""yes" 1>&6
14045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14046   cat >> confdefs.h <<EOF
14047 #define $ac_tr_func 1
14048 EOF
14049  
14050 else
14051   echo "$ac_t""no" 1>&6
14052 fi
14053 done
14054
14055
14056 for ac_func in getopt tempnam
14057 do
14058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14059 echo "configure:14060: checking for $ac_func" >&5
14060 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14061   echo $ac_n "(cached) $ac_c" 1>&6
14062 else
14063   cat > conftest.$ac_ext <<EOF
14064 #line 14065 "configure"
14065 #include "confdefs.h"
14066 /* System header to define __stub macros and hopefully few prototypes,
14067     which can conflict with char $ac_func(); below.  */
14068 #include <assert.h>
14069 /* Override any gcc2 internal prototype to avoid an error.  */
14070 /* We use char because int might match the return type of a gcc2
14071     builtin and then its argument prototype would still apply.  */
14072 char $ac_func();
14073 char (*f)();
14074
14075 int main() {
14076
14077 /* The GNU C library defines this for functions which it implements
14078     to always fail with ENOSYS.  Some functions are actually named
14079     something starting with __ and the normal name is an alias.  */
14080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14081 choke me
14082 #else
14083 f = $ac_func;
14084 #endif
14085
14086 ; return 0; }
14087 EOF
14088 if { (eval echo configure:14089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14089   rm -rf conftest*
14090   eval "ac_cv_func_$ac_func=yes"
14091 else
14092   echo "configure: failed program was:" >&5
14093   cat conftest.$ac_ext >&5
14094   rm -rf conftest*
14095   eval "ac_cv_func_$ac_func=no"
14096 fi
14097 rm -f conftest*
14098 fi
14099
14100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14101   echo "$ac_t""yes" 1>&6
14102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14103   cat >> confdefs.h <<EOF
14104 #define $ac_tr_func 1
14105 EOF
14106  
14107 else
14108   echo "$ac_t""no" 1>&6
14109 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14110 fi
14111 done
14112
14113
14114
14115 # Check Configuration
14116 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14117 echo "configure:14118: checking declaration of sys_errlist" >&5
14118 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14119   echo $ac_n "(cached) $ac_c" 1>&6
14120 else
14121   
14122         cat > conftest.$ac_ext <<EOF
14123 #line 14124 "configure"
14124 #include "confdefs.h"
14125
14126 #include <stdio.h>
14127 #include <sys/types.h>
14128 #include <errno.h> 
14129 int main() {
14130 char *c = (char *) *sys_errlist
14131 ; return 0; }
14132 EOF
14133 if { (eval echo configure:14134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14134   rm -rf conftest*
14135   ol_cv_dcl_sys_errlist=yes
14136         ol_cv_have_sys_errlist=yes
14137 else
14138   echo "configure: failed program was:" >&5
14139   cat conftest.$ac_ext >&5
14140   rm -rf conftest*
14141   ol_cv_dcl_sys_errlist=no
14142 fi
14143 rm -f conftest*
14144 fi
14145
14146 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14147 #
14148 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14149 if test $ol_cv_dcl_sys_errlist = no ; then
14150         cat >> confdefs.h <<\EOF
14151 #define DECL_SYS_ERRLIST 1
14152 EOF
14153
14154
14155         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14156 echo "configure:14157: checking existence of sys_errlist" >&5
14157 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14158   echo $ac_n "(cached) $ac_c" 1>&6
14159 else
14160   
14161                 cat > conftest.$ac_ext <<EOF
14162 #line 14163 "configure"
14163 #include "confdefs.h"
14164 #include <errno.h>
14165 int main() {
14166 char *c = (char *) *sys_errlist
14167 ; return 0; }
14168 EOF
14169 if { (eval echo configure:14170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14170   rm -rf conftest*
14171   ol_cv_have_sys_errlist=yes
14172 else
14173   echo "configure: failed program was:" >&5
14174   cat conftest.$ac_ext >&5
14175   rm -rf conftest*
14176   ol_cv_have_sys_errlist=no
14177 fi
14178 rm -f conftest*
14179 fi
14180
14181 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14182 fi
14183 if test $ol_cv_have_sys_errlist = yes ; then
14184         cat >> confdefs.h <<\EOF
14185 #define HAVE_SYS_ERRLIST 1
14186 EOF
14187
14188 fi
14189
14190
14191
14192 if test "$ol_enable_debug" != no ; then
14193         cat >> confdefs.h <<\EOF
14194 #define LDAP_DEBUG 1
14195 EOF
14196
14197 fi
14198 if test "$ol_enable_syslog" = yes ; then
14199         cat >> confdefs.h <<\EOF
14200 #define LDAP_SYSLOG 1
14201 EOF
14202
14203 fi
14204 if test "$ol_enable_libui" = yes ; then
14205         cat >> confdefs.h <<\EOF
14206 #define LDAP_LIBUI 1
14207 EOF
14208
14209 fi
14210 if test "$ol_enable_cache" = no ; then
14211         cat >> confdefs.h <<\EOF
14212 #define LDAP_NOCACHE 1
14213 EOF
14214
14215 fi
14216 if test "$ol_enable_dns" != no ; then
14217         cat >> confdefs.h <<\EOF
14218 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14219 EOF
14220
14221 fi
14222 if test "$ol_enable_proctitle" != no ; then
14223         cat >> confdefs.h <<\EOF
14224 #define LDAP_PROCTITLE 1
14225 EOF
14226
14227 fi
14228 if test "$ol_enable_referrals" != no ; then
14229         cat >> confdefs.h <<\EOF
14230 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14231 EOF
14232
14233 fi
14234 if test "$ol_enable_cldap" != no ; then
14235         cat >> confdefs.h <<\EOF
14236 #define LDAP_CONNECTIONLESS 1
14237 EOF
14238
14239 fi
14240
14241 if test "$ol_enable_crypt" != no ; then
14242         cat >> confdefs.h <<\EOF
14243 #define SLAPD_CRYPT 1
14244 EOF
14245
14246 fi
14247 if test "$ol_enable_cleartext" != no ; then
14248         cat >> confdefs.h <<\EOF
14249 #define SLAPD_CLEARTEXT 1
14250 EOF
14251
14252 fi
14253 if test "$ol_enable_multimaster" != no ; then
14254         cat >> confdefs.h <<\EOF
14255 #define SLAPD_MULTIMASTER 1
14256 EOF
14257
14258 fi
14259 if test "$ol_enable_phonetic" != no ; then
14260         cat >> confdefs.h <<\EOF
14261 #define SLAPD_PHONETIC 1
14262 EOF
14263
14264 fi
14265 if test "$ol_enable_rlookups" != no ; then
14266         cat >> confdefs.h <<\EOF
14267 #define SLAPD_RLOOKUPS 1
14268 EOF
14269
14270 fi
14271
14272 if test "$ol_link_modules" != no ; then
14273         cat >> confdefs.h <<\EOF
14274 #define SLAPD_MODULES 1
14275 EOF
14276
14277         BUILD_SLAPD=yes
14278         MODULES_LIBS=-lltdl
14279         SLAPD_MODULES_LDFLAGS="-dlopen self"
14280 fi
14281
14282 if test "$ol_link_bdb2" != no ; then
14283         cat >> confdefs.h <<\EOF
14284 #define SLAPD_BDB2 1
14285 EOF
14286
14287         BUILD_SLAPD=yes
14288         BUILD_BDB2=yes
14289         if test "$ol_with_bdb2_module" != static ; then
14290                 cat >> confdefs.h <<\EOF
14291 #define SLAPD_BDB2_DYNAMIC 1
14292 EOF
14293
14294                 BUILD_BDB2=mod
14295                 BUILD_BDB2_DYNAMIC=shared
14296                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14297         fi
14298 fi
14299
14300 if test "$ol_enable_ldap" != no ; then
14301         cat >> confdefs.h <<\EOF
14302 #define SLAPD_LDAP 1
14303 EOF
14304
14305         BUILD_SLAPD=yes
14306         BUILD_LDAP=yes
14307         if test "$ol_with_ldap_module" != static ; then
14308                 cat >> confdefs.h <<\EOF
14309 #define SLAPD_LDAP_DYNAMIC 1
14310 EOF
14311
14312                 BUILD_LDAP=mod
14313                 BUILD_LDAP_DYNAMIC=shared
14314                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14315         fi
14316 fi
14317
14318 if test "$ol_link_ldbm" != no ; then
14319         cat >> confdefs.h <<\EOF
14320 #define SLAPD_LDBM 1
14321 EOF
14322
14323         BUILD_SLAPD=yes
14324         BUILD_LDBM=yes
14325         if test "$ol_with_ldbm_module" != static ; then
14326                 cat >> confdefs.h <<\EOF
14327 #define SLAPD_LDBM_DYNAMIC 1
14328 EOF
14329
14330                 BUILD_LDBM=mod
14331                 BUILD_LDBM_DYNAMIC=shared
14332                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14333         fi
14334 fi
14335
14336 if test "$ol_enable_passwd" != no ; then
14337         cat >> confdefs.h <<\EOF
14338 #define SLAPD_PASSWD 1
14339 EOF
14340
14341         BUILD_SLAPD=yes
14342         BUILD_PASSWD=yes
14343         if test "$ol_with_passwd_module" != static ; then
14344                 cat >> confdefs.h <<\EOF
14345 #define SLAPD_PASSWD_DYNAMIC 1
14346 EOF
14347
14348                 BUILD_PASSWD=mod
14349                 BUILD_PASSWD_DYNAMIC=shared
14350                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14351         fi
14352 fi
14353
14354 if test "$ol_link_perl" != no ; then
14355         cat >> confdefs.h <<\EOF
14356 #define SLAPD_PERL 1
14357 EOF
14358
14359         BUILD_SLAPD=yes
14360         BUILD_PERL=yes
14361         if test "$ol_with_perl_module" != static ; then
14362                 cat >> confdefs.h <<\EOF
14363 #define SLAPD_PERL_DYNAMIC 1
14364 EOF
14365
14366                 BUILD_PERL=mod
14367                 BUILD_PERL_DYNAMIC=shared
14368                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14369         fi
14370 fi
14371
14372 if test "$ol_enable_shell" != no ; then
14373         cat >> confdefs.h <<\EOF
14374 #define SLAPD_SHELL 1
14375 EOF
14376
14377         BUILD_SLAPD=yes
14378         BUILD_SHELL=yes
14379         if test "$ol_with_shell_module" != static ; then
14380                 cat >> confdefs.h <<\EOF
14381 #define SLAPD_SHELL_DYNAMIC 1
14382 EOF
14383
14384                 BUILD_SHELL=mod
14385                 BUILD_SHELL_DYNAMIC=shared
14386                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14387         fi
14388 fi
14389
14390 if test "$ol_enable_tcl" != no ; then
14391         cat >> confdefs.h <<\EOF
14392 #define SLAPD_TCL 1
14393 EOF
14394
14395         BUILD_SLAPD=yes
14396         BUILD_TCL=yes
14397         if test "$ol_with_tcl_module" != static; then
14398                 cat >> confdefs.h <<\EOF
14399 #define SLAPD_TCL_DYNAMIC 1
14400 EOF
14401
14402                 BUILD_TCL=mod
14403                 BUILD_TCL_DYNAMIC=shared
14404                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14405         fi
14406 fi
14407
14408 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14409         $BUILD_SLAPD = yes ; then
14410         BUILD_SLURPD=yes
14411 fi
14412
14413 if test "$ol_link_isode" != no ; then
14414         BUILD_LDAPD=yes
14415 fi
14416
14417
14418
14419
14420   
14421   
14422   
14423   
14424   
14425   
14426   
14427   
14428   
14429   
14430   
14431   
14432   
14433   
14434   
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461 trap '' 1 2 15
14462
14463 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14464
14465 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14466 # Let make expand exec_prefix.
14467 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14468
14469 # Any assignment to VPATH causes Sun make to only execute
14470 # the first set of double-colon rules, so remove it if not needed.
14471 # If there is a colon in the path, we need to keep it.
14472 if test "x$srcdir" = x.; then
14473   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14474 fi
14475
14476 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14477
14478 DEFS=-DHAVE_CONFIG_H
14479
14480 # Without the "./", some shells look in PATH for config.status.
14481 : ${CONFIG_STATUS=./config.status}
14482
14483 echo creating $CONFIG_STATUS
14484 rm -f $CONFIG_STATUS
14485 cat > $CONFIG_STATUS <<EOF
14486 #! /bin/sh
14487 # Generated automatically by configure.
14488 # Run this file to recreate the current configuration.
14489 # This directory was configured as follows,
14490 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14491 #
14492 # $0 $ac_configure_args
14493 #
14494 # Compiler output produced by configure, useful for debugging
14495 # configure, is in ./config.log if it exists.
14496
14497 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14498 for ac_option
14499 do
14500   case "\$ac_option" in
14501   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14502     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14503     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14504   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14505     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14506     exit 0 ;;
14507   -help | --help | --hel | --he | --h)
14508     echo "\$ac_cs_usage"; exit 0 ;;
14509   *) echo "\$ac_cs_usage"; exit 1 ;;
14510   esac
14511 done
14512
14513 ac_given_srcdir=$srcdir
14514 ac_given_INSTALL="$INSTALL"
14515
14516 trap 'rm -fr `echo "\
14517 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14518 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14519 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14520 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14521 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14522 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14523 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14524 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14525 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14526 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14527 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14528 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14529 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14530 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14531 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14532 include/Makefile:build/top.mk:include/Makefile.in \
14533 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14534 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14535 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14536 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14537 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14538 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14539 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14540 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14541 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14542 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14543 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14544 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14545 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14546 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14547 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14548 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14549 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14550 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14551 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14552 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14553 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14554 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14555 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14556 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14557 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14558 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14559  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14560 EOF
14561 cat >> $CONFIG_STATUS <<EOF
14562
14563 # Protect against being on the right side of a sed subst in config.status.
14564 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14565  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14566 $ac_vpsub
14567 $extrasub
14568 s%@SHELL@%$SHELL%g
14569 s%@CFLAGS@%$CFLAGS%g
14570 s%@CPPFLAGS@%$CPPFLAGS%g
14571 s%@CXXFLAGS@%$CXXFLAGS%g
14572 s%@FFLAGS@%$FFLAGS%g
14573 s%@DEFS@%$DEFS%g
14574 s%@LDFLAGS@%$LDFLAGS%g
14575 s%@LIBS@%$LIBS%g
14576 s%@exec_prefix@%$exec_prefix%g
14577 s%@prefix@%$prefix%g
14578 s%@program_transform_name@%$program_transform_name%g
14579 s%@bindir@%$bindir%g
14580 s%@sbindir@%$sbindir%g
14581 s%@libexecdir@%$libexecdir%g
14582 s%@datadir@%$datadir%g
14583 s%@sysconfdir@%$sysconfdir%g
14584 s%@sharedstatedir@%$sharedstatedir%g
14585 s%@localstatedir@%$localstatedir%g
14586 s%@libdir@%$libdir%g
14587 s%@includedir@%$includedir%g
14588 s%@oldincludedir@%$oldincludedir%g
14589 s%@infodir@%$infodir%g
14590 s%@mandir@%$mandir%g
14591 s%@host@%$host%g
14592 s%@host_alias@%$host_alias%g
14593 s%@host_cpu@%$host_cpu%g
14594 s%@host_vendor@%$host_vendor%g
14595 s%@host_os@%$host_os%g
14596 s%@target@%$target%g
14597 s%@target_alias@%$target_alias%g
14598 s%@target_cpu@%$target_cpu%g
14599 s%@target_vendor@%$target_vendor%g
14600 s%@target_os@%$target_os%g
14601 s%@build@%$build%g
14602 s%@build_alias@%$build_alias%g
14603 s%@build_cpu@%$build_cpu%g
14604 s%@build_vendor@%$build_vendor%g
14605 s%@build_os@%$build_os%g
14606 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14607 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14608 s%@INSTALL_DATA@%$INSTALL_DATA%g
14609 s%@PACKAGE@%$PACKAGE%g
14610 s%@VERSION@%$VERSION%g
14611 s%@ACLOCAL@%$ACLOCAL%g
14612 s%@AUTOCONF@%$AUTOCONF%g
14613 s%@AUTOMAKE@%$AUTOMAKE%g
14614 s%@AUTOHEADER@%$AUTOHEADER%g
14615 s%@MAKEINFO@%$MAKEINFO%g
14616 s%@install_sh@%$install_sh%g
14617 s%@AMTAR@%$AMTAR%g
14618 s%@AWK@%$AWK%g
14619 s%@AMTARFLAGS@%$AMTARFLAGS%g
14620 s%@SET_MAKE@%$SET_MAKE%g
14621 s%@top_builddir@%$top_builddir%g
14622 s%@ldap_subdir@%$ldap_subdir%g
14623 s%@CC@%$CC%g
14624 s%@RANLIB@%$RANLIB%g
14625 s%@LD@%$LD%g
14626 s%@NM@%$NM%g
14627 s%@LN_S@%$LN_S%g
14628 s%@LIBTOOL@%$LIBTOOL%g
14629 s%@LN_H@%$LN_H%g
14630 s%@SENDMAIL@%$SENDMAIL%g
14631 s%@EDITOR@%$EDITOR%g
14632 s%@FINGER@%$FINGER%g
14633 s%@PERLBIN@%$PERLBIN%g
14634 s%@CPP@%$CPP%g
14635 s%@EXEEXT@%$EXEEXT%g
14636 s%@OBJEXT@%$OBJEXT%g
14637 s%@OL_MKDEP@%$OL_MKDEP%g
14638 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14639 s%@PEPSY@%$PEPSY%g
14640 s%@LIBOBJS@%$LIBOBJS%g
14641 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14642 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14643 s%@BUILD_BDB2@%$BUILD_BDB2%g
14644 s%@BUILD_LDAP@%$BUILD_LDAP%g
14645 s%@BUILD_LDBM@%$BUILD_LDBM%g
14646 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14647 s%@BUILD_PERL@%$BUILD_PERL%g
14648 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14649 s%@BUILD_SHELL@%$BUILD_SHELL%g
14650 s%@BUILD_TCL@%$BUILD_TCL%g
14651 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14652 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14653 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14654 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14655 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14656 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14657 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14658 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14659 s%@LDAP_LIBS@%$LDAP_LIBS%g
14660 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14661 s%@LDIF_LIBS@%$LDIF_LIBS%g
14662 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14663 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14664 s%@LDBM_LIBS@%$LDBM_LIBS%g
14665 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14666 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14667 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14668 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14669 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14670 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14671 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14672 s%@KRB_LIBS@%$KRB_LIBS%g
14673 s%@READLINE_LIBS@%$READLINE_LIBS%g
14674 s%@SASL_LIBS@%$SASL_LIBS%g
14675 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14676 s%@TLS_LIBS@%$TLS_LIBS%g
14677 s%@MODULES_LIBS@%$MODULES_LIBS%g
14678
14679 CEOF
14680 EOF
14681
14682 cat >> $CONFIG_STATUS <<\EOF
14683
14684 # Split the substitutions into bite-sized pieces for seds with
14685 # small command number limits, like on Digital OSF/1 and HP-UX.
14686 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14687 ac_file=1 # Number of current file.
14688 ac_beg=1 # First line for current file.
14689 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14690 ac_more_lines=:
14691 ac_sed_cmds=""
14692 while $ac_more_lines; do
14693   if test $ac_beg -gt 1; then
14694     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14695   else
14696     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14697   fi
14698   if test ! -s conftest.s$ac_file; then
14699     ac_more_lines=false
14700     rm -f conftest.s$ac_file
14701   else
14702     if test -z "$ac_sed_cmds"; then
14703       ac_sed_cmds="sed -f conftest.s$ac_file"
14704     else
14705       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14706     fi
14707     ac_file=`expr $ac_file + 1`
14708     ac_beg=$ac_end
14709     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14710   fi
14711 done
14712 if test -z "$ac_sed_cmds"; then
14713   ac_sed_cmds=cat
14714 fi
14715 EOF
14716
14717 cat >> $CONFIG_STATUS <<EOF
14718
14719 CONFIG_FILES=\${CONFIG_FILES-"\
14720 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14721 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14722 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14723 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14724 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14725 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14726 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14727 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14728 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14729 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14730 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14731 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14732 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14733 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14734 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14735 include/Makefile:build/top.mk:include/Makefile.in \
14736 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14737 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14738 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14739 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14740 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14741 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14742 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14743 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14744 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14745 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14746 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14747 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14748 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14749 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14750 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14751 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14752 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14753 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14754 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14755 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14756 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14757 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14758 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14759 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14760 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14761 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14762 "}
14763 EOF
14764 cat >> $CONFIG_STATUS <<\EOF
14765 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14766   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14767   case "$ac_file" in
14768   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14769        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14770   *) ac_file_in="${ac_file}.in" ;;
14771   esac
14772
14773   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14774
14775   # Remove last slash and all that follows it.  Not all systems have dirname.
14776   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14777   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14778     # The file is in a subdirectory.
14779     test ! -d "$ac_dir" && mkdir "$ac_dir"
14780     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14781     # A "../" for each directory in $ac_dir_suffix.
14782     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14783   else
14784     ac_dir_suffix= ac_dots=
14785   fi
14786
14787   case "$ac_given_srcdir" in
14788   .)  srcdir=.
14789       if test -z "$ac_dots"; then top_srcdir=.
14790       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14791   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14792   *) # Relative path.
14793     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14794     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14795   esac
14796
14797   case "$ac_given_INSTALL" in
14798   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14799   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14800   esac
14801
14802   echo creating "$ac_file"
14803   rm -f "$ac_file"
14804   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14805   case "$ac_file" in
14806   *Makefile*) ac_comsub="1i\\
14807 # $configure_input" ;;
14808   *) ac_comsub= ;;
14809   esac
14810
14811   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14812   sed -e "$ac_comsub
14813 s%@configure_input@%$configure_input%g
14814 s%@srcdir@%$srcdir%g
14815 s%@top_srcdir@%$top_srcdir%g
14816 s%@INSTALL@%$INSTALL%g
14817 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14818 fi; done
14819 rm -f conftest.s*
14820
14821 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14822 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14823 #
14824 # ac_d sets the value in "#define NAME VALUE" lines.
14825 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14826 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14827 ac_dC='\3'
14828 ac_dD='%g'
14829 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14830 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14831 ac_uB='\([      ]\)%\1#\2define\3'
14832 ac_uC=' '
14833 ac_uD='\4%g'
14834 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14835 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14836 ac_eB='$%\1#\2define\3'
14837 ac_eC=' '
14838 ac_eD='%g'
14839
14840 if test "${CONFIG_HEADERS+set}" != set; then
14841 EOF
14842 cat >> $CONFIG_STATUS <<EOF
14843   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14844 EOF
14845 cat >> $CONFIG_STATUS <<\EOF
14846 fi
14847 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14848   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14849   case "$ac_file" in
14850   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14851        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14852   *) ac_file_in="${ac_file}.in" ;;
14853   esac
14854
14855   echo creating $ac_file
14856
14857   rm -f conftest.frag conftest.in conftest.out
14858   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14859   cat $ac_file_inputs > conftest.in
14860
14861 EOF
14862
14863 # Transform confdefs.h into a sed script conftest.vals that substitutes
14864 # the proper values into config.h.in to produce config.h.  And first:
14865 # Protect against being on the right side of a sed subst in config.status.
14866 # Protect against being in an unquoted here document in config.status.
14867 rm -f conftest.vals
14868 cat > conftest.hdr <<\EOF
14869 s/[\\&%]/\\&/g
14870 s%[\\$`]%\\&%g
14871 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14872 s%ac_d%ac_u%gp
14873 s%ac_u%ac_e%gp
14874 EOF
14875 sed -n -f conftest.hdr confdefs.h > conftest.vals
14876 rm -f conftest.hdr
14877
14878 # This sed command replaces #undef with comments.  This is necessary, for
14879 # example, in the case of _POSIX_SOURCE, which is predefined and required
14880 # on some systems where configure will not decide to define it.
14881 cat >> conftest.vals <<\EOF
14882 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14883 EOF
14884
14885 # Break up conftest.vals because some shells have a limit on
14886 # the size of here documents, and old seds have small limits too.
14887
14888 rm -f conftest.tail
14889 while :
14890 do
14891   ac_lines=`grep -c . conftest.vals`
14892   # grep -c gives empty output for an empty file on some AIX systems.
14893   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14894   # Write a limited-size here document to conftest.frag.
14895   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14896   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14897   echo 'CEOF
14898   sed -f conftest.frag conftest.in > conftest.out
14899   rm -f conftest.in
14900   mv conftest.out conftest.in
14901 ' >> $CONFIG_STATUS
14902   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14903   rm -f conftest.vals
14904   mv conftest.tail conftest.vals
14905 done
14906 rm -f conftest.vals
14907
14908 cat >> $CONFIG_STATUS <<\EOF
14909   rm -f conftest.frag conftest.h
14910   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14911   cat conftest.in >> conftest.h
14912   rm -f conftest.in
14913   if cmp -s $ac_file conftest.h 2>/dev/null; then
14914     echo "$ac_file is unchanged"
14915     rm -f conftest.h
14916   else
14917     # Remove last slash and all that follows it.  Not all systems have dirname.
14918       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14919       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14920       # The file is in a subdirectory.
14921       test ! -d "$ac_dir" && mkdir "$ac_dir"
14922     fi
14923     rm -f $ac_file
14924     mv conftest.h $ac_file
14925   fi
14926 fi; done
14927
14928 EOF
14929 cat >> $CONFIG_STATUS <<EOF
14930
14931 EOF
14932 cat >> $CONFIG_STATUS <<\EOF
14933
14934 date > stamp-h
14935 echo Please \"make depend\" to build dependencies
14936
14937 exit 0
14938 EOF
14939 chmod +x $CONFIG_STATUS
14940 rm -fr confdefs* $ac_clean_files
14941 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
14942