]> git.sur5r.net Git - openldap/blob - configure
Add multimaster replication support (ITS#170) based upon
[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-rlookups   enable reverse lookups (auto)"
69 ac_help="$ac_help
70     --enable-wrappers   enable tcp wrapper support (no)"
71 ac_help="$ac_help
72     --enable-bdb2       enable bdb2 backend (no)"
73 ac_help="$ac_help
74       --with-bdb2-module        module type (static)"
75 ac_help="$ac_help
76     --enable-ldap       enable ldap backend (no)"
77 ac_help="$ac_help
78       --with-ldap-module        module type (static)"
79 ac_help="$ac_help
80     --enable-ldbm       enable ldbm backend (yes)"
81 ac_help="$ac_help
82       --with-ldbm-module        module type (static)"
83 ac_help="$ac_help
84       --with-ldbm-api   use LDBM API (auto)"
85 ac_help="$ac_help
86       --with-ldbm-type  use LDBM type (auto)"
87 ac_help="$ac_help
88     --enable-passwd     enable passwd backend (no)"
89 ac_help="$ac_help
90       --with-passwd-module      module type (static)"
91 ac_help="$ac_help
92     --enable-perl       enable perl backend (no)"
93 ac_help="$ac_help
94       --with-perl-module        module type (static)"
95 ac_help="$ac_help
96     --enable-shell      enable shell backend (no)"
97 ac_help="$ac_help
98       --with-shell-module       module type (static)"
99 ac_help="$ac_help
100     --enable-tcl        enable tcl backend (no)"
101 ac_help="$ac_help
102       --with-tcl-module module type (static)"
103 ac_help="$ac_help
104 SLURPD Options:"
105 ac_help="$ac_help
106   --enable-slurpd       enable building slurpd (auto)"
107 ac_help="$ac_help
108 Library Generation & Linking Options"
109 ac_help="$ac_help
110   --enable-static[=PKGS]  build static libraries [default=yes]"
111 ac_help="$ac_help
112   --enable-shared[=PKGS]  build shared libraries [default=yes]"
113 ac_help="$ac_help
114   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
115 ac_help="$ac_help
116   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
117 ac_help="$ac_help
118   --disable-libtool-lock  avoid locking (might break parallel builds)"
119
120 # Initialize some variables set by options.
121 # The variables have the same names as the options, with
122 # dashes changed to underlines.
123 build=NONE
124 cache_file=./config.cache
125 exec_prefix=NONE
126 host=NONE
127 no_create=
128 nonopt=NONE
129 no_recursion=
130 prefix=NONE
131 program_prefix=NONE
132 program_suffix=NONE
133 program_transform_name=s,x,x,
134 silent=
135 site=
136 srcdir=
137 target=NONE
138 verbose=
139 x_includes=NONE
140 x_libraries=NONE
141 bindir='${exec_prefix}/bin'
142 sbindir='${exec_prefix}/sbin'
143 libexecdir='${exec_prefix}/libexec'
144 datadir='${prefix}/share'
145 sysconfdir='${prefix}/etc'
146 sharedstatedir='${prefix}/com'
147 localstatedir='${prefix}/var'
148 libdir='${exec_prefix}/lib'
149 includedir='${prefix}/include'
150 oldincludedir='/usr/include'
151 infodir='${prefix}/info'
152 mandir='${prefix}/man'
153
154 # Initialize some other variables.
155 subdirs=
156 MFLAGS= MAKEFLAGS=
157 SHELL=${CONFIG_SHELL-/bin/sh}
158 # Maximum number of lines to put in a shell here document.
159 ac_max_here_lines=12
160
161 ac_prev=
162 for ac_option
163 do
164
165   # If the previous option needs an argument, assign it.
166   if test -n "$ac_prev"; then
167     eval "$ac_prev=\$ac_option"
168     ac_prev=
169     continue
170   fi
171
172   case "$ac_option" in
173   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
174   *) ac_optarg= ;;
175   esac
176
177   # Accept the important Cygnus configure options, so we can diagnose typos.
178
179   case "$ac_option" in
180
181   -bindir | --bindir | --bindi | --bind | --bin | --bi)
182     ac_prev=bindir ;;
183   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
184     bindir="$ac_optarg" ;;
185
186   -build | --build | --buil | --bui | --bu)
187     ac_prev=build ;;
188   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
189     build="$ac_optarg" ;;
190
191   -cache-file | --cache-file | --cache-fil | --cache-fi \
192   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
193     ac_prev=cache_file ;;
194   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
195   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
196     cache_file="$ac_optarg" ;;
197
198   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
199     ac_prev=datadir ;;
200   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
201   | --da=*)
202     datadir="$ac_optarg" ;;
203
204   -disable-* | --disable-*)
205     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
206     # Reject names that are not valid shell variable names.
207     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
208       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
209     fi
210     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
211     eval "enable_${ac_feature}=no" ;;
212
213   -enable-* | --enable-*)
214     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
215     # Reject names that are not valid shell variable names.
216     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
217       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
218     fi
219     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
220     case "$ac_option" in
221       *=*) ;;
222       *) ac_optarg=yes ;;
223     esac
224     eval "enable_${ac_feature}='$ac_optarg'" ;;
225
226   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228   | --exec | --exe | --ex)
229     ac_prev=exec_prefix ;;
230   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232   | --exec=* | --exe=* | --ex=*)
233     exec_prefix="$ac_optarg" ;;
234
235   -gas | --gas | --ga | --g)
236     # Obsolete; use --with-gas.
237     with_gas=yes ;;
238
239   -help | --help | --hel | --he)
240     # Omit some internal or obsolete options to make the list less imposing.
241     # This message is too long to be a string in the A/UX 3.1 sh.
242     cat << EOF
243 Usage: configure [options] [host]
244 Options: [defaults in brackets after descriptions]
245 Configuration:
246   --cache-file=FILE       cache test results in FILE
247   --help                  print this message
248   --no-create             do not create output files
249   --quiet, --silent       do not print \`checking...' messages
250   --version               print the version of autoconf that created configure
251 Directory and file names:
252   --prefix=PREFIX         install architecture-independent files in PREFIX
253                           [$ac_default_prefix]
254   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
255                           [same as prefix]
256   --bindir=DIR            user executables in DIR [EPREFIX/bin]
257   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
258   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
259   --datadir=DIR           read-only architecture-independent data in DIR
260                           [PREFIX/share]
261   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
262   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
263                           [PREFIX/com]
264   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
265   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
266   --includedir=DIR        C header files in DIR [PREFIX/include]
267   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
268   --infodir=DIR           info documentation in DIR [PREFIX/info]
269   --mandir=DIR            man documentation in DIR [PREFIX/man]
270   --srcdir=DIR            find the sources in DIR [configure dir or ..]
271   --program-prefix=PREFIX prepend PREFIX to installed program names
272   --program-suffix=SUFFIX append SUFFIX to installed program names
273   --program-transform-name=PROGRAM
274                           run sed PROGRAM on installed program names
275 EOF
276     cat << EOF
277 Host type:
278   --build=BUILD           configure for building on BUILD [BUILD=HOST]
279   --host=HOST             configure for HOST [guessed]
280   --target=TARGET         configure for TARGET [TARGET=HOST]
281 Features and packages:
282   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
283   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
284   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
285   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
286   --x-includes=DIR        X include files are in DIR
287   --x-libraries=DIR       X library files are in DIR
288 EOF
289     if test -n "$ac_help"; then
290       echo "--enable and --with options recognized:$ac_help"
291     fi
292     exit 0 ;;
293
294   -host | --host | --hos | --ho)
295     ac_prev=host ;;
296   -host=* | --host=* | --hos=* | --ho=*)
297     host="$ac_optarg" ;;
298
299   -includedir | --includedir | --includedi | --included | --include \
300   | --includ | --inclu | --incl | --inc)
301     ac_prev=includedir ;;
302   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
303   | --includ=* | --inclu=* | --incl=* | --inc=*)
304     includedir="$ac_optarg" ;;
305
306   -infodir | --infodir | --infodi | --infod | --info | --inf)
307     ac_prev=infodir ;;
308   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
309     infodir="$ac_optarg" ;;
310
311   -libdir | --libdir | --libdi | --libd)
312     ac_prev=libdir ;;
313   -libdir=* | --libdir=* | --libdi=* | --libd=*)
314     libdir="$ac_optarg" ;;
315
316   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
317   | --libexe | --libex | --libe)
318     ac_prev=libexecdir ;;
319   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
320   | --libexe=* | --libex=* | --libe=*)
321     libexecdir="$ac_optarg" ;;
322
323   -localstatedir | --localstatedir | --localstatedi | --localstated \
324   | --localstate | --localstat | --localsta | --localst \
325   | --locals | --local | --loca | --loc | --lo)
326     ac_prev=localstatedir ;;
327   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
328   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
329   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
330     localstatedir="$ac_optarg" ;;
331
332   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333     ac_prev=mandir ;;
334   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335     mandir="$ac_optarg" ;;
336
337   -nfp | --nfp | --nf)
338     # Obsolete; use --without-fp.
339     with_fp=no ;;
340
341   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342   | --no-cr | --no-c)
343     no_create=yes ;;
344
345   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347     no_recursion=yes ;;
348
349   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351   | --oldin | --oldi | --old | --ol | --o)
352     ac_prev=oldincludedir ;;
353   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356     oldincludedir="$ac_optarg" ;;
357
358   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359     ac_prev=prefix ;;
360   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361     prefix="$ac_optarg" ;;
362
363   -program-prefix | --program-prefix | --program-prefi | --program-pref \
364   | --program-pre | --program-pr | --program-p)
365     ac_prev=program_prefix ;;
366   -program-prefix=* | --program-prefix=* | --program-prefi=* \
367   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368     program_prefix="$ac_optarg" ;;
369
370   -program-suffix | --program-suffix | --program-suffi | --program-suff \
371   | --program-suf | --program-su | --program-s)
372     ac_prev=program_suffix ;;
373   -program-suffix=* | --program-suffix=* | --program-suffi=* \
374   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375     program_suffix="$ac_optarg" ;;
376
377   -program-transform-name | --program-transform-name \
378   | --program-transform-nam | --program-transform-na \
379   | --program-transform-n | --program-transform- \
380   | --program-transform | --program-transfor \
381   | --program-transfo | --program-transf \
382   | --program-trans | --program-tran \
383   | --progr-tra | --program-tr | --program-t)
384     ac_prev=program_transform_name ;;
385   -program-transform-name=* | --program-transform-name=* \
386   | --program-transform-nam=* | --program-transform-na=* \
387   | --program-transform-n=* | --program-transform-=* \
388   | --program-transform=* | --program-transfor=* \
389   | --program-transfo=* | --program-transf=* \
390   | --program-trans=* | --program-tran=* \
391   | --progr-tra=* | --program-tr=* | --program-t=*)
392     program_transform_name="$ac_optarg" ;;
393
394   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395   | -silent | --silent | --silen | --sile | --sil)
396     silent=yes ;;
397
398   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399     ac_prev=sbindir ;;
400   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401   | --sbi=* | --sb=*)
402     sbindir="$ac_optarg" ;;
403
404   -sharedstatedir | --sharedstatedir | --sharedstatedi \
405   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406   | --sharedst | --shareds | --shared | --share | --shar \
407   | --sha | --sh)
408     ac_prev=sharedstatedir ;;
409   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412   | --sha=* | --sh=*)
413     sharedstatedir="$ac_optarg" ;;
414
415   -site | --site | --sit)
416     ac_prev=site ;;
417   -site=* | --site=* | --sit=*)
418     site="$ac_optarg" ;;
419
420   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421     ac_prev=srcdir ;;
422   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423     srcdir="$ac_optarg" ;;
424
425   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426   | --syscon | --sysco | --sysc | --sys | --sy)
427     ac_prev=sysconfdir ;;
428   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430     sysconfdir="$ac_optarg" ;;
431
432   -target | --target | --targe | --targ | --tar | --ta | --t)
433     ac_prev=target ;;
434   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435     target="$ac_optarg" ;;
436
437   -v | -verbose | --verbose | --verbos | --verbo | --verb)
438     verbose=yes ;;
439
440   -version | --version | --versio | --versi | --vers)
441     echo "configure generated by autoconf version 2.13.1"
442     exit 0 ;;
443
444   -with-* | --with-*)
445     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
446     # Reject names that are not valid shell variable names.
447     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
448       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
449     fi
450     ac_package=`echo $ac_package| sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_${ac_package}='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
459     # Reject names that are not valid shell variable names.
460     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
461       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
462     fi
463     ac_package=`echo $ac_package| sed 's/-/_/g'`
464     eval "with_${ac_package}=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes="$ac_optarg" ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries="$ac_optarg" ;;
483
484   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
485     ;;
486
487   *)
488     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
489       echo "configure: warning: $ac_option: invalid host type" 1>&2
490     fi
491     if test "x$nonopt" != xNONE; then
492       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
493     fi
494     nonopt="$ac_option"
495     ;;
496
497   esac
498 done
499
500 if test -n "$ac_prev"; then
501   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
502 fi
503
504 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
505
506 # File descriptor usage:
507 # 0 standard input
508 # 1 file creation
509 # 2 errors and warnings
510 # 3 some systems may open it to /dev/tty
511 # 4 used on the Kubota Titan
512 # 6 checking for... messages and results
513 # 5 compiler messages saved in config.log
514 if test "$silent" = yes; then
515   exec 6>/dev/null
516 else
517   exec 6>&1
518 fi
519 exec 5>./config.log
520
521 echo "\
522 This file contains any messages produced by compilers while
523 running configure, to aid debugging if configure makes a mistake.
524 " 1>&5
525
526 # Strip out --no-create and --no-recursion so they do not pile up.
527 # Also quote any args containing shell metacharacters.
528 ac_configure_args=
529 for ac_arg
530 do
531   case "$ac_arg" in
532   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
533   | --no-cr | --no-c) ;;
534   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
535   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
536   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
537   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
538   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
539   esac
540 done
541
542 # NLS nuisances.
543 # Only set these to C if already set.  These must not be set unconditionally
544 # because not all systems understand e.g. LANG=C (notably SCO).
545 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
546 # Non-C LC_CTYPE values break the ctype check.
547 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
548 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
549 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
550 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
551
552 # confdefs.h avoids OS command line length limits that DEFS can exceed.
553 rm -rf conftest* confdefs.h
554 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
555 echo > confdefs.h
556
557 # A filename unique to this package, relative to the directory that
558 # configure is in, which we can look for to find out if srcdir is correct.
559 ac_unique_file=build/version
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r $srcdir/$ac_unique_file; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r $srcdir/$ac_unique_file; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
578   else
579     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
580   fi
581 fi
582 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
583
584 # Prefer explicitly selected file to automatically selected ones.
585 if test -z "$CONFIG_SITE"; then
586   if test "x$prefix" != xNONE; then
587     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
588   else
589     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
590   fi
591 fi
592 for ac_site_file in $CONFIG_SITE; do
593   if test -r "$ac_site_file"; then
594     echo "loading site script $ac_site_file"
595     . "$ac_site_file"
596   fi
597 done
598
599
600 ac_ext=c
601 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
602 ac_cpp='$CPP $CPPFLAGS'
603 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
604 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
605 cross_compiling=$ac_cv_prog_cc_cross
606
607 ac_exeext=
608 ac_objext=o
609 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
610   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
611   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
612     ac_n= ac_c='
613 ' ac_t='        '
614   else
615     ac_n=-n ac_c= ac_t=
616   fi
617 else
618   ac_n= ac_c='\c' ac_t=
619 fi
620
621 ac_aux_dir=
622 for ac_dir in build $srcdir/build; do
623   if test -f $ac_dir/install-sh; then
624     ac_aux_dir=$ac_dir
625     ac_install_sh="$ac_aux_dir/install-sh -c"
626     break
627   elif test -f $ac_dir/install.sh; then
628     ac_aux_dir=$ac_dir
629     ac_install_sh="$ac_aux_dir/install.sh -c"
630     break
631   fi
632 done
633 if test -z "$ac_aux_dir"; then
634   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
635 fi
636 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
637 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
638 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
639
640 OL_VERSION=`cat $ac_aux_dir/version`
641 if test -z "$OL_VERSION"; then
642         { echo "configure: error: could not determine version" 1>&2; exit 1; }
643 fi
644
645
646 echo $ac_n "checking host system type""... $ac_c" 1>&6
647 echo "configure:648: checking host system type" >&5
648 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
649
650 # Make sure we can run config.sub.
651   if $ac_config_sub sun4 >/dev/null 2>&1; then :
652     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
653   fi
654
655   ac_cv_host_alias=$host
656   case "$ac_cv_host_alias" in
657   NONE)
658     case $nonopt in
659     NONE)
660       if ac_cv_host_alias=`$ac_config_guess`; then :
661       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
662       fi ;;
663     *) ac_cv_host_alias=$nonopt ;;
664     esac ;;
665   esac
666
667   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
668   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
669   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
670   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
671 else
672   echo $ac_n "(cached) $ac_c" 1>&6
673 fi
674
675 echo "$ac_t""$ac_cv_host" 1>&6
676
677 host=$ac_cv_host
678 host_alias=$ac_cv_host_alias
679 host_cpu=$ac_cv_host_cpu
680 host_vendor=$ac_cv_host_vendor
681 host_os=$ac_cv_host_os
682
683
684
685
686
687 echo $ac_n "checking target system type""... $ac_c" 1>&6
688 echo "configure:689: checking target system type" >&5
689 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
690
691 # Make sure we can run config.sub.
692   if $ac_config_sub sun4 >/dev/null 2>&1; then :
693     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
694   fi
695
696   ac_cv_target_alias=$target
697   case "$ac_cv_target_alias" in
698   NONE)
699     case $nonopt in
700     NONE)
701       ac_cv_target_alias=$host_alias ;;
702
703     *) ac_cv_target_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
708   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_target" 1>&6
716
717 target=$ac_cv_target
718 target_alias=$ac_cv_target_alias
719 target_cpu=$ac_cv_target_cpu
720 target_vendor=$ac_cv_target_vendor
721 target_os=$ac_cv_target_os
722
723
724
725
726
727 echo $ac_n "checking build system type""... $ac_c" 1>&6
728 echo "configure:729: checking build system type" >&5
729 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_build_alias=$build
737   case "$ac_cv_build_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_build_alias=$host_alias ;;
742
743     *) ac_cv_build_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
748   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_build" 1>&6
756
757 build=$ac_cv_build
758 build_alias=$ac_cv_build_alias
759 build_cpu=$ac_cv_build_cpu
760 build_vendor=$ac_cv_build_vendor
761 build_os=$ac_cv_build_os
762
763
764
765
766
767 # Do some error checking and defaulting for the host and target type.
768 # The inputs are:
769 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
770 #
771 # The rules are:
772 # 1. You are not allowed to specify --host, --target, and nonopt at the
773 #    same time.
774 # 2. Host defaults to nonopt.
775 # 3. If nonopt is not specified, then host defaults to the current host,
776 #    as determined by config.guess.
777 # 4. Target and build default to nonopt.
778 # 5. If nonopt is not specified, then target and build default to host.
779
780 # The aliases save the names the user supplied, while $host etc.
781 # will get canonicalized.
782 case $host---$target---$nonopt in
783 NONE---*---* | *---NONE---* | *---*---NONE) ;;
784 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
785 esac
786
787 test "$host_alias" != "$target_alias" &&
788   test "$program_prefix$program_suffix$program_transform_name" = \
789     NONENONEs,x,x, &&
790   program_prefix=${target_alias}-
791
792
793 # Find a good install program.  We prefer a C program (faster),
794 # so one script is as good as another.  But avoid the broken or
795 # incompatible versions:
796 # SysV /etc/install, /usr/sbin/install
797 # SunOS /usr/etc/install
798 # IRIX /sbin/install
799 # AIX /bin/install
800 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
801 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
802 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
803 # ./install, which can be erroneously created by make from ./install.sh.
804 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
805 echo "configure:806: checking for a BSD compatible install" >&5
806 if test -z "$INSTALL"; then
807 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
808   echo $ac_n "(cached) $ac_c" 1>&6
809 else
810     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
811   for ac_dir in $PATH; do
812     # Account for people who put trailing slashes in PATH elements.
813     case "$ac_dir/" in
814     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
815     *)
816       # OSF1 and SCO ODT 3.0 have their own names for install.
817       # Don't use installbsd from OSF since it installs stuff as root
818       # by default.
819       for ac_prog in ginstall scoinst install; do
820         if test -f $ac_dir/$ac_prog; then
821           if test $ac_prog = install &&
822             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
823             # AIX install.  It has an incompatible calling convention.
824             :
825           elif test $ac_prog = install &&
826             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
827             # program-specific install script used by HP pwplus--don't use.
828             :
829           else
830             ac_cv_path_install="$ac_dir/$ac_prog -c"
831             break 2
832           fi
833         fi
834       done
835       ;;
836     esac
837   done
838   IFS="$ac_save_IFS"
839
840 fi
841   if test "${ac_cv_path_install+set}" = set; then
842     INSTALL="$ac_cv_path_install"
843   else
844     # As a last resort, use the slow shell script.  We don't cache a
845     # path for INSTALL within a source directory, because that will
846     # break other packages using the cache if that directory is
847     # removed, or if the path is relative.
848     INSTALL="$ac_install_sh"
849   fi
850 fi
851 echo "$ac_t""$INSTALL" 1>&6
852
853 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
854 # It thinks the first close brace ends the variable substitution.
855 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
856
857 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
858
859 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
860
861 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
862 echo "configure:863: checking whether build environment is sane" >&5
863 # Just in case
864 sleep 1
865 echo timestamp > conftestfile
866 # Do `set' in a subshell so we don't clobber the current shell's
867 # arguments.  Must try -L first in case configure is actually a
868 # symlink; some systems play weird games with the mod time of symlinks
869 # (eg FreeBSD returns the mod time of the symlink's containing
870 # directory).
871 if (
872    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
873    if test "$*" = "X"; then
874       # -L didn't work.
875       set X `ls -t $srcdir/configure conftestfile`
876    fi
877    if test "$*" != "X $srcdir/configure conftestfile" \
878       && test "$*" != "X conftestfile $srcdir/configure"; then
879
880       # If neither matched, then we have a broken ls.  This can happen
881       # if, for instance, CONFIG_SHELL is bash and it inherits a
882       # broken ls alias from the environment.  This has actually
883       # happened.  Such a system could not be considered "sane".
884       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
885 alias in your environment" 1>&2; exit 1; }
886    fi
887
888    test "$2" = conftestfile
889    )
890 then
891    # Ok.
892    :
893 else
894    { echo "configure: error: newly created file is older than distributed files!
895 Check your system clock" 1>&2; exit 1; }
896 fi
897 rm -f conftest*
898 echo "$ac_t""yes" 1>&6
899 if test "$program_transform_name" = s,x,x,; then
900   program_transform_name=
901 else
902   # Double any \ or $.  echo might interpret backslashes.
903   cat <<\EOF_SED > conftestsed
904 s,\\,\\\\,g; s,\$,$$,g
905 EOF_SED
906   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
907   rm -f conftestsed
908 fi
909 test "$program_prefix" != NONE &&
910   program_transform_name="s,^,${program_prefix},;$program_transform_name"
911 # Use a double $ so make ignores it.
912 test "$program_suffix" != NONE &&
913   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
914
915 # sed with no file args requires a program.
916 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
917
918 for ac_prog in mawk gawk nawk awk
919 do
920 # Extract the first word of "$ac_prog", so it can be a program name with args.
921 set dummy $ac_prog; ac_word=$2
922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
923 echo "configure:924: checking for $ac_word" >&5
924 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
925   echo $ac_n "(cached) $ac_c" 1>&6
926 else
927   if test -n "$AWK"; then
928   ac_cv_prog_AWK="$AWK" # Let the user override the test.
929 else
930   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
931   ac_dummy="$PATH"
932   for ac_dir in $ac_dummy; do
933     test -z "$ac_dir" && ac_dir=.
934     if test -f $ac_dir/$ac_word; then
935       ac_cv_prog_AWK="$ac_prog"
936       break
937     fi
938   done
939   IFS="$ac_save_ifs"
940 fi
941 fi
942 AWK="$ac_cv_prog_AWK"
943 if test -n "$AWK"; then
944   echo "$ac_t""$AWK" 1>&6
945 else
946   echo "$ac_t""no" 1>&6
947 fi
948
949 test -n "$AWK" && break
950 done
951
952 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
953 echo "configure:954: checking whether ${MAKE-make} sets \${MAKE}" >&5
954 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
955 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
956   echo $ac_n "(cached) $ac_c" 1>&6
957 else
958   cat > conftestmake <<\EOF
959 all:
960         @echo 'ac_maketemp="${MAKE}"'
961 EOF
962 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
963 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
964 if test -n "$ac_maketemp"; then
965   eval ac_cv_prog_make_${ac_make}_set=yes
966 else
967   eval ac_cv_prog_make_${ac_make}_set=no
968 fi
969 rm -f conftestmake
970 fi
971 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
972   echo "$ac_t""yes" 1>&6
973   SET_MAKE=
974 else
975   echo "$ac_t""no" 1>&6
976   SET_MAKE="MAKE=${MAKE-make}"
977 fi
978
979
980
981 PACKAGE=OpenLDAP
982
983 VERSION=$OL_VERSION
984
985 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
986   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
987 fi
988
989
990
991 missing_dir=`cd $ac_aux_dir && pwd`
992 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
993 echo "configure:994: checking for working aclocal" >&5
994 # Run test in a subshell; some versions of sh will print an error if
995 # an executable is not found, even if stderr is redirected.
996 # Redirect stdin to placate older versions of autoconf.  Sigh.
997 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
998    ACLOCAL=aclocal
999    echo "$ac_t""found" 1>&6
1000 else
1001    ACLOCAL="$missing_dir/missing aclocal"
1002    echo "$ac_t""missing" 1>&6
1003 fi
1004
1005 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1006 echo "configure:1007: checking for working autoconf" >&5
1007 # Run test in a subshell; some versions of sh will print an error if
1008 # an executable is not found, even if stderr is redirected.
1009 # Redirect stdin to placate older versions of autoconf.  Sigh.
1010 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1011    AUTOCONF=autoconf
1012    echo "$ac_t""found" 1>&6
1013 else
1014    AUTOCONF="$missing_dir/missing autoconf"
1015    echo "$ac_t""missing" 1>&6
1016 fi
1017
1018 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1019 echo "configure:1020: checking for working automake" >&5
1020 # Run test in a subshell; some versions of sh will print an error if
1021 # an executable is not found, even if stderr is redirected.
1022 # Redirect stdin to placate older versions of autoconf.  Sigh.
1023 if (automake --version) < /dev/null > /dev/null 2>&1; then
1024    AUTOMAKE=automake
1025    echo "$ac_t""found" 1>&6
1026 else
1027    AUTOMAKE="$missing_dir/missing automake"
1028    echo "$ac_t""missing" 1>&6
1029 fi
1030
1031 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1032 echo "configure:1033: checking for working autoheader" >&5
1033 # Run test in a subshell; some versions of sh will print an error if
1034 # an executable is not found, even if stderr is redirected.
1035 # Redirect stdin to placate older versions of autoconf.  Sigh.
1036 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1037    AUTOHEADER=autoheader
1038    echo "$ac_t""found" 1>&6
1039 else
1040    AUTOHEADER="$missing_dir/missing autoheader"
1041    echo "$ac_t""missing" 1>&6
1042 fi
1043
1044 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1045 echo "configure:1046: checking for working makeinfo" >&5
1046 # Run test in a subshell; some versions of sh will print an error if
1047 # an executable is not found, even if stderr is redirected.
1048 # Redirect stdin to placate older versions of autoconf.  Sigh.
1049 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1050    MAKEINFO=makeinfo
1051    echo "$ac_t""found" 1>&6
1052 else
1053    MAKEINFO="$missing_dir/missing makeinfo"
1054    echo "$ac_t""missing" 1>&6
1055 fi
1056
1057 install_sh="$missing_dir/install-sh"
1058 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1059
1060 for ac_prog in gnutar gtar tar
1061 do
1062 # Extract the first word of "$ac_prog", so it can be a program name with args.
1063 set dummy $ac_prog; ac_word=$2
1064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1065 echo "configure:1066: checking for $ac_word" >&5
1066 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1067   echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069   if test -n "$AMTAR"; then
1070   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1071 else
1072   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1073   ac_dummy="$PATH"
1074   for ac_dir in $ac_dummy; do
1075     test -z "$ac_dir" && ac_dir=.
1076     if test -f $ac_dir/$ac_word; then
1077       ac_cv_prog_AMTAR="$ac_prog"
1078       break
1079     fi
1080   done
1081   IFS="$ac_save_ifs"
1082 fi
1083 fi
1084 AMTAR="$ac_cv_prog_AMTAR"
1085 if test -n "$AMTAR"; then
1086   echo "$ac_t""$AMTAR" 1>&6
1087 else
1088   echo "$ac_t""no" 1>&6
1089 fi
1090
1091 test -n "$AMTAR" && break
1092 done
1093
1094
1095 AMTARFLAGS=
1096 if test -n "$AMTAR"; then
1097   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1098         AMTARFLAGS=o
1099   fi
1100 fi
1101
1102
1103
1104 cat >> confdefs.h <<EOF
1105 #define OPENLDAP_PACKAGE "$PACKAGE"
1106 EOF
1107
1108 cat >> confdefs.h <<EOF
1109 #define OPENLDAP_VERSION "$VERSION"
1110 EOF
1111
1112
1113
1114
1115 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1116 echo "configure:1117: checking configure arguments" >&5
1117
1118
1119 top_builddir=`pwd`
1120
1121 ldap_subdir="openldap"
1122
1123 # Check whether --with-subdir or --without-subdir was given.
1124 if test "${with_subdir+set}" = set; then
1125   withval="$with_subdir"
1126   
1127         if test "$withval" = "no"; then
1128                 ldap_subdir=""
1129         elif test "$withval" != "yes"; then
1130                 ldap_subdir="$withval"
1131         fi
1132
1133 fi
1134
1135
1136 # OpenLDAP --enable-debug
1137         # Check whether --enable-debug or --disable-debug was given.
1138 if test "${enable_debug+set}" = set; then
1139   enableval="$enable_debug"
1140   
1141         ol_arg=invalid
1142         for ol_val in auto yes no ; do
1143                 if test "$enableval" = "$ol_val" ; then
1144                         ol_arg="$ol_val"
1145                 fi
1146         done
1147         if test "$ol_arg" = "invalid" ; then
1148                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1149         fi
1150         ol_enable_debug="$ol_arg"
1151
1152 else
1153         ol_enable_debug="yes"
1154 fi
1155 # end --enable-debug
1156 # OpenLDAP --enable-syslog
1157         # Check whether --enable-syslog or --disable-syslog was given.
1158 if test "${enable_syslog+set}" = set; then
1159   enableval="$enable_syslog"
1160   
1161         ol_arg=invalid
1162         for ol_val in auto yes no ; do
1163                 if test "$enableval" = "$ol_val" ; then
1164                         ol_arg="$ol_val"
1165                 fi
1166         done
1167         if test "$ol_arg" = "invalid" ; then
1168                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1169         fi
1170         ol_enable_syslog="$ol_arg"
1171
1172 else
1173         ol_enable_syslog="auto"
1174 fi
1175 # end --enable-syslog
1176 # OpenLDAP --enable-proctitle
1177         # Check whether --enable-proctitle or --disable-proctitle was given.
1178 if test "${enable_proctitle+set}" = set; then
1179   enableval="$enable_proctitle"
1180   
1181         ol_arg=invalid
1182         for ol_val in auto yes no ; do
1183                 if test "$enableval" = "$ol_val" ; then
1184                         ol_arg="$ol_val"
1185                 fi
1186         done
1187         if test "$ol_arg" = "invalid" ; then
1188                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1189         fi
1190         ol_enable_proctitle="$ol_arg"
1191
1192 else
1193         ol_enable_proctitle="yes"
1194 fi
1195 # end --enable-proctitle
1196 # OpenLDAP --enable-cache
1197         # Check whether --enable-cache or --disable-cache was given.
1198 if test "${enable_cache+set}" = set; then
1199   enableval="$enable_cache"
1200   
1201         ol_arg=invalid
1202         for ol_val in auto yes no ; do
1203                 if test "$enableval" = "$ol_val" ; then
1204                         ol_arg="$ol_val"
1205                 fi
1206         done
1207         if test "$ol_arg" = "invalid" ; then
1208                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1209         fi
1210         ol_enable_cache="$ol_arg"
1211
1212 else
1213         ol_enable_cache="yes"
1214 fi
1215 # end --enable-cache
1216 # OpenLDAP --enable-dns
1217         # Check whether --enable-dns or --disable-dns was given.
1218 if test "${enable_dns+set}" = set; then
1219   enableval="$enable_dns"
1220   
1221         ol_arg=invalid
1222         for ol_val in auto yes no ; do
1223                 if test "$enableval" = "$ol_val" ; then
1224                         ol_arg="$ol_val"
1225                 fi
1226         done
1227         if test "$ol_arg" = "invalid" ; then
1228                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1229         fi
1230         ol_enable_dns="$ol_arg"
1231
1232 else
1233         ol_enable_dns="no"
1234 fi
1235 # end --enable-dns
1236 # OpenLDAP --enable-referrals
1237         # Check whether --enable-referrals or --disable-referrals was given.
1238 if test "${enable_referrals+set}" = set; then
1239   enableval="$enable_referrals"
1240   
1241         ol_arg=invalid
1242         for ol_val in auto yes no ; do
1243                 if test "$enableval" = "$ol_val" ; then
1244                         ol_arg="$ol_val"
1245                 fi
1246         done
1247         if test "$ol_arg" = "invalid" ; then
1248                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1249         fi
1250         ol_enable_referrals="$ol_arg"
1251
1252 else
1253         ol_enable_referrals="yes"
1254 fi
1255 # end --enable-referrals
1256 # OpenLDAP --enable-cldap
1257         # Check whether --enable-cldap or --disable-cldap was given.
1258 if test "${enable_cldap+set}" = set; then
1259   enableval="$enable_cldap"
1260   
1261         ol_arg=invalid
1262         for ol_val in auto yes no ; do
1263                 if test "$enableval" = "$ol_val" ; then
1264                         ol_arg="$ol_val"
1265                 fi
1266         done
1267         if test "$ol_arg" = "invalid" ; then
1268                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1269         fi
1270         ol_enable_cldap="$ol_arg"
1271
1272 else
1273         ol_enable_cldap="no"
1274 fi
1275 # end --enable-cldap
1276 # OpenLDAP --enable-x_compile
1277         # Check whether --enable-x_compile or --disable-x_compile was given.
1278 if test "${enable_x_compile+set}" = set; then
1279   enableval="$enable_x_compile"
1280   
1281         ol_arg=invalid
1282         for ol_val in yes no ; do
1283                 if test "$enableval" = "$ol_val" ; then
1284                         ol_arg="$ol_val"
1285                 fi
1286         done
1287         if test "$ol_arg" = "invalid" ; then
1288                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1289         fi
1290         ol_enable_x_compile="$ol_arg"
1291
1292 else
1293         ol_enable_x_compile="no"
1294 fi
1295 # end --enable-x_compile
1296
1297 # OpenLDAP --enable-dmalloc
1298         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1299 if test "${enable_dmalloc+set}" = set; then
1300   enableval="$enable_dmalloc"
1301   
1302         ol_arg=invalid
1303         for ol_val in auto yes no ; do
1304                 if test "$enableval" = "$ol_val" ; then
1305                         ol_arg="$ol_val"
1306                 fi
1307         done
1308         if test "$ol_arg" = "invalid" ; then
1309                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1310         fi
1311         ol_enable_dmalloc="$ol_arg"
1312
1313 else
1314         ol_enable_dmalloc="no"
1315 fi
1316 # end --enable-dmalloc
1317
1318 # OpenLDAP --with-cyrus_sasl
1319         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1320 if test "${with_cyrus_sasl+set}" = set; then
1321   withval="$with_cyrus_sasl"
1322   
1323         ol_arg=invalid
1324         for ol_val in auto yes no  ; do
1325                 if test "$withval" = "$ol_val" ; then
1326                         ol_arg="$ol_val"
1327                 fi
1328         done
1329         if test "$ol_arg" = "invalid" ; then
1330                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1331         fi
1332         ol_with_cyrus_sasl="$ol_arg"
1333
1334 else
1335         ol_with_cyrus_sasl="auto"
1336 fi
1337 # end --with-cyrus_sasl
1338
1339 # OpenLDAP --with-fetch
1340         # Check whether --with-fetch or --without-fetch was given.
1341 if test "${with_fetch+set}" = set; then
1342   withval="$with_fetch"
1343   
1344         ol_arg=invalid
1345         for ol_val in auto yes no  ; do
1346                 if test "$withval" = "$ol_val" ; then
1347                         ol_arg="$ol_val"
1348                 fi
1349         done
1350         if test "$ol_arg" = "invalid" ; then
1351                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1352         fi
1353         ol_with_fetch="$ol_arg"
1354
1355 else
1356         ol_with_fetch="auto"
1357 fi
1358 # end --with-fetch
1359
1360 # OpenLDAP --with-kerberos
1361         # Check whether --with-kerberos or --without-kerberos was given.
1362 if test "${with_kerberos+set}" = set; then
1363   withval="$with_kerberos"
1364   
1365         ol_arg=invalid
1366         for ol_val in auto k5 k4 afs yes no ; do
1367                 if test "$withval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1373         fi
1374         ol_with_kerberos="$ol_arg"
1375
1376 else
1377         ol_with_kerberos="auto"
1378 fi
1379 # end --with-kerberos
1380
1381 # OpenLDAP --with-readline
1382         # Check whether --with-readline or --without-readline was given.
1383 if test "${with_readline+set}" = set; then
1384   withval="$with_readline"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto yes no  ; do
1388                 if test "$withval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1394         fi
1395         ol_with_readline="$ol_arg"
1396
1397 else
1398         ol_with_readline="auto"
1399 fi
1400 # end --with-readline
1401
1402 # OpenLDAP --with-threads
1403         # Check whether --with-threads or --without-threads was given.
1404 if test "${with_threads+set}" = set; then
1405   withval="$with_threads"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto posix mach lwp yes no manual  ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1415         fi
1416         ol_with_threads="$ol_arg"
1417
1418 else
1419         ol_with_threads="auto"
1420 fi
1421 # end --with-threads
1422
1423 # OpenLDAP --with-tls
1424         # Check whether --with-tls or --without-tls was given.
1425 if test "${with_tls+set}" = set; then
1426   withval="$with_tls"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto ssleay openssl yes no  ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1436         fi
1437         ol_with_tls="$ol_arg"
1438
1439 else
1440         ol_with_tls="auto"
1441 fi
1442 # end --with-tls
1443
1444 # OpenLDAP --with-yielding_select
1445         # Check whether --with-yielding_select or --without-yielding_select was given.
1446 if test "${with_yielding_select+set}" = set; then
1447   withval="$with_yielding_select"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto yes no manual  ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1457         fi
1458         ol_with_yielding_select="$ol_arg"
1459
1460 else
1461         ol_with_yielding_select="auto"
1462 fi
1463 # end --with-yielding_select
1464
1465
1466
1467 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1468 if test "${with_xxldapdoptions+set}" = set; then
1469   withval="$with_xxldapdoptions"
1470   :
1471 fi
1472
1473 # OpenLDAP --enable-ldapd
1474         # Check whether --enable-ldapd or --disable-ldapd was given.
1475 if test "${enable_ldapd+set}" = set; then
1476   enableval="$enable_ldapd"
1477   
1478         ol_arg=invalid
1479         for ol_val in auto yes no ; do
1480                 if test "$enableval" = "$ol_val" ; then
1481                         ol_arg="$ol_val"
1482                 fi
1483         done
1484         if test "$ol_arg" = "invalid" ; then
1485                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1486         fi
1487         ol_enable_ldapd="$ol_arg"
1488
1489 else
1490         ol_enable_ldapd="no"
1491 fi
1492 # end --enable-ldapd
1493
1494 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1495 if test "${with_xxslapdoptions+set}" = set; then
1496   withval="$with_xxslapdoptions"
1497   :
1498 fi
1499
1500 # OpenLDAP --enable-slapd
1501         # Check whether --enable-slapd or --disable-slapd was given.
1502 if test "${enable_slapd+set}" = set; then
1503   enableval="$enable_slapd"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1513         fi
1514         ol_enable_slapd="$ol_arg"
1515
1516 else
1517         ol_enable_slapd="yes"
1518 fi
1519 # end --enable-slapd
1520 # OpenLDAP --enable-cleartext
1521         # Check whether --enable-cleartext or --disable-cleartext was given.
1522 if test "${enable_cleartext+set}" = set; then
1523   enableval="$enable_cleartext"
1524   
1525         ol_arg=invalid
1526         for ol_val in auto yes no ; do
1527                 if test "$enableval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1533         fi
1534         ol_enable_cleartext="$ol_arg"
1535
1536 else
1537         ol_enable_cleartext="yes"
1538 fi
1539 # end --enable-cleartext
1540 # OpenLDAP --enable-crypt
1541         # Check whether --enable-crypt or --disable-crypt was given.
1542 if test "${enable_crypt+set}" = set; then
1543   enableval="$enable_crypt"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no ; do
1547                 if test "$enableval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1553         fi
1554         ol_enable_crypt="$ol_arg"
1555
1556 else
1557         ol_enable_crypt="auto"
1558 fi
1559 # end --enable-crypt
1560 # OpenLDAP --enable-modules
1561         # Check whether --enable-modules or --disable-modules was given.
1562 if test "${enable_modules+set}" = set; then
1563   enableval="$enable_modules"
1564   
1565         ol_arg=invalid
1566         for ol_val in auto yes no ; do
1567                 if test "$enableval" = "$ol_val" ; then
1568                         ol_arg="$ol_val"
1569                 fi
1570         done
1571         if test "$ol_arg" = "invalid" ; then
1572                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1573         fi
1574         ol_enable_modules="$ol_arg"
1575
1576 else
1577         ol_enable_modules="no"
1578 fi
1579 # end --enable-modules
1580 # OpenLDAP --enable-multimaster
1581         # Check whether --enable-multimaster or --disable-multimaster was given.
1582 if test "${enable_multimaster+set}" = set; then
1583   enableval="$enable_multimaster"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto yes no ; do
1587                 if test "$enableval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1593         fi
1594         ol_enable_multimaster="$ol_arg"
1595
1596 else
1597         ol_enable_multimaster="no"
1598 fi
1599 # end --enable-multimaster
1600 # OpenLDAP --enable-phonetic
1601         # Check whether --enable-phonetic or --disable-phonetic was given.
1602 if test "${enable_phonetic+set}" = set; then
1603   enableval="$enable_phonetic"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto yes no ; do
1607                 if test "$enableval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1613         fi
1614         ol_enable_phonetic="$ol_arg"
1615
1616 else
1617         ol_enable_phonetic="no"
1618 fi
1619 # end --enable-phonetic
1620 # OpenLDAP --enable-rlookups
1621         # Check whether --enable-rlookups or --disable-rlookups was given.
1622 if test "${enable_rlookups+set}" = set; then
1623   enableval="$enable_rlookups"
1624   
1625         ol_arg=invalid
1626         for ol_val in auto yes no ; do
1627                 if test "$enableval" = "$ol_val" ; then
1628                         ol_arg="$ol_val"
1629                 fi
1630         done
1631         if test "$ol_arg" = "invalid" ; then
1632                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1633         fi
1634         ol_enable_rlookups="$ol_arg"
1635
1636 else
1637         ol_enable_rlookups="auto"
1638 fi
1639 # end --enable-rlookups
1640 # OpenLDAP --enable-wrappers
1641         # Check whether --enable-wrappers or --disable-wrappers was given.
1642 if test "${enable_wrappers+set}" = set; then
1643   enableval="$enable_wrappers"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto yes no ; do
1647                 if test "$enableval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1653         fi
1654         ol_enable_wrappers="$ol_arg"
1655
1656 else
1657         ol_enable_wrappers="no"
1658 fi
1659 # end --enable-wrappers
1660
1661 # OpenLDAP --enable-bdb2
1662         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1663 if test "${enable_bdb2+set}" = set; then
1664   enableval="$enable_bdb2"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1674         fi
1675         ol_enable_bdb2="$ol_arg"
1676
1677 else
1678         ol_enable_bdb2="no"
1679 fi
1680 # end --enable-bdb2
1681 # OpenLDAP --with-bdb2_module
1682         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1683 if test "${with_bdb2_module+set}" = set; then
1684   withval="$with_bdb2_module"
1685   
1686         ol_arg=invalid
1687         for ol_val in static dynamic ; do
1688                 if test "$withval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1694         fi
1695         ol_with_bdb2_module="$ol_arg"
1696
1697 else
1698         ol_with_bdb2_module="static"
1699 fi
1700 # end --with-bdb2_module
1701
1702 # OpenLDAP --enable-ldap
1703         # Check whether --enable-ldap or --disable-ldap was given.
1704 if test "${enable_ldap+set}" = set; then
1705   enableval="$enable_ldap"
1706   
1707         ol_arg=invalid
1708         for ol_val in auto yes no ; do
1709                 if test "$enableval" = "$ol_val" ; then
1710                         ol_arg="$ol_val"
1711                 fi
1712         done
1713         if test "$ol_arg" = "invalid" ; then
1714                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1715         fi
1716         ol_enable_ldap="$ol_arg"
1717
1718 else
1719         ol_enable_ldap="no"
1720 fi
1721 # end --enable-ldap
1722 # OpenLDAP --with-ldap_module
1723         # Check whether --with-ldap_module or --without-ldap_module was given.
1724 if test "${with_ldap_module+set}" = set; then
1725   withval="$with_ldap_module"
1726   
1727         ol_arg=invalid
1728         for ol_val in static dynamic ; do
1729                 if test "$withval" = "$ol_val" ; then
1730                         ol_arg="$ol_val"
1731                 fi
1732         done
1733         if test "$ol_arg" = "invalid" ; then
1734                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1735         fi
1736         ol_with_ldap_module="$ol_arg"
1737
1738 else
1739         ol_with_ldap_module="static"
1740 fi
1741 # end --with-ldap_module
1742
1743 # OpenLDAP --enable-ldbm
1744         # Check whether --enable-ldbm or --disable-ldbm was given.
1745 if test "${enable_ldbm+set}" = set; then
1746   enableval="$enable_ldbm"
1747   
1748         ol_arg=invalid
1749         for ol_val in auto yes no ; do
1750                 if test "$enableval" = "$ol_val" ; then
1751                         ol_arg="$ol_val"
1752                 fi
1753         done
1754         if test "$ol_arg" = "invalid" ; then
1755                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1756         fi
1757         ol_enable_ldbm="$ol_arg"
1758
1759 else
1760         ol_enable_ldbm="yes"
1761 fi
1762 # end --enable-ldbm
1763 # OpenLDAP --with-ldbm_module
1764         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1765 if test "${with_ldbm_module+set}" = set; then
1766   withval="$with_ldbm_module"
1767   
1768         ol_arg=invalid
1769         for ol_val in static dynamic ; do
1770                 if test "$withval" = "$ol_val" ; then
1771                         ol_arg="$ol_val"
1772                 fi
1773         done
1774         if test "$ol_arg" = "invalid" ; then
1775                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1776         fi
1777         ol_with_ldbm_module="$ol_arg"
1778
1779 else
1780         ol_with_ldbm_module="static"
1781 fi
1782 # end --with-ldbm_module
1783
1784 # OpenLDAP --with-ldbm_api
1785         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1786 if test "${with_ldbm_api+set}" = set; then
1787   withval="$with_ldbm_api"
1788   
1789         ol_arg=invalid
1790         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1791                 if test "$withval" = "$ol_val" ; then
1792                         ol_arg="$ol_val"
1793                 fi
1794         done
1795         if test "$ol_arg" = "invalid" ; then
1796                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1797         fi
1798         ol_with_ldbm_api="$ol_arg"
1799
1800 else
1801         ol_with_ldbm_api="auto"
1802 fi
1803 # end --with-ldbm_api
1804
1805 # OpenLDAP --with-ldbm_type
1806         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1807 if test "${with_ldbm_type+set}" = set; then
1808   withval="$with_ldbm_type"
1809   
1810         ol_arg=invalid
1811         for ol_val in auto btree hash ; do
1812                 if test "$withval" = "$ol_val" ; then
1813                         ol_arg="$ol_val"
1814                 fi
1815         done
1816         if test "$ol_arg" = "invalid" ; then
1817                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1818         fi
1819         ol_with_ldbm_type="$ol_arg"
1820
1821 else
1822         ol_with_ldbm_type="auto"
1823 fi
1824 # end --with-ldbm_type
1825
1826
1827 # OpenLDAP --enable-passwd
1828         # Check whether --enable-passwd or --disable-passwd was given.
1829 if test "${enable_passwd+set}" = set; then
1830   enableval="$enable_passwd"
1831   
1832         ol_arg=invalid
1833         for ol_val in auto yes no ; do
1834                 if test "$enableval" = "$ol_val" ; then
1835                         ol_arg="$ol_val"
1836                 fi
1837         done
1838         if test "$ol_arg" = "invalid" ; then
1839                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1840         fi
1841         ol_enable_passwd="$ol_arg"
1842
1843 else
1844         ol_enable_passwd="no"
1845 fi
1846 # end --enable-passwd
1847 # OpenLDAP --with-passwd_module
1848         # Check whether --with-passwd_module or --without-passwd_module was given.
1849 if test "${with_passwd_module+set}" = set; then
1850   withval="$with_passwd_module"
1851   
1852         ol_arg=invalid
1853         for ol_val in static dynamic ; do
1854                 if test "$withval" = "$ol_val" ; then
1855                         ol_arg="$ol_val"
1856                 fi
1857         done
1858         if test "$ol_arg" = "invalid" ; then
1859                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1860         fi
1861         ol_with_passwd_module="$ol_arg"
1862
1863 else
1864         ol_with_passwd_module="static"
1865 fi
1866 # end --with-passwd_module
1867
1868 # OpenLDAP --enable-perl
1869         # Check whether --enable-perl or --disable-perl was given.
1870 if test "${enable_perl+set}" = set; then
1871   enableval="$enable_perl"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1881         fi
1882         ol_enable_perl="$ol_arg"
1883
1884 else
1885         ol_enable_perl="no"
1886 fi
1887 # end --enable-perl
1888 # OpenLDAP --with-perl_module
1889         # Check whether --with-perl_module or --without-perl_module was given.
1890 if test "${with_perl_module+set}" = set; then
1891   withval="$with_perl_module"
1892   
1893         ol_arg=invalid
1894         for ol_val in static dynamic ; do
1895                 if test "$withval" = "$ol_val" ; then
1896                         ol_arg="$ol_val"
1897                 fi
1898         done
1899         if test "$ol_arg" = "invalid" ; then
1900                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1901         fi
1902         ol_with_perl_module="$ol_arg"
1903
1904 else
1905         ol_with_perl_module="static"
1906 fi
1907 # end --with-perl_module
1908
1909 # OpenLDAP --enable-shell
1910         # Check whether --enable-shell or --disable-shell was given.
1911 if test "${enable_shell+set}" = set; then
1912   enableval="$enable_shell"
1913   
1914         ol_arg=invalid
1915         for ol_val in auto yes no ; do
1916                 if test "$enableval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1922         fi
1923         ol_enable_shell="$ol_arg"
1924
1925 else
1926         ol_enable_shell="no"
1927 fi
1928 # end --enable-shell
1929 # OpenLDAP --with-shell_module
1930         # Check whether --with-shell_module or --without-shell_module was given.
1931 if test "${with_shell_module+set}" = set; then
1932   withval="$with_shell_module"
1933   
1934         ol_arg=invalid
1935         for ol_val in static dynamic ; do
1936                 if test "$withval" = "$ol_val" ; then
1937                         ol_arg="$ol_val"
1938                 fi
1939         done
1940         if test "$ol_arg" = "invalid" ; then
1941                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1942         fi
1943         ol_with_shell_module="$ol_arg"
1944
1945 else
1946         ol_with_shell_module="static"
1947 fi
1948 # end --with-shell_module
1949
1950 # OpenLDAP --enable-tcl
1951         # Check whether --enable-tcl or --disable-tcl was given.
1952 if test "${enable_tcl+set}" = set; then
1953   enableval="$enable_tcl"
1954   
1955         ol_arg=invalid
1956         for ol_val in auto yes no ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1963         fi
1964         ol_enable_tcl="$ol_arg"
1965
1966 else
1967         ol_enable_tcl="no"
1968 fi
1969 # end --enable-tcl
1970 # OpenLDAP --with-tcl_module
1971         # Check whether --with-tcl_module or --without-tcl_module was given.
1972 if test "${with_tcl_module+set}" = set; then
1973   withval="$with_tcl_module"
1974   
1975         ol_arg=invalid
1976         for ol_val in static dynamic ; do
1977                 if test "$withval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1983         fi
1984         ol_with_tcl_module="$ol_arg"
1985
1986 else
1987         ol_with_tcl_module="static"
1988 fi
1989 # end --with-tcl_module
1990
1991
1992 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1993 if test "${with_xxslurpdoptions+set}" = set; then
1994   withval="$with_xxslurpdoptions"
1995   :
1996 fi
1997
1998 # OpenLDAP --enable-slurpd
1999         # Check whether --enable-slurpd or --disable-slurpd was given.
2000 if test "${enable_slurpd+set}" = set; then
2001   enableval="$enable_slurpd"
2002   
2003         ol_arg=invalid
2004         for ol_val in auto yes no ; do
2005                 if test "$enableval" = "$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 $enableval for --enable-slurpd" 1>&2; exit 1; }
2011         fi
2012         ol_enable_slurpd="$ol_arg"
2013
2014 else
2015         ol_enable_slurpd="auto"
2016 fi
2017 # end --enable-slurpd
2018
2019 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2020 if test "${with_xxliboptions+set}" = set; then
2021   withval="$with_xxliboptions"
2022   :
2023 fi
2024
2025 # Check whether --enable-static or --disable-static was given.
2026 if test "${enable_static+set}" = set; then
2027   enableval="$enable_static"
2028   p=${PACKAGE-default}
2029 case "$enableval" in
2030 yes) enable_static=yes ;;
2031 no) enable_static=no ;;
2032 *)
2033   enable_static=no
2034   # Look at the argument we got.  We use all the common list separators.
2035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2036   for pkg in $enableval; do
2037     if test "X$pkg" = "X$p"; then
2038       enable_static=yes
2039     fi
2040   done
2041   IFS="$ac_save_ifs"
2042   ;;
2043 esac
2044 else
2045   enable_static=yes
2046 fi
2047
2048 # Check whether --enable-shared or --disable-shared was given.
2049 if test "${enable_shared+set}" = set; then
2050   enableval="$enable_shared"
2051   p=${PACKAGE-default}
2052 case "$enableval" in
2053 yes) enable_shared=yes ;;
2054 no) enable_shared=no ;;
2055 *)
2056   enable_shared=no
2057   # Look at the argument we got.  We use all the common list separators.
2058   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2059   for pkg in $enableval; do
2060     if test "X$pkg" = "X$p"; then
2061       enable_shared=yes
2062     fi
2063   done
2064   IFS="$ac_save_ifs"
2065   ;;
2066 esac
2067 else
2068   enable_shared=yes
2069 fi
2070
2071
2072 # validate options
2073 if test $ol_enable_dns = yes ; then
2074         if test $ol_enable_referrals = no ; then
2075                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2076         fi
2077         if test $ol_enable_referrals = auto ; then
2078                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2079                 ol_enable_referrals=yes
2080         fi
2081 fi
2082
2083 if test $ol_enable_slapd = no ; then
2084                 if test $ol_enable_bdb2 = yes ; then
2085                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2086         fi
2087         if test $ol_enable_ldap = yes ; then
2088                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2089         fi
2090         if test $ol_enable_ldbm = yes ; then
2091                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2092         fi
2093         if test $ol_enable_passwd = yes ; then
2094                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2095         fi
2096         if test $ol_enable_perl = yes ; then
2097                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2098         fi
2099         if test $ol_enable_shell = yes ; then
2100                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2101         fi
2102         if test $ol_enable_tcl = yes ; then
2103                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2104         fi
2105         if test $ol_enable_modules = yes ; then
2106                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2107         fi
2108         if test $ol_enable_multimaster = yes ; then
2109                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2110         fi
2111         if test $ol_enable_wrappers = yes ; then
2112                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2113         fi
2114         if test $ol_enable_phonetic = yes ; then
2115                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2116         fi
2117         if test $ol_enable_rlookups = yes ; then
2118                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2119         fi
2120         if test $ol_with_ldbm_api != auto ; then
2121                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2122         fi
2123         if test $ol_with_ldbm_type != auto ; then
2124                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2125         fi
2126         if test $ol_with_bdb2_module != static ; then
2127                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2128         fi
2129         if test $ol_with_ldap_module != static ; then
2130                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2131         fi
2132         if test $ol_with_ldbm_module != static ; then
2133                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2134         fi
2135         if test $ol_with_passwd_module != static ; then
2136                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2137         fi
2138         if test $ol_with_perl_module != static ; then
2139                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2140         fi
2141         if test $ol_with_shell_module != static ; then
2142                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2143         fi
2144         if test $ol_with_tcl_module != static ; then
2145                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2146         fi
2147         if test $ol_enable_slurpd = yes ; then
2148                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2149         fi
2150
2151         # force settings to no
2152         ol_enable_bdb2=no
2153         ol_enable_ldap=no
2154         ol_enable_ldbm=no
2155         ol_enable_passwd=no
2156         ol_enable_perl=no
2157         ol_enable_shell=no
2158         ol_enable_tcl=no
2159
2160         ol_enable_modules=no
2161         ol_enable_multimaster=no
2162         ol_enable_phonetic=no
2163         ol_enable_rlookups=no
2164         ol_enable_wrappers=no
2165
2166         ol_with_ldbm_api=no
2167         ol_with_ldbm_type=no
2168
2169         ol_with_bdb2_module=static
2170         ol_with_ldap_module=static
2171         ol_with_ldbm_module=static
2172         ol_with_passwd_module=static
2173         ol_with_perl_module=static
2174         ol_with_shell_module=static
2175         ol_with_tcl_module=static
2176
2177         ol_enable_slurpd=no
2178
2179 elif test $ol_enable_ldbm = no ; then
2180         
2181         if test $ol_with_ldbm_api != auto ; then
2182                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2183         fi
2184
2185         if test $ol_with_ldbm_type != auto ; then
2186                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2187         fi
2188
2189         if test $ol_with_ldbm_module != static ; then
2190                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2191         fi
2192
2193         if test $ol_enable_bdb2 = yes ; then
2194                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2195         fi
2196
2197         if test $ol_enable_modules != yes -a \
2198                 $ol_enable_ldap = no -a \
2199                 $ol_enable_passwd = no -a \
2200                 $ol_enable_perl = no -a \
2201                 $ol_enable_shell = no -a \
2202                 $ol_enable_tcl = no ; then
2203                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2204         fi
2205
2206         ol_with_ldbm_api=no
2207         ol_with_ldbm_type=no
2208         ol_with_ldbm_module=static
2209
2210 elif test $ol_enable_bdb2 = yes ; then
2211         
2212         if test $ol_with_ldbm_api != auto -a \
2213                 $ol_with_ldbm_api != db2 ; then
2214                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2215         fi
2216
2217         ol_with_ldbm_api=db2
2218
2219 else
2220         
2221         if test $ol_enable_bdb2 != no ; then
2222                 if test $ol_with_ldbm_api != auto -a \
2223                         $ol_with_ldbm_api != db2 ; then
2224                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2225                         ol_enable_bdb2=no
2226                 fi
2227         fi
2228
2229         if test $ol_with_ldbm_api = gdbm -a \
2230                 $ol_with_ldbm_type = btree ; then
2231                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2232         fi
2233         if test $ol_with_ldbm_api = mdbm -a \
2234                 $ol_with_ldbm_type = btree ; then
2235                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2236         fi
2237         if test $ol_with_ldbm_api = ndbm -a \
2238                 $ol_with_ldbm_type = btree ; then
2239                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2240         fi
2241 fi
2242
2243 if test $ol_enable_slurpd = yes ; then
2244                 if test $ol_with_threads = no ; then
2245                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2246         fi
2247 fi
2248
2249 echo "$ac_t""done" 1>&6
2250
2251 ## Initialize vars
2252 LDAP_LIBS=
2253 LDIF_LIBS=
2254 LDBM_LIBS=
2255 LTHREAD_LIBS=
2256 LUTIL_LIBS=
2257
2258 LDAPD_LIBS=
2259 SLAPD_LIBS=
2260 SLURPD_LIBS=
2261
2262 BUILD_LDAPD=no
2263 BUILD_SLAPD=no
2264 BUILD_SLURPD=no
2265
2266 BUILD_BDB2=no
2267 BUILD_LDAP=no
2268 BUILD_LDBM=no
2269 BUILD_PASSWD=no
2270 BUILD_PERL=no
2271 BUILD_SHELL=no
2272 BUILD_TCL=no
2273 BUILD_THREAD=no
2274
2275 BUILD_BDB2_DYNAMIC=no
2276 BUILD_LDAP_DYNAMIC=no
2277 BUILD_LDBM_DYNAMIC=no
2278 BUILD_PASSWD_DYNAMIC=no
2279 BUILD_PERL_DYNAMIC=no
2280 BUILD_SHELL_DYNAMIC=no
2281 BUILD_TCL_DYNAMIC=no
2282
2283 SLAPD_MODULES_LDFLAGS=
2284 SLAPD_MODULES_CPPFLAGS=
2285
2286 SLAPD_PERL_LDFLAGS=
2287 SLAPD_PERL_CPPFLAGS=
2288
2289 KRB_LIBS=
2290 READLINE_LIBS=
2291 TERMCAP_LIBS=
2292 TLS_LIBS=
2293
2294
2295
2296 cat >> confdefs.h <<\EOF
2297 #define HAVE_MKVERSION 1
2298 EOF
2299
2300
2301
2302
2303
2304 ol_aix_threads=no
2305 case "$target" in
2306 *-*-aix*)       if test -z "$CC" ; then
2307                 case "$ol_with_threads" in
2308                 auto | yes |  posix) ol_aix_threads=yes ;;
2309                 esac
2310         fi
2311 ;;
2312 esac
2313
2314 if test $ol_aix_threads = yes ; then
2315         if test -z "${CC}" ; then
2316                 for ac_prog in cc_r xlc_r cc
2317 do
2318 # Extract the first word of "$ac_prog", so it can be a program name with args.
2319 set dummy $ac_prog; ac_word=$2
2320 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2321 echo "configure:2322: checking for $ac_word" >&5
2322 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   if test -n "$CC"; then
2326   ac_cv_prog_CC="$CC" # Let the user override the test.
2327 else
2328   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2329   ac_dummy="$PATH"
2330   for ac_dir in $ac_dummy; do
2331     test -z "$ac_dir" && ac_dir=.
2332     if test -f $ac_dir/$ac_word; then
2333       ac_cv_prog_CC="$ac_prog"
2334       break
2335     fi
2336   done
2337   IFS="$ac_save_ifs"
2338 fi
2339 fi
2340 CC="$ac_cv_prog_CC"
2341 if test -n "$CC"; then
2342   echo "$ac_t""$CC" 1>&6
2343 else
2344   echo "$ac_t""no" 1>&6
2345 fi
2346
2347 test -n "$CC" && break
2348 done
2349
2350
2351                 if test "$CC" = cc ; then
2352                                                 if test $ol_with_threads != auto ; then
2353                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2354                         else
2355                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2356                         fi
2357                         ol_with_threads=no
2358                 fi
2359         fi
2360
2361         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2362                 ol_with_threads=posix
2363                 ol_cv_pthread_create=yes
2364         fi
2365 fi
2366
2367 if test -z "${CC}"; then
2368         for ac_prog in cc
2369 do
2370 # Extract the first word of "$ac_prog", so it can be a program name with args.
2371 set dummy $ac_prog; ac_word=$2
2372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2373 echo "configure:2374: checking for $ac_word" >&5
2374 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2375   echo $ac_n "(cached) $ac_c" 1>&6
2376 else
2377   if test -n "$CC"; then
2378   ac_cv_prog_CC="$CC" # Let the user override the test.
2379 else
2380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2381   ac_dummy="$PATH"
2382   for ac_dir in $ac_dummy; do
2383     test -z "$ac_dir" && ac_dir=.
2384     if test -f $ac_dir/$ac_word; then
2385       ac_cv_prog_CC="$ac_prog"
2386       break
2387     fi
2388   done
2389   IFS="$ac_save_ifs"
2390 fi
2391 fi
2392 CC="$ac_cv_prog_CC"
2393 if test -n "$CC"; then
2394   echo "$ac_t""$CC" 1>&6
2395 else
2396   echo "$ac_t""no" 1>&6
2397 fi
2398
2399 test -n "$CC" && break
2400 done
2401
2402 fi
2403
2404
2405 # Check whether --enable-fast-install or --disable-fast-install was given.
2406 if test "${enable_fast_install+set}" = set; then
2407   enableval="$enable_fast_install"
2408   p=${PACKAGE-default}
2409 case "$enableval" in
2410 yes) enable_fast_install=yes ;;
2411 no) enable_fast_install=no ;;
2412 *)
2413   enable_fast_install=no
2414   # Look at the argument we got.  We use all the common list separators.
2415   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2416   for pkg in $enableval; do
2417     if test "X$pkg" = "X$p"; then
2418       enable_fast_install=yes
2419     fi
2420   done
2421   IFS="$ac_save_ifs"
2422   ;;
2423 esac
2424 else
2425   enable_fast_install=yes
2426 fi
2427
2428 # Extract the first word of "ranlib", so it can be a program name with args.
2429 set dummy ranlib; ac_word=$2
2430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2431 echo "configure:2432: checking for $ac_word" >&5
2432 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   if test -n "$RANLIB"; then
2436   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2437 else
2438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2439   ac_dummy="$PATH"
2440   for ac_dir in $ac_dummy; do
2441     test -z "$ac_dir" && ac_dir=.
2442     if test -f $ac_dir/$ac_word; then
2443       ac_cv_prog_RANLIB="ranlib"
2444       break
2445     fi
2446   done
2447   IFS="$ac_save_ifs"
2448   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2449 fi
2450 fi
2451 RANLIB="$ac_cv_prog_RANLIB"
2452 if test -n "$RANLIB"; then
2453   echo "$ac_t""$RANLIB" 1>&6
2454 else
2455   echo "$ac_t""no" 1>&6
2456 fi
2457
2458 # Extract the first word of "gcc", so it can be a program name with args.
2459 set dummy gcc; ac_word=$2
2460 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2461 echo "configure:2462: checking for $ac_word" >&5
2462 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2463   echo $ac_n "(cached) $ac_c" 1>&6
2464 else
2465   if test -n "$CC"; then
2466   ac_cv_prog_CC="$CC" # Let the user override the test.
2467 else
2468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2469   ac_dummy="$PATH"
2470   for ac_dir in $ac_dummy; do
2471     test -z "$ac_dir" && ac_dir=.
2472     if test -f $ac_dir/$ac_word; then
2473       ac_cv_prog_CC="gcc"
2474       break
2475     fi
2476   done
2477   IFS="$ac_save_ifs"
2478 fi
2479 fi
2480 CC="$ac_cv_prog_CC"
2481 if test -n "$CC"; then
2482   echo "$ac_t""$CC" 1>&6
2483 else
2484   echo "$ac_t""no" 1>&6
2485 fi
2486
2487 if test -z "$CC"; then
2488   # Extract the first word of "cc", so it can be a program name with args.
2489 set dummy cc; ac_word=$2
2490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2491 echo "configure:2492: checking for $ac_word" >&5
2492 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2493   echo $ac_n "(cached) $ac_c" 1>&6
2494 else
2495   if test -n "$CC"; then
2496   ac_cv_prog_CC="$CC" # Let the user override the test.
2497 else
2498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2499   ac_prog_rejected=no
2500   ac_dummy="$PATH"
2501   for ac_dir in $ac_dummy; do
2502     test -z "$ac_dir" && ac_dir=.
2503     if test -f $ac_dir/$ac_word; then
2504       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2505         ac_prog_rejected=yes
2506         continue
2507       fi
2508       ac_cv_prog_CC="cc"
2509       break
2510     fi
2511   done
2512   IFS="$ac_save_ifs"
2513 if test $ac_prog_rejected = yes; then
2514   # We found a bogon in the path, so make sure we never use it.
2515   set dummy $ac_cv_prog_CC
2516   shift
2517   if test $# -gt 0; then
2518     # We chose a different compiler from the bogus one.
2519     # However, it has the same basename, so the bogon will be chosen
2520     # first if we set CC to just the basename; use the full file name.
2521     shift
2522     set dummy "$ac_dir/$ac_word" "$@"
2523     shift
2524     ac_cv_prog_CC="$@"
2525   fi
2526 fi
2527 fi
2528 fi
2529 CC="$ac_cv_prog_CC"
2530 if test -n "$CC"; then
2531   echo "$ac_t""$CC" 1>&6
2532 else
2533   echo "$ac_t""no" 1>&6
2534 fi
2535
2536   if test -z "$CC"; then
2537     case "`uname -s`" in
2538     *win32* | *WIN32* | *CYGWIN*)
2539       # Extract the first word of "cl", so it can be a program name with args.
2540 set dummy cl; ac_word=$2
2541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2542 echo "configure:2543: checking for $ac_word" >&5
2543 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2544   echo $ac_n "(cached) $ac_c" 1>&6
2545 else
2546   if test -n "$CC"; then
2547   ac_cv_prog_CC="$CC" # Let the user override the test.
2548 else
2549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2550   ac_dummy="$PATH"
2551   for ac_dir in $ac_dummy; do
2552     test -z "$ac_dir" && ac_dir=.
2553     if test -f $ac_dir/$ac_word; then
2554       ac_cv_prog_CC="cl"
2555       break
2556     fi
2557   done
2558   IFS="$ac_save_ifs"
2559 fi
2560 fi
2561 CC="$ac_cv_prog_CC"
2562 if test -n "$CC"; then
2563   echo "$ac_t""$CC" 1>&6
2564 else
2565   echo "$ac_t""no" 1>&6
2566 fi
2567  ;;
2568     esac
2569   fi
2570   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2571 fi
2572
2573 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2574 echo "configure:2575: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2575
2576 ac_ext=c
2577 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2578 ac_cpp='$CPP $CPPFLAGS'
2579 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2580 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2581 cross_compiling=$ac_cv_prog_cc_cross
2582
2583 cat > conftest.$ac_ext << EOF
2584
2585 #line 2586 "configure"
2586 #include "confdefs.h"
2587
2588 main(){return(0);}
2589 EOF
2590 if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2591   ac_cv_prog_cc_works=yes
2592   # If we can't run a trivial program, we are probably using a cross compiler.
2593   if (./conftest; exit) 2>/dev/null; then
2594     ac_cv_prog_cc_cross=no
2595   else
2596     ac_cv_prog_cc_cross=yes
2597   fi
2598 else
2599   echo "configure: failed program was:" >&5
2600   cat conftest.$ac_ext >&5
2601   ac_cv_prog_cc_works=no
2602 fi
2603 rm -fr conftest*
2604 ac_ext=c
2605 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2606 ac_cpp='$CPP $CPPFLAGS'
2607 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2608 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2609 cross_compiling=$ac_cv_prog_cc_cross
2610
2611 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2612 if test $ac_cv_prog_cc_works = no; then
2613   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2614 fi
2615 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2616 echo "configure:2617: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2617 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2618 cross_compiling=$ac_cv_prog_cc_cross
2619
2620 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2621 echo "configure:2622: checking whether we are using GNU C" >&5
2622 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2623   echo $ac_n "(cached) $ac_c" 1>&6
2624 else
2625   cat > conftest.c <<EOF
2626 #ifdef __GNUC__
2627   yes;
2628 #endif
2629 EOF
2630 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2631   ac_cv_prog_gcc=yes
2632 else
2633   ac_cv_prog_gcc=no
2634 fi
2635 fi
2636
2637 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2638
2639 if test $ac_cv_prog_gcc = yes; then
2640   GCC=yes
2641 else
2642   GCC=
2643 fi
2644
2645 ac_test_CFLAGS="${CFLAGS+set}"
2646 ac_save_CFLAGS="$CFLAGS"
2647 CFLAGS=
2648 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2649 echo "configure:2650: checking whether ${CC-cc} accepts -g" >&5
2650 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2651   echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653   echo 'void f(){}' > conftest.c
2654 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2655   ac_cv_prog_cc_g=yes
2656 else
2657   ac_cv_prog_cc_g=no
2658 fi
2659 rm -f conftest*
2660
2661 fi
2662
2663 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2664 if test "$ac_test_CFLAGS" = set; then
2665   CFLAGS="$ac_save_CFLAGS"
2666 elif test $ac_cv_prog_cc_g = yes; then
2667   if test "$GCC" = yes; then
2668     CFLAGS="-g -O2"
2669   else
2670     CFLAGS="-g"
2671   fi
2672 else
2673   if test "$GCC" = yes; then
2674     CFLAGS="-O2"
2675   else
2676     CFLAGS=
2677   fi
2678 fi
2679
2680 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2681 if test "${with_gnu_ld+set}" = set; then
2682   withval="$with_gnu_ld"
2683   test "$withval" = no || with_gnu_ld=yes
2684 else
2685   with_gnu_ld=no
2686 fi
2687
2688 ac_prog=ld
2689 if test "$ac_cv_prog_gcc" = yes; then
2690   # Check if gcc -print-prog-name=ld gives a path.
2691   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2692 echo "configure:2693: checking for ld used by GCC" >&5
2693   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2694   case "$ac_prog" in
2695     # Accept absolute paths.
2696     [\\/]* | [A-Za-z]:[\\/]*)
2697       re_direlt='/[^/][^/]*/\.\./'
2698       # Canonicalize the path of ld
2699       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2700       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2701         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2702       done
2703       test -z "$LD" && LD="$ac_prog"
2704       ;;
2705   "")
2706     # If it fails, then pretend we aren't using GCC.
2707     ac_prog=ld
2708     ;;
2709   *)
2710     # If it is relative, then search for the first ld in PATH.
2711     with_gnu_ld=unknown
2712     ;;
2713   esac
2714 elif test "$with_gnu_ld" = yes; then
2715   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2716 echo "configure:2717: checking for GNU ld" >&5
2717 else
2718   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2719 echo "configure:2720: checking for non-GNU ld" >&5
2720 fi
2721 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2722   echo $ac_n "(cached) $ac_c" 1>&6
2723 else
2724   if test -z "$LD"; then
2725   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2726   for ac_dir in $PATH; do
2727     test -z "$ac_dir" && ac_dir=.
2728     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2729       ac_cv_path_LD="$ac_dir/$ac_prog"
2730       # Check to see if the program is GNU ld.  I'd rather use --version,
2731       # but apparently some GNU ld's only accept -v.
2732       # Break only if it was the GNU/non-GNU ld that we prefer.
2733       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2734         test "$with_gnu_ld" != no && break
2735       else
2736         test "$with_gnu_ld" != yes && break
2737       fi
2738     fi
2739   done
2740   IFS="$ac_save_ifs"
2741 else
2742   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2743 fi
2744 fi
2745
2746 LD="$ac_cv_path_LD"
2747 if test -n "$LD"; then
2748   echo "$ac_t""$LD" 1>&6
2749 else
2750   echo "$ac_t""no" 1>&6
2751 fi
2752 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2753
2754 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2755 echo "configure:2756: checking if the linker ($LD) is GNU ld" >&5
2756 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2757   echo $ac_n "(cached) $ac_c" 1>&6
2758 else
2759   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2760 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2761   ac_cv_prog_gnu_ld=yes
2762 else
2763   ac_cv_prog_gnu_ld=no
2764 fi
2765 fi
2766
2767 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2768
2769
2770 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2771 echo "configure:2772: checking for BSD-compatible nm" >&5
2772 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2773   echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775   if test -n "$NM"; then
2776   # Let the user override the test.
2777   ac_cv_path_NM="$NM"
2778 else
2779   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2780   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2781     test -z "$ac_dir" && ac_dir=.
2782     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2783       # Check to see if the nm accepts a BSD-compat flag.
2784       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2785       #   nm: unknown option "B" ignored
2786       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2787         ac_cv_path_NM="$ac_dir/nm -B"
2788         break
2789       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2790         ac_cv_path_NM="$ac_dir/nm -p"
2791         break
2792       else
2793         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2794         continue # so that we can try to find one that supports BSD flags
2795       fi
2796     fi
2797   done
2798   IFS="$ac_save_ifs"
2799   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2800 fi
2801 fi
2802
2803 NM="$ac_cv_path_NM"
2804 echo "$ac_t""$NM" 1>&6
2805
2806
2807 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2808 echo "configure:2809: checking whether ln -s works" >&5
2809 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2810   echo $ac_n "(cached) $ac_c" 1>&6
2811 else
2812   rm -f conftestdata
2813 if ln -s X conftestdata 2>/dev/null
2814 then
2815   rm -f conftestdata
2816   ac_cv_prog_LN_S="ln -s"
2817 else
2818   ac_cv_prog_LN_S=ln
2819 fi
2820 fi
2821 LN_S="$ac_cv_prog_LN_S"
2822 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2823   echo "$ac_t""yes" 1>&6
2824 else
2825   echo "$ac_t""no" 1>&6
2826 fi
2827
2828
2829 # Check for any special flags to pass to ltconfig.
2830 libtool_flags="--cache-file=$cache_file"
2831 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2832 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2833 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2834 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2835 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2836
2837
2838 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2839 if test "${enable_libtool_lock+set}" = set; then
2840   enableval="$enable_libtool_lock"
2841   :
2842 fi
2843
2844 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2845 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2846
2847 # Some flags need to be propagated to the compiler or linker for good
2848 # libtool support.
2849 case "$host" in
2850 *-*-irix6*)
2851   # Find out which ABI we are using.
2852   echo '#line 2853 "configure"' > conftest.$ac_ext
2853   if { (eval echo configure:2854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2854     case "`/usr/bin/file conftest.o`" in
2855     *32-bit*)
2856       LD="${LD-ld} -32"
2857       ;;
2858     *N32*)
2859       LD="${LD-ld} -n32"
2860       ;;
2861     *64-bit*)
2862       LD="${LD-ld} -64"
2863       ;;
2864     esac
2865   fi
2866   rm -rf conftest*
2867   ;;
2868
2869 *-*-sco3.2v5*)
2870   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2871   SAVE_CFLAGS="$CFLAGS"
2872   CFLAGS="$CFLAGS -belf"
2873   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2874 echo "configure:2875: checking whether the C compiler needs -belf" >&5
2875 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2876   echo $ac_n "(cached) $ac_c" 1>&6
2877 else
2878   cat > conftest.$ac_ext <<EOF
2879 #line 2880 "configure"
2880 #include "confdefs.h"
2881
2882 int main() {
2883
2884 ; return 0; }
2885 EOF
2886 if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2887   rm -rf conftest*
2888   lt_cv_cc_needs_belf=yes
2889 else
2890   echo "configure: failed program was:" >&5
2891   cat conftest.$ac_ext >&5
2892   rm -rf conftest*
2893   lt_cv_cc_needs_belf=no
2894 fi
2895 rm -f conftest*
2896 fi
2897
2898 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2899   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2900     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2901     CFLAGS="$SAVE_CFLAGS"
2902   fi
2903   ;;
2904
2905
2906 esac
2907
2908
2909 # Save cache, so that ltconfig can load it
2910
2911
2912 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2913 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2914 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2915 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2916 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2917 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2918 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2919 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2920
2921 # Reload cache, that may have been modified by ltconfig
2922
2923
2924 # This can be used to rebuild libtool when needed
2925 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2926
2927 # Always use our own libtool.
2928 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2929
2930 # Redirect the config.log output again, so that the ltconfig log is not
2931 # clobbered by the next message.
2932 exec 5>>./config.log
2933
2934
2935 for ac_prog in mawk gawk nawk awk
2936 do
2937 # Extract the first word of "$ac_prog", so it can be a program name with args.
2938 set dummy $ac_prog; ac_word=$2
2939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2940 echo "configure:2941: checking for $ac_word" >&5
2941 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   if test -n "$AWK"; then
2945   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2946 else
2947   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2948   ac_dummy="$PATH"
2949   for ac_dir in $ac_dummy; do
2950     test -z "$ac_dir" && ac_dir=.
2951     if test -f $ac_dir/$ac_word; then
2952       ac_cv_prog_AWK="$ac_prog"
2953       break
2954     fi
2955   done
2956   IFS="$ac_save_ifs"
2957 fi
2958 fi
2959 AWK="$ac_cv_prog_AWK"
2960 if test -n "$AWK"; then
2961   echo "$ac_t""$AWK" 1>&6
2962 else
2963   echo "$ac_t""no" 1>&6
2964 fi
2965
2966 test -n "$AWK" && break
2967 done
2968
2969 # test for ln hardlink support
2970 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2971 echo "configure:2972: checking whether ln works" >&5
2972 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   rm -f conftest.src conftest.dst
2976 echo "conftest" > conftest.src
2977 if ln conftest.src conftest.dst 2>/dev/null
2978 then
2979   ol_cv_prog_LN_H="ln"
2980 else
2981   ol_cv_prog_LN_H="cp"
2982 fi
2983 rm -f conftest.src conftest.dst
2984
2985 fi
2986 LN_H="$ol_cv_prog_LN_H"
2987 if test "$ol_cv_prog_LN_H" = "ln"; then
2988         echo "$ac_t""yes" 1>&6
2989 else
2990         echo "$ac_t""no" 1>&6
2991 fi
2992
2993 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2994 echo "configure:2995: checking whether ln -s works" >&5
2995 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2996   echo $ac_n "(cached) $ac_c" 1>&6
2997 else
2998   rm -f conftestdata
2999 if ln -s X conftestdata 2>/dev/null
3000 then
3001   rm -f conftestdata
3002   ac_cv_prog_LN_S="ln -s"
3003 else
3004   ac_cv_prog_LN_S=ln
3005 fi
3006 fi
3007 LN_S="$ac_cv_prog_LN_S"
3008 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3009   echo "$ac_t""yes" 1>&6
3010 else
3011   echo "$ac_t""no" 1>&6
3012 fi
3013
3014
3015 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3016         LN_S="$LN_H"
3017 fi
3018
3019 # Extract the first word of "sendmail", so it can be a program name with args.
3020 set dummy sendmail; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   case "$SENDMAIL" in
3027   /*)
3028   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3029   ;;
3030   ?:/*)                  
3031   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3032   ;;
3033   *)
3034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3035   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3036   for ac_dir in $ac_dummy; do 
3037     test -z "$ac_dir" && ac_dir=.
3038     if test -f $ac_dir/$ac_word; then
3039       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3040       break
3041     fi
3042   done
3043   IFS="$ac_save_ifs"
3044   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3045   ;;
3046 esac
3047 fi
3048 SENDMAIL="$ac_cv_path_SENDMAIL"
3049 if test -n "$SENDMAIL"; then
3050   echo "$ac_t""$SENDMAIL" 1>&6
3051 else
3052   echo "$ac_t""no" 1>&6
3053 fi
3054
3055 # Extract the first word of "vi", so it can be a program name with args.
3056 set dummy vi; ac_word=$2
3057 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3058 echo "configure:3059: checking for $ac_word" >&5
3059 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   case "$EDITOR" in
3063   /*)
3064   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3065   ;;
3066   ?:/*)                  
3067   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3068   ;;
3069   *)
3070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3071   ac_dummy="$PATH:/usr/ucb"
3072   for ac_dir in $ac_dummy; do 
3073     test -z "$ac_dir" && ac_dir=.
3074     if test -f $ac_dir/$ac_word; then
3075       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3076       break
3077     fi
3078   done
3079   IFS="$ac_save_ifs"
3080   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3081   ;;
3082 esac
3083 fi
3084 EDITOR="$ac_cv_path_EDITOR"
3085 if test -n "$EDITOR"; then
3086   echo "$ac_t""$EDITOR" 1>&6
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090
3091 # Extract the first word of "finger", so it can be a program name with args.
3092 set dummy finger; ac_word=$2
3093 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3094 echo "configure:3095: checking for $ac_word" >&5
3095 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   case "$FINGER" in
3099   /*)
3100   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3101   ;;
3102   ?:/*)                  
3103   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3104   ;;
3105   *)
3106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3107   ac_dummy="$PATH:/usr/ucb"
3108   for ac_dir in $ac_dummy; do 
3109     test -z "$ac_dir" && ac_dir=.
3110     if test -f $ac_dir/$ac_word; then
3111       ac_cv_path_FINGER="$ac_dir/$ac_word"
3112       break
3113     fi
3114   done
3115   IFS="$ac_save_ifs"
3116   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3117   ;;
3118 esac
3119 fi
3120 FINGER="$ac_cv_path_FINGER"
3121 if test -n "$FINGER"; then
3122   echo "$ac_t""$FINGER" 1>&6
3123 else
3124   echo "$ac_t""no" 1>&6
3125 fi
3126
3127
3128 ol_link_perl=no
3129 if test $ol_enable_perl != no ; then
3130         # Extract the first word of "perl", so it can be a program name with args.
3131 set dummy perl; ac_word=$2
3132 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3133 echo "configure:3134: checking for $ac_word" >&5
3134 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3135   echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137   case "$PERLBIN" in
3138   /*)
3139   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3140   ;;
3141   ?:/*)                  
3142   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3143   ;;
3144   *)
3145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3146   ac_dummy="$PATH"
3147   for ac_dir in $ac_dummy; do 
3148     test -z "$ac_dir" && ac_dir=.
3149     if test -f $ac_dir/$ac_word; then
3150       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3151       break
3152     fi
3153   done
3154   IFS="$ac_save_ifs"
3155   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3156   ;;
3157 esac
3158 fi
3159 PERLBIN="$ac_cv_path_PERLBIN"
3160 if test -n "$PERLBIN"; then
3161   echo "$ac_t""$PERLBIN" 1>&6
3162 else
3163   echo "$ac_t""no" 1>&6
3164 fi
3165
3166
3167         if test "no$PERLBIN" = "no" ; then
3168                 if test $ol_enable_perl = yes ; then
3169                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3170                 fi
3171
3172         else
3173                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3174                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3175
3176                                 ol_link_perl=yes
3177         fi
3178 fi
3179
3180 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3181 echo "configure:3182: checking how to run the C preprocessor" >&5
3182 # On Suns, sometimes $CPP names a directory.
3183 if test -n "$CPP" && test -d "$CPP"; then
3184   CPP=
3185 fi
3186 if test -z "$CPP"; then
3187 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3188   echo $ac_n "(cached) $ac_c" 1>&6
3189 else
3190     # This must be in double quotes, not single quotes, because CPP may get
3191   # substituted into the Makefile and "${CC-cc}" will confuse make.
3192   CPP="${CC-cc} -E"
3193   # On the NeXT, cc -E runs the code through the compiler's parser,
3194   # not just through cpp.
3195   cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <assert.h>
3199 Syntax Error
3200 EOF
3201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3202 { (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3204 if test -z "$ac_err"; then
3205   :
3206 else
3207   echo "$ac_err" >&5
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -rf conftest*
3211   CPP="${CC-cc} -E -traditional-cpp"
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <assert.h>
3216 Syntax Error
3217 EOF
3218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3219 { (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3221 if test -z "$ac_err"; then
3222   :
3223 else
3224   echo "$ac_err" >&5
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   CPP="${CC-cc} -nologo -E"
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232 #include <assert.h>
3233 Syntax Error
3234 EOF
3235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3236 { (eval echo configure:3237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3238 if test -z "$ac_err"; then
3239   :
3240 else
3241   echo "$ac_err" >&5
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   CPP=/lib/cpp
3246 fi
3247 rm -f conftest*
3248 fi
3249 rm -f conftest*
3250 fi
3251 rm -f conftest*
3252   ac_cv_prog_CPP="$CPP"
3253 fi
3254   CPP="$ac_cv_prog_CPP"
3255 else
3256   ac_cv_prog_CPP="$CPP"
3257 fi
3258 echo "$ac_t""$CPP" 1>&6
3259
3260
3261 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3262         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3263
3264 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3265         echo "configure: warning: programs compiled here do run here..." 1>&2
3266         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3267
3268 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3269         echo "configure: warning: programs compiled here do not run here..." 1>&2
3270         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3271 fi
3272
3273 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3274 echo "configure:3275: checking for AIX" >&5
3275 cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3278 #ifdef _AIX
3279   yes
3280 #endif
3281
3282 EOF
3283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3284   egrep "yes" >/dev/null 2>&1; then
3285   rm -rf conftest*
3286   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3287 #define _ALL_SOURCE 1
3288 EOF
3289
3290 else
3291   rm -rf conftest*
3292   echo "$ac_t""no" 1>&6
3293 fi
3294 rm -f conftest*
3295
3296
3297 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3298 echo "configure:3299: checking for POSIXized ISC" >&5
3299 if test -d /etc/conf/kconfig.d &&
3300   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3301 then
3302   echo "$ac_t""yes" 1>&6
3303   ISC=yes # If later tests want to check for ISC.
3304   cat >> confdefs.h <<\EOF
3305 #define _POSIX_SOURCE 1
3306 EOF
3307
3308   if test "$GCC" = yes; then
3309     CC="$CC -posix"
3310   else
3311     CC="$CC -Xp"
3312   fi
3313 else
3314   echo "$ac_t""no" 1>&6
3315   ISC=
3316 fi
3317
3318 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3319 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3320 echo "configure:3321: checking for minix/config.h" >&5
3321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 #include <minix/config.h>
3328 EOF
3329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3330 { (eval echo configure:3331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3332 if test -z "$ac_err"; then
3333   rm -rf conftest*
3334   eval "ac_cv_header_$ac_safe=yes"
3335 else
3336   echo "$ac_err" >&5
3337   echo "configure: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   rm -rf conftest*
3340   eval "ac_cv_header_$ac_safe=no"
3341 fi
3342 rm -f conftest*
3343 fi
3344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3345   echo "$ac_t""yes" 1>&6
3346   MINIX=yes
3347 else
3348   echo "$ac_t""no" 1>&6
3349 MINIX=
3350 fi
3351
3352 if test "$MINIX" = yes; then
3353   cat >> confdefs.h <<\EOF
3354 #define _POSIX_SOURCE 1
3355 EOF
3356
3357   cat >> confdefs.h <<\EOF
3358 #define _POSIX_1_SOURCE 2
3359 EOF
3360
3361   cat >> confdefs.h <<\EOF
3362 #define _MINIX 1
3363 EOF
3364
3365 fi
3366
3367
3368 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3369 echo "configure:3370: checking for Cygwin environment" >&5
3370 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   cat > conftest.$ac_ext <<EOF
3374 #line 3375 "configure"
3375 #include "confdefs.h"
3376
3377 int main() {
3378
3379 #ifndef __CYGWIN__
3380 #define __CYGWIN__ __CYGWIN32__
3381 #endif
3382 return __CYGWIN__;
3383 ; return 0; }
3384 EOF
3385 if { (eval echo configure:3386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3386   rm -rf conftest*
3387   ac_cv_cygwin=yes
3388 else
3389   echo "configure: failed program was:" >&5
3390   cat conftest.$ac_ext >&5
3391   rm -rf conftest*
3392   ac_cv_cygwin=no
3393 fi
3394 rm -f conftest*
3395 fi
3396
3397 echo "$ac_t""$ac_cv_cygwin" 1>&6
3398 CYGWIN=
3399 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3400 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3401 echo "configure:3402: checking for mingw32 environment" >&5
3402 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408
3409 int main() {
3410 return __MINGW32__;
3411 ; return 0; }
3412 EOF
3413 if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3414   rm -rf conftest*
3415   ac_cv_mingw32=yes
3416 else
3417   echo "configure: failed program was:" >&5
3418   cat conftest.$ac_ext >&5
3419   rm -rf conftest*
3420   ac_cv_mingw32=no
3421 fi
3422 rm -f conftest*
3423 fi
3424
3425 echo "$ac_t""$ac_cv_mingw32" 1>&6
3426 MINGW32=
3427 test "$ac_cv_mingw32" = yes && MINGW32=yes
3428 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3429 echo "configure:3430: checking for EMX OS/2 environment" >&5
3430 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3431   echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433   cat > conftest.$ac_ext <<EOF
3434 #line 3435 "configure"
3435 #include "confdefs.h"
3436
3437 int main() {
3438 return __EMX__;
3439 ; return 0; }
3440 EOF
3441 if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3442   rm -rf conftest*
3443   ac_cv_emxos2=yes
3444 else
3445   echo "configure: failed program was:" >&5
3446   cat conftest.$ac_ext >&5
3447   rm -rf conftest*
3448   ac_cv_emxos2=no
3449 fi
3450 rm -f conftest*
3451 fi
3452
3453 echo "$ac_t""$ac_cv_emxos2" 1>&6
3454 EMXOS2=
3455 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3456
3457
3458
3459 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3460 echo "configure:3461: checking for executable suffix" >&5
3461 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3465   ac_cv_exeext=.exe
3466 else
3467   rm -f conftest*
3468   echo 'int main () { return 0; }' > conftest.$ac_ext
3469   ac_cv_exeext=
3470   if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3471     for file in conftest.*; do
3472       case $file in
3473       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3474       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3475       esac
3476     done
3477   else
3478     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3479   fi
3480   rm -f conftest*
3481   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3482 fi
3483 fi
3484
3485 EXEEXT=""
3486 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3487 echo "$ac_t""${ac_cv_exeext}" 1>&6
3488 ac_exeext=$EXEEXT
3489
3490 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3491 echo "configure:3492: checking for object suffix" >&5
3492 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   rm -f conftest*
3496 echo 'int i = 1;' > conftest.$ac_ext
3497 if { (eval echo configure:3498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3498   for ac_file in conftest.*; do
3499     case $ac_file in
3500     *.c) ;;
3501     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3502     esac
3503   done
3504 else
3505   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3506 fi
3507 rm -f conftest*
3508 fi
3509
3510 echo "$ac_t""$ac_cv_objext" 1>&6
3511 OBJEXT=$ac_cv_objext
3512 ac_objext=$ac_cv_objext
3513
3514
3515 cat >> confdefs.h <<EOF
3516 #define EXEEXT "${EXEEXT}"
3517 EOF
3518
3519
3520 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3521 echo "configure:3522: checking for be_app in -lbe" >&5
3522 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3524   echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526   ac_save_LIBS="$LIBS"
3527 LIBS="-lbe -lroot -lnet $LIBS"
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 /* Override any gcc2 internal prototype to avoid an error.  */
3532 /* We use char because int might match the return type of a gcc2
3533     builtin and then its argument prototype would still apply.  */
3534 char be_app();
3535
3536 int main() {
3537 be_app()
3538 ; return 0; }
3539 EOF
3540 if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3541   rm -rf conftest*
3542   eval "ac_cv_lib_$ac_lib_var=yes"
3543 else
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   eval "ac_cv_lib_$ac_lib_var=no"
3548 fi
3549 rm -f conftest*
3550 LIBS="$ac_save_LIBS"
3551
3552 fi
3553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3554   echo "$ac_t""yes" 1>&6
3555   LIBS="$LIBS -lbe -lroot -lnet"
3556 else
3557   echo "$ac_t""no" 1>&6
3558 :
3559 fi
3560
3561
3562
3563
3564
3565 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3566 echo "configure:3567: checking for ${CC-cc} option to accept ANSI C" >&5
3567 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   am_cv_prog_cc_stdc=no
3571 ac_save_CC="$CC"
3572 # Don't try gcc -ansi; that turns off useful extensions and
3573 # breaks some systems' header files.
3574 # AIX                   -qlanglvl=ansi
3575 # Ultrix and OSF/1      -std1
3576 # HP-UX 10.20 and later -Ae
3577 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3578 # SVR4                  -Xc -D__EXTENSIONS__
3579 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3580 do
3581   CC="$ac_save_CC $ac_arg"
3582   cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <stdarg.h>
3586 #include <stdio.h>
3587 #include <sys/types.h>
3588 #include <sys/stat.h>
3589 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3590 struct buf { int x; };
3591 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3592 static char *e (p, i)
3593      char **p;
3594      int i;
3595 {
3596   return p[i];
3597 }
3598 static char *f (char * (*g) (char **, int), char **p, ...)
3599 {
3600   char *s;
3601   va_list v;
3602   va_start (v,p);
3603   s = g (p, va_arg (v,int));
3604   va_end (v);
3605   return s;
3606 }
3607 int test (int i, double x);
3608 struct s1 {int (*f) (int a);};
3609 struct s2 {int (*f) (double a);};
3610 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3611 int argc;
3612 char **argv;
3613
3614 int main() {
3615
3616 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3617
3618 ; return 0; }
3619 EOF
3620 if { (eval echo configure:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3621   rm -rf conftest*
3622   am_cv_prog_cc_stdc="$ac_arg"; break
3623 else
3624   echo "configure: failed program was:" >&5
3625   cat conftest.$ac_ext >&5
3626 fi
3627 rm -f conftest*
3628 done
3629 CC="$ac_save_CC"
3630
3631 fi
3632
3633 if test -z "$am_cv_prog_cc_stdc"; then
3634   echo "$ac_t""none needed" 1>&6
3635 else
3636   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3637 fi
3638 case "x$am_cv_prog_cc_stdc" in
3639   x|xno) ;;
3640   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3641 esac
3642
3643 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3644         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3645 fi
3646
3647 # test for make depend flag
3648 OL_MKDEP=
3649 OL_MKDEP_FLAGS=
3650 if test -z "${MKDEP}"; then
3651         OL_MKDEP="${CC-cc}"
3652         if test -z "${MKDEP_FLAGS}"; then
3653                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3654 echo "configure:3655: checking for ${OL_MKDEP} depend flag" >&5
3655 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   
3659                         ol_cv_mkdep=no
3660                         for flag in "-M" "-xM"; do
3661                                 cat > conftest.c <<EOF
3662  noCode;
3663 EOF
3664                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3665                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3666                                 then
3667                                         if test ! -f conftest."${ac_object}" ; then
3668                                                 ol_cv_mkdep=$flag
3669                                                 OL_MKDEP_FLAGS="$flag"
3670                                                 break
3671                                         fi
3672                                 fi
3673                         done
3674                         rm -f conftest*
3675                 
3676 fi
3677
3678 echo "$ac_t""$ol_cv_mkdep" 1>&6
3679         else
3680                 cc_cv_mkdep=yes
3681                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3682         fi
3683 else
3684         cc_cv_mkdep=yes
3685         OL_MKDEP="${MKDEP}"
3686         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3687 fi
3688
3689
3690
3691 if test "${ol_cv_mkdep}" = no ; then
3692         # this will soon become an error
3693         echo "configure: warning: do not know how to generate dependencies" 1>&2
3694 fi
3695
3696 ol_link_modules=no
3697 if test $ol_enable_modules != no ; then
3698         # Extract the first word of "glib-config", so it can be a program name with args.
3699 set dummy glib-config; ac_word=$2
3700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3701 echo "configure:3702: checking for $ac_word" >&5
3702 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
3703   echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705   case "$GLIBCONFIG" in
3706   /*)
3707   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
3708   ;;
3709   ?:/*)                  
3710   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
3711   ;;
3712   *)
3713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3714   ac_dummy="$PATH"
3715   for ac_dir in $ac_dummy; do 
3716     test -z "$ac_dir" && ac_dir=.
3717     if test -f $ac_dir/$ac_word; then
3718       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
3719       break
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   ;;
3724 esac
3725 fi
3726 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
3727 if test -n "$GLIBCONFIG"; then
3728   echo "$ac_t""$GLIBCONFIG" 1>&6
3729 else
3730   echo "$ac_t""no" 1>&6
3731 fi
3732
3733
3734         if test "no$GLIBCONFIG" = "no" ; then
3735                 if test $ol_enable_modules = yes ; then
3736                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
3737                 fi
3738
3739         else
3740                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
3741                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
3742                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
3743
3744                                 ol_link_modules=yes
3745         fi
3746 else
3747         ol_with_bdb2_module=static
3748         ol_with_ldap_module=static
3749         ol_with_ldbm_module=static
3750         ol_with_passwd_module=static
3751         ol_with_perl_module=static
3752         ol_with_shell_module=static
3753         ol_with_tcl_module=static
3754 fi
3755
3756 # test for EBCDIC
3757 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3758 echo "configure:3759: checking for EBCDIC" >&5
3759 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   
3763         cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766
3767 #if !('M' == 0xd4)
3768 #include <__ASCII__/generate_error.h>
3769 #endif
3770
3771 EOF
3772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3773 { (eval echo configure:3774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3775 if test -z "$ac_err"; then
3776   rm -rf conftest*
3777   ol_cv_cpp_ebcdic=yes
3778 else
3779   echo "$ac_err" >&5
3780   echo "configure: failed program was:" >&5
3781   cat conftest.$ac_ext >&5
3782   rm -rf conftest*
3783   ol_cv_cpp_ebcdic=no
3784 fi
3785 rm -f conftest*
3786 fi
3787
3788 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3789 if test $ol_cv_cpp_ebcdic = yes ; then
3790         cat >> confdefs.h <<\EOF
3791 #define HAVE_EBCDIC 1
3792 EOF
3793
3794 fi
3795
3796 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3797 echo "configure:3798: checking for ANSI C header files" >&5
3798 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3799   echo $ac_n "(cached) $ac_c" 1>&6
3800 else
3801   cat > conftest.$ac_ext <<EOF
3802 #line 3803 "configure"
3803 #include "confdefs.h"
3804 #include <stdlib.h>
3805 #include <stdarg.h>
3806 #include <string.h>
3807 #include <float.h>
3808 EOF
3809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3810 { (eval echo configure:3811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3812 if test -z "$ac_err"; then
3813   rm -rf conftest*
3814   ol_cv_header_stdc=yes
3815 else
3816   echo "$ac_err" >&5
3817   echo "configure: failed program was:" >&5
3818   cat conftest.$ac_ext >&5
3819   rm -rf conftest*
3820   ol_cv_header_stdc=no
3821 fi
3822 rm -f conftest*
3823
3824 if test $ol_cv_header_stdc = yes; then
3825   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3826 cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 #include <string.h>
3830 EOF
3831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3832   egrep "memchr" >/dev/null 2>&1; then
3833   :
3834 else
3835   rm -rf conftest*
3836   ol_cv_header_stdc=no
3837 fi
3838 rm -f conftest*
3839
3840 fi
3841
3842 if test $ol_cv_header_stdc = yes; then
3843   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <stdlib.h>
3848 EOF
3849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3850   egrep "free" >/dev/null 2>&1; then
3851   :
3852 else
3853   rm -rf conftest*
3854   ol_cv_header_stdc=no
3855 fi
3856 rm -f conftest*
3857
3858 fi
3859
3860 if test $ol_cv_header_stdc = yes; then
3861   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3862 if test "$cross_compiling" = yes; then
3863   :
3864 else
3865   cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868 #include <ctype.h>
3869 #ifndef HAVE_EBCDIC
3870 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3871 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3872 #else
3873 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3874                 || ('j' <= (c) && (c) <= 'r') \
3875                 || ('s' <= (c) && (c) <= 'z'))
3876 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3877 #endif
3878 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3879 int main () { int i; for (i = 0; i < 256; i++)
3880 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3881 exit (0); }
3882
3883 EOF
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3885 then
3886   :
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -fr conftest*
3891   ol_cv_header_stdc=no
3892 fi
3893 rm -fr conftest*
3894 fi
3895
3896 fi
3897 fi
3898
3899 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3900 if test $ol_cv_header_stdc = yes; then
3901   cat >> confdefs.h <<\EOF
3902 #define STDC_HEADERS 1
3903 EOF
3904
3905 fi
3906 ac_cv_header_stdc=disable
3907
3908
3909 if test $ol_cv_header_stdc != yes; then
3910         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3911 fi
3912
3913 ac_header_dirent=no
3914 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3915 do
3916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3917 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3918 echo "configure:3919: checking for $ac_hdr that defines DIR" >&5
3919 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
3920   echo $ac_n "(cached) $ac_c" 1>&6
3921 else
3922   cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <sys/types.h>
3926 #include <$ac_hdr>
3927 int main() {
3928 DIR *dirp = 0;
3929 ; return 0; }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3932   rm -rf conftest*
3933   eval "ac_cv_header_dirent_$ac_safe=yes"
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   eval "ac_cv_header_dirent_$ac_safe=no"
3939 fi
3940 rm -f conftest*
3941 fi
3942 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3943   echo "$ac_t""yes" 1>&6
3944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3945   cat >> confdefs.h <<EOF
3946 #define $ac_tr_hdr 1
3947 EOF
3948  ac_header_dirent=$ac_hdr; break
3949 else
3950   echo "$ac_t""no" 1>&6
3951 fi
3952 done
3953 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3954 if test $ac_header_dirent = dirent.h; then
3955 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3956 echo "configure:3957: checking for opendir in -ldir" >&5
3957 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
3958 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3959   echo $ac_n "(cached) $ac_c" 1>&6
3960 else
3961   ac_save_LIBS="$LIBS"
3962 LIBS="-ldir  $LIBS"
3963 cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 /* Override any gcc2 internal prototype to avoid an error.  */
3967 /* We use char because int might match the return type of a gcc2
3968     builtin and then its argument prototype would still apply.  */
3969 char opendir();
3970
3971 int main() {
3972 opendir()
3973 ; return 0; }
3974 EOF
3975 if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976   rm -rf conftest*
3977   eval "ac_cv_lib_$ac_lib_var=yes"
3978 else
3979   echo "configure: failed program was:" >&5
3980   cat conftest.$ac_ext >&5
3981   rm -rf conftest*
3982   eval "ac_cv_lib_$ac_lib_var=no"
3983 fi
3984 rm -f conftest*
3985 LIBS="$ac_save_LIBS"
3986
3987 fi
3988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3989   echo "$ac_t""yes" 1>&6
3990   LIBS="$LIBS -ldir"
3991 else
3992   echo "$ac_t""no" 1>&6
3993 fi
3994
3995 else
3996 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3997 echo "configure:3998: checking for opendir in -lx" >&5
3998 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
3999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   ac_save_LIBS="$LIBS"
4003 LIBS="-lx  $LIBS"
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 /* Override any gcc2 internal prototype to avoid an error.  */
4008 /* We use char because int might match the return type of a gcc2
4009     builtin and then its argument prototype would still apply.  */
4010 char opendir();
4011
4012 int main() {
4013 opendir()
4014 ; return 0; }
4015 EOF
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4017   rm -rf conftest*
4018   eval "ac_cv_lib_$ac_lib_var=yes"
4019 else
4020   echo "configure: failed program was:" >&5
4021   cat conftest.$ac_ext >&5
4022   rm -rf conftest*
4023   eval "ac_cv_lib_$ac_lib_var=no"
4024 fi
4025 rm -f conftest*
4026 LIBS="$ac_save_LIBS"
4027
4028 fi
4029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4030   echo "$ac_t""yes" 1>&6
4031   LIBS="$LIBS -lx"
4032 else
4033   echo "$ac_t""no" 1>&6
4034 fi
4035
4036 fi
4037
4038 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4039 echo "configure:4040: checking for sys/wait.h that is POSIX.1 compatible" >&5
4040 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4041   echo $ac_n "(cached) $ac_c" 1>&6
4042 else
4043   cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 #include <sys/types.h>
4047 #include <sys/wait.h>
4048 #ifndef WEXITSTATUS
4049 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4050 #endif
4051 #ifndef WIFEXITED
4052 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4053 #endif
4054 int main() {
4055 int s;
4056 wait (&s);
4057 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4058 ; return 0; }
4059 EOF
4060 if { (eval echo configure:4061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4061   rm -rf conftest*
4062   ac_cv_header_sys_wait_h=yes
4063 else
4064   echo "configure: failed program was:" >&5
4065   cat conftest.$ac_ext >&5
4066   rm -rf conftest*
4067   ac_cv_header_sys_wait_h=no
4068 fi
4069 rm -f conftest*
4070 fi
4071
4072 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4073 if test $ac_cv_header_sys_wait_h = yes; then
4074   cat >> confdefs.h <<\EOF
4075 #define HAVE_SYS_WAIT_H 1
4076 EOF
4077
4078 fi
4079
4080 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4081 echo "configure:4082: checking POSIX termios" >&5
4082 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4083   echo $ac_n "(cached) $ac_c" 1>&6
4084 else
4085   cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 #include <sys/types.h>
4089 #include <unistd.h>
4090 #include <termios.h>
4091 int main() {
4092 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4093    tcgetattr(0, 0);
4094 ; return 0; }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4097   rm -rf conftest*
4098   am_cv_sys_posix_termios=yes
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -rf conftest*
4103   am_cv_sys_posix_termios=no
4104 fi
4105 rm -f conftest*
4106 fi
4107
4108 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4109
4110
4111  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4112 echo "configure:4113: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4113 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4114   echo $ac_n "(cached) $ac_c" 1>&6
4115 else
4116   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4117
4118   gwinsz_in_termios_h=no
4119   if test $am_cv_sys_posix_termios = yes; then
4120     cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <sys/types.h>
4124 #     include <termios.h>
4125 #     ifdef TIOCGWINSZ
4126         yes
4127 #     endif
4128     
4129 EOF
4130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4131   egrep "yes" >/dev/null 2>&1; then
4132   rm -rf conftest*
4133   gwinsz_in_termios_h=yes
4134 fi
4135 rm -f conftest*
4136
4137   fi
4138
4139   if test $gwinsz_in_termios_h = no; then
4140     cat > conftest.$ac_ext <<EOF
4141 #line 4142 "configure"
4142 #include "confdefs.h"
4143 #include <sys/types.h>
4144 #     include <sys/ioctl.h>
4145 #     ifdef TIOCGWINSZ
4146         yes
4147 #     endif
4148     
4149 EOF
4150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4151   egrep "yes" >/dev/null 2>&1; then
4152   rm -rf conftest*
4153   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4154 fi
4155 rm -f conftest*
4156
4157   fi
4158   
4159 fi
4160
4161 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4162   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4163     cat >> confdefs.h <<\EOF
4164 #define GWINSZ_IN_SYS_IOCTL 1
4165 EOF
4166
4167   fi
4168
4169 if test $am_cv_sys_posix_termios = yes ; then
4170         cat >> confdefs.h <<\EOF
4171 #define HAVE_POSIX_TERMIOS 1
4172 EOF
4173
4174 fi
4175
4176 for ac_hdr in \
4177         arpa/inet.h             \
4178         arpa/nameser.h  \
4179         assert.h                \
4180         crypt.h                 \
4181         errno.h                 \
4182         fcntl.h                 \
4183         filio.h                 \
4184         getopt.h                \
4185         grp.h                   \
4186         libutil.h               \
4187         limits.h                \
4188         locale.h                \
4189         netinet/tcp.h   \
4190         malloc.h                \
4191         memory.h                \
4192         psap.h                  \
4193         pwd.h                   \
4194         resolv.h                \
4195         sgtty.h                 \
4196         shadow.h                \
4197         stdarg.h                \
4198         stddef.h                \
4199         string.h                \
4200         strings.h               \
4201         sysexits.h              \
4202         sys/file.h              \
4203         sys/filio.h             \
4204         sys/errno.h             \
4205         sys/ioctl.h             \
4206         sys/param.h             \
4207         sys/resource.h  \
4208         sys/select.h    \
4209         sys/socket.h    \
4210         sys/syslog.h    \
4211         sys/time.h              \
4212         sys/types.h             \
4213         syslog.h                \
4214         termios.h               \
4215         unistd.h                \
4216
4217 do
4218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4220 echo "configure:4221: checking for $ac_hdr" >&5
4221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <$ac_hdr>
4228 EOF
4229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4230 { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4232 if test -z "$ac_err"; then
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=yes"
4235 else
4236   echo "$ac_err" >&5
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   eval "ac_cv_header_$ac_safe=no"
4241 fi
4242 rm -f conftest*
4243 fi
4244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4247   cat >> confdefs.h <<EOF
4248 #define $ac_tr_hdr 1
4249 EOF
4250  
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254 done
4255
4256
4257
4258
4259 echo $ac_n "checking for socket""... $ac_c" 1>&6
4260 echo "configure:4261: checking for socket" >&5
4261 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 /* System header to define __stub macros and hopefully few prototypes,
4268     which can conflict with char socket(); below.  */
4269 #include <assert.h>
4270 /* Override any gcc2 internal prototype to avoid an error.  */
4271 /* We use char because int might match the return type of a gcc2
4272     builtin and then its argument prototype would still apply.  */
4273 char socket();
4274 char (*f)();
4275
4276 int main() {
4277
4278 /* The GNU C library defines this for functions which it implements
4279     to always fail with ENOSYS.  Some functions are actually named
4280     something starting with __ and the normal name is an alias.  */
4281 #if defined (__stub_socket) || defined (__stub___socket)
4282 choke me
4283 #else
4284 f = socket;
4285 #endif
4286
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4290   rm -rf conftest*
4291   eval "ac_cv_func_socket=yes"
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_func_socket=no"
4297 fi
4298 rm -f conftest*
4299 fi
4300
4301 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4302   echo "$ac_t""yes" 1>&6
4303   :
4304 else
4305   echo "$ac_t""no" 1>&6
4306         
4307         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4308 echo "configure:4309: checking for main in -lsocket" >&5
4309 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4311   echo $ac_n "(cached) $ac_c" 1>&6
4312 else
4313   ac_save_LIBS="$LIBS"
4314 LIBS="-lsocket  $LIBS"
4315 cat > conftest.$ac_ext <<EOF
4316 #line 4317 "configure"
4317 #include "confdefs.h"
4318
4319 int main() {
4320 main()
4321 ; return 0; }
4322 EOF
4323 if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4324   rm -rf conftest*
4325   eval "ac_cv_lib_$ac_lib_var=yes"
4326 else
4327   echo "configure: failed program was:" >&5
4328   cat conftest.$ac_ext >&5
4329   rm -rf conftest*
4330   eval "ac_cv_lib_$ac_lib_var=no"
4331 fi
4332 rm -f conftest*
4333 LIBS="$ac_save_LIBS"
4334
4335 fi
4336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4337   echo "$ac_t""yes" 1>&6
4338     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4339     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4340   cat >> confdefs.h <<EOF
4341 #define $ac_tr_lib 1
4342 EOF
4343
4344   LIBS="-lsocket $LIBS"
4345
4346 else
4347   echo "$ac_t""no" 1>&6
4348 fi
4349
4350         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4351 echo "configure:4352: checking for main in -lnet" >&5
4352 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4353 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   ac_save_LIBS="$LIBS"
4357 LIBS="-lnet  $LIBS"
4358 cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361
4362 int main() {
4363 main()
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4367   rm -rf conftest*
4368   eval "ac_cv_lib_$ac_lib_var=yes"
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   eval "ac_cv_lib_$ac_lib_var=no"
4374 fi
4375 rm -f conftest*
4376 LIBS="$ac_save_LIBS"
4377
4378 fi
4379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4380   echo "$ac_t""yes" 1>&6
4381     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4382     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4383   cat >> confdefs.h <<EOF
4384 #define $ac_tr_lib 1
4385 EOF
4386
4387   LIBS="-lnet $LIBS"
4388
4389 else
4390   echo "$ac_t""no" 1>&6
4391 fi
4392
4393         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4394 echo "configure:4395: checking for socket in -lnet" >&5
4395 ac_lib_var=`echo net'_'socket | 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="-lnet  $LIBS"
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 /* Override any gcc2 internal prototype to avoid an error.  */
4405 /* We use char because int might match the return type of a gcc2
4406     builtin and then its argument prototype would still apply.  */
4407 char socket();
4408
4409 int main() {
4410 socket()
4411 ; return 0; }
4412 EOF
4413 if { (eval echo configure:4414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4414   rm -rf conftest*
4415   eval "ac_cv_lib_$ac_lib_var=yes"
4416 else
4417   echo "configure: failed program was:" >&5
4418   cat conftest.$ac_ext >&5
4419   rm -rf conftest*
4420   eval "ac_cv_lib_$ac_lib_var=no"
4421 fi
4422 rm -f conftest*
4423 LIBS="$ac_save_LIBS"
4424
4425 fi
4426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4427   echo "$ac_t""yes" 1>&6
4428     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4429     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4430   cat >> confdefs.h <<EOF
4431 #define $ac_tr_lib 1
4432 EOF
4433
4434   LIBS="-lnet $LIBS"
4435
4436 else
4437   echo "$ac_t""no" 1>&6
4438 fi
4439
4440         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4441 echo "configure:4442: checking for main in -lnsl_s" >&5
4442 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4443 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4444   echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4446   ac_save_LIBS="$LIBS"
4447 LIBS="-lnsl_s  $LIBS"
4448 cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451
4452 int main() {
4453 main()
4454 ; return 0; }
4455 EOF
4456 if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4457   rm -rf conftest*
4458   eval "ac_cv_lib_$ac_lib_var=yes"
4459 else
4460   echo "configure: failed program was:" >&5
4461   cat conftest.$ac_ext >&5
4462   rm -rf conftest*
4463   eval "ac_cv_lib_$ac_lib_var=no"
4464 fi
4465 rm -f conftest*
4466 LIBS="$ac_save_LIBS"
4467
4468 fi
4469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4470   echo "$ac_t""yes" 1>&6
4471     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4472     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4473   cat >> confdefs.h <<EOF
4474 #define $ac_tr_lib 1
4475 EOF
4476
4477   LIBS="-lnsl_s $LIBS"
4478
4479 else
4480   echo "$ac_t""no" 1>&6
4481 fi
4482
4483         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4484 echo "configure:4485: checking for main in -lnsl" >&5
4485 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   ac_save_LIBS="$LIBS"
4490 LIBS="-lnsl  $LIBS"
4491 cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494
4495 int main() {
4496 main()
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 nsl | 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="-lnsl $LIBS"
4521
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525
4526         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4527 echo "configure:4528: checking for socket in -linet" >&5
4528 ac_lib_var=`echo inet'_'socket | 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="-linet  $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* Override any gcc2 internal prototype to avoid an error.  */
4538 /* We use char because int might match the return type of a gcc2
4539     builtin and then its argument prototype would still apply.  */
4540 char socket();
4541
4542 int main() {
4543 socket()
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547   rm -rf conftest*
4548   eval "ac_cv_lib_$ac_lib_var=yes"
4549 else
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   eval "ac_cv_lib_$ac_lib_var=no"
4554 fi
4555 rm -f conftest*
4556 LIBS="$ac_save_LIBS"
4557
4558 fi
4559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4560   echo "$ac_t""yes" 1>&6
4561     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4562     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4563   cat >> confdefs.h <<EOF
4564 #define $ac_tr_lib 1
4565 EOF
4566
4567   LIBS="-linet $LIBS"
4568
4569 else
4570   echo "$ac_t""no" 1>&6
4571 fi
4572
4573         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4574 echo "configure:4575: checking for main in -lgen" >&5
4575 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4577   echo $ac_n "(cached) $ac_c" 1>&6
4578 else
4579   ac_save_LIBS="$LIBS"
4580 LIBS="-lgen  $LIBS"
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584
4585 int main() {
4586 main()
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   eval "ac_cv_lib_$ac_lib_var=yes"
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   eval "ac_cv_lib_$ac_lib_var=no"
4597 fi
4598 rm -f conftest*
4599 LIBS="$ac_save_LIBS"
4600
4601 fi
4602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4603   echo "$ac_t""yes" 1>&6
4604     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4605     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4606   cat >> confdefs.h <<EOF
4607 #define $ac_tr_lib 1
4608 EOF
4609
4610   LIBS="-lgen $LIBS"
4611
4612 else
4613   echo "$ac_t""no" 1>&6
4614 fi
4615
4616
4617 fi
4618
4619
4620 echo $ac_n "checking for select""... $ac_c" 1>&6
4621 echo "configure:4622: checking for select" >&5
4622 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   cat > conftest.$ac_ext <<EOF
4626 #line 4627 "configure"
4627 #include "confdefs.h"
4628 /* System header to define __stub macros and hopefully few prototypes,
4629     which can conflict with char select(); below.  */
4630 #include <assert.h>
4631 /* Override any gcc2 internal prototype to avoid an error.  */
4632 /* We use char because int might match the return type of a gcc2
4633     builtin and then its argument prototype would still apply.  */
4634 char select();
4635 char (*f)();
4636
4637 int main() {
4638
4639 /* The GNU C library defines this for functions which it implements
4640     to always fail with ENOSYS.  Some functions are actually named
4641     something starting with __ and the normal name is an alias.  */
4642 #if defined (__stub_select) || defined (__stub___select)
4643 choke me
4644 #else
4645 f = select;
4646 #endif
4647
4648 ; return 0; }
4649 EOF
4650 if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4651   rm -rf conftest*
4652   eval "ac_cv_func_select=yes"
4653 else
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   eval "ac_cv_func_select=no"
4658 fi
4659 rm -f conftest*
4660 fi
4661
4662 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664   :
4665 else
4666   echo "$ac_t""no" 1>&6
4667 { echo "configure: error: select() required." 1>&2; exit 1; }
4668 fi
4669
4670
4671 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4672 echo "configure:4673: checking types of arguments for select()" >&5
4673  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4674   echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4683      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4684       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4685        cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 #ifdef HAVE_SYS_TYPES_H
4689 #include <sys/types.h>
4690 #endif
4691 #ifdef HAVE_SYS_TIME_H
4692 #include <sys/time.h>
4693 #endif
4694 #ifdef HAVE_SYS_SELECT_H
4695 #include <sys/select.h>
4696 #endif
4697 #ifdef HAVE_SYS_SOCKET_H
4698 #include <sys/socket.h>
4699 #endif
4700 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);
4701 int main() {
4702
4703 ; return 0; }
4704 EOF
4705 if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4706   rm -rf conftest*
4707           ac_not_found=no ; break 3
4708 else
4709   echo "configure: failed program was:" >&5
4710   cat conftest.$ac_ext >&5
4711   rm -rf conftest*
4712   ac_not_found=yes
4713 fi
4714 rm -f conftest*
4715       done
4716      done
4717     done
4718    
4719 fi
4720   
4721 fi
4722  
4723 fi
4724  if test "$ac_not_found" = yes; then
4725   ac_cv_func_select_arg1=int 
4726   ac_cv_func_select_arg234='int *' 
4727   ac_cv_func_select_arg5='struct timeval *'
4728  fi
4729  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4730  cat >> confdefs.h <<EOF
4731 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4732 EOF
4733
4734  cat >> confdefs.h <<EOF
4735 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4736 EOF
4737
4738  cat >> confdefs.h <<EOF
4739 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4740 EOF
4741
4742
4743
4744
4745 for ac_hdr in regex.h 
4746 do
4747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4749 echo "configure:4750: checking for $ac_hdr" >&5
4750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4751   echo $ac_n "(cached) $ac_c" 1>&6
4752 else
4753   cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756 #include <$ac_hdr>
4757 EOF
4758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4759 { (eval echo configure:4760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4761 if test -z "$ac_err"; then
4762   rm -rf conftest*
4763   eval "ac_cv_header_$ac_safe=yes"
4764 else
4765   echo "$ac_err" >&5
4766   echo "configure: failed program was:" >&5
4767   cat conftest.$ac_ext >&5
4768   rm -rf conftest*
4769   eval "ac_cv_header_$ac_safe=no"
4770 fi
4771 rm -f conftest*
4772 fi
4773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4774   echo "$ac_t""yes" 1>&6
4775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4776   cat >> confdefs.h <<EOF
4777 #define $ac_tr_hdr 1
4778 EOF
4779  
4780 else
4781   echo "$ac_t""no" 1>&6
4782 fi
4783 done
4784
4785 if test "$ac_cv_header_regex_h" != yes ; then
4786         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4787 fi
4788 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4789 echo "configure:4790: checking for regfree" >&5
4790 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4791   echo $ac_n "(cached) $ac_c" 1>&6
4792 else
4793   cat > conftest.$ac_ext <<EOF
4794 #line 4795 "configure"
4795 #include "confdefs.h"
4796 /* System header to define __stub macros and hopefully few prototypes,
4797     which can conflict with char regfree(); below.  */
4798 #include <assert.h>
4799 /* Override any gcc2 internal prototype to avoid an error.  */
4800 /* We use char because int might match the return type of a gcc2
4801     builtin and then its argument prototype would still apply.  */
4802 char regfree();
4803 char (*f)();
4804
4805 int main() {
4806
4807 /* The GNU C library defines this for functions which it implements
4808     to always fail with ENOSYS.  Some functions are actually named
4809     something starting with __ and the normal name is an alias.  */
4810 #if defined (__stub_regfree) || defined (__stub___regfree)
4811 choke me
4812 #else
4813 f = regfree;
4814 #endif
4815
4816 ; return 0; }
4817 EOF
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4819   rm -rf conftest*
4820   eval "ac_cv_func_regfree=yes"
4821 else
4822   echo "configure: failed program was:" >&5
4823   cat conftest.$ac_ext >&5
4824   rm -rf conftest*
4825   eval "ac_cv_func_regfree=no"
4826 fi
4827 rm -f conftest*
4828 fi
4829
4830 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4831   echo "$ac_t""yes" 1>&6
4832   :
4833 else
4834   echo "$ac_t""no" 1>&6
4835 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4836 fi
4837
4838
4839
4840 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4841 echo "configure:4842: checking for compatible POSIX regex" >&5
4842 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   
4846         if test "$cross_compiling" = yes; then
4847   ol_cv_c_posix_regex=cross
4848 else
4849   cat > conftest.$ac_ext <<EOF
4850 #line 4851 "configure"
4851 #include "confdefs.h"
4852
4853 #include <sys/types.h>
4854 #include <regex.h>
4855 static char *pattern, *string;
4856 main()
4857 {
4858         int rc;
4859         regex_t re;
4860
4861         pattern = "^A";
4862
4863         if(regcomp(&re, pattern, 0)) {
4864                 return -1;
4865         }
4866         
4867         string = "ALL MATCH";
4868         
4869         rc = regexec(&re, string, 0, (void*)0, 0);
4870
4871         regfree(&re);
4872
4873         return rc;
4874 }
4875 EOF
4876 if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4877 then
4878   ol_cv_c_posix_regex=yes
4879 else
4880   echo "configure: failed program was:" >&5
4881   cat conftest.$ac_ext >&5
4882   rm -fr conftest*
4883   ol_cv_c_posix_regex=no
4884 fi
4885 rm -fr conftest*
4886 fi
4887
4888 fi
4889
4890 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4891
4892 if test "$ol_cv_c_posix_regex" = no ; then
4893         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4894 fi
4895
4896
4897 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4898 echo "configure:4899: checking for sigset in -lV3" >&5
4899 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4900 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   ac_save_LIBS="$LIBS"
4904 LIBS="-lV3  $LIBS"
4905 cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 /* Override any gcc2 internal prototype to avoid an error.  */
4909 /* We use char because int might match the return type of a gcc2
4910     builtin and then its argument prototype would still apply.  */
4911 char sigset();
4912
4913 int main() {
4914 sigset()
4915 ; return 0; }
4916 EOF
4917 if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4918   rm -rf conftest*
4919   eval "ac_cv_lib_$ac_lib_var=yes"
4920 else
4921   echo "configure: failed program was:" >&5
4922   cat conftest.$ac_ext >&5
4923   rm -rf conftest*
4924   eval "ac_cv_lib_$ac_lib_var=no"
4925 fi
4926 rm -f conftest*
4927 LIBS="$ac_save_LIBS"
4928
4929 fi
4930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4931   echo "$ac_t""yes" 1>&6
4932     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4933     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4934   cat >> confdefs.h <<EOF
4935 #define $ac_tr_lib 1
4936 EOF
4937
4938   LIBS="-lV3 $LIBS"
4939
4940 else
4941   echo "$ac_t""no" 1>&6
4942 fi
4943
4944
4945
4946 # find res_search
4947 if test $ol_enable_dns != no ; then
4948                 echo $ac_n "checking for res_search""... $ac_c" 1>&6
4949 echo "configure:4950: checking for res_search" >&5
4950 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
4951   echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953   cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 /* System header to define __stub macros and hopefully few prototypes,
4957     which can conflict with char res_search(); below.  */
4958 #include <assert.h>
4959 /* Override any gcc2 internal prototype to avoid an error.  */
4960 /* We use char because int might match the return type of a gcc2
4961     builtin and then its argument prototype would still apply.  */
4962 char res_search();
4963 char (*f)();
4964
4965 int main() {
4966
4967 /* The GNU C library defines this for functions which it implements
4968     to always fail with ENOSYS.  Some functions are actually named
4969     something starting with __ and the normal name is an alias.  */
4970 #if defined (__stub_res_search) || defined (__stub___res_search)
4971 choke me
4972 #else
4973 f = res_search;
4974 #endif
4975
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4979   rm -rf conftest*
4980   eval "ac_cv_func_res_search=yes"
4981 else
4982   echo "configure: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984   rm -rf conftest*
4985   eval "ac_cv_func_res_search=no"
4986 fi
4987 rm -f conftest*
4988 fi
4989
4990 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
4991   echo "$ac_t""yes" 1>&6
4992   :
4993 else
4994   echo "$ac_t""no" 1>&6
4995 fi
4996
4997         if test $ac_cv_func_res_search = no ; then 
4998                 echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
4999 echo "configure:5000: checking for res_search in -lbind" >&5
5000 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   ac_save_LIBS="$LIBS"
5005 LIBS="-lbind  $LIBS"
5006 cat > conftest.$ac_ext <<EOF
5007 #line 5008 "configure"
5008 #include "confdefs.h"
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 /* We use char because int might match the return type of a gcc2
5011     builtin and then its argument prototype would still apply.  */
5012 char res_search();
5013
5014 int main() {
5015 res_search()
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_lib_$ac_lib_var=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=no"
5026 fi
5027 rm -f conftest*
5028 LIBS="$ac_save_LIBS"
5029
5030 fi
5031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5032   echo "$ac_t""yes" 1>&6
5033     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5035   cat >> confdefs.h <<EOF
5036 #define $ac_tr_lib 1
5037 EOF
5038
5039   LIBS="-lbind $LIBS"
5040
5041 else
5042   echo "$ac_t""no" 1>&6
5043 fi
5044
5045                 ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5046         fi
5047         if test $ac_cv_func_res_search = no ; then 
5048                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5049 echo "configure:5050: checking for res_search in -lresolv" >&5
5050 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5052   echo $ac_n "(cached) $ac_c" 1>&6
5053 else
5054   ac_save_LIBS="$LIBS"
5055 LIBS="-lresolv  $LIBS"
5056 cat > conftest.$ac_ext <<EOF
5057 #line 5058 "configure"
5058 #include "confdefs.h"
5059 /* Override any gcc2 internal prototype to avoid an error.  */
5060 /* We use char because int might match the return type of a gcc2
5061     builtin and then its argument prototype would still apply.  */
5062 char res_search();
5063
5064 int main() {
5065 res_search()
5066 ; return 0; }
5067 EOF
5068 if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=yes"
5071 else
5072   echo "configure: failed program was:" >&5
5073   cat conftest.$ac_ext >&5
5074   rm -rf conftest*
5075   eval "ac_cv_lib_$ac_lib_var=no"
5076 fi
5077 rm -f conftest*
5078 LIBS="$ac_save_LIBS"
5079
5080 fi
5081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5082   echo "$ac_t""yes" 1>&6
5083     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5084     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5085   cat >> confdefs.h <<EOF
5086 #define $ac_tr_lib 1
5087 EOF
5088
5089   LIBS="-lresolv $LIBS"
5090
5091 else
5092   echo "$ac_t""no" 1>&6
5093 fi
5094
5095                 ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5096         fi
5097
5098         if test "$ac_cv_func_res_search" = yes ; then
5099                 cat >> confdefs.h <<\EOF
5100 #define HAVE_RES_SEARCH 1
5101 EOF
5102
5103         elif test $ol_enable_dns = yes ; then
5104                 { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5105         else
5106                 echo "configure: warning: no res_search, disabling DNS support" 1>&2
5107         fi
5108 fi
5109
5110
5111 # ISODE tests
5112 ol_link_isode=no
5113 if test $ol_enable_ldapd != no ; then
5114         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5115
5116                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5117 echo "configure:5118: checking for main in -lxtpp" >&5
5118 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122   ac_save_LIBS="$LIBS"
5123 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127
5128 int main() {
5129 main()
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_lib_$ac_lib_var=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_lib_$ac_lib_var=no"
5140 fi
5141 rm -f conftest*
5142 LIBS="$ac_save_LIBS"
5143
5144 fi
5145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5146   echo "$ac_t""yes" 1>&6
5147   
5148                 ol_link_isode=yes
5149                 cat >> confdefs.h <<\EOF
5150 #define HAVE_XTPP 1
5151 EOF
5152
5153                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5154                 
5155 else
5156   echo "$ac_t""no" 1>&6
5157 :
5158 fi
5159
5160         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5161 echo "configure:5162: checking for main in -ldsap" >&5
5162 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5164   echo $ac_n "(cached) $ac_c" 1>&6
5165 else
5166   ac_save_LIBS="$LIBS"
5167 LIBS="-ldsap -lisode $LIBS"
5168 cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171
5172 int main() {
5173 main()
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5177   rm -rf conftest*
5178   eval "ac_cv_lib_$ac_lib_var=yes"
5179 else
5180   echo "configure: failed program was:" >&5
5181   cat conftest.$ac_ext >&5
5182   rm -rf conftest*
5183   eval "ac_cv_lib_$ac_lib_var=no"
5184 fi
5185 rm -f conftest*
5186 LIBS="$ac_save_LIBS"
5187
5188 fi
5189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5190   echo "$ac_t""yes" 1>&6
5191   
5192                 ol_link_isode=yes
5193                 cat >> confdefs.h <<\EOF
5194 #define HAVE_DSAP 1
5195 EOF
5196
5197                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5198                 
5199 else
5200   echo "$ac_t""no" 1>&6
5201 :
5202 fi
5203
5204         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5205 echo "configure:5206: checking for main in -lisode" >&5
5206 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5208   echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210   ac_save_LIBS="$LIBS"
5211 LIBS="-lisode  $LIBS"
5212 cat > conftest.$ac_ext <<EOF
5213 #line 5214 "configure"
5214 #include "confdefs.h"
5215
5216 int main() {
5217 main()
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_lib_$ac_lib_var=no"
5228 fi
5229 rm -f conftest*
5230 LIBS="$ac_save_LIBS"
5231
5232 fi
5233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5234   echo "$ac_t""yes" 1>&6
5235   
5236                 ol_link_isode=yes
5237                 cat >> confdefs.h <<\EOF
5238 #define HAVE_ISODE 1
5239 EOF
5240
5241                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5242                 
5243 else
5244   echo "$ac_t""no" 1>&6
5245 :
5246 fi
5247
5248 fi
5249
5250 if test $ol_link_isode != no; then
5251         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5252 echo "configure:5253: checking for main in -lpp" >&5
5253 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5255   echo $ac_n "(cached) $ac_c" 1>&6
5256 else
5257   ac_save_LIBS="$LIBS"
5258 LIBS="-lpp  $LIBS"
5259 cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262
5263 int main() {
5264 main()
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5268   rm -rf conftest*
5269   eval "ac_cv_lib_$ac_lib_var=yes"
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273   rm -rf conftest*
5274   eval "ac_cv_lib_$ac_lib_var=no"
5275 fi
5276 rm -f conftest*
5277 LIBS="$ac_save_LIBS"
5278
5279 fi
5280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5281   echo "$ac_t""yes" 1>&6
5282   
5283                 cat >> confdefs.h <<\EOF
5284 #define HAVE_PP 1
5285 EOF
5286
5287                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5288                 
5289 else
5290   echo "$ac_t""no" 1>&6
5291 :
5292 fi
5293
5294
5295         # Extract the first word of "pepsy", so it can be a program name with args.
5296 set dummy pepsy; ac_word=$2
5297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5298 echo "configure:5299: checking for $ac_word" >&5
5299 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   case "$PEPSY" in
5303   /*)
5304   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5305   ;;
5306   ?:/*)                  
5307   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5308   ;;
5309   *)
5310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5311   ac_dummy="$PATH"
5312   for ac_dir in $ac_dummy; do 
5313     test -z "$ac_dir" && ac_dir=.
5314     if test -f $ac_dir/$ac_word; then
5315       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5316       break
5317     fi
5318   done
5319   IFS="$ac_save_ifs"
5320   ;;
5321 esac
5322 fi
5323 PEPSY="$ac_cv_path_PEPSY"
5324 if test -n "$PEPSY"; then
5325   echo "$ac_t""$PEPSY" 1>&6
5326 else
5327   echo "$ac_t""no" 1>&6
5328 fi
5329
5330 fi
5331
5332 ol_link_kerberos=no
5333
5334 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5335         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5336 do
5337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5339 echo "configure:5340: checking for $ac_hdr" >&5
5340 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5341   echo $ac_n "(cached) $ac_c" 1>&6
5342 else
5343   cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5346 #include <$ac_hdr>
5347 EOF
5348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5349 { (eval echo configure:5350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5351 if test -z "$ac_err"; then
5352   rm -rf conftest*
5353   eval "ac_cv_header_$ac_safe=yes"
5354 else
5355   echo "$ac_err" >&5
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -rf conftest*
5359   eval "ac_cv_header_$ac_safe=no"
5360 fi
5361 rm -f conftest*
5362 fi
5363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5364   echo "$ac_t""yes" 1>&6
5365     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5366   cat >> confdefs.h <<EOF
5367 #define $ac_tr_hdr 1
5368 EOF
5369  
5370 else
5371   echo "$ac_t""no" 1>&6
5372 fi
5373 done
5374
5375
5376         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5377                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5378 echo "configure:5379: checking for main in -lkrb4" >&5
5379 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5381   echo $ac_n "(cached) $ac_c" 1>&6
5382 else
5383   ac_save_LIBS="$LIBS"
5384 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5385 cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388
5389 int main() {
5390 main()
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394   rm -rf conftest*
5395   eval "ac_cv_lib_$ac_lib_var=yes"
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=no"
5401 fi
5402 rm -f conftest*
5403 LIBS="$ac_save_LIBS"
5404
5405 fi
5406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5407   echo "$ac_t""yes" 1>&6
5408   have_k5=yes
5409 else
5410   echo "$ac_t""no" 1>&6
5411 have_k5=no
5412 fi
5413
5414
5415                 if test $have_k5 = yes ; then
5416                         ol_with_kerberos=found
5417                         ol_link_kerberos=yes
5418
5419                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5420
5421                         LIBS="$KRB_LIBS $LIBS"
5422
5423                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5424 echo "configure:5425: checking for des_debug in Kerberos libraries" >&5
5425 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5426   echo $ac_n "(cached) $ac_c" 1>&6
5427 else
5428   
5429                                                                 save_LIBS="$LIBS"
5430                                 LIBS="$KRB_LIBS $LIBS"
5431                                 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434
5435 #include <kerberosIV/krb.h>
5436 #include <kerberosIV/des.h>
5437 extern int des_debug;
5438
5439 int main() {
5440
5441 des_debug = 1;
5442
5443 ; return 0; }
5444 EOF
5445 if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5446   rm -rf conftest*
5447   ol_cv_var_des_debug=yes
5448 else
5449   echo "configure: failed program was:" >&5
5450   cat conftest.$ac_ext >&5
5451   rm -rf conftest*
5452   ol_cv_var_des_debug=no
5453 fi
5454 rm -f conftest*
5455                                                                 LIBS="$save_LIBS"
5456                         
5457 fi
5458
5459 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5460
5461                         if test $ol_cv_var_des_debug = yes ; then
5462                                 cat >> confdefs.h <<\EOF
5463 #define HAVE_DES_DEBUG 1
5464 EOF
5465
5466                         fi
5467
5468                         LIBS="$save_LIBS"
5469                 fi
5470         fi
5471 fi
5472
5473 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5474         for ac_hdr in krb.h des.h
5475 do
5476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5478 echo "configure:5479: checking for $ac_hdr" >&5
5479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5480   echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482   cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 #include <$ac_hdr>
5486 EOF
5487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5488 { (eval echo configure:5489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5490 if test -z "$ac_err"; then
5491   rm -rf conftest*
5492   eval "ac_cv_header_$ac_safe=yes"
5493 else
5494   echo "$ac_err" >&5
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_header_$ac_safe=no"
5499 fi
5500 rm -f conftest*
5501 fi
5502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5505   cat >> confdefs.h <<EOF
5506 #define $ac_tr_hdr 1
5507 EOF
5508  
5509 else
5510   echo "$ac_t""no" 1>&6
5511 fi
5512 done
5513
5514
5515         if test $ac_cv_header_krb_h = yes ; then
5516                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5517 echo "configure:5518: checking for main in -lkrb" >&5
5518 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5519 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5520   echo $ac_n "(cached) $ac_c" 1>&6
5521 else
5522   ac_save_LIBS="$LIBS"
5523 LIBS="-lkrb -ldes $LIBS"
5524 cat > conftest.$ac_ext <<EOF
5525 #line 5526 "configure"
5526 #include "confdefs.h"
5527
5528 int main() {
5529 main()
5530 ; return 0; }
5531 EOF
5532 if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533   rm -rf conftest*
5534   eval "ac_cv_lib_$ac_lib_var=yes"
5535 else
5536   echo "configure: failed program was:" >&5
5537   cat conftest.$ac_ext >&5
5538   rm -rf conftest*
5539   eval "ac_cv_lib_$ac_lib_var=no"
5540 fi
5541 rm -f conftest*
5542 LIBS="$ac_save_LIBS"
5543
5544 fi
5545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5546   echo "$ac_t""yes" 1>&6
5547   have_k4=yes
5548 else
5549   echo "$ac_t""no" 1>&6
5550 have_k4=no
5551 fi
5552
5553
5554                 if test $have_k4 = yes ; then
5555                         ol_with_kerberos=found
5556                         ol_link_kerberos=yes
5557
5558                         KRB_LIBS="-lkrb -ldes"
5559                 fi
5560         fi
5561 fi
5562
5563 if test $ol_link_kerberos = yes ; then
5564         cat >> confdefs.h <<\EOF
5565 #define HAVE_KERBEROS 1
5566 EOF
5567
5568 fi
5569
5570 ol_link_tls=no
5571 if test $ol_with_tls != no ; then
5572         
5573         for ac_hdr in openssl/ssl.h ssl.h
5574 do
5575 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5576 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5577 echo "configure:5578: checking for $ac_hdr" >&5
5578 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5579   echo $ac_n "(cached) $ac_c" 1>&6
5580 else
5581   cat > conftest.$ac_ext <<EOF
5582 #line 5583 "configure"
5583 #include "confdefs.h"
5584 #include <$ac_hdr>
5585 EOF
5586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5587 { (eval echo configure:5588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5589 if test -z "$ac_err"; then
5590   rm -rf conftest*
5591   eval "ac_cv_header_$ac_safe=yes"
5592 else
5593   echo "$ac_err" >&5
5594   echo "configure: failed program was:" >&5
5595   cat conftest.$ac_ext >&5
5596   rm -rf conftest*
5597   eval "ac_cv_header_$ac_safe=no"
5598 fi
5599 rm -f conftest*
5600 fi
5601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5602   echo "$ac_t""yes" 1>&6
5603     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5604   cat >> confdefs.h <<EOF
5605 #define $ac_tr_hdr 1
5606 EOF
5607  
5608 else
5609   echo "$ac_t""no" 1>&6
5610 fi
5611 done
5612
5613         
5614         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5615                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5616 echo "configure:5617: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5617 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5618 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5619   echo $ac_n "(cached) $ac_c" 1>&6
5620 else
5621   ac_save_LIBS="$LIBS"
5622 LIBS="-lssl -lcrypto $LIBS"
5623 cat > conftest.$ac_ext <<EOF
5624 #line 5625 "configure"
5625 #include "confdefs.h"
5626 /* Override any gcc2 internal prototype to avoid an error.  */
5627 /* We use char because int might match the return type of a gcc2
5628     builtin and then its argument prototype would still apply.  */
5629 char SSLeay_add_ssl_algorithms();
5630
5631 int main() {
5632 SSLeay_add_ssl_algorithms()
5633 ; return 0; }
5634 EOF
5635 if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5636   rm -rf conftest*
5637   eval "ac_cv_lib_$ac_lib_var=yes"
5638 else
5639   echo "configure: failed program was:" >&5
5640   cat conftest.$ac_ext >&5
5641   rm -rf conftest*
5642   eval "ac_cv_lib_$ac_lib_var=no"
5643 fi
5644 rm -f conftest*
5645 LIBS="$ac_save_LIBS"
5646
5647 fi
5648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5649   echo "$ac_t""yes" 1>&6
5650   have_ssleay=yes
5651                         need_rsaref=no
5652 else
5653   echo "$ac_t""no" 1>&6
5654 have_ssleay=no
5655 fi
5656
5657                         
5658                 if test $have_ssleay = no ; then
5659                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5660 echo "configure:5661: checking for SSL_library_init in -lssl" >&5
5661 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   ac_save_LIBS="$LIBS"
5666 LIBS="-lssl -lcrypto $LIBS"
5667 cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 /* We use char because int might match the return type of a gcc2
5672     builtin and then its argument prototype would still apply.  */
5673 char SSL_library_init();
5674
5675 int main() {
5676 SSL_library_init()
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   eval "ac_cv_lib_$ac_lib_var=yes"
5682 else
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   eval "ac_cv_lib_$ac_lib_var=no"
5687 fi
5688 rm -f conftest*
5689 LIBS="$ac_save_LIBS"
5690
5691 fi
5692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5693   echo "$ac_t""yes" 1>&6
5694   have_ssleay=yes
5695                                 need_rsaref=no
5696 else
5697   echo "$ac_t""no" 1>&6
5698 have_ssleay=no
5699 fi
5700
5701                 fi
5702
5703                 if test $have_ssleay = no ; then
5704                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5705 echo "configure:5706: checking for ssl3_accept in -lssl" >&5
5706 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5708   echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710   ac_save_LIBS="$LIBS"
5711 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5712 cat > conftest.$ac_ext <<EOF
5713 #line 5714 "configure"
5714 #include "confdefs.h"
5715 /* Override any gcc2 internal prototype to avoid an error.  */
5716 /* We use char because int might match the return type of a gcc2
5717     builtin and then its argument prototype would still apply.  */
5718 char ssl3_accept();
5719
5720 int main() {
5721 ssl3_accept()
5722 ; return 0; }
5723 EOF
5724 if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5725   rm -rf conftest*
5726   eval "ac_cv_lib_$ac_lib_var=yes"
5727 else
5728   echo "configure: failed program was:" >&5
5729   cat conftest.$ac_ext >&5
5730   rm -rf conftest*
5731   eval "ac_cv_lib_$ac_lib_var=no"
5732 fi
5733 rm -f conftest*
5734 LIBS="$ac_save_LIBS"
5735
5736 fi
5737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5738   echo "$ac_t""yes" 1>&6
5739   have_ssleay=yes
5740                                 need_rsaref=yes
5741 else
5742   echo "$ac_t""no" 1>&6
5743 have_ssleay=no
5744 fi
5745
5746                 fi
5747
5748                 if test $have_ssleay = yes ; then
5749                         ol_with_tls=found
5750                         ol_link_tls=yes
5751
5752                         cat >> confdefs.h <<\EOF
5753 #define HAVE_SSLEAY 1
5754 EOF
5755
5756
5757                         if test $need_rsaref = yes; then
5758                                 cat >> confdefs.h <<\EOF
5759 #define HAVE_RSAREF 1
5760 EOF
5761
5762
5763                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5764                         else
5765                                 TLS_LIBS="-lssl -lcrypto"
5766                         fi
5767                 fi
5768         fi
5769 fi
5770
5771 if test $ol_link_tls = yes ; then
5772         cat >> confdefs.h <<\EOF
5773 #define HAVE_TLS 1
5774 EOF
5775
5776 fi      
5777
5778 for ac_func in \
5779         ctime_r                 \
5780         gethostbyname_r gethostbyaddr_r \
5781
5782 do
5783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5784 echo "configure:5785: checking for $ac_func" >&5
5785 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5786   echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788   cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 /* System header to define __stub macros and hopefully few prototypes,
5792     which can conflict with char $ac_func(); below.  */
5793 #include <assert.h>
5794 /* Override any gcc2 internal prototype to avoid an error.  */
5795 /* We use char because int might match the return type of a gcc2
5796     builtin and then its argument prototype would still apply.  */
5797 char $ac_func();
5798 char (*f)();
5799
5800 int main() {
5801
5802 /* The GNU C library defines this for functions which it implements
5803     to always fail with ENOSYS.  Some functions are actually named
5804     something starting with __ and the normal name is an alias.  */
5805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5806 choke me
5807 #else
5808 f = $ac_func;
5809 #endif
5810
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5814   rm -rf conftest*
5815   eval "ac_cv_func_$ac_func=yes"
5816 else
5817   echo "configure: failed program was:" >&5
5818   cat conftest.$ac_ext >&5
5819   rm -rf conftest*
5820   eval "ac_cv_func_$ac_func=no"
5821 fi
5822 rm -f conftest*
5823 fi
5824
5825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5826   echo "$ac_t""yes" 1>&6
5827     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5828   cat >> confdefs.h <<EOF
5829 #define $ac_tr_func 1
5830 EOF
5831  
5832 else
5833   echo "$ac_t""no" 1>&6
5834 fi
5835 done
5836
5837
5838 if test "$ac_cv_func_ctime_r" = no ; then
5839         ol_cv_func_ctime_r_nargs=0
5840 else
5841         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5842 echo "configure:5843: checking number of arguments of ctime_r" >&5
5843 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 #include <time.h>
5850 int main() {
5851 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5852 ; return 0; }
5853 EOF
5854 if { (eval echo configure:5855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5855   rm -rf conftest*
5856   ol_cv_func_ctime_r_nargs=3
5857 else
5858   echo "configure: failed program was:" >&5
5859   cat conftest.$ac_ext >&5
5860   rm -rf conftest*
5861   cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 #include <time.h>
5865 int main() {
5866 time_t ti; char *buffer; ctime_r(&ti,buffer);
5867 ; return 0; }
5868 EOF
5869 if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5870   rm -rf conftest*
5871   ol_cv_func_ctime_r_nargs=2
5872 else
5873   echo "configure: failed program was:" >&5
5874   cat conftest.$ac_ext >&5
5875   rm -rf conftest*
5876   ol_cv_func_ctime_r_nargs=0
5877 fi
5878 rm -f conftest*
5879 fi
5880 rm -f conftest*
5881 fi
5882
5883 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5884   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5885     cat >> confdefs.h <<EOF
5886 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5887 EOF
5888
5889   fi
5890
5891 fi
5892
5893 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5894         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5895 echo "configure:5896: checking number of arguments of gethostbyname_r" >&5
5896 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5897   echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899   cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 #include <sys/types.h>
5903 #include <sys/socket.h>
5904 #include <netinet/in.h>
5905 #include <netdb.h>
5906 #define BUFSIZE (sizeof(struct hostent)+10)
5907 int main() {
5908 struct hostent hent; char buffer[BUFSIZE];
5909                 int bufsize=BUFSIZE;int h_errno;
5910                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5911                         buffer, bufsize, &h_errno);
5912 ; return 0; }
5913 EOF
5914 if { (eval echo configure:5915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5915   rm -rf conftest*
5916   ol_cv_func_gethostbyname_r_nargs=5
5917 else
5918   echo "configure: failed program was:" >&5
5919   cat conftest.$ac_ext >&5
5920   rm -rf conftest*
5921   cat > conftest.$ac_ext <<EOF
5922 #line 5923 "configure"
5923 #include "confdefs.h"
5924 #include <sys/types.h>
5925 #include <sys/socket.h>
5926 #include <netinet/in.h>
5927 #include <netdb.h>
5928 #define BUFSIZE (sizeof(struct hostent)+10)
5929 int main() {
5930 struct hostent hent;struct hostent *rhent;
5931                         char buffer[BUFSIZE];
5932                         int bufsize=BUFSIZE;int h_errno;
5933                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5934                                 &rhent, &h_errno);
5935 ; return 0; }
5936 EOF
5937 if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5938   rm -rf conftest*
5939   ol_cv_func_gethostbyname_r_nargs=6
5940 else
5941   echo "configure: failed program was:" >&5
5942   cat conftest.$ac_ext >&5
5943   rm -rf conftest*
5944   ol_cv_func_gethostbyname_r_nargs=0
5945 fi
5946 rm -f conftest*
5947 fi
5948 rm -f conftest*
5949 fi
5950
5951 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5952   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5953         cat >> confdefs.h <<EOF
5954 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5955 EOF
5956
5957   fi
5958
5959 else
5960         ol_cv_func_gethostbyname_r_nargs=0
5961 fi
5962  
5963 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5964         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5965 echo "configure:5966: checking number of arguments of gethostbyaddr_r" >&5
5966 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5967   echo $ac_n "(cached) $ac_c" 1>&6
5968 else
5969   cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972 #include <sys/types.h>
5973 #include <sys/socket.h>
5974 #include <netinet/in.h>
5975 #include <netdb.h>
5976 #define BUFSIZE (sizeof(struct hostent)+10)
5977 int main() {
5978 struct hostent hent; char buffer[BUFSIZE]; 
5979             struct in_addr add;
5980             size_t alen=sizeof(struct in_addr);
5981             int bufsize=BUFSIZE;int h_errno;
5982                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5983                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5984 ; return 0; }
5985 EOF
5986 if { (eval echo configure:5987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5987   rm -rf conftest*
5988   ol_cv_func_gethostbyaddr_r_nargs=7
5989 else
5990   echo "configure: failed program was:" >&5
5991   cat conftest.$ac_ext >&5
5992   rm -rf conftest*
5993   cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 #include <sys/types.h>
5997 #include <sys/socket.h>
5998 #include <netinet/in.h>
5999 #include <netdb.h>
6000 #define BUFSIZE (sizeof(struct hostent)+10)
6001 int main() {
6002 struct hostent hent;
6003                         struct hostent *rhent; char buffer[BUFSIZE]; 
6004                         struct in_addr add;
6005                         size_t alen=sizeof(struct in_addr);
6006                         int bufsize=BUFSIZE;int h_errno;
6007                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6008                                 alen, AF_INET, &hent, buffer, bufsize, 
6009                                 &rhent, &h_errno);
6010 ; return 0; }
6011 EOF
6012 if { (eval echo configure:6013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6013   rm -rf conftest*
6014   ol_cv_func_gethostbyaddr_r_nargs=8
6015 else
6016   echo "configure: failed program was:" >&5
6017   cat conftest.$ac_ext >&5
6018   rm -rf conftest*
6019   ol_cv_func_gethostbyaddr_r_nargs=0
6020 fi
6021 rm -f conftest*
6022 fi
6023 rm -f conftest*
6024 fi
6025
6026 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6027   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6028     cat >> confdefs.h <<EOF
6029 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6030 EOF
6031
6032   fi
6033
6034 else
6035         ol_cv_func_gethostbyaddr_r_nargs=0
6036 fi
6037
6038 if test "$ac_cv_func_ctime_r" = yes \
6039         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6040         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6041         -a "$ac_cv_func_gethostbyname_r" = yes \
6042         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6043         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6044         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6045         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6046         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6047         ; then
6048  
6049         cat >> confdefs.h <<\EOF
6050 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6051 EOF
6052
6053 fi
6054
6055 ol_link_threads=no
6056 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6057         -o $ol_with_threads = posix ; then
6058
6059         for ac_hdr in pthread.h sched.h
6060 do
6061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6063 echo "configure:6064: checking for $ac_hdr" >&5
6064 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6065   echo $ac_n "(cached) $ac_c" 1>&6
6066 else
6067   cat > conftest.$ac_ext <<EOF
6068 #line 6069 "configure"
6069 #include "confdefs.h"
6070 #include <$ac_hdr>
6071 EOF
6072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6073 { (eval echo configure:6074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6075 if test -z "$ac_err"; then
6076   rm -rf conftest*
6077   eval "ac_cv_header_$ac_safe=yes"
6078 else
6079   echo "$ac_err" >&5
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_header_$ac_safe=no"
6084 fi
6085 rm -f conftest*
6086 fi
6087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6088   echo "$ac_t""yes" 1>&6
6089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6090   cat >> confdefs.h <<EOF
6091 #define $ac_tr_hdr 1
6092 EOF
6093  
6094 else
6095   echo "$ac_t""no" 1>&6
6096 fi
6097 done
6098
6099
6100         if test $ac_cv_header_pthread_h = yes ; then
6101                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6102 echo "configure:6103: checking POSIX thread version" >&5
6103 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6104   echo $ac_n "(cached) $ac_c" 1>&6
6105 else
6106   
6107         cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110
6111 #               include <pthread.h>
6112                 /* this check could be improved */
6113 #               ifdef PTHREAD_ONCE_INIT
6114                         pthread_version_final
6115 #               endif
6116         
6117 EOF
6118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6119   egrep "pthread_version_final" >/dev/null 2>&1; then
6120   rm -rf conftest*
6121   ol_pthread_final=yes
6122 else
6123   rm -rf conftest*
6124   ol_pthread_final=no
6125 fi
6126 rm -f conftest*
6127
6128
6129         cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132
6133 #               include <pthread.h>
6134                 /* this check could be improved */
6135 #               ifdef pthread_once_init
6136                         pthread_version_draft4
6137 #               endif
6138         
6139 EOF
6140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6141   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6142   rm -rf conftest*
6143   ol_pthread_draft4=yes
6144 else
6145   rm -rf conftest*
6146   ol_pthread_draft4=no
6147 fi
6148 rm -f conftest*
6149
6150
6151         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6152                 ol_cv_pthread_version=final
6153         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6154                 ol_cv_pthread_version=draft4
6155         else
6156                 ol_cv_pthread_version=unknown
6157         fi
6158
6159 fi
6160
6161 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6162
6163
6164                 if test $ol_cv_pthread_version = final ; then
6165                         cat >> confdefs.h <<\EOF
6166 #define HAVE_PTHREADS_FINAL 1
6167 EOF
6168
6169                 elif test $ol_cv_pthread_version = draft4 ; then
6170                         cat >> confdefs.h <<\EOF
6171 #define HAVE_PTHREADS_D4 1
6172 EOF
6173
6174                 else
6175                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6176                 fi
6177
6178                 # consider threads found
6179                 ol_with_threads=found
6180
6181                 
6182         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6183 echo "configure:6184: checking for LinuxThreads pthread.h" >&5
6184 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6185   echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187   cat > conftest.$ac_ext <<EOF
6188 #line 6189 "configure"
6189 #include "confdefs.h"
6190 #include <pthread.h>
6191 EOF
6192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6193   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6194   rm -rf conftest*
6195   ol_cv_header_linux_threads=yes
6196 else
6197   rm -rf conftest*
6198   ol_cv_header_linux_threads=no
6199 fi
6200 rm -f conftest*
6201
6202                 
6203 fi
6204
6205 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6206         if test $ol_cv_header_linux_threads = yes; then
6207                 cat >> confdefs.h <<\EOF
6208 #define HAVE_LINUX_THREADS 1
6209 EOF
6210
6211         fi
6212
6213
6214                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6215                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6216 echo "configure:6217: checking for pthread_create in default libraries" >&5
6217 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   
6221                 if test "$cross_compiling" = yes; then
6222                         ol_cv_pthread_create=yes
6223 else
6224   cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227
6228 #include <pthread.h>
6229 #ifndef NULL
6230 #define NULL (void*)0
6231 #endif
6232
6233 static void *task(p)
6234         void *p;
6235 {
6236         return (void *) (p == NULL);
6237 }
6238
6239 int main(argc, argv)
6240         int argc;
6241         char **argv;
6242 {
6243         pthread_t t;
6244         int status;
6245
6246         /* make sure pthread_create() isn't just a stub */
6247 #if HAVE_PTHREADS_D4
6248         status = pthread_create(&t, pthread_attr_default, task, NULL);
6249 #else
6250         status = pthread_create(&t, NULL, task, NULL);
6251 #endif
6252
6253         if( status ) return status;
6254
6255         /* make sure pthread_detach() isn't just a stub */
6256 #if HAVE_PTHREADS_D4
6257         status = pthread_detach( &t );
6258 #else
6259         status = pthread_detach( t );
6260 #endif
6261
6262         return status;
6263 }
6264
6265 EOF
6266 if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6267 then
6268   ol_cv_pthread_create=yes
6269 else
6270   echo "configure: failed program was:" >&5
6271   cat conftest.$ac_ext >&5
6272   rm -fr conftest*
6273   ol_cv_pthread_create=no
6274 fi
6275 rm -fr conftest*
6276 fi
6277
6278 fi
6279
6280 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6281
6282                 if test $ol_cv_pthread_create != no ; then
6283                         ol_link_threads=posix
6284                         ol_link_pthreads=""
6285                 fi
6286                 
6287                 # Pthread try link: -mt (ol_cv_pthread_mt)
6288         if test "$ol_link_threads" = no ; then
6289                 # try -mt
6290                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
6291 echo "configure:6292: checking for pthread link with -mt" >&5
6292 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
6293   echo $ac_n "(cached) $ac_c" 1>&6
6294 else
6295   
6296                         # save the flags
6297                         ol_LIBS="$LIBS"
6298                         LIBS="-mt $LIBS"
6299
6300                         cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303
6304 #include <pthread.h>
6305 #ifndef NULL
6306 #define NULL (void*)0
6307 #endif
6308
6309 int main() {
6310
6311         pthread_t t;
6312
6313 #if HAVE_PTHREADS_D4
6314         pthread_create(&t, pthread_attr_default, NULL, NULL);
6315         pthread_detach( &t );
6316 #else
6317         pthread_create(&t, NULL, NULL, NULL);
6318         pthread_detach( t );
6319 #endif
6320 #ifdef HAVE_LINUX_THREADS
6321         pthread_kill_other_threads_np();
6322 #endif
6323
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6327   rm -rf conftest*
6328   ol_cv_pthread_mt=yes
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   ol_cv_pthread_mt=no
6334 fi
6335 rm -f conftest*
6336
6337                 # restore the LIBS
6338                 LIBS="$ol_LIBS"
6339                 
6340 fi
6341
6342 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
6343
6344                 if test $ol_cv_pthread_mt = yes ; then
6345                         ol_link_pthreads="-mt"
6346                         ol_link_threads=posix
6347                 fi
6348         fi
6349
6350                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6351         if test "$ol_link_threads" = no ; then
6352                 # try -kthread
6353                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6354 echo "configure:6355: checking for pthread link with -kthread" >&5
6355 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6356   echo $ac_n "(cached) $ac_c" 1>&6
6357 else
6358   
6359                         # save the flags
6360                         ol_LIBS="$LIBS"
6361                         LIBS="-kthread $LIBS"
6362
6363                         cat > conftest.$ac_ext <<EOF
6364 #line 6365 "configure"
6365 #include "confdefs.h"
6366
6367 #include <pthread.h>
6368 #ifndef NULL
6369 #define NULL (void*)0
6370 #endif
6371
6372 int main() {
6373
6374         pthread_t t;
6375
6376 #if HAVE_PTHREADS_D4
6377         pthread_create(&t, pthread_attr_default, NULL, NULL);
6378         pthread_detach( &t );
6379 #else
6380         pthread_create(&t, NULL, NULL, NULL);
6381         pthread_detach( t );
6382 #endif
6383 #ifdef HAVE_LINUX_THREADS
6384         pthread_kill_other_threads_np();
6385 #endif
6386
6387 ; return 0; }
6388 EOF
6389 if { (eval echo configure:6390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6390   rm -rf conftest*
6391   ol_cv_pthread_kthread=yes
6392 else
6393   echo "configure: failed program was:" >&5
6394   cat conftest.$ac_ext >&5
6395   rm -rf conftest*
6396   ol_cv_pthread_kthread=no
6397 fi
6398 rm -f conftest*
6399
6400                 # restore the LIBS
6401                 LIBS="$ol_LIBS"
6402                 
6403 fi
6404
6405 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6406
6407                 if test $ol_cv_pthread_kthread = yes ; then
6408                         ol_link_pthreads="-kthread"
6409                         ol_link_threads=posix
6410                 fi
6411         fi
6412
6413                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6414         if test "$ol_link_threads" = no ; then
6415                 # try -pthread
6416                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6417 echo "configure:6418: checking for pthread link with -pthread" >&5
6418 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6419   echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421   
6422                         # save the flags
6423                         ol_LIBS="$LIBS"
6424                         LIBS="-pthread $LIBS"
6425
6426                         cat > conftest.$ac_ext <<EOF
6427 #line 6428 "configure"
6428 #include "confdefs.h"
6429
6430 #include <pthread.h>
6431 #ifndef NULL
6432 #define NULL (void*)0
6433 #endif
6434
6435 int main() {
6436
6437         pthread_t t;
6438
6439 #if HAVE_PTHREADS_D4
6440         pthread_create(&t, pthread_attr_default, NULL, NULL);
6441         pthread_detach( &t );
6442 #else
6443         pthread_create(&t, NULL, NULL, NULL);
6444         pthread_detach( t );
6445 #endif
6446 #ifdef HAVE_LINUX_THREADS
6447         pthread_kill_other_threads_np();
6448 #endif
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_pthread=yes
6455 else
6456   echo "configure: failed program was:" >&5
6457   cat conftest.$ac_ext >&5
6458   rm -rf conftest*
6459   ol_cv_pthread_pthread=no
6460 fi
6461 rm -f conftest*
6462
6463                 # restore the LIBS
6464                 LIBS="$ol_LIBS"
6465                 
6466 fi
6467
6468 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6469
6470                 if test $ol_cv_pthread_pthread = yes ; then
6471                         ol_link_pthreads="-pthread"
6472                         ol_link_threads=posix
6473                 fi
6474         fi
6475
6476                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6477         if test "$ol_link_threads" = no ; then
6478                 # try -pthreads
6479                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6480 echo "configure:6481: checking for pthread link with -pthreads" >&5
6481 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6482   echo $ac_n "(cached) $ac_c" 1>&6
6483 else
6484   
6485                         # save the flags
6486                         ol_LIBS="$LIBS"
6487                         LIBS="-pthreads $LIBS"
6488
6489                         cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6492
6493 #include <pthread.h>
6494 #ifndef NULL
6495 #define NULL (void*)0
6496 #endif
6497
6498 int main() {
6499
6500         pthread_t t;
6501
6502 #if HAVE_PTHREADS_D4
6503         pthread_create(&t, pthread_attr_default, NULL, NULL);
6504         pthread_detach( &t );
6505 #else
6506         pthread_create(&t, NULL, NULL, NULL);
6507         pthread_detach( t );
6508 #endif
6509 #ifdef HAVE_LINUX_THREADS
6510         pthread_kill_other_threads_np();
6511 #endif
6512
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516   rm -rf conftest*
6517   ol_cv_pthread_pthreads=yes
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -rf conftest*
6522   ol_cv_pthread_pthreads=no
6523 fi
6524 rm -f conftest*
6525
6526                 # restore the LIBS
6527                 LIBS="$ol_LIBS"
6528                 
6529 fi
6530
6531 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6532
6533                 if test $ol_cv_pthread_pthreads = yes ; then
6534                         ol_link_pthreads="-pthreads"
6535                         ol_link_threads=posix
6536                 fi
6537         fi
6538
6539                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6540         if test "$ol_link_threads" = no ; then
6541                 # try -mthreads
6542                 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6543 echo "configure:6544: checking for pthread link with -mthreads" >&5
6544 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6545   echo $ac_n "(cached) $ac_c" 1>&6
6546 else
6547   
6548                         # save the flags
6549                         ol_LIBS="$LIBS"
6550                         LIBS="-mthreads $LIBS"
6551
6552                         cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555
6556 #include <pthread.h>
6557 #ifndef NULL
6558 #define NULL (void*)0
6559 #endif
6560
6561 int main() {
6562
6563         pthread_t t;
6564
6565 #if HAVE_PTHREADS_D4
6566         pthread_create(&t, pthread_attr_default, NULL, NULL);
6567         pthread_detach( &t );
6568 #else
6569         pthread_create(&t, NULL, NULL, NULL);
6570         pthread_detach( t );
6571 #endif
6572 #ifdef HAVE_LINUX_THREADS
6573         pthread_kill_other_threads_np();
6574 #endif
6575
6576 ; return 0; }
6577 EOF
6578 if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6579   rm -rf conftest*
6580   ol_cv_pthread_mthreads=yes
6581 else
6582   echo "configure: failed program was:" >&5
6583   cat conftest.$ac_ext >&5
6584   rm -rf conftest*
6585   ol_cv_pthread_mthreads=no
6586 fi
6587 rm -f conftest*
6588
6589                 # restore the LIBS
6590                 LIBS="$ol_LIBS"
6591                 
6592 fi
6593
6594 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6595
6596                 if test $ol_cv_pthread_mthreads = yes ; then
6597                         ol_link_pthreads="-mthreads"
6598                         ol_link_threads=posix
6599                 fi
6600         fi
6601
6602                 # Pthread try link: -thread (ol_cv_pthread_thread)
6603         if test "$ol_link_threads" = no ; then
6604                 # try -thread
6605                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
6606 echo "configure:6607: checking for pthread link with -thread" >&5
6607 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
6608   echo $ac_n "(cached) $ac_c" 1>&6
6609 else
6610   
6611                         # save the flags
6612                         ol_LIBS="$LIBS"
6613                         LIBS="-thread $LIBS"
6614
6615                         cat > conftest.$ac_ext <<EOF
6616 #line 6617 "configure"
6617 #include "confdefs.h"
6618
6619 #include <pthread.h>
6620 #ifndef NULL
6621 #define NULL (void*)0
6622 #endif
6623
6624 int main() {
6625
6626         pthread_t t;
6627
6628 #if HAVE_PTHREADS_D4
6629         pthread_create(&t, pthread_attr_default, NULL, NULL);
6630         pthread_detach( &t );
6631 #else
6632         pthread_create(&t, NULL, NULL, NULL);
6633         pthread_detach( t );
6634 #endif
6635 #ifdef HAVE_LINUX_THREADS
6636         pthread_kill_other_threads_np();
6637 #endif
6638
6639 ; return 0; }
6640 EOF
6641 if { (eval echo configure:6642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6642   rm -rf conftest*
6643   ol_cv_pthread_thread=yes
6644 else
6645   echo "configure: failed program was:" >&5
6646   cat conftest.$ac_ext >&5
6647   rm -rf conftest*
6648   ol_cv_pthread_thread=no
6649 fi
6650 rm -f conftest*
6651
6652                 # restore the LIBS
6653                 LIBS="$ol_LIBS"
6654                 
6655 fi
6656
6657 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
6658
6659                 if test $ol_cv_pthread_thread = yes ; then
6660                         ol_link_pthreads="-thread"
6661                         ol_link_threads=posix
6662                 fi
6663         fi
6664
6665
6666                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
6667         if test "$ol_link_threads" = no ; then
6668                 # try -lpthread -lmach -lexc -lc_r
6669                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
6670 echo "configure:6671: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
6671 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
6672   echo $ac_n "(cached) $ac_c" 1>&6
6673 else
6674   
6675                         # save the flags
6676                         ol_LIBS="$LIBS"
6677                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
6678
6679                         cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6682
6683 #include <pthread.h>
6684 #ifndef NULL
6685 #define NULL (void*)0
6686 #endif
6687
6688 int main() {
6689
6690         pthread_t t;
6691
6692 #if HAVE_PTHREADS_D4
6693         pthread_create(&t, pthread_attr_default, NULL, NULL);
6694         pthread_detach( &t );
6695 #else
6696         pthread_create(&t, NULL, NULL, NULL);
6697         pthread_detach( t );
6698 #endif
6699 #ifdef HAVE_LINUX_THREADS
6700         pthread_kill_other_threads_np();
6701 #endif
6702
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
6713 fi
6714 rm -f conftest*
6715
6716                 # restore the LIBS
6717                 LIBS="$ol_LIBS"
6718                 
6719 fi
6720
6721 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
6722
6723                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
6724                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
6725                         ol_link_threads=posix
6726                 fi
6727         fi
6728
6729                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
6730         if test "$ol_link_threads" = no ; then
6731                 # try -lpthread -lmach -lexc
6732                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
6733 echo "configure:6734: checking for pthread link with -lpthread -lmach -lexc" >&5
6734 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
6735   echo $ac_n "(cached) $ac_c" 1>&6
6736 else
6737   
6738                         # save the flags
6739                         ol_LIBS="$LIBS"
6740                         LIBS="-lpthread -lmach -lexc $LIBS"
6741
6742                         cat > conftest.$ac_ext <<EOF
6743 #line 6744 "configure"
6744 #include "confdefs.h"
6745
6746 #include <pthread.h>
6747 #ifndef NULL
6748 #define NULL (void*)0
6749 #endif
6750
6751 int main() {
6752
6753         pthread_t t;
6754
6755 #if HAVE_PTHREADS_D4
6756         pthread_create(&t, pthread_attr_default, NULL, NULL);
6757         pthread_detach( &t );
6758 #else
6759         pthread_create(&t, NULL, NULL, NULL);
6760         pthread_detach( t );
6761 #endif
6762 #ifdef HAVE_LINUX_THREADS
6763         pthread_kill_other_threads_np();
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   ol_cv_pthread_lpthread_lmach_lexc=yes
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   ol_cv_pthread_lpthread_lmach_lexc=no
6776 fi
6777 rm -f conftest*
6778
6779                 # restore the LIBS
6780                 LIBS="$ol_LIBS"
6781                 
6782 fi
6783
6784 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
6785
6786                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
6787                         ol_link_pthreads="-lpthread -lmach -lexc"
6788                         ol_link_threads=posix
6789                 fi
6790         fi
6791
6792
6793                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
6794         if test "$ol_link_threads" = no ; then
6795                 # try -lpthread -Wl,-woff,85
6796                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
6797 echo "configure:6798: checking for pthread link with -lpthread -Wl,-woff,85" >&5
6798 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
6799   echo $ac_n "(cached) $ac_c" 1>&6
6800 else
6801   
6802                         # save the flags
6803                         ol_LIBS="$LIBS"
6804                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
6805
6806                         cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809
6810 #include <pthread.h>
6811 #ifndef NULL
6812 #define NULL (void*)0
6813 #endif
6814
6815 int main() {
6816
6817         pthread_t t;
6818
6819 #if HAVE_PTHREADS_D4
6820         pthread_create(&t, pthread_attr_default, NULL, NULL);
6821         pthread_detach( &t );
6822 #else
6823         pthread_create(&t, NULL, NULL, NULL);
6824         pthread_detach( t );
6825 #endif
6826 #ifdef HAVE_LINUX_THREADS
6827         pthread_kill_other_threads_np();
6828 #endif
6829
6830 ; return 0; }
6831 EOF
6832 if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6833   rm -rf conftest*
6834   ol_cv_pthread_lib_lpthread_woff=yes
6835 else
6836   echo "configure: failed program was:" >&5
6837   cat conftest.$ac_ext >&5
6838   rm -rf conftest*
6839   ol_cv_pthread_lib_lpthread_woff=no
6840 fi
6841 rm -f conftest*
6842
6843                 # restore the LIBS
6844                 LIBS="$ol_LIBS"
6845                 
6846 fi
6847
6848 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6849
6850                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6851                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6852                         ol_link_threads=posix
6853                 fi
6854         fi
6855
6856
6857                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6858         if test "$ol_link_threads" = no ; then
6859                 # try -lpthread
6860                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6861 echo "configure:6862: checking for pthread link with -lpthread" >&5
6862 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6863   echo $ac_n "(cached) $ac_c" 1>&6
6864 else
6865   
6866                         # save the flags
6867                         ol_LIBS="$LIBS"
6868                         LIBS="-lpthread $LIBS"
6869
6870                         cat > conftest.$ac_ext <<EOF
6871 #line 6872 "configure"
6872 #include "confdefs.h"
6873
6874 #include <pthread.h>
6875 #ifndef NULL
6876 #define NULL (void*)0
6877 #endif
6878
6879 int main() {
6880
6881         pthread_t t;
6882
6883 #if HAVE_PTHREADS_D4
6884         pthread_create(&t, pthread_attr_default, NULL, NULL);
6885         pthread_detach( &t );
6886 #else
6887         pthread_create(&t, NULL, NULL, NULL);
6888         pthread_detach( t );
6889 #endif
6890 #ifdef HAVE_LINUX_THREADS
6891         pthread_kill_other_threads_np();
6892 #endif
6893
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   ol_cv_pthread_lpthread=yes
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   ol_cv_pthread_lpthread=no
6904 fi
6905 rm -f conftest*
6906
6907                 # restore the LIBS
6908                 LIBS="$ol_LIBS"
6909                 
6910 fi
6911
6912 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6913
6914                 if test $ol_cv_pthread_lpthread = yes ; then
6915                         ol_link_pthreads="-lpthread"
6916                         ol_link_threads=posix
6917                 fi
6918         fi
6919
6920                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6921         if test "$ol_link_threads" = no ; then
6922                 # try -lc_r
6923                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6924 echo "configure:6925: checking for pthread link with -lc_r" >&5
6925 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6926   echo $ac_n "(cached) $ac_c" 1>&6
6927 else
6928   
6929                         # save the flags
6930                         ol_LIBS="$LIBS"
6931                         LIBS="-lc_r $LIBS"
6932
6933                         cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936
6937 #include <pthread.h>
6938 #ifndef NULL
6939 #define NULL (void*)0
6940 #endif
6941
6942 int main() {
6943
6944         pthread_t t;
6945
6946 #if HAVE_PTHREADS_D4
6947         pthread_create(&t, pthread_attr_default, NULL, NULL);
6948         pthread_detach( &t );
6949 #else
6950         pthread_create(&t, NULL, NULL, NULL);
6951         pthread_detach( t );
6952 #endif
6953 #ifdef HAVE_LINUX_THREADS
6954         pthread_kill_other_threads_np();
6955 #endif
6956
6957 ; return 0; }
6958 EOF
6959 if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6960   rm -rf conftest*
6961   ol_cv_pthread_lc_r=yes
6962 else
6963   echo "configure: failed program was:" >&5
6964   cat conftest.$ac_ext >&5
6965   rm -rf conftest*
6966   ol_cv_pthread_lc_r=no
6967 fi
6968 rm -f conftest*
6969
6970                 # restore the LIBS
6971                 LIBS="$ol_LIBS"
6972                 
6973 fi
6974
6975 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6976
6977                 if test $ol_cv_pthread_lc_r = yes ; then
6978                         ol_link_pthreads="-lc_r"
6979                         ol_link_threads=posix
6980                 fi
6981         fi
6982
6983
6984                 # Pthread try link: -threads (ol_cv_pthread_threads)
6985         if test "$ol_link_threads" = no ; then
6986                 # try -threads
6987                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6988 echo "configure:6989: checking for pthread link with -threads" >&5
6989 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6990   echo $ac_n "(cached) $ac_c" 1>&6
6991 else
6992   
6993                         # save the flags
6994                         ol_LIBS="$LIBS"
6995                         LIBS="-threads $LIBS"
6996
6997                         cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000
7001 #include <pthread.h>
7002 #ifndef NULL
7003 #define NULL (void*)0
7004 #endif
7005
7006 int main() {
7007
7008         pthread_t t;
7009
7010 #if HAVE_PTHREADS_D4
7011         pthread_create(&t, pthread_attr_default, NULL, NULL);
7012         pthread_detach( &t );
7013 #else
7014         pthread_create(&t, NULL, NULL, NULL);
7015         pthread_detach( t );
7016 #endif
7017 #ifdef HAVE_LINUX_THREADS
7018         pthread_kill_other_threads_np();
7019 #endif
7020
7021 ; return 0; }
7022 EOF
7023 if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7024   rm -rf conftest*
7025   ol_cv_pthread_threads=yes
7026 else
7027   echo "configure: failed program was:" >&5
7028   cat conftest.$ac_ext >&5
7029   rm -rf conftest*
7030   ol_cv_pthread_threads=no
7031 fi
7032 rm -f conftest*
7033
7034                 # restore the LIBS
7035                 LIBS="$ol_LIBS"
7036                 
7037 fi
7038
7039 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
7040
7041                 if test $ol_cv_pthread_threads = yes ; then
7042                         ol_link_pthreads="-threads"
7043                         ol_link_threads=posix
7044                 fi
7045         fi
7046
7047
7048                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
7049         if test "$ol_link_threads" = no ; then
7050                 # try -lpthreads -lmach -lexc -lc_r
7051                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
7052 echo "configure:7053: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
7053 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
7054   echo $ac_n "(cached) $ac_c" 1>&6
7055 else
7056   
7057                         # save the flags
7058                         ol_LIBS="$LIBS"
7059                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
7060
7061                         cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064
7065 #include <pthread.h>
7066 #ifndef NULL
7067 #define NULL (void*)0
7068 #endif
7069
7070 int main() {
7071
7072         pthread_t t;
7073
7074 #if HAVE_PTHREADS_D4
7075         pthread_create(&t, pthread_attr_default, NULL, NULL);
7076         pthread_detach( &t );
7077 #else
7078         pthread_create(&t, NULL, NULL, NULL);
7079         pthread_detach( t );
7080 #endif
7081 #ifdef HAVE_LINUX_THREADS
7082         pthread_kill_other_threads_np();
7083 #endif
7084
7085 ; return 0; }
7086 EOF
7087 if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7088   rm -rf conftest*
7089   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
7090 else
7091   echo "configure: failed program was:" >&5
7092   cat conftest.$ac_ext >&5
7093   rm -rf conftest*
7094   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
7095 fi
7096 rm -f conftest*
7097
7098                 # restore the LIBS
7099                 LIBS="$ol_LIBS"
7100                 
7101 fi
7102
7103 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
7104
7105                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
7106                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
7107                         ol_link_threads=posix
7108                 fi
7109         fi
7110
7111                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
7112         if test "$ol_link_threads" = no ; then
7113                 # try -lpthreads -lmach -lexc
7114                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
7115 echo "configure:7116: checking for pthread link with -lpthreads -lmach -lexc" >&5
7116 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   
7120                         # save the flags
7121                         ol_LIBS="$LIBS"
7122                         LIBS="-lpthreads -lmach -lexc $LIBS"
7123
7124                         cat > conftest.$ac_ext <<EOF
7125 #line 7126 "configure"
7126 #include "confdefs.h"
7127
7128 #include <pthread.h>
7129 #ifndef NULL
7130 #define NULL (void*)0
7131 #endif
7132
7133 int main() {
7134
7135         pthread_t t;
7136
7137 #if HAVE_PTHREADS_D4
7138         pthread_create(&t, pthread_attr_default, NULL, NULL);
7139         pthread_detach( &t );
7140 #else
7141         pthread_create(&t, NULL, NULL, NULL);
7142         pthread_detach( t );
7143 #endif
7144 #ifdef HAVE_LINUX_THREADS
7145         pthread_kill_other_threads_np();
7146 #endif
7147
7148 ; return 0; }
7149 EOF
7150 if { (eval echo configure:7151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7151   rm -rf conftest*
7152   ol_cv_pthread_lpthreads_lmach_lexc=yes
7153 else
7154   echo "configure: failed program was:" >&5
7155   cat conftest.$ac_ext >&5
7156   rm -rf conftest*
7157   ol_cv_pthread_lpthreads_lmach_lexc=no
7158 fi
7159 rm -f conftest*
7160
7161                 # restore the LIBS
7162                 LIBS="$ol_LIBS"
7163                 
7164 fi
7165
7166 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
7167
7168                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
7169                         ol_link_pthreads="-lpthreads -lmach -lexc"
7170                         ol_link_threads=posix
7171                 fi
7172         fi
7173
7174                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
7175         if test "$ol_link_threads" = no ; then
7176                 # try -lpthreads -lexc
7177                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
7178 echo "configure:7179: checking for pthread link with -lpthreads -lexc" >&5
7179 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
7180   echo $ac_n "(cached) $ac_c" 1>&6
7181 else
7182   
7183                         # save the flags
7184                         ol_LIBS="$LIBS"
7185                         LIBS="-lpthreads -lexc $LIBS"
7186
7187                         cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190
7191 #include <pthread.h>
7192 #ifndef NULL
7193 #define NULL (void*)0
7194 #endif
7195
7196 int main() {
7197
7198         pthread_t t;
7199
7200 #if HAVE_PTHREADS_D4
7201         pthread_create(&t, pthread_attr_default, NULL, NULL);
7202         pthread_detach( &t );
7203 #else
7204         pthread_create(&t, NULL, NULL, NULL);
7205         pthread_detach( t );
7206 #endif
7207 #ifdef HAVE_LINUX_THREADS
7208         pthread_kill_other_threads_np();
7209 #endif
7210
7211 ; return 0; }
7212 EOF
7213 if { (eval echo configure:7214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7214   rm -rf conftest*
7215   ol_cv_pthread_lpthreads_lexc=yes
7216 else
7217   echo "configure: failed program was:" >&5
7218   cat conftest.$ac_ext >&5
7219   rm -rf conftest*
7220   ol_cv_pthread_lpthreads_lexc=no
7221 fi
7222 rm -f conftest*
7223
7224                 # restore the LIBS
7225                 LIBS="$ol_LIBS"
7226                 
7227 fi
7228
7229 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
7230
7231                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
7232                         ol_link_pthreads="-lpthreads -lexc"
7233                         ol_link_threads=posix
7234                 fi
7235         fi
7236
7237
7238                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
7239         if test "$ol_link_threads" = no ; then
7240                 # try -lpthreads
7241                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
7242 echo "configure:7243: checking for pthread link with -lpthreads" >&5
7243 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
7244   echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246   
7247                         # save the flags
7248                         ol_LIBS="$LIBS"
7249                         LIBS="-lpthreads $LIBS"
7250
7251                         cat > conftest.$ac_ext <<EOF
7252 #line 7253 "configure"
7253 #include "confdefs.h"
7254
7255 #include <pthread.h>
7256 #ifndef NULL
7257 #define NULL (void*)0
7258 #endif
7259
7260 int main() {
7261
7262         pthread_t t;
7263
7264 #if HAVE_PTHREADS_D4
7265         pthread_create(&t, pthread_attr_default, NULL, NULL);
7266         pthread_detach( &t );
7267 #else
7268         pthread_create(&t, NULL, NULL, NULL);
7269         pthread_detach( t );
7270 #endif
7271 #ifdef HAVE_LINUX_THREADS
7272         pthread_kill_other_threads_np();
7273 #endif
7274
7275 ; return 0; }
7276 EOF
7277 if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7278   rm -rf conftest*
7279   ol_cv_pthread_lib_lpthreads=yes
7280 else
7281   echo "configure: failed program was:" >&5
7282   cat conftest.$ac_ext >&5
7283   rm -rf conftest*
7284   ol_cv_pthread_lib_lpthreads=no
7285 fi
7286 rm -f conftest*
7287
7288                 # restore the LIBS
7289                 LIBS="$ol_LIBS"
7290                 
7291 fi
7292
7293 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
7294
7295                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
7296                         ol_link_pthreads="-lpthreads"
7297                         ol_link_threads=posix
7298                 fi
7299         fi
7300
7301
7302                 if test $ol_link_threads != no ; then
7303                         cat >> confdefs.h <<\EOF
7304 #define HAVE_PTHREADS 1
7305 EOF
7306
7307
7308                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
7309
7310                                                 save_CPPFLAGS="$CPPFLAGS"
7311                         save_LIBS="$LIBS"
7312                         LIBS="$LTHREAD_LIBS $LIBS"
7313
7314                                                                                                 for ac_func in sched_yield pthread_yield
7315 do
7316 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7317 echo "configure:7318: checking for $ac_func" >&5
7318 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7319   echo $ac_n "(cached) $ac_c" 1>&6
7320 else
7321   cat > conftest.$ac_ext <<EOF
7322 #line 7323 "configure"
7323 #include "confdefs.h"
7324 /* System header to define __stub macros and hopefully few prototypes,
7325     which can conflict with char $ac_func(); below.  */
7326 #include <assert.h>
7327 /* Override any gcc2 internal prototype to avoid an error.  */
7328 /* We use char because int might match the return type of a gcc2
7329     builtin and then its argument prototype would still apply.  */
7330 char $ac_func();
7331 char (*f)();
7332
7333 int main() {
7334
7335 /* The GNU C library defines this for functions which it implements
7336     to always fail with ENOSYS.  Some functions are actually named
7337     something starting with __ and the normal name is an alias.  */
7338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7339 choke me
7340 #else
7341 f = $ac_func;
7342 #endif
7343
7344 ; return 0; }
7345 EOF
7346 if { (eval echo configure:7347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7347   rm -rf conftest*
7348   eval "ac_cv_func_$ac_func=yes"
7349 else
7350   echo "configure: failed program was:" >&5
7351   cat conftest.$ac_ext >&5
7352   rm -rf conftest*
7353   eval "ac_cv_func_$ac_func=no"
7354 fi
7355 rm -f conftest*
7356 fi
7357
7358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7359   echo "$ac_t""yes" 1>&6
7360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7361   cat >> confdefs.h <<EOF
7362 #define $ac_tr_func 1
7363 EOF
7364  
7365 else
7366   echo "$ac_t""no" 1>&6
7367 fi
7368 done
7369
7370
7371                         if test $ac_cv_func_sched_yield = no -a \
7372                                 $ac_cv_func_pthread_yield = no ; then
7373                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
7374 echo "configure:7375: checking for sched_yield in -lrt" >&5
7375 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
7376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7377   echo $ac_n "(cached) $ac_c" 1>&6
7378 else
7379   ac_save_LIBS="$LIBS"
7380 LIBS="-lrt  $LIBS"
7381 cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7384 /* Override any gcc2 internal prototype to avoid an error.  */
7385 /* We use char because int might match the return type of a gcc2
7386     builtin and then its argument prototype would still apply.  */
7387 char sched_yield();
7388
7389 int main() {
7390 sched_yield()
7391 ; return 0; }
7392 EOF
7393 if { (eval echo configure:7394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7394   rm -rf conftest*
7395   eval "ac_cv_lib_$ac_lib_var=yes"
7396 else
7397   echo "configure: failed program was:" >&5
7398   cat conftest.$ac_ext >&5
7399   rm -rf conftest*
7400   eval "ac_cv_lib_$ac_lib_var=no"
7401 fi
7402 rm -f conftest*
7403 LIBS="$ac_save_LIBS"
7404
7405 fi
7406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7407   echo "$ac_t""yes" 1>&6
7408   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
7409                                         cat >> confdefs.h <<\EOF
7410 #define HAVE_SCHED_YIELD 1
7411 EOF
7412
7413                                         ac_cv_func_sched_yield=yes
7414 else
7415   echo "$ac_t""no" 1>&6
7416 ac_cv_func_sched_yield=no
7417 fi
7418
7419                         fi
7420                         if test $ac_cv_func_sched_yield = no -a \
7421                                 $ac_cv_func_pthread_yield = no ; then
7422                                                                                                 for ac_func in thr_yield
7423 do
7424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7425 echo "configure:7426: checking for $ac_func" >&5
7426 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7427   echo $ac_n "(cached) $ac_c" 1>&6
7428 else
7429   cat > conftest.$ac_ext <<EOF
7430 #line 7431 "configure"
7431 #include "confdefs.h"
7432 /* System header to define __stub macros and hopefully few prototypes,
7433     which can conflict with char $ac_func(); below.  */
7434 #include <assert.h>
7435 /* Override any gcc2 internal prototype to avoid an error.  */
7436 /* We use char because int might match the return type of a gcc2
7437     builtin and then its argument prototype would still apply.  */
7438 char $ac_func();
7439 char (*f)();
7440
7441 int main() {
7442
7443 /* The GNU C library defines this for functions which it implements
7444     to always fail with ENOSYS.  Some functions are actually named
7445     something starting with __ and the normal name is an alias.  */
7446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7447 choke me
7448 #else
7449 f = $ac_func;
7450 #endif
7451
7452 ; return 0; }
7453 EOF
7454 if { (eval echo configure:7455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7455   rm -rf conftest*
7456   eval "ac_cv_func_$ac_func=yes"
7457 else
7458   echo "configure: failed program was:" >&5
7459   cat conftest.$ac_ext >&5
7460   rm -rf conftest*
7461   eval "ac_cv_func_$ac_func=no"
7462 fi
7463 rm -f conftest*
7464 fi
7465
7466 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7467   echo "$ac_t""yes" 1>&6
7468     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7469   cat >> confdefs.h <<EOF
7470 #define $ac_tr_func 1
7471 EOF
7472  
7473 else
7474   echo "$ac_t""no" 1>&6
7475 fi
7476 done
7477
7478                         fi
7479                         if test $ac_cv_func_sched_yield = no -a \
7480                                 $ac_cv_func_pthread_yield = no -a \
7481                                 "$ac_cv_func_thr_yield" = no ; then
7482                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
7483                         fi
7484
7485                                                 for ac_func in pthread_kill
7486 do
7487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7488 echo "configure:7489: checking for $ac_func" >&5
7489 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7490   echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492   cat > conftest.$ac_ext <<EOF
7493 #line 7494 "configure"
7494 #include "confdefs.h"
7495 /* System header to define __stub macros and hopefully few prototypes,
7496     which can conflict with char $ac_func(); below.  */
7497 #include <assert.h>
7498 /* Override any gcc2 internal prototype to avoid an error.  */
7499 /* We use char because int might match the return type of a gcc2
7500     builtin and then its argument prototype would still apply.  */
7501 char $ac_func();
7502 char (*f)();
7503
7504 int main() {
7505
7506 /* The GNU C library defines this for functions which it implements
7507     to always fail with ENOSYS.  Some functions are actually named
7508     something starting with __ and the normal name is an alias.  */
7509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7510 choke me
7511 #else
7512 f = $ac_func;
7513 #endif
7514
7515 ; return 0; }
7516 EOF
7517 if { (eval echo configure:7518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7518   rm -rf conftest*
7519   eval "ac_cv_func_$ac_func=yes"
7520 else
7521   echo "configure: failed program was:" >&5
7522   cat conftest.$ac_ext >&5
7523   rm -rf conftest*
7524   eval "ac_cv_func_$ac_func=no"
7525 fi
7526 rm -f conftest*
7527 fi
7528
7529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7530   echo "$ac_t""yes" 1>&6
7531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7532   cat >> confdefs.h <<EOF
7533 #define $ac_tr_func 1
7534 EOF
7535  
7536 else
7537   echo "$ac_t""no" 1>&6
7538 fi
7539 done
7540
7541
7542                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
7543 echo "configure:7544: checking for pthread_detach with <pthread.h>" >&5
7544 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
7545   echo $ac_n "(cached) $ac_c" 1>&6
7546 else
7547   
7548                                                                 cat > conftest.$ac_ext <<EOF
7549 #line 7550 "configure"
7550 #include "confdefs.h"
7551
7552 #include <pthread.h>
7553 #ifndef NULL
7554 #define NULL (void*)0
7555 #endif
7556
7557 int main() {
7558 pthread_detach(NULL);
7559 ; return 0; }
7560 EOF
7561 if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7562   rm -rf conftest*
7563   ol_cv_func_pthread_detach=yes
7564 else
7565   echo "configure: failed program was:" >&5
7566   cat conftest.$ac_ext >&5
7567   rm -rf conftest*
7568   ol_cv_func_pthread_detach=no
7569 fi
7570 rm -f conftest*
7571                         
7572 fi
7573
7574 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
7575
7576                         if test $ol_cv_func_pthread_detach = no ; then
7577                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
7578                         fi
7579
7580                         cat >> confdefs.h <<\EOF
7581 #define HAVE_PTHREAD_DETACH 1
7582 EOF
7583
7584
7585                                                 for ac_func in \
7586                                 pthread_setconcurrency \
7587                                 pthread_getconcurrency \
7588                                 thr_setconcurrency \
7589                                 thr_getconcurrency \
7590                         
7591 do
7592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7593 echo "configure:7594: checking for $ac_func" >&5
7594 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7595   echo $ac_n "(cached) $ac_c" 1>&6
7596 else
7597   cat > conftest.$ac_ext <<EOF
7598 #line 7599 "configure"
7599 #include "confdefs.h"
7600 /* System header to define __stub macros and hopefully few prototypes,
7601     which can conflict with char $ac_func(); below.  */
7602 #include <assert.h>
7603 /* Override any gcc2 internal prototype to avoid an error.  */
7604 /* We use char because int might match the return type of a gcc2
7605     builtin and then its argument prototype would still apply.  */
7606 char $ac_func();
7607 char (*f)();
7608
7609 int main() {
7610
7611 /* The GNU C library defines this for functions which it implements
7612     to always fail with ENOSYS.  Some functions are actually named
7613     something starting with __ and the normal name is an alias.  */
7614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7615 choke me
7616 #else
7617 f = $ac_func;
7618 #endif
7619
7620 ; return 0; }
7621 EOF
7622 if { (eval echo configure:7623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7623   rm -rf conftest*
7624   eval "ac_cv_func_$ac_func=yes"
7625 else
7626   echo "configure: failed program was:" >&5
7627   cat conftest.$ac_ext >&5
7628   rm -rf conftest*
7629   eval "ac_cv_func_$ac_func=no"
7630 fi
7631 rm -f conftest*
7632 fi
7633
7634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7635   echo "$ac_t""yes" 1>&6
7636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7637   cat >> confdefs.h <<EOF
7638 #define $ac_tr_func 1
7639 EOF
7640  
7641 else
7642   echo "$ac_t""no" 1>&6
7643 fi
7644 done
7645
7646
7647                         
7648         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
7649 echo "configure:7650: checking for pthread_kill_other_threads_np" >&5
7650 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
7651   echo $ac_n "(cached) $ac_c" 1>&6
7652 else
7653   cat > conftest.$ac_ext <<EOF
7654 #line 7655 "configure"
7655 #include "confdefs.h"
7656 /* System header to define __stub macros and hopefully few prototypes,
7657     which can conflict with char pthread_kill_other_threads_np(); below.  */
7658 #include <assert.h>
7659 /* Override any gcc2 internal prototype to avoid an error.  */
7660 /* We use char because int might match the return type of a gcc2
7661     builtin and then its argument prototype would still apply.  */
7662 char pthread_kill_other_threads_np();
7663 char (*f)();
7664
7665 int main() {
7666
7667 /* The GNU C library defines this for functions which it implements
7668     to always fail with ENOSYS.  Some functions are actually named
7669     something starting with __ and the normal name is an alias.  */
7670 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
7671 choke me
7672 #else
7673 f = pthread_kill_other_threads_np;
7674 #endif
7675
7676 ; return 0; }
7677 EOF
7678 if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7679   rm -rf conftest*
7680   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
7681 else
7682   echo "configure: failed program was:" >&5
7683   cat conftest.$ac_ext >&5
7684   rm -rf conftest*
7685   eval "ac_cv_func_pthread_kill_other_threads_np=no"
7686 fi
7687 rm -f conftest*
7688 fi
7689
7690 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
7691   echo "$ac_t""yes" 1>&6
7692   :
7693 else
7694   echo "$ac_t""no" 1>&6
7695 fi
7696
7697         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
7698 echo "configure:7699: checking for LinuxThreads implementation" >&5
7699 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
7700   echo $ac_n "(cached) $ac_c" 1>&6
7701 else
7702   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
7703 fi
7704
7705 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
7706
7707                         
7708         
7709         
7710         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
7711 echo "configure:7712: checking for LinuxThreads consistency" >&5
7712 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   
7716                 if test $ol_cv_header_linux_threads = yes -a \
7717                         $ol_cv_sys_linux_threads = yes; then
7718                         ol_cv_linux_threads=yes
7719                 elif test $ol_cv_header_linux_threads = no -a \
7720                         $ol_cv_sys_linux_threads = no; then
7721                         ol_cv_linux_threads=no
7722                 else
7723                         ol_cv_linux_threads=error
7724                 fi
7725         
7726 fi
7727
7728 echo "$ac_t""$ol_cv_linux_threads" 1>&6
7729
7730
7731                         if test $ol_cv_linux_threads = error; then
7732                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
7733                         fi
7734
7735                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
7736 echo "configure:7737: checking if pthread_create() works" >&5
7737 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
7738   echo $ac_n "(cached) $ac_c" 1>&6
7739 else
7740   
7741                         if test "$cross_compiling" = yes; then
7742                                 ol_cv_pthread_create_works=yes
7743 else
7744   cat > conftest.$ac_ext <<EOF
7745 #line 7746 "configure"
7746 #include "confdefs.h"
7747
7748 #include <pthread.h>
7749 #ifndef NULL
7750 #define NULL (void*)0
7751 #endif
7752
7753 static void *task(p)
7754         void *p;
7755 {
7756         return (void *) (p == NULL);
7757 }
7758
7759 int main(argc, argv)
7760         int argc;
7761         char **argv;
7762 {
7763         pthread_t t;
7764 #if HAVE_PTHREADS_D4
7765         exit(pthread_create(&t, pthread_attr_default, task, NULL));
7766 #else
7767         exit(pthread_create(&t, NULL, task, NULL));
7768 #endif
7769 }
7770
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7773 then
7774   ol_cv_pthread_create_works=yes
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -fr conftest*
7779   ol_cv_pthread_create_works=no
7780 fi
7781 rm -fr conftest*
7782 fi
7783
7784 fi
7785
7786 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
7787
7788                         if test $ol_cv_pthread_create_works = no ; then
7789                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
7790                         fi
7791
7792                                                 if test $ol_with_yielding_select = auto ; then
7793                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
7794 echo "configure:7795: checking if select yields when using pthreads" >&5
7795 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
7796   echo $ac_n "(cached) $ac_c" 1>&6
7797 else
7798   
7799                                 if test "$cross_compiling" = yes; then
7800   ol_cv_pthread_select_yields=cross
7801 else
7802   cat > conftest.$ac_ext <<EOF
7803 #line 7804 "configure"
7804 #include "confdefs.h"
7805
7806 #include <sys/types.h>
7807 #include <sys/time.h>
7808 #include <unistd.h>
7809 #include <pthread.h>
7810 #ifndef NULL
7811 #define NULL (void*) 0
7812 #endif
7813
7814 static int fildes[2];
7815
7816 static void *task(p)
7817         void *p;
7818 {
7819         int i;
7820         struct timeval tv;
7821
7822         fd_set rfds;
7823
7824         tv.tv_sec=10;
7825         tv.tv_usec=0;
7826
7827         FD_ZERO(&rfds);
7828         FD_SET(fildes[0], &rfds);
7829
7830         /* we're not interested in any fds */
7831         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7832
7833         if(i < 0) {
7834                 perror("select");
7835                 exit(10);
7836         }
7837
7838         exit(0); /* if we exit here, the select blocked the whole process */
7839 }
7840
7841 int main(argc, argv)
7842         int argc;
7843         char **argv;
7844 {
7845         pthread_t t;
7846
7847         /* create a pipe to select */
7848         if(pipe(&fildes[0])) {
7849                 perror("select");
7850                 exit(1);
7851         }
7852
7853 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7854         (void) pthread_setconcurrency(2);
7855 #else
7856 #ifdef HAVE_THR_SETCONCURRENCY
7857         /* Set Solaris LWP concurrency to 2 */
7858         thr_setconcurrency(2);
7859 #endif
7860 #endif
7861
7862 #if HAVE_PTHREADS_D4
7863         pthread_create(&t, pthread_attr_default, task, NULL);
7864 #else
7865         pthread_create(&t, NULL, task, NULL);
7866 #endif
7867
7868 #if HAVE_SCHED_YIELD
7869         sched_yield();  /* make sure task runs first */
7870 #else
7871 #ifdef HAVE_PTHREAD_YIELD
7872         pthread_yield();        /* make sure task runs first */
7873 #endif
7874 #endif
7875
7876         exit(2);
7877 }
7878 EOF
7879 if { (eval echo configure:7880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7880 then
7881   ol_cv_pthread_select_yields=no
7882 else
7883   echo "configure: failed program was:" >&5
7884   cat conftest.$ac_ext >&5
7885   rm -fr conftest*
7886   ol_cv_pthread_select_yields=yes
7887 fi
7888 rm -fr conftest*
7889 fi
7890
7891 fi
7892
7893 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7894
7895                                 if test $ol_cv_pthread_select_yields = cross ; then
7896                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
7897                                 fi
7898
7899                                 if test $ol_cv_pthread_select_yields = yes ; then
7900                                         ol_with_yielding_select=yes
7901                                 fi
7902                         fi
7903
7904                                                 CPPFLAGS="$save_CPPFLAGS"
7905                         LIBS="$save_LIBS"
7906                 else
7907                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7908                 fi
7909         fi
7910
7911         if test $ol_with_threads = posix ; then
7912                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7913         fi
7914 fi
7915
7916 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7917         -o $ol_with_threads = mach ; then
7918
7919                 for ac_hdr in mach/cthreads.h
7920 do
7921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7923 echo "configure:7924: checking for $ac_hdr" >&5
7924 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7925   echo $ac_n "(cached) $ac_c" 1>&6
7926 else
7927   cat > conftest.$ac_ext <<EOF
7928 #line 7929 "configure"
7929 #include "confdefs.h"
7930 #include <$ac_hdr>
7931 EOF
7932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7933 { (eval echo configure:7934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7935 if test -z "$ac_err"; then
7936   rm -rf conftest*
7937   eval "ac_cv_header_$ac_safe=yes"
7938 else
7939   echo "$ac_err" >&5
7940   echo "configure: failed program was:" >&5
7941   cat conftest.$ac_ext >&5
7942   rm -rf conftest*
7943   eval "ac_cv_header_$ac_safe=no"
7944 fi
7945 rm -f conftest*
7946 fi
7947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7948   echo "$ac_t""yes" 1>&6
7949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7950   cat >> confdefs.h <<EOF
7951 #define $ac_tr_hdr 1
7952 EOF
7953  
7954 else
7955   echo "$ac_t""no" 1>&6
7956 fi
7957 done
7958
7959         if test $ac_cv_header_mach_cthreads_h = yes ; then
7960                 ol_with_threads=found
7961
7962                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7963 echo "configure:7964: checking for cthread_fork" >&5
7964 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7965   echo $ac_n "(cached) $ac_c" 1>&6
7966 else
7967   cat > conftest.$ac_ext <<EOF
7968 #line 7969 "configure"
7969 #include "confdefs.h"
7970 /* System header to define __stub macros and hopefully few prototypes,
7971     which can conflict with char cthread_fork(); below.  */
7972 #include <assert.h>
7973 /* Override any gcc2 internal prototype to avoid an error.  */
7974 /* We use char because int might match the return type of a gcc2
7975     builtin and then its argument prototype would still apply.  */
7976 char cthread_fork();
7977 char (*f)();
7978
7979 int main() {
7980
7981 /* The GNU C library defines this for functions which it implements
7982     to always fail with ENOSYS.  Some functions are actually named
7983     something starting with __ and the normal name is an alias.  */
7984 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7985 choke me
7986 #else
7987 f = cthread_fork;
7988 #endif
7989
7990 ; return 0; }
7991 EOF
7992 if { (eval echo configure:7993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7993   rm -rf conftest*
7994   eval "ac_cv_func_cthread_fork=yes"
7995 else
7996   echo "configure: failed program was:" >&5
7997   cat conftest.$ac_ext >&5
7998   rm -rf conftest*
7999   eval "ac_cv_func_cthread_fork=no"
8000 fi
8001 rm -f conftest*
8002 fi
8003
8004 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
8005   echo "$ac_t""yes" 1>&6
8006   ol_link_threads=yes
8007 else
8008   echo "$ac_t""no" 1>&6
8009 fi
8010
8011
8012                 if test $ol_link_threads = no ; then
8013                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
8014 echo "configure:8015: checking for cthread_fork with -all_load" >&5
8015 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
8016   echo $ac_n "(cached) $ac_c" 1>&6
8017 else
8018   
8019                                                                 save_LIBS="$LIBS"
8020                                 LIBS="-all_load $LIBS"
8021                                 cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 #include <mach/cthreads.h>
8025 int main() {
8026
8027                                         cthread_fork((void *)0, (void *)0);
8028                                         
8029 ; return 0; }
8030 EOF
8031 if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8032   rm -rf conftest*
8033   ol_cv_cthread_all_load=yes
8034 else
8035   echo "configure: failed program was:" >&5
8036   cat conftest.$ac_ext >&5
8037   rm -rf conftest*
8038   ol_cv_cthread_all_load=no
8039 fi
8040 rm -f conftest*
8041                                                                 LIBS="$save_LIBS"
8042                         
8043 fi
8044
8045 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
8046
8047                         if test $ol_cv_cthread_all_load = yes ; then
8048                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
8049                                 ol_link_threads=mach
8050                         fi
8051                 fi
8052
8053                 if test $ol_link_threads != no ; then
8054                         : check for cthread specific functionality here
8055                         cat >> confdefs.h <<\EOF
8056 #define HAVE_MACH_CTHREADS 1
8057 EOF
8058
8059                 else
8060                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
8061                 fi
8062         fi
8063
8064         if test $ol_with_threads = mach ; then
8065                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
8066         fi
8067 fi
8068
8069 if test $ol_with_threads = auto -o $ol_with_threads = yes \
8070         -o $ol_with_threads = lwp ; then
8071
8072                 for ac_hdr in thread.h synch.h
8073 do
8074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8076 echo "configure:8077: checking for $ac_hdr" >&5
8077 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8078   echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080   cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <$ac_hdr>
8084 EOF
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089   rm -rf conftest*
8090   eval "ac_cv_header_$ac_safe=yes"
8091 else
8092   echo "$ac_err" >&5
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   eval "ac_cv_header_$ac_safe=no"
8097 fi
8098 rm -f conftest*
8099 fi
8100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8101   echo "$ac_t""yes" 1>&6
8102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8103   cat >> confdefs.h <<EOF
8104 #define $ac_tr_hdr 1
8105 EOF
8106  
8107 else
8108   echo "$ac_t""no" 1>&6
8109 fi
8110 done
8111
8112         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
8113                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
8114 echo "configure:8115: checking for thr_create in -lthread" >&5
8115 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
8116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8117   echo $ac_n "(cached) $ac_c" 1>&6
8118 else
8119   ac_save_LIBS="$LIBS"
8120 LIBS="-lthread  $LIBS"
8121 cat > conftest.$ac_ext <<EOF
8122 #line 8123 "configure"
8123 #include "confdefs.h"
8124 /* Override any gcc2 internal prototype to avoid an error.  */
8125 /* We use char because int might match the return type of a gcc2
8126     builtin and then its argument prototype would still apply.  */
8127 char thr_create();
8128
8129 int main() {
8130 thr_create()
8131 ; return 0; }
8132 EOF
8133 if { (eval echo configure:8134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8134   rm -rf conftest*
8135   eval "ac_cv_lib_$ac_lib_var=yes"
8136 else
8137   echo "configure: failed program was:" >&5
8138   cat conftest.$ac_ext >&5
8139   rm -rf conftest*
8140   eval "ac_cv_lib_$ac_lib_var=no"
8141 fi
8142 rm -f conftest*
8143 LIBS="$ac_save_LIBS"
8144
8145 fi
8146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8147   echo "$ac_t""yes" 1>&6
8148   have_thr=yes
8149 else
8150   echo "$ac_t""no" 1>&6
8151 have_thr=no
8152 fi
8153
8154
8155                 if test $have_thr = yes ; then
8156                         cat >> confdefs.h <<\EOF
8157 #define HAVE_THR 1
8158 EOF
8159
8160                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
8161                         ol_link_threads=thr
8162
8163                         if test $ol_with_yielding_select = auto ; then
8164                                 ol_with_yielding_select=yes
8165                         fi
8166
8167                                                 for ac_func in \
8168                                 thr_setconcurrency \
8169                                 thr_getconcurrency \
8170                         
8171 do
8172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8173 echo "configure:8174: checking for $ac_func" >&5
8174 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 /* System header to define __stub macros and hopefully few prototypes,
8181     which can conflict with char $ac_func(); below.  */
8182 #include <assert.h>
8183 /* Override any gcc2 internal prototype to avoid an error.  */
8184 /* We use char because int might match the return type of a gcc2
8185     builtin and then its argument prototype would still apply.  */
8186 char $ac_func();
8187 char (*f)();
8188
8189 int main() {
8190
8191 /* The GNU C library defines this for functions which it implements
8192     to always fail with ENOSYS.  Some functions are actually named
8193     something starting with __ and the normal name is an alias.  */
8194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8195 choke me
8196 #else
8197 f = $ac_func;
8198 #endif
8199
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   eval "ac_cv_func_$ac_func=yes"
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_func_$ac_func=no"
8210 fi
8211 rm -f conftest*
8212 fi
8213
8214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8215   echo "$ac_t""yes" 1>&6
8216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8217   cat >> confdefs.h <<EOF
8218 #define $ac_tr_func 1
8219 EOF
8220  
8221 else
8222   echo "$ac_t""no" 1>&6
8223 fi
8224 done
8225
8226                 fi
8227         fi
8228
8229                 for ac_hdr in lwp/lwp.h
8230 do
8231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8233 echo "configure:8234: checking for $ac_hdr" >&5
8234 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8235   echo $ac_n "(cached) $ac_c" 1>&6
8236 else
8237   cat > conftest.$ac_ext <<EOF
8238 #line 8239 "configure"
8239 #include "confdefs.h"
8240 #include <$ac_hdr>
8241 EOF
8242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8243 { (eval echo configure:8244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8245 if test -z "$ac_err"; then
8246   rm -rf conftest*
8247   eval "ac_cv_header_$ac_safe=yes"
8248 else
8249   echo "$ac_err" >&5
8250   echo "configure: failed program was:" >&5
8251   cat conftest.$ac_ext >&5
8252   rm -rf conftest*
8253   eval "ac_cv_header_$ac_safe=no"
8254 fi
8255 rm -f conftest*
8256 fi
8257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8258   echo "$ac_t""yes" 1>&6
8259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8260   cat >> confdefs.h <<EOF
8261 #define $ac_tr_hdr 1
8262 EOF
8263  
8264 else
8265   echo "$ac_t""no" 1>&6
8266 fi
8267 done
8268
8269         if test $ac_cv_header_lwp_lwp_h = yes ; then
8270                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
8271 echo "configure:8272: checking for lwp_create in -llwp" >&5
8272 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
8273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8274   echo $ac_n "(cached) $ac_c" 1>&6
8275 else
8276   ac_save_LIBS="$LIBS"
8277 LIBS="-llwp  $LIBS"
8278 cat > conftest.$ac_ext <<EOF
8279 #line 8280 "configure"
8280 #include "confdefs.h"
8281 /* Override any gcc2 internal prototype to avoid an error.  */
8282 /* We use char because int might match the return type of a gcc2
8283     builtin and then its argument prototype would still apply.  */
8284 char lwp_create();
8285
8286 int main() {
8287 lwp_create()
8288 ; return 0; }
8289 EOF
8290 if { (eval echo configure:8291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8291   rm -rf conftest*
8292   eval "ac_cv_lib_$ac_lib_var=yes"
8293 else
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_lib_$ac_lib_var=no"
8298 fi
8299 rm -f conftest*
8300 LIBS="$ac_save_LIBS"
8301
8302 fi
8303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8304   echo "$ac_t""yes" 1>&6
8305   have_lwp=yes
8306 else
8307   echo "$ac_t""no" 1>&6
8308 have_lwp=no
8309 fi
8310
8311
8312                 if test $have_lwp = yes ; then
8313                         cat >> confdefs.h <<\EOF
8314 #define HAVE_LWP 1
8315 EOF
8316
8317                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
8318                         ol_link_threads=lwp
8319
8320                         if test $ol_with_yielding_select = auto ; then
8321                                 ol_with_yielding_select=no
8322                         fi
8323                 fi
8324         fi
8325 fi
8326
8327 if test $ol_with_yielding_select = yes ; then
8328         cat >> confdefs.h <<\EOF
8329 #define HAVE_YIELDING_SELECT 1
8330 EOF
8331
8332 fi
8333
8334 if test $ol_with_threads = manual ; then
8335                 ol_link_threads=yes
8336
8337         echo "configure: warning: thread defines and link options must be set manually" 1>&2
8338
8339         for ac_hdr in pthread.h sched.h
8340 do
8341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8343 echo "configure:8344: checking for $ac_hdr" >&5
8344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   cat > conftest.$ac_ext <<EOF
8348 #line 8349 "configure"
8349 #include "confdefs.h"
8350 #include <$ac_hdr>
8351 EOF
8352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8353 { (eval echo configure:8354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8355 if test -z "$ac_err"; then
8356   rm -rf conftest*
8357   eval "ac_cv_header_$ac_safe=yes"
8358 else
8359   echo "$ac_err" >&5
8360   echo "configure: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   rm -rf conftest*
8363   eval "ac_cv_header_$ac_safe=no"
8364 fi
8365 rm -f conftest*
8366 fi
8367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8368   echo "$ac_t""yes" 1>&6
8369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8370   cat >> confdefs.h <<EOF
8371 #define $ac_tr_hdr 1
8372 EOF
8373  
8374 else
8375   echo "$ac_t""no" 1>&6
8376 fi
8377 done
8378
8379         for ac_func in sched_yield pthread_yield
8380 do
8381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8382 echo "configure:8383: checking for $ac_func" >&5
8383 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8384   echo $ac_n "(cached) $ac_c" 1>&6
8385 else
8386   cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 /* System header to define __stub macros and hopefully few prototypes,
8390     which can conflict with char $ac_func(); below.  */
8391 #include <assert.h>
8392 /* Override any gcc2 internal prototype to avoid an error.  */
8393 /* We use char because int might match the return type of a gcc2
8394     builtin and then its argument prototype would still apply.  */
8395 char $ac_func();
8396 char (*f)();
8397
8398 int main() {
8399
8400 /* The GNU C library defines this for functions which it implements
8401     to always fail with ENOSYS.  Some functions are actually named
8402     something starting with __ and the normal name is an alias.  */
8403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8404 choke me
8405 #else
8406 f = $ac_func;
8407 #endif
8408
8409 ; return 0; }
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8412   rm -rf conftest*
8413   eval "ac_cv_func_$ac_func=yes"
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -rf conftest*
8418   eval "ac_cv_func_$ac_func=no"
8419 fi
8420 rm -f conftest*
8421 fi
8422
8423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8424   echo "$ac_t""yes" 1>&6
8425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8426   cat >> confdefs.h <<EOF
8427 #define $ac_tr_func 1
8428 EOF
8429  
8430 else
8431   echo "$ac_t""no" 1>&6
8432 fi
8433 done
8434
8435         
8436         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
8437 echo "configure:8438: checking for LinuxThreads pthread.h" >&5
8438 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
8439   echo $ac_n "(cached) $ac_c" 1>&6
8440 else
8441   cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 #include <pthread.h>
8445 EOF
8446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8447   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
8448   rm -rf conftest*
8449   ol_cv_header_linux_threads=yes
8450 else
8451   rm -rf conftest*
8452   ol_cv_header_linux_threads=no
8453 fi
8454 rm -f conftest*
8455
8456                 
8457 fi
8458
8459 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
8460         if test $ol_cv_header_linux_threads = yes; then
8461                 cat >> confdefs.h <<\EOF
8462 #define HAVE_LINUX_THREADS 1
8463 EOF
8464
8465         fi
8466
8467
8468         for ac_hdr in mach/cthreads.h
8469 do
8470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8472 echo "configure:8473: checking for $ac_hdr" >&5
8473 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8474   echo $ac_n "(cached) $ac_c" 1>&6
8475 else
8476   cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 #include <$ac_hdr>
8480 EOF
8481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8482 { (eval echo configure:8483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8484 if test -z "$ac_err"; then
8485   rm -rf conftest*
8486   eval "ac_cv_header_$ac_safe=yes"
8487 else
8488   echo "$ac_err" >&5
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   eval "ac_cv_header_$ac_safe=no"
8493 fi
8494 rm -f conftest*
8495 fi
8496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8497   echo "$ac_t""yes" 1>&6
8498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8499   cat >> confdefs.h <<EOF
8500 #define $ac_tr_hdr 1
8501 EOF
8502  
8503 else
8504   echo "$ac_t""no" 1>&6
8505 fi
8506 done
8507
8508         for ac_hdr in lwp/lwp.h
8509 do
8510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8512 echo "configure:8513: checking for $ac_hdr" >&5
8513 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8514   echo $ac_n "(cached) $ac_c" 1>&6
8515 else
8516   cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <$ac_hdr>
8520 EOF
8521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8522 { (eval echo configure:8523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8524 if test -z "$ac_err"; then
8525   rm -rf conftest*
8526   eval "ac_cv_header_$ac_safe=yes"
8527 else
8528   echo "$ac_err" >&5
8529   echo "configure: failed program was:" >&5
8530   cat conftest.$ac_ext >&5
8531   rm -rf conftest*
8532   eval "ac_cv_header_$ac_safe=no"
8533 fi
8534 rm -f conftest*
8535 fi
8536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8537   echo "$ac_t""yes" 1>&6
8538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8539   cat >> confdefs.h <<EOF
8540 #define $ac_tr_hdr 1
8541 EOF
8542  
8543 else
8544   echo "$ac_t""no" 1>&6
8545 fi
8546 done
8547
8548         for ac_hdr in thread.h synch.h
8549 do
8550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8552 echo "configure:8553: checking for $ac_hdr" >&5
8553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8554   echo $ac_n "(cached) $ac_c" 1>&6
8555 else
8556   cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 #include <$ac_hdr>
8560 EOF
8561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8562 { (eval echo configure:8563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8564 if test -z "$ac_err"; then
8565   rm -rf conftest*
8566   eval "ac_cv_header_$ac_safe=yes"
8567 else
8568   echo "$ac_err" >&5
8569   echo "configure: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   rm -rf conftest*
8572   eval "ac_cv_header_$ac_safe=no"
8573 fi
8574 rm -f conftest*
8575 fi
8576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8577   echo "$ac_t""yes" 1>&6
8578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8579   cat >> confdefs.h <<EOF
8580 #define $ac_tr_hdr 1
8581 EOF
8582  
8583 else
8584   echo "$ac_t""no" 1>&6
8585 fi
8586 done
8587
8588 fi
8589
8590 if test $ol_link_threads != no ; then  
8591                         cat >> confdefs.h <<\EOF
8592 #define REENTRANT 1
8593 EOF
8594
8595         cat >> confdefs.h <<\EOF
8596 #define _REENTRANT 1
8597 EOF
8598
8599         cat >> confdefs.h <<\EOF
8600 #define THREAD_SAFE 1
8601 EOF
8602
8603         cat >> confdefs.h <<\EOF
8604 #define _THREAD_SAFE 1
8605 EOF
8606
8607         cat >> confdefs.h <<\EOF
8608 #define THREADSAFE 1
8609 EOF
8610
8611         cat >> confdefs.h <<\EOF
8612 #define _THREADSAFE 1
8613 EOF
8614
8615         cat >> confdefs.h <<\EOF
8616 #define _SGI_MP_SOURCE 1
8617 EOF
8618
8619
8620                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
8621 echo "configure:8622: checking for thread specific errno" >&5
8622 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
8623   echo $ac_n "(cached) $ac_c" 1>&6
8624 else
8625   
8626                 cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 #include <errno.h>
8630 int main() {
8631 errno = 0;
8632 ; return 0; }
8633 EOF
8634 if { (eval echo configure:8635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8635   rm -rf conftest*
8636   ol_cv_errno_thread_specific=yes
8637 else
8638   echo "configure: failed program was:" >&5
8639   cat conftest.$ac_ext >&5
8640   rm -rf conftest*
8641   ol_cv_errno_thread_specific=no
8642 fi
8643 rm -f conftest*
8644         
8645 fi
8646
8647 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
8648
8649                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
8650 echo "configure:8651: checking for thread specific h_errno" >&5
8651 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
8652   echo $ac_n "(cached) $ac_c" 1>&6
8653 else
8654   
8655                 cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 #include <netdb.h>
8659 int main() {
8660 h_errno = 0;
8661 ; return 0; }
8662 EOF
8663 if { (eval echo configure:8664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8664   rm -rf conftest*
8665   ol_cv_h_errno_thread_specific=yes
8666 else
8667   echo "configure: failed program was:" >&5
8668   cat conftest.$ac_ext >&5
8669   rm -rf conftest*
8670   ol_cv_h_errno_thread_specific=no
8671 fi
8672 rm -f conftest*
8673         
8674 fi
8675
8676 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
8677
8678         if test $ol_cv_errno_thread_specific != yes \
8679                 -o $ol_cv_h_errno_thread_specific != yes ; then
8680                 LIBS="$LTHREAD_LIBS $LIBS"
8681                 LTHREAD_LIBS=""
8682         fi
8683
8684 fi  
8685
8686 if test $ol_link_threads = no ; then
8687         if test $ol_with_threads = yes ; then
8688                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
8689         fi
8690
8691         if test $ol_with_threads = auto ; then
8692                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
8693                 ol_with_threads=no
8694         fi
8695
8696         cat >> confdefs.h <<\EOF
8697 #define NO_THREADS 1
8698 EOF
8699
8700         LTHREAD_LIBS=""
8701 fi
8702
8703 if test $ol_link_threads != no ; then
8704         cat >> confdefs.h <<\EOF
8705 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8706 EOF
8707
8708 fi
8709
8710
8711 ol_link_ldbm=no 
8712 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
8713         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
8714 echo "configure:8715: checking for DB2 library" >&5
8715 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
8716   echo $ac_n "(cached) $ac_c" 1>&6
8717 else
8718         ol_LIBS="$LIBS"
8719         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
8720 echo "configure:8721: checking for db_open in -ldb" >&5
8721 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
8722 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8723   echo $ac_n "(cached) $ac_c" 1>&6
8724 else
8725   ac_save_LIBS="$LIBS"
8726 LIBS="-ldb  $LIBS"
8727 cat > conftest.$ac_ext <<EOF
8728 #line 8729 "configure"
8729 #include "confdefs.h"
8730 /* Override any gcc2 internal prototype to avoid an error.  */
8731 /* We use char because int might match the return type of a gcc2
8732     builtin and then its argument prototype would still apply.  */
8733 char db_open();
8734
8735 int main() {
8736 db_open()
8737 ; return 0; }
8738 EOF
8739 if { (eval echo configure:8740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8740   rm -rf conftest*
8741   eval "ac_cv_lib_$ac_lib_var=yes"
8742 else
8743   echo "configure: failed program was:" >&5
8744   cat conftest.$ac_ext >&5
8745   rm -rf conftest*
8746   eval "ac_cv_lib_$ac_lib_var=no"
8747 fi
8748 rm -f conftest*
8749 LIBS="$ac_save_LIBS"
8750
8751 fi
8752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8753   echo "$ac_t""yes" 1>&6
8754   ol_cv_lib_db2=-ldb
8755 else
8756   echo "$ac_t""no" 1>&6
8757 ol_cv_lib_db2=no
8758 fi
8759
8760         LIBS="$ol_LIBS"
8761
8762 fi
8763
8764 echo "$ac_t""$ol_cv_lib_db2" 1>&6
8765
8766 for ac_hdr in db.h
8767 do
8768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8770 echo "configure:8771: checking for $ac_hdr" >&5
8771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8772   echo $ac_n "(cached) $ac_c" 1>&6
8773 else
8774   cat > conftest.$ac_ext <<EOF
8775 #line 8776 "configure"
8776 #include "confdefs.h"
8777 #include <$ac_hdr>
8778 EOF
8779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8780 { (eval echo configure:8781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8782 if test -z "$ac_err"; then
8783   rm -rf conftest*
8784   eval "ac_cv_header_$ac_safe=yes"
8785 else
8786   echo "$ac_err" >&5
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -rf conftest*
8790   eval "ac_cv_header_$ac_safe=no"
8791 fi
8792 rm -f conftest*
8793 fi
8794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8795   echo "$ac_t""yes" 1>&6
8796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8797   cat >> confdefs.h <<EOF
8798 #define $ac_tr_hdr 1
8799 EOF
8800  
8801 else
8802   echo "$ac_t""no" 1>&6
8803 fi
8804 done
8805
8806 if test $ac_cv_header_db_h = yes ; then
8807         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
8808 echo "configure:8809: checking if db.h is DB2" >&5
8809 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
8810   echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812   
8813                 cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816
8817 #                       include <db.h>
8818                         /* this check could be improved */
8819 #                       ifdef DB_VERSION_MAJOR
8820 #                               if DB_VERSION_MAJOR == 2
8821                                         __db_version_2
8822 #                               endif
8823 #                       endif
8824                 
8825 EOF
8826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8827   egrep "__db_version_2" >/dev/null 2>&1; then
8828   rm -rf conftest*
8829   ol_cv_header_db2=yes
8830 else
8831   rm -rf conftest*
8832   ol_cv_header_db2=no
8833 fi
8834 rm -f conftest*
8835
8836 fi
8837
8838 echo "$ac_t""$ol_cv_header_db2" 1>&6
8839 else
8840         ol_cv_header_db2=no
8841 fi
8842
8843
8844  
8845  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8846 echo "configure:8847: checking for Berkeley DB2" >&5
8847 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8848   echo $ac_n "(cached) $ac_c" 1>&6
8849 else
8850   
8851         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8852                 ol_cv_berkeley_db2=no
8853         else
8854                 ol_cv_berkeley_db2=yes
8855         fi
8856
8857 fi
8858
8859 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8860  if test $ol_cv_berkeley_db2 = yes ; then
8861         cat >> confdefs.h <<\EOF
8862 #define HAVE_BERKELEY_DB2 1
8863 EOF
8864
8865  fi
8866
8867
8868         if test $ol_cv_berkeley_db2 = yes ; then
8869                 ol_link_ldbm=db2
8870                 ol_with_ldbm_api=db2
8871
8872                 if test $ol_with_ldbm_type = hash ; then
8873                         cat >> confdefs.h <<\EOF
8874 #define LDBM_USE_DBHASH 1
8875 EOF
8876
8877                 else
8878                         cat >> confdefs.h <<\EOF
8879 #define LDBM_USE_DBBTREE 1
8880 EOF
8881
8882                 fi
8883
8884                                                 if test $ol_cv_lib_db2 != yes ; then
8885                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8886                 fi
8887         fi
8888 fi
8889
8890 ol_link_bdb2=no
8891 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8892         ol_link_bdb2=yes
8893 fi
8894
8895 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8896         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8897 echo "configure:8898: checking for Berkeley DB library" >&5
8898 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8899   echo $ac_n "(cached) $ac_c" 1>&6
8900 else
8901   
8902         for ac_hdr in db1/db.h
8903 do
8904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8906 echo "configure:8907: checking for $ac_hdr" >&5
8907 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8908   echo $ac_n "(cached) $ac_c" 1>&6
8909 else
8910   cat > conftest.$ac_ext <<EOF
8911 #line 8912 "configure"
8912 #include "confdefs.h"
8913 #include <$ac_hdr>
8914 EOF
8915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8916 { (eval echo configure:8917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8918 if test -z "$ac_err"; then
8919   rm -rf conftest*
8920   eval "ac_cv_header_$ac_safe=yes"
8921 else
8922   echo "$ac_err" >&5
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -rf conftest*
8926   eval "ac_cv_header_$ac_safe=no"
8927 fi
8928 rm -f conftest*
8929 fi
8930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8931   echo "$ac_t""yes" 1>&6
8932     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8933   cat >> confdefs.h <<EOF
8934 #define $ac_tr_hdr 1
8935 EOF
8936  
8937 else
8938   echo "$ac_t""no" 1>&6
8939 fi
8940 done
8941
8942         ol_LIBS="$LIBS"
8943         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8944 echo "configure:8945: checking for dbopen" >&5
8945 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8951 /* System header to define __stub macros and hopefully few prototypes,
8952     which can conflict with char dbopen(); below.  */
8953 #include <assert.h>
8954 /* Override any gcc2 internal prototype to avoid an error.  */
8955 /* We use char because int might match the return type of a gcc2
8956     builtin and then its argument prototype would still apply.  */
8957 char dbopen();
8958 char (*f)();
8959
8960 int main() {
8961
8962 /* The GNU C library defines this for functions which it implements
8963     to always fail with ENOSYS.  Some functions are actually named
8964     something starting with __ and the normal name is an alias.  */
8965 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8966 choke me
8967 #else
8968 f = dbopen;
8969 #endif
8970
8971 ; return 0; }
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8974   rm -rf conftest*
8975   eval "ac_cv_func_dbopen=yes"
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   eval "ac_cv_func_dbopen=no"
8981 fi
8982 rm -f conftest*
8983 fi
8984
8985 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8986   echo "$ac_t""yes" 1>&6
8987   ol_cv_lib_db=yes
8988 else
8989   echo "$ac_t""no" 1>&6
8990
8991                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8992 echo "configure:8993: checking for dbopen in -ldb1" >&5
8993 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
8994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8995   echo $ac_n "(cached) $ac_c" 1>&6
8996 else
8997   ac_save_LIBS="$LIBS"
8998 LIBS="-ldb1  $LIBS"
8999 cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002 /* Override any gcc2 internal prototype to avoid an error.  */
9003 /* We use char because int might match the return type of a gcc2
9004     builtin and then its argument prototype would still apply.  */
9005 char dbopen();
9006
9007 int main() {
9008 dbopen()
9009 ; return 0; }
9010 EOF
9011 if { (eval echo configure:9012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9012   rm -rf conftest*
9013   eval "ac_cv_lib_$ac_lib_var=yes"
9014 else
9015   echo "configure: failed program was:" >&5
9016   cat conftest.$ac_ext >&5
9017   rm -rf conftest*
9018   eval "ac_cv_lib_$ac_lib_var=no"
9019 fi
9020 rm -f conftest*
9021 LIBS="$ac_save_LIBS"
9022
9023 fi
9024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9025   echo "$ac_t""yes" 1>&6
9026   ol_cv_lib_db=-ldb1
9027 else
9028   echo "$ac_t""no" 1>&6
9029
9030                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
9031 echo "configure:9032: checking for dbopen in -ldb" >&5
9032 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
9033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   ac_save_LIBS="$LIBS"
9037 LIBS="-ldb  $LIBS"
9038 cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041 /* Override any gcc2 internal prototype to avoid an error.  */
9042 /* We use char because int might match the return type of a gcc2
9043     builtin and then its argument prototype would still apply.  */
9044 char dbopen();
9045
9046 int main() {
9047 dbopen()
9048 ; return 0; }
9049 EOF
9050 if { (eval echo configure:9051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9051   rm -rf conftest*
9052   eval "ac_cv_lib_$ac_lib_var=yes"
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   eval "ac_cv_lib_$ac_lib_var=no"
9058 fi
9059 rm -f conftest*
9060 LIBS="$ac_save_LIBS"
9061
9062 fi
9063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9064   echo "$ac_t""yes" 1>&6
9065   ol_cv_lib_db=-ldb
9066 else
9067   echo "$ac_t""no" 1>&6
9068 ol_cv_lib_db=no
9069 fi
9070
9071                 
9072 fi
9073
9074         
9075 fi
9076
9077         LIBS="$ol_LIBS"
9078
9079 fi
9080
9081 echo "$ac_t""$ol_cv_lib_db" 1>&6
9082
9083
9084 for ac_hdr in db_185.h
9085 do
9086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9088 echo "configure:9089: checking for $ac_hdr" >&5
9089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095 #include <$ac_hdr>
9096 EOF
9097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9098 { (eval echo configure:9099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9100 if test -z "$ac_err"; then
9101   rm -rf conftest*
9102   eval "ac_cv_header_$ac_safe=yes"
9103 else
9104   echo "$ac_err" >&5
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   eval "ac_cv_header_$ac_safe=no"
9109 fi
9110 rm -f conftest*
9111 fi
9112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9113   echo "$ac_t""yes" 1>&6
9114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9115   cat >> confdefs.h <<EOF
9116 #define $ac_tr_hdr 1
9117 EOF
9118  
9119 else
9120   echo "$ac_t""no" 1>&6
9121 fi
9122 done
9123
9124 if test "$ol_cv_header_db2" = yes ; then
9125         
9126         ol_cv_header_db=$ac_cv_header_db_185_h
9127 else
9128         ol_cv_header_db=$ac_cv_header_db_h
9129 fi
9130
9131
9132  
9133  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
9134 echo "configure:9135: checking for Berkeley DB" >&5
9135 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
9136   echo $ac_n "(cached) $ac_c" 1>&6
9137 else
9138   
9139         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
9140                 ol_cv_berkeley_db=no
9141         else
9142                 ol_cv_berkeley_db=yes
9143         fi
9144
9145 fi
9146
9147 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
9148  if test $ol_cv_berkeley_db = yes ; then
9149         cat >> confdefs.h <<\EOF
9150 #define HAVE_BERKELEY_DB 1
9151 EOF
9152
9153  fi
9154
9155
9156         if test $ol_cv_berkeley_db = yes ; then
9157                 ol_link_ldbm=db
9158                 ol_with_ldbm_api=db
9159
9160                 if test $ol_with_ldbm_type = hash ; then
9161                         cat >> confdefs.h <<\EOF
9162 #define LDBM_USE_DBHASH 1
9163 EOF
9164
9165                 else
9166                         cat >> confdefs.h <<\EOF
9167 #define LDBM_USE_DBBTREE 1
9168 EOF
9169
9170                 fi
9171
9172                                                 if test $ol_cv_lib_db != yes ; then
9173                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
9174                 fi
9175         fi
9176 fi
9177
9178 if test $ol_with_ldbm_api = manual ; then
9179                 ol_link_ldbm=yes
9180
9181         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
9182
9183         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
9184 do
9185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9187 echo "configure:9188: checking for $ac_hdr" >&5
9188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9189   echo $ac_n "(cached) $ac_c" 1>&6
9190 else
9191   cat > conftest.$ac_ext <<EOF
9192 #line 9193 "configure"
9193 #include "confdefs.h"
9194 #include <$ac_hdr>
9195 EOF
9196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9197 { (eval echo configure:9198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9199 if test -z "$ac_err"; then
9200   rm -rf conftest*
9201   eval "ac_cv_header_$ac_safe=yes"
9202 else
9203   echo "$ac_err" >&5
9204   echo "configure: failed program was:" >&5
9205   cat conftest.$ac_ext >&5
9206   rm -rf conftest*
9207   eval "ac_cv_header_$ac_safe=no"
9208 fi
9209 rm -f conftest*
9210 fi
9211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9212   echo "$ac_t""yes" 1>&6
9213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9214   cat >> confdefs.h <<EOF
9215 #define $ac_tr_hdr 1
9216 EOF
9217  
9218 else
9219   echo "$ac_t""no" 1>&6
9220 fi
9221 done
9222
9223 fi
9224
9225 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
9226         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
9227         ol_with_ldbm_api=none
9228 fi
9229
9230 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
9231         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
9232 echo "configure:9233: checking for MDBM library" >&5
9233 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236         ol_LIBS="$LIBS"
9237         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
9238 echo "configure:9239: checking for mdbm_set_chain" >&5
9239 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
9240   echo $ac_n "(cached) $ac_c" 1>&6
9241 else
9242   cat > conftest.$ac_ext <<EOF
9243 #line 9244 "configure"
9244 #include "confdefs.h"
9245 /* System header to define __stub macros and hopefully few prototypes,
9246     which can conflict with char mdbm_set_chain(); below.  */
9247 #include <assert.h>
9248 /* Override any gcc2 internal prototype to avoid an error.  */
9249 /* We use char because int might match the return type of a gcc2
9250     builtin and then its argument prototype would still apply.  */
9251 char mdbm_set_chain();
9252 char (*f)();
9253
9254 int main() {
9255
9256 /* The GNU C library defines this for functions which it implements
9257     to always fail with ENOSYS.  Some functions are actually named
9258     something starting with __ and the normal name is an alias.  */
9259 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
9260 choke me
9261 #else
9262 f = mdbm_set_chain;
9263 #endif
9264
9265 ; return 0; }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9268   rm -rf conftest*
9269   eval "ac_cv_func_mdbm_set_chain=yes"
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_func_mdbm_set_chain=no"
9275 fi
9276 rm -f conftest*
9277 fi
9278
9279 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
9280   echo "$ac_t""yes" 1>&6
9281   ol_cv_lib_mdbm=yes
9282 else
9283   echo "$ac_t""no" 1>&6
9284
9285                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
9286 echo "configure:9287: checking for mdbm_set_chain in -lmdbm" >&5
9287 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
9288 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9289   echo $ac_n "(cached) $ac_c" 1>&6
9290 else
9291   ac_save_LIBS="$LIBS"
9292 LIBS="-lmdbm  $LIBS"
9293 cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296 /* Override any gcc2 internal prototype to avoid an error.  */
9297 /* We use char because int might match the return type of a gcc2
9298     builtin and then its argument prototype would still apply.  */
9299 char mdbm_set_chain();
9300
9301 int main() {
9302 mdbm_set_chain()
9303 ; return 0; }
9304 EOF
9305 if { (eval echo configure:9306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9306   rm -rf conftest*
9307   eval "ac_cv_lib_$ac_lib_var=yes"
9308 else
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=no"
9313 fi
9314 rm -f conftest*
9315 LIBS="$ac_save_LIBS"
9316
9317 fi
9318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9319   echo "$ac_t""yes" 1>&6
9320   ol_cv_lib_mdbm=-lmdbm
9321 else
9322   echo "$ac_t""no" 1>&6
9323 ol_cv_lib_mdbm=no
9324 fi
9325
9326         
9327 fi
9328
9329         LIBS="$ol_LIBS"
9330
9331 fi
9332
9333 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
9334
9335
9336  for ac_hdr in mdbm.h
9337 do
9338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9340 echo "configure:9341: checking for $ac_hdr" >&5
9341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9342   echo $ac_n "(cached) $ac_c" 1>&6
9343 else
9344   cat > conftest.$ac_ext <<EOF
9345 #line 9346 "configure"
9346 #include "confdefs.h"
9347 #include <$ac_hdr>
9348 EOF
9349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9350 { (eval echo configure:9351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9352 if test -z "$ac_err"; then
9353   rm -rf conftest*
9354   eval "ac_cv_header_$ac_safe=yes"
9355 else
9356   echo "$ac_err" >&5
9357   echo "configure: failed program was:" >&5
9358   cat conftest.$ac_ext >&5
9359   rm -rf conftest*
9360   eval "ac_cv_header_$ac_safe=no"
9361 fi
9362 rm -f conftest*
9363 fi
9364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9365   echo "$ac_t""yes" 1>&6
9366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9367   cat >> confdefs.h <<EOF
9368 #define $ac_tr_hdr 1
9369 EOF
9370  
9371 else
9372   echo "$ac_t""no" 1>&6
9373 fi
9374 done
9375
9376  echo $ac_n "checking for db""... $ac_c" 1>&6
9377 echo "configure:9378: checking for db" >&5
9378 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
9379   echo $ac_n "(cached) $ac_c" 1>&6
9380 else
9381   
9382         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
9383                 ol_cv_mdbm=no
9384         else
9385                 ol_cv_mdbm=yes
9386         fi
9387
9388 fi
9389
9390 echo "$ac_t""$ol_cv_mdbm" 1>&6
9391  if test $ol_cv_mdbm = yes ; then
9392         cat >> confdefs.h <<\EOF
9393 #define HAVE_MDBM 1
9394 EOF
9395
9396  fi
9397
9398
9399         if test $ol_cv_mdbm = yes ; then
9400                 ol_link_ldbm=mdbm
9401                 ol_with_ldbm_api=mdbm
9402                 if test $ol_cv_lib_mdbm != yes ; then
9403                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
9404                 fi
9405         fi
9406 fi
9407
9408 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
9409         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
9410 echo "configure:9411: checking for GDBM library" >&5
9411 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
9412   echo $ac_n "(cached) $ac_c" 1>&6
9413 else
9414         ol_LIBS="$LIBS"
9415         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
9416 echo "configure:9417: checking for gdbm_open" >&5
9417 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
9418   echo $ac_n "(cached) $ac_c" 1>&6
9419 else
9420   cat > conftest.$ac_ext <<EOF
9421 #line 9422 "configure"
9422 #include "confdefs.h"
9423 /* System header to define __stub macros and hopefully few prototypes,
9424     which can conflict with char gdbm_open(); below.  */
9425 #include <assert.h>
9426 /* Override any gcc2 internal prototype to avoid an error.  */
9427 /* We use char because int might match the return type of a gcc2
9428     builtin and then its argument prototype would still apply.  */
9429 char gdbm_open();
9430 char (*f)();
9431
9432 int main() {
9433
9434 /* The GNU C library defines this for functions which it implements
9435     to always fail with ENOSYS.  Some functions are actually named
9436     something starting with __ and the normal name is an alias.  */
9437 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
9438 choke me
9439 #else
9440 f = gdbm_open;
9441 #endif
9442
9443 ; return 0; }
9444 EOF
9445 if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9446   rm -rf conftest*
9447   eval "ac_cv_func_gdbm_open=yes"
9448 else
9449   echo "configure: failed program was:" >&5
9450   cat conftest.$ac_ext >&5
9451   rm -rf conftest*
9452   eval "ac_cv_func_gdbm_open=no"
9453 fi
9454 rm -f conftest*
9455 fi
9456
9457 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
9458   echo "$ac_t""yes" 1>&6
9459   ol_cv_lib_gdbm=yes
9460 else
9461   echo "$ac_t""no" 1>&6
9462
9463                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
9464 echo "configure:9465: checking for gdbm_open in -lgdbm" >&5
9465 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
9466 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469   ac_save_LIBS="$LIBS"
9470 LIBS="-lgdbm  $LIBS"
9471 cat > conftest.$ac_ext <<EOF
9472 #line 9473 "configure"
9473 #include "confdefs.h"
9474 /* Override any gcc2 internal prototype to avoid an error.  */
9475 /* We use char because int might match the return type of a gcc2
9476     builtin and then its argument prototype would still apply.  */
9477 char gdbm_open();
9478
9479 int main() {
9480 gdbm_open()
9481 ; return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9484   rm -rf conftest*
9485   eval "ac_cv_lib_$ac_lib_var=yes"
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -rf conftest*
9490   eval "ac_cv_lib_$ac_lib_var=no"
9491 fi
9492 rm -f conftest*
9493 LIBS="$ac_save_LIBS"
9494
9495 fi
9496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9497   echo "$ac_t""yes" 1>&6
9498   ol_cv_lib_gdbm=-lgdbm
9499 else
9500   echo "$ac_t""no" 1>&6
9501 ol_cv_lib_gdbm=no
9502 fi
9503
9504         
9505 fi
9506
9507         LIBS="$ol_LIBS"
9508
9509 fi
9510
9511 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
9512
9513
9514  for ac_hdr in gdbm.h
9515 do
9516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9518 echo "configure:9519: checking for $ac_hdr" >&5
9519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9520   echo $ac_n "(cached) $ac_c" 1>&6
9521 else
9522   cat > conftest.$ac_ext <<EOF
9523 #line 9524 "configure"
9524 #include "confdefs.h"
9525 #include <$ac_hdr>
9526 EOF
9527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9528 { (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9530 if test -z "$ac_err"; then
9531   rm -rf conftest*
9532   eval "ac_cv_header_$ac_safe=yes"
9533 else
9534   echo "$ac_err" >&5
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_header_$ac_safe=no"
9539 fi
9540 rm -f conftest*
9541 fi
9542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9543   echo "$ac_t""yes" 1>&6
9544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9545   cat >> confdefs.h <<EOF
9546 #define $ac_tr_hdr 1
9547 EOF
9548  
9549 else
9550   echo "$ac_t""no" 1>&6
9551 fi
9552 done
9553
9554  echo $ac_n "checking for db""... $ac_c" 1>&6
9555 echo "configure:9556: checking for db" >&5
9556 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
9557   echo $ac_n "(cached) $ac_c" 1>&6
9558 else
9559   
9560         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
9561                 ol_cv_gdbm=no
9562         else
9563                 ol_cv_gdbm=yes
9564         fi
9565
9566 fi
9567
9568 echo "$ac_t""$ol_cv_gdbm" 1>&6
9569  if test $ol_cv_gdbm = yes ; then
9570         cat >> confdefs.h <<\EOF
9571 #define HAVE_GDBM 1
9572 EOF
9573
9574  fi
9575
9576
9577         if test $ol_cv_gdbm = yes ; then
9578                 ol_link_ldbm=gdbm
9579                 ol_with_ldbm_api=gdbm
9580
9581                 if test $ol_cv_lib_gdbm != yes ; then
9582                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
9583                 fi
9584         fi
9585 fi
9586
9587 if test $ol_with_ldbm_api = auto ; then
9588         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
9589 elif test $ol_with_ldbm_api = ndbm ; then
9590         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
9591 echo "configure:9592: checking for NDBM library" >&5
9592 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
9593   echo $ac_n "(cached) $ac_c" 1>&6
9594 else
9595         ol_LIBS="$LIBS"
9596         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
9597 echo "configure:9598: checking for dbm_open" >&5
9598 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
9599   echo $ac_n "(cached) $ac_c" 1>&6
9600 else
9601   cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 /* System header to define __stub macros and hopefully few prototypes,
9605     which can conflict with char dbm_open(); below.  */
9606 #include <assert.h>
9607 /* Override any gcc2 internal prototype to avoid an error.  */
9608 /* We use char because int might match the return type of a gcc2
9609     builtin and then its argument prototype would still apply.  */
9610 char dbm_open();
9611 char (*f)();
9612
9613 int main() {
9614
9615 /* The GNU C library defines this for functions which it implements
9616     to always fail with ENOSYS.  Some functions are actually named
9617     something starting with __ and the normal name is an alias.  */
9618 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
9619 choke me
9620 #else
9621 f = dbm_open;
9622 #endif
9623
9624 ; return 0; }
9625 EOF
9626 if { (eval echo configure:9627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9627   rm -rf conftest*
9628   eval "ac_cv_func_dbm_open=yes"
9629 else
9630   echo "configure: failed program was:" >&5
9631   cat conftest.$ac_ext >&5
9632   rm -rf conftest*
9633   eval "ac_cv_func_dbm_open=no"
9634 fi
9635 rm -f conftest*
9636 fi
9637
9638 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
9639   echo "$ac_t""yes" 1>&6
9640   ol_cv_lib_ndbm=yes
9641 else
9642   echo "$ac_t""no" 1>&6
9643
9644                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
9645 echo "configure:9646: checking for dbm_open in -lndbm" >&5
9646 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   ac_save_LIBS="$LIBS"
9651 LIBS="-lndbm  $LIBS"
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 /* Override any gcc2 internal prototype to avoid an error.  */
9656 /* We use char because int might match the return type of a gcc2
9657     builtin and then its argument prototype would still apply.  */
9658 char dbm_open();
9659
9660 int main() {
9661 dbm_open()
9662 ; return 0; }
9663 EOF
9664 if { (eval echo configure:9665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9665   rm -rf conftest*
9666   eval "ac_cv_lib_$ac_lib_var=yes"
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670   rm -rf conftest*
9671   eval "ac_cv_lib_$ac_lib_var=no"
9672 fi
9673 rm -f conftest*
9674 LIBS="$ac_save_LIBS"
9675
9676 fi
9677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9678   echo "$ac_t""yes" 1>&6
9679   ol_cv_lib_ndbm=-lndbm
9680 else
9681   echo "$ac_t""no" 1>&6
9682
9683                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
9684 echo "configure:9685: checking for dbm_open in -ldbm" >&5
9685 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
9686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9687   echo $ac_n "(cached) $ac_c" 1>&6
9688 else
9689   ac_save_LIBS="$LIBS"
9690 LIBS="-ldbm  $LIBS"
9691 cat > conftest.$ac_ext <<EOF
9692 #line 9693 "configure"
9693 #include "confdefs.h"
9694 /* Override any gcc2 internal prototype to avoid an error.  */
9695 /* We use char because int might match the return type of a gcc2
9696     builtin and then its argument prototype would still apply.  */
9697 char dbm_open();
9698
9699 int main() {
9700 dbm_open()
9701 ; return 0; }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9704   rm -rf conftest*
9705   eval "ac_cv_lib_$ac_lib_var=yes"
9706 else
9707   echo "configure: failed program was:" >&5
9708   cat conftest.$ac_ext >&5
9709   rm -rf conftest*
9710   eval "ac_cv_lib_$ac_lib_var=no"
9711 fi
9712 rm -f conftest*
9713 LIBS="$ac_save_LIBS"
9714
9715 fi
9716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9717   echo "$ac_t""yes" 1>&6
9718   ol_cv_lib_ndbm=-ldbm
9719 else
9720   echo "$ac_t""no" 1>&6
9721 ol_cv_lib_ndbm=no
9722 fi
9723                 
9724 fi
9725
9726         
9727 fi
9728
9729         LIBS="$ol_LIBS"
9730
9731 fi
9732
9733 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
9734
9735
9736  for ac_hdr in ndbm.h
9737 do
9738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9740 echo "configure:9741: checking for $ac_hdr" >&5
9741 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9742   echo $ac_n "(cached) $ac_c" 1>&6
9743 else
9744   cat > conftest.$ac_ext <<EOF
9745 #line 9746 "configure"
9746 #include "confdefs.h"
9747 #include <$ac_hdr>
9748 EOF
9749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9750 { (eval echo configure:9751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9752 if test -z "$ac_err"; then
9753   rm -rf conftest*
9754   eval "ac_cv_header_$ac_safe=yes"
9755 else
9756   echo "$ac_err" >&5
9757   echo "configure: failed program was:" >&5
9758   cat conftest.$ac_ext >&5
9759   rm -rf conftest*
9760   eval "ac_cv_header_$ac_safe=no"
9761 fi
9762 rm -f conftest*
9763 fi
9764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9765   echo "$ac_t""yes" 1>&6
9766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9767   cat >> confdefs.h <<EOF
9768 #define $ac_tr_hdr 1
9769 EOF
9770  
9771 else
9772   echo "$ac_t""no" 1>&6
9773 fi
9774 done
9775
9776  echo $ac_n "checking for db""... $ac_c" 1>&6
9777 echo "configure:9778: checking for db" >&5
9778 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
9779   echo $ac_n "(cached) $ac_c" 1>&6
9780 else
9781   
9782         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
9783                 ol_cv_ndbm=no
9784         else
9785                 ol_cv_ndbm=yes
9786         fi
9787
9788 fi
9789
9790 echo "$ac_t""$ol_cv_ndbm" 1>&6
9791  if test $ol_cv_ndbm = yes ; then
9792         cat >> confdefs.h <<\EOF
9793 #define HAVE_NDBM 1
9794 EOF
9795
9796  fi
9797
9798
9799         if test $ol_cv_ndbm = yes ; then
9800                 ol_link_ldbm=ndbm
9801                 ol_with_ldbm_api=ndbm
9802
9803                 if test $ol_cv_lib_ndbm != yes ; then
9804                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
9805                 fi
9806         fi
9807 fi
9808
9809 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
9810         echo "configure: warning: could not find suitable LDBM backend" 1>&2
9811         if test $ol_enable_ldbm = yes ; then
9812                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
9813         fi
9814
9815         echo "configure: warning: disabling LDBM" 1>&2
9816         ol_enable_ldbm=no
9817 fi
9818
9819 if test $ol_enable_wrappers != no ; then
9820         for ac_hdr in tcpd.h
9821 do
9822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9824 echo "configure:9825: checking for $ac_hdr" >&5
9825 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 #include <$ac_hdr>
9832 EOF
9833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9834 { (eval echo configure:9835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9836 if test -z "$ac_err"; then
9837   rm -rf conftest*
9838   eval "ac_cv_header_$ac_safe=yes"
9839 else
9840   echo "$ac_err" >&5
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_header_$ac_safe=no"
9845 fi
9846 rm -f conftest*
9847 fi
9848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9849   echo "$ac_t""yes" 1>&6
9850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9851   cat >> confdefs.h <<EOF
9852 #define $ac_tr_hdr 1
9853 EOF
9854  
9855 else
9856   echo "$ac_t""no" 1>&6
9857 fi
9858 done
9859
9860
9861         if test $ac_cv_header_tcpd_h != yes ; then
9862                 have_wrappers=no
9863         else
9864                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9865 echo "configure:9866: checking for main in -lwrap" >&5
9866 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
9867 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9868   echo $ac_n "(cached) $ac_c" 1>&6
9869 else
9870   ac_save_LIBS="$LIBS"
9871 LIBS="-lwrap  $LIBS"
9872 cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875
9876 int main() {
9877 main()
9878 ; return 0; }
9879 EOF
9880 if { (eval echo configure:9881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9881   rm -rf conftest*
9882   eval "ac_cv_lib_$ac_lib_var=yes"
9883 else
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -rf conftest*
9887   eval "ac_cv_lib_$ac_lib_var=no"
9888 fi
9889 rm -f conftest*
9890 LIBS="$ac_save_LIBS"
9891
9892 fi
9893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9894   echo "$ac_t""yes" 1>&6
9895   have_wrappers=yes
9896 else
9897   echo "$ac_t""no" 1>&6
9898 have_wrappers=no
9899 fi
9900
9901         fi
9902
9903         if test $have_wrappers = yes ; then
9904                 cat >> confdefs.h <<\EOF
9905 #define HAVE_TCPD 1
9906 EOF
9907
9908                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9909
9910                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9911 echo "configure:9912: checking for main in -lnsl" >&5
9912 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9914   echo $ac_n "(cached) $ac_c" 1>&6
9915 else
9916   ac_save_LIBS="$LIBS"
9917 LIBS="-lnsl  $LIBS"
9918 cat > conftest.$ac_ext <<EOF
9919 #line 9920 "configure"
9920 #include "confdefs.h"
9921
9922 int main() {
9923 main()
9924 ; return 0; }
9925 EOF
9926 if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9927   rm -rf conftest*
9928   eval "ac_cv_lib_$ac_lib_var=yes"
9929 else
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   eval "ac_cv_lib_$ac_lib_var=no"
9934 fi
9935 rm -f conftest*
9936 LIBS="$ac_save_LIBS"
9937
9938 fi
9939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9940   echo "$ac_t""yes" 1>&6
9941     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9942     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9943   cat >> confdefs.h <<EOF
9944 #define $ac_tr_lib 1
9945 EOF
9946
9947   LIBS="-lnsl $LIBS"
9948
9949 else
9950   echo "$ac_t""no" 1>&6
9951 fi
9952
9953         else
9954                 echo "configure: warning: could not find -lwrap" 1>&2
9955                 if test $ol_enable_wrappers = yes ; then
9956                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9957                 fi
9958
9959                 echo "configure: warning: disabling wrappers support" 1>&2
9960                 ol_enable_wrappers=no
9961         fi
9962 fi
9963
9964 if test $ol_enable_syslog != no ; then
9965         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9966 echo "configure:9967: checking for openlog" >&5
9967 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9968   echo $ac_n "(cached) $ac_c" 1>&6
9969 else
9970   cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 /* System header to define __stub macros and hopefully few prototypes,
9974     which can conflict with char openlog(); below.  */
9975 #include <assert.h>
9976 /* Override any gcc2 internal prototype to avoid an error.  */
9977 /* We use char because int might match the return type of a gcc2
9978     builtin and then its argument prototype would still apply.  */
9979 char openlog();
9980 char (*f)();
9981
9982 int main() {
9983
9984 /* The GNU C library defines this for functions which it implements
9985     to always fail with ENOSYS.  Some functions are actually named
9986     something starting with __ and the normal name is an alias.  */
9987 #if defined (__stub_openlog) || defined (__stub___openlog)
9988 choke me
9989 #else
9990 f = openlog;
9991 #endif
9992
9993 ; return 0; }
9994 EOF
9995 if { (eval echo configure:9996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9996   rm -rf conftest*
9997   eval "ac_cv_func_openlog=yes"
9998 else
9999   echo "configure: failed program was:" >&5
10000   cat conftest.$ac_ext >&5
10001   rm -rf conftest*
10002   eval "ac_cv_func_openlog=no"
10003 fi
10004 rm -f conftest*
10005 fi
10006
10007 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
10008   echo "$ac_t""yes" 1>&6
10009   :
10010 else
10011   echo "$ac_t""no" 1>&6
10012 fi
10013
10014         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
10015                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
10016         fi
10017         ol_enable_syslog=$ac_cv_func_openlog
10018 fi
10019
10020 if test $ol_enable_dmalloc != no ; then
10021         for ac_hdr in dmalloc.h
10022 do
10023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10025 echo "configure:10026: checking for $ac_hdr" >&5
10026 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10027   echo $ac_n "(cached) $ac_c" 1>&6
10028 else
10029   cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 #include <$ac_hdr>
10033 EOF
10034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10035 { (eval echo configure:10036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10037 if test -z "$ac_err"; then
10038   rm -rf conftest*
10039   eval "ac_cv_header_$ac_safe=yes"
10040 else
10041   echo "$ac_err" >&5
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   eval "ac_cv_header_$ac_safe=no"
10046 fi
10047 rm -f conftest*
10048 fi
10049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10050   echo "$ac_t""yes" 1>&6
10051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10052   cat >> confdefs.h <<EOF
10053 #define $ac_tr_hdr 1
10054 EOF
10055  
10056 else
10057   echo "$ac_t""no" 1>&6
10058 fi
10059 done
10060
10061         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
10062 echo "configure:10063: checking for dmalloc_shutdown in -ldmalloc" >&5
10063 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
10064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10065   echo $ac_n "(cached) $ac_c" 1>&6
10066 else
10067   ac_save_LIBS="$LIBS"
10068 LIBS="-ldmalloc  $LIBS"
10069 cat > conftest.$ac_ext <<EOF
10070 #line 10071 "configure"
10071 #include "confdefs.h"
10072 /* Override any gcc2 internal prototype to avoid an error.  */
10073 /* We use char because int might match the return type of a gcc2
10074     builtin and then its argument prototype would still apply.  */
10075 char dmalloc_shutdown();
10076
10077 int main() {
10078 dmalloc_shutdown()
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=yes"
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   eval "ac_cv_lib_$ac_lib_var=no"
10089 fi
10090 rm -f conftest*
10091 LIBS="$ac_save_LIBS"
10092
10093 fi
10094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10097     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10098   cat >> confdefs.h <<EOF
10099 #define $ac_tr_lib 1
10100 EOF
10101
10102   LIBS="-ldmalloc $LIBS"
10103
10104 else
10105   echo "$ac_t""no" 1>&6
10106 fi
10107
10108 fi
10109
10110 if test $ol_enable_tcl != no ; then
10111         for ac_hdr in tcl.h
10112 do
10113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10115 echo "configure:10116: checking for $ac_hdr" >&5
10116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10117   echo $ac_n "(cached) $ac_c" 1>&6
10118 else
10119   cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122 #include <$ac_hdr>
10123 EOF
10124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10125 { (eval echo configure:10126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10127 if test -z "$ac_err"; then
10128   rm -rf conftest*
10129   eval "ac_cv_header_$ac_safe=yes"
10130 else
10131   echo "$ac_err" >&5
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   rm -rf conftest*
10135   eval "ac_cv_header_$ac_safe=no"
10136 fi
10137 rm -f conftest*
10138 fi
10139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10140   echo "$ac_t""yes" 1>&6
10141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10142   cat >> confdefs.h <<EOF
10143 #define $ac_tr_hdr 1
10144 EOF
10145  
10146 else
10147   echo "$ac_t""no" 1>&6
10148 fi
10149 done
10150
10151
10152         if test $ac_cv_header_tcl_h != yes ; then
10153                 have_tcl=no
10154         else
10155                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
10156 echo "configure:10157: checking for main in -ltcl" >&5
10157 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
10158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   ac_save_LIBS="$LIBS"
10162 LIBS="-ltcl  $LIBS"
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166
10167 int main() {
10168 main()
10169 ; return 0; }
10170 EOF
10171 if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10172   rm -rf conftest*
10173   eval "ac_cv_lib_$ac_lib_var=yes"
10174 else
10175   echo "configure: failed program was:" >&5
10176   cat conftest.$ac_ext >&5
10177   rm -rf conftest*
10178   eval "ac_cv_lib_$ac_lib_var=no"
10179 fi
10180 rm -f conftest*
10181 LIBS="$ac_save_LIBS"
10182
10183 fi
10184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10185   echo "$ac_t""yes" 1>&6
10186   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
10187 else
10188   echo "$ac_t""no" 1>&6
10189 have_tcl=no
10190 fi
10191
10192
10193                 if test $have_tcl != yes; then
10194                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
10195 echo "configure:10196: checking for main in -ltcl7.6" >&5
10196 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
10197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   ac_save_LIBS="$LIBS"
10201 LIBS="-ltcl7.6  $LIBS"
10202 cat > conftest.$ac_ext <<EOF
10203 #line 10204 "configure"
10204 #include "confdefs.h"
10205
10206 int main() {
10207 main()
10208 ; return 0; }
10209 EOF
10210 if { (eval echo configure:10211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10211   rm -rf conftest*
10212   eval "ac_cv_lib_$ac_lib_var=yes"
10213 else
10214   echo "configure: failed program was:" >&5
10215   cat conftest.$ac_ext >&5
10216   rm -rf conftest*
10217   eval "ac_cv_lib_$ac_lib_var=no"
10218 fi
10219 rm -f conftest*
10220 LIBS="$ac_save_LIBS"
10221
10222 fi
10223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10224   echo "$ac_t""yes" 1>&6
10225   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
10226 else
10227   echo "$ac_t""no" 1>&6
10228 have_tcl=no
10229 fi
10230
10231                 fi
10232
10233                 if test $have_tcl != yes; then
10234                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
10235 echo "configure:10236: checking for main in -ltcl8.0" >&5
10236 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
10237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10238   echo $ac_n "(cached) $ac_c" 1>&6
10239 else
10240   ac_save_LIBS="$LIBS"
10241 LIBS="-ltcl8.0  $LIBS"
10242 cat > conftest.$ac_ext <<EOF
10243 #line 10244 "configure"
10244 #include "confdefs.h"
10245
10246 int main() {
10247 main()
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10251   rm -rf conftest*
10252   eval "ac_cv_lib_$ac_lib_var=yes"
10253 else
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_lib_$ac_lib_var=no"
10258 fi
10259 rm -f conftest*
10260 LIBS="$ac_save_LIBS"
10261
10262 fi
10263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10264   echo "$ac_t""yes" 1>&6
10265   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
10266 else
10267   echo "$ac_t""no" 1>&6
10268 have_tcl=no
10269 fi
10270
10271                 fi
10272         fi
10273
10274         if test $have_tcl != yes ; then
10275                 echo "configure: warning: could not find -ltcl" 1>&2
10276                 if test $ol_enable_tcl = yes ; then
10277                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
10278                 fi
10279
10280                 ol_enable_tcl=no
10281         fi
10282 fi
10283
10284 # ud needs termcap (should insert check here)
10285 ol_link_termcap=no
10286 for ac_hdr in termcap.h ncurses.h
10287 do
10288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10290 echo "configure:10291: checking for $ac_hdr" >&5
10291 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10292   echo $ac_n "(cached) $ac_c" 1>&6
10293 else
10294   cat > conftest.$ac_ext <<EOF
10295 #line 10296 "configure"
10296 #include "confdefs.h"
10297 #include <$ac_hdr>
10298 EOF
10299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10300 { (eval echo configure:10301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10302 if test -z "$ac_err"; then
10303   rm -rf conftest*
10304   eval "ac_cv_header_$ac_safe=yes"
10305 else
10306   echo "$ac_err" >&5
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -rf conftest*
10310   eval "ac_cv_header_$ac_safe=no"
10311 fi
10312 rm -f conftest*
10313 fi
10314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10315   echo "$ac_t""yes" 1>&6
10316     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10317   cat >> confdefs.h <<EOF
10318 #define $ac_tr_hdr 1
10319 EOF
10320  
10321 else
10322   echo "$ac_t""no" 1>&6
10323 fi
10324 done
10325
10326
10327 if test $ol_link_termcap = no ; then
10328         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
10329 echo "configure:10330: checking for tputs in -ltermcap" >&5
10330 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
10331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10332   echo $ac_n "(cached) $ac_c" 1>&6
10333 else
10334   ac_save_LIBS="$LIBS"
10335 LIBS="-ltermcap  $LIBS"
10336 cat > conftest.$ac_ext <<EOF
10337 #line 10338 "configure"
10338 #include "confdefs.h"
10339 /* Override any gcc2 internal prototype to avoid an error.  */
10340 /* We use char because int might match the return type of a gcc2
10341     builtin and then its argument prototype would still apply.  */
10342 char tputs();
10343
10344 int main() {
10345 tputs()
10346 ; return 0; }
10347 EOF
10348 if { (eval echo configure:10349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10349   rm -rf conftest*
10350   eval "ac_cv_lib_$ac_lib_var=yes"
10351 else
10352   echo "configure: failed program was:" >&5
10353   cat conftest.$ac_ext >&5
10354   rm -rf conftest*
10355   eval "ac_cv_lib_$ac_lib_var=no"
10356 fi
10357 rm -f conftest*
10358 LIBS="$ac_save_LIBS"
10359
10360 fi
10361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10362   echo "$ac_t""yes" 1>&6
10363   have_termcap=yes
10364 else
10365   echo "$ac_t""no" 1>&6
10366 have_termcap=no
10367 fi
10368
10369         if test $have_termcap = yes ; then
10370                 cat >> confdefs.h <<\EOF
10371 #define HAVE_TERMCAP 1
10372 EOF
10373
10374                 ol_link_termcap=yes
10375                 TERMCAP_LIBS=-ltermcap
10376         fi
10377 fi
10378
10379 if test $ol_link_termcap = no ; then
10380         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
10381 echo "configure:10382: checking for initscr in -lncurses" >&5
10382 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
10383 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10384   echo $ac_n "(cached) $ac_c" 1>&6
10385 else
10386   ac_save_LIBS="$LIBS"
10387 LIBS="-lncurses  $LIBS"
10388 cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391 /* Override any gcc2 internal prototype to avoid an error.  */
10392 /* We use char because int might match the return type of a gcc2
10393     builtin and then its argument prototype would still apply.  */
10394 char initscr();
10395
10396 int main() {
10397 initscr()
10398 ; return 0; }
10399 EOF
10400 if { (eval echo configure:10401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10401   rm -rf conftest*
10402   eval "ac_cv_lib_$ac_lib_var=yes"
10403 else
10404   echo "configure: failed program was:" >&5
10405   cat conftest.$ac_ext >&5
10406   rm -rf conftest*
10407   eval "ac_cv_lib_$ac_lib_var=no"
10408 fi
10409 rm -f conftest*
10410 LIBS="$ac_save_LIBS"
10411
10412 fi
10413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10414   echo "$ac_t""yes" 1>&6
10415   have_ncurses=yes
10416 else
10417   echo "$ac_t""no" 1>&6
10418 have_ncurses=no
10419 fi
10420
10421         if test $have_ncurses = yes ; then
10422                 cat >> confdefs.h <<\EOF
10423 #define HAVE_NCURSES 1
10424 EOF
10425
10426                 ol_link_termcap=yes
10427                 TERMCAP_LIBS=-lncurses
10428         fi
10429 fi
10430
10431 if test $ol_link_termcap = no ; then
10432         cat >> confdefs.h <<\EOF
10433 #define NO_TERMCAP 1
10434 EOF
10435
10436         TERMCAP_LIBS=
10437 fi
10438
10439 ol_link_sasl=no
10440 if test $ol_with_cyrus_sasl != no ; then
10441         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
10442 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
10443 echo "configure:10444: checking for sasl.h" >&5
10444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 #include <sasl.h>
10451 EOF
10452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10453 { (eval echo configure:10454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10455 if test -z "$ac_err"; then
10456   rm -rf conftest*
10457   eval "ac_cv_header_$ac_safe=yes"
10458 else
10459   echo "$ac_err" >&5
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   eval "ac_cv_header_$ac_safe=no"
10464 fi
10465 rm -f conftest*
10466 fi
10467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10468   echo "$ac_t""yes" 1>&6
10469   :
10470 else
10471   echo "$ac_t""no" 1>&6
10472 fi
10473
10474
10475         if test $ac_cv_header_sasl_h = yes ; then
10476                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
10477 echo "configure:10478: checking for sasl_client_init in -lsasl" >&5
10478 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
10479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   ac_save_LIBS="$LIBS"
10483 LIBS="-lsasl  $LIBS"
10484 cat > conftest.$ac_ext <<EOF
10485 #line 10486 "configure"
10486 #include "confdefs.h"
10487 /* Override any gcc2 internal prototype to avoid an error.  */
10488 /* We use char because int might match the return type of a gcc2
10489     builtin and then its argument prototype would still apply.  */
10490 char sasl_client_init();
10491
10492 int main() {
10493 sasl_client_init()
10494 ; return 0; }
10495 EOF
10496 if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10497   rm -rf conftest*
10498   eval "ac_cv_lib_$ac_lib_var=yes"
10499 else
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=no"
10504 fi
10505 rm -f conftest*
10506 LIBS="$ac_save_LIBS"
10507
10508 fi
10509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10510   echo "$ac_t""yes" 1>&6
10511   have_cyrus_sasl=yes
10512 else
10513   echo "$ac_t""no" 1>&6
10514 have_cyrus_sasl=no
10515 fi
10516
10517
10518                 if test $have_cyrus_sasl != no ; then
10519                         LUTIL_LIBS="$LUTIL_LIBS -lsasl"
10520                         cat >> confdefs.h <<\EOF
10521 #define HAVE_CYRUS_SASL 1
10522 EOF
10523
10524                         ol_link_sasl=yes
10525                 fi
10526         fi
10527
10528         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
10529                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
10530         fi
10531 fi
10532
10533 ol_link_fetch=no
10534 if test $ol_with_fetch != no ; then
10535         ol=$LIBS
10536 LIBS="-lfetch -lcom_err $LIBS"
10537 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
10538 echo "configure:10539: checking fetch(3) library" >&5
10539 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   
10543         cat > conftest.$ac_ext <<EOF
10544 #line 10545 "configure"
10545 #include "confdefs.h"
10546
10547 #include <sys/param.h>
10548 #include <stdio.h>
10549 #include <fetch.h>
10550 int main() {
10551 struct url *u = fetchParseURL("file:///"); 
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   ol_cv_lib_fetch=yes
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   ol_cv_lib_fetch=no
10562 fi
10563 rm -f conftest*
10564 fi
10565
10566 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
10567 LIBS=$ol_LIBS
10568 if test $ol_cv_lib_fetch != no ; then
10569         ol_link_fetch="-lfetch -lcom_err"
10570         cat >> confdefs.h <<\EOF
10571 #define HAVE_FETCH 1
10572 EOF
10573
10574 fi
10575
10576
10577         if test $ol_cv_lib_fetch != no ; then
10578                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
10579                 ol_link_fetch=freebsd
10580
10581         elif test $ol_with_fetch != auto ; then
10582                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
10583         fi 
10584 fi
10585
10586 ol_link_readline=no
10587 if test $ol_with_readline != no ; then
10588         for ac_hdr in readline/readline.h readline/history.h
10589 do
10590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10592 echo "configure:10593: checking for $ac_hdr" >&5
10593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10594   echo $ac_n "(cached) $ac_c" 1>&6
10595 else
10596   cat > conftest.$ac_ext <<EOF
10597 #line 10598 "configure"
10598 #include "confdefs.h"
10599 #include <$ac_hdr>
10600 EOF
10601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10602 { (eval echo configure:10603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10604 if test -z "$ac_err"; then
10605   rm -rf conftest*
10606   eval "ac_cv_header_$ac_safe=yes"
10607 else
10608   echo "$ac_err" >&5
10609   echo "configure: failed program was:" >&5
10610   cat conftest.$ac_ext >&5
10611   rm -rf conftest*
10612   eval "ac_cv_header_$ac_safe=no"
10613 fi
10614 rm -f conftest*
10615 fi
10616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10619   cat >> confdefs.h <<EOF
10620 #define $ac_tr_hdr 1
10621 EOF
10622  
10623 else
10624   echo "$ac_t""no" 1>&6
10625 fi
10626 done
10627
10628
10629         if test $ac_cv_header_readline_readline_h = yes ; then
10630                 save_LIBS="$LIBS"
10631                 LIBS="$TERMCAP_LIBS $LIBS"
10632                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
10633 echo "configure:10634: checking for readline in -lreadline" >&5
10634 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
10635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10636   echo $ac_n "(cached) $ac_c" 1>&6
10637 else
10638   ac_save_LIBS="$LIBS"
10639 LIBS="-lreadline  $LIBS"
10640 cat > conftest.$ac_ext <<EOF
10641 #line 10642 "configure"
10642 #include "confdefs.h"
10643 /* Override any gcc2 internal prototype to avoid an error.  */
10644 /* We use char because int might match the return type of a gcc2
10645     builtin and then its argument prototype would still apply.  */
10646 char readline();
10647
10648 int main() {
10649 readline()
10650 ; return 0; }
10651 EOF
10652 if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10653   rm -rf conftest*
10654   eval "ac_cv_lib_$ac_lib_var=yes"
10655 else
10656   echo "configure: failed program was:" >&5
10657   cat conftest.$ac_ext >&5
10658   rm -rf conftest*
10659   eval "ac_cv_lib_$ac_lib_var=no"
10660 fi
10661 rm -f conftest*
10662 LIBS="$ac_save_LIBS"
10663
10664 fi
10665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667   have_readline=yes
10668 else
10669   echo "$ac_t""no" 1>&6
10670 have_readline=no
10671 fi
10672
10673                 LIBS="$save_LIBS"
10674                         
10675                 if test $have_readline = yes ; then
10676                         ol_with_readline=found
10677                         ol_link_readline=yes
10678
10679                         READLINE_LIBS="-lreadline"
10680                 fi
10681         fi
10682 fi
10683
10684 if test $ol_link_readline = yes ; then
10685         cat >> confdefs.h <<\EOF
10686 #define HAVE_READLINE 1
10687 EOF
10688
10689 fi
10690
10691
10692 # FreeBSD (and others) have crypt(3) in -lcrypt
10693 if test $ol_enable_crypt != no ; then
10694         echo $ac_n "checking for crypt""... $ac_c" 1>&6
10695 echo "configure:10696: checking for crypt" >&5
10696 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
10697   echo $ac_n "(cached) $ac_c" 1>&6
10698 else
10699   cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702 /* System header to define __stub macros and hopefully few prototypes,
10703     which can conflict with char crypt(); below.  */
10704 #include <assert.h>
10705 /* Override any gcc2 internal prototype to avoid an error.  */
10706 /* We use char because int might match the return type of a gcc2
10707     builtin and then its argument prototype would still apply.  */
10708 char crypt();
10709 char (*f)();
10710
10711 int main() {
10712
10713 /* The GNU C library defines this for functions which it implements
10714     to always fail with ENOSYS.  Some functions are actually named
10715     something starting with __ and the normal name is an alias.  */
10716 #if defined (__stub_crypt) || defined (__stub___crypt)
10717 choke me
10718 #else
10719 f = crypt;
10720 #endif
10721
10722 ; return 0; }
10723 EOF
10724 if { (eval echo configure:10725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10725   rm -rf conftest*
10726   eval "ac_cv_func_crypt=yes"
10727 else
10728   echo "configure: failed program was:" >&5
10729   cat conftest.$ac_ext >&5
10730   rm -rf conftest*
10731   eval "ac_cv_func_crypt=no"
10732 fi
10733 rm -f conftest*
10734 fi
10735
10736 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
10737   echo "$ac_t""yes" 1>&6
10738   have_crypt=yes
10739 else
10740   echo "$ac_t""no" 1>&6
10741
10742                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10743 echo "configure:10744: checking for crypt in -lcrypt" >&5
10744 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
10745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   ac_save_LIBS="$LIBS"
10749 LIBS="-lcrypt  $LIBS"
10750 cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753 /* Override any gcc2 internal prototype to avoid an error.  */
10754 /* We use char because int might match the return type of a gcc2
10755     builtin and then its argument prototype would still apply.  */
10756 char crypt();
10757
10758 int main() {
10759 crypt()
10760 ; return 0; }
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10763   rm -rf conftest*
10764   eval "ac_cv_lib_$ac_lib_var=yes"
10765 else
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -rf conftest*
10769   eval "ac_cv_lib_$ac_lib_var=no"
10770 fi
10771 rm -f conftest*
10772 LIBS="$ac_save_LIBS"
10773
10774 fi
10775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10776   echo "$ac_t""yes" 1>&6
10777   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
10778                         have_crypt=yes
10779 else
10780   echo "$ac_t""no" 1>&6
10781 have_crypt=no
10782 fi
10783
10784 fi
10785
10786
10787         if test $have_crypt = yes ; then
10788                 cat >> confdefs.h <<\EOF
10789 #define HAVE_CRYPT 1
10790 EOF
10791
10792         else
10793                 echo "configure: warning: could not find crypt" 1>&2
10794                 if test $ol_enable_crypt = yes ; then
10795                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
10796                 fi
10797
10798                 echo "configure: warning: disabling crypt support" 1>&2
10799                 ol_enable_crypt=no
10800         fi
10801 fi
10802
10803 # FreeBSD (and others) have setproctitle(3) in -lutil
10804 if test $ol_enable_proctitle != no ; then
10805         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
10806 echo "configure:10807: checking for setproctitle" >&5
10807 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
10808   echo $ac_n "(cached) $ac_c" 1>&6
10809 else
10810   cat > conftest.$ac_ext <<EOF
10811 #line 10812 "configure"
10812 #include "confdefs.h"
10813 /* System header to define __stub macros and hopefully few prototypes,
10814     which can conflict with char setproctitle(); below.  */
10815 #include <assert.h>
10816 /* Override any gcc2 internal prototype to avoid an error.  */
10817 /* We use char because int might match the return type of a gcc2
10818     builtin and then its argument prototype would still apply.  */
10819 char setproctitle();
10820 char (*f)();
10821
10822 int main() {
10823
10824 /* The GNU C library defines this for functions which it implements
10825     to always fail with ENOSYS.  Some functions are actually named
10826     something starting with __ and the normal name is an alias.  */
10827 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
10828 choke me
10829 #else
10830 f = setproctitle;
10831 #endif
10832
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   eval "ac_cv_func_setproctitle=yes"
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_func_setproctitle=no"
10843 fi
10844 rm -f conftest*
10845 fi
10846
10847 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
10848   echo "$ac_t""yes" 1>&6
10849   have_setproctitle=yes
10850 else
10851   echo "$ac_t""no" 1>&6
10852
10853                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
10854 echo "configure:10855: checking for setproctitle in -lutil" >&5
10855 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
10856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   ac_save_LIBS="$LIBS"
10860 LIBS="-lutil  $LIBS"
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 /* Override any gcc2 internal prototype to avoid an error.  */
10865 /* We use char because int might match the return type of a gcc2
10866     builtin and then its argument prototype would still apply.  */
10867 char setproctitle();
10868
10869 int main() {
10870 setproctitle()
10871 ; return 0; }
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10874   rm -rf conftest*
10875   eval "ac_cv_lib_$ac_lib_var=yes"
10876 else
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -rf conftest*
10880   eval "ac_cv_lib_$ac_lib_var=no"
10881 fi
10882 rm -f conftest*
10883 LIBS="$ac_save_LIBS"
10884
10885 fi
10886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888   have_setproctitle=yes
10889                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
10890 else
10891   echo "$ac_t""no" 1>&6
10892 have_setproctitle=no
10893                         LIBOBJS="$LIBOBJS setproctitle.o"
10894 fi
10895
10896 fi
10897
10898
10899         if test $have_setproctitle = yes ; then
10900                 cat >> confdefs.h <<\EOF
10901 #define HAVE_SETPROCTITLE 1
10902 EOF
10903
10904         fi
10905 fi
10906
10907 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10908 echo "configure:10909: checking for uid_t in sys/types.h" >&5
10909 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10910   echo $ac_n "(cached) $ac_c" 1>&6
10911 else
10912   cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915 #include <sys/types.h>
10916 EOF
10917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10918   egrep "uid_t" >/dev/null 2>&1; then
10919   rm -rf conftest*
10920   ac_cv_type_uid_t=yes
10921 else
10922   rm -rf conftest*
10923   ac_cv_type_uid_t=no
10924 fi
10925 rm -f conftest*
10926
10927 fi
10928
10929 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10930 if test $ac_cv_type_uid_t = no; then
10931   cat >> confdefs.h <<\EOF
10932 #define uid_t int
10933 EOF
10934
10935   cat >> confdefs.h <<\EOF
10936 #define gid_t int
10937 EOF
10938
10939 fi
10940
10941 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10942 echo "configure:10943: checking type of array argument to getgroups" >&5
10943 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10944   echo $ac_n "(cached) $ac_c" 1>&6
10945 else
10946   if test "$cross_compiling" = yes; then
10947   ac_cv_type_getgroups=cross
10948 else
10949   cat > conftest.$ac_ext <<EOF
10950 #line 10951 "configure"
10951 #include "confdefs.h"
10952
10953 /* Thanks to Mike Rendell for this test.  */
10954 #include <sys/types.h>
10955 #define NGID 256
10956 #undef MAX
10957 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10958 main()
10959 {
10960   gid_t gidset[NGID];
10961   int i, n;
10962   union { gid_t gval; long lval; }  val;
10963
10964   val.lval = -1;
10965   for (i = 0; i < NGID; i++)
10966     gidset[i] = val.gval;
10967   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10968                  gidset);
10969   /* Exit non-zero if getgroups seems to require an array of ints.  This
10970      happens when gid_t is short but getgroups modifies an array of ints.  */
10971   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10972 }
10973
10974 EOF
10975 if { (eval echo configure:10976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10976 then
10977     ac_cv_type_getgroups=gid_t
10978 else
10979   echo "configure: failed program was:" >&5
10980   cat conftest.$ac_ext >&5
10981   rm -fr conftest*
10982   ac_cv_type_getgroups=int
10983 fi
10984 rm -fr conftest*
10985 fi
10986
10987 if test $ac_cv_type_getgroups = cross; then
10988         cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 #include <unistd.h>
10992 EOF
10993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10994   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10995   rm -rf conftest*
10996   ac_cv_type_getgroups=gid_t
10997 else
10998   rm -rf conftest*
10999   ac_cv_type_getgroups=int
11000 fi
11001 rm -f conftest*
11002
11003 fi
11004 fi
11005
11006 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
11007 cat >> confdefs.h <<EOF
11008 #define GETGROUPS_T $ac_cv_type_getgroups
11009 EOF
11010
11011  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11012 echo "configure:11013: checking for ANSI C header files" >&5
11013 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <stdlib.h>
11020 #include <stdarg.h>
11021 #include <string.h>
11022 #include <float.h>
11023 EOF
11024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11025 { (eval echo configure:11026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11027 if test -z "$ac_err"; then
11028   rm -rf conftest*
11029   ac_cv_header_stdc=yes
11030 else
11031   echo "$ac_err" >&5
11032   echo "configure: failed program was:" >&5
11033   cat conftest.$ac_ext >&5
11034   rm -rf conftest*
11035   ac_cv_header_stdc=no
11036 fi
11037 rm -f conftest*
11038
11039 if test $ac_cv_header_stdc = yes; then
11040   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11041 cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include <string.h>
11045 EOF
11046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11047   egrep "memchr" >/dev/null 2>&1; then
11048   :
11049 else
11050   rm -rf conftest*
11051   ac_cv_header_stdc=no
11052 fi
11053 rm -f conftest*
11054
11055 fi
11056
11057 if test $ac_cv_header_stdc = yes; then
11058   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11059 cat > conftest.$ac_ext <<EOF
11060 #line 11061 "configure"
11061 #include "confdefs.h"
11062 #include <stdlib.h>
11063 EOF
11064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11065   egrep "free" >/dev/null 2>&1; then
11066   :
11067 else
11068   rm -rf conftest*
11069   ac_cv_header_stdc=no
11070 fi
11071 rm -f conftest*
11072
11073 fi
11074
11075 if test $ac_cv_header_stdc = yes; then
11076   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11077 if test "$cross_compiling" = yes; then
11078   :
11079 else
11080   cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 #include <ctype.h>
11084 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11085 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11086 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11087 int main () { int i; for (i = 0; i < 256; i++)
11088 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
11089 exit (0); }
11090
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11093 then
11094   :
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -fr conftest*
11099   ac_cv_header_stdc=no
11100 fi
11101 rm -fr conftest*
11102 fi
11103
11104 fi
11105 fi
11106
11107 echo "$ac_t""$ac_cv_header_stdc" 1>&6
11108 if test $ac_cv_header_stdc = yes; then
11109   cat >> confdefs.h <<\EOF
11110 #define STDC_HEADERS 1
11111 EOF
11112
11113 fi
11114
11115 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
11116 echo "configure:11117: checking for mode_t" >&5
11117 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
11118   echo $ac_n "(cached) $ac_c" 1>&6
11119 else
11120   cat > conftest.$ac_ext <<EOF
11121 #line 11122 "configure"
11122 #include "confdefs.h"
11123 #include <sys/types.h>
11124 #if STDC_HEADERS
11125 #include <stdlib.h>
11126 #include <stddef.h>
11127 #endif
11128 EOF
11129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11130   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11131   rm -rf conftest*
11132   eval "ac_cv_type_mode_t=yes"
11133 else
11134   rm -rf conftest*
11135   eval "ac_cv_type_mode_t=no"
11136 fi
11137 rm -f conftest*
11138
11139 fi
11140 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
11141   echo "$ac_t""yes" 1>&6
11142 else
11143   echo "$ac_t""no" 1>&6
11144   cat >> confdefs.h <<EOF
11145 #define mode_t int
11146 EOF
11147
11148 fi
11149
11150 echo $ac_n "checking for off_t""... $ac_c" 1>&6
11151 echo "configure:11152: checking for off_t" >&5
11152 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
11153   echo $ac_n "(cached) $ac_c" 1>&6
11154 else
11155   cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 #include <sys/types.h>
11159 #if STDC_HEADERS
11160 #include <stdlib.h>
11161 #include <stddef.h>
11162 #endif
11163 EOF
11164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11165   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11166   rm -rf conftest*
11167   eval "ac_cv_type_off_t=yes"
11168 else
11169   rm -rf conftest*
11170   eval "ac_cv_type_off_t=no"
11171 fi
11172 rm -f conftest*
11173
11174 fi
11175 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
11176   echo "$ac_t""yes" 1>&6
11177 else
11178   echo "$ac_t""no" 1>&6
11179   cat >> confdefs.h <<EOF
11180 #define off_t long
11181 EOF
11182
11183 fi
11184
11185 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
11186 echo "configure:11187: checking for pid_t" >&5
11187 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
11188   echo $ac_n "(cached) $ac_c" 1>&6
11189 else
11190   cat > conftest.$ac_ext <<EOF
11191 #line 11192 "configure"
11192 #include "confdefs.h"
11193 #include <sys/types.h>
11194 #if STDC_HEADERS
11195 #include <stdlib.h>
11196 #include <stddef.h>
11197 #endif
11198 EOF
11199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11200   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11201   rm -rf conftest*
11202   eval "ac_cv_type_pid_t=yes"
11203 else
11204   rm -rf conftest*
11205   eval "ac_cv_type_pid_t=no"
11206 fi
11207 rm -f conftest*
11208
11209 fi
11210 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
11211   echo "$ac_t""yes" 1>&6
11212 else
11213   echo "$ac_t""no" 1>&6
11214   cat >> confdefs.h <<EOF
11215 #define pid_t int
11216 EOF
11217
11218 fi
11219
11220 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
11221 echo "configure:11222: checking for ptrdiff_t" >&5
11222 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
11223   echo $ac_n "(cached) $ac_c" 1>&6
11224 else
11225   cat > conftest.$ac_ext <<EOF
11226 #line 11227 "configure"
11227 #include "confdefs.h"
11228 #include <stddef.h>
11229 int main() {
11230 ptrdiff_t p
11231 ; return 0; }
11232 EOF
11233 if { (eval echo configure:11234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11234   rm -rf conftest*
11235   am_cv_type_ptrdiff_t=yes
11236 else
11237   echo "configure: failed program was:" >&5
11238   cat conftest.$ac_ext >&5
11239   rm -rf conftest*
11240   am_cv_type_ptrdiff_t=no
11241 fi
11242 rm -f conftest*
11243 fi
11244
11245 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
11246    if test $am_cv_type_ptrdiff_t = yes; then
11247      cat >> confdefs.h <<\EOF
11248 #define HAVE_PTRDIFF_T 1
11249 EOF
11250
11251    fi
11252
11253 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
11254 echo "configure:11255: checking return type of signal handlers" >&5
11255 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 #include <sys/types.h>
11262 #include <signal.h>
11263 #ifdef signal
11264 #undef signal
11265 #endif
11266 #ifdef __cplusplus
11267 extern "C" void (*signal (int, void (*)(int)))(int);
11268 #else
11269 void (*signal ()) ();
11270 #endif
11271
11272 int main() {
11273 int i;
11274 ; return 0; }
11275 EOF
11276 if { (eval echo configure:11277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11277   rm -rf conftest*
11278   ac_cv_type_signal=void
11279 else
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   ac_cv_type_signal=int
11284 fi
11285 rm -f conftest*
11286 fi
11287
11288 echo "$ac_t""$ac_cv_type_signal" 1>&6
11289 cat >> confdefs.h <<EOF
11290 #define RETSIGTYPE $ac_cv_type_signal
11291 EOF
11292
11293
11294 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
11295 echo "configure:11296: checking for sig_atomic_t" >&5
11296 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
11297   echo $ac_n "(cached) $ac_c" 1>&6
11298 else
11299   cat > conftest.$ac_ext <<EOF
11300 #line 11301 "configure"
11301 #include "confdefs.h"
11302 #include <signal.h>
11303 int main() {
11304 sig_atomic_t atomic;
11305 ; return 0; }
11306 EOF
11307 if { (eval echo configure:11308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11308   rm -rf conftest*
11309   ol_cv_type_sig_atomic_t=yes
11310 else
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -rf conftest*
11314   ol_cv_type_sig_atomic_t=no
11315 fi
11316 rm -f conftest*
11317 fi
11318
11319 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
11320   if test $ol_cv_type_sig_atomic_t = no; then
11321     cat >> confdefs.h <<\EOF
11322 #define sig_atomic_t int
11323 EOF
11324
11325   fi
11326  
11327 echo $ac_n "checking for size_t""... $ac_c" 1>&6
11328 echo "configure:11329: checking for size_t" >&5
11329 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
11330   echo $ac_n "(cached) $ac_c" 1>&6
11331 else
11332   cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335 #include <sys/types.h>
11336 #if STDC_HEADERS
11337 #include <stdlib.h>
11338 #include <stddef.h>
11339 #endif
11340 EOF
11341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11342   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
11343   rm -rf conftest*
11344   eval "ac_cv_type_size_t=yes"
11345 else
11346   rm -rf conftest*
11347   eval "ac_cv_type_size_t=no"
11348 fi
11349 rm -f conftest*
11350
11351 fi
11352 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
11353   echo "$ac_t""yes" 1>&6
11354 else
11355   echo "$ac_t""no" 1>&6
11356   cat >> confdefs.h <<EOF
11357 #define size_t unsigned
11358 EOF
11359
11360 fi
11361
11362 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
11363 echo "configure:11364: checking for socklen_t" >&5
11364 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
11365   echo $ac_n "(cached) $ac_c" 1>&6
11366 else
11367   cat > conftest.$ac_ext <<EOF
11368 #line 11369 "configure"
11369 #include "confdefs.h"
11370
11371 #ifdef HAVE_SYS_TYPES_H
11372 #include <sys/types.h>
11373 #endif
11374 #ifdef HAVE_SYS_SOCKET_H
11375 #include <sys/socket.h>
11376 #endif
11377
11378 int main() {
11379 socklen_t len;
11380 ; return 0; }
11381 EOF
11382 if { (eval echo configure:11383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11383   rm -rf conftest*
11384   ol_cv_type_socklen_t=yes
11385 else
11386   echo "configure: failed program was:" >&5
11387   cat conftest.$ac_ext >&5
11388   rm -rf conftest*
11389   ol_cv_type_socklen_t=no
11390 fi
11391 rm -f conftest*
11392 fi
11393
11394 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
11395   if test $ol_cv_type_socklen_t = no; then
11396     cat >> confdefs.h <<\EOF
11397 #define socklen_t int
11398 EOF
11399
11400   fi
11401  
11402 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
11403 echo "configure:11404: checking for member st_blksize in aggregate type struct stat" >&5
11404 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 #include <sys/types.h>
11411 #include <sys/stat.h>
11412 int main() {
11413 struct stat foo; foo.st_blksize;
11414 ; return 0; }
11415 EOF
11416 if { (eval echo configure:11417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11417   rm -rf conftest*
11418   ac_cv_c_struct_member_st_blksize=yes
11419 else
11420   echo "configure: failed program was:" >&5
11421   cat conftest.$ac_ext >&5
11422   rm -rf conftest*
11423   ac_cv_c_struct_member_st_blksize=no
11424 fi
11425 rm -f conftest*
11426 fi
11427
11428 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
11429 st_blksize="$ac_cv_c_struct_member_st_blksize"
11430 if test $ac_cv_c_struct_member_st_blksize = yes; then
11431   cat >> confdefs.h <<\EOF
11432 #define HAVE_ST_BLKSIZE 1
11433 EOF
11434
11435 fi
11436
11437 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
11438 echo "configure:11439: checking whether time.h and sys/time.h may both be included" >&5
11439 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
11440   echo $ac_n "(cached) $ac_c" 1>&6
11441 else
11442   cat > conftest.$ac_ext <<EOF
11443 #line 11444 "configure"
11444 #include "confdefs.h"
11445 #include <sys/types.h>
11446 #include <sys/time.h>
11447 #include <time.h>
11448 int main() {
11449 struct tm *tp;
11450 ; return 0; }
11451 EOF
11452 if { (eval echo configure:11453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11453   rm -rf conftest*
11454   ac_cv_header_time=yes
11455 else
11456   echo "configure: failed program was:" >&5
11457   cat conftest.$ac_ext >&5
11458   rm -rf conftest*
11459   ac_cv_header_time=no
11460 fi
11461 rm -f conftest*
11462 fi
11463
11464 echo "$ac_t""$ac_cv_header_time" 1>&6
11465 if test $ac_cv_header_time = yes; then
11466   cat >> confdefs.h <<\EOF
11467 #define TIME_WITH_SYS_TIME 1
11468 EOF
11469
11470 fi
11471
11472 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
11473 echo "configure:11474: checking whether struct tm is in sys/time.h or time.h" >&5
11474 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
11475   echo $ac_n "(cached) $ac_c" 1>&6
11476 else
11477   cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 #include <sys/types.h>
11481 #include <time.h>
11482 int main() {
11483 struct tm *tp; tp->tm_sec;
11484 ; return 0; }
11485 EOF
11486 if { (eval echo configure:11487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11487   rm -rf conftest*
11488   ac_cv_struct_tm=time.h
11489 else
11490   echo "configure: failed program was:" >&5
11491   cat conftest.$ac_ext >&5
11492   rm -rf conftest*
11493   ac_cv_struct_tm=sys/time.h
11494 fi
11495 rm -f conftest*
11496 fi
11497
11498 echo "$ac_t""$ac_cv_struct_tm" 1>&6
11499 if test $ac_cv_struct_tm = sys/time.h; then
11500   cat >> confdefs.h <<\EOF
11501 #define TM_IN_SYS_TIME 1
11502 EOF
11503
11504 fi
11505
11506 # test for pw_gecos in struct passwd
11507 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
11508 echo "configure:11509: checking struct passwd for pw_gecos" >&5
11509 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
11510   echo $ac_n "(cached) $ac_c" 1>&6
11511 else
11512   
11513         cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <pwd.h>
11517 int main() {
11518
11519         struct passwd pwd;
11520         pwd.pw_gecos = pwd.pw_name;
11521
11522 ; return 0; }
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11525   rm -rf conftest*
11526   ol_cv_struct_passwd_pw_gecos=yes
11527 else
11528   echo "configure: failed program was:" >&5
11529   cat conftest.$ac_ext >&5
11530   rm -rf conftest*
11531   ol_cv_struct_passwd_pw_gecos=no
11532 fi
11533 rm -f conftest*
11534 fi
11535
11536 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11537 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11538         cat >> confdefs.h <<\EOF
11539 #define HAVE_PW_GECOS 1
11540 EOF
11541
11542 fi
11543
11544 # test for pw_passwd in struct passwd
11545 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
11546 echo "configure:11547: checking struct passwd for pw_passwd" >&5
11547 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
11548   echo $ac_n "(cached) $ac_c" 1>&6
11549 else
11550   
11551         cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554 #include <pwd.h>
11555 int main() {
11556
11557         struct passwd pwd;
11558         pwd.pw_passwd = pwd.pw_name;
11559
11560 ; return 0; }
11561 EOF
11562 if { (eval echo configure:11563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11563   rm -rf conftest*
11564   ol_cv_struct_passwd_pw_passwd=yes
11565 else
11566   echo "configure: failed program was:" >&5
11567   cat conftest.$ac_ext >&5
11568   rm -rf conftest*
11569   ol_cv_struct_passwd_pw_passwd=no
11570 fi
11571 rm -f conftest*
11572 fi
11573
11574 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
11575 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
11576         cat >> confdefs.h <<\EOF
11577 #define HAVE_PW_PASSWD 1
11578 EOF
11579
11580 fi
11581
11582
11583 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11584 echo "configure:11585: checking if toupper() requires islower()" >&5
11585 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11586   echo $ac_n "(cached) $ac_c" 1>&6
11587 else
11588   
11589         if test "$cross_compiling" = yes; then
11590   ol_cv_c_upper_lower=safe
11591 else
11592   cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595
11596 #include <ctype.h>
11597 main()
11598 {
11599         if ('C' == toupper('C'))
11600                 exit(0);
11601         else
11602                 exit(1);
11603 }
11604 EOF
11605 if { (eval echo configure:11606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11606 then
11607   ol_cv_c_upper_lower=no
11608 else
11609   echo "configure: failed program was:" >&5
11610   cat conftest.$ac_ext >&5
11611   rm -fr conftest*
11612   ol_cv_c_upper_lower=yes
11613 fi
11614 rm -fr conftest*
11615 fi
11616
11617 fi
11618
11619 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11620 if test $ol_cv_c_upper_lower != no ; then
11621         cat >> confdefs.h <<\EOF
11622 #define C_UPPER_LOWER 1
11623 EOF
11624
11625 fi
11626
11627 echo $ac_n "checking for working const""... $ac_c" 1>&6
11628 echo "configure:11629: checking for working const" >&5
11629 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635
11636 int main() {
11637
11638 /* Ultrix mips cc rejects this.  */
11639 typedef int charset[2]; const charset x;
11640 /* SunOS 4.1.1 cc rejects this.  */
11641 char const *const *ccp;
11642 char **p;
11643 /* NEC SVR4.0.2 mips cc rejects this.  */
11644 struct point {int x, y;};
11645 static struct point const zero = {0,0};
11646 /* AIX XL C 1.02.0.0 rejects this.
11647    It does not let you subtract one const X* pointer from another in an arm
11648    of an if-expression whose if-part is not a constant expression */
11649 const char *g = "string";
11650 ccp = &g + (g ? g-g : 0);
11651 /* HPUX 7.0 cc rejects these. */
11652 ++ccp;
11653 p = (char**) ccp;
11654 ccp = (char const *const *) p;
11655 { /* SCO 3.2v4 cc rejects this.  */
11656   char *t;
11657   char const *s = 0 ? (char *) 0 : (char const *) 0;
11658
11659   *t++ = 0;
11660 }
11661 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11662   int x[] = {25, 17};
11663   const int *foo = &x[0];
11664   ++foo;
11665 }
11666 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11667   typedef const int *iptr;
11668   iptr p = 0;
11669   ++p;
11670 }
11671 { /* AIX XL C 1.02.0.0 rejects this saying
11672      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11673   struct s { int j; const int *ap[3]; };
11674   struct s *b; b->j = 5;
11675 }
11676 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11677   const int foo = 10;
11678 }
11679
11680 ; return 0; }
11681 EOF
11682 if { (eval echo configure:11683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11683   rm -rf conftest*
11684   ac_cv_c_const=yes
11685 else
11686   echo "configure: failed program was:" >&5
11687   cat conftest.$ac_ext >&5
11688   rm -rf conftest*
11689   ac_cv_c_const=no
11690 fi
11691 rm -f conftest*
11692 fi
11693
11694 echo "$ac_t""$ac_cv_c_const" 1>&6
11695 if test $ac_cv_c_const = no; then
11696   cat >> confdefs.h <<\EOF
11697 #define const 
11698 EOF
11699
11700 fi
11701
11702 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11703 echo "configure:11704: checking if compiler understands volatile" >&5
11704 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11705   echo $ac_n "(cached) $ac_c" 1>&6
11706 else
11707   cat > conftest.$ac_ext <<EOF
11708 #line 11709 "configure"
11709 #include "confdefs.h"
11710 int x, y, z;
11711 int main() {
11712 volatile int a; int * volatile b = x ? &y : &z;
11713       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11714       *b = 0;
11715 ; return 0; }
11716 EOF
11717 if { (eval echo configure:11718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11718   rm -rf conftest*
11719   ol_cv_c_volatile=yes
11720 else
11721   echo "configure: failed program was:" >&5
11722   cat conftest.$ac_ext >&5
11723   rm -rf conftest*
11724   ol_cv_c_volatile=no
11725 fi
11726 rm -f conftest*
11727 fi
11728
11729 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11730   if test $ol_cv_c_volatile = yes; then
11731     : 
11732   else
11733     cat >> confdefs.h <<\EOF
11734 #define volatile 
11735 EOF
11736
11737   fi
11738  
11739
11740 if test $cross_compiling = yes ; then
11741         cat >> confdefs.h <<\EOF
11742 #define CROSS_COMPILING 1
11743 EOF
11744
11745
11746         cat >> confdefs.h <<\EOF
11747 #define LBER_INT_T long
11748 EOF
11749
11750         cat >> confdefs.h <<\EOF
11751 #define LBER_TAG_T long
11752 EOF
11753
11754         cat >> confdefs.h <<\EOF
11755 #define LBER_SOCKET_T int
11756 EOF
11757
11758
11759 else
11760         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11761 echo "configure:11762: checking whether byte ordering is bigendian" >&5
11762 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11763   echo $ac_n "(cached) $ac_c" 1>&6
11764 else
11765   ac_cv_c_bigendian=unknown
11766 # See if sys/param.h defines the BYTE_ORDER macro.
11767 cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770 #include <sys/types.h>
11771 #include <sys/param.h>
11772 int main() {
11773
11774 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11775  bogus endian macros
11776 #endif
11777 ; return 0; }
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11780   rm -rf conftest*
11781   # It does; now see whether it defined to BIG_ENDIAN or not.
11782 cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 #include <sys/types.h>
11786 #include <sys/param.h>
11787 int main() {
11788
11789 #if BYTE_ORDER != BIG_ENDIAN
11790  not big endian
11791 #endif
11792 ; return 0; }
11793 EOF
11794 if { (eval echo configure:11795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11795   rm -rf conftest*
11796   ac_cv_c_bigendian=yes
11797 else
11798   echo "configure: failed program was:" >&5
11799   cat conftest.$ac_ext >&5
11800   rm -rf conftest*
11801   ac_cv_c_bigendian=no
11802 fi
11803 rm -f conftest*
11804 else
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807 fi
11808 rm -f conftest*
11809 if test $ac_cv_c_bigendian = unknown; then
11810 if test "$cross_compiling" = yes; then
11811     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11812 else
11813   cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 main () {
11817   /* Are we little or big endian?  From Harbison&Steele.  */
11818   union
11819   {
11820     long l;
11821     char c[sizeof (long)];
11822   } u;
11823   u.l = 1;
11824   exit (u.c[sizeof (long) - 1] == 1);
11825 }
11826 EOF
11827 if { (eval echo configure:11828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11828 then
11829   ac_cv_c_bigendian=no
11830 else
11831   echo "configure: failed program was:" >&5
11832   cat conftest.$ac_ext >&5
11833   rm -fr conftest*
11834   ac_cv_c_bigendian=yes
11835 fi
11836 rm -fr conftest*
11837 fi
11838
11839 fi
11840 fi
11841
11842 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11843 if test $ac_cv_c_bigendian = yes; then
11844   cat >> confdefs.h <<\EOF
11845 #define WORDS_BIGENDIAN 1
11846 EOF
11847
11848 fi
11849
11850         echo $ac_n "checking size of short""... $ac_c" 1>&6
11851 echo "configure:11852: checking size of short" >&5
11852 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11853   echo $ac_n "(cached) $ac_c" 1>&6
11854 else
11855   if test "$cross_compiling" = yes; then
11856     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11857 else
11858   cat > conftest.$ac_ext <<EOF
11859 #line 11860 "configure"
11860 #include "confdefs.h"
11861 #include <stdio.h>
11862 main()
11863 {
11864   FILE *f=fopen("conftestval", "w");
11865   if (!f) exit(1);
11866   fprintf(f, "%d\n", sizeof(short));
11867   exit(0);
11868 }
11869 EOF
11870 if { (eval echo configure:11871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11871 then
11872   ac_cv_sizeof_short=`cat conftestval`
11873 else
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -fr conftest*
11877   ac_cv_sizeof_short=0
11878 fi
11879 rm -fr conftest*
11880 fi
11881
11882 fi
11883 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11884 cat >> confdefs.h <<EOF
11885 #define SIZEOF_SHORT $ac_cv_sizeof_short
11886 EOF
11887
11888  
11889         echo $ac_n "checking size of int""... $ac_c" 1>&6
11890 echo "configure:11891: checking size of int" >&5
11891 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11892   echo $ac_n "(cached) $ac_c" 1>&6
11893 else
11894   if test "$cross_compiling" = yes; then
11895     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11896 else
11897   cat > conftest.$ac_ext <<EOF
11898 #line 11899 "configure"
11899 #include "confdefs.h"
11900 #include <stdio.h>
11901 main()
11902 {
11903   FILE *f=fopen("conftestval", "w");
11904   if (!f) exit(1);
11905   fprintf(f, "%d\n", sizeof(int));
11906   exit(0);
11907 }
11908 EOF
11909 if { (eval echo configure:11910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11910 then
11911   ac_cv_sizeof_int=`cat conftestval`
11912 else
11913   echo "configure: failed program was:" >&5
11914   cat conftest.$ac_ext >&5
11915   rm -fr conftest*
11916   ac_cv_sizeof_int=0
11917 fi
11918 rm -fr conftest*
11919 fi
11920
11921 fi
11922 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11923 cat >> confdefs.h <<EOF
11924 #define SIZEOF_INT $ac_cv_sizeof_int
11925 EOF
11926
11927  
11928         echo $ac_n "checking size of long""... $ac_c" 1>&6
11929 echo "configure:11930: checking size of long" >&5
11930 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11931   echo $ac_n "(cached) $ac_c" 1>&6
11932 else
11933   if test "$cross_compiling" = yes; then
11934     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11935 else
11936   cat > conftest.$ac_ext <<EOF
11937 #line 11938 "configure"
11938 #include "confdefs.h"
11939 #include <stdio.h>
11940 main()
11941 {
11942   FILE *f=fopen("conftestval", "w");
11943   if (!f) exit(1);
11944   fprintf(f, "%d\n", sizeof(long));
11945   exit(0);
11946 }
11947 EOF
11948 if { (eval echo configure:11949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11949 then
11950   ac_cv_sizeof_long=`cat conftestval`
11951 else
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -fr conftest*
11955   ac_cv_sizeof_long=0
11956 fi
11957 rm -fr conftest*
11958 fi
11959
11960 fi
11961 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11962 cat >> confdefs.h <<EOF
11963 #define SIZEOF_LONG $ac_cv_sizeof_long
11964 EOF
11965
11966
11967
11968         if test "$ac_cv_sizeof_int" -lt 4 ; then
11969                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11970
11971                 cat >> confdefs.h <<\EOF
11972 #define LBER_INT_T long
11973 EOF
11974
11975                 cat >> confdefs.h <<\EOF
11976 #define LBER_TAG_T long
11977 EOF
11978
11979                 cat >> confdefs.h <<\EOF
11980 #define LBER_SOCKET_T int
11981 EOF
11982
11983         else
11984                 cat >> confdefs.h <<\EOF
11985 #define LBER_INT_T int
11986 EOF
11987
11988                 cat >> confdefs.h <<\EOF
11989 #define LBER_TAG_T long
11990 EOF
11991
11992                 cat >> confdefs.h <<\EOF
11993 #define LBER_SOCKET_T int
11994 EOF
11995
11996         fi
11997 fi
11998
11999 cat >> confdefs.h <<\EOF
12000 #define LBER_LEN_T long
12001 EOF
12002
12003
12004 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
12005 echo "configure:12006: checking for 8-bit clean memcmp" >&5
12006 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
12007   echo $ac_n "(cached) $ac_c" 1>&6
12008 else
12009   if test "$cross_compiling" = yes; then
12010   ac_cv_func_memcmp_clean=no
12011 else
12012   cat > conftest.$ac_ext <<EOF
12013 #line 12014 "configure"
12014 #include "confdefs.h"
12015
12016 main()
12017 {
12018   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
12019   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
12020 }
12021
12022 EOF
12023 if { (eval echo configure:12024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12024 then
12025   ac_cv_func_memcmp_clean=yes
12026 else
12027   echo "configure: failed program was:" >&5
12028   cat conftest.$ac_ext >&5
12029   rm -fr conftest*
12030   ac_cv_func_memcmp_clean=no
12031 fi
12032 rm -fr conftest*
12033 fi
12034
12035 fi
12036
12037 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
12038 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
12039
12040 echo $ac_n "checking for strftime""... $ac_c" 1>&6
12041 echo "configure:12042: checking for strftime" >&5
12042 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
12043   echo $ac_n "(cached) $ac_c" 1>&6
12044 else
12045   cat > conftest.$ac_ext <<EOF
12046 #line 12047 "configure"
12047 #include "confdefs.h"
12048 /* System header to define __stub macros and hopefully few prototypes,
12049     which can conflict with char strftime(); below.  */
12050 #include <assert.h>
12051 /* Override any gcc2 internal prototype to avoid an error.  */
12052 /* We use char because int might match the return type of a gcc2
12053     builtin and then its argument prototype would still apply.  */
12054 char strftime();
12055 char (*f)();
12056
12057 int main() {
12058
12059 /* The GNU C library defines this for functions which it implements
12060     to always fail with ENOSYS.  Some functions are actually named
12061     something starting with __ and the normal name is an alias.  */
12062 #if defined (__stub_strftime) || defined (__stub___strftime)
12063 choke me
12064 #else
12065 f = strftime;
12066 #endif
12067
12068 ; return 0; }
12069 EOF
12070 if { (eval echo configure:12071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12071   rm -rf conftest*
12072   eval "ac_cv_func_strftime=yes"
12073 else
12074   echo "configure: failed program was:" >&5
12075   cat conftest.$ac_ext >&5
12076   rm -rf conftest*
12077   eval "ac_cv_func_strftime=no"
12078 fi
12079 rm -f conftest*
12080 fi
12081
12082 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
12083   echo "$ac_t""yes" 1>&6
12084   cat >> confdefs.h <<\EOF
12085 #define HAVE_STRFTIME 1
12086 EOF
12087
12088 else
12089   echo "$ac_t""no" 1>&6
12090 # strftime is in -lintl on SCO UNIX.
12091 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
12092 echo "configure:12093: checking for strftime in -lintl" >&5
12093 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
12094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12095   echo $ac_n "(cached) $ac_c" 1>&6
12096 else
12097   ac_save_LIBS="$LIBS"
12098 LIBS="-lintl  $LIBS"
12099 cat > conftest.$ac_ext <<EOF
12100 #line 12101 "configure"
12101 #include "confdefs.h"
12102 /* Override any gcc2 internal prototype to avoid an error.  */
12103 /* We use char because int might match the return type of a gcc2
12104     builtin and then its argument prototype would still apply.  */
12105 char strftime();
12106
12107 int main() {
12108 strftime()
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12112   rm -rf conftest*
12113   eval "ac_cv_lib_$ac_lib_var=yes"
12114 else
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -rf conftest*
12118   eval "ac_cv_lib_$ac_lib_var=no"
12119 fi
12120 rm -f conftest*
12121 LIBS="$ac_save_LIBS"
12122
12123 fi
12124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12125   echo "$ac_t""yes" 1>&6
12126   cat >> confdefs.h <<\EOF
12127 #define HAVE_STRFTIME 1
12128 EOF
12129
12130 LIBS="-lintl $LIBS"
12131 else
12132   echo "$ac_t""no" 1>&6
12133 fi
12134
12135 fi
12136
12137
12138 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
12139 echo "configure:12140: checking for inet_aton()" >&5
12140 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
12141   echo $ac_n "(cached) $ac_c" 1>&6
12142 else
12143   cat > conftest.$ac_ext <<EOF
12144 #line 12145 "configure"
12145 #include "confdefs.h"
12146
12147 #ifdef HAVE_SYS_TYPES_H
12148 #       include <sys/types.h>
12149 #endif
12150 #ifdef HAVE_SYS_SOCKET_H
12151 #       include <sys/socket.h>
12152 #       ifdef HAVE_SYS_SELECT_H
12153 #               include <sys/select.h>
12154 #       endif
12155 #       include <netinet/in.h>
12156 #       ifdef HAVE_ARPA_INET_H
12157 #               include <arpa/inet.h>
12158 #       endif
12159 #endif
12160
12161 int main() {
12162 struct in_addr in;
12163 int rc = inet_aton( "255.255.255.255", &in );
12164 ; return 0; }
12165 EOF
12166 if { (eval echo configure:12167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12167   rm -rf conftest*
12168   ol_cv_func_inet_aton=yes
12169 else
12170   echo "configure: failed program was:" >&5
12171   cat conftest.$ac_ext >&5
12172   rm -rf conftest*
12173   ol_cv_func_inet_aton=no
12174 fi
12175 rm -f conftest*
12176 fi
12177
12178 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
12179   if test $ol_cv_func_inet_aton != no; then
12180     cat >> confdefs.h <<\EOF
12181 #define HAVE_INET_ATON 1
12182 EOF
12183
12184   fi
12185  
12186
12187 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
12188 echo "configure:12189: checking for vprintf" >&5
12189 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
12190   echo $ac_n "(cached) $ac_c" 1>&6
12191 else
12192   cat > conftest.$ac_ext <<EOF
12193 #line 12194 "configure"
12194 #include "confdefs.h"
12195 /* System header to define __stub macros and hopefully few prototypes,
12196     which can conflict with char vprintf(); below.  */
12197 #include <assert.h>
12198 /* Override any gcc2 internal prototype to avoid an error.  */
12199 /* We use char because int might match the return type of a gcc2
12200     builtin and then its argument prototype would still apply.  */
12201 char vprintf();
12202 char (*f)();
12203
12204 int main() {
12205
12206 /* The GNU C library defines this for functions which it implements
12207     to always fail with ENOSYS.  Some functions are actually named
12208     something starting with __ and the normal name is an alias.  */
12209 #if defined (__stub_vprintf) || defined (__stub___vprintf)
12210 choke me
12211 #else
12212 f = vprintf;
12213 #endif
12214
12215 ; return 0; }
12216 EOF
12217 if { (eval echo configure:12218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12218   rm -rf conftest*
12219   eval "ac_cv_func_vprintf=yes"
12220 else
12221   echo "configure: failed program was:" >&5
12222   cat conftest.$ac_ext >&5
12223   rm -rf conftest*
12224   eval "ac_cv_func_vprintf=no"
12225 fi
12226 rm -f conftest*
12227 fi
12228
12229 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
12230   echo "$ac_t""yes" 1>&6
12231   cat >> confdefs.h <<\EOF
12232 #define HAVE_VPRINTF 1
12233 EOF
12234
12235 else
12236   echo "$ac_t""no" 1>&6
12237 fi
12238
12239 if test "$ac_cv_func_vprintf" != yes; then
12240 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
12241 echo "configure:12242: checking for _doprnt" >&5
12242 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
12243   echo $ac_n "(cached) $ac_c" 1>&6
12244 else
12245   cat > conftest.$ac_ext <<EOF
12246 #line 12247 "configure"
12247 #include "confdefs.h"
12248 /* System header to define __stub macros and hopefully few prototypes,
12249     which can conflict with char _doprnt(); below.  */
12250 #include <assert.h>
12251 /* Override any gcc2 internal prototype to avoid an error.  */
12252 /* We use char because int might match the return type of a gcc2
12253     builtin and then its argument prototype would still apply.  */
12254 char _doprnt();
12255 char (*f)();
12256
12257 int main() {
12258
12259 /* The GNU C library defines this for functions which it implements
12260     to always fail with ENOSYS.  Some functions are actually named
12261     something starting with __ and the normal name is an alias.  */
12262 #if defined (__stub__doprnt) || defined (__stub____doprnt)
12263 choke me
12264 #else
12265 f = _doprnt;
12266 #endif
12267
12268 ; return 0; }
12269 EOF
12270 if { (eval echo configure:12271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12271   rm -rf conftest*
12272   eval "ac_cv_func__doprnt=yes"
12273 else
12274   echo "configure: failed program was:" >&5
12275   cat conftest.$ac_ext >&5
12276   rm -rf conftest*
12277   eval "ac_cv_func__doprnt=no"
12278 fi
12279 rm -f conftest*
12280 fi
12281
12282 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
12283   echo "$ac_t""yes" 1>&6
12284   cat >> confdefs.h <<\EOF
12285 #define HAVE_DOPRNT 1
12286 EOF
12287
12288 else
12289   echo "$ac_t""no" 1>&6
12290 fi
12291
12292 fi
12293
12294
12295 if test $ac_cv_func_vprintf = yes ; then
12296                 for ac_func in vsnprintf vsprintf
12297 do
12298 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12299 echo "configure:12300: checking for $ac_func" >&5
12300 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12301   echo $ac_n "(cached) $ac_c" 1>&6
12302 else
12303   cat > conftest.$ac_ext <<EOF
12304 #line 12305 "configure"
12305 #include "confdefs.h"
12306 /* System header to define __stub macros and hopefully few prototypes,
12307     which can conflict with char $ac_func(); below.  */
12308 #include <assert.h>
12309 /* Override any gcc2 internal prototype to avoid an error.  */
12310 /* We use char because int might match the return type of a gcc2
12311     builtin and then its argument prototype would still apply.  */
12312 char $ac_func();
12313 char (*f)();
12314
12315 int main() {
12316
12317 /* The GNU C library defines this for functions which it implements
12318     to always fail with ENOSYS.  Some functions are actually named
12319     something starting with __ and the normal name is an alias.  */
12320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12321 choke me
12322 #else
12323 f = $ac_func;
12324 #endif
12325
12326 ; return 0; }
12327 EOF
12328 if { (eval echo configure:12329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12329   rm -rf conftest*
12330   eval "ac_cv_func_$ac_func=yes"
12331 else
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -rf conftest*
12335   eval "ac_cv_func_$ac_func=no"
12336 fi
12337 rm -f conftest*
12338 fi
12339
12340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12341   echo "$ac_t""yes" 1>&6
12342     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12343   cat >> confdefs.h <<EOF
12344 #define $ac_tr_func 1
12345 EOF
12346  
12347 else
12348   echo "$ac_t""no" 1>&6
12349 fi
12350 done
12351
12352 fi
12353
12354 for ac_func in \
12355         bcopy                   \
12356         closesocket             \
12357         endgrent                \
12358         endpwent                \
12359         flock                   \
12360         getdtablesize   \
12361         getgrgid                \
12362         gethostname             \
12363         getpass                 \
12364         getpwuid                \
12365         getpwnam                \
12366         getspnam                \
12367         gettimeofday    \
12368         initgroups              \
12369         lockf                   \
12370         memcpy                  \
12371         memmove                 \
12372         mkstemp                 \
12373         read                    \
12374         recv                    \
12375         recvfrom                \
12376         setpwfile               \
12377         setgid                  \
12378         setegid                 \
12379         setsid                  \
12380         setuid                  \
12381         seteuid                 \
12382         signal                  \
12383         sigset                  \
12384         snprintf                \
12385         strdup                  \
12386         strerror                \
12387         strpbrk                 \
12388         strrchr                 \
12389         strsep                  \
12390         strstr                  \
12391         strtol                  \
12392         strtoul                 \
12393         strspn                  \
12394         sysconf                 \
12395         waitpid                 \
12396         wait4                   \
12397         write                   \
12398         send                    \
12399         sendto                  \
12400
12401 do
12402 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12403 echo "configure:12404: checking for $ac_func" >&5
12404 if eval "test \"\${ac_cv_func_$ac_func+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 $ac_func(); 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 $ac_func();
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_$ac_func) || defined (__stub___$ac_func)
12425 choke me
12426 #else
12427 f = $ac_func;
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_$ac_func=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_$ac_func=no"
12440 fi
12441 rm -f conftest*
12442 fi
12443
12444 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12445   echo "$ac_t""yes" 1>&6
12446     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12447   cat >> confdefs.h <<EOF
12448 #define $ac_tr_func 1
12449 EOF
12450  
12451 else
12452   echo "$ac_t""no" 1>&6
12453 fi
12454 done
12455
12456
12457 for ac_func in getopt tempnam
12458 do
12459 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12460 echo "configure:12461: checking for $ac_func" >&5
12461 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12462   echo $ac_n "(cached) $ac_c" 1>&6
12463 else
12464   cat > conftest.$ac_ext <<EOF
12465 #line 12466 "configure"
12466 #include "confdefs.h"
12467 /* System header to define __stub macros and hopefully few prototypes,
12468     which can conflict with char $ac_func(); below.  */
12469 #include <assert.h>
12470 /* Override any gcc2 internal prototype to avoid an error.  */
12471 /* We use char because int might match the return type of a gcc2
12472     builtin and then its argument prototype would still apply.  */
12473 char $ac_func();
12474 char (*f)();
12475
12476 int main() {
12477
12478 /* The GNU C library defines this for functions which it implements
12479     to always fail with ENOSYS.  Some functions are actually named
12480     something starting with __ and the normal name is an alias.  */
12481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12482 choke me
12483 #else
12484 f = $ac_func;
12485 #endif
12486
12487 ; return 0; }
12488 EOF
12489 if { (eval echo configure:12490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12490   rm -rf conftest*
12491   eval "ac_cv_func_$ac_func=yes"
12492 else
12493   echo "configure: failed program was:" >&5
12494   cat conftest.$ac_ext >&5
12495   rm -rf conftest*
12496   eval "ac_cv_func_$ac_func=no"
12497 fi
12498 rm -f conftest*
12499 fi
12500
12501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12502   echo "$ac_t""yes" 1>&6
12503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12504   cat >> confdefs.h <<EOF
12505 #define $ac_tr_func 1
12506 EOF
12507  
12508 else
12509   echo "$ac_t""no" 1>&6
12510 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
12511 fi
12512 done
12513
12514
12515
12516 # Check Configuration
12517 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
12518 echo "configure:12519: checking declaration of sys_errlist" >&5
12519 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
12520   echo $ac_n "(cached) $ac_c" 1>&6
12521 else
12522   
12523         cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526
12527 #include <stdio.h>
12528 #include <sys/types.h>
12529 #include <errno.h> 
12530 int main() {
12531 char *c = (char *) *sys_errlist
12532 ; return 0; }
12533 EOF
12534 if { (eval echo configure:12535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12535   rm -rf conftest*
12536   ol_cv_dcl_sys_errlist=yes
12537         ol_cv_have_sys_errlist=yes
12538 else
12539   echo "configure: failed program was:" >&5
12540   cat conftest.$ac_ext >&5
12541   rm -rf conftest*
12542   ol_cv_dcl_sys_errlist=no
12543 fi
12544 rm -f conftest*
12545 fi
12546
12547 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
12548 #
12549 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
12550 if test $ol_cv_dcl_sys_errlist = no ; then
12551         cat >> confdefs.h <<\EOF
12552 #define DECL_SYS_ERRLIST 1
12553 EOF
12554
12555
12556         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
12557 echo "configure:12558: checking existence of sys_errlist" >&5
12558 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
12559   echo $ac_n "(cached) $ac_c" 1>&6
12560 else
12561   
12562                 cat > conftest.$ac_ext <<EOF
12563 #line 12564 "configure"
12564 #include "confdefs.h"
12565 #include <errno.h>
12566 int main() {
12567 char *c = (char *) *sys_errlist
12568 ; return 0; }
12569 EOF
12570 if { (eval echo configure:12571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12571   rm -rf conftest*
12572   ol_cv_have_sys_errlist=yes
12573 else
12574   echo "configure: failed program was:" >&5
12575   cat conftest.$ac_ext >&5
12576   rm -rf conftest*
12577   ol_cv_have_sys_errlist=no
12578 fi
12579 rm -f conftest*
12580 fi
12581
12582 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
12583 fi
12584 if test $ol_cv_have_sys_errlist = yes ; then
12585         cat >> confdefs.h <<\EOF
12586 #define HAVE_SYS_ERRLIST 1
12587 EOF
12588
12589 fi
12590
12591
12592
12593 if test "$ol_enable_debug" != no ; then
12594         cat >> confdefs.h <<\EOF
12595 #define LDAP_DEBUG 1
12596 EOF
12597
12598 fi
12599 if test "$ol_enable_syslog" = yes ; then
12600         cat >> confdefs.h <<\EOF
12601 #define LDAP_SYSLOG 1
12602 EOF
12603
12604 fi
12605 if test "$ol_enable_libui" = yes ; then
12606         cat >> confdefs.h <<\EOF
12607 #define LDAP_LIBUI 1
12608 EOF
12609
12610 fi
12611 if test "$ol_enable_cache" = no ; then
12612         cat >> confdefs.h <<\EOF
12613 #define LDAP_NOCACHE 1
12614 EOF
12615
12616 fi
12617 if test "$ol_enable_dns" != no ; then
12618         cat >> confdefs.h <<\EOF
12619 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12620 EOF
12621
12622 fi
12623 if test "$ol_enable_proctitle" != no ; then
12624         cat >> confdefs.h <<\EOF
12625 #define LDAP_PROCTITLE 1
12626 EOF
12627
12628 fi
12629 if test "$ol_enable_referrals" != no ; then
12630         cat >> confdefs.h <<\EOF
12631 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12632 EOF
12633
12634 fi
12635 if test "$ol_enable_cldap" != no ; then
12636         cat >> confdefs.h <<\EOF
12637 #define LDAP_CONNECTIONLESS 1
12638 EOF
12639
12640 fi
12641
12642 if test "$ol_enable_crypt" != no ; then
12643         cat >> confdefs.h <<\EOF
12644 #define SLAPD_CRYPT 1
12645 EOF
12646
12647 fi
12648 if test "$ol_enable_cleartext" != no ; then
12649         cat >> confdefs.h <<\EOF
12650 #define SLAPD_CLEARTEXT 1
12651 EOF
12652
12653 fi
12654 if test "$ol_enable_multimaster" != no ; then
12655         cat >> confdefs.h <<\EOF
12656 #define SLAPD_MULTIMASTER 1
12657 EOF
12658
12659 fi
12660 if test "$ol_enable_phonetic" != no ; then
12661         cat >> confdefs.h <<\EOF
12662 #define SLAPD_PHONETIC 1
12663 EOF
12664
12665 fi
12666 if test "$ol_enable_rlookups" != no ; then
12667         cat >> confdefs.h <<\EOF
12668 #define SLAPD_RLOOKUPS 1
12669 EOF
12670
12671 fi
12672
12673 if test "$ol_link_modules" != no ; then
12674         cat >> confdefs.h <<\EOF
12675 #define SLAPD_MODULES 1
12676 EOF
12677
12678         BUILD_SLAPD=yes
12679 fi
12680
12681 if test "$ol_link_bdb2" != no ; then
12682         cat >> confdefs.h <<\EOF
12683 #define SLAPD_BDB2 1
12684 EOF
12685
12686         BUILD_SLAPD=yes
12687         BUILD_BDB2=yes
12688         if test "$ol_with_bdb2_module" != static ; then
12689                 cat >> confdefs.h <<\EOF
12690 #define SLAPD_BDB2_DYNAMIC 1
12691 EOF
12692
12693                 BUILD_BDB2_DYNAMIC=yes
12694         fi
12695 fi
12696
12697 if test "$ol_enable_ldap" != no ; then
12698         cat >> confdefs.h <<\EOF
12699 #define SLAPD_LDAP 1
12700 EOF
12701
12702         BUILD_SLAPD=yes
12703         BUILD_LDAP=yes
12704         if test "$ol_with_ldap_module" != static ; then
12705                 cat >> confdefs.h <<\EOF
12706 #define SLAPD_LDAP_DYNAMIC 1
12707 EOF
12708
12709                 BUILD_LDAP_DYNAMIC=yes
12710         fi
12711 fi
12712
12713 if test "$ol_link_ldbm" != no ; then
12714         cat >> confdefs.h <<\EOF
12715 #define SLAPD_LDBM 1
12716 EOF
12717
12718         BUILD_SLAPD=yes
12719         BUILD_LDBM=yes
12720         if test "$ol_with_ldbm_module" != static ; then
12721                 cat >> confdefs.h <<\EOF
12722 #define SLAPD_LDBM_DYNAMIC 1
12723 EOF
12724
12725                 BUILD_LDBM_DYNAMIC=yes
12726         fi
12727 fi
12728
12729 if test "$ol_enable_passwd" != no ; then
12730         cat >> confdefs.h <<\EOF
12731 #define SLAPD_PASSWD 1
12732 EOF
12733
12734         BUILD_SLAPD=yes
12735         BUILD_PASSWD=yes
12736         if test "$ol_with_passwd_module" != static ; then
12737                 cat >> confdefs.h <<\EOF
12738 #define SLAPD_PASSWD_DYNAMIC 1
12739 EOF
12740
12741                 BUILD_PASSWD_DYNAMIC=yes
12742         fi
12743 fi
12744
12745 if test "$ol_link_perl" != no ; then
12746         cat >> confdefs.h <<\EOF
12747 #define SLAPD_PERL 1
12748 EOF
12749
12750         BUILD_SLAPD=yes
12751         BUILD_PERL=yes
12752         if test "$ol_with_perl_module" != static ; then
12753                 cat >> confdefs.h <<\EOF
12754 #define SLAPD_PERL_DYNAMIC 1
12755 EOF
12756
12757                 BUILD_PERL_DYNAMIC=yes
12758         fi
12759 fi
12760
12761 if test "$ol_enable_shell" != no ; then
12762         cat >> confdefs.h <<\EOF
12763 #define SLAPD_SHELL 1
12764 EOF
12765
12766         BUILD_SLAPD=yes
12767         BUILD_SHELL=yes
12768         if test "$ol_with_shell_module" != static ; then
12769                 cat >> confdefs.h <<\EOF
12770 #define SLAPD_SHELL_DYNAMIC 1
12771 EOF
12772
12773                 BUILD_SHELL_DYNAMIC=yes
12774         fi
12775 fi
12776
12777 if test "$ol_enable_tcl" != no ; then
12778         cat >> confdefs.h <<\EOF
12779 #define SLAPD_TCL 1
12780 EOF
12781
12782         BUILD_SLAPD=yes
12783         BUILD_TCL=yes
12784         if test "$ol_with_tcl_module" != static; then
12785                 cat >> confdefs.h <<\EOF
12786 #define SLAPD_TCL_DYNAMIC 1
12787 EOF
12788
12789                 BUILD_TCL_DYNAMIC=yes
12790         fi
12791 fi
12792
12793 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12794         $BUILD_SLAPD = yes ; then
12795         BUILD_SLURPD=yes
12796 fi
12797
12798 if test "$ol_link_isode" != no ; then
12799         BUILD_LDAPD=yes
12800 fi
12801
12802
12803
12804
12805   
12806   
12807   
12808   
12809   
12810   
12811   
12812   
12813   
12814   
12815   
12816   
12817   
12818   
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842 trap '' 1 2 15
12843
12844 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12845
12846 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12847 # Let make expand exec_prefix.
12848 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12849
12850 # Any assignment to VPATH causes Sun make to only execute
12851 # the first set of double-colon rules, so remove it if not needed.
12852 # If there is a colon in the path, we need to keep it.
12853 if test "x$srcdir" = x.; then
12854   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12855 fi
12856
12857 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12858
12859 DEFS=-DHAVE_CONFIG_H
12860
12861 # Without the "./", some shells look in PATH for config.status.
12862 : ${CONFIG_STATUS=./config.status}
12863
12864 echo creating $CONFIG_STATUS
12865 rm -f $CONFIG_STATUS
12866 cat > $CONFIG_STATUS <<EOF
12867 #! /bin/sh
12868 # Generated automatically by configure.
12869 # Run this file to recreate the current configuration.
12870 # This directory was configured as follows,
12871 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12872 #
12873 # $0 $ac_configure_args
12874 #
12875 # Compiler output produced by configure, useful for debugging
12876 # configure, is in ./config.log if it exists.
12877
12878 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12879 for ac_option
12880 do
12881   case "\$ac_option" in
12882   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12883     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12884     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12885   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12886     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
12887     exit 0 ;;
12888   -help | --help | --hel | --he | --h)
12889     echo "\$ac_cs_usage"; exit 0 ;;
12890   *) echo "\$ac_cs_usage"; exit 1 ;;
12891   esac
12892 done
12893
12894 ac_given_srcdir=$srcdir
12895 ac_given_INSTALL="$INSTALL"
12896
12897 trap 'rm -fr `echo "\
12898 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12899 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12900 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12901 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12902 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12903 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12904 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12905 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12906 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12907 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12908 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12909 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12910 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12911 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12912 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12913 include/Makefile:build/top.mk:include/Makefile.in \
12914 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12915 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12916 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12917 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12918 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12919 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12920 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12921 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12922 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12923 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12924 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12925 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12926 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12927 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12928 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12929 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12930 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12931 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12932 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12933 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12934 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12935 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12936 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12937 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12938 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12939 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12940  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12941 EOF
12942 cat >> $CONFIG_STATUS <<EOF
12943
12944 # Protect against being on the right side of a sed subst in config.status.
12945 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12946  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12947 $ac_vpsub
12948 $extrasub
12949 s%@SHELL@%$SHELL%g
12950 s%@CFLAGS@%$CFLAGS%g
12951 s%@CPPFLAGS@%$CPPFLAGS%g
12952 s%@CXXFLAGS@%$CXXFLAGS%g
12953 s%@FFLAGS@%$FFLAGS%g
12954 s%@DEFS@%$DEFS%g
12955 s%@LDFLAGS@%$LDFLAGS%g
12956 s%@LIBS@%$LIBS%g
12957 s%@exec_prefix@%$exec_prefix%g
12958 s%@prefix@%$prefix%g
12959 s%@program_transform_name@%$program_transform_name%g
12960 s%@bindir@%$bindir%g
12961 s%@sbindir@%$sbindir%g
12962 s%@libexecdir@%$libexecdir%g
12963 s%@datadir@%$datadir%g
12964 s%@sysconfdir@%$sysconfdir%g
12965 s%@sharedstatedir@%$sharedstatedir%g
12966 s%@localstatedir@%$localstatedir%g
12967 s%@libdir@%$libdir%g
12968 s%@includedir@%$includedir%g
12969 s%@oldincludedir@%$oldincludedir%g
12970 s%@infodir@%$infodir%g
12971 s%@mandir@%$mandir%g
12972 s%@host@%$host%g
12973 s%@host_alias@%$host_alias%g
12974 s%@host_cpu@%$host_cpu%g
12975 s%@host_vendor@%$host_vendor%g
12976 s%@host_os@%$host_os%g
12977 s%@target@%$target%g
12978 s%@target_alias@%$target_alias%g
12979 s%@target_cpu@%$target_cpu%g
12980 s%@target_vendor@%$target_vendor%g
12981 s%@target_os@%$target_os%g
12982 s%@build@%$build%g
12983 s%@build_alias@%$build_alias%g
12984 s%@build_cpu@%$build_cpu%g
12985 s%@build_vendor@%$build_vendor%g
12986 s%@build_os@%$build_os%g
12987 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12988 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12989 s%@INSTALL_DATA@%$INSTALL_DATA%g
12990 s%@PACKAGE@%$PACKAGE%g
12991 s%@VERSION@%$VERSION%g
12992 s%@ACLOCAL@%$ACLOCAL%g
12993 s%@AUTOCONF@%$AUTOCONF%g
12994 s%@AUTOMAKE@%$AUTOMAKE%g
12995 s%@AUTOHEADER@%$AUTOHEADER%g
12996 s%@MAKEINFO@%$MAKEINFO%g
12997 s%@install_sh@%$install_sh%g
12998 s%@AMTAR@%$AMTAR%g
12999 s%@AWK@%$AWK%g
13000 s%@AMTARFLAGS@%$AMTARFLAGS%g
13001 s%@SET_MAKE@%$SET_MAKE%g
13002 s%@top_builddir@%$top_builddir%g
13003 s%@ldap_subdir@%$ldap_subdir%g
13004 s%@CC@%$CC%g
13005 s%@RANLIB@%$RANLIB%g
13006 s%@LD@%$LD%g
13007 s%@NM@%$NM%g
13008 s%@LN_S@%$LN_S%g
13009 s%@LIBTOOL@%$LIBTOOL%g
13010 s%@LN_H@%$LN_H%g
13011 s%@SENDMAIL@%$SENDMAIL%g
13012 s%@EDITOR@%$EDITOR%g
13013 s%@FINGER@%$FINGER%g
13014 s%@PERLBIN@%$PERLBIN%g
13015 s%@CPP@%$CPP%g
13016 s%@EXEEXT@%$EXEEXT%g
13017 s%@OBJEXT@%$OBJEXT%g
13018 s%@OL_MKDEP@%$OL_MKDEP%g
13019 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
13020 s%@GLIBCONFIG@%$GLIBCONFIG%g
13021 s%@PEPSY@%$PEPSY%g
13022 s%@LIBOBJS@%$LIBOBJS%g
13023 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
13024 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
13025 s%@BUILD_BDB2@%$BUILD_BDB2%g
13026 s%@BUILD_LDAP@%$BUILD_LDAP%g
13027 s%@BUILD_LDBM@%$BUILD_LDBM%g
13028 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
13029 s%@BUILD_PERL@%$BUILD_PERL%g
13030 s%@BUILD_SHELL@%$BUILD_SHELL%g
13031 s%@BUILD_TCL@%$BUILD_TCL%g
13032 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
13033 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
13034 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
13035 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
13036 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
13037 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
13038 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
13039 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
13040 s%@LDAP_LIBS@%$LDAP_LIBS%g
13041 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
13042 s%@LDIF_LIBS@%$LDIF_LIBS%g
13043 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
13044 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
13045 s%@LDBM_LIBS@%$LDBM_LIBS%g
13046 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
13047 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
13048 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
13049 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
13050 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
13051 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
13052 s%@KRB_LIBS@%$KRB_LIBS%g
13053 s%@READLINE_LIBS@%$READLINE_LIBS%g
13054 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
13055 s%@TLS_LIBS@%$TLS_LIBS%g
13056
13057 CEOF
13058 EOF
13059
13060 cat >> $CONFIG_STATUS <<\EOF
13061
13062 # Split the substitutions into bite-sized pieces for seds with
13063 # small command number limits, like on Digital OSF/1 and HP-UX.
13064 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13065 ac_file=1 # Number of current file.
13066 ac_beg=1 # First line for current file.
13067 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13068 ac_more_lines=:
13069 ac_sed_cmds=""
13070 while $ac_more_lines; do
13071   if test $ac_beg -gt 1; then
13072     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13073   else
13074     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13075   fi
13076   if test ! -s conftest.s$ac_file; then
13077     ac_more_lines=false
13078     rm -f conftest.s$ac_file
13079   else
13080     if test -z "$ac_sed_cmds"; then
13081       ac_sed_cmds="sed -f conftest.s$ac_file"
13082     else
13083       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13084     fi
13085     ac_file=`expr $ac_file + 1`
13086     ac_beg=$ac_end
13087     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13088   fi
13089 done
13090 if test -z "$ac_sed_cmds"; then
13091   ac_sed_cmds=cat
13092 fi
13093 EOF
13094
13095 cat >> $CONFIG_STATUS <<EOF
13096
13097 CONFIG_FILES=\${CONFIG_FILES-"\
13098 Makefile:build/top.mk:Makefile.in:build/dir.mk \
13099 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
13100 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
13101 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
13102 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
13103 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
13104 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
13105 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
13106 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
13107 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
13108 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
13109 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
13110 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
13111 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
13112 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
13113 include/Makefile:build/top.mk:include/Makefile.in \
13114 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
13115 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
13116 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13117 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
13118 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
13119 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
13120 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
13121 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
13122 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
13123 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
13124 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
13125 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
13126 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
13127 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
13128 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
13129 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
13130 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
13131 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
13132 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
13133 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
13134 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
13135 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
13136 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
13137 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
13138 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
13139 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
13140 "}
13141 EOF
13142 cat >> $CONFIG_STATUS <<\EOF
13143 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13144   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13145   case "$ac_file" in
13146   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13147        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13148   *) ac_file_in="${ac_file}.in" ;;
13149   esac
13150
13151   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13152
13153   # Remove last slash and all that follows it.  Not all systems have dirname.
13154   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13155   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13156     # The file is in a subdirectory.
13157     test ! -d "$ac_dir" && mkdir "$ac_dir"
13158     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13159     # A "../" for each directory in $ac_dir_suffix.
13160     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13161   else
13162     ac_dir_suffix= ac_dots=
13163   fi
13164
13165   case "$ac_given_srcdir" in
13166   .)  srcdir=.
13167       if test -z "$ac_dots"; then top_srcdir=.
13168       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13169   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13170   *) # Relative path.
13171     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13172     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13173   esac
13174
13175   case "$ac_given_INSTALL" in
13176   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13177   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13178   esac
13179
13180   echo creating "$ac_file"
13181   rm -f "$ac_file"
13182   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13183   case "$ac_file" in
13184   *Makefile*) ac_comsub="1i\\
13185 # $configure_input" ;;
13186   *) ac_comsub= ;;
13187   esac
13188
13189   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13190   sed -e "$ac_comsub
13191 s%@configure_input@%$configure_input%g
13192 s%@srcdir@%$srcdir%g
13193 s%@top_srcdir@%$top_srcdir%g
13194 s%@INSTALL@%$INSTALL%g
13195 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13196 fi; done
13197 rm -f conftest.s*
13198
13199 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13200 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13201 #
13202 # ac_d sets the value in "#define NAME VALUE" lines.
13203 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13204 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13205 ac_dC='\3'
13206 ac_dD='%g'
13207 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13208 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13209 ac_uB='\([      ]\)%\1#\2define\3'
13210 ac_uC=' '
13211 ac_uD='\4%g'
13212 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13213 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13214 ac_eB='$%\1#\2define\3'
13215 ac_eC=' '
13216 ac_eD='%g'
13217
13218 if test "${CONFIG_HEADERS+set}" != set; then
13219 EOF
13220 cat >> $CONFIG_STATUS <<EOF
13221   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
13222 EOF
13223 cat >> $CONFIG_STATUS <<\EOF
13224 fi
13225 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13226   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13227   case "$ac_file" in
13228   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13229        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13230   *) ac_file_in="${ac_file}.in" ;;
13231   esac
13232
13233   echo creating $ac_file
13234
13235   rm -f conftest.frag conftest.in conftest.out
13236   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13237   cat $ac_file_inputs > conftest.in
13238
13239 EOF
13240
13241 # Transform confdefs.h into a sed script conftest.vals that substitutes
13242 # the proper values into config.h.in to produce config.h.  And first:
13243 # Protect against being on the right side of a sed subst in config.status.
13244 # Protect against being in an unquoted here document in config.status.
13245 rm -f conftest.vals
13246 cat > conftest.hdr <<\EOF
13247 s/[\\&%]/\\&/g
13248 s%[\\$`]%\\&%g
13249 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13250 s%ac_d%ac_u%gp
13251 s%ac_u%ac_e%gp
13252 EOF
13253 sed -n -f conftest.hdr confdefs.h > conftest.vals
13254 rm -f conftest.hdr
13255
13256 # This sed command replaces #undef with comments.  This is necessary, for
13257 # example, in the case of _POSIX_SOURCE, which is predefined and required
13258 # on some systems where configure will not decide to define it.
13259 cat >> conftest.vals <<\EOF
13260 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13261 EOF
13262
13263 # Break up conftest.vals because some shells have a limit on
13264 # the size of here documents, and old seds have small limits too.
13265
13266 rm -f conftest.tail
13267 while :
13268 do
13269   ac_lines=`grep -c . conftest.vals`
13270   # grep -c gives empty output for an empty file on some AIX systems.
13271   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13272   # Write a limited-size here document to conftest.frag.
13273   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13274   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13275   echo 'CEOF
13276   sed -f conftest.frag conftest.in > conftest.out
13277   rm -f conftest.in
13278   mv conftest.out conftest.in
13279 ' >> $CONFIG_STATUS
13280   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13281   rm -f conftest.vals
13282   mv conftest.tail conftest.vals
13283 done
13284 rm -f conftest.vals
13285
13286 cat >> $CONFIG_STATUS <<\EOF
13287   rm -f conftest.frag conftest.h
13288   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13289   cat conftest.in >> conftest.h
13290   rm -f conftest.in
13291   if cmp -s $ac_file conftest.h 2>/dev/null; then
13292     echo "$ac_file is unchanged"
13293     rm -f conftest.h
13294   else
13295     # Remove last slash and all that follows it.  Not all systems have dirname.
13296       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13297       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13298       # The file is in a subdirectory.
13299       test ! -d "$ac_dir" && mkdir "$ac_dir"
13300     fi
13301     rm -f $ac_file
13302     mv conftest.h $ac_file
13303   fi
13304 fi; done
13305
13306 EOF
13307 cat >> $CONFIG_STATUS <<EOF
13308
13309 EOF
13310 cat >> $CONFIG_STATUS <<\EOF
13311
13312 date > stamp-h
13313 echo Please \"make depend\" to build dependencies
13314
13315 exit 0
13316 EOF
13317 chmod +x $CONFIG_STATUS
13318 rm -fr confdefs* $ac_clean_files
13319 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
13320