]> git.sur5r.net Git - openldap/blob - configure
Don't call AC_CANONICAL_HOST from configure.in. We use feature tests.
[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 #if HAVE_PTHREADS_D4
4535         exit(pthread_create(&t, pthread_attr_default, task, NULL));
4536 #else
4537         exit(pthread_create(&t, NULL, task, NULL));
4538 #endif
4539 }
4540
4541 EOF
4542 if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4543 then
4544   ol_cv_pthread_create=yes
4545 else
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548   rm -fr conftest*
4549   ol_cv_pthread_create=no
4550 fi
4551 rm -fr conftest*
4552 fi
4553
4554 fi
4555
4556                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4557
4558                 if test $ol_cv_pthread_create != no ; then
4559                         ol_link_threads=posix
4560                 fi
4561
4562                 if test $ol_link_threads = no ; then
4563                                                 echo $ac_n "checking for pthread_create with -mt""... $ac_c" 1>&6
4564 echo "configure:4565: checking for pthread_create with -mt" >&5
4565 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4566   echo $ac_n "(cached) $ac_c" 1>&6
4567 else
4568   
4569                                                                 save_LIBS="$LIBS"
4570                                 LIBS="-mt $LIBS"
4571                                 cat > conftest.$ac_ext <<EOF
4572 #line 4573 "configure"
4573 #include "confdefs.h"
4574 char pthread_create();
4575 int main() {
4576 pthread_create();
4577 ; return 0; }
4578 EOF
4579 if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4580   rm -rf conftest*
4581   ol_cv_thread_flag=yes
4582 else
4583   echo "configure: failed program was:" >&5
4584   cat conftest.$ac_ext >&5
4585   rm -rf conftest*
4586   ol_cv_thread_flag=no
4587 fi
4588 rm -f conftest*
4589                                                                 LIBS="$save_LIBS"
4590                         
4591 fi
4592
4593 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4594
4595                         if test $ol_cv_thread_flag = yes ; then
4596                                 LTHREAD_LIBS="$LTHREAD_LIBS -mt"
4597                                 ol_link_threads=posix
4598                         fi
4599                 fi
4600
4601                 if test $ol_link_threads = no ; then
4602                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
4603 echo "configure:4604: checking for pthread_create with -kthread" >&5
4604 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   
4608                                                                 save_LIBS="$LIBS"
4609                                 LIBS="-kthread $LIBS"
4610                                 cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613 #include <pthread.h>
4614 int main() {
4615
4616 #if HAVE_PTHREADS_D4
4617         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4618 #else
4619         pthread_create(NULL,NULL,NULL,NULL);
4620 #endif
4621
4622 ; return 0; }
4623 EOF
4624 if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4625   rm -rf conftest*
4626   ol_cv_kthread_flag=yes
4627 else
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -rf conftest*
4631   ol_cv_kthread_flag=no
4632 fi
4633 rm -f conftest*
4634                                                                 LIBS="$save_LIBS"
4635                         
4636 fi
4637
4638 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
4639
4640                         if test $ol_cv_kthread_flag = yes ; then
4641                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
4642                                 ol_link_threads=posix
4643                         fi
4644                 fi
4645
4646                 if test $ol_link_threads = no ; then
4647                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
4648 echo "configure:4649: checking for pthread_create with -pthread" >&5
4649 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   
4653                                                                 save_LIBS="$LIBS"
4654                                 LIBS="-pthread $LIBS"
4655                                 cat > conftest.$ac_ext <<EOF
4656 #line 4657 "configure"
4657 #include "confdefs.h"
4658 #include <pthread.h>
4659 int main() {
4660
4661 #if HAVE_PTHREADS_D4
4662         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4663 #else
4664         pthread_create(NULL,NULL,NULL,NULL);
4665 #endif
4666
4667 ; return 0; }
4668 EOF
4669 if { (eval echo configure:4670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4670   rm -rf conftest*
4671   ol_cv_pthread_flag=yes
4672 else
4673   echo "configure: failed program was:" >&5
4674   cat conftest.$ac_ext >&5
4675   rm -rf conftest*
4676   ol_cv_pthread_flag=no
4677 fi
4678 rm -f conftest*
4679                                                                 LIBS="$save_LIBS"
4680                         
4681 fi
4682
4683 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
4684
4685                         if test $ol_cv_pthread_flag = yes ; then
4686                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
4687                                 ol_link_threads=posix
4688                         fi
4689                 fi
4690
4691                 if test $ol_link_threads = no ; then
4692                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4693 echo "configure:4694: checking for pthread_create with -pthreads" >&5
4694 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   
4698                                                                 save_LIBS="$LIBS"
4699                                 LIBS="-pthreads $LIBS"
4700                                 cat > conftest.$ac_ext <<EOF
4701 #line 4702 "configure"
4702 #include "confdefs.h"
4703 #include <pthread.h>
4704 int main() {
4705
4706 #if HAVE_PTHREADS_D4
4707         pthread_create(NULL,pthread_attr_default,NULL,NULL);
4708 #else
4709         pthread_create(NULL,NULL,NULL,NULL);
4710 #endif
4711
4712 ; return 0; }
4713 EOF
4714 if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4715   rm -rf conftest*
4716   ol_cv_pthreads_flag=yes
4717 else
4718   echo "configure: failed program was:" >&5
4719   cat conftest.$ac_ext >&5
4720   rm -rf conftest*
4721   ol_cv_pthreads_flag=no
4722 fi
4723 rm -f conftest*
4724                                                                 LIBS="$save_LIBS"
4725                         
4726 fi
4727
4728 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4729
4730                         if test $ol_cv_pthreads_flag = yes ; then
4731                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4732                                 ol_link_threads=posix
4733                         fi
4734                 fi
4735
4736                 if test $ol_link_threads = no ; then
4737                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4738 echo "configure:4739: checking for pthread_create with -thread" >&5
4739 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   
4743                                                                 save_LIBS="$LIBS"
4744                                 LIBS="-thread $LIBS"
4745                                 cat > conftest.$ac_ext <<EOF
4746 #line 4747 "configure"
4747 #include "confdefs.h"
4748 char pthread_create();
4749 int main() {
4750 pthread_create();
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   ol_cv_thread_flag=yes
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   ol_cv_thread_flag=no
4761 fi
4762 rm -f conftest*
4763                                                                 LIBS="$save_LIBS"
4764                         
4765 fi
4766
4767 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4768
4769                         if test $ol_cv_thread_flag = yes ; then
4770                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4771                                 ol_link_threads=posix
4772                         fi
4773                 fi
4774
4775                 if test $ol_link_threads = no ; then
4776                                                 save_LIBS="$LIBS"
4777                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4778 echo "configure:4779: checking for pthread_mutex_unlock in -lpthread" >&5
4779 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4781   echo $ac_n "(cached) $ac_c" 1>&6
4782 else
4783   ac_save_LIBS="$LIBS"
4784 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 /* Override any gcc2 internal prototype to avoid an error.  */
4789 /* We use char because int might match the return type of a gcc2
4790     builtin and then its argument prototype would still apply.  */
4791 char pthread_mutex_unlock();
4792
4793 int main() {
4794 pthread_mutex_unlock()
4795 ; return 0; }
4796 EOF
4797 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4798   rm -rf conftest*
4799   eval "ac_cv_lib_$ac_lib_var=yes"
4800 else
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -rf conftest*
4804   eval "ac_cv_lib_$ac_lib_var=no"
4805 fi
4806 rm -f conftest*
4807 LIBS="$ac_save_LIBS"
4808
4809 fi
4810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812   
4813                                 ol_link_threads=posix
4814                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4815                                 if test $ol_with_yielding_select = auto ; then
4816                                         ol_with_yielding_select=yes
4817                                 fi
4818                                 
4819 else
4820   echo "$ac_t""no" 1>&6
4821 :
4822 fi
4823
4824                         LIBS="$save_LIBS"
4825                 fi
4826
4827                 if test $ol_link_threads = no ; then
4828                                                 save_LIBS="$LIBS"
4829                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4830 echo "configure:4831: checking for pthread_mutex_lock in -lpthread" >&5
4831 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4832 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4833   echo $ac_n "(cached) $ac_c" 1>&6
4834 else
4835   ac_save_LIBS="$LIBS"
4836 LIBS="-lpthread -lmach -lexc $LIBS"
4837 cat > conftest.$ac_ext <<EOF
4838 #line 4839 "configure"
4839 #include "confdefs.h"
4840 /* Override any gcc2 internal prototype to avoid an error.  */
4841 /* We use char because int might match the return type of a gcc2
4842     builtin and then its argument prototype would still apply.  */
4843 char pthread_mutex_lock();
4844
4845 int main() {
4846 pthread_mutex_lock()
4847 ; return 0; }
4848 EOF
4849 if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4850   rm -rf conftest*
4851   eval "ac_cv_lib_$ac_lib_var=yes"
4852 else
4853   echo "configure: failed program was:" >&5
4854   cat conftest.$ac_ext >&5
4855   rm -rf conftest*
4856   eval "ac_cv_lib_$ac_lib_var=no"
4857 fi
4858 rm -f conftest*
4859 LIBS="$ac_save_LIBS"
4860
4861 fi
4862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4863   echo "$ac_t""yes" 1>&6
4864   
4865                                 ol_link_threads=posix
4866                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
4867                                 if test $ol_with_yielding_select = auto ; then
4868                                         ol_with_yielding_select=yes
4869                                 fi
4870                                 
4871 else
4872   echo "$ac_t""no" 1>&6
4873 :
4874 fi
4875
4876                         LIBS="$save_LIBS"
4877                 fi
4878
4879                 if test $ol_link_threads = no ; then
4880                                                 save_LIBS="$LIBS"
4881                         echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
4882 echo "configure:4883: checking for pthread_mutex_trylock in -lpthread" >&5
4883 ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
4884 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4885   echo $ac_n "(cached) $ac_c" 1>&6
4886 else
4887   ac_save_LIBS="$LIBS"
4888 LIBS="-lpthread -lexc $LIBS"
4889 cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4892 /* Override any gcc2 internal prototype to avoid an error.  */
4893 /* We use char because int might match the return type of a gcc2
4894     builtin and then its argument prototype would still apply.  */
4895 char pthread_mutex_trylock();
4896
4897 int main() {
4898 pthread_mutex_trylock()
4899 ; return 0; }
4900 EOF
4901 if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4902   rm -rf conftest*
4903   eval "ac_cv_lib_$ac_lib_var=yes"
4904 else
4905   echo "configure: failed program was:" >&5
4906   cat conftest.$ac_ext >&5
4907   rm -rf conftest*
4908   eval "ac_cv_lib_$ac_lib_var=no"
4909 fi
4910 rm -f conftest*
4911 LIBS="$ac_save_LIBS"
4912
4913 fi
4914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4915   echo "$ac_t""yes" 1>&6
4916   
4917                                 ol_link_threads=posix
4918                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4919                                 if test $ol_with_yielding_select = auto ; then
4920                                         ol_with_yielding_select=yes
4921                                 fi
4922                                 
4923 else
4924   echo "$ac_t""no" 1>&6
4925 :
4926 fi
4927
4928                         LIBS="$save_LIBS"
4929                 fi
4930
4931                 if test $ol_link_threads = no ; then
4932                                                 save_LIBS="$LIBS"
4933                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4934 echo "configure:4935: checking for pthread_create in -lpthread" >&5
4935 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4937   echo $ac_n "(cached) $ac_c" 1>&6
4938 else
4939   ac_save_LIBS="$LIBS"
4940 LIBS="-lpthread  $LIBS"
4941 cat > conftest.$ac_ext <<EOF
4942 #line 4943 "configure"
4943 #include "confdefs.h"
4944 /* Override any gcc2 internal prototype to avoid an error.  */
4945 /* We use char because int might match the return type of a gcc2
4946     builtin and then its argument prototype would still apply.  */
4947 char pthread_create();
4948
4949 int main() {
4950 pthread_create()
4951 ; return 0; }
4952 EOF
4953 if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4954   rm -rf conftest*
4955   eval "ac_cv_lib_$ac_lib_var=yes"
4956 else
4957   echo "configure: failed program was:" >&5
4958   cat conftest.$ac_ext >&5
4959   rm -rf conftest*
4960   eval "ac_cv_lib_$ac_lib_var=no"
4961 fi
4962 rm -f conftest*
4963 LIBS="$ac_save_LIBS"
4964
4965 fi
4966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968   
4969                                 ol_link_threads=posix
4970                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4971 else
4972   echo "$ac_t""no" 1>&6
4973 :
4974 fi
4975
4976                         LIBS="$save_LIBS"
4977                 fi
4978
4979                 if test $ol_link_threads = no ; then
4980                                                 save_LIBS="$LIBS"
4981                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
4982 echo "configure:4983: checking for pthread_create in -lc_r" >&5
4983 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   ac_save_LIBS="$LIBS"
4988 LIBS="-lc_r  $LIBS"
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992 /* Override any gcc2 internal prototype to avoid an error.  */
4993 /* We use char because int might match the return type of a gcc2
4994     builtin and then its argument prototype would still apply.  */
4995 char pthread_create();
4996
4997 int main() {
4998 pthread_create()
4999 ; return 0; }
5000 EOF
5001 if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=yes"
5004 else
5005   echo "configure: failed program was:" >&5
5006   cat conftest.$ac_ext >&5
5007   rm -rf conftest*
5008   eval "ac_cv_lib_$ac_lib_var=no"
5009 fi
5010 rm -f conftest*
5011 LIBS="$ac_save_LIBS"
5012
5013 fi
5014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5015   echo "$ac_t""yes" 1>&6
5016   
5017                                 ol_link_threads=posix
5018                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
5019 else
5020   echo "$ac_t""no" 1>&6
5021 :
5022 fi
5023
5024                         LIBS="$save_LIBS"
5025                 fi
5026
5027                 if test $ol_link_threads = no ; then
5028                                                 save_LIBS="$LIBS"
5029                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5030 echo "configure:5031: checking for pthread_create in -lpthreads" >&5
5031 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
5032 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5033   echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5035   ac_save_LIBS="$LIBS"
5036 LIBS="-lpthreads  $LIBS"
5037 cat > conftest.$ac_ext <<EOF
5038 #line 5039 "configure"
5039 #include "confdefs.h"
5040 /* Override any gcc2 internal prototype to avoid an error.  */
5041 /* We use char because int might match the return type of a gcc2
5042     builtin and then its argument prototype would still apply.  */
5043 char pthread_create();
5044
5045 int main() {
5046 pthread_create()
5047 ; return 0; }
5048 EOF
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050   rm -rf conftest*
5051   eval "ac_cv_lib_$ac_lib_var=yes"
5052 else
5053   echo "configure: failed program was:" >&5
5054   cat conftest.$ac_ext >&5
5055   rm -rf conftest*
5056   eval "ac_cv_lib_$ac_lib_var=no"
5057 fi
5058 rm -f conftest*
5059 LIBS="$ac_save_LIBS"
5060
5061 fi
5062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5063   echo "$ac_t""yes" 1>&6
5064   
5065                                 ol_link_threads=posix
5066                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5067 else
5068   echo "$ac_t""no" 1>&6
5069 :
5070 fi
5071
5072                         LIBS="$save_LIBS"
5073                 fi
5074
5075                                 if test $ol_link_threads = no ; then
5076                                                 save_LIBS="$LIBS"
5077                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
5078 echo "configure:5079: checking for pthread_join in -lpthreads" >&5
5079 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
5080 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5081   echo $ac_n "(cached) $ac_c" 1>&6
5082 else
5083   ac_save_LIBS="$LIBS"
5084 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
5085 cat > conftest.$ac_ext <<EOF
5086 #line 5087 "configure"
5087 #include "confdefs.h"
5088 /* Override any gcc2 internal prototype to avoid an error.  */
5089 /* We use char because int might match the return type of a gcc2
5090     builtin and then its argument prototype would still apply.  */
5091 char pthread_join();
5092
5093 int main() {
5094 pthread_join()
5095 ; return 0; }
5096 EOF
5097 if { (eval echo configure:5098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5098   rm -rf conftest*
5099   eval "ac_cv_lib_$ac_lib_var=yes"
5100 else
5101   echo "configure: failed program was:" >&5
5102   cat conftest.$ac_ext >&5
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=no"
5105 fi
5106 rm -f conftest*
5107 LIBS="$ac_save_LIBS"
5108
5109 fi
5110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5111   echo "$ac_t""yes" 1>&6
5112   
5113                                 ol_link_threads=posix
5114                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
5115                                 
5116 else
5117   echo "$ac_t""no" 1>&6
5118 :
5119 fi
5120
5121                         LIBS="$save_LIBS"
5122                 fi
5123
5124                 if test $ol_link_threads = no ; then
5125                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
5126 echo "configure:5127: checking for pthread_create with -threads" >&5
5127 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
5128   echo $ac_n "(cached) $ac_c" 1>&6
5129 else
5130   
5131                                                                 save_LIBS="$LIBS"
5132                                 LIBS="-threads $LIBS"
5133                                 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 char pthread_create();
5137 int main() {
5138
5139                                         pthread_create();
5140                                         
5141 ; return 0; }
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5144   rm -rf conftest*
5145   ol_cv_thread_flag=yes
5146 else
5147   echo "configure: failed program was:" >&5
5148   cat conftest.$ac_ext >&5
5149   rm -rf conftest*
5150   ol_cv_thread_flag=no
5151 fi
5152 rm -f conftest*
5153                                                                 LIBS="$save_LIBS"
5154                         
5155 fi
5156
5157 echo "$ac_t""$ol_cv_thread_flag" 1>&6
5158
5159                         if test $ol_cv_thread_flag = yes ; then
5160                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
5161                                 ol_link_threads=posix
5162                         fi
5163                 fi
5164
5165                 if test $ol_link_threads = no ; then
5166                                                 save_LIBS="$LIBS"
5167                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
5168 echo "configure:5169: checking for pthread_mutex_unlock in -lpthreads" >&5
5169 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
5170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5171   echo $ac_n "(cached) $ac_c" 1>&6
5172 else
5173   ac_save_LIBS="$LIBS"
5174 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 /* Override any gcc2 internal prototype to avoid an error.  */
5179 /* We use char because int might match the return type of a gcc2
5180     builtin and then its argument prototype would still apply.  */
5181 char pthread_mutex_unlock();
5182
5183 int main() {
5184 pthread_mutex_unlock()
5185 ; return 0; }
5186 EOF
5187 if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5188   rm -rf conftest*
5189   eval "ac_cv_lib_$ac_lib_var=yes"
5190 else
5191   echo "configure: failed program was:" >&5
5192   cat conftest.$ac_ext >&5
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=no"
5195 fi
5196 rm -f conftest*
5197 LIBS="$ac_save_LIBS"
5198
5199 fi
5200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5201   echo "$ac_t""yes" 1>&6
5202   
5203                                 ol_link_threads=posix
5204                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
5205                                 if test $ol_with_yielding_select = auto ; then
5206                                         ol_with_yielding_select=yes
5207                                 fi
5208                                 
5209 else
5210   echo "$ac_t""no" 1>&6
5211 :
5212 fi
5213
5214                         LIBS="$save_LIBS"
5215                 fi
5216
5217                 if test $ol_link_threads = no ; then
5218                                                 save_LIBS="$LIBS"
5219                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
5220 echo "configure:5221: checking for pthread_mutex_lock in -lpthreads" >&5
5221 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
5222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   ac_save_LIBS="$LIBS"
5226 LIBS="-lpthreads -lmach -lexc $LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 /* Override any gcc2 internal prototype to avoid an error.  */
5231 /* We use char because int might match the return type of a gcc2
5232     builtin and then its argument prototype would still apply.  */
5233 char pthread_mutex_lock();
5234
5235 int main() {
5236 pthread_mutex_lock()
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_lib_$ac_lib_var=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=no"
5247 fi
5248 rm -f conftest*
5249 LIBS="$ac_save_LIBS"
5250
5251 fi
5252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254   
5255                                 ol_link_threads=posix
5256                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc"
5257                                 if test $ol_with_yielding_select = auto ; then
5258                                         ol_with_yielding_select=yes
5259                                 fi
5260                                 
5261 else
5262   echo "$ac_t""no" 1>&6
5263 :
5264 fi
5265
5266                         LIBS="$save_LIBS"
5267                 fi
5268
5269                 if test $ol_link_threads = no ; then
5270                                                 save_LIBS="$LIBS"
5271                         echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6
5272 echo "configure:5273: checking for pthread_mutex_trylock in -lpthreads" >&5
5273 ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'`
5274 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   ac_save_LIBS="$LIBS"
5278 LIBS="-lpthreads -lexc $LIBS"
5279 cat > conftest.$ac_ext <<EOF
5280 #line 5281 "configure"
5281 #include "confdefs.h"
5282 /* Override any gcc2 internal prototype to avoid an error.  */
5283 /* We use char because int might match the return type of a gcc2
5284     builtin and then its argument prototype would still apply.  */
5285 char pthread_mutex_trylock();
5286
5287 int main() {
5288 pthread_mutex_trylock()
5289 ; return 0; }
5290 EOF
5291 if { (eval echo configure:5292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5292   rm -rf conftest*
5293   eval "ac_cv_lib_$ac_lib_var=yes"
5294 else
5295   echo "configure: failed program was:" >&5
5296   cat conftest.$ac_ext >&5
5297   rm -rf conftest*
5298   eval "ac_cv_lib_$ac_lib_var=no"
5299 fi
5300 rm -f conftest*
5301 LIBS="$ac_save_LIBS"
5302
5303 fi
5304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5305   echo "$ac_t""yes" 1>&6
5306   
5307                                 ol_link_threads=posix
5308                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
5309                                 if test $ol_with_yielding_select = auto ; then
5310                                         ol_with_yielding_select=yes
5311                                 fi
5312                                 
5313 else
5314   echo "$ac_t""no" 1>&6
5315 :
5316 fi
5317
5318                         LIBS="$save_LIBS"
5319                 fi
5320
5321                 if test $ol_link_threads != no ; then
5322                         cat >> confdefs.h <<\EOF
5323 #define HAVE_PTHREADS 1
5324 EOF
5325
5326
5327                                                 save_CPPFLAGS="$CPPFLAGS"
5328                         save_LIBS="$LIBS"
5329                         LIBS="$LTHREAD_LIBS $LIBS"
5330
5331                                                                                                 for ac_func in sched_yield pthread_yield
5332 do
5333 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5334 echo "configure:5335: checking for $ac_func" >&5
5335 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5336   echo $ac_n "(cached) $ac_c" 1>&6
5337 else
5338   cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341 /* System header to define __stub macros and hopefully few prototypes,
5342     which can conflict with char $ac_func(); below.  */
5343 #include <assert.h>
5344 /* Override any gcc2 internal prototype to avoid an error.  */
5345 /* We use char because int might match the return type of a gcc2
5346     builtin and then its argument prototype would still apply.  */
5347 char $ac_func();
5348
5349 int main() {
5350
5351 /* The GNU C library defines this for functions which it implements
5352     to always fail with ENOSYS.  Some functions are actually named
5353     something starting with __ and the normal name is an alias.  */
5354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5355 choke me
5356 #else
5357 $ac_func();
5358 #endif
5359
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5363   rm -rf conftest*
5364   eval "ac_cv_func_$ac_func=yes"
5365 else
5366   echo "configure: failed program was:" >&5
5367   cat conftest.$ac_ext >&5
5368   rm -rf conftest*
5369   eval "ac_cv_func_$ac_func=no"
5370 fi
5371 rm -f conftest*
5372 fi
5373
5374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5375   echo "$ac_t""yes" 1>&6
5376     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5377   cat >> confdefs.h <<EOF
5378 #define $ac_tr_func 1
5379 EOF
5380  
5381 else
5382   echo "$ac_t""no" 1>&6
5383 fi
5384 done
5385
5386
5387                         if test $ac_cv_func_sched_yield = no -a \
5388                                 $ac_cv_func_pthread_yield = no ; then
5389                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5390 echo "configure:5391: checking for sched_yield in -lrt" >&5
5391 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5393   echo $ac_n "(cached) $ac_c" 1>&6
5394 else
5395   ac_save_LIBS="$LIBS"
5396 LIBS="-lrt  $LIBS"
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 /* Override any gcc2 internal prototype to avoid an error.  */
5401 /* We use char because int might match the return type of a gcc2
5402     builtin and then its argument prototype would still apply.  */
5403 char sched_yield();
5404
5405 int main() {
5406 sched_yield()
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5410   rm -rf conftest*
5411   eval "ac_cv_lib_$ac_lib_var=yes"
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   eval "ac_cv_lib_$ac_lib_var=no"
5417 fi
5418 rm -f conftest*
5419 LIBS="$ac_save_LIBS"
5420
5421 fi
5422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5425                                         cat >> confdefs.h <<\EOF
5426 #define HAVE_SCHED_YIELD 1
5427 EOF
5428
5429                                         ac_cv_func_sched_yield=yes
5430 else
5431   echo "$ac_t""no" 1>&6
5432 ac_cv_func_sched_yield=no
5433 fi
5434
5435                         fi
5436                         if test $ac_cv_func_sched_yield = no -a \
5437                                 $ac_cv_func_pthread_yield = no ; then
5438                                                                                                 for ac_func in thr_yield
5439 do
5440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5441 echo "configure:5442: checking for $ac_func" >&5
5442 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5443   echo $ac_n "(cached) $ac_c" 1>&6
5444 else
5445   cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 /* System header to define __stub macros and hopefully few prototypes,
5449     which can conflict with char $ac_func(); below.  */
5450 #include <assert.h>
5451 /* Override any gcc2 internal prototype to avoid an error.  */
5452 /* We use char because int might match the return type of a gcc2
5453     builtin and then its argument prototype would still apply.  */
5454 char $ac_func();
5455
5456 int main() {
5457
5458 /* The GNU C library defines this for functions which it implements
5459     to always fail with ENOSYS.  Some functions are actually named
5460     something starting with __ and the normal name is an alias.  */
5461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5462 choke me
5463 #else
5464 $ac_func();
5465 #endif
5466
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5470   rm -rf conftest*
5471   eval "ac_cv_func_$ac_func=yes"
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   eval "ac_cv_func_$ac_func=no"
5477 fi
5478 rm -f conftest*
5479 fi
5480
5481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5482   echo "$ac_t""yes" 1>&6
5483     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5484   cat >> confdefs.h <<EOF
5485 #define $ac_tr_func 1
5486 EOF
5487  
5488 else
5489   echo "$ac_t""no" 1>&6
5490 fi
5491 done
5492
5493                         fi
5494                         if test $ac_cv_func_sched_yield = no -a \
5495                                 $ac_cv_func_pthread_yield = no -a \
5496                                 "$ac_cv_func_thr_yield" = no ; then
5497                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5498                         fi
5499
5500                                                 for ac_func in pthread_kill
5501 do
5502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5503 echo "configure:5504: checking for $ac_func" >&5
5504 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5505   echo $ac_n "(cached) $ac_c" 1>&6
5506 else
5507   cat > conftest.$ac_ext <<EOF
5508 #line 5509 "configure"
5509 #include "confdefs.h"
5510 /* System header to define __stub macros and hopefully few prototypes,
5511     which can conflict with char $ac_func(); below.  */
5512 #include <assert.h>
5513 /* Override any gcc2 internal prototype to avoid an error.  */
5514 /* We use char because int might match the return type of a gcc2
5515     builtin and then its argument prototype would still apply.  */
5516 char $ac_func();
5517
5518 int main() {
5519
5520 /* The GNU C library defines this for functions which it implements
5521     to always fail with ENOSYS.  Some functions are actually named
5522     something starting with __ and the normal name is an alias.  */
5523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5524 choke me
5525 #else
5526 $ac_func();
5527 #endif
5528
5529 ; return 0; }
5530 EOF
5531 if { (eval echo configure:5532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5532   rm -rf conftest*
5533   eval "ac_cv_func_$ac_func=yes"
5534 else
5535   echo "configure: failed program was:" >&5
5536   cat conftest.$ac_ext >&5
5537   rm -rf conftest*
5538   eval "ac_cv_func_$ac_func=no"
5539 fi
5540 rm -f conftest*
5541 fi
5542
5543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5544   echo "$ac_t""yes" 1>&6
5545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5546   cat >> confdefs.h <<EOF
5547 #define $ac_tr_func 1
5548 EOF
5549  
5550 else
5551   echo "$ac_t""no" 1>&6
5552 fi
5553 done
5554
5555
5556                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
5557 echo "configure:5558: checking for pthread_detach with <pthread.h>" >&5
5558 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
5559   echo $ac_n "(cached) $ac_c" 1>&6
5560 else
5561   
5562                                                                 cat > conftest.$ac_ext <<EOF
5563 #line 5564 "configure"
5564 #include "confdefs.h"
5565
5566 #include <pthread.h>
5567 #ifndef NULL
5568 #define NULL (void*)0
5569 #endif
5570
5571 int main() {
5572 pthread_detach(NULL);
5573 ; return 0; }
5574 EOF
5575 if { (eval echo configure:5576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5576   rm -rf conftest*
5577   ol_cv_func_pthread_detach=yes
5578 else
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581   rm -rf conftest*
5582   ol_cv_func_pthread_detach=no
5583 fi
5584 rm -f conftest*
5585                         
5586 fi
5587
5588 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
5589
5590                         if test $ol_cv_func_pthread_detach = no ; then
5591                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
5592                         fi
5593
5594                         cat >> confdefs.h <<\EOF
5595 #define HAVE_PTHREAD_DETACH 1
5596 EOF
5597
5598
5599                                                 for ac_func in \
5600                                 pthread_setconcurrency \
5601                                 pthread_getconcurrency \
5602                                 thr_setconcurrency \
5603                                 thr_getconcurrency \
5604                         
5605 do
5606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5607 echo "configure:5608: checking for $ac_func" >&5
5608 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611   cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614 /* System header to define __stub macros and hopefully few prototypes,
5615     which can conflict with char $ac_func(); below.  */
5616 #include <assert.h>
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 /* We use char because int might match the return type of a gcc2
5619     builtin and then its argument prototype would still apply.  */
5620 char $ac_func();
5621
5622 int main() {
5623
5624 /* The GNU C library defines this for functions which it implements
5625     to always fail with ENOSYS.  Some functions are actually named
5626     something starting with __ and the normal name is an alias.  */
5627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5628 choke me
5629 #else
5630 $ac_func();
5631 #endif
5632
5633 ; return 0; }
5634 EOF
5635 if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5636   rm -rf conftest*
5637   eval "ac_cv_func_$ac_func=yes"
5638 else
5639   echo "configure: failed program was:" >&5
5640   cat conftest.$ac_ext >&5
5641   rm -rf conftest*
5642   eval "ac_cv_func_$ac_func=no"
5643 fi
5644 rm -f conftest*
5645 fi
5646
5647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5648   echo "$ac_t""yes" 1>&6
5649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_func 1
5652 EOF
5653  
5654 else
5655   echo "$ac_t""no" 1>&6
5656 fi
5657 done
5658
5659
5660                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
5661 echo "configure:5662: checking if pthread_create() works" >&5
5662                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   
5666                         if test "$cross_compiling" = yes; then
5667                                 ol_cv_pthread_create_works=yes
5668 else
5669   cat > conftest.$ac_ext <<EOF
5670 #line 5671 "configure"
5671 #include "confdefs.h"
5672
5673 #include <pthread.h>
5674 #ifndef NULL
5675 #define NULL (void*)0
5676 #endif
5677
5678 static void *task(p)
5679         void *p;
5680 {
5681         return (void *) (p == NULL);
5682 }
5683
5684 int main(argc, argv)
5685         int argc;
5686         char **argv;
5687 {
5688         pthread_t t;
5689 #if HAVE_PTHREADS_D4
5690         exit(pthread_create(&t, pthread_attr_default, task, NULL));
5691 #else
5692         exit(pthread_create(&t, NULL, task, NULL));
5693 #endif
5694 }
5695
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5698 then
5699   ol_cv_pthread_create_works=yes
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -fr conftest*
5704   ol_cv_pthread_create_works=no
5705 fi
5706 rm -fr conftest*
5707 fi
5708
5709 fi
5710
5711                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
5712
5713                         if test $ol_cv_pthread_create_works = no ; then
5714                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
5715                         fi
5716
5717                                                 if test $ol_with_yielding_select = auto ; then
5718                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
5719 echo "configure:5720: checking if select yields when using pthreads" >&5
5720                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
5721   echo $ac_n "(cached) $ac_c" 1>&6
5722 else
5723   
5724                                 if test "$cross_compiling" = yes; then
5725   
5726                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
5727 else
5728   cat > conftest.$ac_ext <<EOF
5729 #line 5730 "configure"
5730 #include "confdefs.h"
5731
5732 #include <sys/types.h>
5733 #include <sys/time.h>
5734 #include <unistd.h>
5735 #include <pthread.h>
5736 #ifndef NULL
5737 #define NULL (void*) 0
5738 #endif
5739
5740 static int fildes[2];
5741
5742 static void *task(p)
5743         void *p;
5744 {
5745         int i;
5746         struct timeval tv;
5747
5748         fd_set rfds;
5749
5750         tv.tv_sec=10;
5751         tv.tv_usec=0;
5752
5753         FD_ZERO(&rfds);
5754         FD_SET(fildes[0], &rfds);
5755
5756         /* we're not interested in any fds */
5757         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
5758
5759         if(i < 0) {
5760                 perror("select");
5761                 exit(10);
5762         }
5763
5764         exit(0); /* if we exit here, the select blocked the whole process */
5765 }
5766
5767 int main(argc, argv)
5768         int argc;
5769         char **argv;
5770 {
5771         pthread_t t;
5772
5773         /* create a pipe to select */
5774         if(pipe(&fildes[0])) {
5775                 perror("select");
5776                 exit(1);
5777         }
5778
5779 #ifdef HAVE_PTHREAD_SETCONCURRENCY
5780         (void) pthread_setconcurrency(2);
5781 #else
5782 #ifdef HAVE_THR_SETCONCURRENCY
5783         /* Set Solaris LWP concurrency to 2 */
5784         thr_setconcurrency(2);
5785 #endif
5786 #endif
5787
5788 #if HAVE_PTHREADS_D4
5789         pthread_create(&t, pthread_attr_default, task, NULL);
5790 #else
5791         pthread_create(&t, NULL, task, NULL);
5792 #endif
5793
5794 #if HAVE_SCHED_YIELD
5795         sched_yield();  /* make sure task runs first */
5796 #else
5797 #ifdef HAVE_PTHREAD_YIELD
5798         pthread_yield();        /* make sure task runs first */
5799 #endif
5800 #endif
5801
5802         exit(2);
5803 }
5804 EOF
5805 if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5806 then
5807   ol_cv_pthread_select_yields=no
5808 else
5809   echo "configure: failed program was:" >&5
5810   cat conftest.$ac_ext >&5
5811   rm -fr conftest*
5812   ol_cv_pthread_select_yields=yes
5813 fi
5814 rm -fr conftest*
5815 fi
5816
5817 fi
5818
5819                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5820
5821                                 if test $ol_cv_pthread_select_yields = yes ; then
5822                                         ol_with_yielding_select=yes
5823                                 fi
5824                         fi
5825
5826                                                 CPPFLAGS="$save_CPPFLAGS"
5827                         LIBS="$save_LIBS"
5828                 else
5829                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5830                 fi
5831         fi
5832
5833         if test $ol_with_threads = posix ; then
5834                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5835         fi
5836 fi
5837
5838 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5839         -o $ol_with_threads = mach ; then
5840
5841                 for ac_hdr in mach/cthreads.h
5842 do
5843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5845 echo "configure:5846: checking for $ac_hdr" >&5
5846 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5847   echo $ac_n "(cached) $ac_c" 1>&6
5848 else
5849   cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852 #include <$ac_hdr>
5853 EOF
5854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5855 { (eval echo configure:5856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5857 if test -z "$ac_err"; then
5858   rm -rf conftest*
5859   eval "ac_cv_header_$ac_safe=yes"
5860 else
5861   echo "$ac_err" >&5
5862   echo "configure: failed program was:" >&5
5863   cat conftest.$ac_ext >&5
5864   rm -rf conftest*
5865   eval "ac_cv_header_$ac_safe=no"
5866 fi
5867 rm -f conftest*
5868 fi
5869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5870   echo "$ac_t""yes" 1>&6
5871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5872   cat >> confdefs.h <<EOF
5873 #define $ac_tr_hdr 1
5874 EOF
5875  
5876 else
5877   echo "$ac_t""no" 1>&6
5878 fi
5879 done
5880
5881         if test $ac_cv_header_mach_cthreads_h = yes ; then
5882                 ol_with_threads=found
5883
5884                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5885 echo "configure:5886: checking for cthread_fork" >&5
5886 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5887   echo $ac_n "(cached) $ac_c" 1>&6
5888 else
5889   cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 /* System header to define __stub macros and hopefully few prototypes,
5893     which can conflict with char cthread_fork(); below.  */
5894 #include <assert.h>
5895 /* Override any gcc2 internal prototype to avoid an error.  */
5896 /* We use char because int might match the return type of a gcc2
5897     builtin and then its argument prototype would still apply.  */
5898 char cthread_fork();
5899
5900 int main() {
5901
5902 /* The GNU C library defines this for functions which it implements
5903     to always fail with ENOSYS.  Some functions are actually named
5904     something starting with __ and the normal name is an alias.  */
5905 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5906 choke me
5907 #else
5908 cthread_fork();
5909 #endif
5910
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_func_cthread_fork=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_func_cthread_fork=no"
5921 fi
5922 rm -f conftest*
5923 fi
5924
5925 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5926   echo "$ac_t""yes" 1>&6
5927   ol_link_threads=yes
5928 else
5929   echo "$ac_t""no" 1>&6
5930 fi
5931
5932
5933                 if test $ol_link_threads = no ; then
5934                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5935 echo "configure:5936: checking for cthread_fork with -all_load" >&5
5936 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5937   echo $ac_n "(cached) $ac_c" 1>&6
5938 else
5939   
5940                                                                 save_LIBS="$LIBS"
5941                                 LIBS="-all_load $LIBS"
5942                                 cat > conftest.$ac_ext <<EOF
5943 #line 5944 "configure"
5944 #include "confdefs.h"
5945 #include <mach/cthreads.h>
5946 int main() {
5947
5948                                         cthread_fork((void *)0, (void *)0);
5949                                         
5950 ; return 0; }
5951 EOF
5952 if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953   rm -rf conftest*
5954   ol_cv_cthread_all_load=yes
5955 else
5956   echo "configure: failed program was:" >&5
5957   cat conftest.$ac_ext >&5
5958   rm -rf conftest*
5959   ol_cv_cthread_all_load=no
5960 fi
5961 rm -f conftest*
5962                                                                 LIBS="$save_LIBS"
5963                         
5964 fi
5965
5966 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5967
5968                         if test $ol_cv_cthread_all_load = yes ; then
5969                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5970                                 ol_link_threads=mach
5971                         fi
5972                 fi
5973
5974                 if test $ol_link_threads != no ; then
5975                         : check for cthread specific functionality here
5976                         cat >> confdefs.h <<\EOF
5977 #define HAVE_MACH_CTHREADS 1
5978 EOF
5979
5980                 else
5981                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
5982                 fi
5983         fi
5984
5985         if test $ol_with_threads = mach ; then
5986                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
5987         fi
5988 fi
5989
5990 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5991         -o $ol_with_threads = lwp ; then
5992
5993                 for ac_hdr in thread.h synch.h
5994 do
5995 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5996 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5997 echo "configure:5998: checking for $ac_hdr" >&5
5998 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5999   echo $ac_n "(cached) $ac_c" 1>&6
6000 else
6001   cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004 #include <$ac_hdr>
6005 EOF
6006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6007 { (eval echo configure:6008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6009 if test -z "$ac_err"; then
6010   rm -rf conftest*
6011   eval "ac_cv_header_$ac_safe=yes"
6012 else
6013   echo "$ac_err" >&5
6014   echo "configure: failed program was:" >&5
6015   cat conftest.$ac_ext >&5
6016   rm -rf conftest*
6017   eval "ac_cv_header_$ac_safe=no"
6018 fi
6019 rm -f conftest*
6020 fi
6021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6022   echo "$ac_t""yes" 1>&6
6023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6024   cat >> confdefs.h <<EOF
6025 #define $ac_tr_hdr 1
6026 EOF
6027  
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031 done
6032
6033         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6034                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6035 echo "configure:6036: checking for thr_create in -lthread" >&5
6036 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6038   echo $ac_n "(cached) $ac_c" 1>&6
6039 else
6040   ac_save_LIBS="$LIBS"
6041 LIBS="-lthread  $LIBS"
6042 cat > conftest.$ac_ext <<EOF
6043 #line 6044 "configure"
6044 #include "confdefs.h"
6045 /* Override any gcc2 internal prototype to avoid an error.  */
6046 /* We use char because int might match the return type of a gcc2
6047     builtin and then its argument prototype would still apply.  */
6048 char thr_create();
6049
6050 int main() {
6051 thr_create()
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055   rm -rf conftest*
6056   eval "ac_cv_lib_$ac_lib_var=yes"
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   eval "ac_cv_lib_$ac_lib_var=no"
6062 fi
6063 rm -f conftest*
6064 LIBS="$ac_save_LIBS"
6065
6066 fi
6067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6068   echo "$ac_t""yes" 1>&6
6069   have_thr=yes
6070 else
6071   echo "$ac_t""no" 1>&6
6072 have_thr=no
6073 fi
6074
6075
6076                 if test $have_thr = yes ; then
6077                         cat >> confdefs.h <<\EOF
6078 #define HAVE_THR 1
6079 EOF
6080
6081                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6082                         ol_link_threads=thr
6083
6084                         if test $ol_with_yielding_select = auto ; then
6085                                 ol_with_yielding_select=yes
6086                         fi
6087
6088                                                 for ac_func in \
6089                                 thr_setconcurrency \
6090                                 thr_getconcurrency \
6091                         
6092 do
6093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6094 echo "configure:6095: checking for $ac_func" >&5
6095 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6096   echo $ac_n "(cached) $ac_c" 1>&6
6097 else
6098   cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 /* System header to define __stub macros and hopefully few prototypes,
6102     which can conflict with char $ac_func(); below.  */
6103 #include <assert.h>
6104 /* Override any gcc2 internal prototype to avoid an error.  */
6105 /* We use char because int might match the return type of a gcc2
6106     builtin and then its argument prototype would still apply.  */
6107 char $ac_func();
6108
6109 int main() {
6110
6111 /* The GNU C library defines this for functions which it implements
6112     to always fail with ENOSYS.  Some functions are actually named
6113     something starting with __ and the normal name is an alias.  */
6114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6115 choke me
6116 #else
6117 $ac_func();
6118 #endif
6119
6120 ; return 0; }
6121 EOF
6122 if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123   rm -rf conftest*
6124   eval "ac_cv_func_$ac_func=yes"
6125 else
6126   echo "configure: failed program was:" >&5
6127   cat conftest.$ac_ext >&5
6128   rm -rf conftest*
6129   eval "ac_cv_func_$ac_func=no"
6130 fi
6131 rm -f conftest*
6132 fi
6133
6134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6135   echo "$ac_t""yes" 1>&6
6136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6137   cat >> confdefs.h <<EOF
6138 #define $ac_tr_func 1
6139 EOF
6140  
6141 else
6142   echo "$ac_t""no" 1>&6
6143 fi
6144 done
6145
6146                 fi
6147         fi
6148
6149                 for ac_hdr in lwp/lwp.h
6150 do
6151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6153 echo "configure:6154: checking for $ac_hdr" >&5
6154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6155   echo $ac_n "(cached) $ac_c" 1>&6
6156 else
6157   cat > conftest.$ac_ext <<EOF
6158 #line 6159 "configure"
6159 #include "confdefs.h"
6160 #include <$ac_hdr>
6161 EOF
6162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6163 { (eval echo configure:6164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6165 if test -z "$ac_err"; then
6166   rm -rf conftest*
6167   eval "ac_cv_header_$ac_safe=yes"
6168 else
6169   echo "$ac_err" >&5
6170   echo "configure: failed program was:" >&5
6171   cat conftest.$ac_ext >&5
6172   rm -rf conftest*
6173   eval "ac_cv_header_$ac_safe=no"
6174 fi
6175 rm -f conftest*
6176 fi
6177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6178   echo "$ac_t""yes" 1>&6
6179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6180   cat >> confdefs.h <<EOF
6181 #define $ac_tr_hdr 1
6182 EOF
6183  
6184 else
6185   echo "$ac_t""no" 1>&6
6186 fi
6187 done
6188
6189         if test $ac_cv_header_lwp_lwp_h = yes ; then
6190                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6191 echo "configure:6192: checking for lwp_create in -llwp" >&5
6192 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6193 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6194   echo $ac_n "(cached) $ac_c" 1>&6
6195 else
6196   ac_save_LIBS="$LIBS"
6197 LIBS="-llwp  $LIBS"
6198 cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201 /* Override any gcc2 internal prototype to avoid an error.  */
6202 /* We use char because int might match the return type of a gcc2
6203     builtin and then its argument prototype would still apply.  */
6204 char lwp_create();
6205
6206 int main() {
6207 lwp_create()
6208 ; return 0; }
6209 EOF
6210 if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6211   rm -rf conftest*
6212   eval "ac_cv_lib_$ac_lib_var=yes"
6213 else
6214   echo "configure: failed program was:" >&5
6215   cat conftest.$ac_ext >&5
6216   rm -rf conftest*
6217   eval "ac_cv_lib_$ac_lib_var=no"
6218 fi
6219 rm -f conftest*
6220 LIBS="$ac_save_LIBS"
6221
6222 fi
6223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6224   echo "$ac_t""yes" 1>&6
6225   have_lwp=yes
6226 else
6227   echo "$ac_t""no" 1>&6
6228 have_lwp=no
6229 fi
6230
6231
6232                 if test $have_lwp = yes ; then
6233                         cat >> confdefs.h <<\EOF
6234 #define HAVE_LWP 1
6235 EOF
6236
6237                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6238                         ol_link_threads=lwp
6239
6240                         if test $ol_with_yielding_select = auto ; then
6241                                 ol_with_yielding_select=no
6242                         fi
6243                 fi
6244         fi
6245 fi
6246
6247 if test $ol_with_yielding_select = yes ; then
6248         cat >> confdefs.h <<\EOF
6249 #define HAVE_YIELDING_SELECT 1
6250 EOF
6251
6252 fi
6253
6254 if test $ol_with_threads = manual ; then
6255                 ol_link_threads=yes
6256
6257         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6258
6259         for ac_hdr in pthread.h sched.h
6260 do
6261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6263 echo "configure:6264: checking for $ac_hdr" >&5
6264 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6265   echo $ac_n "(cached) $ac_c" 1>&6
6266 else
6267   cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 #include <$ac_hdr>
6271 EOF
6272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6273 { (eval echo configure:6274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6275 if test -z "$ac_err"; then
6276   rm -rf conftest*
6277   eval "ac_cv_header_$ac_safe=yes"
6278 else
6279   echo "$ac_err" >&5
6280   echo "configure: failed program was:" >&5
6281   cat conftest.$ac_ext >&5
6282   rm -rf conftest*
6283   eval "ac_cv_header_$ac_safe=no"
6284 fi
6285 rm -f conftest*
6286 fi
6287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6288   echo "$ac_t""yes" 1>&6
6289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6290   cat >> confdefs.h <<EOF
6291 #define $ac_tr_hdr 1
6292 EOF
6293  
6294 else
6295   echo "$ac_t""no" 1>&6
6296 fi
6297 done
6298
6299         for ac_func in sched_yield pthread_yield
6300 do
6301 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6302 echo "configure:6303: checking for $ac_func" >&5
6303 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6304   echo $ac_n "(cached) $ac_c" 1>&6
6305 else
6306   cat > conftest.$ac_ext <<EOF
6307 #line 6308 "configure"
6308 #include "confdefs.h"
6309 /* System header to define __stub macros and hopefully few prototypes,
6310     which can conflict with char $ac_func(); below.  */
6311 #include <assert.h>
6312 /* Override any gcc2 internal prototype to avoid an error.  */
6313 /* We use char because int might match the return type of a gcc2
6314     builtin and then its argument prototype would still apply.  */
6315 char $ac_func();
6316
6317 int main() {
6318
6319 /* The GNU C library defines this for functions which it implements
6320     to always fail with ENOSYS.  Some functions are actually named
6321     something starting with __ and the normal name is an alias.  */
6322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6323 choke me
6324 #else
6325 $ac_func();
6326 #endif
6327
6328 ; return 0; }
6329 EOF
6330 if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6331   rm -rf conftest*
6332   eval "ac_cv_func_$ac_func=yes"
6333 else
6334   echo "configure: failed program was:" >&5
6335   cat conftest.$ac_ext >&5
6336   rm -rf conftest*
6337   eval "ac_cv_func_$ac_func=no"
6338 fi
6339 rm -f conftest*
6340 fi
6341
6342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6343   echo "$ac_t""yes" 1>&6
6344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6345   cat >> confdefs.h <<EOF
6346 #define $ac_tr_func 1
6347 EOF
6348  
6349 else
6350   echo "$ac_t""no" 1>&6
6351 fi
6352 done
6353
6354         
6355 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
6356 echo "configure:6357: checking for LinuxThreads" >&5
6357 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   
6361         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
6362         if test "$res" -gt 0 ; then
6363                 ol_cv_linux_threads=yes
6364         else
6365                 ol_cv_linux_threads=no
6366         fi
6367
6368 fi
6369
6370 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6371
6372
6373         for ac_hdr in mach/cthreads.h
6374 do
6375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6377 echo "configure:6378: checking for $ac_hdr" >&5
6378 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6379   echo $ac_n "(cached) $ac_c" 1>&6
6380 else
6381   cat > conftest.$ac_ext <<EOF
6382 #line 6383 "configure"
6383 #include "confdefs.h"
6384 #include <$ac_hdr>
6385 EOF
6386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6387 { (eval echo configure:6388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6389 if test -z "$ac_err"; then
6390   rm -rf conftest*
6391   eval "ac_cv_header_$ac_safe=yes"
6392 else
6393   echo "$ac_err" >&5
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_header_$ac_safe=no"
6398 fi
6399 rm -f conftest*
6400 fi
6401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6402   echo "$ac_t""yes" 1>&6
6403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6404   cat >> confdefs.h <<EOF
6405 #define $ac_tr_hdr 1
6406 EOF
6407  
6408 else
6409   echo "$ac_t""no" 1>&6
6410 fi
6411 done
6412
6413         for ac_hdr in lwp/lwp.h
6414 do
6415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6417 echo "configure:6418: checking for $ac_hdr" >&5
6418 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6419   echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421   cat > conftest.$ac_ext <<EOF
6422 #line 6423 "configure"
6423 #include "confdefs.h"
6424 #include <$ac_hdr>
6425 EOF
6426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6427 { (eval echo configure:6428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6429 if test -z "$ac_err"; then
6430   rm -rf conftest*
6431   eval "ac_cv_header_$ac_safe=yes"
6432 else
6433   echo "$ac_err" >&5
6434   echo "configure: failed program was:" >&5
6435   cat conftest.$ac_ext >&5
6436   rm -rf conftest*
6437   eval "ac_cv_header_$ac_safe=no"
6438 fi
6439 rm -f conftest*
6440 fi
6441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6442   echo "$ac_t""yes" 1>&6
6443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6444   cat >> confdefs.h <<EOF
6445 #define $ac_tr_hdr 1
6446 EOF
6447  
6448 else
6449   echo "$ac_t""no" 1>&6
6450 fi
6451 done
6452
6453         for ac_hdr in thread.h synch.h
6454 do
6455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6457 echo "configure:6458: checking for $ac_hdr" >&5
6458 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6459   echo $ac_n "(cached) $ac_c" 1>&6
6460 else
6461   cat > conftest.$ac_ext <<EOF
6462 #line 6463 "configure"
6463 #include "confdefs.h"
6464 #include <$ac_hdr>
6465 EOF
6466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6467 { (eval echo configure:6468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6469 if test -z "$ac_err"; then
6470   rm -rf conftest*
6471   eval "ac_cv_header_$ac_safe=yes"
6472 else
6473   echo "$ac_err" >&5
6474   echo "configure: failed program was:" >&5
6475   cat conftest.$ac_ext >&5
6476   rm -rf conftest*
6477   eval "ac_cv_header_$ac_safe=no"
6478 fi
6479 rm -f conftest*
6480 fi
6481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6482   echo "$ac_t""yes" 1>&6
6483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6484   cat >> confdefs.h <<EOF
6485 #define $ac_tr_hdr 1
6486 EOF
6487  
6488 else
6489   echo "$ac_t""no" 1>&6
6490 fi
6491 done
6492
6493 fi
6494
6495 if test $ol_link_threads != no ; then  
6496                         cat >> confdefs.h <<\EOF
6497 #define REENTRANT 1
6498 EOF
6499
6500         cat >> confdefs.h <<\EOF
6501 #define _REENTRANT 1
6502 EOF
6503
6504         cat >> confdefs.h <<\EOF
6505 #define THREAD_SAFE 1
6506 EOF
6507
6508         cat >> confdefs.h <<\EOF
6509 #define _THREAD_SAFE 1
6510 EOF
6511
6512         cat >> confdefs.h <<\EOF
6513 #define THREADSAFE 1
6514 EOF
6515
6516         cat >> confdefs.h <<\EOF
6517 #define _THREADSAFE 1
6518 EOF
6519
6520
6521                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
6522 echo "configure:6523: checking for thread specific errno" >&5
6523 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
6524   echo $ac_n "(cached) $ac_c" 1>&6
6525 else
6526   
6527                 cat > conftest.$ac_ext <<EOF
6528 #line 6529 "configure"
6529 #include "confdefs.h"
6530 #include <errno.h>
6531 int main() {
6532 int x = errno;
6533 ; return 0; }
6534 EOF
6535 if { (eval echo configure:6536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6536   rm -rf conftest*
6537   ol_cv_errno_thread_specific=yes
6538 else
6539   echo "configure: failed program was:" >&5
6540   cat conftest.$ac_ext >&5
6541   rm -rf conftest*
6542   ol_cv_errno_thread_specific=no
6543 fi
6544 rm -f conftest*
6545         
6546 fi
6547
6548 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
6549
6550         if test $ol_cv_errno_thread_specific != yes ; then
6551                 LIBS="$LTHREAD_LIBS $LIBS"
6552                 LTHREAD_LIBS=""
6553         fi
6554
6555 fi  
6556
6557 if test $ol_link_threads = no ; then
6558         if test $ol_with_threads = yes ; then
6559                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
6560         fi
6561
6562         if test $ol_with_threads = auto ; then
6563                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
6564                 ol_with_threads=no
6565         fi
6566
6567         cat >> confdefs.h <<\EOF
6568 #define NO_THREADS 1
6569 EOF
6570
6571         LTHREAD_LIBS=""
6572 fi
6573
6574 if test $ol_link_threads != no ; then
6575         cat >> confdefs.h <<\EOF
6576 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
6577 EOF
6578
6579 fi
6580
6581
6582 ol_link_ldbm=no 
6583 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
6584         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
6585 echo "configure:6586: checking for DB2 library" >&5
6586 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
6587   echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589         ol_LIBS="$LIBS"
6590         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
6591 echo "configure:6592: checking for db_open in -ldb" >&5
6592 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
6593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6594   echo $ac_n "(cached) $ac_c" 1>&6
6595 else
6596   ac_save_LIBS="$LIBS"
6597 LIBS="-ldb  $LIBS"
6598 cat > conftest.$ac_ext <<EOF
6599 #line 6600 "configure"
6600 #include "confdefs.h"
6601 /* Override any gcc2 internal prototype to avoid an error.  */
6602 /* We use char because int might match the return type of a gcc2
6603     builtin and then its argument prototype would still apply.  */
6604 char db_open();
6605
6606 int main() {
6607 db_open()
6608 ; return 0; }
6609 EOF
6610 if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6611   rm -rf conftest*
6612   eval "ac_cv_lib_$ac_lib_var=yes"
6613 else
6614   echo "configure: failed program was:" >&5
6615   cat conftest.$ac_ext >&5
6616   rm -rf conftest*
6617   eval "ac_cv_lib_$ac_lib_var=no"
6618 fi
6619 rm -f conftest*
6620 LIBS="$ac_save_LIBS"
6621
6622 fi
6623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6624   echo "$ac_t""yes" 1>&6
6625   ol_cv_lib_db2=-ldb
6626 else
6627   echo "$ac_t""no" 1>&6
6628 ol_cv_lib_db2=no
6629 fi
6630
6631         LIBS="$ol_LIBS"
6632
6633 fi
6634
6635 echo "$ac_t""$ol_cv_lib_db2" 1>&6
6636
6637 for ac_hdr in db.h
6638 do
6639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6641 echo "configure:6642: checking for $ac_hdr" >&5
6642 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 #include <$ac_hdr>
6649 EOF
6650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6651 { (eval echo configure:6652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6653 if test -z "$ac_err"; then
6654   rm -rf conftest*
6655   eval "ac_cv_header_$ac_safe=yes"
6656 else
6657   echo "$ac_err" >&5
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -rf conftest*
6661   eval "ac_cv_header_$ac_safe=no"
6662 fi
6663 rm -f conftest*
6664 fi
6665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6666   echo "$ac_t""yes" 1>&6
6667     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6668   cat >> confdefs.h <<EOF
6669 #define $ac_tr_hdr 1
6670 EOF
6671  
6672 else
6673   echo "$ac_t""no" 1>&6
6674 fi
6675 done
6676
6677 if test $ac_cv_header_db_h = yes ; then
6678         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
6679 echo "configure:6680: checking if db.h is DB2" >&5
6680 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
6681   echo $ac_n "(cached) $ac_c" 1>&6
6682 else
6683   
6684                 cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687
6688 #                       include <db.h>
6689                         /* this check could be improved */
6690 #                       ifdef DB_VERSION_MAJOR
6691 #                               if DB_VERSION_MAJOR == 2
6692                                         __db_version_2
6693 #                               endif
6694 #                       endif
6695                 
6696 EOF
6697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6698   egrep "__db_version_2" >/dev/null 2>&1; then
6699   rm -rf conftest*
6700   ol_cv_header_db2=yes
6701 else
6702   rm -rf conftest*
6703   ol_cv_header_db2=no
6704 fi
6705 rm -f conftest*
6706
6707 fi
6708
6709 echo "$ac_t""$ol_cv_header_db2" 1>&6
6710 else
6711         ol_cv_header_db2=no
6712 fi
6713
6714
6715  
6716  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
6717 echo "configure:6718: checking for Berkeley DB2" >&5
6718 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   
6722         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
6723                 ol_cv_berkeley_db2=no
6724         else
6725                 ol_cv_berkeley_db2=yes
6726         fi
6727
6728 fi
6729
6730 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
6731  if test $ol_cv_berkeley_db2 = yes ; then
6732         cat >> confdefs.h <<\EOF
6733 #define HAVE_BERKELEY_DB2 1
6734 EOF
6735
6736  fi
6737
6738
6739         if test $ol_cv_berkeley_db2 = yes ; then
6740                 ol_link_ldbm=db2
6741                 ol_with_ldbm_api=db2
6742
6743                 if test $ol_with_ldbm_type = hash ; then
6744                         cat >> confdefs.h <<\EOF
6745 #define LDBM_USE_DBHASH 1
6746 EOF
6747
6748                 else
6749                         cat >> confdefs.h <<\EOF
6750 #define LDBM_USE_DBBTREE 1
6751 EOF
6752
6753                 fi
6754
6755                                                 if test $ol_cv_lib_db2 != yes ; then
6756                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
6757                 fi
6758         fi
6759 fi
6760
6761 ol_link_bdb2=no
6762 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
6763         ol_link_bdb2=yes
6764 fi
6765
6766 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
6767         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
6768 echo "configure:6769: checking for Berkeley DB library" >&5
6769 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
6770   echo $ac_n "(cached) $ac_c" 1>&6
6771 else
6772         ol_LIBS="$LIBS"
6773         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
6774 echo "configure:6775: checking for dbopen" >&5
6775 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
6776   echo $ac_n "(cached) $ac_c" 1>&6
6777 else
6778   cat > conftest.$ac_ext <<EOF
6779 #line 6780 "configure"
6780 #include "confdefs.h"
6781 /* System header to define __stub macros and hopefully few prototypes,
6782     which can conflict with char dbopen(); below.  */
6783 #include <assert.h>
6784 /* Override any gcc2 internal prototype to avoid an error.  */
6785 /* We use char because int might match the return type of a gcc2
6786     builtin and then its argument prototype would still apply.  */
6787 char dbopen();
6788
6789 int main() {
6790
6791 /* The GNU C library defines this for functions which it implements
6792     to always fail with ENOSYS.  Some functions are actually named
6793     something starting with __ and the normal name is an alias.  */
6794 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6795 choke me
6796 #else
6797 dbopen();
6798 #endif
6799
6800 ; return 0; }
6801 EOF
6802 if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6803   rm -rf conftest*
6804   eval "ac_cv_func_dbopen=yes"
6805 else
6806   echo "configure: failed program was:" >&5
6807   cat conftest.$ac_ext >&5
6808   rm -rf conftest*
6809   eval "ac_cv_func_dbopen=no"
6810 fi
6811 rm -f conftest*
6812 fi
6813
6814 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6815   echo "$ac_t""yes" 1>&6
6816   ol_cv_lib_db=yes
6817 else
6818   echo "$ac_t""no" 1>&6
6819
6820                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6821 echo "configure:6822: checking for dbopen in -ldb" >&5
6822 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6824   echo $ac_n "(cached) $ac_c" 1>&6
6825 else
6826   ac_save_LIBS="$LIBS"
6827 LIBS="-ldb  $LIBS"
6828 cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 /* We use char because int might match the return type of a gcc2
6833     builtin and then its argument prototype would still apply.  */
6834 char dbopen();
6835
6836 int main() {
6837 dbopen()
6838 ; return 0; }
6839 EOF
6840 if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6841   rm -rf conftest*
6842   eval "ac_cv_lib_$ac_lib_var=yes"
6843 else
6844   echo "configure: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   rm -rf conftest*
6847   eval "ac_cv_lib_$ac_lib_var=no"
6848 fi
6849 rm -f conftest*
6850 LIBS="$ac_save_LIBS"
6851
6852 fi
6853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6854   echo "$ac_t""yes" 1>&6
6855   ol_cv_lib_db=-ldb
6856 else
6857   echo "$ac_t""no" 1>&6
6858 ol_cv_lib_db=no
6859 fi
6860
6861         
6862 fi
6863
6864         LIBS="$ol_LIBS"
6865
6866 fi
6867
6868 echo "$ac_t""$ol_cv_lib_db" 1>&6
6869
6870
6871 for ac_hdr in db_185.h
6872 do
6873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6875 echo "configure:6876: checking for $ac_hdr" >&5
6876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6877   echo $ac_n "(cached) $ac_c" 1>&6
6878 else
6879   cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 #include <$ac_hdr>
6883 EOF
6884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6885 { (eval echo configure:6886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6887 if test -z "$ac_err"; then
6888   rm -rf conftest*
6889   eval "ac_cv_header_$ac_safe=yes"
6890 else
6891   echo "$ac_err" >&5
6892   echo "configure: failed program was:" >&5
6893   cat conftest.$ac_ext >&5
6894   rm -rf conftest*
6895   eval "ac_cv_header_$ac_safe=no"
6896 fi
6897 rm -f conftest*
6898 fi
6899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6900   echo "$ac_t""yes" 1>&6
6901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6902   cat >> confdefs.h <<EOF
6903 #define $ac_tr_hdr 1
6904 EOF
6905  
6906 else
6907   echo "$ac_t""no" 1>&6
6908 fi
6909 done
6910
6911 if test "$ol_cv_header_db2" = yes ; then
6912         
6913         ol_cv_header_db=$ac_cv_header_db_185_h
6914 else
6915         ol_cv_header_db=$ac_cv_header_db_h
6916 fi
6917
6918
6919  
6920  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6921 echo "configure:6922: checking for Berkeley DB" >&5
6922 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6923   echo $ac_n "(cached) $ac_c" 1>&6
6924 else
6925   
6926         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6927                 ol_cv_berkeley_db=no
6928         else
6929                 ol_cv_berkeley_db=yes
6930         fi
6931
6932 fi
6933
6934 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6935  if test $ol_cv_berkeley_db = yes ; then
6936         cat >> confdefs.h <<\EOF
6937 #define HAVE_BERKELEY_DB 1
6938 EOF
6939
6940  fi
6941
6942
6943         if test $ol_cv_berkeley_db = yes ; then
6944                 ol_link_ldbm=db
6945                 ol_with_ldbm_api=db
6946
6947                 if test $ol_with_ldbm_type = hash ; then
6948                         cat >> confdefs.h <<\EOF
6949 #define LDBM_USE_DBHASH 1
6950 EOF
6951
6952                 else
6953                         cat >> confdefs.h <<\EOF
6954 #define LDBM_USE_DBBTREE 1
6955 EOF
6956
6957                 fi
6958
6959                                                 if test $ol_cv_lib_db != yes ; then
6960                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6961                 fi
6962         fi
6963 fi
6964
6965 if test $ol_with_ldbm_api = manual ; then
6966                 ol_link_ldbm=yes
6967
6968         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6969
6970         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6971 do
6972 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6973 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6974 echo "configure:6975: checking for $ac_hdr" >&5
6975 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6976   echo $ac_n "(cached) $ac_c" 1>&6
6977 else
6978   cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981 #include <$ac_hdr>
6982 EOF
6983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6984 { (eval echo configure:6985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6986 if test -z "$ac_err"; then
6987   rm -rf conftest*
6988   eval "ac_cv_header_$ac_safe=yes"
6989 else
6990   echo "$ac_err" >&5
6991   echo "configure: failed program was:" >&5
6992   cat conftest.$ac_ext >&5
6993   rm -rf conftest*
6994   eval "ac_cv_header_$ac_safe=no"
6995 fi
6996 rm -f conftest*
6997 fi
6998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6999   echo "$ac_t""yes" 1>&6
7000     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7001   cat >> confdefs.h <<EOF
7002 #define $ac_tr_hdr 1
7003 EOF
7004  
7005 else
7006   echo "$ac_t""no" 1>&6
7007 fi
7008 done
7009
7010 fi
7011
7012 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7013         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7014         ol_with_ldbm_api=none
7015 fi
7016
7017 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7018         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7019 echo "configure:7020: checking for GDBM library" >&5
7020 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7021   echo $ac_n "(cached) $ac_c" 1>&6
7022 else
7023         ol_LIBS="$LIBS"
7024         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7025 echo "configure:7026: checking for gdbm_open" >&5
7026 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029   cat > conftest.$ac_ext <<EOF
7030 #line 7031 "configure"
7031 #include "confdefs.h"
7032 /* System header to define __stub macros and hopefully few prototypes,
7033     which can conflict with char gdbm_open(); below.  */
7034 #include <assert.h>
7035 /* Override any gcc2 internal prototype to avoid an error.  */
7036 /* We use char because int might match the return type of a gcc2
7037     builtin and then its argument prototype would still apply.  */
7038 char gdbm_open();
7039
7040 int main() {
7041
7042 /* The GNU C library defines this for functions which it implements
7043     to always fail with ENOSYS.  Some functions are actually named
7044     something starting with __ and the normal name is an alias.  */
7045 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7046 choke me
7047 #else
7048 gdbm_open();
7049 #endif
7050
7051 ; return 0; }
7052 EOF
7053 if { (eval echo configure:7054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7054   rm -rf conftest*
7055   eval "ac_cv_func_gdbm_open=yes"
7056 else
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   eval "ac_cv_func_gdbm_open=no"
7061 fi
7062 rm -f conftest*
7063 fi
7064
7065 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7066   echo "$ac_t""yes" 1>&6
7067   ol_cv_lib_gdbm=yes
7068 else
7069   echo "$ac_t""no" 1>&6
7070
7071                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7072 echo "configure:7073: checking for gdbm_open in -lgdbm" >&5
7073 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7074 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077   ac_save_LIBS="$LIBS"
7078 LIBS="-lgdbm  $LIBS"
7079 cat > conftest.$ac_ext <<EOF
7080 #line 7081 "configure"
7081 #include "confdefs.h"
7082 /* Override any gcc2 internal prototype to avoid an error.  */
7083 /* We use char because int might match the return type of a gcc2
7084     builtin and then its argument prototype would still apply.  */
7085 char gdbm_open();
7086
7087 int main() {
7088 gdbm_open()
7089 ; return 0; }
7090 EOF
7091 if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7092   rm -rf conftest*
7093   eval "ac_cv_lib_$ac_lib_var=yes"
7094 else
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_lib_$ac_lib_var=no"
7099 fi
7100 rm -f conftest*
7101 LIBS="$ac_save_LIBS"
7102
7103 fi
7104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7105   echo "$ac_t""yes" 1>&6
7106   ol_cv_lib_gdbm=-lgdbm
7107 else
7108   echo "$ac_t""no" 1>&6
7109 ol_cv_lib_gdbm=no
7110 fi
7111
7112         
7113 fi
7114
7115         LIBS="$ol_LIBS"
7116
7117 fi
7118
7119 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7120
7121
7122  for ac_hdr in gdbm.h
7123 do
7124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7126 echo "configure:7127: checking for $ac_hdr" >&5
7127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7128   echo $ac_n "(cached) $ac_c" 1>&6
7129 else
7130   cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 #include <$ac_hdr>
7134 EOF
7135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7136 { (eval echo configure:7137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7138 if test -z "$ac_err"; then
7139   rm -rf conftest*
7140   eval "ac_cv_header_$ac_safe=yes"
7141 else
7142   echo "$ac_err" >&5
7143   echo "configure: failed program was:" >&5
7144   cat conftest.$ac_ext >&5
7145   rm -rf conftest*
7146   eval "ac_cv_header_$ac_safe=no"
7147 fi
7148 rm -f conftest*
7149 fi
7150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7151   echo "$ac_t""yes" 1>&6
7152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7153   cat >> confdefs.h <<EOF
7154 #define $ac_tr_hdr 1
7155 EOF
7156  
7157 else
7158   echo "$ac_t""no" 1>&6
7159 fi
7160 done
7161
7162  echo $ac_n "checking for db""... $ac_c" 1>&6
7163 echo "configure:7164: checking for db" >&5
7164 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7165   echo $ac_n "(cached) $ac_c" 1>&6
7166 else
7167   
7168         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7169                 ol_cv_gdbm=no
7170         else
7171                 ol_cv_gdbm=yes
7172         fi
7173
7174 fi
7175
7176 echo "$ac_t""$ol_cv_gdbm" 1>&6
7177  if test $ol_cv_gdbm = yes ; then
7178         cat >> confdefs.h <<\EOF
7179 #define HAVE_GDBM 1
7180 EOF
7181
7182  fi
7183
7184
7185         if test $ol_cv_gdbm = yes ; then
7186                 ol_link_ldbm=gdbm
7187                 ol_with_ldbm_api=gdbm
7188
7189                 if test $ol_cv_lib_gdbm != yes ; then
7190                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7191                 fi
7192         fi
7193 fi
7194
7195 if test $ol_with_ldbm_api = auto ; then
7196         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7197 elif test $ol_with_ldbm_api = ndbm ; then
7198         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7199 echo "configure:7200: checking for NDBM library" >&5
7200 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7201   echo $ac_n "(cached) $ac_c" 1>&6
7202 else
7203         ol_LIBS="$LIBS"
7204         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7205 echo "configure:7206: checking for dbm_open" >&5
7206 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7207   echo $ac_n "(cached) $ac_c" 1>&6
7208 else
7209   cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7212 /* System header to define __stub macros and hopefully few prototypes,
7213     which can conflict with char dbm_open(); below.  */
7214 #include <assert.h>
7215 /* Override any gcc2 internal prototype to avoid an error.  */
7216 /* We use char because int might match the return type of a gcc2
7217     builtin and then its argument prototype would still apply.  */
7218 char dbm_open();
7219
7220 int main() {
7221
7222 /* The GNU C library defines this for functions which it implements
7223     to always fail with ENOSYS.  Some functions are actually named
7224     something starting with __ and the normal name is an alias.  */
7225 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7226 choke me
7227 #else
7228 dbm_open();
7229 #endif
7230
7231 ; return 0; }
7232 EOF
7233 if { (eval echo configure:7234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7234   rm -rf conftest*
7235   eval "ac_cv_func_dbm_open=yes"
7236 else
7237   echo "configure: failed program was:" >&5
7238   cat conftest.$ac_ext >&5
7239   rm -rf conftest*
7240   eval "ac_cv_func_dbm_open=no"
7241 fi
7242 rm -f conftest*
7243 fi
7244
7245 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7246   echo "$ac_t""yes" 1>&6
7247   ol_cv_lib_ndbm=yes
7248 else
7249   echo "$ac_t""no" 1>&6
7250
7251                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7252 echo "configure:7253: checking for dbm_open in -lndbm" >&5
7253 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   ac_save_LIBS="$LIBS"
7258 LIBS="-lndbm  $LIBS"
7259 cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 /* Override any gcc2 internal prototype to avoid an error.  */
7263 /* We use char because int might match the return type of a gcc2
7264     builtin and then its argument prototype would still apply.  */
7265 char dbm_open();
7266
7267 int main() {
7268 dbm_open()
7269 ; return 0; }
7270 EOF
7271 if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7272   rm -rf conftest*
7273   eval "ac_cv_lib_$ac_lib_var=yes"
7274 else
7275   echo "configure: failed program was:" >&5
7276   cat conftest.$ac_ext >&5
7277   rm -rf conftest*
7278   eval "ac_cv_lib_$ac_lib_var=no"
7279 fi
7280 rm -f conftest*
7281 LIBS="$ac_save_LIBS"
7282
7283 fi
7284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7285   echo "$ac_t""yes" 1>&6
7286   ol_cv_lib_ndbm=-lndbm
7287 else
7288   echo "$ac_t""no" 1>&6
7289
7290                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
7291 echo "configure:7292: checking for dbm_open in -ldbm" >&5
7292 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
7293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7294   echo $ac_n "(cached) $ac_c" 1>&6
7295 else
7296   ac_save_LIBS="$LIBS"
7297 LIBS="-ldbm  $LIBS"
7298 cat > conftest.$ac_ext <<EOF
7299 #line 7300 "configure"
7300 #include "confdefs.h"
7301 /* Override any gcc2 internal prototype to avoid an error.  */
7302 /* We use char because int might match the return type of a gcc2
7303     builtin and then its argument prototype would still apply.  */
7304 char dbm_open();
7305
7306 int main() {
7307 dbm_open()
7308 ; return 0; }
7309 EOF
7310 if { (eval echo configure:7311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7311   rm -rf conftest*
7312   eval "ac_cv_lib_$ac_lib_var=yes"
7313 else
7314   echo "configure: failed program was:" >&5
7315   cat conftest.$ac_ext >&5
7316   rm -rf conftest*
7317   eval "ac_cv_lib_$ac_lib_var=no"
7318 fi
7319 rm -f conftest*
7320 LIBS="$ac_save_LIBS"
7321
7322 fi
7323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7324   echo "$ac_t""yes" 1>&6
7325   ol_cv_lib_ndbm=-ldbm
7326 else
7327   echo "$ac_t""no" 1>&6
7328 ol_cv_lib_ndbm=no
7329 fi
7330                 
7331 fi
7332
7333         
7334 fi
7335
7336         LIBS="$ol_LIBS"
7337
7338 fi
7339
7340 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
7341
7342
7343  for ac_hdr in ndbm.h
7344 do
7345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7347 echo "configure:7348: checking for $ac_hdr" >&5
7348 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7349   echo $ac_n "(cached) $ac_c" 1>&6
7350 else
7351   cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 #include <$ac_hdr>
7355 EOF
7356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7357 { (eval echo configure:7358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7359 if test -z "$ac_err"; then
7360   rm -rf conftest*
7361   eval "ac_cv_header_$ac_safe=yes"
7362 else
7363   echo "$ac_err" >&5
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=no"
7368 fi
7369 rm -f conftest*
7370 fi
7371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7372   echo "$ac_t""yes" 1>&6
7373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7374   cat >> confdefs.h <<EOF
7375 #define $ac_tr_hdr 1
7376 EOF
7377  
7378 else
7379   echo "$ac_t""no" 1>&6
7380 fi
7381 done
7382
7383  echo $ac_n "checking for db""... $ac_c" 1>&6
7384 echo "configure:7385: checking for db" >&5
7385 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
7386   echo $ac_n "(cached) $ac_c" 1>&6
7387 else
7388   
7389         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
7390                 ol_cv_ndbm=no
7391         else
7392                 ol_cv_ndbm=yes
7393         fi
7394
7395 fi
7396
7397 echo "$ac_t""$ol_cv_ndbm" 1>&6
7398  if test $ol_cv_ndbm = yes ; then
7399         cat >> confdefs.h <<\EOF
7400 #define HAVE_NDBM 1
7401 EOF
7402
7403  fi
7404
7405
7406         if test $ol_cv_ndbm = yes ; then
7407                 ol_link_ldbm=ndbm
7408                 ol_with_ldbm_api=ndbm
7409
7410                 if test $ol_cv_lib_ndbm != yes ; then
7411                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
7412                 fi
7413         fi
7414 fi
7415
7416 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
7417         echo "configure: warning: could not find suitable LDBM backend" 1>&2
7418         if test $ol_enable_ldbm = yes ; then
7419                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
7420         fi
7421
7422         echo "configure: warning: disabling LDBM" 1>&2
7423         ol_enable_ldbm=no
7424 fi
7425
7426 if test $ol_enable_wrappers != no ; then
7427         for ac_hdr in tcpd.h
7428 do
7429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7431 echo "configure:7432: checking for $ac_hdr" >&5
7432 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7433   echo $ac_n "(cached) $ac_c" 1>&6
7434 else
7435   cat > conftest.$ac_ext <<EOF
7436 #line 7437 "configure"
7437 #include "confdefs.h"
7438 #include <$ac_hdr>
7439 EOF
7440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7441 { (eval echo configure:7442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7443 if test -z "$ac_err"; then
7444   rm -rf conftest*
7445   eval "ac_cv_header_$ac_safe=yes"
7446 else
7447   echo "$ac_err" >&5
7448   echo "configure: failed program was:" >&5
7449   cat conftest.$ac_ext >&5
7450   rm -rf conftest*
7451   eval "ac_cv_header_$ac_safe=no"
7452 fi
7453 rm -f conftest*
7454 fi
7455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7456   echo "$ac_t""yes" 1>&6
7457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7458   cat >> confdefs.h <<EOF
7459 #define $ac_tr_hdr 1
7460 EOF
7461  
7462 else
7463   echo "$ac_t""no" 1>&6
7464 fi
7465 done
7466
7467
7468         if test $ac_cv_header_tcpd_h != yes ; then
7469                 have_wrappers=no
7470         else
7471                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
7472 echo "configure:7473: checking for main in -lwrap" >&5
7473 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
7474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7475   echo $ac_n "(cached) $ac_c" 1>&6
7476 else
7477   ac_save_LIBS="$LIBS"
7478 LIBS="-lwrap  $LIBS"
7479 cat > conftest.$ac_ext <<EOF
7480 #line 7481 "configure"
7481 #include "confdefs.h"
7482
7483 int main() {
7484 main()
7485 ; return 0; }
7486 EOF
7487 if { (eval echo configure:7488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=yes"
7490 else
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -rf conftest*
7494   eval "ac_cv_lib_$ac_lib_var=no"
7495 fi
7496 rm -f conftest*
7497 LIBS="$ac_save_LIBS"
7498
7499 fi
7500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7501   echo "$ac_t""yes" 1>&6
7502   have_wrappers=yes
7503 else
7504   echo "$ac_t""no" 1>&6
7505 have_wrappers=no
7506 fi
7507
7508         fi
7509
7510         if test $have_wrappers = yes ; then
7511                 cat >> confdefs.h <<\EOF
7512 #define HAVE_TCPD 1
7513 EOF
7514
7515                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
7516         else
7517                 echo "configure: warning: could not find -lwrap" 1>&2
7518                 if test $ol_enable_wrappers = yes ; then
7519                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
7520                 fi
7521
7522                 echo "configure: warning: disabling wrappers support" 1>&2
7523                 ol_enable_wrappers=no
7524         fi
7525 fi
7526
7527 if test $ol_enable_syslog != no ; then
7528         echo $ac_n "checking for openlog""... $ac_c" 1>&6
7529 echo "configure:7530: checking for openlog" >&5
7530 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
7531   echo $ac_n "(cached) $ac_c" 1>&6
7532 else
7533   cat > conftest.$ac_ext <<EOF
7534 #line 7535 "configure"
7535 #include "confdefs.h"
7536 /* System header to define __stub macros and hopefully few prototypes,
7537     which can conflict with char openlog(); below.  */
7538 #include <assert.h>
7539 /* Override any gcc2 internal prototype to avoid an error.  */
7540 /* We use char because int might match the return type of a gcc2
7541     builtin and then its argument prototype would still apply.  */
7542 char openlog();
7543
7544 int main() {
7545
7546 /* The GNU C library defines this for functions which it implements
7547     to always fail with ENOSYS.  Some functions are actually named
7548     something starting with __ and the normal name is an alias.  */
7549 #if defined (__stub_openlog) || defined (__stub___openlog)
7550 choke me
7551 #else
7552 openlog();
7553 #endif
7554
7555 ; return 0; }
7556 EOF
7557 if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7558   rm -rf conftest*
7559   eval "ac_cv_func_openlog=yes"
7560 else
7561   echo "configure: failed program was:" >&5
7562   cat conftest.$ac_ext >&5
7563   rm -rf conftest*
7564   eval "ac_cv_func_openlog=no"
7565 fi
7566 rm -f conftest*
7567 fi
7568
7569 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
7570   echo "$ac_t""yes" 1>&6
7571   :
7572 else
7573   echo "$ac_t""no" 1>&6
7574 fi
7575
7576         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
7577                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
7578         fi
7579         ol_enable_syslog=$ac_cv_func_openlog
7580 fi
7581
7582 if test $ol_enable_dmalloc != no ; then
7583         for ac_hdr in dmalloc.h
7584 do
7585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7587 echo "configure:7588: checking for $ac_hdr" >&5
7588 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7589   echo $ac_n "(cached) $ac_c" 1>&6
7590 else
7591   cat > conftest.$ac_ext <<EOF
7592 #line 7593 "configure"
7593 #include "confdefs.h"
7594 #include <$ac_hdr>
7595 EOF
7596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7597 { (eval echo configure:7598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7599 if test -z "$ac_err"; then
7600   rm -rf conftest*
7601   eval "ac_cv_header_$ac_safe=yes"
7602 else
7603   echo "$ac_err" >&5
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_header_$ac_safe=no"
7608 fi
7609 rm -f conftest*
7610 fi
7611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7612   echo "$ac_t""yes" 1>&6
7613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7614   cat >> confdefs.h <<EOF
7615 #define $ac_tr_hdr 1
7616 EOF
7617  
7618 else
7619   echo "$ac_t""no" 1>&6
7620 fi
7621 done
7622
7623         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
7624 echo "configure:7625: checking for dmalloc_shutdown in -ldmalloc" >&5
7625 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
7626 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7627   echo $ac_n "(cached) $ac_c" 1>&6
7628 else
7629   ac_save_LIBS="$LIBS"
7630 LIBS="-ldmalloc  $LIBS"
7631 cat > conftest.$ac_ext <<EOF
7632 #line 7633 "configure"
7633 #include "confdefs.h"
7634 /* Override any gcc2 internal prototype to avoid an error.  */
7635 /* We use char because int might match the return type of a gcc2
7636     builtin and then its argument prototype would still apply.  */
7637 char dmalloc_shutdown();
7638
7639 int main() {
7640 dmalloc_shutdown()
7641 ; return 0; }
7642 EOF
7643 if { (eval echo configure:7644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7644   rm -rf conftest*
7645   eval "ac_cv_lib_$ac_lib_var=yes"
7646 else
7647   echo "configure: failed program was:" >&5
7648   cat conftest.$ac_ext >&5
7649   rm -rf conftest*
7650   eval "ac_cv_lib_$ac_lib_var=no"
7651 fi
7652 rm -f conftest*
7653 LIBS="$ac_save_LIBS"
7654
7655 fi
7656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7657   echo "$ac_t""yes" 1>&6
7658     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7659     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7660   cat >> confdefs.h <<EOF
7661 #define $ac_tr_lib 1
7662 EOF
7663
7664   LIBS="-ldmalloc $LIBS"
7665
7666 else
7667   echo "$ac_t""no" 1>&6
7668 fi
7669
7670 fi
7671
7672 if test $ol_enable_tcl != no ; then
7673         for ac_hdr in tcl.h
7674 do
7675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7677 echo "configure:7678: checking for $ac_hdr" >&5
7678 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7679   echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681   cat > conftest.$ac_ext <<EOF
7682 #line 7683 "configure"
7683 #include "confdefs.h"
7684 #include <$ac_hdr>
7685 EOF
7686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7687 { (eval echo configure:7688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7689 if test -z "$ac_err"; then
7690   rm -rf conftest*
7691   eval "ac_cv_header_$ac_safe=yes"
7692 else
7693   echo "$ac_err" >&5
7694   echo "configure: failed program was:" >&5
7695   cat conftest.$ac_ext >&5
7696   rm -rf conftest*
7697   eval "ac_cv_header_$ac_safe=no"
7698 fi
7699 rm -f conftest*
7700 fi
7701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7702   echo "$ac_t""yes" 1>&6
7703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7704   cat >> confdefs.h <<EOF
7705 #define $ac_tr_hdr 1
7706 EOF
7707  
7708 else
7709   echo "$ac_t""no" 1>&6
7710 fi
7711 done
7712
7713
7714         if test $ac_cv_header_tcl_h != yes ; then
7715                 have_tcl=no
7716         else
7717                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
7718 echo "configure:7719: checking for main in -ltcl" >&5
7719 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
7720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7721   echo $ac_n "(cached) $ac_c" 1>&6
7722 else
7723   ac_save_LIBS="$LIBS"
7724 LIBS="-ltcl  $LIBS"
7725 cat > conftest.$ac_ext <<EOF
7726 #line 7727 "configure"
7727 #include "confdefs.h"
7728
7729 int main() {
7730 main()
7731 ; return 0; }
7732 EOF
7733 if { (eval echo configure:7734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7734   rm -rf conftest*
7735   eval "ac_cv_lib_$ac_lib_var=yes"
7736 else
7737   echo "configure: failed program was:" >&5
7738   cat conftest.$ac_ext >&5
7739   rm -rf conftest*
7740   eval "ac_cv_lib_$ac_lib_var=no"
7741 fi
7742 rm -f conftest*
7743 LIBS="$ac_save_LIBS"
7744
7745 fi
7746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7747   echo "$ac_t""yes" 1>&6
7748   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
7749 else
7750   echo "$ac_t""no" 1>&6
7751 have_tcl=no
7752 fi
7753
7754
7755                 if test $have_tcl != yes; then
7756                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
7757 echo "configure:7758: checking for main in -ltcl7.6" >&5
7758 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
7759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   ac_save_LIBS="$LIBS"
7763 LIBS="-ltcl7.6  $LIBS"
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767
7768 int main() {
7769 main()
7770 ; return 0; }
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7773   rm -rf conftest*
7774   eval "ac_cv_lib_$ac_lib_var=yes"
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -rf conftest*
7779   eval "ac_cv_lib_$ac_lib_var=no"
7780 fi
7781 rm -f conftest*
7782 LIBS="$ac_save_LIBS"
7783
7784 fi
7785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7786   echo "$ac_t""yes" 1>&6
7787   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
7788 else
7789   echo "$ac_t""no" 1>&6
7790 have_tcl=no
7791 fi
7792
7793                 fi
7794
7795                 if test $have_tcl != yes; then
7796                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
7797 echo "configure:7798: checking for main in -ltcl8.0" >&5
7798 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
7799 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7800   echo $ac_n "(cached) $ac_c" 1>&6
7801 else
7802   ac_save_LIBS="$LIBS"
7803 LIBS="-ltcl8.0  $LIBS"
7804 cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807
7808 int main() {
7809 main()
7810 ; return 0; }
7811 EOF
7812 if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7813   rm -rf conftest*
7814   eval "ac_cv_lib_$ac_lib_var=yes"
7815 else
7816   echo "configure: failed program was:" >&5
7817   cat conftest.$ac_ext >&5
7818   rm -rf conftest*
7819   eval "ac_cv_lib_$ac_lib_var=no"
7820 fi
7821 rm -f conftest*
7822 LIBS="$ac_save_LIBS"
7823
7824 fi
7825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7826   echo "$ac_t""yes" 1>&6
7827   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
7828 else
7829   echo "$ac_t""no" 1>&6
7830 have_tcl=no
7831 fi
7832
7833                 fi
7834         fi
7835
7836         if test $have_tcl != yes ; then
7837                 echo "configure: warning: could not find -ltcl" 1>&2
7838                 if test $ol_enable_tcl = yes ; then
7839                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
7840                 fi
7841
7842                 ol_enable_tcl=no
7843         fi
7844 fi
7845
7846 # ud needs termcap (should insert check here)
7847 ol_link_termcap=no
7848 for ac_hdr in termcap.h ncurses.h
7849 do
7850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7852 echo "configure:7853: checking for $ac_hdr" >&5
7853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7854   echo $ac_n "(cached) $ac_c" 1>&6
7855 else
7856   cat > conftest.$ac_ext <<EOF
7857 #line 7858 "configure"
7858 #include "confdefs.h"
7859 #include <$ac_hdr>
7860 EOF
7861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7862 { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7864 if test -z "$ac_err"; then
7865   rm -rf conftest*
7866   eval "ac_cv_header_$ac_safe=yes"
7867 else
7868   echo "$ac_err" >&5
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -rf conftest*
7872   eval "ac_cv_header_$ac_safe=no"
7873 fi
7874 rm -f conftest*
7875 fi
7876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7877   echo "$ac_t""yes" 1>&6
7878     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7879   cat >> confdefs.h <<EOF
7880 #define $ac_tr_hdr 1
7881 EOF
7882  
7883 else
7884   echo "$ac_t""no" 1>&6
7885 fi
7886 done
7887
7888
7889 if test $ol_link_termcap = no ; then
7890         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
7891 echo "configure:7892: checking for tputs in -ltermcap" >&5
7892 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
7893 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   ac_save_LIBS="$LIBS"
7897 LIBS="-ltermcap  $LIBS"
7898 cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 /* Override any gcc2 internal prototype to avoid an error.  */
7902 /* We use char because int might match the return type of a gcc2
7903     builtin and then its argument prototype would still apply.  */
7904 char tputs();
7905
7906 int main() {
7907 tputs()
7908 ; return 0; }
7909 EOF
7910 if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7911   rm -rf conftest*
7912   eval "ac_cv_lib_$ac_lib_var=yes"
7913 else
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   eval "ac_cv_lib_$ac_lib_var=no"
7918 fi
7919 rm -f conftest*
7920 LIBS="$ac_save_LIBS"
7921
7922 fi
7923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7924   echo "$ac_t""yes" 1>&6
7925   have_termcap=yes
7926 else
7927   echo "$ac_t""no" 1>&6
7928 have_termcap=no
7929 fi
7930
7931         if test $have_termcap = yes ; then
7932                 cat >> confdefs.h <<\EOF
7933 #define HAVE_TERMCAP 1
7934 EOF
7935
7936                 ol_link_termcap=yes
7937                 TERMCAP_LIBS=-ltermcap
7938         fi
7939 fi
7940
7941 if test $ol_link_termcap = no ; then
7942         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
7943 echo "configure:7944: checking for initscr in -lncurses" >&5
7944 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
7945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   ac_save_LIBS="$LIBS"
7949 LIBS="-lncurses  $LIBS"
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char initscr();
7957
7958 int main() {
7959 initscr()
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=no"
7970 fi
7971 rm -f conftest*
7972 LIBS="$ac_save_LIBS"
7973
7974 fi
7975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977   have_ncurses=yes
7978 else
7979   echo "$ac_t""no" 1>&6
7980 have_ncurses=no
7981 fi
7982
7983         if test $have_ncurses = yes ; then
7984                 cat >> confdefs.h <<\EOF
7985 #define HAVE_NCURSES 1
7986 EOF
7987
7988                 ol_link_termcap=yes
7989                 TERMCAP_LIBS=-lncurses
7990         fi
7991 fi
7992
7993 if test $ol_link_termcap = no ; then
7994         cat >> confdefs.h <<\EOF
7995 #define NO_TERMCAP 1
7996 EOF
7997
7998         TERMCAP_LIBS=
7999 fi
8000
8001 ol_link_readline=no
8002 if test $ol_with_readline != no ; then
8003         for ac_hdr in readline/readline.h readline/history.h
8004 do
8005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8007 echo "configure:8008: checking for $ac_hdr" >&5
8008 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8009   echo $ac_n "(cached) $ac_c" 1>&6
8010 else
8011   cat > conftest.$ac_ext <<EOF
8012 #line 8013 "configure"
8013 #include "confdefs.h"
8014 #include <$ac_hdr>
8015 EOF
8016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8017 { (eval echo configure:8018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8019 if test -z "$ac_err"; then
8020   rm -rf conftest*
8021   eval "ac_cv_header_$ac_safe=yes"
8022 else
8023   echo "$ac_err" >&5
8024   echo "configure: failed program was:" >&5
8025   cat conftest.$ac_ext >&5
8026   rm -rf conftest*
8027   eval "ac_cv_header_$ac_safe=no"
8028 fi
8029 rm -f conftest*
8030 fi
8031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8032   echo "$ac_t""yes" 1>&6
8033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8034   cat >> confdefs.h <<EOF
8035 #define $ac_tr_hdr 1
8036 EOF
8037  
8038 else
8039   echo "$ac_t""no" 1>&6
8040 fi
8041 done
8042
8043
8044         if test $ac_cv_header_readline_readline_h = yes ; then
8045                 save_LIBS="$LIBS"
8046                 LIBS="$TERMCAP_LIBS $LIBS"
8047                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8048 echo "configure:8049: checking for readline in -lreadline" >&5
8049 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8050 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8051   echo $ac_n "(cached) $ac_c" 1>&6
8052 else
8053   ac_save_LIBS="$LIBS"
8054 LIBS="-lreadline  $LIBS"
8055 cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* Override any gcc2 internal prototype to avoid an error.  */
8059 /* We use char because int might match the return type of a gcc2
8060     builtin and then its argument prototype would still apply.  */
8061 char readline();
8062
8063 int main() {
8064 readline()
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8068   rm -rf conftest*
8069   eval "ac_cv_lib_$ac_lib_var=yes"
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   eval "ac_cv_lib_$ac_lib_var=no"
8075 fi
8076 rm -f conftest*
8077 LIBS="$ac_save_LIBS"
8078
8079 fi
8080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8081   echo "$ac_t""yes" 1>&6
8082   have_readline=yes
8083 else
8084   echo "$ac_t""no" 1>&6
8085 have_readline=no
8086 fi
8087
8088                 LIBS="$save_LIBS"
8089                         
8090                 if test $have_readline = yes ; then
8091                         ol_with_readline=found
8092                         ol_link_readline=yes
8093
8094                         READLINE_LIBS="-lreadline"
8095                 fi
8096         fi
8097 fi
8098
8099 if test $ol_link_readline = yes ; then
8100         cat >> confdefs.h <<\EOF
8101 #define HAVE_READLINE 1
8102 EOF
8103
8104 fi
8105
8106
8107 # FreeBSD (and others) have crypt(3) in -lcrypt
8108 if test $ol_enable_crypt != no ; then
8109         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8110 echo "configure:8111: checking for crypt" >&5
8111 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8112   echo $ac_n "(cached) $ac_c" 1>&6
8113 else
8114   cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 /* System header to define __stub macros and hopefully few prototypes,
8118     which can conflict with char crypt(); below.  */
8119 #include <assert.h>
8120 /* Override any gcc2 internal prototype to avoid an error.  */
8121 /* We use char because int might match the return type of a gcc2
8122     builtin and then its argument prototype would still apply.  */
8123 char crypt();
8124
8125 int main() {
8126
8127 /* The GNU C library defines this for functions which it implements
8128     to always fail with ENOSYS.  Some functions are actually named
8129     something starting with __ and the normal name is an alias.  */
8130 #if defined (__stub_crypt) || defined (__stub___crypt)
8131 choke me
8132 #else
8133 crypt();
8134 #endif
8135
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8139   rm -rf conftest*
8140   eval "ac_cv_func_crypt=yes"
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -rf conftest*
8145   eval "ac_cv_func_crypt=no"
8146 fi
8147 rm -f conftest*
8148 fi
8149
8150 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8151   echo "$ac_t""yes" 1>&6
8152   have_crypt=yes
8153 else
8154   echo "$ac_t""no" 1>&6
8155
8156                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8157 echo "configure:8158: checking for crypt in -lcrypt" >&5
8158 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8159 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8160   echo $ac_n "(cached) $ac_c" 1>&6
8161 else
8162   ac_save_LIBS="$LIBS"
8163 LIBS="-lcrypt  $LIBS"
8164 cat > conftest.$ac_ext <<EOF
8165 #line 8166 "configure"
8166 #include "confdefs.h"
8167 /* Override any gcc2 internal prototype to avoid an error.  */
8168 /* We use char because int might match the return type of a gcc2
8169     builtin and then its argument prototype would still apply.  */
8170 char crypt();
8171
8172 int main() {
8173 crypt()
8174 ; return 0; }
8175 EOF
8176 if { (eval echo configure:8177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8177   rm -rf conftest*
8178   eval "ac_cv_lib_$ac_lib_var=yes"
8179 else
8180   echo "configure: failed program was:" >&5
8181   cat conftest.$ac_ext >&5
8182   rm -rf conftest*
8183   eval "ac_cv_lib_$ac_lib_var=no"
8184 fi
8185 rm -f conftest*
8186 LIBS="$ac_save_LIBS"
8187
8188 fi
8189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8190   echo "$ac_t""yes" 1>&6
8191   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8192                         have_crypt=yes
8193 else
8194   echo "$ac_t""no" 1>&6
8195 have_crypt=no
8196 fi
8197
8198 fi
8199
8200
8201         if test $have_crypt = yes ; then
8202                 cat >> confdefs.h <<\EOF
8203 #define HAVE_CRYPT 1
8204 EOF
8205
8206         else
8207                 echo "configure: warning: could not find crypt" 1>&2
8208                 if test $ol_enable_crypt = yes ; then
8209                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8210                 fi
8211
8212                 echo "configure: warning: disabling crypt support" 1>&2
8213                 ol_enable_crypt=no
8214         fi
8215 fi
8216
8217 # FreeBSD (and others) have setproctitle(3) in -lutil
8218 if test $ol_enable_proctitle != no ; then
8219         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8220 echo "configure:8221: checking for setproctitle" >&5
8221 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8222   echo $ac_n "(cached) $ac_c" 1>&6
8223 else
8224   cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 /* System header to define __stub macros and hopefully few prototypes,
8228     which can conflict with char setproctitle(); below.  */
8229 #include <assert.h>
8230 /* Override any gcc2 internal prototype to avoid an error.  */
8231 /* We use char because int might match the return type of a gcc2
8232     builtin and then its argument prototype would still apply.  */
8233 char setproctitle();
8234
8235 int main() {
8236
8237 /* The GNU C library defines this for functions which it implements
8238     to always fail with ENOSYS.  Some functions are actually named
8239     something starting with __ and the normal name is an alias.  */
8240 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8241 choke me
8242 #else
8243 setproctitle();
8244 #endif
8245
8246 ; return 0; }
8247 EOF
8248 if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8249   rm -rf conftest*
8250   eval "ac_cv_func_setproctitle=yes"
8251 else
8252   echo "configure: failed program was:" >&5
8253   cat conftest.$ac_ext >&5
8254   rm -rf conftest*
8255   eval "ac_cv_func_setproctitle=no"
8256 fi
8257 rm -f conftest*
8258 fi
8259
8260 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8261   echo "$ac_t""yes" 1>&6
8262   have_setproctitle=yes
8263 else
8264   echo "$ac_t""no" 1>&6
8265
8266                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
8267 echo "configure:8268: checking for setproctitle in -lutil" >&5
8268 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
8269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   ac_save_LIBS="$LIBS"
8273 LIBS="-lutil  $LIBS"
8274 cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 /* Override any gcc2 internal prototype to avoid an error.  */
8278 /* We use char because int might match the return type of a gcc2
8279     builtin and then its argument prototype would still apply.  */
8280 char setproctitle();
8281
8282 int main() {
8283 setproctitle()
8284 ; return 0; }
8285 EOF
8286 if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8287   rm -rf conftest*
8288   eval "ac_cv_lib_$ac_lib_var=yes"
8289 else
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   eval "ac_cv_lib_$ac_lib_var=no"
8294 fi
8295 rm -f conftest*
8296 LIBS="$ac_save_LIBS"
8297
8298 fi
8299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8300   echo "$ac_t""yes" 1>&6
8301   have_setproctitle=yes
8302                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
8303 else
8304   echo "$ac_t""no" 1>&6
8305 have_setproctitle=no
8306                         LIBOBJS="$LIBOBJS setproctitle.o"
8307 fi
8308
8309 fi
8310
8311
8312         if test $have_setproctitle = yes ; then
8313                 cat >> confdefs.h <<\EOF
8314 #define HAVE_SETPROCTITLE 1
8315 EOF
8316
8317         fi
8318 fi
8319
8320 # test for EBCDIC
8321 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8322 echo "configure:8323: checking for EBCDIC" >&5
8323 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
8324   echo $ac_n "(cached) $ac_c" 1>&6
8325 else
8326   
8327         cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330
8331 #if !('M' == 0xd4)
8332 #include <__ASCII__/generate_error.h>
8333 #endif
8334
8335 EOF
8336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8337 { (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8339 if test -z "$ac_err"; then
8340   rm -rf conftest*
8341   ol_cv_cpp_ebcdic=yes
8342 else
8343   echo "$ac_err" >&5
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -rf conftest*
8347   ol_cv_cpp_ebcdic=no
8348 fi
8349 rm -f conftest*
8350 fi
8351
8352 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8353 if test $ol_cv_cpp_ebcdic = yes ; then
8354         cat >> confdefs.h <<\EOF
8355 #define HAVE_EBCDIC 1
8356 EOF
8357
8358 fi
8359
8360 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8361 echo "configure:8362: checking for ANSI C header files" >&5
8362 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
8363   echo $ac_n "(cached) $ac_c" 1>&6
8364 else
8365   cat > conftest.$ac_ext <<EOF
8366 #line 8367 "configure"
8367 #include "confdefs.h"
8368 #include <stdlib.h>
8369 #include <stdarg.h>
8370 #include <string.h>
8371 #include <float.h>
8372 EOF
8373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8374 { (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8376 if test -z "$ac_err"; then
8377   rm -rf conftest*
8378   ol_cv_header_stdc=yes
8379 else
8380   echo "$ac_err" >&5
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   ol_cv_header_stdc=no
8385 fi
8386 rm -f conftest*
8387
8388 if test $ol_cv_header_stdc = yes; then
8389   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8390 cat > conftest.$ac_ext <<EOF
8391 #line 8392 "configure"
8392 #include "confdefs.h"
8393 #include <string.h>
8394 EOF
8395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8396   egrep "memchr" >/dev/null 2>&1; then
8397   :
8398 else
8399   rm -rf conftest*
8400   ol_cv_header_stdc=no
8401 fi
8402 rm -f conftest*
8403
8404 fi
8405
8406 if test $ol_cv_header_stdc = yes; then
8407   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8408 cat > conftest.$ac_ext <<EOF
8409 #line 8410 "configure"
8410 #include "confdefs.h"
8411 #include <stdlib.h>
8412 EOF
8413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8414   egrep "free" >/dev/null 2>&1; then
8415   :
8416 else
8417   rm -rf conftest*
8418   ol_cv_header_stdc=no
8419 fi
8420 rm -f conftest*
8421
8422 fi
8423
8424 if test $ol_cv_header_stdc = yes; then
8425   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8426 if test "$cross_compiling" = yes; then
8427   :
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <ctype.h>
8433 #ifndef HAVE_EBCDIC
8434 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8435 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8436 #else
8437 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8438                 || ('j' <= (c) && (c) <= 'r') \
8439                 || ('s' <= (c) && (c) <= 'z'))
8440 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8441 #endif
8442 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8443 int main () { int i; for (i = 0; i < 256; i++)
8444 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8445 exit (0); }
8446
8447 EOF
8448 if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8449 then
8450   :
8451 else
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -fr conftest*
8455   ol_cv_header_stdc=no
8456 fi
8457 rm -fr conftest*
8458 fi
8459
8460 fi
8461 fi
8462
8463 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8464 if test $ol_cv_header_stdc = yes; then
8465   cat >> confdefs.h <<\EOF
8466 #define STDC_HEADERS 1
8467 EOF
8468
8469 fi
8470 ac_cv_header_stdc=disable
8471
8472
8473 if test $ol_cv_header_stdc != yes; then
8474         echo "configure: warning: could not Standard C compliant headers" 1>&2
8475 fi
8476
8477 ac_header_dirent=no
8478 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8479 do
8480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8481 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8482 echo "configure:8483: checking for $ac_hdr that defines DIR" >&5
8483 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
8484   echo $ac_n "(cached) $ac_c" 1>&6
8485 else
8486   cat > conftest.$ac_ext <<EOF
8487 #line 8488 "configure"
8488 #include "confdefs.h"
8489 #include <sys/types.h>
8490 #include <$ac_hdr>
8491 int main() {
8492 DIR *dirp = 0;
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8496   rm -rf conftest*
8497   eval "ac_cv_header_dirent_$ac_safe=yes"
8498 else
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   eval "ac_cv_header_dirent_$ac_safe=no"
8503 fi
8504 rm -f conftest*
8505 fi
8506 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8507   echo "$ac_t""yes" 1>&6
8508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8509   cat >> confdefs.h <<EOF
8510 #define $ac_tr_hdr 1
8511 EOF
8512  ac_header_dirent=$ac_hdr; break
8513 else
8514   echo "$ac_t""no" 1>&6
8515 fi
8516 done
8517 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8518 if test $ac_header_dirent = dirent.h; then
8519 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8520 echo "configure:8521: checking for opendir in -ldir" >&5
8521 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
8522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   ac_save_LIBS="$LIBS"
8526 LIBS="-ldir  $LIBS"
8527 cat > conftest.$ac_ext <<EOF
8528 #line 8529 "configure"
8529 #include "confdefs.h"
8530 /* Override any gcc2 internal prototype to avoid an error.  */
8531 /* We use char because int might match the return type of a gcc2
8532     builtin and then its argument prototype would still apply.  */
8533 char opendir();
8534
8535 int main() {
8536 opendir()
8537 ; return 0; }
8538 EOF
8539 if { (eval echo configure:8540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8540   rm -rf conftest*
8541   eval "ac_cv_lib_$ac_lib_var=yes"
8542 else
8543   echo "configure: failed program was:" >&5
8544   cat conftest.$ac_ext >&5
8545   rm -rf conftest*
8546   eval "ac_cv_lib_$ac_lib_var=no"
8547 fi
8548 rm -f conftest*
8549 LIBS="$ac_save_LIBS"
8550
8551 fi
8552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8553   echo "$ac_t""yes" 1>&6
8554   LIBS="$LIBS -ldir"
8555 else
8556   echo "$ac_t""no" 1>&6
8557 fi
8558
8559 else
8560 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8561 echo "configure:8562: checking for opendir in -lx" >&5
8562 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
8563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8564   echo $ac_n "(cached) $ac_c" 1>&6
8565 else
8566   ac_save_LIBS="$LIBS"
8567 LIBS="-lx  $LIBS"
8568 cat > conftest.$ac_ext <<EOF
8569 #line 8570 "configure"
8570 #include "confdefs.h"
8571 /* Override any gcc2 internal prototype to avoid an error.  */
8572 /* We use char because int might match the return type of a gcc2
8573     builtin and then its argument prototype would still apply.  */
8574 char opendir();
8575
8576 int main() {
8577 opendir()
8578 ; return 0; }
8579 EOF
8580 if { (eval echo configure:8581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8581   rm -rf conftest*
8582   eval "ac_cv_lib_$ac_lib_var=yes"
8583 else
8584   echo "configure: failed program was:" >&5
8585   cat conftest.$ac_ext >&5
8586   rm -rf conftest*
8587   eval "ac_cv_lib_$ac_lib_var=no"
8588 fi
8589 rm -f conftest*
8590 LIBS="$ac_save_LIBS"
8591
8592 fi
8593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8594   echo "$ac_t""yes" 1>&6
8595   LIBS="$LIBS -lx"
8596 else
8597   echo "$ac_t""no" 1>&6
8598 fi
8599
8600 fi
8601
8602 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8603 echo "configure:8604: checking for sys/wait.h that is POSIX.1 compatible" >&5
8604 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
8605   echo $ac_n "(cached) $ac_c" 1>&6
8606 else
8607   cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 #include <sys/types.h>
8611 #include <sys/wait.h>
8612 #ifndef WEXITSTATUS
8613 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8614 #endif
8615 #ifndef WIFEXITED
8616 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8617 #endif
8618 int main() {
8619 int s;
8620 wait (&s);
8621 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8622 ; return 0; }
8623 EOF
8624 if { (eval echo configure:8625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8625   rm -rf conftest*
8626   ac_cv_header_sys_wait_h=yes
8627 else
8628   echo "configure: failed program was:" >&5
8629   cat conftest.$ac_ext >&5
8630   rm -rf conftest*
8631   ac_cv_header_sys_wait_h=no
8632 fi
8633 rm -f conftest*
8634 fi
8635
8636 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8637 if test $ac_cv_header_sys_wait_h = yes; then
8638   cat >> confdefs.h <<\EOF
8639 #define HAVE_SYS_WAIT_H 1
8640 EOF
8641
8642 fi
8643
8644 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8645 echo "configure:8646: checking POSIX termios" >&5
8646 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
8647   echo $ac_n "(cached) $ac_c" 1>&6
8648 else
8649   cat > conftest.$ac_ext <<EOF
8650 #line 8651 "configure"
8651 #include "confdefs.h"
8652 #include <sys/types.h>
8653 #include <unistd.h>
8654 #include <termios.h>
8655 int main() {
8656 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8657    tcgetattr(0, 0);
8658 ; return 0; }
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8661   rm -rf conftest*
8662   am_cv_sys_posix_termios=yes
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -rf conftest*
8667   am_cv_sys_posix_termios=no
8668 fi
8669 rm -f conftest*
8670 fi
8671
8672 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8673
8674
8675  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8676 echo "configure:8677: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8677 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
8678   echo $ac_n "(cached) $ac_c" 1>&6
8679 else
8680   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8681
8682   gwinsz_in_termios_h=no
8683   if test $am_cv_sys_posix_termios = yes; then
8684     cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 #include <sys/types.h>
8688 #     include <termios.h>
8689 #     ifdef TIOCGWINSZ
8690         yes
8691 #     endif
8692     
8693 EOF
8694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8695   egrep "yes" >/dev/null 2>&1; then
8696   rm -rf conftest*
8697   gwinsz_in_termios_h=yes
8698 fi
8699 rm -f conftest*
8700
8701   fi
8702
8703   if test $gwinsz_in_termios_h = no; then
8704     cat > conftest.$ac_ext <<EOF
8705 #line 8706 "configure"
8706 #include "confdefs.h"
8707 #include <sys/types.h>
8708 #     include <sys/ioctl.h>
8709 #     ifdef TIOCGWINSZ
8710         yes
8711 #     endif
8712     
8713 EOF
8714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8715   egrep "yes" >/dev/null 2>&1; then
8716   rm -rf conftest*
8717   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8718 fi
8719 rm -f conftest*
8720
8721   fi
8722   
8723 fi
8724
8725 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8726   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8727     cat >> confdefs.h <<\EOF
8728 #define GWINSZ_IN_SYS_IOCTL 1
8729 EOF
8730
8731   fi
8732
8733 if test $am_cv_sys_posix_termios = yes ; then
8734         cat >> confdefs.h <<\EOF
8735 #define HAVE_POSIX_TERMIOS 1
8736 EOF
8737
8738 fi
8739
8740 for ac_hdr in \
8741         arpa/inet.h             \
8742         arpa/nameser.h  \
8743         assert.h                \
8744         crypt.h                 \
8745         errno.h                 \
8746         fcntl.h                 \
8747         filio.h                 \
8748         getopt.h                \
8749         libutil.h               \
8750         limits.h                \
8751         locale.h                \
8752         malloc.h                \
8753         memory.h                \
8754         regex.h                 \
8755         psap.h                  \
8756         pwd.h                   \
8757         resolv.h                \
8758         sgtty.h                 \
8759         stdarg.h                \
8760         stddef.h                \
8761         string.h                \
8762         strings.h               \
8763         sysexits.h              \
8764         sys/file.h              \
8765         sys/filio.h             \
8766         sys/errno.h             \
8767         sys/ioctl.h             \
8768         sys/param.h             \
8769         sys/resource.h  \
8770         sys/socket.h    \
8771         sys/syslog.h    \
8772         sys/time.h              \
8773         sys/types.h             \
8774         syslog.h                \
8775         termios.h               \
8776         unistd.h                \
8777
8778 do
8779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8781 echo "configure:8782: checking for $ac_hdr" >&5
8782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8783   echo $ac_n "(cached) $ac_c" 1>&6
8784 else
8785   cat > conftest.$ac_ext <<EOF
8786 #line 8787 "configure"
8787 #include "confdefs.h"
8788 #include <$ac_hdr>
8789 EOF
8790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8791 { (eval echo configure:8792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8793 if test -z "$ac_err"; then
8794   rm -rf conftest*
8795   eval "ac_cv_header_$ac_safe=yes"
8796 else
8797   echo "$ac_err" >&5
8798   echo "configure: failed program was:" >&5
8799   cat conftest.$ac_ext >&5
8800   rm -rf conftest*
8801   eval "ac_cv_header_$ac_safe=no"
8802 fi
8803 rm -f conftest*
8804 fi
8805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8806   echo "$ac_t""yes" 1>&6
8807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8808   cat >> confdefs.h <<EOF
8809 #define $ac_tr_hdr 1
8810 EOF
8811  
8812 else
8813   echo "$ac_t""no" 1>&6
8814 fi
8815 done
8816
8817
8818 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
8819 echo "configure:8820: checking for uid_t in sys/types.h" >&5
8820 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
8821   echo $ac_n "(cached) $ac_c" 1>&6
8822 else
8823   cat > conftest.$ac_ext <<EOF
8824 #line 8825 "configure"
8825 #include "confdefs.h"
8826 #include <sys/types.h>
8827 EOF
8828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8829   egrep "uid_t" >/dev/null 2>&1; then
8830   rm -rf conftest*
8831   ac_cv_type_uid_t=yes
8832 else
8833   rm -rf conftest*
8834   ac_cv_type_uid_t=no
8835 fi
8836 rm -f conftest*
8837
8838 fi
8839
8840 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
8841 if test $ac_cv_type_uid_t = no; then
8842   cat >> confdefs.h <<\EOF
8843 #define uid_t int
8844 EOF
8845
8846   cat >> confdefs.h <<\EOF
8847 #define gid_t int
8848 EOF
8849
8850 fi
8851
8852 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
8853 echo "configure:8854: checking type of array argument to getgroups" >&5
8854 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
8855   echo $ac_n "(cached) $ac_c" 1>&6
8856 else
8857   if test "$cross_compiling" = yes; then
8858   ac_cv_type_getgroups=cross
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863
8864 /* Thanks to Mike Rendell for this test.  */
8865 #include <sys/types.h>
8866 #define NGID 256
8867 #undef MAX
8868 #define MAX(x, y) ((x) > (y) ? (x) : (y))
8869 main()
8870 {
8871   gid_t gidset[NGID];
8872   int i, n;
8873   union { gid_t gval; long lval; }  val;
8874
8875   val.lval = -1;
8876   for (i = 0; i < NGID; i++)
8877     gidset[i] = val.gval;
8878   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
8879                  gidset);
8880   /* Exit non-zero if getgroups seems to require an array of ints.  This
8881      happens when gid_t is short but getgroups modifies an array of ints.  */
8882   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
8883 }
8884
8885 EOF
8886 if { (eval echo configure:8887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8887 then
8888     ac_cv_type_getgroups=gid_t
8889 else
8890   echo "configure: failed program was:" >&5
8891   cat conftest.$ac_ext >&5
8892   rm -fr conftest*
8893   ac_cv_type_getgroups=int
8894 fi
8895 rm -fr conftest*
8896 fi
8897
8898 if test $ac_cv_type_getgroups = cross; then
8899         cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902 #include <unistd.h>
8903 EOF
8904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8905   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
8906   rm -rf conftest*
8907   ac_cv_type_getgroups=gid_t
8908 else
8909   rm -rf conftest*
8910   ac_cv_type_getgroups=int
8911 fi
8912 rm -f conftest*
8913
8914 fi
8915 fi
8916
8917 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
8918 cat >> confdefs.h <<EOF
8919 #define GETGROUPS_T $ac_cv_type_getgroups
8920 EOF
8921
8922  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8923 echo "configure:8924: checking for ANSI C header files" >&5
8924 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 #include <stdlib.h>
8931 #include <stdarg.h>
8932 #include <string.h>
8933 #include <float.h>
8934 EOF
8935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8936 { (eval echo configure:8937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8938 if test -z "$ac_err"; then
8939   rm -rf conftest*
8940   ac_cv_header_stdc=yes
8941 else
8942   echo "$ac_err" >&5
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   ac_cv_header_stdc=no
8947 fi
8948 rm -f conftest*
8949
8950 if test $ac_cv_header_stdc = yes; then
8951   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8952 cat > conftest.$ac_ext <<EOF
8953 #line 8954 "configure"
8954 #include "confdefs.h"
8955 #include <string.h>
8956 EOF
8957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8958   egrep "memchr" >/dev/null 2>&1; then
8959   :
8960 else
8961   rm -rf conftest*
8962   ac_cv_header_stdc=no
8963 fi
8964 rm -f conftest*
8965
8966 fi
8967
8968 if test $ac_cv_header_stdc = yes; then
8969   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8970 cat > conftest.$ac_ext <<EOF
8971 #line 8972 "configure"
8972 #include "confdefs.h"
8973 #include <stdlib.h>
8974 EOF
8975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8976   egrep "free" >/dev/null 2>&1; then
8977   :
8978 else
8979   rm -rf conftest*
8980   ac_cv_header_stdc=no
8981 fi
8982 rm -f conftest*
8983
8984 fi
8985
8986 if test $ac_cv_header_stdc = yes; then
8987   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8988 if test "$cross_compiling" = yes; then
8989   :
8990 else
8991   cat > conftest.$ac_ext <<EOF
8992 #line 8993 "configure"
8993 #include "confdefs.h"
8994 #include <ctype.h>
8995 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8996 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8997 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8998 int main () { int i; for (i = 0; i < 256; i++)
8999 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9000 exit (0); }
9001
9002 EOF
9003 if { (eval echo configure:9004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9004 then
9005   :
9006 else
9007   echo "configure: failed program was:" >&5
9008   cat conftest.$ac_ext >&5
9009   rm -fr conftest*
9010   ac_cv_header_stdc=no
9011 fi
9012 rm -fr conftest*
9013 fi
9014
9015 fi
9016 fi
9017
9018 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9019 if test $ac_cv_header_stdc = yes; then
9020   cat >> confdefs.h <<\EOF
9021 #define STDC_HEADERS 1
9022 EOF
9023
9024 fi
9025
9026 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9027 echo "configure:9028: checking for mode_t" >&5
9028 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9029   echo $ac_n "(cached) $ac_c" 1>&6
9030 else
9031   cat > conftest.$ac_ext <<EOF
9032 #line 9033 "configure"
9033 #include "confdefs.h"
9034 #include <sys/types.h>
9035 #if STDC_HEADERS
9036 #include <stdlib.h>
9037 #include <stddef.h>
9038 #endif
9039 EOF
9040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9041   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9042   rm -rf conftest*
9043   ac_cv_type_mode_t=yes
9044 else
9045   rm -rf conftest*
9046   ac_cv_type_mode_t=no
9047 fi
9048 rm -f conftest*
9049
9050 fi
9051 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9052 if test $ac_cv_type_mode_t = no; then
9053   cat >> confdefs.h <<\EOF
9054 #define mode_t int
9055 EOF
9056
9057 fi
9058
9059 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9060 echo "configure:9061: checking for off_t" >&5
9061 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9062   echo $ac_n "(cached) $ac_c" 1>&6
9063 else
9064   cat > conftest.$ac_ext <<EOF
9065 #line 9066 "configure"
9066 #include "confdefs.h"
9067 #include <sys/types.h>
9068 #if STDC_HEADERS
9069 #include <stdlib.h>
9070 #include <stddef.h>
9071 #endif
9072 EOF
9073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9074   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9075   rm -rf conftest*
9076   ac_cv_type_off_t=yes
9077 else
9078   rm -rf conftest*
9079   ac_cv_type_off_t=no
9080 fi
9081 rm -f conftest*
9082
9083 fi
9084 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9085 if test $ac_cv_type_off_t = no; then
9086   cat >> confdefs.h <<\EOF
9087 #define off_t long
9088 EOF
9089
9090 fi
9091
9092 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9093 echo "configure:9094: checking for pid_t" >&5
9094 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9095   echo $ac_n "(cached) $ac_c" 1>&6
9096 else
9097   cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 #include <sys/types.h>
9101 #if STDC_HEADERS
9102 #include <stdlib.h>
9103 #include <stddef.h>
9104 #endif
9105 EOF
9106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9107   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9108   rm -rf conftest*
9109   ac_cv_type_pid_t=yes
9110 else
9111   rm -rf conftest*
9112   ac_cv_type_pid_t=no
9113 fi
9114 rm -f conftest*
9115
9116 fi
9117 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9118 if test $ac_cv_type_pid_t = no; then
9119   cat >> confdefs.h <<\EOF
9120 #define pid_t int
9121 EOF
9122
9123 fi
9124
9125 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9126 echo "configure:9127: checking for ptrdiff_t" >&5
9127 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9128   echo $ac_n "(cached) $ac_c" 1>&6
9129 else
9130   cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133 #include <stddef.h>
9134 int main() {
9135 ptrdiff_t p
9136 ; return 0; }
9137 EOF
9138 if { (eval echo configure:9139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9139   rm -rf conftest*
9140   am_cv_type_ptrdiff_t=yes
9141 else
9142   echo "configure: failed program was:" >&5
9143   cat conftest.$ac_ext >&5
9144   rm -rf conftest*
9145   am_cv_type_ptrdiff_t=no
9146 fi
9147 rm -f conftest*
9148 fi
9149
9150 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9151    if test $am_cv_type_ptrdiff_t = yes; then
9152      cat >> confdefs.h <<\EOF
9153 #define HAVE_PTRDIFF_T 1
9154 EOF
9155
9156    fi
9157
9158 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9159 echo "configure:9160: checking return type of signal handlers" >&5
9160 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9161   echo $ac_n "(cached) $ac_c" 1>&6
9162 else
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 #include <sys/types.h>
9167 #include <signal.h>
9168 #ifdef signal
9169 #undef signal
9170 #endif
9171 #ifdef __cplusplus
9172 extern "C" void (*signal (int, void (*)(int)))(int);
9173 #else
9174 void (*signal ()) ();
9175 #endif
9176
9177 int main() {
9178 int i;
9179 ; return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9182   rm -rf conftest*
9183   ac_cv_type_signal=void
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -rf conftest*
9188   ac_cv_type_signal=int
9189 fi
9190 rm -f conftest*
9191 fi
9192
9193 echo "$ac_t""$ac_cv_type_signal" 1>&6
9194 cat >> confdefs.h <<EOF
9195 #define RETSIGTYPE $ac_cv_type_signal
9196 EOF
9197
9198
9199 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9200 echo "configure:9201: checking for sig_atomic_t" >&5
9201 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207 #include <signal.h>
9208 int main() {
9209 sig_atomic_t atomic;
9210 ; return 0; }
9211 EOF
9212 if { (eval echo configure:9213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9213   rm -rf conftest*
9214   ol_cv_type_sig_atomic_t=yes
9215 else
9216   echo "configure: failed program was:" >&5
9217   cat conftest.$ac_ext >&5
9218   rm -rf conftest*
9219   ol_cv_type_sig_atomic_t=no
9220 fi
9221 rm -f conftest*
9222 fi
9223
9224 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9225   if test $ol_cv_type_sig_atomic_t = no; then
9226     cat >> confdefs.h <<\EOF
9227 #define sig_atomic_t int
9228 EOF
9229
9230   fi
9231  
9232 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9233 echo "configure:9234: checking for size_t" >&5
9234 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9235   echo $ac_n "(cached) $ac_c" 1>&6
9236 else
9237   cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240 #include <sys/types.h>
9241 #if STDC_HEADERS
9242 #include <stdlib.h>
9243 #include <stddef.h>
9244 #endif
9245 EOF
9246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9247   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9248   rm -rf conftest*
9249   ac_cv_type_size_t=yes
9250 else
9251   rm -rf conftest*
9252   ac_cv_type_size_t=no
9253 fi
9254 rm -f conftest*
9255
9256 fi
9257 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9258 if test $ac_cv_type_size_t = no; then
9259   cat >> confdefs.h <<\EOF
9260 #define size_t unsigned
9261 EOF
9262
9263 fi
9264
9265 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
9266 echo "configure:9267: checking for st_blksize in struct stat" >&5
9267 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
9268   echo $ac_n "(cached) $ac_c" 1>&6
9269 else
9270   cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 #include <sys/types.h>
9274 #include <sys/stat.h>
9275 int main() {
9276 struct stat s; s.st_blksize;
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9280   rm -rf conftest*
9281   ac_cv_struct_st_blksize=yes
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   ac_cv_struct_st_blksize=no
9287 fi
9288 rm -f conftest*
9289 fi
9290
9291 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
9292 if test $ac_cv_struct_st_blksize = yes; then
9293   cat >> confdefs.h <<\EOF
9294 #define HAVE_ST_BLKSIZE 1
9295 EOF
9296
9297 fi
9298
9299 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
9300 echo "configure:9301: checking whether time.h and sys/time.h may both be included" >&5
9301 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
9302   echo $ac_n "(cached) $ac_c" 1>&6
9303 else
9304   cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307 #include <sys/types.h>
9308 #include <sys/time.h>
9309 #include <time.h>
9310 int main() {
9311 struct tm *tp;
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9315   rm -rf conftest*
9316   ac_cv_header_time=yes
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   ac_cv_header_time=no
9322 fi
9323 rm -f conftest*
9324 fi
9325
9326 echo "$ac_t""$ac_cv_header_time" 1>&6
9327 if test $ac_cv_header_time = yes; then
9328   cat >> confdefs.h <<\EOF
9329 #define TIME_WITH_SYS_TIME 1
9330 EOF
9331
9332 fi
9333
9334 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
9335 echo "configure:9336: checking whether struct tm is in sys/time.h or time.h" >&5
9336 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
9337   echo $ac_n "(cached) $ac_c" 1>&6
9338 else
9339   cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342 #include <sys/types.h>
9343 #include <time.h>
9344 int main() {
9345 struct tm *tp; tp->tm_sec;
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9349   rm -rf conftest*
9350   ac_cv_struct_tm=time.h
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -rf conftest*
9355   ac_cv_struct_tm=sys/time.h
9356 fi
9357 rm -f conftest*
9358 fi
9359
9360 echo "$ac_t""$ac_cv_struct_tm" 1>&6
9361 if test $ac_cv_struct_tm = sys/time.h; then
9362   cat >> confdefs.h <<\EOF
9363 #define TM_IN_SYS_TIME 1
9364 EOF
9365
9366 fi
9367
9368 # test for pw_gecos in struct passwd
9369 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
9370 echo "configure:9371: checking struct passwd for pw_gecos" >&5
9371 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
9372   echo $ac_n "(cached) $ac_c" 1>&6
9373 else
9374   
9375         cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378 #include <pwd.h>
9379 int main() {
9380
9381         struct passwd pwd;
9382         pwd.pw_gecos = pwd.pw_name;
9383
9384 ; return 0; }
9385 EOF
9386 if { (eval echo configure:9387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9387   rm -rf conftest*
9388   ol_cv_struct_passwd_pw_gecos=yes
9389 else
9390   echo "configure: failed program was:" >&5
9391   cat conftest.$ac_ext >&5
9392   rm -rf conftest*
9393   ol_cv_struct_passwd_pw_gecos=no
9394 fi
9395 rm -f conftest*
9396 fi
9397
9398 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
9399 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
9400         cat >> confdefs.h <<\EOF
9401 #define HAVE_PW_GECOS 1
9402 EOF
9403
9404 fi
9405
9406
9407
9408 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
9409 echo "configure:9410: checking if toupper() requires islower()" >&5
9410 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
9411   echo $ac_n "(cached) $ac_c" 1>&6
9412 else
9413   
9414         if test "$cross_compiling" = yes; then
9415   ol_cv_c_upper_lower=safe
9416 else
9417   cat > conftest.$ac_ext <<EOF
9418 #line 9419 "configure"
9419 #include "confdefs.h"
9420
9421 #include <ctype.h>
9422 main()
9423 {
9424         if ('C' == toupper('C'))
9425                 exit(0);
9426         else
9427                 exit(1);
9428 }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9431 then
9432   ol_cv_c_upper_lower=no
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -fr conftest*
9437   ol_cv_c_upper_lower=yes
9438 fi
9439 rm -fr conftest*
9440 fi
9441
9442 fi
9443
9444 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
9445 if test $ol_cv_c_upper_lower != no ; then
9446         cat >> confdefs.h <<\EOF
9447 #define C_UPPER_LOWER 1
9448 EOF
9449
9450 fi
9451
9452 echo $ac_n "checking for working const""... $ac_c" 1>&6
9453 echo "configure:9454: checking for working const" >&5
9454 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
9455   echo $ac_n "(cached) $ac_c" 1>&6
9456 else
9457   cat > conftest.$ac_ext <<EOF
9458 #line 9459 "configure"
9459 #include "confdefs.h"
9460
9461 int main() {
9462
9463 /* Ultrix mips cc rejects this.  */
9464 typedef int charset[2]; const charset x;
9465 /* SunOS 4.1.1 cc rejects this.  */
9466 char const *const *ccp;
9467 char **p;
9468 /* NEC SVR4.0.2 mips cc rejects this.  */
9469 struct point {int x, y;};
9470 static struct point const zero = {0,0};
9471 /* AIX XL C 1.02.0.0 rejects this.
9472    It does not let you subtract one const X* pointer from another in an arm
9473    of an if-expression whose if-part is not a constant expression */
9474 const char *g = "string";
9475 ccp = &g + (g ? g-g : 0);
9476 /* HPUX 7.0 cc rejects these. */
9477 ++ccp;
9478 p = (char**) ccp;
9479 ccp = (char const *const *) p;
9480 { /* SCO 3.2v4 cc rejects this.  */
9481   char *t;
9482   char const *s = 0 ? (char *) 0 : (char const *) 0;
9483
9484   *t++ = 0;
9485 }
9486 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9487   int x[] = {25, 17};
9488   const int *foo = &x[0];
9489   ++foo;
9490 }
9491 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9492   typedef const int *iptr;
9493   iptr p = 0;
9494   ++p;
9495 }
9496 { /* AIX XL C 1.02.0.0 rejects this saying
9497      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9498   struct s { int j; const int *ap[3]; };
9499   struct s *b; b->j = 5;
9500 }
9501 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9502   const int foo = 10;
9503 }
9504
9505 ; return 0; }
9506 EOF
9507 if { (eval echo configure:9508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9508   rm -rf conftest*
9509   ac_cv_c_const=yes
9510 else
9511   echo "configure: failed program was:" >&5
9512   cat conftest.$ac_ext >&5
9513   rm -rf conftest*
9514   ac_cv_c_const=no
9515 fi
9516 rm -f conftest*
9517 fi
9518
9519 echo "$ac_t""$ac_cv_c_const" 1>&6
9520 if test $ac_cv_c_const = no; then
9521   cat >> confdefs.h <<\EOF
9522 #define const 
9523 EOF
9524
9525 fi
9526
9527 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
9528 echo "configure:9529: checking if compiler understands volatile" >&5
9529 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532   cat > conftest.$ac_ext <<EOF
9533 #line 9534 "configure"
9534 #include "confdefs.h"
9535 int x, y, z;
9536 int main() {
9537 volatile int a; int * volatile b = x ? &y : &z;
9538       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
9539       *b = 0;
9540 ; return 0; }
9541 EOF
9542 if { (eval echo configure:9543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9543   rm -rf conftest*
9544   ol_cv_c_volatile=yes
9545 else
9546   echo "configure: failed program was:" >&5
9547   cat conftest.$ac_ext >&5
9548   rm -rf conftest*
9549   ol_cv_c_volatile=no
9550 fi
9551 rm -f conftest*
9552 fi
9553
9554 echo "$ac_t""$ol_cv_c_volatile" 1>&6
9555   if test $ol_cv_c_volatile = yes; then
9556     : 
9557   else
9558     cat >> confdefs.h <<\EOF
9559 #define volatile 
9560 EOF
9561
9562   fi
9563  
9564
9565 if test $cross_compiling = yes ; then
9566         cat >> confdefs.h <<\EOF
9567 #define CROSS_COMPILING 1
9568 EOF
9569
9570 else
9571         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
9572 echo "configure:9573: checking whether byte ordering is bigendian" >&5
9573 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
9574   echo $ac_n "(cached) $ac_c" 1>&6
9575 else
9576   ac_cv_c_bigendian=unknown
9577 # See if sys/param.h defines the BYTE_ORDER macro.
9578 cat > conftest.$ac_ext <<EOF
9579 #line 9580 "configure"
9580 #include "confdefs.h"
9581 #include <sys/types.h>
9582 #include <sys/param.h>
9583 int main() {
9584
9585 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9586  bogus endian macros
9587 #endif
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9591   rm -rf conftest*
9592   # It does; now see whether it defined to BIG_ENDIAN or not.
9593 cat > conftest.$ac_ext <<EOF
9594 #line 9595 "configure"
9595 #include "confdefs.h"
9596 #include <sys/types.h>
9597 #include <sys/param.h>
9598 int main() {
9599
9600 #if BYTE_ORDER != BIG_ENDIAN
9601  not big endian
9602 #endif
9603 ; return 0; }
9604 EOF
9605 if { (eval echo configure:9606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9606   rm -rf conftest*
9607   ac_cv_c_bigendian=yes
9608 else
9609   echo "configure: failed program was:" >&5
9610   cat conftest.$ac_ext >&5
9611   rm -rf conftest*
9612   ac_cv_c_bigendian=no
9613 fi
9614 rm -f conftest*
9615 else
9616   echo "configure: failed program was:" >&5
9617   cat conftest.$ac_ext >&5
9618 fi
9619 rm -f conftest*
9620 if test $ac_cv_c_bigendian = unknown; then
9621 if test "$cross_compiling" = yes; then
9622     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9623 else
9624   cat > conftest.$ac_ext <<EOF
9625 #line 9626 "configure"
9626 #include "confdefs.h"
9627 main () {
9628   /* Are we little or big endian?  From Harbison&Steele.  */
9629   union
9630   {
9631     long l;
9632     char c[sizeof (long)];
9633   } u;
9634   u.l = 1;
9635   exit (u.c[sizeof (long) - 1] == 1);
9636 }
9637 EOF
9638 if { (eval echo configure:9639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9639 then
9640   ac_cv_c_bigendian=no
9641 else
9642   echo "configure: failed program was:" >&5
9643   cat conftest.$ac_ext >&5
9644   rm -fr conftest*
9645   ac_cv_c_bigendian=yes
9646 fi
9647 rm -fr conftest*
9648 fi
9649
9650 fi
9651 fi
9652
9653 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
9654 if test $ac_cv_c_bigendian = yes; then
9655   cat >> confdefs.h <<\EOF
9656 #define WORDS_BIGENDIAN 1
9657 EOF
9658
9659 fi
9660
9661         echo $ac_n "checking size of short""... $ac_c" 1>&6
9662 echo "configure:9663: checking size of short" >&5
9663 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666   if test "$cross_compiling" = yes; then
9667     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9668 else
9669   cat > conftest.$ac_ext <<EOF
9670 #line 9671 "configure"
9671 #include "confdefs.h"
9672 #include <stdio.h>
9673 main()
9674 {
9675   FILE *f=fopen("conftestval", "w");
9676   if (!f) exit(1);
9677   fprintf(f, "%d\n", sizeof(short));
9678   exit(0);
9679 }
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9682 then
9683   ac_cv_sizeof_short=`cat conftestval`
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -fr conftest*
9688   ac_cv_sizeof_short=0
9689 fi
9690 rm -fr conftest*
9691 fi
9692
9693 fi
9694 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
9695 cat >> confdefs.h <<EOF
9696 #define SIZEOF_SHORT $ac_cv_sizeof_short
9697 EOF
9698
9699  
9700         echo $ac_n "checking size of int""... $ac_c" 1>&6
9701 echo "configure:9702: checking size of int" >&5
9702 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   if test "$cross_compiling" = yes; then
9706     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9707 else
9708   cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 #include <stdio.h>
9712 main()
9713 {
9714   FILE *f=fopen("conftestval", "w");
9715   if (!f) exit(1);
9716   fprintf(f, "%d\n", sizeof(int));
9717   exit(0);
9718 }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9721 then
9722   ac_cv_sizeof_int=`cat conftestval`
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -fr conftest*
9727   ac_cv_sizeof_int=0
9728 fi
9729 rm -fr conftest*
9730 fi
9731
9732 fi
9733 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
9734 cat >> confdefs.h <<EOF
9735 #define SIZEOF_INT $ac_cv_sizeof_int
9736 EOF
9737
9738  
9739         echo $ac_n "checking size of long""... $ac_c" 1>&6
9740 echo "configure:9741: checking size of long" >&5
9741 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
9742   echo $ac_n "(cached) $ac_c" 1>&6
9743 else
9744   if test "$cross_compiling" = yes; then
9745     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9746 else
9747   cat > conftest.$ac_ext <<EOF
9748 #line 9749 "configure"
9749 #include "confdefs.h"
9750 #include <stdio.h>
9751 main()
9752 {
9753   FILE *f=fopen("conftestval", "w");
9754   if (!f) exit(1);
9755   fprintf(f, "%d\n", sizeof(long));
9756   exit(0);
9757 }
9758 EOF
9759 if { (eval echo configure:9760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9760 then
9761   ac_cv_sizeof_long=`cat conftestval`
9762 else
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -fr conftest*
9766   ac_cv_sizeof_long=0
9767 fi
9768 rm -fr conftest*
9769 fi
9770
9771 fi
9772 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
9773 cat >> confdefs.h <<EOF
9774 #define SIZEOF_LONG $ac_cv_sizeof_long
9775 EOF
9776
9777
9778 fi
9779
9780 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
9781 echo "configure:9782: checking for 8-bit clean memcmp" >&5
9782 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
9783   echo $ac_n "(cached) $ac_c" 1>&6
9784 else
9785   if test "$cross_compiling" = yes; then
9786   ac_cv_func_memcmp_clean=no
9787 else
9788   cat > conftest.$ac_ext <<EOF
9789 #line 9790 "configure"
9790 #include "confdefs.h"
9791
9792 main()
9793 {
9794   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
9795   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
9796 }
9797
9798 EOF
9799 if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9800 then
9801   ac_cv_func_memcmp_clean=yes
9802 else
9803   echo "configure: failed program was:" >&5
9804   cat conftest.$ac_ext >&5
9805   rm -fr conftest*
9806   ac_cv_func_memcmp_clean=no
9807 fi
9808 rm -fr conftest*
9809 fi
9810
9811 fi
9812
9813 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
9814 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
9815
9816 echo $ac_n "checking for strftime""... $ac_c" 1>&6
9817 echo "configure:9818: checking for strftime" >&5
9818 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
9819   echo $ac_n "(cached) $ac_c" 1>&6
9820 else
9821   cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824 /* System header to define __stub macros and hopefully few prototypes,
9825     which can conflict with char strftime(); below.  */
9826 #include <assert.h>
9827 /* Override any gcc2 internal prototype to avoid an error.  */
9828 /* We use char because int might match the return type of a gcc2
9829     builtin and then its argument prototype would still apply.  */
9830 char strftime();
9831
9832 int main() {
9833
9834 /* The GNU C library defines this for functions which it implements
9835     to always fail with ENOSYS.  Some functions are actually named
9836     something starting with __ and the normal name is an alias.  */
9837 #if defined (__stub_strftime) || defined (__stub___strftime)
9838 choke me
9839 #else
9840 strftime();
9841 #endif
9842
9843 ; return 0; }
9844 EOF
9845 if { (eval echo configure:9846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9846   rm -rf conftest*
9847   eval "ac_cv_func_strftime=yes"
9848 else
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -rf conftest*
9852   eval "ac_cv_func_strftime=no"
9853 fi
9854 rm -f conftest*
9855 fi
9856
9857 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
9858   echo "$ac_t""yes" 1>&6
9859   cat >> confdefs.h <<\EOF
9860 #define HAVE_STRFTIME 1
9861 EOF
9862
9863 else
9864   echo "$ac_t""no" 1>&6
9865 # strftime is in -lintl on SCO UNIX.
9866 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
9867 echo "configure:9868: checking for strftime in -lintl" >&5
9868 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
9869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   ac_save_LIBS="$LIBS"
9873 LIBS="-lintl  $LIBS"
9874 cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 /* Override any gcc2 internal prototype to avoid an error.  */
9878 /* We use char because int might match the return type of a gcc2
9879     builtin and then its argument prototype would still apply.  */
9880 char strftime();
9881
9882 int main() {
9883 strftime()
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9887   rm -rf conftest*
9888   eval "ac_cv_lib_$ac_lib_var=yes"
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   eval "ac_cv_lib_$ac_lib_var=no"
9894 fi
9895 rm -f conftest*
9896 LIBS="$ac_save_LIBS"
9897
9898 fi
9899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9900   echo "$ac_t""yes" 1>&6
9901   cat >> confdefs.h <<\EOF
9902 #define HAVE_STRFTIME 1
9903 EOF
9904
9905 LIBS="-lintl $LIBS"
9906 else
9907   echo "$ac_t""no" 1>&6
9908 fi
9909
9910 fi
9911
9912 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
9913 echo "configure:9914: checking for vprintf" >&5
9914 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
9915   echo $ac_n "(cached) $ac_c" 1>&6
9916 else
9917   cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 /* System header to define __stub macros and hopefully few prototypes,
9921     which can conflict with char vprintf(); below.  */
9922 #include <assert.h>
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 /* We use char because int might match the return type of a gcc2
9925     builtin and then its argument prototype would still apply.  */
9926 char vprintf();
9927
9928 int main() {
9929
9930 /* The GNU C library defines this for functions which it implements
9931     to always fail with ENOSYS.  Some functions are actually named
9932     something starting with __ and the normal name is an alias.  */
9933 #if defined (__stub_vprintf) || defined (__stub___vprintf)
9934 choke me
9935 #else
9936 vprintf();
9937 #endif
9938
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9942   rm -rf conftest*
9943   eval "ac_cv_func_vprintf=yes"
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   eval "ac_cv_func_vprintf=no"
9949 fi
9950 rm -f conftest*
9951 fi
9952
9953 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
9954   echo "$ac_t""yes" 1>&6
9955   cat >> confdefs.h <<\EOF
9956 #define HAVE_VPRINTF 1
9957 EOF
9958
9959 else
9960   echo "$ac_t""no" 1>&6
9961 fi
9962
9963 if test "$ac_cv_func_vprintf" != yes; then
9964 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
9965 echo "configure:9966: checking for _doprnt" >&5
9966 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
9967   echo $ac_n "(cached) $ac_c" 1>&6
9968 else
9969   cat > conftest.$ac_ext <<EOF
9970 #line 9971 "configure"
9971 #include "confdefs.h"
9972 /* System header to define __stub macros and hopefully few prototypes,
9973     which can conflict with char _doprnt(); below.  */
9974 #include <assert.h>
9975 /* Override any gcc2 internal prototype to avoid an error.  */
9976 /* We use char because int might match the return type of a gcc2
9977     builtin and then its argument prototype would still apply.  */
9978 char _doprnt();
9979
9980 int main() {
9981
9982 /* The GNU C library defines this for functions which it implements
9983     to always fail with ENOSYS.  Some functions are actually named
9984     something starting with __ and the normal name is an alias.  */
9985 #if defined (__stub__doprnt) || defined (__stub____doprnt)
9986 choke me
9987 #else
9988 _doprnt();
9989 #endif
9990
9991 ; return 0; }
9992 EOF
9993 if { (eval echo configure:9994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9994   rm -rf conftest*
9995   eval "ac_cv_func__doprnt=yes"
9996 else
9997   echo "configure: failed program was:" >&5
9998   cat conftest.$ac_ext >&5
9999   rm -rf conftest*
10000   eval "ac_cv_func__doprnt=no"
10001 fi
10002 rm -f conftest*
10003 fi
10004
10005 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10006   echo "$ac_t""yes" 1>&6
10007   cat >> confdefs.h <<\EOF
10008 #define HAVE_DOPRNT 1
10009 EOF
10010
10011 else
10012   echo "$ac_t""no" 1>&6
10013 fi
10014
10015 fi
10016
10017
10018 if test $ac_cv_func_vprintf = yes ; then
10019                 for ac_func in vsnprintf vsprintf
10020 do
10021 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10022 echo "configure:10023: checking for $ac_func" >&5
10023 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10024   echo $ac_n "(cached) $ac_c" 1>&6
10025 else
10026   cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 /* System header to define __stub macros and hopefully few prototypes,
10030     which can conflict with char $ac_func(); below.  */
10031 #include <assert.h>
10032 /* Override any gcc2 internal prototype to avoid an error.  */
10033 /* We use char because int might match the return type of a gcc2
10034     builtin and then its argument prototype would still apply.  */
10035 char $ac_func();
10036
10037 int main() {
10038
10039 /* The GNU C library defines this for functions which it implements
10040     to always fail with ENOSYS.  Some functions are actually named
10041     something starting with __ and the normal name is an alias.  */
10042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10043 choke me
10044 #else
10045 $ac_func();
10046 #endif
10047
10048 ; return 0; }
10049 EOF
10050 if { (eval echo configure:10051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10051   rm -rf conftest*
10052   eval "ac_cv_func_$ac_func=yes"
10053 else
10054   echo "configure: failed program was:" >&5
10055   cat conftest.$ac_ext >&5
10056   rm -rf conftest*
10057   eval "ac_cv_func_$ac_func=no"
10058 fi
10059 rm -f conftest*
10060 fi
10061
10062 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10063   echo "$ac_t""yes" 1>&6
10064     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10065   cat >> confdefs.h <<EOF
10066 #define $ac_tr_func 1
10067 EOF
10068  
10069 else
10070   echo "$ac_t""no" 1>&6
10071 fi
10072 done
10073
10074 fi
10075
10076 for ac_func in \
10077         bcopy                   \
10078         flock                   \
10079         getdtablesize           \
10080         gethostname             \
10081         getpass                 \
10082         getpwuid                \
10083         gettimeofday            \
10084         lockf                   \
10085         memcpy                  \
10086         memmove                 \
10087         mkstemp                 \
10088         select                  \
10089         setpwfile               \
10090         setsid                  \
10091         signal                  \
10092         sigset                  \
10093         snprintf                \
10094         socket                  \
10095         strdup                  \
10096         strerror                \
10097         strpbrk                 \
10098         strrchr                 \
10099         strsep                  \
10100         strstr                  \
10101         strtol                  \
10102         strtoul                 \
10103         strspn                  \
10104         sysconf                 \
10105         waitpid                 \
10106
10107 do
10108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10109 echo "configure:10110: checking for $ac_func" >&5
10110 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 /* System header to define __stub macros and hopefully few prototypes,
10117     which can conflict with char $ac_func(); below.  */
10118 #include <assert.h>
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char $ac_func();
10123
10124 int main() {
10125
10126 /* The GNU C library defines this for functions which it implements
10127     to always fail with ENOSYS.  Some functions are actually named
10128     something starting with __ and the normal name is an alias.  */
10129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10130 choke me
10131 #else
10132 $ac_func();
10133 #endif
10134
10135 ; return 0; }
10136 EOF
10137 if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10138   rm -rf conftest*
10139   eval "ac_cv_func_$ac_func=yes"
10140 else
10141   echo "configure: failed program was:" >&5
10142   cat conftest.$ac_ext >&5
10143   rm -rf conftest*
10144   eval "ac_cv_func_$ac_func=no"
10145 fi
10146 rm -f conftest*
10147 fi
10148
10149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10150   echo "$ac_t""yes" 1>&6
10151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10152   cat >> confdefs.h <<EOF
10153 #define $ac_tr_func 1
10154 EOF
10155  
10156 else
10157   echo "$ac_t""no" 1>&6
10158 fi
10159 done
10160
10161
10162 for ac_func in getopt tempnam
10163 do
10164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10165 echo "configure:10166: checking for $ac_func" >&5
10166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10167   echo $ac_n "(cached) $ac_c" 1>&6
10168 else
10169   cat > conftest.$ac_ext <<EOF
10170 #line 10171 "configure"
10171 #include "confdefs.h"
10172 /* System header to define __stub macros and hopefully few prototypes,
10173     which can conflict with char $ac_func(); below.  */
10174 #include <assert.h>
10175 /* Override any gcc2 internal prototype to avoid an error.  */
10176 /* We use char because int might match the return type of a gcc2
10177     builtin and then its argument prototype would still apply.  */
10178 char $ac_func();
10179
10180 int main() {
10181
10182 /* The GNU C library defines this for functions which it implements
10183     to always fail with ENOSYS.  Some functions are actually named
10184     something starting with __ and the normal name is an alias.  */
10185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10186 choke me
10187 #else
10188 $ac_func();
10189 #endif
10190
10191 ; return 0; }
10192 EOF
10193 if { (eval echo configure:10194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10194   rm -rf conftest*
10195   eval "ac_cv_func_$ac_func=yes"
10196 else
10197   echo "configure: failed program was:" >&5
10198   cat conftest.$ac_ext >&5
10199   rm -rf conftest*
10200   eval "ac_cv_func_$ac_func=no"
10201 fi
10202 rm -f conftest*
10203 fi
10204
10205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10206   echo "$ac_t""yes" 1>&6
10207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10208   cat >> confdefs.h <<EOF
10209 #define $ac_tr_func 1
10210 EOF
10211  
10212 else
10213   echo "$ac_t""no" 1>&6
10214 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10215 fi
10216 done
10217
10218
10219
10220 # Check Configuration
10221
10222 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10223 echo "configure:10224: checking declaration of sys_errlist" >&5
10224 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   
10228         cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231
10232 #include <stdio.h>
10233 #include <sys/types.h>
10234 #include <errno.h> 
10235 int main() {
10236 char *c = (char *) *sys_errlist
10237 ; return 0; }
10238 EOF
10239 if { (eval echo configure:10240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10240   rm -rf conftest*
10241   ol_cv_dcl_sys_errlist=yes
10242 else
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -rf conftest*
10246   ol_cv_dcl_sys_errlist=no
10247 fi
10248 rm -f conftest*
10249 fi
10250
10251 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10252 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10253 if test $ol_cv_dcl_sys_errlist = no ; then
10254         cat >> confdefs.h <<\EOF
10255 #define DECL_SYS_ERRLIST 1
10256 EOF
10257
10258         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
10259 echo "configure:10260: checking existence of sys_errlist" >&5
10260         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   
10264                 cat > conftest.$ac_ext <<EOF
10265 #line 10266 "configure"
10266 #include "confdefs.h"
10267 #include <errno.h>
10268 int main() {
10269 char *c = (char *) *sys_errlist
10270 ; return 0; }
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10273   rm -rf conftest*
10274   ol_cv_have_sys_errlist=yes
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   ol_cv_have_sys_errlist=no
10280 fi
10281 rm -f conftest*
10282 fi
10283
10284         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
10285         if test $ol_cv_have_sys_errlist = yes ; then
10286                 cat >> confdefs.h <<\EOF
10287 #define HAVE_SYS_ERRLIST 1
10288 EOF
10289
10290         fi
10291 fi
10292
10293
10294
10295 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
10296 echo "configure:10297: checking strdup declaration" >&5
10297 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301         cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304
10305 #include <string.h> 
10306 int main() {
10307 extern char *strdup();
10308 ; return 0; }
10309 EOF
10310 if { (eval echo configure:10311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10311   rm -rf conftest*
10312   ol_cv_dcl_strdup=yes
10313 else
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -rf conftest*
10317   ol_cv_dcl_strdup=no
10318 fi
10319 rm -f conftest*
10320 fi
10321
10322 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
10323 if test $ol_cv_dcl_strdup = yes ; then
10324         cat >> confdefs.h <<\EOF
10325 #define DECL_STRDUP 1
10326 EOF
10327
10328 fi
10329
10330
10331
10332 if test "$ol_enable_debug" != no ; then
10333         cat >> confdefs.h <<\EOF
10334 #define LDAP_DEBUG 1
10335 EOF
10336
10337 fi
10338 if test "$ol_enable_syslog" = yes ; then
10339         cat >> confdefs.h <<\EOF
10340 #define LDAP_SYSLOG 1
10341 EOF
10342
10343 fi
10344 if test "$ol_enable_libui" = yes ; then
10345         cat >> confdefs.h <<\EOF
10346 #define LDAP_LIBUI 1
10347 EOF
10348
10349 fi
10350 if test "$ol_enable_cache" = no ; then
10351         cat >> confdefs.h <<\EOF
10352 #define LDAP_NOCACHE 1
10353 EOF
10354
10355 fi
10356 if test "$ol_enable_dns" != no ; then
10357         cat >> confdefs.h <<\EOF
10358 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
10359 EOF
10360
10361 fi
10362 if test "$ol_enable_proctitle" != no ; then
10363         cat >> confdefs.h <<\EOF
10364 #define LDAP_PROCTITLE 1
10365 EOF
10366
10367 fi
10368 if test "$ol_enable_referrals" != no ; then
10369         cat >> confdefs.h <<\EOF
10370 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
10371 EOF
10372
10373 fi
10374 if test "$ol_enable_cldap" != no ; then
10375         cat >> confdefs.h <<\EOF
10376 #define LDAP_CONNECTIONLESS 1
10377 EOF
10378
10379 fi
10380
10381 if test "$ol_enable_aclgroups" != no ; then
10382         cat >> confdefs.h <<\EOF
10383 #define SLAPD_ACLGROUPS 1
10384 EOF
10385
10386 fi
10387 if test "$ol_enable_crypt" != no ; then
10388         cat >> confdefs.h <<\EOF
10389 #define SLAPD_CRYPT 1
10390 EOF
10391
10392 fi
10393 if test "$ol_enable_cleartext" != no ; then
10394         cat >> confdefs.h <<\EOF
10395 #define SLAPD_CLEARTEXT 1
10396 EOF
10397
10398 fi
10399 if test "$ol_enable_phonetic" != no ; then
10400         cat >> confdefs.h <<\EOF
10401 #define SLAPD_PHONETIC 1
10402 EOF
10403
10404 fi
10405 if test "$ol_enable_rlookups" != no ; then
10406         cat >> confdefs.h <<\EOF
10407 #define SLAPD_RLOOKUPS 1
10408 EOF
10409
10410 fi
10411
10412 if test "$ol_link_bdb2" != no ; then
10413         cat >> confdefs.h <<\EOF
10414 #define SLAPD_BDB2 1
10415 EOF
10416
10417         BUILD_SLAPD=yes
10418         BUILD_BDB2=yes
10419 fi
10420
10421 if test "$ol_link_ldbm" != no ; then
10422         cat >> confdefs.h <<\EOF
10423 #define SLAPD_LDBM 1
10424 EOF
10425
10426         BUILD_SLAPD=yes
10427         BUILD_LDBM=yes
10428 fi
10429
10430 if test "$ol_enable_passwd" != no ; then
10431         cat >> confdefs.h <<\EOF
10432 #define SLAPD_PASSWD 1
10433 EOF
10434
10435         BUILD_SLAPD=yes
10436         BUILD_PASSWD=yes
10437 fi
10438
10439 if test "$ol_enable_perl" != no ; then
10440         cat >> confdefs.h <<\EOF
10441 #define SLAPD_PERL 1
10442 EOF
10443
10444         BUILD_SLAPD=yes
10445         BUILD_PERL=yes
10446 fi
10447
10448 if test "$ol_enable_shell" != no ; then
10449         cat >> confdefs.h <<\EOF
10450 #define SLAPD_SHELL 1
10451 EOF
10452
10453         BUILD_SLAPD=yes
10454         BUILD_SHELL=yes
10455 fi
10456
10457 if test "$ol_enable_tcl" != no ; then
10458         cat >> confdefs.h <<\EOF
10459 #define SLAPD_TCL 1
10460 EOF
10461
10462         BUILD_SLAPD=yes
10463         BUILD_TCL=yes
10464 fi
10465
10466 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
10467         $BUILD_SLAPD = yes ; then
10468         BUILD_SLURPD=yes
10469 fi
10470
10471 if test "$ol_link_isode" != no ; then
10472         BUILD_LDAPD=yes
10473 fi
10474
10475
10476
10477
10478   
10479   
10480   
10481   
10482   
10483   
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503 trap '' 1 2 15
10504 cat > confcache <<\EOF
10505 # This file is a shell script that caches the results of configure
10506 # tests run on this system so they can be shared between configure
10507 # scripts and configure runs.  It is not useful on other systems.
10508 # If it contains results you don't want to keep, you may remove or edit it.
10509 #
10510 # By default, configure uses ./config.cache as the cache file,
10511 # creating it if it does not exist already.  You can give configure
10512 # the --cache-file=FILE option to use a different cache file; that is
10513 # what configure does when it calls configure scripts in
10514 # subdirectories, so they share the cache.
10515 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10516 # config.status only pays attention to the cache file if you give it the
10517 # --recheck option to rerun configure.
10518 #
10519 EOF
10520 # The following way of writing the cache mishandles newlines in values,
10521 # but we know of no workaround that is simple, portable, and efficient.
10522 # So, don't put newlines in cache variables' values.
10523 # Ultrix sh set writes to stderr and can't be redirected directly,
10524 # and sets the high bit in the cache file unless we assign to the vars.
10525 (set) 2>&1 |
10526   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10527   *ac_space=\ *)
10528     # `set' does not quote correctly, so add quotes (double-quote substitution
10529     # turns \\\\ into \\, and sed turns \\ into \).
10530     sed -n \
10531       -e "s/'/'\\\\''/g" \
10532       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10533     ;;
10534   *)
10535     # `set' quotes correctly as required by POSIX, so do not add quotes.
10536     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10537     ;;
10538   esac >> confcache
10539 if cmp -s $cache_file confcache; then
10540   :
10541 else
10542   if test -w $cache_file; then
10543     echo "updating cache $cache_file"
10544     cat confcache > $cache_file
10545   else
10546     echo "not updating unwritable cache $cache_file"
10547   fi
10548 fi
10549 rm -f confcache
10550
10551 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10552
10553 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10554 # Let make expand exec_prefix.
10555 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10556
10557 # Any assignment to VPATH causes Sun make to only execute
10558 # the first set of double-colon rules, so remove it if not needed.
10559 # If there is a colon in the path, we need to keep it.
10560 if test "x$srcdir" = x.; then
10561   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10562 fi
10563
10564 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10565
10566 DEFS=-DHAVE_CONFIG_H
10567
10568 # Without the "./", some shells look in PATH for config.status.
10569 : ${CONFIG_STATUS=./config.status}
10570
10571 echo creating $CONFIG_STATUS
10572 rm -f $CONFIG_STATUS
10573 cat > $CONFIG_STATUS <<EOF
10574 #! /bin/sh
10575 # Generated automatically by configure.
10576 # Run this file to recreate the current configuration.
10577 # This directory was configured as follows,
10578 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10579 #
10580 # $0 $ac_configure_args
10581 #
10582 # Compiler output produced by configure, useful for debugging
10583 # configure, is in ./config.log if it exists.
10584
10585 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10586 for ac_option
10587 do
10588   case "\$ac_option" in
10589   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10590     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10591     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10592   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10593     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10594     exit 0 ;;
10595   -help | --help | --hel | --he | --h)
10596     echo "\$ac_cs_usage"; exit 0 ;;
10597   *) echo "\$ac_cs_usage"; exit 1 ;;
10598   esac
10599 done
10600
10601 ac_given_srcdir=$srcdir
10602 ac_given_INSTALL="$INSTALL"
10603
10604 trap 'rm -fr `echo "\
10605 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10606 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10607 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10608 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10609 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10610 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10611 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10612 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10613 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10614 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10615 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10616 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10617 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10618 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10619 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10620 include/Makefile:build/top.mk:include/Makefile.in \
10621 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10622 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10623 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10624 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10625 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10626 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10627 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10628 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10629 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10630 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10631 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10632 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10633 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10634 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10635 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10636 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10637 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10638 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10639 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10640 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10641 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10642 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10643 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10644 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10645  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10646 EOF
10647 cat >> $CONFIG_STATUS <<EOF
10648
10649 # Protect against being on the right side of a sed subst in config.status.
10650 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10651  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10652 $ac_vpsub
10653 $extrasub
10654 s%@SHELL@%$SHELL%g
10655 s%@CFLAGS@%$CFLAGS%g
10656 s%@CPPFLAGS@%$CPPFLAGS%g
10657 s%@CXXFLAGS@%$CXXFLAGS%g
10658 s%@FFLAGS@%$FFLAGS%g
10659 s%@DEFS@%$DEFS%g
10660 s%@LDFLAGS@%$LDFLAGS%g
10661 s%@LIBS@%$LIBS%g
10662 s%@exec_prefix@%$exec_prefix%g
10663 s%@prefix@%$prefix%g
10664 s%@program_transform_name@%$program_transform_name%g
10665 s%@bindir@%$bindir%g
10666 s%@sbindir@%$sbindir%g
10667 s%@libexecdir@%$libexecdir%g
10668 s%@datadir@%$datadir%g
10669 s%@sysconfdir@%$sysconfdir%g
10670 s%@sharedstatedir@%$sharedstatedir%g
10671 s%@localstatedir@%$localstatedir%g
10672 s%@libdir@%$libdir%g
10673 s%@includedir@%$includedir%g
10674 s%@oldincludedir@%$oldincludedir%g
10675 s%@infodir@%$infodir%g
10676 s%@mandir@%$mandir%g
10677 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10678 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10679 s%@INSTALL_DATA@%$INSTALL_DATA%g
10680 s%@PACKAGE@%$PACKAGE%g
10681 s%@VERSION@%$VERSION%g
10682 s%@ACLOCAL@%$ACLOCAL%g
10683 s%@AUTOCONF@%$AUTOCONF%g
10684 s%@AUTOMAKE@%$AUTOMAKE%g
10685 s%@AUTOHEADER@%$AUTOHEADER%g
10686 s%@MAKEINFO@%$MAKEINFO%g
10687 s%@SET_MAKE@%$SET_MAKE%g
10688 s%@top_builddir@%$top_builddir%g
10689 s%@ldap_subdir@%$ldap_subdir%g
10690 s%@host@%$host%g
10691 s%@host_alias@%$host_alias%g
10692 s%@host_cpu@%$host_cpu%g
10693 s%@host_vendor@%$host_vendor%g
10694 s%@host_os@%$host_os%g
10695 s%@RANLIB@%$RANLIB%g
10696 s%@CC@%$CC%g
10697 s%@LD@%$LD%g
10698 s%@NM@%$NM%g
10699 s%@LN_S@%$LN_S%g
10700 s%@LIBTOOL@%$LIBTOOL%g
10701 s%@AWK@%$AWK%g
10702 s%@LN_H@%$LN_H%g
10703 s%@SENDMAIL@%$SENDMAIL%g
10704 s%@EDITOR@%$EDITOR%g
10705 s%@FINGER@%$FINGER%g
10706 s%@PERLBIN@%$PERLBIN%g
10707 s%@CPP@%$CPP%g
10708 s%@EXEEXT@%$EXEEXT%g
10709 s%@OBJEXT@%$OBJEXT%g
10710 s%@PEPSY@%$PEPSY%g
10711 s%@LIBOBJS@%$LIBOBJS%g
10712 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
10713 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
10714 s%@BUILD_BDB2@%$BUILD_BDB2%g
10715 s%@BUILD_LDBM@%$BUILD_LDBM%g
10716 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
10717 s%@BUILD_PERL@%$BUILD_PERL%g
10718 s%@BUILD_SHELL@%$BUILD_SHELL%g
10719 s%@BUILD_TCL@%$BUILD_TCL%g
10720 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
10721 s%@LDAP_LIBS@%$LDAP_LIBS%g
10722 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
10723 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
10724 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
10725 s%@LDBM_LIBS@%$LDBM_LIBS%g
10726 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
10727 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
10728 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
10729 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
10730 s%@KRB_LIBS@%$KRB_LIBS%g
10731 s%@READLINE_LIBS@%$READLINE_LIBS%g
10732 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
10733 s%@TLS_LIBS@%$TLS_LIBS%g
10734
10735 CEOF
10736 EOF
10737
10738 cat >> $CONFIG_STATUS <<\EOF
10739
10740 # Split the substitutions into bite-sized pieces for seds with
10741 # small command number limits, like on Digital OSF/1 and HP-UX.
10742 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10743 ac_file=1 # Number of current file.
10744 ac_beg=1 # First line for current file.
10745 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10746 ac_more_lines=:
10747 ac_sed_cmds=""
10748 while $ac_more_lines; do
10749   if test $ac_beg -gt 1; then
10750     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10751   else
10752     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10753   fi
10754   if test ! -s conftest.s$ac_file; then
10755     ac_more_lines=false
10756     rm -f conftest.s$ac_file
10757   else
10758     if test -z "$ac_sed_cmds"; then
10759       ac_sed_cmds="sed -f conftest.s$ac_file"
10760     else
10761       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10762     fi
10763     ac_file=`expr $ac_file + 1`
10764     ac_beg=$ac_end
10765     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10766   fi
10767 done
10768 if test -z "$ac_sed_cmds"; then
10769   ac_sed_cmds=cat
10770 fi
10771 EOF
10772
10773 cat >> $CONFIG_STATUS <<EOF
10774
10775 CONFIG_FILES=\${CONFIG_FILES-"\
10776 Makefile:build/top.mk:Makefile.in:build/dir.mk \
10777 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
10778 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
10779 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
10780 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
10781 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
10782 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
10783 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
10784 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
10785 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
10786 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
10787 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
10788 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
10789 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
10790 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
10791 include/Makefile:build/top.mk:include/Makefile.in \
10792 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
10793 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
10794 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10795 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
10796 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
10797 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
10798 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
10799 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
10800 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
10801 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
10802 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
10803 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
10804 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
10805 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
10806 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
10807 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
10808 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
10809 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
10810 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
10811 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
10812 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
10813 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
10814 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
10815 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
10816 "}
10817 EOF
10818 cat >> $CONFIG_STATUS <<\EOF
10819 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10820   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10821   case "$ac_file" in
10822   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10823        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10824   *) ac_file_in="${ac_file}.in" ;;
10825   esac
10826
10827   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10828
10829   # Remove last slash and all that follows it.  Not all systems have dirname.
10830   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10831   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10832     # The file is in a subdirectory.
10833     test ! -d "$ac_dir" && mkdir "$ac_dir"
10834     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10835     # A "../" for each directory in $ac_dir_suffix.
10836     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10837   else
10838     ac_dir_suffix= ac_dots=
10839   fi
10840
10841   case "$ac_given_srcdir" in
10842   .)  srcdir=.
10843       if test -z "$ac_dots"; then top_srcdir=.
10844       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10845   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10846   *) # Relative path.
10847     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10848     top_srcdir="$ac_dots$ac_given_srcdir" ;;
10849   esac
10850
10851   case "$ac_given_INSTALL" in
10852   [/$]*) INSTALL="$ac_given_INSTALL" ;;
10853   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10854   esac
10855
10856   echo creating "$ac_file"
10857   rm -f "$ac_file"
10858   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10859   case "$ac_file" in
10860   *Makefile*) ac_comsub="1i\\
10861 # $configure_input" ;;
10862   *) ac_comsub= ;;
10863   esac
10864
10865   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10866   sed -e "$ac_comsub
10867 s%@configure_input@%$configure_input%g
10868 s%@srcdir@%$srcdir%g
10869 s%@top_srcdir@%$top_srcdir%g
10870 s%@INSTALL@%$INSTALL%g
10871 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10872 fi; done
10873 rm -f conftest.s*
10874
10875 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10876 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10877 #
10878 # ac_d sets the value in "#define NAME VALUE" lines.
10879 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
10880 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
10881 ac_dC='\3'
10882 ac_dD='%g'
10883 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10884 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10885 ac_uB='\([      ]\)%\1#\2define\3'
10886 ac_uC=' '
10887 ac_uD='\4%g'
10888 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10889 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10890 ac_eB='$%\1#\2define\3'
10891 ac_eC=' '
10892 ac_eD='%g'
10893
10894 if test "${CONFIG_HEADERS+set}" != set; then
10895 EOF
10896 cat >> $CONFIG_STATUS <<EOF
10897   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
10898 EOF
10899 cat >> $CONFIG_STATUS <<\EOF
10900 fi
10901 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10902   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10903   case "$ac_file" in
10904   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10905        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10906   *) ac_file_in="${ac_file}.in" ;;
10907   esac
10908
10909   echo creating $ac_file
10910
10911   rm -f conftest.frag conftest.in conftest.out
10912   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10913   cat $ac_file_inputs > conftest.in
10914
10915 EOF
10916
10917 # Transform confdefs.h into a sed script conftest.vals that substitutes
10918 # the proper values into config.h.in to produce config.h.  And first:
10919 # Protect against being on the right side of a sed subst in config.status.
10920 # Protect against being in an unquoted here document in config.status.
10921 rm -f conftest.vals
10922 cat > conftest.hdr <<\EOF
10923 s/[\\&%]/\\&/g
10924 s%[\\$`]%\\&%g
10925 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10926 s%ac_d%ac_u%gp
10927 s%ac_u%ac_e%gp
10928 EOF
10929 sed -n -f conftest.hdr confdefs.h > conftest.vals
10930 rm -f conftest.hdr
10931
10932 # This sed command replaces #undef with comments.  This is necessary, for
10933 # example, in the case of _POSIX_SOURCE, which is predefined and required
10934 # on some systems where configure will not decide to define it.
10935 cat >> conftest.vals <<\EOF
10936 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10937 EOF
10938
10939 # Break up conftest.vals because some shells have a limit on
10940 # the size of here documents, and old seds have small limits too.
10941
10942 rm -f conftest.tail
10943 while :
10944 do
10945   ac_lines=`grep -c . conftest.vals`
10946   # grep -c gives empty output for an empty file on some AIX systems.
10947   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10948   # Write a limited-size here document to conftest.frag.
10949   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10950   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10951   echo 'CEOF
10952   sed -f conftest.frag conftest.in > conftest.out
10953   rm -f conftest.in
10954   mv conftest.out conftest.in
10955 ' >> $CONFIG_STATUS
10956   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10957   rm -f conftest.vals
10958   mv conftest.tail conftest.vals
10959 done
10960 rm -f conftest.vals
10961
10962 cat >> $CONFIG_STATUS <<\EOF
10963   rm -f conftest.frag conftest.h
10964   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
10965   cat conftest.in >> conftest.h
10966   rm -f conftest.in
10967   if cmp -s $ac_file conftest.h 2>/dev/null; then
10968     echo "$ac_file is unchanged"
10969     rm -f conftest.h
10970   else
10971     # Remove last slash and all that follows it.  Not all systems have dirname.
10972       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10973       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10974       # The file is in a subdirectory.
10975       test ! -d "$ac_dir" && mkdir "$ac_dir"
10976     fi
10977     rm -f $ac_file
10978     mv conftest.h $ac_file
10979   fi
10980 fi; done
10981
10982 EOF
10983 cat >> $CONFIG_STATUS <<EOF
10984
10985 EOF
10986 cat >> $CONFIG_STATUS <<\EOF
10987
10988 date > stamp-h
10989 echo Please \"make depend\" to build dependencies
10990
10991 exit 0
10992 EOF
10993 chmod +x $CONFIG_STATUS
10994 rm -fr confdefs* $ac_clean_files
10995 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10996