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