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