]> git.sur5r.net Git - openldap/blob - configure
5459e893601051905cfd7af4b63dcf3bb0494daa
[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 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5032 echo "configure:5033: checking for res_search" >&5
5033 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5034   echo $ac_n "(cached) $ac_c" 1>&6
5035 else
5036   cat > conftest.$ac_ext <<EOF
5037 #line 5038 "configure"
5038 #include "confdefs.h"
5039 /* System header to define __stub macros and hopefully few prototypes,
5040     which can conflict with char res_search(); below.  */
5041 #include <assert.h>
5042 /* Override any gcc2 internal prototype to avoid an error.  */
5043 /* We use char because int might match the return type of a gcc2
5044     builtin and then its argument prototype would still apply.  */
5045 char res_search();
5046 char (*f)();
5047
5048 int main() {
5049
5050 /* The GNU C library defines this for functions which it implements
5051     to always fail with ENOSYS.  Some functions are actually named
5052     something starting with __ and the normal name is an alias.  */
5053 #if defined (__stub_res_search) || defined (__stub___res_search)
5054 choke me
5055 #else
5056 f = res_search;
5057 #endif
5058
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5062   rm -rf conftest*
5063   eval "ac_cv_func_res_search=yes"
5064 else
5065   echo "configure: failed program was:" >&5
5066   cat conftest.$ac_ext >&5
5067   rm -rf conftest*
5068   eval "ac_cv_func_res_search=no"
5069 fi
5070 rm -f conftest*
5071 fi
5072
5073 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5074   echo "$ac_t""yes" 1>&6
5075   :
5076 else
5077   echo "$ac_t""no" 1>&6
5078 fi
5079
5080 if test $ac_cv_func_res_search = no ; then 
5081         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5082 echo "configure:5083: checking for res_search in -lbind" >&5
5083 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5085   echo $ac_n "(cached) $ac_c" 1>&6
5086 else
5087   ac_save_LIBS="$LIBS"
5088 LIBS="-lbind  $LIBS"
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* Override any gcc2 internal prototype to avoid an error.  */
5093 /* We use char because int might match the return type of a gcc2
5094     builtin and then its argument prototype would still apply.  */
5095 char res_search();
5096
5097 int main() {
5098 res_search()
5099 ; return 0; }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5102   rm -rf conftest*
5103   eval "ac_cv_lib_$ac_lib_var=yes"
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=no"
5109 fi
5110 rm -f conftest*
5111 LIBS="$ac_save_LIBS"
5112
5113 fi
5114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5115   echo "$ac_t""yes" 1>&6
5116     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5117     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5118   cat >> confdefs.h <<EOF
5119 #define $ac_tr_lib 1
5120 EOF
5121
5122   LIBS="-lbind $LIBS"
5123
5124 else
5125   echo "$ac_t""no" 1>&6
5126 fi
5127
5128         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5129 fi
5130
5131 if test $ac_cv_func_res_search = no ; then 
5132         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5133 echo "configure:5134: checking for __res_search in -lbind" >&5
5134 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138   ac_save_LIBS="$LIBS"
5139 LIBS="-lbind  $LIBS"
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143 /* Override any gcc2 internal prototype to avoid an error.  */
5144 /* We use char because int might match the return type of a gcc2
5145     builtin and then its argument prototype would still apply.  */
5146 char __res_search();
5147
5148 int main() {
5149 __res_search()
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=yes"
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158   rm -rf conftest*
5159   eval "ac_cv_lib_$ac_lib_var=no"
5160 fi
5161 rm -f conftest*
5162 LIBS="$ac_save_LIBS"
5163
5164 fi
5165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5166   echo "$ac_t""yes" 1>&6
5167     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5168     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5169   cat >> confdefs.h <<EOF
5170 #define $ac_tr_lib 1
5171 EOF
5172
5173   LIBS="-lbind $LIBS"
5174
5175 else
5176   echo "$ac_t""no" 1>&6
5177 fi
5178
5179         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5180 fi
5181
5182 if test $ac_cv_func_res_search = no ; then 
5183         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5184 echo "configure:5185: checking for res_search in -lresolv" >&5
5185 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5187   echo $ac_n "(cached) $ac_c" 1>&6
5188 else
5189   ac_save_LIBS="$LIBS"
5190 LIBS="-lresolv  $LIBS"
5191 cat > conftest.$ac_ext <<EOF
5192 #line 5193 "configure"
5193 #include "confdefs.h"
5194 /* Override any gcc2 internal prototype to avoid an error.  */
5195 /* We use char because int might match the return type of a gcc2
5196     builtin and then its argument prototype would still apply.  */
5197 char res_search();
5198
5199 int main() {
5200 res_search()
5201 ; return 0; }
5202 EOF
5203 if { (eval echo configure:5204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5204   rm -rf conftest*
5205   eval "ac_cv_lib_$ac_lib_var=yes"
5206 else
5207   echo "configure: failed program was:" >&5
5208   cat conftest.$ac_ext >&5
5209   rm -rf conftest*
5210   eval "ac_cv_lib_$ac_lib_var=no"
5211 fi
5212 rm -f conftest*
5213 LIBS="$ac_save_LIBS"
5214
5215 fi
5216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5217   echo "$ac_t""yes" 1>&6
5218     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5220   cat >> confdefs.h <<EOF
5221 #define $ac_tr_lib 1
5222 EOF
5223
5224   LIBS="-lresolv $LIBS"
5225
5226 else
5227   echo "$ac_t""no" 1>&6
5228 fi
5229
5230         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5231 fi
5232
5233 if test "$ac_cv_func_res_search" = yes ; then
5234         cat >> confdefs.h <<\EOF
5235 #define HAVE_RES_SEARCH 1
5236 EOF
5237
5238 elif test $ol_enable_dns = yes ; then
5239         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5240 elif test $ol_enable_dns != no ; then
5241         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5242 fi
5243
5244
5245 # ISODE tests
5246 ol_link_isode=no
5247 if test $ol_enable_ldapd != no ; then
5248         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5249
5250                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5251 echo "configure:5252: checking for main in -lxtpp" >&5
5252 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5254   echo $ac_n "(cached) $ac_c" 1>&6
5255 else
5256   ac_save_LIBS="$LIBS"
5257 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5258 cat > conftest.$ac_ext <<EOF
5259 #line 5260 "configure"
5260 #include "confdefs.h"
5261
5262 int main() {
5263 main()
5264 ; return 0; }
5265 EOF
5266 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5267   rm -rf conftest*
5268   eval "ac_cv_lib_$ac_lib_var=yes"
5269 else
5270   echo "configure: failed program was:" >&5
5271   cat conftest.$ac_ext >&5
5272   rm -rf conftest*
5273   eval "ac_cv_lib_$ac_lib_var=no"
5274 fi
5275 rm -f conftest*
5276 LIBS="$ac_save_LIBS"
5277
5278 fi
5279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5280   echo "$ac_t""yes" 1>&6
5281   
5282                 ol_link_isode=yes
5283                 cat >> confdefs.h <<\EOF
5284 #define HAVE_XTPP 1
5285 EOF
5286
5287                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5288                 
5289 else
5290   echo "$ac_t""no" 1>&6
5291 :
5292 fi
5293
5294         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5295 echo "configure:5296: checking for main in -ldsap" >&5
5296 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5298   echo $ac_n "(cached) $ac_c" 1>&6
5299 else
5300   ac_save_LIBS="$LIBS"
5301 LIBS="-ldsap -lisode $LIBS"
5302 cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305
5306 int main() {
5307 main()
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=no"
5318 fi
5319 rm -f conftest*
5320 LIBS="$ac_save_LIBS"
5321
5322 fi
5323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325   
5326                 ol_link_isode=yes
5327                 cat >> confdefs.h <<\EOF
5328 #define HAVE_DSAP 1
5329 EOF
5330
5331                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5332                 
5333 else
5334   echo "$ac_t""no" 1>&6
5335 :
5336 fi
5337
5338         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5339 echo "configure:5340: checking for main in -lisode" >&5
5340 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5341 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5342   echo $ac_n "(cached) $ac_c" 1>&6
5343 else
5344   ac_save_LIBS="$LIBS"
5345 LIBS="-lisode  $LIBS"
5346 cat > conftest.$ac_ext <<EOF
5347 #line 5348 "configure"
5348 #include "confdefs.h"
5349
5350 int main() {
5351 main()
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   eval "ac_cv_lib_$ac_lib_var=yes"
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_lib_$ac_lib_var=no"
5362 fi
5363 rm -f conftest*
5364 LIBS="$ac_save_LIBS"
5365
5366 fi
5367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5368   echo "$ac_t""yes" 1>&6
5369   
5370                 ol_link_isode=yes
5371                 cat >> confdefs.h <<\EOF
5372 #define HAVE_ISODE 1
5373 EOF
5374
5375                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5376                 
5377 else
5378   echo "$ac_t""no" 1>&6
5379 :
5380 fi
5381
5382 fi
5383
5384 if test $ol_link_isode != no; then
5385         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5386 echo "configure:5387: checking for main in -lpp" >&5
5387 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5388 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5389   echo $ac_n "(cached) $ac_c" 1>&6
5390 else
5391   ac_save_LIBS="$LIBS"
5392 LIBS="-lpp  $LIBS"
5393 cat > conftest.$ac_ext <<EOF
5394 #line 5395 "configure"
5395 #include "confdefs.h"
5396
5397 int main() {
5398 main()
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5402   rm -rf conftest*
5403   eval "ac_cv_lib_$ac_lib_var=yes"
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=no"
5409 fi
5410 rm -f conftest*
5411 LIBS="$ac_save_LIBS"
5412
5413 fi
5414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5415   echo "$ac_t""yes" 1>&6
5416   
5417                 cat >> confdefs.h <<\EOF
5418 #define HAVE_PP 1
5419 EOF
5420
5421                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5422                 
5423 else
5424   echo "$ac_t""no" 1>&6
5425 :
5426 fi
5427
5428
5429         # Extract the first word of "pepsy", so it can be a program name with args.
5430 set dummy pepsy; ac_word=$2
5431 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5432 echo "configure:5433: checking for $ac_word" >&5
5433 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   case "$PEPSY" in
5437   /*)
5438   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5439   ;;
5440   ?:/*)                  
5441   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5442   ;;
5443   *)
5444   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5445   ac_dummy="$PATH"
5446   for ac_dir in $ac_dummy; do 
5447     test -z "$ac_dir" && ac_dir=.
5448     if test -f $ac_dir/$ac_word; then
5449       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5450       break
5451     fi
5452   done
5453   IFS="$ac_save_ifs"
5454   ;;
5455 esac
5456 fi
5457 PEPSY="$ac_cv_path_PEPSY"
5458 if test -n "$PEPSY"; then
5459   echo "$ac_t""$PEPSY" 1>&6
5460 else
5461   echo "$ac_t""no" 1>&6
5462 fi
5463
5464 fi
5465
5466 if test $ol_enable_quipu != no ; then
5467         for ac_hdr in quipu/commonarg.h
5468 do
5469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5471 echo "configure:5472: checking for $ac_hdr" >&5
5472 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5473   echo $ac_n "(cached) $ac_c" 1>&6
5474 else
5475   cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5478 #include <$ac_hdr>
5479 EOF
5480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5481 { (eval echo configure:5482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5483 if test -z "$ac_err"; then
5484   rm -rf conftest*
5485   eval "ac_cv_header_$ac_safe=yes"
5486 else
5487   echo "$ac_err" >&5
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_header_$ac_safe=no"
5492 fi
5493 rm -f conftest*
5494 fi
5495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5496   echo "$ac_t""yes" 1>&6
5497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5498   cat >> confdefs.h <<EOF
5499 #define $ac_tr_hdr 1
5500 EOF
5501  
5502 else
5503   echo "$ac_t""no" 1>&6
5504 fi
5505 done
5506
5507
5508         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5509                 BUILD_QUIPU=yes
5510         elif test $ol_enable_quipu = auto ; then
5511                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5512         else
5513                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5514         fi
5515 fi
5516
5517 ol_link_kerberos=no
5518
5519 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5520         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5521 do
5522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5524 echo "configure:5525: checking for $ac_hdr" >&5
5525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5526   echo $ac_n "(cached) $ac_c" 1>&6
5527 else
5528   cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531 #include <$ac_hdr>
5532 EOF
5533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5534 { (eval echo configure:5535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5536 if test -z "$ac_err"; then
5537   rm -rf conftest*
5538   eval "ac_cv_header_$ac_safe=yes"
5539 else
5540   echo "$ac_err" >&5
5541   echo "configure: failed program was:" >&5
5542   cat conftest.$ac_ext >&5
5543   rm -rf conftest*
5544   eval "ac_cv_header_$ac_safe=no"
5545 fi
5546 rm -f conftest*
5547 fi
5548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5549   echo "$ac_t""yes" 1>&6
5550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5551   cat >> confdefs.h <<EOF
5552 #define $ac_tr_hdr 1
5553 EOF
5554  
5555 else
5556   echo "$ac_t""no" 1>&6
5557 fi
5558 done
5559
5560
5561         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5562                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5563 echo "configure:5564: checking for main in -lkrb4" >&5
5564 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5566   echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568   ac_save_LIBS="$LIBS"
5569 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5570 cat > conftest.$ac_ext <<EOF
5571 #line 5572 "configure"
5572 #include "confdefs.h"
5573
5574 int main() {
5575 main()
5576 ; return 0; }
5577 EOF
5578 if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5579   rm -rf conftest*
5580   eval "ac_cv_lib_$ac_lib_var=yes"
5581 else
5582   echo "configure: failed program was:" >&5
5583   cat conftest.$ac_ext >&5
5584   rm -rf conftest*
5585   eval "ac_cv_lib_$ac_lib_var=no"
5586 fi
5587 rm -f conftest*
5588 LIBS="$ac_save_LIBS"
5589
5590 fi
5591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5592   echo "$ac_t""yes" 1>&6
5593   have_k5=yes
5594 else
5595   echo "$ac_t""no" 1>&6
5596 have_k5=no
5597 fi
5598
5599
5600                 if test $have_k5 = yes ; then
5601                         ol_with_kerberos=found
5602                         ol_link_kerberos=yes
5603
5604                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5605
5606                         LIBS="$KRB_LIBS $LIBS"
5607
5608                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5609 echo "configure:5610: checking for des_debug in Kerberos libraries" >&5
5610 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5611   echo $ac_n "(cached) $ac_c" 1>&6
5612 else
5613   
5614                                                                 save_LIBS="$LIBS"
5615                                 LIBS="$KRB_LIBS $LIBS"
5616                                 cat > conftest.$ac_ext <<EOF
5617 #line 5618 "configure"
5618 #include "confdefs.h"
5619
5620 #include <kerberosIV/krb.h>
5621 #include <kerberosIV/des.h>
5622 extern int des_debug;
5623
5624 int main() {
5625
5626 des_debug = 1;
5627
5628 ; return 0; }
5629 EOF
5630 if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5631   rm -rf conftest*
5632   ol_cv_var_des_debug=yes
5633 else
5634   echo "configure: failed program was:" >&5
5635   cat conftest.$ac_ext >&5
5636   rm -rf conftest*
5637   ol_cv_var_des_debug=no
5638 fi
5639 rm -f conftest*
5640                                                                 LIBS="$save_LIBS"
5641                         
5642 fi
5643
5644 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5645
5646                         if test $ol_cv_var_des_debug = yes ; then
5647                                 cat >> confdefs.h <<\EOF
5648 #define HAVE_DES_DEBUG 1
5649 EOF
5650
5651                         fi
5652
5653                         LIBS="$save_LIBS"
5654                 fi
5655         fi
5656 fi
5657
5658 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5659         for ac_hdr in krb.h des.h
5660 do
5661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5663 echo "configure:5664: checking for $ac_hdr" >&5
5664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5665   echo $ac_n "(cached) $ac_c" 1>&6
5666 else
5667   cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5670 #include <$ac_hdr>
5671 EOF
5672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5673 { (eval echo configure:5674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5675 if test -z "$ac_err"; then
5676   rm -rf conftest*
5677   eval "ac_cv_header_$ac_safe=yes"
5678 else
5679   echo "$ac_err" >&5
5680   echo "configure: failed program was:" >&5
5681   cat conftest.$ac_ext >&5
5682   rm -rf conftest*
5683   eval "ac_cv_header_$ac_safe=no"
5684 fi
5685 rm -f conftest*
5686 fi
5687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5688   echo "$ac_t""yes" 1>&6
5689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5690   cat >> confdefs.h <<EOF
5691 #define $ac_tr_hdr 1
5692 EOF
5693  
5694 else
5695   echo "$ac_t""no" 1>&6
5696 fi
5697 done
5698
5699
5700         if test $ac_cv_header_krb_h = yes ; then
5701                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5702 echo "configure:5703: checking for main in -lkrb" >&5
5703 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5705   echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707   ac_save_LIBS="$LIBS"
5708 LIBS="-lkrb -ldes $LIBS"
5709 cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712
5713 int main() {
5714 main()
5715 ; return 0; }
5716 EOF
5717 if { (eval echo configure:5718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=yes"
5720 else
5721   echo "configure: failed program was:" >&5
5722   cat conftest.$ac_ext >&5
5723   rm -rf conftest*
5724   eval "ac_cv_lib_$ac_lib_var=no"
5725 fi
5726 rm -f conftest*
5727 LIBS="$ac_save_LIBS"
5728
5729 fi
5730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5731   echo "$ac_t""yes" 1>&6
5732   have_k4=yes
5733 else
5734   echo "$ac_t""no" 1>&6
5735 have_k4=no
5736 fi
5737
5738
5739                 if test $have_k4 = yes ; then
5740                         ol_with_kerberos=found
5741                         ol_link_kerberos=yes
5742
5743                         KRB_LIBS="-lkrb -ldes"
5744                 fi
5745         fi
5746 fi
5747
5748 if test $ol_link_kerberos = yes ; then
5749         cat >> confdefs.h <<\EOF
5750 #define HAVE_KERBEROS 1
5751 EOF
5752
5753 fi
5754
5755 ol_link_tls=no
5756 if test $ol_with_tls != no ; then
5757         
5758         for ac_hdr in openssl/ssl.h ssl.h
5759 do
5760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5762 echo "configure:5763: checking for $ac_hdr" >&5
5763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5764   echo $ac_n "(cached) $ac_c" 1>&6
5765 else
5766   cat > conftest.$ac_ext <<EOF
5767 #line 5768 "configure"
5768 #include "confdefs.h"
5769 #include <$ac_hdr>
5770 EOF
5771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5772 { (eval echo configure:5773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5774 if test -z "$ac_err"; then
5775   rm -rf conftest*
5776   eval "ac_cv_header_$ac_safe=yes"
5777 else
5778   echo "$ac_err" >&5
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_header_$ac_safe=no"
5783 fi
5784 rm -f conftest*
5785 fi
5786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5787   echo "$ac_t""yes" 1>&6
5788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5789   cat >> confdefs.h <<EOF
5790 #define $ac_tr_hdr 1
5791 EOF
5792  
5793 else
5794   echo "$ac_t""no" 1>&6
5795 fi
5796 done
5797
5798         
5799         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5800                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5801 echo "configure:5802: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5802 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   ac_save_LIBS="$LIBS"
5807 LIBS="-lssl -lcrypto $LIBS"
5808 cat > conftest.$ac_ext <<EOF
5809 #line 5810 "configure"
5810 #include "confdefs.h"
5811 /* Override any gcc2 internal prototype to avoid an error.  */
5812 /* We use char because int might match the return type of a gcc2
5813     builtin and then its argument prototype would still apply.  */
5814 char SSLeay_add_ssl_algorithms();
5815
5816 int main() {
5817 SSLeay_add_ssl_algorithms()
5818 ; return 0; }
5819 EOF
5820 if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821   rm -rf conftest*
5822   eval "ac_cv_lib_$ac_lib_var=yes"
5823 else
5824   echo "configure: failed program was:" >&5
5825   cat conftest.$ac_ext >&5
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=no"
5828 fi
5829 rm -f conftest*
5830 LIBS="$ac_save_LIBS"
5831
5832 fi
5833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5834   echo "$ac_t""yes" 1>&6
5835   have_ssleay=yes
5836                         need_rsaref=no
5837 else
5838   echo "$ac_t""no" 1>&6
5839 have_ssleay=no
5840 fi
5841
5842                         
5843                 if test $have_ssleay = no ; then
5844                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5845 echo "configure:5846: checking for SSL_library_init in -lssl" >&5
5846 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   ac_save_LIBS="$LIBS"
5851 LIBS="-lssl -lcrypto $LIBS"
5852 cat > conftest.$ac_ext <<EOF
5853 #line 5854 "configure"
5854 #include "confdefs.h"
5855 /* Override any gcc2 internal prototype to avoid an error.  */
5856 /* We use char because int might match the return type of a gcc2
5857     builtin and then its argument prototype would still apply.  */
5858 char SSL_library_init();
5859
5860 int main() {
5861 SSL_library_init()
5862 ; return 0; }
5863 EOF
5864 if { (eval echo configure:5865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5865   rm -rf conftest*
5866   eval "ac_cv_lib_$ac_lib_var=yes"
5867 else
5868   echo "configure: failed program was:" >&5
5869   cat conftest.$ac_ext >&5
5870   rm -rf conftest*
5871   eval "ac_cv_lib_$ac_lib_var=no"
5872 fi
5873 rm -f conftest*
5874 LIBS="$ac_save_LIBS"
5875
5876 fi
5877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5878   echo "$ac_t""yes" 1>&6
5879   have_ssleay=yes
5880                                 need_rsaref=no
5881 else
5882   echo "$ac_t""no" 1>&6
5883 have_ssleay=no
5884 fi
5885
5886                 fi
5887
5888                 if test $have_ssleay = no ; then
5889                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5890 echo "configure:5891: checking for ssl3_accept in -lssl" >&5
5891 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5892 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5893   echo $ac_n "(cached) $ac_c" 1>&6
5894 else
5895   ac_save_LIBS="$LIBS"
5896 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5897 cat > conftest.$ac_ext <<EOF
5898 #line 5899 "configure"
5899 #include "confdefs.h"
5900 /* Override any gcc2 internal prototype to avoid an error.  */
5901 /* We use char because int might match the return type of a gcc2
5902     builtin and then its argument prototype would still apply.  */
5903 char ssl3_accept();
5904
5905 int main() {
5906 ssl3_accept()
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_lib_$ac_lib_var=no"
5917 fi
5918 rm -f conftest*
5919 LIBS="$ac_save_LIBS"
5920
5921 fi
5922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5923   echo "$ac_t""yes" 1>&6
5924   have_ssleay=yes
5925                                 need_rsaref=yes
5926 else
5927   echo "$ac_t""no" 1>&6
5928 have_ssleay=no
5929 fi
5930
5931                 fi
5932
5933                 if test $have_ssleay = yes ; then
5934                         ol_with_tls=found
5935                         ol_link_tls=yes
5936
5937                         cat >> confdefs.h <<\EOF
5938 #define HAVE_SSLEAY 1
5939 EOF
5940
5941
5942                         if test $need_rsaref = yes; then
5943                                 cat >> confdefs.h <<\EOF
5944 #define HAVE_RSAREF 1
5945 EOF
5946
5947
5948                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5949                         else
5950                                 TLS_LIBS="-lssl -lcrypto"
5951                         fi
5952                 fi
5953         fi
5954 fi
5955
5956 if test $ol_link_tls = yes ; then
5957         cat >> confdefs.h <<\EOF
5958 #define HAVE_TLS 1
5959 EOF
5960
5961 fi      
5962
5963 for ac_func in \
5964         ctime_r                 \
5965         gethostbyname_r gethostbyaddr_r \
5966
5967 do
5968 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5969 echo "configure:5970: checking for $ac_func" >&5
5970 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5971   echo $ac_n "(cached) $ac_c" 1>&6
5972 else
5973   cat > conftest.$ac_ext <<EOF
5974 #line 5975 "configure"
5975 #include "confdefs.h"
5976 /* System header to define __stub macros and hopefully few prototypes,
5977     which can conflict with char $ac_func(); below.  */
5978 #include <assert.h>
5979 /* Override any gcc2 internal prototype to avoid an error.  */
5980 /* We use char because int might match the return type of a gcc2
5981     builtin and then its argument prototype would still apply.  */
5982 char $ac_func();
5983 char (*f)();
5984
5985 int main() {
5986
5987 /* The GNU C library defines this for functions which it implements
5988     to always fail with ENOSYS.  Some functions are actually named
5989     something starting with __ and the normal name is an alias.  */
5990 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5991 choke me
5992 #else
5993 f = $ac_func;
5994 #endif
5995
5996 ; return 0; }
5997 EOF
5998 if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5999   rm -rf conftest*
6000   eval "ac_cv_func_$ac_func=yes"
6001 else
6002   echo "configure: failed program was:" >&5
6003   cat conftest.$ac_ext >&5
6004   rm -rf conftest*
6005   eval "ac_cv_func_$ac_func=no"
6006 fi
6007 rm -f conftest*
6008 fi
6009
6010 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6011   echo "$ac_t""yes" 1>&6
6012     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6013   cat >> confdefs.h <<EOF
6014 #define $ac_tr_func 1
6015 EOF
6016  
6017 else
6018   echo "$ac_t""no" 1>&6
6019 fi
6020 done
6021
6022
6023 if test "$ac_cv_func_ctime_r" = no ; then
6024         ol_cv_func_ctime_r_nargs=0
6025 else
6026         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6027 echo "configure:6028: checking number of arguments of ctime_r" >&5
6028 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6029   echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031   cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 #include <time.h>
6035 int main() {
6036 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6037 ; return 0; }
6038 EOF
6039 if { (eval echo configure:6040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6040   rm -rf conftest*
6041   ol_cv_func_ctime_r_nargs=3
6042 else
6043   echo "configure: failed program was:" >&5
6044   cat conftest.$ac_ext >&5
6045   rm -rf conftest*
6046   cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 #include <time.h>
6050 int main() {
6051 time_t ti; char *buffer; ctime_r(&ti,buffer);
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6055   rm -rf conftest*
6056   ol_cv_func_ctime_r_nargs=2
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   ol_cv_func_ctime_r_nargs=0
6062 fi
6063 rm -f conftest*
6064 fi
6065 rm -f conftest*
6066 fi
6067
6068 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6069   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6070     cat >> confdefs.h <<EOF
6071 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6072 EOF
6073
6074   fi
6075
6076 fi
6077
6078 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6079         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6080 echo "configure:6081: checking number of arguments of gethostbyname_r" >&5
6081 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6082   echo $ac_n "(cached) $ac_c" 1>&6
6083 else
6084   cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 #include <sys/types.h>
6088 #include <sys/socket.h>
6089 #include <netinet/in.h>
6090 #include <netdb.h>
6091 #define BUFSIZE (sizeof(struct hostent)+10)
6092 int main() {
6093 struct hostent hent; char buffer[BUFSIZE];
6094                 int bufsize=BUFSIZE;int h_errno;
6095                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6096                         buffer, bufsize, &h_errno);
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6100   rm -rf conftest*
6101   ol_cv_func_gethostbyname_r_nargs=5
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105   rm -rf conftest*
6106   cat > conftest.$ac_ext <<EOF
6107 #line 6108 "configure"
6108 #include "confdefs.h"
6109 #include <sys/types.h>
6110 #include <sys/socket.h>
6111 #include <netinet/in.h>
6112 #include <netdb.h>
6113 #define BUFSIZE (sizeof(struct hostent)+10)
6114 int main() {
6115 struct hostent hent;struct hostent *rhent;
6116                         char buffer[BUFSIZE];
6117                         int bufsize=BUFSIZE;int h_errno;
6118                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6119                                 &rhent, &h_errno);
6120 ; return 0; }
6121 EOF
6122 if { (eval echo configure:6123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6123   rm -rf conftest*
6124   ol_cv_func_gethostbyname_r_nargs=6
6125 else
6126   echo "configure: failed program was:" >&5
6127   cat conftest.$ac_ext >&5
6128   rm -rf conftest*
6129   ol_cv_func_gethostbyname_r_nargs=0
6130 fi
6131 rm -f conftest*
6132 fi
6133 rm -f conftest*
6134 fi
6135
6136 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6137   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6138         cat >> confdefs.h <<EOF
6139 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6140 EOF
6141
6142   fi
6143
6144 else
6145         ol_cv_func_gethostbyname_r_nargs=0
6146 fi
6147  
6148 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6149         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6150 echo "configure:6151: checking number of arguments of gethostbyaddr_r" >&5
6151 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6152   echo $ac_n "(cached) $ac_c" 1>&6
6153 else
6154   cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 #include <sys/types.h>
6158 #include <sys/socket.h>
6159 #include <netinet/in.h>
6160 #include <netdb.h>
6161 #define BUFSIZE (sizeof(struct hostent)+10)
6162 int main() {
6163 struct hostent hent; char buffer[BUFSIZE]; 
6164             struct in_addr add;
6165             size_t alen=sizeof(struct in_addr);
6166             int bufsize=BUFSIZE;int h_errno;
6167                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6168                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6169 ; return 0; }
6170 EOF
6171 if { (eval echo configure:6172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6172   rm -rf conftest*
6173   ol_cv_func_gethostbyaddr_r_nargs=7
6174 else
6175   echo "configure: failed program was:" >&5
6176   cat conftest.$ac_ext >&5
6177   rm -rf conftest*
6178   cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181 #include <sys/types.h>
6182 #include <sys/socket.h>
6183 #include <netinet/in.h>
6184 #include <netdb.h>
6185 #define BUFSIZE (sizeof(struct hostent)+10)
6186 int main() {
6187 struct hostent hent;
6188                         struct hostent *rhent; char buffer[BUFSIZE]; 
6189                         struct in_addr add;
6190                         size_t alen=sizeof(struct in_addr);
6191                         int bufsize=BUFSIZE;int h_errno;
6192                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6193                                 alen, AF_INET, &hent, buffer, bufsize, 
6194                                 &rhent, &h_errno);
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6198   rm -rf conftest*
6199   ol_cv_func_gethostbyaddr_r_nargs=8
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   ol_cv_func_gethostbyaddr_r_nargs=0
6205 fi
6206 rm -f conftest*
6207 fi
6208 rm -f conftest*
6209 fi
6210
6211 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6212   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6213     cat >> confdefs.h <<EOF
6214 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6215 EOF
6216
6217   fi
6218
6219 else
6220         ol_cv_func_gethostbyaddr_r_nargs=0
6221 fi
6222
6223 if test "$ac_cv_func_ctime_r" = yes \
6224         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6225         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6226         -a "$ac_cv_func_gethostbyname_r" = yes \
6227         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6228         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6229         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6230         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6231         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6232         ; then
6233  
6234         cat >> confdefs.h <<\EOF
6235 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6236 EOF
6237
6238 fi
6239
6240 ol_link_threads=no
6241 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6242         -o $ol_with_threads = posix ; then
6243
6244         for ac_hdr in pthread.h sched.h
6245 do
6246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6248 echo "configure:6249: checking for $ac_hdr" >&5
6249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6250   echo $ac_n "(cached) $ac_c" 1>&6
6251 else
6252   cat > conftest.$ac_ext <<EOF
6253 #line 6254 "configure"
6254 #include "confdefs.h"
6255 #include <$ac_hdr>
6256 EOF
6257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6258 { (eval echo configure:6259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6260 if test -z "$ac_err"; then
6261   rm -rf conftest*
6262   eval "ac_cv_header_$ac_safe=yes"
6263 else
6264   echo "$ac_err" >&5
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   eval "ac_cv_header_$ac_safe=no"
6269 fi
6270 rm -f conftest*
6271 fi
6272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6273   echo "$ac_t""yes" 1>&6
6274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6275   cat >> confdefs.h <<EOF
6276 #define $ac_tr_hdr 1
6277 EOF
6278  
6279 else
6280   echo "$ac_t""no" 1>&6
6281 fi
6282 done
6283
6284
6285         if test $ac_cv_header_pthread_h = yes ; then
6286                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6287 echo "configure:6288: checking POSIX thread version" >&5
6288 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6289   echo $ac_n "(cached) $ac_c" 1>&6
6290 else
6291   
6292         cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295
6296 #               include <pthread.h>
6297                 /* this check could be improved */
6298 #               ifdef PTHREAD_ONCE_INIT
6299                         pthread_version_final
6300 #               endif
6301         
6302 EOF
6303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6304   egrep "pthread_version_final" >/dev/null 2>&1; then
6305   rm -rf conftest*
6306   ol_pthread_final=yes
6307 else
6308   rm -rf conftest*
6309   ol_pthread_final=no
6310 fi
6311 rm -f conftest*
6312
6313
6314         cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317
6318 #               include <pthread.h>
6319                 /* this check could be improved */
6320 #               ifdef pthread_once_init
6321                         pthread_version_draft4
6322 #               endif
6323         
6324 EOF
6325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6326   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6327   rm -rf conftest*
6328   ol_pthread_draft4=yes
6329 else
6330   rm -rf conftest*
6331   ol_pthread_draft4=no
6332 fi
6333 rm -f conftest*
6334
6335
6336         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6337                 ol_cv_pthread_version=final
6338         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6339                 ol_cv_pthread_version=draft4
6340         else
6341                 ol_cv_pthread_version=unknown
6342         fi
6343
6344 fi
6345
6346 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6347
6348
6349                 if test $ol_cv_pthread_version = final ; then
6350                         cat >> confdefs.h <<\EOF
6351 #define HAVE_PTHREADS_FINAL 1
6352 EOF
6353
6354                 elif test $ol_cv_pthread_version = draft4 ; then
6355                         cat >> confdefs.h <<\EOF
6356 #define HAVE_PTHREADS_D4 1
6357 EOF
6358
6359                 else
6360                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6361                 fi
6362
6363                 # consider threads found
6364                 ol_with_threads=found
6365
6366                 
6367         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6368 echo "configure:6369: checking for LinuxThreads pthread.h" >&5
6369 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6370   echo $ac_n "(cached) $ac_c" 1>&6
6371 else
6372   cat > conftest.$ac_ext <<EOF
6373 #line 6374 "configure"
6374 #include "confdefs.h"
6375 #include <pthread.h>
6376 EOF
6377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6378   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6379   rm -rf conftest*
6380   ol_cv_header_linux_threads=yes
6381 else
6382   rm -rf conftest*
6383   ol_cv_header_linux_threads=no
6384 fi
6385 rm -f conftest*
6386
6387                 
6388 fi
6389
6390 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6391         if test $ol_cv_header_linux_threads = yes; then
6392                 cat >> confdefs.h <<\EOF
6393 #define HAVE_LINUX_THREADS 1
6394 EOF
6395
6396         fi
6397
6398
6399                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6400                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6401 echo "configure:6402: checking for pthread_create in default libraries" >&5
6402 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6403   echo $ac_n "(cached) $ac_c" 1>&6
6404 else
6405   
6406                 if test "$cross_compiling" = yes; then
6407   cat > conftest.$ac_ext <<EOF
6408 #line 6409 "configure"
6409 #include "confdefs.h"
6410 /* pthread test headers */
6411 #include <pthread.h>
6412 #ifndef NULL
6413 #define NULL (void*)0
6414 #endif
6415
6416 static void *task(p)
6417         void *p;
6418 {
6419         return (void *) (p == NULL);
6420 }
6421
6422 int main() {
6423
6424         /* pthread test function */
6425         pthread_t t;
6426         int status;
6427
6428         /* make sure pthread_create() isn't just a stub */
6429 #if HAVE_PTHREADS_D4
6430         status = pthread_create(&t, pthread_attr_default, task, NULL);
6431 #else
6432         status = pthread_create(&t, NULL, task, NULL);
6433 #endif
6434
6435         if( status ) exit( status );
6436
6437         /* make sure pthread_detach() isn't just a stub */
6438 #if HAVE_PTHREADS_D4
6439         status = pthread_detach( &t );
6440 #else
6441         status = pthread_detach( t );
6442 #endif
6443
6444 #ifdef HAVE_LINUX_THREADS
6445         pthread_kill_other_threads_np();
6446 #endif
6447
6448         exit( status );
6449
6450 ; return 0; }
6451 EOF
6452 if { (eval echo configure:6453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6453   rm -rf conftest*
6454   ol_cv_pthread_create=yes
6455 else
6456   echo "configure: failed program was:" >&5
6457   cat conftest.$ac_ext >&5
6458   rm -rf conftest*
6459   ol_cv_pthread_create=no
6460 fi
6461 rm -f conftest*
6462 else
6463   cat > conftest.$ac_ext <<EOF
6464 #line 6465 "configure"
6465 #include "confdefs.h"
6466 /* pthread test headers */
6467 #include <pthread.h>
6468 #ifndef NULL
6469 #define NULL (void*)0
6470 #endif
6471
6472 static void *task(p)
6473         void *p;
6474 {
6475         return (void *) (p == NULL);
6476 }
6477
6478
6479 int main(argc, argv)
6480         int argc;
6481         char **argv;
6482 {
6483
6484         /* pthread test function */
6485         pthread_t t;
6486         int status;
6487
6488         /* make sure pthread_create() isn't just a stub */
6489 #if HAVE_PTHREADS_D4
6490         status = pthread_create(&t, pthread_attr_default, task, NULL);
6491 #else
6492         status = pthread_create(&t, NULL, task, NULL);
6493 #endif
6494
6495         if( status ) exit( status );
6496
6497         /* make sure pthread_detach() isn't just a stub */
6498 #if HAVE_PTHREADS_D4
6499         status = pthread_detach( &t );
6500 #else
6501         status = pthread_detach( t );
6502 #endif
6503
6504 #ifdef HAVE_LINUX_THREADS
6505         pthread_kill_other_threads_np();
6506 #endif
6507
6508         exit( status );
6509
6510 }
6511
6512 EOF
6513 if { (eval echo configure:6514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6514 then
6515   ol_cv_pthread_create=yes
6516 else
6517   echo "configure: failed program was:" >&5
6518   cat conftest.$ac_ext >&5
6519   rm -fr conftest*
6520   ol_cv_pthread_create=no
6521 fi
6522 rm -fr conftest*
6523 fi
6524
6525 fi
6526
6527 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6528
6529                 if test $ol_cv_pthread_create != no ; then
6530                         ol_link_threads=posix
6531                         ol_link_pthreads=""
6532                 fi
6533                 
6534                 # Pthread try link: -mt (ol_cv_pthread_mt)
6535 if test "$ol_link_threads" = no ; then
6536         # try -mt
6537         echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6538 echo "configure:6539: checking for pthread link with -mt" >&5
6539 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   
6543                 # save the flags
6544                 ol_LIBS="$LIBS"
6545                 LIBS="-mt $LIBS"
6546
6547                 if test "$cross_compiling" = yes; then
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 /* pthread test headers */
6552 #include <pthread.h>
6553 #ifndef NULL
6554 #define NULL (void*)0
6555 #endif
6556
6557 static void *task(p)
6558         void *p;
6559 {
6560         return (void *) (p == NULL);
6561 }
6562
6563 int main() {
6564
6565         /* pthread test function */
6566         pthread_t t;
6567         int status;
6568
6569         /* make sure pthread_create() isn't just a stub */
6570 #if HAVE_PTHREADS_D4
6571         status = pthread_create(&t, pthread_attr_default, task, NULL);
6572 #else
6573         status = pthread_create(&t, NULL, task, NULL);
6574 #endif
6575
6576         if( status ) exit( status );
6577
6578         /* make sure pthread_detach() isn't just a stub */
6579 #if HAVE_PTHREADS_D4
6580         status = pthread_detach( &t );
6581 #else
6582         status = pthread_detach( t );
6583 #endif
6584
6585 #ifdef HAVE_LINUX_THREADS
6586         pthread_kill_other_threads_np();
6587 #endif
6588
6589         exit( status );
6590
6591 ; return 0; }
6592 EOF
6593 if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6594   rm -rf conftest*
6595   ol_cv_pthread_mt=yes
6596 else
6597   echo "configure: failed program was:" >&5
6598   cat conftest.$ac_ext >&5
6599   rm -rf conftest*
6600   ol_cv_pthread_mt=no
6601 fi
6602 rm -f conftest*
6603 else
6604   cat > conftest.$ac_ext <<EOF
6605 #line 6606 "configure"
6606 #include "confdefs.h"
6607 /* pthread test headers */
6608 #include <pthread.h>
6609 #ifndef NULL
6610 #define NULL (void*)0
6611 #endif
6612
6613 static void *task(p)
6614         void *p;
6615 {
6616         return (void *) (p == NULL);
6617 }
6618
6619
6620 int main(argc, argv)
6621         int argc;
6622         char **argv;
6623 {
6624
6625         /* pthread test function */
6626         pthread_t t;
6627         int status;
6628
6629         /* make sure pthread_create() isn't just a stub */
6630 #if HAVE_PTHREADS_D4
6631         status = pthread_create(&t, pthread_attr_default, task, NULL);
6632 #else
6633         status = pthread_create(&t, NULL, task, NULL);
6634 #endif
6635
6636         if( status ) exit( status );
6637
6638         /* make sure pthread_detach() isn't just a stub */
6639 #if HAVE_PTHREADS_D4
6640         status = pthread_detach( &t );
6641 #else
6642         status = pthread_detach( t );
6643 #endif
6644
6645 #ifdef HAVE_LINUX_THREADS
6646         pthread_kill_other_threads_np();
6647 #endif
6648
6649         exit( status );
6650
6651 }
6652
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6655 then
6656   ol_cv_pthread_mt=yes
6657 else
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -fr conftest*
6661   ol_cv_pthread_mt=no
6662 fi
6663 rm -fr conftest*
6664 fi
6665
6666
6667                 # restore the LIBS
6668                 LIBS="$ol_LIBS"
6669         
6670 fi
6671
6672 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6673
6674         if test $ol_cv_pthread_mt = yes ; then
6675                 ol_link_pthreads="-mt"
6676                 ol_link_threads=posix
6677         fi
6678 fi
6679
6680                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6681 if test "$ol_link_threads" = no ; then
6682         # try -kthread
6683         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6684 echo "configure:6685: checking for pthread link with -kthread" >&5
6685 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6686   echo $ac_n "(cached) $ac_c" 1>&6
6687 else
6688   
6689                 # save the flags
6690                 ol_LIBS="$LIBS"
6691                 LIBS="-kthread $LIBS"
6692
6693                 if test "$cross_compiling" = yes; then
6694   cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 /* pthread test headers */
6698 #include <pthread.h>
6699 #ifndef NULL
6700 #define NULL (void*)0
6701 #endif
6702
6703 static void *task(p)
6704         void *p;
6705 {
6706         return (void *) (p == NULL);
6707 }
6708
6709 int main() {
6710
6711         /* pthread test function */
6712         pthread_t t;
6713         int status;
6714
6715         /* make sure pthread_create() isn't just a stub */
6716 #if HAVE_PTHREADS_D4
6717         status = pthread_create(&t, pthread_attr_default, task, NULL);
6718 #else
6719         status = pthread_create(&t, NULL, task, NULL);
6720 #endif
6721
6722         if( status ) exit( status );
6723
6724         /* make sure pthread_detach() isn't just a stub */
6725 #if HAVE_PTHREADS_D4
6726         status = pthread_detach( &t );
6727 #else
6728         status = pthread_detach( t );
6729 #endif
6730
6731 #ifdef HAVE_LINUX_THREADS
6732         pthread_kill_other_threads_np();
6733 #endif
6734
6735         exit( status );
6736
6737 ; return 0; }
6738 EOF
6739 if { (eval echo configure:6740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6740   rm -rf conftest*
6741   ol_cv_pthread_kthread=yes
6742 else
6743   echo "configure: failed program was:" >&5
6744   cat conftest.$ac_ext >&5
6745   rm -rf conftest*
6746   ol_cv_pthread_kthread=no
6747 fi
6748 rm -f conftest*
6749 else
6750   cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* pthread test headers */
6754 #include <pthread.h>
6755 #ifndef NULL
6756 #define NULL (void*)0
6757 #endif
6758
6759 static void *task(p)
6760         void *p;
6761 {
6762         return (void *) (p == NULL);
6763 }
6764
6765
6766 int main(argc, argv)
6767         int argc;
6768         char **argv;
6769 {
6770
6771         /* pthread test function */
6772         pthread_t t;
6773         int status;
6774
6775         /* make sure pthread_create() isn't just a stub */
6776 #if HAVE_PTHREADS_D4
6777         status = pthread_create(&t, pthread_attr_default, task, NULL);
6778 #else
6779         status = pthread_create(&t, NULL, task, NULL);
6780 #endif
6781
6782         if( status ) exit( status );
6783
6784         /* make sure pthread_detach() isn't just a stub */
6785 #if HAVE_PTHREADS_D4
6786         status = pthread_detach( &t );
6787 #else
6788         status = pthread_detach( t );
6789 #endif
6790
6791 #ifdef HAVE_LINUX_THREADS
6792         pthread_kill_other_threads_np();
6793 #endif
6794
6795         exit( status );
6796
6797 }
6798
6799 EOF
6800 if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6801 then
6802   ol_cv_pthread_kthread=yes
6803 else
6804   echo "configure: failed program was:" >&5
6805   cat conftest.$ac_ext >&5
6806   rm -fr conftest*
6807   ol_cv_pthread_kthread=no
6808 fi
6809 rm -fr conftest*
6810 fi
6811
6812
6813                 # restore the LIBS
6814                 LIBS="$ol_LIBS"
6815         
6816 fi
6817
6818 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6819
6820         if test $ol_cv_pthread_kthread = yes ; then
6821                 ol_link_pthreads="-kthread"
6822                 ol_link_threads=posix
6823         fi
6824 fi
6825
6826                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6827 if test "$ol_link_threads" = no ; then
6828         # try -pthread
6829         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6830 echo "configure:6831: checking for pthread link with -pthread" >&5
6831 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   
6835                 # save the flags
6836                 ol_LIBS="$LIBS"
6837                 LIBS="-pthread $LIBS"
6838
6839                 if test "$cross_compiling" = yes; then
6840   cat > conftest.$ac_ext <<EOF
6841 #line 6842 "configure"
6842 #include "confdefs.h"
6843 /* pthread test headers */
6844 #include <pthread.h>
6845 #ifndef NULL
6846 #define NULL (void*)0
6847 #endif
6848
6849 static void *task(p)
6850         void *p;
6851 {
6852         return (void *) (p == NULL);
6853 }
6854
6855 int main() {
6856
6857         /* pthread test function */
6858         pthread_t t;
6859         int status;
6860
6861         /* make sure pthread_create() isn't just a stub */
6862 #if HAVE_PTHREADS_D4
6863         status = pthread_create(&t, pthread_attr_default, task, NULL);
6864 #else
6865         status = pthread_create(&t, NULL, task, NULL);
6866 #endif
6867
6868         if( status ) exit( status );
6869
6870         /* make sure pthread_detach() isn't just a stub */
6871 #if HAVE_PTHREADS_D4
6872         status = pthread_detach( &t );
6873 #else
6874         status = pthread_detach( t );
6875 #endif
6876
6877 #ifdef HAVE_LINUX_THREADS
6878         pthread_kill_other_threads_np();
6879 #endif
6880
6881         exit( status );
6882
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   ol_cv_pthread_pthread=yes
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   ol_cv_pthread_pthread=no
6893 fi
6894 rm -f conftest*
6895 else
6896   cat > conftest.$ac_ext <<EOF
6897 #line 6898 "configure"
6898 #include "confdefs.h"
6899 /* pthread test headers */
6900 #include <pthread.h>
6901 #ifndef NULL
6902 #define NULL (void*)0
6903 #endif
6904
6905 static void *task(p)
6906         void *p;
6907 {
6908         return (void *) (p == NULL);
6909 }
6910
6911
6912 int main(argc, argv)
6913         int argc;
6914         char **argv;
6915 {
6916
6917         /* pthread test function */
6918         pthread_t t;
6919         int status;
6920
6921         /* make sure pthread_create() isn't just a stub */
6922 #if HAVE_PTHREADS_D4
6923         status = pthread_create(&t, pthread_attr_default, task, NULL);
6924 #else
6925         status = pthread_create(&t, NULL, task, NULL);
6926 #endif
6927
6928         if( status ) exit( status );
6929
6930         /* make sure pthread_detach() isn't just a stub */
6931 #if HAVE_PTHREADS_D4
6932         status = pthread_detach( &t );
6933 #else
6934         status = pthread_detach( t );
6935 #endif
6936
6937 #ifdef HAVE_LINUX_THREADS
6938         pthread_kill_other_threads_np();
6939 #endif
6940
6941         exit( status );
6942
6943 }
6944
6945 EOF
6946 if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6947 then
6948   ol_cv_pthread_pthread=yes
6949 else
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -fr conftest*
6953   ol_cv_pthread_pthread=no
6954 fi
6955 rm -fr conftest*
6956 fi
6957
6958
6959                 # restore the LIBS
6960                 LIBS="$ol_LIBS"
6961         
6962 fi
6963
6964 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6965
6966         if test $ol_cv_pthread_pthread = yes ; then
6967                 ol_link_pthreads="-pthread"
6968                 ol_link_threads=posix
6969         fi
6970 fi
6971
6972                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6973 if test "$ol_link_threads" = no ; then
6974         # try -pthreads
6975         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6976 echo "configure:6977: checking for pthread link with -pthreads" >&5
6977 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6978   echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980   
6981                 # save the flags
6982                 ol_LIBS="$LIBS"
6983                 LIBS="-pthreads $LIBS"
6984
6985                 if test "$cross_compiling" = yes; then
6986   cat > conftest.$ac_ext <<EOF
6987 #line 6988 "configure"
6988 #include "confdefs.h"
6989 /* pthread test headers */
6990 #include <pthread.h>
6991 #ifndef NULL
6992 #define NULL (void*)0
6993 #endif
6994
6995 static void *task(p)
6996         void *p;
6997 {
6998         return (void *) (p == NULL);
6999 }
7000
7001 int main() {
7002
7003         /* pthread test function */
7004         pthread_t t;
7005         int status;
7006
7007         /* make sure pthread_create() isn't just a stub */
7008 #if HAVE_PTHREADS_D4
7009         status = pthread_create(&t, pthread_attr_default, task, NULL);
7010 #else
7011         status = pthread_create(&t, NULL, task, NULL);
7012 #endif
7013
7014         if( status ) exit( status );
7015
7016         /* make sure pthread_detach() isn't just a stub */
7017 #if HAVE_PTHREADS_D4
7018         status = pthread_detach( &t );
7019 #else
7020         status = pthread_detach( t );
7021 #endif
7022
7023 #ifdef HAVE_LINUX_THREADS
7024         pthread_kill_other_threads_np();
7025 #endif
7026
7027         exit( status );
7028
7029 ; return 0; }
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032   rm -rf conftest*
7033   ol_cv_pthread_pthreads=yes
7034 else
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   ol_cv_pthread_pthreads=no
7039 fi
7040 rm -f conftest*
7041 else
7042   cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045 /* pthread test headers */
7046 #include <pthread.h>
7047 #ifndef NULL
7048 #define NULL (void*)0
7049 #endif
7050
7051 static void *task(p)
7052         void *p;
7053 {
7054         return (void *) (p == NULL);
7055 }
7056
7057
7058 int main(argc, argv)
7059         int argc;
7060         char **argv;
7061 {
7062
7063         /* pthread test function */
7064         pthread_t t;
7065         int status;
7066
7067         /* make sure pthread_create() isn't just a stub */
7068 #if HAVE_PTHREADS_D4
7069         status = pthread_create(&t, pthread_attr_default, task, NULL);
7070 #else
7071         status = pthread_create(&t, NULL, task, NULL);
7072 #endif
7073
7074         if( status ) exit( status );
7075
7076         /* make sure pthread_detach() isn't just a stub */
7077 #if HAVE_PTHREADS_D4
7078         status = pthread_detach( &t );
7079 #else
7080         status = pthread_detach( t );
7081 #endif
7082
7083 #ifdef HAVE_LINUX_THREADS
7084         pthread_kill_other_threads_np();
7085 #endif
7086
7087         exit( status );
7088
7089 }
7090
7091 EOF
7092 if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7093 then
7094   ol_cv_pthread_pthreads=yes
7095 else
7096   echo "configure: failed program was:" >&5
7097   cat conftest.$ac_ext >&5
7098   rm -fr conftest*
7099   ol_cv_pthread_pthreads=no
7100 fi
7101 rm -fr conftest*
7102 fi
7103
7104
7105                 # restore the LIBS
7106                 LIBS="$ol_LIBS"
7107         
7108 fi
7109
7110 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7111
7112         if test $ol_cv_pthread_pthreads = yes ; then
7113                 ol_link_pthreads="-pthreads"
7114                 ol_link_threads=posix
7115         fi
7116 fi
7117
7118                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7119 if test "$ol_link_threads" = no ; then
7120         # try -mthreads
7121         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7122 echo "configure:7123: checking for pthread link with -mthreads" >&5
7123 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7124   echo $ac_n "(cached) $ac_c" 1>&6
7125 else
7126   
7127                 # save the flags
7128                 ol_LIBS="$LIBS"
7129                 LIBS="-mthreads $LIBS"
7130
7131                 if test "$cross_compiling" = yes; then
7132   cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* pthread test headers */
7136 #include <pthread.h>
7137 #ifndef NULL
7138 #define NULL (void*)0
7139 #endif
7140
7141 static void *task(p)
7142         void *p;
7143 {
7144         return (void *) (p == NULL);
7145 }
7146
7147 int main() {
7148
7149         /* pthread test function */
7150         pthread_t t;
7151         int status;
7152
7153         /* make sure pthread_create() isn't just a stub */
7154 #if HAVE_PTHREADS_D4
7155         status = pthread_create(&t, pthread_attr_default, task, NULL);
7156 #else
7157         status = pthread_create(&t, NULL, task, NULL);
7158 #endif
7159
7160         if( status ) exit( status );
7161
7162         /* make sure pthread_detach() isn't just a stub */
7163 #if HAVE_PTHREADS_D4
7164         status = pthread_detach( &t );
7165 #else
7166         status = pthread_detach( t );
7167 #endif
7168
7169 #ifdef HAVE_LINUX_THREADS
7170         pthread_kill_other_threads_np();
7171 #endif
7172
7173         exit( status );
7174
7175 ; return 0; }
7176 EOF
7177 if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7178   rm -rf conftest*
7179   ol_cv_pthread_mthreads=yes
7180 else
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -rf conftest*
7184   ol_cv_pthread_mthreads=no
7185 fi
7186 rm -f conftest*
7187 else
7188   cat > conftest.$ac_ext <<EOF
7189 #line 7190 "configure"
7190 #include "confdefs.h"
7191 /* pthread test headers */
7192 #include <pthread.h>
7193 #ifndef NULL
7194 #define NULL (void*)0
7195 #endif
7196
7197 static void *task(p)
7198         void *p;
7199 {
7200         return (void *) (p == NULL);
7201 }
7202
7203
7204 int main(argc, argv)
7205         int argc;
7206         char **argv;
7207 {
7208
7209         /* pthread test function */
7210         pthread_t t;
7211         int status;
7212
7213         /* make sure pthread_create() isn't just a stub */
7214 #if HAVE_PTHREADS_D4
7215         status = pthread_create(&t, pthread_attr_default, task, NULL);
7216 #else
7217         status = pthread_create(&t, NULL, task, NULL);
7218 #endif
7219
7220         if( status ) exit( status );
7221
7222         /* make sure pthread_detach() isn't just a stub */
7223 #if HAVE_PTHREADS_D4
7224         status = pthread_detach( &t );
7225 #else
7226         status = pthread_detach( t );
7227 #endif
7228
7229 #ifdef HAVE_LINUX_THREADS
7230         pthread_kill_other_threads_np();
7231 #endif
7232
7233         exit( status );
7234
7235 }
7236
7237 EOF
7238 if { (eval echo configure:7239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7239 then
7240   ol_cv_pthread_mthreads=yes
7241 else
7242   echo "configure: failed program was:" >&5
7243   cat conftest.$ac_ext >&5
7244   rm -fr conftest*
7245   ol_cv_pthread_mthreads=no
7246 fi
7247 rm -fr conftest*
7248 fi
7249
7250
7251                 # restore the LIBS
7252                 LIBS="$ol_LIBS"
7253         
7254 fi
7255
7256 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7257
7258         if test $ol_cv_pthread_mthreads = yes ; then
7259                 ol_link_pthreads="-mthreads"
7260                 ol_link_threads=posix
7261         fi
7262 fi
7263
7264                 # Pthread try link: -thread (ol_cv_pthread_thread)
7265 if test "$ol_link_threads" = no ; then
7266         # try -thread
7267         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7268 echo "configure:7269: checking for pthread link with -thread" >&5
7269 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7270   echo $ac_n "(cached) $ac_c" 1>&6
7271 else
7272   
7273                 # save the flags
7274                 ol_LIBS="$LIBS"
7275                 LIBS="-thread $LIBS"
7276
7277                 if test "$cross_compiling" = yes; then
7278   cat > conftest.$ac_ext <<EOF
7279 #line 7280 "configure"
7280 #include "confdefs.h"
7281 /* pthread test headers */
7282 #include <pthread.h>
7283 #ifndef NULL
7284 #define NULL (void*)0
7285 #endif
7286
7287 static void *task(p)
7288         void *p;
7289 {
7290         return (void *) (p == NULL);
7291 }
7292
7293 int main() {
7294
7295         /* pthread test function */
7296         pthread_t t;
7297         int status;
7298
7299         /* make sure pthread_create() isn't just a stub */
7300 #if HAVE_PTHREADS_D4
7301         status = pthread_create(&t, pthread_attr_default, task, NULL);
7302 #else
7303         status = pthread_create(&t, NULL, task, NULL);
7304 #endif
7305
7306         if( status ) exit( status );
7307
7308         /* make sure pthread_detach() isn't just a stub */
7309 #if HAVE_PTHREADS_D4
7310         status = pthread_detach( &t );
7311 #else
7312         status = pthread_detach( t );
7313 #endif
7314
7315 #ifdef HAVE_LINUX_THREADS
7316         pthread_kill_other_threads_np();
7317 #endif
7318
7319         exit( status );
7320
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   ol_cv_pthread_thread=yes
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   ol_cv_pthread_thread=no
7331 fi
7332 rm -f conftest*
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 /* pthread test headers */
7338 #include <pthread.h>
7339 #ifndef NULL
7340 #define NULL (void*)0
7341 #endif
7342
7343 static void *task(p)
7344         void *p;
7345 {
7346         return (void *) (p == NULL);
7347 }
7348
7349
7350 int main(argc, argv)
7351         int argc;
7352         char **argv;
7353 {
7354
7355         /* pthread test function */
7356         pthread_t t;
7357         int status;
7358
7359         /* make sure pthread_create() isn't just a stub */
7360 #if HAVE_PTHREADS_D4
7361         status = pthread_create(&t, pthread_attr_default, task, NULL);
7362 #else
7363         status = pthread_create(&t, NULL, task, NULL);
7364 #endif
7365
7366         if( status ) exit( status );
7367
7368         /* make sure pthread_detach() isn't just a stub */
7369 #if HAVE_PTHREADS_D4
7370         status = pthread_detach( &t );
7371 #else
7372         status = pthread_detach( t );
7373 #endif
7374
7375 #ifdef HAVE_LINUX_THREADS
7376         pthread_kill_other_threads_np();
7377 #endif
7378
7379         exit( status );
7380
7381 }
7382
7383 EOF
7384 if { (eval echo configure:7385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7385 then
7386   ol_cv_pthread_thread=yes
7387 else
7388   echo "configure: failed program was:" >&5
7389   cat conftest.$ac_ext >&5
7390   rm -fr conftest*
7391   ol_cv_pthread_thread=no
7392 fi
7393 rm -fr conftest*
7394 fi
7395
7396
7397                 # restore the LIBS
7398                 LIBS="$ol_LIBS"
7399         
7400 fi
7401
7402 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7403
7404         if test $ol_cv_pthread_thread = yes ; then
7405                 ol_link_pthreads="-thread"
7406                 ol_link_threads=posix
7407         fi
7408 fi
7409
7410
7411                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7412 if test "$ol_link_threads" = no ; then
7413         # try -lpthread -lmach -lexc -lc_r
7414         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7415 echo "configure:7416: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7416 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7417   echo $ac_n "(cached) $ac_c" 1>&6
7418 else
7419   
7420                 # save the flags
7421                 ol_LIBS="$LIBS"
7422                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7423
7424                 if test "$cross_compiling" = yes; then
7425   cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 /* pthread test headers */
7429 #include <pthread.h>
7430 #ifndef NULL
7431 #define NULL (void*)0
7432 #endif
7433
7434 static void *task(p)
7435         void *p;
7436 {
7437         return (void *) (p == NULL);
7438 }
7439
7440 int main() {
7441
7442         /* pthread test function */
7443         pthread_t t;
7444         int status;
7445
7446         /* make sure pthread_create() isn't just a stub */
7447 #if HAVE_PTHREADS_D4
7448         status = pthread_create(&t, pthread_attr_default, task, NULL);
7449 #else
7450         status = pthread_create(&t, NULL, task, NULL);
7451 #endif
7452
7453         if( status ) exit( status );
7454
7455         /* make sure pthread_detach() isn't just a stub */
7456 #if HAVE_PTHREADS_D4
7457         status = pthread_detach( &t );
7458 #else
7459         status = pthread_detach( t );
7460 #endif
7461
7462 #ifdef HAVE_LINUX_THREADS
7463         pthread_kill_other_threads_np();
7464 #endif
7465
7466         exit( status );
7467
7468 ; return 0; }
7469 EOF
7470 if { (eval echo configure:7471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7471   rm -rf conftest*
7472   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7473 else
7474   echo "configure: failed program was:" >&5
7475   cat conftest.$ac_ext >&5
7476   rm -rf conftest*
7477   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7478 fi
7479 rm -f conftest*
7480 else
7481   cat > conftest.$ac_ext <<EOF
7482 #line 7483 "configure"
7483 #include "confdefs.h"
7484 /* pthread test headers */
7485 #include <pthread.h>
7486 #ifndef NULL
7487 #define NULL (void*)0
7488 #endif
7489
7490 static void *task(p)
7491         void *p;
7492 {
7493         return (void *) (p == NULL);
7494 }
7495
7496
7497 int main(argc, argv)
7498         int argc;
7499         char **argv;
7500 {
7501
7502         /* pthread test function */
7503         pthread_t t;
7504         int status;
7505
7506         /* make sure pthread_create() isn't just a stub */
7507 #if HAVE_PTHREADS_D4
7508         status = pthread_create(&t, pthread_attr_default, task, NULL);
7509 #else
7510         status = pthread_create(&t, NULL, task, NULL);
7511 #endif
7512
7513         if( status ) exit( status );
7514
7515         /* make sure pthread_detach() isn't just a stub */
7516 #if HAVE_PTHREADS_D4
7517         status = pthread_detach( &t );
7518 #else
7519         status = pthread_detach( t );
7520 #endif
7521
7522 #ifdef HAVE_LINUX_THREADS
7523         pthread_kill_other_threads_np();
7524 #endif
7525
7526         exit( status );
7527
7528 }
7529
7530 EOF
7531 if { (eval echo configure:7532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7532 then
7533   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7534 else
7535   echo "configure: failed program was:" >&5
7536   cat conftest.$ac_ext >&5
7537   rm -fr conftest*
7538   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7539 fi
7540 rm -fr conftest*
7541 fi
7542
7543
7544                 # restore the LIBS
7545                 LIBS="$ol_LIBS"
7546         
7547 fi
7548
7549 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7550
7551         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7552                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7553                 ol_link_threads=posix
7554         fi
7555 fi
7556
7557                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7558 if test "$ol_link_threads" = no ; then
7559         # try -lpthread -lmach -lexc
7560         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7561 echo "configure:7562: checking for pthread link with -lpthread -lmach -lexc" >&5
7562 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7563   echo $ac_n "(cached) $ac_c" 1>&6
7564 else
7565   
7566                 # save the flags
7567                 ol_LIBS="$LIBS"
7568                 LIBS="-lpthread -lmach -lexc $LIBS"
7569
7570                 if test "$cross_compiling" = yes; then
7571   cat > conftest.$ac_ext <<EOF
7572 #line 7573 "configure"
7573 #include "confdefs.h"
7574 /* pthread test headers */
7575 #include <pthread.h>
7576 #ifndef NULL
7577 #define NULL (void*)0
7578 #endif
7579
7580 static void *task(p)
7581         void *p;
7582 {
7583         return (void *) (p == NULL);
7584 }
7585
7586 int main() {
7587
7588         /* pthread test function */
7589         pthread_t t;
7590         int status;
7591
7592         /* make sure pthread_create() isn't just a stub */
7593 #if HAVE_PTHREADS_D4
7594         status = pthread_create(&t, pthread_attr_default, task, NULL);
7595 #else
7596         status = pthread_create(&t, NULL, task, NULL);
7597 #endif
7598
7599         if( status ) exit( status );
7600
7601         /* make sure pthread_detach() isn't just a stub */
7602 #if HAVE_PTHREADS_D4
7603         status = pthread_detach( &t );
7604 #else
7605         status = pthread_detach( t );
7606 #endif
7607
7608 #ifdef HAVE_LINUX_THREADS
7609         pthread_kill_other_threads_np();
7610 #endif
7611
7612         exit( status );
7613
7614 ; return 0; }
7615 EOF
7616 if { (eval echo configure:7617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7617   rm -rf conftest*
7618   ol_cv_pthread_lpthread_lmach_lexc=yes
7619 else
7620   echo "configure: failed program was:" >&5
7621   cat conftest.$ac_ext >&5
7622   rm -rf conftest*
7623   ol_cv_pthread_lpthread_lmach_lexc=no
7624 fi
7625 rm -f conftest*
7626 else
7627   cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7630 /* pthread test headers */
7631 #include <pthread.h>
7632 #ifndef NULL
7633 #define NULL (void*)0
7634 #endif
7635
7636 static void *task(p)
7637         void *p;
7638 {
7639         return (void *) (p == NULL);
7640 }
7641
7642
7643 int main(argc, argv)
7644         int argc;
7645         char **argv;
7646 {
7647
7648         /* pthread test function */
7649         pthread_t t;
7650         int status;
7651
7652         /* make sure pthread_create() isn't just a stub */
7653 #if HAVE_PTHREADS_D4
7654         status = pthread_create(&t, pthread_attr_default, task, NULL);
7655 #else
7656         status = pthread_create(&t, NULL, task, NULL);
7657 #endif
7658
7659         if( status ) exit( status );
7660
7661         /* make sure pthread_detach() isn't just a stub */
7662 #if HAVE_PTHREADS_D4
7663         status = pthread_detach( &t );
7664 #else
7665         status = pthread_detach( t );
7666 #endif
7667
7668 #ifdef HAVE_LINUX_THREADS
7669         pthread_kill_other_threads_np();
7670 #endif
7671
7672         exit( status );
7673
7674 }
7675
7676 EOF
7677 if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7678 then
7679   ol_cv_pthread_lpthread_lmach_lexc=yes
7680 else
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -fr conftest*
7684   ol_cv_pthread_lpthread_lmach_lexc=no
7685 fi
7686 rm -fr conftest*
7687 fi
7688
7689
7690                 # restore the LIBS
7691                 LIBS="$ol_LIBS"
7692         
7693 fi
7694
7695 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7696
7697         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7698                 ol_link_pthreads="-lpthread -lmach -lexc"
7699                 ol_link_threads=posix
7700         fi
7701 fi
7702
7703
7704                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7705 if test "$ol_link_threads" = no ; then
7706         # try -lpthread -Wl,-woff,85
7707         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7708 echo "configure:7709: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7709 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7710   echo $ac_n "(cached) $ac_c" 1>&6
7711 else
7712   
7713                 # save the flags
7714                 ol_LIBS="$LIBS"
7715                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7716
7717                 if test "$cross_compiling" = yes; then
7718   cat > conftest.$ac_ext <<EOF
7719 #line 7720 "configure"
7720 #include "confdefs.h"
7721 /* pthread test headers */
7722 #include <pthread.h>
7723 #ifndef NULL
7724 #define NULL (void*)0
7725 #endif
7726
7727 static void *task(p)
7728         void *p;
7729 {
7730         return (void *) (p == NULL);
7731 }
7732
7733 int main() {
7734
7735         /* pthread test function */
7736         pthread_t t;
7737         int status;
7738
7739         /* make sure pthread_create() isn't just a stub */
7740 #if HAVE_PTHREADS_D4
7741         status = pthread_create(&t, pthread_attr_default, task, NULL);
7742 #else
7743         status = pthread_create(&t, NULL, task, NULL);
7744 #endif
7745
7746         if( status ) exit( status );
7747
7748         /* make sure pthread_detach() isn't just a stub */
7749 #if HAVE_PTHREADS_D4
7750         status = pthread_detach( &t );
7751 #else
7752         status = pthread_detach( t );
7753 #endif
7754
7755 #ifdef HAVE_LINUX_THREADS
7756         pthread_kill_other_threads_np();
7757 #endif
7758
7759         exit( status );
7760
7761 ; return 0; }
7762 EOF
7763 if { (eval echo configure:7764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7764   rm -rf conftest*
7765   ol_cv_pthread_lib_lpthread_woff=yes
7766 else
7767   echo "configure: failed program was:" >&5
7768   cat conftest.$ac_ext >&5
7769   rm -rf conftest*
7770   ol_cv_pthread_lib_lpthread_woff=no
7771 fi
7772 rm -f conftest*
7773 else
7774   cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777 /* pthread test headers */
7778 #include <pthread.h>
7779 #ifndef NULL
7780 #define NULL (void*)0
7781 #endif
7782
7783 static void *task(p)
7784         void *p;
7785 {
7786         return (void *) (p == NULL);
7787 }
7788
7789
7790 int main(argc, argv)
7791         int argc;
7792         char **argv;
7793 {
7794
7795         /* pthread test function */
7796         pthread_t t;
7797         int status;
7798
7799         /* make sure pthread_create() isn't just a stub */
7800 #if HAVE_PTHREADS_D4
7801         status = pthread_create(&t, pthread_attr_default, task, NULL);
7802 #else
7803         status = pthread_create(&t, NULL, task, NULL);
7804 #endif
7805
7806         if( status ) exit( status );
7807
7808         /* make sure pthread_detach() isn't just a stub */
7809 #if HAVE_PTHREADS_D4
7810         status = pthread_detach( &t );
7811 #else
7812         status = pthread_detach( t );
7813 #endif
7814
7815 #ifdef HAVE_LINUX_THREADS
7816         pthread_kill_other_threads_np();
7817 #endif
7818
7819         exit( status );
7820
7821 }
7822
7823 EOF
7824 if { (eval echo configure:7825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7825 then
7826   ol_cv_pthread_lib_lpthread_woff=yes
7827 else
7828   echo "configure: failed program was:" >&5
7829   cat conftest.$ac_ext >&5
7830   rm -fr conftest*
7831   ol_cv_pthread_lib_lpthread_woff=no
7832 fi
7833 rm -fr conftest*
7834 fi
7835
7836
7837                 # restore the LIBS
7838                 LIBS="$ol_LIBS"
7839         
7840 fi
7841
7842 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7843
7844         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7845                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7846                 ol_link_threads=posix
7847         fi
7848 fi
7849
7850
7851                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7852 if test "$ol_link_threads" = no ; then
7853         # try -lpthread
7854         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7855 echo "configure:7856: checking for pthread link with -lpthread" >&5
7856 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7857   echo $ac_n "(cached) $ac_c" 1>&6
7858 else
7859   
7860                 # save the flags
7861                 ol_LIBS="$LIBS"
7862                 LIBS="-lpthread $LIBS"
7863
7864                 if test "$cross_compiling" = yes; then
7865   cat > conftest.$ac_ext <<EOF
7866 #line 7867 "configure"
7867 #include "confdefs.h"
7868 /* pthread test headers */
7869 #include <pthread.h>
7870 #ifndef NULL
7871 #define NULL (void*)0
7872 #endif
7873
7874 static void *task(p)
7875         void *p;
7876 {
7877         return (void *) (p == NULL);
7878 }
7879
7880 int main() {
7881
7882         /* pthread test function */
7883         pthread_t t;
7884         int status;
7885
7886         /* make sure pthread_create() isn't just a stub */
7887 #if HAVE_PTHREADS_D4
7888         status = pthread_create(&t, pthread_attr_default, task, NULL);
7889 #else
7890         status = pthread_create(&t, NULL, task, NULL);
7891 #endif
7892
7893         if( status ) exit( status );
7894
7895         /* make sure pthread_detach() isn't just a stub */
7896 #if HAVE_PTHREADS_D4
7897         status = pthread_detach( &t );
7898 #else
7899         status = pthread_detach( t );
7900 #endif
7901
7902 #ifdef HAVE_LINUX_THREADS
7903         pthread_kill_other_threads_np();
7904 #endif
7905
7906         exit( status );
7907
7908 ; return 0; }
7909 EOF
7910 if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7911   rm -rf conftest*
7912   ol_cv_pthread_lpthread=yes
7913 else
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   ol_cv_pthread_lpthread=no
7918 fi
7919 rm -f conftest*
7920 else
7921   cat > conftest.$ac_ext <<EOF
7922 #line 7923 "configure"
7923 #include "confdefs.h"
7924 /* pthread test headers */
7925 #include <pthread.h>
7926 #ifndef NULL
7927 #define NULL (void*)0
7928 #endif
7929
7930 static void *task(p)
7931         void *p;
7932 {
7933         return (void *) (p == NULL);
7934 }
7935
7936
7937 int main(argc, argv)
7938         int argc;
7939         char **argv;
7940 {
7941
7942         /* pthread test function */
7943         pthread_t t;
7944         int status;
7945
7946         /* make sure pthread_create() isn't just a stub */
7947 #if HAVE_PTHREADS_D4
7948         status = pthread_create(&t, pthread_attr_default, task, NULL);
7949 #else
7950         status = pthread_create(&t, NULL, task, NULL);
7951 #endif
7952
7953         if( status ) exit( status );
7954
7955         /* make sure pthread_detach() isn't just a stub */
7956 #if HAVE_PTHREADS_D4
7957         status = pthread_detach( &t );
7958 #else
7959         status = pthread_detach( t );
7960 #endif
7961
7962 #ifdef HAVE_LINUX_THREADS
7963         pthread_kill_other_threads_np();
7964 #endif
7965
7966         exit( status );
7967
7968 }
7969
7970 EOF
7971 if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7972 then
7973   ol_cv_pthread_lpthread=yes
7974 else
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -fr conftest*
7978   ol_cv_pthread_lpthread=no
7979 fi
7980 rm -fr conftest*
7981 fi
7982
7983
7984                 # restore the LIBS
7985                 LIBS="$ol_LIBS"
7986         
7987 fi
7988
7989 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7990
7991         if test $ol_cv_pthread_lpthread = yes ; then
7992                 ol_link_pthreads="-lpthread"
7993                 ol_link_threads=posix
7994         fi
7995 fi
7996
7997                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7998 if test "$ol_link_threads" = no ; then
7999         # try -lc_r
8000         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8001 echo "configure:8002: checking for pthread link with -lc_r" >&5
8002 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8003   echo $ac_n "(cached) $ac_c" 1>&6
8004 else
8005   
8006                 # save the flags
8007                 ol_LIBS="$LIBS"
8008                 LIBS="-lc_r $LIBS"
8009
8010                 if test "$cross_compiling" = yes; then
8011   cat > conftest.$ac_ext <<EOF
8012 #line 8013 "configure"
8013 #include "confdefs.h"
8014 /* pthread test headers */
8015 #include <pthread.h>
8016 #ifndef NULL
8017 #define NULL (void*)0
8018 #endif
8019
8020 static void *task(p)
8021         void *p;
8022 {
8023         return (void *) (p == NULL);
8024 }
8025
8026 int main() {
8027
8028         /* pthread test function */
8029         pthread_t t;
8030         int status;
8031
8032         /* make sure pthread_create() isn't just a stub */
8033 #if HAVE_PTHREADS_D4
8034         status = pthread_create(&t, pthread_attr_default, task, NULL);
8035 #else
8036         status = pthread_create(&t, NULL, task, NULL);
8037 #endif
8038
8039         if( status ) exit( status );
8040
8041         /* make sure pthread_detach() isn't just a stub */
8042 #if HAVE_PTHREADS_D4
8043         status = pthread_detach( &t );
8044 #else
8045         status = pthread_detach( t );
8046 #endif
8047
8048 #ifdef HAVE_LINUX_THREADS
8049         pthread_kill_other_threads_np();
8050 #endif
8051
8052         exit( status );
8053
8054 ; return 0; }
8055 EOF
8056 if { (eval echo configure:8057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8057   rm -rf conftest*
8058   ol_cv_pthread_lc_r=yes
8059 else
8060   echo "configure: failed program was:" >&5
8061   cat conftest.$ac_ext >&5
8062   rm -rf conftest*
8063   ol_cv_pthread_lc_r=no
8064 fi
8065 rm -f conftest*
8066 else
8067   cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8070 /* pthread test headers */
8071 #include <pthread.h>
8072 #ifndef NULL
8073 #define NULL (void*)0
8074 #endif
8075
8076 static void *task(p)
8077         void *p;
8078 {
8079         return (void *) (p == NULL);
8080 }
8081
8082
8083 int main(argc, argv)
8084         int argc;
8085         char **argv;
8086 {
8087
8088         /* pthread test function */
8089         pthread_t t;
8090         int status;
8091
8092         /* make sure pthread_create() isn't just a stub */
8093 #if HAVE_PTHREADS_D4
8094         status = pthread_create(&t, pthread_attr_default, task, NULL);
8095 #else
8096         status = pthread_create(&t, NULL, task, NULL);
8097 #endif
8098
8099         if( status ) exit( status );
8100
8101         /* make sure pthread_detach() isn't just a stub */
8102 #if HAVE_PTHREADS_D4
8103         status = pthread_detach( &t );
8104 #else
8105         status = pthread_detach( t );
8106 #endif
8107
8108 #ifdef HAVE_LINUX_THREADS
8109         pthread_kill_other_threads_np();
8110 #endif
8111
8112         exit( status );
8113
8114 }
8115
8116 EOF
8117 if { (eval echo configure:8118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8118 then
8119   ol_cv_pthread_lc_r=yes
8120 else
8121   echo "configure: failed program was:" >&5
8122   cat conftest.$ac_ext >&5
8123   rm -fr conftest*
8124   ol_cv_pthread_lc_r=no
8125 fi
8126 rm -fr conftest*
8127 fi
8128
8129
8130                 # restore the LIBS
8131                 LIBS="$ol_LIBS"
8132         
8133 fi
8134
8135 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8136
8137         if test $ol_cv_pthread_lc_r = yes ; then
8138                 ol_link_pthreads="-lc_r"
8139                 ol_link_threads=posix
8140         fi
8141 fi
8142
8143
8144                 # Pthread try link: -threads (ol_cv_pthread_threads)
8145 if test "$ol_link_threads" = no ; then
8146         # try -threads
8147         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8148 echo "configure:8149: checking for pthread link with -threads" >&5
8149 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8150   echo $ac_n "(cached) $ac_c" 1>&6
8151 else
8152   
8153                 # save the flags
8154                 ol_LIBS="$LIBS"
8155                 LIBS="-threads $LIBS"
8156
8157                 if test "$cross_compiling" = yes; then
8158   cat > conftest.$ac_ext <<EOF
8159 #line 8160 "configure"
8160 #include "confdefs.h"
8161 /* pthread test headers */
8162 #include <pthread.h>
8163 #ifndef NULL
8164 #define NULL (void*)0
8165 #endif
8166
8167 static void *task(p)
8168         void *p;
8169 {
8170         return (void *) (p == NULL);
8171 }
8172
8173 int main() {
8174
8175         /* pthread test function */
8176         pthread_t t;
8177         int status;
8178
8179         /* make sure pthread_create() isn't just a stub */
8180 #if HAVE_PTHREADS_D4
8181         status = pthread_create(&t, pthread_attr_default, task, NULL);
8182 #else
8183         status = pthread_create(&t, NULL, task, NULL);
8184 #endif
8185
8186         if( status ) exit( status );
8187
8188         /* make sure pthread_detach() isn't just a stub */
8189 #if HAVE_PTHREADS_D4
8190         status = pthread_detach( &t );
8191 #else
8192         status = pthread_detach( t );
8193 #endif
8194
8195 #ifdef HAVE_LINUX_THREADS
8196         pthread_kill_other_threads_np();
8197 #endif
8198
8199         exit( status );
8200
8201 ; return 0; }
8202 EOF
8203 if { (eval echo configure:8204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8204   rm -rf conftest*
8205   ol_cv_pthread_threads=yes
8206 else
8207   echo "configure: failed program was:" >&5
8208   cat conftest.$ac_ext >&5
8209   rm -rf conftest*
8210   ol_cv_pthread_threads=no
8211 fi
8212 rm -f conftest*
8213 else
8214   cat > conftest.$ac_ext <<EOF
8215 #line 8216 "configure"
8216 #include "confdefs.h"
8217 /* pthread test headers */
8218 #include <pthread.h>
8219 #ifndef NULL
8220 #define NULL (void*)0
8221 #endif
8222
8223 static void *task(p)
8224         void *p;
8225 {
8226         return (void *) (p == NULL);
8227 }
8228
8229
8230 int main(argc, argv)
8231         int argc;
8232         char **argv;
8233 {
8234
8235         /* pthread test function */
8236         pthread_t t;
8237         int status;
8238
8239         /* make sure pthread_create() isn't just a stub */
8240 #if HAVE_PTHREADS_D4
8241         status = pthread_create(&t, pthread_attr_default, task, NULL);
8242 #else
8243         status = pthread_create(&t, NULL, task, NULL);
8244 #endif
8245
8246         if( status ) exit( status );
8247
8248         /* make sure pthread_detach() isn't just a stub */
8249 #if HAVE_PTHREADS_D4
8250         status = pthread_detach( &t );
8251 #else
8252         status = pthread_detach( t );
8253 #endif
8254
8255 #ifdef HAVE_LINUX_THREADS
8256         pthread_kill_other_threads_np();
8257 #endif
8258
8259         exit( status );
8260
8261 }
8262
8263 EOF
8264 if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8265 then
8266   ol_cv_pthread_threads=yes
8267 else
8268   echo "configure: failed program was:" >&5
8269   cat conftest.$ac_ext >&5
8270   rm -fr conftest*
8271   ol_cv_pthread_threads=no
8272 fi
8273 rm -fr conftest*
8274 fi
8275
8276
8277                 # restore the LIBS
8278                 LIBS="$ol_LIBS"
8279         
8280 fi
8281
8282 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8283
8284         if test $ol_cv_pthread_threads = yes ; then
8285                 ol_link_pthreads="-threads"
8286                 ol_link_threads=posix
8287         fi
8288 fi
8289
8290
8291                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8292 if test "$ol_link_threads" = no ; then
8293         # try -lpthreads -lmach -lexc -lc_r
8294         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8295 echo "configure:8296: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8296 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8297   echo $ac_n "(cached) $ac_c" 1>&6
8298 else
8299   
8300                 # save the flags
8301                 ol_LIBS="$LIBS"
8302                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8303
8304                 if test "$cross_compiling" = yes; then
8305   cat > conftest.$ac_ext <<EOF
8306 #line 8307 "configure"
8307 #include "confdefs.h"
8308 /* pthread test headers */
8309 #include <pthread.h>
8310 #ifndef NULL
8311 #define NULL (void*)0
8312 #endif
8313
8314 static void *task(p)
8315         void *p;
8316 {
8317         return (void *) (p == NULL);
8318 }
8319
8320 int main() {
8321
8322         /* pthread test function */
8323         pthread_t t;
8324         int status;
8325
8326         /* make sure pthread_create() isn't just a stub */
8327 #if HAVE_PTHREADS_D4
8328         status = pthread_create(&t, pthread_attr_default, task, NULL);
8329 #else
8330         status = pthread_create(&t, NULL, task, NULL);
8331 #endif
8332
8333         if( status ) exit( status );
8334
8335         /* make sure pthread_detach() isn't just a stub */
8336 #if HAVE_PTHREADS_D4
8337         status = pthread_detach( &t );
8338 #else
8339         status = pthread_detach( t );
8340 #endif
8341
8342 #ifdef HAVE_LINUX_THREADS
8343         pthread_kill_other_threads_np();
8344 #endif
8345
8346         exit( status );
8347
8348 ; return 0; }
8349 EOF
8350 if { (eval echo configure:8351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8351   rm -rf conftest*
8352   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8353 else
8354   echo "configure: failed program was:" >&5
8355   cat conftest.$ac_ext >&5
8356   rm -rf conftest*
8357   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8358 fi
8359 rm -f conftest*
8360 else
8361   cat > conftest.$ac_ext <<EOF
8362 #line 8363 "configure"
8363 #include "confdefs.h"
8364 /* pthread test headers */
8365 #include <pthread.h>
8366 #ifndef NULL
8367 #define NULL (void*)0
8368 #endif
8369
8370 static void *task(p)
8371         void *p;
8372 {
8373         return (void *) (p == NULL);
8374 }
8375
8376
8377 int main(argc, argv)
8378         int argc;
8379         char **argv;
8380 {
8381
8382         /* pthread test function */
8383         pthread_t t;
8384         int status;
8385
8386         /* make sure pthread_create() isn't just a stub */
8387 #if HAVE_PTHREADS_D4
8388         status = pthread_create(&t, pthread_attr_default, task, NULL);
8389 #else
8390         status = pthread_create(&t, NULL, task, NULL);
8391 #endif
8392
8393         if( status ) exit( status );
8394
8395         /* make sure pthread_detach() isn't just a stub */
8396 #if HAVE_PTHREADS_D4
8397         status = pthread_detach( &t );
8398 #else
8399         status = pthread_detach( t );
8400 #endif
8401
8402 #ifdef HAVE_LINUX_THREADS
8403         pthread_kill_other_threads_np();
8404 #endif
8405
8406         exit( status );
8407
8408 }
8409
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8412 then
8413   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -fr conftest*
8418   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8419 fi
8420 rm -fr conftest*
8421 fi
8422
8423
8424                 # restore the LIBS
8425                 LIBS="$ol_LIBS"
8426         
8427 fi
8428
8429 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8430
8431         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8432                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8433                 ol_link_threads=posix
8434         fi
8435 fi
8436
8437                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8438 if test "$ol_link_threads" = no ; then
8439         # try -lpthreads -lmach -lexc
8440         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8441 echo "configure:8442: checking for pthread link with -lpthreads -lmach -lexc" >&5
8442 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8443   echo $ac_n "(cached) $ac_c" 1>&6
8444 else
8445   
8446                 # save the flags
8447                 ol_LIBS="$LIBS"
8448                 LIBS="-lpthreads -lmach -lexc $LIBS"
8449
8450                 if test "$cross_compiling" = yes; then
8451   cat > conftest.$ac_ext <<EOF
8452 #line 8453 "configure"
8453 #include "confdefs.h"
8454 /* pthread test headers */
8455 #include <pthread.h>
8456 #ifndef NULL
8457 #define NULL (void*)0
8458 #endif
8459
8460 static void *task(p)
8461         void *p;
8462 {
8463         return (void *) (p == NULL);
8464 }
8465
8466 int main() {
8467
8468         /* pthread test function */
8469         pthread_t t;
8470         int status;
8471
8472         /* make sure pthread_create() isn't just a stub */
8473 #if HAVE_PTHREADS_D4
8474         status = pthread_create(&t, pthread_attr_default, task, NULL);
8475 #else
8476         status = pthread_create(&t, NULL, task, NULL);
8477 #endif
8478
8479         if( status ) exit( status );
8480
8481         /* make sure pthread_detach() isn't just a stub */
8482 #if HAVE_PTHREADS_D4
8483         status = pthread_detach( &t );
8484 #else
8485         status = pthread_detach( t );
8486 #endif
8487
8488 #ifdef HAVE_LINUX_THREADS
8489         pthread_kill_other_threads_np();
8490 #endif
8491
8492         exit( status );
8493
8494 ; return 0; }
8495 EOF
8496 if { (eval echo configure:8497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8497   rm -rf conftest*
8498   ol_cv_pthread_lpthreads_lmach_lexc=yes
8499 else
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   ol_cv_pthread_lpthreads_lmach_lexc=no
8504 fi
8505 rm -f conftest*
8506 else
8507   cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510 /* pthread test headers */
8511 #include <pthread.h>
8512 #ifndef NULL
8513 #define NULL (void*)0
8514 #endif
8515
8516 static void *task(p)
8517         void *p;
8518 {
8519         return (void *) (p == NULL);
8520 }
8521
8522
8523 int main(argc, argv)
8524         int argc;
8525         char **argv;
8526 {
8527
8528         /* pthread test function */
8529         pthread_t t;
8530         int status;
8531
8532         /* make sure pthread_create() isn't just a stub */
8533 #if HAVE_PTHREADS_D4
8534         status = pthread_create(&t, pthread_attr_default, task, NULL);
8535 #else
8536         status = pthread_create(&t, NULL, task, NULL);
8537 #endif
8538
8539         if( status ) exit( status );
8540
8541         /* make sure pthread_detach() isn't just a stub */
8542 #if HAVE_PTHREADS_D4
8543         status = pthread_detach( &t );
8544 #else
8545         status = pthread_detach( t );
8546 #endif
8547
8548 #ifdef HAVE_LINUX_THREADS
8549         pthread_kill_other_threads_np();
8550 #endif
8551
8552         exit( status );
8553
8554 }
8555
8556 EOF
8557 if { (eval echo configure:8558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8558 then
8559   ol_cv_pthread_lpthreads_lmach_lexc=yes
8560 else
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -fr conftest*
8564   ol_cv_pthread_lpthreads_lmach_lexc=no
8565 fi
8566 rm -fr conftest*
8567 fi
8568
8569
8570                 # restore the LIBS
8571                 LIBS="$ol_LIBS"
8572         
8573 fi
8574
8575 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8576
8577         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8578                 ol_link_pthreads="-lpthreads -lmach -lexc"
8579                 ol_link_threads=posix
8580         fi
8581 fi
8582
8583                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8584 if test "$ol_link_threads" = no ; then
8585         # try -lpthreads -lexc
8586         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8587 echo "configure:8588: checking for pthread link with -lpthreads -lexc" >&5
8588 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8589   echo $ac_n "(cached) $ac_c" 1>&6
8590 else
8591   
8592                 # save the flags
8593                 ol_LIBS="$LIBS"
8594                 LIBS="-lpthreads -lexc $LIBS"
8595
8596                 if test "$cross_compiling" = yes; then
8597   cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8600 /* pthread test headers */
8601 #include <pthread.h>
8602 #ifndef NULL
8603 #define NULL (void*)0
8604 #endif
8605
8606 static void *task(p)
8607         void *p;
8608 {
8609         return (void *) (p == NULL);
8610 }
8611
8612 int main() {
8613
8614         /* pthread test function */
8615         pthread_t t;
8616         int status;
8617
8618         /* make sure pthread_create() isn't just a stub */
8619 #if HAVE_PTHREADS_D4
8620         status = pthread_create(&t, pthread_attr_default, task, NULL);
8621 #else
8622         status = pthread_create(&t, NULL, task, NULL);
8623 #endif
8624
8625         if( status ) exit( status );
8626
8627         /* make sure pthread_detach() isn't just a stub */
8628 #if HAVE_PTHREADS_D4
8629         status = pthread_detach( &t );
8630 #else
8631         status = pthread_detach( t );
8632 #endif
8633
8634 #ifdef HAVE_LINUX_THREADS
8635         pthread_kill_other_threads_np();
8636 #endif
8637
8638         exit( status );
8639
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8643   rm -rf conftest*
8644   ol_cv_pthread_lpthreads_lexc=yes
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -rf conftest*
8649   ol_cv_pthread_lpthreads_lexc=no
8650 fi
8651 rm -f conftest*
8652 else
8653   cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 /* pthread test headers */
8657 #include <pthread.h>
8658 #ifndef NULL
8659 #define NULL (void*)0
8660 #endif
8661
8662 static void *task(p)
8663         void *p;
8664 {
8665         return (void *) (p == NULL);
8666 }
8667
8668
8669 int main(argc, argv)
8670         int argc;
8671         char **argv;
8672 {
8673
8674         /* pthread test function */
8675         pthread_t t;
8676         int status;
8677
8678         /* make sure pthread_create() isn't just a stub */
8679 #if HAVE_PTHREADS_D4
8680         status = pthread_create(&t, pthread_attr_default, task, NULL);
8681 #else
8682         status = pthread_create(&t, NULL, task, NULL);
8683 #endif
8684
8685         if( status ) exit( status );
8686
8687         /* make sure pthread_detach() isn't just a stub */
8688 #if HAVE_PTHREADS_D4
8689         status = pthread_detach( &t );
8690 #else
8691         status = pthread_detach( t );
8692 #endif
8693
8694 #ifdef HAVE_LINUX_THREADS
8695         pthread_kill_other_threads_np();
8696 #endif
8697
8698         exit( status );
8699
8700 }
8701
8702 EOF
8703 if { (eval echo configure:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8704 then
8705   ol_cv_pthread_lpthreads_lexc=yes
8706 else
8707   echo "configure: failed program was:" >&5
8708   cat conftest.$ac_ext >&5
8709   rm -fr conftest*
8710   ol_cv_pthread_lpthreads_lexc=no
8711 fi
8712 rm -fr conftest*
8713 fi
8714
8715
8716                 # restore the LIBS
8717                 LIBS="$ol_LIBS"
8718         
8719 fi
8720
8721 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8722
8723         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8724                 ol_link_pthreads="-lpthreads -lexc"
8725                 ol_link_threads=posix
8726         fi
8727 fi
8728
8729
8730                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8731 if test "$ol_link_threads" = no ; then
8732         # try -lpthreads
8733         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8734 echo "configure:8735: checking for pthread link with -lpthreads" >&5
8735 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8736   echo $ac_n "(cached) $ac_c" 1>&6
8737 else
8738   
8739                 # save the flags
8740                 ol_LIBS="$LIBS"
8741                 LIBS="-lpthreads $LIBS"
8742
8743                 if test "$cross_compiling" = yes; then
8744   cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 /* pthread test headers */
8748 #include <pthread.h>
8749 #ifndef NULL
8750 #define NULL (void*)0
8751 #endif
8752
8753 static void *task(p)
8754         void *p;
8755 {
8756         return (void *) (p == NULL);
8757 }
8758
8759 int main() {
8760
8761         /* pthread test function */
8762         pthread_t t;
8763         int status;
8764
8765         /* make sure pthread_create() isn't just a stub */
8766 #if HAVE_PTHREADS_D4
8767         status = pthread_create(&t, pthread_attr_default, task, NULL);
8768 #else
8769         status = pthread_create(&t, NULL, task, NULL);
8770 #endif
8771
8772         if( status ) exit( status );
8773
8774         /* make sure pthread_detach() isn't just a stub */
8775 #if HAVE_PTHREADS_D4
8776         status = pthread_detach( &t );
8777 #else
8778         status = pthread_detach( t );
8779 #endif
8780
8781 #ifdef HAVE_LINUX_THREADS
8782         pthread_kill_other_threads_np();
8783 #endif
8784
8785         exit( status );
8786
8787 ; return 0; }
8788 EOF
8789 if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8790   rm -rf conftest*
8791   ol_cv_pthread_lib_lpthreads=yes
8792 else
8793   echo "configure: failed program was:" >&5
8794   cat conftest.$ac_ext >&5
8795   rm -rf conftest*
8796   ol_cv_pthread_lib_lpthreads=no
8797 fi
8798 rm -f conftest*
8799 else
8800   cat > conftest.$ac_ext <<EOF
8801 #line 8802 "configure"
8802 #include "confdefs.h"
8803 /* pthread test headers */
8804 #include <pthread.h>
8805 #ifndef NULL
8806 #define NULL (void*)0
8807 #endif
8808
8809 static void *task(p)
8810         void *p;
8811 {
8812         return (void *) (p == NULL);
8813 }
8814
8815
8816 int main(argc, argv)
8817         int argc;
8818         char **argv;
8819 {
8820
8821         /* pthread test function */
8822         pthread_t t;
8823         int status;
8824
8825         /* make sure pthread_create() isn't just a stub */
8826 #if HAVE_PTHREADS_D4
8827         status = pthread_create(&t, pthread_attr_default, task, NULL);
8828 #else
8829         status = pthread_create(&t, NULL, task, NULL);
8830 #endif
8831
8832         if( status ) exit( status );
8833
8834         /* make sure pthread_detach() isn't just a stub */
8835 #if HAVE_PTHREADS_D4
8836         status = pthread_detach( &t );
8837 #else
8838         status = pthread_detach( t );
8839 #endif
8840
8841 #ifdef HAVE_LINUX_THREADS
8842         pthread_kill_other_threads_np();
8843 #endif
8844
8845         exit( status );
8846
8847 }
8848
8849 EOF
8850 if { (eval echo configure:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8851 then
8852   ol_cv_pthread_lib_lpthreads=yes
8853 else
8854   echo "configure: failed program was:" >&5
8855   cat conftest.$ac_ext >&5
8856   rm -fr conftest*
8857   ol_cv_pthread_lib_lpthreads=no
8858 fi
8859 rm -fr conftest*
8860 fi
8861
8862
8863                 # restore the LIBS
8864                 LIBS="$ol_LIBS"
8865         
8866 fi
8867
8868 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8869
8870         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8871                 ol_link_pthreads="-lpthreads"
8872                 ol_link_threads=posix
8873         fi
8874 fi
8875
8876
8877                 if test $ol_link_threads != no ; then
8878                         cat >> confdefs.h <<\EOF
8879 #define HAVE_PTHREADS 1
8880 EOF
8881
8882
8883                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8884
8885                                                 save_CPPFLAGS="$CPPFLAGS"
8886                         save_LIBS="$LIBS"
8887                         LIBS="$LTHREAD_LIBS $LIBS"
8888
8889                                                                                                 for ac_func in sched_yield pthread_yield
8890 do
8891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8892 echo "configure:8893: checking for $ac_func" >&5
8893 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   cat > conftest.$ac_ext <<EOF
8897 #line 8898 "configure"
8898 #include "confdefs.h"
8899 /* System header to define __stub macros and hopefully few prototypes,
8900     which can conflict with char $ac_func(); below.  */
8901 #include <assert.h>
8902 /* Override any gcc2 internal prototype to avoid an error.  */
8903 /* We use char because int might match the return type of a gcc2
8904     builtin and then its argument prototype would still apply.  */
8905 char $ac_func();
8906 char (*f)();
8907
8908 int main() {
8909
8910 /* The GNU C library defines this for functions which it implements
8911     to always fail with ENOSYS.  Some functions are actually named
8912     something starting with __ and the normal name is an alias.  */
8913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8914 choke me
8915 #else
8916 f = $ac_func;
8917 #endif
8918
8919 ; return 0; }
8920 EOF
8921 if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8922   rm -rf conftest*
8923   eval "ac_cv_func_$ac_func=yes"
8924 else
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -rf conftest*
8928   eval "ac_cv_func_$ac_func=no"
8929 fi
8930 rm -f conftest*
8931 fi
8932
8933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8934   echo "$ac_t""yes" 1>&6
8935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8936   cat >> confdefs.h <<EOF
8937 #define $ac_tr_func 1
8938 EOF
8939  
8940 else
8941   echo "$ac_t""no" 1>&6
8942 fi
8943 done
8944
8945
8946                         if test $ac_cv_func_sched_yield = no -a \
8947                                 $ac_cv_func_pthread_yield = no ; then
8948                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8949 echo "configure:8950: checking for sched_yield in -lrt" >&5
8950 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8952   echo $ac_n "(cached) $ac_c" 1>&6
8953 else
8954   ac_save_LIBS="$LIBS"
8955 LIBS="-lrt  $LIBS"
8956 cat > conftest.$ac_ext <<EOF
8957 #line 8958 "configure"
8958 #include "confdefs.h"
8959 /* Override any gcc2 internal prototype to avoid an error.  */
8960 /* We use char because int might match the return type of a gcc2
8961     builtin and then its argument prototype would still apply.  */
8962 char sched_yield();
8963
8964 int main() {
8965 sched_yield()
8966 ; return 0; }
8967 EOF
8968 if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8969   rm -rf conftest*
8970   eval "ac_cv_lib_$ac_lib_var=yes"
8971 else
8972   echo "configure: failed program was:" >&5
8973   cat conftest.$ac_ext >&5
8974   rm -rf conftest*
8975   eval "ac_cv_lib_$ac_lib_var=no"
8976 fi
8977 rm -f conftest*
8978 LIBS="$ac_save_LIBS"
8979
8980 fi
8981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8982   echo "$ac_t""yes" 1>&6
8983   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8984                                         cat >> confdefs.h <<\EOF
8985 #define HAVE_SCHED_YIELD 1
8986 EOF
8987
8988                                         ac_cv_func_sched_yield=yes
8989 else
8990   echo "$ac_t""no" 1>&6
8991 ac_cv_func_sched_yield=no
8992 fi
8993
8994                         fi
8995                         if test $ac_cv_func_sched_yield = no -a \
8996                                 $ac_cv_func_pthread_yield = no ; then
8997                                                                                                 for ac_func in thr_yield
8998 do
8999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9000 echo "configure:9001: checking for $ac_func" >&5
9001 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9002   echo $ac_n "(cached) $ac_c" 1>&6
9003 else
9004   cat > conftest.$ac_ext <<EOF
9005 #line 9006 "configure"
9006 #include "confdefs.h"
9007 /* System header to define __stub macros and hopefully few prototypes,
9008     which can conflict with char $ac_func(); below.  */
9009 #include <assert.h>
9010 /* Override any gcc2 internal prototype to avoid an error.  */
9011 /* We use char because int might match the return type of a gcc2
9012     builtin and then its argument prototype would still apply.  */
9013 char $ac_func();
9014 char (*f)();
9015
9016 int main() {
9017
9018 /* The GNU C library defines this for functions which it implements
9019     to always fail with ENOSYS.  Some functions are actually named
9020     something starting with __ and the normal name is an alias.  */
9021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9022 choke me
9023 #else
9024 f = $ac_func;
9025 #endif
9026
9027 ; return 0; }
9028 EOF
9029 if { (eval echo configure:9030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9030   rm -rf conftest*
9031   eval "ac_cv_func_$ac_func=yes"
9032 else
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   eval "ac_cv_func_$ac_func=no"
9037 fi
9038 rm -f conftest*
9039 fi
9040
9041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9042   echo "$ac_t""yes" 1>&6
9043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9044   cat >> confdefs.h <<EOF
9045 #define $ac_tr_func 1
9046 EOF
9047  
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051 done
9052
9053                         fi
9054                         if test $ac_cv_func_sched_yield = no -a \
9055                                 $ac_cv_func_pthread_yield = no -a \
9056                                 "$ac_cv_func_thr_yield" = no ; then
9057                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9058                         fi
9059
9060                                                 for ac_func in pthread_kill
9061 do
9062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9063 echo "configure:9064: checking for $ac_func" >&5
9064 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9065   echo $ac_n "(cached) $ac_c" 1>&6
9066 else
9067   cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070 /* System header to define __stub macros and hopefully few prototypes,
9071     which can conflict with char $ac_func(); below.  */
9072 #include <assert.h>
9073 /* Override any gcc2 internal prototype to avoid an error.  */
9074 /* We use char because int might match the return type of a gcc2
9075     builtin and then its argument prototype would still apply.  */
9076 char $ac_func();
9077 char (*f)();
9078
9079 int main() {
9080
9081 /* The GNU C library defines this for functions which it implements
9082     to always fail with ENOSYS.  Some functions are actually named
9083     something starting with __ and the normal name is an alias.  */
9084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9085 choke me
9086 #else
9087 f = $ac_func;
9088 #endif
9089
9090 ; return 0; }
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9093   rm -rf conftest*
9094   eval "ac_cv_func_$ac_func=yes"
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_func_$ac_func=no"
9100 fi
9101 rm -f conftest*
9102 fi
9103
9104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9105   echo "$ac_t""yes" 1>&6
9106     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9107   cat >> confdefs.h <<EOF
9108 #define $ac_tr_func 1
9109 EOF
9110  
9111 else
9112   echo "$ac_t""no" 1>&6
9113 fi
9114 done
9115
9116
9117                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9118 echo "configure:9119: checking for pthread_detach with <pthread.h>" >&5
9119 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9120   echo $ac_n "(cached) $ac_c" 1>&6
9121 else
9122   
9123                                                                 cat > conftest.$ac_ext <<EOF
9124 #line 9125 "configure"
9125 #include "confdefs.h"
9126
9127 #include <pthread.h>
9128 #ifndef NULL
9129 #define NULL (void*)0
9130 #endif
9131
9132 int main() {
9133 pthread_detach(NULL);
9134 ; return 0; }
9135 EOF
9136 if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9137   rm -rf conftest*
9138   ol_cv_func_pthread_detach=yes
9139 else
9140   echo "configure: failed program was:" >&5
9141   cat conftest.$ac_ext >&5
9142   rm -rf conftest*
9143   ol_cv_func_pthread_detach=no
9144 fi
9145 rm -f conftest*
9146                         
9147 fi
9148
9149 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9150
9151                         if test $ol_cv_func_pthread_detach = no ; then
9152                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9153                         fi
9154
9155                         cat >> confdefs.h <<\EOF
9156 #define HAVE_PTHREAD_DETACH 1
9157 EOF
9158
9159
9160                                                 for ac_func in \
9161                                 pthread_setconcurrency \
9162                                 pthread_getconcurrency \
9163                                 thr_setconcurrency \
9164                                 thr_getconcurrency \
9165                         
9166 do
9167 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9168 echo "configure:9169: checking for $ac_func" >&5
9169 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9170   echo $ac_n "(cached) $ac_c" 1>&6
9171 else
9172   cat > conftest.$ac_ext <<EOF
9173 #line 9174 "configure"
9174 #include "confdefs.h"
9175 /* System header to define __stub macros and hopefully few prototypes,
9176     which can conflict with char $ac_func(); below.  */
9177 #include <assert.h>
9178 /* Override any gcc2 internal prototype to avoid an error.  */
9179 /* We use char because int might match the return type of a gcc2
9180     builtin and then its argument prototype would still apply.  */
9181 char $ac_func();
9182 char (*f)();
9183
9184 int main() {
9185
9186 /* The GNU C library defines this for functions which it implements
9187     to always fail with ENOSYS.  Some functions are actually named
9188     something starting with __ and the normal name is an alias.  */
9189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9190 choke me
9191 #else
9192 f = $ac_func;
9193 #endif
9194
9195 ; return 0; }
9196 EOF
9197 if { (eval echo configure:9198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9198   rm -rf conftest*
9199   eval "ac_cv_func_$ac_func=yes"
9200 else
9201   echo "configure: failed program was:" >&5
9202   cat conftest.$ac_ext >&5
9203   rm -rf conftest*
9204   eval "ac_cv_func_$ac_func=no"
9205 fi
9206 rm -f conftest*
9207 fi
9208
9209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9210   echo "$ac_t""yes" 1>&6
9211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9212   cat >> confdefs.h <<EOF
9213 #define $ac_tr_func 1
9214 EOF
9215  
9216 else
9217   echo "$ac_t""no" 1>&6
9218 fi
9219 done
9220
9221
9222                         
9223         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9224 echo "configure:9225: checking for pthread_kill_other_threads_np" >&5
9225 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231 /* System header to define __stub macros and hopefully few prototypes,
9232     which can conflict with char pthread_kill_other_threads_np(); below.  */
9233 #include <assert.h>
9234 /* Override any gcc2 internal prototype to avoid an error.  */
9235 /* We use char because int might match the return type of a gcc2
9236     builtin and then its argument prototype would still apply.  */
9237 char pthread_kill_other_threads_np();
9238 char (*f)();
9239
9240 int main() {
9241
9242 /* The GNU C library defines this for functions which it implements
9243     to always fail with ENOSYS.  Some functions are actually named
9244     something starting with __ and the normal name is an alias.  */
9245 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9246 choke me
9247 #else
9248 f = pthread_kill_other_threads_np;
9249 #endif
9250
9251 ; return 0; }
9252 EOF
9253 if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9254   rm -rf conftest*
9255   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9256 else
9257   echo "configure: failed program was:" >&5
9258   cat conftest.$ac_ext >&5
9259   rm -rf conftest*
9260   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9261 fi
9262 rm -f conftest*
9263 fi
9264
9265 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267   :
9268 else
9269   echo "$ac_t""no" 1>&6
9270 fi
9271
9272         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9273 echo "configure:9274: checking for LinuxThreads implementation" >&5
9274 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9278 fi
9279
9280 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9281
9282                         
9283         
9284         
9285         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9286 echo "configure:9287: checking for LinuxThreads consistency" >&5
9287 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9288   echo $ac_n "(cached) $ac_c" 1>&6
9289 else
9290   
9291                 if test $ol_cv_header_linux_threads = yes -a \
9292                         $ol_cv_sys_linux_threads = yes; then
9293                         ol_cv_linux_threads=yes
9294                 elif test $ol_cv_header_linux_threads = no -a \
9295                         $ol_cv_sys_linux_threads = no; then
9296                         ol_cv_linux_threads=no
9297                 else
9298                         ol_cv_linux_threads=error
9299                 fi
9300         
9301 fi
9302
9303 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9304
9305
9306                         if test $ol_cv_linux_threads = error; then
9307                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9308                         fi
9309
9310                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9311 echo "configure:9312: checking if pthread_create() works" >&5
9312 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9313   echo $ac_n "(cached) $ac_c" 1>&6
9314 else
9315   
9316                         if test "$cross_compiling" = yes; then
9317                                 ol_cv_pthread_create_works=yes
9318 else
9319   cat > conftest.$ac_ext <<EOF
9320 #line 9321 "configure"
9321 #include "confdefs.h"
9322 /* pthread test headers */
9323 #include <pthread.h>
9324 #ifndef NULL
9325 #define NULL (void*)0
9326 #endif
9327
9328 static void *task(p)
9329         void *p;
9330 {
9331         return (void *) (p == NULL);
9332 }
9333
9334
9335 int main(argc, argv)
9336         int argc;
9337         char **argv;
9338 {
9339
9340         /* pthread test function */
9341         pthread_t t;
9342         int status;
9343
9344         /* make sure pthread_create() isn't just a stub */
9345 #if HAVE_PTHREADS_D4
9346         status = pthread_create(&t, pthread_attr_default, task, NULL);
9347 #else
9348         status = pthread_create(&t, NULL, task, NULL);
9349 #endif
9350
9351         if( status ) exit( status );
9352
9353         /* make sure pthread_detach() isn't just a stub */
9354 #if HAVE_PTHREADS_D4
9355         status = pthread_detach( &t );
9356 #else
9357         status = pthread_detach( t );
9358 #endif
9359
9360 #ifdef HAVE_LINUX_THREADS
9361         pthread_kill_other_threads_np();
9362 #endif
9363
9364         exit( status );
9365
9366 }
9367
9368 EOF
9369 if { (eval echo configure:9370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9370 then
9371   ol_cv_pthread_create_works=yes
9372 else
9373   echo "configure: failed program was:" >&5
9374   cat conftest.$ac_ext >&5
9375   rm -fr conftest*
9376   ol_cv_pthread_create_works=no
9377 fi
9378 rm -fr conftest*
9379 fi
9380
9381 fi
9382
9383 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9384
9385                         if test $ol_cv_pthread_create_works = no ; then
9386                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9387                         fi
9388
9389                                                 if test $ol_with_yielding_select = auto ; then
9390                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9391 echo "configure:9392: checking if select yields when using pthreads" >&5
9392 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9393   echo $ac_n "(cached) $ac_c" 1>&6
9394 else
9395   
9396                                 if test "$cross_compiling" = yes; then
9397   ol_cv_pthread_select_yields=cross
9398 else
9399   cat > conftest.$ac_ext <<EOF
9400 #line 9401 "configure"
9401 #include "confdefs.h"
9402
9403 #include <sys/types.h>
9404 #include <sys/time.h>
9405 #include <unistd.h>
9406 #include <pthread.h>
9407 #ifndef NULL
9408 #define NULL (void*) 0
9409 #endif
9410
9411 static int fildes[2];
9412
9413 static void *task(p)
9414         void *p;
9415 {
9416         int i;
9417         struct timeval tv;
9418
9419         fd_set rfds;
9420
9421         tv.tv_sec=10;
9422         tv.tv_usec=0;
9423
9424         FD_ZERO(&rfds);
9425         FD_SET(fildes[0], &rfds);
9426
9427         /* we're not interested in any fds */
9428         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9429
9430         if(i < 0) {
9431                 perror("select");
9432                 exit(10);
9433         }
9434
9435         exit(0); /* if we exit here, the select blocked the whole process */
9436 }
9437
9438 int main(argc, argv)
9439         int argc;
9440         char **argv;
9441 {
9442         pthread_t t;
9443
9444         /* create a pipe to select */
9445         if(pipe(&fildes[0])) {
9446                 perror("select");
9447                 exit(1);
9448         }
9449
9450 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9451         (void) pthread_setconcurrency(2);
9452 #else
9453 #ifdef HAVE_THR_SETCONCURRENCY
9454         /* Set Solaris LWP concurrency to 2 */
9455         thr_setconcurrency(2);
9456 #endif
9457 #endif
9458
9459 #if HAVE_PTHREADS_D4
9460         pthread_create(&t, pthread_attr_default, task, NULL);
9461 #else
9462         pthread_create(&t, NULL, task, NULL);
9463 #endif
9464
9465 #if HAVE_SCHED_YIELD
9466         sched_yield();  /* make sure task runs first */
9467 #else
9468 #ifdef HAVE_PTHREAD_YIELD
9469         pthread_yield();        /* make sure task runs first */
9470 #endif
9471 #endif
9472
9473         exit(2);
9474 }
9475 EOF
9476 if { (eval echo configure:9477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9477 then
9478   ol_cv_pthread_select_yields=no
9479 else
9480   echo "configure: failed program was:" >&5
9481   cat conftest.$ac_ext >&5
9482   rm -fr conftest*
9483   ol_cv_pthread_select_yields=yes
9484 fi
9485 rm -fr conftest*
9486 fi
9487
9488 fi
9489
9490 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9491
9492                                 if test $ol_cv_pthread_select_yields = cross ; then
9493                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9494                                 fi
9495
9496                                 if test $ol_cv_pthread_select_yields = yes ; then
9497                                         ol_with_yielding_select=yes
9498                                 fi
9499                         fi
9500
9501                                                 CPPFLAGS="$save_CPPFLAGS"
9502                         LIBS="$save_LIBS"
9503                 else
9504                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9505                 fi
9506         fi
9507
9508         if test $ol_with_threads = posix ; then
9509                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9510         fi
9511 fi
9512
9513 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9514         -o $ol_with_threads = mach ; then
9515
9516                 for ac_hdr in mach/cthreads.h
9517 do
9518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9520 echo "configure:9521: checking for $ac_hdr" >&5
9521 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 #include <$ac_hdr>
9528 EOF
9529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9530 { (eval echo configure:9531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9532 if test -z "$ac_err"; then
9533   rm -rf conftest*
9534   eval "ac_cv_header_$ac_safe=yes"
9535 else
9536   echo "$ac_err" >&5
9537   echo "configure: failed program was:" >&5
9538   cat conftest.$ac_ext >&5
9539   rm -rf conftest*
9540   eval "ac_cv_header_$ac_safe=no"
9541 fi
9542 rm -f conftest*
9543 fi
9544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9545   echo "$ac_t""yes" 1>&6
9546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9547   cat >> confdefs.h <<EOF
9548 #define $ac_tr_hdr 1
9549 EOF
9550  
9551 else
9552   echo "$ac_t""no" 1>&6
9553 fi
9554 done
9555
9556         if test $ac_cv_header_mach_cthreads_h = yes ; then
9557                 ol_with_threads=found
9558
9559                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9560 echo "configure:9561: checking for cthread_fork" >&5
9561 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9562   echo $ac_n "(cached) $ac_c" 1>&6
9563 else
9564   cat > conftest.$ac_ext <<EOF
9565 #line 9566 "configure"
9566 #include "confdefs.h"
9567 /* System header to define __stub macros and hopefully few prototypes,
9568     which can conflict with char cthread_fork(); below.  */
9569 #include <assert.h>
9570 /* Override any gcc2 internal prototype to avoid an error.  */
9571 /* We use char because int might match the return type of a gcc2
9572     builtin and then its argument prototype would still apply.  */
9573 char cthread_fork();
9574 char (*f)();
9575
9576 int main() {
9577
9578 /* The GNU C library defines this for functions which it implements
9579     to always fail with ENOSYS.  Some functions are actually named
9580     something starting with __ and the normal name is an alias.  */
9581 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9582 choke me
9583 #else
9584 f = cthread_fork;
9585 #endif
9586
9587 ; return 0; }
9588 EOF
9589 if { (eval echo configure:9590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9590   rm -rf conftest*
9591   eval "ac_cv_func_cthread_fork=yes"
9592 else
9593   echo "configure: failed program was:" >&5
9594   cat conftest.$ac_ext >&5
9595   rm -rf conftest*
9596   eval "ac_cv_func_cthread_fork=no"
9597 fi
9598 rm -f conftest*
9599 fi
9600
9601 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9602   echo "$ac_t""yes" 1>&6
9603   ol_link_threads=yes
9604 else
9605   echo "$ac_t""no" 1>&6
9606 fi
9607
9608
9609                 if test $ol_link_threads = no ; then
9610                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9611 echo "configure:9612: checking for cthread_fork with -all_load" >&5
9612 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9613   echo $ac_n "(cached) $ac_c" 1>&6
9614 else
9615   
9616                                                                 save_LIBS="$LIBS"
9617                                 LIBS="-all_load $LIBS"
9618                                 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 #include <mach/cthreads.h>
9622 int main() {
9623
9624                                         cthread_fork((void *)0, (void *)0);
9625                                         
9626 ; return 0; }
9627 EOF
9628 if { (eval echo configure:9629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9629   rm -rf conftest*
9630   ol_cv_cthread_all_load=yes
9631 else
9632   echo "configure: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   rm -rf conftest*
9635   ol_cv_cthread_all_load=no
9636 fi
9637 rm -f conftest*
9638                                                                 LIBS="$save_LIBS"
9639                         
9640 fi
9641
9642 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9643
9644                         if test $ol_cv_cthread_all_load = yes ; then
9645                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9646                                 ol_link_threads=mach
9647                         fi
9648                 fi
9649
9650                 if test $ol_link_threads != no ; then
9651                         : check for cthread specific functionality here
9652                         cat >> confdefs.h <<\EOF
9653 #define HAVE_MACH_CTHREADS 1
9654 EOF
9655
9656                 else
9657                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9658                 fi
9659         fi
9660
9661         if test $ol_with_threads = mach ; then
9662                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9663         fi
9664 fi
9665
9666 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9667         -o $ol_with_threads = lwp ; then
9668
9669                 for ac_hdr in thread.h synch.h
9670 do
9671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9673 echo "configure:9674: checking for $ac_hdr" >&5
9674 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9675   echo $ac_n "(cached) $ac_c" 1>&6
9676 else
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 #include <$ac_hdr>
9681 EOF
9682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9683 { (eval echo configure:9684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9685 if test -z "$ac_err"; then
9686   rm -rf conftest*
9687   eval "ac_cv_header_$ac_safe=yes"
9688 else
9689   echo "$ac_err" >&5
9690   echo "configure: failed program was:" >&5
9691   cat conftest.$ac_ext >&5
9692   rm -rf conftest*
9693   eval "ac_cv_header_$ac_safe=no"
9694 fi
9695 rm -f conftest*
9696 fi
9697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9698   echo "$ac_t""yes" 1>&6
9699     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9700   cat >> confdefs.h <<EOF
9701 #define $ac_tr_hdr 1
9702 EOF
9703  
9704 else
9705   echo "$ac_t""no" 1>&6
9706 fi
9707 done
9708
9709         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9710                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9711 echo "configure:9712: checking for thr_create in -lthread" >&5
9712 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9713 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   ac_save_LIBS="$LIBS"
9717 LIBS="-lthread  $LIBS"
9718 cat > conftest.$ac_ext <<EOF
9719 #line 9720 "configure"
9720 #include "confdefs.h"
9721 /* Override any gcc2 internal prototype to avoid an error.  */
9722 /* We use char because int might match the return type of a gcc2
9723     builtin and then its argument prototype would still apply.  */
9724 char thr_create();
9725
9726 int main() {
9727 thr_create()
9728 ; return 0; }
9729 EOF
9730 if { (eval echo configure:9731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9731   rm -rf conftest*
9732   eval "ac_cv_lib_$ac_lib_var=yes"
9733 else
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -rf conftest*
9737   eval "ac_cv_lib_$ac_lib_var=no"
9738 fi
9739 rm -f conftest*
9740 LIBS="$ac_save_LIBS"
9741
9742 fi
9743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9744   echo "$ac_t""yes" 1>&6
9745   have_thr=yes
9746 else
9747   echo "$ac_t""no" 1>&6
9748 have_thr=no
9749 fi
9750
9751
9752                 if test $have_thr = yes ; then
9753                         cat >> confdefs.h <<\EOF
9754 #define HAVE_THR 1
9755 EOF
9756
9757                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9758                         ol_link_threads=thr
9759
9760                         if test $ol_with_yielding_select = auto ; then
9761                                 ol_with_yielding_select=yes
9762                         fi
9763
9764                                                 for ac_func in \
9765                                 thr_setconcurrency \
9766                                 thr_getconcurrency \
9767                         
9768 do
9769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9770 echo "configure:9771: checking for $ac_func" >&5
9771 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 /* System header to define __stub macros and hopefully few prototypes,
9778     which can conflict with char $ac_func(); below.  */
9779 #include <assert.h>
9780 /* Override any gcc2 internal prototype to avoid an error.  */
9781 /* We use char because int might match the return type of a gcc2
9782     builtin and then its argument prototype would still apply.  */
9783 char $ac_func();
9784 char (*f)();
9785
9786 int main() {
9787
9788 /* The GNU C library defines this for functions which it implements
9789     to always fail with ENOSYS.  Some functions are actually named
9790     something starting with __ and the normal name is an alias.  */
9791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9792 choke me
9793 #else
9794 f = $ac_func;
9795 #endif
9796
9797 ; return 0; }
9798 EOF
9799 if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9800   rm -rf conftest*
9801   eval "ac_cv_func_$ac_func=yes"
9802 else
9803   echo "configure: failed program was:" >&5
9804   cat conftest.$ac_ext >&5
9805   rm -rf conftest*
9806   eval "ac_cv_func_$ac_func=no"
9807 fi
9808 rm -f conftest*
9809 fi
9810
9811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9812   echo "$ac_t""yes" 1>&6
9813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9814   cat >> confdefs.h <<EOF
9815 #define $ac_tr_func 1
9816 EOF
9817  
9818 else
9819   echo "$ac_t""no" 1>&6
9820 fi
9821 done
9822
9823                 fi
9824         fi
9825
9826                 for ac_hdr in lwp/lwp.h
9827 do
9828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9830 echo "configure:9831: checking for $ac_hdr" >&5
9831 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9832   echo $ac_n "(cached) $ac_c" 1>&6
9833 else
9834   cat > conftest.$ac_ext <<EOF
9835 #line 9836 "configure"
9836 #include "confdefs.h"
9837 #include <$ac_hdr>
9838 EOF
9839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9840 { (eval echo configure:9841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9842 if test -z "$ac_err"; then
9843   rm -rf conftest*
9844   eval "ac_cv_header_$ac_safe=yes"
9845 else
9846   echo "$ac_err" >&5
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -rf conftest*
9850   eval "ac_cv_header_$ac_safe=no"
9851 fi
9852 rm -f conftest*
9853 fi
9854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9855   echo "$ac_t""yes" 1>&6
9856     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9857   cat >> confdefs.h <<EOF
9858 #define $ac_tr_hdr 1
9859 EOF
9860  
9861 else
9862   echo "$ac_t""no" 1>&6
9863 fi
9864 done
9865
9866         if test $ac_cv_header_lwp_lwp_h = yes ; then
9867                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9868 echo "configure:9869: checking for lwp_create in -llwp" >&5
9869 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9871   echo $ac_n "(cached) $ac_c" 1>&6
9872 else
9873   ac_save_LIBS="$LIBS"
9874 LIBS="-llwp  $LIBS"
9875 cat > conftest.$ac_ext <<EOF
9876 #line 9877 "configure"
9877 #include "confdefs.h"
9878 /* Override any gcc2 internal prototype to avoid an error.  */
9879 /* We use char because int might match the return type of a gcc2
9880     builtin and then its argument prototype would still apply.  */
9881 char lwp_create();
9882
9883 int main() {
9884 lwp_create()
9885 ; return 0; }
9886 EOF
9887 if { (eval echo configure:9888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9888   rm -rf conftest*
9889   eval "ac_cv_lib_$ac_lib_var=yes"
9890 else
9891   echo "configure: failed program was:" >&5
9892   cat conftest.$ac_ext >&5
9893   rm -rf conftest*
9894   eval "ac_cv_lib_$ac_lib_var=no"
9895 fi
9896 rm -f conftest*
9897 LIBS="$ac_save_LIBS"
9898
9899 fi
9900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9901   echo "$ac_t""yes" 1>&6
9902   have_lwp=yes
9903 else
9904   echo "$ac_t""no" 1>&6
9905 have_lwp=no
9906 fi
9907
9908
9909                 if test $have_lwp = yes ; then
9910                         cat >> confdefs.h <<\EOF
9911 #define HAVE_LWP 1
9912 EOF
9913
9914                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9915                         ol_link_threads=lwp
9916
9917                         if test $ol_with_yielding_select = auto ; then
9918                                 ol_with_yielding_select=no
9919                         fi
9920                 fi
9921         fi
9922 fi
9923
9924 if test $ol_with_yielding_select = yes ; then
9925         cat >> confdefs.h <<\EOF
9926 #define HAVE_YIELDING_SELECT 1
9927 EOF
9928
9929 fi
9930
9931 if test $ol_with_threads = manual ; then
9932                 ol_link_threads=yes
9933
9934         echo "configure: warning: thread defines and link options must be set manually" 1>&2
9935
9936         for ac_hdr in pthread.h sched.h
9937 do
9938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9940 echo "configure:9941: checking for $ac_hdr" >&5
9941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9942   echo $ac_n "(cached) $ac_c" 1>&6
9943 else
9944   cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 #include <$ac_hdr>
9948 EOF
9949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9950 { (eval echo configure:9951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9952 if test -z "$ac_err"; then
9953   rm -rf conftest*
9954   eval "ac_cv_header_$ac_safe=yes"
9955 else
9956   echo "$ac_err" >&5
9957   echo "configure: failed program was:" >&5
9958   cat conftest.$ac_ext >&5
9959   rm -rf conftest*
9960   eval "ac_cv_header_$ac_safe=no"
9961 fi
9962 rm -f conftest*
9963 fi
9964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9965   echo "$ac_t""yes" 1>&6
9966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9967   cat >> confdefs.h <<EOF
9968 #define $ac_tr_hdr 1
9969 EOF
9970  
9971 else
9972   echo "$ac_t""no" 1>&6
9973 fi
9974 done
9975
9976         for ac_func in sched_yield pthread_yield
9977 do
9978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9979 echo "configure:9980: checking for $ac_func" >&5
9980 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9981   echo $ac_n "(cached) $ac_c" 1>&6
9982 else
9983   cat > conftest.$ac_ext <<EOF
9984 #line 9985 "configure"
9985 #include "confdefs.h"
9986 /* System header to define __stub macros and hopefully few prototypes,
9987     which can conflict with char $ac_func(); below.  */
9988 #include <assert.h>
9989 /* Override any gcc2 internal prototype to avoid an error.  */
9990 /* We use char because int might match the return type of a gcc2
9991     builtin and then its argument prototype would still apply.  */
9992 char $ac_func();
9993 char (*f)();
9994
9995 int main() {
9996
9997 /* The GNU C library defines this for functions which it implements
9998     to always fail with ENOSYS.  Some functions are actually named
9999     something starting with __ and the normal name is an alias.  */
10000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10001 choke me
10002 #else
10003 f = $ac_func;
10004 #endif
10005
10006 ; return 0; }
10007 EOF
10008 if { (eval echo configure:10009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10009   rm -rf conftest*
10010   eval "ac_cv_func_$ac_func=yes"
10011 else
10012   echo "configure: failed program was:" >&5
10013   cat conftest.$ac_ext >&5
10014   rm -rf conftest*
10015   eval "ac_cv_func_$ac_func=no"
10016 fi
10017 rm -f conftest*
10018 fi
10019
10020 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10021   echo "$ac_t""yes" 1>&6
10022     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10023   cat >> confdefs.h <<EOF
10024 #define $ac_tr_func 1
10025 EOF
10026  
10027 else
10028   echo "$ac_t""no" 1>&6
10029 fi
10030 done
10031
10032         
10033         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10034 echo "configure:10035: checking for LinuxThreads pthread.h" >&5
10035 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10036   echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038   cat > conftest.$ac_ext <<EOF
10039 #line 10040 "configure"
10040 #include "confdefs.h"
10041 #include <pthread.h>
10042 EOF
10043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10044   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10045   rm -rf conftest*
10046   ol_cv_header_linux_threads=yes
10047 else
10048   rm -rf conftest*
10049   ol_cv_header_linux_threads=no
10050 fi
10051 rm -f conftest*
10052
10053                 
10054 fi
10055
10056 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10057         if test $ol_cv_header_linux_threads = yes; then
10058                 cat >> confdefs.h <<\EOF
10059 #define HAVE_LINUX_THREADS 1
10060 EOF
10061
10062         fi
10063
10064
10065         for ac_hdr in mach/cthreads.h
10066 do
10067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10068 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10069 echo "configure:10070: checking for $ac_hdr" >&5
10070 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   cat > conftest.$ac_ext <<EOF
10074 #line 10075 "configure"
10075 #include "confdefs.h"
10076 #include <$ac_hdr>
10077 EOF
10078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10079 { (eval echo configure:10080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10081 if test -z "$ac_err"; then
10082   rm -rf conftest*
10083   eval "ac_cv_header_$ac_safe=yes"
10084 else
10085   echo "$ac_err" >&5
10086   echo "configure: failed program was:" >&5
10087   cat conftest.$ac_ext >&5
10088   rm -rf conftest*
10089   eval "ac_cv_header_$ac_safe=no"
10090 fi
10091 rm -f conftest*
10092 fi
10093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10094   echo "$ac_t""yes" 1>&6
10095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10096   cat >> confdefs.h <<EOF
10097 #define $ac_tr_hdr 1
10098 EOF
10099  
10100 else
10101   echo "$ac_t""no" 1>&6
10102 fi
10103 done
10104
10105         for ac_hdr in lwp/lwp.h
10106 do
10107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10109 echo "configure:10110: checking for $ac_hdr" >&5
10110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 #include <$ac_hdr>
10117 EOF
10118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10119 { (eval echo configure:10120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10121 if test -z "$ac_err"; then
10122   rm -rf conftest*
10123   eval "ac_cv_header_$ac_safe=yes"
10124 else
10125   echo "$ac_err" >&5
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_header_$ac_safe=no"
10130 fi
10131 rm -f conftest*
10132 fi
10133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10134   echo "$ac_t""yes" 1>&6
10135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10136   cat >> confdefs.h <<EOF
10137 #define $ac_tr_hdr 1
10138 EOF
10139  
10140 else
10141   echo "$ac_t""no" 1>&6
10142 fi
10143 done
10144
10145         for ac_hdr in thread.h synch.h
10146 do
10147 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10148 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10149 echo "configure:10150: checking for $ac_hdr" >&5
10150 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10151   echo $ac_n "(cached) $ac_c" 1>&6
10152 else
10153   cat > conftest.$ac_ext <<EOF
10154 #line 10155 "configure"
10155 #include "confdefs.h"
10156 #include <$ac_hdr>
10157 EOF
10158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10159 { (eval echo configure:10160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10161 if test -z "$ac_err"; then
10162   rm -rf conftest*
10163   eval "ac_cv_header_$ac_safe=yes"
10164 else
10165   echo "$ac_err" >&5
10166   echo "configure: failed program was:" >&5
10167   cat conftest.$ac_ext >&5
10168   rm -rf conftest*
10169   eval "ac_cv_header_$ac_safe=no"
10170 fi
10171 rm -f conftest*
10172 fi
10173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10174   echo "$ac_t""yes" 1>&6
10175     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10176   cat >> confdefs.h <<EOF
10177 #define $ac_tr_hdr 1
10178 EOF
10179  
10180 else
10181   echo "$ac_t""no" 1>&6
10182 fi
10183 done
10184
10185 fi
10186
10187 if test $ol_link_threads != no ; then  
10188                         cat >> confdefs.h <<\EOF
10189 #define REENTRANT 1
10190 EOF
10191
10192         cat >> confdefs.h <<\EOF
10193 #define _REENTRANT 1
10194 EOF
10195
10196         cat >> confdefs.h <<\EOF
10197 #define THREAD_SAFE 1
10198 EOF
10199
10200         cat >> confdefs.h <<\EOF
10201 #define _THREAD_SAFE 1
10202 EOF
10203
10204         cat >> confdefs.h <<\EOF
10205 #define THREADSAFE 1
10206 EOF
10207
10208         cat >> confdefs.h <<\EOF
10209 #define _THREADSAFE 1
10210 EOF
10211
10212         cat >> confdefs.h <<\EOF
10213 #define _SGI_MP_SOURCE 1
10214 EOF
10215
10216
10217                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10218 echo "configure:10219: checking for thread specific errno" >&5
10219 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10220   echo $ac_n "(cached) $ac_c" 1>&6
10221 else
10222   
10223                 cat > conftest.$ac_ext <<EOF
10224 #line 10225 "configure"
10225 #include "confdefs.h"
10226 #include <errno.h>
10227 int main() {
10228 errno = 0;
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10232   rm -rf conftest*
10233   ol_cv_errno_thread_specific=yes
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   ol_cv_errno_thread_specific=no
10239 fi
10240 rm -f conftest*
10241         
10242 fi
10243
10244 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10245
10246                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10247 echo "configure:10248: checking for thread specific h_errno" >&5
10248 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10249   echo $ac_n "(cached) $ac_c" 1>&6
10250 else
10251   
10252                 cat > conftest.$ac_ext <<EOF
10253 #line 10254 "configure"
10254 #include "confdefs.h"
10255 #include <netdb.h>
10256 int main() {
10257 h_errno = 0;
10258 ; return 0; }
10259 EOF
10260 if { (eval echo configure:10261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10261   rm -rf conftest*
10262   ol_cv_h_errno_thread_specific=yes
10263 else
10264   echo "configure: failed program was:" >&5
10265   cat conftest.$ac_ext >&5
10266   rm -rf conftest*
10267   ol_cv_h_errno_thread_specific=no
10268 fi
10269 rm -f conftest*
10270         
10271 fi
10272
10273 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10274
10275         if test $ol_cv_errno_thread_specific != yes \
10276                 -o $ol_cv_h_errno_thread_specific != yes ; then
10277                 LIBS="$LTHREAD_LIBS $LIBS"
10278                 LTHREAD_LIBS=""
10279         fi
10280
10281 fi  
10282
10283 if test $ol_link_threads = no ; then
10284         if test $ol_with_threads = yes ; then
10285                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10286         fi
10287
10288         if test $ol_with_threads = auto ; then
10289                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10290                 ol_with_threads=no
10291         fi
10292
10293         cat >> confdefs.h <<\EOF
10294 #define NO_THREADS 1
10295 EOF
10296
10297         LTHREAD_LIBS=""
10298 fi
10299
10300 if test $ol_link_threads != no ; then
10301         cat >> confdefs.h <<\EOF
10302 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10303 EOF
10304
10305 fi
10306
10307
10308 ol_link_ldbm=no 
10309 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10310         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10311 echo "configure:10312: checking for DB2 library" >&5
10312 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10313   echo $ac_n "(cached) $ac_c" 1>&6
10314 else
10315         ol_LIBS="$LIBS"
10316         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10317 echo "configure:10318: checking for db_open in -ldb" >&5
10318 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   ac_save_LIBS="$LIBS"
10323 LIBS="-ldb  $LIBS"
10324 cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 /* Override any gcc2 internal prototype to avoid an error.  */
10328 /* We use char because int might match the return type of a gcc2
10329     builtin and then its argument prototype would still apply.  */
10330 char db_open();
10331
10332 int main() {
10333 db_open()
10334 ; return 0; }
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10337   rm -rf conftest*
10338   eval "ac_cv_lib_$ac_lib_var=yes"
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   eval "ac_cv_lib_$ac_lib_var=no"
10344 fi
10345 rm -f conftest*
10346 LIBS="$ac_save_LIBS"
10347
10348 fi
10349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351   ol_cv_lib_db2=-ldb
10352 else
10353   echo "$ac_t""no" 1>&6
10354 ol_cv_lib_db2=no
10355 fi
10356
10357         LIBS="$ol_LIBS"
10358
10359 fi
10360
10361 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10362
10363 for ac_hdr in db.h
10364 do
10365 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10366 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10367 echo "configure:10368: checking for $ac_hdr" >&5
10368 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   cat > conftest.$ac_ext <<EOF
10372 #line 10373 "configure"
10373 #include "confdefs.h"
10374 #include <$ac_hdr>
10375 EOF
10376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10377 { (eval echo configure:10378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10379 if test -z "$ac_err"; then
10380   rm -rf conftest*
10381   eval "ac_cv_header_$ac_safe=yes"
10382 else
10383   echo "$ac_err" >&5
10384   echo "configure: failed program was:" >&5
10385   cat conftest.$ac_ext >&5
10386   rm -rf conftest*
10387   eval "ac_cv_header_$ac_safe=no"
10388 fi
10389 rm -f conftest*
10390 fi
10391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10392   echo "$ac_t""yes" 1>&6
10393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10394   cat >> confdefs.h <<EOF
10395 #define $ac_tr_hdr 1
10396 EOF
10397  
10398 else
10399   echo "$ac_t""no" 1>&6
10400 fi
10401 done
10402
10403 if test $ac_cv_header_db_h = yes ; then
10404         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10405 echo "configure:10406: checking if db.h is DB2" >&5
10406 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10407   echo $ac_n "(cached) $ac_c" 1>&6
10408 else
10409   
10410                 cat > conftest.$ac_ext <<EOF
10411 #line 10412 "configure"
10412 #include "confdefs.h"
10413
10414 #                       include <db.h>
10415                         /* this check could be improved */
10416 #                       ifdef DB_VERSION_MAJOR
10417 #                               if DB_VERSION_MAJOR == 2
10418                                         __db_version_2
10419 #                               endif
10420 #                       endif
10421                 
10422 EOF
10423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10424   egrep "__db_version_2" >/dev/null 2>&1; then
10425   rm -rf conftest*
10426   ol_cv_header_db2=yes
10427 else
10428   rm -rf conftest*
10429   ol_cv_header_db2=no
10430 fi
10431 rm -f conftest*
10432
10433 fi
10434
10435 echo "$ac_t""$ol_cv_header_db2" 1>&6
10436 else
10437         ol_cv_header_db2=no
10438 fi
10439
10440
10441  
10442  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10443 echo "configure:10444: checking for Berkeley DB2" >&5
10444 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   
10448         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10449                 ol_cv_berkeley_db2=no
10450         else
10451                 ol_cv_berkeley_db2=yes
10452         fi
10453
10454 fi
10455
10456 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10457  if test $ol_cv_berkeley_db2 = yes ; then
10458         cat >> confdefs.h <<\EOF
10459 #define HAVE_BERKELEY_DB2 1
10460 EOF
10461
10462  fi
10463
10464
10465         if test $ol_cv_berkeley_db2 = yes ; then
10466                 ol_link_ldbm=db2
10467                 ol_with_ldbm_api=db2
10468
10469                 if test $ol_with_ldbm_type = hash ; then
10470                         cat >> confdefs.h <<\EOF
10471 #define LDBM_USE_DBHASH 1
10472 EOF
10473
10474                 else
10475                         cat >> confdefs.h <<\EOF
10476 #define LDBM_USE_DBBTREE 1
10477 EOF
10478
10479                 fi
10480
10481                                                 if test $ol_cv_lib_db2 != yes ; then
10482                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10483                 fi
10484         fi
10485 fi
10486
10487 ol_link_bdb2=no
10488 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10489         ol_link_bdb2=yes
10490 fi
10491
10492 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10493         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10494 echo "configure:10495: checking for Berkeley DB library" >&5
10495 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10496   echo $ac_n "(cached) $ac_c" 1>&6
10497 else
10498   
10499         for ac_hdr in db1/db.h
10500 do
10501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10503 echo "configure:10504: checking for $ac_hdr" >&5
10504 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10505   echo $ac_n "(cached) $ac_c" 1>&6
10506 else
10507   cat > conftest.$ac_ext <<EOF
10508 #line 10509 "configure"
10509 #include "confdefs.h"
10510 #include <$ac_hdr>
10511 EOF
10512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10513 { (eval echo configure:10514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10515 if test -z "$ac_err"; then
10516   rm -rf conftest*
10517   eval "ac_cv_header_$ac_safe=yes"
10518 else
10519   echo "$ac_err" >&5
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -rf conftest*
10523   eval "ac_cv_header_$ac_safe=no"
10524 fi
10525 rm -f conftest*
10526 fi
10527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10528   echo "$ac_t""yes" 1>&6
10529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10530   cat >> confdefs.h <<EOF
10531 #define $ac_tr_hdr 1
10532 EOF
10533  
10534 else
10535   echo "$ac_t""no" 1>&6
10536 fi
10537 done
10538
10539         ol_LIBS="$LIBS"
10540         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10541 echo "configure:10542: checking for dbopen" >&5
10542 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10543   echo $ac_n "(cached) $ac_c" 1>&6
10544 else
10545   cat > conftest.$ac_ext <<EOF
10546 #line 10547 "configure"
10547 #include "confdefs.h"
10548 /* System header to define __stub macros and hopefully few prototypes,
10549     which can conflict with char dbopen(); below.  */
10550 #include <assert.h>
10551 /* Override any gcc2 internal prototype to avoid an error.  */
10552 /* We use char because int might match the return type of a gcc2
10553     builtin and then its argument prototype would still apply.  */
10554 char dbopen();
10555 char (*f)();
10556
10557 int main() {
10558
10559 /* The GNU C library defines this for functions which it implements
10560     to always fail with ENOSYS.  Some functions are actually named
10561     something starting with __ and the normal name is an alias.  */
10562 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10563 choke me
10564 #else
10565 f = dbopen;
10566 #endif
10567
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_func_dbopen=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_func_dbopen=no"
10578 fi
10579 rm -f conftest*
10580 fi
10581
10582 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10583   echo "$ac_t""yes" 1>&6
10584   ol_cv_lib_db=yes
10585 else
10586   echo "$ac_t""no" 1>&6
10587
10588                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10589 echo "configure:10590: checking for dbopen in -ldb1" >&5
10590 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10592   echo $ac_n "(cached) $ac_c" 1>&6
10593 else
10594   ac_save_LIBS="$LIBS"
10595 LIBS="-ldb1  $LIBS"
10596 cat > conftest.$ac_ext <<EOF
10597 #line 10598 "configure"
10598 #include "confdefs.h"
10599 /* Override any gcc2 internal prototype to avoid an error.  */
10600 /* We use char because int might match the return type of a gcc2
10601     builtin and then its argument prototype would still apply.  */
10602 char dbopen();
10603
10604 int main() {
10605 dbopen()
10606 ; return 0; }
10607 EOF
10608 if { (eval echo configure:10609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10609   rm -rf conftest*
10610   eval "ac_cv_lib_$ac_lib_var=yes"
10611 else
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   eval "ac_cv_lib_$ac_lib_var=no"
10616 fi
10617 rm -f conftest*
10618 LIBS="$ac_save_LIBS"
10619
10620 fi
10621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10622   echo "$ac_t""yes" 1>&6
10623   ol_cv_lib_db=-ldb1
10624 else
10625   echo "$ac_t""no" 1>&6
10626
10627                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10628 echo "configure:10629: checking for dbopen in -ldb" >&5
10629 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10630 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10631   echo $ac_n "(cached) $ac_c" 1>&6
10632 else
10633   ac_save_LIBS="$LIBS"
10634 LIBS="-ldb  $LIBS"
10635 cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638 /* Override any gcc2 internal prototype to avoid an error.  */
10639 /* We use char because int might match the return type of a gcc2
10640     builtin and then its argument prototype would still apply.  */
10641 char dbopen();
10642
10643 int main() {
10644 dbopen()
10645 ; return 0; }
10646 EOF
10647 if { (eval echo configure:10648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10648   rm -rf conftest*
10649   eval "ac_cv_lib_$ac_lib_var=yes"
10650 else
10651   echo "configure: failed program was:" >&5
10652   cat conftest.$ac_ext >&5
10653   rm -rf conftest*
10654   eval "ac_cv_lib_$ac_lib_var=no"
10655 fi
10656 rm -f conftest*
10657 LIBS="$ac_save_LIBS"
10658
10659 fi
10660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10661   echo "$ac_t""yes" 1>&6
10662   ol_cv_lib_db=-ldb
10663 else
10664   echo "$ac_t""no" 1>&6
10665 ol_cv_lib_db=no
10666 fi
10667
10668                 
10669 fi
10670
10671         
10672 fi
10673
10674         LIBS="$ol_LIBS"
10675
10676 fi
10677
10678 echo "$ac_t""$ol_cv_lib_db" 1>&6
10679
10680
10681 for ac_hdr in db_185.h
10682 do
10683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10685 echo "configure:10686: checking for $ac_hdr" >&5
10686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   cat > conftest.$ac_ext <<EOF
10690 #line 10691 "configure"
10691 #include "confdefs.h"
10692 #include <$ac_hdr>
10693 EOF
10694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10695 { (eval echo configure:10696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10697 if test -z "$ac_err"; then
10698   rm -rf conftest*
10699   eval "ac_cv_header_$ac_safe=yes"
10700 else
10701   echo "$ac_err" >&5
10702   echo "configure: failed program was:" >&5
10703   cat conftest.$ac_ext >&5
10704   rm -rf conftest*
10705   eval "ac_cv_header_$ac_safe=no"
10706 fi
10707 rm -f conftest*
10708 fi
10709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10710   echo "$ac_t""yes" 1>&6
10711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10712   cat >> confdefs.h <<EOF
10713 #define $ac_tr_hdr 1
10714 EOF
10715  
10716 else
10717   echo "$ac_t""no" 1>&6
10718 fi
10719 done
10720
10721 if test "$ol_cv_header_db2" = yes ; then
10722         
10723         ol_cv_header_db=$ac_cv_header_db_185_h
10724 else
10725         ol_cv_header_db=$ac_cv_header_db_h
10726 fi
10727
10728
10729  
10730  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10731 echo "configure:10732: checking for Berkeley DB" >&5
10732 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10733   echo $ac_n "(cached) $ac_c" 1>&6
10734 else
10735   
10736         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10737                 ol_cv_berkeley_db=no
10738         else
10739                 ol_cv_berkeley_db=yes
10740         fi
10741
10742 fi
10743
10744 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10745  if test $ol_cv_berkeley_db = yes ; then
10746         cat >> confdefs.h <<\EOF
10747 #define HAVE_BERKELEY_DB 1
10748 EOF
10749
10750  fi
10751
10752
10753         if test $ol_cv_berkeley_db = yes ; then
10754                 ol_link_ldbm=db
10755                 ol_with_ldbm_api=db
10756
10757                 if test $ol_with_ldbm_type = hash ; then
10758                         cat >> confdefs.h <<\EOF
10759 #define LDBM_USE_DBHASH 1
10760 EOF
10761
10762                 else
10763                         cat >> confdefs.h <<\EOF
10764 #define LDBM_USE_DBBTREE 1
10765 EOF
10766
10767                 fi
10768
10769                                                 if test $ol_cv_lib_db != yes ; then
10770                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10771                 fi
10772         fi
10773 fi
10774
10775 if test $ol_with_ldbm_api = manual ; then
10776                 ol_link_ldbm=yes
10777
10778         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10779
10780         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10781 do
10782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10784 echo "configure:10785: checking for $ac_hdr" >&5
10785 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791 #include <$ac_hdr>
10792 EOF
10793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10794 { (eval echo configure:10795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10796 if test -z "$ac_err"; then
10797   rm -rf conftest*
10798   eval "ac_cv_header_$ac_safe=yes"
10799 else
10800   echo "$ac_err" >&5
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   eval "ac_cv_header_$ac_safe=no"
10805 fi
10806 rm -f conftest*
10807 fi
10808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10809   echo "$ac_t""yes" 1>&6
10810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10811   cat >> confdefs.h <<EOF
10812 #define $ac_tr_hdr 1
10813 EOF
10814  
10815 else
10816   echo "$ac_t""no" 1>&6
10817 fi
10818 done
10819
10820 fi
10821
10822 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10823         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10824         ol_with_ldbm_api=none
10825 fi
10826
10827 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10828         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10829 echo "configure:10830: checking for MDBM library" >&5
10830 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10831   echo $ac_n "(cached) $ac_c" 1>&6
10832 else
10833         ol_LIBS="$LIBS"
10834         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10835 echo "configure:10836: checking for mdbm_set_chain" >&5
10836 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10837   echo $ac_n "(cached) $ac_c" 1>&6
10838 else
10839   cat > conftest.$ac_ext <<EOF
10840 #line 10841 "configure"
10841 #include "confdefs.h"
10842 /* System header to define __stub macros and hopefully few prototypes,
10843     which can conflict with char mdbm_set_chain(); below.  */
10844 #include <assert.h>
10845 /* Override any gcc2 internal prototype to avoid an error.  */
10846 /* We use char because int might match the return type of a gcc2
10847     builtin and then its argument prototype would still apply.  */
10848 char mdbm_set_chain();
10849 char (*f)();
10850
10851 int main() {
10852
10853 /* The GNU C library defines this for functions which it implements
10854     to always fail with ENOSYS.  Some functions are actually named
10855     something starting with __ and the normal name is an alias.  */
10856 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10857 choke me
10858 #else
10859 f = mdbm_set_chain;
10860 #endif
10861
10862 ; return 0; }
10863 EOF
10864 if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10865   rm -rf conftest*
10866   eval "ac_cv_func_mdbm_set_chain=yes"
10867 else
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_func_mdbm_set_chain=no"
10872 fi
10873 rm -f conftest*
10874 fi
10875
10876 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10877   echo "$ac_t""yes" 1>&6
10878   ol_cv_lib_mdbm=yes
10879 else
10880   echo "$ac_t""no" 1>&6
10881
10882                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10883 echo "configure:10884: checking for mdbm_set_chain in -lmdbm" >&5
10884 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10885 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10886   echo $ac_n "(cached) $ac_c" 1>&6
10887 else
10888   ac_save_LIBS="$LIBS"
10889 LIBS="-lmdbm  $LIBS"
10890 cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 /* Override any gcc2 internal prototype to avoid an error.  */
10894 /* We use char because int might match the return type of a gcc2
10895     builtin and then its argument prototype would still apply.  */
10896 char mdbm_set_chain();
10897
10898 int main() {
10899 mdbm_set_chain()
10900 ; return 0; }
10901 EOF
10902 if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10903   rm -rf conftest*
10904   eval "ac_cv_lib_$ac_lib_var=yes"
10905 else
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -rf conftest*
10909   eval "ac_cv_lib_$ac_lib_var=no"
10910 fi
10911 rm -f conftest*
10912 LIBS="$ac_save_LIBS"
10913
10914 fi
10915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10916   echo "$ac_t""yes" 1>&6
10917   ol_cv_lib_mdbm=-lmdbm
10918 else
10919   echo "$ac_t""no" 1>&6
10920 ol_cv_lib_mdbm=no
10921 fi
10922
10923         
10924 fi
10925
10926         LIBS="$ol_LIBS"
10927
10928 fi
10929
10930 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
10931
10932
10933  for ac_hdr in mdbm.h
10934 do
10935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10937 echo "configure:10938: checking for $ac_hdr" >&5
10938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10939   echo $ac_n "(cached) $ac_c" 1>&6
10940 else
10941   cat > conftest.$ac_ext <<EOF
10942 #line 10943 "configure"
10943 #include "confdefs.h"
10944 #include <$ac_hdr>
10945 EOF
10946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10947 { (eval echo configure:10948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10949 if test -z "$ac_err"; then
10950   rm -rf conftest*
10951   eval "ac_cv_header_$ac_safe=yes"
10952 else
10953   echo "$ac_err" >&5
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -rf conftest*
10957   eval "ac_cv_header_$ac_safe=no"
10958 fi
10959 rm -f conftest*
10960 fi
10961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10962   echo "$ac_t""yes" 1>&6
10963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10964   cat >> confdefs.h <<EOF
10965 #define $ac_tr_hdr 1
10966 EOF
10967  
10968 else
10969   echo "$ac_t""no" 1>&6
10970 fi
10971 done
10972
10973  echo $ac_n "checking for db""... $ac_c" 1>&6
10974 echo "configure:10975: checking for db" >&5
10975 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
10976   echo $ac_n "(cached) $ac_c" 1>&6
10977 else
10978   
10979         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
10980                 ol_cv_mdbm=no
10981         else
10982                 ol_cv_mdbm=yes
10983         fi
10984
10985 fi
10986
10987 echo "$ac_t""$ol_cv_mdbm" 1>&6
10988  if test $ol_cv_mdbm = yes ; then
10989         cat >> confdefs.h <<\EOF
10990 #define HAVE_MDBM 1
10991 EOF
10992
10993  fi
10994
10995
10996         if test $ol_cv_mdbm = yes ; then
10997                 ol_link_ldbm=mdbm
10998                 ol_with_ldbm_api=mdbm
10999                 if test $ol_cv_lib_mdbm != yes ; then
11000                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11001                 fi
11002         fi
11003 fi
11004
11005 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11006         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11007 echo "configure:11008: checking for GDBM library" >&5
11008 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11009   echo $ac_n "(cached) $ac_c" 1>&6
11010 else
11011         ol_LIBS="$LIBS"
11012         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11013 echo "configure:11014: checking for gdbm_open" >&5
11014 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11015   echo $ac_n "(cached) $ac_c" 1>&6
11016 else
11017   cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020 /* System header to define __stub macros and hopefully few prototypes,
11021     which can conflict with char gdbm_open(); below.  */
11022 #include <assert.h>
11023 /* Override any gcc2 internal prototype to avoid an error.  */
11024 /* We use char because int might match the return type of a gcc2
11025     builtin and then its argument prototype would still apply.  */
11026 char gdbm_open();
11027 char (*f)();
11028
11029 int main() {
11030
11031 /* The GNU C library defines this for functions which it implements
11032     to always fail with ENOSYS.  Some functions are actually named
11033     something starting with __ and the normal name is an alias.  */
11034 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11035 choke me
11036 #else
11037 f = gdbm_open;
11038 #endif
11039
11040 ; return 0; }
11041 EOF
11042 if { (eval echo configure:11043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11043   rm -rf conftest*
11044   eval "ac_cv_func_gdbm_open=yes"
11045 else
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   eval "ac_cv_func_gdbm_open=no"
11050 fi
11051 rm -f conftest*
11052 fi
11053
11054 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11055   echo "$ac_t""yes" 1>&6
11056   ol_cv_lib_gdbm=yes
11057 else
11058   echo "$ac_t""no" 1>&6
11059
11060                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11061 echo "configure:11062: checking for gdbm_open in -lgdbm" >&5
11062 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11064   echo $ac_n "(cached) $ac_c" 1>&6
11065 else
11066   ac_save_LIBS="$LIBS"
11067 LIBS="-lgdbm  $LIBS"
11068 cat > conftest.$ac_ext <<EOF
11069 #line 11070 "configure"
11070 #include "confdefs.h"
11071 /* Override any gcc2 internal prototype to avoid an error.  */
11072 /* We use char because int might match the return type of a gcc2
11073     builtin and then its argument prototype would still apply.  */
11074 char gdbm_open();
11075
11076 int main() {
11077 gdbm_open()
11078 ; return 0; }
11079 EOF
11080 if { (eval echo configure:11081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11081   rm -rf conftest*
11082   eval "ac_cv_lib_$ac_lib_var=yes"
11083 else
11084   echo "configure: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   rm -rf conftest*
11087   eval "ac_cv_lib_$ac_lib_var=no"
11088 fi
11089 rm -f conftest*
11090 LIBS="$ac_save_LIBS"
11091
11092 fi
11093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11094   echo "$ac_t""yes" 1>&6
11095   ol_cv_lib_gdbm=-lgdbm
11096 else
11097   echo "$ac_t""no" 1>&6
11098 ol_cv_lib_gdbm=no
11099 fi
11100
11101         
11102 fi
11103
11104         LIBS="$ol_LIBS"
11105
11106 fi
11107
11108 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11109
11110
11111  for ac_hdr in gdbm.h
11112 do
11113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11115 echo "configure:11116: checking for $ac_hdr" >&5
11116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   cat > conftest.$ac_ext <<EOF
11120 #line 11121 "configure"
11121 #include "confdefs.h"
11122 #include <$ac_hdr>
11123 EOF
11124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11125 { (eval echo configure:11126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11127 if test -z "$ac_err"; then
11128   rm -rf conftest*
11129   eval "ac_cv_header_$ac_safe=yes"
11130 else
11131   echo "$ac_err" >&5
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   eval "ac_cv_header_$ac_safe=no"
11136 fi
11137 rm -f conftest*
11138 fi
11139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11142   cat >> confdefs.h <<EOF
11143 #define $ac_tr_hdr 1
11144 EOF
11145  
11146 else
11147   echo "$ac_t""no" 1>&6
11148 fi
11149 done
11150
11151  echo $ac_n "checking for db""... $ac_c" 1>&6
11152 echo "configure:11153: checking for db" >&5
11153 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11154   echo $ac_n "(cached) $ac_c" 1>&6
11155 else
11156   
11157         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11158                 ol_cv_gdbm=no
11159         else
11160                 ol_cv_gdbm=yes
11161         fi
11162
11163 fi
11164
11165 echo "$ac_t""$ol_cv_gdbm" 1>&6
11166  if test $ol_cv_gdbm = yes ; then
11167         cat >> confdefs.h <<\EOF
11168 #define HAVE_GDBM 1
11169 EOF
11170
11171  fi
11172
11173
11174         if test $ol_cv_gdbm = yes ; then
11175                 ol_link_ldbm=gdbm
11176                 ol_with_ldbm_api=gdbm
11177
11178                 if test $ol_cv_lib_gdbm != yes ; then
11179                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11180                 fi
11181         fi
11182 fi
11183
11184 if test $ol_with_ldbm_api = auto ; then
11185         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11186 elif test $ol_with_ldbm_api = ndbm ; then
11187         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11188 echo "configure:11189: checking for NDBM library" >&5
11189 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11190   echo $ac_n "(cached) $ac_c" 1>&6
11191 else
11192         ol_LIBS="$LIBS"
11193         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11194 echo "configure:11195: checking for dbm_open" >&5
11195 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11196   echo $ac_n "(cached) $ac_c" 1>&6
11197 else
11198   cat > conftest.$ac_ext <<EOF
11199 #line 11200 "configure"
11200 #include "confdefs.h"
11201 /* System header to define __stub macros and hopefully few prototypes,
11202     which can conflict with char dbm_open(); below.  */
11203 #include <assert.h>
11204 /* Override any gcc2 internal prototype to avoid an error.  */
11205 /* We use char because int might match the return type of a gcc2
11206     builtin and then its argument prototype would still apply.  */
11207 char dbm_open();
11208 char (*f)();
11209
11210 int main() {
11211
11212 /* The GNU C library defines this for functions which it implements
11213     to always fail with ENOSYS.  Some functions are actually named
11214     something starting with __ and the normal name is an alias.  */
11215 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11216 choke me
11217 #else
11218 f = dbm_open;
11219 #endif
11220
11221 ; return 0; }
11222 EOF
11223 if { (eval echo configure:11224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11224   rm -rf conftest*
11225   eval "ac_cv_func_dbm_open=yes"
11226 else
11227   echo "configure: failed program was:" >&5
11228   cat conftest.$ac_ext >&5
11229   rm -rf conftest*
11230   eval "ac_cv_func_dbm_open=no"
11231 fi
11232 rm -f conftest*
11233 fi
11234
11235 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237   ol_cv_lib_ndbm=yes
11238 else
11239   echo "$ac_t""no" 1>&6
11240
11241                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11242 echo "configure:11243: checking for dbm_open in -lndbm" >&5
11243 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11245   echo $ac_n "(cached) $ac_c" 1>&6
11246 else
11247   ac_save_LIBS="$LIBS"
11248 LIBS="-lndbm  $LIBS"
11249 cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 /* Override any gcc2 internal prototype to avoid an error.  */
11253 /* We use char because int might match the return type of a gcc2
11254     builtin and then its argument prototype would still apply.  */
11255 char dbm_open();
11256
11257 int main() {
11258 dbm_open()
11259 ; return 0; }
11260 EOF
11261 if { (eval echo configure:11262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11262   rm -rf conftest*
11263   eval "ac_cv_lib_$ac_lib_var=yes"
11264 else
11265   echo "configure: failed program was:" >&5
11266   cat conftest.$ac_ext >&5
11267   rm -rf conftest*
11268   eval "ac_cv_lib_$ac_lib_var=no"
11269 fi
11270 rm -f conftest*
11271 LIBS="$ac_save_LIBS"
11272
11273 fi
11274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11275   echo "$ac_t""yes" 1>&6
11276   ol_cv_lib_ndbm=-lndbm
11277 else
11278   echo "$ac_t""no" 1>&6
11279
11280                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11281 echo "configure:11282: checking for dbm_open in -ldbm" >&5
11282 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11284   echo $ac_n "(cached) $ac_c" 1>&6
11285 else
11286   ac_save_LIBS="$LIBS"
11287 LIBS="-ldbm  $LIBS"
11288 cat > conftest.$ac_ext <<EOF
11289 #line 11290 "configure"
11290 #include "confdefs.h"
11291 /* Override any gcc2 internal prototype to avoid an error.  */
11292 /* We use char because int might match the return type of a gcc2
11293     builtin and then its argument prototype would still apply.  */
11294 char dbm_open();
11295
11296 int main() {
11297 dbm_open()
11298 ; return 0; }
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11301   rm -rf conftest*
11302   eval "ac_cv_lib_$ac_lib_var=yes"
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   eval "ac_cv_lib_$ac_lib_var=no"
11308 fi
11309 rm -f conftest*
11310 LIBS="$ac_save_LIBS"
11311
11312 fi
11313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11314   echo "$ac_t""yes" 1>&6
11315   ol_cv_lib_ndbm=-ldbm
11316 else
11317   echo "$ac_t""no" 1>&6
11318 ol_cv_lib_ndbm=no
11319 fi
11320                 
11321 fi
11322
11323         
11324 fi
11325
11326         LIBS="$ol_LIBS"
11327
11328 fi
11329
11330 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11331
11332
11333  for ac_hdr in ndbm.h
11334 do
11335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11337 echo "configure:11338: checking for $ac_hdr" >&5
11338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344 #include <$ac_hdr>
11345 EOF
11346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11347 { (eval echo configure:11348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11349 if test -z "$ac_err"; then
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=yes"
11352 else
11353   echo "$ac_err" >&5
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=no"
11358 fi
11359 rm -f conftest*
11360 fi
11361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11362   echo "$ac_t""yes" 1>&6
11363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11364   cat >> confdefs.h <<EOF
11365 #define $ac_tr_hdr 1
11366 EOF
11367  
11368 else
11369   echo "$ac_t""no" 1>&6
11370 fi
11371 done
11372
11373  echo $ac_n "checking for db""... $ac_c" 1>&6
11374 echo "configure:11375: checking for db" >&5
11375 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11376   echo $ac_n "(cached) $ac_c" 1>&6
11377 else
11378   
11379         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11380                 ol_cv_ndbm=no
11381         else
11382                 ol_cv_ndbm=yes
11383         fi
11384
11385 fi
11386
11387 echo "$ac_t""$ol_cv_ndbm" 1>&6
11388  if test $ol_cv_ndbm = yes ; then
11389         cat >> confdefs.h <<\EOF
11390 #define HAVE_NDBM 1
11391 EOF
11392
11393  fi
11394
11395
11396         if test $ol_cv_ndbm = yes ; then
11397                 ol_link_ldbm=ndbm
11398                 ol_with_ldbm_api=ndbm
11399
11400                 if test $ol_cv_lib_ndbm != yes ; then
11401                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11402                 fi
11403         fi
11404 fi
11405
11406 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11407         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11408         if test $ol_enable_ldbm = yes ; then
11409                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11410         fi
11411
11412         echo "configure: warning: disabling LDBM" 1>&2
11413         ol_enable_ldbm=no
11414 fi
11415
11416 if test $ol_enable_wrappers != no ; then
11417         for ac_hdr in tcpd.h
11418 do
11419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11421 echo "configure:11422: checking for $ac_hdr" >&5
11422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11423   echo $ac_n "(cached) $ac_c" 1>&6
11424 else
11425   cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428 #include <$ac_hdr>
11429 EOF
11430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11431 { (eval echo configure:11432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11433 if test -z "$ac_err"; then
11434   rm -rf conftest*
11435   eval "ac_cv_header_$ac_safe=yes"
11436 else
11437   echo "$ac_err" >&5
11438   echo "configure: failed program was:" >&5
11439   cat conftest.$ac_ext >&5
11440   rm -rf conftest*
11441   eval "ac_cv_header_$ac_safe=no"
11442 fi
11443 rm -f conftest*
11444 fi
11445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11446   echo "$ac_t""yes" 1>&6
11447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11448   cat >> confdefs.h <<EOF
11449 #define $ac_tr_hdr 1
11450 EOF
11451  
11452 else
11453   echo "$ac_t""no" 1>&6
11454 fi
11455 done
11456
11457
11458         if test $ac_cv_header_tcpd_h != yes ; then
11459                 have_wrappers=no
11460         else
11461                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11462 echo "configure:11463: checking for main in -lwrap" >&5
11463 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11464 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11465   echo $ac_n "(cached) $ac_c" 1>&6
11466 else
11467   ac_save_LIBS="$LIBS"
11468 LIBS="-lwrap  $LIBS"
11469 cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472
11473 int main() {
11474 main()
11475 ; return 0; }
11476 EOF
11477 if { (eval echo configure:11478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11478   rm -rf conftest*
11479   eval "ac_cv_lib_$ac_lib_var=yes"
11480 else
11481   echo "configure: failed program was:" >&5
11482   cat conftest.$ac_ext >&5
11483   rm -rf conftest*
11484   eval "ac_cv_lib_$ac_lib_var=no"
11485 fi
11486 rm -f conftest*
11487 LIBS="$ac_save_LIBS"
11488
11489 fi
11490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11491   echo "$ac_t""yes" 1>&6
11492   have_wrappers=yes
11493 else
11494   echo "$ac_t""no" 1>&6
11495 have_wrappers=no
11496 fi
11497
11498         fi
11499
11500         if test $have_wrappers = yes ; then
11501                 cat >> confdefs.h <<\EOF
11502 #define HAVE_TCPD 1
11503 EOF
11504
11505                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11506
11507                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11508 echo "configure:11509: checking for main in -lnsl" >&5
11509 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11511   echo $ac_n "(cached) $ac_c" 1>&6
11512 else
11513   ac_save_LIBS="$LIBS"
11514 LIBS="-lnsl  $LIBS"
11515 cat > conftest.$ac_ext <<EOF
11516 #line 11517 "configure"
11517 #include "confdefs.h"
11518
11519 int main() {
11520 main()
11521 ; return 0; }
11522 EOF
11523 if { (eval echo configure:11524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11524   rm -rf conftest*
11525   eval "ac_cv_lib_$ac_lib_var=yes"
11526 else
11527   echo "configure: failed program was:" >&5
11528   cat conftest.$ac_ext >&5
11529   rm -rf conftest*
11530   eval "ac_cv_lib_$ac_lib_var=no"
11531 fi
11532 rm -f conftest*
11533 LIBS="$ac_save_LIBS"
11534
11535 fi
11536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11537   echo "$ac_t""yes" 1>&6
11538     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11539     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11540   cat >> confdefs.h <<EOF
11541 #define $ac_tr_lib 1
11542 EOF
11543
11544   LIBS="-lnsl $LIBS"
11545
11546 else
11547   echo "$ac_t""no" 1>&6
11548 fi
11549
11550         else
11551                 echo "configure: warning: could not find -lwrap" 1>&2
11552                 if test $ol_enable_wrappers = yes ; then
11553                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11554                 fi
11555
11556                 echo "configure: warning: disabling wrappers support" 1>&2
11557                 ol_enable_wrappers=no
11558         fi
11559 fi
11560
11561 if test $ol_enable_syslog != no ; then
11562         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11563 echo "configure:11564: checking for openlog" >&5
11564 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11565   echo $ac_n "(cached) $ac_c" 1>&6
11566 else
11567   cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 /* System header to define __stub macros and hopefully few prototypes,
11571     which can conflict with char openlog(); below.  */
11572 #include <assert.h>
11573 /* Override any gcc2 internal prototype to avoid an error.  */
11574 /* We use char because int might match the return type of a gcc2
11575     builtin and then its argument prototype would still apply.  */
11576 char openlog();
11577 char (*f)();
11578
11579 int main() {
11580
11581 /* The GNU C library defines this for functions which it implements
11582     to always fail with ENOSYS.  Some functions are actually named
11583     something starting with __ and the normal name is an alias.  */
11584 #if defined (__stub_openlog) || defined (__stub___openlog)
11585 choke me
11586 #else
11587 f = openlog;
11588 #endif
11589
11590 ; return 0; }
11591 EOF
11592 if { (eval echo configure:11593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11593   rm -rf conftest*
11594   eval "ac_cv_func_openlog=yes"
11595 else
11596   echo "configure: failed program was:" >&5
11597   cat conftest.$ac_ext >&5
11598   rm -rf conftest*
11599   eval "ac_cv_func_openlog=no"
11600 fi
11601 rm -f conftest*
11602 fi
11603
11604 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606   :
11607 else
11608   echo "$ac_t""no" 1>&6
11609 fi
11610
11611         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11612                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11613         fi
11614         ol_enable_syslog=$ac_cv_func_openlog
11615 fi
11616
11617 if test $ol_enable_dmalloc != no ; then
11618         for ac_hdr in dmalloc.h
11619 do
11620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11622 echo "configure:11623: checking for $ac_hdr" >&5
11623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11624   echo $ac_n "(cached) $ac_c" 1>&6
11625 else
11626   cat > conftest.$ac_ext <<EOF
11627 #line 11628 "configure"
11628 #include "confdefs.h"
11629 #include <$ac_hdr>
11630 EOF
11631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11632 { (eval echo configure:11633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11634 if test -z "$ac_err"; then
11635   rm -rf conftest*
11636   eval "ac_cv_header_$ac_safe=yes"
11637 else
11638   echo "$ac_err" >&5
11639   echo "configure: failed program was:" >&5
11640   cat conftest.$ac_ext >&5
11641   rm -rf conftest*
11642   eval "ac_cv_header_$ac_safe=no"
11643 fi
11644 rm -f conftest*
11645 fi
11646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11647   echo "$ac_t""yes" 1>&6
11648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11649   cat >> confdefs.h <<EOF
11650 #define $ac_tr_hdr 1
11651 EOF
11652  
11653 else
11654   echo "$ac_t""no" 1>&6
11655 fi
11656 done
11657
11658         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11659 echo "configure:11660: checking for dmalloc_shutdown in -ldmalloc" >&5
11660 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11661 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11662   echo $ac_n "(cached) $ac_c" 1>&6
11663 else
11664   ac_save_LIBS="$LIBS"
11665 LIBS="-ldmalloc  $LIBS"
11666 cat > conftest.$ac_ext <<EOF
11667 #line 11668 "configure"
11668 #include "confdefs.h"
11669 /* Override any gcc2 internal prototype to avoid an error.  */
11670 /* We use char because int might match the return type of a gcc2
11671     builtin and then its argument prototype would still apply.  */
11672 char dmalloc_shutdown();
11673
11674 int main() {
11675 dmalloc_shutdown()
11676 ; return 0; }
11677 EOF
11678 if { (eval echo configure:11679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11679   rm -rf conftest*
11680   eval "ac_cv_lib_$ac_lib_var=yes"
11681 else
11682   echo "configure: failed program was:" >&5
11683   cat conftest.$ac_ext >&5
11684   rm -rf conftest*
11685   eval "ac_cv_lib_$ac_lib_var=no"
11686 fi
11687 rm -f conftest*
11688 LIBS="$ac_save_LIBS"
11689
11690 fi
11691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11692   echo "$ac_t""yes" 1>&6
11693     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11694     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11695   cat >> confdefs.h <<EOF
11696 #define $ac_tr_lib 1
11697 EOF
11698
11699   LIBS="-ldmalloc $LIBS"
11700
11701 else
11702   echo "$ac_t""no" 1>&6
11703 fi
11704
11705 fi
11706
11707 if test $ol_enable_tcl != no ; then
11708         for ac_hdr in tcl.h
11709 do
11710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11712 echo "configure:11713: checking for $ac_hdr" >&5
11713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11714   echo $ac_n "(cached) $ac_c" 1>&6
11715 else
11716   cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719 #include <$ac_hdr>
11720 EOF
11721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11722 { (eval echo configure:11723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11724 if test -z "$ac_err"; then
11725   rm -rf conftest*
11726   eval "ac_cv_header_$ac_safe=yes"
11727 else
11728   echo "$ac_err" >&5
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -rf conftest*
11732   eval "ac_cv_header_$ac_safe=no"
11733 fi
11734 rm -f conftest*
11735 fi
11736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11737   echo "$ac_t""yes" 1>&6
11738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11739   cat >> confdefs.h <<EOF
11740 #define $ac_tr_hdr 1
11741 EOF
11742  
11743 else
11744   echo "$ac_t""no" 1>&6
11745 fi
11746 done
11747
11748
11749         if test $ac_cv_header_tcl_h != yes ; then
11750                 have_tcl=no
11751         else
11752                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11753 echo "configure:11754: checking for main in -ltcl" >&5
11754 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11755 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11756   echo $ac_n "(cached) $ac_c" 1>&6
11757 else
11758   ac_save_LIBS="$LIBS"
11759 LIBS="-ltcl  $LIBS"
11760 cat > conftest.$ac_ext <<EOF
11761 #line 11762 "configure"
11762 #include "confdefs.h"
11763
11764 int main() {
11765 main()
11766 ; return 0; }
11767 EOF
11768 if { (eval echo configure:11769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11769   rm -rf conftest*
11770   eval "ac_cv_lib_$ac_lib_var=yes"
11771 else
11772   echo "configure: failed program was:" >&5
11773   cat conftest.$ac_ext >&5
11774   rm -rf conftest*
11775   eval "ac_cv_lib_$ac_lib_var=no"
11776 fi
11777 rm -f conftest*
11778 LIBS="$ac_save_LIBS"
11779
11780 fi
11781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11782   echo "$ac_t""yes" 1>&6
11783   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11784 else
11785   echo "$ac_t""no" 1>&6
11786 have_tcl=no
11787 fi
11788
11789
11790                 if test $have_tcl != yes; then
11791                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11792 echo "configure:11793: checking for main in -ltcl7.6" >&5
11793 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11795   echo $ac_n "(cached) $ac_c" 1>&6
11796 else
11797   ac_save_LIBS="$LIBS"
11798 LIBS="-ltcl7.6  $LIBS"
11799 cat > conftest.$ac_ext <<EOF
11800 #line 11801 "configure"
11801 #include "confdefs.h"
11802
11803 int main() {
11804 main()
11805 ; return 0; }
11806 EOF
11807 if { (eval echo configure:11808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11808   rm -rf conftest*
11809   eval "ac_cv_lib_$ac_lib_var=yes"
11810 else
11811   echo "configure: failed program was:" >&5
11812   cat conftest.$ac_ext >&5
11813   rm -rf conftest*
11814   eval "ac_cv_lib_$ac_lib_var=no"
11815 fi
11816 rm -f conftest*
11817 LIBS="$ac_save_LIBS"
11818
11819 fi
11820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11821   echo "$ac_t""yes" 1>&6
11822   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11823 else
11824   echo "$ac_t""no" 1>&6
11825 have_tcl=no
11826 fi
11827
11828                 fi
11829
11830                 if test $have_tcl != yes; then
11831                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11832 echo "configure:11833: checking for main in -ltcl8.0" >&5
11833 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11835   echo $ac_n "(cached) $ac_c" 1>&6
11836 else
11837   ac_save_LIBS="$LIBS"
11838 LIBS="-ltcl8.0  $LIBS"
11839 cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842
11843 int main() {
11844 main()
11845 ; return 0; }
11846 EOF
11847 if { (eval echo configure:11848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11848   rm -rf conftest*
11849   eval "ac_cv_lib_$ac_lib_var=yes"
11850 else
11851   echo "configure: failed program was:" >&5
11852   cat conftest.$ac_ext >&5
11853   rm -rf conftest*
11854   eval "ac_cv_lib_$ac_lib_var=no"
11855 fi
11856 rm -f conftest*
11857 LIBS="$ac_save_LIBS"
11858
11859 fi
11860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11861   echo "$ac_t""yes" 1>&6
11862   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11863 else
11864   echo "$ac_t""no" 1>&6
11865 have_tcl=no
11866 fi
11867
11868                 fi
11869         fi
11870
11871         if test $have_tcl != yes ; then
11872                 echo "configure: warning: could not find -ltcl" 1>&2
11873                 if test $ol_enable_tcl = yes ; then
11874                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11875                 fi
11876
11877                 ol_enable_tcl=no
11878         fi
11879 fi
11880
11881 # ud needs termcap (should insert check here)
11882 ol_link_termcap=no
11883 for ac_hdr in termcap.h ncurses.h
11884 do
11885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11887 echo "configure:11888: checking for $ac_hdr" >&5
11888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11889   echo $ac_n "(cached) $ac_c" 1>&6
11890 else
11891   cat > conftest.$ac_ext <<EOF
11892 #line 11893 "configure"
11893 #include "confdefs.h"
11894 #include <$ac_hdr>
11895 EOF
11896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11897 { (eval echo configure:11898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11899 if test -z "$ac_err"; then
11900   rm -rf conftest*
11901   eval "ac_cv_header_$ac_safe=yes"
11902 else
11903   echo "$ac_err" >&5
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   eval "ac_cv_header_$ac_safe=no"
11908 fi
11909 rm -f conftest*
11910 fi
11911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11912   echo "$ac_t""yes" 1>&6
11913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11914   cat >> confdefs.h <<EOF
11915 #define $ac_tr_hdr 1
11916 EOF
11917  
11918 else
11919   echo "$ac_t""no" 1>&6
11920 fi
11921 done
11922
11923
11924 if test $ol_link_termcap = no ; then
11925         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
11926 echo "configure:11927: checking for tputs in -ltermcap" >&5
11927 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
11928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11929   echo $ac_n "(cached) $ac_c" 1>&6
11930 else
11931   ac_save_LIBS="$LIBS"
11932 LIBS="-ltermcap  $LIBS"
11933 cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936 /* Override any gcc2 internal prototype to avoid an error.  */
11937 /* We use char because int might match the return type of a gcc2
11938     builtin and then its argument prototype would still apply.  */
11939 char tputs();
11940
11941 int main() {
11942 tputs()
11943 ; return 0; }
11944 EOF
11945 if { (eval echo configure:11946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11946   rm -rf conftest*
11947   eval "ac_cv_lib_$ac_lib_var=yes"
11948 else
11949   echo "configure: failed program was:" >&5
11950   cat conftest.$ac_ext >&5
11951   rm -rf conftest*
11952   eval "ac_cv_lib_$ac_lib_var=no"
11953 fi
11954 rm -f conftest*
11955 LIBS="$ac_save_LIBS"
11956
11957 fi
11958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11959   echo "$ac_t""yes" 1>&6
11960   have_termcap=yes
11961 else
11962   echo "$ac_t""no" 1>&6
11963 have_termcap=no
11964 fi
11965
11966         if test $have_termcap = yes ; then
11967                 cat >> confdefs.h <<\EOF
11968 #define HAVE_TERMCAP 1
11969 EOF
11970
11971                 ol_link_termcap=yes
11972                 TERMCAP_LIBS=-ltermcap
11973         fi
11974 fi
11975
11976 if test $ol_link_termcap = no ; then
11977         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
11978 echo "configure:11979: checking for initscr in -lncurses" >&5
11979 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
11980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11981   echo $ac_n "(cached) $ac_c" 1>&6
11982 else
11983   ac_save_LIBS="$LIBS"
11984 LIBS="-lncurses  $LIBS"
11985 cat > conftest.$ac_ext <<EOF
11986 #line 11987 "configure"
11987 #include "confdefs.h"
11988 /* Override any gcc2 internal prototype to avoid an error.  */
11989 /* We use char because int might match the return type of a gcc2
11990     builtin and then its argument prototype would still apply.  */
11991 char initscr();
11992
11993 int main() {
11994 initscr()
11995 ; return 0; }
11996 EOF
11997 if { (eval echo configure:11998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11998   rm -rf conftest*
11999   eval "ac_cv_lib_$ac_lib_var=yes"
12000 else
12001   echo "configure: failed program was:" >&5
12002   cat conftest.$ac_ext >&5
12003   rm -rf conftest*
12004   eval "ac_cv_lib_$ac_lib_var=no"
12005 fi
12006 rm -f conftest*
12007 LIBS="$ac_save_LIBS"
12008
12009 fi
12010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12011   echo "$ac_t""yes" 1>&6
12012   have_ncurses=yes
12013 else
12014   echo "$ac_t""no" 1>&6
12015 have_ncurses=no
12016 fi
12017
12018         if test $have_ncurses = yes ; then
12019                 cat >> confdefs.h <<\EOF
12020 #define HAVE_NCURSES 1
12021 EOF
12022
12023                 ol_link_termcap=yes
12024                 TERMCAP_LIBS=-lncurses
12025         fi
12026 fi
12027
12028 if test $ol_link_termcap = no ; then
12029         cat >> confdefs.h <<\EOF
12030 #define NO_TERMCAP 1
12031 EOF
12032
12033         TERMCAP_LIBS=
12034 fi
12035
12036 ol_link_sasl=no
12037 if test $ol_with_cyrus_sasl != no ; then
12038         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12039 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12040 echo "configure:12041: checking for sasl.h" >&5
12041 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12042   echo $ac_n "(cached) $ac_c" 1>&6
12043 else
12044   cat > conftest.$ac_ext <<EOF
12045 #line 12046 "configure"
12046 #include "confdefs.h"
12047 #include <sasl.h>
12048 EOF
12049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12050 { (eval echo configure:12051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12052 if test -z "$ac_err"; then
12053   rm -rf conftest*
12054   eval "ac_cv_header_$ac_safe=yes"
12055 else
12056   echo "$ac_err" >&5
12057   echo "configure: failed program was:" >&5
12058   cat conftest.$ac_ext >&5
12059   rm -rf conftest*
12060   eval "ac_cv_header_$ac_safe=no"
12061 fi
12062 rm -f conftest*
12063 fi
12064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12065   echo "$ac_t""yes" 1>&6
12066   :
12067 else
12068   echo "$ac_t""no" 1>&6
12069 fi
12070
12071
12072         if test $ac_cv_header_sasl_h = yes ; then
12073                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12074 echo "configure:12075: checking for sasl_client_init in -lsasl" >&5
12075 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12077   echo $ac_n "(cached) $ac_c" 1>&6
12078 else
12079   ac_save_LIBS="$LIBS"
12080 LIBS="-lsasl  $LIBS"
12081 cat > conftest.$ac_ext <<EOF
12082 #line 12083 "configure"
12083 #include "confdefs.h"
12084 /* Override any gcc2 internal prototype to avoid an error.  */
12085 /* We use char because int might match the return type of a gcc2
12086     builtin and then its argument prototype would still apply.  */
12087 char sasl_client_init();
12088
12089 int main() {
12090 sasl_client_init()
12091 ; return 0; }
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12094   rm -rf conftest*
12095   eval "ac_cv_lib_$ac_lib_var=yes"
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   eval "ac_cv_lib_$ac_lib_var=no"
12101 fi
12102 rm -f conftest*
12103 LIBS="$ac_save_LIBS"
12104
12105 fi
12106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12107   echo "$ac_t""yes" 1>&6
12108   have_cyrus_sasl=yes
12109 else
12110   echo "$ac_t""no" 1>&6
12111 have_cyrus_sasl=no
12112 fi
12113
12114
12115                 if test $have_cyrus_sasl != no ; then
12116                         SASL_LIBS="-lsasl"
12117                         cat >> confdefs.h <<\EOF
12118 #define HAVE_CYRUS_SASL 1
12119 EOF
12120
12121                         ol_link_sasl=yes
12122                 fi
12123         fi
12124
12125         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12126                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12127         fi
12128 fi
12129
12130 ol_link_fetch=no
12131 if test $ol_with_fetch != no ; then
12132         ol=$LIBS
12133 LIBS="-lfetch -lcom_err $LIBS"
12134 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12135 echo "configure:12136: checking fetch(3) library" >&5
12136 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12137   echo $ac_n "(cached) $ac_c" 1>&6
12138 else
12139   
12140         cat > conftest.$ac_ext <<EOF
12141 #line 12142 "configure"
12142 #include "confdefs.h"
12143
12144 #include <sys/param.h>
12145 #include <stdio.h>
12146 #include <fetch.h>
12147 int main() {
12148 struct url *u = fetchParseURL("file:///"); 
12149 ; return 0; }
12150 EOF
12151 if { (eval echo configure:12152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12152   rm -rf conftest*
12153   ol_cv_lib_fetch=yes
12154 else
12155   echo "configure: failed program was:" >&5
12156   cat conftest.$ac_ext >&5
12157   rm -rf conftest*
12158   ol_cv_lib_fetch=no
12159 fi
12160 rm -f conftest*
12161 fi
12162
12163 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12164 LIBS=$ol_LIBS
12165 if test $ol_cv_lib_fetch != no ; then
12166         ol_link_fetch="-lfetch -lcom_err"
12167         cat >> confdefs.h <<\EOF
12168 #define HAVE_FETCH 1
12169 EOF
12170
12171 fi
12172
12173
12174         if test $ol_cv_lib_fetch != no ; then
12175                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12176                 ol_link_fetch=freebsd
12177
12178         elif test $ol_with_fetch != auto ; then
12179                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12180         fi 
12181 fi
12182
12183 ol_link_readline=no
12184 if test $ol_with_readline != no ; then
12185         for ac_hdr in readline/readline.h readline/history.h
12186 do
12187 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12188 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12189 echo "configure:12190: checking for $ac_hdr" >&5
12190 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12191   echo $ac_n "(cached) $ac_c" 1>&6
12192 else
12193   cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196 #include <$ac_hdr>
12197 EOF
12198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12199 { (eval echo configure:12200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12201 if test -z "$ac_err"; then
12202   rm -rf conftest*
12203   eval "ac_cv_header_$ac_safe=yes"
12204 else
12205   echo "$ac_err" >&5
12206   echo "configure: failed program was:" >&5
12207   cat conftest.$ac_ext >&5
12208   rm -rf conftest*
12209   eval "ac_cv_header_$ac_safe=no"
12210 fi
12211 rm -f conftest*
12212 fi
12213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12214   echo "$ac_t""yes" 1>&6
12215     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12216   cat >> confdefs.h <<EOF
12217 #define $ac_tr_hdr 1
12218 EOF
12219  
12220 else
12221   echo "$ac_t""no" 1>&6
12222 fi
12223 done
12224
12225
12226         if test $ac_cv_header_readline_readline_h = yes ; then
12227                 save_LIBS="$LIBS"
12228                 LIBS="$TERMCAP_LIBS $LIBS"
12229                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12230 echo "configure:12231: checking for readline in -lreadline" >&5
12231 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12233   echo $ac_n "(cached) $ac_c" 1>&6
12234 else
12235   ac_save_LIBS="$LIBS"
12236 LIBS="-lreadline  $LIBS"
12237 cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240 /* Override any gcc2 internal prototype to avoid an error.  */
12241 /* We use char because int might match the return type of a gcc2
12242     builtin and then its argument prototype would still apply.  */
12243 char readline();
12244
12245 int main() {
12246 readline()
12247 ; return 0; }
12248 EOF
12249 if { (eval echo configure:12250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12250   rm -rf conftest*
12251   eval "ac_cv_lib_$ac_lib_var=yes"
12252 else
12253   echo "configure: failed program was:" >&5
12254   cat conftest.$ac_ext >&5
12255   rm -rf conftest*
12256   eval "ac_cv_lib_$ac_lib_var=no"
12257 fi
12258 rm -f conftest*
12259 LIBS="$ac_save_LIBS"
12260
12261 fi
12262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12263   echo "$ac_t""yes" 1>&6
12264   have_readline=yes
12265 else
12266   echo "$ac_t""no" 1>&6
12267 have_readline=no
12268 fi
12269
12270                 LIBS="$save_LIBS"
12271                         
12272                 if test $have_readline = yes ; then
12273                         ol_with_readline=found
12274                         ol_link_readline=yes
12275
12276                         READLINE_LIBS="-lreadline"
12277                 fi
12278         fi
12279 fi
12280
12281 if test $ol_link_readline = yes ; then
12282         cat >> confdefs.h <<\EOF
12283 #define HAVE_READLINE 1
12284 EOF
12285
12286 fi
12287
12288
12289 # FreeBSD (and others) have crypt(3) in -lcrypt
12290 if test $ol_enable_crypt != no ; then
12291         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12292 echo "configure:12293: checking for crypt" >&5
12293 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12294   echo $ac_n "(cached) $ac_c" 1>&6
12295 else
12296   cat > conftest.$ac_ext <<EOF
12297 #line 12298 "configure"
12298 #include "confdefs.h"
12299 /* System header to define __stub macros and hopefully few prototypes,
12300     which can conflict with char crypt(); below.  */
12301 #include <assert.h>
12302 /* Override any gcc2 internal prototype to avoid an error.  */
12303 /* We use char because int might match the return type of a gcc2
12304     builtin and then its argument prototype would still apply.  */
12305 char crypt();
12306 char (*f)();
12307
12308 int main() {
12309
12310 /* The GNU C library defines this for functions which it implements
12311     to always fail with ENOSYS.  Some functions are actually named
12312     something starting with __ and the normal name is an alias.  */
12313 #if defined (__stub_crypt) || defined (__stub___crypt)
12314 choke me
12315 #else
12316 f = crypt;
12317 #endif
12318
12319 ; return 0; }
12320 EOF
12321 if { (eval echo configure:12322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12322   rm -rf conftest*
12323   eval "ac_cv_func_crypt=yes"
12324 else
12325   echo "configure: failed program was:" >&5
12326   cat conftest.$ac_ext >&5
12327   rm -rf conftest*
12328   eval "ac_cv_func_crypt=no"
12329 fi
12330 rm -f conftest*
12331 fi
12332
12333 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12334   echo "$ac_t""yes" 1>&6
12335   have_crypt=yes
12336 else
12337   echo "$ac_t""no" 1>&6
12338
12339                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12340 echo "configure:12341: checking for crypt in -lcrypt" >&5
12341 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12342 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12343   echo $ac_n "(cached) $ac_c" 1>&6
12344 else
12345   ac_save_LIBS="$LIBS"
12346 LIBS="-lcrypt  $LIBS"
12347 cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12350 /* Override any gcc2 internal prototype to avoid an error.  */
12351 /* We use char because int might match the return type of a gcc2
12352     builtin and then its argument prototype would still apply.  */
12353 char crypt();
12354
12355 int main() {
12356 crypt()
12357 ; return 0; }
12358 EOF
12359 if { (eval echo configure:12360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12360   rm -rf conftest*
12361   eval "ac_cv_lib_$ac_lib_var=yes"
12362 else
12363   echo "configure: failed program was:" >&5
12364   cat conftest.$ac_ext >&5
12365   rm -rf conftest*
12366   eval "ac_cv_lib_$ac_lib_var=no"
12367 fi
12368 rm -f conftest*
12369 LIBS="$ac_save_LIBS"
12370
12371 fi
12372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12373   echo "$ac_t""yes" 1>&6
12374   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12375                         have_crypt=yes
12376 else
12377   echo "$ac_t""no" 1>&6
12378 have_crypt=no
12379 fi
12380
12381 fi
12382
12383
12384         if test $have_crypt = yes ; then
12385                 cat >> confdefs.h <<\EOF
12386 #define HAVE_CRYPT 1
12387 EOF
12388
12389         else
12390                 echo "configure: warning: could not find crypt" 1>&2
12391                 if test $ol_enable_crypt = yes ; then
12392                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12393                 fi
12394
12395                 echo "configure: warning: disabling crypt support" 1>&2
12396                 ol_enable_crypt=no
12397         fi
12398 fi
12399
12400 # FreeBSD (and others) have setproctitle(3) in -lutil
12401 if test $ol_enable_proctitle != no ; then
12402         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12403 echo "configure:12404: checking for setproctitle" >&5
12404 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12405   echo $ac_n "(cached) $ac_c" 1>&6
12406 else
12407   cat > conftest.$ac_ext <<EOF
12408 #line 12409 "configure"
12409 #include "confdefs.h"
12410 /* System header to define __stub macros and hopefully few prototypes,
12411     which can conflict with char setproctitle(); below.  */
12412 #include <assert.h>
12413 /* Override any gcc2 internal prototype to avoid an error.  */
12414 /* We use char because int might match the return type of a gcc2
12415     builtin and then its argument prototype would still apply.  */
12416 char setproctitle();
12417 char (*f)();
12418
12419 int main() {
12420
12421 /* The GNU C library defines this for functions which it implements
12422     to always fail with ENOSYS.  Some functions are actually named
12423     something starting with __ and the normal name is an alias.  */
12424 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12425 choke me
12426 #else
12427 f = setproctitle;
12428 #endif
12429
12430 ; return 0; }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12433   rm -rf conftest*
12434   eval "ac_cv_func_setproctitle=yes"
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   eval "ac_cv_func_setproctitle=no"
12440 fi
12441 rm -f conftest*
12442 fi
12443
12444 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12445   echo "$ac_t""yes" 1>&6
12446   have_setproctitle=yes
12447 else
12448   echo "$ac_t""no" 1>&6
12449
12450                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12451 echo "configure:12452: checking for setproctitle in -lutil" >&5
12452 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12453 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12454   echo $ac_n "(cached) $ac_c" 1>&6
12455 else
12456   ac_save_LIBS="$LIBS"
12457 LIBS="-lutil  $LIBS"
12458 cat > conftest.$ac_ext <<EOF
12459 #line 12460 "configure"
12460 #include "confdefs.h"
12461 /* Override any gcc2 internal prototype to avoid an error.  */
12462 /* We use char because int might match the return type of a gcc2
12463     builtin and then its argument prototype would still apply.  */
12464 char setproctitle();
12465
12466 int main() {
12467 setproctitle()
12468 ; return 0; }
12469 EOF
12470 if { (eval echo configure:12471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12471   rm -rf conftest*
12472   eval "ac_cv_lib_$ac_lib_var=yes"
12473 else
12474   echo "configure: failed program was:" >&5
12475   cat conftest.$ac_ext >&5
12476   rm -rf conftest*
12477   eval "ac_cv_lib_$ac_lib_var=no"
12478 fi
12479 rm -f conftest*
12480 LIBS="$ac_save_LIBS"
12481
12482 fi
12483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12484   echo "$ac_t""yes" 1>&6
12485   have_setproctitle=yes
12486                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12487 else
12488   echo "$ac_t""no" 1>&6
12489 have_setproctitle=no
12490                         LIBOBJS="$LIBOBJS setproctitle.o"
12491 fi
12492
12493 fi
12494
12495
12496         if test $have_setproctitle = yes ; then
12497                 cat >> confdefs.h <<\EOF
12498 #define HAVE_SETPROCTITLE 1
12499 EOF
12500
12501         fi
12502 fi
12503
12504 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12505 echo "configure:12506: checking for uid_t in sys/types.h" >&5
12506 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12507   echo $ac_n "(cached) $ac_c" 1>&6
12508 else
12509   cat > conftest.$ac_ext <<EOF
12510 #line 12511 "configure"
12511 #include "confdefs.h"
12512 #include <sys/types.h>
12513 EOF
12514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12515   egrep "uid_t" >/dev/null 2>&1; then
12516   rm -rf conftest*
12517   ac_cv_type_uid_t=yes
12518 else
12519   rm -rf conftest*
12520   ac_cv_type_uid_t=no
12521 fi
12522 rm -f conftest*
12523
12524 fi
12525
12526 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12527 if test $ac_cv_type_uid_t = no; then
12528   cat >> confdefs.h <<\EOF
12529 #define uid_t int
12530 EOF
12531
12532   cat >> confdefs.h <<\EOF
12533 #define gid_t int
12534 EOF
12535
12536 fi
12537
12538 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12539 echo "configure:12540: checking type of array argument to getgroups" >&5
12540 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12541   echo $ac_n "(cached) $ac_c" 1>&6
12542 else
12543   if test "$cross_compiling" = yes; then
12544   ac_cv_type_getgroups=cross
12545 else
12546   cat > conftest.$ac_ext <<EOF
12547 #line 12548 "configure"
12548 #include "confdefs.h"
12549
12550 /* Thanks to Mike Rendell for this test.  */
12551 #include <sys/types.h>
12552 #define NGID 256
12553 #undef MAX
12554 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12555 main()
12556 {
12557   gid_t gidset[NGID];
12558   int i, n;
12559   union { gid_t gval; long lval; }  val;
12560
12561   val.lval = -1;
12562   for (i = 0; i < NGID; i++)
12563     gidset[i] = val.gval;
12564   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12565                  gidset);
12566   /* Exit non-zero if getgroups seems to require an array of ints.  This
12567      happens when gid_t is short but getgroups modifies an array of ints.  */
12568   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12569 }
12570
12571 EOF
12572 if { (eval echo configure:12573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12573 then
12574     ac_cv_type_getgroups=gid_t
12575 else
12576   echo "configure: failed program was:" >&5
12577   cat conftest.$ac_ext >&5
12578   rm -fr conftest*
12579   ac_cv_type_getgroups=int
12580 fi
12581 rm -fr conftest*
12582 fi
12583
12584 if test $ac_cv_type_getgroups = cross; then
12585         cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 #include <unistd.h>
12589 EOF
12590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12591   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12592   rm -rf conftest*
12593   ac_cv_type_getgroups=gid_t
12594 else
12595   rm -rf conftest*
12596   ac_cv_type_getgroups=int
12597 fi
12598 rm -f conftest*
12599
12600 fi
12601 fi
12602
12603 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12604 cat >> confdefs.h <<EOF
12605 #define GETGROUPS_T $ac_cv_type_getgroups
12606 EOF
12607
12608  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12609 echo "configure:12610: checking for ANSI C header files" >&5
12610 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12611   echo $ac_n "(cached) $ac_c" 1>&6
12612 else
12613   cat > conftest.$ac_ext <<EOF
12614 #line 12615 "configure"
12615 #include "confdefs.h"
12616 #include <stdlib.h>
12617 #include <stdarg.h>
12618 #include <string.h>
12619 #include <float.h>
12620 EOF
12621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12622 { (eval echo configure:12623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12624 if test -z "$ac_err"; then
12625   rm -rf conftest*
12626   ac_cv_header_stdc=yes
12627 else
12628   echo "$ac_err" >&5
12629   echo "configure: failed program was:" >&5
12630   cat conftest.$ac_ext >&5
12631   rm -rf conftest*
12632   ac_cv_header_stdc=no
12633 fi
12634 rm -f conftest*
12635
12636 if test $ac_cv_header_stdc = yes; then
12637   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12638 cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641 #include <string.h>
12642 EOF
12643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12644   egrep "memchr" >/dev/null 2>&1; then
12645   :
12646 else
12647   rm -rf conftest*
12648   ac_cv_header_stdc=no
12649 fi
12650 rm -f conftest*
12651
12652 fi
12653
12654 if test $ac_cv_header_stdc = yes; then
12655   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12656 cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 #include <stdlib.h>
12660 EOF
12661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12662   egrep "free" >/dev/null 2>&1; then
12663   :
12664 else
12665   rm -rf conftest*
12666   ac_cv_header_stdc=no
12667 fi
12668 rm -f conftest*
12669
12670 fi
12671
12672 if test $ac_cv_header_stdc = yes; then
12673   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12674 if test "$cross_compiling" = yes; then
12675   :
12676 else
12677   cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 #include <ctype.h>
12681 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12682 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12683 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12684 int main () { int i; for (i = 0; i < 256; i++)
12685 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12686 exit (0); }
12687
12688 EOF
12689 if { (eval echo configure:12690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12690 then
12691   :
12692 else
12693   echo "configure: failed program was:" >&5
12694   cat conftest.$ac_ext >&5
12695   rm -fr conftest*
12696   ac_cv_header_stdc=no
12697 fi
12698 rm -fr conftest*
12699 fi
12700
12701 fi
12702 fi
12703
12704 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12705 if test $ac_cv_header_stdc = yes; then
12706   cat >> confdefs.h <<\EOF
12707 #define STDC_HEADERS 1
12708 EOF
12709
12710 fi
12711
12712 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12713 echo "configure:12714: checking for mode_t" >&5
12714 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12715   echo $ac_n "(cached) $ac_c" 1>&6
12716 else
12717   cat > conftest.$ac_ext <<EOF
12718 #line 12719 "configure"
12719 #include "confdefs.h"
12720 #include <sys/types.h>
12721 #if STDC_HEADERS
12722 #include <stdlib.h>
12723 #include <stddef.h>
12724 #endif
12725 EOF
12726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12727   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12728   rm -rf conftest*
12729   eval "ac_cv_type_mode_t=yes"
12730 else
12731   rm -rf conftest*
12732   eval "ac_cv_type_mode_t=no"
12733 fi
12734 rm -f conftest*
12735
12736 fi
12737 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12738   echo "$ac_t""yes" 1>&6
12739 else
12740   echo "$ac_t""no" 1>&6
12741   cat >> confdefs.h <<EOF
12742 #define mode_t int
12743 EOF
12744
12745 fi
12746
12747 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12748 echo "configure:12749: checking for off_t" >&5
12749 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12750   echo $ac_n "(cached) $ac_c" 1>&6
12751 else
12752   cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755 #include <sys/types.h>
12756 #if STDC_HEADERS
12757 #include <stdlib.h>
12758 #include <stddef.h>
12759 #endif
12760 EOF
12761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12762   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12763   rm -rf conftest*
12764   eval "ac_cv_type_off_t=yes"
12765 else
12766   rm -rf conftest*
12767   eval "ac_cv_type_off_t=no"
12768 fi
12769 rm -f conftest*
12770
12771 fi
12772 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12773   echo "$ac_t""yes" 1>&6
12774 else
12775   echo "$ac_t""no" 1>&6
12776   cat >> confdefs.h <<EOF
12777 #define off_t long
12778 EOF
12779
12780 fi
12781
12782 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12783 echo "configure:12784: checking for pid_t" >&5
12784 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12785   echo $ac_n "(cached) $ac_c" 1>&6
12786 else
12787   cat > conftest.$ac_ext <<EOF
12788 #line 12789 "configure"
12789 #include "confdefs.h"
12790 #include <sys/types.h>
12791 #if STDC_HEADERS
12792 #include <stdlib.h>
12793 #include <stddef.h>
12794 #endif
12795 EOF
12796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12797   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12798   rm -rf conftest*
12799   eval "ac_cv_type_pid_t=yes"
12800 else
12801   rm -rf conftest*
12802   eval "ac_cv_type_pid_t=no"
12803 fi
12804 rm -f conftest*
12805
12806 fi
12807 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12808   echo "$ac_t""yes" 1>&6
12809 else
12810   echo "$ac_t""no" 1>&6
12811   cat >> confdefs.h <<EOF
12812 #define pid_t int
12813 EOF
12814
12815 fi
12816
12817 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12818 echo "configure:12819: checking for ptrdiff_t" >&5
12819 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12820   echo $ac_n "(cached) $ac_c" 1>&6
12821 else
12822   cat > conftest.$ac_ext <<EOF
12823 #line 12824 "configure"
12824 #include "confdefs.h"
12825 #include <stddef.h>
12826 int main() {
12827 ptrdiff_t p
12828 ; return 0; }
12829 EOF
12830 if { (eval echo configure:12831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12831   rm -rf conftest*
12832   am_cv_type_ptrdiff_t=yes
12833 else
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -rf conftest*
12837   am_cv_type_ptrdiff_t=no
12838 fi
12839 rm -f conftest*
12840 fi
12841
12842 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12843    if test $am_cv_type_ptrdiff_t = yes; then
12844      cat >> confdefs.h <<\EOF
12845 #define HAVE_PTRDIFF_T 1
12846 EOF
12847
12848    fi
12849
12850 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12851 echo "configure:12852: checking return type of signal handlers" >&5
12852 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12853   echo $ac_n "(cached) $ac_c" 1>&6
12854 else
12855   cat > conftest.$ac_ext <<EOF
12856 #line 12857 "configure"
12857 #include "confdefs.h"
12858 #include <sys/types.h>
12859 #include <signal.h>
12860 #ifdef signal
12861 #undef signal
12862 #endif
12863 #ifdef __cplusplus
12864 extern "C" void (*signal (int, void (*)(int)))(int);
12865 #else
12866 void (*signal ()) ();
12867 #endif
12868
12869 int main() {
12870 int i;
12871 ; return 0; }
12872 EOF
12873 if { (eval echo configure:12874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12874   rm -rf conftest*
12875   ac_cv_type_signal=void
12876 else
12877   echo "configure: failed program was:" >&5
12878   cat conftest.$ac_ext >&5
12879   rm -rf conftest*
12880   ac_cv_type_signal=int
12881 fi
12882 rm -f conftest*
12883 fi
12884
12885 echo "$ac_t""$ac_cv_type_signal" 1>&6
12886 cat >> confdefs.h <<EOF
12887 #define RETSIGTYPE $ac_cv_type_signal
12888 EOF
12889
12890
12891 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12892 echo "configure:12893: checking for sig_atomic_t" >&5
12893 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12894   echo $ac_n "(cached) $ac_c" 1>&6
12895 else
12896   cat > conftest.$ac_ext <<EOF
12897 #line 12898 "configure"
12898 #include "confdefs.h"
12899 #include <signal.h>
12900 int main() {
12901 sig_atomic_t atomic;
12902 ; return 0; }
12903 EOF
12904 if { (eval echo configure:12905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12905   rm -rf conftest*
12906   ol_cv_type_sig_atomic_t=yes
12907 else
12908   echo "configure: failed program was:" >&5
12909   cat conftest.$ac_ext >&5
12910   rm -rf conftest*
12911   ol_cv_type_sig_atomic_t=no
12912 fi
12913 rm -f conftest*
12914 fi
12915
12916 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12917   if test $ol_cv_type_sig_atomic_t = no; then
12918     cat >> confdefs.h <<\EOF
12919 #define sig_atomic_t int
12920 EOF
12921
12922   fi
12923  
12924 echo $ac_n "checking for size_t""... $ac_c" 1>&6
12925 echo "configure:12926: checking for size_t" >&5
12926 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
12927   echo $ac_n "(cached) $ac_c" 1>&6
12928 else
12929   cat > conftest.$ac_ext <<EOF
12930 #line 12931 "configure"
12931 #include "confdefs.h"
12932 #include <sys/types.h>
12933 #if STDC_HEADERS
12934 #include <stdlib.h>
12935 #include <stddef.h>
12936 #endif
12937 EOF
12938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12939   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12940   rm -rf conftest*
12941   eval "ac_cv_type_size_t=yes"
12942 else
12943   rm -rf conftest*
12944   eval "ac_cv_type_size_t=no"
12945 fi
12946 rm -f conftest*
12947
12948 fi
12949 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
12950   echo "$ac_t""yes" 1>&6
12951 else
12952   echo "$ac_t""no" 1>&6
12953   cat >> confdefs.h <<EOF
12954 #define size_t unsigned
12955 EOF
12956
12957 fi
12958
12959 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
12960 echo "configure:12961: checking for socklen_t" >&5
12961 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
12962   echo $ac_n "(cached) $ac_c" 1>&6
12963 else
12964   cat > conftest.$ac_ext <<EOF
12965 #line 12966 "configure"
12966 #include "confdefs.h"
12967
12968 #ifdef HAVE_SYS_TYPES_H
12969 #include <sys/types.h>
12970 #endif
12971 #ifdef HAVE_SYS_SOCKET_H
12972 #include <sys/socket.h>
12973 #endif
12974
12975 int main() {
12976 socklen_t len;
12977 ; return 0; }
12978 EOF
12979 if { (eval echo configure:12980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12980   rm -rf conftest*
12981   ol_cv_type_socklen_t=yes
12982 else
12983   echo "configure: failed program was:" >&5
12984   cat conftest.$ac_ext >&5
12985   rm -rf conftest*
12986   ol_cv_type_socklen_t=no
12987 fi
12988 rm -f conftest*
12989 fi
12990
12991 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
12992   if test $ol_cv_type_socklen_t = no; then
12993     cat >> confdefs.h <<\EOF
12994 #define socklen_t int
12995 EOF
12996
12997   fi
12998  
12999 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13000 echo "configure:13001: checking for member st_blksize in aggregate type struct stat" >&5
13001 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13002   echo $ac_n "(cached) $ac_c" 1>&6
13003 else
13004   cat > conftest.$ac_ext <<EOF
13005 #line 13006 "configure"
13006 #include "confdefs.h"
13007 #include <sys/types.h>
13008 #include <sys/stat.h>
13009 int main() {
13010 struct stat foo; foo.st_blksize;
13011 ; return 0; }
13012 EOF
13013 if { (eval echo configure:13014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13014   rm -rf conftest*
13015   ac_cv_c_struct_member_st_blksize=yes
13016 else
13017   echo "configure: failed program was:" >&5
13018   cat conftest.$ac_ext >&5
13019   rm -rf conftest*
13020   ac_cv_c_struct_member_st_blksize=no
13021 fi
13022 rm -f conftest*
13023 fi
13024
13025 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13026 st_blksize="$ac_cv_c_struct_member_st_blksize"
13027 if test $ac_cv_c_struct_member_st_blksize = yes; then
13028   cat >> confdefs.h <<\EOF
13029 #define HAVE_ST_BLKSIZE 1
13030 EOF
13031
13032 fi
13033
13034 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13035 echo "configure:13036: checking whether time.h and sys/time.h may both be included" >&5
13036 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13037   echo $ac_n "(cached) $ac_c" 1>&6
13038 else
13039   cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042 #include <sys/types.h>
13043 #include <sys/time.h>
13044 #include <time.h>
13045 int main() {
13046 struct tm *tp;
13047 ; return 0; }
13048 EOF
13049 if { (eval echo configure:13050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13050   rm -rf conftest*
13051   ac_cv_header_time=yes
13052 else
13053   echo "configure: failed program was:" >&5
13054   cat conftest.$ac_ext >&5
13055   rm -rf conftest*
13056   ac_cv_header_time=no
13057 fi
13058 rm -f conftest*
13059 fi
13060
13061 echo "$ac_t""$ac_cv_header_time" 1>&6
13062 if test $ac_cv_header_time = yes; then
13063   cat >> confdefs.h <<\EOF
13064 #define TIME_WITH_SYS_TIME 1
13065 EOF
13066
13067 fi
13068
13069 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13070 echo "configure:13071: checking whether struct tm is in sys/time.h or time.h" >&5
13071 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13072   echo $ac_n "(cached) $ac_c" 1>&6
13073 else
13074   cat > conftest.$ac_ext <<EOF
13075 #line 13076 "configure"
13076 #include "confdefs.h"
13077 #include <sys/types.h>
13078 #include <time.h>
13079 int main() {
13080 struct tm *tp; tp->tm_sec;
13081 ; return 0; }
13082 EOF
13083 if { (eval echo configure:13084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13084   rm -rf conftest*
13085   ac_cv_struct_tm=time.h
13086 else
13087   echo "configure: failed program was:" >&5
13088   cat conftest.$ac_ext >&5
13089   rm -rf conftest*
13090   ac_cv_struct_tm=sys/time.h
13091 fi
13092 rm -f conftest*
13093 fi
13094
13095 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13096 if test $ac_cv_struct_tm = sys/time.h; then
13097   cat >> confdefs.h <<\EOF
13098 #define TM_IN_SYS_TIME 1
13099 EOF
13100
13101 fi
13102
13103 # test for pw_gecos in struct passwd
13104 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13105 echo "configure:13106: checking struct passwd for pw_gecos" >&5
13106 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13107   echo $ac_n "(cached) $ac_c" 1>&6
13108 else
13109   
13110         cat > conftest.$ac_ext <<EOF
13111 #line 13112 "configure"
13112 #include "confdefs.h"
13113 #include <pwd.h>
13114 int main() {
13115
13116         struct passwd pwd;
13117         pwd.pw_gecos = pwd.pw_name;
13118
13119 ; return 0; }
13120 EOF
13121 if { (eval echo configure:13122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13122   rm -rf conftest*
13123   ol_cv_struct_passwd_pw_gecos=yes
13124 else
13125   echo "configure: failed program was:" >&5
13126   cat conftest.$ac_ext >&5
13127   rm -rf conftest*
13128   ol_cv_struct_passwd_pw_gecos=no
13129 fi
13130 rm -f conftest*
13131 fi
13132
13133 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13134 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13135         cat >> confdefs.h <<\EOF
13136 #define HAVE_PW_GECOS 1
13137 EOF
13138
13139 fi
13140
13141 # test for pw_passwd in struct passwd
13142 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13143 echo "configure:13144: checking struct passwd for pw_passwd" >&5
13144 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13145   echo $ac_n "(cached) $ac_c" 1>&6
13146 else
13147   
13148         cat > conftest.$ac_ext <<EOF
13149 #line 13150 "configure"
13150 #include "confdefs.h"
13151 #include <pwd.h>
13152 int main() {
13153
13154         struct passwd pwd;
13155         pwd.pw_passwd = pwd.pw_name;
13156
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13160   rm -rf conftest*
13161   ol_cv_struct_passwd_pw_passwd=yes
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   ol_cv_struct_passwd_pw_passwd=no
13167 fi
13168 rm -f conftest*
13169 fi
13170
13171 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13172 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13173         cat >> confdefs.h <<\EOF
13174 #define HAVE_PW_PASSWD 1
13175 EOF
13176
13177 fi
13178
13179
13180 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13181 echo "configure:13182: checking if toupper() requires islower()" >&5
13182 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13183   echo $ac_n "(cached) $ac_c" 1>&6
13184 else
13185   
13186         if test "$cross_compiling" = yes; then
13187   ol_cv_c_upper_lower=safe
13188 else
13189   cat > conftest.$ac_ext <<EOF
13190 #line 13191 "configure"
13191 #include "confdefs.h"
13192
13193 #include <ctype.h>
13194 main()
13195 {
13196         if ('C' == toupper('C'))
13197                 exit(0);
13198         else
13199                 exit(1);
13200 }
13201 EOF
13202 if { (eval echo configure:13203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13203 then
13204   ol_cv_c_upper_lower=no
13205 else
13206   echo "configure: failed program was:" >&5
13207   cat conftest.$ac_ext >&5
13208   rm -fr conftest*
13209   ol_cv_c_upper_lower=yes
13210 fi
13211 rm -fr conftest*
13212 fi
13213
13214 fi
13215
13216 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13217 if test $ol_cv_c_upper_lower != no ; then
13218         cat >> confdefs.h <<\EOF
13219 #define C_UPPER_LOWER 1
13220 EOF
13221
13222 fi
13223
13224 echo $ac_n "checking for working const""... $ac_c" 1>&6
13225 echo "configure:13226: checking for working const" >&5
13226 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13227   echo $ac_n "(cached) $ac_c" 1>&6
13228 else
13229   cat > conftest.$ac_ext <<EOF
13230 #line 13231 "configure"
13231 #include "confdefs.h"
13232
13233 int main() {
13234
13235 /* Ultrix mips cc rejects this.  */
13236 typedef int charset[2]; const charset x;
13237 /* SunOS 4.1.1 cc rejects this.  */
13238 char const *const *ccp;
13239 char **p;
13240 /* NEC SVR4.0.2 mips cc rejects this.  */
13241 struct point {int x, y;};
13242 static struct point const zero = {0,0};
13243 /* AIX XL C 1.02.0.0 rejects this.
13244    It does not let you subtract one const X* pointer from another in an arm
13245    of an if-expression whose if-part is not a constant expression */
13246 const char *g = "string";
13247 ccp = &g + (g ? g-g : 0);
13248 /* HPUX 7.0 cc rejects these. */
13249 ++ccp;
13250 p = (char**) ccp;
13251 ccp = (char const *const *) p;
13252 { /* SCO 3.2v4 cc rejects this.  */
13253   char *t;
13254   char const *s = 0 ? (char *) 0 : (char const *) 0;
13255
13256   *t++ = 0;
13257 }
13258 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13259   int x[] = {25, 17};
13260   const int *foo = &x[0];
13261   ++foo;
13262 }
13263 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13264   typedef const int *iptr;
13265   iptr p = 0;
13266   ++p;
13267 }
13268 { /* AIX XL C 1.02.0.0 rejects this saying
13269      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13270   struct s { int j; const int *ap[3]; };
13271   struct s *b; b->j = 5;
13272 }
13273 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13274   const int foo = 10;
13275 }
13276
13277 ; return 0; }
13278 EOF
13279 if { (eval echo configure:13280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13280   rm -rf conftest*
13281   ac_cv_c_const=yes
13282 else
13283   echo "configure: failed program was:" >&5
13284   cat conftest.$ac_ext >&5
13285   rm -rf conftest*
13286   ac_cv_c_const=no
13287 fi
13288 rm -f conftest*
13289 fi
13290
13291 echo "$ac_t""$ac_cv_c_const" 1>&6
13292 if test $ac_cv_c_const = no; then
13293   cat >> confdefs.h <<\EOF
13294 #define const 
13295 EOF
13296
13297 fi
13298
13299 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13300 echo "configure:13301: checking if compiler understands volatile" >&5
13301 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13302   echo $ac_n "(cached) $ac_c" 1>&6
13303 else
13304   cat > conftest.$ac_ext <<EOF
13305 #line 13306 "configure"
13306 #include "confdefs.h"
13307 int x, y, z;
13308 int main() {
13309 volatile int a; int * volatile b = x ? &y : &z;
13310       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13311       *b = 0;
13312 ; return 0; }
13313 EOF
13314 if { (eval echo configure:13315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13315   rm -rf conftest*
13316   ol_cv_c_volatile=yes
13317 else
13318   echo "configure: failed program was:" >&5
13319   cat conftest.$ac_ext >&5
13320   rm -rf conftest*
13321   ol_cv_c_volatile=no
13322 fi
13323 rm -f conftest*
13324 fi
13325
13326 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13327   if test $ol_cv_c_volatile = yes; then
13328     : 
13329   else
13330     cat >> confdefs.h <<\EOF
13331 #define volatile 
13332 EOF
13333
13334   fi
13335  
13336
13337 if test $cross_compiling = yes ; then
13338         cat >> confdefs.h <<\EOF
13339 #define CROSS_COMPILING 1
13340 EOF
13341
13342
13343         cat >> confdefs.h <<\EOF
13344 #define LBER_INT_T long
13345 EOF
13346
13347         cat >> confdefs.h <<\EOF
13348 #define LBER_TAG_T long
13349 EOF
13350
13351         cat >> confdefs.h <<\EOF
13352 #define LBER_SOCKET_T int
13353 EOF
13354
13355
13356 else
13357         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13358 echo "configure:13359: checking whether byte ordering is bigendian" >&5
13359 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13360   echo $ac_n "(cached) $ac_c" 1>&6
13361 else
13362   ac_cv_c_bigendian=unknown
13363 # See if sys/param.h defines the BYTE_ORDER macro.
13364 cat > conftest.$ac_ext <<EOF
13365 #line 13366 "configure"
13366 #include "confdefs.h"
13367 #include <sys/types.h>
13368 #include <sys/param.h>
13369 int main() {
13370
13371 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13372  bogus endian macros
13373 #endif
13374 ; return 0; }
13375 EOF
13376 if { (eval echo configure:13377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13377   rm -rf conftest*
13378   # It does; now see whether it defined to BIG_ENDIAN or not.
13379 cat > conftest.$ac_ext <<EOF
13380 #line 13381 "configure"
13381 #include "confdefs.h"
13382 #include <sys/types.h>
13383 #include <sys/param.h>
13384 int main() {
13385
13386 #if BYTE_ORDER != BIG_ENDIAN
13387  not big endian
13388 #endif
13389 ; return 0; }
13390 EOF
13391 if { (eval echo configure:13392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13392   rm -rf conftest*
13393   ac_cv_c_bigendian=yes
13394 else
13395   echo "configure: failed program was:" >&5
13396   cat conftest.$ac_ext >&5
13397   rm -rf conftest*
13398   ac_cv_c_bigendian=no
13399 fi
13400 rm -f conftest*
13401 else
13402   echo "configure: failed program was:" >&5
13403   cat conftest.$ac_ext >&5
13404 fi
13405 rm -f conftest*
13406 if test $ac_cv_c_bigendian = unknown; then
13407 if test "$cross_compiling" = yes; then
13408     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13409 else
13410   cat > conftest.$ac_ext <<EOF
13411 #line 13412 "configure"
13412 #include "confdefs.h"
13413 main () {
13414   /* Are we little or big endian?  From Harbison&Steele.  */
13415   union
13416   {
13417     long l;
13418     char c[sizeof (long)];
13419   } u;
13420   u.l = 1;
13421   exit (u.c[sizeof (long) - 1] == 1);
13422 }
13423 EOF
13424 if { (eval echo configure:13425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13425 then
13426   ac_cv_c_bigendian=no
13427 else
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -fr conftest*
13431   ac_cv_c_bigendian=yes
13432 fi
13433 rm -fr conftest*
13434 fi
13435
13436 fi
13437 fi
13438
13439 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13440 if test $ac_cv_c_bigendian = yes; then
13441   cat >> confdefs.h <<\EOF
13442 #define WORDS_BIGENDIAN 1
13443 EOF
13444
13445 fi
13446
13447         echo $ac_n "checking size of short""... $ac_c" 1>&6
13448 echo "configure:13449: checking size of short" >&5
13449 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13450   echo $ac_n "(cached) $ac_c" 1>&6
13451 else
13452   if test "$cross_compiling" = yes; then
13453     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13454 else
13455   cat > conftest.$ac_ext <<EOF
13456 #line 13457 "configure"
13457 #include "confdefs.h"
13458 #include <stdio.h>
13459 main()
13460 {
13461   FILE *f=fopen("conftestval", "w");
13462   if (!f) exit(1);
13463   fprintf(f, "%d\n", sizeof(short));
13464   exit(0);
13465 }
13466 EOF
13467 if { (eval echo configure:13468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13468 then
13469   ac_cv_sizeof_short=`cat conftestval`
13470 else
13471   echo "configure: failed program was:" >&5
13472   cat conftest.$ac_ext >&5
13473   rm -fr conftest*
13474   ac_cv_sizeof_short=0
13475 fi
13476 rm -fr conftest*
13477 fi
13478
13479 fi
13480 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13481 cat >> confdefs.h <<EOF
13482 #define SIZEOF_SHORT $ac_cv_sizeof_short
13483 EOF
13484
13485  
13486         echo $ac_n "checking size of int""... $ac_c" 1>&6
13487 echo "configure:13488: checking size of int" >&5
13488 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13489   echo $ac_n "(cached) $ac_c" 1>&6
13490 else
13491   if test "$cross_compiling" = yes; then
13492     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13493 else
13494   cat > conftest.$ac_ext <<EOF
13495 #line 13496 "configure"
13496 #include "confdefs.h"
13497 #include <stdio.h>
13498 main()
13499 {
13500   FILE *f=fopen("conftestval", "w");
13501   if (!f) exit(1);
13502   fprintf(f, "%d\n", sizeof(int));
13503   exit(0);
13504 }
13505 EOF
13506 if { (eval echo configure:13507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13507 then
13508   ac_cv_sizeof_int=`cat conftestval`
13509 else
13510   echo "configure: failed program was:" >&5
13511   cat conftest.$ac_ext >&5
13512   rm -fr conftest*
13513   ac_cv_sizeof_int=0
13514 fi
13515 rm -fr conftest*
13516 fi
13517
13518 fi
13519 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13520 cat >> confdefs.h <<EOF
13521 #define SIZEOF_INT $ac_cv_sizeof_int
13522 EOF
13523
13524  
13525         echo $ac_n "checking size of long""... $ac_c" 1>&6
13526 echo "configure:13527: checking size of long" >&5
13527 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13528   echo $ac_n "(cached) $ac_c" 1>&6
13529 else
13530   if test "$cross_compiling" = yes; then
13531     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13532 else
13533   cat > conftest.$ac_ext <<EOF
13534 #line 13535 "configure"
13535 #include "confdefs.h"
13536 #include <stdio.h>
13537 main()
13538 {
13539   FILE *f=fopen("conftestval", "w");
13540   if (!f) exit(1);
13541   fprintf(f, "%d\n", sizeof(long));
13542   exit(0);
13543 }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13546 then
13547   ac_cv_sizeof_long=`cat conftestval`
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -fr conftest*
13552   ac_cv_sizeof_long=0
13553 fi
13554 rm -fr conftest*
13555 fi
13556
13557 fi
13558 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13559 cat >> confdefs.h <<EOF
13560 #define SIZEOF_LONG $ac_cv_sizeof_long
13561 EOF
13562
13563
13564
13565         if test "$ac_cv_sizeof_int" -lt 4 ; then
13566                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13567
13568                 cat >> confdefs.h <<\EOF
13569 #define LBER_INT_T long
13570 EOF
13571
13572                 cat >> confdefs.h <<\EOF
13573 #define LBER_TAG_T long
13574 EOF
13575
13576                 cat >> confdefs.h <<\EOF
13577 #define LBER_SOCKET_T int
13578 EOF
13579
13580         else
13581                 cat >> confdefs.h <<\EOF
13582 #define LBER_INT_T int
13583 EOF
13584
13585                 cat >> confdefs.h <<\EOF
13586 #define LBER_TAG_T long
13587 EOF
13588
13589                 cat >> confdefs.h <<\EOF
13590 #define LBER_SOCKET_T int
13591 EOF
13592
13593         fi
13594 fi
13595
13596 cat >> confdefs.h <<\EOF
13597 #define LBER_LEN_T long
13598 EOF
13599
13600
13601 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13602 echo "configure:13603: checking for 8-bit clean memcmp" >&5
13603 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13604   echo $ac_n "(cached) $ac_c" 1>&6
13605 else
13606   if test "$cross_compiling" = yes; then
13607   ac_cv_func_memcmp_clean=no
13608 else
13609   cat > conftest.$ac_ext <<EOF
13610 #line 13611 "configure"
13611 #include "confdefs.h"
13612
13613 main()
13614 {
13615   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13616   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13617 }
13618
13619 EOF
13620 if { (eval echo configure:13621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13621 then
13622   ac_cv_func_memcmp_clean=yes
13623 else
13624   echo "configure: failed program was:" >&5
13625   cat conftest.$ac_ext >&5
13626   rm -fr conftest*
13627   ac_cv_func_memcmp_clean=no
13628 fi
13629 rm -fr conftest*
13630 fi
13631
13632 fi
13633
13634 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13635 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13636
13637 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13638 echo "configure:13639: checking for strftime" >&5
13639 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13640   echo $ac_n "(cached) $ac_c" 1>&6
13641 else
13642   cat > conftest.$ac_ext <<EOF
13643 #line 13644 "configure"
13644 #include "confdefs.h"
13645 /* System header to define __stub macros and hopefully few prototypes,
13646     which can conflict with char strftime(); below.  */
13647 #include <assert.h>
13648 /* Override any gcc2 internal prototype to avoid an error.  */
13649 /* We use char because int might match the return type of a gcc2
13650     builtin and then its argument prototype would still apply.  */
13651 char strftime();
13652 char (*f)();
13653
13654 int main() {
13655
13656 /* The GNU C library defines this for functions which it implements
13657     to always fail with ENOSYS.  Some functions are actually named
13658     something starting with __ and the normal name is an alias.  */
13659 #if defined (__stub_strftime) || defined (__stub___strftime)
13660 choke me
13661 #else
13662 f = strftime;
13663 #endif
13664
13665 ; return 0; }
13666 EOF
13667 if { (eval echo configure:13668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13668   rm -rf conftest*
13669   eval "ac_cv_func_strftime=yes"
13670 else
13671   echo "configure: failed program was:" >&5
13672   cat conftest.$ac_ext >&5
13673   rm -rf conftest*
13674   eval "ac_cv_func_strftime=no"
13675 fi
13676 rm -f conftest*
13677 fi
13678
13679 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13680   echo "$ac_t""yes" 1>&6
13681   cat >> confdefs.h <<\EOF
13682 #define HAVE_STRFTIME 1
13683 EOF
13684
13685 else
13686   echo "$ac_t""no" 1>&6
13687 # strftime is in -lintl on SCO UNIX.
13688 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13689 echo "configure:13690: checking for strftime in -lintl" >&5
13690 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13692   echo $ac_n "(cached) $ac_c" 1>&6
13693 else
13694   ac_save_LIBS="$LIBS"
13695 LIBS="-lintl  $LIBS"
13696 cat > conftest.$ac_ext <<EOF
13697 #line 13698 "configure"
13698 #include "confdefs.h"
13699 /* Override any gcc2 internal prototype to avoid an error.  */
13700 /* We use char because int might match the return type of a gcc2
13701     builtin and then its argument prototype would still apply.  */
13702 char strftime();
13703
13704 int main() {
13705 strftime()
13706 ; return 0; }
13707 EOF
13708 if { (eval echo configure:13709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13709   rm -rf conftest*
13710   eval "ac_cv_lib_$ac_lib_var=yes"
13711 else
13712   echo "configure: failed program was:" >&5
13713   cat conftest.$ac_ext >&5
13714   rm -rf conftest*
13715   eval "ac_cv_lib_$ac_lib_var=no"
13716 fi
13717 rm -f conftest*
13718 LIBS="$ac_save_LIBS"
13719
13720 fi
13721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13722   echo "$ac_t""yes" 1>&6
13723   cat >> confdefs.h <<\EOF
13724 #define HAVE_STRFTIME 1
13725 EOF
13726
13727 LIBS="-lintl $LIBS"
13728 else
13729   echo "$ac_t""no" 1>&6
13730 fi
13731
13732 fi
13733
13734
13735 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13736 echo "configure:13737: checking for inet_aton()" >&5
13737 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13738   echo $ac_n "(cached) $ac_c" 1>&6
13739 else
13740   cat > conftest.$ac_ext <<EOF
13741 #line 13742 "configure"
13742 #include "confdefs.h"
13743
13744 #ifdef HAVE_SYS_TYPES_H
13745 #       include <sys/types.h>
13746 #endif
13747 #ifdef HAVE_SYS_SOCKET_H
13748 #       include <sys/socket.h>
13749 #       ifdef HAVE_SYS_SELECT_H
13750 #               include <sys/select.h>
13751 #       endif
13752 #       include <netinet/in.h>
13753 #       ifdef HAVE_ARPA_INET_H
13754 #               include <arpa/inet.h>
13755 #       endif
13756 #endif
13757
13758 int main() {
13759 struct in_addr in;
13760 int rc = inet_aton( "255.255.255.255", &in );
13761 ; return 0; }
13762 EOF
13763 if { (eval echo configure:13764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13764   rm -rf conftest*
13765   ol_cv_func_inet_aton=yes
13766 else
13767   echo "configure: failed program was:" >&5
13768   cat conftest.$ac_ext >&5
13769   rm -rf conftest*
13770   ol_cv_func_inet_aton=no
13771 fi
13772 rm -f conftest*
13773 fi
13774
13775 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13776   if test $ol_cv_func_inet_aton != no; then
13777     cat >> confdefs.h <<\EOF
13778 #define HAVE_INET_ATON 1
13779 EOF
13780
13781   fi
13782  
13783
13784 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13785 echo "configure:13786: checking for vprintf" >&5
13786 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13787   echo $ac_n "(cached) $ac_c" 1>&6
13788 else
13789   cat > conftest.$ac_ext <<EOF
13790 #line 13791 "configure"
13791 #include "confdefs.h"
13792 /* System header to define __stub macros and hopefully few prototypes,
13793     which can conflict with char vprintf(); below.  */
13794 #include <assert.h>
13795 /* Override any gcc2 internal prototype to avoid an error.  */
13796 /* We use char because int might match the return type of a gcc2
13797     builtin and then its argument prototype would still apply.  */
13798 char vprintf();
13799 char (*f)();
13800
13801 int main() {
13802
13803 /* The GNU C library defines this for functions which it implements
13804     to always fail with ENOSYS.  Some functions are actually named
13805     something starting with __ and the normal name is an alias.  */
13806 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13807 choke me
13808 #else
13809 f = vprintf;
13810 #endif
13811
13812 ; return 0; }
13813 EOF
13814 if { (eval echo configure:13815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13815   rm -rf conftest*
13816   eval "ac_cv_func_vprintf=yes"
13817 else
13818   echo "configure: failed program was:" >&5
13819   cat conftest.$ac_ext >&5
13820   rm -rf conftest*
13821   eval "ac_cv_func_vprintf=no"
13822 fi
13823 rm -f conftest*
13824 fi
13825
13826 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13827   echo "$ac_t""yes" 1>&6
13828   cat >> confdefs.h <<\EOF
13829 #define HAVE_VPRINTF 1
13830 EOF
13831
13832 else
13833   echo "$ac_t""no" 1>&6
13834 fi
13835
13836 if test "$ac_cv_func_vprintf" != yes; then
13837 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13838 echo "configure:13839: checking for _doprnt" >&5
13839 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13840   echo $ac_n "(cached) $ac_c" 1>&6
13841 else
13842   cat > conftest.$ac_ext <<EOF
13843 #line 13844 "configure"
13844 #include "confdefs.h"
13845 /* System header to define __stub macros and hopefully few prototypes,
13846     which can conflict with char _doprnt(); below.  */
13847 #include <assert.h>
13848 /* Override any gcc2 internal prototype to avoid an error.  */
13849 /* We use char because int might match the return type of a gcc2
13850     builtin and then its argument prototype would still apply.  */
13851 char _doprnt();
13852 char (*f)();
13853
13854 int main() {
13855
13856 /* The GNU C library defines this for functions which it implements
13857     to always fail with ENOSYS.  Some functions are actually named
13858     something starting with __ and the normal name is an alias.  */
13859 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13860 choke me
13861 #else
13862 f = _doprnt;
13863 #endif
13864
13865 ; return 0; }
13866 EOF
13867 if { (eval echo configure:13868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13868   rm -rf conftest*
13869   eval "ac_cv_func__doprnt=yes"
13870 else
13871   echo "configure: failed program was:" >&5
13872   cat conftest.$ac_ext >&5
13873   rm -rf conftest*
13874   eval "ac_cv_func__doprnt=no"
13875 fi
13876 rm -f conftest*
13877 fi
13878
13879 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13880   echo "$ac_t""yes" 1>&6
13881   cat >> confdefs.h <<\EOF
13882 #define HAVE_DOPRNT 1
13883 EOF
13884
13885 else
13886   echo "$ac_t""no" 1>&6
13887 fi
13888
13889 fi
13890
13891
13892 if test $ac_cv_func_vprintf = yes ; then
13893                 for ac_func in vsnprintf vsprintf
13894 do
13895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13896 echo "configure:13897: checking for $ac_func" >&5
13897 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13898   echo $ac_n "(cached) $ac_c" 1>&6
13899 else
13900   cat > conftest.$ac_ext <<EOF
13901 #line 13902 "configure"
13902 #include "confdefs.h"
13903 /* System header to define __stub macros and hopefully few prototypes,
13904     which can conflict with char $ac_func(); below.  */
13905 #include <assert.h>
13906 /* Override any gcc2 internal prototype to avoid an error.  */
13907 /* We use char because int might match the return type of a gcc2
13908     builtin and then its argument prototype would still apply.  */
13909 char $ac_func();
13910 char (*f)();
13911
13912 int main() {
13913
13914 /* The GNU C library defines this for functions which it implements
13915     to always fail with ENOSYS.  Some functions are actually named
13916     something starting with __ and the normal name is an alias.  */
13917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13918 choke me
13919 #else
13920 f = $ac_func;
13921 #endif
13922
13923 ; return 0; }
13924 EOF
13925 if { (eval echo configure:13926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13926   rm -rf conftest*
13927   eval "ac_cv_func_$ac_func=yes"
13928 else
13929   echo "configure: failed program was:" >&5
13930   cat conftest.$ac_ext >&5
13931   rm -rf conftest*
13932   eval "ac_cv_func_$ac_func=no"
13933 fi
13934 rm -f conftest*
13935 fi
13936
13937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13938   echo "$ac_t""yes" 1>&6
13939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13940   cat >> confdefs.h <<EOF
13941 #define $ac_tr_func 1
13942 EOF
13943  
13944 else
13945   echo "$ac_t""no" 1>&6
13946 fi
13947 done
13948
13949 fi
13950
13951 for ac_func in \
13952         bcopy                   \
13953         closesocket             \
13954         endgrent                \
13955         endpwent                \
13956         flock                   \
13957         getdtablesize   \
13958         getgrgid                \
13959         gethostname             \
13960         getpass                 \
13961         getpwuid                \
13962         getpwnam                \
13963         getspnam                \
13964         gettimeofday    \
13965         initgroups              \
13966         lockf                   \
13967         memcpy                  \
13968         memmove                 \
13969         mkstemp                 \
13970         read                    \
13971         recv                    \
13972         recvfrom                \
13973         setpwfile               \
13974         setgid                  \
13975         setegid                 \
13976         setsid                  \
13977         setuid                  \
13978         seteuid                 \
13979         signal                  \
13980         sigset                  \
13981         snprintf                \
13982         strdup                  \
13983         strerror                \
13984         strpbrk                 \
13985         strrchr                 \
13986         strsep                  \
13987         strstr                  \
13988         strtol                  \
13989         strtoul                 \
13990         strspn                  \
13991         sysconf                 \
13992         waitpid                 \
13993         wait4                   \
13994         write                   \
13995         send                    \
13996         sendto                  \
13997
13998 do
13999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14000 echo "configure:14001: checking for $ac_func" >&5
14001 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14002   echo $ac_n "(cached) $ac_c" 1>&6
14003 else
14004   cat > conftest.$ac_ext <<EOF
14005 #line 14006 "configure"
14006 #include "confdefs.h"
14007 /* System header to define __stub macros and hopefully few prototypes,
14008     which can conflict with char $ac_func(); below.  */
14009 #include <assert.h>
14010 /* Override any gcc2 internal prototype to avoid an error.  */
14011 /* We use char because int might match the return type of a gcc2
14012     builtin and then its argument prototype would still apply.  */
14013 char $ac_func();
14014 char (*f)();
14015
14016 int main() {
14017
14018 /* The GNU C library defines this for functions which it implements
14019     to always fail with ENOSYS.  Some functions are actually named
14020     something starting with __ and the normal name is an alias.  */
14021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14022 choke me
14023 #else
14024 f = $ac_func;
14025 #endif
14026
14027 ; return 0; }
14028 EOF
14029 if { (eval echo configure:14030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14030   rm -rf conftest*
14031   eval "ac_cv_func_$ac_func=yes"
14032 else
14033   echo "configure: failed program was:" >&5
14034   cat conftest.$ac_ext >&5
14035   rm -rf conftest*
14036   eval "ac_cv_func_$ac_func=no"
14037 fi
14038 rm -f conftest*
14039 fi
14040
14041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14042   echo "$ac_t""yes" 1>&6
14043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14044   cat >> confdefs.h <<EOF
14045 #define $ac_tr_func 1
14046 EOF
14047  
14048 else
14049   echo "$ac_t""no" 1>&6
14050 fi
14051 done
14052
14053
14054 for ac_func in getopt tempnam
14055 do
14056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14057 echo "configure:14058: checking for $ac_func" >&5
14058 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14059   echo $ac_n "(cached) $ac_c" 1>&6
14060 else
14061   cat > conftest.$ac_ext <<EOF
14062 #line 14063 "configure"
14063 #include "confdefs.h"
14064 /* System header to define __stub macros and hopefully few prototypes,
14065     which can conflict with char $ac_func(); below.  */
14066 #include <assert.h>
14067 /* Override any gcc2 internal prototype to avoid an error.  */
14068 /* We use char because int might match the return type of a gcc2
14069     builtin and then its argument prototype would still apply.  */
14070 char $ac_func();
14071 char (*f)();
14072
14073 int main() {
14074
14075 /* The GNU C library defines this for functions which it implements
14076     to always fail with ENOSYS.  Some functions are actually named
14077     something starting with __ and the normal name is an alias.  */
14078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14079 choke me
14080 #else
14081 f = $ac_func;
14082 #endif
14083
14084 ; return 0; }
14085 EOF
14086 if { (eval echo configure:14087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14087   rm -rf conftest*
14088   eval "ac_cv_func_$ac_func=yes"
14089 else
14090   echo "configure: failed program was:" >&5
14091   cat conftest.$ac_ext >&5
14092   rm -rf conftest*
14093   eval "ac_cv_func_$ac_func=no"
14094 fi
14095 rm -f conftest*
14096 fi
14097
14098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14099   echo "$ac_t""yes" 1>&6
14100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14101   cat >> confdefs.h <<EOF
14102 #define $ac_tr_func 1
14103 EOF
14104  
14105 else
14106   echo "$ac_t""no" 1>&6
14107 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14108 fi
14109 done
14110
14111
14112
14113 # Check Configuration
14114 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14115 echo "configure:14116: checking declaration of sys_errlist" >&5
14116 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14117   echo $ac_n "(cached) $ac_c" 1>&6
14118 else
14119   
14120         cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123
14124 #include <stdio.h>
14125 #include <sys/types.h>
14126 #include <errno.h> 
14127 int main() {
14128 char *c = (char *) *sys_errlist
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14132   rm -rf conftest*
14133   ol_cv_dcl_sys_errlist=yes
14134         ol_cv_have_sys_errlist=yes
14135 else
14136   echo "configure: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   rm -rf conftest*
14139   ol_cv_dcl_sys_errlist=no
14140 fi
14141 rm -f conftest*
14142 fi
14143
14144 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14145 #
14146 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14147 if test $ol_cv_dcl_sys_errlist = no ; then
14148         cat >> confdefs.h <<\EOF
14149 #define DECL_SYS_ERRLIST 1
14150 EOF
14151
14152
14153         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14154 echo "configure:14155: checking existence of sys_errlist" >&5
14155 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14156   echo $ac_n "(cached) $ac_c" 1>&6
14157 else
14158   
14159                 cat > conftest.$ac_ext <<EOF
14160 #line 14161 "configure"
14161 #include "confdefs.h"
14162 #include <errno.h>
14163 int main() {
14164 char *c = (char *) *sys_errlist
14165 ; return 0; }
14166 EOF
14167 if { (eval echo configure:14168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14168   rm -rf conftest*
14169   ol_cv_have_sys_errlist=yes
14170 else
14171   echo "configure: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173   rm -rf conftest*
14174   ol_cv_have_sys_errlist=no
14175 fi
14176 rm -f conftest*
14177 fi
14178
14179 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14180 fi
14181 if test $ol_cv_have_sys_errlist = yes ; then
14182         cat >> confdefs.h <<\EOF
14183 #define HAVE_SYS_ERRLIST 1
14184 EOF
14185
14186 fi
14187
14188
14189
14190 if test "$ol_enable_debug" != no ; then
14191         cat >> confdefs.h <<\EOF
14192 #define LDAP_DEBUG 1
14193 EOF
14194
14195 fi
14196 if test "$ol_enable_syslog" = yes ; then
14197         cat >> confdefs.h <<\EOF
14198 #define LDAP_SYSLOG 1
14199 EOF
14200
14201 fi
14202 if test "$ol_enable_libui" = yes ; then
14203         cat >> confdefs.h <<\EOF
14204 #define LDAP_LIBUI 1
14205 EOF
14206
14207 fi
14208 if test "$ol_enable_cache" = no ; then
14209         cat >> confdefs.h <<\EOF
14210 #define LDAP_NOCACHE 1
14211 EOF
14212
14213 fi
14214 if test "$ol_enable_dns" != no ; then
14215         cat >> confdefs.h <<\EOF
14216 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14217 EOF
14218
14219 fi
14220 if test "$ol_enable_proctitle" != no ; then
14221         cat >> confdefs.h <<\EOF
14222 #define LDAP_PROCTITLE 1
14223 EOF
14224
14225 fi
14226 if test "$ol_enable_referrals" != no ; then
14227         cat >> confdefs.h <<\EOF
14228 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14229 EOF
14230
14231 fi
14232 if test "$ol_enable_cldap" != no ; then
14233         cat >> confdefs.h <<\EOF
14234 #define LDAP_CONNECTIONLESS 1
14235 EOF
14236
14237 fi
14238
14239 if test "$ol_enable_crypt" != no ; then
14240         cat >> confdefs.h <<\EOF
14241 #define SLAPD_CRYPT 1
14242 EOF
14243
14244 fi
14245 if test "$ol_enable_cleartext" != no ; then
14246         cat >> confdefs.h <<\EOF
14247 #define SLAPD_CLEARTEXT 1
14248 EOF
14249
14250 fi
14251 if test "$ol_enable_multimaster" != no ; then
14252         cat >> confdefs.h <<\EOF
14253 #define SLAPD_MULTIMASTER 1
14254 EOF
14255
14256 fi
14257 if test "$ol_enable_phonetic" != no ; then
14258         cat >> confdefs.h <<\EOF
14259 #define SLAPD_PHONETIC 1
14260 EOF
14261
14262 fi
14263 if test "$ol_enable_rlookups" != no ; then
14264         cat >> confdefs.h <<\EOF
14265 #define SLAPD_RLOOKUPS 1
14266 EOF
14267
14268 fi
14269
14270 if test "$ol_link_modules" != no ; then
14271         cat >> confdefs.h <<\EOF
14272 #define SLAPD_MODULES 1
14273 EOF
14274
14275         BUILD_SLAPD=yes
14276         MODULES_LIBS=-lltdl
14277         SLAPD_MODULES_LDFLAGS="-dlopen self"
14278 fi
14279
14280 if test "$ol_link_bdb2" != no ; then
14281         cat >> confdefs.h <<\EOF
14282 #define SLAPD_BDB2 1
14283 EOF
14284
14285         BUILD_SLAPD=yes
14286         BUILD_BDB2=yes
14287         if test "$ol_with_bdb2_module" != static ; then
14288                 cat >> confdefs.h <<\EOF
14289 #define SLAPD_BDB2_DYNAMIC 1
14290 EOF
14291
14292                 BUILD_BDB2=mod
14293                 BUILD_BDB2_DYNAMIC=shared
14294                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14295         fi
14296 fi
14297
14298 if test "$ol_enable_ldap" != no ; then
14299         cat >> confdefs.h <<\EOF
14300 #define SLAPD_LDAP 1
14301 EOF
14302
14303         BUILD_SLAPD=yes
14304         BUILD_LDAP=yes
14305         if test "$ol_with_ldap_module" != static ; then
14306                 cat >> confdefs.h <<\EOF
14307 #define SLAPD_LDAP_DYNAMIC 1
14308 EOF
14309
14310                 BUILD_LDAP=mod
14311                 BUILD_LDAP_DYNAMIC=shared
14312                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14313         fi
14314 fi
14315
14316 if test "$ol_link_ldbm" != no ; then
14317         cat >> confdefs.h <<\EOF
14318 #define SLAPD_LDBM 1
14319 EOF
14320
14321         BUILD_SLAPD=yes
14322         BUILD_LDBM=yes
14323         if test "$ol_with_ldbm_module" != static ; then
14324                 cat >> confdefs.h <<\EOF
14325 #define SLAPD_LDBM_DYNAMIC 1
14326 EOF
14327
14328                 BUILD_LDBM=mod
14329                 BUILD_LDBM_DYNAMIC=shared
14330                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14331         fi
14332 fi
14333
14334 if test "$ol_enable_passwd" != no ; then
14335         cat >> confdefs.h <<\EOF
14336 #define SLAPD_PASSWD 1
14337 EOF
14338
14339         BUILD_SLAPD=yes
14340         BUILD_PASSWD=yes
14341         if test "$ol_with_passwd_module" != static ; then
14342                 cat >> confdefs.h <<\EOF
14343 #define SLAPD_PASSWD_DYNAMIC 1
14344 EOF
14345
14346                 BUILD_PASSWD=mod
14347                 BUILD_PASSWD_DYNAMIC=shared
14348                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14349         fi
14350 fi
14351
14352 if test "$ol_link_perl" != no ; then
14353         cat >> confdefs.h <<\EOF
14354 #define SLAPD_PERL 1
14355 EOF
14356
14357         BUILD_SLAPD=yes
14358         BUILD_PERL=yes
14359         if test "$ol_with_perl_module" != static ; then
14360                 cat >> confdefs.h <<\EOF
14361 #define SLAPD_PERL_DYNAMIC 1
14362 EOF
14363
14364                 BUILD_PERL=mod
14365                 BUILD_PERL_DYNAMIC=shared
14366                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14367         fi
14368 fi
14369
14370 if test "$ol_enable_shell" != no ; then
14371         cat >> confdefs.h <<\EOF
14372 #define SLAPD_SHELL 1
14373 EOF
14374
14375         BUILD_SLAPD=yes
14376         BUILD_SHELL=yes
14377         if test "$ol_with_shell_module" != static ; then
14378                 cat >> confdefs.h <<\EOF
14379 #define SLAPD_SHELL_DYNAMIC 1
14380 EOF
14381
14382                 BUILD_SHELL=mod
14383                 BUILD_SHELL_DYNAMIC=shared
14384                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14385         fi
14386 fi
14387
14388 if test "$ol_enable_tcl" != no ; then
14389         cat >> confdefs.h <<\EOF
14390 #define SLAPD_TCL 1
14391 EOF
14392
14393         BUILD_SLAPD=yes
14394         BUILD_TCL=yes
14395         if test "$ol_with_tcl_module" != static; then
14396                 cat >> confdefs.h <<\EOF
14397 #define SLAPD_TCL_DYNAMIC 1
14398 EOF
14399
14400                 BUILD_TCL=mod
14401                 BUILD_TCL_DYNAMIC=shared
14402                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14403         fi
14404 fi
14405
14406 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14407         $BUILD_SLAPD = yes ; then
14408         BUILD_SLURPD=yes
14409 fi
14410
14411 if test "$ol_link_isode" != no ; then
14412         BUILD_LDAPD=yes
14413 fi
14414
14415
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 trap '' 1 2 15
14460
14461 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14462
14463 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14464 # Let make expand exec_prefix.
14465 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14466
14467 # Any assignment to VPATH causes Sun make to only execute
14468 # the first set of double-colon rules, so remove it if not needed.
14469 # If there is a colon in the path, we need to keep it.
14470 if test "x$srcdir" = x.; then
14471   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14472 fi
14473
14474 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14475
14476 DEFS=-DHAVE_CONFIG_H
14477
14478 # Without the "./", some shells look in PATH for config.status.
14479 : ${CONFIG_STATUS=./config.status}
14480
14481 echo creating $CONFIG_STATUS
14482 rm -f $CONFIG_STATUS
14483 cat > $CONFIG_STATUS <<EOF
14484 #! /bin/sh
14485 # Generated automatically by configure.
14486 # Run this file to recreate the current configuration.
14487 # This directory was configured as follows,
14488 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14489 #
14490 # $0 $ac_configure_args
14491 #
14492 # Compiler output produced by configure, useful for debugging
14493 # configure, is in ./config.log if it exists.
14494
14495 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14496 for ac_option
14497 do
14498   case "\$ac_option" in
14499   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14500     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14501     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14502   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14503     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14504     exit 0 ;;
14505   -help | --help | --hel | --he | --h)
14506     echo "\$ac_cs_usage"; exit 0 ;;
14507   *) echo "\$ac_cs_usage"; exit 1 ;;
14508   esac
14509 done
14510
14511 ac_given_srcdir=$srcdir
14512 ac_given_INSTALL="$INSTALL"
14513
14514 trap 'rm -fr `echo "\
14515 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14516 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14517 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14518 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14519 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14520 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14521 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14522 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14523 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14524 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14525 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14526 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14527 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14528 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14529 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14530 include/Makefile:build/top.mk:include/Makefile.in \
14531 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14532 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14533 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14534 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14535 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14536 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14537 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14538 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14539 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14540 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14541 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14542 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14543 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14544 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14545 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14546 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14547 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14548 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14549 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14550 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14551 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14552 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14553 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14554 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14555 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14556 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14557  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14558 EOF
14559 cat >> $CONFIG_STATUS <<EOF
14560
14561 # Protect against being on the right side of a sed subst in config.status.
14562 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14563  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14564 $ac_vpsub
14565 $extrasub
14566 s%@SHELL@%$SHELL%g
14567 s%@CFLAGS@%$CFLAGS%g
14568 s%@CPPFLAGS@%$CPPFLAGS%g
14569 s%@CXXFLAGS@%$CXXFLAGS%g
14570 s%@FFLAGS@%$FFLAGS%g
14571 s%@DEFS@%$DEFS%g
14572 s%@LDFLAGS@%$LDFLAGS%g
14573 s%@LIBS@%$LIBS%g
14574 s%@exec_prefix@%$exec_prefix%g
14575 s%@prefix@%$prefix%g
14576 s%@program_transform_name@%$program_transform_name%g
14577 s%@bindir@%$bindir%g
14578 s%@sbindir@%$sbindir%g
14579 s%@libexecdir@%$libexecdir%g
14580 s%@datadir@%$datadir%g
14581 s%@sysconfdir@%$sysconfdir%g
14582 s%@sharedstatedir@%$sharedstatedir%g
14583 s%@localstatedir@%$localstatedir%g
14584 s%@libdir@%$libdir%g
14585 s%@includedir@%$includedir%g
14586 s%@oldincludedir@%$oldincludedir%g
14587 s%@infodir@%$infodir%g
14588 s%@mandir@%$mandir%g
14589 s%@host@%$host%g
14590 s%@host_alias@%$host_alias%g
14591 s%@host_cpu@%$host_cpu%g
14592 s%@host_vendor@%$host_vendor%g
14593 s%@host_os@%$host_os%g
14594 s%@target@%$target%g
14595 s%@target_alias@%$target_alias%g
14596 s%@target_cpu@%$target_cpu%g
14597 s%@target_vendor@%$target_vendor%g
14598 s%@target_os@%$target_os%g
14599 s%@build@%$build%g
14600 s%@build_alias@%$build_alias%g
14601 s%@build_cpu@%$build_cpu%g
14602 s%@build_vendor@%$build_vendor%g
14603 s%@build_os@%$build_os%g
14604 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14605 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14606 s%@INSTALL_DATA@%$INSTALL_DATA%g
14607 s%@PACKAGE@%$PACKAGE%g
14608 s%@VERSION@%$VERSION%g
14609 s%@ACLOCAL@%$ACLOCAL%g
14610 s%@AUTOCONF@%$AUTOCONF%g
14611 s%@AUTOMAKE@%$AUTOMAKE%g
14612 s%@AUTOHEADER@%$AUTOHEADER%g
14613 s%@MAKEINFO@%$MAKEINFO%g
14614 s%@install_sh@%$install_sh%g
14615 s%@AMTAR@%$AMTAR%g
14616 s%@AWK@%$AWK%g
14617 s%@AMTARFLAGS@%$AMTARFLAGS%g
14618 s%@SET_MAKE@%$SET_MAKE%g
14619 s%@top_builddir@%$top_builddir%g
14620 s%@ldap_subdir@%$ldap_subdir%g
14621 s%@CC@%$CC%g
14622 s%@RANLIB@%$RANLIB%g
14623 s%@LD@%$LD%g
14624 s%@NM@%$NM%g
14625 s%@LN_S@%$LN_S%g
14626 s%@LIBTOOL@%$LIBTOOL%g
14627 s%@LN_H@%$LN_H%g
14628 s%@SENDMAIL@%$SENDMAIL%g
14629 s%@EDITOR@%$EDITOR%g
14630 s%@FINGER@%$FINGER%g
14631 s%@PERLBIN@%$PERLBIN%g
14632 s%@CPP@%$CPP%g
14633 s%@EXEEXT@%$EXEEXT%g
14634 s%@OBJEXT@%$OBJEXT%g
14635 s%@OL_MKDEP@%$OL_MKDEP%g
14636 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14637 s%@PEPSY@%$PEPSY%g
14638 s%@LIBOBJS@%$LIBOBJS%g
14639 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14640 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14641 s%@BUILD_BDB2@%$BUILD_BDB2%g
14642 s%@BUILD_LDAP@%$BUILD_LDAP%g
14643 s%@BUILD_LDBM@%$BUILD_LDBM%g
14644 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14645 s%@BUILD_PERL@%$BUILD_PERL%g
14646 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14647 s%@BUILD_SHELL@%$BUILD_SHELL%g
14648 s%@BUILD_TCL@%$BUILD_TCL%g
14649 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14650 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14651 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14652 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14653 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14654 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14655 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14656 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14657 s%@LDAP_LIBS@%$LDAP_LIBS%g
14658 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14659 s%@LDIF_LIBS@%$LDIF_LIBS%g
14660 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14661 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14662 s%@LDBM_LIBS@%$LDBM_LIBS%g
14663 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14664 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14665 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14666 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14667 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14668 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14669 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14670 s%@KRB_LIBS@%$KRB_LIBS%g
14671 s%@READLINE_LIBS@%$READLINE_LIBS%g
14672 s%@SASL_LIBS@%$SASL_LIBS%g
14673 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14674 s%@TLS_LIBS@%$TLS_LIBS%g
14675 s%@MODULES_LIBS@%$MODULES_LIBS%g
14676
14677 CEOF
14678 EOF
14679
14680 cat >> $CONFIG_STATUS <<\EOF
14681
14682 # Split the substitutions into bite-sized pieces for seds with
14683 # small command number limits, like on Digital OSF/1 and HP-UX.
14684 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14685 ac_file=1 # Number of current file.
14686 ac_beg=1 # First line for current file.
14687 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14688 ac_more_lines=:
14689 ac_sed_cmds=""
14690 while $ac_more_lines; do
14691   if test $ac_beg -gt 1; then
14692     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14693   else
14694     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14695   fi
14696   if test ! -s conftest.s$ac_file; then
14697     ac_more_lines=false
14698     rm -f conftest.s$ac_file
14699   else
14700     if test -z "$ac_sed_cmds"; then
14701       ac_sed_cmds="sed -f conftest.s$ac_file"
14702     else
14703       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14704     fi
14705     ac_file=`expr $ac_file + 1`
14706     ac_beg=$ac_end
14707     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14708   fi
14709 done
14710 if test -z "$ac_sed_cmds"; then
14711   ac_sed_cmds=cat
14712 fi
14713 EOF
14714
14715 cat >> $CONFIG_STATUS <<EOF
14716
14717 CONFIG_FILES=\${CONFIG_FILES-"\
14718 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14719 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14720 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14721 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14722 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14723 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14724 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14725 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14726 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14727 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14728 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14729 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14730 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14731 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14732 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14733 include/Makefile:build/top.mk:include/Makefile.in \
14734 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14735 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14736 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14737 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14738 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14739 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14740 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14741 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14742 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14743 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14744 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14745 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14746 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14747 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14748 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14749 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14750 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14751 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14752 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14753 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14754 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14755 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14756 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14757 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14758 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14759 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14760 "}
14761 EOF
14762 cat >> $CONFIG_STATUS <<\EOF
14763 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14764   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14765   case "$ac_file" in
14766   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14767        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14768   *) ac_file_in="${ac_file}.in" ;;
14769   esac
14770
14771   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14772
14773   # Remove last slash and all that follows it.  Not all systems have dirname.
14774   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14775   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14776     # The file is in a subdirectory.
14777     test ! -d "$ac_dir" && mkdir "$ac_dir"
14778     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14779     # A "../" for each directory in $ac_dir_suffix.
14780     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14781   else
14782     ac_dir_suffix= ac_dots=
14783   fi
14784
14785   case "$ac_given_srcdir" in
14786   .)  srcdir=.
14787       if test -z "$ac_dots"; then top_srcdir=.
14788       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14789   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14790   *) # Relative path.
14791     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14792     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14793   esac
14794
14795   case "$ac_given_INSTALL" in
14796   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14797   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14798   esac
14799
14800   echo creating "$ac_file"
14801   rm -f "$ac_file"
14802   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14803   case "$ac_file" in
14804   *Makefile*) ac_comsub="1i\\
14805 # $configure_input" ;;
14806   *) ac_comsub= ;;
14807   esac
14808
14809   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14810   sed -e "$ac_comsub
14811 s%@configure_input@%$configure_input%g
14812 s%@srcdir@%$srcdir%g
14813 s%@top_srcdir@%$top_srcdir%g
14814 s%@INSTALL@%$INSTALL%g
14815 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14816 fi; done
14817 rm -f conftest.s*
14818
14819 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14820 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14821 #
14822 # ac_d sets the value in "#define NAME VALUE" lines.
14823 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14824 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14825 ac_dC='\3'
14826 ac_dD='%g'
14827 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14828 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14829 ac_uB='\([      ]\)%\1#\2define\3'
14830 ac_uC=' '
14831 ac_uD='\4%g'
14832 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14833 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14834 ac_eB='$%\1#\2define\3'
14835 ac_eC=' '
14836 ac_eD='%g'
14837
14838 if test "${CONFIG_HEADERS+set}" != set; then
14839 EOF
14840 cat >> $CONFIG_STATUS <<EOF
14841   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14842 EOF
14843 cat >> $CONFIG_STATUS <<\EOF
14844 fi
14845 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14846   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14847   case "$ac_file" in
14848   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14849        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14850   *) ac_file_in="${ac_file}.in" ;;
14851   esac
14852
14853   echo creating $ac_file
14854
14855   rm -f conftest.frag conftest.in conftest.out
14856   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14857   cat $ac_file_inputs > conftest.in
14858
14859 EOF
14860
14861 # Transform confdefs.h into a sed script conftest.vals that substitutes
14862 # the proper values into config.h.in to produce config.h.  And first:
14863 # Protect against being on the right side of a sed subst in config.status.
14864 # Protect against being in an unquoted here document in config.status.
14865 rm -f conftest.vals
14866 cat > conftest.hdr <<\EOF
14867 s/[\\&%]/\\&/g
14868 s%[\\$`]%\\&%g
14869 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14870 s%ac_d%ac_u%gp
14871 s%ac_u%ac_e%gp
14872 EOF
14873 sed -n -f conftest.hdr confdefs.h > conftest.vals
14874 rm -f conftest.hdr
14875
14876 # This sed command replaces #undef with comments.  This is necessary, for
14877 # example, in the case of _POSIX_SOURCE, which is predefined and required
14878 # on some systems where configure will not decide to define it.
14879 cat >> conftest.vals <<\EOF
14880 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14881 EOF
14882
14883 # Break up conftest.vals because some shells have a limit on
14884 # the size of here documents, and old seds have small limits too.
14885
14886 rm -f conftest.tail
14887 while :
14888 do
14889   ac_lines=`grep -c . conftest.vals`
14890   # grep -c gives empty output for an empty file on some AIX systems.
14891   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14892   # Write a limited-size here document to conftest.frag.
14893   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14894   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14895   echo 'CEOF
14896   sed -f conftest.frag conftest.in > conftest.out
14897   rm -f conftest.in
14898   mv conftest.out conftest.in
14899 ' >> $CONFIG_STATUS
14900   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14901   rm -f conftest.vals
14902   mv conftest.tail conftest.vals
14903 done
14904 rm -f conftest.vals
14905
14906 cat >> $CONFIG_STATUS <<\EOF
14907   rm -f conftest.frag conftest.h
14908   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14909   cat conftest.in >> conftest.h
14910   rm -f conftest.in
14911   if cmp -s $ac_file conftest.h 2>/dev/null; then
14912     echo "$ac_file is unchanged"
14913     rm -f conftest.h
14914   else
14915     # Remove last slash and all that follows it.  Not all systems have dirname.
14916       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14917       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14918       # The file is in a subdirectory.
14919       test ! -d "$ac_dir" && mkdir "$ac_dir"
14920     fi
14921     rm -f $ac_file
14922     mv conftest.h $ac_file
14923   fi
14924 fi; done
14925
14926 EOF
14927 cat >> $CONFIG_STATUS <<EOF
14928
14929 EOF
14930 cat >> $CONFIG_STATUS <<\EOF
14931
14932 date > stamp-h
14933 echo Please \"make depend\" to build dependencies
14934
14935 exit 0
14936 EOF
14937 chmod +x $CONFIG_STATUS
14938 rm -fr confdefs* $ac_clean_files
14939 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
14940