]> git.sur5r.net Git - openldap/blob - configure
First cut of OL_CC_DEPEND test. Attempts to detect the appropriate
[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-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-kerberos       with Kerberos support (auto)"
37 ac_help="$ac_help
38   --with-readline  with readline support (auto)"
39 ac_help="$ac_help
40   --with-threads        use threads (auto)"
41 ac_help="$ac_help
42   --with-tls  with TLS/SSL support (auto)"
43 ac_help="$ac_help
44   --with-yielding-select        with implicitly yielding select (auto)"
45 ac_help="$ac_help
46 LDAPD Options:"
47 ac_help="$ac_help
48   --enable-ldapd        enable building ldapd (no)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-aclgroups  enable ACL group support (auto)"
55 ac_help="$ac_help
56     --enable-cleartext  enable cleartext passwords (yes)"
57 ac_help="$ac_help
58     --enable-crypt      enable crypt(3) passwords (auto)"
59 ac_help="$ac_help
60     --enable-modules    enable dynamic module support (no)"
61 ac_help="$ac_help
62     --enable-phonetic   enable phonetic/soundex (no)"
63 ac_help="$ac_help
64     --enable-rlookups   enable reverse lookups (auto)"
65 ac_help="$ac_help
66     --enable-wrappers   enable tcp wrapper support (no)"
67 ac_help="$ac_help
68     --enable-bdb2       enable bdb2 backend (no)"
69 ac_help="$ac_help
70     --enable-ldap       enable ldap backend (no)"
71 ac_help="$ac_help
72     --enable-ldbm       enable ldbm backend (yes)"
73 ac_help="$ac_help
74       --with-ldbm-api   use LDBM API (auto)"
75 ac_help="$ac_help
76       --with-ldbm-type  use LDBM type (auto)"
77 ac_help="$ac_help
78     --enable-passwd     enable passwd backend (no)"
79 ac_help="$ac_help
80     --enable-perl       enable perl backend (no)"
81 ac_help="$ac_help
82     --enable-shell      enable shell backend (no)"
83 ac_help="$ac_help
84     --enable-tcl        enable tcl backend (no)"
85 ac_help="$ac_help
86 SLURPD Options:"
87 ac_help="$ac_help
88   --enable-slurpd       enable building slurpd (auto)"
89 ac_help="$ac_help
90 Library Generation & Linking Options"
91 ac_help="$ac_help
92   --enable-static         build static libraries [default=yes]
93   --enable-static=PKGS    only build shared libraries if the current package
94                           appears as an element in the PKGS list"
95 ac_help="$ac_help
96   --enable-shared         build shared libraries [default=yes]
97   --enable-shared=PKGS    only build shared libraries if the current package
98                           appears as an element in the PKGS list"
99 ac_help="$ac_help
100   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
101
102 # Initialize some variables set by options.
103 # The variables have the same names as the options, with
104 # dashes changed to underlines.
105 build=NONE
106 cache_file=./config.cache
107 exec_prefix=NONE
108 host=NONE
109 no_create=
110 nonopt=NONE
111 no_recursion=
112 prefix=NONE
113 program_prefix=NONE
114 program_suffix=NONE
115 program_transform_name=s,x,x,
116 silent=
117 site=
118 srcdir=
119 target=NONE
120 verbose=
121 x_includes=NONE
122 x_libraries=NONE
123 bindir='${exec_prefix}/bin'
124 sbindir='${exec_prefix}/sbin'
125 libexecdir='${exec_prefix}/libexec'
126 datadir='${prefix}/share'
127 sysconfdir='${prefix}/etc'
128 sharedstatedir='${prefix}/com'
129 localstatedir='${prefix}/var'
130 libdir='${exec_prefix}/lib'
131 includedir='${prefix}/include'
132 oldincludedir='/usr/include'
133 infodir='${prefix}/info'
134 mandir='${prefix}/man'
135
136 # Initialize some other variables.
137 subdirs=
138 MFLAGS= MAKEFLAGS=
139 SHELL=${CONFIG_SHELL-/bin/sh}
140 # Maximum number of lines to put in a shell here document.
141 ac_max_here_lines=12
142
143 ac_prev=
144 for ac_option
145 do
146
147   # If the previous option needs an argument, assign it.
148   if test -n "$ac_prev"; then
149     eval "$ac_prev=\$ac_option"
150     ac_prev=
151     continue
152   fi
153
154   case "$ac_option" in
155   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
156   *) ac_optarg= ;;
157   esac
158
159   # Accept the important Cygnus configure options, so we can diagnose typos.
160
161   case "$ac_option" in
162
163   -bindir | --bindir | --bindi | --bind | --bin | --bi)
164     ac_prev=bindir ;;
165   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
166     bindir="$ac_optarg" ;;
167
168   -build | --build | --buil | --bui | --bu)
169     ac_prev=build ;;
170   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
171     build="$ac_optarg" ;;
172
173   -cache-file | --cache-file | --cache-fil | --cache-fi \
174   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
175     ac_prev=cache_file ;;
176   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
177   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
178     cache_file="$ac_optarg" ;;
179
180   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
181     ac_prev=datadir ;;
182   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
183   | --da=*)
184     datadir="$ac_optarg" ;;
185
186   -disable-* | --disable-*)
187     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
188     # Reject names that are not valid shell variable names.
189     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
190       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
191     fi
192     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
193     eval "enable_${ac_feature}=no" ;;
194
195   -enable-* | --enable-*)
196     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
197     # Reject names that are not valid shell variable names.
198     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
199       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
200     fi
201     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
202     case "$ac_option" in
203       *=*) ;;
204       *) ac_optarg=yes ;;
205     esac
206     eval "enable_${ac_feature}='$ac_optarg'" ;;
207
208   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
209   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
210   | --exec | --exe | --ex)
211     ac_prev=exec_prefix ;;
212   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
213   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
214   | --exec=* | --exe=* | --ex=*)
215     exec_prefix="$ac_optarg" ;;
216
217   -gas | --gas | --ga | --g)
218     # Obsolete; use --with-gas.
219     with_gas=yes ;;
220
221   -help | --help | --hel | --he)
222     # Omit some internal or obsolete options to make the list less imposing.
223     # This message is too long to be a string in the A/UX 3.1 sh.
224     cat << EOF
225 Usage: configure [options] [host]
226 Options: [defaults in brackets after descriptions]
227 Configuration:
228   --cache-file=FILE       cache test results in FILE
229   --help                  print this message
230   --no-create             do not create output files
231   --quiet, --silent       do not print \`checking...' messages
232   --version               print the version of autoconf that created configure
233 Directory and file names:
234   --prefix=PREFIX         install architecture-independent files in PREFIX
235                           [$ac_default_prefix]
236   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
237                           [same as prefix]
238   --bindir=DIR            user executables in DIR [EPREFIX/bin]
239   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
240   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
241   --datadir=DIR           read-only architecture-independent data in DIR
242                           [PREFIX/share]
243   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
244   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
245                           [PREFIX/com]
246   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
247   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
248   --includedir=DIR        C header files in DIR [PREFIX/include]
249   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
250   --infodir=DIR           info documentation in DIR [PREFIX/info]
251   --mandir=DIR            man documentation in DIR [PREFIX/man]
252   --srcdir=DIR            find the sources in DIR [configure dir or ..]
253   --program-prefix=PREFIX prepend PREFIX to installed program names
254   --program-suffix=SUFFIX append SUFFIX to installed program names
255   --program-transform-name=PROGRAM
256                           run sed PROGRAM on installed program names
257 EOF
258     cat << EOF
259 Host type:
260   --build=BUILD           configure for building on BUILD [BUILD=HOST]
261   --host=HOST             configure for HOST [guessed]
262   --target=TARGET         configure for TARGET [TARGET=HOST]
263 Features and packages:
264   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
265   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
266   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
267   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
268   --x-includes=DIR        X include files are in DIR
269   --x-libraries=DIR       X library files are in DIR
270 EOF
271     if test -n "$ac_help"; then
272       echo "--enable and --with options recognized:$ac_help"
273     fi
274     exit 0 ;;
275
276   -host | --host | --hos | --ho)
277     ac_prev=host ;;
278   -host=* | --host=* | --hos=* | --ho=*)
279     host="$ac_optarg" ;;
280
281   -includedir | --includedir | --includedi | --included | --include \
282   | --includ | --inclu | --incl | --inc)
283     ac_prev=includedir ;;
284   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
285   | --includ=* | --inclu=* | --incl=* | --inc=*)
286     includedir="$ac_optarg" ;;
287
288   -infodir | --infodir | --infodi | --infod | --info | --inf)
289     ac_prev=infodir ;;
290   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
291     infodir="$ac_optarg" ;;
292
293   -libdir | --libdir | --libdi | --libd)
294     ac_prev=libdir ;;
295   -libdir=* | --libdir=* | --libdi=* | --libd=*)
296     libdir="$ac_optarg" ;;
297
298   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
299   | --libexe | --libex | --libe)
300     ac_prev=libexecdir ;;
301   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
302   | --libexe=* | --libex=* | --libe=*)
303     libexecdir="$ac_optarg" ;;
304
305   -localstatedir | --localstatedir | --localstatedi | --localstated \
306   | --localstate | --localstat | --localsta | --localst \
307   | --locals | --local | --loca | --loc | --lo)
308     ac_prev=localstatedir ;;
309   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
310   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
311   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
312     localstatedir="$ac_optarg" ;;
313
314   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
315     ac_prev=mandir ;;
316   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
317     mandir="$ac_optarg" ;;
318
319   -nfp | --nfp | --nf)
320     # Obsolete; use --without-fp.
321     with_fp=no ;;
322
323   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
324   | --no-cr | --no-c)
325     no_create=yes ;;
326
327   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
328   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
329     no_recursion=yes ;;
330
331   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
332   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
333   | --oldin | --oldi | --old | --ol | --o)
334     ac_prev=oldincludedir ;;
335   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
336   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
337   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
338     oldincludedir="$ac_optarg" ;;
339
340   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
341     ac_prev=prefix ;;
342   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
343     prefix="$ac_optarg" ;;
344
345   -program-prefix | --program-prefix | --program-prefi | --program-pref \
346   | --program-pre | --program-pr | --program-p)
347     ac_prev=program_prefix ;;
348   -program-prefix=* | --program-prefix=* | --program-prefi=* \
349   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
350     program_prefix="$ac_optarg" ;;
351
352   -program-suffix | --program-suffix | --program-suffi | --program-suff \
353   | --program-suf | --program-su | --program-s)
354     ac_prev=program_suffix ;;
355   -program-suffix=* | --program-suffix=* | --program-suffi=* \
356   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
357     program_suffix="$ac_optarg" ;;
358
359   -program-transform-name | --program-transform-name \
360   | --program-transform-nam | --program-transform-na \
361   | --program-transform-n | --program-transform- \
362   | --program-transform | --program-transfor \
363   | --program-transfo | --program-transf \
364   | --program-trans | --program-tran \
365   | --progr-tra | --program-tr | --program-t)
366     ac_prev=program_transform_name ;;
367   -program-transform-name=* | --program-transform-name=* \
368   | --program-transform-nam=* | --program-transform-na=* \
369   | --program-transform-n=* | --program-transform-=* \
370   | --program-transform=* | --program-transfor=* \
371   | --program-transfo=* | --program-transf=* \
372   | --program-trans=* | --program-tran=* \
373   | --progr-tra=* | --program-tr=* | --program-t=*)
374     program_transform_name="$ac_optarg" ;;
375
376   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
377   | -silent | --silent | --silen | --sile | --sil)
378     silent=yes ;;
379
380   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
381     ac_prev=sbindir ;;
382   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
383   | --sbi=* | --sb=*)
384     sbindir="$ac_optarg" ;;
385
386   -sharedstatedir | --sharedstatedir | --sharedstatedi \
387   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
388   | --sharedst | --shareds | --shared | --share | --shar \
389   | --sha | --sh)
390     ac_prev=sharedstatedir ;;
391   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
392   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
393   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
394   | --sha=* | --sh=*)
395     sharedstatedir="$ac_optarg" ;;
396
397   -site | --site | --sit)
398     ac_prev=site ;;
399   -site=* | --site=* | --sit=*)
400     site="$ac_optarg" ;;
401
402   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
403     ac_prev=srcdir ;;
404   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
405     srcdir="$ac_optarg" ;;
406
407   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
408   | --syscon | --sysco | --sysc | --sys | --sy)
409     ac_prev=sysconfdir ;;
410   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
411   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
412     sysconfdir="$ac_optarg" ;;
413
414   -target | --target | --targe | --targ | --tar | --ta | --t)
415     ac_prev=target ;;
416   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
417     target="$ac_optarg" ;;
418
419   -v | -verbose | --verbose | --verbos | --verbo | --verb)
420     verbose=yes ;;
421
422   -version | --version | --versio | --versi | --vers)
423     echo "configure generated by autoconf version 2.13"
424     exit 0 ;;
425
426   -with-* | --with-*)
427     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
428     # Reject names that are not valid shell variable names.
429     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
430       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
431     fi
432     ac_package=`echo $ac_package| sed 's/-/_/g'`
433     case "$ac_option" in
434       *=*) ;;
435       *) ac_optarg=yes ;;
436     esac
437     eval "with_${ac_package}='$ac_optarg'" ;;
438
439   -without-* | --without-*)
440     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
441     # Reject names that are not valid shell variable names.
442     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
443       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
444     fi
445     ac_package=`echo $ac_package| sed 's/-/_/g'`
446     eval "with_${ac_package}=no" ;;
447
448   --x)
449     # Obsolete; use --with-x.
450     with_x=yes ;;
451
452   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
453   | --x-incl | --x-inc | --x-in | --x-i)
454     ac_prev=x_includes ;;
455   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
456   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
457     x_includes="$ac_optarg" ;;
458
459   -x-libraries | --x-libraries | --x-librarie | --x-librari \
460   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
461     ac_prev=x_libraries ;;
462   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
463   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
464     x_libraries="$ac_optarg" ;;
465
466   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
467     ;;
468
469   *)
470     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
471       echo "configure: warning: $ac_option: invalid host type" 1>&2
472     fi
473     if test "x$nonopt" != xNONE; then
474       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
475     fi
476     nonopt="$ac_option"
477     ;;
478
479   esac
480 done
481
482 if test -n "$ac_prev"; then
483   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
484 fi
485
486 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
487
488 # File descriptor usage:
489 # 0 standard input
490 # 1 file creation
491 # 2 errors and warnings
492 # 3 some systems may open it to /dev/tty
493 # 4 used on the Kubota Titan
494 # 6 checking for... messages and results
495 # 5 compiler messages saved in config.log
496 if test "$silent" = yes; then
497   exec 6>/dev/null
498 else
499   exec 6>&1
500 fi
501 exec 5>./config.log
502
503 echo "\
504 This file contains any messages produced by compilers while
505 running configure, to aid debugging if configure makes a mistake.
506 " 1>&5
507
508 # Strip out --no-create and --no-recursion so they do not pile up.
509 # Also quote any args containing shell metacharacters.
510 ac_configure_args=
511 for ac_arg
512 do
513   case "$ac_arg" in
514   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
515   | --no-cr | --no-c) ;;
516   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
517   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
518   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
519   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
520   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
521   esac
522 done
523
524 # NLS nuisances.
525 # Only set these to C if already set.  These must not be set unconditionally
526 # because not all systems understand e.g. LANG=C (notably SCO).
527 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
528 # Non-C LC_CTYPE values break the ctype check.
529 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
530 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
531 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
532 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
533
534 # confdefs.h avoids OS command line length limits that DEFS can exceed.
535 rm -rf conftest* confdefs.h
536 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
537 echo > confdefs.h
538
539 # A filename unique to this package, relative to the directory that
540 # configure is in, which we can look for to find out if srcdir is correct.
541 ac_unique_file=build/version
542
543 # Find the source files, if location was not specified.
544 if test -z "$srcdir"; then
545   ac_srcdir_defaulted=yes
546   # Try the directory containing this script, then its parent.
547   ac_prog=$0
548   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
549   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
550   srcdir=$ac_confdir
551   if test ! -r $srcdir/$ac_unique_file; then
552     srcdir=..
553   fi
554 else
555   ac_srcdir_defaulted=no
556 fi
557 if test ! -r $srcdir/$ac_unique_file; then
558   if test "$ac_srcdir_defaulted" = yes; then
559     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
560   else
561     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
562   fi
563 fi
564 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
565
566 # Prefer explicitly selected file to automatically selected ones.
567 if test -z "$CONFIG_SITE"; then
568   if test "x$prefix" != xNONE; then
569     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
570   else
571     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
572   fi
573 fi
574 for ac_site_file in $CONFIG_SITE; do
575   if test -r "$ac_site_file"; then
576     echo "loading site script $ac_site_file"
577     . "$ac_site_file"
578   fi
579 done
580
581
582 ac_ext=c
583 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
584 ac_cpp='$CPP $CPPFLAGS'
585 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
586 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
587 cross_compiling=$ac_cv_prog_cc_cross
588
589 ac_exeext=
590 ac_objext=o
591 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
592   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
593   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
594     ac_n= ac_c='
595 ' ac_t='        '
596   else
597     ac_n=-n ac_c= ac_t=
598   fi
599 else
600   ac_n= ac_c='\c' ac_t=
601 fi
602
603 ac_aux_dir=
604 for ac_dir in build $srcdir/build; do
605   if test -f $ac_dir/install-sh; then
606     ac_aux_dir=$ac_dir
607     ac_install_sh="$ac_aux_dir/install-sh -c"
608     break
609   elif test -f $ac_dir/install.sh; then
610     ac_aux_dir=$ac_dir
611     ac_install_sh="$ac_aux_dir/install.sh -c"
612     break
613   fi
614 done
615 if test -z "$ac_aux_dir"; then
616   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
617 fi
618 ac_config_guess=$ac_aux_dir/config.guess
619 ac_config_sub=$ac_aux_dir/config.sub
620 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
621
622 OL_VERSION=`cat $ac_aux_dir/version`
623 if test -z "$OL_VERSION"; then
624         { echo "configure: error: could not determine version" 1>&2; exit 1; }
625 fi
626
627 # Find a good install program.  We prefer a C program (faster),
628 # so one script is as good as another.  But avoid the broken or
629 # incompatible versions:
630 # SysV /etc/install, /usr/sbin/install
631 # SunOS /usr/etc/install
632 # IRIX /sbin/install
633 # AIX /bin/install
634 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
635 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
636 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
637 # ./install, which can be erroneously created by make from ./install.sh.
638 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
639 echo "configure:640: checking for a BSD compatible install" >&5
640 if test -z "$INSTALL"; then
641 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
642   echo $ac_n "(cached) $ac_c" 1>&6
643 else
644     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
645   for ac_dir in $PATH; do
646     # Account for people who put trailing slashes in PATH elements.
647     case "$ac_dir/" in
648     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
649     *)
650       # OSF1 and SCO ODT 3.0 have their own names for install.
651       # Don't use installbsd from OSF since it installs stuff as root
652       # by default.
653       for ac_prog in ginstall scoinst install; do
654         if test -f $ac_dir/$ac_prog; then
655           if test $ac_prog = install &&
656             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
657             # AIX install.  It has an incompatible calling convention.
658             :
659           else
660             ac_cv_path_install="$ac_dir/$ac_prog -c"
661             break 2
662           fi
663         fi
664       done
665       ;;
666     esac
667   done
668   IFS="$ac_save_IFS"
669
670 fi
671   if test "${ac_cv_path_install+set}" = set; then
672     INSTALL="$ac_cv_path_install"
673   else
674     # As a last resort, use the slow shell script.  We don't cache a
675     # path for INSTALL within a source directory, because that will
676     # break other packages using the cache if that directory is
677     # removed, or if the path is relative.
678     INSTALL="$ac_install_sh"
679   fi
680 fi
681 echo "$ac_t""$INSTALL" 1>&6
682
683 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
684 # It thinks the first close brace ends the variable substitution.
685 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
686
687 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
688
689 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
690
691 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
692 echo "configure:693: checking whether build environment is sane" >&5
693 # Just in case
694 sleep 1
695 echo timestamp > conftestfile
696 # Do `set' in a subshell so we don't clobber the current shell's
697 # arguments.  Must try -L first in case configure is actually a
698 # symlink; some systems play weird games with the mod time of symlinks
699 # (eg FreeBSD returns the mod time of the symlink's containing
700 # directory).
701 if (
702    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
703    if test "$*" = "X"; then
704       # -L didn't work.
705       set X `ls -t $srcdir/configure conftestfile`
706    fi
707    if test "$*" != "X $srcdir/configure conftestfile" \
708       && test "$*" != "X conftestfile $srcdir/configure"; then
709
710       # If neither matched, then we have a broken ls.  This can happen
711       # if, for instance, CONFIG_SHELL is bash and it inherits a
712       # broken ls alias from the environment.  This has actually
713       # happened.  Such a system could not be considered "sane".
714       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
715 alias in your environment" 1>&2; exit 1; }
716    fi
717
718    test "$2" = conftestfile
719    )
720 then
721    # Ok.
722    :
723 else
724    { echo "configure: error: newly created file is older than distributed files!
725 Check your system clock" 1>&2; exit 1; }
726 fi
727 rm -f conftest*
728 echo "$ac_t""yes" 1>&6
729 if test "$program_transform_name" = s,x,x,; then
730   program_transform_name=
731 else
732   # Double any \ or $.  echo might interpret backslashes.
733   cat <<\EOF_SED > conftestsed
734 s,\\,\\\\,g; s,\$,$$,g
735 EOF_SED
736   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
737   rm -f conftestsed
738 fi
739 test "$program_prefix" != NONE &&
740   program_transform_name="s,^,${program_prefix},; $program_transform_name"
741 # Use a double $ so make ignores it.
742 test "$program_suffix" != NONE &&
743   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
744
745 # sed with no file args requires a program.
746 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
747
748 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
749 echo "configure:750: checking whether ${MAKE-make} sets \${MAKE}" >&5
750 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
751 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
752   echo $ac_n "(cached) $ac_c" 1>&6
753 else
754   cat > conftestmake <<\EOF
755 all:
756         @echo 'ac_maketemp="${MAKE}"'
757 EOF
758 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
759 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
760 if test -n "$ac_maketemp"; then
761   eval ac_cv_prog_make_${ac_make}_set=yes
762 else
763   eval ac_cv_prog_make_${ac_make}_set=no
764 fi
765 rm -f conftestmake
766 fi
767 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
768   echo "$ac_t""yes" 1>&6
769   SET_MAKE=
770 else
771   echo "$ac_t""no" 1>&6
772   SET_MAKE="MAKE=${MAKE-make}"
773 fi
774
775
776 PACKAGE=OpenLDAP
777
778 VERSION=$OL_VERSION
779
780 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
781   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
782 fi
783
784
785
786 missing_dir=`cd $ac_aux_dir && pwd`
787 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
788 echo "configure:789: checking for working aclocal" >&5
789 # Run test in a subshell; some versions of sh will print an error if
790 # an executable is not found, even if stderr is redirected.
791 # Redirect stdin to placate older versions of autoconf.  Sigh.
792 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
793    ACLOCAL=aclocal
794    echo "$ac_t""found" 1>&6
795 else
796    ACLOCAL="$missing_dir/missing aclocal"
797    echo "$ac_t""missing" 1>&6
798 fi
799
800 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
801 echo "configure:802: checking for working autoconf" >&5
802 # Run test in a subshell; some versions of sh will print an error if
803 # an executable is not found, even if stderr is redirected.
804 # Redirect stdin to placate older versions of autoconf.  Sigh.
805 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
806    AUTOCONF=autoconf
807    echo "$ac_t""found" 1>&6
808 else
809    AUTOCONF="$missing_dir/missing autoconf"
810    echo "$ac_t""missing" 1>&6
811 fi
812
813 echo $ac_n "checking for working automake""... $ac_c" 1>&6
814 echo "configure:815: checking for working automake" >&5
815 # Run test in a subshell; some versions of sh will print an error if
816 # an executable is not found, even if stderr is redirected.
817 # Redirect stdin to placate older versions of autoconf.  Sigh.
818 if (automake --version) < /dev/null > /dev/null 2>&1; then
819    AUTOMAKE=automake
820    echo "$ac_t""found" 1>&6
821 else
822    AUTOMAKE="$missing_dir/missing automake"
823    echo "$ac_t""missing" 1>&6
824 fi
825
826 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
827 echo "configure:828: checking for working autoheader" >&5
828 # Run test in a subshell; some versions of sh will print an error if
829 # an executable is not found, even if stderr is redirected.
830 # Redirect stdin to placate older versions of autoconf.  Sigh.
831 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
832    AUTOHEADER=autoheader
833    echo "$ac_t""found" 1>&6
834 else
835    AUTOHEADER="$missing_dir/missing autoheader"
836    echo "$ac_t""missing" 1>&6
837 fi
838
839 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
840 echo "configure:841: checking for working makeinfo" >&5
841 # Run test in a subshell; some versions of sh will print an error if
842 # an executable is not found, even if stderr is redirected.
843 # Redirect stdin to placate older versions of autoconf.  Sigh.
844 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
845    MAKEINFO=makeinfo
846    echo "$ac_t""found" 1>&6
847 else
848    MAKEINFO="$missing_dir/missing makeinfo"
849    echo "$ac_t""missing" 1>&6
850 fi
851
852
853
854 cat >> confdefs.h <<EOF
855 #define OPENLDAP_PACKAGE "$PACKAGE"
856 EOF
857
858 cat >> confdefs.h <<EOF
859 #define OPENLDAP_VERSION "$VERSION"
860 EOF
861
862
863
864
865 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
866 echo "configure:867: checking configure arguments" >&5
867
868
869 top_builddir=`pwd`
870
871 cat >> confdefs.h <<\EOF
872 #define HAVE_MKVERSION 1
873 EOF
874
875
876 ldap_subdir="openldap"
877
878 # Check whether --with-subdir or --without-subdir was given.
879 if test "${with_subdir+set}" = set; then
880   withval="$with_subdir"
881   
882         if test "$withval" = "no"; then
883                 ldap_subdir=""
884         elif test "$withval" != "yes"; then
885                 ldap_subdir="$withval"
886         fi
887
888 fi
889
890
891 # OpenLDAP --enable-debug
892         # Check whether --enable-debug or --disable-debug was given.
893 if test "${enable_debug+set}" = set; then
894   enableval="$enable_debug"
895   
896         ol_arg=invalid
897         for ol_val in auto yes no ; do
898                 if test "$enableval" = "$ol_val" ; then
899                         ol_arg="$ol_val"
900                 fi
901         done
902         if test "$ol_arg" = "invalid" ; then
903                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
904         fi
905         ol_enable_debug="$ol_arg"
906
907 else
908         ol_enable_debug="yes"
909 fi
910 # end --enable-debug
911 # OpenLDAP --enable-syslog
912         # Check whether --enable-syslog or --disable-syslog was given.
913 if test "${enable_syslog+set}" = set; then
914   enableval="$enable_syslog"
915   
916         ol_arg=invalid
917         for ol_val in auto yes no ; do
918                 if test "$enableval" = "$ol_val" ; then
919                         ol_arg="$ol_val"
920                 fi
921         done
922         if test "$ol_arg" = "invalid" ; then
923                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
924         fi
925         ol_enable_syslog="$ol_arg"
926
927 else
928         ol_enable_syslog="auto"
929 fi
930 # end --enable-syslog
931 # OpenLDAP --enable-proctitle
932         # Check whether --enable-proctitle or --disable-proctitle was given.
933 if test "${enable_proctitle+set}" = set; then
934   enableval="$enable_proctitle"
935   
936         ol_arg=invalid
937         for ol_val in auto yes no ; do
938                 if test "$enableval" = "$ol_val" ; then
939                         ol_arg="$ol_val"
940                 fi
941         done
942         if test "$ol_arg" = "invalid" ; then
943                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
944         fi
945         ol_enable_proctitle="$ol_arg"
946
947 else
948         ol_enable_proctitle="yes"
949 fi
950 # end --enable-proctitle
951 # OpenLDAP --enable-cache
952         # Check whether --enable-cache or --disable-cache was given.
953 if test "${enable_cache+set}" = set; then
954   enableval="$enable_cache"
955   
956         ol_arg=invalid
957         for ol_val in auto yes no ; do
958                 if test "$enableval" = "$ol_val" ; then
959                         ol_arg="$ol_val"
960                 fi
961         done
962         if test "$ol_arg" = "invalid" ; then
963                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
964         fi
965         ol_enable_cache="$ol_arg"
966
967 else
968         ol_enable_cache="yes"
969 fi
970 # end --enable-cache
971 # OpenLDAP --enable-dns
972         # Check whether --enable-dns or --disable-dns was given.
973 if test "${enable_dns+set}" = set; then
974   enableval="$enable_dns"
975   
976         ol_arg=invalid
977         for ol_val in auto yes no ; do
978                 if test "$enableval" = "$ol_val" ; then
979                         ol_arg="$ol_val"
980                 fi
981         done
982         if test "$ol_arg" = "invalid" ; then
983                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
984         fi
985         ol_enable_dns="$ol_arg"
986
987 else
988         ol_enable_dns="no"
989 fi
990 # end --enable-dns
991 # OpenLDAP --enable-referrals
992         # Check whether --enable-referrals or --disable-referrals was given.
993 if test "${enable_referrals+set}" = set; then
994   enableval="$enable_referrals"
995   
996         ol_arg=invalid
997         for ol_val in auto yes no ; do
998                 if test "$enableval" = "$ol_val" ; then
999                         ol_arg="$ol_val"
1000                 fi
1001         done
1002         if test "$ol_arg" = "invalid" ; then
1003                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1004         fi
1005         ol_enable_referrals="$ol_arg"
1006
1007 else
1008         ol_enable_referrals="yes"
1009 fi
1010 # end --enable-referrals
1011 # OpenLDAP --enable-cldap
1012         # Check whether --enable-cldap or --disable-cldap was given.
1013 if test "${enable_cldap+set}" = set; then
1014   enableval="$enable_cldap"
1015   
1016         ol_arg=invalid
1017         for ol_val in auto yes no ; do
1018                 if test "$enableval" = "$ol_val" ; then
1019                         ol_arg="$ol_val"
1020                 fi
1021         done
1022         if test "$ol_arg" = "invalid" ; then
1023                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1024         fi
1025         ol_enable_cldap="$ol_arg"
1026
1027 else
1028         ol_enable_cldap="no"
1029 fi
1030 # end --enable-cldap
1031 # OpenLDAP --enable-x_compile
1032         # Check whether --enable-x_compile or --disable-x_compile was given.
1033 if test "${enable_x_compile+set}" = set; then
1034   enableval="$enable_x_compile"
1035   
1036         ol_arg=invalid
1037         for ol_val in yes no ; do
1038                 if test "$enableval" = "$ol_val" ; then
1039                         ol_arg="$ol_val"
1040                 fi
1041         done
1042         if test "$ol_arg" = "invalid" ; then
1043                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1044         fi
1045         ol_enable_x_compile="$ol_arg"
1046
1047 else
1048         ol_enable_x_compile="no"
1049 fi
1050 # end --enable-x_compile
1051
1052 # OpenLDAP --enable-dmalloc
1053         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1054 if test "${enable_dmalloc+set}" = set; then
1055   enableval="$enable_dmalloc"
1056   
1057         ol_arg=invalid
1058         for ol_val in auto yes no ; do
1059                 if test "$enableval" = "$ol_val" ; then
1060                         ol_arg="$ol_val"
1061                 fi
1062         done
1063         if test "$ol_arg" = "invalid" ; then
1064                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1065         fi
1066         ol_enable_dmalloc="$ol_arg"
1067
1068 else
1069         ol_enable_dmalloc="no"
1070 fi
1071 # end --enable-dmalloc
1072
1073 # OpenLDAP --with-kerberos
1074         # Check whether --with-kerberos or --without-kerberos was given.
1075 if test "${with_kerberos+set}" = set; then
1076   withval="$with_kerberos"
1077   
1078         ol_arg=invalid
1079         for ol_val in auto k5 k4 afs yes no ; do
1080                 if test "$withval" = "$ol_val" ; then
1081                         ol_arg="$ol_val"
1082                 fi
1083         done
1084         if test "$ol_arg" = "invalid" ; then
1085                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1086         fi
1087         ol_with_kerberos="$ol_arg"
1088
1089 else
1090         ol_with_kerberos="auto"
1091 fi
1092 # end --with-kerberos
1093
1094 # OpenLDAP --with-readline
1095         # Check whether --with-readline or --without-readline was given.
1096 if test "${with_readline+set}" = set; then
1097   withval="$with_readline"
1098   
1099         ol_arg=invalid
1100         for ol_val in auto yes no  ; do
1101                 if test "$withval" = "$ol_val" ; then
1102                         ol_arg="$ol_val"
1103                 fi
1104         done
1105         if test "$ol_arg" = "invalid" ; then
1106                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1107         fi
1108         ol_with_readline="$ol_arg"
1109
1110 else
1111         ol_with_readline="auto"
1112 fi
1113 # end --with-readline
1114
1115 # OpenLDAP --with-threads
1116         # Check whether --with-threads or --without-threads was given.
1117 if test "${with_threads+set}" = set; then
1118   withval="$with_threads"
1119   
1120         ol_arg=invalid
1121         for ol_val in auto posix mach lwp yes no manual  ; do
1122                 if test "$withval" = "$ol_val" ; then
1123                         ol_arg="$ol_val"
1124                 fi
1125         done
1126         if test "$ol_arg" = "invalid" ; then
1127                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1128         fi
1129         ol_with_threads="$ol_arg"
1130
1131 else
1132         ol_with_threads="auto"
1133 fi
1134 # end --with-threads
1135
1136 # OpenLDAP --with-tls
1137         # Check whether --with-tls or --without-tls was given.
1138 if test "${with_tls+set}" = set; then
1139   withval="$with_tls"
1140   
1141         ol_arg=invalid
1142         for ol_val in auto ssleay openssl yes no  ; do
1143                 if test "$withval" = "$ol_val" ; then
1144                         ol_arg="$ol_val"
1145                 fi
1146         done
1147         if test "$ol_arg" = "invalid" ; then
1148                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1149         fi
1150         ol_with_tls="$ol_arg"
1151
1152 else
1153         ol_with_tls="auto"
1154 fi
1155 # end --with-tls
1156
1157 # OpenLDAP --with-yielding_select
1158         # Check whether --with-yielding_select or --without-yielding_select was given.
1159 if test "${with_yielding_select+set}" = set; then
1160   withval="$with_yielding_select"
1161   
1162         ol_arg=invalid
1163         for ol_val in auto yes no manual  ; do
1164                 if test "$withval" = "$ol_val" ; then
1165                         ol_arg="$ol_val"
1166                 fi
1167         done
1168         if test "$ol_arg" = "invalid" ; then
1169                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1170         fi
1171         ol_with_yielding_select="$ol_arg"
1172
1173 else
1174         ol_with_yielding_select="auto"
1175 fi
1176 # end --with-yielding_select
1177
1178
1179
1180 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1181 if test "${with_xxldapdoptions+set}" = set; then
1182   withval="$with_xxldapdoptions"
1183   :
1184 fi
1185
1186 # OpenLDAP --enable-ldapd
1187         # Check whether --enable-ldapd or --disable-ldapd was given.
1188 if test "${enable_ldapd+set}" = set; then
1189   enableval="$enable_ldapd"
1190   
1191         ol_arg=invalid
1192         for ol_val in auto yes no ; do
1193                 if test "$enableval" = "$ol_val" ; then
1194                         ol_arg="$ol_val"
1195                 fi
1196         done
1197         if test "$ol_arg" = "invalid" ; then
1198                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1199         fi
1200         ol_enable_ldapd="$ol_arg"
1201
1202 else
1203         ol_enable_ldapd="no"
1204 fi
1205 # end --enable-ldapd
1206
1207 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1208 if test "${with_xxslapdoptions+set}" = set; then
1209   withval="$with_xxslapdoptions"
1210   :
1211 fi
1212
1213 # OpenLDAP --enable-slapd
1214         # Check whether --enable-slapd or --disable-slapd was given.
1215 if test "${enable_slapd+set}" = set; then
1216   enableval="$enable_slapd"
1217   
1218         ol_arg=invalid
1219         for ol_val in auto yes no ; do
1220                 if test "$enableval" = "$ol_val" ; then
1221                         ol_arg="$ol_val"
1222                 fi
1223         done
1224         if test "$ol_arg" = "invalid" ; then
1225                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1226         fi
1227         ol_enable_slapd="$ol_arg"
1228
1229 else
1230         ol_enable_slapd="yes"
1231 fi
1232 # end --enable-slapd
1233 # OpenLDAP --enable-aclgroups
1234         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1235 if test "${enable_aclgroups+set}" = set; then
1236   enableval="$enable_aclgroups"
1237   
1238         ol_arg=invalid
1239         for ol_val in auto yes no ; do
1240                 if test "$enableval" = "$ol_val" ; then
1241                         ol_arg="$ol_val"
1242                 fi
1243         done
1244         if test "$ol_arg" = "invalid" ; then
1245                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1246         fi
1247         ol_enable_aclgroups="$ol_arg"
1248
1249 else
1250         ol_enable_aclgroups="auto"
1251 fi
1252 # end --enable-aclgroups
1253 # OpenLDAP --enable-cleartext
1254         # Check whether --enable-cleartext or --disable-cleartext was given.
1255 if test "${enable_cleartext+set}" = set; then
1256   enableval="$enable_cleartext"
1257   
1258         ol_arg=invalid
1259         for ol_val in auto yes no ; do
1260                 if test "$enableval" = "$ol_val" ; then
1261                         ol_arg="$ol_val"
1262                 fi
1263         done
1264         if test "$ol_arg" = "invalid" ; then
1265                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1266         fi
1267         ol_enable_cleartext="$ol_arg"
1268
1269 else
1270         ol_enable_cleartext="yes"
1271 fi
1272 # end --enable-cleartext
1273 # OpenLDAP --enable-crypt
1274         # Check whether --enable-crypt or --disable-crypt was given.
1275 if test "${enable_crypt+set}" = set; then
1276   enableval="$enable_crypt"
1277   
1278         ol_arg=invalid
1279         for ol_val in auto yes no ; do
1280                 if test "$enableval" = "$ol_val" ; then
1281                         ol_arg="$ol_val"
1282                 fi
1283         done
1284         if test "$ol_arg" = "invalid" ; then
1285                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1286         fi
1287         ol_enable_crypt="$ol_arg"
1288
1289 else
1290         ol_enable_crypt="auto"
1291 fi
1292 # end --enable-crypt
1293 # OpenLDAP --enable-modules
1294         # Check whether --enable-modules or --disable-modules was given.
1295 if test "${enable_modules+set}" = set; then
1296   enableval="$enable_modules"
1297   
1298         ol_arg=invalid
1299         for ol_val in auto yes no ; do
1300                 if test "$enableval" = "$ol_val" ; then
1301                         ol_arg="$ol_val"
1302                 fi
1303         done
1304         if test "$ol_arg" = "invalid" ; then
1305                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1306         fi
1307         ol_enable_modules="$ol_arg"
1308
1309 else
1310         ol_enable_modules="no"
1311 fi
1312 # end --enable-modules
1313 # OpenLDAP --enable-phonetic
1314         # Check whether --enable-phonetic or --disable-phonetic was given.
1315 if test "${enable_phonetic+set}" = set; then
1316   enableval="$enable_phonetic"
1317   
1318         ol_arg=invalid
1319         for ol_val in auto yes no ; do
1320                 if test "$enableval" = "$ol_val" ; then
1321                         ol_arg="$ol_val"
1322                 fi
1323         done
1324         if test "$ol_arg" = "invalid" ; then
1325                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1326         fi
1327         ol_enable_phonetic="$ol_arg"
1328
1329 else
1330         ol_enable_phonetic="no"
1331 fi
1332 # end --enable-phonetic
1333 # OpenLDAP --enable-rlookups
1334         # Check whether --enable-rlookups or --disable-rlookups was given.
1335 if test "${enable_rlookups+set}" = set; then
1336   enableval="$enable_rlookups"
1337   
1338         ol_arg=invalid
1339         for ol_val in auto yes no ; do
1340                 if test "$enableval" = "$ol_val" ; then
1341                         ol_arg="$ol_val"
1342                 fi
1343         done
1344         if test "$ol_arg" = "invalid" ; then
1345                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1346         fi
1347         ol_enable_rlookups="$ol_arg"
1348
1349 else
1350         ol_enable_rlookups="auto"
1351 fi
1352 # end --enable-rlookups
1353 # OpenLDAP --enable-wrappers
1354         # Check whether --enable-wrappers or --disable-wrappers was given.
1355 if test "${enable_wrappers+set}" = set; then
1356   enableval="$enable_wrappers"
1357   
1358         ol_arg=invalid
1359         for ol_val in auto yes no ; do
1360                 if test "$enableval" = "$ol_val" ; then
1361                         ol_arg="$ol_val"
1362                 fi
1363         done
1364         if test "$ol_arg" = "invalid" ; then
1365                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1366         fi
1367         ol_enable_wrappers="$ol_arg"
1368
1369 else
1370         ol_enable_wrappers="no"
1371 fi
1372 # end --enable-wrappers
1373
1374 # OpenLDAP --enable-bdb2
1375         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1376 if test "${enable_bdb2+set}" = set; then
1377   enableval="$enable_bdb2"
1378   
1379         ol_arg=invalid
1380         for ol_val in auto yes no ; do
1381                 if test "$enableval" = "$ol_val" ; then
1382                         ol_arg="$ol_val"
1383                 fi
1384         done
1385         if test "$ol_arg" = "invalid" ; then
1386                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1387         fi
1388         ol_enable_bdb2="$ol_arg"
1389
1390 else
1391         ol_enable_bdb2="no"
1392 fi
1393 # end --enable-bdb2
1394 # OpenLDAP --enable-ldap
1395         # Check whether --enable-ldap or --disable-ldap was given.
1396 if test "${enable_ldap+set}" = set; then
1397   enableval="$enable_ldap"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no ; do
1401                 if test "$enableval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1407         fi
1408         ol_enable_ldap="$ol_arg"
1409
1410 else
1411         ol_enable_ldap="no"
1412 fi
1413 # end --enable-ldap
1414 # OpenLDAP --enable-ldbm
1415         # Check whether --enable-ldbm or --disable-ldbm was given.
1416 if test "${enable_ldbm+set}" = set; then
1417   enableval="$enable_ldbm"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1427         fi
1428         ol_enable_ldbm="$ol_arg"
1429
1430 else
1431         ol_enable_ldbm="yes"
1432 fi
1433 # end --enable-ldbm
1434 # OpenLDAP --with-ldbm_api
1435         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1436 if test "${with_ldbm_api+set}" = set; then
1437   withval="$with_ldbm_api"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1441                 if test "$withval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1447         fi
1448         ol_with_ldbm_api="$ol_arg"
1449
1450 else
1451         ol_with_ldbm_api="auto"
1452 fi
1453 # end --with-ldbm_api
1454
1455 # OpenLDAP --with-ldbm_type
1456         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1457 if test "${with_ldbm_type+set}" = set; then
1458   withval="$with_ldbm_type"
1459   
1460         ol_arg=invalid
1461         for ol_val in auto btree hash ; do
1462                 if test "$withval" = "$ol_val" ; then
1463                         ol_arg="$ol_val"
1464                 fi
1465         done
1466         if test "$ol_arg" = "invalid" ; then
1467                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1468         fi
1469         ol_with_ldbm_type="$ol_arg"
1470
1471 else
1472         ol_with_ldbm_type="auto"
1473 fi
1474 # end --with-ldbm_type
1475
1476
1477 # OpenLDAP --enable-passwd
1478         # Check whether --enable-passwd or --disable-passwd was given.
1479 if test "${enable_passwd+set}" = set; then
1480   enableval="$enable_passwd"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto yes no ; do
1484                 if test "$enableval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1490         fi
1491         ol_enable_passwd="$ol_arg"
1492
1493 else
1494         ol_enable_passwd="no"
1495 fi
1496 # end --enable-passwd
1497 # OpenLDAP --enable-perl
1498         # Check whether --enable-perl or --disable-perl was given.
1499 if test "${enable_perl+set}" = set; then
1500   enableval="$enable_perl"
1501   
1502         ol_arg=invalid
1503         for ol_val in auto yes no ; do
1504                 if test "$enableval" = "$ol_val" ; then
1505                         ol_arg="$ol_val"
1506                 fi
1507         done
1508         if test "$ol_arg" = "invalid" ; then
1509                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1510         fi
1511         ol_enable_perl="$ol_arg"
1512
1513 else
1514         ol_enable_perl="no"
1515 fi
1516 # end --enable-perl
1517 # OpenLDAP --enable-shell
1518         # Check whether --enable-shell or --disable-shell was given.
1519 if test "${enable_shell+set}" = set; then
1520   enableval="$enable_shell"
1521   
1522         ol_arg=invalid
1523         for ol_val in auto yes no ; do
1524                 if test "$enableval" = "$ol_val" ; then
1525                         ol_arg="$ol_val"
1526                 fi
1527         done
1528         if test "$ol_arg" = "invalid" ; then
1529                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1530         fi
1531         ol_enable_shell="$ol_arg"
1532
1533 else
1534         ol_enable_shell="no"
1535 fi
1536 # end --enable-shell
1537 # OpenLDAP --enable-tcl
1538         # Check whether --enable-tcl or --disable-tcl was given.
1539 if test "${enable_tcl+set}" = set; then
1540   enableval="$enable_tcl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no ; do
1544                 if test "$enableval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1550         fi
1551         ol_enable_tcl="$ol_arg"
1552
1553 else
1554         ol_enable_tcl="no"
1555 fi
1556 # end --enable-tcl
1557
1558 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1559 if test "${with_xxslurpdoptions+set}" = set; then
1560   withval="$with_xxslurpdoptions"
1561   :
1562 fi
1563
1564 # OpenLDAP --enable-slurpd
1565         # Check whether --enable-slurpd or --disable-slurpd was given.
1566 if test "${enable_slurpd+set}" = set; then
1567   enableval="$enable_slurpd"
1568   
1569         ol_arg=invalid
1570         for ol_val in auto yes no ; do
1571                 if test "$enableval" = "$ol_val" ; then
1572                         ol_arg="$ol_val"
1573                 fi
1574         done
1575         if test "$ol_arg" = "invalid" ; then
1576                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1577         fi
1578         ol_enable_slurpd="$ol_arg"
1579
1580 else
1581         ol_enable_slurpd="auto"
1582 fi
1583 # end --enable-slurpd
1584
1585 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1586 if test "${with_xxliboptions+set}" = set; then
1587   withval="$with_xxliboptions"
1588   :
1589 fi
1590
1591 # Check whether --enable-static or --disable-static was given.
1592 if test "${enable_static+set}" = set; then
1593   enableval="$enable_static"
1594   p=${PACKAGE-default}
1595 case "$enableval" in
1596 yes) enable_static=yes ;;
1597 no) enable_static=no ;;
1598 *)
1599   enable_static=no
1600   # Look at the argument we got.  We use all the common list separators.
1601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1602   for pkg in $enableval; do
1603     if test "X$pkg" = "X$p"; then
1604       enable_static=yes
1605     fi
1606   done
1607   IFS="$ac_save_ifs"
1608   ;;
1609 esac
1610 else
1611   enable_static=yes
1612 fi
1613
1614 # Check whether --enable-shared or --disable-shared was given.
1615 if test "${enable_shared+set}" = set; then
1616   enableval="$enable_shared"
1617   p=${PACKAGE-default}
1618 case "$enableval" in
1619 yes) enable_shared=yes ;;
1620 no) enable_shared=no ;;
1621 *)
1622   enable_shared=no
1623   # Look at the argument we got.  We use all the common list separators.
1624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1625   for pkg in $enableval; do
1626     if test "X$pkg" = "X$p"; then
1627       enable_shared=yes
1628     fi
1629   done
1630   IFS="$ac_save_ifs"
1631   ;;
1632 esac
1633 else
1634   enable_shared=yes
1635 fi
1636
1637
1638 # validate options
1639 if test $ol_enable_dns = yes ; then
1640         if test $ol_enable_referrals = no ; then
1641                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1642         fi
1643         if test $ol_enable_referrals = auto ; then
1644                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1645                 ol_enable_referrals=yes
1646         fi
1647 fi
1648
1649 if test $ol_enable_slapd = no ; then
1650                 if test $ol_enable_bdb2 = yes ; then
1651                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
1652         fi
1653         if test $ol_enable_ldap = yes ; then
1654                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
1655         fi
1656         if test $ol_enable_ldbm = yes ; then
1657                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
1658         fi
1659         if test $ol_enable_passwd = yes ; then
1660                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
1661         fi
1662         if test $ol_enable_perl = yes ; then
1663                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
1664         fi
1665         if test $ol_enable_shell = yes ; then
1666                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
1667         fi
1668         if test $ol_enable_tcl = yes ; then
1669                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
1670         fi
1671         if test $ol_enable_aclgroups = yes ; then
1672                 echo "configure: warning: slapd disabled, ignoring --enable-aclgroups argument" 1>&2
1673         fi
1674         if test $ol_enable_modules = yes ; then
1675                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
1676         fi
1677         if test $ol_enable_wrappers = yes ; then
1678                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
1679         fi
1680         if test $ol_enable_phonetic = yes ; then
1681                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
1682         fi
1683         if test $ol_enable_rlookups = yes ; then
1684                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
1685         fi
1686         if test $ol_with_ldbm_api != auto ; then
1687                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
1688         fi
1689         if test $ol_with_ldbm_type != auto ; then
1690                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
1691         fi
1692         if test $ol_enable_slurpd = yes ; then
1693                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1694         fi
1695
1696         # force settings to no
1697         ol_enable_bdb2=no
1698         ol_enable_ldap=no
1699         ol_enable_ldbm=no
1700         ol_enable_passwd=no
1701         ol_enable_perl=no
1702         ol_enable_shell=no
1703         ol_enable_tcl=no
1704
1705         ol_enable_aclgroups=no
1706         ol_enable_modules=no
1707         ol_enable_phonetic=no
1708         ol_enable_rlookups=no
1709         ol_enable_wrappers=no
1710
1711         ol_with_ldbm_api=no
1712         ol_with_ldbm_type=no
1713
1714         ol_enable_slurpd=no
1715
1716 elif test $ol_enable_ldbm = no ; then
1717         
1718         if test $ol_with_ldbm_api != auto ; then
1719                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
1720         fi
1721
1722         if test $ol_with_ldbm_type != auto ; then
1723                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
1724         fi
1725
1726         if test $ol_enable_bdb2 = yes ; then
1727                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1728         fi
1729
1730         if test $ol_enable_modules != yes -a \
1731                 $ol_enable_ldap = no -a \
1732                 $ol_enable_passwd = no -a \
1733                 $ol_enable_perl = no -a \
1734                 $ol_enable_shell = no -a \
1735                 $ol_enable_tcl = no ; then
1736                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1737         fi
1738
1739         ol_with_ldbm_api=no
1740         ol_with_ldbm_type=no
1741
1742 elif test $ol_enable_bdb2 = yes ; then
1743         
1744         if test $ol_with_ldbm_api != auto -a \
1745                 $ol_with_ldbm_api != db2 ; then
1746                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1747         fi
1748
1749         ol_with_ldbm_api=db2
1750
1751 else
1752         
1753         if test $ol_enable_bdb2 != no ; then
1754                 if test $ol_with_ldbm_api != auto -a \
1755                         $ol_with_ldbm_api != db2 ; then
1756                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1757                         ol_enable_bdb2=no
1758                 fi
1759         fi
1760
1761         if test $ol_with_ldbm_api = gdbm -a \
1762                 $ol_with_ldbm_type = btree ; then
1763                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1764         fi
1765         if test $ol_with_ldbm_api = mdbm -a \
1766                 $ol_with_ldbm_type = btree ; then
1767                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1768         fi
1769         if test $ol_with_ldbm_api = ndbm -a \
1770                 $ol_with_ldbm_type = btree ; then
1771                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1772         fi
1773 fi
1774
1775 if test $ol_enable_slurpd = yes ; then
1776                 if test $ol_with_threads = no ; then
1777                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1778         fi
1779 fi
1780
1781 echo "$ac_t""done" 1>&6
1782
1783 ## Initialize vars
1784 LDAP_LIBS=
1785 LDBM_LIBS=
1786 LTHREAD_LIBS=
1787 LUTIL_LIBS=
1788
1789 LDAPD_LIBS=
1790 SLAPD_LIBS=
1791 SLURPD_LIBS=
1792
1793 BUILD_LDAPD=no
1794 BUILD_SLAPD=no
1795 BUILD_SLURPD=no
1796
1797 BUILD_BDB2=no
1798 BUILD_LDAP=no
1799 BUILD_LDBM=no
1800 BUILD_PASSWD=no
1801 BUILD_PERL=no
1802 BUILD_SHELL=no
1803 BUILD_TCL=no
1804 BUILD_THREAD=no
1805
1806 SLAPD_MODULES_LDFLAGS=
1807 SLAPD_MODULES_CPPFLAGS=
1808
1809 SLAPD_PERL_LDFLAGS=
1810 SLAPD_PERL_CPPFLAGS=
1811
1812 KRB_LIBS=
1813 READLINE_LIBS=
1814 TERMCAP_LIBS=
1815 TLS_LIBS=
1816
1817
1818
1819 CC=${CC-"cc"}
1820
1821
1822
1823 # Make sure we can run config.sub.
1824 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1825 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1826 fi
1827
1828 echo $ac_n "checking host system type""... $ac_c" 1>&6
1829 echo "configure:1830: checking host system type" >&5
1830
1831 host_alias=$host
1832 case "$host_alias" in
1833 NONE)
1834   case $nonopt in
1835   NONE)
1836     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1837     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1838     fi ;;
1839   *) host_alias=$nonopt ;;
1840   esac ;;
1841 esac
1842
1843 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1844 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1845 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1846 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1847 echo "$ac_t""$host" 1>&6
1848
1849 # Extract the first word of "ranlib", so it can be a program name with args.
1850 set dummy ranlib; ac_word=$2
1851 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1852 echo "configure:1853: checking for $ac_word" >&5
1853 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1854   echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856   if test -n "$RANLIB"; then
1857   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1858 else
1859   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1860   ac_dummy="$PATH"
1861   for ac_dir in $ac_dummy; do
1862     test -z "$ac_dir" && ac_dir=.
1863     if test -f $ac_dir/$ac_word; then
1864       ac_cv_prog_RANLIB="ranlib"
1865       break
1866     fi
1867   done
1868   IFS="$ac_save_ifs"
1869   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1870 fi
1871 fi
1872 RANLIB="$ac_cv_prog_RANLIB"
1873 if test -n "$RANLIB"; then
1874   echo "$ac_t""$RANLIB" 1>&6
1875 else
1876   echo "$ac_t""no" 1>&6
1877 fi
1878
1879 # Extract the first word of "gcc", so it can be a program name with args.
1880 set dummy gcc; ac_word=$2
1881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1882 echo "configure:1883: checking for $ac_word" >&5
1883 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1884   echo $ac_n "(cached) $ac_c" 1>&6
1885 else
1886   if test -n "$CC"; then
1887   ac_cv_prog_CC="$CC" # Let the user override the test.
1888 else
1889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1890   ac_dummy="$PATH"
1891   for ac_dir in $ac_dummy; do
1892     test -z "$ac_dir" && ac_dir=.
1893     if test -f $ac_dir/$ac_word; then
1894       ac_cv_prog_CC="gcc"
1895       break
1896     fi
1897   done
1898   IFS="$ac_save_ifs"
1899 fi
1900 fi
1901 CC="$ac_cv_prog_CC"
1902 if test -n "$CC"; then
1903   echo "$ac_t""$CC" 1>&6
1904 else
1905   echo "$ac_t""no" 1>&6
1906 fi
1907
1908 if test -z "$CC"; then
1909   # Extract the first word of "cc", so it can be a program name with args.
1910 set dummy cc; ac_word=$2
1911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1912 echo "configure:1913: checking for $ac_word" >&5
1913 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1914   echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916   if test -n "$CC"; then
1917   ac_cv_prog_CC="$CC" # Let the user override the test.
1918 else
1919   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1920   ac_prog_rejected=no
1921   ac_dummy="$PATH"
1922   for ac_dir in $ac_dummy; do
1923     test -z "$ac_dir" && ac_dir=.
1924     if test -f $ac_dir/$ac_word; then
1925       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1926         ac_prog_rejected=yes
1927         continue
1928       fi
1929       ac_cv_prog_CC="cc"
1930       break
1931     fi
1932   done
1933   IFS="$ac_save_ifs"
1934 if test $ac_prog_rejected = yes; then
1935   # We found a bogon in the path, so make sure we never use it.
1936   set dummy $ac_cv_prog_CC
1937   shift
1938   if test $# -gt 0; then
1939     # We chose a different compiler from the bogus one.
1940     # However, it has the same basename, so the bogon will be chosen
1941     # first if we set CC to just the basename; use the full file name.
1942     shift
1943     set dummy "$ac_dir/$ac_word" "$@"
1944     shift
1945     ac_cv_prog_CC="$@"
1946   fi
1947 fi
1948 fi
1949 fi
1950 CC="$ac_cv_prog_CC"
1951 if test -n "$CC"; then
1952   echo "$ac_t""$CC" 1>&6
1953 else
1954   echo "$ac_t""no" 1>&6
1955 fi
1956
1957   if test -z "$CC"; then
1958     case "`uname -s`" in
1959     *win32* | *WIN32*)
1960       # Extract the first word of "cl", so it can be a program name with args.
1961 set dummy cl; ac_word=$2
1962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1963 echo "configure:1964: checking for $ac_word" >&5
1964 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1965   echo $ac_n "(cached) $ac_c" 1>&6
1966 else
1967   if test -n "$CC"; then
1968   ac_cv_prog_CC="$CC" # Let the user override the test.
1969 else
1970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1971   ac_dummy="$PATH"
1972   for ac_dir in $ac_dummy; do
1973     test -z "$ac_dir" && ac_dir=.
1974     if test -f $ac_dir/$ac_word; then
1975       ac_cv_prog_CC="cl"
1976       break
1977     fi
1978   done
1979   IFS="$ac_save_ifs"
1980 fi
1981 fi
1982 CC="$ac_cv_prog_CC"
1983 if test -n "$CC"; then
1984   echo "$ac_t""$CC" 1>&6
1985 else
1986   echo "$ac_t""no" 1>&6
1987 fi
1988  ;;
1989     esac
1990   fi
1991   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1992 fi
1993
1994 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1996
1997 ac_ext=c
1998 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1999 ac_cpp='$CPP $CPPFLAGS'
2000 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2001 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2002 cross_compiling=$ac_cv_prog_cc_cross
2003
2004 cat > conftest.$ac_ext << EOF
2005
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008
2009 main(){return(0);}
2010 EOF
2011 if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2012   ac_cv_prog_cc_works=yes
2013   # If we can't run a trivial program, we are probably using a cross compiler.
2014   if (./conftest; exit) 2>/dev/null; then
2015     ac_cv_prog_cc_cross=no
2016   else
2017     ac_cv_prog_cc_cross=yes
2018   fi
2019 else
2020   echo "configure: failed program was:" >&5
2021   cat conftest.$ac_ext >&5
2022   ac_cv_prog_cc_works=no
2023 fi
2024 rm -fr conftest*
2025 ac_ext=c
2026 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2027 ac_cpp='$CPP $CPPFLAGS'
2028 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2029 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2030 cross_compiling=$ac_cv_prog_cc_cross
2031
2032 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2033 if test $ac_cv_prog_cc_works = no; then
2034   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2035 fi
2036 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2038 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2039 cross_compiling=$ac_cv_prog_cc_cross
2040
2041 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2042 echo "configure:2043: checking whether we are using GNU C" >&5
2043 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2044   echo $ac_n "(cached) $ac_c" 1>&6
2045 else
2046   cat > conftest.c <<EOF
2047 #ifdef __GNUC__
2048   yes;
2049 #endif
2050 EOF
2051 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2052   ac_cv_prog_gcc=yes
2053 else
2054   ac_cv_prog_gcc=no
2055 fi
2056 fi
2057
2058 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2059
2060 if test $ac_cv_prog_gcc = yes; then
2061   GCC=yes
2062 else
2063   GCC=
2064 fi
2065
2066 ac_test_CFLAGS="${CFLAGS+set}"
2067 ac_save_CFLAGS="$CFLAGS"
2068 CFLAGS=
2069 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2070 echo "configure:2071: checking whether ${CC-cc} accepts -g" >&5
2071 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2072   echo $ac_n "(cached) $ac_c" 1>&6
2073 else
2074   echo 'void f(){}' > conftest.c
2075 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2076   ac_cv_prog_cc_g=yes
2077 else
2078   ac_cv_prog_cc_g=no
2079 fi
2080 rm -f conftest*
2081
2082 fi
2083
2084 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2085 if test "$ac_test_CFLAGS" = set; then
2086   CFLAGS="$ac_save_CFLAGS"
2087 elif test $ac_cv_prog_cc_g = yes; then
2088   if test "$GCC" = yes; then
2089     CFLAGS="-g -O2"
2090   else
2091     CFLAGS="-g"
2092   fi
2093 else
2094   if test "$GCC" = yes; then
2095     CFLAGS="-O2"
2096   else
2097     CFLAGS=
2098   fi
2099 fi
2100
2101 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2102 if test "${with_gnu_ld+set}" = set; then
2103   withval="$with_gnu_ld"
2104   test "$withval" = no || with_gnu_ld=yes
2105 else
2106   with_gnu_ld=no
2107 fi
2108
2109
2110 ac_prog=ld
2111 if test "$ac_cv_prog_gcc" = yes; then
2112   # Check if gcc -print-prog-name=ld gives a path.
2113   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2114 echo "configure:2115: checking for ld used by GCC" >&5
2115   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2116   case "$ac_prog" in
2117   # Accept absolute paths.
2118   /* | A-Za-z:\\*)
2119     test -z "$LD" && LD="$ac_prog"
2120     ;;
2121   "")
2122     # If it fails, then pretend we aren't using GCC.
2123     ac_prog=ld
2124     ;;
2125   *)
2126     # If it is relative, then search for the first ld in PATH.
2127     with_gnu_ld=unknown
2128     ;;
2129   esac
2130 elif test "$with_gnu_ld" = yes; then
2131   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2132 echo "configure:2133: checking for GNU ld" >&5
2133 else
2134   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2135 echo "configure:2136: checking for non-GNU ld" >&5
2136 fi
2137 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2138   echo $ac_n "(cached) $ac_c" 1>&6
2139 else
2140   if test -z "$LD"; then
2141   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2142   for ac_dir in $PATH; do
2143     test -z "$ac_dir" && ac_dir=.
2144     if test -f "$ac_dir/$ac_prog"; then
2145       ac_cv_path_LD="$ac_dir/$ac_prog"
2146       # Check to see if the program is GNU ld.  I'd rather use --version,
2147       # but apparently some GNU ld's only accept -v.
2148       # Break only if it was the GNU/non-GNU ld that we prefer.
2149       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2150         test "$with_gnu_ld" != no && break
2151       else
2152         test "$with_gnu_ld" != yes && break
2153       fi
2154     fi
2155   done
2156   IFS="$ac_save_ifs"
2157 else
2158   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2159 fi
2160 fi
2161
2162 LD="$ac_cv_path_LD"
2163 if test -n "$LD"; then
2164   echo "$ac_t""$LD" 1>&6
2165 else
2166   echo "$ac_t""no" 1>&6
2167 fi
2168 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2169
2170 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2171 echo "configure:2172: checking if the linker ($LD) is GNU ld" >&5
2172 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2173   echo $ac_n "(cached) $ac_c" 1>&6
2174 else
2175   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2176 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2177   ac_cv_prog_gnu_ld=yes
2178 else
2179   ac_cv_prog_gnu_ld=no
2180 fi
2181 fi
2182
2183 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2184
2185
2186 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2187 echo "configure:2188: checking for BSD-compatible nm" >&5
2188 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2189   echo $ac_n "(cached) $ac_c" 1>&6
2190 else
2191   case "$NM" in
2192 /* | A-Za-z:\\*)
2193   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2194   ;;
2195 *)
2196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2197   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2198     test -z "$ac_dir" && ac_dir=.
2199     if test -f $ac_dir/nm; then
2200       # Check to see if the nm accepts a BSD-compat flag.
2201       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2202       #   nm: unknown option "B" ignored
2203       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2204         ac_cv_path_NM="$ac_dir/nm -B"
2205       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2206         ac_cv_path_NM="$ac_dir/nm -p"
2207       else
2208         ac_cv_path_NM="$ac_dir/nm"
2209       fi
2210       break
2211     fi
2212   done
2213   IFS="$ac_save_ifs"
2214   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2215   ;;
2216 esac
2217 fi
2218
2219 NM="$ac_cv_path_NM"
2220 echo "$ac_t""$NM" 1>&6
2221
2222
2223 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2224 echo "configure:2225: checking whether ln -s works" >&5
2225 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2226   echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228   rm -f conftestdata
2229 if ln -s X conftestdata 2>/dev/null
2230 then
2231   rm -f conftestdata
2232   ac_cv_prog_LN_S="ln -s"
2233 else
2234   ac_cv_prog_LN_S=ln
2235 fi
2236 fi
2237 LN_S="$ac_cv_prog_LN_S"
2238 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2239   echo "$ac_t""yes" 1>&6
2240 else
2241   echo "$ac_t""no" 1>&6
2242 fi
2243
2244 # Always use our own libtool.
2245 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2246
2247 # Check for any special flags to pass to ltconfig.
2248 libtool_flags=
2249 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2250 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2251 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2252 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2253 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2254
2255 # Some flags need to be propagated to the compiler or linker for good
2256 # libtool support.
2257 case "$host" in
2258 *-*-irix6*)
2259   # Find out which ABI we are using.
2260   echo '#line 2261 "configure"' > conftest.$ac_ext
2261   if { (eval echo configure:2262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2262     case "`/usr/bin/file conftest.o`" in
2263     *32-bit*)
2264       LD="${LD-ld} -32"
2265       ;;
2266     *N32*)
2267       LD="${LD-ld} -n32"
2268       ;;
2269     *64-bit*)
2270       LD="${LD-ld} -64"
2271       ;;
2272     esac
2273   fi
2274   rm -rf conftest*
2275   ;;
2276
2277 *-*-sco3.2v5*)
2278   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2279   CFLAGS="$CFLAGS -belf"
2280   ;;
2281 esac
2282
2283 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2284 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2285 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2286 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2287 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2288 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2289
2290
2291 for ac_prog in mawk gawk nawk awk
2292 do
2293 # Extract the first word of "$ac_prog", so it can be a program name with args.
2294 set dummy $ac_prog; ac_word=$2
2295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2296 echo "configure:2297: checking for $ac_word" >&5
2297 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2298   echo $ac_n "(cached) $ac_c" 1>&6
2299 else
2300   if test -n "$AWK"; then
2301   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2302 else
2303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2304   ac_dummy="$PATH"
2305   for ac_dir in $ac_dummy; do
2306     test -z "$ac_dir" && ac_dir=.
2307     if test -f $ac_dir/$ac_word; then
2308       ac_cv_prog_AWK="$ac_prog"
2309       break
2310     fi
2311   done
2312   IFS="$ac_save_ifs"
2313 fi
2314 fi
2315 AWK="$ac_cv_prog_AWK"
2316 if test -n "$AWK"; then
2317   echo "$ac_t""$AWK" 1>&6
2318 else
2319   echo "$ac_t""no" 1>&6
2320 fi
2321
2322 test -n "$AWK" && break
2323 done
2324
2325 # test for ln hardlink support
2326 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2327 echo "configure:2328: checking whether ln works" >&5
2328 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2329   echo $ac_n "(cached) $ac_c" 1>&6
2330 else
2331   rm -f conftest.src conftest.dst
2332 echo "conftest" > conftest.src
2333 if ln conftest.src conftest.dst 2>/dev/null
2334 then
2335   ol_cv_prog_LN_H="ln"
2336 else
2337   ol_cv_prog_LN_H="cp"
2338 fi
2339 rm -f conftest.src conftest.dst
2340
2341 fi
2342 LN_H="$ol_cv_prog_LN_H"
2343 if test "$ol_cv_prog_LN_H" = "ln"; then
2344         echo "$ac_t""yes" 1>&6
2345 else
2346         echo "$ac_t""no" 1>&6
2347 fi
2348
2349 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2350 echo "configure:2351: checking whether ln -s works" >&5
2351 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2352   echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354   rm -f conftestdata
2355 if ln -s X conftestdata 2>/dev/null
2356 then
2357   rm -f conftestdata
2358   ac_cv_prog_LN_S="ln -s"
2359 else
2360   ac_cv_prog_LN_S=ln
2361 fi
2362 fi
2363 LN_S="$ac_cv_prog_LN_S"
2364 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2365   echo "$ac_t""yes" 1>&6
2366 else
2367   echo "$ac_t""no" 1>&6
2368 fi
2369
2370
2371 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2372         LN_S="$LN_H"
2373 fi
2374
2375 # Extract the first word of "sendmail", so it can be a program name with args.
2376 set dummy sendmail; ac_word=$2
2377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2378 echo "configure:2379: checking for $ac_word" >&5
2379 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2380   echo $ac_n "(cached) $ac_c" 1>&6
2381 else
2382   case "$SENDMAIL" in
2383   /*)
2384   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2385   ;;
2386   ?:/*)                  
2387   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2388   ;;
2389   *)
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2391   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2392   for ac_dir in $ac_dummy; do 
2393     test -z "$ac_dir" && ac_dir=.
2394     if test -f $ac_dir/$ac_word; then
2395       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2396       break
2397     fi
2398   done
2399   IFS="$ac_save_ifs"
2400   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2401   ;;
2402 esac
2403 fi
2404 SENDMAIL="$ac_cv_path_SENDMAIL"
2405 if test -n "$SENDMAIL"; then
2406   echo "$ac_t""$SENDMAIL" 1>&6
2407 else
2408   echo "$ac_t""no" 1>&6
2409 fi
2410
2411 # Extract the first word of "vi", so it can be a program name with args.
2412 set dummy vi; ac_word=$2
2413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2414 echo "configure:2415: checking for $ac_word" >&5
2415 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2416   echo $ac_n "(cached) $ac_c" 1>&6
2417 else
2418   case "$EDITOR" in
2419   /*)
2420   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2421   ;;
2422   ?:/*)                  
2423   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2424   ;;
2425   *)
2426   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2427   ac_dummy="$PATH:/usr/ucb"
2428   for ac_dir in $ac_dummy; do 
2429     test -z "$ac_dir" && ac_dir=.
2430     if test -f $ac_dir/$ac_word; then
2431       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2432       break
2433     fi
2434   done
2435   IFS="$ac_save_ifs"
2436   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2437   ;;
2438 esac
2439 fi
2440 EDITOR="$ac_cv_path_EDITOR"
2441 if test -n "$EDITOR"; then
2442   echo "$ac_t""$EDITOR" 1>&6
2443 else
2444   echo "$ac_t""no" 1>&6
2445 fi
2446
2447 # Extract the first word of "finger", so it can be a program name with args.
2448 set dummy finger; ac_word=$2
2449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2450 echo "configure:2451: checking for $ac_word" >&5
2451 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2452   echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454   case "$FINGER" in
2455   /*)
2456   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2457   ;;
2458   ?:/*)                  
2459   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2460   ;;
2461   *)
2462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2463   ac_dummy="$PATH:/usr/ucb"
2464   for ac_dir in $ac_dummy; do 
2465     test -z "$ac_dir" && ac_dir=.
2466     if test -f $ac_dir/$ac_word; then
2467       ac_cv_path_FINGER="$ac_dir/$ac_word"
2468       break
2469     fi
2470   done
2471   IFS="$ac_save_ifs"
2472   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2473   ;;
2474 esac
2475 fi
2476 FINGER="$ac_cv_path_FINGER"
2477 if test -n "$FINGER"; then
2478   echo "$ac_t""$FINGER" 1>&6
2479 else
2480   echo "$ac_t""no" 1>&6
2481 fi
2482
2483
2484 ol_link_modules=no
2485 if test $ol_enable_modules != no ; then
2486         # Extract the first word of "glib-config", so it can be a program name with args.
2487 set dummy glib-config; ac_word=$2
2488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2489 echo "configure:2490: checking for $ac_word" >&5
2490 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2491   echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493   case "$GLIBCONFIG" in
2494   /*)
2495   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2496   ;;
2497   ?:/*)                  
2498   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2499   ;;
2500   *)
2501   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2502   ac_dummy="$PATH"
2503   for ac_dir in $ac_dummy; do 
2504     test -z "$ac_dir" && ac_dir=.
2505     if test -f $ac_dir/$ac_word; then
2506       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2507       break
2508     fi
2509   done
2510   IFS="$ac_save_ifs"
2511   ;;
2512 esac
2513 fi
2514 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2515 if test -n "$GLIBCONFIG"; then
2516   echo "$ac_t""$GLIBCONFIG" 1>&6
2517 else
2518   echo "$ac_t""no" 1>&6
2519 fi
2520
2521
2522         if test "no$GLIBCONFIG" = "no" ; then
2523                 if test $ol_enable_modules = yes ; then
2524                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2525                 fi
2526
2527         else
2528                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2529                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2530                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2531
2532                                 ol_link_modules=yes
2533         fi
2534 fi
2535
2536 ol_link_perl=no
2537 if test $ol_enable_perl != no ; then
2538         # Extract the first word of "perl", so it can be a program name with args.
2539 set dummy perl; ac_word=$2
2540 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2541 echo "configure:2542: checking for $ac_word" >&5
2542 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2543   echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545   case "$PERLBIN" in
2546   /*)
2547   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2548   ;;
2549   ?:/*)                  
2550   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2551   ;;
2552   *)
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2554   ac_dummy="$PATH"
2555   for ac_dir in $ac_dummy; do 
2556     test -z "$ac_dir" && ac_dir=.
2557     if test -f $ac_dir/$ac_word; then
2558       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2559       break
2560     fi
2561   done
2562   IFS="$ac_save_ifs"
2563   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2564   ;;
2565 esac
2566 fi
2567 PERLBIN="$ac_cv_path_PERLBIN"
2568 if test -n "$PERLBIN"; then
2569   echo "$ac_t""$PERLBIN" 1>&6
2570 else
2571   echo "$ac_t""no" 1>&6
2572 fi
2573
2574
2575         if test "no$PERLBIN" = "no" ; then
2576                 if test $ol_enable_perl = yes ; then
2577                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2578                 fi
2579
2580         else
2581                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2582                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2583
2584                                 ol_link_perl=yes
2585         fi
2586 fi
2587
2588 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2589 echo "configure:2590: checking how to run the C preprocessor" >&5
2590 # On Suns, sometimes $CPP names a directory.
2591 if test -n "$CPP" && test -d "$CPP"; then
2592   CPP=
2593 fi
2594 if test -z "$CPP"; then
2595 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598     # This must be in double quotes, not single quotes, because CPP may get
2599   # substituted into the Makefile and "${CC-cc}" will confuse make.
2600   CPP="${CC-cc} -E"
2601   # On the NeXT, cc -E runs the code through the compiler's parser,
2602   # not just through cpp.
2603   cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 #include <assert.h>
2607 Syntax Error
2608 EOF
2609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2610 { (eval echo configure:2611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2612 if test -z "$ac_err"; then
2613   :
2614 else
2615   echo "$ac_err" >&5
2616   echo "configure: failed program was:" >&5
2617   cat conftest.$ac_ext >&5
2618   rm -rf conftest*
2619   CPP="${CC-cc} -E -traditional-cpp"
2620   cat > conftest.$ac_ext <<EOF
2621 #line 2622 "configure"
2622 #include "confdefs.h"
2623 #include <assert.h>
2624 Syntax Error
2625 EOF
2626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2627 { (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2629 if test -z "$ac_err"; then
2630   :
2631 else
2632   echo "$ac_err" >&5
2633   echo "configure: failed program was:" >&5
2634   cat conftest.$ac_ext >&5
2635   rm -rf conftest*
2636   CPP="${CC-cc} -nologo -E"
2637   cat > conftest.$ac_ext <<EOF
2638 #line 2639 "configure"
2639 #include "confdefs.h"
2640 #include <assert.h>
2641 Syntax Error
2642 EOF
2643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2644 { (eval echo configure:2645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2646 if test -z "$ac_err"; then
2647   :
2648 else
2649   echo "$ac_err" >&5
2650   echo "configure: failed program was:" >&5
2651   cat conftest.$ac_ext >&5
2652   rm -rf conftest*
2653   CPP=/lib/cpp
2654 fi
2655 rm -f conftest*
2656 fi
2657 rm -f conftest*
2658 fi
2659 rm -f conftest*
2660   ac_cv_prog_CPP="$CPP"
2661 fi
2662   CPP="$ac_cv_prog_CPP"
2663 else
2664   ac_cv_prog_CPP="$CPP"
2665 fi
2666 echo "$ac_t""$CPP" 1>&6
2667
2668
2669 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2670         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2671
2672 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2673         echo "configure: warning: programs compiled here do run here..." 1>&2
2674         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2675
2676 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2677         echo "configure: warning: programs compiled here do not run here..." 1>&2
2678         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2679 fi
2680
2681 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2682 echo "configure:2683: checking for AIX" >&5
2683 cat > conftest.$ac_ext <<EOF
2684 #line 2685 "configure"
2685 #include "confdefs.h"
2686 #ifdef _AIX
2687   yes
2688 #endif
2689
2690 EOF
2691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2692   egrep "yes" >/dev/null 2>&1; then
2693   rm -rf conftest*
2694   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2695 #define _ALL_SOURCE 1
2696 EOF
2697
2698 else
2699   rm -rf conftest*
2700   echo "$ac_t""no" 1>&6
2701 fi
2702 rm -f conftest*
2703
2704
2705 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2706 echo "configure:2707: checking for POSIXized ISC" >&5
2707 if test -d /etc/conf/kconfig.d &&
2708   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2709 then
2710   echo "$ac_t""yes" 1>&6
2711   ISC=yes # If later tests want to check for ISC.
2712   cat >> confdefs.h <<\EOF
2713 #define _POSIX_SOURCE 1
2714 EOF
2715
2716   if test "$GCC" = yes; then
2717     CC="$CC -posix"
2718   else
2719     CC="$CC -Xp"
2720   fi
2721 else
2722   echo "$ac_t""no" 1>&6
2723   ISC=
2724 fi
2725
2726 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2727 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2728 echo "configure:2729: checking for minix/config.h" >&5
2729 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2730   echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732   cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 #include <minix/config.h>
2736 EOF
2737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2738 { (eval echo configure:2739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2740 if test -z "$ac_err"; then
2741   rm -rf conftest*
2742   eval "ac_cv_header_$ac_safe=yes"
2743 else
2744   echo "$ac_err" >&5
2745   echo "configure: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   rm -rf conftest*
2748   eval "ac_cv_header_$ac_safe=no"
2749 fi
2750 rm -f conftest*
2751 fi
2752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2753   echo "$ac_t""yes" 1>&6
2754   MINIX=yes
2755 else
2756   echo "$ac_t""no" 1>&6
2757 MINIX=
2758 fi
2759
2760 if test "$MINIX" = yes; then
2761   cat >> confdefs.h <<\EOF
2762 #define _POSIX_SOURCE 1
2763 EOF
2764
2765   cat >> confdefs.h <<\EOF
2766 #define _POSIX_1_SOURCE 2
2767 EOF
2768
2769   cat >> confdefs.h <<\EOF
2770 #define _MINIX 1
2771 EOF
2772
2773 fi
2774
2775
2776 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2777 echo "configure:2778: checking for be_app in -lbe" >&5
2778 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2780   echo $ac_n "(cached) $ac_c" 1>&6
2781 else
2782   ac_save_LIBS="$LIBS"
2783 LIBS="-lbe -lroot -lnet $LIBS"
2784 cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 /* Override any gcc2 internal prototype to avoid an error.  */
2788 /* We use char because int might match the return type of a gcc2
2789     builtin and then its argument prototype would still apply.  */
2790 char be_app();
2791
2792 int main() {
2793 be_app()
2794 ; return 0; }
2795 EOF
2796 if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2797   rm -rf conftest*
2798   eval "ac_cv_lib_$ac_lib_var=yes"
2799 else
2800   echo "configure: failed program was:" >&5
2801   cat conftest.$ac_ext >&5
2802   rm -rf conftest*
2803   eval "ac_cv_lib_$ac_lib_var=no"
2804 fi
2805 rm -f conftest*
2806 LIBS="$ac_save_LIBS"
2807
2808 fi
2809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2810   echo "$ac_t""yes" 1>&6
2811   LIBS="$LIBS -lbe -lroot -lnet"
2812 else
2813   echo "$ac_t""no" 1>&6
2814 :
2815 fi
2816
2817
2818 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2819 echo "configure:2820: checking for Cygwin environment" >&5
2820 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2821   echo $ac_n "(cached) $ac_c" 1>&6
2822 else
2823   cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826
2827 int main() {
2828
2829 #ifndef __CYGWIN__
2830 #define __CYGWIN__ __CYGWIN32__
2831 #endif
2832 return __CYGWIN__;
2833 ; return 0; }
2834 EOF
2835 if { (eval echo configure:2836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2836   rm -rf conftest*
2837   ac_cv_cygwin=yes
2838 else
2839   echo "configure: failed program was:" >&5
2840   cat conftest.$ac_ext >&5
2841   rm -rf conftest*
2842   ac_cv_cygwin=no
2843 fi
2844 rm -f conftest*
2845 rm -f conftest*
2846 fi
2847
2848 echo "$ac_t""$ac_cv_cygwin" 1>&6
2849 CYGWIN=
2850 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2851 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2852 echo "configure:2853: checking for mingw32 environment" >&5
2853 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2854   echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856   cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859
2860 int main() {
2861 return __MINGW32__;
2862 ; return 0; }
2863 EOF
2864 if { (eval echo configure:2865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2865   rm -rf conftest*
2866   ac_cv_mingw32=yes
2867 else
2868   echo "configure: failed program was:" >&5
2869   cat conftest.$ac_ext >&5
2870   rm -rf conftest*
2871   ac_cv_mingw32=no
2872 fi
2873 rm -f conftest*
2874 rm -f conftest*
2875 fi
2876
2877 echo "$ac_t""$ac_cv_mingw32" 1>&6
2878 MINGW32=
2879 test "$ac_cv_mingw32" = yes && MINGW32=yes
2880
2881
2882 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2883 echo "configure:2884: checking for executable suffix" >&5
2884 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2885   echo $ac_n "(cached) $ac_c" 1>&6
2886 else
2887   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2888   ac_cv_exeext=.exe
2889 else
2890   rm -f conftest*
2891   echo 'int main () { return 0; }' > conftest.$ac_ext
2892   ac_cv_exeext=
2893   if { (eval echo configure:2894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2894     for file in conftest.*; do
2895       case $file in
2896       *.c | *.o | *.obj) ;;
2897       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2898       esac
2899     done
2900   else
2901     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2902   fi
2903   rm -f conftest*
2904   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2905 fi
2906 fi
2907
2908 EXEEXT=""
2909 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2910 echo "$ac_t""${ac_cv_exeext}" 1>&6
2911 ac_exeext=$EXEEXT
2912
2913 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2914 echo "configure:2915: checking for object suffix" >&5
2915 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2916   echo $ac_n "(cached) $ac_c" 1>&6
2917 else
2918   rm -f conftest*
2919 echo 'int i = 1;' > conftest.$ac_ext
2920 if { (eval echo configure:2921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2921   for ac_file in conftest.*; do
2922     case $ac_file in
2923     *.c) ;;
2924     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2925     esac
2926   done
2927 else
2928   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2929 fi
2930 rm -f conftest*
2931 fi
2932
2933 echo "$ac_t""$ac_cv_objext" 1>&6
2934 OBJEXT=$ac_cv_objext
2935 ac_objext=$ac_cv_objext
2936
2937
2938 cat >> confdefs.h <<EOF
2939 #define EXEEXT "${EXEEXT}"
2940 EOF
2941
2942
2943
2944
2945
2946 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2947 echo "configure:2948: checking for ${CC-cc} option to accept ANSI C" >&5
2948 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   am_cv_prog_cc_stdc=no
2952 ac_save_CC="$CC"
2953 # Don't try gcc -ansi; that turns off useful extensions and
2954 # breaks some systems' header files.
2955 # AIX                   -qlanglvl=ansi
2956 # Ultrix and OSF/1      -std1
2957 # HP-UX                 -Aa -D_HPUX_SOURCE
2958 # SVR4                  -Xc -D__EXTENSIONS__
2959 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2960 do
2961   CC="$ac_save_CC $ac_arg"
2962   cat > conftest.$ac_ext <<EOF
2963 #line 2964 "configure"
2964 #include "confdefs.h"
2965 #include <stdarg.h>
2966 #include <stdio.h>
2967 #include <sys/types.h>
2968 #include <sys/stat.h>
2969 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2970 struct buf { int x; };
2971 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2972 static char *e (p, i)
2973      char **p;
2974      int i;
2975 {
2976   return p[i];
2977 }
2978 static char *f (char * (*g) (char **, int), char **p, ...)
2979 {
2980   char *s;
2981   va_list v;
2982   va_start (v,p);
2983   s = g (p, va_arg (v,int));
2984   va_end (v);
2985   return s;
2986 }
2987 int test (int i, double x);
2988 struct s1 {int (*f) (int a);};
2989 struct s2 {int (*f) (double a);};
2990 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2991 int argc;
2992 char **argv;
2993
2994 int main() {
2995
2996 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2997
2998 ; return 0; }
2999 EOF
3000 if { (eval echo configure:3001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3001   rm -rf conftest*
3002   am_cv_prog_cc_stdc="$ac_arg"; break
3003 else
3004   echo "configure: failed program was:" >&5
3005   cat conftest.$ac_ext >&5
3006 fi
3007 rm -f conftest*
3008 done
3009 CC="$ac_save_CC"
3010
3011 fi
3012
3013 if test -z "$am_cv_prog_cc_stdc"; then
3014   echo "$ac_t""none needed" 1>&6
3015 else
3016   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3017 fi
3018 case "x$am_cv_prog_cc_stdc" in
3019   x|xno) ;;
3020   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3021 esac
3022
3023 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3024         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
3025 fi
3026
3027
3028 # test for cc depend flag
3029 echo $ac_n "checking for ${CC-cc} depend flag""... $ac_c" 1>&6
3030 echo "configure:3031: checking for ${CC-cc} depend flag" >&5
3031 if eval "test \"`echo '$''{'ol_cv_cc_depend'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034         ol_cv_cc_depend=no
3035         if test $GCC = yes ; then
3036                 ol_cv_cc_depend="-M"
3037         else
3038                 for flag in "-M" "-xM"; do
3039                         cat > conftest.c <<EOF
3040  noCode;
3041 EOF
3042                         if { ac_try='${CC-cc} $flag conftest.c'; { (eval echo configure:3043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3043                                 | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3044                         then
3045                                 cc_cv_cc_depend=$flag
3046                                 break
3047                         fi
3048                 done
3049                 rm -f conftest*
3050         fi
3051 fi
3052
3053 echo "$ac_t""$ol_cv_cc_depend" 1>&6
3054 if test "${ol_cv_cc_depend}" != no ; then
3055         CC_DEPEND_FLAGS="${ol_cv_cc_depend}"
3056         
3057 else
3058         echo "configure: warning: do not know how to generate dependencies" 1>&2
3059 fi
3060
3061
3062
3063
3064 echo $ac_n "checking for socket""... $ac_c" 1>&6
3065 echo "configure:3066: checking for socket" >&5
3066 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3067   echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069   cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 /* System header to define __stub macros and hopefully few prototypes,
3073     which can conflict with char socket(); below.  */
3074 #include <assert.h>
3075 /* Override any gcc2 internal prototype to avoid an error.  */
3076 /* We use char because int might match the return type of a gcc2
3077     builtin and then its argument prototype would still apply.  */
3078 char socket();
3079
3080 int main() {
3081
3082 /* The GNU C library defines this for functions which it implements
3083     to always fail with ENOSYS.  Some functions are actually named
3084     something starting with __ and the normal name is an alias.  */
3085 #if defined (__stub_socket) || defined (__stub___socket)
3086 choke me
3087 #else
3088 socket();
3089 #endif
3090
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3094   rm -rf conftest*
3095   eval "ac_cv_func_socket=yes"
3096 else
3097   echo "configure: failed program was:" >&5
3098   cat conftest.$ac_ext >&5
3099   rm -rf conftest*
3100   eval "ac_cv_func_socket=no"
3101 fi
3102 rm -f conftest*
3103 fi
3104
3105 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3106   echo "$ac_t""yes" 1>&6
3107   :
3108 else
3109   echo "$ac_t""no" 1>&6
3110         
3111         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3112 echo "configure:3113: checking for main in -lsocket" >&5
3113 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3114 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   ac_save_LIBS="$LIBS"
3118 LIBS="-lsocket  $LIBS"
3119 cat > conftest.$ac_ext <<EOF
3120 #line 3121 "configure"
3121 #include "confdefs.h"
3122
3123 int main() {
3124 main()
3125 ; return 0; }
3126 EOF
3127 if { (eval echo configure:3128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3128   rm -rf conftest*
3129   eval "ac_cv_lib_$ac_lib_var=yes"
3130 else
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   eval "ac_cv_lib_$ac_lib_var=no"
3135 fi
3136 rm -f conftest*
3137 LIBS="$ac_save_LIBS"
3138
3139 fi
3140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3141   echo "$ac_t""yes" 1>&6
3142     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3144   cat >> confdefs.h <<EOF
3145 #define $ac_tr_lib 1
3146 EOF
3147
3148   LIBS="-lsocket $LIBS"
3149
3150 else
3151   echo "$ac_t""no" 1>&6
3152 fi
3153
3154         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3155 echo "configure:3156: checking for main in -lnet" >&5
3156 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3157 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3158   echo $ac_n "(cached) $ac_c" 1>&6
3159 else
3160   ac_save_LIBS="$LIBS"
3161 LIBS="-lnet  $LIBS"
3162 cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165
3166 int main() {
3167 main()
3168 ; return 0; }
3169 EOF
3170 if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3171   rm -rf conftest*
3172   eval "ac_cv_lib_$ac_lib_var=yes"
3173 else
3174   echo "configure: failed program was:" >&5
3175   cat conftest.$ac_ext >&5
3176   rm -rf conftest*
3177   eval "ac_cv_lib_$ac_lib_var=no"
3178 fi
3179 rm -f conftest*
3180 LIBS="$ac_save_LIBS"
3181
3182 fi
3183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3184   echo "$ac_t""yes" 1>&6
3185     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3187   cat >> confdefs.h <<EOF
3188 #define $ac_tr_lib 1
3189 EOF
3190
3191   LIBS="-lnet $LIBS"
3192
3193 else
3194   echo "$ac_t""no" 1>&6
3195 fi
3196
3197         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3198 echo "configure:3199: checking for socket in -lnet" >&5
3199 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3200 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   ac_save_LIBS="$LIBS"
3204 LIBS="-lnet  $LIBS"
3205 cat > conftest.$ac_ext <<EOF
3206 #line 3207 "configure"
3207 #include "confdefs.h"
3208 /* Override any gcc2 internal prototype to avoid an error.  */
3209 /* We use char because int might match the return type of a gcc2
3210     builtin and then its argument prototype would still apply.  */
3211 char socket();
3212
3213 int main() {
3214 socket()
3215 ; return 0; }
3216 EOF
3217 if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3218   rm -rf conftest*
3219   eval "ac_cv_lib_$ac_lib_var=yes"
3220 else
3221   echo "configure: failed program was:" >&5
3222   cat conftest.$ac_ext >&5
3223   rm -rf conftest*
3224   eval "ac_cv_lib_$ac_lib_var=no"
3225 fi
3226 rm -f conftest*
3227 LIBS="$ac_save_LIBS"
3228
3229 fi
3230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3231   echo "$ac_t""yes" 1>&6
3232     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3233     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3234   cat >> confdefs.h <<EOF
3235 #define $ac_tr_lib 1
3236 EOF
3237
3238   LIBS="-lnet $LIBS"
3239
3240 else
3241   echo "$ac_t""no" 1>&6
3242 fi
3243
3244         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3245 echo "configure:3246: checking for main in -lnsl_s" >&5
3246 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3247 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3248   echo $ac_n "(cached) $ac_c" 1>&6
3249 else
3250   ac_save_LIBS="$LIBS"
3251 LIBS="-lnsl_s  $LIBS"
3252 cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255
3256 int main() {
3257 main()
3258 ; return 0; }
3259 EOF
3260 if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3261   rm -rf conftest*
3262   eval "ac_cv_lib_$ac_lib_var=yes"
3263 else
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   eval "ac_cv_lib_$ac_lib_var=no"
3268 fi
3269 rm -f conftest*
3270 LIBS="$ac_save_LIBS"
3271
3272 fi
3273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3274   echo "$ac_t""yes" 1>&6
3275     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3276     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3277   cat >> confdefs.h <<EOF
3278 #define $ac_tr_lib 1
3279 EOF
3280
3281   LIBS="-lnsl_s $LIBS"
3282
3283 else
3284   echo "$ac_t""no" 1>&6
3285 fi
3286
3287         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3288 echo "configure:3289: checking for main in -lnsl" >&5
3289 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   ac_save_LIBS="$LIBS"
3294 LIBS="-lnsl  $LIBS"
3295 cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298
3299 int main() {
3300 main()
3301 ; return 0; }
3302 EOF
3303 if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3304   rm -rf conftest*
3305   eval "ac_cv_lib_$ac_lib_var=yes"
3306 else
3307   echo "configure: failed program was:" >&5
3308   cat conftest.$ac_ext >&5
3309   rm -rf conftest*
3310   eval "ac_cv_lib_$ac_lib_var=no"
3311 fi
3312 rm -f conftest*
3313 LIBS="$ac_save_LIBS"
3314
3315 fi
3316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3317   echo "$ac_t""yes" 1>&6
3318     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3319     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3320   cat >> confdefs.h <<EOF
3321 #define $ac_tr_lib 1
3322 EOF
3323
3324   LIBS="-lnsl $LIBS"
3325
3326 else
3327   echo "$ac_t""no" 1>&6
3328 fi
3329
3330         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3331 echo "configure:3332: checking for socket in -linet" >&5
3332 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3333 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3334   echo $ac_n "(cached) $ac_c" 1>&6
3335 else
3336   ac_save_LIBS="$LIBS"
3337 LIBS="-linet  $LIBS"
3338 cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 /* Override any gcc2 internal prototype to avoid an error.  */
3342 /* We use char because int might match the return type of a gcc2
3343     builtin and then its argument prototype would still apply.  */
3344 char socket();
3345
3346 int main() {
3347 socket()
3348 ; return 0; }
3349 EOF
3350 if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3351   rm -rf conftest*
3352   eval "ac_cv_lib_$ac_lib_var=yes"
3353 else
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   rm -rf conftest*
3357   eval "ac_cv_lib_$ac_lib_var=no"
3358 fi
3359 rm -f conftest*
3360 LIBS="$ac_save_LIBS"
3361
3362 fi
3363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3364   echo "$ac_t""yes" 1>&6
3365     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3366     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3367   cat >> confdefs.h <<EOF
3368 #define $ac_tr_lib 1
3369 EOF
3370
3371   LIBS="-linet $LIBS"
3372
3373 else
3374   echo "$ac_t""no" 1>&6
3375 fi
3376
3377         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3378 echo "configure:3379: checking for main in -lgen" >&5
3379 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3380 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3381   echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383   ac_save_LIBS="$LIBS"
3384 LIBS="-lgen  $LIBS"
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388
3389 int main() {
3390 main()
3391 ; return 0; }
3392 EOF
3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3394   rm -rf conftest*
3395   eval "ac_cv_lib_$ac_lib_var=yes"
3396 else
3397   echo "configure: failed program was:" >&5
3398   cat conftest.$ac_ext >&5
3399   rm -rf conftest*
3400   eval "ac_cv_lib_$ac_lib_var=no"
3401 fi
3402 rm -f conftest*
3403 LIBS="$ac_save_LIBS"
3404
3405 fi
3406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3407   echo "$ac_t""yes" 1>&6
3408     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3409     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3410   cat >> confdefs.h <<EOF
3411 #define $ac_tr_lib 1
3412 EOF
3413
3414   LIBS="-lgen $LIBS"
3415
3416 else
3417   echo "$ac_t""no" 1>&6
3418 fi
3419
3420
3421 fi
3422
3423
3424 for ac_func in res_search
3425 do
3426 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3427 echo "configure:3428: checking for $ac_func" >&5
3428 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3429   echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431   cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434 /* System header to define __stub macros and hopefully few prototypes,
3435     which can conflict with char $ac_func(); below.  */
3436 #include <assert.h>
3437 /* Override any gcc2 internal prototype to avoid an error.  */
3438 /* We use char because int might match the return type of a gcc2
3439     builtin and then its argument prototype would still apply.  */
3440 char $ac_func();
3441
3442 int main() {
3443
3444 /* The GNU C library defines this for functions which it implements
3445     to always fail with ENOSYS.  Some functions are actually named
3446     something starting with __ and the normal name is an alias.  */
3447 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3448 choke me
3449 #else
3450 $ac_func();
3451 #endif
3452
3453 ; return 0; }
3454 EOF
3455 if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3456   rm -rf conftest*
3457   eval "ac_cv_func_$ac_func=yes"
3458 else
3459   echo "configure: failed program was:" >&5
3460   cat conftest.$ac_ext >&5
3461   rm -rf conftest*
3462   eval "ac_cv_func_$ac_func=no"
3463 fi
3464 rm -f conftest*
3465 fi
3466
3467 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3468   echo "$ac_t""yes" 1>&6
3469     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3470   cat >> confdefs.h <<EOF
3471 #define $ac_tr_func 1
3472 EOF
3473  
3474 else
3475   echo "$ac_t""no" 1>&6
3476 fi
3477 done
3478
3479 if test $ac_cv_func_res_search = "no" ; then 
3480         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3481 echo "configure:3482: checking for res_search in -lbind" >&5
3482 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   ac_save_LIBS="$LIBS"
3487 LIBS="-lbind  $LIBS"
3488 cat > conftest.$ac_ext <<EOF
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491 /* Override any gcc2 internal prototype to avoid an error.  */
3492 /* We use char because int might match the return type of a gcc2
3493     builtin and then its argument prototype would still apply.  */
3494 char res_search();
3495
3496 int main() {
3497 res_search()
3498 ; return 0; }
3499 EOF
3500 if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3501   rm -rf conftest*
3502   eval "ac_cv_lib_$ac_lib_var=yes"
3503 else
3504   echo "configure: failed program was:" >&5
3505   cat conftest.$ac_ext >&5
3506   rm -rf conftest*
3507   eval "ac_cv_lib_$ac_lib_var=no"
3508 fi
3509 rm -f conftest*
3510 LIBS="$ac_save_LIBS"
3511
3512 fi
3513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3514   echo "$ac_t""yes" 1>&6
3515     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3516     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3517   cat >> confdefs.h <<EOF
3518 #define $ac_tr_lib 1
3519 EOF
3520
3521   LIBS="-lbind $LIBS"
3522
3523 else
3524   echo "$ac_t""no" 1>&6
3525 fi
3526
3527         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3528                 cat >> confdefs.h <<\EOF
3529 #define HAVE_RES_SEARCH 1
3530 EOF
3531
3532         else
3533                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3534 echo "configure:3535: checking for res_search in -lresolv" >&5
3535 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3536 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   ac_save_LIBS="$LIBS"
3540 LIBS="-lresolv  $LIBS"
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 /* Override any gcc2 internal prototype to avoid an error.  */
3545 /* We use char because int might match the return type of a gcc2
3546     builtin and then its argument prototype would still apply.  */
3547 char res_search();
3548
3549 int main() {
3550 res_search()
3551 ; return 0; }
3552 EOF
3553 if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3554   rm -rf conftest*
3555   eval "ac_cv_lib_$ac_lib_var=yes"
3556 else
3557   echo "configure: failed program was:" >&5
3558   cat conftest.$ac_ext >&5
3559   rm -rf conftest*
3560   eval "ac_cv_lib_$ac_lib_var=no"
3561 fi
3562 rm -f conftest*
3563 LIBS="$ac_save_LIBS"
3564
3565 fi
3566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3567   echo "$ac_t""yes" 1>&6
3568     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3569     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3570   cat >> confdefs.h <<EOF
3571 #define $ac_tr_lib 1
3572 EOF
3573
3574   LIBS="-lresolv $LIBS"
3575
3576 else
3577   echo "$ac_t""no" 1>&6
3578 fi
3579
3580                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3581                         cat >> confdefs.h <<\EOF
3582 #define HAVE_RES_SEARCH 1
3583 EOF
3584
3585                 fi
3586         fi
3587 fi
3588
3589 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3590 echo "configure:3591: checking for sigset in -lV3" >&5
3591 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3592 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3593   echo $ac_n "(cached) $ac_c" 1>&6
3594 else
3595   ac_save_LIBS="$LIBS"
3596 LIBS="-lV3  $LIBS"
3597 cat > conftest.$ac_ext <<EOF
3598 #line 3599 "configure"
3599 #include "confdefs.h"
3600 /* Override any gcc2 internal prototype to avoid an error.  */
3601 /* We use char because int might match the return type of a gcc2
3602     builtin and then its argument prototype would still apply.  */
3603 char sigset();
3604
3605 int main() {
3606 sigset()
3607 ; return 0; }
3608 EOF
3609 if { (eval echo configure:3610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3610   rm -rf conftest*
3611   eval "ac_cv_lib_$ac_lib_var=yes"
3612 else
3613   echo "configure: failed program was:" >&5
3614   cat conftest.$ac_ext >&5
3615   rm -rf conftest*
3616   eval "ac_cv_lib_$ac_lib_var=no"
3617 fi
3618 rm -f conftest*
3619 LIBS="$ac_save_LIBS"
3620
3621 fi
3622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3623   echo "$ac_t""yes" 1>&6
3624     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3625     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3626   cat >> confdefs.h <<EOF
3627 #define $ac_tr_lib 1
3628 EOF
3629
3630   LIBS="-lV3 $LIBS"
3631
3632 else
3633   echo "$ac_t""no" 1>&6
3634 fi
3635
3636
3637 for ac_hdr in regex.h 
3638 do
3639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3641 echo "configure:3642: checking for $ac_hdr" >&5
3642 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3643   echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645   cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 #include <$ac_hdr>
3649 EOF
3650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3651 { (eval echo configure:3652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3653 if test -z "$ac_err"; then
3654   rm -rf conftest*
3655   eval "ac_cv_header_$ac_safe=yes"
3656 else
3657   echo "$ac_err" >&5
3658   echo "configure: failed program was:" >&5
3659   cat conftest.$ac_ext >&5
3660   rm -rf conftest*
3661   eval "ac_cv_header_$ac_safe=no"
3662 fi
3663 rm -f conftest*
3664 fi
3665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3666   echo "$ac_t""yes" 1>&6
3667     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3668   cat >> confdefs.h <<EOF
3669 #define $ac_tr_hdr 1
3670 EOF
3671  
3672 else
3673   echo "$ac_t""no" 1>&6
3674 fi
3675 done
3676
3677 if test "$ac_cv_header_regex_h" != yes ; then
3678         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
3679 fi
3680 echo $ac_n "checking for regfree""... $ac_c" 1>&6
3681 echo "configure:3682: checking for regfree" >&5
3682 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 /* System header to define __stub macros and hopefully few prototypes,
3689     which can conflict with char regfree(); below.  */
3690 #include <assert.h>
3691 /* Override any gcc2 internal prototype to avoid an error.  */
3692 /* We use char because int might match the return type of a gcc2
3693     builtin and then its argument prototype would still apply.  */
3694 char regfree();
3695
3696 int main() {
3697
3698 /* The GNU C library defines this for functions which it implements
3699     to always fail with ENOSYS.  Some functions are actually named
3700     something starting with __ and the normal name is an alias.  */
3701 #if defined (__stub_regfree) || defined (__stub___regfree)
3702 choke me
3703 #else
3704 regfree();
3705 #endif
3706
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3710   rm -rf conftest*
3711   eval "ac_cv_func_regfree=yes"
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   eval "ac_cv_func_regfree=no"
3717 fi
3718 rm -f conftest*
3719 fi
3720
3721 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
3722   echo "$ac_t""yes" 1>&6
3723   :
3724 else
3725   echo "$ac_t""no" 1>&6
3726 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
3727 fi
3728
3729
3730 echo $ac_n "checking for select""... $ac_c" 1>&6
3731 echo "configure:3732: checking for select" >&5
3732 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 /* System header to define __stub macros and hopefully few prototypes,
3739     which can conflict with char select(); below.  */
3740 #include <assert.h>
3741 /* Override any gcc2 internal prototype to avoid an error.  */
3742 /* We use char because int might match the return type of a gcc2
3743     builtin and then its argument prototype would still apply.  */
3744 char select();
3745
3746 int main() {
3747
3748 /* The GNU C library defines this for functions which it implements
3749     to always fail with ENOSYS.  Some functions are actually named
3750     something starting with __ and the normal name is an alias.  */
3751 #if defined (__stub_select) || defined (__stub___select)
3752 choke me
3753 #else
3754 select();
3755 #endif
3756
3757 ; return 0; }
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3760   rm -rf conftest*
3761   eval "ac_cv_func_select=yes"
3762 else
3763   echo "configure: failed program was:" >&5
3764   cat conftest.$ac_ext >&5
3765   rm -rf conftest*
3766   eval "ac_cv_func_select=no"
3767 fi
3768 rm -f conftest*
3769 fi
3770
3771 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3772   echo "$ac_t""yes" 1>&6
3773   :
3774 else
3775   echo "$ac_t""no" 1>&6
3776 { echo "configure: error: select() required." 1>&2; exit 1; }
3777 fi
3778
3779
3780 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3781 echo "configure:3782: checking types of arguments for select()" >&5
3782  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3786   echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3792      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3793       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3794        cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #ifdef HAVE_SYS_TYPES_H
3798 #include <sys/types.h>
3799 #endif
3800 #ifdef HAVE_SYS_TIME_H
3801 #include <sys/time.h>
3802 #endif
3803 #ifdef HAVE_SYS_SELECT_H
3804 #include <sys/select.h>
3805 #endif
3806 #ifdef HAVE_SYS_SOCKET_H
3807 #include <sys/socket.h>
3808 #endif
3809 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
3810 int main() {
3811
3812 ; return 0; }
3813 EOF
3814 if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3815   rm -rf conftest*
3816           ac_not_found=no ; break 3
3817 else
3818   echo "configure: failed program was:" >&5
3819   cat conftest.$ac_ext >&5
3820   rm -rf conftest*
3821   ac_not_found=yes
3822 fi
3823 rm -f conftest*
3824       done
3825      done
3826     done
3827    
3828 fi
3829   
3830 fi
3831  
3832 fi
3833  if test "$ac_not_found" = yes; then
3834   ac_cv_func_select_arg1=int 
3835   ac_cv_func_select_arg234='int *' 
3836   ac_cv_func_select_arg5='struct timeval *'
3837  fi
3838  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3839  cat >> confdefs.h <<EOF
3840 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3841 EOF
3842
3843  cat >> confdefs.h <<EOF
3844 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3845 EOF
3846
3847  cat >> confdefs.h <<EOF
3848 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3849 EOF
3850
3851
3852
3853 # ISODE tests
3854 ol_link_isode=no
3855 if test $ol_enable_ldapd != no ; then
3856         echo "configure: warning: ldapd support deprecated.  Manual intervention required." 1>&2
3857
3858                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3859 echo "configure:3860: checking for main in -lxtpp" >&5
3860 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3862   echo $ac_n "(cached) $ac_c" 1>&6
3863 else
3864   ac_save_LIBS="$LIBS"
3865 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3866 cat > conftest.$ac_ext <<EOF
3867 #line 3868 "configure"
3868 #include "confdefs.h"
3869
3870 int main() {
3871 main()
3872 ; return 0; }
3873 EOF
3874 if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3875   rm -rf conftest*
3876   eval "ac_cv_lib_$ac_lib_var=yes"
3877 else
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=no"
3882 fi
3883 rm -f conftest*
3884 LIBS="$ac_save_LIBS"
3885
3886 fi
3887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3888   echo "$ac_t""yes" 1>&6
3889   
3890                 ol_link_isode=yes
3891                 cat >> confdefs.h <<\EOF
3892 #define HAVE_XTPP 1
3893 EOF
3894
3895                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3896                 
3897 else
3898   echo "$ac_t""no" 1>&6
3899 :
3900 fi
3901
3902         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3903 echo "configure:3904: checking for main in -ldsap" >&5
3904 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   ac_save_LIBS="$LIBS"
3909 LIBS="-ldsap -lisode $LIBS"
3910 cat > conftest.$ac_ext <<EOF
3911 #line 3912 "configure"
3912 #include "confdefs.h"
3913
3914 int main() {
3915 main()
3916 ; return 0; }
3917 EOF
3918 if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3919   rm -rf conftest*
3920   eval "ac_cv_lib_$ac_lib_var=yes"
3921 else
3922   echo "configure: failed program was:" >&5
3923   cat conftest.$ac_ext >&5
3924   rm -rf conftest*
3925   eval "ac_cv_lib_$ac_lib_var=no"
3926 fi
3927 rm -f conftest*
3928 LIBS="$ac_save_LIBS"
3929
3930 fi
3931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3932   echo "$ac_t""yes" 1>&6
3933   
3934                 ol_link_isode=yes
3935                 cat >> confdefs.h <<\EOF
3936 #define HAVE_DSAP 1
3937 EOF
3938
3939                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3940                 
3941 else
3942   echo "$ac_t""no" 1>&6
3943 :
3944 fi
3945
3946         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3947 echo "configure:3948: checking for main in -lisode" >&5
3948 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3949 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   ac_save_LIBS="$LIBS"
3953 LIBS="-lisode  $LIBS"
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957
3958 int main() {
3959 main()
3960 ; return 0; }
3961 EOF
3962 if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3963   rm -rf conftest*
3964   eval "ac_cv_lib_$ac_lib_var=yes"
3965 else
3966   echo "configure: failed program was:" >&5
3967   cat conftest.$ac_ext >&5
3968   rm -rf conftest*
3969   eval "ac_cv_lib_$ac_lib_var=no"
3970 fi
3971 rm -f conftest*
3972 LIBS="$ac_save_LIBS"
3973
3974 fi
3975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976   echo "$ac_t""yes" 1>&6
3977   
3978                 ol_link_isode=yes
3979                 cat >> confdefs.h <<\EOF
3980 #define HAVE_ISODE 1
3981 EOF
3982
3983                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3984                 
3985 else
3986   echo "$ac_t""no" 1>&6
3987 :
3988 fi
3989
3990 fi
3991
3992 if test $ol_link_isode != no; then
3993         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3994 echo "configure:3995: checking for main in -lpp" >&5
3995 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3996 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3997   echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999   ac_save_LIBS="$LIBS"
4000 LIBS="-lpp  $LIBS"
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004
4005 int main() {
4006 main()
4007 ; return 0; }
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4010   rm -rf conftest*
4011   eval "ac_cv_lib_$ac_lib_var=yes"
4012 else
4013   echo "configure: failed program was:" >&5
4014   cat conftest.$ac_ext >&5
4015   rm -rf conftest*
4016   eval "ac_cv_lib_$ac_lib_var=no"
4017 fi
4018 rm -f conftest*
4019 LIBS="$ac_save_LIBS"
4020
4021 fi
4022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4023   echo "$ac_t""yes" 1>&6
4024   
4025                 cat >> confdefs.h <<\EOF
4026 #define HAVE_PP 1
4027 EOF
4028
4029                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4030                 
4031 else
4032   echo "$ac_t""no" 1>&6
4033 :
4034 fi
4035
4036
4037         # Extract the first word of "pepsy", so it can be a program name with args.
4038 set dummy pepsy; ac_word=$2
4039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4040 echo "configure:4041: checking for $ac_word" >&5
4041 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
4042   echo $ac_n "(cached) $ac_c" 1>&6
4043 else
4044   case "$PEPSY" in
4045   /*)
4046   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4047   ;;
4048   ?:/*)                  
4049   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4050   ;;
4051   *)
4052   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4053   ac_dummy="$PATH"
4054   for ac_dir in $ac_dummy; do 
4055     test -z "$ac_dir" && ac_dir=.
4056     if test -f $ac_dir/$ac_word; then
4057       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4058       break
4059     fi
4060   done
4061   IFS="$ac_save_ifs"
4062   ;;
4063 esac
4064 fi
4065 PEPSY="$ac_cv_path_PEPSY"
4066 if test -n "$PEPSY"; then
4067   echo "$ac_t""$PEPSY" 1>&6
4068 else
4069   echo "$ac_t""no" 1>&6
4070 fi
4071
4072 fi
4073
4074 ol_link_kerberos=no
4075
4076 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4077         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4078 do
4079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4081 echo "configure:4082: checking for $ac_hdr" >&5
4082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4083   echo $ac_n "(cached) $ac_c" 1>&6
4084 else
4085   cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 #include <$ac_hdr>
4089 EOF
4090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4091 { (eval echo configure:4092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4093 if test -z "$ac_err"; then
4094   rm -rf conftest*
4095   eval "ac_cv_header_$ac_safe=yes"
4096 else
4097   echo "$ac_err" >&5
4098   echo "configure: failed program was:" >&5
4099   cat conftest.$ac_ext >&5
4100   rm -rf conftest*
4101   eval "ac_cv_header_$ac_safe=no"
4102 fi
4103 rm -f conftest*
4104 fi
4105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4106   echo "$ac_t""yes" 1>&6
4107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4108   cat >> confdefs.h <<EOF
4109 #define $ac_tr_hdr 1
4110 EOF
4111  
4112 else
4113   echo "$ac_t""no" 1>&6
4114 fi
4115 done
4116
4117
4118         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4119                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4120 echo "configure:4121: checking for main in -lkrb4" >&5
4121 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
4122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4123   echo $ac_n "(cached) $ac_c" 1>&6
4124 else
4125   ac_save_LIBS="$LIBS"
4126 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4127 cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130
4131 int main() {
4132 main()
4133 ; return 0; }
4134 EOF
4135 if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4136   rm -rf conftest*
4137   eval "ac_cv_lib_$ac_lib_var=yes"
4138 else
4139   echo "configure: failed program was:" >&5
4140   cat conftest.$ac_ext >&5
4141   rm -rf conftest*
4142   eval "ac_cv_lib_$ac_lib_var=no"
4143 fi
4144 rm -f conftest*
4145 LIBS="$ac_save_LIBS"
4146
4147 fi
4148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4149   echo "$ac_t""yes" 1>&6
4150   have_k5=yes
4151 else
4152   echo "$ac_t""no" 1>&6
4153 have_k5=no
4154 fi
4155
4156
4157                 if test $have_k5 = yes ; then
4158                         ol_with_kerberos=found
4159                         ol_link_kerberos=yes
4160
4161                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4162
4163                         LIBS="$KRB_LIBS $LIBS"
4164
4165                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4166 echo "configure:4167: checking for des_debug in Kerberos libraries" >&5
4167 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4168   echo $ac_n "(cached) $ac_c" 1>&6
4169 else
4170   
4171                                                                 save_LIBS="$LIBS"
4172                                 LIBS="$KRB_LIBS $LIBS"
4173                                 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176
4177 #include <kerberosIV/krb.h>
4178 #include <kerberosIV/des.h>
4179 extern int des_debug;
4180
4181 int main() {
4182
4183 des_debug = 1;
4184
4185 ; return 0; }
4186 EOF
4187 if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4188   rm -rf conftest*
4189   ol_cv_var_des_debug=yes
4190 else
4191   echo "configure: failed program was:" >&5
4192   cat conftest.$ac_ext >&5
4193   rm -rf conftest*
4194   ol_cv_var_des_debug=no
4195 fi
4196 rm -f conftest*
4197                                                                 LIBS="$save_LIBS"
4198                         
4199 fi
4200
4201 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4202
4203                         if test $ol_cv_var_des_debug = yes ; then
4204                                 cat >> confdefs.h <<\EOF
4205 #define HAVE_DES_DEBUG 1
4206 EOF
4207
4208                         fi
4209
4210                         LIBS="$save_LIBS"
4211                 fi
4212         fi
4213 fi
4214
4215 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4216         for ac_hdr in krb.h des.h
4217 do
4218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4220 echo "configure:4221: checking for $ac_hdr" >&5
4221 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <$ac_hdr>
4228 EOF
4229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4230 { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4232 if test -z "$ac_err"; then
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=yes"
4235 else
4236   echo "$ac_err" >&5
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   eval "ac_cv_header_$ac_safe=no"
4241 fi
4242 rm -f conftest*
4243 fi
4244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4247   cat >> confdefs.h <<EOF
4248 #define $ac_tr_hdr 1
4249 EOF
4250  
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254 done
4255
4256
4257         if test $ac_cv_header_krb_h = yes ; then
4258                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4259 echo "configure:4260: checking for main in -lkrb" >&5
4260 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   ac_save_LIBS="$LIBS"
4265 LIBS="-lkrb -ldes $LIBS"
4266 cat > conftest.$ac_ext <<EOF
4267 #line 4268 "configure"
4268 #include "confdefs.h"
4269
4270 int main() {
4271 main()
4272 ; return 0; }
4273 EOF
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4275   rm -rf conftest*
4276   eval "ac_cv_lib_$ac_lib_var=yes"
4277 else
4278   echo "configure: failed program was:" >&5
4279   cat conftest.$ac_ext >&5
4280   rm -rf conftest*
4281   eval "ac_cv_lib_$ac_lib_var=no"
4282 fi
4283 rm -f conftest*
4284 LIBS="$ac_save_LIBS"
4285
4286 fi
4287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4288   echo "$ac_t""yes" 1>&6
4289   have_k4=yes
4290 else
4291   echo "$ac_t""no" 1>&6
4292 have_k4=no
4293 fi
4294
4295
4296                 if test $have_k4 = yes ; then
4297                         ol_with_kerberos=found
4298                         ol_link_kerberos=yes
4299
4300                         KRB_LIBS="-lkrb -ldes"
4301                 fi
4302         fi
4303 fi
4304
4305 if test $ol_link_kerberos = yes ; then
4306         cat >> confdefs.h <<\EOF
4307 #define HAVE_KERBEROS 1
4308 EOF
4309
4310 fi
4311
4312 ol_link_tls=no
4313 if test $ol_with_tls != no ; then
4314         
4315         for ac_hdr in ssl.h
4316 do
4317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4318 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4319 echo "configure:4320: checking for $ac_hdr" >&5
4320 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <$ac_hdr>
4327 EOF
4328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4329 { (eval echo configure:4330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4331 if test -z "$ac_err"; then
4332   rm -rf conftest*
4333   eval "ac_cv_header_$ac_safe=yes"
4334 else
4335   echo "$ac_err" >&5
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   eval "ac_cv_header_$ac_safe=no"
4340 fi
4341 rm -f conftest*
4342 fi
4343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4344   echo "$ac_t""yes" 1>&6
4345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4346   cat >> confdefs.h <<EOF
4347 #define $ac_tr_hdr 1
4348 EOF
4349  
4350 else
4351   echo "$ac_t""no" 1>&6
4352 fi
4353 done
4354
4355         
4356         if test $ac_cv_header_ssl_h = yes ; then
4357                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4358 echo "configure:4359: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4359 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   ac_save_LIBS="$LIBS"
4364 LIBS="-lssl -lcrypto $LIBS"
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 /* Override any gcc2 internal prototype to avoid an error.  */
4369 /* We use char because int might match the return type of a gcc2
4370     builtin and then its argument prototype would still apply.  */
4371 char SSLeay_add_ssl_algorithms();
4372
4373 int main() {
4374 SSLeay_add_ssl_algorithms()
4375 ; return 0; }
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4378   rm -rf conftest*
4379   eval "ac_cv_lib_$ac_lib_var=yes"
4380 else
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -rf conftest*
4384   eval "ac_cv_lib_$ac_lib_var=no"
4385 fi
4386 rm -f conftest*
4387 LIBS="$ac_save_LIBS"
4388
4389 fi
4390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4391   echo "$ac_t""yes" 1>&6
4392   have_ssleay=yes
4393                         need_rsaref=no
4394 else
4395   echo "$ac_t""no" 1>&6
4396 have_ssleay=no
4397 fi
4398
4399                         
4400                 if test $have_ssleay = no ; then
4401                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4402 echo "configure:4403: checking for ssl3_accept in -lssl" >&5
4403 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   ac_save_LIBS="$LIBS"
4408 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 /* Override any gcc2 internal prototype to avoid an error.  */
4413 /* We use char because int might match the return type of a gcc2
4414     builtin and then its argument prototype would still apply.  */
4415 char ssl3_accept();
4416
4417 int main() {
4418 ssl3_accept()
4419 ; return 0; }
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4422   rm -rf conftest*
4423   eval "ac_cv_lib_$ac_lib_var=yes"
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -rf conftest*
4428   eval "ac_cv_lib_$ac_lib_var=no"
4429 fi
4430 rm -f conftest*
4431 LIBS="$ac_save_LIBS"
4432
4433 fi
4434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4435   echo "$ac_t""yes" 1>&6
4436   have_ssleay=yes
4437                                 need_rsaref=yes
4438 else
4439   echo "$ac_t""no" 1>&6
4440 have_ssleay=no
4441 fi
4442
4443                 fi
4444
4445                 if test $have_ssleay = yes ; then
4446                         ol_with_tls=found
4447                         ol_link_tls=yes
4448
4449                         cat >> confdefs.h <<\EOF
4450 #define HAVE_SSLEAY 1
4451 EOF
4452
4453
4454                         if test $need_rsaref = yes; then
4455                                 cat >> confdefs.h <<\EOF
4456 #define HAVE_RSAREF 1
4457 EOF
4458
4459
4460                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4461                         else
4462                                 TLS_LIBS="-lssl -lcrypto"
4463                         fi
4464                 fi
4465         fi
4466 fi
4467
4468 if test $ol_link_tls = yes ; then
4469         cat >> confdefs.h <<\EOF
4470 #define HAVE_TLS 1
4471 EOF
4472
4473 fi      
4474
4475 for ac_func in \
4476         ctime_r                 \
4477         gethostbyname_r gethostbyaddr_r \
4478
4479 do
4480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4481 echo "configure:4482: checking for $ac_func" >&5
4482 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 /* System header to define __stub macros and hopefully few prototypes,
4489     which can conflict with char $ac_func(); below.  */
4490 #include <assert.h>
4491 /* Override any gcc2 internal prototype to avoid an error.  */
4492 /* We use char because int might match the return type of a gcc2
4493     builtin and then its argument prototype would still apply.  */
4494 char $ac_func();
4495
4496 int main() {
4497
4498 /* The GNU C library defines this for functions which it implements
4499     to always fail with ENOSYS.  Some functions are actually named
4500     something starting with __ and the normal name is an alias.  */
4501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4502 choke me
4503 #else
4504 $ac_func();
4505 #endif
4506
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   eval "ac_cv_func_$ac_func=yes"
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_func_$ac_func=no"
4517 fi
4518 rm -f conftest*
4519 fi
4520
4521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4522   echo "$ac_t""yes" 1>&6
4523     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4524   cat >> confdefs.h <<EOF
4525 #define $ac_tr_func 1
4526 EOF
4527  
4528 else
4529   echo "$ac_t""no" 1>&6
4530 fi
4531 done
4532
4533
4534 if test "$ac_cv_func_ctime_r" = no ; then
4535         ol_cv_func_ctime_r_nargs=0
4536 else
4537         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4538 echo "configure:4539: checking number of arguments of ctime_r" >&5
4539 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   cat > conftest.$ac_ext <<EOF
4543 #line 4544 "configure"
4544 #include "confdefs.h"
4545 #include <time.h>
4546 int main() {
4547 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4551   rm -rf conftest*
4552   ol_cv_func_ctime_r_nargs=3
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 #include <time.h>
4561 int main() {
4562 time_t ti; char *buffer; ctime_r(&ti,buffer);
4563 ; return 0; }
4564 EOF
4565 if { (eval echo configure:4566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4566   rm -rf conftest*
4567   ol_cv_func_ctime_r_nargs=2
4568 else
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   ol_cv_func_ctime_r_nargs=0
4573 fi
4574 rm -f conftest*
4575 fi
4576 rm -f conftest*
4577 fi
4578
4579 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4580   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4581     cat >> confdefs.h <<EOF
4582 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4583 EOF
4584
4585   fi
4586
4587 fi
4588
4589 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4590         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4591 echo "configure:4592: checking number of arguments of gethostbyname_r" >&5
4592 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4593   echo $ac_n "(cached) $ac_c" 1>&6
4594 else
4595   cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <sys/types.h>
4599 #include <sys/socket.h>
4600 #include <netinet/in.h>
4601 #include <netdb.h>
4602 #define BUFSIZE (sizeof(struct hostent)+10)
4603 int main() {
4604 struct hostent hent; char buffer[BUFSIZE];
4605                 int bufsize=BUFSIZE;int h_errno;
4606                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4607                         buffer, bufsize, &h_errno);
4608 ; return 0; }
4609 EOF
4610 if { (eval echo configure:4611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4611   rm -rf conftest*
4612   ol_cv_func_gethostbyname_r_nargs=5
4613 else
4614   echo "configure: failed program was:" >&5
4615   cat conftest.$ac_ext >&5
4616   rm -rf conftest*
4617   cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <sys/types.h>
4621 #include <sys/socket.h>
4622 #include <netinet/in.h>
4623 #include <netdb.h>
4624 #define BUFSIZE (sizeof(struct hostent)+10)
4625 int main() {
4626 struct hostent hent;struct hostent *rhent;
4627                         char buffer[BUFSIZE];
4628                         int bufsize=BUFSIZE;int h_errno;
4629                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4630                                 &rhent, &h_errno);
4631 ; return 0; }
4632 EOF
4633 if { (eval echo configure:4634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4634   rm -rf conftest*
4635   ol_cv_func_gethostbyname_r_nargs=6
4636 else
4637   echo "configure: failed program was:" >&5
4638   cat conftest.$ac_ext >&5
4639   rm -rf conftest*
4640   ol_cv_func_gethostbyname_r_nargs=0
4641 fi
4642 rm -f conftest*
4643 fi
4644 rm -f conftest*
4645 fi
4646
4647 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4648   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4649         cat >> confdefs.h <<EOF
4650 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4651 EOF
4652
4653   fi
4654
4655 else
4656         ol_cv_func_gethostbyname_r_nargs=0
4657 fi
4658  
4659 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4660         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4661 echo "configure:4662: checking number of arguments of gethostbyaddr_r" >&5
4662 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   cat > conftest.$ac_ext <<EOF
4666 #line 4667 "configure"
4667 #include "confdefs.h"
4668 #include <sys/types.h>
4669 #include <sys/socket.h>
4670 #include <netinet/in.h>
4671 #include <netdb.h>
4672 #define BUFSIZE (sizeof(struct hostent)+10)
4673 int main() {
4674 struct hostent hent; char buffer[BUFSIZE]; 
4675             struct in_addr add;
4676             size_t alen=sizeof(struct in_addr);
4677             int bufsize=BUFSIZE;int h_errno;
4678                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4679                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4680 ; return 0; }
4681 EOF
4682 if { (eval echo configure:4683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4683   rm -rf conftest*
4684   ol_cv_func_gethostbyaddr_r_nargs=7
4685 else
4686   echo "configure: failed program was:" >&5
4687   cat conftest.$ac_ext >&5
4688   rm -rf conftest*
4689   cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 #include <sys/types.h>
4693 #include <sys/socket.h>
4694 #include <netinet/in.h>
4695 #include <netdb.h>
4696 #define BUFSIZE (sizeof(struct hostent)+10)
4697 int main() {
4698 struct hostent hent;
4699                         struct hostent *rhent; char buffer[BUFSIZE]; 
4700                         struct in_addr add;
4701                         size_t alen=sizeof(struct in_addr);
4702                         int bufsize=BUFSIZE;int h_errno;
4703                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4704                                 alen, AF_INET, &hent, buffer, bufsize, 
4705                                 &rhent, &h_errno);
4706 ; return 0; }
4707 EOF
4708 if { (eval echo configure:4709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4709   rm -rf conftest*
4710   ol_cv_func_gethostbyaddr_r_nargs=8
4711 else
4712   echo "configure: failed program was:" >&5
4713   cat conftest.$ac_ext >&5
4714   rm -rf conftest*
4715   ol_cv_func_gethostbyaddr_r_nargs=0
4716 fi
4717 rm -f conftest*
4718 fi
4719 rm -f conftest*
4720 fi
4721
4722 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4723   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4724     cat >> confdefs.h <<EOF
4725 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4726 EOF
4727
4728   fi
4729
4730 else
4731         ol_cv_func_gethostbyaddr_r_nargs=0
4732 fi
4733
4734 if test "$ac_cv_func_ctime_r" = yes \
4735         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4736         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4737         -a "$ac_cv_func_gethostbyname_r" = yes \
4738         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4739         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4740         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4741         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4742         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4743         ; then
4744  
4745         cat >> confdefs.h <<\EOF
4746 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4747 EOF
4748
4749 fi
4750
4751 ol_link_threads=no
4752 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4753         -o $ol_with_threads = posix ; then
4754
4755         for ac_hdr in pthread.h sched.h
4756 do
4757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4759 echo "configure:4760: checking for $ac_hdr" >&5
4760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 #include <$ac_hdr>
4767 EOF
4768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4769 { (eval echo configure:4770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4771 if test -z "$ac_err"; then
4772   rm -rf conftest*
4773   eval "ac_cv_header_$ac_safe=yes"
4774 else
4775   echo "$ac_err" >&5
4776   echo "configure: failed program was:" >&5
4777   cat conftest.$ac_ext >&5
4778   rm -rf conftest*
4779   eval "ac_cv_header_$ac_safe=no"
4780 fi
4781 rm -f conftest*
4782 fi
4783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4786   cat >> confdefs.h <<EOF
4787 #define $ac_tr_hdr 1
4788 EOF
4789  
4790 else
4791   echo "$ac_t""no" 1>&6
4792 fi
4793 done
4794
4795
4796         if test $ac_cv_header_pthread_h = yes ; then
4797                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4798 echo "configure:4799: checking POSIX thread version" >&5
4799 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   
4803         cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806
4807 #               include <pthread.h>
4808                 /* this check could be improved */
4809 #               ifdef PTHREAD_ONCE_INIT
4810                         pthread_version_final
4811 #               endif
4812         
4813 EOF
4814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4815   egrep "pthread_version_final" >/dev/null 2>&1; then
4816   rm -rf conftest*
4817   ol_pthread_final=yes
4818 else
4819   rm -rf conftest*
4820   ol_pthread_final=no
4821 fi
4822 rm -f conftest*
4823
4824
4825         cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828
4829 #               include <pthread.h>
4830                 /* this check could be improved */
4831 #               ifdef pthread_once_init
4832                         pthread_version_draft4
4833 #               endif
4834         
4835 EOF
4836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4837   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4838   rm -rf conftest*
4839   ol_pthread_draft4=yes
4840 else
4841   rm -rf conftest*
4842   ol_pthread_draft4=no
4843 fi
4844 rm -f conftest*
4845
4846
4847         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4848                 ol_cv_pthread_version=final
4849         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4850                 ol_cv_pthread_version=draft4
4851         else
4852                 ol_cv_pthread_version=unknown
4853         fi
4854
4855 fi
4856
4857 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4858
4859
4860                 if test $ol_cv_pthread_version = final ; then
4861                         cat >> confdefs.h <<\EOF
4862 #define HAVE_PTHREADS_FINAL 1
4863 EOF
4864
4865                 elif test $ol_cv_pthread_version = draft4 ; then
4866                         cat >> confdefs.h <<\EOF
4867 #define HAVE_PTHREADS_D4 1
4868 EOF
4869
4870                 else
4871                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4872                 fi
4873
4874                 # consider threads found
4875                 ol_with_threads=found
4876
4877                 
4878         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
4879 echo "configure:4880: checking for LinuxThreads pthread.h" >&5
4880 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
4881   echo $ac_n "(cached) $ac_c" 1>&6
4882 else
4883   cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886 #include <pthread.h>
4887 EOF
4888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4889   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
4890   rm -rf conftest*
4891   ol_cv_header_linux_threads=yes
4892 else
4893   rm -rf conftest*
4894   ol_cv_header_linux_threads=no
4895 fi
4896 rm -f conftest*
4897
4898                 
4899 fi
4900
4901 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
4902         if test $ol_cv_header_linux_threads = yes; then
4903                 cat >> confdefs.h <<\EOF
4904 #define HAVE_LINUX_THREADS 1
4905 EOF
4906
4907         fi
4908
4909
4910                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4911                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4912 echo "configure:4913: checking for pthread_create in default libraries" >&5
4913                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   
4917                 if test "$cross_compiling" = yes; then
4918                         ol_cv_pthread_create=yes
4919 else
4920   cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4923
4924 #include <pthread.h>
4925 #ifndef NULL
4926 #define NULL (void*)0
4927 #endif
4928
4929 static void *task(p)
4930         void *p;
4931 {
4932         return (void *) (p == NULL);
4933 }
4934
4935 int main(argc, argv)
4936         int argc;
4937         char **argv;
4938 {
4939         pthread_t t;
4940         int status;
4941
4942         /* make sure pthread_create() isn't just a stub */
4943 #if HAVE_PTHREADS_D4
4944         status = pthread_create(&t, pthread_attr_default, task, NULL);
4945 #else
4946         status = pthread_create(&t, NULL, task, NULL);
4947 #endif
4948
4949         if( status ) return status;
4950
4951         /* make sure pthread_detach() isn't just a stub */
4952 #if HAVE_PTHREADS_D4
4953         status = pthread_detach( &t );
4954 #else
4955         status = pthread_detach( t );
4956 #endif
4957
4958         if( status ) return status;
4959
4960         return status;
4961 }
4962
4963 EOF
4964 if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4965 then
4966   ol_cv_pthread_create=yes
4967 else
4968   echo "configure: failed program was:" >&5
4969   cat conftest.$ac_ext >&5
4970   rm -fr conftest*
4971   ol_cv_pthread_create=no
4972 fi
4973 rm -fr conftest*
4974 fi
4975
4976 fi
4977
4978                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4979
4980                 if test $ol_cv_pthread_create != no ; then
4981                         ol_link_threads=posix
4982                         ol_link_pthreads=""
4983                 fi
4984                 
4985                 # Pthread try link: -mt (ol_cv_pthread_mt)
4986         if test "$ol_link_threads" = no ; then
4987                 # try -mt
4988                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
4989 echo "configure:4990: checking for pthread link with -mt" >&5
4990 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
4991   echo $ac_n "(cached) $ac_c" 1>&6
4992 else
4993   
4994                         # save the flags
4995                         ol_LIBS="$LIBS"
4996                         LIBS="-mt $LIBS"
4997
4998                         cat > conftest.$ac_ext <<EOF
4999 #line 5000 "configure"
5000 #include "confdefs.h"
5001
5002 #include <pthread.h>
5003 #ifndef NULL
5004 #define NULL (void*)0
5005 #endif
5006
5007 int main() {
5008
5009         pthread_t t;
5010
5011 #if HAVE_PTHREADS_D4
5012         pthread_create(&t, pthread_attr_default, NULL, NULL);
5013         pthread_detach( &t );
5014 #else
5015         pthread_create(&t, NULL, NULL, NULL);
5016         pthread_detach( t );
5017 #endif
5018 #ifdef HAVE_LINUX_THREADS
5019         pthread_kill_other_threads_np();
5020 #endif
5021
5022 ; return 0; }
5023 EOF
5024 if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5025   rm -rf conftest*
5026   ol_cv_pthread_mt=yes
5027 else
5028   echo "configure: failed program was:" >&5
5029   cat conftest.$ac_ext >&5
5030   rm -rf conftest*
5031   ol_cv_pthread_mt=no
5032 fi
5033 rm -f conftest*
5034
5035                 # restore the LIBS
5036                 LIBS="$ol_LIBS"
5037                 
5038 fi
5039
5040 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5041
5042                 if test $ol_cv_pthread_mt = yes ; then
5043                         ol_link_pthreads="-mt"
5044                         ol_link_threads=posix
5045                 fi
5046         fi
5047
5048                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5049         if test "$ol_link_threads" = no ; then
5050                 # try -kthread
5051                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5052 echo "configure:5053: checking for pthread link with -kthread" >&5
5053 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
5054   echo $ac_n "(cached) $ac_c" 1>&6
5055 else
5056   
5057                         # save the flags
5058                         ol_LIBS="$LIBS"
5059                         LIBS="-kthread $LIBS"
5060
5061                         cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064
5065 #include <pthread.h>
5066 #ifndef NULL
5067 #define NULL (void*)0
5068 #endif
5069
5070 int main() {
5071
5072         pthread_t t;
5073
5074 #if HAVE_PTHREADS_D4
5075         pthread_create(&t, pthread_attr_default, NULL, NULL);
5076         pthread_detach( &t );
5077 #else
5078         pthread_create(&t, NULL, NULL, NULL);
5079         pthread_detach( t );
5080 #endif
5081 #ifdef HAVE_LINUX_THREADS
5082         pthread_kill_other_threads_np();
5083 #endif
5084
5085 ; return 0; }
5086 EOF
5087 if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5088   rm -rf conftest*
5089   ol_cv_pthread_kthread=yes
5090 else
5091   echo "configure: failed program was:" >&5
5092   cat conftest.$ac_ext >&5
5093   rm -rf conftest*
5094   ol_cv_pthread_kthread=no
5095 fi
5096 rm -f conftest*
5097
5098                 # restore the LIBS
5099                 LIBS="$ol_LIBS"
5100                 
5101 fi
5102
5103 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5104
5105                 if test $ol_cv_pthread_kthread = yes ; then
5106                         ol_link_pthreads="-kthread"
5107                         ol_link_threads=posix
5108                 fi
5109         fi
5110
5111                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5112         if test "$ol_link_threads" = no ; then
5113                 # try -pthread
5114                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5115 echo "configure:5116: checking for pthread link with -pthread" >&5
5116 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119   
5120                         # save the flags
5121                         ol_LIBS="$LIBS"
5122                         LIBS="-pthread $LIBS"
5123
5124                         cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127
5128 #include <pthread.h>
5129 #ifndef NULL
5130 #define NULL (void*)0
5131 #endif
5132
5133 int main() {
5134
5135         pthread_t t;
5136
5137 #if HAVE_PTHREADS_D4
5138         pthread_create(&t, pthread_attr_default, NULL, NULL);
5139         pthread_detach( &t );
5140 #else
5141         pthread_create(&t, NULL, NULL, NULL);
5142         pthread_detach( t );
5143 #endif
5144 #ifdef HAVE_LINUX_THREADS
5145         pthread_kill_other_threads_np();
5146 #endif
5147
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   ol_cv_pthread_pthread=yes
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157   ol_cv_pthread_pthread=no
5158 fi
5159 rm -f conftest*
5160
5161                 # restore the LIBS
5162                 LIBS="$ol_LIBS"
5163                 
5164 fi
5165
5166 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5167
5168                 if test $ol_cv_pthread_pthread = yes ; then
5169                         ol_link_pthreads="-pthread"
5170                         ol_link_threads=posix
5171                 fi
5172         fi
5173
5174                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5175         if test "$ol_link_threads" = no ; then
5176                 # try -pthreads
5177                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5178 echo "configure:5179: checking for pthread link with -pthreads" >&5
5179 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5180   echo $ac_n "(cached) $ac_c" 1>&6
5181 else
5182   
5183                         # save the flags
5184                         ol_LIBS="$LIBS"
5185                         LIBS="-pthreads $LIBS"
5186
5187                         cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190
5191 #include <pthread.h>
5192 #ifndef NULL
5193 #define NULL (void*)0
5194 #endif
5195
5196 int main() {
5197
5198         pthread_t t;
5199
5200 #if HAVE_PTHREADS_D4
5201         pthread_create(&t, pthread_attr_default, NULL, NULL);
5202         pthread_detach( &t );
5203 #else
5204         pthread_create(&t, NULL, NULL, NULL);
5205         pthread_detach( t );
5206 #endif
5207 #ifdef HAVE_LINUX_THREADS
5208         pthread_kill_other_threads_np();
5209 #endif
5210
5211 ; return 0; }
5212 EOF
5213 if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5214   rm -rf conftest*
5215   ol_cv_pthread_pthreads=yes
5216 else
5217   echo "configure: failed program was:" >&5
5218   cat conftest.$ac_ext >&5
5219   rm -rf conftest*
5220   ol_cv_pthread_pthreads=no
5221 fi
5222 rm -f conftest*
5223
5224                 # restore the LIBS
5225                 LIBS="$ol_LIBS"
5226                 
5227 fi
5228
5229 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5230
5231                 if test $ol_cv_pthread_pthreads = yes ; then
5232                         ol_link_pthreads="-pthreads"
5233                         ol_link_threads=posix
5234                 fi
5235         fi
5236
5237                 # Pthread try link: -thread (ol_cv_pthread_thread)
5238         if test "$ol_link_threads" = no ; then
5239                 # try -thread
5240                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5241 echo "configure:5242: checking for pthread link with -thread" >&5
5242 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5243   echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245   
5246                         # save the flags
5247                         ol_LIBS="$LIBS"
5248                         LIBS="-thread $LIBS"
5249
5250                         cat > conftest.$ac_ext <<EOF
5251 #line 5252 "configure"
5252 #include "confdefs.h"
5253
5254 #include <pthread.h>
5255 #ifndef NULL
5256 #define NULL (void*)0
5257 #endif
5258
5259 int main() {
5260
5261         pthread_t t;
5262
5263 #if HAVE_PTHREADS_D4
5264         pthread_create(&t, pthread_attr_default, NULL, NULL);
5265         pthread_detach( &t );
5266 #else
5267         pthread_create(&t, NULL, NULL, NULL);
5268         pthread_detach( t );
5269 #endif
5270 #ifdef HAVE_LINUX_THREADS
5271         pthread_kill_other_threads_np();
5272 #endif
5273
5274 ; return 0; }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5277   rm -rf conftest*
5278   ol_cv_pthread_thread=yes
5279 else
5280   echo "configure: failed program was:" >&5
5281   cat conftest.$ac_ext >&5
5282   rm -rf conftest*
5283   ol_cv_pthread_thread=no
5284 fi
5285 rm -f conftest*
5286
5287                 # restore the LIBS
5288                 LIBS="$ol_LIBS"
5289                 
5290 fi
5291
5292 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5293
5294                 if test $ol_cv_pthread_thread = yes ; then
5295                         ol_link_pthreads="-thread"
5296                         ol_link_threads=posix
5297                 fi
5298         fi
5299
5300
5301                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5302         if test "$ol_link_threads" = no ; then
5303                 # try -lpthread -lmach -lexc -lc_r
5304                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5305 echo "configure:5306: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5306 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5307   echo $ac_n "(cached) $ac_c" 1>&6
5308 else
5309   
5310                         # save the flags
5311                         ol_LIBS="$LIBS"
5312                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5313
5314                         cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5317
5318 #include <pthread.h>
5319 #ifndef NULL
5320 #define NULL (void*)0
5321 #endif
5322
5323 int main() {
5324
5325         pthread_t t;
5326
5327 #if HAVE_PTHREADS_D4
5328         pthread_create(&t, pthread_attr_default, NULL, NULL);
5329         pthread_detach( &t );
5330 #else
5331         pthread_create(&t, NULL, NULL, NULL);
5332         pthread_detach( t );
5333 #endif
5334 #ifdef HAVE_LINUX_THREADS
5335         pthread_kill_other_threads_np();
5336 #endif
5337
5338 ; return 0; }
5339 EOF
5340 if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5341   rm -rf conftest*
5342   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5343 else
5344   echo "configure: failed program was:" >&5
5345   cat conftest.$ac_ext >&5
5346   rm -rf conftest*
5347   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5348 fi
5349 rm -f conftest*
5350
5351                 # restore the LIBS
5352                 LIBS="$ol_LIBS"
5353                 
5354 fi
5355
5356 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5357
5358                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5359                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5360                         ol_link_threads=posix
5361                 fi
5362         fi
5363
5364                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5365         if test "$ol_link_threads" = no ; then
5366                 # try -lpthread -lmach -lexc
5367                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5368 echo "configure:5369: checking for pthread link with -lpthread -lmach -lexc" >&5
5369 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   
5373                         # save the flags
5374                         ol_LIBS="$LIBS"
5375                         LIBS="-lpthread -lmach -lexc $LIBS"
5376
5377                         cat > conftest.$ac_ext <<EOF
5378 #line 5379 "configure"
5379 #include "confdefs.h"
5380
5381 #include <pthread.h>
5382 #ifndef NULL
5383 #define NULL (void*)0
5384 #endif
5385
5386 int main() {
5387
5388         pthread_t t;
5389
5390 #if HAVE_PTHREADS_D4
5391         pthread_create(&t, pthread_attr_default, NULL, NULL);
5392         pthread_detach( &t );
5393 #else
5394         pthread_create(&t, NULL, NULL, NULL);
5395         pthread_detach( t );
5396 #endif
5397 #ifdef HAVE_LINUX_THREADS
5398         pthread_kill_other_threads_np();
5399 #endif
5400
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   ol_cv_pthread_lpthread_lmach_lexc=yes
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   ol_cv_pthread_lpthread_lmach_lexc=no
5411 fi
5412 rm -f conftest*
5413
5414                 # restore the LIBS
5415                 LIBS="$ol_LIBS"
5416                 
5417 fi
5418
5419 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5420
5421                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5422                         ol_link_pthreads="-lpthread -lmach -lexc"
5423                         ol_link_threads=posix
5424                 fi
5425         fi
5426
5427
5428                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5429         if test "$ol_link_threads" = no ; then
5430                 # try -lpthread -Wl,-woff,85
5431                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5432 echo "configure:5433: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5433 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   
5437                         # save the flags
5438                         ol_LIBS="$LIBS"
5439                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5440
5441                         cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 #include <pthread.h>
5446 #ifndef NULL
5447 #define NULL (void*)0
5448 #endif
5449
5450 int main() {
5451
5452         pthread_t t;
5453
5454 #if HAVE_PTHREADS_D4
5455         pthread_create(&t, pthread_attr_default, NULL, NULL);
5456         pthread_detach( &t );
5457 #else
5458         pthread_create(&t, NULL, NULL, NULL);
5459         pthread_detach( t );
5460 #endif
5461 #ifdef HAVE_LINUX_THREADS
5462         pthread_kill_other_threads_np();
5463 #endif
5464
5465 ; return 0; }
5466 EOF
5467 if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5468   rm -rf conftest*
5469   ol_cv_pthread_lib_lpthread_woff=yes
5470 else
5471   echo "configure: failed program was:" >&5
5472   cat conftest.$ac_ext >&5
5473   rm -rf conftest*
5474   ol_cv_pthread_lib_lpthread_woff=no
5475 fi
5476 rm -f conftest*
5477
5478                 # restore the LIBS
5479                 LIBS="$ol_LIBS"
5480                 
5481 fi
5482
5483 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5484
5485                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5486                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5487                         ol_link_threads=posix
5488                 fi
5489         fi
5490
5491
5492                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5493         if test "$ol_link_threads" = no ; then
5494                 # try -lpthread
5495                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5496 echo "configure:5497: checking for pthread link with -lpthread" >&5
5497 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   
5501                         # save the flags
5502                         ol_LIBS="$LIBS"
5503                         LIBS="-lpthread $LIBS"
5504
5505                         cat > conftest.$ac_ext <<EOF
5506 #line 5507 "configure"
5507 #include "confdefs.h"
5508
5509 #include <pthread.h>
5510 #ifndef NULL
5511 #define NULL (void*)0
5512 #endif
5513
5514 int main() {
5515
5516         pthread_t t;
5517
5518 #if HAVE_PTHREADS_D4
5519         pthread_create(&t, pthread_attr_default, NULL, NULL);
5520         pthread_detach( &t );
5521 #else
5522         pthread_create(&t, NULL, NULL, NULL);
5523         pthread_detach( t );
5524 #endif
5525 #ifdef HAVE_LINUX_THREADS
5526         pthread_kill_other_threads_np();
5527 #endif
5528
5529 ; return 0; }
5530 EOF
5531 if { (eval echo configure:5532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5532   rm -rf conftest*
5533   ol_cv_pthread_lpthread=yes
5534 else
5535   echo "configure: failed program was:" >&5
5536   cat conftest.$ac_ext >&5
5537   rm -rf conftest*
5538   ol_cv_pthread_lpthread=no
5539 fi
5540 rm -f conftest*
5541
5542                 # restore the LIBS
5543                 LIBS="$ol_LIBS"
5544                 
5545 fi
5546
5547 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5548
5549                 if test $ol_cv_pthread_lpthread = yes ; then
5550                         ol_link_pthreads="-lpthread"
5551                         ol_link_threads=posix
5552                 fi
5553         fi
5554
5555                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5556         if test "$ol_link_threads" = no ; then
5557                 # try -lc_r
5558                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5559 echo "configure:5560: checking for pthread link with -lc_r" >&5
5560 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5561   echo $ac_n "(cached) $ac_c" 1>&6
5562 else
5563   
5564                         # save the flags
5565                         ol_LIBS="$LIBS"
5566                         LIBS="-lc_r $LIBS"
5567
5568                         cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571
5572 #include <pthread.h>
5573 #ifndef NULL
5574 #define NULL (void*)0
5575 #endif
5576
5577 int main() {
5578
5579         pthread_t t;
5580
5581 #if HAVE_PTHREADS_D4
5582         pthread_create(&t, pthread_attr_default, NULL, NULL);
5583         pthread_detach( &t );
5584 #else
5585         pthread_create(&t, NULL, NULL, NULL);
5586         pthread_detach( t );
5587 #endif
5588 #ifdef HAVE_LINUX_THREADS
5589         pthread_kill_other_threads_np();
5590 #endif
5591
5592 ; return 0; }
5593 EOF
5594 if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5595   rm -rf conftest*
5596   ol_cv_pthread_lc_r=yes
5597 else
5598   echo "configure: failed program was:" >&5
5599   cat conftest.$ac_ext >&5
5600   rm -rf conftest*
5601   ol_cv_pthread_lc_r=no
5602 fi
5603 rm -f conftest*
5604
5605                 # restore the LIBS
5606                 LIBS="$ol_LIBS"
5607                 
5608 fi
5609
5610 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5611
5612                 if test $ol_cv_pthread_lc_r = yes ; then
5613                         ol_link_pthreads="-lc_r"
5614                         ol_link_threads=posix
5615                 fi
5616         fi
5617
5618
5619                 # Pthread try link: -threads (ol_cv_pthread_threads)
5620         if test "$ol_link_threads" = no ; then
5621                 # try -threads
5622                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5623 echo "configure:5624: checking for pthread link with -threads" >&5
5624 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5625   echo $ac_n "(cached) $ac_c" 1>&6
5626 else
5627   
5628                         # save the flags
5629                         ol_LIBS="$LIBS"
5630                         LIBS="-threads $LIBS"
5631
5632                         cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635
5636 #include <pthread.h>
5637 #ifndef NULL
5638 #define NULL (void*)0
5639 #endif
5640
5641 int main() {
5642
5643         pthread_t t;
5644
5645 #if HAVE_PTHREADS_D4
5646         pthread_create(&t, pthread_attr_default, NULL, NULL);
5647         pthread_detach( &t );
5648 #else
5649         pthread_create(&t, NULL, NULL, NULL);
5650         pthread_detach( t );
5651 #endif
5652 #ifdef HAVE_LINUX_THREADS
5653         pthread_kill_other_threads_np();
5654 #endif
5655
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   ol_cv_pthread_threads=yes
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   ol_cv_pthread_threads=no
5666 fi
5667 rm -f conftest*
5668
5669                 # restore the LIBS
5670                 LIBS="$ol_LIBS"
5671                 
5672 fi
5673
5674 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5675
5676                 if test $ol_cv_pthread_threads = yes ; then
5677                         ol_link_pthreads="-threads"
5678                         ol_link_threads=posix
5679                 fi
5680         fi
5681
5682
5683                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5684         if test "$ol_link_threads" = no ; then
5685                 # try -lpthreads -lmach -lexc -lc_r
5686                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5687 echo "configure:5688: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5688 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5689   echo $ac_n "(cached) $ac_c" 1>&6
5690 else
5691   
5692                         # save the flags
5693                         ol_LIBS="$LIBS"
5694                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5695
5696                         cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699
5700 #include <pthread.h>
5701 #ifndef NULL
5702 #define NULL (void*)0
5703 #endif
5704
5705 int main() {
5706
5707         pthread_t t;
5708
5709 #if HAVE_PTHREADS_D4
5710         pthread_create(&t, pthread_attr_default, NULL, NULL);
5711         pthread_detach( &t );
5712 #else
5713         pthread_create(&t, NULL, NULL, NULL);
5714         pthread_detach( t );
5715 #endif
5716 #ifdef HAVE_LINUX_THREADS
5717         pthread_kill_other_threads_np();
5718 #endif
5719
5720 ; return 0; }
5721 EOF
5722 if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5723   rm -rf conftest*
5724   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5725 else
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5730 fi
5731 rm -f conftest*
5732
5733                 # restore the LIBS
5734                 LIBS="$ol_LIBS"
5735                 
5736 fi
5737
5738 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5739
5740                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5741                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5742                         ol_link_threads=posix
5743                 fi
5744         fi
5745
5746                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5747         if test "$ol_link_threads" = no ; then
5748                 # try -lpthreads -lmach -lexc
5749                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5750 echo "configure:5751: checking for pthread link with -lpthreads -lmach -lexc" >&5
5751 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5752   echo $ac_n "(cached) $ac_c" 1>&6
5753 else
5754   
5755                         # save the flags
5756                         ol_LIBS="$LIBS"
5757                         LIBS="-lpthreads -lmach -lexc $LIBS"
5758
5759                         cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762
5763 #include <pthread.h>
5764 #ifndef NULL
5765 #define NULL (void*)0
5766 #endif
5767
5768 int main() {
5769
5770         pthread_t t;
5771
5772 #if HAVE_PTHREADS_D4
5773         pthread_create(&t, pthread_attr_default, NULL, NULL);
5774         pthread_detach( &t );
5775 #else
5776         pthread_create(&t, NULL, NULL, NULL);
5777         pthread_detach( t );
5778 #endif
5779 #ifdef HAVE_LINUX_THREADS
5780         pthread_kill_other_threads_np();
5781 #endif
5782
5783 ; return 0; }
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5786   rm -rf conftest*
5787   ol_cv_pthread_lpthreads_lmach_lexc=yes
5788 else
5789   echo "configure: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   rm -rf conftest*
5792   ol_cv_pthread_lpthreads_lmach_lexc=no
5793 fi
5794 rm -f conftest*
5795
5796                 # restore the LIBS
5797                 LIBS="$ol_LIBS"
5798                 
5799 fi
5800
5801 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
5802
5803                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
5804                         ol_link_pthreads="-lpthreads -lmach -lexc"
5805                         ol_link_threads=posix
5806                 fi
5807         fi
5808
5809                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
5810         if test "$ol_link_threads" = no ; then
5811                 # try -lpthreads -lexc
5812                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
5813 echo "configure:5814: checking for pthread link with -lpthreads -lexc" >&5
5814 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
5815   echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5817   
5818                         # save the flags
5819                         ol_LIBS="$LIBS"
5820                         LIBS="-lpthreads -lexc $LIBS"
5821
5822                         cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825
5826 #include <pthread.h>
5827 #ifndef NULL
5828 #define NULL (void*)0
5829 #endif
5830
5831 int main() {
5832
5833         pthread_t t;
5834
5835 #if HAVE_PTHREADS_D4
5836         pthread_create(&t, pthread_attr_default, NULL, NULL);
5837         pthread_detach( &t );
5838 #else
5839         pthread_create(&t, NULL, NULL, NULL);
5840         pthread_detach( t );
5841 #endif
5842 #ifdef HAVE_LINUX_THREADS
5843         pthread_kill_other_threads_np();
5844 #endif
5845
5846 ; return 0; }
5847 EOF
5848 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849   rm -rf conftest*
5850   ol_cv_pthread_lpthreads_lexc=yes
5851 else
5852   echo "configure: failed program was:" >&5
5853   cat conftest.$ac_ext >&5
5854   rm -rf conftest*
5855   ol_cv_pthread_lpthreads_lexc=no
5856 fi
5857 rm -f conftest*
5858
5859                 # restore the LIBS
5860                 LIBS="$ol_LIBS"
5861                 
5862 fi
5863
5864 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
5865
5866                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
5867                         ol_link_pthreads="-lpthreads -lexc"
5868                         ol_link_threads=posix
5869                 fi
5870         fi
5871
5872
5873                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
5874         if test "$ol_link_threads" = no ; then
5875                 # try -lpthreads
5876                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
5877 echo "configure:5878: checking for pthread link with -lpthreads" >&5
5878 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
5879   echo $ac_n "(cached) $ac_c" 1>&6
5880 else
5881   
5882                         # save the flags
5883                         ol_LIBS="$LIBS"
5884                         LIBS="-lpthreads $LIBS"
5885
5886                         cat > conftest.$ac_ext <<EOF
5887 #line 5888 "configure"
5888 #include "confdefs.h"
5889
5890 #include <pthread.h>
5891 #ifndef NULL
5892 #define NULL (void*)0
5893 #endif
5894
5895 int main() {
5896
5897         pthread_t t;
5898
5899 #if HAVE_PTHREADS_D4
5900         pthread_create(&t, pthread_attr_default, NULL, NULL);
5901         pthread_detach( &t );
5902 #else
5903         pthread_create(&t, NULL, NULL, NULL);
5904         pthread_detach( t );
5905 #endif
5906 #ifdef HAVE_LINUX_THREADS
5907         pthread_kill_other_threads_np();
5908 #endif
5909
5910 ; return 0; }
5911 EOF
5912 if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5913   rm -rf conftest*
5914   ol_cv_pthread_lib_lpthreads=yes
5915 else
5916   echo "configure: failed program was:" >&5
5917   cat conftest.$ac_ext >&5
5918   rm -rf conftest*
5919   ol_cv_pthread_lib_lpthreads=no
5920 fi
5921 rm -f conftest*
5922
5923                 # restore the LIBS
5924                 LIBS="$ol_LIBS"
5925                 
5926 fi
5927
5928 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
5929
5930                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
5931                         ol_link_pthreads="-lpthreads"
5932                         ol_link_threads=posix
5933                 fi
5934         fi
5935
5936
5937                 if test $ol_link_threads != no ; then
5938                         cat >> confdefs.h <<\EOF
5939 #define HAVE_PTHREADS 1
5940 EOF
5941
5942
5943                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
5944
5945                                                 save_CPPFLAGS="$CPPFLAGS"
5946                         save_LIBS="$LIBS"
5947                         LIBS="$LTHREAD_LIBS $LIBS"
5948
5949                                                                                                 for ac_func in sched_yield pthread_yield
5950 do
5951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5952 echo "configure:5953: checking for $ac_func" >&5
5953 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5954   echo $ac_n "(cached) $ac_c" 1>&6
5955 else
5956   cat > conftest.$ac_ext <<EOF
5957 #line 5958 "configure"
5958 #include "confdefs.h"
5959 /* System header to define __stub macros and hopefully few prototypes,
5960     which can conflict with char $ac_func(); below.  */
5961 #include <assert.h>
5962 /* Override any gcc2 internal prototype to avoid an error.  */
5963 /* We use char because int might match the return type of a gcc2
5964     builtin and then its argument prototype would still apply.  */
5965 char $ac_func();
5966
5967 int main() {
5968
5969 /* The GNU C library defines this for functions which it implements
5970     to always fail with ENOSYS.  Some functions are actually named
5971     something starting with __ and the normal name is an alias.  */
5972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5973 choke me
5974 #else
5975 $ac_func();
5976 #endif
5977
5978 ; return 0; }
5979 EOF
5980 if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5981   rm -rf conftest*
5982   eval "ac_cv_func_$ac_func=yes"
5983 else
5984   echo "configure: failed program was:" >&5
5985   cat conftest.$ac_ext >&5
5986   rm -rf conftest*
5987   eval "ac_cv_func_$ac_func=no"
5988 fi
5989 rm -f conftest*
5990 fi
5991
5992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5993   echo "$ac_t""yes" 1>&6
5994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5995   cat >> confdefs.h <<EOF
5996 #define $ac_tr_func 1
5997 EOF
5998  
5999 else
6000   echo "$ac_t""no" 1>&6
6001 fi
6002 done
6003
6004
6005                         if test $ac_cv_func_sched_yield = no -a \
6006                                 $ac_cv_func_pthread_yield = no ; then
6007                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6008 echo "configure:6009: checking for sched_yield in -lrt" >&5
6009 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
6010 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6011   echo $ac_n "(cached) $ac_c" 1>&6
6012 else
6013   ac_save_LIBS="$LIBS"
6014 LIBS="-lrt  $LIBS"
6015 cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018 /* Override any gcc2 internal prototype to avoid an error.  */
6019 /* We use char because int might match the return type of a gcc2
6020     builtin and then its argument prototype would still apply.  */
6021 char sched_yield();
6022
6023 int main() {
6024 sched_yield()
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6028   rm -rf conftest*
6029   eval "ac_cv_lib_$ac_lib_var=yes"
6030 else
6031   echo "configure: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   rm -rf conftest*
6034   eval "ac_cv_lib_$ac_lib_var=no"
6035 fi
6036 rm -f conftest*
6037 LIBS="$ac_save_LIBS"
6038
6039 fi
6040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6041   echo "$ac_t""yes" 1>&6
6042   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6043                                         cat >> confdefs.h <<\EOF
6044 #define HAVE_SCHED_YIELD 1
6045 EOF
6046
6047                                         ac_cv_func_sched_yield=yes
6048 else
6049   echo "$ac_t""no" 1>&6
6050 ac_cv_func_sched_yield=no
6051 fi
6052
6053                         fi
6054                         if test $ac_cv_func_sched_yield = no -a \
6055                                 $ac_cv_func_pthread_yield = no ; then
6056                                                                                                 for ac_func in thr_yield
6057 do
6058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6059 echo "configure:6060: checking for $ac_func" >&5
6060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   cat > conftest.$ac_ext <<EOF
6064 #line 6065 "configure"
6065 #include "confdefs.h"
6066 /* System header to define __stub macros and hopefully few prototypes,
6067     which can conflict with char $ac_func(); below.  */
6068 #include <assert.h>
6069 /* Override any gcc2 internal prototype to avoid an error.  */
6070 /* We use char because int might match the return type of a gcc2
6071     builtin and then its argument prototype would still apply.  */
6072 char $ac_func();
6073
6074 int main() {
6075
6076 /* The GNU C library defines this for functions which it implements
6077     to always fail with ENOSYS.  Some functions are actually named
6078     something starting with __ and the normal name is an alias.  */
6079 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6080 choke me
6081 #else
6082 $ac_func();
6083 #endif
6084
6085 ; return 0; }
6086 EOF
6087 if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6088   rm -rf conftest*
6089   eval "ac_cv_func_$ac_func=yes"
6090 else
6091   echo "configure: failed program was:" >&5
6092   cat conftest.$ac_ext >&5
6093   rm -rf conftest*
6094   eval "ac_cv_func_$ac_func=no"
6095 fi
6096 rm -f conftest*
6097 fi
6098
6099 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6100   echo "$ac_t""yes" 1>&6
6101     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6102   cat >> confdefs.h <<EOF
6103 #define $ac_tr_func 1
6104 EOF
6105  
6106 else
6107   echo "$ac_t""no" 1>&6
6108 fi
6109 done
6110
6111                         fi
6112                         if test $ac_cv_func_sched_yield = no -a \
6113                                 $ac_cv_func_pthread_yield = no -a \
6114                                 "$ac_cv_func_thr_yield" = no ; then
6115                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6116                         fi
6117
6118                                                 for ac_func in pthread_kill
6119 do
6120 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6121 echo "configure:6122: checking for $ac_func" >&5
6122 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6123   echo $ac_n "(cached) $ac_c" 1>&6
6124 else
6125   cat > conftest.$ac_ext <<EOF
6126 #line 6127 "configure"
6127 #include "confdefs.h"
6128 /* System header to define __stub macros and hopefully few prototypes,
6129     which can conflict with char $ac_func(); below.  */
6130 #include <assert.h>
6131 /* Override any gcc2 internal prototype to avoid an error.  */
6132 /* We use char because int might match the return type of a gcc2
6133     builtin and then its argument prototype would still apply.  */
6134 char $ac_func();
6135
6136 int main() {
6137
6138 /* The GNU C library defines this for functions which it implements
6139     to always fail with ENOSYS.  Some functions are actually named
6140     something starting with __ and the normal name is an alias.  */
6141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6142 choke me
6143 #else
6144 $ac_func();
6145 #endif
6146
6147 ; return 0; }
6148 EOF
6149 if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6150   rm -rf conftest*
6151   eval "ac_cv_func_$ac_func=yes"
6152 else
6153   echo "configure: failed program was:" >&5
6154   cat conftest.$ac_ext >&5
6155   rm -rf conftest*
6156   eval "ac_cv_func_$ac_func=no"
6157 fi
6158 rm -f conftest*
6159 fi
6160
6161 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6162   echo "$ac_t""yes" 1>&6
6163     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6164   cat >> confdefs.h <<EOF
6165 #define $ac_tr_func 1
6166 EOF
6167  
6168 else
6169   echo "$ac_t""no" 1>&6
6170 fi
6171 done
6172
6173
6174                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6175 echo "configure:6176: checking for pthread_detach with <pthread.h>" >&5
6176 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   
6180                                                                 cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183
6184 #include <pthread.h>
6185 #ifndef NULL
6186 #define NULL (void*)0
6187 #endif
6188
6189 int main() {
6190 pthread_detach(NULL);
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   ol_cv_func_pthread_detach=yes
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   ol_cv_func_pthread_detach=no
6201 fi
6202 rm -f conftest*
6203                         
6204 fi
6205
6206 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6207
6208                         if test $ol_cv_func_pthread_detach = no ; then
6209                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6210                         fi
6211
6212                         cat >> confdefs.h <<\EOF
6213 #define HAVE_PTHREAD_DETACH 1
6214 EOF
6215
6216
6217                                                 for ac_func in \
6218                                 pthread_setconcurrency \
6219                                 pthread_getconcurrency \
6220                                 thr_setconcurrency \
6221                                 thr_getconcurrency \
6222                         
6223 do
6224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6225 echo "configure:6226: checking for $ac_func" >&5
6226 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6227   echo $ac_n "(cached) $ac_c" 1>&6
6228 else
6229   cat > conftest.$ac_ext <<EOF
6230 #line 6231 "configure"
6231 #include "confdefs.h"
6232 /* System header to define __stub macros and hopefully few prototypes,
6233     which can conflict with char $ac_func(); below.  */
6234 #include <assert.h>
6235 /* Override any gcc2 internal prototype to avoid an error.  */
6236 /* We use char because int might match the return type of a gcc2
6237     builtin and then its argument prototype would still apply.  */
6238 char $ac_func();
6239
6240 int main() {
6241
6242 /* The GNU C library defines this for functions which it implements
6243     to always fail with ENOSYS.  Some functions are actually named
6244     something starting with __ and the normal name is an alias.  */
6245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6246 choke me
6247 #else
6248 $ac_func();
6249 #endif
6250
6251 ; return 0; }
6252 EOF
6253 if { (eval echo configure:6254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6254   rm -rf conftest*
6255   eval "ac_cv_func_$ac_func=yes"
6256 else
6257   echo "configure: failed program was:" >&5
6258   cat conftest.$ac_ext >&5
6259   rm -rf conftest*
6260   eval "ac_cv_func_$ac_func=no"
6261 fi
6262 rm -f conftest*
6263 fi
6264
6265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6266   echo "$ac_t""yes" 1>&6
6267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6268   cat >> confdefs.h <<EOF
6269 #define $ac_tr_func 1
6270 EOF
6271  
6272 else
6273   echo "$ac_t""no" 1>&6
6274 fi
6275 done
6276
6277
6278                         
6279         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6280 echo "configure:6281: checking for pthread_kill_other_threads_np" >&5
6281 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6282   echo $ac_n "(cached) $ac_c" 1>&6
6283 else
6284   cat > conftest.$ac_ext <<EOF
6285 #line 6286 "configure"
6286 #include "confdefs.h"
6287 /* System header to define __stub macros and hopefully few prototypes,
6288     which can conflict with char pthread_kill_other_threads_np(); below.  */
6289 #include <assert.h>
6290 /* Override any gcc2 internal prototype to avoid an error.  */
6291 /* We use char because int might match the return type of a gcc2
6292     builtin and then its argument prototype would still apply.  */
6293 char pthread_kill_other_threads_np();
6294
6295 int main() {
6296
6297 /* The GNU C library defines this for functions which it implements
6298     to always fail with ENOSYS.  Some functions are actually named
6299     something starting with __ and the normal name is an alias.  */
6300 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6301 choke me
6302 #else
6303 pthread_kill_other_threads_np();
6304 #endif
6305
6306 ; return 0; }
6307 EOF
6308 if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6309   rm -rf conftest*
6310   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6311 else
6312   echo "configure: failed program was:" >&5
6313   cat conftest.$ac_ext >&5
6314   rm -rf conftest*
6315   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6316 fi
6317 rm -f conftest*
6318 fi
6319
6320 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6321   echo "$ac_t""yes" 1>&6
6322   :
6323 else
6324   echo "$ac_t""no" 1>&6
6325 fi
6326
6327         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6328 echo "configure:6329: checking for LinuxThreads implementation" >&5
6329 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6330   echo $ac_n "(cached) $ac_c" 1>&6
6331 else
6332   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6333 fi
6334
6335 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6336
6337                         
6338         
6339         
6340         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6341 echo "configure:6342: checking for LinuxThreads consistency" >&5
6342 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6343   echo $ac_n "(cached) $ac_c" 1>&6
6344 else
6345   
6346                 if test $ol_cv_header_linux_threads = yes -a \
6347                         $ol_cv_sys_linux_threads = yes; then
6348                         ol_cv_linux_threads=yes
6349                 elif test $ol_cv_header_linux_threads = no -a \
6350                         $ol_cv_sys_linux_threads = no; then
6351                         ol_cv_linux_threads=no
6352                 else
6353                         ol_cv_linux_threads=error
6354                 fi
6355         
6356 fi
6357
6358 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6359
6360
6361                         if test $ol_cv_linux_threads = error; then
6362                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6363                         fi
6364
6365                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6366 echo "configure:6367: checking if pthread_create() works" >&5
6367                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6368   echo $ac_n "(cached) $ac_c" 1>&6
6369 else
6370   
6371                         if test "$cross_compiling" = yes; then
6372                                 ol_cv_pthread_create_works=yes
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377
6378 #include <pthread.h>
6379 #ifndef NULL
6380 #define NULL (void*)0
6381 #endif
6382
6383 static void *task(p)
6384         void *p;
6385 {
6386         return (void *) (p == NULL);
6387 }
6388
6389 int main(argc, argv)
6390         int argc;
6391         char **argv;
6392 {
6393         pthread_t t;
6394 #if HAVE_PTHREADS_D4
6395         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6396 #else
6397         exit(pthread_create(&t, NULL, task, NULL));
6398 #endif
6399 }
6400
6401 EOF
6402 if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6403 then
6404   ol_cv_pthread_create_works=yes
6405 else
6406   echo "configure: failed program was:" >&5
6407   cat conftest.$ac_ext >&5
6408   rm -fr conftest*
6409   ol_cv_pthread_create_works=no
6410 fi
6411 rm -fr conftest*
6412 fi
6413
6414 fi
6415
6416                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6417
6418                         if test $ol_cv_pthread_create_works = no ; then
6419                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6420                         fi
6421
6422                                                 if test $ol_with_yielding_select = auto ; then
6423                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6424 echo "configure:6425: checking if select yields when using pthreads" >&5
6425                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6426   echo $ac_n "(cached) $ac_c" 1>&6
6427 else
6428   
6429                                 if test "$cross_compiling" = yes; then
6430   
6431                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6432 else
6433   cat > conftest.$ac_ext <<EOF
6434 #line 6435 "configure"
6435 #include "confdefs.h"
6436
6437 #include <sys/types.h>
6438 #include <sys/time.h>
6439 #include <unistd.h>
6440 #include <pthread.h>
6441 #ifndef NULL
6442 #define NULL (void*) 0
6443 #endif
6444
6445 static int fildes[2];
6446
6447 static void *task(p)
6448         void *p;
6449 {
6450         int i;
6451         struct timeval tv;
6452
6453         fd_set rfds;
6454
6455         tv.tv_sec=10;
6456         tv.tv_usec=0;
6457
6458         FD_ZERO(&rfds);
6459         FD_SET(fildes[0], &rfds);
6460
6461         /* we're not interested in any fds */
6462         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6463
6464         if(i < 0) {
6465                 perror("select");
6466                 exit(10);
6467         }
6468
6469         exit(0); /* if we exit here, the select blocked the whole process */
6470 }
6471
6472 int main(argc, argv)
6473         int argc;
6474         char **argv;
6475 {
6476         pthread_t t;
6477
6478         /* create a pipe to select */
6479         if(pipe(&fildes[0])) {
6480                 perror("select");
6481                 exit(1);
6482         }
6483
6484 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6485         (void) pthread_setconcurrency(2);
6486 #else
6487 #ifdef HAVE_THR_SETCONCURRENCY
6488         /* Set Solaris LWP concurrency to 2 */
6489         thr_setconcurrency(2);
6490 #endif
6491 #endif
6492
6493 #if HAVE_PTHREADS_D4
6494         pthread_create(&t, pthread_attr_default, task, NULL);
6495 #else
6496         pthread_create(&t, NULL, task, NULL);
6497 #endif
6498
6499 #if HAVE_SCHED_YIELD
6500         sched_yield();  /* make sure task runs first */
6501 #else
6502 #ifdef HAVE_PTHREAD_YIELD
6503         pthread_yield();        /* make sure task runs first */
6504 #endif
6505 #endif
6506
6507         exit(2);
6508 }
6509 EOF
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6511 then
6512   ol_cv_pthread_select_yields=no
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -fr conftest*
6517   ol_cv_pthread_select_yields=yes
6518 fi
6519 rm -fr conftest*
6520 fi
6521
6522 fi
6523
6524                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6525
6526                                 if test $ol_cv_pthread_select_yields = yes ; then
6527                                         ol_with_yielding_select=yes
6528                                 fi
6529                         fi
6530
6531                                                 CPPFLAGS="$save_CPPFLAGS"
6532                         LIBS="$save_LIBS"
6533                 else
6534                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6535                 fi
6536         fi
6537
6538         if test $ol_with_threads = posix ; then
6539                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6540         fi
6541 fi
6542
6543 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6544         -o $ol_with_threads = mach ; then
6545
6546                 for ac_hdr in mach/cthreads.h
6547 do
6548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6550 echo "configure:6551: checking for $ac_hdr" >&5
6551 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 #include <$ac_hdr>
6558 EOF
6559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6560 { (eval echo configure:6561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6562 if test -z "$ac_err"; then
6563   rm -rf conftest*
6564   eval "ac_cv_header_$ac_safe=yes"
6565 else
6566   echo "$ac_err" >&5
6567   echo "configure: failed program was:" >&5
6568   cat conftest.$ac_ext >&5
6569   rm -rf conftest*
6570   eval "ac_cv_header_$ac_safe=no"
6571 fi
6572 rm -f conftest*
6573 fi
6574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6575   echo "$ac_t""yes" 1>&6
6576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6577   cat >> confdefs.h <<EOF
6578 #define $ac_tr_hdr 1
6579 EOF
6580  
6581 else
6582   echo "$ac_t""no" 1>&6
6583 fi
6584 done
6585
6586         if test $ac_cv_header_mach_cthreads_h = yes ; then
6587                 ol_with_threads=found
6588
6589                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6590 echo "configure:6591: checking for cthread_fork" >&5
6591 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6592   echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* System header to define __stub macros and hopefully few prototypes,
6598     which can conflict with char cthread_fork(); below.  */
6599 #include <assert.h>
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char cthread_fork();
6604
6605 int main() {
6606
6607 /* The GNU C library defines this for functions which it implements
6608     to always fail with ENOSYS.  Some functions are actually named
6609     something starting with __ and the normal name is an alias.  */
6610 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6611 choke me
6612 #else
6613 cthread_fork();
6614 #endif
6615
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619   rm -rf conftest*
6620   eval "ac_cv_func_cthread_fork=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_func_cthread_fork=no"
6626 fi
6627 rm -f conftest*
6628 fi
6629
6630 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632   ol_link_threads=yes
6633 else
6634   echo "$ac_t""no" 1>&6
6635 fi
6636
6637
6638                 if test $ol_link_threads = no ; then
6639                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6640 echo "configure:6641: checking for cthread_fork with -all_load" >&5
6641 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6642   echo $ac_n "(cached) $ac_c" 1>&6
6643 else
6644   
6645                                                                 save_LIBS="$LIBS"
6646                                 LIBS="-all_load $LIBS"
6647                                 cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 #include <mach/cthreads.h>
6651 int main() {
6652
6653                                         cthread_fork((void *)0, (void *)0);
6654                                         
6655 ; return 0; }
6656 EOF
6657 if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6658   rm -rf conftest*
6659   ol_cv_cthread_all_load=yes
6660 else
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -rf conftest*
6664   ol_cv_cthread_all_load=no
6665 fi
6666 rm -f conftest*
6667                                                                 LIBS="$save_LIBS"
6668                         
6669 fi
6670
6671 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6672
6673                         if test $ol_cv_cthread_all_load = yes ; then
6674                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6675                                 ol_link_threads=mach
6676                         fi
6677                 fi
6678
6679                 if test $ol_link_threads != no ; then
6680                         : check for cthread specific functionality here
6681                         cat >> confdefs.h <<\EOF
6682 #define HAVE_MACH_CTHREADS 1
6683 EOF
6684
6685                 else
6686                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6687                 fi
6688         fi
6689
6690         if test $ol_with_threads = mach ; then
6691                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6692         fi
6693 fi
6694
6695 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6696         -o $ol_with_threads = lwp ; then
6697
6698                 for ac_hdr in thread.h synch.h
6699 do
6700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6702 echo "configure:6703: checking for $ac_hdr" >&5
6703 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 #include <$ac_hdr>
6710 EOF
6711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6712 { (eval echo configure:6713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6714 if test -z "$ac_err"; then
6715   rm -rf conftest*
6716   eval "ac_cv_header_$ac_safe=yes"
6717 else
6718   echo "$ac_err" >&5
6719   echo "configure: failed program was:" >&5
6720   cat conftest.$ac_ext >&5
6721   rm -rf conftest*
6722   eval "ac_cv_header_$ac_safe=no"
6723 fi
6724 rm -f conftest*
6725 fi
6726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6727   echo "$ac_t""yes" 1>&6
6728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6729   cat >> confdefs.h <<EOF
6730 #define $ac_tr_hdr 1
6731 EOF
6732  
6733 else
6734   echo "$ac_t""no" 1>&6
6735 fi
6736 done
6737
6738         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6739                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6740 echo "configure:6741: checking for thr_create in -lthread" >&5
6741 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6742 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6743   echo $ac_n "(cached) $ac_c" 1>&6
6744 else
6745   ac_save_LIBS="$LIBS"
6746 LIBS="-lthread  $LIBS"
6747 cat > conftest.$ac_ext <<EOF
6748 #line 6749 "configure"
6749 #include "confdefs.h"
6750 /* Override any gcc2 internal prototype to avoid an error.  */
6751 /* We use char because int might match the return type of a gcc2
6752     builtin and then its argument prototype would still apply.  */
6753 char thr_create();
6754
6755 int main() {
6756 thr_create()
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   eval "ac_cv_lib_$ac_lib_var=yes"
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765   rm -rf conftest*
6766   eval "ac_cv_lib_$ac_lib_var=no"
6767 fi
6768 rm -f conftest*
6769 LIBS="$ac_save_LIBS"
6770
6771 fi
6772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6773   echo "$ac_t""yes" 1>&6
6774   have_thr=yes
6775 else
6776   echo "$ac_t""no" 1>&6
6777 have_thr=no
6778 fi
6779
6780
6781                 if test $have_thr = yes ; then
6782                         cat >> confdefs.h <<\EOF
6783 #define HAVE_THR 1
6784 EOF
6785
6786                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6787                         ol_link_threads=thr
6788
6789                         if test $ol_with_yielding_select = auto ; then
6790                                 ol_with_yielding_select=yes
6791                         fi
6792
6793                                                 for ac_func in \
6794                                 thr_setconcurrency \
6795                                 thr_getconcurrency \
6796                         
6797 do
6798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6799 echo "configure:6800: checking for $ac_func" >&5
6800 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 $ac_func(); 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 $ac_func();
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_$ac_func) || defined (__stub___$ac_func)
6820 choke me
6821 #else
6822 $ac_func();
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_$ac_func=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_$ac_func=no"
6835 fi
6836 rm -f conftest*
6837 fi
6838
6839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6840   echo "$ac_t""yes" 1>&6
6841     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6842   cat >> confdefs.h <<EOF
6843 #define $ac_tr_func 1
6844 EOF
6845  
6846 else
6847   echo "$ac_t""no" 1>&6
6848 fi
6849 done
6850
6851                 fi
6852         fi
6853
6854                 for ac_hdr in lwp/lwp.h
6855 do
6856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6858 echo "configure:6859: checking for $ac_hdr" >&5
6859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6860   echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862   cat > conftest.$ac_ext <<EOF
6863 #line 6864 "configure"
6864 #include "confdefs.h"
6865 #include <$ac_hdr>
6866 EOF
6867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6868 { (eval echo configure:6869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6870 if test -z "$ac_err"; then
6871   rm -rf conftest*
6872   eval "ac_cv_header_$ac_safe=yes"
6873 else
6874   echo "$ac_err" >&5
6875   echo "configure: failed program was:" >&5
6876   cat conftest.$ac_ext >&5
6877   rm -rf conftest*
6878   eval "ac_cv_header_$ac_safe=no"
6879 fi
6880 rm -f conftest*
6881 fi
6882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6883   echo "$ac_t""yes" 1>&6
6884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6885   cat >> confdefs.h <<EOF
6886 #define $ac_tr_hdr 1
6887 EOF
6888  
6889 else
6890   echo "$ac_t""no" 1>&6
6891 fi
6892 done
6893
6894         if test $ac_cv_header_lwp_lwp_h = yes ; then
6895                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6896 echo "configure:6897: checking for lwp_create in -llwp" >&5
6897 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6898 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6899   echo $ac_n "(cached) $ac_c" 1>&6
6900 else
6901   ac_save_LIBS="$LIBS"
6902 LIBS="-llwp  $LIBS"
6903 cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 /* Override any gcc2 internal prototype to avoid an error.  */
6907 /* We use char because int might match the return type of a gcc2
6908     builtin and then its argument prototype would still apply.  */
6909 char lwp_create();
6910
6911 int main() {
6912 lwp_create()
6913 ; return 0; }
6914 EOF
6915 if { (eval echo configure:6916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6916   rm -rf conftest*
6917   eval "ac_cv_lib_$ac_lib_var=yes"
6918 else
6919   echo "configure: failed program was:" >&5
6920   cat conftest.$ac_ext >&5
6921   rm -rf conftest*
6922   eval "ac_cv_lib_$ac_lib_var=no"
6923 fi
6924 rm -f conftest*
6925 LIBS="$ac_save_LIBS"
6926
6927 fi
6928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6929   echo "$ac_t""yes" 1>&6
6930   have_lwp=yes
6931 else
6932   echo "$ac_t""no" 1>&6
6933 have_lwp=no
6934 fi
6935
6936
6937                 if test $have_lwp = yes ; then
6938                         cat >> confdefs.h <<\EOF
6939 #define HAVE_LWP 1
6940 EOF
6941
6942                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6943                         ol_link_threads=lwp
6944
6945                         if test $ol_with_yielding_select = auto ; then
6946                                 ol_with_yielding_select=no
6947                         fi
6948                 fi
6949         fi
6950 fi
6951
6952 if test $ol_with_yielding_select = yes ; then
6953         cat >> confdefs.h <<\EOF
6954 #define HAVE_YIELDING_SELECT 1
6955 EOF
6956
6957 fi
6958
6959 if test $ol_with_threads = manual ; then
6960                 ol_link_threads=yes
6961
6962         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6963
6964         for ac_hdr in pthread.h sched.h
6965 do
6966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6968 echo "configure:6969: checking for $ac_hdr" >&5
6969 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6970   echo $ac_n "(cached) $ac_c" 1>&6
6971 else
6972   cat > conftest.$ac_ext <<EOF
6973 #line 6974 "configure"
6974 #include "confdefs.h"
6975 #include <$ac_hdr>
6976 EOF
6977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6978 { (eval echo configure:6979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6980 if test -z "$ac_err"; then
6981   rm -rf conftest*
6982   eval "ac_cv_header_$ac_safe=yes"
6983 else
6984   echo "$ac_err" >&5
6985   echo "configure: failed program was:" >&5
6986   cat conftest.$ac_ext >&5
6987   rm -rf conftest*
6988   eval "ac_cv_header_$ac_safe=no"
6989 fi
6990 rm -f conftest*
6991 fi
6992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6993   echo "$ac_t""yes" 1>&6
6994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6995   cat >> confdefs.h <<EOF
6996 #define $ac_tr_hdr 1
6997 EOF
6998  
6999 else
7000   echo "$ac_t""no" 1>&6
7001 fi
7002 done
7003
7004         for ac_func in sched_yield pthread_yield
7005 do
7006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7007 echo "configure:7008: checking for $ac_func" >&5
7008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7009   echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 /* System header to define __stub macros and hopefully few prototypes,
7015     which can conflict with char $ac_func(); below.  */
7016 #include <assert.h>
7017 /* Override any gcc2 internal prototype to avoid an error.  */
7018 /* We use char because int might match the return type of a gcc2
7019     builtin and then its argument prototype would still apply.  */
7020 char $ac_func();
7021
7022 int main() {
7023
7024 /* The GNU C library defines this for functions which it implements
7025     to always fail with ENOSYS.  Some functions are actually named
7026     something starting with __ and the normal name is an alias.  */
7027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7028 choke me
7029 #else
7030 $ac_func();
7031 #endif
7032
7033 ; return 0; }
7034 EOF
7035 if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7036   rm -rf conftest*
7037   eval "ac_cv_func_$ac_func=yes"
7038 else
7039   echo "configure: failed program was:" >&5
7040   cat conftest.$ac_ext >&5
7041   rm -rf conftest*
7042   eval "ac_cv_func_$ac_func=no"
7043 fi
7044 rm -f conftest*
7045 fi
7046
7047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7048   echo "$ac_t""yes" 1>&6
7049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7050   cat >> confdefs.h <<EOF
7051 #define $ac_tr_func 1
7052 EOF
7053  
7054 else
7055   echo "$ac_t""no" 1>&6
7056 fi
7057 done
7058
7059         
7060         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7061 echo "configure:7062: checking for LinuxThreads pthread.h" >&5
7062 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7063   echo $ac_n "(cached) $ac_c" 1>&6
7064 else
7065   cat > conftest.$ac_ext <<EOF
7066 #line 7067 "configure"
7067 #include "confdefs.h"
7068 #include <pthread.h>
7069 EOF
7070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7071   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7072   rm -rf conftest*
7073   ol_cv_header_linux_threads=yes
7074 else
7075   rm -rf conftest*
7076   ol_cv_header_linux_threads=no
7077 fi
7078 rm -f conftest*
7079
7080                 
7081 fi
7082
7083 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7084         if test $ol_cv_header_linux_threads = yes; then
7085                 cat >> confdefs.h <<\EOF
7086 #define HAVE_LINUX_THREADS 1
7087 EOF
7088
7089         fi
7090
7091
7092         for ac_hdr in mach/cthreads.h
7093 do
7094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7096 echo "configure:7097: checking for $ac_hdr" >&5
7097 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7098   echo $ac_n "(cached) $ac_c" 1>&6
7099 else
7100   cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103 #include <$ac_hdr>
7104 EOF
7105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7106 { (eval echo configure:7107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7108 if test -z "$ac_err"; then
7109   rm -rf conftest*
7110   eval "ac_cv_header_$ac_safe=yes"
7111 else
7112   echo "$ac_err" >&5
7113   echo "configure: failed program was:" >&5
7114   cat conftest.$ac_ext >&5
7115   rm -rf conftest*
7116   eval "ac_cv_header_$ac_safe=no"
7117 fi
7118 rm -f conftest*
7119 fi
7120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7121   echo "$ac_t""yes" 1>&6
7122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7123   cat >> confdefs.h <<EOF
7124 #define $ac_tr_hdr 1
7125 EOF
7126  
7127 else
7128   echo "$ac_t""no" 1>&6
7129 fi
7130 done
7131
7132         for ac_hdr in lwp/lwp.h
7133 do
7134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7136 echo "configure:7137: checking for $ac_hdr" >&5
7137 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7138   echo $ac_n "(cached) $ac_c" 1>&6
7139 else
7140   cat > conftest.$ac_ext <<EOF
7141 #line 7142 "configure"
7142 #include "confdefs.h"
7143 #include <$ac_hdr>
7144 EOF
7145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7146 { (eval echo configure:7147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7148 if test -z "$ac_err"; then
7149   rm -rf conftest*
7150   eval "ac_cv_header_$ac_safe=yes"
7151 else
7152   echo "$ac_err" >&5
7153   echo "configure: failed program was:" >&5
7154   cat conftest.$ac_ext >&5
7155   rm -rf conftest*
7156   eval "ac_cv_header_$ac_safe=no"
7157 fi
7158 rm -f conftest*
7159 fi
7160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7161   echo "$ac_t""yes" 1>&6
7162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7163   cat >> confdefs.h <<EOF
7164 #define $ac_tr_hdr 1
7165 EOF
7166  
7167 else
7168   echo "$ac_t""no" 1>&6
7169 fi
7170 done
7171
7172         for ac_hdr in thread.h synch.h
7173 do
7174 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7175 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7176 echo "configure:7177: checking for $ac_hdr" >&5
7177 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7178   echo $ac_n "(cached) $ac_c" 1>&6
7179 else
7180   cat > conftest.$ac_ext <<EOF
7181 #line 7182 "configure"
7182 #include "confdefs.h"
7183 #include <$ac_hdr>
7184 EOF
7185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7186 { (eval echo configure:7187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7188 if test -z "$ac_err"; then
7189   rm -rf conftest*
7190   eval "ac_cv_header_$ac_safe=yes"
7191 else
7192   echo "$ac_err" >&5
7193   echo "configure: failed program was:" >&5
7194   cat conftest.$ac_ext >&5
7195   rm -rf conftest*
7196   eval "ac_cv_header_$ac_safe=no"
7197 fi
7198 rm -f conftest*
7199 fi
7200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7201   echo "$ac_t""yes" 1>&6
7202     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7203   cat >> confdefs.h <<EOF
7204 #define $ac_tr_hdr 1
7205 EOF
7206  
7207 else
7208   echo "$ac_t""no" 1>&6
7209 fi
7210 done
7211
7212 fi
7213
7214 if test $ol_link_threads != no ; then  
7215                         cat >> confdefs.h <<\EOF
7216 #define REENTRANT 1
7217 EOF
7218
7219         cat >> confdefs.h <<\EOF
7220 #define _REENTRANT 1
7221 EOF
7222
7223         cat >> confdefs.h <<\EOF
7224 #define THREAD_SAFE 1
7225 EOF
7226
7227         cat >> confdefs.h <<\EOF
7228 #define _THREAD_SAFE 1
7229 EOF
7230
7231         cat >> confdefs.h <<\EOF
7232 #define THREADSAFE 1
7233 EOF
7234
7235         cat >> confdefs.h <<\EOF
7236 #define _THREADSAFE 1
7237 EOF
7238
7239
7240                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7241 echo "configure:7242: checking for thread specific errno" >&5
7242 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7243   echo $ac_n "(cached) $ac_c" 1>&6
7244 else
7245   
7246                 cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 #include <errno.h>
7250 int main() {
7251 errno = 0;
7252 ; return 0; }
7253 EOF
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255   rm -rf conftest*
7256   ol_cv_errno_thread_specific=yes
7257 else
7258   echo "configure: failed program was:" >&5
7259   cat conftest.$ac_ext >&5
7260   rm -rf conftest*
7261   ol_cv_errno_thread_specific=no
7262 fi
7263 rm -f conftest*
7264         
7265 fi
7266
7267 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7268
7269                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
7270 echo "configure:7271: checking for thread specific h_errno" >&5
7271 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
7272   echo $ac_n "(cached) $ac_c" 1>&6
7273 else
7274   
7275                 cat > conftest.$ac_ext <<EOF
7276 #line 7277 "configure"
7277 #include "confdefs.h"
7278 #include <netdb.h>
7279 int main() {
7280 h_errno = 0;
7281 ; return 0; }
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7284   rm -rf conftest*
7285   ol_cv_h_errno_thread_specific=yes
7286 else
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289   rm -rf conftest*
7290   ol_cv_h_errno_thread_specific=no
7291 fi
7292 rm -f conftest*
7293         
7294 fi
7295
7296 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
7297
7298         if test $ol_cv_errno_thread_specific != yes \
7299                 -o $ol_cv_h_errno_thread_specific != yes ; then
7300                 LIBS="$LTHREAD_LIBS $LIBS"
7301                 LTHREAD_LIBS=""
7302         fi
7303
7304 fi  
7305
7306 if test $ol_link_threads = no ; then
7307         if test $ol_with_threads = yes ; then
7308                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7309         fi
7310
7311         if test $ol_with_threads = auto ; then
7312                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7313                 ol_with_threads=no
7314         fi
7315
7316         cat >> confdefs.h <<\EOF
7317 #define NO_THREADS 1
7318 EOF
7319
7320         LTHREAD_LIBS=""
7321 fi
7322
7323 if test $ol_link_threads != no ; then
7324         cat >> confdefs.h <<\EOF
7325 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7326 EOF
7327
7328 fi
7329
7330
7331 ol_link_ldbm=no 
7332 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7333         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7334 echo "configure:7335: checking for DB2 library" >&5
7335 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7336   echo $ac_n "(cached) $ac_c" 1>&6
7337 else
7338         ol_LIBS="$LIBS"
7339         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7340 echo "configure:7341: checking for db_open in -ldb" >&5
7341 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7343   echo $ac_n "(cached) $ac_c" 1>&6
7344 else
7345   ac_save_LIBS="$LIBS"
7346 LIBS="-ldb  $LIBS"
7347 cat > conftest.$ac_ext <<EOF
7348 #line 7349 "configure"
7349 #include "confdefs.h"
7350 /* Override any gcc2 internal prototype to avoid an error.  */
7351 /* We use char because int might match the return type of a gcc2
7352     builtin and then its argument prototype would still apply.  */
7353 char db_open();
7354
7355 int main() {
7356 db_open()
7357 ; return 0; }
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7360   rm -rf conftest*
7361   eval "ac_cv_lib_$ac_lib_var=yes"
7362 else
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_lib_$ac_lib_var=no"
7367 fi
7368 rm -f conftest*
7369 LIBS="$ac_save_LIBS"
7370
7371 fi
7372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7373   echo "$ac_t""yes" 1>&6
7374   ol_cv_lib_db2=-ldb
7375 else
7376   echo "$ac_t""no" 1>&6
7377 ol_cv_lib_db2=no
7378 fi
7379
7380         LIBS="$ol_LIBS"
7381
7382 fi
7383
7384 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7385
7386 for ac_hdr in db.h
7387 do
7388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7390 echo "configure:7391: checking for $ac_hdr" >&5
7391 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7392   echo $ac_n "(cached) $ac_c" 1>&6
7393 else
7394   cat > conftest.$ac_ext <<EOF
7395 #line 7396 "configure"
7396 #include "confdefs.h"
7397 #include <$ac_hdr>
7398 EOF
7399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7400 { (eval echo configure:7401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7402 if test -z "$ac_err"; then
7403   rm -rf conftest*
7404   eval "ac_cv_header_$ac_safe=yes"
7405 else
7406   echo "$ac_err" >&5
7407   echo "configure: failed program was:" >&5
7408   cat conftest.$ac_ext >&5
7409   rm -rf conftest*
7410   eval "ac_cv_header_$ac_safe=no"
7411 fi
7412 rm -f conftest*
7413 fi
7414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7415   echo "$ac_t""yes" 1>&6
7416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7417   cat >> confdefs.h <<EOF
7418 #define $ac_tr_hdr 1
7419 EOF
7420  
7421 else
7422   echo "$ac_t""no" 1>&6
7423 fi
7424 done
7425
7426 if test $ac_cv_header_db_h = yes ; then
7427         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7428 echo "configure:7429: checking if db.h is DB2" >&5
7429 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7430   echo $ac_n "(cached) $ac_c" 1>&6
7431 else
7432   
7433                 cat > conftest.$ac_ext <<EOF
7434 #line 7435 "configure"
7435 #include "confdefs.h"
7436
7437 #                       include <db.h>
7438                         /* this check could be improved */
7439 #                       ifdef DB_VERSION_MAJOR
7440 #                               if DB_VERSION_MAJOR == 2
7441                                         __db_version_2
7442 #                               endif
7443 #                       endif
7444                 
7445 EOF
7446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7447   egrep "__db_version_2" >/dev/null 2>&1; then
7448   rm -rf conftest*
7449   ol_cv_header_db2=yes
7450 else
7451   rm -rf conftest*
7452   ol_cv_header_db2=no
7453 fi
7454 rm -f conftest*
7455
7456 fi
7457
7458 echo "$ac_t""$ol_cv_header_db2" 1>&6
7459 else
7460         ol_cv_header_db2=no
7461 fi
7462
7463
7464  
7465  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7466 echo "configure:7467: checking for Berkeley DB2" >&5
7467 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7468   echo $ac_n "(cached) $ac_c" 1>&6
7469 else
7470   
7471         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7472                 ol_cv_berkeley_db2=no
7473         else
7474                 ol_cv_berkeley_db2=yes
7475         fi
7476
7477 fi
7478
7479 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7480  if test $ol_cv_berkeley_db2 = yes ; then
7481         cat >> confdefs.h <<\EOF
7482 #define HAVE_BERKELEY_DB2 1
7483 EOF
7484
7485  fi
7486
7487
7488         if test $ol_cv_berkeley_db2 = yes ; then
7489                 ol_link_ldbm=db2
7490                 ol_with_ldbm_api=db2
7491
7492                 if test $ol_with_ldbm_type = hash ; then
7493                         cat >> confdefs.h <<\EOF
7494 #define LDBM_USE_DBHASH 1
7495 EOF
7496
7497                 else
7498                         cat >> confdefs.h <<\EOF
7499 #define LDBM_USE_DBBTREE 1
7500 EOF
7501
7502                 fi
7503
7504                                                 if test $ol_cv_lib_db2 != yes ; then
7505                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7506                 fi
7507         fi
7508 fi
7509
7510 ol_link_bdb2=no
7511 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7512         ol_link_bdb2=yes
7513 fi
7514
7515 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7516         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7517 echo "configure:7518: checking for Berkeley DB library" >&5
7518 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7519   echo $ac_n "(cached) $ac_c" 1>&6
7520 else
7521   
7522         for ac_hdr in db1/db.h
7523 do
7524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7526 echo "configure:7527: checking for $ac_hdr" >&5
7527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7528   echo $ac_n "(cached) $ac_c" 1>&6
7529 else
7530   cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 #include <$ac_hdr>
7534 EOF
7535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7536 { (eval echo configure:7537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7538 if test -z "$ac_err"; then
7539   rm -rf conftest*
7540   eval "ac_cv_header_$ac_safe=yes"
7541 else
7542   echo "$ac_err" >&5
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -rf conftest*
7546   eval "ac_cv_header_$ac_safe=no"
7547 fi
7548 rm -f conftest*
7549 fi
7550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7551   echo "$ac_t""yes" 1>&6
7552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7553   cat >> confdefs.h <<EOF
7554 #define $ac_tr_hdr 1
7555 EOF
7556  
7557 else
7558   echo "$ac_t""no" 1>&6
7559 fi
7560 done
7561
7562         ol_LIBS="$LIBS"
7563         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7564 echo "configure:7565: checking for dbopen" >&5
7565 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7566   echo $ac_n "(cached) $ac_c" 1>&6
7567 else
7568   cat > conftest.$ac_ext <<EOF
7569 #line 7570 "configure"
7570 #include "confdefs.h"
7571 /* System header to define __stub macros and hopefully few prototypes,
7572     which can conflict with char dbopen(); below.  */
7573 #include <assert.h>
7574 /* Override any gcc2 internal prototype to avoid an error.  */
7575 /* We use char because int might match the return type of a gcc2
7576     builtin and then its argument prototype would still apply.  */
7577 char dbopen();
7578
7579 int main() {
7580
7581 /* The GNU C library defines this for functions which it implements
7582     to always fail with ENOSYS.  Some functions are actually named
7583     something starting with __ and the normal name is an alias.  */
7584 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7585 choke me
7586 #else
7587 dbopen();
7588 #endif
7589
7590 ; return 0; }
7591 EOF
7592 if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7593   rm -rf conftest*
7594   eval "ac_cv_func_dbopen=yes"
7595 else
7596   echo "configure: failed program was:" >&5
7597   cat conftest.$ac_ext >&5
7598   rm -rf conftest*
7599   eval "ac_cv_func_dbopen=no"
7600 fi
7601 rm -f conftest*
7602 fi
7603
7604 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7605   echo "$ac_t""yes" 1>&6
7606   ol_cv_lib_db=yes
7607 else
7608   echo "$ac_t""no" 1>&6
7609
7610                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
7611 echo "configure:7612: checking for dbopen in -ldb1" >&5
7612 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
7613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   ac_save_LIBS="$LIBS"
7617 LIBS="-ldb1  $LIBS"
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* Override any gcc2 internal prototype to avoid an error.  */
7622 /* We use char because int might match the return type of a gcc2
7623     builtin and then its argument prototype would still apply.  */
7624 char dbopen();
7625
7626 int main() {
7627 dbopen()
7628 ; return 0; }
7629 EOF
7630 if { (eval echo configure:7631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7631   rm -rf conftest*
7632   eval "ac_cv_lib_$ac_lib_var=yes"
7633 else
7634   echo "configure: failed program was:" >&5
7635   cat conftest.$ac_ext >&5
7636   rm -rf conftest*
7637   eval "ac_cv_lib_$ac_lib_var=no"
7638 fi
7639 rm -f conftest*
7640 LIBS="$ac_save_LIBS"
7641
7642 fi
7643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7644   echo "$ac_t""yes" 1>&6
7645   ol_cv_lib_db=-ldb1
7646 else
7647   echo "$ac_t""no" 1>&6
7648
7649                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7650 echo "configure:7651: checking for dbopen in -ldb" >&5
7651 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7652 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7653   echo $ac_n "(cached) $ac_c" 1>&6
7654 else
7655   ac_save_LIBS="$LIBS"
7656 LIBS="-ldb  $LIBS"
7657 cat > conftest.$ac_ext <<EOF
7658 #line 7659 "configure"
7659 #include "confdefs.h"
7660 /* Override any gcc2 internal prototype to avoid an error.  */
7661 /* We use char because int might match the return type of a gcc2
7662     builtin and then its argument prototype would still apply.  */
7663 char dbopen();
7664
7665 int main() {
7666 dbopen()
7667 ; return 0; }
7668 EOF
7669 if { (eval echo configure:7670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7670   rm -rf conftest*
7671   eval "ac_cv_lib_$ac_lib_var=yes"
7672 else
7673   echo "configure: failed program was:" >&5
7674   cat conftest.$ac_ext >&5
7675   rm -rf conftest*
7676   eval "ac_cv_lib_$ac_lib_var=no"
7677 fi
7678 rm -f conftest*
7679 LIBS="$ac_save_LIBS"
7680
7681 fi
7682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7683   echo "$ac_t""yes" 1>&6
7684   ol_cv_lib_db=-ldb
7685 else
7686   echo "$ac_t""no" 1>&6
7687 ol_cv_lib_db=no
7688 fi
7689
7690                 
7691 fi
7692
7693         
7694 fi
7695
7696         LIBS="$ol_LIBS"
7697
7698 fi
7699
7700 echo "$ac_t""$ol_cv_lib_db" 1>&6
7701
7702
7703 for ac_hdr in db_185.h
7704 do
7705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7707 echo "configure:7708: checking for $ac_hdr" >&5
7708 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7709   echo $ac_n "(cached) $ac_c" 1>&6
7710 else
7711   cat > conftest.$ac_ext <<EOF
7712 #line 7713 "configure"
7713 #include "confdefs.h"
7714 #include <$ac_hdr>
7715 EOF
7716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7717 { (eval echo configure:7718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7719 if test -z "$ac_err"; then
7720   rm -rf conftest*
7721   eval "ac_cv_header_$ac_safe=yes"
7722 else
7723   echo "$ac_err" >&5
7724   echo "configure: failed program was:" >&5
7725   cat conftest.$ac_ext >&5
7726   rm -rf conftest*
7727   eval "ac_cv_header_$ac_safe=no"
7728 fi
7729 rm -f conftest*
7730 fi
7731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7732   echo "$ac_t""yes" 1>&6
7733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7734   cat >> confdefs.h <<EOF
7735 #define $ac_tr_hdr 1
7736 EOF
7737  
7738 else
7739   echo "$ac_t""no" 1>&6
7740 fi
7741 done
7742
7743 if test "$ol_cv_header_db2" = yes ; then
7744         
7745         ol_cv_header_db=$ac_cv_header_db_185_h
7746 else
7747         ol_cv_header_db=$ac_cv_header_db_h
7748 fi
7749
7750
7751  
7752  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7753 echo "configure:7754: checking for Berkeley DB" >&5
7754 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7755   echo $ac_n "(cached) $ac_c" 1>&6
7756 else
7757   
7758         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7759                 ol_cv_berkeley_db=no
7760         else
7761                 ol_cv_berkeley_db=yes
7762         fi
7763
7764 fi
7765
7766 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7767  if test $ol_cv_berkeley_db = yes ; then
7768         cat >> confdefs.h <<\EOF
7769 #define HAVE_BERKELEY_DB 1
7770 EOF
7771
7772  fi
7773
7774
7775         if test $ol_cv_berkeley_db = yes ; then
7776                 ol_link_ldbm=db
7777                 ol_with_ldbm_api=db
7778
7779                 if test $ol_with_ldbm_type = hash ; then
7780                         cat >> confdefs.h <<\EOF
7781 #define LDBM_USE_DBHASH 1
7782 EOF
7783
7784                 else
7785                         cat >> confdefs.h <<\EOF
7786 #define LDBM_USE_DBBTREE 1
7787 EOF
7788
7789                 fi
7790
7791                                                 if test $ol_cv_lib_db != yes ; then
7792                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7793                 fi
7794         fi
7795 fi
7796
7797 if test $ol_with_ldbm_api = manual ; then
7798                 ol_link_ldbm=yes
7799
7800         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7801
7802         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7803 do
7804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7806 echo "configure:7807: checking for $ac_hdr" >&5
7807 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7808   echo $ac_n "(cached) $ac_c" 1>&6
7809 else
7810   cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 #include <$ac_hdr>
7814 EOF
7815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7816 { (eval echo configure:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7818 if test -z "$ac_err"; then
7819   rm -rf conftest*
7820   eval "ac_cv_header_$ac_safe=yes"
7821 else
7822   echo "$ac_err" >&5
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826   eval "ac_cv_header_$ac_safe=no"
7827 fi
7828 rm -f conftest*
7829 fi
7830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7831   echo "$ac_t""yes" 1>&6
7832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7833   cat >> confdefs.h <<EOF
7834 #define $ac_tr_hdr 1
7835 EOF
7836  
7837 else
7838   echo "$ac_t""no" 1>&6
7839 fi
7840 done
7841
7842 fi
7843
7844 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7845         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7846         ol_with_ldbm_api=none
7847 fi
7848
7849 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7850         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7851 echo "configure:7852: checking for MDBM library" >&5
7852 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855         ol_LIBS="$LIBS"
7856         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7857 echo "configure:7858: checking for mdbm_set_chain" >&5
7858 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7859   echo $ac_n "(cached) $ac_c" 1>&6
7860 else
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 /* System header to define __stub macros and hopefully few prototypes,
7865     which can conflict with char mdbm_set_chain(); below.  */
7866 #include <assert.h>
7867 /* Override any gcc2 internal prototype to avoid an error.  */
7868 /* We use char because int might match the return type of a gcc2
7869     builtin and then its argument prototype would still apply.  */
7870 char mdbm_set_chain();
7871
7872 int main() {
7873
7874 /* The GNU C library defines this for functions which it implements
7875     to always fail with ENOSYS.  Some functions are actually named
7876     something starting with __ and the normal name is an alias.  */
7877 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7878 choke me
7879 #else
7880 mdbm_set_chain();
7881 #endif
7882
7883 ; return 0; }
7884 EOF
7885 if { (eval echo configure:7886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7886   rm -rf conftest*
7887   eval "ac_cv_func_mdbm_set_chain=yes"
7888 else
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   eval "ac_cv_func_mdbm_set_chain=no"
7893 fi
7894 rm -f conftest*
7895 fi
7896
7897 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7898   echo "$ac_t""yes" 1>&6
7899   ol_cv_lib_mdbm=yes
7900 else
7901   echo "$ac_t""no" 1>&6
7902
7903                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7904 echo "configure:7905: checking for mdbm_set_chain in -lmdbm" >&5
7905 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7907   echo $ac_n "(cached) $ac_c" 1>&6
7908 else
7909   ac_save_LIBS="$LIBS"
7910 LIBS="-lmdbm  $LIBS"
7911 cat > conftest.$ac_ext <<EOF
7912 #line 7913 "configure"
7913 #include "confdefs.h"
7914 /* Override any gcc2 internal prototype to avoid an error.  */
7915 /* We use char because int might match the return type of a gcc2
7916     builtin and then its argument prototype would still apply.  */
7917 char mdbm_set_chain();
7918
7919 int main() {
7920 mdbm_set_chain()
7921 ; return 0; }
7922 EOF
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7924   rm -rf conftest*
7925   eval "ac_cv_lib_$ac_lib_var=yes"
7926 else
7927   echo "configure: failed program was:" >&5
7928   cat conftest.$ac_ext >&5
7929   rm -rf conftest*
7930   eval "ac_cv_lib_$ac_lib_var=no"
7931 fi
7932 rm -f conftest*
7933 LIBS="$ac_save_LIBS"
7934
7935 fi
7936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7937   echo "$ac_t""yes" 1>&6
7938   ol_cv_lib_mdbm=-lmdbm
7939 else
7940   echo "$ac_t""no" 1>&6
7941 ol_cv_lib_mdbm=no
7942 fi
7943
7944         
7945 fi
7946
7947         LIBS="$ol_LIBS"
7948
7949 fi
7950
7951 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7952
7953
7954  for ac_hdr in mdbm.h
7955 do
7956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7958 echo "configure:7959: checking for $ac_hdr" >&5
7959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7960   echo $ac_n "(cached) $ac_c" 1>&6
7961 else
7962   cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965 #include <$ac_hdr>
7966 EOF
7967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7968 { (eval echo configure:7969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7970 if test -z "$ac_err"; then
7971   rm -rf conftest*
7972   eval "ac_cv_header_$ac_safe=yes"
7973 else
7974   echo "$ac_err" >&5
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -rf conftest*
7978   eval "ac_cv_header_$ac_safe=no"
7979 fi
7980 rm -f conftest*
7981 fi
7982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7983   echo "$ac_t""yes" 1>&6
7984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7985   cat >> confdefs.h <<EOF
7986 #define $ac_tr_hdr 1
7987 EOF
7988  
7989 else
7990   echo "$ac_t""no" 1>&6
7991 fi
7992 done
7993
7994  echo $ac_n "checking for db""... $ac_c" 1>&6
7995 echo "configure:7996: checking for db" >&5
7996 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7997   echo $ac_n "(cached) $ac_c" 1>&6
7998 else
7999   
8000         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8001                 ol_cv_mdbm=no
8002         else
8003                 ol_cv_mdbm=yes
8004         fi
8005
8006 fi
8007
8008 echo "$ac_t""$ol_cv_mdbm" 1>&6
8009  if test $ol_cv_mdbm = yes ; then
8010         cat >> confdefs.h <<\EOF
8011 #define HAVE_MDBM 1
8012 EOF
8013
8014  fi
8015
8016
8017         if test $ol_cv_mdbm = yes ; then
8018                 ol_link_ldbm=mdbm
8019                 ol_with_ldbm_api=mdbm
8020                 if test $ol_cv_lib_mdbm != yes ; then
8021                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8022                 fi
8023         fi
8024 fi
8025
8026 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8027         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8028 echo "configure:8029: checking for GDBM library" >&5
8029 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
8030   echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8032         ol_LIBS="$LIBS"
8033         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8034 echo "configure:8035: checking for gdbm_open" >&5
8035 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
8036   echo $ac_n "(cached) $ac_c" 1>&6
8037 else
8038   cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 /* System header to define __stub macros and hopefully few prototypes,
8042     which can conflict with char gdbm_open(); below.  */
8043 #include <assert.h>
8044 /* Override any gcc2 internal prototype to avoid an error.  */
8045 /* We use char because int might match the return type of a gcc2
8046     builtin and then its argument prototype would still apply.  */
8047 char gdbm_open();
8048
8049 int main() {
8050
8051 /* The GNU C library defines this for functions which it implements
8052     to always fail with ENOSYS.  Some functions are actually named
8053     something starting with __ and the normal name is an alias.  */
8054 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8055 choke me
8056 #else
8057 gdbm_open();
8058 #endif
8059
8060 ; return 0; }
8061 EOF
8062 if { (eval echo configure:8063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8063   rm -rf conftest*
8064   eval "ac_cv_func_gdbm_open=yes"
8065 else
8066   echo "configure: failed program was:" >&5
8067   cat conftest.$ac_ext >&5
8068   rm -rf conftest*
8069   eval "ac_cv_func_gdbm_open=no"
8070 fi
8071 rm -f conftest*
8072 fi
8073
8074 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8075   echo "$ac_t""yes" 1>&6
8076   ol_cv_lib_gdbm=yes
8077 else
8078   echo "$ac_t""no" 1>&6
8079
8080                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8081 echo "configure:8082: checking for gdbm_open in -lgdbm" >&5
8082 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
8083 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8084   echo $ac_n "(cached) $ac_c" 1>&6
8085 else
8086   ac_save_LIBS="$LIBS"
8087 LIBS="-lgdbm  $LIBS"
8088 cat > conftest.$ac_ext <<EOF
8089 #line 8090 "configure"
8090 #include "confdefs.h"
8091 /* Override any gcc2 internal prototype to avoid an error.  */
8092 /* We use char because int might match the return type of a gcc2
8093     builtin and then its argument prototype would still apply.  */
8094 char gdbm_open();
8095
8096 int main() {
8097 gdbm_open()
8098 ; return 0; }
8099 EOF
8100 if { (eval echo configure:8101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8101   rm -rf conftest*
8102   eval "ac_cv_lib_$ac_lib_var=yes"
8103 else
8104   echo "configure: failed program was:" >&5
8105   cat conftest.$ac_ext >&5
8106   rm -rf conftest*
8107   eval "ac_cv_lib_$ac_lib_var=no"
8108 fi
8109 rm -f conftest*
8110 LIBS="$ac_save_LIBS"
8111
8112 fi
8113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8114   echo "$ac_t""yes" 1>&6
8115   ol_cv_lib_gdbm=-lgdbm
8116 else
8117   echo "$ac_t""no" 1>&6
8118 ol_cv_lib_gdbm=no
8119 fi
8120
8121         
8122 fi
8123
8124         LIBS="$ol_LIBS"
8125
8126 fi
8127
8128 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8129
8130
8131  for ac_hdr in gdbm.h
8132 do
8133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8135 echo "configure:8136: checking for $ac_hdr" >&5
8136 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 #include <$ac_hdr>
8143 EOF
8144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8145 { (eval echo configure:8146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8147 if test -z "$ac_err"; then
8148   rm -rf conftest*
8149   eval "ac_cv_header_$ac_safe=yes"
8150 else
8151   echo "$ac_err" >&5
8152   echo "configure: failed program was:" >&5
8153   cat conftest.$ac_ext >&5
8154   rm -rf conftest*
8155   eval "ac_cv_header_$ac_safe=no"
8156 fi
8157 rm -f conftest*
8158 fi
8159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8160   echo "$ac_t""yes" 1>&6
8161     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8162   cat >> confdefs.h <<EOF
8163 #define $ac_tr_hdr 1
8164 EOF
8165  
8166 else
8167   echo "$ac_t""no" 1>&6
8168 fi
8169 done
8170
8171  echo $ac_n "checking for db""... $ac_c" 1>&6
8172 echo "configure:8173: checking for db" >&5
8173 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
8174   echo $ac_n "(cached) $ac_c" 1>&6
8175 else
8176   
8177         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8178                 ol_cv_gdbm=no
8179         else
8180                 ol_cv_gdbm=yes
8181         fi
8182
8183 fi
8184
8185 echo "$ac_t""$ol_cv_gdbm" 1>&6
8186  if test $ol_cv_gdbm = yes ; then
8187         cat >> confdefs.h <<\EOF
8188 #define HAVE_GDBM 1
8189 EOF
8190
8191  fi
8192
8193
8194         if test $ol_cv_gdbm = yes ; then
8195                 ol_link_ldbm=gdbm
8196                 ol_with_ldbm_api=gdbm
8197
8198                 if test $ol_cv_lib_gdbm != yes ; then
8199                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
8200                 fi
8201         fi
8202 fi
8203
8204 if test $ol_with_ldbm_api = auto ; then
8205         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
8206 elif test $ol_with_ldbm_api = ndbm ; then
8207         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
8208 echo "configure:8209: checking for NDBM library" >&5
8209 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
8210   echo $ac_n "(cached) $ac_c" 1>&6
8211 else
8212         ol_LIBS="$LIBS"
8213         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
8214 echo "configure:8215: checking for dbm_open" >&5
8215 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
8216   echo $ac_n "(cached) $ac_c" 1>&6
8217 else
8218   cat > conftest.$ac_ext <<EOF
8219 #line 8220 "configure"
8220 #include "confdefs.h"
8221 /* System header to define __stub macros and hopefully few prototypes,
8222     which can conflict with char dbm_open(); below.  */
8223 #include <assert.h>
8224 /* Override any gcc2 internal prototype to avoid an error.  */
8225 /* We use char because int might match the return type of a gcc2
8226     builtin and then its argument prototype would still apply.  */
8227 char dbm_open();
8228
8229 int main() {
8230
8231 /* The GNU C library defines this for functions which it implements
8232     to always fail with ENOSYS.  Some functions are actually named
8233     something starting with __ and the normal name is an alias.  */
8234 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
8235 choke me
8236 #else
8237 dbm_open();
8238 #endif
8239
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_func_dbm_open=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_func_dbm_open=no"
8250 fi
8251 rm -f conftest*
8252 fi
8253
8254 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
8255   echo "$ac_t""yes" 1>&6
8256   ol_cv_lib_ndbm=yes
8257 else
8258   echo "$ac_t""no" 1>&6
8259
8260                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
8261 echo "configure:8262: checking for dbm_open in -lndbm" >&5
8262 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
8263 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8264   echo $ac_n "(cached) $ac_c" 1>&6
8265 else
8266   ac_save_LIBS="$LIBS"
8267 LIBS="-lndbm  $LIBS"
8268 cat > conftest.$ac_ext <<EOF
8269 #line 8270 "configure"
8270 #include "confdefs.h"
8271 /* Override any gcc2 internal prototype to avoid an error.  */
8272 /* We use char because int might match the return type of a gcc2
8273     builtin and then its argument prototype would still apply.  */
8274 char dbm_open();
8275
8276 int main() {
8277 dbm_open()
8278 ; return 0; }
8279 EOF
8280 if { (eval echo configure:8281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8281   rm -rf conftest*
8282   eval "ac_cv_lib_$ac_lib_var=yes"
8283 else
8284   echo "configure: failed program was:" >&5
8285   cat conftest.$ac_ext >&5
8286   rm -rf conftest*
8287   eval "ac_cv_lib_$ac_lib_var=no"
8288 fi
8289 rm -f conftest*
8290 LIBS="$ac_save_LIBS"
8291
8292 fi
8293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8294   echo "$ac_t""yes" 1>&6
8295   ol_cv_lib_ndbm=-lndbm
8296 else
8297   echo "$ac_t""no" 1>&6
8298
8299                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8300 echo "configure:8301: checking for dbm_open in -ldbm" >&5
8301 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8302 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8303   echo $ac_n "(cached) $ac_c" 1>&6
8304 else
8305   ac_save_LIBS="$LIBS"
8306 LIBS="-ldbm  $LIBS"
8307 cat > conftest.$ac_ext <<EOF
8308 #line 8309 "configure"
8309 #include "confdefs.h"
8310 /* Override any gcc2 internal prototype to avoid an error.  */
8311 /* We use char because int might match the return type of a gcc2
8312     builtin and then its argument prototype would still apply.  */
8313 char dbm_open();
8314
8315 int main() {
8316 dbm_open()
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8320   rm -rf conftest*
8321   eval "ac_cv_lib_$ac_lib_var=yes"
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   eval "ac_cv_lib_$ac_lib_var=no"
8327 fi
8328 rm -f conftest*
8329 LIBS="$ac_save_LIBS"
8330
8331 fi
8332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8333   echo "$ac_t""yes" 1>&6
8334   ol_cv_lib_ndbm=-ldbm
8335 else
8336   echo "$ac_t""no" 1>&6
8337 ol_cv_lib_ndbm=no
8338 fi
8339                 
8340 fi
8341
8342         
8343 fi
8344
8345         LIBS="$ol_LIBS"
8346
8347 fi
8348
8349 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8350
8351
8352  for ac_hdr in ndbm.h
8353 do
8354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8356 echo "configure:8357: checking for $ac_hdr" >&5
8357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8358   echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360   cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 #include <$ac_hdr>
8364 EOF
8365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8366 { (eval echo configure:8367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8368 if test -z "$ac_err"; then
8369   rm -rf conftest*
8370   eval "ac_cv_header_$ac_safe=yes"
8371 else
8372   echo "$ac_err" >&5
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   eval "ac_cv_header_$ac_safe=no"
8377 fi
8378 rm -f conftest*
8379 fi
8380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8381   echo "$ac_t""yes" 1>&6
8382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8383   cat >> confdefs.h <<EOF
8384 #define $ac_tr_hdr 1
8385 EOF
8386  
8387 else
8388   echo "$ac_t""no" 1>&6
8389 fi
8390 done
8391
8392  echo $ac_n "checking for db""... $ac_c" 1>&6
8393 echo "configure:8394: checking for db" >&5
8394 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8395   echo $ac_n "(cached) $ac_c" 1>&6
8396 else
8397   
8398         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8399                 ol_cv_ndbm=no
8400         else
8401                 ol_cv_ndbm=yes
8402         fi
8403
8404 fi
8405
8406 echo "$ac_t""$ol_cv_ndbm" 1>&6
8407  if test $ol_cv_ndbm = yes ; then
8408         cat >> confdefs.h <<\EOF
8409 #define HAVE_NDBM 1
8410 EOF
8411
8412  fi
8413
8414
8415         if test $ol_cv_ndbm = yes ; then
8416                 ol_link_ldbm=ndbm
8417                 ol_with_ldbm_api=ndbm
8418
8419                 if test $ol_cv_lib_ndbm != yes ; then
8420                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8421                 fi
8422         fi
8423 fi
8424
8425 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8426         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8427         if test $ol_enable_ldbm = yes ; then
8428                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8429         fi
8430
8431         echo "configure: warning: disabling LDBM" 1>&2
8432         ol_enable_ldbm=no
8433 fi
8434
8435 if test $ol_enable_wrappers != no ; then
8436         for ac_hdr in tcpd.h
8437 do
8438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8440 echo "configure:8441: checking for $ac_hdr" >&5
8441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8442   echo $ac_n "(cached) $ac_c" 1>&6
8443 else
8444   cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 #include <$ac_hdr>
8448 EOF
8449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8450 { (eval echo configure:8451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8452 if test -z "$ac_err"; then
8453   rm -rf conftest*
8454   eval "ac_cv_header_$ac_safe=yes"
8455 else
8456   echo "$ac_err" >&5
8457   echo "configure: failed program was:" >&5
8458   cat conftest.$ac_ext >&5
8459   rm -rf conftest*
8460   eval "ac_cv_header_$ac_safe=no"
8461 fi
8462 rm -f conftest*
8463 fi
8464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8465   echo "$ac_t""yes" 1>&6
8466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8467   cat >> confdefs.h <<EOF
8468 #define $ac_tr_hdr 1
8469 EOF
8470  
8471 else
8472   echo "$ac_t""no" 1>&6
8473 fi
8474 done
8475
8476
8477         if test $ac_cv_header_tcpd_h != yes ; then
8478                 have_wrappers=no
8479         else
8480                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8481 echo "configure:8482: checking for main in -lwrap" >&5
8482 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8484   echo $ac_n "(cached) $ac_c" 1>&6
8485 else
8486   ac_save_LIBS="$LIBS"
8487 LIBS="-lwrap  $LIBS"
8488 cat > conftest.$ac_ext <<EOF
8489 #line 8490 "configure"
8490 #include "confdefs.h"
8491
8492 int main() {
8493 main()
8494 ; return 0; }
8495 EOF
8496 if { (eval echo configure:8497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8497   rm -rf conftest*
8498   eval "ac_cv_lib_$ac_lib_var=yes"
8499 else
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   eval "ac_cv_lib_$ac_lib_var=no"
8504 fi
8505 rm -f conftest*
8506 LIBS="$ac_save_LIBS"
8507
8508 fi
8509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8510   echo "$ac_t""yes" 1>&6
8511   have_wrappers=yes
8512 else
8513   echo "$ac_t""no" 1>&6
8514 have_wrappers=no
8515 fi
8516
8517         fi
8518
8519         if test $have_wrappers = yes ; then
8520                 cat >> confdefs.h <<\EOF
8521 #define HAVE_TCPD 1
8522 EOF
8523
8524                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8525
8526                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8527 echo "configure:8528: checking for main in -lnsl" >&5
8528 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
8529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8530   echo $ac_n "(cached) $ac_c" 1>&6
8531 else
8532   ac_save_LIBS="$LIBS"
8533 LIBS="-lnsl  $LIBS"
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537
8538 int main() {
8539 main()
8540 ; return 0; }
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8543   rm -rf conftest*
8544   eval "ac_cv_lib_$ac_lib_var=yes"
8545 else
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -rf conftest*
8549   eval "ac_cv_lib_$ac_lib_var=no"
8550 fi
8551 rm -f conftest*
8552 LIBS="$ac_save_LIBS"
8553
8554 fi
8555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8556   echo "$ac_t""yes" 1>&6
8557     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8558     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8559   cat >> confdefs.h <<EOF
8560 #define $ac_tr_lib 1
8561 EOF
8562
8563   LIBS="-lnsl $LIBS"
8564
8565 else
8566   echo "$ac_t""no" 1>&6
8567 fi
8568
8569         else
8570                 echo "configure: warning: could not find -lwrap" 1>&2
8571                 if test $ol_enable_wrappers = yes ; then
8572                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8573                 fi
8574
8575                 echo "configure: warning: disabling wrappers support" 1>&2
8576                 ol_enable_wrappers=no
8577         fi
8578 fi
8579
8580 if test $ol_enable_syslog != no ; then
8581         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8582 echo "configure:8583: checking for openlog" >&5
8583 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8584   echo $ac_n "(cached) $ac_c" 1>&6
8585 else
8586   cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 /* System header to define __stub macros and hopefully few prototypes,
8590     which can conflict with char openlog(); below.  */
8591 #include <assert.h>
8592 /* Override any gcc2 internal prototype to avoid an error.  */
8593 /* We use char because int might match the return type of a gcc2
8594     builtin and then its argument prototype would still apply.  */
8595 char openlog();
8596
8597 int main() {
8598
8599 /* The GNU C library defines this for functions which it implements
8600     to always fail with ENOSYS.  Some functions are actually named
8601     something starting with __ and the normal name is an alias.  */
8602 #if defined (__stub_openlog) || defined (__stub___openlog)
8603 choke me
8604 #else
8605 openlog();
8606 #endif
8607
8608 ; return 0; }
8609 EOF
8610 if { (eval echo configure:8611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8611   rm -rf conftest*
8612   eval "ac_cv_func_openlog=yes"
8613 else
8614   echo "configure: failed program was:" >&5
8615   cat conftest.$ac_ext >&5
8616   rm -rf conftest*
8617   eval "ac_cv_func_openlog=no"
8618 fi
8619 rm -f conftest*
8620 fi
8621
8622 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8623   echo "$ac_t""yes" 1>&6
8624   :
8625 else
8626   echo "$ac_t""no" 1>&6
8627 fi
8628
8629         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8630                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8631         fi
8632         ol_enable_syslog=$ac_cv_func_openlog
8633 fi
8634
8635 if test $ol_enable_dmalloc != no ; then
8636         for ac_hdr in dmalloc.h
8637 do
8638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8639 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8640 echo "configure:8641: checking for $ac_hdr" >&5
8641 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8642   echo $ac_n "(cached) $ac_c" 1>&6
8643 else
8644   cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 #include <$ac_hdr>
8648 EOF
8649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8650 { (eval echo configure:8651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8652 if test -z "$ac_err"; then
8653   rm -rf conftest*
8654   eval "ac_cv_header_$ac_safe=yes"
8655 else
8656   echo "$ac_err" >&5
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -rf conftest*
8660   eval "ac_cv_header_$ac_safe=no"
8661 fi
8662 rm -f conftest*
8663 fi
8664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8665   echo "$ac_t""yes" 1>&6
8666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8667   cat >> confdefs.h <<EOF
8668 #define $ac_tr_hdr 1
8669 EOF
8670  
8671 else
8672   echo "$ac_t""no" 1>&6
8673 fi
8674 done
8675
8676         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8677 echo "configure:8678: checking for dmalloc_shutdown in -ldmalloc" >&5
8678 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   ac_save_LIBS="$LIBS"
8683 LIBS="-ldmalloc  $LIBS"
8684 cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 /* Override any gcc2 internal prototype to avoid an error.  */
8688 /* We use char because int might match the return type of a gcc2
8689     builtin and then its argument prototype would still apply.  */
8690 char dmalloc_shutdown();
8691
8692 int main() {
8693 dmalloc_shutdown()
8694 ; return 0; }
8695 EOF
8696 if { (eval echo configure:8697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8697   rm -rf conftest*
8698   eval "ac_cv_lib_$ac_lib_var=yes"
8699 else
8700   echo "configure: failed program was:" >&5
8701   cat conftest.$ac_ext >&5
8702   rm -rf conftest*
8703   eval "ac_cv_lib_$ac_lib_var=no"
8704 fi
8705 rm -f conftest*
8706 LIBS="$ac_save_LIBS"
8707
8708 fi
8709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8710   echo "$ac_t""yes" 1>&6
8711     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8712     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8713   cat >> confdefs.h <<EOF
8714 #define $ac_tr_lib 1
8715 EOF
8716
8717   LIBS="-ldmalloc $LIBS"
8718
8719 else
8720   echo "$ac_t""no" 1>&6
8721 fi
8722
8723 fi
8724
8725 if test $ol_enable_tcl != no ; then
8726         for ac_hdr in tcl.h
8727 do
8728 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8729 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8730 echo "configure:8731: checking for $ac_hdr" >&5
8731 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8732   echo $ac_n "(cached) $ac_c" 1>&6
8733 else
8734   cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737 #include <$ac_hdr>
8738 EOF
8739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8740 { (eval echo configure:8741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8742 if test -z "$ac_err"; then
8743   rm -rf conftest*
8744   eval "ac_cv_header_$ac_safe=yes"
8745 else
8746   echo "$ac_err" >&5
8747   echo "configure: failed program was:" >&5
8748   cat conftest.$ac_ext >&5
8749   rm -rf conftest*
8750   eval "ac_cv_header_$ac_safe=no"
8751 fi
8752 rm -f conftest*
8753 fi
8754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8755   echo "$ac_t""yes" 1>&6
8756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8757   cat >> confdefs.h <<EOF
8758 #define $ac_tr_hdr 1
8759 EOF
8760  
8761 else
8762   echo "$ac_t""no" 1>&6
8763 fi
8764 done
8765
8766
8767         if test $ac_cv_header_tcl_h != yes ; then
8768                 have_tcl=no
8769         else
8770                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8771 echo "configure:8772: checking for main in -ltcl" >&5
8772 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8774   echo $ac_n "(cached) $ac_c" 1>&6
8775 else
8776   ac_save_LIBS="$LIBS"
8777 LIBS="-ltcl  $LIBS"
8778 cat > conftest.$ac_ext <<EOF
8779 #line 8780 "configure"
8780 #include "confdefs.h"
8781
8782 int main() {
8783 main()
8784 ; return 0; }
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8787   rm -rf conftest*
8788   eval "ac_cv_lib_$ac_lib_var=yes"
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -rf conftest*
8793   eval "ac_cv_lib_$ac_lib_var=no"
8794 fi
8795 rm -f conftest*
8796 LIBS="$ac_save_LIBS"
8797
8798 fi
8799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8800   echo "$ac_t""yes" 1>&6
8801   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8802 else
8803   echo "$ac_t""no" 1>&6
8804 have_tcl=no
8805 fi
8806
8807
8808                 if test $have_tcl != yes; then
8809                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8810 echo "configure:8811: checking for main in -ltcl7.6" >&5
8811 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8813   echo $ac_n "(cached) $ac_c" 1>&6
8814 else
8815   ac_save_LIBS="$LIBS"
8816 LIBS="-ltcl7.6  $LIBS"
8817 cat > conftest.$ac_ext <<EOF
8818 #line 8819 "configure"
8819 #include "confdefs.h"
8820
8821 int main() {
8822 main()
8823 ; return 0; }
8824 EOF
8825 if { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8826   rm -rf conftest*
8827   eval "ac_cv_lib_$ac_lib_var=yes"
8828 else
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -rf conftest*
8832   eval "ac_cv_lib_$ac_lib_var=no"
8833 fi
8834 rm -f conftest*
8835 LIBS="$ac_save_LIBS"
8836
8837 fi
8838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8839   echo "$ac_t""yes" 1>&6
8840   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8841 else
8842   echo "$ac_t""no" 1>&6
8843 have_tcl=no
8844 fi
8845
8846                 fi
8847
8848                 if test $have_tcl != yes; then
8849                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8850 echo "configure:8851: checking for main in -ltcl8.0" >&5
8851 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   ac_save_LIBS="$LIBS"
8856 LIBS="-ltcl8.0  $LIBS"
8857 cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860
8861 int main() {
8862 main()
8863 ; return 0; }
8864 EOF
8865 if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8866   rm -rf conftest*
8867   eval "ac_cv_lib_$ac_lib_var=yes"
8868 else
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   eval "ac_cv_lib_$ac_lib_var=no"
8873 fi
8874 rm -f conftest*
8875 LIBS="$ac_save_LIBS"
8876
8877 fi
8878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8879   echo "$ac_t""yes" 1>&6
8880   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8881 else
8882   echo "$ac_t""no" 1>&6
8883 have_tcl=no
8884 fi
8885
8886                 fi
8887         fi
8888
8889         if test $have_tcl != yes ; then
8890                 echo "configure: warning: could not find -ltcl" 1>&2
8891                 if test $ol_enable_tcl = yes ; then
8892                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8893                 fi
8894
8895                 ol_enable_tcl=no
8896         fi
8897 fi
8898
8899 # ud needs termcap (should insert check here)
8900 ol_link_termcap=no
8901 for ac_hdr in termcap.h ncurses.h
8902 do
8903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8905 echo "configure:8906: checking for $ac_hdr" >&5
8906 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8907   echo $ac_n "(cached) $ac_c" 1>&6
8908 else
8909   cat > conftest.$ac_ext <<EOF
8910 #line 8911 "configure"
8911 #include "confdefs.h"
8912 #include <$ac_hdr>
8913 EOF
8914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8915 { (eval echo configure:8916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8917 if test -z "$ac_err"; then
8918   rm -rf conftest*
8919   eval "ac_cv_header_$ac_safe=yes"
8920 else
8921   echo "$ac_err" >&5
8922   echo "configure: failed program was:" >&5
8923   cat conftest.$ac_ext >&5
8924   rm -rf conftest*
8925   eval "ac_cv_header_$ac_safe=no"
8926 fi
8927 rm -f conftest*
8928 fi
8929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8930   echo "$ac_t""yes" 1>&6
8931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8932   cat >> confdefs.h <<EOF
8933 #define $ac_tr_hdr 1
8934 EOF
8935  
8936 else
8937   echo "$ac_t""no" 1>&6
8938 fi
8939 done
8940
8941
8942 if test $ol_link_termcap = no ; then
8943         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8944 echo "configure:8945: checking for tputs in -ltermcap" >&5
8945 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8946 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8947   echo $ac_n "(cached) $ac_c" 1>&6
8948 else
8949   ac_save_LIBS="$LIBS"
8950 LIBS="-ltermcap  $LIBS"
8951 cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 /* Override any gcc2 internal prototype to avoid an error.  */
8955 /* We use char because int might match the return type of a gcc2
8956     builtin and then its argument prototype would still apply.  */
8957 char tputs();
8958
8959 int main() {
8960 tputs()
8961 ; return 0; }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8964   rm -rf conftest*
8965   eval "ac_cv_lib_$ac_lib_var=yes"
8966 else
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_lib_$ac_lib_var=no"
8971 fi
8972 rm -f conftest*
8973 LIBS="$ac_save_LIBS"
8974
8975 fi
8976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978   have_termcap=yes
8979 else
8980   echo "$ac_t""no" 1>&6
8981 have_termcap=no
8982 fi
8983
8984         if test $have_termcap = yes ; then
8985                 cat >> confdefs.h <<\EOF
8986 #define HAVE_TERMCAP 1
8987 EOF
8988
8989                 ol_link_termcap=yes
8990                 TERMCAP_LIBS=-ltermcap
8991         fi
8992 fi
8993
8994 if test $ol_link_termcap = no ; then
8995         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8996 echo "configure:8997: checking for initscr in -lncurses" >&5
8997 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8999   echo $ac_n "(cached) $ac_c" 1>&6
9000 else
9001   ac_save_LIBS="$LIBS"
9002 LIBS="-lncurses  $LIBS"
9003 cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* Override any gcc2 internal prototype to avoid an error.  */
9007 /* We use char because int might match the return type of a gcc2
9008     builtin and then its argument prototype would still apply.  */
9009 char initscr();
9010
9011 int main() {
9012 initscr()
9013 ; return 0; }
9014 EOF
9015 if { (eval echo configure:9016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9016   rm -rf conftest*
9017   eval "ac_cv_lib_$ac_lib_var=yes"
9018 else
9019   echo "configure: failed program was:" >&5
9020   cat conftest.$ac_ext >&5
9021   rm -rf conftest*
9022   eval "ac_cv_lib_$ac_lib_var=no"
9023 fi
9024 rm -f conftest*
9025 LIBS="$ac_save_LIBS"
9026
9027 fi
9028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9029   echo "$ac_t""yes" 1>&6
9030   have_ncurses=yes
9031 else
9032   echo "$ac_t""no" 1>&6
9033 have_ncurses=no
9034 fi
9035
9036         if test $have_ncurses = yes ; then
9037                 cat >> confdefs.h <<\EOF
9038 #define HAVE_NCURSES 1
9039 EOF
9040
9041                 ol_link_termcap=yes
9042                 TERMCAP_LIBS=-lncurses
9043         fi
9044 fi
9045
9046 if test $ol_link_termcap = no ; then
9047         cat >> confdefs.h <<\EOF
9048 #define NO_TERMCAP 1
9049 EOF
9050
9051         TERMCAP_LIBS=
9052 fi
9053
9054 ol_link_readline=no
9055 if test $ol_with_readline != no ; then
9056         for ac_hdr in readline/readline.h readline/history.h
9057 do
9058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9060 echo "configure:9061: checking for $ac_hdr" >&5
9061 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9062   echo $ac_n "(cached) $ac_c" 1>&6
9063 else
9064   cat > conftest.$ac_ext <<EOF
9065 #line 9066 "configure"
9066 #include "confdefs.h"
9067 #include <$ac_hdr>
9068 EOF
9069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9070 { (eval echo configure:9071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9072 if test -z "$ac_err"; then
9073   rm -rf conftest*
9074   eval "ac_cv_header_$ac_safe=yes"
9075 else
9076   echo "$ac_err" >&5
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -rf conftest*
9080   eval "ac_cv_header_$ac_safe=no"
9081 fi
9082 rm -f conftest*
9083 fi
9084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9085   echo "$ac_t""yes" 1>&6
9086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9087   cat >> confdefs.h <<EOF
9088 #define $ac_tr_hdr 1
9089 EOF
9090  
9091 else
9092   echo "$ac_t""no" 1>&6
9093 fi
9094 done
9095
9096
9097         if test $ac_cv_header_readline_readline_h = yes ; then
9098                 save_LIBS="$LIBS"
9099                 LIBS="$TERMCAP_LIBS $LIBS"
9100                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9101 echo "configure:9102: checking for readline in -lreadline" >&5
9102 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
9103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106   ac_save_LIBS="$LIBS"
9107 LIBS="-lreadline  $LIBS"
9108 cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111 /* Override any gcc2 internal prototype to avoid an error.  */
9112 /* We use char because int might match the return type of a gcc2
9113     builtin and then its argument prototype would still apply.  */
9114 char readline();
9115
9116 int main() {
9117 readline()
9118 ; return 0; }
9119 EOF
9120 if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9121   rm -rf conftest*
9122   eval "ac_cv_lib_$ac_lib_var=yes"
9123 else
9124   echo "configure: failed program was:" >&5
9125   cat conftest.$ac_ext >&5
9126   rm -rf conftest*
9127   eval "ac_cv_lib_$ac_lib_var=no"
9128 fi
9129 rm -f conftest*
9130 LIBS="$ac_save_LIBS"
9131
9132 fi
9133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9134   echo "$ac_t""yes" 1>&6
9135   have_readline=yes
9136 else
9137   echo "$ac_t""no" 1>&6
9138 have_readline=no
9139 fi
9140
9141                 LIBS="$save_LIBS"
9142                         
9143                 if test $have_readline = yes ; then
9144                         ol_with_readline=found
9145                         ol_link_readline=yes
9146
9147                         READLINE_LIBS="-lreadline"
9148                 fi
9149         fi
9150 fi
9151
9152 if test $ol_link_readline = yes ; then
9153         cat >> confdefs.h <<\EOF
9154 #define HAVE_READLINE 1
9155 EOF
9156
9157 fi
9158
9159
9160 # FreeBSD (and others) have crypt(3) in -lcrypt
9161 if test $ol_enable_crypt != no ; then
9162         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9163 echo "configure:9164: checking for crypt" >&5
9164 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
9165   echo $ac_n "(cached) $ac_c" 1>&6
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 /* System header to define __stub macros and hopefully few prototypes,
9171     which can conflict with char crypt(); below.  */
9172 #include <assert.h>
9173 /* Override any gcc2 internal prototype to avoid an error.  */
9174 /* We use char because int might match the return type of a gcc2
9175     builtin and then its argument prototype would still apply.  */
9176 char crypt();
9177
9178 int main() {
9179
9180 /* The GNU C library defines this for functions which it implements
9181     to always fail with ENOSYS.  Some functions are actually named
9182     something starting with __ and the normal name is an alias.  */
9183 #if defined (__stub_crypt) || defined (__stub___crypt)
9184 choke me
9185 #else
9186 crypt();
9187 #endif
9188
9189 ; return 0; }
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192   rm -rf conftest*
9193   eval "ac_cv_func_crypt=yes"
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   eval "ac_cv_func_crypt=no"
9199 fi
9200 rm -f conftest*
9201 fi
9202
9203 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
9204   echo "$ac_t""yes" 1>&6
9205   have_crypt=yes
9206 else
9207   echo "$ac_t""no" 1>&6
9208
9209                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9210 echo "configure:9211: checking for crypt in -lcrypt" >&5
9211 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9212 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9213   echo $ac_n "(cached) $ac_c" 1>&6
9214 else
9215   ac_save_LIBS="$LIBS"
9216 LIBS="-lcrypt  $LIBS"
9217 cat > conftest.$ac_ext <<EOF
9218 #line 9219 "configure"
9219 #include "confdefs.h"
9220 /* Override any gcc2 internal prototype to avoid an error.  */
9221 /* We use char because int might match the return type of a gcc2
9222     builtin and then its argument prototype would still apply.  */
9223 char crypt();
9224
9225 int main() {
9226 crypt()
9227 ; return 0; }
9228 EOF
9229 if { (eval echo configure:9230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9230   rm -rf conftest*
9231   eval "ac_cv_lib_$ac_lib_var=yes"
9232 else
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -rf conftest*
9236   eval "ac_cv_lib_$ac_lib_var=no"
9237 fi
9238 rm -f conftest*
9239 LIBS="$ac_save_LIBS"
9240
9241 fi
9242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9243   echo "$ac_t""yes" 1>&6
9244   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
9245                         have_crypt=yes
9246 else
9247   echo "$ac_t""no" 1>&6
9248 have_crypt=no
9249 fi
9250
9251 fi
9252
9253
9254         if test $have_crypt = yes ; then
9255                 cat >> confdefs.h <<\EOF
9256 #define HAVE_CRYPT 1
9257 EOF
9258
9259         else
9260                 echo "configure: warning: could not find crypt" 1>&2
9261                 if test $ol_enable_crypt = yes ; then
9262                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
9263                 fi
9264
9265                 echo "configure: warning: disabling crypt support" 1>&2
9266                 ol_enable_crypt=no
9267         fi
9268 fi
9269
9270 # FreeBSD (and others) have setproctitle(3) in -lutil
9271 if test $ol_enable_proctitle != no ; then
9272         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
9273 echo "configure:9274: checking for setproctitle" >&5
9274 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280 /* System header to define __stub macros and hopefully few prototypes,
9281     which can conflict with char setproctitle(); below.  */
9282 #include <assert.h>
9283 /* Override any gcc2 internal prototype to avoid an error.  */
9284 /* We use char because int might match the return type of a gcc2
9285     builtin and then its argument prototype would still apply.  */
9286 char setproctitle();
9287
9288 int main() {
9289
9290 /* The GNU C library defines this for functions which it implements
9291     to always fail with ENOSYS.  Some functions are actually named
9292     something starting with __ and the normal name is an alias.  */
9293 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
9294 choke me
9295 #else
9296 setproctitle();
9297 #endif
9298
9299 ; return 0; }
9300 EOF
9301 if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9302   rm -rf conftest*
9303   eval "ac_cv_func_setproctitle=yes"
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_func_setproctitle=no"
9309 fi
9310 rm -f conftest*
9311 fi
9312
9313 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
9314   echo "$ac_t""yes" 1>&6
9315   have_setproctitle=yes
9316 else
9317   echo "$ac_t""no" 1>&6
9318
9319                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9320 echo "configure:9321: checking for setproctitle in -lutil" >&5
9321 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9322 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9323   echo $ac_n "(cached) $ac_c" 1>&6
9324 else
9325   ac_save_LIBS="$LIBS"
9326 LIBS="-lutil  $LIBS"
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330 /* Override any gcc2 internal prototype to avoid an error.  */
9331 /* We use char because int might match the return type of a gcc2
9332     builtin and then its argument prototype would still apply.  */
9333 char setproctitle();
9334
9335 int main() {
9336 setproctitle()
9337 ; return 0; }
9338 EOF
9339 if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9340   rm -rf conftest*
9341   eval "ac_cv_lib_$ac_lib_var=yes"
9342 else
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -rf conftest*
9346   eval "ac_cv_lib_$ac_lib_var=no"
9347 fi
9348 rm -f conftest*
9349 LIBS="$ac_save_LIBS"
9350
9351 fi
9352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9353   echo "$ac_t""yes" 1>&6
9354   have_setproctitle=yes
9355                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9356 else
9357   echo "$ac_t""no" 1>&6
9358 have_setproctitle=no
9359                         LIBOBJS="$LIBOBJS setproctitle.o"
9360 fi
9361
9362 fi
9363
9364
9365         if test $have_setproctitle = yes ; then
9366                 cat >> confdefs.h <<\EOF
9367 #define HAVE_SETPROCTITLE 1
9368 EOF
9369
9370         fi
9371 fi
9372
9373 # test for EBCDIC
9374 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9375 echo "configure:9376: checking for EBCDIC" >&5
9376 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9377   echo $ac_n "(cached) $ac_c" 1>&6
9378 else
9379   
9380         cat > conftest.$ac_ext <<EOF
9381 #line 9382 "configure"
9382 #include "confdefs.h"
9383
9384 #if !('M' == 0xd4)
9385 #include <__ASCII__/generate_error.h>
9386 #endif
9387
9388 EOF
9389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9390 { (eval echo configure:9391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9392 if test -z "$ac_err"; then
9393   rm -rf conftest*
9394   ol_cv_cpp_ebcdic=yes
9395 else
9396   echo "$ac_err" >&5
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -rf conftest*
9400   ol_cv_cpp_ebcdic=no
9401 fi
9402 rm -f conftest*
9403 fi
9404
9405 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9406 if test $ol_cv_cpp_ebcdic = yes ; then
9407         cat >> confdefs.h <<\EOF
9408 #define HAVE_EBCDIC 1
9409 EOF
9410
9411 fi
9412
9413 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9414 echo "configure:9415: checking for ANSI C header files" >&5
9415 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9416   echo $ac_n "(cached) $ac_c" 1>&6
9417 else
9418   cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421 #include <stdlib.h>
9422 #include <stdarg.h>
9423 #include <string.h>
9424 #include <float.h>
9425 EOF
9426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9427 { (eval echo configure:9428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9429 if test -z "$ac_err"; then
9430   rm -rf conftest*
9431   ol_cv_header_stdc=yes
9432 else
9433   echo "$ac_err" >&5
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   ol_cv_header_stdc=no
9438 fi
9439 rm -f conftest*
9440
9441 if test $ol_cv_header_stdc = yes; then
9442   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #include <string.h>
9447 EOF
9448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9449   egrep "memchr" >/dev/null 2>&1; then
9450   :
9451 else
9452   rm -rf conftest*
9453   ol_cv_header_stdc=no
9454 fi
9455 rm -f conftest*
9456
9457 fi
9458
9459 if test $ol_cv_header_stdc = yes; then
9460   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9461 cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464 #include <stdlib.h>
9465 EOF
9466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9467   egrep "free" >/dev/null 2>&1; then
9468   :
9469 else
9470   rm -rf conftest*
9471   ol_cv_header_stdc=no
9472 fi
9473 rm -f conftest*
9474
9475 fi
9476
9477 if test $ol_cv_header_stdc = yes; then
9478   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9479 if test "$cross_compiling" = yes; then
9480   :
9481 else
9482   cat > conftest.$ac_ext <<EOF
9483 #line 9484 "configure"
9484 #include "confdefs.h"
9485 #include <ctype.h>
9486 #ifndef HAVE_EBCDIC
9487 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9488 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9489 #else
9490 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9491                 || ('j' <= (c) && (c) <= 'r') \
9492                 || ('s' <= (c) && (c) <= 'z'))
9493 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9494 #endif
9495 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9496 int main () { int i; for (i = 0; i < 256; i++)
9497 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9498 exit (0); }
9499
9500 EOF
9501 if { (eval echo configure:9502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9502 then
9503   :
9504 else
9505   echo "configure: failed program was:" >&5
9506   cat conftest.$ac_ext >&5
9507   rm -fr conftest*
9508   ol_cv_header_stdc=no
9509 fi
9510 rm -fr conftest*
9511 fi
9512
9513 fi
9514 fi
9515
9516 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9517 if test $ol_cv_header_stdc = yes; then
9518   cat >> confdefs.h <<\EOF
9519 #define STDC_HEADERS 1
9520 EOF
9521
9522 fi
9523 ac_cv_header_stdc=disable
9524
9525
9526 if test $ol_cv_header_stdc != yes; then
9527         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9528 fi
9529
9530 ac_header_dirent=no
9531 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9532 do
9533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9534 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9535 echo "configure:9536: checking for $ac_hdr that defines DIR" >&5
9536 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9537   echo $ac_n "(cached) $ac_c" 1>&6
9538 else
9539   cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 #include <sys/types.h>
9543 #include <$ac_hdr>
9544 int main() {
9545 DIR *dirp = 0;
9546 ; return 0; }
9547 EOF
9548 if { (eval echo configure:9549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9549   rm -rf conftest*
9550   eval "ac_cv_header_dirent_$ac_safe=yes"
9551 else
9552   echo "configure: failed program was:" >&5
9553   cat conftest.$ac_ext >&5
9554   rm -rf conftest*
9555   eval "ac_cv_header_dirent_$ac_safe=no"
9556 fi
9557 rm -f conftest*
9558 fi
9559 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9560   echo "$ac_t""yes" 1>&6
9561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9562   cat >> confdefs.h <<EOF
9563 #define $ac_tr_hdr 1
9564 EOF
9565  ac_header_dirent=$ac_hdr; break
9566 else
9567   echo "$ac_t""no" 1>&6
9568 fi
9569 done
9570 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9571 if test $ac_header_dirent = dirent.h; then
9572 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9573 echo "configure:9574: checking for opendir in -ldir" >&5
9574 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9575 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9576   echo $ac_n "(cached) $ac_c" 1>&6
9577 else
9578   ac_save_LIBS="$LIBS"
9579 LIBS="-ldir  $LIBS"
9580 cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* Override any gcc2 internal prototype to avoid an error.  */
9584 /* We use char because int might match the return type of a gcc2
9585     builtin and then its argument prototype would still apply.  */
9586 char opendir();
9587
9588 int main() {
9589 opendir()
9590 ; return 0; }
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9593   rm -rf conftest*
9594   eval "ac_cv_lib_$ac_lib_var=yes"
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   eval "ac_cv_lib_$ac_lib_var=no"
9600 fi
9601 rm -f conftest*
9602 LIBS="$ac_save_LIBS"
9603
9604 fi
9605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9606   echo "$ac_t""yes" 1>&6
9607   LIBS="$LIBS -ldir"
9608 else
9609   echo "$ac_t""no" 1>&6
9610 fi
9611
9612 else
9613 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9614 echo "configure:9615: checking for opendir in -lx" >&5
9615 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9616 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9617   echo $ac_n "(cached) $ac_c" 1>&6
9618 else
9619   ac_save_LIBS="$LIBS"
9620 LIBS="-lx  $LIBS"
9621 cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 /* Override any gcc2 internal prototype to avoid an error.  */
9625 /* We use char because int might match the return type of a gcc2
9626     builtin and then its argument prototype would still apply.  */
9627 char opendir();
9628
9629 int main() {
9630 opendir()
9631 ; return 0; }
9632 EOF
9633 if { (eval echo configure:9634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9634   rm -rf conftest*
9635   eval "ac_cv_lib_$ac_lib_var=yes"
9636 else
9637   echo "configure: failed program was:" >&5
9638   cat conftest.$ac_ext >&5
9639   rm -rf conftest*
9640   eval "ac_cv_lib_$ac_lib_var=no"
9641 fi
9642 rm -f conftest*
9643 LIBS="$ac_save_LIBS"
9644
9645 fi
9646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9647   echo "$ac_t""yes" 1>&6
9648   LIBS="$LIBS -lx"
9649 else
9650   echo "$ac_t""no" 1>&6
9651 fi
9652
9653 fi
9654
9655 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9656 echo "configure:9657: checking for sys/wait.h that is POSIX.1 compatible" >&5
9657 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9658   echo $ac_n "(cached) $ac_c" 1>&6
9659 else
9660   cat > conftest.$ac_ext <<EOF
9661 #line 9662 "configure"
9662 #include "confdefs.h"
9663 #include <sys/types.h>
9664 #include <sys/wait.h>
9665 #ifndef WEXITSTATUS
9666 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9667 #endif
9668 #ifndef WIFEXITED
9669 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9670 #endif
9671 int main() {
9672 int s;
9673 wait (&s);
9674 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9675 ; return 0; }
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9678   rm -rf conftest*
9679   ac_cv_header_sys_wait_h=yes
9680 else
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -rf conftest*
9684   ac_cv_header_sys_wait_h=no
9685 fi
9686 rm -f conftest*
9687 fi
9688
9689 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9690 if test $ac_cv_header_sys_wait_h = yes; then
9691   cat >> confdefs.h <<\EOF
9692 #define HAVE_SYS_WAIT_H 1
9693 EOF
9694
9695 fi
9696
9697 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9698 echo "configure:9699: checking POSIX termios" >&5
9699 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9700   echo $ac_n "(cached) $ac_c" 1>&6
9701 else
9702   cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 #include <sys/types.h>
9706 #include <unistd.h>
9707 #include <termios.h>
9708 int main() {
9709 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9710    tcgetattr(0, 0);
9711 ; return 0; }
9712 EOF
9713 if { (eval echo configure:9714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9714   rm -rf conftest*
9715   am_cv_sys_posix_termios=yes
9716 else
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719   rm -rf conftest*
9720   am_cv_sys_posix_termios=no
9721 fi
9722 rm -f conftest*
9723 fi
9724
9725 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9726
9727
9728  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9729 echo "configure:9730: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9730 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9731   echo $ac_n "(cached) $ac_c" 1>&6
9732 else
9733   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9734
9735   gwinsz_in_termios_h=no
9736   if test $am_cv_sys_posix_termios = yes; then
9737     cat > conftest.$ac_ext <<EOF
9738 #line 9739 "configure"
9739 #include "confdefs.h"
9740 #include <sys/types.h>
9741 #     include <termios.h>
9742 #     ifdef TIOCGWINSZ
9743         yes
9744 #     endif
9745     
9746 EOF
9747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9748   egrep "yes" >/dev/null 2>&1; then
9749   rm -rf conftest*
9750   gwinsz_in_termios_h=yes
9751 fi
9752 rm -f conftest*
9753
9754   fi
9755
9756   if test $gwinsz_in_termios_h = no; then
9757     cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 #include <sys/types.h>
9761 #     include <sys/ioctl.h>
9762 #     ifdef TIOCGWINSZ
9763         yes
9764 #     endif
9765     
9766 EOF
9767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9768   egrep "yes" >/dev/null 2>&1; then
9769   rm -rf conftest*
9770   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9771 fi
9772 rm -f conftest*
9773
9774   fi
9775   
9776 fi
9777
9778 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9779   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9780     cat >> confdefs.h <<\EOF
9781 #define GWINSZ_IN_SYS_IOCTL 1
9782 EOF
9783
9784   fi
9785
9786 if test $am_cv_sys_posix_termios = yes ; then
9787         cat >> confdefs.h <<\EOF
9788 #define HAVE_POSIX_TERMIOS 1
9789 EOF
9790
9791 fi
9792
9793 for ac_hdr in \
9794         arpa/inet.h             \
9795         arpa/nameser.h  \
9796         assert.h                \
9797         crypt.h                 \
9798         errno.h                 \
9799         fcntl.h                 \
9800         filio.h                 \
9801         getopt.h                \
9802         grp.h                   \
9803         libutil.h               \
9804         limits.h                \
9805         locale.h                \
9806         malloc.h                \
9807         memory.h                \
9808         psap.h                  \
9809         pwd.h                   \
9810         resolv.h                \
9811         sgtty.h                 \
9812         stdarg.h                \
9813         stddef.h                \
9814         string.h                \
9815         strings.h               \
9816         sysexits.h              \
9817         sys/file.h              \
9818         sys/filio.h             \
9819         sys/errno.h             \
9820         sys/ioctl.h             \
9821         sys/param.h             \
9822         sys/resource.h  \
9823         sys/select.h    \
9824         sys/socket.h    \
9825         sys/syslog.h    \
9826         sys/time.h              \
9827         sys/types.h             \
9828         syslog.h                \
9829         termios.h               \
9830         unistd.h                \
9831
9832 do
9833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9835 echo "configure:9836: checking for $ac_hdr" >&5
9836 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 #include <$ac_hdr>
9843 EOF
9844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9845 { (eval echo configure:9846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9847 if test -z "$ac_err"; then
9848   rm -rf conftest*
9849   eval "ac_cv_header_$ac_safe=yes"
9850 else
9851   echo "$ac_err" >&5
9852   echo "configure: failed program was:" >&5
9853   cat conftest.$ac_ext >&5
9854   rm -rf conftest*
9855   eval "ac_cv_header_$ac_safe=no"
9856 fi
9857 rm -f conftest*
9858 fi
9859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9860   echo "$ac_t""yes" 1>&6
9861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9862   cat >> confdefs.h <<EOF
9863 #define $ac_tr_hdr 1
9864 EOF
9865  
9866 else
9867   echo "$ac_t""no" 1>&6
9868 fi
9869 done
9870
9871
9872 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9873 echo "configure:9874: checking for uid_t in sys/types.h" >&5
9874 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9875   echo $ac_n "(cached) $ac_c" 1>&6
9876 else
9877   cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 #include <sys/types.h>
9881 EOF
9882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9883   egrep "uid_t" >/dev/null 2>&1; then
9884   rm -rf conftest*
9885   ac_cv_type_uid_t=yes
9886 else
9887   rm -rf conftest*
9888   ac_cv_type_uid_t=no
9889 fi
9890 rm -f conftest*
9891
9892 fi
9893
9894 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9895 if test $ac_cv_type_uid_t = no; then
9896   cat >> confdefs.h <<\EOF
9897 #define uid_t int
9898 EOF
9899
9900   cat >> confdefs.h <<\EOF
9901 #define gid_t int
9902 EOF
9903
9904 fi
9905
9906 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9907 echo "configure:9908: checking type of array argument to getgroups" >&5
9908 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9909   echo $ac_n "(cached) $ac_c" 1>&6
9910 else
9911   if test "$cross_compiling" = yes; then
9912   ac_cv_type_getgroups=cross
9913 else
9914   cat > conftest.$ac_ext <<EOF
9915 #line 9916 "configure"
9916 #include "confdefs.h"
9917
9918 /* Thanks to Mike Rendell for this test.  */
9919 #include <sys/types.h>
9920 #define NGID 256
9921 #undef MAX
9922 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9923 main()
9924 {
9925   gid_t gidset[NGID];
9926   int i, n;
9927   union { gid_t gval; long lval; }  val;
9928
9929   val.lval = -1;
9930   for (i = 0; i < NGID; i++)
9931     gidset[i] = val.gval;
9932   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9933                  gidset);
9934   /* Exit non-zero if getgroups seems to require an array of ints.  This
9935      happens when gid_t is short but getgroups modifies an array of ints.  */
9936   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9937 }
9938
9939 EOF
9940 if { (eval echo configure:9941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9941 then
9942     ac_cv_type_getgroups=gid_t
9943 else
9944   echo "configure: failed program was:" >&5
9945   cat conftest.$ac_ext >&5
9946   rm -fr conftest*
9947   ac_cv_type_getgroups=int
9948 fi
9949 rm -fr conftest*
9950 fi
9951
9952 if test $ac_cv_type_getgroups = cross; then
9953         cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956 #include <unistd.h>
9957 EOF
9958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9959   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9960   rm -rf conftest*
9961   ac_cv_type_getgroups=gid_t
9962 else
9963   rm -rf conftest*
9964   ac_cv_type_getgroups=int
9965 fi
9966 rm -f conftest*
9967
9968 fi
9969 fi
9970
9971 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9972 cat >> confdefs.h <<EOF
9973 #define GETGROUPS_T $ac_cv_type_getgroups
9974 EOF
9975
9976  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9977 echo "configure:9978: checking for ANSI C header files" >&5
9978 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9979   echo $ac_n "(cached) $ac_c" 1>&6
9980 else
9981   cat > conftest.$ac_ext <<EOF
9982 #line 9983 "configure"
9983 #include "confdefs.h"
9984 #include <stdlib.h>
9985 #include <stdarg.h>
9986 #include <string.h>
9987 #include <float.h>
9988 EOF
9989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9990 { (eval echo configure:9991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9992 if test -z "$ac_err"; then
9993   rm -rf conftest*
9994   ac_cv_header_stdc=yes
9995 else
9996   echo "$ac_err" >&5
9997   echo "configure: failed program was:" >&5
9998   cat conftest.$ac_ext >&5
9999   rm -rf conftest*
10000   ac_cv_header_stdc=no
10001 fi
10002 rm -f conftest*
10003
10004 if test $ac_cv_header_stdc = yes; then
10005   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10006 cat > conftest.$ac_ext <<EOF
10007 #line 10008 "configure"
10008 #include "confdefs.h"
10009 #include <string.h>
10010 EOF
10011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10012   egrep "memchr" >/dev/null 2>&1; then
10013   :
10014 else
10015   rm -rf conftest*
10016   ac_cv_header_stdc=no
10017 fi
10018 rm -f conftest*
10019
10020 fi
10021
10022 if test $ac_cv_header_stdc = yes; then
10023   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10024 cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 #include <stdlib.h>
10028 EOF
10029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10030   egrep "free" >/dev/null 2>&1; then
10031   :
10032 else
10033   rm -rf conftest*
10034   ac_cv_header_stdc=no
10035 fi
10036 rm -f conftest*
10037
10038 fi
10039
10040 if test $ac_cv_header_stdc = yes; then
10041   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10042 if test "$cross_compiling" = yes; then
10043   :
10044 else
10045   cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048 #include <ctype.h>
10049 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10050 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10051 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10052 int main () { int i; for (i = 0; i < 256; i++)
10053 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10054 exit (0); }
10055
10056 EOF
10057 if { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10058 then
10059   :
10060 else
10061   echo "configure: failed program was:" >&5
10062   cat conftest.$ac_ext >&5
10063   rm -fr conftest*
10064   ac_cv_header_stdc=no
10065 fi
10066 rm -fr conftest*
10067 fi
10068
10069 fi
10070 fi
10071
10072 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10073 if test $ac_cv_header_stdc = yes; then
10074   cat >> confdefs.h <<\EOF
10075 #define STDC_HEADERS 1
10076 EOF
10077
10078 fi
10079
10080 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10081 echo "configure:10082: checking for mode_t" >&5
10082 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
10083   echo $ac_n "(cached) $ac_c" 1>&6
10084 else
10085   cat > conftest.$ac_ext <<EOF
10086 #line 10087 "configure"
10087 #include "confdefs.h"
10088 #include <sys/types.h>
10089 #if STDC_HEADERS
10090 #include <stdlib.h>
10091 #include <stddef.h>
10092 #endif
10093 EOF
10094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10095   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10096   rm -rf conftest*
10097   ac_cv_type_mode_t=yes
10098 else
10099   rm -rf conftest*
10100   ac_cv_type_mode_t=no
10101 fi
10102 rm -f conftest*
10103
10104 fi
10105 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
10106 if test $ac_cv_type_mode_t = no; then
10107   cat >> confdefs.h <<\EOF
10108 #define mode_t int
10109 EOF
10110
10111 fi
10112
10113 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10114 echo "configure:10115: checking for off_t" >&5
10115 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
10116   echo $ac_n "(cached) $ac_c" 1>&6
10117 else
10118   cat > conftest.$ac_ext <<EOF
10119 #line 10120 "configure"
10120 #include "confdefs.h"
10121 #include <sys/types.h>
10122 #if STDC_HEADERS
10123 #include <stdlib.h>
10124 #include <stddef.h>
10125 #endif
10126 EOF
10127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10128   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10129   rm -rf conftest*
10130   ac_cv_type_off_t=yes
10131 else
10132   rm -rf conftest*
10133   ac_cv_type_off_t=no
10134 fi
10135 rm -f conftest*
10136
10137 fi
10138 echo "$ac_t""$ac_cv_type_off_t" 1>&6
10139 if test $ac_cv_type_off_t = no; then
10140   cat >> confdefs.h <<\EOF
10141 #define off_t long
10142 EOF
10143
10144 fi
10145
10146 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10147 echo "configure:10148: checking for pid_t" >&5
10148 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 #include <sys/types.h>
10155 #if STDC_HEADERS
10156 #include <stdlib.h>
10157 #include <stddef.h>
10158 #endif
10159 EOF
10160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10161   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10162   rm -rf conftest*
10163   ac_cv_type_pid_t=yes
10164 else
10165   rm -rf conftest*
10166   ac_cv_type_pid_t=no
10167 fi
10168 rm -f conftest*
10169
10170 fi
10171 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
10172 if test $ac_cv_type_pid_t = no; then
10173   cat >> confdefs.h <<\EOF
10174 #define pid_t int
10175 EOF
10176
10177 fi
10178
10179 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10180 echo "configure:10181: checking for ptrdiff_t" >&5
10181 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
10182   echo $ac_n "(cached) $ac_c" 1>&6
10183 else
10184   cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187 #include <stddef.h>
10188 int main() {
10189 ptrdiff_t p
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10193   rm -rf conftest*
10194   am_cv_type_ptrdiff_t=yes
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   am_cv_type_ptrdiff_t=no
10200 fi
10201 rm -f conftest*
10202 fi
10203
10204 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10205    if test $am_cv_type_ptrdiff_t = yes; then
10206      cat >> confdefs.h <<\EOF
10207 #define HAVE_PTRDIFF_T 1
10208 EOF
10209
10210    fi
10211
10212 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10213 echo "configure:10214: checking return type of signal handlers" >&5
10214 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
10215   echo $ac_n "(cached) $ac_c" 1>&6
10216 else
10217   cat > conftest.$ac_ext <<EOF
10218 #line 10219 "configure"
10219 #include "confdefs.h"
10220 #include <sys/types.h>
10221 #include <signal.h>
10222 #ifdef signal
10223 #undef signal
10224 #endif
10225 #ifdef __cplusplus
10226 extern "C" void (*signal (int, void (*)(int)))(int);
10227 #else
10228 void (*signal ()) ();
10229 #endif
10230
10231 int main() {
10232 int i;
10233 ; return 0; }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10236   rm -rf conftest*
10237   ac_cv_type_signal=void
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -rf conftest*
10242   ac_cv_type_signal=int
10243 fi
10244 rm -f conftest*
10245 fi
10246
10247 echo "$ac_t""$ac_cv_type_signal" 1>&6
10248 cat >> confdefs.h <<EOF
10249 #define RETSIGTYPE $ac_cv_type_signal
10250 EOF
10251
10252
10253 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10254 echo "configure:10255: checking for sig_atomic_t" >&5
10255 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
10256   echo $ac_n "(cached) $ac_c" 1>&6
10257 else
10258   cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 #include <signal.h>
10262 int main() {
10263 sig_atomic_t atomic;
10264 ; return 0; }
10265 EOF
10266 if { (eval echo configure:10267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10267   rm -rf conftest*
10268   ol_cv_type_sig_atomic_t=yes
10269 else
10270   echo "configure: failed program was:" >&5
10271   cat conftest.$ac_ext >&5
10272   rm -rf conftest*
10273   ol_cv_type_sig_atomic_t=no
10274 fi
10275 rm -f conftest*
10276 fi
10277
10278 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10279   if test $ol_cv_type_sig_atomic_t = no; then
10280     cat >> confdefs.h <<\EOF
10281 #define sig_atomic_t int
10282 EOF
10283
10284   fi
10285  
10286 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10287 echo "configure:10288: checking for size_t" >&5
10288 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
10289   echo $ac_n "(cached) $ac_c" 1>&6
10290 else
10291   cat > conftest.$ac_ext <<EOF
10292 #line 10293 "configure"
10293 #include "confdefs.h"
10294 #include <sys/types.h>
10295 #if STDC_HEADERS
10296 #include <stdlib.h>
10297 #include <stddef.h>
10298 #endif
10299 EOF
10300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10301   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10302   rm -rf conftest*
10303   ac_cv_type_size_t=yes
10304 else
10305   rm -rf conftest*
10306   ac_cv_type_size_t=no
10307 fi
10308 rm -f conftest*
10309
10310 fi
10311 echo "$ac_t""$ac_cv_type_size_t" 1>&6
10312 if test $ac_cv_type_size_t = no; then
10313   cat >> confdefs.h <<\EOF
10314 #define size_t unsigned
10315 EOF
10316
10317 fi
10318
10319 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10320 echo "configure:10321: checking for st_blksize in struct stat" >&5
10321 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 #include <sys/types.h>
10328 #include <sys/stat.h>
10329 int main() {
10330 struct stat s; s.st_blksize;
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10334   rm -rf conftest*
10335   ac_cv_struct_st_blksize=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   ac_cv_struct_st_blksize=no
10341 fi
10342 rm -f conftest*
10343 fi
10344
10345 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10346 if test $ac_cv_struct_st_blksize = yes; then
10347   cat >> confdefs.h <<\EOF
10348 #define HAVE_ST_BLKSIZE 1
10349 EOF
10350
10351 fi
10352
10353 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10354 echo "configure:10355: checking whether time.h and sys/time.h may both be included" >&5
10355 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10356   echo $ac_n "(cached) $ac_c" 1>&6
10357 else
10358   cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361 #include <sys/types.h>
10362 #include <sys/time.h>
10363 #include <time.h>
10364 int main() {
10365 struct tm *tp;
10366 ; return 0; }
10367 EOF
10368 if { (eval echo configure:10369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10369   rm -rf conftest*
10370   ac_cv_header_time=yes
10371 else
10372   echo "configure: failed program was:" >&5
10373   cat conftest.$ac_ext >&5
10374   rm -rf conftest*
10375   ac_cv_header_time=no
10376 fi
10377 rm -f conftest*
10378 fi
10379
10380 echo "$ac_t""$ac_cv_header_time" 1>&6
10381 if test $ac_cv_header_time = yes; then
10382   cat >> confdefs.h <<\EOF
10383 #define TIME_WITH_SYS_TIME 1
10384 EOF
10385
10386 fi
10387
10388 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10389 echo "configure:10390: checking whether struct tm is in sys/time.h or time.h" >&5
10390 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <sys/types.h>
10397 #include <time.h>
10398 int main() {
10399 struct tm *tp; tp->tm_sec;
10400 ; return 0; }
10401 EOF
10402 if { (eval echo configure:10403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10403   rm -rf conftest*
10404   ac_cv_struct_tm=time.h
10405 else
10406   echo "configure: failed program was:" >&5
10407   cat conftest.$ac_ext >&5
10408   rm -rf conftest*
10409   ac_cv_struct_tm=sys/time.h
10410 fi
10411 rm -f conftest*
10412 fi
10413
10414 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10415 if test $ac_cv_struct_tm = sys/time.h; then
10416   cat >> confdefs.h <<\EOF
10417 #define TM_IN_SYS_TIME 1
10418 EOF
10419
10420 fi
10421
10422 # test for pw_gecos in struct passwd
10423 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10424 echo "configure:10425: checking struct passwd for pw_gecos" >&5
10425 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   
10429         cat > conftest.$ac_ext <<EOF
10430 #line 10431 "configure"
10431 #include "confdefs.h"
10432 #include <pwd.h>
10433 int main() {
10434
10435         struct passwd pwd;
10436         pwd.pw_gecos = pwd.pw_name;
10437
10438 ; return 0; }
10439 EOF
10440 if { (eval echo configure:10441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10441   rm -rf conftest*
10442   ol_cv_struct_passwd_pw_gecos=yes
10443 else
10444   echo "configure: failed program was:" >&5
10445   cat conftest.$ac_ext >&5
10446   rm -rf conftest*
10447   ol_cv_struct_passwd_pw_gecos=no
10448 fi
10449 rm -f conftest*
10450 fi
10451
10452 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10453 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10454         cat >> confdefs.h <<\EOF
10455 #define HAVE_PW_GECOS 1
10456 EOF
10457
10458 fi
10459
10460
10461
10462 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10463 echo "configure:10464: checking if toupper() requires islower()" >&5
10464 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   
10468         if test "$cross_compiling" = yes; then
10469   ol_cv_c_upper_lower=safe
10470 else
10471   cat > conftest.$ac_ext <<EOF
10472 #line 10473 "configure"
10473 #include "confdefs.h"
10474
10475 #include <ctype.h>
10476 main()
10477 {
10478         if ('C' == toupper('C'))
10479                 exit(0);
10480         else
10481                 exit(1);
10482 }
10483 EOF
10484 if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10485 then
10486   ol_cv_c_upper_lower=no
10487 else
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -fr conftest*
10491   ol_cv_c_upper_lower=yes
10492 fi
10493 rm -fr conftest*
10494 fi
10495
10496 fi
10497
10498 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10499 if test $ol_cv_c_upper_lower != no ; then
10500         cat >> confdefs.h <<\EOF
10501 #define C_UPPER_LOWER 1
10502 EOF
10503
10504 fi
10505
10506 echo $ac_n "checking for working const""... $ac_c" 1>&6
10507 echo "configure:10508: checking for working const" >&5
10508 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10509   echo $ac_n "(cached) $ac_c" 1>&6
10510 else
10511   cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514
10515 int main() {
10516
10517 /* Ultrix mips cc rejects this.  */
10518 typedef int charset[2]; const charset x;
10519 /* SunOS 4.1.1 cc rejects this.  */
10520 char const *const *ccp;
10521 char **p;
10522 /* NEC SVR4.0.2 mips cc rejects this.  */
10523 struct point {int x, y;};
10524 static struct point const zero = {0,0};
10525 /* AIX XL C 1.02.0.0 rejects this.
10526    It does not let you subtract one const X* pointer from another in an arm
10527    of an if-expression whose if-part is not a constant expression */
10528 const char *g = "string";
10529 ccp = &g + (g ? g-g : 0);
10530 /* HPUX 7.0 cc rejects these. */
10531 ++ccp;
10532 p = (char**) ccp;
10533 ccp = (char const *const *) p;
10534 { /* SCO 3.2v4 cc rejects this.  */
10535   char *t;
10536   char const *s = 0 ? (char *) 0 : (char const *) 0;
10537
10538   *t++ = 0;
10539 }
10540 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10541   int x[] = {25, 17};
10542   const int *foo = &x[0];
10543   ++foo;
10544 }
10545 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10546   typedef const int *iptr;
10547   iptr p = 0;
10548   ++p;
10549 }
10550 { /* AIX XL C 1.02.0.0 rejects this saying
10551      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10552   struct s { int j; const int *ap[3]; };
10553   struct s *b; b->j = 5;
10554 }
10555 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10556   const int foo = 10;
10557 }
10558
10559 ; return 0; }
10560 EOF
10561 if { (eval echo configure:10562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10562   rm -rf conftest*
10563   ac_cv_c_const=yes
10564 else
10565   echo "configure: failed program was:" >&5
10566   cat conftest.$ac_ext >&5
10567   rm -rf conftest*
10568   ac_cv_c_const=no
10569 fi
10570 rm -f conftest*
10571 fi
10572
10573 echo "$ac_t""$ac_cv_c_const" 1>&6
10574 if test $ac_cv_c_const = no; then
10575   cat >> confdefs.h <<\EOF
10576 #define const 
10577 EOF
10578
10579 fi
10580
10581 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10582 echo "configure:10583: checking if compiler understands volatile" >&5
10583 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10584   echo $ac_n "(cached) $ac_c" 1>&6
10585 else
10586   cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589 int x, y, z;
10590 int main() {
10591 volatile int a; int * volatile b = x ? &y : &z;
10592       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10593       *b = 0;
10594 ; return 0; }
10595 EOF
10596 if { (eval echo configure:10597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10597   rm -rf conftest*
10598   ol_cv_c_volatile=yes
10599 else
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   ol_cv_c_volatile=no
10604 fi
10605 rm -f conftest*
10606 fi
10607
10608 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10609   if test $ol_cv_c_volatile = yes; then
10610     : 
10611   else
10612     cat >> confdefs.h <<\EOF
10613 #define volatile 
10614 EOF
10615
10616   fi
10617  
10618
10619 if test $cross_compiling = yes ; then
10620         cat >> confdefs.h <<\EOF
10621 #define CROSS_COMPILING 1
10622 EOF
10623
10624 else
10625         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10626 echo "configure:10627: checking whether byte ordering is bigendian" >&5
10627 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10628   echo $ac_n "(cached) $ac_c" 1>&6
10629 else
10630   ac_cv_c_bigendian=unknown
10631 # See if sys/param.h defines the BYTE_ORDER macro.
10632 cat > conftest.$ac_ext <<EOF
10633 #line 10634 "configure"
10634 #include "confdefs.h"
10635 #include <sys/types.h>
10636 #include <sys/param.h>
10637 int main() {
10638
10639 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10640  bogus endian macros
10641 #endif
10642 ; return 0; }
10643 EOF
10644 if { (eval echo configure:10645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10645   rm -rf conftest*
10646   # It does; now see whether it defined to BIG_ENDIAN or not.
10647 cat > conftest.$ac_ext <<EOF
10648 #line 10649 "configure"
10649 #include "confdefs.h"
10650 #include <sys/types.h>
10651 #include <sys/param.h>
10652 int main() {
10653
10654 #if BYTE_ORDER != BIG_ENDIAN
10655  not big endian
10656 #endif
10657 ; return 0; }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10660   rm -rf conftest*
10661   ac_cv_c_bigendian=yes
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   ac_cv_c_bigendian=no
10667 fi
10668 rm -f conftest*
10669 else
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672 fi
10673 rm -f conftest*
10674 if test $ac_cv_c_bigendian = unknown; then
10675 if test "$cross_compiling" = yes; then
10676     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10677 else
10678   cat > conftest.$ac_ext <<EOF
10679 #line 10680 "configure"
10680 #include "confdefs.h"
10681 main () {
10682   /* Are we little or big endian?  From Harbison&Steele.  */
10683   union
10684   {
10685     long l;
10686     char c[sizeof (long)];
10687   } u;
10688   u.l = 1;
10689   exit (u.c[sizeof (long) - 1] == 1);
10690 }
10691 EOF
10692 if { (eval echo configure:10693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10693 then
10694   ac_cv_c_bigendian=no
10695 else
10696   echo "configure: failed program was:" >&5
10697   cat conftest.$ac_ext >&5
10698   rm -fr conftest*
10699   ac_cv_c_bigendian=yes
10700 fi
10701 rm -fr conftest*
10702 fi
10703
10704 fi
10705 fi
10706
10707 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10708 if test $ac_cv_c_bigendian = yes; then
10709   cat >> confdefs.h <<\EOF
10710 #define WORDS_BIGENDIAN 1
10711 EOF
10712
10713 fi
10714
10715         echo $ac_n "checking size of short""... $ac_c" 1>&6
10716 echo "configure:10717: checking size of short" >&5
10717 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   if test "$cross_compiling" = yes; then
10721     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10722 else
10723   cat > conftest.$ac_ext <<EOF
10724 #line 10725 "configure"
10725 #include "confdefs.h"
10726 #include <stdio.h>
10727 main()
10728 {
10729   FILE *f=fopen("conftestval", "w");
10730   if (!f) exit(1);
10731   fprintf(f, "%d\n", sizeof(short));
10732   exit(0);
10733 }
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10736 then
10737   ac_cv_sizeof_short=`cat conftestval`
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -fr conftest*
10742   ac_cv_sizeof_short=0
10743 fi
10744 rm -fr conftest*
10745 fi
10746
10747 fi
10748 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10749 cat >> confdefs.h <<EOF
10750 #define SIZEOF_SHORT $ac_cv_sizeof_short
10751 EOF
10752
10753  
10754         echo $ac_n "checking size of int""... $ac_c" 1>&6
10755 echo "configure:10756: checking size of int" >&5
10756 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10757   echo $ac_n "(cached) $ac_c" 1>&6
10758 else
10759   if test "$cross_compiling" = yes; then
10760     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10761 else
10762   cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765 #include <stdio.h>
10766 main()
10767 {
10768   FILE *f=fopen("conftestval", "w");
10769   if (!f) exit(1);
10770   fprintf(f, "%d\n", sizeof(int));
10771   exit(0);
10772 }
10773 EOF
10774 if { (eval echo configure:10775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10775 then
10776   ac_cv_sizeof_int=`cat conftestval`
10777 else
10778   echo "configure: failed program was:" >&5
10779   cat conftest.$ac_ext >&5
10780   rm -fr conftest*
10781   ac_cv_sizeof_int=0
10782 fi
10783 rm -fr conftest*
10784 fi
10785
10786 fi
10787 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10788 cat >> confdefs.h <<EOF
10789 #define SIZEOF_INT $ac_cv_sizeof_int
10790 EOF
10791
10792  
10793         echo $ac_n "checking size of long""... $ac_c" 1>&6
10794 echo "configure:10795: checking size of long" >&5
10795 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   if test "$cross_compiling" = yes; then
10799     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10800 else
10801   cat > conftest.$ac_ext <<EOF
10802 #line 10803 "configure"
10803 #include "confdefs.h"
10804 #include <stdio.h>
10805 main()
10806 {
10807   FILE *f=fopen("conftestval", "w");
10808   if (!f) exit(1);
10809   fprintf(f, "%d\n", sizeof(long));
10810   exit(0);
10811 }
10812 EOF
10813 if { (eval echo configure:10814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10814 then
10815   ac_cv_sizeof_long=`cat conftestval`
10816 else
10817   echo "configure: failed program was:" >&5
10818   cat conftest.$ac_ext >&5
10819   rm -fr conftest*
10820   ac_cv_sizeof_long=0
10821 fi
10822 rm -fr conftest*
10823 fi
10824
10825 fi
10826 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10827 cat >> confdefs.h <<EOF
10828 #define SIZEOF_LONG $ac_cv_sizeof_long
10829 EOF
10830
10831
10832 fi
10833
10834 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10835 echo "configure:10836: checking for 8-bit clean memcmp" >&5
10836 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10837   echo $ac_n "(cached) $ac_c" 1>&6
10838 else
10839   if test "$cross_compiling" = yes; then
10840   ac_cv_func_memcmp_clean=no
10841 else
10842   cat > conftest.$ac_ext <<EOF
10843 #line 10844 "configure"
10844 #include "confdefs.h"
10845
10846 main()
10847 {
10848   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10849   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10850 }
10851
10852 EOF
10853 if { (eval echo configure:10854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10854 then
10855   ac_cv_func_memcmp_clean=yes
10856 else
10857   echo "configure: failed program was:" >&5
10858   cat conftest.$ac_ext >&5
10859   rm -fr conftest*
10860   ac_cv_func_memcmp_clean=no
10861 fi
10862 rm -fr conftest*
10863 fi
10864
10865 fi
10866
10867 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10868 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10869
10870 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10871 echo "configure:10872: checking for strftime" >&5
10872 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 /* System header to define __stub macros and hopefully few prototypes,
10879     which can conflict with char strftime(); below.  */
10880 #include <assert.h>
10881 /* Override any gcc2 internal prototype to avoid an error.  */
10882 /* We use char because int might match the return type of a gcc2
10883     builtin and then its argument prototype would still apply.  */
10884 char strftime();
10885
10886 int main() {
10887
10888 /* The GNU C library defines this for functions which it implements
10889     to always fail with ENOSYS.  Some functions are actually named
10890     something starting with __ and the normal name is an alias.  */
10891 #if defined (__stub_strftime) || defined (__stub___strftime)
10892 choke me
10893 #else
10894 strftime();
10895 #endif
10896
10897 ; return 0; }
10898 EOF
10899 if { (eval echo configure:10900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10900   rm -rf conftest*
10901   eval "ac_cv_func_strftime=yes"
10902 else
10903   echo "configure: failed program was:" >&5
10904   cat conftest.$ac_ext >&5
10905   rm -rf conftest*
10906   eval "ac_cv_func_strftime=no"
10907 fi
10908 rm -f conftest*
10909 fi
10910
10911 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10912   echo "$ac_t""yes" 1>&6
10913   cat >> confdefs.h <<\EOF
10914 #define HAVE_STRFTIME 1
10915 EOF
10916
10917 else
10918   echo "$ac_t""no" 1>&6
10919 # strftime is in -lintl on SCO UNIX.
10920 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10921 echo "configure:10922: checking for strftime in -lintl" >&5
10922 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10923 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10924   echo $ac_n "(cached) $ac_c" 1>&6
10925 else
10926   ac_save_LIBS="$LIBS"
10927 LIBS="-lintl  $LIBS"
10928 cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931 /* Override any gcc2 internal prototype to avoid an error.  */
10932 /* We use char because int might match the return type of a gcc2
10933     builtin and then its argument prototype would still apply.  */
10934 char strftime();
10935
10936 int main() {
10937 strftime()
10938 ; return 0; }
10939 EOF
10940 if { (eval echo configure:10941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10941   rm -rf conftest*
10942   eval "ac_cv_lib_$ac_lib_var=yes"
10943 else
10944   echo "configure: failed program was:" >&5
10945   cat conftest.$ac_ext >&5
10946   rm -rf conftest*
10947   eval "ac_cv_lib_$ac_lib_var=no"
10948 fi
10949 rm -f conftest*
10950 LIBS="$ac_save_LIBS"
10951
10952 fi
10953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10954   echo "$ac_t""yes" 1>&6
10955   cat >> confdefs.h <<\EOF
10956 #define HAVE_STRFTIME 1
10957 EOF
10958
10959 LIBS="-lintl $LIBS"
10960 else
10961   echo "$ac_t""no" 1>&6
10962 fi
10963
10964 fi
10965
10966
10967 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10968 echo "configure:10969: checking for vprintf" >&5
10969 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10970   echo $ac_n "(cached) $ac_c" 1>&6
10971 else
10972   cat > conftest.$ac_ext <<EOF
10973 #line 10974 "configure"
10974 #include "confdefs.h"
10975 /* System header to define __stub macros and hopefully few prototypes,
10976     which can conflict with char vprintf(); below.  */
10977 #include <assert.h>
10978 /* Override any gcc2 internal prototype to avoid an error.  */
10979 /* We use char because int might match the return type of a gcc2
10980     builtin and then its argument prototype would still apply.  */
10981 char vprintf();
10982
10983 int main() {
10984
10985 /* The GNU C library defines this for functions which it implements
10986     to always fail with ENOSYS.  Some functions are actually named
10987     something starting with __ and the normal name is an alias.  */
10988 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10989 choke me
10990 #else
10991 vprintf();
10992 #endif
10993
10994 ; return 0; }
10995 EOF
10996 if { (eval echo configure:10997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10997   rm -rf conftest*
10998   eval "ac_cv_func_vprintf=yes"
10999 else
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   eval "ac_cv_func_vprintf=no"
11004 fi
11005 rm -f conftest*
11006 fi
11007
11008 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11009   echo "$ac_t""yes" 1>&6
11010   cat >> confdefs.h <<\EOF
11011 #define HAVE_VPRINTF 1
11012 EOF
11013
11014 else
11015   echo "$ac_t""no" 1>&6
11016 fi
11017
11018 if test "$ac_cv_func_vprintf" != yes; then
11019 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11020 echo "configure:11021: checking for _doprnt" >&5
11021 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 /* System header to define __stub macros and hopefully few prototypes,
11028     which can conflict with char _doprnt(); below.  */
11029 #include <assert.h>
11030 /* Override any gcc2 internal prototype to avoid an error.  */
11031 /* We use char because int might match the return type of a gcc2
11032     builtin and then its argument prototype would still apply.  */
11033 char _doprnt();
11034
11035 int main() {
11036
11037 /* The GNU C library defines this for functions which it implements
11038     to always fail with ENOSYS.  Some functions are actually named
11039     something starting with __ and the normal name is an alias.  */
11040 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11041 choke me
11042 #else
11043 _doprnt();
11044 #endif
11045
11046 ; return 0; }
11047 EOF
11048 if { (eval echo configure:11049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11049   rm -rf conftest*
11050   eval "ac_cv_func__doprnt=yes"
11051 else
11052   echo "configure: failed program was:" >&5
11053   cat conftest.$ac_ext >&5
11054   rm -rf conftest*
11055   eval "ac_cv_func__doprnt=no"
11056 fi
11057 rm -f conftest*
11058 fi
11059
11060 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11061   echo "$ac_t""yes" 1>&6
11062   cat >> confdefs.h <<\EOF
11063 #define HAVE_DOPRNT 1
11064 EOF
11065
11066 else
11067   echo "$ac_t""no" 1>&6
11068 fi
11069
11070 fi
11071
11072
11073 if test $ac_cv_func_vprintf = yes ; then
11074                 for ac_func in vsnprintf vsprintf
11075 do
11076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11077 echo "configure:11078: checking for $ac_func" >&5
11078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084 /* System header to define __stub macros and hopefully few prototypes,
11085     which can conflict with char $ac_func(); below.  */
11086 #include <assert.h>
11087 /* Override any gcc2 internal prototype to avoid an error.  */
11088 /* We use char because int might match the return type of a gcc2
11089     builtin and then its argument prototype would still apply.  */
11090 char $ac_func();
11091
11092 int main() {
11093
11094 /* The GNU C library defines this for functions which it implements
11095     to always fail with ENOSYS.  Some functions are actually named
11096     something starting with __ and the normal name is an alias.  */
11097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11098 choke me
11099 #else
11100 $ac_func();
11101 #endif
11102
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11106   rm -rf conftest*
11107   eval "ac_cv_func_$ac_func=yes"
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   eval "ac_cv_func_$ac_func=no"
11113 fi
11114 rm -f conftest*
11115 fi
11116
11117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11118   echo "$ac_t""yes" 1>&6
11119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11120   cat >> confdefs.h <<EOF
11121 #define $ac_tr_func 1
11122 EOF
11123  
11124 else
11125   echo "$ac_t""no" 1>&6
11126 fi
11127 done
11128
11129 fi
11130
11131 for ac_func in \
11132         bcopy                   \
11133         endgrent                \
11134         endpwent                \
11135         flock                   \
11136         getdtablesize   \
11137         getgrgid                \
11138         gethostname             \
11139         getpass                 \
11140         getpwuid                \
11141         gettimeofday    \
11142         initgroups              \
11143         lockf                   \
11144         memcpy                  \
11145         memmove                 \
11146         mkstemp                 \
11147         recv                    \
11148         recvfrom                \
11149         setpwfile               \
11150         setgid                  \
11151         setegid                 \
11152         setsid                  \
11153         setuid                  \
11154         seteuid                 \
11155         signal                  \
11156         sigset                  \
11157         snprintf                \
11158         strdup                  \
11159         strerror                \
11160         strpbrk                 \
11161         strrchr                 \
11162         strsep                  \
11163         strstr                  \
11164         strtol                  \
11165         strtoul                 \
11166         strspn                  \
11167         sysconf                 \
11168         waitpid                 \
11169         wait4                   \
11170
11171 do
11172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11173 echo "configure:11174: checking for $ac_func" >&5
11174 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11175   echo $ac_n "(cached) $ac_c" 1>&6
11176 else
11177   cat > conftest.$ac_ext <<EOF
11178 #line 11179 "configure"
11179 #include "confdefs.h"
11180 /* System header to define __stub macros and hopefully few prototypes,
11181     which can conflict with char $ac_func(); below.  */
11182 #include <assert.h>
11183 /* Override any gcc2 internal prototype to avoid an error.  */
11184 /* We use char because int might match the return type of a gcc2
11185     builtin and then its argument prototype would still apply.  */
11186 char $ac_func();
11187
11188 int main() {
11189
11190 /* The GNU C library defines this for functions which it implements
11191     to always fail with ENOSYS.  Some functions are actually named
11192     something starting with __ and the normal name is an alias.  */
11193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11194 choke me
11195 #else
11196 $ac_func();
11197 #endif
11198
11199 ; return 0; }
11200 EOF
11201 if { (eval echo configure:11202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11202   rm -rf conftest*
11203   eval "ac_cv_func_$ac_func=yes"
11204 else
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   eval "ac_cv_func_$ac_func=no"
11209 fi
11210 rm -f conftest*
11211 fi
11212
11213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11214   echo "$ac_t""yes" 1>&6
11215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11216   cat >> confdefs.h <<EOF
11217 #define $ac_tr_func 1
11218 EOF
11219  
11220 else
11221   echo "$ac_t""no" 1>&6
11222 fi
11223 done
11224
11225
11226 for ac_func in getopt tempnam
11227 do
11228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_func" >&5
11230 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11231   echo $ac_n "(cached) $ac_c" 1>&6
11232 else
11233   cat > conftest.$ac_ext <<EOF
11234 #line 11235 "configure"
11235 #include "confdefs.h"
11236 /* System header to define __stub macros and hopefully few prototypes,
11237     which can conflict with char $ac_func(); below.  */
11238 #include <assert.h>
11239 /* Override any gcc2 internal prototype to avoid an error.  */
11240 /* We use char because int might match the return type of a gcc2
11241     builtin and then its argument prototype would still apply.  */
11242 char $ac_func();
11243
11244 int main() {
11245
11246 /* The GNU C library defines this for functions which it implements
11247     to always fail with ENOSYS.  Some functions are actually named
11248     something starting with __ and the normal name is an alias.  */
11249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11250 choke me
11251 #else
11252 $ac_func();
11253 #endif
11254
11255 ; return 0; }
11256 EOF
11257 if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11258   rm -rf conftest*
11259   eval "ac_cv_func_$ac_func=yes"
11260 else
11261   echo "configure: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   rm -rf conftest*
11264   eval "ac_cv_func_$ac_func=no"
11265 fi
11266 rm -f conftest*
11267 fi
11268
11269 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11270   echo "$ac_t""yes" 1>&6
11271     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11272   cat >> confdefs.h <<EOF
11273 #define $ac_tr_func 1
11274 EOF
11275  
11276 else
11277   echo "$ac_t""no" 1>&6
11278 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11279 fi
11280 done
11281
11282
11283
11284 # Check Configuration
11285
11286 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11287 echo "configure:11288: checking declaration of sys_errlist" >&5
11288 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   
11292         cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295
11296 #include <stdio.h>
11297 #include <sys/types.h>
11298 #include <errno.h> 
11299 int main() {
11300 char *c = (char *) *sys_errlist
11301 ; return 0; }
11302 EOF
11303 if { (eval echo configure:11304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11304   rm -rf conftest*
11305   ol_cv_dcl_sys_errlist=yes
11306 else
11307   echo "configure: failed program was:" >&5
11308   cat conftest.$ac_ext >&5
11309   rm -rf conftest*
11310   ol_cv_dcl_sys_errlist=no
11311 fi
11312 rm -f conftest*
11313 fi
11314
11315 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11316 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11317 if test $ol_cv_dcl_sys_errlist = no ; then
11318         cat >> confdefs.h <<\EOF
11319 #define DECL_SYS_ERRLIST 1
11320 EOF
11321
11322         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11323 echo "configure:11324: checking existence of sys_errlist" >&5
11324         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   
11328                 cat > conftest.$ac_ext <<EOF
11329 #line 11330 "configure"
11330 #include "confdefs.h"
11331 #include <errno.h>
11332 int main() {
11333 char *c = (char *) *sys_errlist
11334 ; return 0; }
11335 EOF
11336 if { (eval echo configure:11337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11337   rm -rf conftest*
11338   ol_cv_have_sys_errlist=yes
11339 else
11340   echo "configure: failed program was:" >&5
11341   cat conftest.$ac_ext >&5
11342   rm -rf conftest*
11343   ol_cv_have_sys_errlist=no
11344 fi
11345 rm -f conftest*
11346 fi
11347
11348         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11349         if test $ol_cv_have_sys_errlist = yes ; then
11350                 cat >> confdefs.h <<\EOF
11351 #define HAVE_SYS_ERRLIST 1
11352 EOF
11353
11354         fi
11355 fi
11356
11357
11358
11359 if test "$ol_enable_debug" != no ; then
11360         cat >> confdefs.h <<\EOF
11361 #define LDAP_DEBUG 1
11362 EOF
11363
11364 fi
11365 if test "$ol_enable_syslog" = yes ; then
11366         cat >> confdefs.h <<\EOF
11367 #define LDAP_SYSLOG 1
11368 EOF
11369
11370 fi
11371 if test "$ol_enable_libui" = yes ; then
11372         cat >> confdefs.h <<\EOF
11373 #define LDAP_LIBUI 1
11374 EOF
11375
11376 fi
11377 if test "$ol_enable_cache" = no ; then
11378         cat >> confdefs.h <<\EOF
11379 #define LDAP_NOCACHE 1
11380 EOF
11381
11382 fi
11383 if test "$ol_enable_dns" != no ; then
11384         cat >> confdefs.h <<\EOF
11385 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11386 EOF
11387
11388 fi
11389 if test "$ol_enable_proctitle" != no ; then
11390         cat >> confdefs.h <<\EOF
11391 #define LDAP_PROCTITLE 1
11392 EOF
11393
11394 fi
11395 if test "$ol_enable_referrals" != no ; then
11396         cat >> confdefs.h <<\EOF
11397 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11398 EOF
11399
11400 fi
11401 if test "$ol_enable_cldap" != no ; then
11402         cat >> confdefs.h <<\EOF
11403 #define LDAP_CONNECTIONLESS 1
11404 EOF
11405
11406 fi
11407
11408 if test "$ol_enable_aclgroups" != no ; then
11409         cat >> confdefs.h <<\EOF
11410 #define SLAPD_ACLGROUPS 1
11411 EOF
11412
11413 fi
11414 if test "$ol_enable_crypt" != no ; then
11415         cat >> confdefs.h <<\EOF
11416 #define SLAPD_CRYPT 1
11417 EOF
11418
11419 fi
11420 if test "$ol_enable_cleartext" != no ; then
11421         cat >> confdefs.h <<\EOF
11422 #define SLAPD_CLEARTEXT 1
11423 EOF
11424
11425 fi
11426 if test "$ol_enable_phonetic" != no ; then
11427         cat >> confdefs.h <<\EOF
11428 #define SLAPD_PHONETIC 1
11429 EOF
11430
11431 fi
11432 if test "$ol_enable_rlookups" != no ; then
11433         cat >> confdefs.h <<\EOF
11434 #define SLAPD_RLOOKUPS 1
11435 EOF
11436
11437 fi
11438
11439 if test "$ol_link_modules" != no ; then
11440         cat >> confdefs.h <<\EOF
11441 #define SLAPD_MODULES 1
11442 EOF
11443
11444         BUILD_SLAPD=yes
11445 fi
11446
11447 if test "$ol_link_bdb2" != no ; then
11448         cat >> confdefs.h <<\EOF
11449 #define SLAPD_BDB2 1
11450 EOF
11451
11452         BUILD_SLAPD=yes
11453         BUILD_BDB2=yes
11454 fi
11455
11456 if test "$ol_enable_ldap" != no ; then
11457         cat >> confdefs.h <<\EOF
11458 #define SLAPD_LDAP 1
11459 EOF
11460
11461         BUILD_SLAPD=yes
11462         BUILD_LDAP=yes
11463 fi
11464
11465 if test "$ol_link_ldbm" != no ; then
11466         cat >> confdefs.h <<\EOF
11467 #define SLAPD_LDBM 1
11468 EOF
11469
11470         BUILD_SLAPD=yes
11471         BUILD_LDBM=yes
11472 fi
11473
11474 if test "$ol_enable_passwd" != no ; then
11475         cat >> confdefs.h <<\EOF
11476 #define SLAPD_PASSWD 1
11477 EOF
11478
11479         BUILD_SLAPD=yes
11480         BUILD_PASSWD=yes
11481 fi
11482
11483 if test "$ol_link_perl" != no ; then
11484         cat >> confdefs.h <<\EOF
11485 #define SLAPD_PERL 1
11486 EOF
11487
11488         BUILD_SLAPD=yes
11489         BUILD_PERL=yes
11490 fi
11491
11492 if test "$ol_enable_shell" != no ; then
11493         cat >> confdefs.h <<\EOF
11494 #define SLAPD_SHELL 1
11495 EOF
11496
11497         BUILD_SLAPD=yes
11498         BUILD_SHELL=yes
11499 fi
11500
11501 if test "$ol_enable_tcl" != no ; then
11502         cat >> confdefs.h <<\EOF
11503 #define SLAPD_TCL 1
11504 EOF
11505
11506         BUILD_SLAPD=yes
11507         BUILD_TCL=yes
11508 fi
11509
11510 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11511         $BUILD_SLAPD = yes ; then
11512         BUILD_SLURPD=yes
11513 fi
11514
11515 if test "$ol_link_isode" != no ; then
11516         BUILD_LDAPD=yes
11517 fi
11518
11519
11520
11521
11522   
11523   
11524   
11525   
11526   
11527   
11528   
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551 trap '' 1 2 15
11552
11553 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11554
11555 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11556 # Let make expand exec_prefix.
11557 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11558
11559 # Any assignment to VPATH causes Sun make to only execute
11560 # the first set of double-colon rules, so remove it if not needed.
11561 # If there is a colon in the path, we need to keep it.
11562 if test "x$srcdir" = x.; then
11563   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11564 fi
11565
11566 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11567
11568 DEFS=-DHAVE_CONFIG_H
11569
11570 # Without the "./", some shells look in PATH for config.status.
11571 : ${CONFIG_STATUS=./config.status}
11572
11573 echo creating $CONFIG_STATUS
11574 rm -f $CONFIG_STATUS
11575 cat > $CONFIG_STATUS <<EOF
11576 #! /bin/sh
11577 # Generated automatically by configure.
11578 # Run this file to recreate the current configuration.
11579 # This directory was configured as follows,
11580 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11581 #
11582 # $0 $ac_configure_args
11583 #
11584 # Compiler output produced by configure, useful for debugging
11585 # configure, is in ./config.log if it exists.
11586
11587 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11588 for ac_option
11589 do
11590   case "\$ac_option" in
11591   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11592     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11593     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11594   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11595     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11596     exit 0 ;;
11597   -help | --help | --hel | --he | --h)
11598     echo "\$ac_cs_usage"; exit 0 ;;
11599   *) echo "\$ac_cs_usage"; exit 1 ;;
11600   esac
11601 done
11602
11603 ac_given_srcdir=$srcdir
11604 ac_given_INSTALL="$INSTALL"
11605
11606 trap 'rm -fr `echo "\
11607 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11608 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11609 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11610 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11611 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11612 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11613 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11614 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11615 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11616 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11617 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11618 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11619 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11620 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11621 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11622 include/Makefile:build/top.mk:include/Makefile.in \
11623 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11624 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11625 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11626 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11627 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11628 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11629 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11630 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11631 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11632 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11633 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11634 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11635 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
11636 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11637 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11638 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11639 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11640 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11641 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11642 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11643 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11644 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11645 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11646 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11647 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11648 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11649  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11650 EOF
11651 cat >> $CONFIG_STATUS <<EOF
11652
11653 # Protect against being on the right side of a sed subst in config.status.
11654 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11655  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11656 $ac_vpsub
11657 $extrasub
11658 s%@SHELL@%$SHELL%g
11659 s%@CFLAGS@%$CFLAGS%g
11660 s%@CPPFLAGS@%$CPPFLAGS%g
11661 s%@CXXFLAGS@%$CXXFLAGS%g
11662 s%@FFLAGS@%$FFLAGS%g
11663 s%@DEFS@%$DEFS%g
11664 s%@LDFLAGS@%$LDFLAGS%g
11665 s%@LIBS@%$LIBS%g
11666 s%@exec_prefix@%$exec_prefix%g
11667 s%@prefix@%$prefix%g
11668 s%@program_transform_name@%$program_transform_name%g
11669 s%@bindir@%$bindir%g
11670 s%@sbindir@%$sbindir%g
11671 s%@libexecdir@%$libexecdir%g
11672 s%@datadir@%$datadir%g
11673 s%@sysconfdir@%$sysconfdir%g
11674 s%@sharedstatedir@%$sharedstatedir%g
11675 s%@localstatedir@%$localstatedir%g
11676 s%@libdir@%$libdir%g
11677 s%@includedir@%$includedir%g
11678 s%@oldincludedir@%$oldincludedir%g
11679 s%@infodir@%$infodir%g
11680 s%@mandir@%$mandir%g
11681 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11682 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11683 s%@INSTALL_DATA@%$INSTALL_DATA%g
11684 s%@PACKAGE@%$PACKAGE%g
11685 s%@VERSION@%$VERSION%g
11686 s%@ACLOCAL@%$ACLOCAL%g
11687 s%@AUTOCONF@%$AUTOCONF%g
11688 s%@AUTOMAKE@%$AUTOMAKE%g
11689 s%@AUTOHEADER@%$AUTOHEADER%g
11690 s%@MAKEINFO@%$MAKEINFO%g
11691 s%@SET_MAKE@%$SET_MAKE%g
11692 s%@top_builddir@%$top_builddir%g
11693 s%@ldap_subdir@%$ldap_subdir%g
11694 s%@host@%$host%g
11695 s%@host_alias@%$host_alias%g
11696 s%@host_cpu@%$host_cpu%g
11697 s%@host_vendor@%$host_vendor%g
11698 s%@host_os@%$host_os%g
11699 s%@RANLIB@%$RANLIB%g
11700 s%@CC@%$CC%g
11701 s%@LD@%$LD%g
11702 s%@NM@%$NM%g
11703 s%@LN_S@%$LN_S%g
11704 s%@LIBTOOL@%$LIBTOOL%g
11705 s%@AWK@%$AWK%g
11706 s%@LN_H@%$LN_H%g
11707 s%@SENDMAIL@%$SENDMAIL%g
11708 s%@EDITOR@%$EDITOR%g
11709 s%@FINGER@%$FINGER%g
11710 s%@GLIBCONFIG@%$GLIBCONFIG%g
11711 s%@PERLBIN@%$PERLBIN%g
11712 s%@CPP@%$CPP%g
11713 s%@EXEEXT@%$EXEEXT%g
11714 s%@OBJEXT@%$OBJEXT%g
11715 s%@CC_DEPEND_FLAGS@%$CC_DEPEND_FLAGS%g
11716 s%@PEPSY@%$PEPSY%g
11717 s%@LIBOBJS@%$LIBOBJS%g
11718 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11719 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11720 s%@BUILD_BDB2@%$BUILD_BDB2%g
11721 s%@BUILD_LDAP@%$BUILD_LDAP%g
11722 s%@BUILD_LDBM@%$BUILD_LDBM%g
11723 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11724 s%@BUILD_PERL@%$BUILD_PERL%g
11725 s%@BUILD_SHELL@%$BUILD_SHELL%g
11726 s%@BUILD_TCL@%$BUILD_TCL%g
11727 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11728 s%@LDAP_LIBS@%$LDAP_LIBS%g
11729 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11730 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11731 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11732 s%@LDBM_LIBS@%$LDBM_LIBS%g
11733 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11734 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11735 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
11736 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
11737 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11738 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11739 s%@KRB_LIBS@%$KRB_LIBS%g
11740 s%@READLINE_LIBS@%$READLINE_LIBS%g
11741 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11742 s%@TLS_LIBS@%$TLS_LIBS%g
11743
11744 CEOF
11745 EOF
11746
11747 cat >> $CONFIG_STATUS <<\EOF
11748
11749 # Split the substitutions into bite-sized pieces for seds with
11750 # small command number limits, like on Digital OSF/1 and HP-UX.
11751 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11752 ac_file=1 # Number of current file.
11753 ac_beg=1 # First line for current file.
11754 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11755 ac_more_lines=:
11756 ac_sed_cmds=""
11757 while $ac_more_lines; do
11758   if test $ac_beg -gt 1; then
11759     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11760   else
11761     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11762   fi
11763   if test ! -s conftest.s$ac_file; then
11764     ac_more_lines=false
11765     rm -f conftest.s$ac_file
11766   else
11767     if test -z "$ac_sed_cmds"; then
11768       ac_sed_cmds="sed -f conftest.s$ac_file"
11769     else
11770       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11771     fi
11772     ac_file=`expr $ac_file + 1`
11773     ac_beg=$ac_end
11774     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11775   fi
11776 done
11777 if test -z "$ac_sed_cmds"; then
11778   ac_sed_cmds=cat
11779 fi
11780 EOF
11781
11782 cat >> $CONFIG_STATUS <<EOF
11783
11784 CONFIG_FILES=\${CONFIG_FILES-"\
11785 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11786 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11787 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11788 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11789 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11790 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11791 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11792 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11793 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11794 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11795 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11796 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11797 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11798 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11799 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11800 include/Makefile:build/top.mk:include/Makefile.in \
11801 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11802 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11803 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11804 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11805 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11806 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11807 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11808 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11809 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11810 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11811 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11812 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11813 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
11814 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11815 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11816 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11817 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11818 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11819 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11820 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11821 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11822 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11823 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11824 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11825 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11826 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11827 "}
11828 EOF
11829 cat >> $CONFIG_STATUS <<\EOF
11830 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11831   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11832   case "$ac_file" in
11833   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11834        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11835   *) ac_file_in="${ac_file}.in" ;;
11836   esac
11837
11838   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11839
11840   # Remove last slash and all that follows it.  Not all systems have dirname.
11841   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11842   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11843     # The file is in a subdirectory.
11844     test ! -d "$ac_dir" && mkdir "$ac_dir"
11845     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11846     # A "../" for each directory in $ac_dir_suffix.
11847     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11848   else
11849     ac_dir_suffix= ac_dots=
11850   fi
11851
11852   case "$ac_given_srcdir" in
11853   .)  srcdir=.
11854       if test -z "$ac_dots"; then top_srcdir=.
11855       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11856   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11857   *) # Relative path.
11858     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11859     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11860   esac
11861
11862   case "$ac_given_INSTALL" in
11863   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11864   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11865   esac
11866
11867   echo creating "$ac_file"
11868   rm -f "$ac_file"
11869   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11870   case "$ac_file" in
11871   *Makefile*) ac_comsub="1i\\
11872 # $configure_input" ;;
11873   *) ac_comsub= ;;
11874   esac
11875
11876   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11877   sed -e "$ac_comsub
11878 s%@configure_input@%$configure_input%g
11879 s%@srcdir@%$srcdir%g
11880 s%@top_srcdir@%$top_srcdir%g
11881 s%@INSTALL@%$INSTALL%g
11882 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11883 fi; done
11884 rm -f conftest.s*
11885
11886 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11887 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11888 #
11889 # ac_d sets the value in "#define NAME VALUE" lines.
11890 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11891 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11892 ac_dC='\3'
11893 ac_dD='%g'
11894 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11895 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11896 ac_uB='\([      ]\)%\1#\2define\3'
11897 ac_uC=' '
11898 ac_uD='\4%g'
11899 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11900 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11901 ac_eB='$%\1#\2define\3'
11902 ac_eC=' '
11903 ac_eD='%g'
11904
11905 if test "${CONFIG_HEADERS+set}" != set; then
11906 EOF
11907 cat >> $CONFIG_STATUS <<EOF
11908   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11909 EOF
11910 cat >> $CONFIG_STATUS <<\EOF
11911 fi
11912 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11913   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11914   case "$ac_file" in
11915   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11916        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11917   *) ac_file_in="${ac_file}.in" ;;
11918   esac
11919
11920   echo creating $ac_file
11921
11922   rm -f conftest.frag conftest.in conftest.out
11923   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11924   cat $ac_file_inputs > conftest.in
11925
11926 EOF
11927
11928 # Transform confdefs.h into a sed script conftest.vals that substitutes
11929 # the proper values into config.h.in to produce config.h.  And first:
11930 # Protect against being on the right side of a sed subst in config.status.
11931 # Protect against being in an unquoted here document in config.status.
11932 rm -f conftest.vals
11933 cat > conftest.hdr <<\EOF
11934 s/[\\&%]/\\&/g
11935 s%[\\$`]%\\&%g
11936 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11937 s%ac_d%ac_u%gp
11938 s%ac_u%ac_e%gp
11939 EOF
11940 sed -n -f conftest.hdr confdefs.h > conftest.vals
11941 rm -f conftest.hdr
11942
11943 # This sed command replaces #undef with comments.  This is necessary, for
11944 # example, in the case of _POSIX_SOURCE, which is predefined and required
11945 # on some systems where configure will not decide to define it.
11946 cat >> conftest.vals <<\EOF
11947 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11948 EOF
11949
11950 # Break up conftest.vals because some shells have a limit on
11951 # the size of here documents, and old seds have small limits too.
11952
11953 rm -f conftest.tail
11954 while :
11955 do
11956   ac_lines=`grep -c . conftest.vals`
11957   # grep -c gives empty output for an empty file on some AIX systems.
11958   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11959   # Write a limited-size here document to conftest.frag.
11960   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11961   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11962   echo 'CEOF
11963   sed -f conftest.frag conftest.in > conftest.out
11964   rm -f conftest.in
11965   mv conftest.out conftest.in
11966 ' >> $CONFIG_STATUS
11967   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11968   rm -f conftest.vals
11969   mv conftest.tail conftest.vals
11970 done
11971 rm -f conftest.vals
11972
11973 cat >> $CONFIG_STATUS <<\EOF
11974   rm -f conftest.frag conftest.h
11975   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11976   cat conftest.in >> conftest.h
11977   rm -f conftest.in
11978   if cmp -s $ac_file conftest.h 2>/dev/null; then
11979     echo "$ac_file is unchanged"
11980     rm -f conftest.h
11981   else
11982     # Remove last slash and all that follows it.  Not all systems have dirname.
11983       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11984       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11985       # The file is in a subdirectory.
11986       test ! -d "$ac_dir" && mkdir "$ac_dir"
11987     fi
11988     rm -f $ac_file
11989     mv conftest.h $ac_file
11990   fi
11991 fi; done
11992
11993 EOF
11994 cat >> $CONFIG_STATUS <<EOF
11995
11996 EOF
11997 cat >> $CONFIG_STATUS <<\EOF
11998
11999 date > stamp-h
12000 echo Please \"make depend\" to build dependencies
12001
12002 exit 0
12003 EOF
12004 chmod +x $CONFIG_STATUS
12005 rm -fr confdefs* $ac_clean_files
12006 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12007