]> git.sur5r.net Git - openldap/blob - configure
f29dc5749387608420de0df7a15b2033ef8e3c1d
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
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-proctitle    enable proctitle support (yes)"
21 ac_help="$ac_help
22   --enable-cache        enable caching (yes)"
23 ac_help="$ac_help
24   --enable-dns          enable V2 DNS  extension (no)"
25 ac_help="$ac_help
26   --enable-referrals    enable V2 Referrals extension (yes)"
27 ac_help="$ac_help
28   --enable-cldap        enable connectionless ldap (no)"
29 ac_help="$ac_help
30   --enable-x-compile    enable cross compiling (no)"
31 ac_help="$ac_help
32   --enable-dmalloc      enable debug malloc support (no)"
33 ac_help="$ac_help
34   --with-kerberos       with Kerberos support (auto)"
35 ac_help="$ac_help
36   --with-readline  with readline support (auto)"
37 ac_help="$ac_help
38   --with-threads        use threads (auto)"
39 ac_help="$ac_help
40   --with-tls  with TLS/SSL support (auto)"
41 ac_help="$ac_help
42   --with-yielding-select        with implicitly yielding select (auto)"
43 ac_help="$ac_help
44 LDAPD Options:"
45 ac_help="$ac_help
46   --enable-ldapd        enable building ldapd (no)"
47 ac_help="$ac_help
48 SLAPD Options:"
49 ac_help="$ac_help
50   --enable-slapd        enable building slapd (yes)"
51 ac_help="$ac_help
52     --enable-aclgroups  enable ACL group support (auto)"
53 ac_help="$ac_help
54     --enable-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-wrappers   enable tcp wrapper support (no)"
59 ac_help="$ac_help
60     --enable-phonetic   enable phonetic/soundex (no)"
61 ac_help="$ac_help
62     --enable-rlookups   enable reverse lookups (auto)"
63 ac_help="$ac_help
64     --enable-bdb2       enable bdb2 backend (no)"
65 ac_help="$ac_help
66     --enable-ldbm       enable ldbm backend (yes)"
67 ac_help="$ac_help
68       --with-ldbm-api   use LDBM API (auto)"
69 ac_help="$ac_help
70       --with-ldbm-type  use LDBM type (auto)"
71 ac_help="$ac_help
72     --enable-passwd     enable passwd backend (no)"
73 ac_help="$ac_help
74     --enable-perl       enable perl backend (no)"
75 ac_help="$ac_help
76     --enable-shell      enable shell backend (no)"
77 ac_help="$ac_help
78     --enable-tcl        enable tcl backend (no)"
79 ac_help="$ac_help
80 SLURPD Options:"
81 ac_help="$ac_help
82   --enable-slurpd       enable building slurpd (auto)"
83 ac_help="$ac_help
84 Library Generation & Linking Options"
85 ac_help="$ac_help
86   --enable-static         build static libraries [default=yes]
87   --enable-static=PKGS    only build shared libraries if the current package
88                           appears as an element in the PKGS list"
89 ac_help="$ac_help
90   --enable-shared         build shared libraries [default=yes]
91   --enable-shared=PKGS    only build shared libraries if the current package
92                           appears as an element in the PKGS list"
93 ac_help="$ac_help
94   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
95
96 # Initialize some variables set by options.
97 # The variables have the same names as the options, with
98 # dashes changed to underlines.
99 build=NONE
100 cache_file=./config.cache
101 exec_prefix=NONE
102 host=NONE
103 no_create=
104 nonopt=NONE
105 no_recursion=
106 prefix=NONE
107 program_prefix=NONE
108 program_suffix=NONE
109 program_transform_name=s,x,x,
110 silent=
111 site=
112 srcdir=
113 target=NONE
114 verbose=
115 x_includes=NONE
116 x_libraries=NONE
117 bindir='${exec_prefix}/bin'
118 sbindir='${exec_prefix}/sbin'
119 libexecdir='${exec_prefix}/libexec'
120 datadir='${prefix}/share'
121 sysconfdir='${prefix}/etc'
122 sharedstatedir='${prefix}/com'
123 localstatedir='${prefix}/var'
124 libdir='${exec_prefix}/lib'
125 includedir='${prefix}/include'
126 oldincludedir='/usr/include'
127 infodir='${prefix}/info'
128 mandir='${prefix}/man'
129
130 # Initialize some other variables.
131 subdirs=
132 MFLAGS= MAKEFLAGS=
133 SHELL=${CONFIG_SHELL-/bin/sh}
134 # Maximum number of lines to put in a shell here document.
135 ac_max_here_lines=12
136
137 ac_prev=
138 for ac_option
139 do
140
141   # If the previous option needs an argument, assign it.
142   if test -n "$ac_prev"; then
143     eval "$ac_prev=\$ac_option"
144     ac_prev=
145     continue
146   fi
147
148   case "$ac_option" in
149   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
150   *) ac_optarg= ;;
151   esac
152
153   # Accept the important Cygnus configure options, so we can diagnose typos.
154
155   case "$ac_option" in
156
157   -bindir | --bindir | --bindi | --bind | --bin | --bi)
158     ac_prev=bindir ;;
159   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
160     bindir="$ac_optarg" ;;
161
162   -build | --build | --buil | --bui | --bu)
163     ac_prev=build ;;
164   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
165     build="$ac_optarg" ;;
166
167   -cache-file | --cache-file | --cache-fil | --cache-fi \
168   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
169     ac_prev=cache_file ;;
170   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
171   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
172     cache_file="$ac_optarg" ;;
173
174   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
175     ac_prev=datadir ;;
176   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
177   | --da=*)
178     datadir="$ac_optarg" ;;
179
180   -disable-* | --disable-*)
181     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
182     # Reject names that are not valid shell variable names.
183     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
184       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185     fi
186     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187     eval "enable_${ac_feature}=no" ;;
188
189   -enable-* | --enable-*)
190     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
191     # Reject names that are not valid shell variable names.
192     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
193       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194     fi
195     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196     case "$ac_option" in
197       *=*) ;;
198       *) ac_optarg=yes ;;
199     esac
200     eval "enable_${ac_feature}='$ac_optarg'" ;;
201
202   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
203   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
204   | --exec | --exe | --ex)
205     ac_prev=exec_prefix ;;
206   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
207   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
208   | --exec=* | --exe=* | --ex=*)
209     exec_prefix="$ac_optarg" ;;
210
211   -gas | --gas | --ga | --g)
212     # Obsolete; use --with-gas.
213     with_gas=yes ;;
214
215   -help | --help | --hel | --he)
216     # Omit some internal or obsolete options to make the list less imposing.
217     # This message is too long to be a string in the A/UX 3.1 sh.
218     cat << EOF
219 Usage: configure [options] [host]
220 Options: [defaults in brackets after descriptions]
221 Configuration:
222   --cache-file=FILE       cache test results in FILE
223   --help                  print this message
224   --no-create             do not create output files
225   --quiet, --silent       do not print \`checking...' messages
226   --version               print the version of autoconf that created configure
227 Directory and file names:
228   --prefix=PREFIX         install architecture-independent files in PREFIX
229                           [$ac_default_prefix]
230   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
231                           [same as prefix]
232   --bindir=DIR            user executables in DIR [EPREFIX/bin]
233   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
234   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
235   --datadir=DIR           read-only architecture-independent data in DIR
236                           [PREFIX/share]
237   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
238   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
239                           [PREFIX/com]
240   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
241   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
242   --includedir=DIR        C header files in DIR [PREFIX/include]
243   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
244   --infodir=DIR           info documentation in DIR [PREFIX/info]
245   --mandir=DIR            man documentation in DIR [PREFIX/man]
246   --srcdir=DIR            find the sources in DIR [configure dir or ..]
247   --program-prefix=PREFIX prepend PREFIX to installed program names
248   --program-suffix=SUFFIX append SUFFIX to installed program names
249   --program-transform-name=PROGRAM
250                           run sed PROGRAM on installed program names
251 EOF
252     cat << EOF
253 Host type:
254   --build=BUILD           configure for building on BUILD [BUILD=HOST]
255   --host=HOST             configure for HOST [guessed]
256   --target=TARGET         configure for TARGET [TARGET=HOST]
257 Features and packages:
258   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
259   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
260   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
261   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
262   --x-includes=DIR        X include files are in DIR
263   --x-libraries=DIR       X library files are in DIR
264 EOF
265     if test -n "$ac_help"; then
266       echo "--enable and --with options recognized:$ac_help"
267     fi
268     exit 0 ;;
269
270   -host | --host | --hos | --ho)
271     ac_prev=host ;;
272   -host=* | --host=* | --hos=* | --ho=*)
273     host="$ac_optarg" ;;
274
275   -includedir | --includedir | --includedi | --included | --include \
276   | --includ | --inclu | --incl | --inc)
277     ac_prev=includedir ;;
278   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
279   | --includ=* | --inclu=* | --incl=* | --inc=*)
280     includedir="$ac_optarg" ;;
281
282   -infodir | --infodir | --infodi | --infod | --info | --inf)
283     ac_prev=infodir ;;
284   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
285     infodir="$ac_optarg" ;;
286
287   -libdir | --libdir | --libdi | --libd)
288     ac_prev=libdir ;;
289   -libdir=* | --libdir=* | --libdi=* | --libd=*)
290     libdir="$ac_optarg" ;;
291
292   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
293   | --libexe | --libex | --libe)
294     ac_prev=libexecdir ;;
295   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
296   | --libexe=* | --libex=* | --libe=*)
297     libexecdir="$ac_optarg" ;;
298
299   -localstatedir | --localstatedir | --localstatedi | --localstated \
300   | --localstate | --localstat | --localsta | --localst \
301   | --locals | --local | --loca | --loc | --lo)
302     ac_prev=localstatedir ;;
303   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
304   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
305   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
306     localstatedir="$ac_optarg" ;;
307
308   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
309     ac_prev=mandir ;;
310   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
311     mandir="$ac_optarg" ;;
312
313   -nfp | --nfp | --nf)
314     # Obsolete; use --without-fp.
315     with_fp=no ;;
316
317   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
318   | --no-cr | --no-c)
319     no_create=yes ;;
320
321   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
322   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
323     no_recursion=yes ;;
324
325   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
326   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
327   | --oldin | --oldi | --old | --ol | --o)
328     ac_prev=oldincludedir ;;
329   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
330   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
331   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
332     oldincludedir="$ac_optarg" ;;
333
334   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
335     ac_prev=prefix ;;
336   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
337     prefix="$ac_optarg" ;;
338
339   -program-prefix | --program-prefix | --program-prefi | --program-pref \
340   | --program-pre | --program-pr | --program-p)
341     ac_prev=program_prefix ;;
342   -program-prefix=* | --program-prefix=* | --program-prefi=* \
343   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
344     program_prefix="$ac_optarg" ;;
345
346   -program-suffix | --program-suffix | --program-suffi | --program-suff \
347   | --program-suf | --program-su | --program-s)
348     ac_prev=program_suffix ;;
349   -program-suffix=* | --program-suffix=* | --program-suffi=* \
350   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
351     program_suffix="$ac_optarg" ;;
352
353   -program-transform-name | --program-transform-name \
354   | --program-transform-nam | --program-transform-na \
355   | --program-transform-n | --program-transform- \
356   | --program-transform | --program-transfor \
357   | --program-transfo | --program-transf \
358   | --program-trans | --program-tran \
359   | --progr-tra | --program-tr | --program-t)
360     ac_prev=program_transform_name ;;
361   -program-transform-name=* | --program-transform-name=* \
362   | --program-transform-nam=* | --program-transform-na=* \
363   | --program-transform-n=* | --program-transform-=* \
364   | --program-transform=* | --program-transfor=* \
365   | --program-transfo=* | --program-transf=* \
366   | --program-trans=* | --program-tran=* \
367   | --progr-tra=* | --program-tr=* | --program-t=*)
368     program_transform_name="$ac_optarg" ;;
369
370   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
371   | -silent | --silent | --silen | --sile | --sil)
372     silent=yes ;;
373
374   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
375     ac_prev=sbindir ;;
376   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
377   | --sbi=* | --sb=*)
378     sbindir="$ac_optarg" ;;
379
380   -sharedstatedir | --sharedstatedir | --sharedstatedi \
381   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
382   | --sharedst | --shareds | --shared | --share | --shar \
383   | --sha | --sh)
384     ac_prev=sharedstatedir ;;
385   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
386   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
387   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
388   | --sha=* | --sh=*)
389     sharedstatedir="$ac_optarg" ;;
390
391   -site | --site | --sit)
392     ac_prev=site ;;
393   -site=* | --site=* | --sit=*)
394     site="$ac_optarg" ;;
395
396   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
397     ac_prev=srcdir ;;
398   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
399     srcdir="$ac_optarg" ;;
400
401   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
402   | --syscon | --sysco | --sysc | --sys | --sy)
403     ac_prev=sysconfdir ;;
404   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
405   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
406     sysconfdir="$ac_optarg" ;;
407
408   -target | --target | --targe | --targ | --tar | --ta | --t)
409     ac_prev=target ;;
410   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
411     target="$ac_optarg" ;;
412
413   -v | -verbose | --verbose | --verbos | --verbo | --verb)
414     verbose=yes ;;
415
416   -version | --version | --versio | --versi | --vers)
417     echo "configure generated by autoconf version 2.13"
418     exit 0 ;;
419
420   -with-* | --with-*)
421     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
422     # Reject names that are not valid shell variable names.
423     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
424       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425     fi
426     ac_package=`echo $ac_package| sed 's/-/_/g'`
427     case "$ac_option" in
428       *=*) ;;
429       *) ac_optarg=yes ;;
430     esac
431     eval "with_${ac_package}='$ac_optarg'" ;;
432
433   -without-* | --without-*)
434     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
435     # Reject names that are not valid shell variable names.
436     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
437       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438     fi
439     ac_package=`echo $ac_package| sed 's/-/_/g'`
440     eval "with_${ac_package}=no" ;;
441
442   --x)
443     # Obsolete; use --with-x.
444     with_x=yes ;;
445
446   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
447   | --x-incl | --x-inc | --x-in | --x-i)
448     ac_prev=x_includes ;;
449   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
450   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
451     x_includes="$ac_optarg" ;;
452
453   -x-libraries | --x-libraries | --x-librarie | --x-librari \
454   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
455     ac_prev=x_libraries ;;
456   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
457   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
458     x_libraries="$ac_optarg" ;;
459
460   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
461     ;;
462
463   *)
464     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
465       echo "configure: warning: $ac_option: invalid host type" 1>&2
466     fi
467     if test "x$nonopt" != xNONE; then
468       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
469     fi
470     nonopt="$ac_option"
471     ;;
472
473   esac
474 done
475
476 if test -n "$ac_prev"; then
477   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 fi
479
480 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
481
482 # File descriptor usage:
483 # 0 standard input
484 # 1 file creation
485 # 2 errors and warnings
486 # 3 some systems may open it to /dev/tty
487 # 4 used on the Kubota Titan
488 # 6 checking for... messages and results
489 # 5 compiler messages saved in config.log
490 if test "$silent" = yes; then
491   exec 6>/dev/null
492 else
493   exec 6>&1
494 fi
495 exec 5>./config.log
496
497 echo "\
498 This file contains any messages produced by compilers while
499 running configure, to aid debugging if configure makes a mistake.
500 " 1>&5
501
502 # Strip out --no-create and --no-recursion so they do not pile up.
503 # Also quote any args containing shell metacharacters.
504 ac_configure_args=
505 for ac_arg
506 do
507   case "$ac_arg" in
508   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
509   | --no-cr | --no-c) ;;
510   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
511   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
512   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
513   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
514   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
515   esac
516 done
517
518 # NLS nuisances.
519 # Only set these to C if already set.  These must not be set unconditionally
520 # because not all systems understand e.g. LANG=C (notably SCO).
521 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
522 # Non-C LC_CTYPE values break the ctype check.
523 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
524 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
525 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
526 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
527
528 # confdefs.h avoids OS command line length limits that DEFS can exceed.
529 rm -rf conftest* confdefs.h
530 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
531 echo > confdefs.h
532
533 # A filename unique to this package, relative to the directory that
534 # configure is in, which we can look for to find out if srcdir is correct.
535 ac_unique_file=include/ldap.h
536
537 # Find the source files, if location was not specified.
538 if test -z "$srcdir"; then
539   ac_srcdir_defaulted=yes
540   # Try the directory containing this script, then its parent.
541   ac_prog=$0
542   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
543   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
544   srcdir=$ac_confdir
545   if test ! -r $srcdir/$ac_unique_file; then
546     srcdir=..
547   fi
548 else
549   ac_srcdir_defaulted=no
550 fi
551 if test ! -r $srcdir/$ac_unique_file; then
552   if test "$ac_srcdir_defaulted" = yes; then
553     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
554   else
555     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556   fi
557 fi
558 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
559
560 # Prefer explicitly selected file to automatically selected ones.
561 if test -z "$CONFIG_SITE"; then
562   if test "x$prefix" != xNONE; then
563     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
564   else
565     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566   fi
567 fi
568 for ac_site_file in $CONFIG_SITE; do
569   if test -r "$ac_site_file"; then
570     echo "loading site script $ac_site_file"
571     . "$ac_site_file"
572   fi
573 done
574
575 if test -r "$cache_file"; then
576   echo "loading cache $cache_file"
577   . $cache_file
578 else
579   echo "creating cache $cache_file"
580   > $cache_file
581 fi
582
583 ac_ext=c
584 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
585 ac_cpp='$CPP $CPPFLAGS'
586 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
587 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
588 cross_compiling=$ac_cv_prog_cc_cross
589
590 ac_exeext=
591 ac_objext=o
592 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
593   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
594   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
595     ac_n= ac_c='
596 ' ac_t='        '
597   else
598     ac_n=-n ac_c= ac_t=
599   fi
600 else
601   ac_n= ac_c='\c' ac_t=
602 fi
603
604 ac_aux_dir=
605 for ac_dir in build $srcdir/build; do
606   if test -f $ac_dir/install-sh; then
607     ac_aux_dir=$ac_dir
608     ac_install_sh="$ac_aux_dir/install-sh -c"
609     break
610   elif test -f $ac_dir/install.sh; then
611     ac_aux_dir=$ac_dir
612     ac_install_sh="$ac_aux_dir/install.sh -c"
613     break
614   fi
615 done
616 if test -z "$ac_aux_dir"; then
617   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
618 fi
619 ac_config_guess=$ac_aux_dir/config.guess
620 ac_config_sub=$ac_aux_dir/config.sub
621 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
622 # Find a good install program.  We prefer a C program (faster),
623 # so one script is as good as another.  But avoid the broken or
624 # incompatible versions:
625 # SysV /etc/install, /usr/sbin/install
626 # SunOS /usr/etc/install
627 # IRIX /sbin/install
628 # AIX /bin/install
629 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
630 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
631 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
632 # ./install, which can be erroneously created by make from ./install.sh.
633 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
634 echo "configure:635: checking for a BSD compatible install" >&5
635 if test -z "$INSTALL"; then
636 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
637   echo $ac_n "(cached) $ac_c" 1>&6
638 else
639     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
640   for ac_dir in $PATH; do
641     # Account for people who put trailing slashes in PATH elements.
642     case "$ac_dir/" in
643     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
644     *)
645       # OSF1 and SCO ODT 3.0 have their own names for install.
646       # Don't use installbsd from OSF since it installs stuff as root
647       # by default.
648       for ac_prog in ginstall scoinst install; do
649         if test -f $ac_dir/$ac_prog; then
650           if test $ac_prog = install &&
651             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
652             # AIX install.  It has an incompatible calling convention.
653             :
654           else
655             ac_cv_path_install="$ac_dir/$ac_prog -c"
656             break 2
657           fi
658         fi
659       done
660       ;;
661     esac
662   done
663   IFS="$ac_save_IFS"
664
665 fi
666   if test "${ac_cv_path_install+set}" = set; then
667     INSTALL="$ac_cv_path_install"
668   else
669     # As a last resort, use the slow shell script.  We don't cache a
670     # path for INSTALL within a source directory, because that will
671     # break other packages using the cache if that directory is
672     # removed, or if the path is relative.
673     INSTALL="$ac_install_sh"
674   fi
675 fi
676 echo "$ac_t""$INSTALL" 1>&6
677
678 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
679 # It thinks the first close brace ends the variable substitution.
680 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
681
682 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
683
684 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
685
686 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
687 echo "configure:688: checking whether build environment is sane" >&5
688 # Just in case
689 sleep 1
690 echo timestamp > conftestfile
691 # Do `set' in a subshell so we don't clobber the current shell's
692 # arguments.  Must try -L first in case configure is actually a
693 # symlink; some systems play weird games with the mod time of symlinks
694 # (eg FreeBSD returns the mod time of the symlink's containing
695 # directory).
696 if (
697    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
698    if test "$*" = "X"; then
699       # -L didn't work.
700       set X `ls -t $srcdir/configure conftestfile`
701    fi
702    if test "$*" != "X $srcdir/configure conftestfile" \
703       && test "$*" != "X conftestfile $srcdir/configure"; then
704
705       # If neither matched, then we have a broken ls.  This can happen
706       # if, for instance, CONFIG_SHELL is bash and it inherits a
707       # broken ls alias from the environment.  This has actually
708       # happened.  Such a system could not be considered "sane".
709       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
710 alias in your environment" 1>&2; exit 1; }
711    fi
712
713    test "$2" = conftestfile
714    )
715 then
716    # Ok.
717    :
718 else
719    { echo "configure: error: newly created file is older than distributed files!
720 Check your system clock" 1>&2; exit 1; }
721 fi
722 rm -f conftest*
723 echo "$ac_t""yes" 1>&6
724 if test "$program_transform_name" = s,x,x,; then
725   program_transform_name=
726 else
727   # Double any \ or $.  echo might interpret backslashes.
728   cat <<\EOF_SED > conftestsed
729 s,\\,\\\\,g; s,\$,$$,g
730 EOF_SED
731   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
732   rm -f conftestsed
733 fi
734 test "$program_prefix" != NONE &&
735   program_transform_name="s,^,${program_prefix},; $program_transform_name"
736 # Use a double $ so make ignores it.
737 test "$program_suffix" != NONE &&
738   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
739
740 # sed with no file args requires a program.
741 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
742
743 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
744 echo "configure:745: checking whether ${MAKE-make} sets \${MAKE}" >&5
745 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
746 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
747   echo $ac_n "(cached) $ac_c" 1>&6
748 else
749   cat > conftestmake <<\EOF
750 all:
751         @echo 'ac_maketemp="${MAKE}"'
752 EOF
753 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
754 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
755 if test -n "$ac_maketemp"; then
756   eval ac_cv_prog_make_${ac_make}_set=yes
757 else
758   eval ac_cv_prog_make_${ac_make}_set=no
759 fi
760 rm -f conftestmake
761 fi
762 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
763   echo "$ac_t""yes" 1>&6
764   SET_MAKE=
765 else
766   echo "$ac_t""no" 1>&6
767   SET_MAKE="MAKE=${MAKE-make}"
768 fi
769
770
771 PACKAGE=OpenLDAP
772
773 VERSION=2.0-devel
774
775 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
776   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
777 fi
778
779
780
781 missing_dir=`cd $ac_aux_dir && pwd`
782 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
783 echo "configure:784: checking for working aclocal" >&5
784 # Run test in a subshell; some versions of sh will print an error if
785 # an executable is not found, even if stderr is redirected.
786 # Redirect stdin to placate older versions of autoconf.  Sigh.
787 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
788    ACLOCAL=aclocal
789    echo "$ac_t""found" 1>&6
790 else
791    ACLOCAL="$missing_dir/missing aclocal"
792    echo "$ac_t""missing" 1>&6
793 fi
794
795 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
796 echo "configure:797: checking for working autoconf" >&5
797 # Run test in a subshell; some versions of sh will print an error if
798 # an executable is not found, even if stderr is redirected.
799 # Redirect stdin to placate older versions of autoconf.  Sigh.
800 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
801    AUTOCONF=autoconf
802    echo "$ac_t""found" 1>&6
803 else
804    AUTOCONF="$missing_dir/missing autoconf"
805    echo "$ac_t""missing" 1>&6
806 fi
807
808 echo $ac_n "checking for working automake""... $ac_c" 1>&6
809 echo "configure:810: checking for working automake" >&5
810 # Run test in a subshell; some versions of sh will print an error if
811 # an executable is not found, even if stderr is redirected.
812 # Redirect stdin to placate older versions of autoconf.  Sigh.
813 if (automake --version) < /dev/null > /dev/null 2>&1; then
814    AUTOMAKE=automake
815    echo "$ac_t""found" 1>&6
816 else
817    AUTOMAKE="$missing_dir/missing automake"
818    echo "$ac_t""missing" 1>&6
819 fi
820
821 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
822 echo "configure:823: checking for working autoheader" >&5
823 # Run test in a subshell; some versions of sh will print an error if
824 # an executable is not found, even if stderr is redirected.
825 # Redirect stdin to placate older versions of autoconf.  Sigh.
826 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
827    AUTOHEADER=autoheader
828    echo "$ac_t""found" 1>&6
829 else
830    AUTOHEADER="$missing_dir/missing autoheader"
831    echo "$ac_t""missing" 1>&6
832 fi
833
834 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
835 echo "configure:836: checking for working makeinfo" >&5
836 # Run test in a subshell; some versions of sh will print an error if
837 # an executable is not found, even if stderr is redirected.
838 # Redirect stdin to placate older versions of autoconf.  Sigh.
839 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
840    MAKEINFO=makeinfo
841    echo "$ac_t""found" 1>&6
842 else
843    MAKEINFO="$missing_dir/missing makeinfo"
844    echo "$ac_t""missing" 1>&6
845 fi
846
847
848
849
850 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
851 echo "configure:852: checking configure arguments" >&5
852
853
854 top_builddir=`pwd`
855
856 ldap_subdir="openldap"
857
858 # Check whether --with-subdir or --without-subdir was given.
859 if test "${with_subdir+set}" = set; then
860   withval="$with_subdir"
861   
862         if test "$withval" = "no"; then
863                 ldap_subdir=""
864         elif test "$withval" != "yes"; then
865                 ldap_subdir="$withval"
866         fi
867
868 fi
869
870
871 # OpenLDAP --enable-debug
872         # Check whether --enable-debug or --disable-debug was given.
873 if test "${enable_debug+set}" = set; then
874   enableval="$enable_debug"
875   
876         ol_arg=invalid
877         for ol_val in auto yes no ; do
878                 if test "$enableval" = "$ol_val" ; then
879                         ol_arg="$ol_val"
880                 fi
881         done
882         if test "$ol_arg" = "invalid" ; then
883                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
884         fi
885         ol_enable_debug="$ol_arg"
886
887 else
888         ol_enable_debug="yes"
889 fi
890 # end --enable-debug
891 ol_enable_syslog=no
892 # OpenLDAP --enable-proctitle
893         # Check whether --enable-proctitle or --disable-proctitle was given.
894 if test "${enable_proctitle+set}" = set; then
895   enableval="$enable_proctitle"
896   
897         ol_arg=invalid
898         for ol_val in auto yes no ; do
899                 if test "$enableval" = "$ol_val" ; then
900                         ol_arg="$ol_val"
901                 fi
902         done
903         if test "$ol_arg" = "invalid" ; then
904                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
905         fi
906         ol_enable_proctitle="$ol_arg"
907
908 else
909         ol_enable_proctitle="yes"
910 fi
911 # end --enable-proctitle
912 # OpenLDAP --enable-cache
913         # Check whether --enable-cache or --disable-cache was given.
914 if test "${enable_cache+set}" = set; then
915   enableval="$enable_cache"
916   
917         ol_arg=invalid
918         for ol_val in auto yes no ; do
919                 if test "$enableval" = "$ol_val" ; then
920                         ol_arg="$ol_val"
921                 fi
922         done
923         if test "$ol_arg" = "invalid" ; then
924                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
925         fi
926         ol_enable_cache="$ol_arg"
927
928 else
929         ol_enable_cache="yes"
930 fi
931 # end --enable-cache
932 # OpenLDAP --enable-dns
933         # Check whether --enable-dns or --disable-dns was given.
934 if test "${enable_dns+set}" = set; then
935   enableval="$enable_dns"
936   
937         ol_arg=invalid
938         for ol_val in auto yes no ; do
939                 if test "$enableval" = "$ol_val" ; then
940                         ol_arg="$ol_val"
941                 fi
942         done
943         if test "$ol_arg" = "invalid" ; then
944                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
945         fi
946         ol_enable_dns="$ol_arg"
947
948 else
949         ol_enable_dns="no"
950 fi
951 # end --enable-dns
952 # OpenLDAP --enable-referrals
953         # Check whether --enable-referrals or --disable-referrals was given.
954 if test "${enable_referrals+set}" = set; then
955   enableval="$enable_referrals"
956   
957         ol_arg=invalid
958         for ol_val in auto yes no ; do
959                 if test "$enableval" = "$ol_val" ; then
960                         ol_arg="$ol_val"
961                 fi
962         done
963         if test "$ol_arg" = "invalid" ; then
964                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
965         fi
966         ol_enable_referrals="$ol_arg"
967
968 else
969         ol_enable_referrals="yes"
970 fi
971 # end --enable-referrals
972 # OpenLDAP --enable-cldap
973         # Check whether --enable-cldap or --disable-cldap was given.
974 if test "${enable_cldap+set}" = set; then
975   enableval="$enable_cldap"
976   
977         ol_arg=invalid
978         for ol_val in auto yes no ; do
979                 if test "$enableval" = "$ol_val" ; then
980                         ol_arg="$ol_val"
981                 fi
982         done
983         if test "$ol_arg" = "invalid" ; then
984                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
985         fi
986         ol_enable_cldap="$ol_arg"
987
988 else
989         ol_enable_cldap="no"
990 fi
991 # end --enable-cldap
992 # OpenLDAP --enable-x_compile
993         # Check whether --enable-x_compile or --disable-x_compile was given.
994 if test "${enable_x_compile+set}" = set; then
995   enableval="$enable_x_compile"
996   
997         ol_arg=invalid
998         for ol_val in yes no ; do
999                 if test "$enableval" = "$ol_val" ; then
1000                         ol_arg="$ol_val"
1001                 fi
1002         done
1003         if test "$ol_arg" = "invalid" ; then
1004                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1005         fi
1006         ol_enable_x_compile="$ol_arg"
1007
1008 else
1009         ol_enable_x_compile="no"
1010 fi
1011 # end --enable-x_compile
1012
1013 # OpenLDAP --enable-dmalloc
1014         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1015 if test "${enable_dmalloc+set}" = set; then
1016   enableval="$enable_dmalloc"
1017   
1018         ol_arg=invalid
1019         for ol_val in auto yes no ; do
1020                 if test "$enableval" = "$ol_val" ; then
1021                         ol_arg="$ol_val"
1022                 fi
1023         done
1024         if test "$ol_arg" = "invalid" ; then
1025                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1026         fi
1027         ol_enable_dmalloc="$ol_arg"
1028
1029 else
1030         ol_enable_dmalloc="no"
1031 fi
1032 # end --enable-dmalloc
1033
1034 # OpenLDAP --with-kerberos
1035         # Check whether --with-kerberos or --without-kerberos was given.
1036 if test "${with_kerberos+set}" = set; then
1037   withval="$with_kerberos"
1038   
1039         ol_arg=invalid
1040         for ol_val in auto k5 k4 afs yes no ; do
1041                 if test "$withval" = "$ol_val" ; then
1042                         ol_arg="$ol_val"
1043                 fi
1044         done
1045         if test "$ol_arg" = "invalid" ; then
1046                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1047         fi
1048         ol_with_kerberos="$ol_arg"
1049
1050 else
1051         ol_with_kerberos="auto"
1052 fi
1053 # end --with-kerberos
1054
1055 # OpenLDAP --with-readline
1056         # Check whether --with-readline or --without-readline was given.
1057 if test "${with_readline+set}" = set; then
1058   withval="$with_readline"
1059   
1060         ol_arg=invalid
1061         for ol_val in auto yes no  ; do
1062                 if test "$withval" = "$ol_val" ; then
1063                         ol_arg="$ol_val"
1064                 fi
1065         done
1066         if test "$ol_arg" = "invalid" ; then
1067                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1068         fi
1069         ol_with_readline="$ol_arg"
1070
1071 else
1072         ol_with_readline="auto"
1073 fi
1074 # end --with-readline
1075
1076 # OpenLDAP --with-threads
1077         # Check whether --with-threads or --without-threads was given.
1078 if test "${with_threads+set}" = set; then
1079   withval="$with_threads"
1080   
1081         ol_arg=invalid
1082         for ol_val in auto posix mach lwp yes no manual  ; do
1083                 if test "$withval" = "$ol_val" ; then
1084                         ol_arg="$ol_val"
1085                 fi
1086         done
1087         if test "$ol_arg" = "invalid" ; then
1088                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1089         fi
1090         ol_with_threads="$ol_arg"
1091
1092 else
1093         ol_with_threads="auto"
1094 fi
1095 # end --with-threads
1096
1097 # OpenLDAP --with-tls
1098         # Check whether --with-tls or --without-tls was given.
1099 if test "${with_tls+set}" = set; then
1100   withval="$with_tls"
1101   
1102         ol_arg=invalid
1103         for ol_val in auto ssleay openssl yes no  ; do
1104                 if test "$withval" = "$ol_val" ; then
1105                         ol_arg="$ol_val"
1106                 fi
1107         done
1108         if test "$ol_arg" = "invalid" ; then
1109                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1110         fi
1111         ol_with_tls="$ol_arg"
1112
1113 else
1114         ol_with_tls="auto"
1115 fi
1116 # end --with-tls
1117
1118 # OpenLDAP --with-yielding_select
1119         # Check whether --with-yielding_select or --without-yielding_select was given.
1120 if test "${with_yielding_select+set}" = set; then
1121   withval="$with_yielding_select"
1122   
1123         ol_arg=invalid
1124         for ol_val in auto yes no manual  ; do
1125                 if test "$withval" = "$ol_val" ; then
1126                         ol_arg="$ol_val"
1127                 fi
1128         done
1129         if test "$ol_arg" = "invalid" ; then
1130                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1131         fi
1132         ol_with_yielding_select="$ol_arg"
1133
1134 else
1135         ol_with_yielding_select="auto"
1136 fi
1137 # end --with-yielding_select
1138
1139
1140
1141 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1142 if test "${with_xxldapdoptions+set}" = set; then
1143   withval="$with_xxldapdoptions"
1144   :
1145 fi
1146
1147 # OpenLDAP --enable-ldapd
1148         # Check whether --enable-ldapd or --disable-ldapd was given.
1149 if test "${enable_ldapd+set}" = set; then
1150   enableval="$enable_ldapd"
1151   
1152         ol_arg=invalid
1153         for ol_val in auto yes no ; do
1154                 if test "$enableval" = "$ol_val" ; then
1155                         ol_arg="$ol_val"
1156                 fi
1157         done
1158         if test "$ol_arg" = "invalid" ; then
1159                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1160         fi
1161         ol_enable_ldapd="$ol_arg"
1162
1163 else
1164         ol_enable_ldapd="no"
1165 fi
1166 # end --enable-ldapd
1167
1168 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1169 if test "${with_xxslapdoptions+set}" = set; then
1170   withval="$with_xxslapdoptions"
1171   :
1172 fi
1173
1174 # OpenLDAP --enable-slapd
1175         # Check whether --enable-slapd or --disable-slapd was given.
1176 if test "${enable_slapd+set}" = set; then
1177   enableval="$enable_slapd"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1187         fi
1188         ol_enable_slapd="$ol_arg"
1189
1190 else
1191         ol_enable_slapd="yes"
1192 fi
1193 # end --enable-slapd
1194 # OpenLDAP --enable-aclgroups
1195         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1196 if test "${enable_aclgroups+set}" = set; then
1197   enableval="$enable_aclgroups"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1207         fi
1208         ol_enable_aclgroups="$ol_arg"
1209
1210 else
1211         ol_enable_aclgroups="auto"
1212 fi
1213 # end --enable-aclgroups
1214 # OpenLDAP --enable-cleartext
1215         # Check whether --enable-cleartext or --disable-cleartext was given.
1216 if test "${enable_cleartext+set}" = set; then
1217   enableval="$enable_cleartext"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1227         fi
1228         ol_enable_cleartext="$ol_arg"
1229
1230 else
1231         ol_enable_cleartext="yes"
1232 fi
1233 # end --enable-cleartext
1234 # OpenLDAP --enable-crypt
1235         # Check whether --enable-crypt or --disable-crypt was given.
1236 if test "${enable_crypt+set}" = set; then
1237   enableval="$enable_crypt"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1247         fi
1248         ol_enable_crypt="$ol_arg"
1249
1250 else
1251         ol_enable_crypt="auto"
1252 fi
1253 # end --enable-crypt
1254 # OpenLDAP --enable-wrappers
1255         # Check whether --enable-wrappers or --disable-wrappers was given.
1256 if test "${enable_wrappers+set}" = set; then
1257   enableval="$enable_wrappers"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1267         fi
1268         ol_enable_wrappers="$ol_arg"
1269
1270 else
1271         ol_enable_wrappers="no"
1272 fi
1273 # end --enable-wrappers
1274 # OpenLDAP --enable-phonetic
1275         # Check whether --enable-phonetic or --disable-phonetic was given.
1276 if test "${enable_phonetic+set}" = set; then
1277   enableval="$enable_phonetic"
1278   
1279         ol_arg=invalid
1280         for ol_val in auto yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1287         fi
1288         ol_enable_phonetic="$ol_arg"
1289
1290 else
1291         ol_enable_phonetic="no"
1292 fi
1293 # end --enable-phonetic
1294 # OpenLDAP --enable-rlookups
1295         # Check whether --enable-rlookups or --disable-rlookups was given.
1296 if test "${enable_rlookups+set}" = set; then
1297   enableval="$enable_rlookups"
1298   
1299         ol_arg=invalid
1300         for ol_val in auto yes no ; do
1301                 if test "$enableval" = "$ol_val" ; then
1302                         ol_arg="$ol_val"
1303                 fi
1304         done
1305         if test "$ol_arg" = "invalid" ; then
1306                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1307         fi
1308         ol_enable_rlookups="$ol_arg"
1309
1310 else
1311         ol_enable_rlookups="auto"
1312 fi
1313 # end --enable-rlookups
1314
1315 # OpenLDAP --enable-bdb2
1316         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1317 if test "${enable_bdb2+set}" = set; then
1318   enableval="$enable_bdb2"
1319   
1320         ol_arg=invalid
1321         for ol_val in auto yes no ; do
1322                 if test "$enableval" = "$ol_val" ; then
1323                         ol_arg="$ol_val"
1324                 fi
1325         done
1326         if test "$ol_arg" = "invalid" ; then
1327                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1328         fi
1329         ol_enable_bdb2="$ol_arg"
1330
1331 else
1332         ol_enable_bdb2="no"
1333 fi
1334 # end --enable-bdb2
1335 # OpenLDAP --enable-ldbm
1336         # Check whether --enable-ldbm or --disable-ldbm was given.
1337 if test "${enable_ldbm+set}" = set; then
1338   enableval="$enable_ldbm"
1339   
1340         ol_arg=invalid
1341         for ol_val in auto yes no ; do
1342                 if test "$enableval" = "$ol_val" ; then
1343                         ol_arg="$ol_val"
1344                 fi
1345         done
1346         if test "$ol_arg" = "invalid" ; then
1347                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1348         fi
1349         ol_enable_ldbm="$ol_arg"
1350
1351 else
1352         ol_enable_ldbm="yes"
1353 fi
1354 # end --enable-ldbm
1355 # OpenLDAP --with-ldbm_api
1356         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1357 if test "${with_ldbm_api+set}" = set; then
1358   withval="$with_ldbm_api"
1359   
1360         ol_arg=invalid
1361         for ol_val in auto db2 db gdbm ndbm manual ; do
1362                 if test "$withval" = "$ol_val" ; then
1363                         ol_arg="$ol_val"
1364                 fi
1365         done
1366         if test "$ol_arg" = "invalid" ; then
1367                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1368         fi
1369         ol_with_ldbm_api="$ol_arg"
1370
1371 else
1372         ol_with_ldbm_api="auto"
1373 fi
1374 # end --with-ldbm_api
1375
1376 # OpenLDAP --with-ldbm_type
1377         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1378 if test "${with_ldbm_type+set}" = set; then
1379   withval="$with_ldbm_type"
1380   
1381         ol_arg=invalid
1382         for ol_val in auto btree hash ; do
1383                 if test "$withval" = "$ol_val" ; then
1384                         ol_arg="$ol_val"
1385                 fi
1386         done
1387         if test "$ol_arg" = "invalid" ; then
1388                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1389         fi
1390         ol_with_ldbm_type="$ol_arg"
1391
1392 else
1393         ol_with_ldbm_type="auto"
1394 fi
1395 # end --with-ldbm_type
1396
1397
1398 # OpenLDAP --enable-passwd
1399         # Check whether --enable-passwd or --disable-passwd was given.
1400 if test "${enable_passwd+set}" = set; then
1401   enableval="$enable_passwd"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto yes no ; do
1405                 if test "$enableval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1411         fi
1412         ol_enable_passwd="$ol_arg"
1413
1414 else
1415         ol_enable_passwd="no"
1416 fi
1417 # end --enable-passwd
1418 # OpenLDAP --enable-perl
1419         # Check whether --enable-perl or --disable-perl was given.
1420 if test "${enable_perl+set}" = set; then
1421   enableval="$enable_perl"
1422   
1423         ol_arg=invalid
1424         for ol_val in auto yes no ; do
1425                 if test "$enableval" = "$ol_val" ; then
1426                         ol_arg="$ol_val"
1427                 fi
1428         done
1429         if test "$ol_arg" = "invalid" ; then
1430                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1431         fi
1432         ol_enable_perl="$ol_arg"
1433
1434 else
1435         ol_enable_perl="no"
1436 fi
1437 # end --enable-perl
1438 # OpenLDAP --enable-shell
1439         # Check whether --enable-shell or --disable-shell was given.
1440 if test "${enable_shell+set}" = set; then
1441   enableval="$enable_shell"
1442   
1443         ol_arg=invalid
1444         for ol_val in auto yes no ; do
1445                 if test "$enableval" = "$ol_val" ; then
1446                         ol_arg="$ol_val"
1447                 fi
1448         done
1449         if test "$ol_arg" = "invalid" ; then
1450                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1451         fi
1452         ol_enable_shell="$ol_arg"
1453
1454 else
1455         ol_enable_shell="no"
1456 fi
1457 # end --enable-shell
1458 # OpenLDAP --enable-tcl
1459         # Check whether --enable-tcl or --disable-tcl was given.
1460 if test "${enable_tcl+set}" = set; then
1461   enableval="$enable_tcl"
1462   
1463         ol_arg=invalid
1464         for ol_val in auto yes no ; do
1465                 if test "$enableval" = "$ol_val" ; then
1466                         ol_arg="$ol_val"
1467                 fi
1468         done
1469         if test "$ol_arg" = "invalid" ; then
1470                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1471         fi
1472         ol_enable_tcl="$ol_arg"
1473
1474 else
1475         ol_enable_tcl="no"
1476 fi
1477 # end --enable-tcl
1478
1479 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1480 if test "${with_xxslurpdoptions+set}" = set; then
1481   withval="$with_xxslurpdoptions"
1482   :
1483 fi
1484
1485 # OpenLDAP --enable-slurpd
1486         # Check whether --enable-slurpd or --disable-slurpd was given.
1487 if test "${enable_slurpd+set}" = set; then
1488   enableval="$enable_slurpd"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1498         fi
1499         ol_enable_slurpd="$ol_arg"
1500
1501 else
1502         ol_enable_slurpd="auto"
1503 fi
1504 # end --enable-slurpd
1505
1506 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1507 if test "${with_xxliboptions+set}" = set; then
1508   withval="$with_xxliboptions"
1509   :
1510 fi
1511
1512 # Check whether --enable-static or --disable-static was given.
1513 if test "${enable_static+set}" = set; then
1514   enableval="$enable_static"
1515   p=${PACKAGE-default}
1516 case "$enableval" in
1517 yes) enable_static=yes ;;
1518 no) enable_static=no ;;
1519 *)
1520   enable_static=no
1521   # Look at the argument we got.  We use all the common list separators.
1522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1523   for pkg in $enableval; do
1524     if test "X$pkg" = "X$p"; then
1525       enable_static=yes
1526     fi
1527   done
1528   IFS="$ac_save_ifs"
1529   ;;
1530 esac
1531 else
1532   enable_static=yes
1533 fi
1534
1535 # Check whether --enable-shared or --disable-shared was given.
1536 if test "${enable_shared+set}" = set; then
1537   enableval="$enable_shared"
1538   p=${PACKAGE-default}
1539 case "$enableval" in
1540 yes) enable_shared=yes ;;
1541 no) enable_shared=no ;;
1542 *)
1543   enable_shared=no
1544   # Look at the argument we got.  We use all the common list separators.
1545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1546   for pkg in $enableval; do
1547     if test "X$pkg" = "X$p"; then
1548       enable_shared=yes
1549     fi
1550   done
1551   IFS="$ac_save_ifs"
1552   ;;
1553 esac
1554 else
1555   enable_shared=yes
1556 fi
1557
1558
1559 # validate options
1560 if test $ol_enable_dns = yes ; then
1561         if test $ol_enable_referrals = no ; then
1562                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1563         fi
1564         if test $ol_enable_referrals = auto ; then
1565                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1566                 ol_enable_referrals=yes
1567         fi
1568 fi
1569
1570 if test $ol_enable_slapd = no ; then
1571                 if test $ol_enable_bdb2 = yes ; then
1572                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1573         fi
1574         if test $ol_enable_ldbm = yes ; then
1575                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1576         fi
1577         if test $ol_enable_passwd = yes ; then
1578                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1579         fi
1580         if test $ol_enable_perl = yes ; then
1581                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1582         fi
1583         if test $ol_enable_shell = yes ; then
1584                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1585         fi
1586         if test $ol_enable_tcl = yes ; then
1587                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1588         fi
1589         if test $ol_enable_aclgroups = yes ; then
1590                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1591         fi
1592         if test $ol_enable_wrappers = yes ; then
1593                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1594         fi
1595         if test $ol_enable_phonetic = yes ; then
1596                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1597         fi
1598         if test $ol_enable_rlookups = yes ; then
1599                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1600         fi
1601         if test $ol_with_ldbm_api != auto ; then
1602                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1603         fi
1604         if test $ol_with_ldbm_type != auto ; then
1605                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1606         fi
1607         if test $ol_enable_slurpd = yes ; then
1608                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1609         fi
1610
1611         # force settings to no
1612         ol_enable_bdb2=no
1613         ol_enable_ldbm=no
1614         ol_enable_passwd=no
1615         ol_enable_perl=no
1616         ol_enable_shell=no
1617         ol_enable_tcl=no
1618         ol_enable_aclgroups=no
1619         ol_enable_wrappers=no
1620         ol_enable_phonetic=no
1621         ol_enable_rlookups=no
1622         ol_with_ldbm_api=no
1623         ol_with_ldbm_type=no
1624         ol_enable_slurpd=no
1625
1626 elif test $ol_enable_ldbm = no ; then
1627         
1628         if test $ol_with_ldbm_api != auto ; then
1629                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1630         fi
1631
1632         if test $ol_with_ldbm_type != auto ; then
1633                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1634         fi
1635
1636         if test $ol_enable_bdb2 = yes ; then
1637                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1638         fi
1639
1640         if test $ol_enable_passwd = no -a \
1641                 $ol_enable_perl = no -a \
1642                 $ol_enable_shell = no -a \
1643                 $ol_enable_tcl = no ; then
1644                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1645         fi
1646
1647         ol_with_ldbm_api=no
1648         ol_with_ldbm_type=no
1649
1650 elif test $ol_enable_bdb2 = yes ; then
1651         
1652         if test $ol_with_ldbm_api != auto -a \
1653                 $ol_with_ldbm_api != db2 ; then
1654                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1655         fi
1656
1657         ol_with_ldbm_api=db2
1658
1659 else
1660         
1661         if test $ol_enable_bdb2 != no ; then
1662                 if test $ol_with_ldbm_api != auto -a \
1663                         $ol_with_ldbm_api != db2 ; then
1664                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1665                         ol_enable_bdb2=no
1666                 fi
1667         fi
1668
1669         if test $ol_with_ldbm_api = gdbm -a \
1670                 $ol_with_ldbm_type = btree ; then
1671                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1672         fi
1673         if test $ol_with_ldbm_api = ndbm -a \
1674                 $ol_with_ldbm_type = btree ; then
1675                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1676         fi
1677 fi
1678
1679 if test $ol_enable_slurpd = yes ; then
1680                 if test $ol_with_threads = no ; then
1681                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1682         fi
1683 fi
1684
1685 echo "$ac_t""done" 1>&6
1686
1687
1688 # Make sure we can run config.sub.
1689 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1690 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1691 fi
1692
1693 echo $ac_n "checking host system type""... $ac_c" 1>&6
1694 echo "configure:1695: checking host system type" >&5
1695
1696 host_alias=$host
1697 case "$host_alias" in
1698 NONE)
1699   case $nonopt in
1700   NONE)
1701     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1702     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1703     fi ;;
1704   *) host_alias=$nonopt ;;
1705   esac ;;
1706 esac
1707
1708 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1709 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1710 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1711 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1712 echo "$ac_t""$host" 1>&6
1713
1714
1715 ## Initialize vars
1716 LDAP_LIBS=
1717 LDBM_LIBS=
1718 LTHREAD_LIBS=
1719 LUTIL_LIBS=
1720
1721 LDAPD_LIBS=
1722 SLAPD_LIBS=
1723 SLURPD_LIBS=
1724
1725 BUILD_LDAPD=no
1726 BUILD_SLAPD=no
1727 BUILD_SLURPD=no
1728
1729 BUILD_BDB2=no
1730 BUILD_LDBM=no
1731 BUILD_PASSWD=no
1732 BUILD_PERL=no
1733 BUILD_SHELL=no
1734 BUILD_TCL=no
1735 BUILD_THREAD=no
1736
1737 SLAPD_PERL_LDFLAGS=
1738 SLAPD_PERL_CPPFLAGS=
1739
1740 KRB_LIBS=
1741 READLINE_LIBS=
1742 TERMCAP_LIBS=
1743 TLS_LIBS=
1744
1745
1746 # Find a good install program.  We prefer a C program (faster),
1747 # so one script is as good as another.  But avoid the broken or
1748 # incompatible versions:
1749 # SysV /etc/install, /usr/sbin/install
1750 # SunOS /usr/etc/install
1751 # IRIX /sbin/install
1752 # AIX /bin/install
1753 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1754 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1755 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1756 # ./install, which can be erroneously created by make from ./install.sh.
1757 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1758 echo "configure:1759: checking for a BSD compatible install" >&5
1759 if test -z "$INSTALL"; then
1760 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1761   echo $ac_n "(cached) $ac_c" 1>&6
1762 else
1763     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1764   for ac_dir in $PATH; do
1765     # Account for people who put trailing slashes in PATH elements.
1766     case "$ac_dir/" in
1767     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1768     *)
1769       # OSF1 and SCO ODT 3.0 have their own names for install.
1770       # Don't use installbsd from OSF since it installs stuff as root
1771       # by default.
1772       for ac_prog in ginstall scoinst install; do
1773         if test -f $ac_dir/$ac_prog; then
1774           if test $ac_prog = install &&
1775             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1776             # AIX install.  It has an incompatible calling convention.
1777             :
1778           else
1779             ac_cv_path_install="$ac_dir/$ac_prog -c"
1780             break 2
1781           fi
1782         fi
1783       done
1784       ;;
1785     esac
1786   done
1787   IFS="$ac_save_IFS"
1788
1789 fi
1790   if test "${ac_cv_path_install+set}" = set; then
1791     INSTALL="$ac_cv_path_install"
1792   else
1793     # As a last resort, use the slow shell script.  We don't cache a
1794     # path for INSTALL within a source directory, because that will
1795     # break other packages using the cache if that directory is
1796     # removed, or if the path is relative.
1797     INSTALL="$ac_install_sh"
1798   fi
1799 fi
1800 echo "$ac_t""$INSTALL" 1>&6
1801
1802 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1803 # It thinks the first close brace ends the variable substitution.
1804 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1805
1806 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1807
1808 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1809
1810
1811 CC=${CC-"cc"}
1812
1813 # Extract the first word of "ranlib", so it can be a program name with args.
1814 set dummy ranlib; ac_word=$2
1815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1816 echo "configure:1817: checking for $ac_word" >&5
1817 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1818   echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820   if test -n "$RANLIB"; then
1821   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1822 else
1823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1824   ac_dummy="$PATH"
1825   for ac_dir in $ac_dummy; do
1826     test -z "$ac_dir" && ac_dir=.
1827     if test -f $ac_dir/$ac_word; then
1828       ac_cv_prog_RANLIB="ranlib"
1829       break
1830     fi
1831   done
1832   IFS="$ac_save_ifs"
1833   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1834 fi
1835 fi
1836 RANLIB="$ac_cv_prog_RANLIB"
1837 if test -n "$RANLIB"; then
1838   echo "$ac_t""$RANLIB" 1>&6
1839 else
1840   echo "$ac_t""no" 1>&6
1841 fi
1842
1843 # Extract the first word of "gcc", so it can be a program name with args.
1844 set dummy gcc; ac_word=$2
1845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1846 echo "configure:1847: checking for $ac_word" >&5
1847 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1848   echo $ac_n "(cached) $ac_c" 1>&6
1849 else
1850   if test -n "$CC"; then
1851   ac_cv_prog_CC="$CC" # Let the user override the test.
1852 else
1853   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1854   ac_dummy="$PATH"
1855   for ac_dir in $ac_dummy; do
1856     test -z "$ac_dir" && ac_dir=.
1857     if test -f $ac_dir/$ac_word; then
1858       ac_cv_prog_CC="gcc"
1859       break
1860     fi
1861   done
1862   IFS="$ac_save_ifs"
1863 fi
1864 fi
1865 CC="$ac_cv_prog_CC"
1866 if test -n "$CC"; then
1867   echo "$ac_t""$CC" 1>&6
1868 else
1869   echo "$ac_t""no" 1>&6
1870 fi
1871
1872 if test -z "$CC"; then
1873   # Extract the first word of "cc", so it can be a program name with args.
1874 set dummy cc; ac_word=$2
1875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1876 echo "configure:1877: checking for $ac_word" >&5
1877 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1878   echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880   if test -n "$CC"; then
1881   ac_cv_prog_CC="$CC" # Let the user override the test.
1882 else
1883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1884   ac_prog_rejected=no
1885   ac_dummy="$PATH"
1886   for ac_dir in $ac_dummy; do
1887     test -z "$ac_dir" && ac_dir=.
1888     if test -f $ac_dir/$ac_word; then
1889       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1890         ac_prog_rejected=yes
1891         continue
1892       fi
1893       ac_cv_prog_CC="cc"
1894       break
1895     fi
1896   done
1897   IFS="$ac_save_ifs"
1898 if test $ac_prog_rejected = yes; then
1899   # We found a bogon in the path, so make sure we never use it.
1900   set dummy $ac_cv_prog_CC
1901   shift
1902   if test $# -gt 0; then
1903     # We chose a different compiler from the bogus one.
1904     # However, it has the same basename, so the bogon will be chosen
1905     # first if we set CC to just the basename; use the full file name.
1906     shift
1907     set dummy "$ac_dir/$ac_word" "$@"
1908     shift
1909     ac_cv_prog_CC="$@"
1910   fi
1911 fi
1912 fi
1913 fi
1914 CC="$ac_cv_prog_CC"
1915 if test -n "$CC"; then
1916   echo "$ac_t""$CC" 1>&6
1917 else
1918   echo "$ac_t""no" 1>&6
1919 fi
1920
1921   if test -z "$CC"; then
1922     case "`uname -s`" in
1923     *win32* | *WIN32*)
1924       # Extract the first word of "cl", so it can be a program name with args.
1925 set dummy cl; ac_word=$2
1926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1927 echo "configure:1928: checking for $ac_word" >&5
1928 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1929   echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931   if test -n "$CC"; then
1932   ac_cv_prog_CC="$CC" # Let the user override the test.
1933 else
1934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1935   ac_dummy="$PATH"
1936   for ac_dir in $ac_dummy; do
1937     test -z "$ac_dir" && ac_dir=.
1938     if test -f $ac_dir/$ac_word; then
1939       ac_cv_prog_CC="cl"
1940       break
1941     fi
1942   done
1943   IFS="$ac_save_ifs"
1944 fi
1945 fi
1946 CC="$ac_cv_prog_CC"
1947 if test -n "$CC"; then
1948   echo "$ac_t""$CC" 1>&6
1949 else
1950   echo "$ac_t""no" 1>&6
1951 fi
1952  ;;
1953     esac
1954   fi
1955   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1956 fi
1957
1958 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1959 echo "configure:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1960
1961 ac_ext=c
1962 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1963 ac_cpp='$CPP $CPPFLAGS'
1964 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1965 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1966 cross_compiling=$ac_cv_prog_cc_cross
1967
1968 cat > conftest.$ac_ext << EOF
1969
1970 #line 1971 "configure"
1971 #include "confdefs.h"
1972
1973 main(){return(0);}
1974 EOF
1975 if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1976   ac_cv_prog_cc_works=yes
1977   # If we can't run a trivial program, we are probably using a cross compiler.
1978   if (./conftest; exit) 2>/dev/null; then
1979     ac_cv_prog_cc_cross=no
1980   else
1981     ac_cv_prog_cc_cross=yes
1982   fi
1983 else
1984   echo "configure: failed program was:" >&5
1985   cat conftest.$ac_ext >&5
1986   ac_cv_prog_cc_works=no
1987 fi
1988 rm -fr conftest*
1989 ac_ext=c
1990 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1991 ac_cpp='$CPP $CPPFLAGS'
1992 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1993 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1994 cross_compiling=$ac_cv_prog_cc_cross
1995
1996 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1997 if test $ac_cv_prog_cc_works = no; then
1998   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1999 fi
2000 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2002 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2003 cross_compiling=$ac_cv_prog_cc_cross
2004
2005 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2006 echo "configure:2007: checking whether we are using GNU C" >&5
2007 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2008   echo $ac_n "(cached) $ac_c" 1>&6
2009 else
2010   cat > conftest.c <<EOF
2011 #ifdef __GNUC__
2012   yes;
2013 #endif
2014 EOF
2015 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2016   ac_cv_prog_gcc=yes
2017 else
2018   ac_cv_prog_gcc=no
2019 fi
2020 fi
2021
2022 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2023
2024 if test $ac_cv_prog_gcc = yes; then
2025   GCC=yes
2026 else
2027   GCC=
2028 fi
2029
2030 ac_test_CFLAGS="${CFLAGS+set}"
2031 ac_save_CFLAGS="$CFLAGS"
2032 CFLAGS=
2033 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2034 echo "configure:2035: checking whether ${CC-cc} accepts -g" >&5
2035 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   echo 'void f(){}' > conftest.c
2039 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2040   ac_cv_prog_cc_g=yes
2041 else
2042   ac_cv_prog_cc_g=no
2043 fi
2044 rm -f conftest*
2045
2046 fi
2047
2048 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2049 if test "$ac_test_CFLAGS" = set; then
2050   CFLAGS="$ac_save_CFLAGS"
2051 elif test $ac_cv_prog_cc_g = yes; then
2052   if test "$GCC" = yes; then
2053     CFLAGS="-g -O2"
2054   else
2055     CFLAGS="-g"
2056   fi
2057 else
2058   if test "$GCC" = yes; then
2059     CFLAGS="-O2"
2060   else
2061     CFLAGS=
2062   fi
2063 fi
2064
2065 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2066 if test "${with_gnu_ld+set}" = set; then
2067   withval="$with_gnu_ld"
2068   test "$withval" = no || with_gnu_ld=yes
2069 else
2070   with_gnu_ld=no
2071 fi
2072
2073
2074 ac_prog=ld
2075 if test "$ac_cv_prog_gcc" = yes; then
2076   # Check if gcc -print-prog-name=ld gives a path.
2077   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2078 echo "configure:2079: checking for ld used by GCC" >&5
2079   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2080   case "$ac_prog" in
2081   # Accept absolute paths.
2082   /* | A-Za-z:\\*)
2083     test -z "$LD" && LD="$ac_prog"
2084     ;;
2085   "")
2086     # If it fails, then pretend we aren't using GCC.
2087     ac_prog=ld
2088     ;;
2089   *)
2090     # If it is relative, then search for the first ld in PATH.
2091     with_gnu_ld=unknown
2092     ;;
2093   esac
2094 elif test "$with_gnu_ld" = yes; then
2095   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2096 echo "configure:2097: checking for GNU ld" >&5
2097 else
2098   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2099 echo "configure:2100: checking for non-GNU ld" >&5
2100 fi
2101 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2102   echo $ac_n "(cached) $ac_c" 1>&6
2103 else
2104   if test -z "$LD"; then
2105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2106   for ac_dir in $PATH; do
2107     test -z "$ac_dir" && ac_dir=.
2108     if test -f "$ac_dir/$ac_prog"; then
2109       ac_cv_path_LD="$ac_dir/$ac_prog"
2110       # Check to see if the program is GNU ld.  I'd rather use --version,
2111       # but apparently some GNU ld's only accept -v.
2112       # Break only if it was the GNU/non-GNU ld that we prefer.
2113       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2114         test "$with_gnu_ld" != no && break
2115       else
2116         test "$with_gnu_ld" != yes && break
2117       fi
2118     fi
2119   done
2120   IFS="$ac_save_ifs"
2121 else
2122   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2123 fi
2124 fi
2125
2126 LD="$ac_cv_path_LD"
2127 if test -n "$LD"; then
2128   echo "$ac_t""$LD" 1>&6
2129 else
2130   echo "$ac_t""no" 1>&6
2131 fi
2132 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2133
2134 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2135 echo "configure:2136: checking if the linker ($LD) is GNU ld" >&5
2136 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2137   echo $ac_n "(cached) $ac_c" 1>&6
2138 else
2139   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2140 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2141   ac_cv_prog_gnu_ld=yes
2142 else
2143   ac_cv_prog_gnu_ld=no
2144 fi
2145 fi
2146
2147 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2148
2149
2150 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2151 echo "configure:2152: checking for BSD-compatible nm" >&5
2152 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2153   echo $ac_n "(cached) $ac_c" 1>&6
2154 else
2155   case "$NM" in
2156 /* | A-Za-z:\\*)
2157   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2158   ;;
2159 *)
2160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2161   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2162     test -z "$ac_dir" && ac_dir=.
2163     if test -f $ac_dir/nm; then
2164       # Check to see if the nm accepts a BSD-compat flag.
2165       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2166       #   nm: unknown option "B" ignored
2167       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2168         ac_cv_path_NM="$ac_dir/nm -B"
2169       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2170         ac_cv_path_NM="$ac_dir/nm -p"
2171       else
2172         ac_cv_path_NM="$ac_dir/nm"
2173       fi
2174       break
2175     fi
2176   done
2177   IFS="$ac_save_ifs"
2178   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2179   ;;
2180 esac
2181 fi
2182
2183 NM="$ac_cv_path_NM"
2184 echo "$ac_t""$NM" 1>&6
2185
2186
2187 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2188 echo "configure:2189: checking whether ln -s works" >&5
2189 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2190   echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192   rm -f conftestdata
2193 if ln -s X conftestdata 2>/dev/null
2194 then
2195   rm -f conftestdata
2196   ac_cv_prog_LN_S="ln -s"
2197 else
2198   ac_cv_prog_LN_S=ln
2199 fi
2200 fi
2201 LN_S="$ac_cv_prog_LN_S"
2202 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2203   echo "$ac_t""yes" 1>&6
2204 else
2205   echo "$ac_t""no" 1>&6
2206 fi
2207
2208 # Always use our own libtool.
2209 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2210
2211 # Check for any special flags to pass to ltconfig.
2212 libtool_flags=
2213 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2214 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2215 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2216 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2217 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2218
2219 # Some flags need to be propagated to the compiler or linker for good
2220 # libtool support.
2221 case "$host" in
2222 *-*-irix6*)
2223   # Find out which ABI we are using.
2224   echo '#line 2225 "configure"' > conftest.$ac_ext
2225   if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2226     case "`/usr/bin/file conftest.o`" in
2227     *32-bit*)
2228       LD="${LD-ld} -32"
2229       ;;
2230     *N32*)
2231       LD="${LD-ld} -n32"
2232       ;;
2233     *64-bit*)
2234       LD="${LD-ld} -64"
2235       ;;
2236     esac
2237   fi
2238   rm -rf conftest*
2239   ;;
2240
2241 *-*-sco3.2v5*)
2242   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2243   CFLAGS="$CFLAGS -belf"
2244   ;;
2245 esac
2246
2247 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2248 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2249 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2250 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2251 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2252 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2253
2254
2255 for ac_prog in mawk gawk nawk awk
2256 do
2257 # Extract the first word of "$ac_prog", so it can be a program name with args.
2258 set dummy $ac_prog; ac_word=$2
2259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2260 echo "configure:2261: checking for $ac_word" >&5
2261 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2262   echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264   if test -n "$AWK"; then
2265   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2266 else
2267   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2268   ac_dummy="$PATH"
2269   for ac_dir in $ac_dummy; do
2270     test -z "$ac_dir" && ac_dir=.
2271     if test -f $ac_dir/$ac_word; then
2272       ac_cv_prog_AWK="$ac_prog"
2273       break
2274     fi
2275   done
2276   IFS="$ac_save_ifs"
2277 fi
2278 fi
2279 AWK="$ac_cv_prog_AWK"
2280 if test -n "$AWK"; then
2281   echo "$ac_t""$AWK" 1>&6
2282 else
2283   echo "$ac_t""no" 1>&6
2284 fi
2285
2286 test -n "$AWK" && break
2287 done
2288
2289 # test for ln hardlink support
2290 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2291 echo "configure:2292: checking whether ln works" >&5
2292 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2293   echo $ac_n "(cached) $ac_c" 1>&6
2294 else
2295   rm -f conftest.src conftest.dst
2296 echo "conftest" > conftest.src
2297 if ln conftest.src conftest.dst 2>/dev/null
2298 then
2299   ol_cv_prog_LN_H="ln"
2300 else
2301   ol_cv_prog_LN_H="cp"
2302 fi
2303 rm -f conftest.src conftest.dst
2304
2305 fi
2306 LN_H="$ol_cv_prog_LN_H"
2307 if test "$ol_cv_prog_LN_H" = "ln"; then
2308         echo "$ac_t""yes" 1>&6
2309 else
2310         echo "$ac_t""no" 1>&6
2311 fi
2312
2313 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2314 echo "configure:2315: checking whether ln -s works" >&5
2315 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   rm -f conftestdata
2319 if ln -s X conftestdata 2>/dev/null
2320 then
2321   rm -f conftestdata
2322   ac_cv_prog_LN_S="ln -s"
2323 else
2324   ac_cv_prog_LN_S=ln
2325 fi
2326 fi
2327 LN_S="$ac_cv_prog_LN_S"
2328 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2329   echo "$ac_t""yes" 1>&6
2330 else
2331   echo "$ac_t""no" 1>&6
2332 fi
2333
2334
2335 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2336         LN_S="$LN_H"
2337 fi
2338
2339 # Extract the first word of "sendmail", so it can be a program name with args.
2340 set dummy sendmail; ac_word=$2
2341 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2342 echo "configure:2343: checking for $ac_word" >&5
2343 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2344   echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346   case "$SENDMAIL" in
2347   /*)
2348   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2349   ;;
2350   ?:/*)                  
2351   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2352   ;;
2353   *)
2354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2355   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2356   for ac_dir in $ac_dummy; do 
2357     test -z "$ac_dir" && ac_dir=.
2358     if test -f $ac_dir/$ac_word; then
2359       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2360       break
2361     fi
2362   done
2363   IFS="$ac_save_ifs"
2364   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2365   ;;
2366 esac
2367 fi
2368 SENDMAIL="$ac_cv_path_SENDMAIL"
2369 if test -n "$SENDMAIL"; then
2370   echo "$ac_t""$SENDMAIL" 1>&6
2371 else
2372   echo "$ac_t""no" 1>&6
2373 fi
2374
2375 # Extract the first word of "vi", so it can be a program name with args.
2376 set dummy vi; ac_word=$2
2377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2378 echo "configure:2379: checking for $ac_word" >&5
2379 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2380   echo $ac_n "(cached) $ac_c" 1>&6
2381 else
2382   case "$EDITOR" in
2383   /*)
2384   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2385   ;;
2386   ?:/*)                  
2387   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2388   ;;
2389   *)
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2391   ac_dummy="$PATH:/usr/ucb"
2392   for ac_dir in $ac_dummy; do 
2393     test -z "$ac_dir" && ac_dir=.
2394     if test -f $ac_dir/$ac_word; then
2395       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2396       break
2397     fi
2398   done
2399   IFS="$ac_save_ifs"
2400   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2401   ;;
2402 esac
2403 fi
2404 EDITOR="$ac_cv_path_EDITOR"
2405 if test -n "$EDITOR"; then
2406   echo "$ac_t""$EDITOR" 1>&6
2407 else
2408   echo "$ac_t""no" 1>&6
2409 fi
2410
2411 # Extract the first word of "finger", so it can be a program name with args.
2412 set dummy finger; ac_word=$2
2413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2414 echo "configure:2415: checking for $ac_word" >&5
2415 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2416   echo $ac_n "(cached) $ac_c" 1>&6
2417 else
2418   case "$FINGER" in
2419   /*)
2420   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2421   ;;
2422   ?:/*)                  
2423   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2424   ;;
2425   *)
2426   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2427   ac_dummy="$PATH:/usr/ucb"
2428   for ac_dir in $ac_dummy; do 
2429     test -z "$ac_dir" && ac_dir=.
2430     if test -f $ac_dir/$ac_word; then
2431       ac_cv_path_FINGER="$ac_dir/$ac_word"
2432       break
2433     fi
2434   done
2435   IFS="$ac_save_ifs"
2436   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2437   ;;
2438 esac
2439 fi
2440 FINGER="$ac_cv_path_FINGER"
2441 if test -n "$FINGER"; then
2442   echo "$ac_t""$FINGER" 1>&6
2443 else
2444   echo "$ac_t""no" 1>&6
2445 fi
2446
2447
2448 if test $ol_enable_perl = yes ; then
2449         # Extract the first word of "perl", so it can be a program name with args.
2450 set dummy perl; ac_word=$2
2451 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2452 echo "configure:2453: checking for $ac_word" >&5
2453 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2454   echo $ac_n "(cached) $ac_c" 1>&6
2455 else
2456   case "$PERLBIN" in
2457   /*)
2458   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2459   ;;
2460   ?:/*)                  
2461   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2462   ;;
2463   *)
2464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2465   ac_dummy="$PATH"
2466   for ac_dir in $ac_dummy; do 
2467     test -z "$ac_dir" && ac_dir=.
2468     if test -f $ac_dir/$ac_word; then
2469       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2470       break
2471     fi
2472   done
2473   IFS="$ac_save_ifs"
2474   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2475   ;;
2476 esac
2477 fi
2478 PERLBIN="$ac_cv_path_PERLBIN"
2479 if test -n "$PERLBIN"; then
2480   echo "$ac_t""$PERLBIN" 1>&6
2481 else
2482   echo "$ac_t""no" 1>&6
2483 fi
2484
2485
2486         if test "no$PERLBIN" = "no" ; then
2487                 ol_enable_perl=no
2488         fi
2489
2490         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2491         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e perl_inc`"
2492 fi
2493
2494 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2495 echo "configure:2496: checking how to run the C preprocessor" >&5
2496 # On Suns, sometimes $CPP names a directory.
2497 if test -n "$CPP" && test -d "$CPP"; then
2498   CPP=
2499 fi
2500 if test -z "$CPP"; then
2501 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2502   echo $ac_n "(cached) $ac_c" 1>&6
2503 else
2504     # This must be in double quotes, not single quotes, because CPP may get
2505   # substituted into the Makefile and "${CC-cc}" will confuse make.
2506   CPP="${CC-cc} -E"
2507   # On the NeXT, cc -E runs the code through the compiler's parser,
2508   # not just through cpp.
2509   cat > conftest.$ac_ext <<EOF
2510 #line 2511 "configure"
2511 #include "confdefs.h"
2512 #include <assert.h>
2513 Syntax Error
2514 EOF
2515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2516 { (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518 if test -z "$ac_err"; then
2519   :
2520 else
2521   echo "$ac_err" >&5
2522   echo "configure: failed program was:" >&5
2523   cat conftest.$ac_ext >&5
2524   rm -rf conftest*
2525   CPP="${CC-cc} -E -traditional-cpp"
2526   cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 #include <assert.h>
2530 Syntax Error
2531 EOF
2532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2533 { (eval echo configure:2534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535 if test -z "$ac_err"; then
2536   :
2537 else
2538   echo "$ac_err" >&5
2539   echo "configure: failed program was:" >&5
2540   cat conftest.$ac_ext >&5
2541   rm -rf conftest*
2542   CPP="${CC-cc} -nologo -E"
2543   cat > conftest.$ac_ext <<EOF
2544 #line 2545 "configure"
2545 #include "confdefs.h"
2546 #include <assert.h>
2547 Syntax Error
2548 EOF
2549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2550 { (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552 if test -z "$ac_err"; then
2553   :
2554 else
2555   echo "$ac_err" >&5
2556   echo "configure: failed program was:" >&5
2557   cat conftest.$ac_ext >&5
2558   rm -rf conftest*
2559   CPP=/lib/cpp
2560 fi
2561 rm -f conftest*
2562 fi
2563 rm -f conftest*
2564 fi
2565 rm -f conftest*
2566   ac_cv_prog_CPP="$CPP"
2567 fi
2568   CPP="$ac_cv_prog_CPP"
2569 else
2570   ac_cv_prog_CPP="$CPP"
2571 fi
2572 echo "$ac_t""$CPP" 1>&6
2573
2574
2575 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2576         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2577
2578 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2579         echo "configure: warning: programs compiled here do run here..." 1>&2
2580         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2581
2582 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2583         echo "configure: warning: programs compiled here do not run here..." 1>&2
2584         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2585 fi
2586
2587 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2588 echo "configure:2589: checking for AIX" >&5
2589 cat > conftest.$ac_ext <<EOF
2590 #line 2591 "configure"
2591 #include "confdefs.h"
2592 #ifdef _AIX
2593   yes
2594 #endif
2595
2596 EOF
2597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2598   egrep "yes" >/dev/null 2>&1; then
2599   rm -rf conftest*
2600   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2601 #define _ALL_SOURCE 1
2602 EOF
2603
2604 else
2605   rm -rf conftest*
2606   echo "$ac_t""no" 1>&6
2607 fi
2608 rm -f conftest*
2609
2610
2611 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2612 echo "configure:2613: checking for POSIXized ISC" >&5
2613 if test -d /etc/conf/kconfig.d &&
2614   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2615 then
2616   echo "$ac_t""yes" 1>&6
2617   ISC=yes # If later tests want to check for ISC.
2618   cat >> confdefs.h <<\EOF
2619 #define _POSIX_SOURCE 1
2620 EOF
2621
2622   if test "$GCC" = yes; then
2623     CC="$CC -posix"
2624   else
2625     CC="$CC -Xp"
2626   fi
2627 else
2628   echo "$ac_t""no" 1>&6
2629   ISC=
2630 fi
2631
2632 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2633 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2634 echo "configure:2635: checking for minix/config.h" >&5
2635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641 #include <minix/config.h>
2642 EOF
2643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2644 { (eval echo configure:2645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2646 if test -z "$ac_err"; then
2647   rm -rf conftest*
2648   eval "ac_cv_header_$ac_safe=yes"
2649 else
2650   echo "$ac_err" >&5
2651   echo "configure: failed program was:" >&5
2652   cat conftest.$ac_ext >&5
2653   rm -rf conftest*
2654   eval "ac_cv_header_$ac_safe=no"
2655 fi
2656 rm -f conftest*
2657 fi
2658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2659   echo "$ac_t""yes" 1>&6
2660   MINIX=yes
2661 else
2662   echo "$ac_t""no" 1>&6
2663 MINIX=
2664 fi
2665
2666 if test "$MINIX" = yes; then
2667   cat >> confdefs.h <<\EOF
2668 #define _POSIX_SOURCE 1
2669 EOF
2670
2671   cat >> confdefs.h <<\EOF
2672 #define _POSIX_1_SOURCE 2
2673 EOF
2674
2675   cat >> confdefs.h <<\EOF
2676 #define _MINIX 1
2677 EOF
2678
2679 fi
2680
2681
2682 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2683 echo "configure:2684: checking for be_app in -lbe" >&5
2684 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2686   echo $ac_n "(cached) $ac_c" 1>&6
2687 else
2688   ac_save_LIBS="$LIBS"
2689 LIBS="-lbe -lroot $LIBS"
2690 cat > conftest.$ac_ext <<EOF
2691 #line 2692 "configure"
2692 #include "confdefs.h"
2693 /* Override any gcc2 internal prototype to avoid an error.  */
2694 /* We use char because int might match the return type of a gcc2
2695     builtin and then its argument prototype would still apply.  */
2696 char be_app();
2697
2698 int main() {
2699 be_app()
2700 ; return 0; }
2701 EOF
2702 if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2703   rm -rf conftest*
2704   eval "ac_cv_lib_$ac_lib_var=yes"
2705 else
2706   echo "configure: failed program was:" >&5
2707   cat conftest.$ac_ext >&5
2708   rm -rf conftest*
2709   eval "ac_cv_lib_$ac_lib_var=no"
2710 fi
2711 rm -f conftest*
2712 LIBS="$ac_save_LIBS"
2713
2714 fi
2715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2716   echo "$ac_t""yes" 1>&6
2717   LIBS="$LIBS -lbe -lroot"
2718 else
2719   echo "$ac_t""no" 1>&6
2720 :
2721 fi
2722
2723
2724 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2725 echo "configure:2726: checking for Cygwin environment" >&5
2726 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2727   echo $ac_n "(cached) $ac_c" 1>&6
2728 else
2729   cat > conftest.$ac_ext <<EOF
2730 #line 2731 "configure"
2731 #include "confdefs.h"
2732
2733 int main() {
2734
2735 #ifndef __CYGWIN__
2736 #define __CYGWIN__ __CYGWIN32__
2737 #endif
2738 return __CYGWIN__;
2739 ; return 0; }
2740 EOF
2741 if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2742   rm -rf conftest*
2743   ac_cv_cygwin=yes
2744 else
2745   echo "configure: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   rm -rf conftest*
2748   ac_cv_cygwin=no
2749 fi
2750 rm -f conftest*
2751 rm -f conftest*
2752 fi
2753
2754 echo "$ac_t""$ac_cv_cygwin" 1>&6
2755 CYGWIN=
2756 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2757 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2758 echo "configure:2759: checking for mingw32 environment" >&5
2759 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2760   echo $ac_n "(cached) $ac_c" 1>&6
2761 else
2762   cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765
2766 int main() {
2767 return __MINGW32__;
2768 ; return 0; }
2769 EOF
2770 if { (eval echo configure:2771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2771   rm -rf conftest*
2772   ac_cv_mingw32=yes
2773 else
2774   echo "configure: failed program was:" >&5
2775   cat conftest.$ac_ext >&5
2776   rm -rf conftest*
2777   ac_cv_mingw32=no
2778 fi
2779 rm -f conftest*
2780 rm -f conftest*
2781 fi
2782
2783 echo "$ac_t""$ac_cv_mingw32" 1>&6
2784 MINGW32=
2785 test "$ac_cv_mingw32" = yes && MINGW32=yes
2786
2787
2788 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2789 echo "configure:2790: checking for executable suffix" >&5
2790 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2794   ac_cv_exeext=.exe
2795 else
2796   rm -f conftest*
2797   echo 'int main () { return 0; }' > conftest.$ac_ext
2798   ac_cv_exeext=
2799   if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2800     for file in conftest.*; do
2801       case $file in
2802       *.c | *.o | *.obj) ;;
2803       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2804       esac
2805     done
2806   else
2807     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2808   fi
2809   rm -f conftest*
2810   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2811 fi
2812 fi
2813
2814 EXEEXT=""
2815 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2816 echo "$ac_t""${ac_cv_exeext}" 1>&6
2817 ac_exeext=$EXEEXT
2818
2819 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2820 echo "configure:2821: checking for object suffix" >&5
2821 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   rm -f conftest*
2825 echo 'int i = 1;' > conftest.$ac_ext
2826 if { (eval echo configure:2827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2827   for ac_file in conftest.*; do
2828     case $ac_file in
2829     *.c) ;;
2830     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2831     esac
2832   done
2833 else
2834   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2835 fi
2836 rm -f conftest*
2837 fi
2838
2839 echo "$ac_t""$ac_cv_objext" 1>&6
2840 OBJEXT=$ac_cv_objext
2841 ac_objext=$ac_cv_objext
2842
2843
2844
2845
2846
2847 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2848 echo "configure:2849: checking for ${CC-cc} option to accept ANSI C" >&5
2849 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2850   echo $ac_n "(cached) $ac_c" 1>&6
2851 else
2852   am_cv_prog_cc_stdc=no
2853 ac_save_CC="$CC"
2854 # Don't try gcc -ansi; that turns off useful extensions and
2855 # breaks some systems' header files.
2856 # AIX                   -qlanglvl=ansi
2857 # Ultrix and OSF/1      -std1
2858 # HP-UX                 -Aa -D_HPUX_SOURCE
2859 # SVR4                  -Xc -D__EXTENSIONS__
2860 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2861 do
2862   CC="$ac_save_CC $ac_arg"
2863   cat > conftest.$ac_ext <<EOF
2864 #line 2865 "configure"
2865 #include "confdefs.h"
2866 #include <stdarg.h>
2867 #include <stdio.h>
2868 #include <sys/types.h>
2869 #include <sys/stat.h>
2870 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2871 struct buf { int x; };
2872 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2873 static char *e (p, i)
2874      char **p;
2875      int i;
2876 {
2877   return p[i];
2878 }
2879 static char *f (char * (*g) (char **, int), char **p, ...)
2880 {
2881   char *s;
2882   va_list v;
2883   va_start (v,p);
2884   s = g (p, va_arg (v,int));
2885   va_end (v);
2886   return s;
2887 }
2888 int test (int i, double x);
2889 struct s1 {int (*f) (int a);};
2890 struct s2 {int (*f) (double a);};
2891 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2892 int argc;
2893 char **argv;
2894
2895 int main() {
2896
2897 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2898
2899 ; return 0; }
2900 EOF
2901 if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2902   rm -rf conftest*
2903   am_cv_prog_cc_stdc="$ac_arg"; break
2904 else
2905   echo "configure: failed program was:" >&5
2906   cat conftest.$ac_ext >&5
2907 fi
2908 rm -f conftest*
2909 done
2910 CC="$ac_save_CC"
2911
2912 fi
2913
2914 if test -z "$am_cv_prog_cc_stdc"; then
2915   echo "$ac_t""none needed" 1>&6
2916 else
2917   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2918 fi
2919 case "x$am_cv_prog_cc_stdc" in
2920   x|xno) ;;
2921   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2922 esac
2923
2924 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2925         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2926 fi
2927
2928
2929
2930
2931 echo $ac_n "checking for socket""... $ac_c" 1>&6
2932 echo "configure:2933: checking for socket" >&5
2933 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   cat > conftest.$ac_ext <<EOF
2937 #line 2938 "configure"
2938 #include "confdefs.h"
2939 /* System header to define __stub macros and hopefully few prototypes,
2940     which can conflict with char socket(); below.  */
2941 #include <assert.h>
2942 /* Override any gcc2 internal prototype to avoid an error.  */
2943 /* We use char because int might match the return type of a gcc2
2944     builtin and then its argument prototype would still apply.  */
2945 char socket();
2946
2947 int main() {
2948
2949 /* The GNU C library defines this for functions which it implements
2950     to always fail with ENOSYS.  Some functions are actually named
2951     something starting with __ and the normal name is an alias.  */
2952 #if defined (__stub_socket) || defined (__stub___socket)
2953 choke me
2954 #else
2955 socket();
2956 #endif
2957
2958 ; return 0; }
2959 EOF
2960 if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2961   rm -rf conftest*
2962   eval "ac_cv_func_socket=yes"
2963 else
2964   echo "configure: failed program was:" >&5
2965   cat conftest.$ac_ext >&5
2966   rm -rf conftest*
2967   eval "ac_cv_func_socket=no"
2968 fi
2969 rm -f conftest*
2970 fi
2971
2972 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2973   echo "$ac_t""yes" 1>&6
2974   have_socket=yes
2975 else
2976   echo "$ac_t""no" 1>&6
2977         
2978         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2979 echo "configure:2980: checking for main in -lsocket" >&5
2980 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2981 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   ac_save_LIBS="$LIBS"
2985 LIBS="-lsocket  $LIBS"
2986 cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989
2990 int main() {
2991 main()
2992 ; return 0; }
2993 EOF
2994 if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2995   rm -rf conftest*
2996   eval "ac_cv_lib_$ac_lib_var=yes"
2997 else
2998   echo "configure: failed program was:" >&5
2999   cat conftest.$ac_ext >&5
3000   rm -rf conftest*
3001   eval "ac_cv_lib_$ac_lib_var=no"
3002 fi
3003 rm -f conftest*
3004 LIBS="$ac_save_LIBS"
3005
3006 fi
3007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3008   echo "$ac_t""yes" 1>&6
3009     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3010     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3011   cat >> confdefs.h <<EOF
3012 #define $ac_tr_lib 1
3013 EOF
3014
3015   LIBS="-lsocket $LIBS"
3016
3017 else
3018   echo "$ac_t""no" 1>&6
3019 fi
3020
3021         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3022 echo "configure:3023: checking for main in -lnet" >&5
3023 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   ac_save_LIBS="$LIBS"
3028 LIBS="-lnet  $LIBS"
3029 cat > conftest.$ac_ext <<EOF
3030 #line 3031 "configure"
3031 #include "confdefs.h"
3032
3033 int main() {
3034 main()
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3038   rm -rf conftest*
3039   eval "ac_cv_lib_$ac_lib_var=yes"
3040 else
3041   echo "configure: failed program was:" >&5
3042   cat conftest.$ac_ext >&5
3043   rm -rf conftest*
3044   eval "ac_cv_lib_$ac_lib_var=no"
3045 fi
3046 rm -f conftest*
3047 LIBS="$ac_save_LIBS"
3048
3049 fi
3050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3051   echo "$ac_t""yes" 1>&6
3052     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3053     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3054   cat >> confdefs.h <<EOF
3055 #define $ac_tr_lib 1
3056 EOF
3057
3058   LIBS="-lnet $LIBS"
3059
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063
3064         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3065 echo "configure:3066: checking for main in -lnsl_s" >&5
3066 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   ac_save_LIBS="$LIBS"
3071 LIBS="-lnsl_s  $LIBS"
3072 cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075
3076 int main() {
3077 main()
3078 ; return 0; }
3079 EOF
3080 if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3081   rm -rf conftest*
3082   eval "ac_cv_lib_$ac_lib_var=yes"
3083 else
3084   echo "configure: failed program was:" >&5
3085   cat conftest.$ac_ext >&5
3086   rm -rf conftest*
3087   eval "ac_cv_lib_$ac_lib_var=no"
3088 fi
3089 rm -f conftest*
3090 LIBS="$ac_save_LIBS"
3091
3092 fi
3093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3094   echo "$ac_t""yes" 1>&6
3095     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3096     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3097   cat >> confdefs.h <<EOF
3098 #define $ac_tr_lib 1
3099 EOF
3100
3101   LIBS="-lnsl_s $LIBS"
3102
3103 else
3104   echo "$ac_t""no" 1>&6
3105 fi
3106
3107         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3108 echo "configure:3109: checking for main in -lnsl" >&5
3109 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3110 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   ac_save_LIBS="$LIBS"
3114 LIBS="-lnsl  $LIBS"
3115 cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118
3119 int main() {
3120 main()
3121 ; return 0; }
3122 EOF
3123 if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3124   rm -rf conftest*
3125   eval "ac_cv_lib_$ac_lib_var=yes"
3126 else
3127   echo "configure: failed program was:" >&5
3128   cat conftest.$ac_ext >&5
3129   rm -rf conftest*
3130   eval "ac_cv_lib_$ac_lib_var=no"
3131 fi
3132 rm -f conftest*
3133 LIBS="$ac_save_LIBS"
3134
3135 fi
3136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3137   echo "$ac_t""yes" 1>&6
3138     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3140   cat >> confdefs.h <<EOF
3141 #define $ac_tr_lib 1
3142 EOF
3143
3144   LIBS="-lnsl $LIBS"
3145
3146 else
3147   echo "$ac_t""no" 1>&6
3148 fi
3149
3150         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3151 echo "configure:3152: checking for socket in -linet" >&5
3152 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   ac_save_LIBS="$LIBS"
3157 LIBS="-linet  $LIBS"
3158 cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161 /* Override any gcc2 internal prototype to avoid an error.  */
3162 /* We use char because int might match the return type of a gcc2
3163     builtin and then its argument prototype would still apply.  */
3164 char socket();
3165
3166 int main() {
3167 socket()
3168 ; return 0; }
3169 EOF
3170 if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3171   rm -rf conftest*
3172   eval "ac_cv_lib_$ac_lib_var=yes"
3173 else
3174   echo "configure: failed program was:" >&5
3175   cat conftest.$ac_ext >&5
3176   rm -rf conftest*
3177   eval "ac_cv_lib_$ac_lib_var=no"
3178 fi
3179 rm -f conftest*
3180 LIBS="$ac_save_LIBS"
3181
3182 fi
3183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3184   echo "$ac_t""yes" 1>&6
3185     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3187   cat >> confdefs.h <<EOF
3188 #define $ac_tr_lib 1
3189 EOF
3190
3191   LIBS="-linet $LIBS"
3192
3193 else
3194   echo "$ac_t""no" 1>&6
3195 fi
3196
3197         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3198 echo "configure:3199: checking for main in -lgen" >&5
3199 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3200 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   ac_save_LIBS="$LIBS"
3204 LIBS="-lgen  $LIBS"
3205 cat > conftest.$ac_ext <<EOF
3206 #line 3207 "configure"
3207 #include "confdefs.h"
3208
3209 int main() {
3210 main()
3211 ; return 0; }
3212 EOF
3213 if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3214   rm -rf conftest*
3215   eval "ac_cv_lib_$ac_lib_var=yes"
3216 else
3217   echo "configure: failed program was:" >&5
3218   cat conftest.$ac_ext >&5
3219   rm -rf conftest*
3220   eval "ac_cv_lib_$ac_lib_var=no"
3221 fi
3222 rm -f conftest*
3223 LIBS="$ac_save_LIBS"
3224
3225 fi
3226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3227   echo "$ac_t""yes" 1>&6
3228     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3229     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3230   cat >> confdefs.h <<EOF
3231 #define $ac_tr_lib 1
3232 EOF
3233
3234   LIBS="-lgen $LIBS"
3235
3236 else
3237   echo "$ac_t""no" 1>&6
3238 fi
3239
3240
3241 fi
3242
3243
3244 for ac_func in res_search
3245 do
3246 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3247 echo "configure:3248: checking for $ac_func" >&5
3248 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3249   echo $ac_n "(cached) $ac_c" 1>&6
3250 else
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 /* System header to define __stub macros and hopefully few prototypes,
3255     which can conflict with char $ac_func(); below.  */
3256 #include <assert.h>
3257 /* Override any gcc2 internal prototype to avoid an error.  */
3258 /* We use char because int might match the return type of a gcc2
3259     builtin and then its argument prototype would still apply.  */
3260 char $ac_func();
3261
3262 int main() {
3263
3264 /* The GNU C library defines this for functions which it implements
3265     to always fail with ENOSYS.  Some functions are actually named
3266     something starting with __ and the normal name is an alias.  */
3267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3268 choke me
3269 #else
3270 $ac_func();
3271 #endif
3272
3273 ; return 0; }
3274 EOF
3275 if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3276   rm -rf conftest*
3277   eval "ac_cv_func_$ac_func=yes"
3278 else
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   eval "ac_cv_func_$ac_func=no"
3283 fi
3284 rm -f conftest*
3285 fi
3286
3287 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3288   echo "$ac_t""yes" 1>&6
3289     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3290   cat >> confdefs.h <<EOF
3291 #define $ac_tr_func 1
3292 EOF
3293  
3294 else
3295   echo "$ac_t""no" 1>&6
3296 fi
3297 done
3298
3299 if test $ac_cv_func_res_search = "no" ; then 
3300         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3301 echo "configure:3302: checking for res_search in -lbind" >&5
3302 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3303 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   ac_save_LIBS="$LIBS"
3307 LIBS="-lbind  $LIBS"
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 /* Override any gcc2 internal prototype to avoid an error.  */
3312 /* We use char because int might match the return type of a gcc2
3313     builtin and then its argument prototype would still apply.  */
3314 char res_search();
3315
3316 int main() {
3317 res_search()
3318 ; return 0; }
3319 EOF
3320 if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3321   rm -rf conftest*
3322   eval "ac_cv_lib_$ac_lib_var=yes"
3323 else
3324   echo "configure: failed program was:" >&5
3325   cat conftest.$ac_ext >&5
3326   rm -rf conftest*
3327   eval "ac_cv_lib_$ac_lib_var=no"
3328 fi
3329 rm -f conftest*
3330 LIBS="$ac_save_LIBS"
3331
3332 fi
3333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3334   echo "$ac_t""yes" 1>&6
3335     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3336     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3337   cat >> confdefs.h <<EOF
3338 #define $ac_tr_lib 1
3339 EOF
3340
3341   LIBS="-lbind $LIBS"
3342
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346
3347         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3348                 cat >> confdefs.h <<\EOF
3349 #define HAVE_RES_SEARCH 1
3350 EOF
3351
3352         else
3353                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3354 echo "configure:3355: checking for res_search in -lresolv" >&5
3355 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3356 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   ac_save_LIBS="$LIBS"
3360 LIBS="-lresolv  $LIBS"
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 /* Override any gcc2 internal prototype to avoid an error.  */
3365 /* We use char because int might match the return type of a gcc2
3366     builtin and then its argument prototype would still apply.  */
3367 char res_search();
3368
3369 int main() {
3370 res_search()
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3374   rm -rf conftest*
3375   eval "ac_cv_lib_$ac_lib_var=yes"
3376 else
3377   echo "configure: failed program was:" >&5
3378   cat conftest.$ac_ext >&5
3379   rm -rf conftest*
3380   eval "ac_cv_lib_$ac_lib_var=no"
3381 fi
3382 rm -f conftest*
3383 LIBS="$ac_save_LIBS"
3384
3385 fi
3386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3387   echo "$ac_t""yes" 1>&6
3388     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3389     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3390   cat >> confdefs.h <<EOF
3391 #define $ac_tr_lib 1
3392 EOF
3393
3394   LIBS="-lresolv $LIBS"
3395
3396 else
3397   echo "$ac_t""no" 1>&6
3398 fi
3399
3400                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3401                         cat >> confdefs.h <<\EOF
3402 #define HAVE_RES_SEARCH 1
3403 EOF
3404
3405                 fi
3406         fi
3407 fi
3408
3409 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3410 echo "configure:3411: checking for sigset in -lV3" >&5
3411 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3413   echo $ac_n "(cached) $ac_c" 1>&6
3414 else
3415   ac_save_LIBS="$LIBS"
3416 LIBS="-lV3  $LIBS"
3417 cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3420 /* Override any gcc2 internal prototype to avoid an error.  */
3421 /* We use char because int might match the return type of a gcc2
3422     builtin and then its argument prototype would still apply.  */
3423 char sigset();
3424
3425 int main() {
3426 sigset()
3427 ; return 0; }
3428 EOF
3429 if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3430   rm -rf conftest*
3431   eval "ac_cv_lib_$ac_lib_var=yes"
3432 else
3433   echo "configure: failed program was:" >&5
3434   cat conftest.$ac_ext >&5
3435   rm -rf conftest*
3436   eval "ac_cv_lib_$ac_lib_var=no"
3437 fi
3438 rm -f conftest*
3439 LIBS="$ac_save_LIBS"
3440
3441 fi
3442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3443   echo "$ac_t""yes" 1>&6
3444     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3445     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3446   cat >> confdefs.h <<EOF
3447 #define $ac_tr_lib 1
3448 EOF
3449
3450   LIBS="-lV3 $LIBS"
3451
3452 else
3453   echo "$ac_t""no" 1>&6
3454 fi
3455
3456
3457 # ISODE tests
3458 ol_link_isode=no
3459 if test $ol_enable_ldapd != no ; then
3460                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3461 echo "configure:3462: checking for main in -lxtpp" >&5
3462 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3463 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3464   echo $ac_n "(cached) $ac_c" 1>&6
3465 else
3466   ac_save_LIBS="$LIBS"
3467 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3468 cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471
3472 int main() {
3473 main()
3474 ; return 0; }
3475 EOF
3476 if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3477   rm -rf conftest*
3478   eval "ac_cv_lib_$ac_lib_var=yes"
3479 else
3480   echo "configure: failed program was:" >&5
3481   cat conftest.$ac_ext >&5
3482   rm -rf conftest*
3483   eval "ac_cv_lib_$ac_lib_var=no"
3484 fi
3485 rm -f conftest*
3486 LIBS="$ac_save_LIBS"
3487
3488 fi
3489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3490   echo "$ac_t""yes" 1>&6
3491   
3492                 ol_link_isode=yes
3493                 cat >> confdefs.h <<\EOF
3494 #define HAVE_XTPP 1
3495 EOF
3496
3497                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3498                 
3499 else
3500   echo "$ac_t""no" 1>&6
3501 :
3502 fi
3503
3504         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3505 echo "configure:3506: checking for main in -ldsap" >&5
3506 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   ac_save_LIBS="$LIBS"
3511 LIBS="-ldsap -lisode $LIBS"
3512 cat > conftest.$ac_ext <<EOF
3513 #line 3514 "configure"
3514 #include "confdefs.h"
3515
3516 int main() {
3517 main()
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3521   rm -rf conftest*
3522   eval "ac_cv_lib_$ac_lib_var=yes"
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   eval "ac_cv_lib_$ac_lib_var=no"
3528 fi
3529 rm -f conftest*
3530 LIBS="$ac_save_LIBS"
3531
3532 fi
3533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3534   echo "$ac_t""yes" 1>&6
3535   
3536                 ol_link_isode=yes
3537                 cat >> confdefs.h <<\EOF
3538 #define HAVE_DSAP 1
3539 EOF
3540
3541                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3542                 
3543 else
3544   echo "$ac_t""no" 1>&6
3545 :
3546 fi
3547
3548         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3549 echo "configure:3550: checking for main in -lisode" >&5
3550 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3552   echo $ac_n "(cached) $ac_c" 1>&6
3553 else
3554   ac_save_LIBS="$LIBS"
3555 LIBS="-lisode  $LIBS"
3556 cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559
3560 int main() {
3561 main()
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3565   rm -rf conftest*
3566   eval "ac_cv_lib_$ac_lib_var=yes"
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   eval "ac_cv_lib_$ac_lib_var=no"
3572 fi
3573 rm -f conftest*
3574 LIBS="$ac_save_LIBS"
3575
3576 fi
3577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3578   echo "$ac_t""yes" 1>&6
3579   
3580                 ol_link_isode=yes
3581                 cat >> confdefs.h <<\EOF
3582 #define HAVE_ISODE 1
3583 EOF
3584
3585                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3586                 
3587 else
3588   echo "$ac_t""no" 1>&6
3589 :
3590 fi
3591
3592 fi
3593
3594 if test $ol_link_isode != no; then
3595         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3596 echo "configure:3597: checking for main in -lpp" >&5
3597 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3598 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   ac_save_LIBS="$LIBS"
3602 LIBS="-lpp  $LIBS"
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606
3607 int main() {
3608 main()
3609 ; return 0; }
3610 EOF
3611 if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3612   rm -rf conftest*
3613   eval "ac_cv_lib_$ac_lib_var=yes"
3614 else
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -rf conftest*
3618   eval "ac_cv_lib_$ac_lib_var=no"
3619 fi
3620 rm -f conftest*
3621 LIBS="$ac_save_LIBS"
3622
3623 fi
3624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3625   echo "$ac_t""yes" 1>&6
3626   
3627                 cat >> confdefs.h <<\EOF
3628 #define HAVE_PP 1
3629 EOF
3630
3631                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3632                 
3633 else
3634   echo "$ac_t""no" 1>&6
3635 :
3636 fi
3637
3638
3639         # Extract the first word of "pepsy", so it can be a program name with args.
3640 set dummy pepsy; ac_word=$2
3641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3642 echo "configure:3643: checking for $ac_word" >&5
3643 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   case "$PEPSY" in
3647   /*)
3648   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3649   ;;
3650   ?:/*)                  
3651   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3652   ;;
3653   *)
3654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3655   ac_dummy="$PATH"
3656   for ac_dir in $ac_dummy; do 
3657     test -z "$ac_dir" && ac_dir=.
3658     if test -f $ac_dir/$ac_word; then
3659       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3660       break
3661     fi
3662   done
3663   IFS="$ac_save_ifs"
3664   ;;
3665 esac
3666 fi
3667 PEPSY="$ac_cv_path_PEPSY"
3668 if test -n "$PEPSY"; then
3669   echo "$ac_t""$PEPSY" 1>&6
3670 else
3671   echo "$ac_t""no" 1>&6
3672 fi
3673
3674 fi
3675
3676 ol_link_kerberos=no
3677
3678 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3679         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3680 do
3681 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3682 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3683 echo "configure:3684: checking for $ac_hdr" >&5
3684 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690 #include <$ac_hdr>
3691 EOF
3692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3693 { (eval echo configure:3694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3695 if test -z "$ac_err"; then
3696   rm -rf conftest*
3697   eval "ac_cv_header_$ac_safe=yes"
3698 else
3699   echo "$ac_err" >&5
3700   echo "configure: failed program was:" >&5
3701   cat conftest.$ac_ext >&5
3702   rm -rf conftest*
3703   eval "ac_cv_header_$ac_safe=no"
3704 fi
3705 rm -f conftest*
3706 fi
3707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3708   echo "$ac_t""yes" 1>&6
3709     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3710   cat >> confdefs.h <<EOF
3711 #define $ac_tr_hdr 1
3712 EOF
3713  
3714 else
3715   echo "$ac_t""no" 1>&6
3716 fi
3717 done
3718
3719
3720         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3721                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3722 echo "configure:3723: checking for main in -lkrb4" >&5
3723 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3725   echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727   ac_save_LIBS="$LIBS"
3728 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732
3733 int main() {
3734 main()
3735 ; return 0; }
3736 EOF
3737 if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3738   rm -rf conftest*
3739   eval "ac_cv_lib_$ac_lib_var=yes"
3740 else
3741   echo "configure: failed program was:" >&5
3742   cat conftest.$ac_ext >&5
3743   rm -rf conftest*
3744   eval "ac_cv_lib_$ac_lib_var=no"
3745 fi
3746 rm -f conftest*
3747 LIBS="$ac_save_LIBS"
3748
3749 fi
3750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751   echo "$ac_t""yes" 1>&6
3752   have_k5=yes
3753 else
3754   echo "$ac_t""no" 1>&6
3755 have_k5=no
3756 fi
3757
3758
3759                 if test $have_k5 = yes ; then
3760                         ol_with_kerberos=found
3761                         ol_link_kerberos=yes
3762
3763                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3764
3765                         LIBS="$KRB_LIBS $LIBS"
3766
3767                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
3768 echo "configure:3769: checking for des_debug in Kerberos libraries" >&5
3769 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   
3773                                                                 save_LIBS="$LIBS"
3774                                 LIBS="$KRB_LIBS $LIBS"
3775                                 cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778
3779 #include <kerberosIV/krb.h>
3780 #include <kerberosIV/des.h>
3781 extern int des_debug;
3782
3783 int main() {
3784
3785 des_debug = 1;
3786
3787 ; return 0; }
3788 EOF
3789 if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3790   rm -rf conftest*
3791   ol_cv_var_des_debug=yes
3792 else
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -rf conftest*
3796   ol_cv_var_des_debug=no
3797 fi
3798 rm -f conftest*
3799                                                                 LIBS="$save_LIBS"
3800                         
3801 fi
3802
3803 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
3804
3805                         if test $ol_cv_var_des_debug = yes ; then
3806                                 cat >> confdefs.h <<\EOF
3807 #define HAVE_DES_DEBUG 1
3808 EOF
3809
3810                         fi
3811
3812                         LIBS="$save_LIBS"
3813                 fi
3814         fi
3815 fi
3816
3817 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3818         for ac_hdr in krb.h des.h
3819 do
3820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3822 echo "configure:3823: checking for $ac_hdr" >&5
3823 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 #include <$ac_hdr>
3830 EOF
3831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3832 { (eval echo configure:3833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3834 if test -z "$ac_err"; then
3835   rm -rf conftest*
3836   eval "ac_cv_header_$ac_safe=yes"
3837 else
3838   echo "$ac_err" >&5
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841   rm -rf conftest*
3842   eval "ac_cv_header_$ac_safe=no"
3843 fi
3844 rm -f conftest*
3845 fi
3846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3847   echo "$ac_t""yes" 1>&6
3848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3849   cat >> confdefs.h <<EOF
3850 #define $ac_tr_hdr 1
3851 EOF
3852  
3853 else
3854   echo "$ac_t""no" 1>&6
3855 fi
3856 done
3857
3858
3859         if test $ac_cv_header_krb_h = yes ; then
3860                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3861 echo "configure:3862: checking for main in -lkrb" >&5
3862 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3863 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   ac_save_LIBS="$LIBS"
3867 LIBS="-lkrb -ldes $LIBS"
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871
3872 int main() {
3873 main()
3874 ; return 0; }
3875 EOF
3876 if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=yes"
3879 else
3880   echo "configure: failed program was:" >&5
3881   cat conftest.$ac_ext >&5
3882   rm -rf conftest*
3883   eval "ac_cv_lib_$ac_lib_var=no"
3884 fi
3885 rm -f conftest*
3886 LIBS="$ac_save_LIBS"
3887
3888 fi
3889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890   echo "$ac_t""yes" 1>&6
3891   have_k4=yes
3892 else
3893   echo "$ac_t""no" 1>&6
3894 have_k4=no
3895 fi
3896
3897
3898                 if test $have_k4 = yes ; then
3899                         ol_with_kerberos=found
3900                         ol_link_kerberos=yes
3901
3902                         KRB_LIBS="-lkrb -ldes"
3903                 fi
3904         fi
3905 fi
3906
3907 if test $ol_link_kerberos = yes ; then
3908         cat >> confdefs.h <<\EOF
3909 #define HAVE_KERBEROS 1
3910 EOF
3911
3912 fi
3913
3914 ol_link_tls=no
3915 if test $ol_with_tls != no ; then
3916         
3917         for ac_hdr in ssl.h
3918 do
3919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $ac_hdr" >&5
3922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 #include <$ac_hdr>
3929 EOF
3930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3931 { (eval echo configure:3932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3933 if test -z "$ac_err"; then
3934   rm -rf conftest*
3935   eval "ac_cv_header_$ac_safe=yes"
3936 else
3937   echo "$ac_err" >&5
3938   echo "configure: failed program was:" >&5
3939   cat conftest.$ac_ext >&5
3940   rm -rf conftest*
3941   eval "ac_cv_header_$ac_safe=no"
3942 fi
3943 rm -f conftest*
3944 fi
3945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3946   echo "$ac_t""yes" 1>&6
3947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3948   cat >> confdefs.h <<EOF
3949 #define $ac_tr_hdr 1
3950 EOF
3951  
3952 else
3953   echo "$ac_t""no" 1>&6
3954 fi
3955 done
3956
3957         
3958         if test $ac_cv_header_ssl_h = yes ; then
3959                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
3960 echo "configure:3961: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
3961 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
3962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3963   echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965   ac_save_LIBS="$LIBS"
3966 LIBS="-lssl -lcrypto $LIBS"
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 /* Override any gcc2 internal prototype to avoid an error.  */
3971 /* We use char because int might match the return type of a gcc2
3972     builtin and then its argument prototype would still apply.  */
3973 char SSLeay_add_ssl_algorithms();
3974
3975 int main() {
3976 SSLeay_add_ssl_algorithms()
3977 ; return 0; }
3978 EOF
3979 if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3980   rm -rf conftest*
3981   eval "ac_cv_lib_$ac_lib_var=yes"
3982 else
3983   echo "configure: failed program was:" >&5
3984   cat conftest.$ac_ext >&5
3985   rm -rf conftest*
3986   eval "ac_cv_lib_$ac_lib_var=no"
3987 fi
3988 rm -f conftest*
3989 LIBS="$ac_save_LIBS"
3990
3991 fi
3992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3993   echo "$ac_t""yes" 1>&6
3994   have_ssleay=yes
3995                         need_rsaref=no
3996 else
3997   echo "$ac_t""no" 1>&6
3998 have_ssleay=no
3999 fi
4000
4001                         
4002                 if test $have_ssleay = no ; then
4003                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4004 echo "configure:4005: checking for ssl3_accept in -lssl" >&5
4005 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   ac_save_LIBS="$LIBS"
4010 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4011 cat > conftest.$ac_ext <<EOF
4012 #line 4013 "configure"
4013 #include "confdefs.h"
4014 /* Override any gcc2 internal prototype to avoid an error.  */
4015 /* We use char because int might match the return type of a gcc2
4016     builtin and then its argument prototype would still apply.  */
4017 char ssl3_accept();
4018
4019 int main() {
4020 ssl3_accept()
4021 ; return 0; }
4022 EOF
4023 if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4024   rm -rf conftest*
4025   eval "ac_cv_lib_$ac_lib_var=yes"
4026 else
4027   echo "configure: failed program was:" >&5
4028   cat conftest.$ac_ext >&5
4029   rm -rf conftest*
4030   eval "ac_cv_lib_$ac_lib_var=no"
4031 fi
4032 rm -f conftest*
4033 LIBS="$ac_save_LIBS"
4034
4035 fi
4036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4037   echo "$ac_t""yes" 1>&6
4038   have_ssleay=yes
4039                                 need_rsaref=yes
4040 else
4041   echo "$ac_t""no" 1>&6
4042 have_ssleay=no
4043 fi
4044
4045                 fi
4046
4047                 if test $have_ssleay = yes ; then
4048                         ol_with_tls=found
4049                         ol_link_tls=yes
4050
4051                         cat >> confdefs.h <<\EOF
4052 #define HAVE_SSLEAY 1
4053 EOF
4054
4055
4056                         if test $need_rsaref = yes; then
4057                                 cat >> confdefs.h <<\EOF
4058 #define HAVE_RSAREF 1
4059 EOF
4060
4061
4062                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4063                         else
4064                                 TLS_LIBS="-lssl -lcrypto"
4065                         fi
4066                 fi
4067         fi
4068 fi
4069
4070 if test $ol_link_tls = yes ; then
4071         cat >> confdefs.h <<\EOF
4072 #define HAVE_TLS 1
4073 EOF
4074
4075 fi      
4076
4077 for ac_func in \
4078         ctime_r                 \
4079         gethostbyname_r gethostbyaddr_r \
4080
4081 do
4082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4083 echo "configure:4084: checking for $ac_func" >&5
4084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4085   echo $ac_n "(cached) $ac_c" 1>&6
4086 else
4087   cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 /* System header to define __stub macros and hopefully few prototypes,
4091     which can conflict with char $ac_func(); below.  */
4092 #include <assert.h>
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char $ac_func();
4097
4098 int main() {
4099
4100 /* The GNU C library defines this for functions which it implements
4101     to always fail with ENOSYS.  Some functions are actually named
4102     something starting with __ and the normal name is an alias.  */
4103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4104 choke me
4105 #else
4106 $ac_func();
4107 #endif
4108
4109 ; return 0; }
4110 EOF
4111 if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4112   rm -rf conftest*
4113   eval "ac_cv_func_$ac_func=yes"
4114 else
4115   echo "configure: failed program was:" >&5
4116   cat conftest.$ac_ext >&5
4117   rm -rf conftest*
4118   eval "ac_cv_func_$ac_func=no"
4119 fi
4120 rm -f conftest*
4121 fi
4122
4123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4124   echo "$ac_t""yes" 1>&6
4125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4126   cat >> confdefs.h <<EOF
4127 #define $ac_tr_func 1
4128 EOF
4129  
4130 else
4131   echo "$ac_t""no" 1>&6
4132 fi
4133 done
4134
4135
4136 if test "$ac_cv_func_ctime_r" = no ; then
4137         ol_cv_func_ctime_r_nargs=0
4138 else
4139         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4140 echo "configure:4141: checking number of arguments of ctime_r" >&5
4141 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4142   echo $ac_n "(cached) $ac_c" 1>&6
4143 else
4144   cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147 #include <time.h>
4148 int main() {
4149 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4150 ; return 0; }
4151 EOF
4152 if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4153   rm -rf conftest*
4154   ol_cv_func_ctime_r_nargs=3
4155 else
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -rf conftest*
4159   cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #include <time.h>
4163 int main() {
4164 time_t ti; char *buffer; ctime_r(&ti,buffer);
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4168   rm -rf conftest*
4169   ol_cv_func_ctime_r_nargs=2
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   ol_cv_func_ctime_r_nargs=0
4175 fi
4176 rm -f conftest*
4177 fi
4178 rm -f conftest*
4179 fi
4180
4181 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4182   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4183     cat >> confdefs.h <<EOF
4184 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4185 EOF
4186
4187   fi
4188
4189 fi
4190
4191 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4192         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4193 echo "configure:4194: checking number of arguments of gethostbyname_r" >&5
4194 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 #include <sys/types.h>
4201 #include <sys/socket.h>
4202 #include <netinet/in.h>
4203 #include <netdb.h>
4204 #define BUFSIZE (sizeof(struct hostent)+10)
4205 int main() {
4206 struct hostent hent; char buffer[BUFSIZE];
4207                 int bufsize=BUFSIZE;int h_errno;
4208                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4209                         buffer, bufsize, &h_errno);
4210 ; return 0; }
4211 EOF
4212 if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4213   rm -rf conftest*
4214   ol_cv_func_gethostbyname_r_nargs=5
4215 else
4216   echo "configure: failed program was:" >&5
4217   cat conftest.$ac_ext >&5
4218   rm -rf conftest*
4219   cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 #include <sys/types.h>
4223 #include <sys/socket.h>
4224 #include <netinet/in.h>
4225 #include <netdb.h>
4226 #define BUFSIZE (sizeof(struct hostent)+10)
4227 int main() {
4228 struct hostent hent;struct hostent *rhent;
4229                         char buffer[BUFSIZE];
4230                         int bufsize=BUFSIZE;int h_errno;
4231                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4232                                 &rhent, &h_errno);
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4236   rm -rf conftest*
4237   ol_cv_func_gethostbyname_r_nargs=6
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   ol_cv_func_gethostbyname_r_nargs=0
4243 fi
4244 rm -f conftest*
4245 fi
4246 rm -f conftest*
4247 fi
4248
4249 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4250   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4251         cat >> confdefs.h <<EOF
4252 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4253 EOF
4254
4255   fi
4256
4257 else
4258         ol_cv_func_gethostbyname_r_nargs=0
4259 fi
4260  
4261 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4262         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4263 echo "configure:4264: checking number of arguments of gethostbyaddr_r" >&5
4264 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 #include <sys/types.h>
4271 #include <sys/socket.h>
4272 #include <netinet/in.h>
4273 #include <netdb.h>
4274 #define BUFSIZE (sizeof(struct hostent)+10)
4275 int main() {
4276 struct hostent hent; char buffer[BUFSIZE]; 
4277             struct in_addr add;
4278             size_t alen=sizeof(struct in_addr);
4279             int bufsize=BUFSIZE;int h_errno;
4280                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4281                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4285   rm -rf conftest*
4286   ol_cv_func_gethostbyaddr_r_nargs=7
4287 else
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   cat > conftest.$ac_ext <<EOF
4292 #line 4293 "configure"
4293 #include "confdefs.h"
4294 #include <sys/types.h>
4295 #include <sys/socket.h>
4296 #include <netinet/in.h>
4297 #include <netdb.h>
4298 #define BUFSIZE (sizeof(struct hostent)+10)
4299 int main() {
4300 struct hostent hent;
4301                         struct hostent *rhent; char buffer[BUFSIZE]; 
4302                         struct in_addr add;
4303                         size_t alen=sizeof(struct in_addr);
4304                         int bufsize=BUFSIZE;int h_errno;
4305                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4306                                 alen, AF_INET, &hent, buffer, bufsize, 
4307                                 &rhent, &h_errno);
4308 ; return 0; }
4309 EOF
4310 if { (eval echo configure:4311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4311   rm -rf conftest*
4312   ol_cv_func_gethostbyaddr_r_nargs=8
4313 else
4314   echo "configure: failed program was:" >&5
4315   cat conftest.$ac_ext >&5
4316   rm -rf conftest*
4317   ol_cv_func_gethostbyaddr_r_nargs=0
4318 fi
4319 rm -f conftest*
4320 fi
4321 rm -f conftest*
4322 fi
4323
4324 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4325   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4326     cat >> confdefs.h <<EOF
4327 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4328 EOF
4329
4330   fi
4331
4332 else
4333         ol_cv_func_gethostbyaddr_r_nargs=0
4334 fi
4335
4336 if test "$ac_cv_func_ctime_r" = yes \
4337         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4338         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4339         -a "$ac_cv_func_gethostbyname_r" = yes \
4340         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4341         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4342         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4343         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4344         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4345         ; then
4346  
4347         cat >> confdefs.h <<\EOF
4348 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4349 EOF
4350
4351 fi
4352
4353 ol_link_threads=no
4354 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4355         -o $ol_with_threads = posix ; then
4356
4357         for ac_hdr in pthread.h sched.h
4358 do
4359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4361 echo "configure:4362: checking for $ac_hdr" >&5
4362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4363   echo $ac_n "(cached) $ac_c" 1>&6
4364 else
4365   cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 #include <$ac_hdr>
4369 EOF
4370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4371 { (eval echo configure:4372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4373 if test -z "$ac_err"; then
4374   rm -rf conftest*
4375   eval "ac_cv_header_$ac_safe=yes"
4376 else
4377   echo "$ac_err" >&5
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -rf conftest*
4381   eval "ac_cv_header_$ac_safe=no"
4382 fi
4383 rm -f conftest*
4384 fi
4385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4386   echo "$ac_t""yes" 1>&6
4387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4388   cat >> confdefs.h <<EOF
4389 #define $ac_tr_hdr 1
4390 EOF
4391  
4392 else
4393   echo "$ac_t""no" 1>&6
4394 fi
4395 done
4396
4397
4398         if test $ac_cv_header_pthread_h = yes ; then
4399                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4400 echo "configure:4401: checking POSIX thread version" >&5
4401 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   
4405         cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408
4409 #               include <pthread.h>
4410                 /* this check could be improved */
4411 #               ifdef PTHREAD_ONCE_INIT
4412                         pthread_version_final
4413 #               endif
4414         
4415 EOF
4416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4417   egrep "pthread_version_final" >/dev/null 2>&1; then
4418   rm -rf conftest*
4419   ol_pthread_final=yes
4420 else
4421   rm -rf conftest*
4422   ol_pthread_final=no
4423 fi
4424 rm -f conftest*
4425
4426
4427         cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430
4431 #               include <pthread.h>
4432                 /* this check could be improved */
4433 #               ifdef pthread_once_init
4434                         pthread_version_draft4
4435 #               endif
4436         
4437 EOF
4438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4439   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4440   rm -rf conftest*
4441   ol_pthread_draft4=yes
4442 else
4443   rm -rf conftest*
4444   ol_pthread_draft4=no
4445 fi
4446 rm -f conftest*
4447
4448
4449         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4450                 ol_cv_pthread_version=final
4451         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4452                 ol_cv_pthread_version=draft4
4453         else
4454                 ol_cv_pthread_version=unknown
4455         fi
4456
4457 fi
4458
4459 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4460
4461
4462                 if test $ol_cv_pthread_version = final ; then
4463                         cat >> confdefs.h <<\EOF
4464 #define HAVE_PTHREADS_FINAL 1
4465 EOF
4466
4467                 elif test $ol_cv_pthread_version = draft4 ; then
4468                         cat >> confdefs.h <<\EOF
4469 #define HAVE_PTHREADS_D4 1
4470 EOF
4471
4472                 else
4473                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4474                 fi
4475
4476                 # consider threads found
4477                 ol_with_threads=found
4478
4479                 
4480 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
4481 echo "configure:4482: checking for LinuxThreads" >&5
4482 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   
4486         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
4487         if test "$res" -gt 0 ; then
4488                 ol_cv_linux_threads=yes
4489         else
4490                 ol_cv_linux_threads=no
4491         fi
4492
4493 fi
4494
4495 echo "$ac_t""$ol_cv_linux_threads" 1>&6
4496
4497
4498                 if test $ol_cv_linux_threads = yes ; then
4499                         cat >> confdefs.h <<\EOF
4500 #define HAVE_LINUX_THREADS 1
4501 EOF
4502
4503                 fi
4504
4505                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4506                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
4507 echo "configure:4508: checking for pthread_create" >&5
4508 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
4509   echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511   cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 /* System header to define __stub macros and hopefully few prototypes,
4515     which can conflict with char pthread_create(); below.  */
4516 #include <assert.h>
4517 /* Override any gcc2 internal prototype to avoid an error.  */
4518 /* We use char because int might match the return type of a gcc2
4519     builtin and then its argument prototype would still apply.  */
4520 char pthread_create();
4521
4522 int main() {
4523
4524 /* The GNU C library defines this for functions which it implements
4525     to always fail with ENOSYS.  Some functions are actually named
4526     something starting with __ and the normal name is an alias.  */
4527 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
4528 choke me
4529 #else
4530 pthread_create();
4531 #endif
4532
4533 ; return 0; }
4534 EOF
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4536   rm -rf conftest*
4537   eval "ac_cv_func_pthread_create=yes"
4538 else
4539   echo "configure: failed program was:" >&5
4540   cat conftest.$ac_ext >&5
4541   rm -rf conftest*
4542   eval "ac_cv_func_pthread_create=no"
4543 fi
4544 rm -f conftest*
4545 fi
4546
4547 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
4548   echo "$ac_t""yes" 1>&6
4549   ol_link_threads=yes
4550 else
4551   echo "$ac_t""no" 1>&6
4552 fi
4553
4554
4555                 if test $ol_link_threads = no ; then
4556                                                 echo $ac_n "checking for pthread_create with -mt""... $ac_c" 1>&6
4557 echo "configure:4558: checking for pthread_create with -mt" >&5
4558 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4559   echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561   
4562                                                                 save_LIBS="$LIBS"
4563                                 LIBS="-mt $LIBS"
4564                                 cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 char pthread_create();
4568 int main() {
4569 pthread_create();
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4573   rm -rf conftest*
4574   ol_cv_thread_flag=yes
4575 else
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -rf conftest*
4579   ol_cv_thread_flag=no
4580 fi
4581 rm -f conftest*
4582                                                                 LIBS="$save_LIBS"
4583                         
4584 fi
4585
4586 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4587
4588                         if test $ol_cv_thread_flag = yes ; then
4589                                 LTHREAD_LIBS="$LTHREAD_LIBS -mt"
4590                                 ol_link_threads=posix
4591                         fi
4592                 fi
4593
4594                 if test $ol_link_threads = no ; then
4595                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
4596 echo "configure:4597: checking for pthread_create with -kthread" >&5
4597 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
4598   echo $ac_n "(cached) $ac_c" 1>&6
4599 else
4600   
4601                                                                 save_LIBS="$LIBS"
4602                                 LIBS="-kthread $LIBS"
4603                                 cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606 #include <pthread.h>
4607 int main() {
4608
4609 #if HAVE_PTHREADS_D4
4610         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4611 #else
4612         pthread_create(NULL,NULL,NULL,NULL);
4613 #endif
4614
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618   rm -rf conftest*
4619   ol_cv_kthread_flag=yes
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   ol_cv_kthread_flag=no
4625 fi
4626 rm -f conftest*
4627                                                                 LIBS="$save_LIBS"
4628                         
4629 fi
4630
4631 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
4632
4633                         if test $ol_cv_kthread_flag = yes ; then
4634                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
4635                                 ol_link_threads=posix
4636                         fi
4637                 fi
4638
4639                 if test $ol_link_threads = no ; then
4640                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
4641 echo "configure:4642: checking for pthread_create with -pthread" >&5
4642 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
4643   echo $ac_n "(cached) $ac_c" 1>&6
4644 else
4645   
4646                                                                 save_LIBS="$LIBS"
4647                                 LIBS="-pthread $LIBS"
4648                                 cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 #include <pthread.h>
4652 int main() {
4653
4654 #if HAVE_PTHREADS_D4
4655         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4656 #else
4657         pthread_create(NULL,NULL,NULL,NULL);
4658 #endif
4659
4660 ; return 0; }
4661 EOF
4662 if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4663   rm -rf conftest*
4664   ol_cv_pthread_flag=yes
4665 else
4666   echo "configure: failed program was:" >&5
4667   cat conftest.$ac_ext >&5
4668   rm -rf conftest*
4669   ol_cv_pthread_flag=no
4670 fi
4671 rm -f conftest*
4672                                                                 LIBS="$save_LIBS"
4673                         
4674 fi
4675
4676 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
4677
4678                         if test $ol_cv_pthread_flag = yes ; then
4679                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
4680                                 ol_link_threads=posix
4681                         fi
4682                 fi
4683
4684                 if test $ol_link_threads = no ; then
4685                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4686 echo "configure:4687: checking for pthread_create with -pthreads" >&5
4687 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   
4691                                                                 save_LIBS="$LIBS"
4692                                 LIBS="-pthreads $LIBS"
4693                                 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696 #include <pthread.h>
4697 int main() {
4698
4699 #if HAVE_PTHREADS_D4
4700         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4701 #else
4702         pthread_create(NULL,NULL,NULL,NULL);
4703 #endif
4704
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708   rm -rf conftest*
4709   ol_cv_pthreads_flag=yes
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   ol_cv_pthreads_flag=no
4715 fi
4716 rm -f conftest*
4717                                                                 LIBS="$save_LIBS"
4718                         
4719 fi
4720
4721 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4722
4723                         if test $ol_cv_pthreads_flag = yes ; then
4724                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4725                                 ol_link_threads=posix
4726                         fi
4727                 fi
4728
4729                 if test $ol_link_threads = no ; then
4730                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4731 echo "configure:4732: checking for pthread_create with -thread" >&5
4732 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4733   echo $ac_n "(cached) $ac_c" 1>&6
4734 else
4735   
4736                                                                 save_LIBS="$LIBS"
4737                                 LIBS="-thread $LIBS"
4738                                 cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 char pthread_create();
4742 int main() {
4743 pthread_create();
4744 ; return 0; }
4745 EOF
4746 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4747   rm -rf conftest*
4748   ol_cv_thread_flag=yes
4749 else
4750   echo "configure: failed program was:" >&5
4751   cat conftest.$ac_ext >&5
4752   rm -rf conftest*
4753   ol_cv_thread_flag=no
4754 fi
4755 rm -f conftest*
4756                                                                 LIBS="$save_LIBS"
4757                         
4758 fi
4759
4760 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4761
4762                         if test $ol_cv_thread_flag = yes ; then
4763                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4764                                 ol_link_threads=posix
4765                         fi
4766                 fi
4767
4768                 if test $ol_link_threads = no ; then
4769                                                 save_LIBS="$LIBS"
4770                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4771 echo "configure:4772: checking for pthread_mutex_unlock in -lpthread" >&5
4772 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   ac_save_LIBS="$LIBS"
4777 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4778 cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 /* We use char because int might match the return type of a gcc2
4783     builtin and then its argument prototype would still apply.  */
4784 char pthread_mutex_unlock();
4785
4786 int main() {
4787 pthread_mutex_unlock()
4788 ; return 0; }
4789 EOF
4790 if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4791   rm -rf conftest*
4792   eval "ac_cv_lib_$ac_lib_var=yes"
4793 else
4794   echo "configure: failed program was:" >&5
4795   cat conftest.$ac_ext >&5
4796   rm -rf conftest*
4797   eval "ac_cv_lib_$ac_lib_var=no"
4798 fi
4799 rm -f conftest*
4800 LIBS="$ac_save_LIBS"
4801
4802 fi
4803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4804   echo "$ac_t""yes" 1>&6
4805   
4806                                 ol_link_threads=posix
4807                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4808                                 if test $ol_with_yielding_select = auto ; then
4809                                         ol_with_yielding_select=yes
4810                                 fi
4811                                 
4812 else
4813   echo "$ac_t""no" 1>&6
4814 :
4815 fi
4816
4817                         LIBS="$save_LIBS"
4818                 fi
4819
4820                 if test $ol_link_threads = no ; then
4821                                                 save_LIBS="$LIBS"
4822                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4823 echo "configure:4824: checking for pthread_mutex_lock in -lpthread" >&5
4824 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4825 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   ac_save_LIBS="$LIBS"
4829 LIBS="-lpthread -lmach -lexc $LIBS"
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 /* Override any gcc2 internal prototype to avoid an error.  */
4834 /* We use char because int might match the return type of a gcc2
4835     builtin and then its argument prototype would still apply.  */
4836 char pthread_mutex_lock();
4837
4838 int main() {
4839 pthread_mutex_lock()
4840 ; return 0; }
4841 EOF
4842 if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4843   rm -rf conftest*
4844   eval "ac_cv_lib_$ac_lib_var=yes"
4845 else
4846   echo "configure: failed program was:" >&5
4847   cat conftest.$ac_ext >&5
4848   rm -rf conftest*
4849   eval "ac_cv_lib_$ac_lib_var=no"
4850 fi
4851 rm -f conftest*
4852 LIBS="$ac_save_LIBS"
4853
4854 fi
4855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4856   echo "$ac_t""yes" 1>&6
4857   
4858                                 ol_link_threads=posix
4859                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
4860                                 if test $ol_with_yielding_select = auto ; then
4861                                         ol_with_yielding_select=yes
4862                                 fi
4863                                 
4864 else
4865   echo "$ac_t""no" 1>&6
4866 :
4867 fi
4868
4869                         LIBS="$save_LIBS"
4870                 fi
4871
4872                 if test $ol_link_threads = no ; then
4873                                                 save_LIBS="$LIBS"
4874                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
4875 echo "configure:4876: checking for pthread_mutex_trylock in -lpthread" >&5
4876 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4877 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4878   echo $ac_n "(cached) $ac_c" 1>&6
4879 else
4880   ac_save_LIBS="$LIBS"
4881 LIBS="-lpthread -lexc $LIBS"
4882 cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4885 /* Override any gcc2 internal prototype to avoid an error.  */
4886 /* We use char because int might match the return type of a gcc2
4887     builtin and then its argument prototype would still apply.  */
4888 char pthread_mutex_trylock();
4889
4890 int main() {
4891 pthread_mutex_trylock()
4892 ; return 0; }
4893 EOF
4894 if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4895   rm -rf conftest*
4896   eval "ac_cv_lib_$ac_lib_var=yes"
4897 else
4898   echo "configure: failed program was:" >&5
4899   cat conftest.$ac_ext >&5
4900   rm -rf conftest*
4901   eval "ac_cv_lib_$ac_lib_var=no"
4902 fi
4903 rm -f conftest*
4904 LIBS="$ac_save_LIBS"
4905
4906 fi
4907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4908   echo "$ac_t""yes" 1>&6
4909   
4910                                 ol_link_threads=posix
4911                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4912                                 if test $ol_with_yielding_select = auto ; then
4913                                         ol_with_yielding_select=yes
4914                                 fi
4915                                 
4916 else
4917   echo "$ac_t""no" 1>&6
4918 :
4919 fi
4920
4921                         LIBS="$save_LIBS"
4922                 fi
4923
4924                 if test $ol_link_threads = no ; then
4925                                                 save_LIBS="$LIBS"
4926                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4927 echo "configure:4928: checking for pthread_create in -lpthread" >&5
4928 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4929 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4930   echo $ac_n "(cached) $ac_c" 1>&6
4931 else
4932   ac_save_LIBS="$LIBS"
4933 LIBS="-lpthread  $LIBS"
4934 cat > conftest.$ac_ext <<EOF
4935 #line 4936 "configure"
4936 #include "confdefs.h"
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 /* We use char because int might match the return type of a gcc2
4939     builtin and then its argument prototype would still apply.  */
4940 char pthread_create();
4941
4942 int main() {
4943 pthread_create()
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=yes"
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=no"
4954 fi
4955 rm -f conftest*
4956 LIBS="$ac_save_LIBS"
4957
4958 fi
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4960   echo "$ac_t""yes" 1>&6
4961   
4962                                 ol_link_threads=posix
4963                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4964 else
4965   echo "$ac_t""no" 1>&6
4966 :
4967 fi
4968
4969                         LIBS="$save_LIBS"
4970                 fi
4971
4972                 if test $ol_link_threads = no ; then
4973                                                 save_LIBS="$LIBS"
4974                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
4975 echo "configure:4976: checking for pthread_create in -lc_r" >&5
4976 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4978   echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980   ac_save_LIBS="$LIBS"
4981 LIBS="-lc_r  $LIBS"
4982 cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 /* Override any gcc2 internal prototype to avoid an error.  */
4986 /* We use char because int might match the return type of a gcc2
4987     builtin and then its argument prototype would still apply.  */
4988 char pthread_create();
4989
4990 int main() {
4991 pthread_create()
4992 ; return 0; }
4993 EOF
4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4995   rm -rf conftest*
4996   eval "ac_cv_lib_$ac_lib_var=yes"
4997 else
4998   echo "configure: failed program was:" >&5
4999   cat conftest.$ac_ext >&5
5000   rm -rf conftest*
5001   eval "ac_cv_lib_$ac_lib_var=no"
5002 fi
5003 rm -f conftest*
5004 LIBS="$ac_save_LIBS"
5005
5006 fi
5007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5008   echo "$ac_t""yes" 1>&6
5009   
5010                                 ol_link_threads=posix
5011                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
5012 else
5013   echo "$ac_t""no" 1>&6
5014 :
5015 fi
5016
5017                         LIBS="$save_LIBS"
5018                 fi
5019
5020                 if test $ol_link_threads = no ; then
5021                                                 save_LIBS="$LIBS"
5022                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5023 echo "configure:5024: checking for pthread_create in -lpthreads" >&5
5024 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
5025 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5026   echo $ac_n "(cached) $ac_c" 1>&6
5027 else
5028   ac_save_LIBS="$LIBS"
5029 LIBS="-lpthreads  $LIBS"
5030 cat > conftest.$ac_ext <<EOF
5031 #line 5032 "configure"
5032 #include "confdefs.h"
5033 /* Override any gcc2 internal prototype to avoid an error.  */
5034 /* We use char because int might match the return type of a gcc2
5035     builtin and then its argument prototype would still apply.  */
5036 char pthread_create();
5037
5038 int main() {
5039 pthread_create()
5040 ; return 0; }
5041 EOF
5042 if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5043   rm -rf conftest*
5044   eval "ac_cv_lib_$ac_lib_var=yes"
5045 else
5046   echo "configure: failed program was:" >&5
5047   cat conftest.$ac_ext >&5
5048   rm -rf conftest*
5049   eval "ac_cv_lib_$ac_lib_var=no"
5050 fi
5051 rm -f conftest*
5052 LIBS="$ac_save_LIBS"
5053
5054 fi
5055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5056   echo "$ac_t""yes" 1>&6
5057   
5058                                 ol_link_threads=posix
5059                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5060 else
5061   echo "$ac_t""no" 1>&6
5062 :
5063 fi
5064
5065                         LIBS="$save_LIBS"
5066                 fi
5067
5068                                 if test $ol_link_threads = no ; then
5069                                                 save_LIBS="$LIBS"
5070                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
5071 echo "configure:5072: checking for pthread_join in -lpthreads" >&5
5072 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
5073 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5074   echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076   ac_save_LIBS="$LIBS"
5077 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 /* We use char because int might match the return type of a gcc2
5083     builtin and then its argument prototype would still apply.  */
5084 char pthread_join();
5085
5086 int main() {
5087 pthread_join()
5088 ; return 0; }
5089 EOF
5090 if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5091   rm -rf conftest*
5092   eval "ac_cv_lib_$ac_lib_var=yes"
5093 else
5094   echo "configure: failed program was:" >&5
5095   cat conftest.$ac_ext >&5
5096   rm -rf conftest*
5097   eval "ac_cv_lib_$ac_lib_var=no"
5098 fi
5099 rm -f conftest*
5100 LIBS="$ac_save_LIBS"
5101
5102 fi
5103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5104   echo "$ac_t""yes" 1>&6
5105   
5106                                 ol_link_threads=posix
5107                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5108                                 
5109 else
5110   echo "$ac_t""no" 1>&6
5111 :
5112 fi
5113
5114                         LIBS="$save_LIBS"
5115                 fi
5116
5117                 if test $ol_link_threads = no ; then
5118                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
5119 echo "configure:5120: checking for pthread_create with -threads" >&5
5120 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
5121   echo $ac_n "(cached) $ac_c" 1>&6
5122 else
5123   
5124                                                                 save_LIBS="$LIBS"
5125                                 LIBS="-threads $LIBS"
5126                                 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 char pthread_create();
5130 int main() {
5131
5132                                         pthread_create();
5133                                         
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5137   rm -rf conftest*
5138   ol_cv_thread_flag=yes
5139 else
5140   echo "configure: failed program was:" >&5
5141   cat conftest.$ac_ext >&5
5142   rm -rf conftest*
5143   ol_cv_thread_flag=no
5144 fi
5145 rm -f conftest*
5146                                                                 LIBS="$save_LIBS"
5147                         
5148 fi
5149
5150 echo "$ac_t""$ol_cv_thread_flag" 1>&6
5151
5152                         if test $ol_cv_thread_flag = yes ; then
5153                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
5154                                 ol_link_threads=posix
5155                         fi
5156                 fi
5157
5158                 if test $ol_link_threads = no ; then
5159                                                 save_LIBS="$LIBS"
5160                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
5161 echo "configure:5162: checking for pthread_mutex_unlock in -lpthreads" >&5
5162 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
5163 if eval "test \"`echo '$''{'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="-lpthreads -lmach -lexc -lc_r $LIBS"
5168 cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 /* Override any gcc2 internal prototype to avoid an error.  */
5172 /* We use char because int might match the return type of a gcc2
5173     builtin and then its argument prototype would still apply.  */
5174 char pthread_mutex_unlock();
5175
5176 int main() {
5177 pthread_mutex_unlock()
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181   rm -rf conftest*
5182   eval "ac_cv_lib_$ac_lib_var=yes"
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   eval "ac_cv_lib_$ac_lib_var=no"
5188 fi
5189 rm -f conftest*
5190 LIBS="$ac_save_LIBS"
5191
5192 fi
5193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5194   echo "$ac_t""yes" 1>&6
5195   
5196                                 ol_link_threads=posix
5197                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
5198                                 if test $ol_with_yielding_select = auto ; then
5199                                         ol_with_yielding_select=yes
5200                                 fi
5201                                 
5202 else
5203   echo "$ac_t""no" 1>&6
5204 :
5205 fi
5206
5207                         LIBS="$save_LIBS"
5208                 fi
5209
5210                 if test $ol_link_threads = no ; then
5211                                                 save_LIBS="$LIBS"
5212                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
5213 echo "configure:5214: checking for pthread_mutex_lock in -lpthreads" >&5
5214 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
5215 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5216   echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218   ac_save_LIBS="$LIBS"
5219 LIBS="-lpthreads -lmach -lexc $LIBS"
5220 cat > conftest.$ac_ext <<EOF
5221 #line 5222 "configure"
5222 #include "confdefs.h"
5223 /* Override any gcc2 internal prototype to avoid an error.  */
5224 /* We use char because int might match the return type of a gcc2
5225     builtin and then its argument prototype would still apply.  */
5226 char pthread_mutex_lock();
5227
5228 int main() {
5229 pthread_mutex_lock()
5230 ; return 0; }
5231 EOF
5232 if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5233   rm -rf conftest*
5234   eval "ac_cv_lib_$ac_lib_var=yes"
5235 else
5236   echo "configure: failed program was:" >&5
5237   cat conftest.$ac_ext >&5
5238   rm -rf conftest*
5239   eval "ac_cv_lib_$ac_lib_var=no"
5240 fi
5241 rm -f conftest*
5242 LIBS="$ac_save_LIBS"
5243
5244 fi
5245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5246   echo "$ac_t""yes" 1>&6
5247   
5248                                 ol_link_threads=posix
5249                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
5250                                 if test $ol_with_yielding_select = auto ; then
5251                                         ol_with_yielding_select=yes
5252                                 fi
5253                                 
5254 else
5255   echo "$ac_t""no" 1>&6
5256 :
5257 fi
5258
5259                         LIBS="$save_LIBS"
5260                 fi
5261
5262                 if test $ol_link_threads = no ; then
5263                                                 save_LIBS="$LIBS"
5264                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
5265 echo "configure:5266: checking for pthread_mutex_trylock in -lpthreads" >&5
5266 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5268   echo $ac_n "(cached) $ac_c" 1>&6
5269 else
5270   ac_save_LIBS="$LIBS"
5271 LIBS="-lpthreads -lexc $LIBS"
5272 cat > conftest.$ac_ext <<EOF
5273 #line 5274 "configure"
5274 #include "confdefs.h"
5275 /* Override any gcc2 internal prototype to avoid an error.  */
5276 /* We use char because int might match the return type of a gcc2
5277     builtin and then its argument prototype would still apply.  */
5278 char pthread_mutex_trylock();
5279
5280 int main() {
5281 pthread_mutex_trylock()
5282 ; return 0; }
5283 EOF
5284 if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5285   rm -rf conftest*
5286   eval "ac_cv_lib_$ac_lib_var=yes"
5287 else
5288   echo "configure: failed program was:" >&5
5289   cat conftest.$ac_ext >&5
5290   rm -rf conftest*
5291   eval "ac_cv_lib_$ac_lib_var=no"
5292 fi
5293 rm -f conftest*
5294 LIBS="$ac_save_LIBS"
5295
5296 fi
5297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5298   echo "$ac_t""yes" 1>&6
5299   
5300                                 ol_link_threads=posix
5301                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
5302                                 if test $ol_with_yielding_select = auto ; then
5303                                         ol_with_yielding_select=yes
5304                                 fi
5305                                 
5306 else
5307   echo "$ac_t""no" 1>&6
5308 :
5309 fi
5310
5311                         LIBS="$save_LIBS"
5312                 fi
5313
5314                 if test $ol_link_threads != no ; then
5315                         cat >> confdefs.h <<\EOF
5316 #define HAVE_PTHREADS 1
5317 EOF
5318
5319
5320                                                 save_CPPFLAGS="$CPPFLAGS"
5321                         save_LIBS="$LIBS"
5322                         LIBS="$LTHREAD_LIBS $LIBS"
5323
5324                                                                                                 for ac_func in sched_yield pthread_yield
5325 do
5326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5327 echo "configure:5328: checking for $ac_func" >&5
5328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331   cat > conftest.$ac_ext <<EOF
5332 #line 5333 "configure"
5333 #include "confdefs.h"
5334 /* System header to define __stub macros and hopefully few prototypes,
5335     which can conflict with char $ac_func(); below.  */
5336 #include <assert.h>
5337 /* Override any gcc2 internal prototype to avoid an error.  */
5338 /* We use char because int might match the return type of a gcc2
5339     builtin and then its argument prototype would still apply.  */
5340 char $ac_func();
5341
5342 int main() {
5343
5344 /* The GNU C library defines this for functions which it implements
5345     to always fail with ENOSYS.  Some functions are actually named
5346     something starting with __ and the normal name is an alias.  */
5347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5348 choke me
5349 #else
5350 $ac_func();
5351 #endif
5352
5353 ; return 0; }
5354 EOF
5355 if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5356   rm -rf conftest*
5357   eval "ac_cv_func_$ac_func=yes"
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361   rm -rf conftest*
5362   eval "ac_cv_func_$ac_func=no"
5363 fi
5364 rm -f conftest*
5365 fi
5366
5367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5368   echo "$ac_t""yes" 1>&6
5369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5370   cat >> confdefs.h <<EOF
5371 #define $ac_tr_func 1
5372 EOF
5373  
5374 else
5375   echo "$ac_t""no" 1>&6
5376 fi
5377 done
5378
5379
5380                         if test $ac_cv_func_sched_yield = no -a \
5381                                 $ac_cv_func_pthread_yield = no ; then
5382                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5383 echo "configure:5384: checking for sched_yield in -lrt" >&5
5384 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5385 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5386   echo $ac_n "(cached) $ac_c" 1>&6
5387 else
5388   ac_save_LIBS="$LIBS"
5389 LIBS="-lrt  $LIBS"
5390 cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393 /* Override any gcc2 internal prototype to avoid an error.  */
5394 /* We use char because int might match the return type of a gcc2
5395     builtin and then its argument prototype would still apply.  */
5396 char sched_yield();
5397
5398 int main() {
5399 sched_yield()
5400 ; return 0; }
5401 EOF
5402 if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5403   rm -rf conftest*
5404   eval "ac_cv_lib_$ac_lib_var=yes"
5405 else
5406   echo "configure: failed program was:" >&5
5407   cat conftest.$ac_ext >&5
5408   rm -rf conftest*
5409   eval "ac_cv_lib_$ac_lib_var=no"
5410 fi
5411 rm -f conftest*
5412 LIBS="$ac_save_LIBS"
5413
5414 fi
5415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5416   echo "$ac_t""yes" 1>&6
5417   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5418                                         cat >> confdefs.h <<\EOF
5419 #define HAVE_SCHED_YIELD 1
5420 EOF
5421
5422                                         ac_cv_func_sched_yield=yes
5423 else
5424   echo "$ac_t""no" 1>&6
5425 ac_cv_func_sched_yield=no
5426 fi
5427
5428                         fi
5429                         if test $ac_cv_func_sched_yield = no -a \
5430                                 $ac_cv_func_pthread_yield = no ; then
5431                                                                                                 for ac_func in thr_yield
5432 do
5433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5434 echo "configure:5435: checking for $ac_func" >&5
5435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5436   echo $ac_n "(cached) $ac_c" 1>&6
5437 else
5438   cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 /* System header to define __stub macros and hopefully few prototypes,
5442     which can conflict with char $ac_func(); below.  */
5443 #include <assert.h>
5444 /* Override any gcc2 internal prototype to avoid an error.  */
5445 /* We use char because int might match the return type of a gcc2
5446     builtin and then its argument prototype would still apply.  */
5447 char $ac_func();
5448
5449 int main() {
5450
5451 /* The GNU C library defines this for functions which it implements
5452     to always fail with ENOSYS.  Some functions are actually named
5453     something starting with __ and the normal name is an alias.  */
5454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5455 choke me
5456 #else
5457 $ac_func();
5458 #endif
5459
5460 ; return 0; }
5461 EOF
5462 if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=yes"
5465 else
5466   echo "configure: failed program was:" >&5
5467   cat conftest.$ac_ext >&5
5468   rm -rf conftest*
5469   eval "ac_cv_func_$ac_func=no"
5470 fi
5471 rm -f conftest*
5472 fi
5473
5474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5475   echo "$ac_t""yes" 1>&6
5476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5477   cat >> confdefs.h <<EOF
5478 #define $ac_tr_func 1
5479 EOF
5480  
5481 else
5482   echo "$ac_t""no" 1>&6
5483 fi
5484 done
5485
5486                         fi
5487                         if test $ac_cv_func_sched_yield = no -a \
5488                                 $ac_cv_func_pthread_yield = no -a \
5489                                 "$ac_cv_func_thr_yield" = no ; then
5490                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5491                         fi
5492
5493                                                 for ac_func in pthread_kill
5494 do
5495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5496 echo "configure:5497: checking for $ac_func" >&5
5497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* System header to define __stub macros and hopefully few prototypes,
5504     which can conflict with char $ac_func(); below.  */
5505 #include <assert.h>
5506 /* Override any gcc2 internal prototype to avoid an error.  */
5507 /* We use char because int might match the return type of a gcc2
5508     builtin and then its argument prototype would still apply.  */
5509 char $ac_func();
5510
5511 int main() {
5512
5513 /* The GNU C library defines this for functions which it implements
5514     to always fail with ENOSYS.  Some functions are actually named
5515     something starting with __ and the normal name is an alias.  */
5516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5517 choke me
5518 #else
5519 $ac_func();
5520 #endif
5521
5522 ; return 0; }
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525   rm -rf conftest*
5526   eval "ac_cv_func_$ac_func=yes"
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -rf conftest*
5531   eval "ac_cv_func_$ac_func=no"
5532 fi
5533 rm -f conftest*
5534 fi
5535
5536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5537   echo "$ac_t""yes" 1>&6
5538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5539   cat >> confdefs.h <<EOF
5540 #define $ac_tr_func 1
5541 EOF
5542  
5543 else
5544   echo "$ac_t""no" 1>&6
5545 fi
5546 done
5547
5548
5549                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5550 echo "configure:5551: checking for pthread_detach with <pthread.h>" >&5
5551 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5552   echo $ac_n "(cached) $ac_c" 1>&6
5553 else
5554   
5555                                                                 cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558
5559 #include <pthread.h>
5560 #ifndef NULL
5561 #define NULL (void*)0
5562 #endif
5563
5564 int main() {
5565 pthread_detach(NULL);
5566 ; return 0; }
5567 EOF
5568 if { (eval echo configure:5569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5569   rm -rf conftest*
5570   ol_cv_func_pthread_detach=yes
5571 else
5572   echo "configure: failed program was:" >&5
5573   cat conftest.$ac_ext >&5
5574   rm -rf conftest*
5575   ol_cv_func_pthread_detach=no
5576 fi
5577 rm -f conftest*
5578                         
5579 fi
5580
5581 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5582
5583                         if test $ol_cv_func_pthread_detach = no ; then
5584                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5585                         fi
5586
5587                         cat >> confdefs.h <<\EOF
5588 #define HAVE_PTHREAD_DETACH 1
5589 EOF
5590
5591
5592                                                 for ac_func in \
5593                                 pthread_setconcurrency \
5594                                 pthread_getconcurrency \
5595                                 thr_setconcurrency \
5596                                 thr_getconcurrency \
5597                         
5598 do
5599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5600 echo "configure:5601: checking for $ac_func" >&5
5601 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604   cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607 /* System header to define __stub macros and hopefully few prototypes,
5608     which can conflict with char $ac_func(); below.  */
5609 #include <assert.h>
5610 /* Override any gcc2 internal prototype to avoid an error.  */
5611 /* We use char because int might match the return type of a gcc2
5612     builtin and then its argument prototype would still apply.  */
5613 char $ac_func();
5614
5615 int main() {
5616
5617 /* The GNU C library defines this for functions which it implements
5618     to always fail with ENOSYS.  Some functions are actually named
5619     something starting with __ and the normal name is an alias.  */
5620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5621 choke me
5622 #else
5623 $ac_func();
5624 #endif
5625
5626 ; return 0; }
5627 EOF
5628 if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5629   rm -rf conftest*
5630   eval "ac_cv_func_$ac_func=yes"
5631 else
5632   echo "configure: failed program was:" >&5
5633   cat conftest.$ac_ext >&5
5634   rm -rf conftest*
5635   eval "ac_cv_func_$ac_func=no"
5636 fi
5637 rm -f conftest*
5638 fi
5639
5640 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5641   echo "$ac_t""yes" 1>&6
5642     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5643   cat >> confdefs.h <<EOF
5644 #define $ac_tr_func 1
5645 EOF
5646  
5647 else
5648   echo "$ac_t""no" 1>&6
5649 fi
5650 done
5651
5652
5653                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5654 echo "configure:5655: checking if pthread_create() works" >&5
5655                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5656   echo $ac_n "(cached) $ac_c" 1>&6
5657 else
5658   
5659                         if test "$cross_compiling" = yes; then
5660                                 ol_cv_pthread_create_works=yes
5661 else
5662   cat > conftest.$ac_ext <<EOF
5663 #line 5664 "configure"
5664 #include "confdefs.h"
5665
5666 #include <pthread.h>
5667 #ifndef NULL
5668 #define NULL (void*)0
5669 #endif
5670
5671 static void *task(p)
5672         void *p;
5673 {
5674         return (void *) (p == NULL);
5675 }
5676
5677 int main(argc, argv)
5678         int argc;
5679         char **argv;
5680 {
5681         pthread_t t;
5682 #if HAVE_PTHREADS_D4
5683         exit(pthread_create(&t, pthread_attr_default, task, NULL));
5684 #else
5685         exit(pthread_create(&t, NULL, task, NULL));
5686 #endif
5687 }
5688
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5691 then
5692   ol_cv_pthread_create_works=yes
5693 else
5694   echo "configure: failed program was:" >&5
5695   cat conftest.$ac_ext >&5
5696   rm -fr conftest*
5697   ol_cv_pthread_create_works=no
5698 fi
5699 rm -fr conftest*
5700 fi
5701
5702 fi
5703
5704                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5705
5706                         if test $ol_cv_pthread_create_works = no ; then
5707                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
5708                         fi
5709
5710                                                 if test $ol_with_yielding_select = auto ; then
5711                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5712 echo "configure:5713: checking if select yields when using pthreads" >&5
5713                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   
5717                                 if test "$cross_compiling" = yes; then
5718   
5719                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5720 else
5721   cat > conftest.$ac_ext <<EOF
5722 #line 5723 "configure"
5723 #include "confdefs.h"
5724
5725 #include <sys/types.h>
5726 #include <sys/time.h>
5727 #include <unistd.h>
5728 #include <pthread.h>
5729 #ifndef NULL
5730 #define NULL (void*) 0
5731 #endif
5732
5733 static int fildes[2];
5734
5735 static void *task(p)
5736         void *p;
5737 {
5738         int i;
5739         struct timeval tv;
5740
5741         fd_set rfds;
5742
5743         tv.tv_sec=10;
5744         tv.tv_usec=0;
5745
5746         FD_ZERO(&rfds);
5747         FD_SET(fildes[0], &rfds);
5748
5749         /* we're not interested in any fds */
5750         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5751
5752         if(i < 0) {
5753                 perror("select");
5754                 exit(10);
5755         }
5756
5757         exit(0); /* if we exit here, the select blocked the whole process */
5758 }
5759
5760 int main(argc, argv)
5761         int argc;
5762         char **argv;
5763 {
5764         pthread_t t;
5765
5766         /* create a pipe to select */
5767         if(pipe(&fildes[0])) {
5768                 perror("select");
5769                 exit(1);
5770         }
5771
5772 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5773         (void) pthread_setconcurrency(2);
5774 #else
5775 #ifdef HAVE_THR_SETCONCURRENCY
5776         /* Set Solaris LWP concurrency to 2 */
5777         thr_setconcurrency(2);
5778 #endif
5779 #endif
5780
5781 #if HAVE_PTHREADS_D4
5782         pthread_create(&t, pthread_attr_default, task, NULL);
5783 #else
5784         pthread_create(&t, NULL, task, NULL);
5785 #endif
5786
5787 #if HAVE_SCHED_YIELD
5788         sched_yield();  /* make sure task runs first */
5789 #else
5790 #ifdef HAVE_PTHREAD_YIELD
5791         pthread_yield();        /* make sure task runs first */
5792 #endif
5793 #endif
5794
5795         exit(2);
5796 }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5799 then
5800   ol_cv_pthread_select_yields=no
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -fr conftest*
5805   ol_cv_pthread_select_yields=yes
5806 fi
5807 rm -fr conftest*
5808 fi
5809
5810 fi
5811
5812                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5813
5814                                 if test $ol_cv_pthread_select_yields = yes ; then
5815                                         ol_with_yielding_select=yes
5816                                 fi
5817                         fi
5818
5819                                                 CPPFLAGS="$save_CPPFLAGS"
5820                         LIBS="$save_LIBS"
5821                 else
5822                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5823                 fi
5824         fi
5825
5826         if test $ol_with_threads = posix ; then
5827                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5828         fi
5829 fi
5830
5831 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5832         -o $ol_with_threads = mach ; then
5833
5834                 for ac_hdr in mach/cthreads.h
5835 do
5836 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5837 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5838 echo "configure:5839: checking for $ac_hdr" >&5
5839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5840   echo $ac_n "(cached) $ac_c" 1>&6
5841 else
5842   cat > conftest.$ac_ext <<EOF
5843 #line 5844 "configure"
5844 #include "confdefs.h"
5845 #include <$ac_hdr>
5846 EOF
5847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5848 { (eval echo configure:5849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5850 if test -z "$ac_err"; then
5851   rm -rf conftest*
5852   eval "ac_cv_header_$ac_safe=yes"
5853 else
5854   echo "$ac_err" >&5
5855   echo "configure: failed program was:" >&5
5856   cat conftest.$ac_ext >&5
5857   rm -rf conftest*
5858   eval "ac_cv_header_$ac_safe=no"
5859 fi
5860 rm -f conftest*
5861 fi
5862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5863   echo "$ac_t""yes" 1>&6
5864     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5865   cat >> confdefs.h <<EOF
5866 #define $ac_tr_hdr 1
5867 EOF
5868  
5869 else
5870   echo "$ac_t""no" 1>&6
5871 fi
5872 done
5873
5874         if test $ac_cv_header_mach_cthreads_h = yes ; then
5875                 ol_with_threads=found
5876
5877                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5878 echo "configure:5879: checking for cthread_fork" >&5
5879 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5880   echo $ac_n "(cached) $ac_c" 1>&6
5881 else
5882   cat > conftest.$ac_ext <<EOF
5883 #line 5884 "configure"
5884 #include "confdefs.h"
5885 /* System header to define __stub macros and hopefully few prototypes,
5886     which can conflict with char cthread_fork(); below.  */
5887 #include <assert.h>
5888 /* Override any gcc2 internal prototype to avoid an error.  */
5889 /* We use char because int might match the return type of a gcc2
5890     builtin and then its argument prototype would still apply.  */
5891 char cthread_fork();
5892
5893 int main() {
5894
5895 /* The GNU C library defines this for functions which it implements
5896     to always fail with ENOSYS.  Some functions are actually named
5897     something starting with __ and the normal name is an alias.  */
5898 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5899 choke me
5900 #else
5901 cthread_fork();
5902 #endif
5903
5904 ; return 0; }
5905 EOF
5906 if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5907   rm -rf conftest*
5908   eval "ac_cv_func_cthread_fork=yes"
5909 else
5910   echo "configure: failed program was:" >&5
5911   cat conftest.$ac_ext >&5
5912   rm -rf conftest*
5913   eval "ac_cv_func_cthread_fork=no"
5914 fi
5915 rm -f conftest*
5916 fi
5917
5918 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5919   echo "$ac_t""yes" 1>&6
5920   ol_link_threads=yes
5921 else
5922   echo "$ac_t""no" 1>&6
5923 fi
5924
5925
5926                 if test $ol_link_threads = no ; then
5927                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5928 echo "configure:5929: checking for cthread_fork with -all_load" >&5
5929 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5930   echo $ac_n "(cached) $ac_c" 1>&6
5931 else
5932   
5933                                                                 save_LIBS="$LIBS"
5934                                 LIBS="-all_load $LIBS"
5935                                 cat > conftest.$ac_ext <<EOF
5936 #line 5937 "configure"
5937 #include "confdefs.h"
5938 #include <mach/cthreads.h>
5939 int main() {
5940
5941                                         cthread_fork((void *)0, (void *)0);
5942                                         
5943 ; return 0; }
5944 EOF
5945 if { (eval echo configure:5946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5946   rm -rf conftest*
5947   ol_cv_cthread_all_load=yes
5948 else
5949   echo "configure: failed program was:" >&5
5950   cat conftest.$ac_ext >&5
5951   rm -rf conftest*
5952   ol_cv_cthread_all_load=no
5953 fi
5954 rm -f conftest*
5955                                                                 LIBS="$save_LIBS"
5956                         
5957 fi
5958
5959 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5960
5961                         if test $ol_cv_cthread_all_load = yes ; then
5962                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5963                                 ol_link_threads=mach
5964                         fi
5965                 fi
5966
5967                 if test $ol_link_threads != no ; then
5968                         : check for cthread specific functionality here
5969                         cat >> confdefs.h <<\EOF
5970 #define HAVE_MACH_CTHREADS 1
5971 EOF
5972
5973                 else
5974                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
5975                 fi
5976         fi
5977
5978         if test $ol_with_threads = mach ; then
5979                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
5980         fi
5981 fi
5982
5983 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5984         -o $ol_with_threads = lwp ; then
5985
5986                 for ac_hdr in thread.h synch.h
5987 do
5988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_hdr" >&5
5991 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 #include <$ac_hdr>
5998 EOF
5999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6000 { (eval echo configure:6001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6002 if test -z "$ac_err"; then
6003   rm -rf conftest*
6004   eval "ac_cv_header_$ac_safe=yes"
6005 else
6006   echo "$ac_err" >&5
6007   echo "configure: failed program was:" >&5
6008   cat conftest.$ac_ext >&5
6009   rm -rf conftest*
6010   eval "ac_cv_header_$ac_safe=no"
6011 fi
6012 rm -f conftest*
6013 fi
6014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6017   cat >> confdefs.h <<EOF
6018 #define $ac_tr_hdr 1
6019 EOF
6020  
6021 else
6022   echo "$ac_t""no" 1>&6
6023 fi
6024 done
6025
6026         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6027                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6028 echo "configure:6029: checking for thr_create in -lthread" >&5
6029 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   ac_save_LIBS="$LIBS"
6034 LIBS="-lthread  $LIBS"
6035 cat > conftest.$ac_ext <<EOF
6036 #line 6037 "configure"
6037 #include "confdefs.h"
6038 /* Override any gcc2 internal prototype to avoid an error.  */
6039 /* We use char because int might match the return type of a gcc2
6040     builtin and then its argument prototype would still apply.  */
6041 char thr_create();
6042
6043 int main() {
6044 thr_create()
6045 ; return 0; }
6046 EOF
6047 if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6048   rm -rf conftest*
6049   eval "ac_cv_lib_$ac_lib_var=yes"
6050 else
6051   echo "configure: failed program was:" >&5
6052   cat conftest.$ac_ext >&5
6053   rm -rf conftest*
6054   eval "ac_cv_lib_$ac_lib_var=no"
6055 fi
6056 rm -f conftest*
6057 LIBS="$ac_save_LIBS"
6058
6059 fi
6060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6061   echo "$ac_t""yes" 1>&6
6062   have_thr=yes
6063 else
6064   echo "$ac_t""no" 1>&6
6065 have_thr=no
6066 fi
6067
6068
6069                 if test $have_thr = yes ; then
6070                         cat >> confdefs.h <<\EOF
6071 #define HAVE_THR 1
6072 EOF
6073
6074                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6075                         ol_link_threads=thr
6076
6077                         if test $ol_with_yielding_select = auto ; then
6078                                 ol_with_yielding_select=yes
6079                         fi
6080
6081                                                 for ac_func in \
6082                                 thr_setconcurrency \
6083                                 thr_getconcurrency \
6084                         
6085 do
6086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6087 echo "configure:6088: checking for $ac_func" >&5
6088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6089   echo $ac_n "(cached) $ac_c" 1>&6
6090 else
6091   cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094 /* System header to define __stub macros and hopefully few prototypes,
6095     which can conflict with char $ac_func(); below.  */
6096 #include <assert.h>
6097 /* Override any gcc2 internal prototype to avoid an error.  */
6098 /* We use char because int might match the return type of a gcc2
6099     builtin and then its argument prototype would still apply.  */
6100 char $ac_func();
6101
6102 int main() {
6103
6104 /* The GNU C library defines this for functions which it implements
6105     to always fail with ENOSYS.  Some functions are actually named
6106     something starting with __ and the normal name is an alias.  */
6107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6108 choke me
6109 #else
6110 $ac_func();
6111 #endif
6112
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116   rm -rf conftest*
6117   eval "ac_cv_func_$ac_func=yes"
6118 else
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   eval "ac_cv_func_$ac_func=no"
6123 fi
6124 rm -f conftest*
6125 fi
6126
6127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6128   echo "$ac_t""yes" 1>&6
6129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6130   cat >> confdefs.h <<EOF
6131 #define $ac_tr_func 1
6132 EOF
6133  
6134 else
6135   echo "$ac_t""no" 1>&6
6136 fi
6137 done
6138
6139                 fi
6140         fi
6141
6142                 for ac_hdr in lwp/lwp.h
6143 do
6144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6145 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6146 echo "configure:6147: checking for $ac_hdr" >&5
6147 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6148   echo $ac_n "(cached) $ac_c" 1>&6
6149 else
6150   cat > conftest.$ac_ext <<EOF
6151 #line 6152 "configure"
6152 #include "confdefs.h"
6153 #include <$ac_hdr>
6154 EOF
6155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6156 { (eval echo configure:6157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6157 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6158 if test -z "$ac_err"; then
6159   rm -rf conftest*
6160   eval "ac_cv_header_$ac_safe=yes"
6161 else
6162   echo "$ac_err" >&5
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -rf conftest*
6166   eval "ac_cv_header_$ac_safe=no"
6167 fi
6168 rm -f conftest*
6169 fi
6170 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6171   echo "$ac_t""yes" 1>&6
6172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6173   cat >> confdefs.h <<EOF
6174 #define $ac_tr_hdr 1
6175 EOF
6176  
6177 else
6178   echo "$ac_t""no" 1>&6
6179 fi
6180 done
6181
6182         if test $ac_cv_header_lwp_lwp_h = yes ; then
6183                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6184 echo "configure:6185: checking for lwp_create in -llwp" >&5
6185 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6186 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6187   echo $ac_n "(cached) $ac_c" 1>&6
6188 else
6189   ac_save_LIBS="$LIBS"
6190 LIBS="-llwp  $LIBS"
6191 cat > conftest.$ac_ext <<EOF
6192 #line 6193 "configure"
6193 #include "confdefs.h"
6194 /* Override any gcc2 internal prototype to avoid an error.  */
6195 /* We use char because int might match the return type of a gcc2
6196     builtin and then its argument prototype would still apply.  */
6197 char lwp_create();
6198
6199 int main() {
6200 lwp_create()
6201 ; return 0; }
6202 EOF
6203 if { (eval echo configure:6204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=yes"
6206 else
6207   echo "configure: failed program was:" >&5
6208   cat conftest.$ac_ext >&5
6209   rm -rf conftest*
6210   eval "ac_cv_lib_$ac_lib_var=no"
6211 fi
6212 rm -f conftest*
6213 LIBS="$ac_save_LIBS"
6214
6215 fi
6216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6217   echo "$ac_t""yes" 1>&6
6218   have_lwp=yes
6219 else
6220   echo "$ac_t""no" 1>&6
6221 have_lwp=no
6222 fi
6223
6224
6225                 if test $have_lwp = yes ; then
6226                         cat >> confdefs.h <<\EOF
6227 #define HAVE_LWP 1
6228 EOF
6229
6230                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6231                         ol_link_threads=lwp
6232
6233                         if test $ol_with_yielding_select = auto ; then
6234                                 ol_with_yielding_select=no
6235                         fi
6236                 fi
6237         fi
6238 fi
6239
6240 if test $ol_with_yielding_select = yes ; then
6241         cat >> confdefs.h <<\EOF
6242 #define HAVE_YIELDING_SELECT 1
6243 EOF
6244
6245 fi
6246
6247 if test $ol_with_threads = manual ; then
6248                 ol_link_threads=yes
6249
6250         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6251
6252         for ac_hdr in pthread.h sched.h
6253 do
6254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6256 echo "configure:6257: checking for $ac_hdr" >&5
6257 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6258   echo $ac_n "(cached) $ac_c" 1>&6
6259 else
6260   cat > conftest.$ac_ext <<EOF
6261 #line 6262 "configure"
6262 #include "confdefs.h"
6263 #include <$ac_hdr>
6264 EOF
6265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6266 { (eval echo configure:6267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6268 if test -z "$ac_err"; then
6269   rm -rf conftest*
6270   eval "ac_cv_header_$ac_safe=yes"
6271 else
6272   echo "$ac_err" >&5
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_header_$ac_safe=no"
6277 fi
6278 rm -f conftest*
6279 fi
6280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6281   echo "$ac_t""yes" 1>&6
6282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6283   cat >> confdefs.h <<EOF
6284 #define $ac_tr_hdr 1
6285 EOF
6286  
6287 else
6288   echo "$ac_t""no" 1>&6
6289 fi
6290 done
6291
6292         for ac_func in sched_yield pthread_yield
6293 do
6294 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6295 echo "configure:6296: checking for $ac_func" >&5
6296 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6297   echo $ac_n "(cached) $ac_c" 1>&6
6298 else
6299   cat > conftest.$ac_ext <<EOF
6300 #line 6301 "configure"
6301 #include "confdefs.h"
6302 /* System header to define __stub macros and hopefully few prototypes,
6303     which can conflict with char $ac_func(); below.  */
6304 #include <assert.h>
6305 /* Override any gcc2 internal prototype to avoid an error.  */
6306 /* We use char because int might match the return type of a gcc2
6307     builtin and then its argument prototype would still apply.  */
6308 char $ac_func();
6309
6310 int main() {
6311
6312 /* The GNU C library defines this for functions which it implements
6313     to always fail with ENOSYS.  Some functions are actually named
6314     something starting with __ and the normal name is an alias.  */
6315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6316 choke me
6317 #else
6318 $ac_func();
6319 #endif
6320
6321 ; return 0; }
6322 EOF
6323 if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6324   rm -rf conftest*
6325   eval "ac_cv_func_$ac_func=yes"
6326 else
6327   echo "configure: failed program was:" >&5
6328   cat conftest.$ac_ext >&5
6329   rm -rf conftest*
6330   eval "ac_cv_func_$ac_func=no"
6331 fi
6332 rm -f conftest*
6333 fi
6334
6335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6336   echo "$ac_t""yes" 1>&6
6337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6338   cat >> confdefs.h <<EOF
6339 #define $ac_tr_func 1
6340 EOF
6341  
6342 else
6343   echo "$ac_t""no" 1>&6
6344 fi
6345 done
6346
6347         
6348 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
6349 echo "configure:6350: checking for LinuxThreads" >&5
6350 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6351   echo $ac_n "(cached) $ac_c" 1>&6
6352 else
6353   
6354         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
6355         if test "$res" -gt 0 ; then
6356                 ol_cv_linux_threads=yes
6357         else
6358                 ol_cv_linux_threads=no
6359         fi
6360
6361 fi
6362
6363 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6364
6365
6366         for ac_hdr in mach/cthreads.h
6367 do
6368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6370 echo "configure:6371: checking for $ac_hdr" >&5
6371 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 #include <$ac_hdr>
6378 EOF
6379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6380 { (eval echo configure:6381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6382 if test -z "$ac_err"; then
6383   rm -rf conftest*
6384   eval "ac_cv_header_$ac_safe=yes"
6385 else
6386   echo "$ac_err" >&5
6387   echo "configure: failed program was:" >&5
6388   cat conftest.$ac_ext >&5
6389   rm -rf conftest*
6390   eval "ac_cv_header_$ac_safe=no"
6391 fi
6392 rm -f conftest*
6393 fi
6394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6395   echo "$ac_t""yes" 1>&6
6396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6397   cat >> confdefs.h <<EOF
6398 #define $ac_tr_hdr 1
6399 EOF
6400  
6401 else
6402   echo "$ac_t""no" 1>&6
6403 fi
6404 done
6405
6406         for ac_hdr in lwp/lwp.h
6407 do
6408 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6409 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6410 echo "configure:6411: checking for $ac_hdr" >&5
6411 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6412   echo $ac_n "(cached) $ac_c" 1>&6
6413 else
6414   cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417 #include <$ac_hdr>
6418 EOF
6419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6420 { (eval echo configure:6421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6422 if test -z "$ac_err"; then
6423   rm -rf conftest*
6424   eval "ac_cv_header_$ac_safe=yes"
6425 else
6426   echo "$ac_err" >&5
6427   echo "configure: failed program was:" >&5
6428   cat conftest.$ac_ext >&5
6429   rm -rf conftest*
6430   eval "ac_cv_header_$ac_safe=no"
6431 fi
6432 rm -f conftest*
6433 fi
6434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6435   echo "$ac_t""yes" 1>&6
6436     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6437   cat >> confdefs.h <<EOF
6438 #define $ac_tr_hdr 1
6439 EOF
6440  
6441 else
6442   echo "$ac_t""no" 1>&6
6443 fi
6444 done
6445
6446         for ac_hdr in thread.h synch.h
6447 do
6448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6450 echo "configure:6451: checking for $ac_hdr" >&5
6451 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6452   echo $ac_n "(cached) $ac_c" 1>&6
6453 else
6454   cat > conftest.$ac_ext <<EOF
6455 #line 6456 "configure"
6456 #include "confdefs.h"
6457 #include <$ac_hdr>
6458 EOF
6459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6460 { (eval echo configure:6461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6462 if test -z "$ac_err"; then
6463   rm -rf conftest*
6464   eval "ac_cv_header_$ac_safe=yes"
6465 else
6466   echo "$ac_err" >&5
6467   echo "configure: failed program was:" >&5
6468   cat conftest.$ac_ext >&5
6469   rm -rf conftest*
6470   eval "ac_cv_header_$ac_safe=no"
6471 fi
6472 rm -f conftest*
6473 fi
6474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6475   echo "$ac_t""yes" 1>&6
6476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6477   cat >> confdefs.h <<EOF
6478 #define $ac_tr_hdr 1
6479 EOF
6480  
6481 else
6482   echo "$ac_t""no" 1>&6
6483 fi
6484 done
6485
6486 fi
6487
6488 if test $ol_link_threads != no ; then  
6489                         cat >> confdefs.h <<\EOF
6490 #define REENTRANT 1
6491 EOF
6492
6493         cat >> confdefs.h <<\EOF
6494 #define _REENTRANT 1
6495 EOF
6496
6497         cat >> confdefs.h <<\EOF
6498 #define THREAD_SAFE 1
6499 EOF
6500
6501         cat >> confdefs.h <<\EOF
6502 #define _THREAD_SAFE 1
6503 EOF
6504
6505         cat >> confdefs.h <<\EOF
6506 #define THREADSAFE 1
6507 EOF
6508
6509         cat >> confdefs.h <<\EOF
6510 #define _THREADSAFE 1
6511 EOF
6512
6513
6514                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6515 echo "configure:6516: checking for thread specific errno" >&5
6516 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6517   echo $ac_n "(cached) $ac_c" 1>&6
6518 else
6519   
6520                 cat > conftest.$ac_ext <<EOF
6521 #line 6522 "configure"
6522 #include "confdefs.h"
6523 #include <errno.h>
6524 int main() {
6525 int x = errno;
6526 ; return 0; }
6527 EOF
6528 if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6529   rm -rf conftest*
6530   ol_cv_errno_thread_specific=yes
6531 else
6532   echo "configure: failed program was:" >&5
6533   cat conftest.$ac_ext >&5
6534   rm -rf conftest*
6535   ol_cv_errno_thread_specific=no
6536 fi
6537 rm -f conftest*
6538         
6539 fi
6540
6541 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
6542
6543         if test $ol_cv_errno_thread_specific != yes ; then
6544                 LIBS="$LTHREAD_LIBS $LIBS"
6545                 LTHREAD_LIBS=""
6546         fi
6547
6548 fi  
6549
6550 if test $ol_link_threads = no ; then
6551         if test $ol_with_threads = yes ; then
6552                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
6553         fi
6554
6555         if test $ol_with_threads = auto ; then
6556                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
6557                 ol_with_threads=no
6558         fi
6559
6560         cat >> confdefs.h <<\EOF
6561 #define NO_THREADS 1
6562 EOF
6563
6564         LTHREAD_LIBS=""
6565 fi
6566
6567 if test $ol_link_threads != no ; then
6568         cat >> confdefs.h <<\EOF
6569 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
6570 EOF
6571
6572 fi
6573
6574
6575 ol_link_ldbm=no 
6576 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
6577         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
6578 echo "configure:6579: checking for DB2 library" >&5
6579 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582         ol_LIBS="$LIBS"
6583         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
6584 echo "configure:6585: checking for db_open in -ldb" >&5
6585 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
6586 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6587   echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589   ac_save_LIBS="$LIBS"
6590 LIBS="-ldb  $LIBS"
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 /* Override any gcc2 internal prototype to avoid an error.  */
6595 /* We use char because int might match the return type of a gcc2
6596     builtin and then its argument prototype would still apply.  */
6597 char db_open();
6598
6599 int main() {
6600 db_open()
6601 ; return 0; }
6602 EOF
6603 if { (eval echo configure:6604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6604   rm -rf conftest*
6605   eval "ac_cv_lib_$ac_lib_var=yes"
6606 else
6607   echo "configure: failed program was:" >&5
6608   cat conftest.$ac_ext >&5
6609   rm -rf conftest*
6610   eval "ac_cv_lib_$ac_lib_var=no"
6611 fi
6612 rm -f conftest*
6613 LIBS="$ac_save_LIBS"
6614
6615 fi
6616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6617   echo "$ac_t""yes" 1>&6
6618   ol_cv_lib_db2=-ldb
6619 else
6620   echo "$ac_t""no" 1>&6
6621 ol_cv_lib_db2=no
6622 fi
6623
6624         LIBS="$ol_LIBS"
6625
6626 fi
6627
6628 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6629
6630 for ac_hdr in db.h
6631 do
6632 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6633 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6634 echo "configure:6635: checking for $ac_hdr" >&5
6635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6636   echo $ac_n "(cached) $ac_c" 1>&6
6637 else
6638   cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6641 #include <$ac_hdr>
6642 EOF
6643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6644 { (eval echo configure:6645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6646 if test -z "$ac_err"; then
6647   rm -rf conftest*
6648   eval "ac_cv_header_$ac_safe=yes"
6649 else
6650   echo "$ac_err" >&5
6651   echo "configure: failed program was:" >&5
6652   cat conftest.$ac_ext >&5
6653   rm -rf conftest*
6654   eval "ac_cv_header_$ac_safe=no"
6655 fi
6656 rm -f conftest*
6657 fi
6658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6659   echo "$ac_t""yes" 1>&6
6660     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6661   cat >> confdefs.h <<EOF
6662 #define $ac_tr_hdr 1
6663 EOF
6664  
6665 else
6666   echo "$ac_t""no" 1>&6
6667 fi
6668 done
6669
6670 if test $ac_cv_header_db_h = yes ; then
6671         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6672 echo "configure:6673: checking if db.h is DB2" >&5
6673 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6674   echo $ac_n "(cached) $ac_c" 1>&6
6675 else
6676   
6677                 cat > conftest.$ac_ext <<EOF
6678 #line 6679 "configure"
6679 #include "confdefs.h"
6680
6681 #                       include <db.h>
6682                         /* this check could be improved */
6683 #                       ifdef DB_VERSION_MAJOR
6684 #                               if DB_VERSION_MAJOR == 2
6685                                         __db_version_2
6686 #                               endif
6687 #                       endif
6688                 
6689 EOF
6690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6691   egrep "__db_version_2" >/dev/null 2>&1; then
6692   rm -rf conftest*
6693   ol_cv_header_db2=yes
6694 else
6695   rm -rf conftest*
6696   ol_cv_header_db2=no
6697 fi
6698 rm -f conftest*
6699
6700 fi
6701
6702 echo "$ac_t""$ol_cv_header_db2" 1>&6
6703 else
6704         ol_cv_header_db2=no
6705 fi
6706
6707
6708  
6709  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6710 echo "configure:6711: checking for Berkeley DB2" >&5
6711 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6712   echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714   
6715         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6716                 ol_cv_berkeley_db2=no
6717         else
6718                 ol_cv_berkeley_db2=yes
6719         fi
6720
6721 fi
6722
6723 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6724  if test $ol_cv_berkeley_db2 = yes ; then
6725         cat >> confdefs.h <<\EOF
6726 #define HAVE_BERKELEY_DB2 1
6727 EOF
6728
6729  fi
6730
6731
6732         if test $ol_cv_berkeley_db2 = yes ; then
6733                 ol_link_ldbm=db2
6734                 ol_with_ldbm_api=db2
6735
6736                 if test $ol_with_ldbm_type = hash ; then
6737                         cat >> confdefs.h <<\EOF
6738 #define LDBM_USE_DBHASH 1
6739 EOF
6740
6741                 else
6742                         cat >> confdefs.h <<\EOF
6743 #define LDBM_USE_DBBTREE 1
6744 EOF
6745
6746                 fi
6747
6748                                                 if test $ol_cv_lib_db2 != yes ; then
6749                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6750                 fi
6751         fi
6752 fi
6753
6754 ol_link_bdb2=no
6755 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6756         ol_link_bdb2=yes
6757 fi
6758
6759 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6760         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6761 echo "configure:6762: checking for Berkeley DB library" >&5
6762 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6763   echo $ac_n "(cached) $ac_c" 1>&6
6764 else
6765         ol_LIBS="$LIBS"
6766         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6767 echo "configure:6768: checking for dbopen" >&5
6768 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6769   echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771   cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* System header to define __stub macros and hopefully few prototypes,
6775     which can conflict with char dbopen(); below.  */
6776 #include <assert.h>
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 /* We use char because int might match the return type of a gcc2
6779     builtin and then its argument prototype would still apply.  */
6780 char dbopen();
6781
6782 int main() {
6783
6784 /* The GNU C library defines this for functions which it implements
6785     to always fail with ENOSYS.  Some functions are actually named
6786     something starting with __ and the normal name is an alias.  */
6787 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6788 choke me
6789 #else
6790 dbopen();
6791 #endif
6792
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796   rm -rf conftest*
6797   eval "ac_cv_func_dbopen=yes"
6798 else
6799   echo "configure: failed program was:" >&5
6800   cat conftest.$ac_ext >&5
6801   rm -rf conftest*
6802   eval "ac_cv_func_dbopen=no"
6803 fi
6804 rm -f conftest*
6805 fi
6806
6807 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6808   echo "$ac_t""yes" 1>&6
6809   ol_cv_lib_db=yes
6810 else
6811   echo "$ac_t""no" 1>&6
6812
6813                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6814 echo "configure:6815: checking for dbopen in -ldb" >&5
6815 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   ac_save_LIBS="$LIBS"
6820 LIBS="-ldb  $LIBS"
6821 cat > conftest.$ac_ext <<EOF
6822 #line 6823 "configure"
6823 #include "confdefs.h"
6824 /* Override any gcc2 internal prototype to avoid an error.  */
6825 /* We use char because int might match the return type of a gcc2
6826     builtin and then its argument prototype would still apply.  */
6827 char dbopen();
6828
6829 int main() {
6830 dbopen()
6831 ; return 0; }
6832 EOF
6833 if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6834   rm -rf conftest*
6835   eval "ac_cv_lib_$ac_lib_var=yes"
6836 else
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   eval "ac_cv_lib_$ac_lib_var=no"
6841 fi
6842 rm -f conftest*
6843 LIBS="$ac_save_LIBS"
6844
6845 fi
6846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6847   echo "$ac_t""yes" 1>&6
6848   ol_cv_lib_db=-ldb
6849 else
6850   echo "$ac_t""no" 1>&6
6851 ol_cv_lib_db=no
6852 fi
6853
6854         
6855 fi
6856
6857         LIBS="$ol_LIBS"
6858
6859 fi
6860
6861 echo "$ac_t""$ol_cv_lib_db" 1>&6
6862
6863
6864 for ac_hdr in db_185.h
6865 do
6866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6868 echo "configure:6869: checking for $ac_hdr" >&5
6869 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 #include <$ac_hdr>
6876 EOF
6877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6878 { (eval echo configure:6879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6880 if test -z "$ac_err"; then
6881   rm -rf conftest*
6882   eval "ac_cv_header_$ac_safe=yes"
6883 else
6884   echo "$ac_err" >&5
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_header_$ac_safe=no"
6889 fi
6890 rm -f conftest*
6891 fi
6892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6893   echo "$ac_t""yes" 1>&6
6894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6895   cat >> confdefs.h <<EOF
6896 #define $ac_tr_hdr 1
6897 EOF
6898  
6899 else
6900   echo "$ac_t""no" 1>&6
6901 fi
6902 done
6903
6904 if test "$ol_cv_header_db2" = yes ; then
6905         
6906         ol_cv_header_db=$ac_cv_header_db_185_h
6907 else
6908         ol_cv_header_db=$ac_cv_header_db_h
6909 fi
6910
6911
6912  
6913  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6914 echo "configure:6915: checking for Berkeley DB" >&5
6915 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6916   echo $ac_n "(cached) $ac_c" 1>&6
6917 else
6918   
6919         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6920                 ol_cv_berkeley_db=no
6921         else
6922                 ol_cv_berkeley_db=yes
6923         fi
6924
6925 fi
6926
6927 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6928  if test $ol_cv_berkeley_db = yes ; then
6929         cat >> confdefs.h <<\EOF
6930 #define HAVE_BERKELEY_DB 1
6931 EOF
6932
6933  fi
6934
6935
6936         if test $ol_cv_berkeley_db = yes ; then
6937                 ol_link_ldbm=db
6938                 ol_with_ldbm_api=db
6939
6940                 if test $ol_with_ldbm_type = hash ; then
6941                         cat >> confdefs.h <<\EOF
6942 #define LDBM_USE_DBHASH 1
6943 EOF
6944
6945                 else
6946                         cat >> confdefs.h <<\EOF
6947 #define LDBM_USE_DBBTREE 1
6948 EOF
6949
6950                 fi
6951
6952                                                 if test $ol_cv_lib_db != yes ; then
6953                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6954                 fi
6955         fi
6956 fi
6957
6958 if test $ol_with_ldbm_api = manual ; then
6959                 ol_link_ldbm=yes
6960
6961         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6962
6963         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6964 do
6965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6967 echo "configure:6968: checking for $ac_hdr" >&5
6968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 #include <$ac_hdr>
6975 EOF
6976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6977 { (eval echo configure:6978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6979 if test -z "$ac_err"; then
6980   rm -rf conftest*
6981   eval "ac_cv_header_$ac_safe=yes"
6982 else
6983   echo "$ac_err" >&5
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_header_$ac_safe=no"
6988 fi
6989 rm -f conftest*
6990 fi
6991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6992   echo "$ac_t""yes" 1>&6
6993     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6994   cat >> confdefs.h <<EOF
6995 #define $ac_tr_hdr 1
6996 EOF
6997  
6998 else
6999   echo "$ac_t""no" 1>&6
7000 fi
7001 done
7002
7003 fi
7004
7005 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7006         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7007         ol_with_ldbm_api=none
7008 fi
7009
7010 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7011         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7012 echo "configure:7013: checking for GDBM library" >&5
7013 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7014   echo $ac_n "(cached) $ac_c" 1>&6
7015 else
7016         ol_LIBS="$LIBS"
7017         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7018 echo "configure:7019: checking for gdbm_open" >&5
7019 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7020   echo $ac_n "(cached) $ac_c" 1>&6
7021 else
7022   cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 /* System header to define __stub macros and hopefully few prototypes,
7026     which can conflict with char gdbm_open(); below.  */
7027 #include <assert.h>
7028 /* Override any gcc2 internal prototype to avoid an error.  */
7029 /* We use char because int might match the return type of a gcc2
7030     builtin and then its argument prototype would still apply.  */
7031 char gdbm_open();
7032
7033 int main() {
7034
7035 /* The GNU C library defines this for functions which it implements
7036     to always fail with ENOSYS.  Some functions are actually named
7037     something starting with __ and the normal name is an alias.  */
7038 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7039 choke me
7040 #else
7041 gdbm_open();
7042 #endif
7043
7044 ; return 0; }
7045 EOF
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047   rm -rf conftest*
7048   eval "ac_cv_func_gdbm_open=yes"
7049 else
7050   echo "configure: failed program was:" >&5
7051   cat conftest.$ac_ext >&5
7052   rm -rf conftest*
7053   eval "ac_cv_func_gdbm_open=no"
7054 fi
7055 rm -f conftest*
7056 fi
7057
7058 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7059   echo "$ac_t""yes" 1>&6
7060   ol_cv_lib_gdbm=yes
7061 else
7062   echo "$ac_t""no" 1>&6
7063
7064                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7065 echo "configure:7066: checking for gdbm_open in -lgdbm" >&5
7066 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   ac_save_LIBS="$LIBS"
7071 LIBS="-lgdbm  $LIBS"
7072 cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 /* Override any gcc2 internal prototype to avoid an error.  */
7076 /* We use char because int might match the return type of a gcc2
7077     builtin and then its argument prototype would still apply.  */
7078 char gdbm_open();
7079
7080 int main() {
7081 gdbm_open()
7082 ; return 0; }
7083 EOF
7084 if { (eval echo configure:7085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7085   rm -rf conftest*
7086   eval "ac_cv_lib_$ac_lib_var=yes"
7087 else
7088   echo "configure: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   rm -rf conftest*
7091   eval "ac_cv_lib_$ac_lib_var=no"
7092 fi
7093 rm -f conftest*
7094 LIBS="$ac_save_LIBS"
7095
7096 fi
7097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7098   echo "$ac_t""yes" 1>&6
7099   ol_cv_lib_gdbm=-lgdbm
7100 else
7101   echo "$ac_t""no" 1>&6
7102 ol_cv_lib_gdbm=no
7103 fi
7104
7105         
7106 fi
7107
7108         LIBS="$ol_LIBS"
7109
7110 fi
7111
7112 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7113
7114
7115  for ac_hdr in gdbm.h
7116 do
7117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7119 echo "configure:7120: checking for $ac_hdr" >&5
7120 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7121   echo $ac_n "(cached) $ac_c" 1>&6
7122 else
7123   cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 #include <$ac_hdr>
7127 EOF
7128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7129 { (eval echo configure:7130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7131 if test -z "$ac_err"; then
7132   rm -rf conftest*
7133   eval "ac_cv_header_$ac_safe=yes"
7134 else
7135   echo "$ac_err" >&5
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138   rm -rf conftest*
7139   eval "ac_cv_header_$ac_safe=no"
7140 fi
7141 rm -f conftest*
7142 fi
7143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7144   echo "$ac_t""yes" 1>&6
7145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7146   cat >> confdefs.h <<EOF
7147 #define $ac_tr_hdr 1
7148 EOF
7149  
7150 else
7151   echo "$ac_t""no" 1>&6
7152 fi
7153 done
7154
7155  echo $ac_n "checking for db""... $ac_c" 1>&6
7156 echo "configure:7157: checking for db" >&5
7157 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7158   echo $ac_n "(cached) $ac_c" 1>&6
7159 else
7160   
7161         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7162                 ol_cv_gdbm=no
7163         else
7164                 ol_cv_gdbm=yes
7165         fi
7166
7167 fi
7168
7169 echo "$ac_t""$ol_cv_gdbm" 1>&6
7170  if test $ol_cv_gdbm = yes ; then
7171         cat >> confdefs.h <<\EOF
7172 #define HAVE_GDBM 1
7173 EOF
7174
7175  fi
7176
7177
7178         if test $ol_cv_gdbm = yes ; then
7179                 ol_link_ldbm=gdbm
7180                 ol_with_ldbm_api=gdbm
7181
7182                 if test $ol_cv_lib_gdbm != yes ; then
7183                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7184                 fi
7185         fi
7186 fi
7187
7188 if test $ol_with_ldbm_api = auto ; then
7189         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7190 elif test $ol_with_ldbm_api = ndbm ; then
7191         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7192 echo "configure:7193: checking for NDBM library" >&5
7193 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7194   echo $ac_n "(cached) $ac_c" 1>&6
7195 else
7196         ol_LIBS="$LIBS"
7197         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7198 echo "configure:7199: checking for dbm_open" >&5
7199 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7200   echo $ac_n "(cached) $ac_c" 1>&6
7201 else
7202   cat > conftest.$ac_ext <<EOF
7203 #line 7204 "configure"
7204 #include "confdefs.h"
7205 /* System header to define __stub macros and hopefully few prototypes,
7206     which can conflict with char dbm_open(); below.  */
7207 #include <assert.h>
7208 /* Override any gcc2 internal prototype to avoid an error.  */
7209 /* We use char because int might match the return type of a gcc2
7210     builtin and then its argument prototype would still apply.  */
7211 char dbm_open();
7212
7213 int main() {
7214
7215 /* The GNU C library defines this for functions which it implements
7216     to always fail with ENOSYS.  Some functions are actually named
7217     something starting with __ and the normal name is an alias.  */
7218 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7219 choke me
7220 #else
7221 dbm_open();
7222 #endif
7223
7224 ; return 0; }
7225 EOF
7226 if { (eval echo configure:7227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7227   rm -rf conftest*
7228   eval "ac_cv_func_dbm_open=yes"
7229 else
7230   echo "configure: failed program was:" >&5
7231   cat conftest.$ac_ext >&5
7232   rm -rf conftest*
7233   eval "ac_cv_func_dbm_open=no"
7234 fi
7235 rm -f conftest*
7236 fi
7237
7238 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7239   echo "$ac_t""yes" 1>&6
7240   ol_cv_lib_ndbm=yes
7241 else
7242   echo "$ac_t""no" 1>&6
7243
7244                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7245 echo "configure:7246: checking for dbm_open in -lndbm" >&5
7246 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7247 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7248   echo $ac_n "(cached) $ac_c" 1>&6
7249 else
7250   ac_save_LIBS="$LIBS"
7251 LIBS="-lndbm  $LIBS"
7252 cat > conftest.$ac_ext <<EOF
7253 #line 7254 "configure"
7254 #include "confdefs.h"
7255 /* Override any gcc2 internal prototype to avoid an error.  */
7256 /* We use char because int might match the return type of a gcc2
7257     builtin and then its argument prototype would still apply.  */
7258 char dbm_open();
7259
7260 int main() {
7261 dbm_open()
7262 ; return 0; }
7263 EOF
7264 if { (eval echo configure:7265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7265   rm -rf conftest*
7266   eval "ac_cv_lib_$ac_lib_var=yes"
7267 else
7268   echo "configure: failed program was:" >&5
7269   cat conftest.$ac_ext >&5
7270   rm -rf conftest*
7271   eval "ac_cv_lib_$ac_lib_var=no"
7272 fi
7273 rm -f conftest*
7274 LIBS="$ac_save_LIBS"
7275
7276 fi
7277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7278   echo "$ac_t""yes" 1>&6
7279   ol_cv_lib_ndbm=-lndbm
7280 else
7281   echo "$ac_t""no" 1>&6
7282
7283                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7284 echo "configure:7285: checking for dbm_open in -ldbm" >&5
7285 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7286 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7287   echo $ac_n "(cached) $ac_c" 1>&6
7288 else
7289   ac_save_LIBS="$LIBS"
7290 LIBS="-ldbm  $LIBS"
7291 cat > conftest.$ac_ext <<EOF
7292 #line 7293 "configure"
7293 #include "confdefs.h"
7294 /* Override any gcc2 internal prototype to avoid an error.  */
7295 /* We use char because int might match the return type of a gcc2
7296     builtin and then its argument prototype would still apply.  */
7297 char dbm_open();
7298
7299 int main() {
7300 dbm_open()
7301 ; return 0; }
7302 EOF
7303 if { (eval echo configure:7304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7304   rm -rf conftest*
7305   eval "ac_cv_lib_$ac_lib_var=yes"
7306 else
7307   echo "configure: failed program was:" >&5
7308   cat conftest.$ac_ext >&5
7309   rm -rf conftest*
7310   eval "ac_cv_lib_$ac_lib_var=no"
7311 fi
7312 rm -f conftest*
7313 LIBS="$ac_save_LIBS"
7314
7315 fi
7316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7317   echo "$ac_t""yes" 1>&6
7318   ol_cv_lib_ndbm=-ldbm
7319 else
7320   echo "$ac_t""no" 1>&6
7321 ol_cv_lib_ndbm=no
7322 fi
7323                 
7324 fi
7325
7326         
7327 fi
7328
7329         LIBS="$ol_LIBS"
7330
7331 fi
7332
7333 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7334
7335
7336  for ac_hdr in ndbm.h
7337 do
7338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7340 echo "configure:7341: checking for $ac_hdr" >&5
7341 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7342   echo $ac_n "(cached) $ac_c" 1>&6
7343 else
7344   cat > conftest.$ac_ext <<EOF
7345 #line 7346 "configure"
7346 #include "confdefs.h"
7347 #include <$ac_hdr>
7348 EOF
7349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7350 { (eval echo configure:7351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7352 if test -z "$ac_err"; then
7353   rm -rf conftest*
7354   eval "ac_cv_header_$ac_safe=yes"
7355 else
7356   echo "$ac_err" >&5
7357   echo "configure: failed program was:" >&5
7358   cat conftest.$ac_ext >&5
7359   rm -rf conftest*
7360   eval "ac_cv_header_$ac_safe=no"
7361 fi
7362 rm -f conftest*
7363 fi
7364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7365   echo "$ac_t""yes" 1>&6
7366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7367   cat >> confdefs.h <<EOF
7368 #define $ac_tr_hdr 1
7369 EOF
7370  
7371 else
7372   echo "$ac_t""no" 1>&6
7373 fi
7374 done
7375
7376  echo $ac_n "checking for db""... $ac_c" 1>&6
7377 echo "configure:7378: checking for db" >&5
7378 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
7379   echo $ac_n "(cached) $ac_c" 1>&6
7380 else
7381   
7382         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
7383                 ol_cv_ndbm=no
7384         else
7385                 ol_cv_ndbm=yes
7386         fi
7387
7388 fi
7389
7390 echo "$ac_t""$ol_cv_ndbm" 1>&6
7391  if test $ol_cv_ndbm = yes ; then
7392         cat >> confdefs.h <<\EOF
7393 #define HAVE_NDBM 1
7394 EOF
7395
7396  fi
7397
7398
7399         if test $ol_cv_ndbm = yes ; then
7400                 ol_link_ldbm=ndbm
7401                 ol_with_ldbm_api=ndbm
7402
7403                 if test $ol_cv_lib_ndbm != yes ; then
7404                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
7405                 fi
7406         fi
7407 fi
7408
7409 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
7410         echo "configure: warning: could not find suitable LDBM backend" 1>&2
7411         if test $ol_enable_ldbm = yes ; then
7412                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
7413         fi
7414
7415         echo "configure: warning: disabling LDBM" 1>&2
7416         ol_enable_ldbm=no
7417 fi
7418
7419 if test $ol_enable_wrappers != no ; then
7420         for ac_hdr in tcpd.h
7421 do
7422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7424 echo "configure:7425: checking for $ac_hdr" >&5
7425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7426   echo $ac_n "(cached) $ac_c" 1>&6
7427 else
7428   cat > conftest.$ac_ext <<EOF
7429 #line 7430 "configure"
7430 #include "confdefs.h"
7431 #include <$ac_hdr>
7432 EOF
7433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7434 { (eval echo configure:7435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7436 if test -z "$ac_err"; then
7437   rm -rf conftest*
7438   eval "ac_cv_header_$ac_safe=yes"
7439 else
7440   echo "$ac_err" >&5
7441   echo "configure: failed program was:" >&5
7442   cat conftest.$ac_ext >&5
7443   rm -rf conftest*
7444   eval "ac_cv_header_$ac_safe=no"
7445 fi
7446 rm -f conftest*
7447 fi
7448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7449   echo "$ac_t""yes" 1>&6
7450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7451   cat >> confdefs.h <<EOF
7452 #define $ac_tr_hdr 1
7453 EOF
7454  
7455 else
7456   echo "$ac_t""no" 1>&6
7457 fi
7458 done
7459
7460
7461         if test $ac_cv_header_tcpd_h != yes ; then
7462                 have_wrappers=no
7463         else
7464                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
7465 echo "configure:7466: checking for main in -lwrap" >&5
7466 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
7467 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7468   echo $ac_n "(cached) $ac_c" 1>&6
7469 else
7470   ac_save_LIBS="$LIBS"
7471 LIBS="-lwrap  $LIBS"
7472 cat > conftest.$ac_ext <<EOF
7473 #line 7474 "configure"
7474 #include "confdefs.h"
7475
7476 int main() {
7477 main()
7478 ; return 0; }
7479 EOF
7480 if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7481   rm -rf conftest*
7482   eval "ac_cv_lib_$ac_lib_var=yes"
7483 else
7484   echo "configure: failed program was:" >&5
7485   cat conftest.$ac_ext >&5
7486   rm -rf conftest*
7487   eval "ac_cv_lib_$ac_lib_var=no"
7488 fi
7489 rm -f conftest*
7490 LIBS="$ac_save_LIBS"
7491
7492 fi
7493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7494   echo "$ac_t""yes" 1>&6
7495   have_wrappers=yes
7496 else
7497   echo "$ac_t""no" 1>&6
7498 have_wrappers=no
7499 fi
7500
7501         fi
7502
7503         if test $have_wrappers = yes ; then
7504                 cat >> confdefs.h <<\EOF
7505 #define HAVE_TCPD 1
7506 EOF
7507
7508                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
7509         else
7510                 echo "configure: warning: could not find -lwrap" 1>&2
7511                 if test $ol_enable_wrappers = yes ; then
7512                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
7513                 fi
7514
7515                 echo "configure: warning: disabling wrappers support" 1>&2
7516                 ol_enable_wrappers=no
7517         fi
7518 fi
7519
7520 if test $ol_enable_syslog != no ; then
7521         echo $ac_n "checking for openlog""... $ac_c" 1>&6
7522 echo "configure:7523: checking for openlog" >&5
7523 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
7524   echo $ac_n "(cached) $ac_c" 1>&6
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* System header to define __stub macros and hopefully few prototypes,
7530     which can conflict with char openlog(); below.  */
7531 #include <assert.h>
7532 /* Override any gcc2 internal prototype to avoid an error.  */
7533 /* We use char because int might match the return type of a gcc2
7534     builtin and then its argument prototype would still apply.  */
7535 char openlog();
7536
7537 int main() {
7538
7539 /* The GNU C library defines this for functions which it implements
7540     to always fail with ENOSYS.  Some functions are actually named
7541     something starting with __ and the normal name is an alias.  */
7542 #if defined (__stub_openlog) || defined (__stub___openlog)
7543 choke me
7544 #else
7545 openlog();
7546 #endif
7547
7548 ; return 0; }
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7551   rm -rf conftest*
7552   eval "ac_cv_func_openlog=yes"
7553 else
7554   echo "configure: failed program was:" >&5
7555   cat conftest.$ac_ext >&5
7556   rm -rf conftest*
7557   eval "ac_cv_func_openlog=no"
7558 fi
7559 rm -f conftest*
7560 fi
7561
7562 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
7563   echo "$ac_t""yes" 1>&6
7564   :
7565 else
7566   echo "$ac_t""no" 1>&6
7567 fi
7568
7569         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
7570                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
7571         fi
7572         ol_enable_syslog=$ac_cv_func_openlog
7573 fi
7574
7575 if test $ol_enable_dmalloc != no ; then
7576         for ac_hdr in dmalloc.h
7577 do
7578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7580 echo "configure:7581: checking for $ac_hdr" >&5
7581 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7582   echo $ac_n "(cached) $ac_c" 1>&6
7583 else
7584   cat > conftest.$ac_ext <<EOF
7585 #line 7586 "configure"
7586 #include "confdefs.h"
7587 #include <$ac_hdr>
7588 EOF
7589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7590 { (eval echo configure:7591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7592 if test -z "$ac_err"; then
7593   rm -rf conftest*
7594   eval "ac_cv_header_$ac_safe=yes"
7595 else
7596   echo "$ac_err" >&5
7597   echo "configure: failed program was:" >&5
7598   cat conftest.$ac_ext >&5
7599   rm -rf conftest*
7600   eval "ac_cv_header_$ac_safe=no"
7601 fi
7602 rm -f conftest*
7603 fi
7604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7605   echo "$ac_t""yes" 1>&6
7606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7607   cat >> confdefs.h <<EOF
7608 #define $ac_tr_hdr 1
7609 EOF
7610  
7611 else
7612   echo "$ac_t""no" 1>&6
7613 fi
7614 done
7615
7616         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7617 echo "configure:7618: checking for dmalloc_shutdown in -ldmalloc" >&5
7618 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7620   echo $ac_n "(cached) $ac_c" 1>&6
7621 else
7622   ac_save_LIBS="$LIBS"
7623 LIBS="-ldmalloc  $LIBS"
7624 cat > conftest.$ac_ext <<EOF
7625 #line 7626 "configure"
7626 #include "confdefs.h"
7627 /* Override any gcc2 internal prototype to avoid an error.  */
7628 /* We use char because int might match the return type of a gcc2
7629     builtin and then its argument prototype would still apply.  */
7630 char dmalloc_shutdown();
7631
7632 int main() {
7633 dmalloc_shutdown()
7634 ; return 0; }
7635 EOF
7636 if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7637   rm -rf conftest*
7638   eval "ac_cv_lib_$ac_lib_var=yes"
7639 else
7640   echo "configure: failed program was:" >&5
7641   cat conftest.$ac_ext >&5
7642   rm -rf conftest*
7643   eval "ac_cv_lib_$ac_lib_var=no"
7644 fi
7645 rm -f conftest*
7646 LIBS="$ac_save_LIBS"
7647
7648 fi
7649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7650   echo "$ac_t""yes" 1>&6
7651     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7652     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7653   cat >> confdefs.h <<EOF
7654 #define $ac_tr_lib 1
7655 EOF
7656
7657   LIBS="-ldmalloc $LIBS"
7658
7659 else
7660   echo "$ac_t""no" 1>&6
7661 fi
7662
7663 fi
7664
7665 if test $ol_enable_tcl != no ; then
7666         for ac_hdr in tcl.h
7667 do
7668 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7669 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7670 echo "configure:7671: checking for $ac_hdr" >&5
7671 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7672   echo $ac_n "(cached) $ac_c" 1>&6
7673 else
7674   cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 #include <$ac_hdr>
7678 EOF
7679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7680 { (eval echo configure:7681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7682 if test -z "$ac_err"; then
7683   rm -rf conftest*
7684   eval "ac_cv_header_$ac_safe=yes"
7685 else
7686   echo "$ac_err" >&5
7687   echo "configure: failed program was:" >&5
7688   cat conftest.$ac_ext >&5
7689   rm -rf conftest*
7690   eval "ac_cv_header_$ac_safe=no"
7691 fi
7692 rm -f conftest*
7693 fi
7694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7695   echo "$ac_t""yes" 1>&6
7696     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7697   cat >> confdefs.h <<EOF
7698 #define $ac_tr_hdr 1
7699 EOF
7700  
7701 else
7702   echo "$ac_t""no" 1>&6
7703 fi
7704 done
7705
7706
7707         if test $ac_cv_header_tcl_h != yes ; then
7708                 have_tcl=no
7709         else
7710                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
7711 echo "configure:7712: checking for main in -ltcl" >&5
7712 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
7713 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7714   echo $ac_n "(cached) $ac_c" 1>&6
7715 else
7716   ac_save_LIBS="$LIBS"
7717 LIBS="-ltcl  $LIBS"
7718 cat > conftest.$ac_ext <<EOF
7719 #line 7720 "configure"
7720 #include "confdefs.h"
7721
7722 int main() {
7723 main()
7724 ; return 0; }
7725 EOF
7726 if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7727   rm -rf conftest*
7728   eval "ac_cv_lib_$ac_lib_var=yes"
7729 else
7730   echo "configure: failed program was:" >&5
7731   cat conftest.$ac_ext >&5
7732   rm -rf conftest*
7733   eval "ac_cv_lib_$ac_lib_var=no"
7734 fi
7735 rm -f conftest*
7736 LIBS="$ac_save_LIBS"
7737
7738 fi
7739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7740   echo "$ac_t""yes" 1>&6
7741   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
7742 else
7743   echo "$ac_t""no" 1>&6
7744 have_tcl=no
7745 fi
7746
7747
7748                 if test $have_tcl != yes; then
7749                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
7750 echo "configure:7751: checking for main in -ltcl7.6" >&5
7751 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
7752 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7753   echo $ac_n "(cached) $ac_c" 1>&6
7754 else
7755   ac_save_LIBS="$LIBS"
7756 LIBS="-ltcl7.6  $LIBS"
7757 cat > conftest.$ac_ext <<EOF
7758 #line 7759 "configure"
7759 #include "confdefs.h"
7760
7761 int main() {
7762 main()
7763 ; return 0; }
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7766   rm -rf conftest*
7767   eval "ac_cv_lib_$ac_lib_var=yes"
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -rf conftest*
7772   eval "ac_cv_lib_$ac_lib_var=no"
7773 fi
7774 rm -f conftest*
7775 LIBS="$ac_save_LIBS"
7776
7777 fi
7778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7779   echo "$ac_t""yes" 1>&6
7780   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
7781 else
7782   echo "$ac_t""no" 1>&6
7783 have_tcl=no
7784 fi
7785
7786                 fi
7787
7788                 if test $have_tcl != yes; then
7789                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
7790 echo "configure:7791: checking for main in -ltcl8.0" >&5
7791 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
7792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7793   echo $ac_n "(cached) $ac_c" 1>&6
7794 else
7795   ac_save_LIBS="$LIBS"
7796 LIBS="-ltcl8.0  $LIBS"
7797 cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800
7801 int main() {
7802 main()
7803 ; return 0; }
7804 EOF
7805 if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806   rm -rf conftest*
7807   eval "ac_cv_lib_$ac_lib_var=yes"
7808 else
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=no"
7813 fi
7814 rm -f conftest*
7815 LIBS="$ac_save_LIBS"
7816
7817 fi
7818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7819   echo "$ac_t""yes" 1>&6
7820   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
7821 else
7822   echo "$ac_t""no" 1>&6
7823 have_tcl=no
7824 fi
7825
7826                 fi
7827         fi
7828
7829         if test $have_tcl != yes ; then
7830                 echo "configure: warning: could not find -ltcl" 1>&2
7831                 if test $ol_enable_tcl = yes ; then
7832                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
7833                 fi
7834
7835                 ol_enable_tcl=no
7836         fi
7837 fi
7838
7839 # ud needs termcap (should insert check here)
7840 ol_link_termcap=no
7841 for ac_hdr in termcap.h ncurses.h
7842 do
7843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7845 echo "configure:7846: checking for $ac_hdr" >&5
7846 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7847   echo $ac_n "(cached) $ac_c" 1>&6
7848 else
7849   cat > conftest.$ac_ext <<EOF
7850 #line 7851 "configure"
7851 #include "confdefs.h"
7852 #include <$ac_hdr>
7853 EOF
7854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7855 { (eval echo configure:7856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7857 if test -z "$ac_err"; then
7858   rm -rf conftest*
7859   eval "ac_cv_header_$ac_safe=yes"
7860 else
7861   echo "$ac_err" >&5
7862   echo "configure: failed program was:" >&5
7863   cat conftest.$ac_ext >&5
7864   rm -rf conftest*
7865   eval "ac_cv_header_$ac_safe=no"
7866 fi
7867 rm -f conftest*
7868 fi
7869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7870   echo "$ac_t""yes" 1>&6
7871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7872   cat >> confdefs.h <<EOF
7873 #define $ac_tr_hdr 1
7874 EOF
7875  
7876 else
7877   echo "$ac_t""no" 1>&6
7878 fi
7879 done
7880
7881
7882 if test $ol_link_termcap = no ; then
7883         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
7884 echo "configure:7885: checking for tputs in -ltermcap" >&5
7885 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
7886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7887   echo $ac_n "(cached) $ac_c" 1>&6
7888 else
7889   ac_save_LIBS="$LIBS"
7890 LIBS="-ltermcap  $LIBS"
7891 cat > conftest.$ac_ext <<EOF
7892 #line 7893 "configure"
7893 #include "confdefs.h"
7894 /* Override any gcc2 internal prototype to avoid an error.  */
7895 /* We use char because int might match the return type of a gcc2
7896     builtin and then its argument prototype would still apply.  */
7897 char tputs();
7898
7899 int main() {
7900 tputs()
7901 ; return 0; }
7902 EOF
7903 if { (eval echo configure:7904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7904   rm -rf conftest*
7905   eval "ac_cv_lib_$ac_lib_var=yes"
7906 else
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   eval "ac_cv_lib_$ac_lib_var=no"
7911 fi
7912 rm -f conftest*
7913 LIBS="$ac_save_LIBS"
7914
7915 fi
7916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7917   echo "$ac_t""yes" 1>&6
7918   have_termcap=yes
7919 else
7920   echo "$ac_t""no" 1>&6
7921 have_termcap=no
7922 fi
7923
7924         if test $have_termcap = yes ; then
7925                 cat >> confdefs.h <<\EOF
7926 #define HAVE_TERMCAP 1
7927 EOF
7928
7929                 ol_link_termcap=yes
7930                 TERMCAP_LIBS=-ltermcap
7931         fi
7932 fi
7933
7934 if test $ol_link_termcap = no ; then
7935         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
7936 echo "configure:7937: checking for initscr in -lncurses" >&5
7937 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
7938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   ac_save_LIBS="$LIBS"
7942 LIBS="-lncurses  $LIBS"
7943 cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946 /* Override any gcc2 internal prototype to avoid an error.  */
7947 /* We use char because int might match the return type of a gcc2
7948     builtin and then its argument prototype would still apply.  */
7949 char initscr();
7950
7951 int main() {
7952 initscr()
7953 ; return 0; }
7954 EOF
7955 if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7956   rm -rf conftest*
7957   eval "ac_cv_lib_$ac_lib_var=yes"
7958 else
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=no"
7963 fi
7964 rm -f conftest*
7965 LIBS="$ac_save_LIBS"
7966
7967 fi
7968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7969   echo "$ac_t""yes" 1>&6
7970   have_ncurses=yes
7971 else
7972   echo "$ac_t""no" 1>&6
7973 have_ncurses=no
7974 fi
7975
7976         if test $have_ncurses = yes ; then
7977                 cat >> confdefs.h <<\EOF
7978 #define HAVE_NCURSES 1
7979 EOF
7980
7981                 ol_link_termcap=yes
7982                 TERMCAP_LIBS=-lncurses
7983         fi
7984 fi
7985
7986 if test $ol_link_termcap = no ; then
7987         cat >> confdefs.h <<\EOF
7988 #define NO_TERMCAP 1
7989 EOF
7990
7991         TERMCAP_LIBS=
7992 fi
7993
7994 ol_link_readline=no
7995 if test $ol_with_readline != no ; then
7996         for ac_hdr in readline/readline.h readline/history.h
7997 do
7998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7999 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8000 echo "configure:8001: checking for $ac_hdr" >&5
8001 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 #include <$ac_hdr>
8008 EOF
8009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8010 { (eval echo configure:8011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8012 if test -z "$ac_err"; then
8013   rm -rf conftest*
8014   eval "ac_cv_header_$ac_safe=yes"
8015 else
8016   echo "$ac_err" >&5
8017   echo "configure: failed program was:" >&5
8018   cat conftest.$ac_ext >&5
8019   rm -rf conftest*
8020   eval "ac_cv_header_$ac_safe=no"
8021 fi
8022 rm -f conftest*
8023 fi
8024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8025   echo "$ac_t""yes" 1>&6
8026     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8027   cat >> confdefs.h <<EOF
8028 #define $ac_tr_hdr 1
8029 EOF
8030  
8031 else
8032   echo "$ac_t""no" 1>&6
8033 fi
8034 done
8035
8036
8037         if test $ac_cv_header_readline_readline_h = yes ; then
8038                 save_LIBS="$LIBS"
8039                 LIBS="$TERMCAP_LIBS $LIBS"
8040                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8041 echo "configure:8042: checking for readline in -lreadline" >&5
8042 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   ac_save_LIBS="$LIBS"
8047 LIBS="-lreadline  $LIBS"
8048 cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051 /* Override any gcc2 internal prototype to avoid an error.  */
8052 /* We use char because int might match the return type of a gcc2
8053     builtin and then its argument prototype would still apply.  */
8054 char readline();
8055
8056 int main() {
8057 readline()
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061   rm -rf conftest*
8062   eval "ac_cv_lib_$ac_lib_var=yes"
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   eval "ac_cv_lib_$ac_lib_var=no"
8068 fi
8069 rm -f conftest*
8070 LIBS="$ac_save_LIBS"
8071
8072 fi
8073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8074   echo "$ac_t""yes" 1>&6
8075   have_readline=yes
8076 else
8077   echo "$ac_t""no" 1>&6
8078 have_readline=no
8079 fi
8080
8081                 LIBS="$save_LIBS"
8082                         
8083                 if test $have_readline = yes ; then
8084                         ol_with_readline=found
8085                         ol_link_readline=yes
8086
8087                         READLINE_LIBS="-lreadline"
8088                 fi
8089         fi
8090 fi
8091
8092 if test $ol_link_readline = yes ; then
8093         cat >> confdefs.h <<\EOF
8094 #define HAVE_READLINE 1
8095 EOF
8096
8097 fi
8098
8099
8100 # FreeBSD (and others) have crypt(3) in -lcrypt
8101 if test $ol_enable_crypt != no ; then
8102         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8103 echo "configure:8104: checking for crypt" >&5
8104 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8105   echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107   cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 /* System header to define __stub macros and hopefully few prototypes,
8111     which can conflict with char crypt(); below.  */
8112 #include <assert.h>
8113 /* Override any gcc2 internal prototype to avoid an error.  */
8114 /* We use char because int might match the return type of a gcc2
8115     builtin and then its argument prototype would still apply.  */
8116 char crypt();
8117
8118 int main() {
8119
8120 /* The GNU C library defines this for functions which it implements
8121     to always fail with ENOSYS.  Some functions are actually named
8122     something starting with __ and the normal name is an alias.  */
8123 #if defined (__stub_crypt) || defined (__stub___crypt)
8124 choke me
8125 #else
8126 crypt();
8127 #endif
8128
8129 ; return 0; }
8130 EOF
8131 if { (eval echo configure:8132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8132   rm -rf conftest*
8133   eval "ac_cv_func_crypt=yes"
8134 else
8135   echo "configure: failed program was:" >&5
8136   cat conftest.$ac_ext >&5
8137   rm -rf conftest*
8138   eval "ac_cv_func_crypt=no"
8139 fi
8140 rm -f conftest*
8141 fi
8142
8143 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8144   echo "$ac_t""yes" 1>&6
8145   have_crypt=yes
8146 else
8147   echo "$ac_t""no" 1>&6
8148
8149                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8150 echo "configure:8151: checking for crypt in -lcrypt" >&5
8151 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8152 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8153   echo $ac_n "(cached) $ac_c" 1>&6
8154 else
8155   ac_save_LIBS="$LIBS"
8156 LIBS="-lcrypt  $LIBS"
8157 cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 /* Override any gcc2 internal prototype to avoid an error.  */
8161 /* We use char because int might match the return type of a gcc2
8162     builtin and then its argument prototype would still apply.  */
8163 char crypt();
8164
8165 int main() {
8166 crypt()
8167 ; return 0; }
8168 EOF
8169 if { (eval echo configure:8170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8170   rm -rf conftest*
8171   eval "ac_cv_lib_$ac_lib_var=yes"
8172 else
8173   echo "configure: failed program was:" >&5
8174   cat conftest.$ac_ext >&5
8175   rm -rf conftest*
8176   eval "ac_cv_lib_$ac_lib_var=no"
8177 fi
8178 rm -f conftest*
8179 LIBS="$ac_save_LIBS"
8180
8181 fi
8182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8183   echo "$ac_t""yes" 1>&6
8184   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8185                         have_crypt=yes
8186 else
8187   echo "$ac_t""no" 1>&6
8188 have_crypt=no
8189 fi
8190
8191 fi
8192
8193
8194         if test $have_crypt = yes ; then
8195                 cat >> confdefs.h <<\EOF
8196 #define HAVE_CRYPT 1
8197 EOF
8198
8199         else
8200                 echo "configure: warning: could not find crypt" 1>&2
8201                 if test $ol_enable_crypt = yes ; then
8202                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8203                 fi
8204
8205                 echo "configure: warning: disabling crypt support" 1>&2
8206                 ol_enable_crypt=no
8207         fi
8208 fi
8209
8210 # FreeBSD (and others) have setproctitle(3) in -lutil
8211 if test $ol_enable_proctitle != no ; then
8212         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8213 echo "configure:8214: checking for setproctitle" >&5
8214 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8215   echo $ac_n "(cached) $ac_c" 1>&6
8216 else
8217   cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* System header to define __stub macros and hopefully few prototypes,
8221     which can conflict with char setproctitle(); below.  */
8222 #include <assert.h>
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 /* We use char because int might match the return type of a gcc2
8225     builtin and then its argument prototype would still apply.  */
8226 char setproctitle();
8227
8228 int main() {
8229
8230 /* The GNU C library defines this for functions which it implements
8231     to always fail with ENOSYS.  Some functions are actually named
8232     something starting with __ and the normal name is an alias.  */
8233 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8234 choke me
8235 #else
8236 setproctitle();
8237 #endif
8238
8239 ; return 0; }
8240 EOF
8241 if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8242   rm -rf conftest*
8243   eval "ac_cv_func_setproctitle=yes"
8244 else
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -rf conftest*
8248   eval "ac_cv_func_setproctitle=no"
8249 fi
8250 rm -f conftest*
8251 fi
8252
8253 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255   have_setproctitle=yes
8256 else
8257   echo "$ac_t""no" 1>&6
8258
8259                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8260 echo "configure:8261: checking for setproctitle in -lutil" >&5
8261 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8262 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8263   echo $ac_n "(cached) $ac_c" 1>&6
8264 else
8265   ac_save_LIBS="$LIBS"
8266 LIBS="-lutil  $LIBS"
8267 cat > conftest.$ac_ext <<EOF
8268 #line 8269 "configure"
8269 #include "confdefs.h"
8270 /* Override any gcc2 internal prototype to avoid an error.  */
8271 /* We use char because int might match the return type of a gcc2
8272     builtin and then its argument prototype would still apply.  */
8273 char setproctitle();
8274
8275 int main() {
8276 setproctitle()
8277 ; return 0; }
8278 EOF
8279 if { (eval echo configure:8280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8280   rm -rf conftest*
8281   eval "ac_cv_lib_$ac_lib_var=yes"
8282 else
8283   echo "configure: failed program was:" >&5
8284   cat conftest.$ac_ext >&5
8285   rm -rf conftest*
8286   eval "ac_cv_lib_$ac_lib_var=no"
8287 fi
8288 rm -f conftest*
8289 LIBS="$ac_save_LIBS"
8290
8291 fi
8292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8293   echo "$ac_t""yes" 1>&6
8294   have_setproctitle=yes
8295                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8296 else
8297   echo "$ac_t""no" 1>&6
8298 have_setproctitle=no
8299                         LIBOBJS="$LIBOBJS setproctitle.o"
8300 fi
8301
8302 fi
8303
8304
8305         if test $have_setproctitle = yes ; then
8306                 cat >> confdefs.h <<\EOF
8307 #define HAVE_SETPROCTITLE 1
8308 EOF
8309
8310         fi
8311 fi
8312
8313 # test for EBCDIC
8314 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8315 echo "configure:8316: checking for EBCDIC" >&5
8316 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
8317   echo $ac_n "(cached) $ac_c" 1>&6
8318 else
8319   
8320         cat > conftest.$ac_ext <<EOF
8321 #line 8322 "configure"
8322 #include "confdefs.h"
8323
8324 #if !('M' == 0xd4)
8325 #include <__ASCII__/generate_error.h>
8326 #endif
8327
8328 EOF
8329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8330 { (eval echo configure:8331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8332 if test -z "$ac_err"; then
8333   rm -rf conftest*
8334   ol_cv_cpp_ebcdic=yes
8335 else
8336   echo "$ac_err" >&5
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   ol_cv_cpp_ebcdic=no
8341 fi
8342 rm -f conftest*
8343 fi
8344
8345 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8346 if test $ol_cv_cpp_ebcdic = yes ; then
8347         cat >> confdefs.h <<\EOF
8348 #define HAVE_EBCDIC 1
8349 EOF
8350
8351 fi
8352
8353 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8354 echo "configure:8355: checking for ANSI C header files" >&5
8355 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
8356   echo $ac_n "(cached) $ac_c" 1>&6
8357 else
8358   cat > conftest.$ac_ext <<EOF
8359 #line 8360 "configure"
8360 #include "confdefs.h"
8361 #include <stdlib.h>
8362 #include <stdarg.h>
8363 #include <string.h>
8364 #include <float.h>
8365 EOF
8366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8367 { (eval echo configure:8368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8369 if test -z "$ac_err"; then
8370   rm -rf conftest*
8371   ol_cv_header_stdc=yes
8372 else
8373   echo "$ac_err" >&5
8374   echo "configure: failed program was:" >&5
8375   cat conftest.$ac_ext >&5
8376   rm -rf conftest*
8377   ol_cv_header_stdc=no
8378 fi
8379 rm -f conftest*
8380
8381 if test $ol_cv_header_stdc = yes; then
8382   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 #include <string.h>
8387 EOF
8388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8389   egrep "memchr" >/dev/null 2>&1; then
8390   :
8391 else
8392   rm -rf conftest*
8393   ol_cv_header_stdc=no
8394 fi
8395 rm -f conftest*
8396
8397 fi
8398
8399 if test $ol_cv_header_stdc = yes; then
8400   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8401 cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404 #include <stdlib.h>
8405 EOF
8406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8407   egrep "free" >/dev/null 2>&1; then
8408   :
8409 else
8410   rm -rf conftest*
8411   ol_cv_header_stdc=no
8412 fi
8413 rm -f conftest*
8414
8415 fi
8416
8417 if test $ol_cv_header_stdc = yes; then
8418   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8419 if test "$cross_compiling" = yes; then
8420   :
8421 else
8422   cat > conftest.$ac_ext <<EOF
8423 #line 8424 "configure"
8424 #include "confdefs.h"
8425 #include <ctype.h>
8426 #ifndef HAVE_EBCDIC
8427 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8428 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8429 #else
8430 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8431                 || ('j' <= (c) && (c) <= 'r') \
8432                 || ('s' <= (c) && (c) <= 'z'))
8433 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8434 #endif
8435 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8436 int main () { int i; for (i = 0; i < 256; i++)
8437 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8438 exit (0); }
8439
8440 EOF
8441 if { (eval echo configure:8442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8442 then
8443   :
8444 else
8445   echo "configure: failed program was:" >&5
8446   cat conftest.$ac_ext >&5
8447   rm -fr conftest*
8448   ol_cv_header_stdc=no
8449 fi
8450 rm -fr conftest*
8451 fi
8452
8453 fi
8454 fi
8455
8456 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8457 if test $ol_cv_header_stdc = yes; then
8458   cat >> confdefs.h <<\EOF
8459 #define STDC_HEADERS 1
8460 EOF
8461
8462 fi
8463 ac_cv_header_stdc=disable
8464
8465
8466 if test $ol_cv_header_stdc != yes; then
8467         echo "configure: warning: could not Standard C compliant headers" 1>&2
8468 fi
8469
8470 ac_header_dirent=no
8471 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8472 do
8473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8474 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8475 echo "configure:8476: checking for $ac_hdr that defines DIR" >&5
8476 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
8477   echo $ac_n "(cached) $ac_c" 1>&6
8478 else
8479   cat > conftest.$ac_ext <<EOF
8480 #line 8481 "configure"
8481 #include "confdefs.h"
8482 #include <sys/types.h>
8483 #include <$ac_hdr>
8484 int main() {
8485 DIR *dirp = 0;
8486 ; return 0; }
8487 EOF
8488 if { (eval echo configure:8489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8489   rm -rf conftest*
8490   eval "ac_cv_header_dirent_$ac_safe=yes"
8491 else
8492   echo "configure: failed program was:" >&5
8493   cat conftest.$ac_ext >&5
8494   rm -rf conftest*
8495   eval "ac_cv_header_dirent_$ac_safe=no"
8496 fi
8497 rm -f conftest*
8498 fi
8499 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8500   echo "$ac_t""yes" 1>&6
8501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8502   cat >> confdefs.h <<EOF
8503 #define $ac_tr_hdr 1
8504 EOF
8505  ac_header_dirent=$ac_hdr; break
8506 else
8507   echo "$ac_t""no" 1>&6
8508 fi
8509 done
8510 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8511 if test $ac_header_dirent = dirent.h; then
8512 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8513 echo "configure:8514: checking for opendir in -ldir" >&5
8514 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
8515 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8516   echo $ac_n "(cached) $ac_c" 1>&6
8517 else
8518   ac_save_LIBS="$LIBS"
8519 LIBS="-ldir  $LIBS"
8520 cat > conftest.$ac_ext <<EOF
8521 #line 8522 "configure"
8522 #include "confdefs.h"
8523 /* Override any gcc2 internal prototype to avoid an error.  */
8524 /* We use char because int might match the return type of a gcc2
8525     builtin and then its argument prototype would still apply.  */
8526 char opendir();
8527
8528 int main() {
8529 opendir()
8530 ; return 0; }
8531 EOF
8532 if { (eval echo configure:8533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8533   rm -rf conftest*
8534   eval "ac_cv_lib_$ac_lib_var=yes"
8535 else
8536   echo "configure: failed program was:" >&5
8537   cat conftest.$ac_ext >&5
8538   rm -rf conftest*
8539   eval "ac_cv_lib_$ac_lib_var=no"
8540 fi
8541 rm -f conftest*
8542 LIBS="$ac_save_LIBS"
8543
8544 fi
8545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8546   echo "$ac_t""yes" 1>&6
8547   LIBS="$LIBS -ldir"
8548 else
8549   echo "$ac_t""no" 1>&6
8550 fi
8551
8552 else
8553 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8554 echo "configure:8555: checking for opendir in -lx" >&5
8555 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
8556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8557   echo $ac_n "(cached) $ac_c" 1>&6
8558 else
8559   ac_save_LIBS="$LIBS"
8560 LIBS="-lx  $LIBS"
8561 cat > conftest.$ac_ext <<EOF
8562 #line 8563 "configure"
8563 #include "confdefs.h"
8564 /* Override any gcc2 internal prototype to avoid an error.  */
8565 /* We use char because int might match the return type of a gcc2
8566     builtin and then its argument prototype would still apply.  */
8567 char opendir();
8568
8569 int main() {
8570 opendir()
8571 ; return 0; }
8572 EOF
8573 if { (eval echo configure:8574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8574   rm -rf conftest*
8575   eval "ac_cv_lib_$ac_lib_var=yes"
8576 else
8577   echo "configure: failed program was:" >&5
8578   cat conftest.$ac_ext >&5
8579   rm -rf conftest*
8580   eval "ac_cv_lib_$ac_lib_var=no"
8581 fi
8582 rm -f conftest*
8583 LIBS="$ac_save_LIBS"
8584
8585 fi
8586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8587   echo "$ac_t""yes" 1>&6
8588   LIBS="$LIBS -lx"
8589 else
8590   echo "$ac_t""no" 1>&6
8591 fi
8592
8593 fi
8594
8595 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8596 echo "configure:8597: checking for sys/wait.h that is POSIX.1 compatible" >&5
8597 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
8598   echo $ac_n "(cached) $ac_c" 1>&6
8599 else
8600   cat > conftest.$ac_ext <<EOF
8601 #line 8602 "configure"
8602 #include "confdefs.h"
8603 #include <sys/types.h>
8604 #include <sys/wait.h>
8605 #ifndef WEXITSTATUS
8606 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8607 #endif
8608 #ifndef WIFEXITED
8609 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8610 #endif
8611 int main() {
8612 int s;
8613 wait (&s);
8614 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8615 ; return 0; }
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8618   rm -rf conftest*
8619   ac_cv_header_sys_wait_h=yes
8620 else
8621   echo "configure: failed program was:" >&5
8622   cat conftest.$ac_ext >&5
8623   rm -rf conftest*
8624   ac_cv_header_sys_wait_h=no
8625 fi
8626 rm -f conftest*
8627 fi
8628
8629 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8630 if test $ac_cv_header_sys_wait_h = yes; then
8631   cat >> confdefs.h <<\EOF
8632 #define HAVE_SYS_WAIT_H 1
8633 EOF
8634
8635 fi
8636
8637 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8638 echo "configure:8639: checking POSIX termios" >&5
8639 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
8640   echo $ac_n "(cached) $ac_c" 1>&6
8641 else
8642   cat > conftest.$ac_ext <<EOF
8643 #line 8644 "configure"
8644 #include "confdefs.h"
8645 #include <sys/types.h>
8646 #include <unistd.h>
8647 #include <termios.h>
8648 int main() {
8649 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8650    tcgetattr(0, 0);
8651 ; return 0; }
8652 EOF
8653 if { (eval echo configure:8654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8654   rm -rf conftest*
8655   am_cv_sys_posix_termios=yes
8656 else
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -rf conftest*
8660   am_cv_sys_posix_termios=no
8661 fi
8662 rm -f conftest*
8663 fi
8664
8665 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8666
8667
8668  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8669 echo "configure:8670: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8670 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
8671   echo $ac_n "(cached) $ac_c" 1>&6
8672 else
8673   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8674
8675   gwinsz_in_termios_h=no
8676   if test $am_cv_sys_posix_termios = yes; then
8677     cat > conftest.$ac_ext <<EOF
8678 #line 8679 "configure"
8679 #include "confdefs.h"
8680 #include <sys/types.h>
8681 #     include <termios.h>
8682 #     ifdef TIOCGWINSZ
8683         yes
8684 #     endif
8685     
8686 EOF
8687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8688   egrep "yes" >/dev/null 2>&1; then
8689   rm -rf conftest*
8690   gwinsz_in_termios_h=yes
8691 fi
8692 rm -f conftest*
8693
8694   fi
8695
8696   if test $gwinsz_in_termios_h = no; then
8697     cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 #include <sys/types.h>
8701 #     include <sys/ioctl.h>
8702 #     ifdef TIOCGWINSZ
8703         yes
8704 #     endif
8705     
8706 EOF
8707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8708   egrep "yes" >/dev/null 2>&1; then
8709   rm -rf conftest*
8710   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8711 fi
8712 rm -f conftest*
8713
8714   fi
8715   
8716 fi
8717
8718 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8719   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8720     cat >> confdefs.h <<\EOF
8721 #define GWINSZ_IN_SYS_IOCTL 1
8722 EOF
8723
8724   fi
8725
8726 if test $am_cv_sys_posix_termios = yes ; then
8727         cat >> confdefs.h <<\EOF
8728 #define HAVE_POSIX_TERMIOS 1
8729 EOF
8730
8731 fi
8732
8733 for ac_hdr in \
8734         arpa/inet.h             \
8735         arpa/nameser.h          \
8736         crypt.h                 \
8737         errno.h                 \
8738         fcntl.h                 \
8739         filio.h                 \
8740         getopt.h                \
8741         libutil.h               \
8742         limits.h                \
8743         locale.h                \
8744         malloc.h                \
8745         memory.h                \
8746         regex.h                 \
8747         psap.h                  \
8748         pwd.h                   \
8749         resolv.h                \
8750         sgtty.h                 \
8751         stdarg.h                \
8752         stddef.h                \
8753         string.h                \
8754         strings.h               \
8755         sysexits.h              \
8756         sys/file.h              \
8757         sys/filio.h             \
8758         sys/errno.h             \
8759         sys/ioctl.h             \
8760         sys/param.h             \
8761         sys/resource.h          \
8762         sys/socket.h            \
8763         sys/syslog.h            \
8764         sys/time.h              \
8765         sys/types.h             \
8766         syslog.h                \
8767         termios.h               \
8768         unistd.h                \
8769
8770 do
8771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8773 echo "configure:8774: checking for $ac_hdr" >&5
8774 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8775   echo $ac_n "(cached) $ac_c" 1>&6
8776 else
8777   cat > conftest.$ac_ext <<EOF
8778 #line 8779 "configure"
8779 #include "confdefs.h"
8780 #include <$ac_hdr>
8781 EOF
8782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8783 { (eval echo configure:8784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8785 if test -z "$ac_err"; then
8786   rm -rf conftest*
8787   eval "ac_cv_header_$ac_safe=yes"
8788 else
8789   echo "$ac_err" >&5
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -rf conftest*
8793   eval "ac_cv_header_$ac_safe=no"
8794 fi
8795 rm -f conftest*
8796 fi
8797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8798   echo "$ac_t""yes" 1>&6
8799     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8800   cat >> confdefs.h <<EOF
8801 #define $ac_tr_hdr 1
8802 EOF
8803  
8804 else
8805   echo "$ac_t""no" 1>&6
8806 fi
8807 done
8808
8809
8810 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
8811 echo "configure:8812: checking for uid_t in sys/types.h" >&5
8812 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
8813   echo $ac_n "(cached) $ac_c" 1>&6
8814 else
8815   cat > conftest.$ac_ext <<EOF
8816 #line 8817 "configure"
8817 #include "confdefs.h"
8818 #include <sys/types.h>
8819 EOF
8820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8821   egrep "uid_t" >/dev/null 2>&1; then
8822   rm -rf conftest*
8823   ac_cv_type_uid_t=yes
8824 else
8825   rm -rf conftest*
8826   ac_cv_type_uid_t=no
8827 fi
8828 rm -f conftest*
8829
8830 fi
8831
8832 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
8833 if test $ac_cv_type_uid_t = no; then
8834   cat >> confdefs.h <<\EOF
8835 #define uid_t int
8836 EOF
8837
8838   cat >> confdefs.h <<\EOF
8839 #define gid_t int
8840 EOF
8841
8842 fi
8843
8844 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
8845 echo "configure:8846: checking type of array argument to getgroups" >&5
8846 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
8847   echo $ac_n "(cached) $ac_c" 1>&6
8848 else
8849   if test "$cross_compiling" = yes; then
8850   ac_cv_type_getgroups=cross
8851 else
8852   cat > conftest.$ac_ext <<EOF
8853 #line 8854 "configure"
8854 #include "confdefs.h"
8855
8856 /* Thanks to Mike Rendell for this test.  */
8857 #include <sys/types.h>
8858 #define NGID 256
8859 #undef MAX
8860 #define MAX(x, y) ((x) > (y) ? (x) : (y))
8861 main()
8862 {
8863   gid_t gidset[NGID];
8864   int i, n;
8865   union { gid_t gval; long lval; }  val;
8866
8867   val.lval = -1;
8868   for (i = 0; i < NGID; i++)
8869     gidset[i] = val.gval;
8870   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
8871                  gidset);
8872   /* Exit non-zero if getgroups seems to require an array of ints.  This
8873      happens when gid_t is short but getgroups modifies an array of ints.  */
8874   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
8875 }
8876
8877 EOF
8878 if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8879 then
8880     ac_cv_type_getgroups=gid_t
8881 else
8882   echo "configure: failed program was:" >&5
8883   cat conftest.$ac_ext >&5
8884   rm -fr conftest*
8885   ac_cv_type_getgroups=int
8886 fi
8887 rm -fr conftest*
8888 fi
8889
8890 if test $ac_cv_type_getgroups = cross; then
8891         cat > conftest.$ac_ext <<EOF
8892 #line 8893 "configure"
8893 #include "confdefs.h"
8894 #include <unistd.h>
8895 EOF
8896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8897   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
8898   rm -rf conftest*
8899   ac_cv_type_getgroups=gid_t
8900 else
8901   rm -rf conftest*
8902   ac_cv_type_getgroups=int
8903 fi
8904 rm -f conftest*
8905
8906 fi
8907 fi
8908
8909 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
8910 cat >> confdefs.h <<EOF
8911 #define GETGROUPS_T $ac_cv_type_getgroups
8912 EOF
8913
8914  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8915 echo "configure:8916: checking for ANSI C header files" >&5
8916 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8917   echo $ac_n "(cached) $ac_c" 1>&6
8918 else
8919   cat > conftest.$ac_ext <<EOF
8920 #line 8921 "configure"
8921 #include "confdefs.h"
8922 #include <stdlib.h>
8923 #include <stdarg.h>
8924 #include <string.h>
8925 #include <float.h>
8926 EOF
8927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8928 { (eval echo configure:8929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8930 if test -z "$ac_err"; then
8931   rm -rf conftest*
8932   ac_cv_header_stdc=yes
8933 else
8934   echo "$ac_err" >&5
8935   echo "configure: failed program was:" >&5
8936   cat conftest.$ac_ext >&5
8937   rm -rf conftest*
8938   ac_cv_header_stdc=no
8939 fi
8940 rm -f conftest*
8941
8942 if test $ac_cv_header_stdc = yes; then
8943   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8944 cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 #include <string.h>
8948 EOF
8949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8950   egrep "memchr" >/dev/null 2>&1; then
8951   :
8952 else
8953   rm -rf conftest*
8954   ac_cv_header_stdc=no
8955 fi
8956 rm -f conftest*
8957
8958 fi
8959
8960 if test $ac_cv_header_stdc = yes; then
8961   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8962 cat > conftest.$ac_ext <<EOF
8963 #line 8964 "configure"
8964 #include "confdefs.h"
8965 #include <stdlib.h>
8966 EOF
8967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8968   egrep "free" >/dev/null 2>&1; then
8969   :
8970 else
8971   rm -rf conftest*
8972   ac_cv_header_stdc=no
8973 fi
8974 rm -f conftest*
8975
8976 fi
8977
8978 if test $ac_cv_header_stdc = yes; then
8979   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8980 if test "$cross_compiling" = yes; then
8981   :
8982 else
8983   cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986 #include <ctype.h>
8987 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8988 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8989 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8990 int main () { int i; for (i = 0; i < 256; i++)
8991 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8992 exit (0); }
8993
8994 EOF
8995 if { (eval echo configure:8996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8996 then
8997   :
8998 else
8999   echo "configure: failed program was:" >&5
9000   cat conftest.$ac_ext >&5
9001   rm -fr conftest*
9002   ac_cv_header_stdc=no
9003 fi
9004 rm -fr conftest*
9005 fi
9006
9007 fi
9008 fi
9009
9010 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9011 if test $ac_cv_header_stdc = yes; then
9012   cat >> confdefs.h <<\EOF
9013 #define STDC_HEADERS 1
9014 EOF
9015
9016 fi
9017
9018 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9019 echo "configure:9020: checking for mode_t" >&5
9020 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9021   echo $ac_n "(cached) $ac_c" 1>&6
9022 else
9023   cat > conftest.$ac_ext <<EOF
9024 #line 9025 "configure"
9025 #include "confdefs.h"
9026 #include <sys/types.h>
9027 #if STDC_HEADERS
9028 #include <stdlib.h>
9029 #include <stddef.h>
9030 #endif
9031 EOF
9032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9033   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9034   rm -rf conftest*
9035   ac_cv_type_mode_t=yes
9036 else
9037   rm -rf conftest*
9038   ac_cv_type_mode_t=no
9039 fi
9040 rm -f conftest*
9041
9042 fi
9043 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9044 if test $ac_cv_type_mode_t = no; then
9045   cat >> confdefs.h <<\EOF
9046 #define mode_t int
9047 EOF
9048
9049 fi
9050
9051 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9052 echo "configure:9053: checking for off_t" >&5
9053 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9054   echo $ac_n "(cached) $ac_c" 1>&6
9055 else
9056   cat > conftest.$ac_ext <<EOF
9057 #line 9058 "configure"
9058 #include "confdefs.h"
9059 #include <sys/types.h>
9060 #if STDC_HEADERS
9061 #include <stdlib.h>
9062 #include <stddef.h>
9063 #endif
9064 EOF
9065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9066   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9067   rm -rf conftest*
9068   ac_cv_type_off_t=yes
9069 else
9070   rm -rf conftest*
9071   ac_cv_type_off_t=no
9072 fi
9073 rm -f conftest*
9074
9075 fi
9076 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9077 if test $ac_cv_type_off_t = no; then
9078   cat >> confdefs.h <<\EOF
9079 #define off_t long
9080 EOF
9081
9082 fi
9083
9084 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9085 echo "configure:9086: checking for pid_t" >&5
9086 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9087   echo $ac_n "(cached) $ac_c" 1>&6
9088 else
9089   cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 #include <sys/types.h>
9093 #if STDC_HEADERS
9094 #include <stdlib.h>
9095 #include <stddef.h>
9096 #endif
9097 EOF
9098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9099   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9100   rm -rf conftest*
9101   ac_cv_type_pid_t=yes
9102 else
9103   rm -rf conftest*
9104   ac_cv_type_pid_t=no
9105 fi
9106 rm -f conftest*
9107
9108 fi
9109 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9110 if test $ac_cv_type_pid_t = no; then
9111   cat >> confdefs.h <<\EOF
9112 #define pid_t int
9113 EOF
9114
9115 fi
9116
9117 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9118 echo "configure:9119: checking for ptrdiff_t" >&5
9119 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9120   echo $ac_n "(cached) $ac_c" 1>&6
9121 else
9122   cat > conftest.$ac_ext <<EOF
9123 #line 9124 "configure"
9124 #include "confdefs.h"
9125 #include <stddef.h>
9126 int main() {
9127 ptrdiff_t p
9128 ; return 0; }
9129 EOF
9130 if { (eval echo configure:9131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9131   rm -rf conftest*
9132   am_cv_type_ptrdiff_t=yes
9133 else
9134   echo "configure: failed program was:" >&5
9135   cat conftest.$ac_ext >&5
9136   rm -rf conftest*
9137   am_cv_type_ptrdiff_t=no
9138 fi
9139 rm -f conftest*
9140 fi
9141
9142 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9143    if test $am_cv_type_ptrdiff_t = yes; then
9144      cat >> confdefs.h <<\EOF
9145 #define HAVE_PTRDIFF_T 1
9146 EOF
9147
9148    fi
9149
9150 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9151 echo "configure:9152: checking return type of signal handlers" >&5
9152 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9153   echo $ac_n "(cached) $ac_c" 1>&6
9154 else
9155   cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158 #include <sys/types.h>
9159 #include <signal.h>
9160 #ifdef signal
9161 #undef signal
9162 #endif
9163 #ifdef __cplusplus
9164 extern "C" void (*signal (int, void (*)(int)))(int);
9165 #else
9166 void (*signal ()) ();
9167 #endif
9168
9169 int main() {
9170 int i;
9171 ; return 0; }
9172 EOF
9173 if { (eval echo configure:9174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9174   rm -rf conftest*
9175   ac_cv_type_signal=void
9176 else
9177   echo "configure: failed program was:" >&5
9178   cat conftest.$ac_ext >&5
9179   rm -rf conftest*
9180   ac_cv_type_signal=int
9181 fi
9182 rm -f conftest*
9183 fi
9184
9185 echo "$ac_t""$ac_cv_type_signal" 1>&6
9186 cat >> confdefs.h <<EOF
9187 #define RETSIGTYPE $ac_cv_type_signal
9188 EOF
9189
9190
9191 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9192 echo "configure:9193: checking for sig_atomic_t" >&5
9193 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199 #include <signal.h>
9200 int main() {
9201 sig_atomic_t atomic;
9202 ; return 0; }
9203 EOF
9204 if { (eval echo configure:9205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9205   rm -rf conftest*
9206   ol_cv_type_sig_atomic_t=yes
9207 else
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   ol_cv_type_sig_atomic_t=no
9212 fi
9213 rm -f conftest*
9214 fi
9215
9216 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9217   if test $ol_cv_type_sig_atomic_t = no; then
9218     cat >> confdefs.h <<\EOF
9219 #define sig_atomic_t int
9220 EOF
9221
9222   fi
9223  
9224 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9225 echo "configure:9226: checking for size_t" >&5
9226 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9227   echo $ac_n "(cached) $ac_c" 1>&6
9228 else
9229   cat > conftest.$ac_ext <<EOF
9230 #line 9231 "configure"
9231 #include "confdefs.h"
9232 #include <sys/types.h>
9233 #if STDC_HEADERS
9234 #include <stdlib.h>
9235 #include <stddef.h>
9236 #endif
9237 EOF
9238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9239   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9240   rm -rf conftest*
9241   ac_cv_type_size_t=yes
9242 else
9243   rm -rf conftest*
9244   ac_cv_type_size_t=no
9245 fi
9246 rm -f conftest*
9247
9248 fi
9249 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9250 if test $ac_cv_type_size_t = no; then
9251   cat >> confdefs.h <<\EOF
9252 #define size_t unsigned
9253 EOF
9254
9255 fi
9256
9257 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9258 echo "configure:9259: checking for st_blksize in struct stat" >&5
9259 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9260   echo $ac_n "(cached) $ac_c" 1>&6
9261 else
9262   cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 #include <sys/types.h>
9266 #include <sys/stat.h>
9267 int main() {
9268 struct stat s; s.st_blksize;
9269 ; return 0; }
9270 EOF
9271 if { (eval echo configure:9272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9272   rm -rf conftest*
9273   ac_cv_struct_st_blksize=yes
9274 else
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -rf conftest*
9278   ac_cv_struct_st_blksize=no
9279 fi
9280 rm -f conftest*
9281 fi
9282
9283 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9284 if test $ac_cv_struct_st_blksize = yes; then
9285   cat >> confdefs.h <<\EOF
9286 #define HAVE_ST_BLKSIZE 1
9287 EOF
9288
9289 fi
9290
9291 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9292 echo "configure:9293: checking whether time.h and sys/time.h may both be included" >&5
9293 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <sys/types.h>
9300 #include <sys/time.h>
9301 #include <time.h>
9302 int main() {
9303 struct tm *tp;
9304 ; return 0; }
9305 EOF
9306 if { (eval echo configure:9307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9307   rm -rf conftest*
9308   ac_cv_header_time=yes
9309 else
9310   echo "configure: failed program was:" >&5
9311   cat conftest.$ac_ext >&5
9312   rm -rf conftest*
9313   ac_cv_header_time=no
9314 fi
9315 rm -f conftest*
9316 fi
9317
9318 echo "$ac_t""$ac_cv_header_time" 1>&6
9319 if test $ac_cv_header_time = yes; then
9320   cat >> confdefs.h <<\EOF
9321 #define TIME_WITH_SYS_TIME 1
9322 EOF
9323
9324 fi
9325
9326 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9327 echo "configure:9328: checking whether struct tm is in sys/time.h or time.h" >&5
9328 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   cat > conftest.$ac_ext <<EOF
9332 #line 9333 "configure"
9333 #include "confdefs.h"
9334 #include <sys/types.h>
9335 #include <time.h>
9336 int main() {
9337 struct tm *tp; tp->tm_sec;
9338 ; return 0; }
9339 EOF
9340 if { (eval echo configure:9341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9341   rm -rf conftest*
9342   ac_cv_struct_tm=time.h
9343 else
9344   echo "configure: failed program was:" >&5
9345   cat conftest.$ac_ext >&5
9346   rm -rf conftest*
9347   ac_cv_struct_tm=sys/time.h
9348 fi
9349 rm -f conftest*
9350 fi
9351
9352 echo "$ac_t""$ac_cv_struct_tm" 1>&6
9353 if test $ac_cv_struct_tm = sys/time.h; then
9354   cat >> confdefs.h <<\EOF
9355 #define TM_IN_SYS_TIME 1
9356 EOF
9357
9358 fi
9359
9360 # test for pw_gecos in struct passwd
9361 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
9362 echo "configure:9363: checking struct passwd for pw_gecos" >&5
9363 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
9364   echo $ac_n "(cached) $ac_c" 1>&6
9365 else
9366   
9367         cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 #include <pwd.h>
9371 int main() {
9372
9373         struct passwd pwd;
9374         pwd.pw_gecos = pwd.pw_name;
9375
9376 ; return 0; }
9377 EOF
9378 if { (eval echo configure:9379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9379   rm -rf conftest*
9380   ol_cv_struct_passwd_pw_gecos=yes
9381 else
9382   echo "configure: failed program was:" >&5
9383   cat conftest.$ac_ext >&5
9384   rm -rf conftest*
9385   ol_cv_struct_passwd_pw_gecos=no
9386 fi
9387 rm -f conftest*
9388 fi
9389
9390 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
9391 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
9392         cat >> confdefs.h <<\EOF
9393 #define HAVE_PW_GECOS 1
9394 EOF
9395
9396 fi
9397
9398
9399
9400 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
9401 echo "configure:9402: checking if toupper() requires islower()" >&5
9402 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
9403   echo $ac_n "(cached) $ac_c" 1>&6
9404 else
9405   
9406         if test "$cross_compiling" = yes; then
9407   ol_cv_c_upper_lower=safe
9408 else
9409   cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412
9413 #include <ctype.h>
9414 main()
9415 {
9416         if ('C' == toupper('C'))
9417                 exit(0);
9418         else
9419                 exit(1);
9420 }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9423 then
9424   ol_cv_c_upper_lower=no
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -fr conftest*
9429   ol_cv_c_upper_lower=yes
9430 fi
9431 rm -fr conftest*
9432 fi
9433
9434 fi
9435
9436 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
9437 if test $ol_cv_c_upper_lower != no ; then
9438         cat >> confdefs.h <<\EOF
9439 #define C_UPPER_LOWER 1
9440 EOF
9441
9442 fi
9443
9444 echo $ac_n "checking for working const""... $ac_c" 1>&6
9445 echo "configure:9446: checking for working const" >&5
9446 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
9447   echo $ac_n "(cached) $ac_c" 1>&6
9448 else
9449   cat > conftest.$ac_ext <<EOF
9450 #line 9451 "configure"
9451 #include "confdefs.h"
9452
9453 int main() {
9454
9455 /* Ultrix mips cc rejects this.  */
9456 typedef int charset[2]; const charset x;
9457 /* SunOS 4.1.1 cc rejects this.  */
9458 char const *const *ccp;
9459 char **p;
9460 /* NEC SVR4.0.2 mips cc rejects this.  */
9461 struct point {int x, y;};
9462 static struct point const zero = {0,0};
9463 /* AIX XL C 1.02.0.0 rejects this.
9464    It does not let you subtract one const X* pointer from another in an arm
9465    of an if-expression whose if-part is not a constant expression */
9466 const char *g = "string";
9467 ccp = &g + (g ? g-g : 0);
9468 /* HPUX 7.0 cc rejects these. */
9469 ++ccp;
9470 p = (char**) ccp;
9471 ccp = (char const *const *) p;
9472 { /* SCO 3.2v4 cc rejects this.  */
9473   char *t;
9474   char const *s = 0 ? (char *) 0 : (char const *) 0;
9475
9476   *t++ = 0;
9477 }
9478 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9479   int x[] = {25, 17};
9480   const int *foo = &x[0];
9481   ++foo;
9482 }
9483 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9484   typedef const int *iptr;
9485   iptr p = 0;
9486   ++p;
9487 }
9488 { /* AIX XL C 1.02.0.0 rejects this saying
9489      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9490   struct s { int j; const int *ap[3]; };
9491   struct s *b; b->j = 5;
9492 }
9493 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9494   const int foo = 10;
9495 }
9496
9497 ; return 0; }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9500   rm -rf conftest*
9501   ac_cv_c_const=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -rf conftest*
9506   ac_cv_c_const=no
9507 fi
9508 rm -f conftest*
9509 fi
9510
9511 echo "$ac_t""$ac_cv_c_const" 1>&6
9512 if test $ac_cv_c_const = no; then
9513   cat >> confdefs.h <<\EOF
9514 #define const 
9515 EOF
9516
9517 fi
9518
9519 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
9520 echo "configure:9521: checking if compiler understands volatile" >&5
9521 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 int x, y, z;
9528 int main() {
9529 volatile int a; int * volatile b = x ? &y : &z;
9530       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
9531       *b = 0;
9532 ; return 0; }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9535   rm -rf conftest*
9536   ol_cv_c_volatile=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   ol_cv_c_volatile=no
9542 fi
9543 rm -f conftest*
9544 fi
9545
9546 echo "$ac_t""$ol_cv_c_volatile" 1>&6
9547   if test $ol_cv_c_volatile = yes; then
9548     : 
9549   else
9550     cat >> confdefs.h <<\EOF
9551 #define volatile 
9552 EOF
9553
9554   fi
9555  
9556
9557 if test $cross_compiling = yes ; then
9558         cat >> confdefs.h <<\EOF
9559 #define CROSS_COMPILING 1
9560 EOF
9561
9562 else
9563         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
9564 echo "configure:9565: checking whether byte ordering is bigendian" >&5
9565 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568   ac_cv_c_bigendian=unknown
9569 # See if sys/param.h defines the BYTE_ORDER macro.
9570 cat > conftest.$ac_ext <<EOF
9571 #line 9572 "configure"
9572 #include "confdefs.h"
9573 #include <sys/types.h>
9574 #include <sys/param.h>
9575 int main() {
9576
9577 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9578  bogus endian macros
9579 #endif
9580 ; return 0; }
9581 EOF
9582 if { (eval echo configure:9583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9583   rm -rf conftest*
9584   # It does; now see whether it defined to BIG_ENDIAN or not.
9585 cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 #include <sys/types.h>
9589 #include <sys/param.h>
9590 int main() {
9591
9592 #if BYTE_ORDER != BIG_ENDIAN
9593  not big endian
9594 #endif
9595 ; return 0; }
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9598   rm -rf conftest*
9599   ac_cv_c_bigendian=yes
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   ac_cv_c_bigendian=no
9605 fi
9606 rm -f conftest*
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610 fi
9611 rm -f conftest*
9612 if test $ac_cv_c_bigendian = unknown; then
9613 if test "$cross_compiling" = yes; then
9614     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9615 else
9616   cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 main () {
9620   /* Are we little or big endian?  From Harbison&Steele.  */
9621   union
9622   {
9623     long l;
9624     char c[sizeof (long)];
9625   } u;
9626   u.l = 1;
9627   exit (u.c[sizeof (long) - 1] == 1);
9628 }
9629 EOF
9630 if { (eval echo configure:9631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9631 then
9632   ac_cv_c_bigendian=no
9633 else
9634   echo "configure: failed program was:" >&5
9635   cat conftest.$ac_ext >&5
9636   rm -fr conftest*
9637   ac_cv_c_bigendian=yes
9638 fi
9639 rm -fr conftest*
9640 fi
9641
9642 fi
9643 fi
9644
9645 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
9646 if test $ac_cv_c_bigendian = yes; then
9647   cat >> confdefs.h <<\EOF
9648 #define WORDS_BIGENDIAN 1
9649 EOF
9650
9651 fi
9652
9653         echo $ac_n "checking size of short""... $ac_c" 1>&6
9654 echo "configure:9655: checking size of short" >&5
9655 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
9656   echo $ac_n "(cached) $ac_c" 1>&6
9657 else
9658   if test "$cross_compiling" = yes; then
9659     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9660 else
9661   cat > conftest.$ac_ext <<EOF
9662 #line 9663 "configure"
9663 #include "confdefs.h"
9664 #include <stdio.h>
9665 main()
9666 {
9667   FILE *f=fopen("conftestval", "w");
9668   if (!f) exit(1);
9669   fprintf(f, "%d\n", sizeof(short));
9670   exit(0);
9671 }
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9674 then
9675   ac_cv_sizeof_short=`cat conftestval`
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -fr conftest*
9680   ac_cv_sizeof_short=0
9681 fi
9682 rm -fr conftest*
9683 fi
9684
9685 fi
9686 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
9687 cat >> confdefs.h <<EOF
9688 #define SIZEOF_SHORT $ac_cv_sizeof_short
9689 EOF
9690
9691  
9692         echo $ac_n "checking size of int""... $ac_c" 1>&6
9693 echo "configure:9694: checking size of int" >&5
9694 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
9695   echo $ac_n "(cached) $ac_c" 1>&6
9696 else
9697   if test "$cross_compiling" = yes; then
9698     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9699 else
9700   cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 #include <stdio.h>
9704 main()
9705 {
9706   FILE *f=fopen("conftestval", "w");
9707   if (!f) exit(1);
9708   fprintf(f, "%d\n", sizeof(int));
9709   exit(0);
9710 }
9711 EOF
9712 if { (eval echo configure:9713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9713 then
9714   ac_cv_sizeof_int=`cat conftestval`
9715 else
9716   echo "configure: failed program was:" >&5
9717   cat conftest.$ac_ext >&5
9718   rm -fr conftest*
9719   ac_cv_sizeof_int=0
9720 fi
9721 rm -fr conftest*
9722 fi
9723
9724 fi
9725 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
9726 cat >> confdefs.h <<EOF
9727 #define SIZEOF_INT $ac_cv_sizeof_int
9728 EOF
9729
9730  
9731         echo $ac_n "checking size of long""... $ac_c" 1>&6
9732 echo "configure:9733: checking size of long" >&5
9733 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
9734   echo $ac_n "(cached) $ac_c" 1>&6
9735 else
9736   if test "$cross_compiling" = yes; then
9737     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9738 else
9739   cat > conftest.$ac_ext <<EOF
9740 #line 9741 "configure"
9741 #include "confdefs.h"
9742 #include <stdio.h>
9743 main()
9744 {
9745   FILE *f=fopen("conftestval", "w");
9746   if (!f) exit(1);
9747   fprintf(f, "%d\n", sizeof(long));
9748   exit(0);
9749 }
9750 EOF
9751 if { (eval echo configure:9752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9752 then
9753   ac_cv_sizeof_long=`cat conftestval`
9754 else
9755   echo "configure: failed program was:" >&5
9756   cat conftest.$ac_ext >&5
9757   rm -fr conftest*
9758   ac_cv_sizeof_long=0
9759 fi
9760 rm -fr conftest*
9761 fi
9762
9763 fi
9764 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
9765 cat >> confdefs.h <<EOF
9766 #define SIZEOF_LONG $ac_cv_sizeof_long
9767 EOF
9768
9769
9770 fi
9771
9772 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
9773 echo "configure:9774: checking for 8-bit clean memcmp" >&5
9774 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
9775   echo $ac_n "(cached) $ac_c" 1>&6
9776 else
9777   if test "$cross_compiling" = yes; then
9778   ac_cv_func_memcmp_clean=no
9779 else
9780   cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783
9784 main()
9785 {
9786   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
9787   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
9788 }
9789
9790 EOF
9791 if { (eval echo configure:9792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9792 then
9793   ac_cv_func_memcmp_clean=yes
9794 else
9795   echo "configure: failed program was:" >&5
9796   cat conftest.$ac_ext >&5
9797   rm -fr conftest*
9798   ac_cv_func_memcmp_clean=no
9799 fi
9800 rm -fr conftest*
9801 fi
9802
9803 fi
9804
9805 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
9806 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
9807
9808 echo $ac_n "checking for strftime""... $ac_c" 1>&6
9809 echo "configure:9810: checking for strftime" >&5
9810 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 /* System header to define __stub macros and hopefully few prototypes,
9817     which can conflict with char strftime(); below.  */
9818 #include <assert.h>
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 /* We use char because int might match the return type of a gcc2
9821     builtin and then its argument prototype would still apply.  */
9822 char strftime();
9823
9824 int main() {
9825
9826 /* The GNU C library defines this for functions which it implements
9827     to always fail with ENOSYS.  Some functions are actually named
9828     something starting with __ and the normal name is an alias.  */
9829 #if defined (__stub_strftime) || defined (__stub___strftime)
9830 choke me
9831 #else
9832 strftime();
9833 #endif
9834
9835 ; return 0; }
9836 EOF
9837 if { (eval echo configure:9838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9838   rm -rf conftest*
9839   eval "ac_cv_func_strftime=yes"
9840 else
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_func_strftime=no"
9845 fi
9846 rm -f conftest*
9847 fi
9848
9849 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
9850   echo "$ac_t""yes" 1>&6
9851   cat >> confdefs.h <<\EOF
9852 #define HAVE_STRFTIME 1
9853 EOF
9854
9855 else
9856   echo "$ac_t""no" 1>&6
9857 # strftime is in -lintl on SCO UNIX.
9858 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
9859 echo "configure:9860: checking for strftime in -lintl" >&5
9860 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
9861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9862   echo $ac_n "(cached) $ac_c" 1>&6
9863 else
9864   ac_save_LIBS="$LIBS"
9865 LIBS="-lintl  $LIBS"
9866 cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 /* Override any gcc2 internal prototype to avoid an error.  */
9870 /* We use char because int might match the return type of a gcc2
9871     builtin and then its argument prototype would still apply.  */
9872 char strftime();
9873
9874 int main() {
9875 strftime()
9876 ; return 0; }
9877 EOF
9878 if { (eval echo configure:9879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9879   rm -rf conftest*
9880   eval "ac_cv_lib_$ac_lib_var=yes"
9881 else
9882   echo "configure: failed program was:" >&5
9883   cat conftest.$ac_ext >&5
9884   rm -rf conftest*
9885   eval "ac_cv_lib_$ac_lib_var=no"
9886 fi
9887 rm -f conftest*
9888 LIBS="$ac_save_LIBS"
9889
9890 fi
9891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9892   echo "$ac_t""yes" 1>&6
9893   cat >> confdefs.h <<\EOF
9894 #define HAVE_STRFTIME 1
9895 EOF
9896
9897 LIBS="-lintl $LIBS"
9898 else
9899   echo "$ac_t""no" 1>&6
9900 fi
9901
9902 fi
9903
9904 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
9905 echo "configure:9906: checking for vprintf" >&5
9906 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9912 /* System header to define __stub macros and hopefully few prototypes,
9913     which can conflict with char vprintf(); below.  */
9914 #include <assert.h>
9915 /* Override any gcc2 internal prototype to avoid an error.  */
9916 /* We use char because int might match the return type of a gcc2
9917     builtin and then its argument prototype would still apply.  */
9918 char vprintf();
9919
9920 int main() {
9921
9922 /* The GNU C library defines this for functions which it implements
9923     to always fail with ENOSYS.  Some functions are actually named
9924     something starting with __ and the normal name is an alias.  */
9925 #if defined (__stub_vprintf) || defined (__stub___vprintf)
9926 choke me
9927 #else
9928 vprintf();
9929 #endif
9930
9931 ; return 0; }
9932 EOF
9933 if { (eval echo configure:9934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9934   rm -rf conftest*
9935   eval "ac_cv_func_vprintf=yes"
9936 else
9937   echo "configure: failed program was:" >&5
9938   cat conftest.$ac_ext >&5
9939   rm -rf conftest*
9940   eval "ac_cv_func_vprintf=no"
9941 fi
9942 rm -f conftest*
9943 fi
9944
9945 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
9946   echo "$ac_t""yes" 1>&6
9947   cat >> confdefs.h <<\EOF
9948 #define HAVE_VPRINTF 1
9949 EOF
9950
9951 else
9952   echo "$ac_t""no" 1>&6
9953 fi
9954
9955 if test "$ac_cv_func_vprintf" != yes; then
9956 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
9957 echo "configure:9958: checking for _doprnt" >&5
9958 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
9959   echo $ac_n "(cached) $ac_c" 1>&6
9960 else
9961   cat > conftest.$ac_ext <<EOF
9962 #line 9963 "configure"
9963 #include "confdefs.h"
9964 /* System header to define __stub macros and hopefully few prototypes,
9965     which can conflict with char _doprnt(); below.  */
9966 #include <assert.h>
9967 /* Override any gcc2 internal prototype to avoid an error.  */
9968 /* We use char because int might match the return type of a gcc2
9969     builtin and then its argument prototype would still apply.  */
9970 char _doprnt();
9971
9972 int main() {
9973
9974 /* The GNU C library defines this for functions which it implements
9975     to always fail with ENOSYS.  Some functions are actually named
9976     something starting with __ and the normal name is an alias.  */
9977 #if defined (__stub__doprnt) || defined (__stub____doprnt)
9978 choke me
9979 #else
9980 _doprnt();
9981 #endif
9982
9983 ; return 0; }
9984 EOF
9985 if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9986   rm -rf conftest*
9987   eval "ac_cv_func__doprnt=yes"
9988 else
9989   echo "configure: failed program was:" >&5
9990   cat conftest.$ac_ext >&5
9991   rm -rf conftest*
9992   eval "ac_cv_func__doprnt=no"
9993 fi
9994 rm -f conftest*
9995 fi
9996
9997 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
9998   echo "$ac_t""yes" 1>&6
9999   cat >> confdefs.h <<\EOF
10000 #define HAVE_DOPRNT 1
10001 EOF
10002
10003 else
10004   echo "$ac_t""no" 1>&6
10005 fi
10006
10007 fi
10008
10009
10010 if test $ac_cv_func_vprintf = yes ; then
10011                 for ac_func in vsnprintf vsprintf
10012 do
10013 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10014 echo "configure:10015: checking for $ac_func" >&5
10015 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10016   echo $ac_n "(cached) $ac_c" 1>&6
10017 else
10018   cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 /* System header to define __stub macros and hopefully few prototypes,
10022     which can conflict with char $ac_func(); below.  */
10023 #include <assert.h>
10024 /* Override any gcc2 internal prototype to avoid an error.  */
10025 /* We use char because int might match the return type of a gcc2
10026     builtin and then its argument prototype would still apply.  */
10027 char $ac_func();
10028
10029 int main() {
10030
10031 /* The GNU C library defines this for functions which it implements
10032     to always fail with ENOSYS.  Some functions are actually named
10033     something starting with __ and the normal name is an alias.  */
10034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10035 choke me
10036 #else
10037 $ac_func();
10038 #endif
10039
10040 ; return 0; }
10041 EOF
10042 if { (eval echo configure:10043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10043   rm -rf conftest*
10044   eval "ac_cv_func_$ac_func=yes"
10045 else
10046   echo "configure: failed program was:" >&5
10047   cat conftest.$ac_ext >&5
10048   rm -rf conftest*
10049   eval "ac_cv_func_$ac_func=no"
10050 fi
10051 rm -f conftest*
10052 fi
10053
10054 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10055   echo "$ac_t""yes" 1>&6
10056     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10057   cat >> confdefs.h <<EOF
10058 #define $ac_tr_func 1
10059 EOF
10060  
10061 else
10062   echo "$ac_t""no" 1>&6
10063 fi
10064 done
10065
10066 fi
10067
10068 for ac_func in \
10069         bcopy                   \
10070         flock                   \
10071         getdtablesize           \
10072         gethostname             \
10073         getpass                 \
10074         getpwuid                \
10075         gettimeofday            \
10076         lockf                   \
10077         memcpy                  \
10078         memmove                 \
10079         mkstemp                 \
10080         select                  \
10081         setpwfile               \
10082         setsid                  \
10083         signal                  \
10084         sigset                  \
10085         snprintf                \
10086         socket                  \
10087         strdup                  \
10088         strerror                \
10089         strpbrk                 \
10090         strrchr                 \
10091         strsep                  \
10092         strstr                  \
10093         strtol                  \
10094         strtoul                 \
10095         strspn                  \
10096         sysconf                 \
10097         waitpid                 \
10098
10099 do
10100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10101 echo "configure:10102: checking for $ac_func" >&5
10102 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10103   echo $ac_n "(cached) $ac_c" 1>&6
10104 else
10105   cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108 /* System header to define __stub macros and hopefully few prototypes,
10109     which can conflict with char $ac_func(); below.  */
10110 #include <assert.h>
10111 /* Override any gcc2 internal prototype to avoid an error.  */
10112 /* We use char because int might match the return type of a gcc2
10113     builtin and then its argument prototype would still apply.  */
10114 char $ac_func();
10115
10116 int main() {
10117
10118 /* The GNU C library defines this for functions which it implements
10119     to always fail with ENOSYS.  Some functions are actually named
10120     something starting with __ and the normal name is an alias.  */
10121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10122 choke me
10123 #else
10124 $ac_func();
10125 #endif
10126
10127 ; return 0; }
10128 EOF
10129 if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10130   rm -rf conftest*
10131   eval "ac_cv_func_$ac_func=yes"
10132 else
10133   echo "configure: failed program was:" >&5
10134   cat conftest.$ac_ext >&5
10135   rm -rf conftest*
10136   eval "ac_cv_func_$ac_func=no"
10137 fi
10138 rm -f conftest*
10139 fi
10140
10141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10142   echo "$ac_t""yes" 1>&6
10143     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_func 1
10146 EOF
10147  
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151 done
10152
10153
10154 for ac_func in getopt tempnam
10155 do
10156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10157 echo "configure:10158: checking for $ac_func" >&5
10158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   cat > conftest.$ac_ext <<EOF
10162 #line 10163 "configure"
10163 #include "confdefs.h"
10164 /* System header to define __stub macros and hopefully few prototypes,
10165     which can conflict with char $ac_func(); below.  */
10166 #include <assert.h>
10167 /* Override any gcc2 internal prototype to avoid an error.  */
10168 /* We use char because int might match the return type of a gcc2
10169     builtin and then its argument prototype would still apply.  */
10170 char $ac_func();
10171
10172 int main() {
10173
10174 /* The GNU C library defines this for functions which it implements
10175     to always fail with ENOSYS.  Some functions are actually named
10176     something starting with __ and the normal name is an alias.  */
10177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10178 choke me
10179 #else
10180 $ac_func();
10181 #endif
10182
10183 ; return 0; }
10184 EOF
10185 if { (eval echo configure:10186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10186   rm -rf conftest*
10187   eval "ac_cv_func_$ac_func=yes"
10188 else
10189   echo "configure: failed program was:" >&5
10190   cat conftest.$ac_ext >&5
10191   rm -rf conftest*
10192   eval "ac_cv_func_$ac_func=no"
10193 fi
10194 rm -f conftest*
10195 fi
10196
10197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10198   echo "$ac_t""yes" 1>&6
10199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10200   cat >> confdefs.h <<EOF
10201 #define $ac_tr_func 1
10202 EOF
10203  
10204 else
10205   echo "$ac_t""no" 1>&6
10206 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10207 fi
10208 done
10209
10210
10211
10212 # Check Configuration
10213
10214 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10215 echo "configure:10216: checking declaration of sys_errlist" >&5
10216 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   
10220         cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223
10224 #include <stdio.h>
10225 #include <sys/types.h>
10226 #include <errno.h> 
10227 int main() {
10228 char *c = (char *) *sys_errlist
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10232   rm -rf conftest*
10233   ol_cv_dcl_sys_errlist=yes
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   ol_cv_dcl_sys_errlist=no
10239 fi
10240 rm -f conftest*
10241 fi
10242
10243 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10244 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10245 if test $ol_cv_dcl_sys_errlist = no ; then
10246         cat >> confdefs.h <<\EOF
10247 #define DECL_SYS_ERRLIST 1
10248 EOF
10249
10250         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10251 echo "configure:10252: checking existence of sys_errlist" >&5
10252         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   
10256                 cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 #include <errno.h>
10260 int main() {
10261 char *c = (char *) *sys_errlist
10262 ; return 0; }
10263 EOF
10264 if { (eval echo configure:10265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10265   rm -rf conftest*
10266   ol_cv_have_sys_errlist=yes
10267 else
10268   echo "configure: failed program was:" >&5
10269   cat conftest.$ac_ext >&5
10270   rm -rf conftest*
10271   ol_cv_have_sys_errlist=no
10272 fi
10273 rm -f conftest*
10274 fi
10275
10276         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10277         if test $ol_cv_have_sys_errlist = yes ; then
10278                 cat >> confdefs.h <<\EOF
10279 #define HAVE_SYS_ERRLIST 1
10280 EOF
10281
10282         fi
10283 fi
10284
10285
10286
10287 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10288 echo "configure:10289: checking strdup declaration" >&5
10289 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   
10293         cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296
10297 #include <string.h> 
10298 int main() {
10299 extern char *strdup();
10300 ; return 0; }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10303   rm -rf conftest*
10304   ol_cv_dcl_strdup=yes
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   ol_cv_dcl_strdup=no
10310 fi
10311 rm -f conftest*
10312 fi
10313
10314 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
10315 if test $ol_cv_dcl_strdup = yes ; then
10316         cat >> confdefs.h <<\EOF
10317 #define DECL_STRDUP 1
10318 EOF
10319
10320 fi
10321
10322
10323
10324 if test "$ol_enable_debug" != no ; then
10325         cat >> confdefs.h <<\EOF
10326 #define LDAP_DEBUG 1
10327 EOF
10328
10329 fi
10330 if test "$ol_enable_syslog" = yes ; then
10331         cat >> confdefs.h <<\EOF
10332 #define LDAP_SYSLOG 1
10333 EOF
10334
10335 fi
10336 if test "$ol_enable_libui" = yes ; then
10337         cat >> confdefs.h <<\EOF
10338 #define LDAP_LIBUI 1
10339 EOF
10340
10341 fi
10342 if test "$ol_enable_cache" = no ; then
10343         cat >> confdefs.h <<\EOF
10344 #define LDAP_NOCACHE 1
10345 EOF
10346
10347 fi
10348 if test "$ol_enable_dns" != no ; then
10349         cat >> confdefs.h <<\EOF
10350 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
10351 EOF
10352
10353 fi
10354 if test "$ol_enable_proctitle" != no ; then
10355         cat >> confdefs.h <<\EOF
10356 #define LDAP_PROCTITLE 1
10357 EOF
10358
10359 fi
10360 if test "$ol_enable_referrals" != no ; then
10361         cat >> confdefs.h <<\EOF
10362 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
10363 EOF
10364
10365 fi
10366 if test "$ol_enable_cldap" != no ; then
10367         cat >> confdefs.h <<\EOF
10368 #define LDAP_CONNECTIONLESS 1
10369 EOF
10370
10371 fi
10372
10373 if test "$ol_enable_aclgroups" != no ; then
10374         cat >> confdefs.h <<\EOF
10375 #define SLAPD_ACLGROUPS 1
10376 EOF
10377
10378 fi
10379 if test "$ol_enable_crypt" != no ; then
10380         cat >> confdefs.h <<\EOF
10381 #define SLAPD_CRYPT 1
10382 EOF
10383
10384 fi
10385 if test "$ol_enable_cleartext" != no ; then
10386         cat >> confdefs.h <<\EOF
10387 #define SLAPD_CLEARTEXT 1
10388 EOF
10389
10390 fi
10391 if test "$ol_enable_phonetic" != no ; then
10392         cat >> confdefs.h <<\EOF
10393 #define SLAPD_PHONETIC 1
10394 EOF
10395
10396 fi
10397 if test "$ol_enable_rlookups" != no ; then
10398         cat >> confdefs.h <<\EOF
10399 #define SLAPD_RLOOKUPS 1
10400 EOF
10401
10402 fi
10403
10404 if test "$ol_link_bdb2" != no ; then
10405         cat >> confdefs.h <<\EOF
10406 #define SLAPD_BDB2 1
10407 EOF
10408
10409         BUILD_SLAPD=yes
10410         BUILD_BDB2=yes
10411 fi
10412
10413 if test "$ol_link_ldbm" != no ; then
10414         cat >> confdefs.h <<\EOF
10415 #define SLAPD_LDBM 1
10416 EOF
10417
10418         BUILD_SLAPD=yes
10419         BUILD_LDBM=yes
10420 fi
10421
10422 if test "$ol_enable_passwd" != no ; then
10423         cat >> confdefs.h <<\EOF
10424 #define SLAPD_PASSWD 1
10425 EOF
10426
10427         BUILD_SLAPD=yes
10428         BUILD_PASSWD=yes
10429 fi
10430
10431 if test "$ol_enable_perl" != no ; then
10432         cat >> confdefs.h <<\EOF
10433 #define SLAPD_PERL 1
10434 EOF
10435
10436         BUILD_SLAPD=yes
10437         BUILD_PERL=yes
10438 fi
10439
10440 if test "$ol_enable_shell" != no ; then
10441         cat >> confdefs.h <<\EOF
10442 #define SLAPD_SHELL 1
10443 EOF
10444
10445         BUILD_SLAPD=yes
10446         BUILD_SHELL=yes
10447 fi
10448
10449 if test "$ol_enable_tcl" != no ; then
10450         cat >> confdefs.h <<\EOF
10451 #define SLAPD_TCL 1
10452 EOF
10453
10454         BUILD_SLAPD=yes
10455         BUILD_TCL=yes
10456 fi
10457
10458 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
10459         $BUILD_SLAPD = yes ; then
10460         BUILD_SLURPD=yes
10461 fi
10462
10463 if test "$ol_link_isode" != no ; then
10464         BUILD_LDAPD=yes
10465 fi
10466
10467
10468
10469
10470   
10471   
10472   
10473   
10474   
10475   
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495 trap '' 1 2 15
10496 cat > confcache <<\EOF
10497 # This file is a shell script that caches the results of configure
10498 # tests run on this system so they can be shared between configure
10499 # scripts and configure runs.  It is not useful on other systems.
10500 # If it contains results you don't want to keep, you may remove or edit it.
10501 #
10502 # By default, configure uses ./config.cache as the cache file,
10503 # creating it if it does not exist already.  You can give configure
10504 # the --cache-file=FILE option to use a different cache file; that is
10505 # what configure does when it calls configure scripts in
10506 # subdirectories, so they share the cache.
10507 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10508 # config.status only pays attention to the cache file if you give it the
10509 # --recheck option to rerun configure.
10510 #
10511 EOF
10512 # The following way of writing the cache mishandles newlines in values,
10513 # but we know of no workaround that is simple, portable, and efficient.
10514 # So, don't put newlines in cache variables' values.
10515 # Ultrix sh set writes to stderr and can't be redirected directly,
10516 # and sets the high bit in the cache file unless we assign to the vars.
10517 (set) 2>&1 |
10518   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10519   *ac_space=\ *)
10520     # `set' does not quote correctly, so add quotes (double-quote substitution
10521     # turns \\\\ into \\, and sed turns \\ into \).
10522     sed -n \
10523       -e "s/'/'\\\\''/g" \
10524       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10525     ;;
10526   *)
10527     # `set' quotes correctly as required by POSIX, so do not add quotes.
10528     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10529     ;;
10530   esac >> confcache
10531 if cmp -s $cache_file confcache; then
10532   :
10533 else
10534   if test -w $cache_file; then
10535     echo "updating cache $cache_file"
10536     cat confcache > $cache_file
10537   else
10538     echo "not updating unwritable cache $cache_file"
10539   fi
10540 fi
10541 rm -f confcache
10542
10543 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10544
10545 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10546 # Let make expand exec_prefix.
10547 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10548
10549 # Any assignment to VPATH causes Sun make to only execute
10550 # the first set of double-colon rules, so remove it if not needed.
10551 # If there is a colon in the path, we need to keep it.
10552 if test "x$srcdir" = x.; then
10553   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10554 fi
10555
10556 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10557
10558 DEFS=-DHAVE_CONFIG_H
10559
10560 # Without the "./", some shells look in PATH for config.status.
10561 : ${CONFIG_STATUS=./config.status}
10562
10563 echo creating $CONFIG_STATUS
10564 rm -f $CONFIG_STATUS
10565 cat > $CONFIG_STATUS <<EOF
10566 #! /bin/sh
10567 # Generated automatically by configure.
10568 # Run this file to recreate the current configuration.
10569 # This directory was configured as follows,
10570 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10571 #
10572 # $0 $ac_configure_args
10573 #
10574 # Compiler output produced by configure, useful for debugging
10575 # configure, is in ./config.log if it exists.
10576
10577 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10578 for ac_option
10579 do
10580   case "\$ac_option" in
10581   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10582     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10583     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10584   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10585     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10586     exit 0 ;;
10587   -help | --help | --hel | --he | --h)
10588     echo "\$ac_cs_usage"; exit 0 ;;
10589   *) echo "\$ac_cs_usage"; exit 1 ;;
10590   esac
10591 done
10592
10593 ac_given_srcdir=$srcdir
10594 ac_given_INSTALL="$INSTALL"
10595
10596 trap 'rm -fr `echo "\
10597 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10598 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10599 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10600 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10601 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10602 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10603 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10604 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10605 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10606 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10607 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10608 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10609 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10610 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10611 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10612 include/Makefile:build/top.mk:include/Makefile.in \
10613 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10614 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10615 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10616 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10617 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10618 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10619 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10620 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10621 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10622 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10623 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10624 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10625 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10626 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10627 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10628 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10629 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10630 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10631 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10632 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10633 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10634 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10635 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10636 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10637  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10638 EOF
10639 cat >> $CONFIG_STATUS <<EOF
10640
10641 # Protect against being on the right side of a sed subst in config.status.
10642 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10643  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10644 $ac_vpsub
10645 $extrasub
10646 s%@SHELL@%$SHELL%g
10647 s%@CFLAGS@%$CFLAGS%g
10648 s%@CPPFLAGS@%$CPPFLAGS%g
10649 s%@CXXFLAGS@%$CXXFLAGS%g
10650 s%@FFLAGS@%$FFLAGS%g
10651 s%@DEFS@%$DEFS%g
10652 s%@LDFLAGS@%$LDFLAGS%g
10653 s%@LIBS@%$LIBS%g
10654 s%@exec_prefix@%$exec_prefix%g
10655 s%@prefix@%$prefix%g
10656 s%@program_transform_name@%$program_transform_name%g
10657 s%@bindir@%$bindir%g
10658 s%@sbindir@%$sbindir%g
10659 s%@libexecdir@%$libexecdir%g
10660 s%@datadir@%$datadir%g
10661 s%@sysconfdir@%$sysconfdir%g
10662 s%@sharedstatedir@%$sharedstatedir%g
10663 s%@localstatedir@%$localstatedir%g
10664 s%@libdir@%$libdir%g
10665 s%@includedir@%$includedir%g
10666 s%@oldincludedir@%$oldincludedir%g
10667 s%@infodir@%$infodir%g
10668 s%@mandir@%$mandir%g
10669 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10670 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10671 s%@INSTALL_DATA@%$INSTALL_DATA%g
10672 s%@PACKAGE@%$PACKAGE%g
10673 s%@VERSION@%$VERSION%g
10674 s%@ACLOCAL@%$ACLOCAL%g
10675 s%@AUTOCONF@%$AUTOCONF%g
10676 s%@AUTOMAKE@%$AUTOMAKE%g
10677 s%@AUTOHEADER@%$AUTOHEADER%g
10678 s%@MAKEINFO@%$MAKEINFO%g
10679 s%@SET_MAKE@%$SET_MAKE%g
10680 s%@top_builddir@%$top_builddir%g
10681 s%@ldap_subdir@%$ldap_subdir%g
10682 s%@host@%$host%g
10683 s%@host_alias@%$host_alias%g
10684 s%@host_cpu@%$host_cpu%g
10685 s%@host_vendor@%$host_vendor%g
10686 s%@host_os@%$host_os%g
10687 s%@RANLIB@%$RANLIB%g
10688 s%@CC@%$CC%g
10689 s%@LD@%$LD%g
10690 s%@NM@%$NM%g
10691 s%@LN_S@%$LN_S%g
10692 s%@LIBTOOL@%$LIBTOOL%g
10693 s%@AWK@%$AWK%g
10694 s%@LN_H@%$LN_H%g
10695 s%@SENDMAIL@%$SENDMAIL%g
10696 s%@EDITOR@%$EDITOR%g
10697 s%@FINGER@%$FINGER%g
10698 s%@PERLBIN@%$PERLBIN%g
10699 s%@CPP@%$CPP%g
10700 s%@EXEEXT@%$EXEEXT%g
10701 s%@OBJEXT@%$OBJEXT%g
10702 s%@PEPSY@%$PEPSY%g
10703 s%@LIBOBJS@%$LIBOBJS%g
10704 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
10705 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
10706 s%@BUILD_BDB2@%$BUILD_BDB2%g
10707 s%@BUILD_LDBM@%$BUILD_LDBM%g
10708 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
10709 s%@BUILD_PERL@%$BUILD_PERL%g
10710 s%@BUILD_SHELL@%$BUILD_SHELL%g
10711 s%@BUILD_TCL@%$BUILD_TCL%g
10712 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
10713 s%@LDAP_LIBS@%$LDAP_LIBS%g
10714 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
10715 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
10716 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
10717 s%@LDBM_LIBS@%$LDBM_LIBS%g
10718 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
10719 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
10720 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
10721 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
10722 s%@KRB_LIBS@%$KRB_LIBS%g
10723 s%@READLINE_LIBS@%$READLINE_LIBS%g
10724 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
10725 s%@TLS_LIBS@%$TLS_LIBS%g
10726
10727 CEOF
10728 EOF
10729
10730 cat >> $CONFIG_STATUS <<\EOF
10731
10732 # Split the substitutions into bite-sized pieces for seds with
10733 # small command number limits, like on Digital OSF/1 and HP-UX.
10734 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10735 ac_file=1 # Number of current file.
10736 ac_beg=1 # First line for current file.
10737 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10738 ac_more_lines=:
10739 ac_sed_cmds=""
10740 while $ac_more_lines; do
10741   if test $ac_beg -gt 1; then
10742     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10743   else
10744     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10745   fi
10746   if test ! -s conftest.s$ac_file; then
10747     ac_more_lines=false
10748     rm -f conftest.s$ac_file
10749   else
10750     if test -z "$ac_sed_cmds"; then
10751       ac_sed_cmds="sed -f conftest.s$ac_file"
10752     else
10753       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10754     fi
10755     ac_file=`expr $ac_file + 1`
10756     ac_beg=$ac_end
10757     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10758   fi
10759 done
10760 if test -z "$ac_sed_cmds"; then
10761   ac_sed_cmds=cat
10762 fi
10763 EOF
10764
10765 cat >> $CONFIG_STATUS <<EOF
10766
10767 CONFIG_FILES=\${CONFIG_FILES-"\
10768 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10769 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10770 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10771 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10772 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10773 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10774 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10775 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10776 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10777 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10778 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10779 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10780 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10781 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10782 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10783 include/Makefile:build/top.mk:include/Makefile.in \
10784 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10785 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10786 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10787 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10788 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10789 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10790 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10791 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10792 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10793 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10794 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10795 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10796 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10797 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10798 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10799 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10800 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10801 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10802 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10803 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10804 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10805 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10806 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10807 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10808 "}
10809 EOF
10810 cat >> $CONFIG_STATUS <<\EOF
10811 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10812   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10813   case "$ac_file" in
10814   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10815        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10816   *) ac_file_in="${ac_file}.in" ;;
10817   esac
10818
10819   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10820
10821   # Remove last slash and all that follows it.  Not all systems have dirname.
10822   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10823   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10824     # The file is in a subdirectory.
10825     test ! -d "$ac_dir" && mkdir "$ac_dir"
10826     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10827     # A "../" for each directory in $ac_dir_suffix.
10828     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10829   else
10830     ac_dir_suffix= ac_dots=
10831   fi
10832
10833   case "$ac_given_srcdir" in
10834   .)  srcdir=.
10835       if test -z "$ac_dots"; then top_srcdir=.
10836       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10837   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10838   *) # Relative path.
10839     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10840     top_srcdir="$ac_dots$ac_given_srcdir" ;;
10841   esac
10842
10843   case "$ac_given_INSTALL" in
10844   [/$]*) INSTALL="$ac_given_INSTALL" ;;
10845   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10846   esac
10847
10848   echo creating "$ac_file"
10849   rm -f "$ac_file"
10850   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10851   case "$ac_file" in
10852   *Makefile*) ac_comsub="1i\\
10853 # $configure_input" ;;
10854   *) ac_comsub= ;;
10855   esac
10856
10857   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10858   sed -e "$ac_comsub
10859 s%@configure_input@%$configure_input%g
10860 s%@srcdir@%$srcdir%g
10861 s%@top_srcdir@%$top_srcdir%g
10862 s%@INSTALL@%$INSTALL%g
10863 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10864 fi; done
10865 rm -f conftest.s*
10866
10867 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10868 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10869 #
10870 # ac_d sets the value in "#define NAME VALUE" lines.
10871 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
10872 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
10873 ac_dC='\3'
10874 ac_dD='%g'
10875 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10876 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10877 ac_uB='\([      ]\)%\1#\2define\3'
10878 ac_uC=' '
10879 ac_uD='\4%g'
10880 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10881 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10882 ac_eB='$%\1#\2define\3'
10883 ac_eC=' '
10884 ac_eD='%g'
10885
10886 if test "${CONFIG_HEADERS+set}" != set; then
10887 EOF
10888 cat >> $CONFIG_STATUS <<EOF
10889   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
10890 EOF
10891 cat >> $CONFIG_STATUS <<\EOF
10892 fi
10893 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10894   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10895   case "$ac_file" in
10896   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10897        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10898   *) ac_file_in="${ac_file}.in" ;;
10899   esac
10900
10901   echo creating $ac_file
10902
10903   rm -f conftest.frag conftest.in conftest.out
10904   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10905   cat $ac_file_inputs > conftest.in
10906
10907 EOF
10908
10909 # Transform confdefs.h into a sed script conftest.vals that substitutes
10910 # the proper values into config.h.in to produce config.h.  And first:
10911 # Protect against being on the right side of a sed subst in config.status.
10912 # Protect against being in an unquoted here document in config.status.
10913 rm -f conftest.vals
10914 cat > conftest.hdr <<\EOF
10915 s/[\\&%]/\\&/g
10916 s%[\\$`]%\\&%g
10917 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10918 s%ac_d%ac_u%gp
10919 s%ac_u%ac_e%gp
10920 EOF
10921 sed -n -f conftest.hdr confdefs.h > conftest.vals
10922 rm -f conftest.hdr
10923
10924 # This sed command replaces #undef with comments.  This is necessary, for
10925 # example, in the case of _POSIX_SOURCE, which is predefined and required
10926 # on some systems where configure will not decide to define it.
10927 cat >> conftest.vals <<\EOF
10928 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10929 EOF
10930
10931 # Break up conftest.vals because some shells have a limit on
10932 # the size of here documents, and old seds have small limits too.
10933
10934 rm -f conftest.tail
10935 while :
10936 do
10937   ac_lines=`grep -c . conftest.vals`
10938   # grep -c gives empty output for an empty file on some AIX systems.
10939   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10940   # Write a limited-size here document to conftest.frag.
10941   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10942   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10943   echo 'CEOF
10944   sed -f conftest.frag conftest.in > conftest.out
10945   rm -f conftest.in
10946   mv conftest.out conftest.in
10947 ' >> $CONFIG_STATUS
10948   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10949   rm -f conftest.vals
10950   mv conftest.tail conftest.vals
10951 done
10952 rm -f conftest.vals
10953
10954 cat >> $CONFIG_STATUS <<\EOF
10955   rm -f conftest.frag conftest.h
10956   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
10957   cat conftest.in >> conftest.h
10958   rm -f conftest.in
10959   if cmp -s $ac_file conftest.h 2>/dev/null; then
10960     echo "$ac_file is unchanged"
10961     rm -f conftest.h
10962   else
10963     # Remove last slash and all that follows it.  Not all systems have dirname.
10964       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10965       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10966       # The file is in a subdirectory.
10967       test ! -d "$ac_dir" && mkdir "$ac_dir"
10968     fi
10969     rm -f $ac_file
10970     mv conftest.h $ac_file
10971   fi
10972 fi; done
10973
10974 EOF
10975 cat >> $CONFIG_STATUS <<EOF
10976
10977 EOF
10978 cat >> $CONFIG_STATUS <<\EOF
10979
10980 date > stamp-h
10981 echo Please \"make depend\" to build dependencies
10982
10983 exit 0
10984 EOF
10985 chmod +x $CONFIG_STATUS
10986 rm -fr confdefs* $ac_clean_files
10987 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10988